Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCasimir666 <casimir666@users.sourceforge.net>2006-06-25 00:30:43 +0400
committerCasimir666 <casimir666@users.sourceforge.net>2006-06-25 00:30:43 +0400
commiteebfbbfc59746249c15ddc3de54caaae8a5d8ca7 (patch)
tree35d201f305ded0abee549282583e2226eb8f28bf /include/qt
parent49e6ef9fd5ee627996aeb71e08e6014e75beeec4 (diff)
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@11 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'include/qt')
-rw-r--r--include/qt/ADSP.h308
-rw-r--r--include/qt/ADSPSecure.h206
-rw-r--r--include/qt/AEDataModel.h559
-rw-r--r--include/qt/AEObjects.h406
-rw-r--r--include/qt/AEPackObject.h100
-rw-r--r--include/qt/AERegistry.h1060
-rw-r--r--include/qt/AEUserTermTypes.h132
-rw-r--r--include/qt/AGP.h175
-rw-r--r--include/qt/AIFF.h260
-rw-r--r--include/qt/ASDebugging.h228
-rw-r--r--include/qt/ASRegistry.h350
-rw-r--r--include/qt/ATA.h1124
-rw-r--r--include/qt/ATSLayoutTypes.h151
-rw-r--r--include/qt/ATSTypes.h122
-rw-r--r--include/qt/ATSUnicode.h1054
-rw-r--r--include/qt/AVComponents.h641
-rw-r--r--include/qt/AVLTree.h350
-rw-r--r--include/qt/Aliases.h257
-rw-r--r--include/qt/Appearance.h1661
-rw-r--r--include/qt/AppleEvents.h404
-rw-r--r--include/qt/AppleGuide.h557
-rw-r--r--include/qt/AppleScript.h208
-rw-r--r--include/qt/AppleTalk.h1498
-rw-r--r--include/qt/Balloons.h349
-rw-r--r--include/qt/CFArray.h193
-rw-r--r--include/qt/CFBag.h162
-rw-r--r--include/qt/CFBase.h307
-rw-r--r--include/qt/CFBundle.h209
-rw-r--r--include/qt/CFCharacterSet.h187
-rw-r--r--include/qt/CFData.h137
-rw-r--r--include/qt/CFDate.h159
-rw-r--r--include/qt/CFDictionary.h187
-rw-r--r--include/qt/CFNumber.h192
-rw-r--r--include/qt/CFPlugIn.h181
-rw-r--r--include/qt/CFPreferences.h138
-rw-r--r--include/qt/CFPropertyList.h114
-rw-r--r--include/qt/CFSet.h163
-rw-r--r--include/qt/CFString.h724
-rw-r--r--include/qt/CFStringEncodingExt.h197
-rw-r--r--include/qt/CFTimeZone.h90
-rw-r--r--include/qt/CFURL.h280
-rw-r--r--include/qt/CFURLAccess.h207
-rw-r--r--include/qt/CMAcceleration.h143
-rw-r--r--include/qt/CMApplication.h1508
-rw-r--r--include/qt/CMCalibrator.h213
-rw-r--r--include/qt/CMComponent.h39
-rw-r--r--include/qt/CMConversions.h182
-rw-r--r--include/qt/CMICCProfile.h932
-rw-r--r--include/qt/CMMComponent.h411
-rw-r--r--include/qt/CMPRComponent.h121
-rw-r--r--include/qt/CMScriptingPlugin.h171
-rw-r--r--include/qt/CRMSerialDevices.h102
-rw-r--r--include/qt/CTBUtilities.h275
-rw-r--r--include/qt/CarbonEvents.h1432
-rw-r--r--include/qt/CardServices.h914
-rw-r--r--include/qt/CodeFragments.h538
-rw-r--r--include/qt/Collections.h548
-rw-r--r--include/qt/ColorPicker.h345
-rw-r--r--include/qt/ColorPickerComponents.h1183
-rw-r--r--include/qt/CommResources.h208
-rw-r--r--include/qt/Components.h687
-rw-r--r--include/qt/ConditionalMacros.h1810
-rw-r--r--include/qt/ConnectionTools.h176
-rw-r--r--include/qt/Connections.h572
-rw-r--r--include/qt/ControlDefinitions.h1294
-rw-r--r--include/qt/ControlStrip.h242
-rw-r--r--include/qt/Controls.h1592
-rw-r--r--include/qt/CoreFoundation.h95
-rw-r--r--include/qt/CryptoMessageSyntax.h138
-rw-r--r--include/qt/CursorDevices.h266
-rw-r--r--include/qt/DatabaseAccess.h438
-rw-r--r--include/qt/DateTimeUtils.h466
-rw-r--r--include/qt/Debugging.h797
-rw-r--r--include/qt/DeskBus.h297
-rw-r--r--include/qt/DeviceControl.h95
-rw-r--r--include/qt/Devices.h857
-rw-r--r--include/qt/Dialogs.h872
-rw-r--r--include/qt/Dictionary.h734
-rw-r--r--include/qt/DigitalSignature.h415
-rw-r--r--include/qt/DiskInit.h161
-rw-r--r--include/qt/Disks.h170
-rw-r--r--include/qt/Displays.h783
-rw-r--r--include/qt/Drag.h722
-rw-r--r--include/qt/DrawSprocket.h487
-rw-r--r--include/qt/DriverFamilyMatching.h214
-rw-r--r--include/qt/DriverGestalt.h674
-rw-r--r--include/qt/DriverServices.h680
-rw-r--r--include/qt/DriverSupport.h30
-rw-r--r--include/qt/DriverSynchronization.h157
-rw-r--r--include/qt/ENET.h190
-rw-r--r--include/qt/EPPC.h224
-rw-r--r--include/qt/Editions.h528
-rw-r--r--include/qt/Endian.h451
-rw-r--r--include/qt/Events.h426
-rw-r--r--include/qt/FSM.h1183
-rw-r--r--include/qt/FileSigning.h222
-rw-r--r--include/qt/FileTransferTools.h144
-rw-r--r--include/qt/FileTransfers.h551
-rw-r--r--include/qt/FileTypesAndCreators.h684
-rw-r--r--include/qt/Files.h4399
-rw-r--r--include/qt/FindByContent.h309
-rw-r--r--include/qt/Finder.h385
-rw-r--r--include/qt/FinderRegistry.h759
-rw-r--r--include/qt/FixMath.h230
-rw-r--r--include/qt/Folders.h533
-rw-r--r--include/qt/FontSync.h298
-rw-r--r--include/qt/Fonts.h685
-rw-r--r--include/qt/GXEnvironment.h348
-rw-r--r--include/qt/GXErrors.h766
-rw-r--r--include/qt/GXFonts.h350
-rw-r--r--include/qt/GXGraphics.h1881
-rw-r--r--include/qt/GXLayout.h404
-rw-r--r--include/qt/GXMath.h324
-rw-r--r--include/qt/GXMessages.h261
-rw-r--r--include/qt/GXPrinterDrivers.h1098
-rw-r--r--include/qt/GXPrinting.h4457
-rw-r--r--include/qt/GXTypes.h1890
-rw-r--r--include/qt/Gestalt.h1804
-rw-r--r--include/qt/HFSVolumes.h534
-rw-r--r--include/qt/HID.h1483
-rw-r--r--include/qt/HTMLRendering.h407
-rw-r--r--include/qt/HyperXCmd.h634
-rw-r--r--include/qt/IAExtractor.h412
-rw-r--r--include/qt/Icons.h1484
-rw-r--r--include/qt/ImageCodec.h2006
-rw-r--r--include/qt/ImageCompression.h2898
-rw-r--r--include/qt/InputSprocket.h1328
-rw-r--r--include/qt/Interrupts.h30
-rw-r--r--include/qt/IntlResources.h387
-rw-r--r--include/qt/IsochronousDataHandler.h450
-rw-r--r--include/qt/JManager.h1312
-rw-r--r--include/qt/Kernel.h30
-rw-r--r--include/qt/LanguageAnalysis.h454
-rw-r--r--include/qt/Lists.h650
-rw-r--r--include/qt/LocationManager.h373
-rw-r--r--include/qt/LowMem.h1460
-rw-r--r--include/qt/MIDI.h619
-rw-r--r--include/qt/MacErrors.h2718
-rw-r--r--include/qt/MacHelp.h372
-rw-r--r--include/qt/MacMemory.h991
-rw-r--r--include/qt/MacTCP.h840
-rw-r--r--include/qt/MacTypes.h688
-rw-r--r--include/qt/MacWindows.h1885
-rw-r--r--include/qt/MachineExceptions.h285
-rw-r--r--include/qt/Math64.h429
-rw-r--r--include/qt/MediaHandlers.h846
-rw-r--r--include/qt/Menus.h1239
-rw-r--r--include/qt/MixedMode.h699
-rw-r--r--include/qt/MovieManager.h998
-rw-r--r--include/qt/Movies.h6401
-rw-r--r--include/qt/MoviesFormat.h803
-rw-r--r--include/qt/Multiprocessing.h973
-rw-r--r--include/qt/NSL.h786
-rw-r--r--include/qt/NSLUtility.h25
-rw-r--r--include/qt/NameRegistry.h539
-rw-r--r--include/qt/Navigation.h586
-rw-r--r--include/qt/NetSprocket.h599
-rw-r--r--include/qt/NetworkSetup.h1495
-rw-r--r--include/qt/Notification.h123
-rw-r--r--include/qt/NumberFormatting.h194
-rw-r--r--include/qt/OCE.h1537
-rw-r--r--include/qt/OCEAuthDir.h4714
-rw-r--r--include/qt/OCEErrors.h370
-rw-r--r--include/qt/OCEMail.h1589
-rw-r--r--include/qt/OCEMessaging.h1153
-rw-r--r--include/qt/OCEStandardDirectory.h652
-rw-r--r--include/qt/OCEStandardMail.h756
-rw-r--r--include/qt/OCETemplates.h1851
-rw-r--r--include/qt/OSA.h1459
-rw-r--r--include/qt/OSAComp.h88
-rw-r--r--include/qt/OSAGeneric.h136
-rw-r--r--include/qt/OSUtils.h469
-rw-r--r--include/qt/OpenTransportKernel.h1588
-rw-r--r--include/qt/OpenTransportProtocol.h4123
-rw-r--r--include/qt/OpenTransportProviders.h1791
-rw-r--r--include/qt/OpenTransportUNIX.h485
-rw-r--r--include/qt/PCCard.h600
-rw-r--r--include/qt/PCCardAdapterPlugin.h204
-rw-r--r--include/qt/PCCardEnablerPlugin.h541
-rw-r--r--include/qt/PCCardTuples.h457
-rw-r--r--include/qt/PCI.h248
-rw-r--r--include/qt/PEFBinaryFormat.h1129
-rw-r--r--include/qt/PLStringFuncs.h122
-rw-r--r--include/qt/PPCToolbox.h636
-rw-r--r--include/qt/Packages.h88
-rw-r--r--include/qt/Palettes.h251
-rw-r--r--include/qt/Patches.h169
-rw-r--r--include/qt/PictUtils.h276
-rw-r--r--include/qt/Power.h1150
-rw-r--r--include/qt/Printing.h523
-rw-r--r--include/qt/Processes.h303
-rw-r--r--include/qt/QD3D.h1233
-rw-r--r--include/qt/QD3DAcceleration.h142
-rw-r--r--include/qt/QD3DCamera.h396
-rw-r--r--include/qt/QD3DController.h367
-rw-r--r--include/qt/QD3DCustomElements.h190
-rw-r--r--include/qt/QD3DDrawContext.h545
-rw-r--r--include/qt/QD3DErrors.h349
-rw-r--r--include/qt/QD3DExtension.h373
-rw-r--r--include/qt/QD3DGeometry.h2191
-rw-r--r--include/qt/QD3DGroup.h520
-rw-r--r--include/qt/QD3DIO.h847
-rw-r--r--include/qt/QD3DLight.h371
-rw-r--r--include/qt/QD3DMath.h921
-rw-r--r--include/qt/QD3DPick.h354
-rw-r--r--include/qt/QD3DRenderer.h1298
-rw-r--r--include/qt/QD3DSet.h342
-rw-r--r--include/qt/QD3DShader.h330
-rw-r--r--include/qt/QD3DStorage.h313
-rw-r--r--include/qt/QD3DString.h132
-rw-r--r--include/qt/QD3DStyle.h459
-rw-r--r--include/qt/QD3DTransform.h387
-rw-r--r--include/qt/QD3DView.h491
-rw-r--r--include/qt/QD3DViewer.h541
-rw-r--r--include/qt/QD3DWinViewer.h515
-rw-r--r--include/qt/QDOffscreen.h256
-rw-r--r--include/qt/QTContentRestrictions.h82
-rw-r--r--include/qt/QTML.h309
-rw-r--r--include/qt/QTSMovie.h205
-rw-r--r--include/qt/QTStreamingComponents.h1536
-rw-r--r--include/qt/QuickTimeComponents.h5317
-rw-r--r--include/qt/QuickTimeMusic.h2154
-rw-r--r--include/qt/QuickTimeStreaming.h1557
-rw-r--r--include/qt/QuickTimeVR.h1171
-rw-r--r--include/qt/QuickTimeVRFormat.h552
-rw-r--r--include/qt/Quickdraw.h2744
-rw-r--r--include/qt/QuickdrawText.h353
-rw-r--r--include/qt/RAVE.h1540
-rw-r--r--include/qt/RAVESystem.h385
-rw-r--r--include/qt/ROMDefs.h294
-rw-r--r--include/qt/Resources.h487
-rw-r--r--include/qt/Retrace.h164
-rw-r--r--include/qt/SCSI.h1148
-rw-r--r--include/qt/SFNTLayoutTypes.h1106
-rw-r--r--include/qt/SFNTTypes.h510
-rw-r--r--include/qt/ScalerStreamTypes.h145
-rw-r--r--include/qt/ScalerTypes.h67
-rw-r--r--include/qt/Scrap.h405
-rw-r--r--include/qt/Script.h1190
-rw-r--r--include/qt/SegLoad.h140
-rw-r--r--include/qt/Serial.h312
-rw-r--r--include/qt/ShutDown.h134
-rw-r--r--include/qt/Slots.h562
-rw-r--r--include/qt/SocketServices.h837
-rw-r--r--include/qt/Sound.h1921
-rw-r--r--include/qt/SoundComponents.h28
-rw-r--r--include/qt/SoundInput.h30
-rw-r--r--include/qt/SoundSprocket.h624
-rw-r--r--include/qt/Speech.h31
-rw-r--r--include/qt/SpeechRecognition.h511
-rw-r--r--include/qt/SpeechSynthesis.h483
-rw-r--r--include/qt/StandardFile.h432
-rw-r--r--include/qt/Start.h365
-rw-r--r--include/qt/StringCompare.h423
-rw-r--r--include/qt/Strings.h31
-rw-r--r--include/qt/TSMTE.h193
-rw-r--r--include/qt/Telephones.h1360
-rw-r--r--include/qt/TerminalTools.h167
-rw-r--r--include/qt/Terminals.h593
-rw-r--r--include/qt/TextCommon.h585
-rw-r--r--include/qt/TextEdit.h1046
-rw-r--r--include/qt/TextEncodingConverter.h272
-rw-r--r--include/qt/TextServices.h370
-rw-r--r--include/qt/TextUtils.h425
-rw-r--r--include/qt/Threads.h378
-rw-r--r--include/qt/Timer.h187
-rw-r--r--include/qt/ToolUtils.h175
-rw-r--r--include/qt/Translation.h348
-rw-r--r--include/qt/TranslationExtensions.h209
-rw-r--r--include/qt/Traps.h1077
-rw-r--r--include/qt/URLAccess.h344
-rw-r--r--include/qt/UTCUtils.h133
-rw-r--r--include/qt/Unicode.h67
-rw-r--r--include/qt/UnicodeConverter.h423
-rw-r--r--include/qt/UnicodeUtilities.h484
-rw-r--r--include/qt/Video.h996
-rw-r--r--include/qt/VideoServices.h180
-rw-r--r--include/qt/WorldScript.h349
-rw-r--r--include/qt/ZoomedVideo.h157
-rw-r--r--include/qt/fenv.h306
-rw-r--r--include/qt/fp.h913
-rw-r--r--include/qt/qt.h11
282 files changed, 193776 insertions, 0 deletions
diff --git a/include/qt/ADSP.h b/include/qt/ADSP.h
new file mode 100644
index 000000000..dc7aeaa05
--- /dev/null
+++ b/include/qt/ADSP.h
@@ -0,0 +1,308 @@
+/*
+ File: ADSP.h
+
+ Contains: AppleTalk Data Stream Protocol (ADSP) Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1986-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __ADSP__
+#define __ADSP__
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+#ifndef __APPLETALK__
+#include "AppleTalk.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*driver control csCodes*/
+enum {
+ dspInit = 255, /* create a new connection end */
+ dspRemove = 254, /* remove a connection end */
+ dspOpen = 253, /* open a connection */
+ dspClose = 252, /* close a connection */
+ dspCLInit = 251, /* create a connection listener */
+ dspCLRemove = 250, /* remove a connection listener */
+ dspCLListen = 249, /* post a listener request */
+ dspCLDeny = 248, /* deny an open connection request */
+ dspStatus = 247, /* get status of connection end */
+ dspRead = 246, /* read data from the connection */
+ dspWrite = 245, /* write data on the connection */
+ dspAttention = 244, /* send an attention message */
+ dspOptions = 243, /* set connection end options */
+ dspReset = 242, /* forward reset the connection */
+ dspNewCID = 241 /* generate a cid for a connection end */
+};
+
+enum {
+ /* connection opening modes */
+ ocRequest = 1, /* request a connection with remote */
+ ocPassive = 2, /* wait for a connection request from remote */
+ ocAccept = 3, /* accept request as delivered by listener */
+ ocEstablish = 4 /* consider connection to be open */
+};
+
+enum {
+ /* connection end states */
+ sListening = 1, /* for connection listeners */
+ sPassive = 2, /* waiting for a connection request from remote */
+ sOpening = 3, /* requesting a connection with remote */
+ sOpen = 4, /* connection is open */
+ sClosing = 5, /* connection is being torn down */
+ sClosed = 6 /* connection end state is closed */
+};
+
+enum {
+ /* client event flags */
+ eClosed = 0x80, /* received connection closed advice */
+ eTearDown = 0x40, /* connection closed due to broken connection */
+ eAttention = 0x20, /* received attention message */
+ eFwdReset = 0x10 /* received forward reset advice */
+};
+
+enum {
+ /* miscellaneous constants */
+ attnBufSize = 570, /* size of client attention buffer */
+ minDSPQueueSize = 100 /* Minimum size of receive or send Queue */
+};
+
+/* connection control block */
+typedef struct TRCCB TRCCB;
+typedef TRCCB * TPCCB;
+
+struct TRCCB {
+ TPCCB ccbLink; /* link to next ccb */
+ UInt16 refNum; /* user reference number */
+ UInt16 state; /* state of the connection end */
+ UInt8 userFlags; /* flags for unsolicited connection events */
+ UInt8 localSocket; /* socket number of this connection end */
+ AddrBlock remoteAddress; /* internet address of remote end */
+ UInt16 attnCode; /* attention code received */
+ UInt16 attnSize; /* size of received attention data */
+ void * attnPtr; /* ptr to received attention data */
+ UInt8 reserved[220]; /* for adsp internal use */
+};
+
+typedef CALLBACK_API( void , ADSPConnectionEventProcPtr )(TPCCB sourceCCB);
+/*
+ WARNING: ADSPConnectionEventProcPtr uses register based parameters under classic 68k
+ and cannot be written in a high-level language without
+ the help of mixed mode or assembly glue.
+*/
+typedef struct DSPParamBlock DSPParamBlock;
+typedef DSPParamBlock * DSPPBPtr;
+typedef CALLBACK_API( void , ADSPCompletionProcPtr )(DSPPBPtr thePBPtr);
+/*
+ WARNING: ADSPCompletionProcPtr uses register based parameters under classic 68k
+ and cannot be written in a high-level language without
+ the help of mixed mode or assembly glue.
+*/
+typedef REGISTER_UPP_TYPE(ADSPConnectionEventProcPtr) ADSPConnectionEventUPP;
+typedef REGISTER_UPP_TYPE(ADSPCompletionProcPtr) ADSPCompletionUPP;
+
+struct TRinitParams {
+ TPCCB ccbPtr; /* pointer to connection control block */
+ ADSPConnectionEventUPP userRoutine; /* client routine to call on event */
+ UInt16 sendQSize; /* size of send queue (0..64K bytes) */
+ void * sendQueue; /* client passed send queue buffer */
+ UInt16 recvQSize; /* size of receive queue (0..64K bytes) */
+ void * recvQueue; /* client passed receive queue buffer */
+ void * attnPtr; /* client passed receive attention buffer */
+ UInt8 localSocket; /* local socket number */
+ UInt8 filler1; /* filler for proper byte alignment */
+};
+typedef struct TRinitParams TRinitParams;
+
+struct TRopenParams {
+ UInt16 localCID; /* local connection id */
+ UInt16 remoteCID; /* remote connection id */
+ AddrBlock remoteAddress; /* address of remote end */
+ AddrBlock filterAddress; /* address filter */
+ UInt32 sendSeq; /* local send sequence number */
+ UInt16 sendWindow; /* send window size */
+ UInt32 recvSeq; /* receive sequence number */
+ UInt32 attnSendSeq; /* attention send sequence number */
+ UInt32 attnRecvSeq; /* attention receive sequence number */
+ UInt8 ocMode; /* open connection mode */
+ UInt8 ocInterval; /* open connection request retry interval */
+ UInt8 ocMaximum; /* open connection request retry maximum */
+ UInt8 filler2; /* filler for proper byte alignment */
+};
+typedef struct TRopenParams TRopenParams;
+
+struct TRcloseParams {
+ UInt8 abort; /* abort connection immediately if non-zero */
+ UInt8 filler3; /* filler for proper byte alignment */
+};
+typedef struct TRcloseParams TRcloseParams;
+
+struct TRioParams {
+ UInt16 reqCount; /* requested number of bytes */
+ UInt16 actCount; /* actual number of bytes */
+ void * dataPtr; /* pointer to data buffer */
+ UInt8 eom; /* indicates logical end of message */
+ UInt8 flush; /* send data now */
+};
+typedef struct TRioParams TRioParams;
+
+struct TRattnParams {
+ UInt16 attnCode; /* client attention code */
+ UInt16 attnSize; /* size of attention data */
+ void * attnData; /* pointer to attention data */
+ UInt8 attnInterval; /* retransmit timer in 10-tick intervals */
+ UInt8 filler4; /* filler for proper byte alignment */
+};
+typedef struct TRattnParams TRattnParams;
+
+struct TRstatusParams {
+ TPCCB statusCCB; /* pointer to ccb */
+ UInt16 sendQPending; /* pending bytes in send queue */
+ UInt16 sendQFree; /* available buffer space in send queue */
+ UInt16 recvQPending; /* pending bytes in receive queue */
+ UInt16 recvQFree; /* available buffer space in receive queue */
+};
+typedef struct TRstatusParams TRstatusParams;
+
+struct TRoptionParams {
+ UInt16 sendBlocking; /* quantum for data packets */
+ UInt8 sendTimer; /* send timer in 10-tick intervals */
+ UInt8 rtmtTimer; /* retransmit timer in 10-tick intervals */
+ UInt8 badSeqMax; /* threshold for sending retransmit advice */
+ UInt8 useCheckSum; /* use ddp packet checksum */
+};
+typedef struct TRoptionParams TRoptionParams;
+
+struct TRnewcidParams {
+ UInt16 newcid; /* new connection id returned */
+};
+typedef struct TRnewcidParams TRnewcidParams;
+
+struct DSPParamBlock {
+ QElem * qLink;
+ short qType;
+ short ioTrap;
+ Ptr ioCmdAddr;
+ ADSPCompletionUPP ioCompletion;
+ OSErr ioResult;
+ StringPtr ioNamePtr;
+ short ioVRefNum;
+ short ioCRefNum; /* adsp driver refNum */
+ short csCode; /* adsp driver control code */
+ long qStatus; /* adsp internal use */
+ short ccbRefNum;
+ union {
+ TRinitParams initParams;
+ TRopenParams openParams;
+ TRcloseParams closeParams; /*dspClose, dspRemove*/
+ TRioParams ioParams; /*dspRead, dspWrite*/
+ TRattnParams attnParams; /*dspAttention*/
+ TRstatusParams statusParams; /*dspStatus*/
+ TRoptionParams optionParams; /*dspOptions*/
+ TRnewcidParams newCIDParams; /*dspNewCID*/
+ } u;
+};
+
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(ADSPConnectionEventUPP)
+ NewADSPConnectionEventUPP (ADSPConnectionEventProcPtr userRoutine);
+
+ EXTERN_API(ADSPCompletionUPP)
+ NewADSPCompletionUPP (ADSPCompletionProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeADSPConnectionEventUPP (ADSPConnectionEventUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeADSPCompletionUPP (ADSPCompletionUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeADSPConnectionEventUPP (TPCCB sourceCCB,
+ ADSPConnectionEventUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeADSPCompletionUPP (DSPPBPtr thePBPtr,
+ ADSPCompletionUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppADSPConnectionEventProcInfo = 0x0000B802 }; /* register no_return_value Func(4_bytes:A1) */
+ enum { uppADSPCompletionProcInfo = 0x00009802 }; /* register no_return_value Func(4_bytes:A0) */
+ #define NewADSPConnectionEventUPP(userRoutine) (ADSPConnectionEventUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppADSPConnectionEventProcInfo, GetCurrentArchitecture())
+ #define NewADSPCompletionUPP(userRoutine) (ADSPCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppADSPCompletionProcInfo, GetCurrentArchitecture())
+ #define DisposeADSPConnectionEventUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeADSPCompletionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter InvokeADSPConnectionEventUPP(__A1, __A0)
+ void InvokeADSPConnectionEventUPP(TPCCB sourceCCB, ADSPConnectionEventUPP userUPP) = 0x4E90;
+ #else
+ #define InvokeADSPConnectionEventUPP(sourceCCB, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppADSPConnectionEventProcInfo, (sourceCCB))
+ #endif
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter InvokeADSPCompletionUPP(__A0, __A1)
+ void InvokeADSPCompletionUPP(DSPPBPtr thePBPtr, ADSPCompletionUPP userUPP) = 0x4E91;
+ #else
+ #define InvokeADSPCompletionUPP(thePBPtr, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppADSPCompletionProcInfo, (thePBPtr))
+ #endif
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewADSPConnectionEventProc(userRoutine) NewADSPConnectionEventUPP(userRoutine)
+#define NewADSPCompletionProc(userRoutine) NewADSPCompletionUPP(userRoutine)
+#define CallADSPConnectionEventProc(userRoutine, sourceCCB) InvokeADSPConnectionEventUPP(sourceCCB, userRoutine)
+#define CallADSPCompletionProc(userRoutine, thePBPtr) InvokeADSPCompletionUPP(thePBPtr, userRoutine)
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __ADSP__ */
+
diff --git a/include/qt/ADSPSecure.h b/include/qt/ADSPSecure.h
new file mode 100644
index 000000000..a29166b24
--- /dev/null
+++ b/include/qt/ADSPSecure.h
@@ -0,0 +1,206 @@
+/*
+ File: ADSPSecure.h
+
+ Contains: Secure AppleTalk Data Stream Protocol Interfaces.
+
+ Version: Technology: AOCE Toolbox 1.02
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __ADSPSECURE__
+#define __ADSPSECURE__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __ADSP__
+#include "ADSP.h"
+#endif
+
+#ifndef __OCEAUTHDIR__
+#include "OCEAuthDir.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* New ADSP control codes
+
+ * open a secure connection */
+enum {
+ sdspOpen = 229
+};
+
+/*
+For secure connections, the eom field of ioParams contains two single-bit flags
+(instead of a zero/non-zero byte). They are an encrypt flag (see below), and an
+eom flag. All other bits in that field should be zero.
+
+To write an encrypted message, you must set an encrypt bit in the eom field of
+the ioParams of your write call. Note: this flag is only checked on the first
+write of a message (the first write on a connection, or the first write following
+a write with eom set.
+*/
+enum {
+ dspEOMBit = 0, /* set if EOM at end of write */
+ dspEncryptBit = 1 /* set to encrypt message */
+};
+
+enum {
+ dspEOMMask = 1 << dspEOMBit,
+ dspEncryptMask = 1 << dspEncryptBit
+};
+
+
+/*
+Define an ADSPSecure parameter block, as used for the secure Open call.
+
+ * size of ADSPSecure workspace */
+enum {
+ sdspWorkSize = 2048
+};
+
+
+struct TRSecureParams {
+ unsigned short localCID; /* local connection id */
+ unsigned short remoteCID; /* remote connection id */
+ AddrBlock remoteAddress; /* address of remote end */
+ AddrBlock filterAddress; /* address filter */
+ unsigned long sendSeq; /* local send sequence number */
+ unsigned short sendWindow; /* send window size */
+ unsigned long recvSeq; /* receive sequence number */
+ unsigned long attnSendSeq; /* attention send sequence number */
+ unsigned long attnRecvSeq; /* attention receive sequence number */
+ unsigned char ocMode; /* open connection mode */
+ unsigned char ocInterval; /* open connection request retry interval */
+ unsigned char ocMaximum; /* open connection request retry maximum */
+
+ Boolean secure; /* --> TRUE if session was authenticated */
+ AuthKeyPtr sessionKey; /* <--> encryption key for session */
+ unsigned long credentialsSize; /* --> length of credentials */
+ void * credentials; /* --> pointer to credentials */
+ void * workspace; /* --> pointer to workspace for connection align on even boundary and length = sdspWorkSize */
+ AuthIdentity recipient; /* --> identity of recipient (or initiator if active mode */
+ UTCTime issueTime; /* --> when credentials were issued */
+ UTCTime expiry; /* --> when credentials expiry */
+ RecordIDPtr initiator; /* <-- RecordID of initiator returned here. Must give appropriate Buffer to hold RecordID (Only for passive or accept mode) */
+ Boolean hasIntermediary; /* <-- will be set if credentials has an intermediary */
+ Boolean filler1;
+ RecordIDPtr intermediary; /* <-- RecordID of intermediary returned here. (If intermediary is found in credentials Must give appropriate Buffer to hold RecordID (Only for passive or accept mode) */
+};
+typedef struct TRSecureParams TRSecureParams;
+typedef struct SDSPParamBlock SDSPParamBlock;
+
+typedef SDSPParamBlock * SDSPPBPtr;
+typedef CALLBACK_API( void , SDSPIOCompletionProcPtr )(SDSPPBPtr paramBlock);
+/*
+ WARNING: SDSPIOCompletionProcPtr uses register based parameters under classic 68k
+ and cannot be written in a high-level language without
+ the help of mixed mode or assembly glue.
+*/
+typedef REGISTER_UPP_TYPE(SDSPIOCompletionProcPtr) SDSPIOCompletionUPP;
+
+struct SDSPParamBlock {
+ QElem * qLink;
+ short qType;
+ short ioTrap;
+ Ptr ioCmdAddr;
+ SDSPIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ StringPtr ioNamePtr;
+ short ioVRefNum;
+ short ioCRefNum; /* adsp driver refNum */
+ short csCode; /* adsp driver control code */
+ long qStatus; /* adsp internal use */
+ short ccbRefNum;
+ union {
+ TRinitParams initParams; /* dspInit, dspCLInit */
+ TRopenParams openParams; /* dspOpen, dspCLListen, dspCLDeny */
+ TRcloseParams closeParams; /*dspClose, dspRemove*/
+ TRioParams ioParams; /*dspRead, dspWrite*/
+ TRattnParams attnParams; /*dspAttention*/
+ TRstatusParams statusParams; /*dspStatus*/
+ TRoptionParams optionParams; /*dspOptions*/
+ TRnewcidParams newCIDParams; /*dspNewCID*/
+ TRSecureParams secureParams; /* dspOpenSecure */
+ } u;
+};
+
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(SDSPIOCompletionUPP)
+ NewSDSPIOCompletionUPP (SDSPIOCompletionProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeSDSPIOCompletionUPP (SDSPIOCompletionUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeSDSPIOCompletionUPP (SDSPPBPtr paramBlock,
+ SDSPIOCompletionUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppSDSPIOCompletionProcInfo = 0x00009802 }; /* register no_return_value Func(4_bytes:A0) */
+ #define NewSDSPIOCompletionUPP(userRoutine) (SDSPIOCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSDSPIOCompletionProcInfo, GetCurrentArchitecture())
+ #define DisposeSDSPIOCompletionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter InvokeSDSPIOCompletionUPP(__A0, __A1)
+ void InvokeSDSPIOCompletionUPP(SDSPPBPtr paramBlock, SDSPIOCompletionUPP userUPP) = 0x4E91;
+ #else
+ #define InvokeSDSPIOCompletionUPP(paramBlock, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppSDSPIOCompletionProcInfo, (paramBlock))
+ #endif
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewSDSPIOCompletionProc(userRoutine) NewSDSPIOCompletionUPP(userRoutine)
+#define CallSDSPIOCompletionProc(userRoutine, paramBlock) InvokeSDSPIOCompletionUPP(paramBlock, userRoutine)
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __ADSPSECURE__ */
+
diff --git a/include/qt/AEDataModel.h b/include/qt/AEDataModel.h
new file mode 100644
index 000000000..42191287c
--- /dev/null
+++ b/include/qt/AEDataModel.h
@@ -0,0 +1,559 @@
+/*
+ File: AEDataModel.h
+
+ Contains: AppleEvent Data Model Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1996-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __AEDATAMODEL__
+#define __AEDATAMODEL__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* Apple event descriptor types */
+enum {
+ typeBoolean = FOUR_CHAR_CODE('bool'),
+ typeChar = FOUR_CHAR_CODE('TEXT')
+};
+
+/* Preferred numeric Apple event descriptor types */
+enum {
+ typeSInt16 = FOUR_CHAR_CODE('shor'),
+ typeSInt32 = FOUR_CHAR_CODE('long'),
+ typeUInt32 = FOUR_CHAR_CODE('magn'),
+ typeSInt64 = FOUR_CHAR_CODE('comp'),
+ typeIEEE32BitFloatingPoint = FOUR_CHAR_CODE('sing'),
+ typeIEEE64BitFloatingPoint = FOUR_CHAR_CODE('doub'),
+ type128BitFloatingPoint = FOUR_CHAR_CODE('ldbl'),
+ typeDecimalStruct = FOUR_CHAR_CODE('decm')
+};
+
+/* Non-preferred Apple event descriptor types */
+enum {
+ typeSMInt = typeSInt16,
+ typeShortInteger = typeSInt16,
+ typeInteger = typeSInt32,
+ typeLongInteger = typeSInt32,
+ typeMagnitude = typeUInt32,
+ typeComp = typeSInt64,
+ typeSMFloat = typeIEEE32BitFloatingPoint,
+ typeShortFloat = typeIEEE32BitFloatingPoint,
+ typeFloat = typeIEEE64BitFloatingPoint,
+ typeLongFloat = typeIEEE64BitFloatingPoint,
+ typeExtended = FOUR_CHAR_CODE('exte')
+};
+
+/* More Apple event descriptor types */
+enum {
+ typeAEList = FOUR_CHAR_CODE('list'),
+ typeAERecord = FOUR_CHAR_CODE('reco'),
+ typeAppleEvent = FOUR_CHAR_CODE('aevt'),
+ typeEventRecord = FOUR_CHAR_CODE('evrc'),
+ typeTrue = FOUR_CHAR_CODE('true'),
+ typeFalse = FOUR_CHAR_CODE('fals'),
+ typeAlias = FOUR_CHAR_CODE('alis'),
+ typeEnumerated = FOUR_CHAR_CODE('enum'),
+ typeType = FOUR_CHAR_CODE('type'),
+ typeAppParameters = FOUR_CHAR_CODE('appa'),
+ typeProperty = FOUR_CHAR_CODE('prop'),
+ typeFSS = FOUR_CHAR_CODE('fss '),
+ typeKeyword = FOUR_CHAR_CODE('keyw'),
+ typeSectionH = FOUR_CHAR_CODE('sect'),
+ typeWildCard = FOUR_CHAR_CODE('****'),
+ typeApplSignature = FOUR_CHAR_CODE('sign'),
+ typeQDRectangle = FOUR_CHAR_CODE('qdrt'),
+ typeFixed = FOUR_CHAR_CODE('fixd'),
+ typeSessionID = FOUR_CHAR_CODE('ssid'),
+ typeTargetID = FOUR_CHAR_CODE('targ'),
+ typeProcessSerialNumber = FOUR_CHAR_CODE('psn '),
+ typeKernelProcessID = FOUR_CHAR_CODE('kpid'),
+ typeDispatcherID = FOUR_CHAR_CODE('dspt'),
+ typeNull = FOUR_CHAR_CODE('null') /* null or nonexistent data */
+};
+
+/* Keywords for Apple event attributes */
+enum {
+ keyTransactionIDAttr = FOUR_CHAR_CODE('tran'),
+ keyReturnIDAttr = FOUR_CHAR_CODE('rtid'),
+ keyEventClassAttr = FOUR_CHAR_CODE('evcl'),
+ keyEventIDAttr = FOUR_CHAR_CODE('evid'),
+ keyAddressAttr = FOUR_CHAR_CODE('addr'),
+ keyOptionalKeywordAttr = FOUR_CHAR_CODE('optk'),
+ keyTimeoutAttr = FOUR_CHAR_CODE('timo'),
+ keyInteractLevelAttr = FOUR_CHAR_CODE('inte'), /* this attribute is read only - will be set in AESend */
+ keyEventSourceAttr = FOUR_CHAR_CODE('esrc'), /* this attribute is read only */
+ keyMissedKeywordAttr = FOUR_CHAR_CODE('miss'), /* this attribute is read only */
+ keyOriginalAddressAttr = FOUR_CHAR_CODE('from') /* new in 1.0.1 */
+};
+
+
+/* Constants used for specifying the factoring of AEDescLists. */
+enum {
+ kAEDescListFactorNone = 0,
+ kAEDescListFactorType = 4,
+ kAEDescListFactorTypeAndSize = 8
+};
+
+/* Constants used creating an AppleEvent */
+enum {
+ /* 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 */
+typedef ResType DescType;
+typedef FourCharCode AEKeyword;
+#if OPAQUE_TOOLBOX_STRUCTS
+typedef struct OpaqueAEDataStorage* AEDataStorage;
+#else
+typedef Handle AEDataStorage;
+#endif /* OPAQUE_TOOLBOX_STRUCTS */
+
+
+struct AEDesc {
+ DescType descriptorType;
+ AEDataStorage dataHandle;
+};
+typedef struct AEDesc AEDesc;
+typedef AEDesc * AEDescPtr;
+
+struct AEKeyDesc {
+ AEKeyword descKey;
+ AEDesc descContent;
+};
+typedef struct AEKeyDesc AEKeyDesc;
+/* a list of AEDesc's is a special kind of AEDesc */
+
+typedef AEDesc AEDescList;
+/* AERecord is a list of keyworded AEDesc's */
+typedef AEDescList AERecord;
+/* an AEDesc which contains address data */
+typedef AEDesc AEAddressDesc;
+/* an AERecord that contains an AppleEvent, and related data types */
+typedef AERecord AppleEvent;
+typedef AppleEvent * AppleEventPtr;
+typedef SInt16 AEReturnID;
+typedef SInt32 AETransactionID;
+typedef FourCharCode AEEventClass;
+typedef FourCharCode AEEventID;
+typedef SInt8 AEArrayType;
+enum {
+ kAEDataArray = 0,
+ kAEPackedArray = 1,
+ kAEDescArray = 3,
+ kAEKeyDescArray = 4
+};
+
+
+enum {
+ kAEHandleArray = 2
+};
+
+
+union AEArrayData {
+ short kAEDataArray[1];
+ char kAEPackedArray[1];
+ Handle kAEHandleArray[1];
+ AEDesc kAEDescArray[1];
+ AEKeyDesc kAEKeyDescArray[1];
+};
+typedef union AEArrayData AEArrayData;
+typedef AEArrayData * AEArrayDataPointer;
+
+/**************************************************************************
+ These calls are used to set up and modify the coercion dispatch table.
+**************************************************************************/
+typedef CALLBACK_API( OSErr , AECoerceDescProcPtr )(const AEDesc *fromDesc, DescType toType, long handlerRefcon, AEDesc *toDesc);
+typedef CALLBACK_API( OSErr , AECoercePtrProcPtr )(DescType typeCode, const void *dataPtr, Size dataSize, DescType toType, long handlerRefcon, AEDesc *result);
+typedef STACK_UPP_TYPE(AECoerceDescProcPtr) AECoerceDescUPP;
+typedef STACK_UPP_TYPE(AECoercePtrProcPtr) AECoercePtrUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(AECoerceDescUPP)
+ NewAECoerceDescUPP (AECoerceDescProcPtr userRoutine);
+
+ EXTERN_API(AECoercePtrUPP)
+ NewAECoercePtrUPP (AECoercePtrProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeAECoerceDescUPP (AECoerceDescUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeAECoercePtrUPP (AECoercePtrUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeAECoerceDescUPP (const AEDesc * fromDesc,
+ DescType toType,
+ long handlerRefcon,
+ AEDesc * toDesc,
+ AECoerceDescUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeAECoercePtrUPP (DescType typeCode,
+ const void * dataPtr,
+ Size dataSize,
+ DescType toType,
+ long handlerRefcon,
+ AEDesc * result,
+ AECoercePtrUPP userUPP);
+
+#else
+ enum { uppAECoerceDescProcInfo = 0x00003FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppAECoercePtrProcInfo = 0x0003FFE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewAECoerceDescUPP(userRoutine) (AECoerceDescUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppAECoerceDescProcInfo, GetCurrentArchitecture())
+ #define NewAECoercePtrUPP(userRoutine) (AECoercePtrUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppAECoercePtrProcInfo, GetCurrentArchitecture())
+ #define DisposeAECoerceDescUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeAECoercePtrUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeAECoerceDescUPP(fromDesc, toType, handlerRefcon, toDesc, userUPP) (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppAECoerceDescProcInfo, (fromDesc), (toType), (handlerRefcon), (toDesc))
+ #define InvokeAECoercePtrUPP(typeCode, dataPtr, dataSize, toType, handlerRefcon, result, userUPP) (OSErr)CALL_SIX_PARAMETER_UPP((userUPP), uppAECoercePtrProcInfo, (typeCode), (dataPtr), (dataSize), (toType), (handlerRefcon), (result))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewAECoerceDescProc(userRoutine) NewAECoerceDescUPP(userRoutine)
+#define NewAECoercePtrProc(userRoutine) NewAECoercePtrUPP(userRoutine)
+#define CallAECoerceDescProc(userRoutine, fromDesc, toType, handlerRefcon, toDesc) InvokeAECoerceDescUPP(fromDesc, toType, handlerRefcon, toDesc, userRoutine)
+#define CallAECoercePtrProc(userRoutine, typeCode, dataPtr, dataSize, toType, handlerRefcon, result) InvokeAECoercePtrUPP(typeCode, dataPtr, dataSize, toType, handlerRefcon, result, userRoutine)
+
+typedef UniversalProcPtr AECoercionHandlerUPP;
+EXTERN_API( OSErr )
+AEInstallCoercionHandler (DescType fromType,
+ DescType toType,
+ AECoercionHandlerUPP handler,
+ long handlerRefcon,
+ Boolean fromTypeIsDesc,
+ Boolean isSysHandler) THREEWORDINLINE(0x303C, 0x0A22, 0xA816);
+
+EXTERN_API( OSErr )
+AERemoveCoercionHandler (DescType fromType,
+ DescType toType,
+ AECoercionHandlerUPP handler,
+ Boolean isSysHandler) THREEWORDINLINE(0x303C, 0x0723, 0xA816);
+
+EXTERN_API( OSErr )
+AEGetCoercionHandler (DescType fromType,
+ DescType toType,
+ AECoercionHandlerUPP * handler,
+ long * handlerRefcon,
+ Boolean * fromTypeIsDesc,
+ Boolean isSysHandler) THREEWORDINLINE(0x303C, 0x0B24, 0xA816);
+
+/**************************************************************************
+ The following calls provide for a coercion interface.
+**************************************************************************/
+EXTERN_API( OSErr )
+AECoercePtr (DescType typeCode,
+ const void * dataPtr,
+ Size dataSize,
+ DescType toType,
+ AEDesc * result) THREEWORDINLINE(0x303C, 0x0A02, 0xA816);
+
+EXTERN_API( OSErr )
+AECoerceDesc (const AEDesc * theAEDesc,
+ DescType toType,
+ AEDesc * result) THREEWORDINLINE(0x303C, 0x0603, 0xA816);
+
+
+/**************************************************************************
+ The following calls apply to any AEDesc. Every 'result' descriptor is
+ created for you, so you will be responsible for memory management
+ (including disposing) of the descriptors so created.
+**************************************************************************/
+EXTERN_API( OSErr )
+AECreateDesc (DescType typeCode,
+ const void * dataPtr,
+ Size dataSize,
+ AEDesc * result) THREEWORDINLINE(0x303C, 0x0825, 0xA816);
+
+EXTERN_API( OSErr )
+AEDisposeDesc (AEDesc * theAEDesc) THREEWORDINLINE(0x303C, 0x0204, 0xA816);
+
+EXTERN_API( OSErr )
+AEDuplicateDesc (const AEDesc * theAEDesc,
+ AEDesc * result) THREEWORDINLINE(0x303C, 0x0405, 0xA816);
+
+
+/**************************************************************************
+ The following calls apply to AEDescList. Since AEDescList is a subtype of
+ AEDesc, the calls in the previous section can also be used for AEDescList.
+ All list and array indices are 1-based. If the data was greater than
+ maximumSize in the routines below, then actualSize will be greater than
+ maximumSize, but only maximumSize bytes will actually be retrieved.
+**************************************************************************/
+EXTERN_API( OSErr )
+AECreateList (const void * factoringPtr,
+ Size factoredSize,
+ Boolean isRecord,
+ AEDescList * resultList) THREEWORDINLINE(0x303C, 0x0706, 0xA816);
+
+EXTERN_API( OSErr )
+AECountItems (const AEDescList * theAEDescList,
+ long * theCount) THREEWORDINLINE(0x303C, 0x0407, 0xA816);
+
+EXTERN_API( OSErr )
+AEPutPtr (AEDescList * theAEDescList,
+ long index,
+ DescType typeCode,
+ const void * dataPtr,
+ Size dataSize) THREEWORDINLINE(0x303C, 0x0A08, 0xA816);
+
+EXTERN_API( OSErr )
+AEPutDesc (AEDescList * theAEDescList,
+ long index,
+ const AEDesc * theAEDesc) THREEWORDINLINE(0x303C, 0x0609, 0xA816);
+
+EXTERN_API( OSErr )
+AEGetNthPtr (const AEDescList * theAEDescList,
+ long index,
+ DescType desiredType,
+ AEKeyword * theAEKeyword,
+ DescType * typeCode,
+ void * dataPtr,
+ Size maximumSize,
+ Size * actualSize) THREEWORDINLINE(0x303C, 0x100A, 0xA816);
+
+EXTERN_API( OSErr )
+AEGetNthDesc (const AEDescList * theAEDescList,
+ long index,
+ DescType desiredType,
+ AEKeyword * theAEKeyword,
+ AEDesc * result) THREEWORDINLINE(0x303C, 0x0A0B, 0xA816);
+
+EXTERN_API( OSErr )
+AESizeOfNthItem (const AEDescList * theAEDescList,
+ long index,
+ DescType * typeCode,
+ Size * dataSize) THREEWORDINLINE(0x303C, 0x082A, 0xA816);
+
+EXTERN_API( OSErr )
+AEGetArray (const AEDescList * theAEDescList,
+ AEArrayType arrayType,
+ AEArrayDataPointer arrayPtr,
+ Size maximumSize,
+ DescType * itemType,
+ Size * itemSize,
+ long * itemCount) THREEWORDINLINE(0x303C, 0x0D0C, 0xA816);
+
+EXTERN_API( OSErr )
+AEPutArray (AEDescList * theAEDescList,
+ AEArrayType arrayType,
+ const AEArrayData * arrayPtr,
+ DescType itemType,
+ Size itemSize,
+ long itemCount) THREEWORDINLINE(0x303C, 0x0B0D, 0xA816);
+
+EXTERN_API( OSErr )
+AEDeleteItem (AEDescList * theAEDescList,
+ long index) THREEWORDINLINE(0x303C, 0x040E, 0xA816);
+
+
+/**************************************************************************
+ The following calls apply to AERecord. Since AERecord is a subtype of
+ AEDescList, the calls in the previous sections can also be used for
+ AERecord an AERecord can be created by using AECreateList with isRecord
+ set to true.
+**************************************************************************/
+/*
+ Note: The following #defines map "key" calls on AERecords into "param" calls on
+ AppleEvents. Although no errors are currently returned if AERecords are
+ passed to "param" calls and AppleEvents to "key" calls, the behavior of
+ this type of API-mixing is not explicitly documented in Inside Macintosh.
+ It just happens that the "key" calls have the same functionality as their
+ "param" counterparts. Since none of the "key" calls are currently available
+ in the PowerPC IntefaceLib, the #defines exploit the fact that "key" and
+ "param" routines can be used interchangeably, and makes sure that every
+ invokation of a "key" API becomes an invokation of a "param" API.
+*/
+#define AEPutKeyPtr(theAERecord, theAEKeyword, typeCode, dataPtr, dataSize) \
+ AEPutParamPtr((theAERecord), (theAEKeyword), (typeCode), (dataPtr), (dataSize))
+#define AEPutKeyDesc(theAERecord, theAEKeyword, theAEDesc) \
+ AEPutParamDesc((theAERecord), (theAEKeyword), (theAEDesc))
+#define AEGetKeyPtr(theAERecord, theAEKeyword, desiredType, typeCode, dataPtr, maxSize, actualSize) \
+ AEGetParamPtr((theAERecord), (theAEKeyword), (desiredType), (typeCode), (dataPtr), (maxSize), (actualSize))
+#define AEGetKeyDesc(theAERecord, theAEKeyword, desiredType, result) \
+ AEGetParamDesc((theAERecord), (theAEKeyword), (desiredType), (result))
+#define AESizeOfKeyDesc(theAERecord, theAEKeyword, typeCode, dataSize) \
+ AESizeOfParam((theAERecord), (theAEKeyword), (typeCode), (dataSize))
+#define AEDeleteKeyDesc(theAERecord, theAEKeyword) \
+ AEDeleteParam((theAERecord), (theAEKeyword))
+/**************************************************************************
+ The following calls create and manipulate the AppleEvent data type.
+**************************************************************************/
+EXTERN_API( OSErr )
+AECreateAppleEvent (AEEventClass theAEEventClass,
+ AEEventID theAEEventID,
+ const AEAddressDesc * target,
+ AEReturnID returnID,
+ AETransactionID transactionID,
+ AppleEvent * result) THREEWORDINLINE(0x303C, 0x0B14, 0xA816);
+
+
+/**************************************************************************
+ The following calls are used to pack and unpack parameters from records
+ of type AppleEvent. Since AppleEvent is a subtype of AERecord, the calls
+ in the previous sections can also be used for variables of type
+ AppleEvent. The next six calls are in fact identical to the six calls
+ for AERecord.
+**************************************************************************/
+EXTERN_API( OSErr )
+AEPutParamPtr (AppleEvent * theAppleEvent,
+ AEKeyword theAEKeyword,
+ DescType typeCode,
+ const void * dataPtr,
+ Size dataSize) THREEWORDINLINE(0x303C, 0x0A0F, 0xA816);
+
+EXTERN_API( OSErr )
+AEPutParamDesc (AppleEvent * theAppleEvent,
+ AEKeyword theAEKeyword,
+ const AEDesc * theAEDesc) THREEWORDINLINE(0x303C, 0x0610, 0xA816);
+
+EXTERN_API( OSErr )
+AEGetParamPtr (const AppleEvent * theAppleEvent,
+ AEKeyword theAEKeyword,
+ DescType desiredType,
+ DescType * typeCode,
+ void * dataPtr,
+ Size maximumSize,
+ Size * actualSize) THREEWORDINLINE(0x303C, 0x0E11, 0xA816);
+
+EXTERN_API( OSErr )
+AEGetParamDesc (const AppleEvent * theAppleEvent,
+ AEKeyword theAEKeyword,
+ DescType desiredType,
+ AEDesc * result) THREEWORDINLINE(0x303C, 0x0812, 0xA816);
+
+EXTERN_API( OSErr )
+AESizeOfParam (const AppleEvent * theAppleEvent,
+ AEKeyword theAEKeyword,
+ DescType * typeCode,
+ Size * dataSize) THREEWORDINLINE(0x303C, 0x0829, 0xA816);
+
+EXTERN_API( OSErr )
+AEDeleteParam (AppleEvent * theAppleEvent,
+ AEKeyword theAEKeyword) THREEWORDINLINE(0x303C, 0x0413, 0xA816);
+
+
+
+/**************************************************************************
+ The following calls also apply to type AppleEvent. Message attributes are
+ far more restricted, and can only be accessed through the following 5
+ calls. The various list and record routines cannot be used to access the
+ attributes of an event.
+**************************************************************************/
+EXTERN_API( OSErr )
+AEGetAttributePtr (const AppleEvent * theAppleEvent,
+ AEKeyword theAEKeyword,
+ DescType desiredType,
+ DescType * typeCode,
+ void * dataPtr,
+ Size maximumSize,
+ Size * actualSize) THREEWORDINLINE(0x303C, 0x0E15, 0xA816);
+
+EXTERN_API( OSErr )
+AEGetAttributeDesc (const AppleEvent * theAppleEvent,
+ AEKeyword theAEKeyword,
+ DescType desiredType,
+ AEDesc * result) THREEWORDINLINE(0x303C, 0x0826, 0xA816);
+
+EXTERN_API( OSErr )
+AESizeOfAttribute (const AppleEvent * theAppleEvent,
+ AEKeyword theAEKeyword,
+ DescType * typeCode,
+ Size * dataSize) THREEWORDINLINE(0x303C, 0x0828, 0xA816);
+
+EXTERN_API( OSErr )
+AEPutAttributePtr (AppleEvent * theAppleEvent,
+ AEKeyword theAEKeyword,
+ DescType typeCode,
+ const void * dataPtr,
+ Size dataSize) THREEWORDINLINE(0x303C, 0x0A16, 0xA816);
+
+EXTERN_API( OSErr )
+AEPutAttributeDesc (AppleEvent * theAppleEvent,
+ AEKeyword theAEKeyword,
+ const AEDesc * theAEDesc) THREEWORDINLINE(0x303C, 0x0627, 0xA816);
+
+/**************************************************************************
+ The following calls are necessary to deal with opaque data in AEDescs, because the
+ traditional way of dealing with a basic AEDesc has been to dereference the dataHandle
+ directly. This is not supported under Carbon.
+**************************************************************************/
+#if ACCESSOR_CALLS_ARE_FUNCTIONS
+/*
+ AEGetDescData no longer supports automatic coercion. If you'd like to
+ coerce the descriptor use AECoerceDesc.
+ */
+EXTERN_API( OSErr )
+AEGetDescData (const AEDesc * theAEDesc,
+ void * dataPtr,
+ Size maximumSize);
+
+EXTERN_API( Size )
+AEGetDescDataSize (const AEDesc * theAEDesc);
+
+EXTERN_API( OSErr )
+AEReplaceDescData (DescType typeCode,
+ const void * dataPtr,
+ Size dataSize,
+ AEDesc * theAEDesc);
+
+#endif /* ACCESSOR_CALLS_ARE_FUNCTIONS */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __AEDATAMODEL__ */
+
diff --git a/include/qt/AEObjects.h b/include/qt/AEObjects.h
new file mode 100644
index 000000000..169de3fdd
--- /dev/null
+++ b/include/qt/AEObjects.h
@@ -0,0 +1,406 @@
+/*
+ File: AEObjects.h
+
+ Contains: Object Support Library Interfaces.
+
+ Version: Technology: System 8.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1991-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __AEOBJECTS__
+#define __AEOBJECTS__
+
+#ifndef __OSUTILS__
+#include "OSUtils.h"
+#endif
+
+#ifndef __APPLEEVENTS__
+#include "AppleEvents.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+#ifndef __EVENTS__
+#include "Events.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ /**** LOGICAL OPERATOR CONSTANTS ****/
+ kAEAND = FOUR_CHAR_CODE('AND '), /* 0x414e4420 */
+ kAEOR = FOUR_CHAR_CODE('OR '), /* 0x4f522020 */
+ kAENOT = FOUR_CHAR_CODE('NOT '), /* 0x4e4f5420 */
+ /**** ABSOLUTE ORDINAL CONSTANTS ****/
+ kAEFirst = FOUR_CHAR_CODE('firs'), /* 0x66697273 */
+ kAELast = FOUR_CHAR_CODE('last'), /* 0x6c617374 */
+ kAEMiddle = FOUR_CHAR_CODE('midd'), /* 0x6d696464 */
+ kAEAny = FOUR_CHAR_CODE('any '), /* 0x616e7920 */
+ kAEAll = FOUR_CHAR_CODE('all '), /* 0x616c6c20 */
+ /**** RELATIVE ORDINAL CONSTANTS ****/
+ kAENext = FOUR_CHAR_CODE('next'), /* 0x6e657874 */
+ kAEPrevious = FOUR_CHAR_CODE('prev'), /* 0x70726576 */
+ /**** KEYWORD CONSTANT ****/
+ keyAECompOperator = FOUR_CHAR_CODE('relo'), /* 0x72656c6f */
+ keyAELogicalTerms = FOUR_CHAR_CODE('term'), /* 0x7465726d */
+ keyAELogicalOperator = FOUR_CHAR_CODE('logc'), /* 0x6c6f6763 */
+ keyAEObject1 = FOUR_CHAR_CODE('obj1'), /* 0x6f626a31 */
+ keyAEObject2 = FOUR_CHAR_CODE('obj2'), /* 0x6f626a32 */
+ /* ... for Keywords for getting fields out of object specifier records. */
+ keyAEDesiredClass = FOUR_CHAR_CODE('want'), /* 0x77616e74 */
+ keyAEContainer = FOUR_CHAR_CODE('from'), /* 0x66726f6d */
+ keyAEKeyForm = FOUR_CHAR_CODE('form'), /* 0x666f726d */
+ keyAEKeyData = FOUR_CHAR_CODE('seld') /* 0x73656c64 */
+};
+
+enum {
+ /* ... for Keywords for getting fields out of Range specifier records. */
+ keyAERangeStart = FOUR_CHAR_CODE('star'), /* 0x73746172 */
+ keyAERangeStop = FOUR_CHAR_CODE('stop'), /* 0x73746f70 */
+ /* ... special handler selectors for OSL Callbacks. */
+ keyDisposeTokenProc = FOUR_CHAR_CODE('xtok'), /* 0x78746f6b */
+ keyAECompareProc = FOUR_CHAR_CODE('cmpr'), /* 0x636d7072 */
+ keyAECountProc = FOUR_CHAR_CODE('cont'), /* 0x636f6e74 */
+ keyAEMarkTokenProc = FOUR_CHAR_CODE('mkid'), /* 0x6d6b6964 */
+ keyAEMarkProc = FOUR_CHAR_CODE('mark'), /* 0x6d61726b */
+ keyAEAdjustMarksProc = FOUR_CHAR_CODE('adjm'), /* 0x61646a6d */
+ keyAEGetErrDescProc = FOUR_CHAR_CODE('indc') /* 0x696e6463 */
+};
+
+/**** VALUE and TYPE CONSTANTS ****/
+enum {
+ /* ... possible values for the keyAEKeyForm field of an object specifier. */
+ formAbsolutePosition = FOUR_CHAR_CODE('indx'), /* 0x696e6478 */
+ formRelativePosition = FOUR_CHAR_CODE('rele'), /* 0x72656c65 */
+ formTest = FOUR_CHAR_CODE('test'), /* 0x74657374 */
+ formRange = FOUR_CHAR_CODE('rang'), /* 0x72616e67 */
+ formPropertyID = FOUR_CHAR_CODE('prop'), /* 0x70726f70 */
+ formName = FOUR_CHAR_CODE('name'), /* 0x6e616d65 */
+ /* ... relevant types (some of these are often pared with forms above). */
+ typeObjectSpecifier = FOUR_CHAR_CODE('obj '), /* 0x6f626a20 */
+ typeObjectBeingExamined = FOUR_CHAR_CODE('exmn'), /* 0x65786d6e */
+ typeCurrentContainer = FOUR_CHAR_CODE('ccnt'), /* 0x63636e74 */
+ typeToken = FOUR_CHAR_CODE('toke'), /* 0x746f6b65 */
+ typeRelativeDescriptor = FOUR_CHAR_CODE('rel '), /* 0x72656c20 */
+ typeAbsoluteOrdinal = FOUR_CHAR_CODE('abso'), /* 0x6162736f */
+ typeIndexDescriptor = FOUR_CHAR_CODE('inde'), /* 0x696e6465 */
+ typeRangeDescriptor = FOUR_CHAR_CODE('rang'), /* 0x72616e67 */
+ typeLogicalDescriptor = FOUR_CHAR_CODE('logi'), /* 0x6c6f6769 */
+ typeCompDescriptor = FOUR_CHAR_CODE('cmpd'), /* 0x636d7064 */
+ typeOSLTokenList = FOUR_CHAR_CODE('ostl') /* 0x6F73746C */
+};
+
+/* Possible values for flags parameter to AEResolve. They're additive */
+enum {
+ kAEIDoMinimum = 0x0000,
+ kAEIDoWhose = 0x0001,
+ kAEIDoMarking = 0x0004,
+ kAEPassSubDescs = 0x0008,
+ kAEResolveNestedLists = 0x0010,
+ kAEHandleSimpleRanges = 0x0020,
+ kAEUseRelativeIterators = 0x0040
+};
+
+/**** SPECIAL CONSTANTS FOR CUSTOM WHOSE-CLAUSE RESOLUTION */
+enum {
+ typeWhoseDescriptor = FOUR_CHAR_CODE('whos'), /* 0x77686f73 */
+ formWhose = FOUR_CHAR_CODE('whos'), /* 0x77686f73 */
+ typeWhoseRange = FOUR_CHAR_CODE('wrng'), /* 0x77726e67 */
+ keyAEWhoseRangeStart = FOUR_CHAR_CODE('wstr'), /* 0x77737472 */
+ keyAEWhoseRangeStop = FOUR_CHAR_CODE('wstp'), /* 0x77737470 */
+ keyAEIndex = FOUR_CHAR_CODE('kidx'), /* 0x6b696478 */
+ keyAETest = FOUR_CHAR_CODE('ktst') /* 0x6b747374 */
+};
+
+/*
+ used for rewriting tokens in place of 'ccnt' descriptors
+ This record is only of interest to those who, when they...
+ ...get ranges as key data in their accessor procs, choose
+ ...to resolve them manually rather than call AEResolve again.
+*/
+
+struct ccntTokenRecord {
+ DescType tokenClass;
+ AEDesc token;
+};
+typedef struct ccntTokenRecord ccntTokenRecord;
+
+typedef ccntTokenRecord * ccntTokenRecPtr;
+typedef ccntTokenRecPtr * ccntTokenRecHandle;
+#if OLDROUTINENAMES
+typedef AEDesc * DescPtr;
+typedef DescPtr * DescHandle;
+#endif /* OLDROUTINENAMES */
+
+/* typedefs providing type checking for procedure pointers */
+typedef CALLBACK_API( OSErr , OSLAccessorProcPtr )(DescType desiredClass, const AEDesc *container, DescType containerClass, DescType form, const AEDesc *selectionData, AEDesc *value, long accessorRefcon);
+typedef CALLBACK_API( OSErr , OSLCompareProcPtr )(DescType oper, const AEDesc *obj1, const AEDesc *obj2, Boolean *result);
+typedef CALLBACK_API( OSErr , OSLCountProcPtr )(DescType desiredType, DescType containerClass, const AEDesc *container, long *result);
+typedef CALLBACK_API( OSErr , OSLDisposeTokenProcPtr )(AEDesc *unneededToken);
+typedef CALLBACK_API( OSErr , OSLGetMarkTokenProcPtr )(const AEDesc *dContainerToken, DescType containerClass, AEDesc *result);
+typedef CALLBACK_API( OSErr , OSLGetErrDescProcPtr )(AEDesc **appDescPtr);
+typedef CALLBACK_API( OSErr , OSLMarkProcPtr )(const AEDesc *dToken, const AEDesc *markToken, long index);
+typedef CALLBACK_API( OSErr , OSLAdjustMarksProcPtr )(long newStart, long newStop, const AEDesc *markToken);
+typedef STACK_UPP_TYPE(OSLAccessorProcPtr) OSLAccessorUPP;
+typedef STACK_UPP_TYPE(OSLCompareProcPtr) OSLCompareUPP;
+typedef STACK_UPP_TYPE(OSLCountProcPtr) OSLCountUPP;
+typedef STACK_UPP_TYPE(OSLDisposeTokenProcPtr) OSLDisposeTokenUPP;
+typedef STACK_UPP_TYPE(OSLGetMarkTokenProcPtr) OSLGetMarkTokenUPP;
+typedef STACK_UPP_TYPE(OSLGetErrDescProcPtr) OSLGetErrDescUPP;
+typedef STACK_UPP_TYPE(OSLMarkProcPtr) OSLMarkUPP;
+typedef STACK_UPP_TYPE(OSLAdjustMarksProcPtr) OSLAdjustMarksUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(OSLAccessorUPP)
+ NewOSLAccessorUPP (OSLAccessorProcPtr userRoutine);
+
+ EXTERN_API(OSLCompareUPP)
+ NewOSLCompareUPP (OSLCompareProcPtr userRoutine);
+
+ EXTERN_API(OSLCountUPP)
+ NewOSLCountUPP (OSLCountProcPtr userRoutine);
+
+ EXTERN_API(OSLDisposeTokenUPP)
+ NewOSLDisposeTokenUPP (OSLDisposeTokenProcPtr userRoutine);
+
+ EXTERN_API(OSLGetMarkTokenUPP)
+ NewOSLGetMarkTokenUPP (OSLGetMarkTokenProcPtr userRoutine);
+
+ EXTERN_API(OSLGetErrDescUPP)
+ NewOSLGetErrDescUPP (OSLGetErrDescProcPtr userRoutine);
+
+ EXTERN_API(OSLMarkUPP)
+ NewOSLMarkUPP (OSLMarkProcPtr userRoutine);
+
+ EXTERN_API(OSLAdjustMarksUPP)
+ NewOSLAdjustMarksUPP (OSLAdjustMarksProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeOSLAccessorUPP (OSLAccessorUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeOSLCompareUPP (OSLCompareUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeOSLCountUPP (OSLCountUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeOSLDisposeTokenUPP (OSLDisposeTokenUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeOSLGetMarkTokenUPP (OSLGetMarkTokenUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeOSLGetErrDescUPP (OSLGetErrDescUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeOSLMarkUPP (OSLMarkUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeOSLAdjustMarksUPP (OSLAdjustMarksUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeOSLAccessorUPP (DescType desiredClass,
+ const AEDesc * container,
+ DescType containerClass,
+ DescType form,
+ const AEDesc * selectionData,
+ AEDesc * value,
+ long accessorRefcon,
+ OSLAccessorUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeOSLCompareUPP (DescType oper,
+ const AEDesc * obj1,
+ const AEDesc * obj2,
+ Boolean * result,
+ OSLCompareUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeOSLCountUPP (DescType desiredType,
+ DescType containerClass,
+ const AEDesc * container,
+ long * result,
+ OSLCountUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeOSLDisposeTokenUPP (AEDesc * unneededToken,
+ OSLDisposeTokenUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeOSLGetMarkTokenUPP (const AEDesc * dContainerToken,
+ DescType containerClass,
+ AEDesc * result,
+ OSLGetMarkTokenUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeOSLGetErrDescUPP (AEDesc ** appDescPtr,
+ OSLGetErrDescUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeOSLMarkUPP (const AEDesc * dToken,
+ const AEDesc * markToken,
+ long index,
+ OSLMarkUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeOSLAdjustMarksUPP (long newStart,
+ long newStop,
+ const AEDesc * markToken,
+ OSLAdjustMarksUPP userUPP);
+
+#else
+ enum { uppOSLAccessorProcInfo = 0x000FFFE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppOSLCompareProcInfo = 0x00003FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppOSLCountProcInfo = 0x00003FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppOSLDisposeTokenProcInfo = 0x000000E0 }; /* pascal 2_bytes Func(4_bytes) */
+ enum { uppOSLGetMarkTokenProcInfo = 0x00000FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppOSLGetErrDescProcInfo = 0x000000E0 }; /* pascal 2_bytes Func(4_bytes) */
+ enum { uppOSLMarkProcInfo = 0x00000FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppOSLAdjustMarksProcInfo = 0x00000FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ #define NewOSLAccessorUPP(userRoutine) (OSLAccessorUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppOSLAccessorProcInfo, GetCurrentArchitecture())
+ #define NewOSLCompareUPP(userRoutine) (OSLCompareUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppOSLCompareProcInfo, GetCurrentArchitecture())
+ #define NewOSLCountUPP(userRoutine) (OSLCountUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppOSLCountProcInfo, GetCurrentArchitecture())
+ #define NewOSLDisposeTokenUPP(userRoutine) (OSLDisposeTokenUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppOSLDisposeTokenProcInfo, GetCurrentArchitecture())
+ #define NewOSLGetMarkTokenUPP(userRoutine) (OSLGetMarkTokenUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppOSLGetMarkTokenProcInfo, GetCurrentArchitecture())
+ #define NewOSLGetErrDescUPP(userRoutine) (OSLGetErrDescUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppOSLGetErrDescProcInfo, GetCurrentArchitecture())
+ #define NewOSLMarkUPP(userRoutine) (OSLMarkUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppOSLMarkProcInfo, GetCurrentArchitecture())
+ #define NewOSLAdjustMarksUPP(userRoutine) (OSLAdjustMarksUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppOSLAdjustMarksProcInfo, GetCurrentArchitecture())
+ #define DisposeOSLAccessorUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeOSLCompareUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeOSLCountUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeOSLDisposeTokenUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeOSLGetMarkTokenUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeOSLGetErrDescUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeOSLMarkUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeOSLAdjustMarksUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeOSLAccessorUPP(desiredClass, container, containerClass, form, selectionData, value, accessorRefcon, userUPP) (OSErr)CALL_SEVEN_PARAMETER_UPP((userUPP), uppOSLAccessorProcInfo, (desiredClass), (container), (containerClass), (form), (selectionData), (value), (accessorRefcon))
+ #define InvokeOSLCompareUPP(oper, obj1, obj2, result, userUPP) (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppOSLCompareProcInfo, (oper), (obj1), (obj2), (result))
+ #define InvokeOSLCountUPP(desiredType, containerClass, container, result, userUPP) (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppOSLCountProcInfo, (desiredType), (containerClass), (container), (result))
+ #define InvokeOSLDisposeTokenUPP(unneededToken, userUPP) (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppOSLDisposeTokenProcInfo, (unneededToken))
+ #define InvokeOSLGetMarkTokenUPP(dContainerToken, containerClass, result, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppOSLGetMarkTokenProcInfo, (dContainerToken), (containerClass), (result))
+ #define InvokeOSLGetErrDescUPP(appDescPtr, userUPP) (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppOSLGetErrDescProcInfo, (appDescPtr))
+ #define InvokeOSLMarkUPP(dToken, markToken, index, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppOSLMarkProcInfo, (dToken), (markToken), (index))
+ #define InvokeOSLAdjustMarksUPP(newStart, newStop, markToken, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppOSLAdjustMarksProcInfo, (newStart), (newStop), (markToken))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewOSLAccessorProc(userRoutine) NewOSLAccessorUPP(userRoutine)
+#define NewOSLCompareProc(userRoutine) NewOSLCompareUPP(userRoutine)
+#define NewOSLCountProc(userRoutine) NewOSLCountUPP(userRoutine)
+#define NewOSLDisposeTokenProc(userRoutine) NewOSLDisposeTokenUPP(userRoutine)
+#define NewOSLGetMarkTokenProc(userRoutine) NewOSLGetMarkTokenUPP(userRoutine)
+#define NewOSLGetErrDescProc(userRoutine) NewOSLGetErrDescUPP(userRoutine)
+#define NewOSLMarkProc(userRoutine) NewOSLMarkUPP(userRoutine)
+#define NewOSLAdjustMarksProc(userRoutine) NewOSLAdjustMarksUPP(userRoutine)
+#define CallOSLAccessorProc(userRoutine, desiredClass, container, containerClass, form, selectionData, value, accessorRefcon) InvokeOSLAccessorUPP(desiredClass, container, containerClass, form, selectionData, value, accessorRefcon, userRoutine)
+#define CallOSLCompareProc(userRoutine, oper, obj1, obj2, result) InvokeOSLCompareUPP(oper, obj1, obj2, result, userRoutine)
+#define CallOSLCountProc(userRoutine, desiredType, containerClass, container, result) InvokeOSLCountUPP(desiredType, containerClass, container, result, userRoutine)
+#define CallOSLDisposeTokenProc(userRoutine, unneededToken) InvokeOSLDisposeTokenUPP(unneededToken, userRoutine)
+#define CallOSLGetMarkTokenProc(userRoutine, dContainerToken, containerClass, result) InvokeOSLGetMarkTokenUPP(dContainerToken, containerClass, result, userRoutine)
+#define CallOSLGetErrDescProc(userRoutine, appDescPtr) InvokeOSLGetErrDescUPP(appDescPtr, userRoutine)
+#define CallOSLMarkProc(userRoutine, dToken, markToken, index) InvokeOSLMarkUPP(dToken, markToken, index, userRoutine)
+#define CallOSLAdjustMarksProc(userRoutine, newStart, newStop, markToken) InvokeOSLAdjustMarksUPP(newStart, newStop, markToken, userRoutine)
+
+
+
+EXTERN_API( OSErr )
+AEObjectInit (void);
+
+/* Not done by inline, but by direct linking into code. It sets up the pack
+ such that further calls can be via inline */
+EXTERN_API( OSErr )
+AESetObjectCallbacks (OSLCompareUPP myCompareProc,
+ OSLCountUPP myCountProc,
+ OSLDisposeTokenUPP myDisposeTokenProc,
+ OSLGetMarkTokenUPP myGetMarkTokenProc,
+ OSLMarkUPP myMarkProc,
+ OSLAdjustMarksUPP myAdjustMarksProc,
+ OSLGetErrDescUPP myGetErrDescProcPtr) THREEWORDINLINE(0x303C, 0x0E35, 0xA816);
+
+EXTERN_API( OSErr )
+AEResolve (const AEDesc * objectSpecifier,
+ short callbackFlags,
+ AEDesc * theToken) THREEWORDINLINE(0x303C, 0x0536, 0xA816);
+
+EXTERN_API( OSErr )
+AEInstallObjectAccessor (DescType desiredClass,
+ DescType containerType,
+ OSLAccessorUPP theAccessor,
+ long accessorRefcon,
+ Boolean isSysHandler) THREEWORDINLINE(0x303C, 0x0937, 0xA816);
+
+EXTERN_API( OSErr )
+AERemoveObjectAccessor (DescType desiredClass,
+ DescType containerType,
+ OSLAccessorUPP theAccessor,
+ Boolean isSysHandler) THREEWORDINLINE(0x303C, 0x0738, 0xA816);
+
+EXTERN_API( OSErr )
+AEGetObjectAccessor (DescType desiredClass,
+ DescType containerType,
+ OSLAccessorUPP * accessor,
+ long * accessorRefcon,
+ Boolean isSysHandler) THREEWORDINLINE(0x303C, 0x0939, 0xA816);
+
+EXTERN_API( OSErr )
+AEDisposeToken (AEDesc * theToken) THREEWORDINLINE(0x303C, 0x023A, 0xA816);
+
+EXTERN_API( OSErr )
+AECallObjectAccessor (DescType desiredClass,
+ const AEDesc * containerToken,
+ DescType containerClass,
+ DescType keyForm,
+ const AEDesc * keyData,
+ AEDesc * token) THREEWORDINLINE(0x303C, 0x0C3B, 0xA816);
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __AEOBJECTS__ */
+
diff --git a/include/qt/AEPackObject.h b/include/qt/AEPackObject.h
new file mode 100644
index 000000000..62f615db3
--- /dev/null
+++ b/include/qt/AEPackObject.h
@@ -0,0 +1,100 @@
+/*
+ File: AEPackObject.h
+
+ Contains: AppleEvents object packing Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1991-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __AEPACKOBJECT__
+#define __AEPACKOBJECT__
+
+#ifndef __APPLEEVENTS__
+#include "AppleEvents.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* These are the object packing routines. */
+EXTERN_API( OSErr )
+CreateOffsetDescriptor (long theOffset,
+ AEDesc * theDescriptor);
+
+EXTERN_API( OSErr )
+CreateCompDescriptor (DescType comparisonOperator,
+ AEDesc * operand1,
+ AEDesc * operand2,
+ Boolean disposeInputs,
+ AEDesc * theDescriptor);
+
+EXTERN_API( OSErr )
+CreateLogicalDescriptor (AEDescList * theLogicalTerms,
+ DescType theLogicOperator,
+ Boolean disposeInputs,
+ AEDesc * theDescriptor);
+
+
+EXTERN_API( OSErr )
+CreateObjSpecifier (DescType desiredClass,
+ AEDesc * theContainer,
+ DescType keyForm,
+ AEDesc * keyData,
+ Boolean disposeInputs,
+ AEDesc * objSpecifier);
+
+EXTERN_API( OSErr )
+CreateRangeDescriptor (AEDesc * rangeStart,
+ AEDesc * rangeStop,
+ Boolean disposeInputs,
+ AEDesc * theDescriptor);
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __AEPACKOBJECT__ */
+
diff --git a/include/qt/AERegistry.h b/include/qt/AERegistry.h
new file mode 100644
index 000000000..e63ee3a62
--- /dev/null
+++ b/include/qt/AERegistry.h
@@ -0,0 +1,1060 @@
+/*
+ File: AERegistry.h
+
+ Contains: AppleEvents Registry Interface.
+
+ Version: Technology: Mac OS 8.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1993-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __AEREGISTRY__
+#define __AEREGISTRY__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+#ifndef __APPLEEVENTS__
+#include "AppleEvents.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ cAEList = FOUR_CHAR_CODE('list'), /* 0x6c697374 */
+ cApplication = FOUR_CHAR_CODE('capp'), /* 0x63617070 */
+ cArc = FOUR_CHAR_CODE('carc'), /* 0x63617263 */
+ cBoolean = FOUR_CHAR_CODE('bool'), /* 0x626f6f6c */
+ cCell = FOUR_CHAR_CODE('ccel'), /* 0x6363656c */
+ cChar = FOUR_CHAR_CODE('cha '), /* 0x63686120 */
+ cColorTable = FOUR_CHAR_CODE('clrt'), /* 0x636c7274 */
+ cColumn = FOUR_CHAR_CODE('ccol'), /* 0x63636f6c */
+ cDocument = FOUR_CHAR_CODE('docu'), /* 0x646f6375 */
+ cDrawingArea = FOUR_CHAR_CODE('cdrw'), /* 0x63647277 */
+ cEnumeration = FOUR_CHAR_CODE('enum'), /* 0x656e756d */
+ cFile = FOUR_CHAR_CODE('file'), /* 0x66696c65 */
+ cFixed = FOUR_CHAR_CODE('fixd'), /* 0x66697864 */
+ cFixedPoint = FOUR_CHAR_CODE('fpnt'), /* 0x66706e74 */
+ cFixedRectangle = FOUR_CHAR_CODE('frct'), /* 0x66726374 */
+ cGraphicLine = FOUR_CHAR_CODE('glin'), /* 0x676c696e */
+ cGraphicObject = FOUR_CHAR_CODE('cgob'), /* 0x63676f62 */
+ cGraphicShape = FOUR_CHAR_CODE('cgsh'), /* 0x63677368 */
+ cGraphicText = FOUR_CHAR_CODE('cgtx'), /* 0x63677478 */
+ cGroupedGraphic = FOUR_CHAR_CODE('cpic') /* 0x63706963 */
+};
+
+enum {
+ cInsertionLoc = FOUR_CHAR_CODE('insl'), /* 0x696e736c */
+ cInsertionPoint = FOUR_CHAR_CODE('cins'), /* 0x63696e73 */
+ cIntlText = FOUR_CHAR_CODE('itxt'), /* 0x69747874 */
+ cIntlWritingCode = FOUR_CHAR_CODE('intl'), /* 0x696e746c */
+ cItem = FOUR_CHAR_CODE('citm'), /* 0x6369746d */
+ cLine = FOUR_CHAR_CODE('clin'), /* 0x636c696e */
+ cLongDateTime = FOUR_CHAR_CODE('ldt '), /* 0x6c647420 */
+ cLongFixed = FOUR_CHAR_CODE('lfxd'), /* 0x6c667864 */
+ cLongFixedPoint = FOUR_CHAR_CODE('lfpt'), /* 0x6c667074 */
+ cLongFixedRectangle = FOUR_CHAR_CODE('lfrc'), /* 0x6c667263 */
+ cLongInteger = FOUR_CHAR_CODE('long'), /* 0x6c6f6e67 */
+ cLongPoint = FOUR_CHAR_CODE('lpnt'), /* 0x6c706e74 */
+ cLongRectangle = FOUR_CHAR_CODE('lrct'), /* 0x6c726374 */
+ cMachineLoc = FOUR_CHAR_CODE('mLoc'), /* 0x6d4c6f63 */
+ cMenu = FOUR_CHAR_CODE('cmnu'), /* 0x636d6e75 */
+ cMenuItem = FOUR_CHAR_CODE('cmen'), /* 0x636d656e */
+ cObject = FOUR_CHAR_CODE('cobj'), /* 0x636f626a */
+ cObjectSpecifier = FOUR_CHAR_CODE('obj '), /* 0x6f626a20 */
+ cOpenableObject = FOUR_CHAR_CODE('coob'), /* 0x636f6f62 */
+ cOval = FOUR_CHAR_CODE('covl') /* 0x636f766c */
+};
+
+enum {
+ cParagraph = FOUR_CHAR_CODE('cpar'), /* 0x63706172 */
+ cPICT = FOUR_CHAR_CODE('PICT'), /* 0x50494354 */
+ cPixel = FOUR_CHAR_CODE('cpxl'), /* 0x6370786c */
+ cPixelMap = FOUR_CHAR_CODE('cpix'), /* 0x63706978 */
+ cPolygon = FOUR_CHAR_CODE('cpgn'), /* 0x6370676e */
+ cProperty = FOUR_CHAR_CODE('prop'), /* 0x70726f70 */
+ cQDPoint = FOUR_CHAR_CODE('QDpt'), /* 0x51447074 */
+ cQDRectangle = FOUR_CHAR_CODE('qdrt'), /* 0x71647274 */
+ cRectangle = FOUR_CHAR_CODE('crec'), /* 0x63726563 */
+ cRGBColor = FOUR_CHAR_CODE('cRGB'), /* 0x63524742 */
+ cRotation = FOUR_CHAR_CODE('trot'), /* 0x74726f74 */
+ cRoundedRectangle = FOUR_CHAR_CODE('crrc'), /* 0x63727263 */
+ cRow = FOUR_CHAR_CODE('crow'), /* 0x63726f77 */
+ cSelection = FOUR_CHAR_CODE('csel'), /* 0x6373656c */
+ cShortInteger = FOUR_CHAR_CODE('shor'), /* 0x73686f72 */
+ cTable = FOUR_CHAR_CODE('ctbl'), /* 0x6374626c */
+ cText = FOUR_CHAR_CODE('ctxt'), /* 0x63747874 */
+ cTextFlow = FOUR_CHAR_CODE('cflo'), /* 0x63666c6f */
+ cTextStyles = FOUR_CHAR_CODE('tsty'), /* 0x74737479 */
+ cType = FOUR_CHAR_CODE('type') /* 0x74797065 */
+};
+
+enum {
+ cVersion = FOUR_CHAR_CODE('vers'), /* 0x76657273 */
+ cWindow = FOUR_CHAR_CODE('cwin'), /* 0x6377696e */
+ cWord = FOUR_CHAR_CODE('cwor'), /* 0x63776f72 */
+ enumArrows = FOUR_CHAR_CODE('arro'), /* 0x6172726f */
+ enumJustification = FOUR_CHAR_CODE('just'), /* 0x6a757374 */
+ enumKeyForm = FOUR_CHAR_CODE('kfrm'), /* 0x6b66726d */
+ enumPosition = FOUR_CHAR_CODE('posi'), /* 0x706f7369 */
+ enumProtection = FOUR_CHAR_CODE('prtn'), /* 0x7072746e */
+ enumQuality = FOUR_CHAR_CODE('qual'), /* 0x7175616c */
+ enumSaveOptions = FOUR_CHAR_CODE('savo'), /* 0x7361766f */
+ enumStyle = FOUR_CHAR_CODE('styl'), /* 0x7374796c */
+ enumTransferMode = FOUR_CHAR_CODE('tran'), /* 0x7472616e */
+ formUniqueID = FOUR_CHAR_CODE('ID '), /* 0x49442020 */
+ kAEAbout = FOUR_CHAR_CODE('abou'), /* 0x61626f75 */
+ kAEAfter = FOUR_CHAR_CODE('afte'), /* 0x61667465 */
+ kAEAliasSelection = FOUR_CHAR_CODE('sali'), /* 0x73616c69 */
+ kAEAllCaps = FOUR_CHAR_CODE('alcp'), /* 0x616c6370 */
+ kAEArrowAtEnd = FOUR_CHAR_CODE('aren'), /* 0x6172656e */
+ kAEArrowAtStart = FOUR_CHAR_CODE('arst'), /* 0x61727374 */
+ kAEArrowBothEnds = FOUR_CHAR_CODE('arbo') /* 0x6172626f */
+};
+
+enum {
+ kAEAsk = FOUR_CHAR_CODE('ask '), /* 0x61736b20 */
+ kAEBefore = FOUR_CHAR_CODE('befo'), /* 0x6265666f */
+ kAEBeginning = FOUR_CHAR_CODE('bgng'), /* 0x62676e67 */
+ kAEBeginsWith = FOUR_CHAR_CODE('bgwt'), /* 0x62677774 */
+ kAEBeginTransaction = FOUR_CHAR_CODE('begi'), /* 0x62656769 */
+ kAEBold = FOUR_CHAR_CODE('bold'), /* 0x626f6c64 */
+ kAECaseSensEquals = FOUR_CHAR_CODE('cseq'), /* 0x63736571 */
+ kAECentered = FOUR_CHAR_CODE('cent'), /* 0x63656e74 */
+ kAEChangeView = FOUR_CHAR_CODE('view'), /* 0x76696577 */
+ kAEClone = FOUR_CHAR_CODE('clon'), /* 0x636c6f6e */
+ kAEClose = FOUR_CHAR_CODE('clos'), /* 0x636c6f73 */
+ kAECondensed = FOUR_CHAR_CODE('cond'), /* 0x636f6e64 */
+ kAEContains = FOUR_CHAR_CODE('cont'), /* 0x636f6e74 */
+ kAECopy = FOUR_CHAR_CODE('copy'), /* 0x636f7079 */
+ kAECoreSuite = FOUR_CHAR_CODE('core'), /* 0x636f7265 */
+ kAECountElements = FOUR_CHAR_CODE('cnte'), /* 0x636e7465 */
+ kAECreateElement = FOUR_CHAR_CODE('crel'), /* 0x6372656c */
+ kAECreatePublisher = FOUR_CHAR_CODE('cpub'), /* 0x63707562 */
+ kAECut = FOUR_CHAR_CODE('cut '), /* 0x63757420 */
+ kAEDelete = FOUR_CHAR_CODE('delo') /* 0x64656c6f */
+};
+
+enum {
+ kAEDoObjectsExist = FOUR_CHAR_CODE('doex'), /* 0x646f6578 */
+ kAEDoScript = FOUR_CHAR_CODE('dosc'), /* 0x646f7363 */
+ kAEDrag = FOUR_CHAR_CODE('drag'), /* 0x64726167 */
+ kAEDuplicateSelection = FOUR_CHAR_CODE('sdup'), /* 0x73647570 */
+ kAEEditGraphic = FOUR_CHAR_CODE('edit'), /* 0x65646974 */
+ kAEEmptyTrash = FOUR_CHAR_CODE('empt'), /* 0x656d7074 */
+ kAEEnd = FOUR_CHAR_CODE('end '), /* 0x656e6420 */
+ kAEEndsWith = FOUR_CHAR_CODE('ends'), /* 0x656e6473 */
+ kAEEndTransaction = FOUR_CHAR_CODE('endt'), /* 0x656e6474 */
+ kAEEquals = FOUR_CHAR_CODE('= '), /* 0x3d202020 */
+ kAEExpanded = FOUR_CHAR_CODE('pexp'), /* 0x70657870 */
+ kAEFast = FOUR_CHAR_CODE('fast'), /* 0x66617374 */
+ kAEFinderEvents = FOUR_CHAR_CODE('FNDR'), /* 0x464e4452 */
+ kAEFormulaProtect = FOUR_CHAR_CODE('fpro'), /* 0x6670726f */
+ kAEFullyJustified = FOUR_CHAR_CODE('full'), /* 0x66756c6c */
+ kAEGetClassInfo = FOUR_CHAR_CODE('qobj'), /* 0x716f626a */
+ kAEGetData = FOUR_CHAR_CODE('getd'), /* 0x67657464 */
+ kAEGetDataSize = FOUR_CHAR_CODE('dsiz'), /* 0x6473697a */
+ kAEGetEventInfo = FOUR_CHAR_CODE('gtei'), /* 0x67746569 */
+ kAEGetInfoSelection = FOUR_CHAR_CODE('sinf') /* 0x73696e66 */
+};
+
+enum {
+ kAEGetPrivilegeSelection = FOUR_CHAR_CODE('sprv'), /* 0x73707276 */
+ kAEGetSuiteInfo = FOUR_CHAR_CODE('gtsi'), /* 0x67747369 */
+ kAEGreaterThan = FOUR_CHAR_CODE('> '), /* 0x3e202020 */
+ kAEGreaterThanEquals = FOUR_CHAR_CODE('>= '), /* 0x3e3d2020 */
+ kAEGrow = FOUR_CHAR_CODE('grow'), /* 0x67726f77 */
+ kAEHidden = FOUR_CHAR_CODE('hidn'), /* 0x6869646e */
+ kAEHiQuality = FOUR_CHAR_CODE('hiqu'), /* 0x68697175 */
+ kAEImageGraphic = FOUR_CHAR_CODE('imgr'), /* 0x696d6772 */
+ kAEIsUniform = FOUR_CHAR_CODE('isun'), /* 0x6973756e */
+ kAEItalic = FOUR_CHAR_CODE('ital'), /* 0x6974616c */
+ kAELeftJustified = FOUR_CHAR_CODE('left'), /* 0x6c656674 */
+ kAELessThan = FOUR_CHAR_CODE('< '), /* 0x3c202020 */
+ kAELessThanEquals = FOUR_CHAR_CODE('<= '), /* 0x3c3d2020 */
+ kAELowercase = FOUR_CHAR_CODE('lowc'), /* 0x6c6f7763 */
+ kAEMakeObjectsVisible = FOUR_CHAR_CODE('mvis'), /* 0x6d766973 */
+ kAEMiscStandards = FOUR_CHAR_CODE('misc'), /* 0x6d697363 */
+ kAEModifiable = FOUR_CHAR_CODE('modf'), /* 0x6d6f6466 */
+ kAEMove = FOUR_CHAR_CODE('move'), /* 0x6d6f7665 */
+ kAENo = FOUR_CHAR_CODE('no '), /* 0x6e6f2020 */
+ kAENoArrow = FOUR_CHAR_CODE('arno') /* 0x61726e6f */
+};
+
+enum {
+ kAENonmodifiable = FOUR_CHAR_CODE('nmod'), /* 0x6e6d6f64 */
+ kAEOpen = FOUR_CHAR_CODE('odoc'), /* 0x6f646f63 */
+ kAEOpenSelection = FOUR_CHAR_CODE('sope'), /* 0x736f7065 */
+ kAEOutline = FOUR_CHAR_CODE('outl'), /* 0x6f75746c */
+ kAEPageSetup = FOUR_CHAR_CODE('pgsu'), /* 0x70677375 */
+ kAEPaste = FOUR_CHAR_CODE('past'), /* 0x70617374 */
+ kAEPlain = FOUR_CHAR_CODE('plan'), /* 0x706c616e */
+ kAEPrint = FOUR_CHAR_CODE('pdoc'), /* 0x70646f63 */
+ kAEPrintSelection = FOUR_CHAR_CODE('spri'), /* 0x73707269 */
+ kAEPrintWindow = FOUR_CHAR_CODE('pwin'), /* 0x7077696e */
+ kAEPutAwaySelection = FOUR_CHAR_CODE('sput'), /* 0x73707574 */
+ kAEQDAddOver = FOUR_CHAR_CODE('addo'), /* 0x6164646f */
+ kAEQDAddPin = FOUR_CHAR_CODE('addp'), /* 0x61646470 */
+ kAEQDAdMax = FOUR_CHAR_CODE('admx'), /* 0x61646d78 */
+ kAEQDAdMin = FOUR_CHAR_CODE('admn'), /* 0x61646d6e */
+ kAEQDBic = FOUR_CHAR_CODE('bic '), /* 0x62696320 */
+ kAEQDBlend = FOUR_CHAR_CODE('blnd'), /* 0x626c6e64 */
+ kAEQDCopy = FOUR_CHAR_CODE('cpy '), /* 0x63707920 */
+ kAEQDNotBic = FOUR_CHAR_CODE('nbic'), /* 0x6e626963 */
+ kAEQDNotCopy = FOUR_CHAR_CODE('ncpy') /* 0x6e637079 */
+};
+
+enum {
+ kAEQDNotOr = FOUR_CHAR_CODE('ntor'), /* 0x6e746f72 */
+ kAEQDNotXor = FOUR_CHAR_CODE('nxor'), /* 0x6e786f72 */
+ kAEQDOr = FOUR_CHAR_CODE('or '), /* 0x6f722020 */
+ kAEQDSubOver = FOUR_CHAR_CODE('subo'), /* 0x7375626f */
+ kAEQDSubPin = FOUR_CHAR_CODE('subp'), /* 0x73756270 */
+ kAEQDSupplementalSuite = FOUR_CHAR_CODE('qdsp'), /* 0x71647370 */
+ kAEQDXor = FOUR_CHAR_CODE('xor '), /* 0x786f7220 */
+ kAEQuickdrawSuite = FOUR_CHAR_CODE('qdrw'), /* 0x71647277 */
+ kAEQuitAll = FOUR_CHAR_CODE('quia'), /* 0x71756961 */
+ kAERedo = FOUR_CHAR_CODE('redo'), /* 0x7265646f */
+ kAERegular = FOUR_CHAR_CODE('regl'), /* 0x7265676c */
+ kAEReopenApplication = FOUR_CHAR_CODE('rapp'), /* 0x72617070 */
+ kAEReplace = FOUR_CHAR_CODE('rplc'), /* 0x72706c63 */
+ kAERequiredSuite = FOUR_CHAR_CODE('reqd'), /* 0x72657164 */
+ kAERestart = FOUR_CHAR_CODE('rest'), /* 0x72657374 */
+ kAERevealSelection = FOUR_CHAR_CODE('srev'), /* 0x73726576 */
+ kAERevert = FOUR_CHAR_CODE('rvrt'), /* 0x72767274 */
+ kAERightJustified = FOUR_CHAR_CODE('rght'), /* 0x72676874 */
+ kAESave = FOUR_CHAR_CODE('save'), /* 0x73617665 */
+ kAESelect = FOUR_CHAR_CODE('slct'), /* 0x736c6374 */
+ kAESetData = FOUR_CHAR_CODE('setd') /* 0x73657464 */
+};
+
+enum {
+ kAESetPosition = FOUR_CHAR_CODE('posn'), /* 0x706f736e */
+ kAEShadow = FOUR_CHAR_CODE('shad'), /* 0x73686164 */
+ kAEShowClipboard = FOUR_CHAR_CODE('shcl'), /* 0x7368636c */
+ kAEShutDown = FOUR_CHAR_CODE('shut'), /* 0x73687574 */
+ kAESleep = FOUR_CHAR_CODE('slep'), /* 0x736c6570 */
+ kAESmallCaps = FOUR_CHAR_CODE('smcp'), /* 0x736d6370 */
+ kAESpecialClassProperties = FOUR_CHAR_CODE('c@#!'), /* 0x63402321 */
+ kAEStrikethrough = FOUR_CHAR_CODE('strk'), /* 0x7374726b */
+ kAESubscript = FOUR_CHAR_CODE('sbsc'), /* 0x73627363 */
+ kAESuperscript = FOUR_CHAR_CODE('spsc'), /* 0x73707363 */
+ kAETableSuite = FOUR_CHAR_CODE('tbls'), /* 0x74626c73 */
+ kAETextSuite = FOUR_CHAR_CODE('TEXT'), /* 0x54455854 */
+ kAETransactionTerminated = FOUR_CHAR_CODE('ttrm'), /* 0x7474726d */
+ kAEUnderline = FOUR_CHAR_CODE('undl'), /* 0x756e646c */
+ kAEUndo = FOUR_CHAR_CODE('undo'), /* 0x756e646f */
+ kAEWholeWordEquals = FOUR_CHAR_CODE('wweq'), /* 0x77776571 */
+ kAEYes = FOUR_CHAR_CODE('yes '), /* 0x79657320 */
+ kAEZoom = FOUR_CHAR_CODE('zoom') /* 0x7a6f6f6d */
+};
+
+/* EventRecord Classes and EventIDs */
+enum {
+ kAEMouseClass = FOUR_CHAR_CODE('mous'),
+ kAEDown = FOUR_CHAR_CODE('down'),
+ kAEUp = FOUR_CHAR_CODE('up '),
+ kAEMoved = FOUR_CHAR_CODE('move'),
+ kAEStoppedMoving = FOUR_CHAR_CODE('stop'),
+ kAEWindowClass = FOUR_CHAR_CODE('wind'),
+ kAEUpdate = FOUR_CHAR_CODE('updt'),
+ kAEActivate = FOUR_CHAR_CODE('actv'),
+ kAEDeactivate = FOUR_CHAR_CODE('dact'),
+ kAECommandClass = FOUR_CHAR_CODE('cmnd'), /* Modern Command Event Class */
+ kAEKeyClass = FOUR_CHAR_CODE('keyc'),
+ kAERawKey = FOUR_CHAR_CODE('rkey'), /* Modern Raw Key Event */
+ kAEVirtualKey = FOUR_CHAR_CODE('keyc'), /* Modern Virtual Key Event */
+ kAENavigationKey = FOUR_CHAR_CODE('nave'), /* Modern Navigation Key Event */
+ kAEAutoDown = FOUR_CHAR_CODE('auto'),
+ kAEApplicationClass = FOUR_CHAR_CODE('appl'),
+ kAESuspend = FOUR_CHAR_CODE('susp'),
+ kAEResume = FOUR_CHAR_CODE('rsme'),
+ kAEDiskEvent = FOUR_CHAR_CODE('disk'),
+ kAENullEvent = FOUR_CHAR_CODE('null'),
+ kAEWakeUpEvent = FOUR_CHAR_CODE('wake'),
+ kAEScrapEvent = FOUR_CHAR_CODE('scrp'),
+ kAEHighLevel = FOUR_CHAR_CODE('high')
+};
+
+enum {
+ keyAEAngle = FOUR_CHAR_CODE('kang'), /* 0x6b616e67 */
+ keyAEArcAngle = FOUR_CHAR_CODE('parc') /* 0x70617263 */
+};
+
+enum {
+ keyAEBaseAddr = FOUR_CHAR_CODE('badd'), /* 0x62616464 */
+ keyAEBestType = FOUR_CHAR_CODE('pbst'), /* 0x70627374 */
+ keyAEBgndColor = FOUR_CHAR_CODE('kbcl'), /* 0x6b62636c */
+ keyAEBgndPattern = FOUR_CHAR_CODE('kbpt'), /* 0x6b627074 */
+ keyAEBounds = FOUR_CHAR_CODE('pbnd'), /* 0x70626e64 */
+ keyAECellList = FOUR_CHAR_CODE('kclt'), /* 0x6b636c74 */
+ keyAEClassID = FOUR_CHAR_CODE('clID'), /* 0x636c4944 */
+ keyAEColor = FOUR_CHAR_CODE('colr'), /* 0x636f6c72 */
+ keyAEColorTable = FOUR_CHAR_CODE('cltb'), /* 0x636c7462 */
+ keyAECurveHeight = FOUR_CHAR_CODE('kchd'), /* 0x6b636864 */
+ keyAECurveWidth = FOUR_CHAR_CODE('kcwd'), /* 0x6b637764 */
+ keyAEDashStyle = FOUR_CHAR_CODE('pdst'), /* 0x70647374 */
+ keyAEData = FOUR_CHAR_CODE('data'), /* 0x64617461 */
+ keyAEDefaultType = FOUR_CHAR_CODE('deft'), /* 0x64656674 */
+ keyAEDefinitionRect = FOUR_CHAR_CODE('pdrt'), /* 0x70647274 */
+ keyAEDescType = FOUR_CHAR_CODE('dstp'), /* 0x64737470 */
+ keyAEDestination = FOUR_CHAR_CODE('dest'), /* 0x64657374 */
+ keyAEDoAntiAlias = FOUR_CHAR_CODE('anta'), /* 0x616e7461 */
+ keyAEDoDithered = FOUR_CHAR_CODE('gdit'), /* 0x67646974 */
+ keyAEDoRotate = FOUR_CHAR_CODE('kdrt') /* 0x6b647274 */
+};
+
+enum {
+ keyAEDoScale = FOUR_CHAR_CODE('ksca'), /* 0x6b736361 */
+ keyAEDoTranslate = FOUR_CHAR_CODE('ktra'), /* 0x6b747261 */
+ keyAEEditionFileLoc = FOUR_CHAR_CODE('eloc'), /* 0x656c6f63 */
+ keyAEElements = FOUR_CHAR_CODE('elms'), /* 0x656c6d73 */
+ keyAEEndPoint = FOUR_CHAR_CODE('pend'), /* 0x70656e64 */
+ keyAEEventClass = FOUR_CHAR_CODE('evcl'), /* 0x6576636c */
+ keyAEEventID = FOUR_CHAR_CODE('evti'), /* 0x65767469 */
+ keyAEFile = FOUR_CHAR_CODE('kfil'), /* 0x6b66696c */
+ keyAEFileType = FOUR_CHAR_CODE('fltp'), /* 0x666c7470 */
+ keyAEFillColor = FOUR_CHAR_CODE('flcl'), /* 0x666c636c */
+ keyAEFillPattern = FOUR_CHAR_CODE('flpt'), /* 0x666c7074 */
+ keyAEFlipHorizontal = FOUR_CHAR_CODE('kfho'), /* 0x6b66686f */
+ keyAEFlipVertical = FOUR_CHAR_CODE('kfvt'), /* 0x6b667674 */
+ keyAEFont = FOUR_CHAR_CODE('font'), /* 0x666f6e74 */
+ keyAEFormula = FOUR_CHAR_CODE('pfor'), /* 0x70666f72 */
+ keyAEGraphicObjects = FOUR_CHAR_CODE('gobs'), /* 0x676f6273 */
+ keyAEID = FOUR_CHAR_CODE('ID '), /* 0x49442020 */
+ keyAEImageQuality = FOUR_CHAR_CODE('gqua'), /* 0x67717561 */
+ keyAEInsertHere = FOUR_CHAR_CODE('insh'), /* 0x696e7368 */
+ keyAEKeyForms = FOUR_CHAR_CODE('keyf') /* 0x6b657966 */
+};
+
+enum {
+ keyAEKeyword = FOUR_CHAR_CODE('kywd'), /* 0x6b797764 */
+ keyAELevel = FOUR_CHAR_CODE('levl'), /* 0x6c65766c */
+ keyAELineArrow = FOUR_CHAR_CODE('arro'), /* 0x6172726f */
+ keyAEName = FOUR_CHAR_CODE('pnam'), /* 0x706e616d */
+ keyAENewElementLoc = FOUR_CHAR_CODE('pnel'), /* 0x706e656c */
+ keyAEObject = FOUR_CHAR_CODE('kobj'), /* 0x6b6f626a */
+ keyAEObjectClass = FOUR_CHAR_CODE('kocl'), /* 0x6b6f636c */
+ keyAEOffStyles = FOUR_CHAR_CODE('ofst'), /* 0x6f667374 */
+ keyAEOnStyles = FOUR_CHAR_CODE('onst'), /* 0x6f6e7374 */
+ keyAEParameters = FOUR_CHAR_CODE('prms'), /* 0x70726d73 */
+ keyAEParamFlags = FOUR_CHAR_CODE('pmfg'), /* 0x706d6667 */
+ keyAEPenColor = FOUR_CHAR_CODE('ppcl'), /* 0x7070636c */
+ keyAEPenPattern = FOUR_CHAR_CODE('pppa'), /* 0x70707061 */
+ keyAEPenWidth = FOUR_CHAR_CODE('ppwd'), /* 0x70707764 */
+ keyAEPixelDepth = FOUR_CHAR_CODE('pdpt'), /* 0x70647074 */
+ keyAEPixMapMinus = FOUR_CHAR_CODE('kpmm'), /* 0x6b706d6d */
+ keyAEPMTable = FOUR_CHAR_CODE('kpmt'), /* 0x6b706d74 */
+ keyAEPointList = FOUR_CHAR_CODE('ptlt'), /* 0x70746c74 */
+ keyAEPointSize = FOUR_CHAR_CODE('ptsz'), /* 0x7074737a */
+ keyAEPosition = FOUR_CHAR_CODE('kpos') /* 0x6b706f73 */
+};
+
+enum {
+ keyAEPropData = FOUR_CHAR_CODE('prdt'), /* 0x70726474 */
+ keyAEProperties = FOUR_CHAR_CODE('qpro'), /* 0x7170726f */
+ keyAEProperty = FOUR_CHAR_CODE('kprp'), /* 0x6b707270 */
+ keyAEPropFlags = FOUR_CHAR_CODE('prfg'), /* 0x70726667 */
+ keyAEPropID = FOUR_CHAR_CODE('prop'), /* 0x70726f70 */
+ keyAEProtection = FOUR_CHAR_CODE('ppro'), /* 0x7070726f */
+ keyAERenderAs = FOUR_CHAR_CODE('kren'), /* 0x6b72656e */
+ keyAERequestedType = FOUR_CHAR_CODE('rtyp'), /* 0x72747970 */
+ keyAEResult = FOUR_CHAR_CODE('----'), /* 0x2d2d2d2d */
+ keyAEResultInfo = FOUR_CHAR_CODE('rsin'), /* 0x7273696e */
+ keyAERotation = FOUR_CHAR_CODE('prot'), /* 0x70726f74 */
+ keyAERotPoint = FOUR_CHAR_CODE('krtp'), /* 0x6b727470 */
+ keyAERowList = FOUR_CHAR_CODE('krls'), /* 0x6b726c73 */
+ keyAESaveOptions = FOUR_CHAR_CODE('savo'), /* 0x7361766f */
+ keyAEScale = FOUR_CHAR_CODE('pscl'), /* 0x7073636c */
+ keyAEScriptTag = FOUR_CHAR_CODE('psct'), /* 0x70736374 */
+ keyAEShowWhere = FOUR_CHAR_CODE('show'), /* 0x73686f77 */
+ keyAEStartAngle = FOUR_CHAR_CODE('pang'), /* 0x70616e67 */
+ keyAEStartPoint = FOUR_CHAR_CODE('pstp'), /* 0x70737470 */
+ keyAEStyles = FOUR_CHAR_CODE('ksty') /* 0x6b737479 */
+};
+
+enum {
+ keyAESuiteID = FOUR_CHAR_CODE('suit'), /* 0x73756974 */
+ keyAEText = FOUR_CHAR_CODE('ktxt'), /* 0x6b747874 */
+ keyAETextColor = FOUR_CHAR_CODE('ptxc'), /* 0x70747863 */
+ keyAETextFont = FOUR_CHAR_CODE('ptxf'), /* 0x70747866 */
+ keyAETextPointSize = FOUR_CHAR_CODE('ptps'), /* 0x70747073 */
+ keyAETextStyles = FOUR_CHAR_CODE('txst'), /* 0x74787374 */
+ keyAETextLineHeight = FOUR_CHAR_CODE('ktlh'), /* type ShortInteger */
+ keyAETextLineAscent = FOUR_CHAR_CODE('ktas'), /* type ShortInteger */
+ keyAETheText = FOUR_CHAR_CODE('thtx'), /* 0x74687478 */
+ keyAETransferMode = FOUR_CHAR_CODE('pptm'), /* 0x7070746d */
+ keyAETranslation = FOUR_CHAR_CODE('ptrs'), /* 0x70747273 */
+ keyAETryAsStructGraf = FOUR_CHAR_CODE('toog'), /* 0x746f6f67 */
+ keyAEUniformStyles = FOUR_CHAR_CODE('ustl'), /* 0x7573746c */
+ keyAEUpdateOn = FOUR_CHAR_CODE('pupd'), /* 0x70757064 */
+ keyAEUserTerm = FOUR_CHAR_CODE('utrm'), /* 0x7574726d */
+ keyAEWindow = FOUR_CHAR_CODE('wndw'), /* 0x776e6477 */
+ keyAEWritingCode = FOUR_CHAR_CODE('wrcd') /* 0x77726364 */
+};
+
+enum {
+ keyMiscellaneous = FOUR_CHAR_CODE('fmsc'), /* 0x666d7363 */
+ keySelection = FOUR_CHAR_CODE('fsel'), /* 0x6673656c */
+ keyWindow = FOUR_CHAR_CODE('kwnd'), /* 0x6b776e64 */
+ /* EventRecord keys */
+ keyWhen = FOUR_CHAR_CODE('when'),
+ keyWhere = FOUR_CHAR_CODE('wher'),
+ keyModifiers = FOUR_CHAR_CODE('mods'),
+ keyKey = FOUR_CHAR_CODE('key '),
+ keyKeyCode = FOUR_CHAR_CODE('code'),
+ keyKeyboard = FOUR_CHAR_CODE('keyb'),
+ keyDriveNumber = FOUR_CHAR_CODE('drv#'),
+ keyErrorCode = FOUR_CHAR_CODE('err#'),
+ keyHighLevelClass = FOUR_CHAR_CODE('hcls'),
+ keyHighLevelID = FOUR_CHAR_CODE('hid ')
+};
+
+enum {
+ pArcAngle = FOUR_CHAR_CODE('parc'), /* 0x70617263 */
+ pBackgroundColor = FOUR_CHAR_CODE('pbcl'), /* 0x7062636c */
+ pBackgroundPattern = FOUR_CHAR_CODE('pbpt'), /* 0x70627074 */
+ pBestType = FOUR_CHAR_CODE('pbst'), /* 0x70627374 */
+ pBounds = FOUR_CHAR_CODE('pbnd'), /* 0x70626e64 */
+ pClass = FOUR_CHAR_CODE('pcls'), /* 0x70636c73 */
+ pClipboard = FOUR_CHAR_CODE('pcli'), /* 0x70636c69 */
+ pColor = FOUR_CHAR_CODE('colr'), /* 0x636f6c72 */
+ pColorTable = FOUR_CHAR_CODE('cltb'), /* 0x636c7462 */
+ pContents = FOUR_CHAR_CODE('pcnt'), /* 0x70636e74 */
+ pCornerCurveHeight = FOUR_CHAR_CODE('pchd'), /* 0x70636864 */
+ pCornerCurveWidth = FOUR_CHAR_CODE('pcwd'), /* 0x70637764 */
+ pDashStyle = FOUR_CHAR_CODE('pdst'), /* 0x70647374 */
+ pDefaultType = FOUR_CHAR_CODE('deft'), /* 0x64656674 */
+ pDefinitionRect = FOUR_CHAR_CODE('pdrt'), /* 0x70647274 */
+ pEnabled = FOUR_CHAR_CODE('enbl'), /* 0x656e626c */
+ pEndPoint = FOUR_CHAR_CODE('pend'), /* 0x70656e64 */
+ pFillColor = FOUR_CHAR_CODE('flcl'), /* 0x666c636c */
+ pFillPattern = FOUR_CHAR_CODE('flpt'), /* 0x666c7074 */
+ pFont = FOUR_CHAR_CODE('font') /* 0x666f6e74 */
+};
+
+enum {
+ pFormula = FOUR_CHAR_CODE('pfor'), /* 0x70666f72 */
+ pGraphicObjects = FOUR_CHAR_CODE('gobs'), /* 0x676f6273 */
+ pHasCloseBox = FOUR_CHAR_CODE('hclb'), /* 0x68636c62 */
+ pHasTitleBar = FOUR_CHAR_CODE('ptit'), /* 0x70746974 */
+ pID = FOUR_CHAR_CODE('ID '), /* 0x49442020 */
+ pIndex = FOUR_CHAR_CODE('pidx'), /* 0x70696478 */
+ pInsertionLoc = FOUR_CHAR_CODE('pins'), /* 0x70696e73 */
+ pIsFloating = FOUR_CHAR_CODE('isfl'), /* 0x6973666c */
+ pIsFrontProcess = FOUR_CHAR_CODE('pisf'), /* 0x70697366 */
+ pIsModal = FOUR_CHAR_CODE('pmod'), /* 0x706d6f64 */
+ pIsModified = FOUR_CHAR_CODE('imod'), /* 0x696d6f64 */
+ pIsResizable = FOUR_CHAR_CODE('prsz'), /* 0x7072737a */
+ pIsStationeryPad = FOUR_CHAR_CODE('pspd'), /* 0x70737064 */
+ pIsZoomable = FOUR_CHAR_CODE('iszm'), /* 0x69737a6d */
+ pIsZoomed = FOUR_CHAR_CODE('pzum'), /* 0x707a756d */
+ pItemNumber = FOUR_CHAR_CODE('itmn'), /* 0x69746d6e */
+ pJustification = FOUR_CHAR_CODE('pjst'), /* 0x706a7374 */
+ pLineArrow = FOUR_CHAR_CODE('arro'), /* 0x6172726f */
+ pMenuID = FOUR_CHAR_CODE('mnid'), /* 0x6d6e6964 */
+ pName = FOUR_CHAR_CODE('pnam') /* 0x706e616d */
+};
+
+enum {
+ pNewElementLoc = FOUR_CHAR_CODE('pnel'), /* 0x706e656c */
+ pPenColor = FOUR_CHAR_CODE('ppcl'), /* 0x7070636c */
+ pPenPattern = FOUR_CHAR_CODE('pppa'), /* 0x70707061 */
+ pPenWidth = FOUR_CHAR_CODE('ppwd'), /* 0x70707764 */
+ pPixelDepth = FOUR_CHAR_CODE('pdpt'), /* 0x70647074 */
+ pPointList = FOUR_CHAR_CODE('ptlt'), /* 0x70746c74 */
+ pPointSize = FOUR_CHAR_CODE('ptsz'), /* 0x7074737a */
+ pProtection = FOUR_CHAR_CODE('ppro'), /* 0x7070726f */
+ pRotation = FOUR_CHAR_CODE('prot'), /* 0x70726f74 */
+ pScale = FOUR_CHAR_CODE('pscl'), /* 0x7073636c */
+ pScript = FOUR_CHAR_CODE('scpt'), /* 0x73637074 */
+ pScriptTag = FOUR_CHAR_CODE('psct'), /* 0x70736374 */
+ pSelected = FOUR_CHAR_CODE('selc'), /* 0x73656c63 */
+ pSelection = FOUR_CHAR_CODE('sele'), /* 0x73656c65 */
+ pStartAngle = FOUR_CHAR_CODE('pang'), /* 0x70616e67 */
+ pStartPoint = FOUR_CHAR_CODE('pstp'), /* 0x70737470 */
+ pTextColor = FOUR_CHAR_CODE('ptxc'), /* 0x70747863 */
+ pTextFont = FOUR_CHAR_CODE('ptxf'), /* 0x70747866 */
+ pTextItemDelimiters = FOUR_CHAR_CODE('txdl'), /* 0x7478646c */
+ pTextPointSize = FOUR_CHAR_CODE('ptps') /* 0x70747073 */
+};
+
+enum {
+ pTextStyles = FOUR_CHAR_CODE('txst'), /* 0x74787374 */
+ pTransferMode = FOUR_CHAR_CODE('pptm'), /* 0x7070746d */
+ pTranslation = FOUR_CHAR_CODE('ptrs'), /* 0x70747273 */
+ pUniformStyles = FOUR_CHAR_CODE('ustl'), /* 0x7573746c */
+ pUpdateOn = FOUR_CHAR_CODE('pupd'), /* 0x70757064 */
+ pUserSelection = FOUR_CHAR_CODE('pusl'), /* 0x7075736c */
+ pVersion = FOUR_CHAR_CODE('vers'), /* 0x76657273 */
+ pVisible = FOUR_CHAR_CODE('pvis') /* 0x70766973 */
+};
+
+enum {
+ typeAEText = FOUR_CHAR_CODE('tTXT'), /* 0x74545854 */
+ typeArc = FOUR_CHAR_CODE('carc'), /* 0x63617263 */
+ typeBest = FOUR_CHAR_CODE('best'), /* 0x62657374 */
+ typeCell = FOUR_CHAR_CODE('ccel'), /* 0x6363656c */
+ typeClassInfo = FOUR_CHAR_CODE('gcli'), /* 0x67636c69 */
+ typeColorTable = FOUR_CHAR_CODE('clrt'), /* 0x636c7274 */
+ typeColumn = FOUR_CHAR_CODE('ccol'), /* 0x63636f6c */
+ typeDashStyle = FOUR_CHAR_CODE('tdas'), /* 0x74646173 */
+ typeData = FOUR_CHAR_CODE('tdta'), /* 0x74647461 */
+ typeDrawingArea = FOUR_CHAR_CODE('cdrw'), /* 0x63647277 */
+ typeElemInfo = FOUR_CHAR_CODE('elin'), /* 0x656c696e */
+ typeEnumeration = FOUR_CHAR_CODE('enum'), /* 0x656e756d */
+ typeEPS = FOUR_CHAR_CODE('EPS '), /* 0x45505320 */
+ typeEventInfo = FOUR_CHAR_CODE('evin') /* 0x6576696e */
+};
+
+enum {
+ typeFinderWindow = FOUR_CHAR_CODE('fwin'), /* 0x6677696e */
+ typeFixedPoint = FOUR_CHAR_CODE('fpnt'), /* 0x66706e74 */
+ typeFixedRectangle = FOUR_CHAR_CODE('frct'), /* 0x66726374 */
+ typeGraphicLine = FOUR_CHAR_CODE('glin'), /* 0x676c696e */
+ typeGraphicText = FOUR_CHAR_CODE('cgtx'), /* 0x63677478 */
+ typeGroupedGraphic = FOUR_CHAR_CODE('cpic'), /* 0x63706963 */
+ typeInsertionLoc = FOUR_CHAR_CODE('insl'), /* 0x696e736c */
+ typeIntlText = FOUR_CHAR_CODE('itxt'), /* 0x69747874 */
+ typeIntlWritingCode = FOUR_CHAR_CODE('intl'), /* 0x696e746c */
+ typeLongDateTime = FOUR_CHAR_CODE('ldt '), /* 0x6c647420 */
+ typeLongFixed = FOUR_CHAR_CODE('lfxd'), /* 0x6c667864 */
+ typeLongFixedPoint = FOUR_CHAR_CODE('lfpt'), /* 0x6c667074 */
+ typeLongFixedRectangle = FOUR_CHAR_CODE('lfrc'), /* 0x6c667263 */
+ typeLongPoint = FOUR_CHAR_CODE('lpnt'), /* 0x6c706e74 */
+ typeLongRectangle = FOUR_CHAR_CODE('lrct'), /* 0x6c726374 */
+ typeMachineLoc = FOUR_CHAR_CODE('mLoc'), /* 0x6d4c6f63 */
+ typeOval = FOUR_CHAR_CODE('covl'), /* 0x636f766c */
+ typeParamInfo = FOUR_CHAR_CODE('pmin'), /* 0x706d696e */
+ typePict = FOUR_CHAR_CODE('PICT') /* 0x50494354 */
+};
+
+enum {
+ typePixelMap = FOUR_CHAR_CODE('cpix'), /* 0x63706978 */
+ typePixMapMinus = FOUR_CHAR_CODE('tpmm'), /* 0x74706d6d */
+ typePolygon = FOUR_CHAR_CODE('cpgn'), /* 0x6370676e */
+ typePropInfo = FOUR_CHAR_CODE('pinf'), /* 0x70696e66 */
+ typeQDPoint = FOUR_CHAR_CODE('QDpt'), /* 0x51447074 */
+ typeQDRegion = FOUR_CHAR_CODE('Qrgn'), /* 0x51447074 (data is actual region data, including rectangle and size, _not_ region handle or ptr)*/
+ typeRectangle = FOUR_CHAR_CODE('crec'), /* 0x63726563 */
+ typeRGB16 = FOUR_CHAR_CODE('tr16'), /* 0x74723136 */
+ typeRGB96 = FOUR_CHAR_CODE('tr96'), /* 0x74723936 */
+ typeRGBColor = FOUR_CHAR_CODE('cRGB'), /* 0x63524742 */
+ typeRotation = FOUR_CHAR_CODE('trot'), /* 0x74726f74 */
+ typeRoundedRectangle = FOUR_CHAR_CODE('crrc'), /* 0x63727263 */
+ typeRow = FOUR_CHAR_CODE('crow'), /* 0x63726f77 */
+ typeScrapStyles = FOUR_CHAR_CODE('styl'), /* 0x7374796c */
+ typeScript = FOUR_CHAR_CODE('scpt'), /* 0x73637074 */
+ typeStyledText = FOUR_CHAR_CODE('STXT'), /* 0x53545854 */
+ typeSuiteInfo = FOUR_CHAR_CODE('suin'), /* 0x7375696e */
+ typeTable = FOUR_CHAR_CODE('ctbl'), /* 0x6374626c */
+ typeTextStyles = FOUR_CHAR_CODE('tsty') /* 0x74737479 */
+};
+
+enum {
+ typeTIFF = FOUR_CHAR_CODE('TIFF'), /* 0x54494646 */
+ typeVersion = FOUR_CHAR_CODE('vers') /* 0x76657273 */
+};
+
+enum {
+ kAEMenuClass = FOUR_CHAR_CODE('menu'),
+ kAEMenuSelect = FOUR_CHAR_CODE('mhit'),
+ kAEMouseDown = FOUR_CHAR_CODE('mdwn'),
+ kAEMouseDownInBack = FOUR_CHAR_CODE('mdbk'),
+ kAEKeyDown = FOUR_CHAR_CODE('kdwn'),
+ kAEResized = FOUR_CHAR_CODE('rsiz'),
+ kAEPromise = FOUR_CHAR_CODE('prom')
+};
+
+enum {
+ keyMenuID = FOUR_CHAR_CODE('mid '),
+ keyMenuItem = FOUR_CHAR_CODE('mitm'),
+ keyCloseAllWindows = FOUR_CHAR_CODE('caw '),
+ keyOriginalBounds = FOUR_CHAR_CODE('obnd'),
+ keyNewBounds = FOUR_CHAR_CODE('nbnd'),
+ keyLocalWhere = FOUR_CHAR_CODE('lwhr')
+};
+
+enum {
+ typeHIMenu = FOUR_CHAR_CODE('mobj'),
+ typeHIWindow = FOUR_CHAR_CODE('wobj')
+};
+
+enum {
+ kBySmallIcon = 0,
+ kByIconView = 1,
+ kByNameView = 2,
+ kByDateView = 3,
+ kBySizeView = 4,
+ kByKindView = 5,
+ kByCommentView = 6,
+ kByLabelView = 7,
+ kByVersionView = 8
+};
+
+enum {
+ kAEInfo = 11,
+ kAEMain = 0,
+ kAESharing = 13
+};
+
+enum {
+ kAEZoomIn = 7,
+ kAEZoomOut = 8
+};
+
+enum {
+ kTextServiceClass = FOUR_CHAR_CODE('tsvc'),
+ kUpdateActiveInputArea = FOUR_CHAR_CODE('updt'), /* update the active input area */
+ kShowHideInputWindow = FOUR_CHAR_CODE('shiw'), /* show or hide the input window */
+ kPos2Offset = FOUR_CHAR_CODE('p2st'), /* converting global coordinates to char position */
+ kOffset2Pos = FOUR_CHAR_CODE('st2p'), /* converting char position to global coordinates */
+ kUnicodeNotFromInputMethod = FOUR_CHAR_CODE('unim'), /* Unicode text when event not handled by Input Method or no Input Method */
+ kGetSelectedText = FOUR_CHAR_CODE('gtxt'), /* Get text for current selection */
+ keyAETSMDocumentRefcon = FOUR_CHAR_CODE('refc'), /* TSM document refcon, typeLongInteger */
+ keyAEServerInstance = FOUR_CHAR_CODE('srvi'), /* component instance */
+ keyAETheData = FOUR_CHAR_CODE('kdat'), /* typeText */
+ keyAEFixLength = FOUR_CHAR_CODE('fixl'), /* fix len ?? */
+ keyAEUpdateRange = FOUR_CHAR_CODE('udng'), /* typeTextRangeArray */
+ keyAECurrentPoint = FOUR_CHAR_CODE('cpos'), /* current point */
+ keyAEBufferSize = FOUR_CHAR_CODE('buff'), /* buffer size to get the text */
+ keyAEMoveView = FOUR_CHAR_CODE('mvvw'), /* move view flag */
+ keyAENextBody = FOUR_CHAR_CODE('nxbd'), /* next or previous body */
+ keyAETSMScriptTag = FOUR_CHAR_CODE('sclg'),
+ keyAETSMTextFont = FOUR_CHAR_CODE('ktxf'),
+ keyAETSMTextPointSize = FOUR_CHAR_CODE('ktps'),
+ keyAETSMEventRecord = FOUR_CHAR_CODE('tevt'), /* Low level Event Record, typeLowLevelEventRecord */
+ keyAETextServiceEncoding = FOUR_CHAR_CODE('tsen'), /* Text Service encoding, mac or Unicode in UpdateActiveInputArea or GetSelectedText events. */
+ keyAETextServiceMacEncoding = FOUR_CHAR_CODE('tmen'), /* Target mac encoding for TSM conversion of text from Unicode text service. */
+ typeTextRange = FOUR_CHAR_CODE('txrn'), /* TextRange */
+ typeComponentInstance = FOUR_CHAR_CODE('cmpi'), /* server instance */
+ typeOffsetArray = FOUR_CHAR_CODE('ofay'), /* offset array */
+ typeTextRangeArray = FOUR_CHAR_CODE('tray'),
+ typeLowLevelEventRecord = FOUR_CHAR_CODE('evtr'), /* Low Level Event Record */
+ typeText = typeChar /* Plain text */
+};
+
+
+/* Desc type constants */
+enum {
+ kTSMOutsideOfBody = 1,
+ kTSMInsideOfBody = 2,
+ kTSMInsideOfActiveInputArea = 3
+};
+
+enum {
+ kNextBody = 1,
+ kPreviousBody = 2
+};
+
+
+struct TextRange {
+ long fStart;
+ long fEnd;
+ short fHiliteStyle;
+};
+typedef struct TextRange TextRange;
+typedef TextRange * TextRangePtr;
+typedef TextRangePtr * TextRangeHandle;
+
+struct TextRangeArray {
+ short fNumOfRanges; /* specify the size of the fRange array */
+ TextRange fRange[1]; /* when fNumOfRanges > 1, the size of this array has to be calculated */
+};
+typedef struct TextRangeArray TextRangeArray;
+typedef TextRangeArray * TextRangeArrayPtr;
+typedef TextRangeArrayPtr * TextRangeArrayHandle;
+
+struct OffsetArray {
+ short fNumOfOffsets; /* specify the size of the fOffset array */
+ long fOffset[1]; /* when fNumOfOffsets > 1, the size of this array has to be calculated */
+};
+typedef struct OffsetArray OffsetArray;
+typedef OffsetArray * OffsetArrayPtr;
+typedef OffsetArrayPtr * OffsetArrayHandle;
+
+struct WritingCode {
+ ScriptCode theScriptCode;
+ LangCode theLangCode;
+};
+typedef struct WritingCode WritingCode;
+
+struct IntlText {
+ ScriptCode theScriptCode;
+ LangCode theLangCode;
+ char theText[1]; /* variable length data */
+};
+typedef struct IntlText IntlText;
+
+/* Hilite styles */
+enum {
+ kCaretPosition = 1, /* specify caret position */
+ kRawText = 2, /* specify range of raw text */
+ kSelectedRawText = 3, /* specify range of selected raw text */
+ kConvertedText = 4, /* specify range of converted text */
+ kSelectedConvertedText = 5, /* specify range of selected converted text */
+ kBlockFillText = 6, /* Block Fill hilite style */
+ kOutlineText = 7, /* Outline hilite style */
+ kSelectedText = 8 /* Selected hilite style */
+};
+
+enum {
+ keyAEHiliteRange = FOUR_CHAR_CODE('hrng'), /* typeTextRangeArray for System 7, typeHiliteRangeArray for System 8 */
+ keyAEPinRange = FOUR_CHAR_CODE('pnrg'), /* typeTextRange for System 7, typeTextRegionRange for System 8 */
+ keyAEClauseOffsets = FOUR_CHAR_CODE('clau'), /* typeOffsetArray for System 7, typeClauseOffsetArray for System 8 */
+ keyAEOffset = FOUR_CHAR_CODE('ofst'), /* typeLongInteger for System 7, typeByteOffset for System 8 */
+ keyAEPoint = FOUR_CHAR_CODE('gpos'), /* typePoint for System 7, typeQDPoint for System 8 */
+ keyAELeftSide = FOUR_CHAR_CODE('klef'), /* typeBoolean */
+ keyAERegionClass = FOUR_CHAR_CODE('rgnc'), /* typeShortInteger for System 7, typeRegionClass for System 8 */
+ keyAEDragging = FOUR_CHAR_CODE('bool') /* typeBoolean */
+};
+
+
+#if OLDROUTINENAMES
+enum {
+ keyAELeadingEdge = keyAELeftSide
+};
+
+#endif /* OLDROUTINENAMES */
+
+enum {
+ /* AppleScript 1.3: New Text types */
+ typeUnicodeText = FOUR_CHAR_CODE('utxt'),
+ typeStyledUnicodeText = FOUR_CHAR_CODE('sutx'),
+ typeEncodedString = FOUR_CHAR_CODE('encs'),
+ typeCString = FOUR_CHAR_CODE('cstr'),
+ typePString = FOUR_CHAR_CODE('pstr')
+};
+
+enum {
+ /* AppleScript 1.3: Unit types */
+ typeMeters = FOUR_CHAR_CODE('metr'), /* Base Unit */
+ typeInches = FOUR_CHAR_CODE('inch'),
+ typeFeet = FOUR_CHAR_CODE('feet'),
+ typeYards = FOUR_CHAR_CODE('yard'),
+ typeMiles = FOUR_CHAR_CODE('mile'),
+ typeKilometers = FOUR_CHAR_CODE('kmtr'),
+ typeCentimeters = FOUR_CHAR_CODE('cmtr'),
+ typeSquareMeters = FOUR_CHAR_CODE('sqrm'), /* Base Unit */
+ typeSquareFeet = FOUR_CHAR_CODE('sqft'),
+ typeSquareYards = FOUR_CHAR_CODE('sqyd'),
+ typeSquareMiles = FOUR_CHAR_CODE('sqmi'),
+ typeSquareKilometers = FOUR_CHAR_CODE('sqkm'),
+ typeLiters = FOUR_CHAR_CODE('litr'), /* Base Unit */
+ typeQuarts = FOUR_CHAR_CODE('qrts'),
+ typeGallons = FOUR_CHAR_CODE('galn'),
+ typeCubicMeters = FOUR_CHAR_CODE('cmet'), /* Base Unit */
+ typeCubicFeet = FOUR_CHAR_CODE('cfet'),
+ typeCubicInches = FOUR_CHAR_CODE('cuin'),
+ typeCubicCentimeter = FOUR_CHAR_CODE('ccmt'),
+ typeCubicYards = FOUR_CHAR_CODE('cyrd'),
+ typeKilograms = FOUR_CHAR_CODE('kgrm'), /* Base Unit */
+ typeGrams = FOUR_CHAR_CODE('gram'),
+ typeOunces = FOUR_CHAR_CODE('ozs '),
+ typePounds = FOUR_CHAR_CODE('lbs '),
+ typeDegreesC = FOUR_CHAR_CODE('degc'), /* Base Unit */
+ typeDegreesF = FOUR_CHAR_CODE('degf'),
+ typeDegreesK = FOUR_CHAR_CODE('degk')
+};
+
+enum {
+ /* AppleScript 1.3: Folder Actions */
+ kFAServerApp = FOUR_CHAR_CODE('ssrv'), /* Creator code for Folder Actions Server*/
+ kDoFolderActionEvent = FOUR_CHAR_CODE('fola'), /* Event the Finder sends to the Folder Actions FBA*/
+ kFolderActionCode = FOUR_CHAR_CODE('actn'), /* Parameter that contains the Folder Action*/
+ kFolderOpenedEvent = FOUR_CHAR_CODE('fopn'), /* Value of kFolderActionCode parameter; sent to script as event*/
+ kFolderClosedEvent = FOUR_CHAR_CODE('fclo'),
+ kFolderWindowMovedEvent = FOUR_CHAR_CODE('fsiz'),
+ kFolderItemsAddedEvent = FOUR_CHAR_CODE('fget'),
+ kFolderItemsRemovedEvent = FOUR_CHAR_CODE('flos'),
+ kItemList = FOUR_CHAR_CODE('flst'), /* List parameter for added and removed items*/
+ kNewSizeParameter = FOUR_CHAR_CODE('fnsz'), /* Parameter for moved window*/
+ kFASuiteCode = FOUR_CHAR_CODE('faco'), /* Suite code for the following events*/
+ kFAAttachCommand = FOUR_CHAR_CODE('atfa'), /* Attach event id*/
+ kFARemoveCommand = FOUR_CHAR_CODE('rmfa'), /* Remove event id*/
+ kFAEditCommand = FOUR_CHAR_CODE('edfa'), /* Edit event id*/
+ kFAFileParam = FOUR_CHAR_CODE('faal'), /* Key for file parameter for Attach*/
+ kFAIndexParam = FOUR_CHAR_CODE('indx') /* Key for index (0-based) parameter for Remove and Edit*/
+};
+
+/* AppleScript 1.3 Internet Suite */
+enum {
+ /* Suite code */
+ kAEInternetSuite = FOUR_CHAR_CODE('gurl'),
+ kAEISWebStarSuite = FOUR_CHAR_CODE('WWW½')
+};
+
+enum {
+ /* Events */
+ kAEISGetURL = FOUR_CHAR_CODE('gurl'),
+ KAEISHandleCGI = FOUR_CHAR_CODE('sdoc')
+};
+
+enum {
+ /* Classes */
+ cURL = FOUR_CHAR_CODE('url '),
+ cInternetAddress = FOUR_CHAR_CODE('IPAD'),
+ cHTML = FOUR_CHAR_CODE('html'),
+ cFTPItem = FOUR_CHAR_CODE('ftp ')
+};
+
+enum {
+ /* Parameters */
+ kAEISHTTPSearchArgs = FOUR_CHAR_CODE('kfor'),
+ kAEISPostArgs = FOUR_CHAR_CODE('post'),
+ kAEISMethod = FOUR_CHAR_CODE('meth'),
+ kAEISClientAddress = FOUR_CHAR_CODE('addr'),
+ kAEISUserName = FOUR_CHAR_CODE('user'),
+ kAEISPassword = FOUR_CHAR_CODE('pass'),
+ kAEISFromUser = FOUR_CHAR_CODE('frmu'),
+ kAEISServerName = FOUR_CHAR_CODE('svnm'),
+ kAEISServerPort = FOUR_CHAR_CODE('svpt'),
+ kAEISScriptName = FOUR_CHAR_CODE('scnm'),
+ kAEISContentType = FOUR_CHAR_CODE('ctyp'),
+ kAEISReferrer = FOUR_CHAR_CODE('refr'),
+ kAEISUserAgent = FOUR_CHAR_CODE('Agnt'),
+ kAEISAction = FOUR_CHAR_CODE('Kact'),
+ kAEISActionPath = FOUR_CHAR_CODE('Kapt'),
+ kAEISClientIP = FOUR_CHAR_CODE('Kcip'),
+ kAEISFullRequest = FOUR_CHAR_CODE('Kfrq')
+};
+
+enum {
+ /* Properties */
+ pScheme = FOUR_CHAR_CODE('pusc'),
+ pHost = FOUR_CHAR_CODE('HOST'),
+ pPath = FOUR_CHAR_CODE('FTPc'),
+ pUserName = FOUR_CHAR_CODE('RAun'),
+ pUserPassword = FOUR_CHAR_CODE('RApw'),
+ pDNSForm = FOUR_CHAR_CODE('pDNS'),
+ pURL = FOUR_CHAR_CODE('pURL'),
+ pTextEncoding = FOUR_CHAR_CODE('ptxe'),
+ pFTPKind = FOUR_CHAR_CODE('kind')
+};
+
+enum {
+ /* Scheme enumerations */
+ eScheme = FOUR_CHAR_CODE('esch'),
+ eurlHTTP = FOUR_CHAR_CODE('http'), /* RFC 2068 */
+ eurlHTTPS = FOUR_CHAR_CODE('htps'),
+ eurlFTP = FOUR_CHAR_CODE('ftp '), /* RFC 1738 */
+ eurlMail = FOUR_CHAR_CODE('mail'), /* RFC 2638 */
+ eurlFile = FOUR_CHAR_CODE('file'), /* RFC 1738 */
+ eurlGopher = FOUR_CHAR_CODE('gphr'), /* RFC 1738 */
+ eurlTelnet = FOUR_CHAR_CODE('tlnt'), /* RFC 1738 */
+ eurlNews = FOUR_CHAR_CODE('news'), /* RFC 1738 */
+ eurlSNews = FOUR_CHAR_CODE('snws'),
+ eurlNNTP = FOUR_CHAR_CODE('nntp'), /* RFC 1738 */
+ eurlMessage = FOUR_CHAR_CODE('mess'),
+ eurlMailbox = FOUR_CHAR_CODE('mbox'),
+ eurlMulti = FOUR_CHAR_CODE('mult'),
+ eurlLaunch = FOUR_CHAR_CODE('laun'),
+ eurlAFP = FOUR_CHAR_CODE('afp '),
+ eurlAT = FOUR_CHAR_CODE('at '),
+ eurlEPPC = FOUR_CHAR_CODE('eppc'),
+ eurlRTSP = FOUR_CHAR_CODE('rtsp'), /* RFC 2326 */
+ eurlIMAP = FOUR_CHAR_CODE('imap'), /* RFC 2192 */
+ eurlNFS = FOUR_CHAR_CODE('unfs'), /* RFC 2224 */
+ eurlPOP = FOUR_CHAR_CODE('upop'), /* RFC 2384 */
+ eurlLDAP = FOUR_CHAR_CODE('uldp'), /* RFC 2255 */
+ eurlUnknown = FOUR_CHAR_CODE('url?')
+};
+
+enum {
+ /* AppleScript 1.3: Connectivity Suite in aeut */
+ kConnSuite = FOUR_CHAR_CODE('macc'),
+ cDevSpec = FOUR_CHAR_CODE('cdev'),
+ cAddressSpec = FOUR_CHAR_CODE('cadr'),
+ cADBAddress = FOUR_CHAR_CODE('cadb'),
+ cAppleTalkAddress = FOUR_CHAR_CODE('cat '),
+ cBusAddress = FOUR_CHAR_CODE('cbus'),
+ cEthernetAddress = FOUR_CHAR_CODE('cen '),
+ cFireWireAddress = FOUR_CHAR_CODE('cfw '),
+ cIPAddress = FOUR_CHAR_CODE('cip '),
+ cLocalTalkAddress = FOUR_CHAR_CODE('clt '),
+ cSCSIAddress = FOUR_CHAR_CODE('cscs'),
+ cTokenRingAddress = FOUR_CHAR_CODE('ctok'),
+ cUSBAddress = FOUR_CHAR_CODE('cusb'), /* */
+ /* Properties */
+ pDeviceType = FOUR_CHAR_CODE('pdvt'),
+ pDeviceAddress = FOUR_CHAR_CODE('pdva'),
+ pConduit = FOUR_CHAR_CODE('pcon'),
+ pProtocol = FOUR_CHAR_CODE('pprt'), /* cde 4/27/98 was 'ppro' conflicted with DB suite */
+ pATMachine = FOUR_CHAR_CODE('patm'),
+ pATZone = FOUR_CHAR_CODE('patz'),
+ pATType = FOUR_CHAR_CODE('patt'),
+ pDottedDecimal = FOUR_CHAR_CODE('pipd'),
+ pDNS = FOUR_CHAR_CODE('pdns'),
+ pPort = FOUR_CHAR_CODE('ppor'),
+ pNetwork = FOUR_CHAR_CODE('pnet'),
+ pNode = FOUR_CHAR_CODE('pnod'),
+ pSocket = FOUR_CHAR_CODE('psoc'),
+ pSCSIBus = FOUR_CHAR_CODE('pscb'),
+ pSCSILUN = FOUR_CHAR_CODE('pslu'), /* cde 5/22/98 per WWDC developer request */
+ /* Enumerations and enumerators */
+ eDeviceType = FOUR_CHAR_CODE('edvt'),
+ eAddressSpec = FOUR_CHAR_CODE('eads'),
+ eConduit = FOUR_CHAR_CODE('econ'),
+ eProtocol = FOUR_CHAR_CODE('epro'),
+ eADB = FOUR_CHAR_CODE('eadb'),
+ eAnalogAudio = FOUR_CHAR_CODE('epau'),
+ eAppleTalk = FOUR_CHAR_CODE('epat'),
+ eAudioLineIn = FOUR_CHAR_CODE('ecai'),
+ eAudioLineOut = FOUR_CHAR_CODE('ecal'), /* cde 4/24/98 changed from 'ecao' to not conflict */
+ eAudioOut = FOUR_CHAR_CODE('ecao'),
+ eBus = FOUR_CHAR_CODE('ebus'),
+ eCDROM = FOUR_CHAR_CODE('ecd '),
+ eCommSlot = FOUR_CHAR_CODE('eccm'),
+ eDigitalAudio = FOUR_CHAR_CODE('epda'),
+ eDisplay = FOUR_CHAR_CODE('edds'),
+ eDVD = FOUR_CHAR_CODE('edvd'),
+ eEthernet = FOUR_CHAR_CODE('ecen'),
+ eFireWire = FOUR_CHAR_CODE('ecfw'),
+ eFloppy = FOUR_CHAR_CODE('efd '),
+ eHD = FOUR_CHAR_CODE('ehd '),
+ eInfrared = FOUR_CHAR_CODE('ecir'),
+ eIP = FOUR_CHAR_CODE('epip'),
+ eIrDA = FOUR_CHAR_CODE('epir'),
+ eIRTalk = FOUR_CHAR_CODE('epit'),
+ eKeyboard = FOUR_CHAR_CODE('ekbd'),
+ eLCD = FOUR_CHAR_CODE('edlc'),
+ eLocalTalk = FOUR_CHAR_CODE('eclt'),
+ eMacIP = FOUR_CHAR_CODE('epmi'),
+ eMacVideo = FOUR_CHAR_CODE('epmv'),
+ eMicrophone = FOUR_CHAR_CODE('ecmi'),
+ eModemPort = FOUR_CHAR_CODE('ecmp'),
+ eModemPrinterPort = FOUR_CHAR_CODE('empp'),
+ eModem = FOUR_CHAR_CODE('edmm'),
+ eMonitorOut = FOUR_CHAR_CODE('ecmn'),
+ eMouse = FOUR_CHAR_CODE('emou'),
+ eNuBusCard = FOUR_CHAR_CODE('ednb'),
+ eNuBus = FOUR_CHAR_CODE('enub'),
+ ePCcard = FOUR_CHAR_CODE('ecpc'),
+ ePCIbus = FOUR_CHAR_CODE('ecpi'),
+ ePCIcard = FOUR_CHAR_CODE('edpi'),
+ ePDSslot = FOUR_CHAR_CODE('ecpd'),
+ ePDScard = FOUR_CHAR_CODE('epds'),
+ ePointingDevice = FOUR_CHAR_CODE('edpd'),
+ ePostScript = FOUR_CHAR_CODE('epps'),
+ ePPP = FOUR_CHAR_CODE('eppp'),
+ ePrinterPort = FOUR_CHAR_CODE('ecpp'),
+ ePrinter = FOUR_CHAR_CODE('edpr'),
+ eSvideo = FOUR_CHAR_CODE('epsv'),
+ eSCSI = FOUR_CHAR_CODE('ecsc'),
+ eSerial = FOUR_CHAR_CODE('epsr'),
+ eSpeakers = FOUR_CHAR_CODE('edsp'),
+ eStorageDevice = FOUR_CHAR_CODE('edst'),
+ eSVGA = FOUR_CHAR_CODE('epsg'),
+ eTokenRing = FOUR_CHAR_CODE('etok'),
+ eTrackball = FOUR_CHAR_CODE('etrk'),
+ eTrackpad = FOUR_CHAR_CODE('edtp'),
+ eUSB = FOUR_CHAR_CODE('ecus'),
+ eVideoIn = FOUR_CHAR_CODE('ecvi'),
+ eVideoMonitor = FOUR_CHAR_CODE('edvm'),
+ eVideoOut = FOUR_CHAR_CODE('ecvo')
+};
+
+enum {
+ /* AppleScript 1.3: Keystroke class */
+ cKeystroke = FOUR_CHAR_CODE('kprs'),
+ pKeystrokeKey = FOUR_CHAR_CODE('kMsg'),
+ pModifiers = FOUR_CHAR_CODE('kMod'),
+ pKeyKind = FOUR_CHAR_CODE('kknd'),
+ eModifiers = FOUR_CHAR_CODE('eMds'),
+ eOptionDown = FOUR_CHAR_CODE('Kopt'),
+ eCommandDown = FOUR_CHAR_CODE('Kcmd'),
+ eControlDown = FOUR_CHAR_CODE('Kctl'),
+ eShiftDown = FOUR_CHAR_CODE('Ksft'),
+ eCapsLockDown = FOUR_CHAR_CODE('Kclk'),
+ eKeyKind = FOUR_CHAR_CODE('ekst'), /* */
+ /* Special keys all start with 'ks' */
+ eEscapeKey = 0x6B733500, /* Third byte is virtual key code byte */
+ eDeleteKey = 0x6B733300, /* (see IM Mac Toolbox Essentials, pp. 2-43) */
+ eTabKey = 0x6B733000,
+ eReturnKey = 0x6B732400,
+ eClearKey = 0x6B734700,
+ eEnterKey = 0x6B734C00,
+ eUpArrowKey = 0x6B737E00,
+ eDownArrowKey = 0x6B737D00,
+ eLeftArrowKey = 0x6B737B00,
+ eRightArrowKey = 0x6B737C00,
+ eHelpKey = 0x6B737200,
+ eHomeKey = 0x6B737300,
+ ePageUpKey = 0x6B737400,
+ ePageDownKey = 0x6B737900,
+ eForwardDelKey = 0x6B737500,
+ eEndKey = 0x6B737700,
+ eF1Key = 0x6B737A00,
+ eF2Key = 0x6B737800,
+ eF3Key = 0x6B736300,
+ eF4Key = 0x6B737600,
+ eF5Key = 0x6B736000,
+ eF6Key = 0x6B736100,
+ eF7Key = 0x6B736200,
+ eF8Key = 0x6B736400,
+ eF9Key = 0x6B736500,
+ eF10Key = 0x6B736D00,
+ eF11Key = 0x6B736700,
+ eF12Key = 0x6B736F00,
+ eF13Key = 0x6B736900,
+ eF14Key = 0x6B736B00,
+ eF15Key = 0x6B737100
+};
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __AEREGISTRY__ */
+
diff --git a/include/qt/AEUserTermTypes.h b/include/qt/AEUserTermTypes.h
new file mode 100644
index 000000000..bb9d23488
--- /dev/null
+++ b/include/qt/AEUserTermTypes.h
@@ -0,0 +1,132 @@
+/*
+ File: AEUserTermTypes.h
+
+ Contains: AppleEvents AEUT resource format Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1991-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __AEUSERTERMTYPES__
+#define __AEUSERTERMTYPES__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ kAEUserTerminology = FOUR_CHAR_CODE('aeut'), /* 0x61657574 */
+ kAETerminologyExtension = FOUR_CHAR_CODE('aete'), /* 0x61657465 */
+ kAEScriptingSizeResource = FOUR_CHAR_CODE('scsz'), /* 0x7363737a */
+ kAEOSAXSizeResource = FOUR_CHAR_CODE('osiz')
+};
+
+enum {
+ kAEUTHasReturningParam = 31, /* if event has a keyASReturning param */
+ kAEUTOptional = 15, /* if something is optional */
+ kAEUTlistOfItems = 14, /* if property or reply is a list. */
+ kAEUTEnumerated = 13, /* if property or reply is of an enumerated type. */
+ kAEUTReadWrite = 12, /* if property is writable. */
+ kAEUTChangesState = 12, /* if an event changes state. */
+ kAEUTTightBindingFunction = 12, /* if this is a tight-binding precedence function. */
+ /* AppleScript 1.3: new bits for reply, direct parameter, parameter, and property flags */
+ kAEUTEnumsAreTypes = 11, /* if the enumeration is a list of types, not constants */
+ kAEUTEnumListIsExclusive = 10, /* if the list of enumerations is a proper set */
+ kAEUTReplyIsReference = 9, /* if the reply is a reference, not a value */
+ kAEUTDirectParamIsReference = 9, /* if the direct parameter is a reference, not a value */
+ kAEUTParamIsReference = 9, /* if the parameter is a reference, not a value */
+ kAEUTPropertyIsReference = 9, /* if the property is a reference, not a value */
+ kAEUTNotDirectParamIsTarget = 8, /* if the direct parameter is not the target of the event */
+ kAEUTParamIsTarget = 8, /* if the parameter is the target of the event */
+ kAEUTApostrophe = 3, /* if a term contains an apostrophe. */
+ kAEUTFeminine = 2, /* if a term is feminine gender. */
+ kAEUTMasculine = 1, /* if a term is masculine gender. */
+ kAEUTPlural = 0 /* if a term is plural. */
+};
+
+
+struct TScriptingSizeResource {
+ short scriptingSizeFlags;
+ unsigned long minStackSize;
+ unsigned long preferredStackSize;
+ unsigned long maxStackSize;
+ unsigned long minHeapSize;
+ unsigned long preferredHeapSize;
+ unsigned long maxHeapSize;
+};
+typedef struct TScriptingSizeResource TScriptingSizeResource;
+enum {
+ kLaunchToGetTerminology = (1 << 15), /* If kLaunchToGetTerminology is 0, 'aete' is read directly from res file. If set to 1, then launch and use 'gdut' to get terminology. */
+ kDontFindAppBySignature = (1 << 14), /* If kDontFindAppBySignature is 0, then find app with signature if lost. If 1, then don't */
+ kAlwaysSendSubject = (1 << 13) /* If kAlwaysSendSubject 0, then send subject when appropriate. If 1, then every event has Subject Attribute */
+};
+
+/* old names for above bits. */
+enum {
+ kReadExtensionTermsMask = (1 << 15)
+};
+
+enum {
+ /* AppleScript 1.3: Bit positions for osiz resource */
+ /* AppleScript 1.3: Bit masks for osiz resources */
+ kOSIZDontOpenResourceFile = 15, /* If set, resource file is not opened when osax is loaded */
+ kOSIZdontAcceptRemoteEvents = 14, /* If set, handler will not be called with events from remote machines */
+ kOSIZOpenWithReadPermission = 13, /* If set, file will be opened with read permission only */
+ kOSIZCodeInSharedLibraries = 11 /* If set, loader will look for handler in shared library, not osax resources */
+};
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __AEUSERTERMTYPES__ */
+
diff --git a/include/qt/AGP.h b/include/qt/AGP.h
new file mode 100644
index 000000000..131c11164
--- /dev/null
+++ b/include/qt/AGP.h
@@ -0,0 +1,175 @@
+/*
+ File: AGP.h
+
+ Contains: API for Accelerated Graphics Port (AGP)
+
+ Version: Technology: 1.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1999-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __AGP__
+#define __AGP__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* AGP related property names*/
+#define kAGPMasterProperty "AGP_Master"
+#define kAGPTargetProperty "AGP_Target"
+#define kAGPAddressRange "AGP_Address_Range"
+#define kAGPAddressBlock "AGP_Address_Block"
+#define kAGPAlignment "AGP_Alignment"
+#define kAGPAllowOverlap "AGP_AllowOverlap"
+#define kAGPMajorRevision "AGP_MajorRevision"
+#define kAGPMinorRevision "AGP_MinorRevision"
+#define kAGPDepth "AGP_Depth"
+#define kAGPSBASupport "AGP_SBA_Support"
+#define AGPTransferType "AGP_Transfer_Type"
+#define kAGPFourGig "AGP_4Gig_Enabled"
+#define kAGPFastWrite "AGP_FastWrite_Enabled"
+#define kAGPEnabled "AGP_Enabled"
+
+
+/* AGP Capabilities Register definitions*/
+enum {
+ /* AGP Register Offsets*/
+ kAGPRevisionOffset = 0x02,
+ kAGPStatusOffset = 0x04,
+ kAGPCommandOffset = 0x08, /* Major/Minor Rev Bits*/
+ kAGPMinorRevMask = 0x0F,
+ kAGPMajorRevMask = 0xF0,
+ kAGPMinorRevBit = 0x00,
+ kAGPMajorRevBit = 0x04, /* AGP Status Register definitions*/
+ kAGPDataRateMask = 0x00000003,
+ kAGPFastWriteMask = 0x00000010,
+ kAGPFourGigAddrMask = 0x00000020,
+ kAGPSideBandAddrMask = 0x00000200,
+ kAGPRequestDepthMask = (long)0xFF000000,
+ kAGPDataRateBit = 0x00,
+ kAGPFastWriteBit = 0x04,
+ kAGPFourGigAddrBit = 0x05,
+ kAGPSideBandAddrBit = 0x09,
+ kAGPRequestDepthBit = 0x18, /* AGP Command Register definitions*/
+ kAGPEnableBit = 0x08,
+ kAGPEnableMask = 0x00000100
+};
+
+/* AGP Speed definitions*/
+enum {
+ kAGPOneX = 1,
+ kAGPTwoX = 2,
+ kAGPFourX = 4
+};
+
+enum {
+ kAGPQueryBaseAddress = 1,
+ kAGPQueryEnabled = 2,
+ kAGPQueryMaxAGPMemory = 3,
+ kAGPQueryFreeAGPMemory = 4,
+ kAGPEnabledStatus = 1,
+ kAGPDisabledStatus = 0
+};
+
+
+struct AGPAddressPair {
+ LogicalAddress systemLogicalAddress;
+ LogicalAddress agpLogicalAddress;
+ UInt32 internalInfo[4];
+};
+typedef struct AGPAddressPair AGPAddressPair;
+
+typedef UInt32 AGPQuery;
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+AGPNewMemory (AGPAddressPair * agpAddressPair,
+ ByteCount byteSize,
+ Boolean clear);
+
+EXTERN_API_C( OSStatus )
+AGPReserveMemory (AGPAddressPair * agpAddressPair,
+ ByteCount byteSize);
+
+EXTERN_API_C( OSStatus )
+AGPDisposeMemory (AGPAddressPair * agpAddress);
+
+EXTERN_API_C( OSStatus )
+AGPReleaseMemory (AGPAddressPair * agpAddress);
+
+EXTERN_API_C( OSStatus )
+AGPCommitMemory (AGPAddressPair * agpAddress,
+ Boolean agpClientManagesCaches);
+
+EXTERN_API_C( OSStatus )
+AGPGetAGPLogicalAddress (AGPAddressPair * agpAddressPair);
+
+EXTERN_API_C( OSStatus )
+AGPGetSystemLogicalAddress (AGPAddressPair * agpAddressPair);
+
+EXTERN_API_C( OSStatus )
+AGPGetStatus (AGPQuery query,
+ void * result);
+
+EXTERN_API_C( OSStatus )
+AGPDecommitMemory (AGPAddressPair * agpAddress);
+
+EXTERN_API_C( OSStatus )
+AGPRestoreCacheState (AGPAddressPair * agpAddress);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __AGP__ */
+
diff --git a/include/qt/AIFF.h b/include/qt/AIFF.h
new file mode 100644
index 000000000..6048053fc
--- /dev/null
+++ b/include/qt/AIFF.h
@@ -0,0 +1,260 @@
+/*
+ File: AIFF.h
+
+ Contains: Definition of AIFF file format components.
+
+ Version: Technology: System 8.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1989-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __AIFF__
+#define __AIFF__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ AIFFID = FOUR_CHAR_CODE('AIFF'),
+ AIFCID = FOUR_CHAR_CODE('AIFC'),
+ FormatVersionID = FOUR_CHAR_CODE('FVER'),
+ CommonID = FOUR_CHAR_CODE('COMM'),
+ FORMID = FOUR_CHAR_CODE('FORM'),
+ SoundDataID = FOUR_CHAR_CODE('SSND'),
+ MarkerID = FOUR_CHAR_CODE('MARK'),
+ InstrumentID = FOUR_CHAR_CODE('INST'),
+ MIDIDataID = FOUR_CHAR_CODE('MIDI'),
+ AudioRecordingID = FOUR_CHAR_CODE('AESD'),
+ ApplicationSpecificID = FOUR_CHAR_CODE('APPL'),
+ CommentID = FOUR_CHAR_CODE('COMT'),
+ NameID = FOUR_CHAR_CODE('NAME'),
+ AuthorID = FOUR_CHAR_CODE('AUTH'),
+ CopyrightID = FOUR_CHAR_CODE('(c) '),
+ AnnotationID = FOUR_CHAR_CODE('ANNO')
+};
+
+enum {
+ NoLooping = 0,
+ ForwardLooping = 1,
+ ForwardBackwardLooping = 2
+};
+
+enum {
+ /* AIFF-C Versions */
+ AIFCVersion1 = (long)0xA2805140
+};
+
+
+
+/* Compression Names */
+#define NoneName "\pnot compressed"
+#define ACE2to1Name "\pACE 2-to-1"
+#define ACE8to3Name "\pACE 8-to-3"
+#define MACE3to1Name "\pMACE 3-to-1"
+#define MACE6to1Name "\pMACE 6-to-1"
+
+enum {
+ /* Compression Types */
+ NoneType = FOUR_CHAR_CODE('NONE'),
+ ACE2Type = FOUR_CHAR_CODE('ACE2'),
+ ACE8Type = FOUR_CHAR_CODE('ACE8'),
+ MACE3Type = FOUR_CHAR_CODE('MAC3'),
+ MACE6Type = FOUR_CHAR_CODE('MAC6')
+};
+
+typedef unsigned long ID;
+typedef short MarkerIdType;
+
+struct ChunkHeader {
+ ID ckID;
+ long ckSize;
+};
+typedef struct ChunkHeader ChunkHeader;
+
+struct ContainerChunk {
+ ID ckID;
+ long ckSize;
+ ID formType;
+};
+typedef struct ContainerChunk ContainerChunk;
+
+struct FormatVersionChunk {
+ ID ckID;
+ long ckSize;
+ unsigned long timestamp;
+};
+typedef struct FormatVersionChunk FormatVersionChunk;
+typedef FormatVersionChunk * FormatVersionChunkPtr;
+
+struct CommonChunk {
+ ID ckID;
+ long ckSize;
+ short numChannels;
+ unsigned long numSampleFrames;
+ short sampleSize;
+ extended80 sampleRate;
+};
+typedef struct CommonChunk CommonChunk;
+typedef CommonChunk * CommonChunkPtr;
+
+struct ExtCommonChunk {
+ ID ckID;
+ long ckSize;
+ short numChannels;
+ unsigned long numSampleFrames;
+ short sampleSize;
+ extended80 sampleRate;
+ ID compressionType;
+ char compressionName[1]; /* variable length array, Pascal string */
+};
+typedef struct ExtCommonChunk ExtCommonChunk;
+typedef ExtCommonChunk * ExtCommonChunkPtr;
+
+struct SoundDataChunk {
+ ID ckID;
+ long ckSize;
+ unsigned long offset;
+ unsigned long blockSize;
+};
+typedef struct SoundDataChunk SoundDataChunk;
+typedef SoundDataChunk * SoundDataChunkPtr;
+
+struct Marker {
+ MarkerIdType id;
+ unsigned long position;
+ Str255 markerName;
+};
+typedef struct Marker Marker;
+
+struct MarkerChunk {
+ ID ckID;
+ long ckSize;
+ unsigned short numMarkers;
+ Marker Markers[1]; /* variable length array */
+};
+typedef struct MarkerChunk MarkerChunk;
+typedef MarkerChunk * MarkerChunkPtr;
+
+struct AIFFLoop {
+ short playMode;
+ MarkerIdType beginLoop;
+ MarkerIdType endLoop;
+};
+typedef struct AIFFLoop AIFFLoop;
+
+struct InstrumentChunk {
+ ID ckID;
+ long ckSize;
+ UInt8 baseFrequency;
+ UInt8 detune;
+ UInt8 lowFrequency;
+ UInt8 highFrequency;
+ UInt8 lowVelocity;
+ UInt8 highVelocity;
+ short gain;
+ AIFFLoop sustainLoop;
+ AIFFLoop releaseLoop;
+};
+typedef struct InstrumentChunk InstrumentChunk;
+typedef InstrumentChunk * InstrumentChunkPtr;
+
+struct MIDIDataChunk {
+ ID ckID;
+ long ckSize;
+ UInt8 MIDIdata[1]; /* variable length array */
+};
+typedef struct MIDIDataChunk MIDIDataChunk;
+typedef MIDIDataChunk * MIDIDataChunkPtr;
+
+struct AudioRecordingChunk {
+ ID ckID;
+ long ckSize;
+ UInt8 AESChannelStatus[24];
+};
+typedef struct AudioRecordingChunk AudioRecordingChunk;
+typedef AudioRecordingChunk * AudioRecordingChunkPtr;
+
+struct ApplicationSpecificChunk {
+ ID ckID;
+ long ckSize;
+ OSType applicationSignature;
+ UInt8 data[1]; /* variable length array */
+};
+typedef struct ApplicationSpecificChunk ApplicationSpecificChunk;
+typedef ApplicationSpecificChunk * ApplicationSpecificChunkPtr;
+
+struct Comment {
+ unsigned long timeStamp;
+ MarkerIdType marker;
+ unsigned short count;
+ char text[1]; /* variable length array, Pascal string */
+};
+typedef struct Comment Comment;
+
+struct CommentsChunk {
+ ID ckID;
+ long ckSize;
+ unsigned short numComments;
+ Comment comments[1]; /* variable length array */
+};
+typedef struct CommentsChunk CommentsChunk;
+typedef CommentsChunk * CommentsChunkPtr;
+
+struct TextChunk {
+ ID ckID;
+ long ckSize;
+ char text[1]; /* variable length array, Pascal string */
+};
+typedef struct TextChunk TextChunk;
+typedef TextChunk * TextChunkPtr;
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __AIFF__ */
+
diff --git a/include/qt/ASDebugging.h b/include/qt/ASDebugging.h
new file mode 100644
index 000000000..0db81bc67
--- /dev/null
+++ b/include/qt/ASDebugging.h
@@ -0,0 +1,228 @@
+/*
+ File: ASDebugging.h
+
+ Contains: AppleScript Debugging Interfaces.
+
+ Version: Technology: AppleScript 1.1
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1992-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __ASDEBUGGING__
+#define __ASDEBUGGING__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+#ifndef __COMPONENTS__
+#include "Components.h"
+#endif
+
+#ifndef __APPLEEVENTS__
+#include "AppleEvents.h"
+#endif
+
+#ifndef __APPLESCRIPT__
+#include "AppleScript.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/**************************************************************************
+ Mode Flags
+**************************************************************************/
+/* This mode flag can be passed to OSASetProperty or OSASetHandler
+ and will prevent properties or handlers from being defined in a context
+ that doesn't already have bindings for them. An error is returned if
+ a current binding doesn't already exist.
+*/
+enum {
+ kOSAModeDontDefine = 0x0001
+};
+
+/**************************************************************************
+ Component Selectors
+**************************************************************************/
+enum {
+ kASSelectSetPropertyObsolete = 0x1101,
+ kASSelectGetPropertyObsolete = 0x1102,
+ kASSelectSetHandlerObsolete = 0x1103,
+ kASSelectGetHandlerObsolete = 0x1104,
+ kASSelectGetAppTerminologyObsolete = 0x1105,
+ kASSelectSetProperty = 0x1106,
+ kASSelectGetProperty = 0x1107,
+ kASSelectSetHandler = 0x1108,
+ kASSelectGetHandler = 0x1109,
+ kASSelectGetAppTerminology = 0x110A,
+ kASSelectGetSysTerminology = 0x110B,
+ kASSelectGetPropertyNames = 0x110C,
+ kASSelectGetHandlerNames = 0x110D
+};
+
+enum {
+ kASSelectFlushTerminology = 0x110E
+};
+
+/**************************************************************************
+ Context Accessors
+**************************************************************************/
+EXTERN_API( OSAError )
+OSASetProperty (ComponentInstance scriptingComponent,
+ long modeFlags,
+ OSAID contextID,
+ const AEDesc * variableName,
+ OSAID scriptValueID) FIVEWORDINLINE(0x2F3C, 0x0010, 0x1106, 0x7000, 0xA82A);
+
+EXTERN_API( OSAError )
+OSAGetProperty (ComponentInstance scriptingComponent,
+ long modeFlags,
+ OSAID contextID,
+ const AEDesc * variableName,
+ OSAID * resultingScriptValueID) FIVEWORDINLINE(0x2F3C, 0x0010, 0x1107, 0x7000, 0xA82A);
+
+EXTERN_API( OSAError )
+OSAGetPropertyNames (ComponentInstance scriptingComponent,
+ long modeFlags,
+ OSAID contextID,
+ AEDescList * resultingPropertyNames) FIVEWORDINLINE(0x2F3C, 0x000C, 0x110C, 0x7000, 0xA82A);
+
+EXTERN_API( OSAError )
+OSASetHandler (ComponentInstance scriptingComponent,
+ long modeFlags,
+ OSAID contextID,
+ const AEDesc * handlerName,
+ OSAID compiledScriptID) FIVEWORDINLINE(0x2F3C, 0x0010, 0x1108, 0x7000, 0xA82A);
+
+EXTERN_API( OSAError )
+OSAGetHandler (ComponentInstance scriptingComponent,
+ long modeFlags,
+ OSAID contextID,
+ const AEDesc * handlerName,
+ OSAID * resultingCompiledScriptID) FIVEWORDINLINE(0x2F3C, 0x0010, 0x1109, 0x7000, 0xA82A);
+
+EXTERN_API( OSAError )
+OSAGetHandlerNames (ComponentInstance scriptingComponent,
+ long modeFlags,
+ OSAID contextID,
+ AEDescList * resultingHandlerNames) FIVEWORDINLINE(0x2F3C, 0x000C, 0x110D, 0x7000, 0xA82A);
+
+EXTERN_API( OSAError )
+OSAGetAppTerminology (ComponentInstance scriptingComponent,
+ long modeFlags,
+ FSSpec * fileSpec,
+ short terminologyID,
+ Boolean * didLaunch,
+ AEDesc * terminologyList) FIVEWORDINLINE(0x2F3C, 0x0012, 0x110A, 0x7000, 0xA82A);
+
+/* Errors:
+ errOSASystemError operation failed
+ */
+EXTERN_API( OSAError )
+OSAGetSysTerminology (ComponentInstance scriptingComponent,
+ long modeFlags,
+ short terminologyID,
+ AEDesc * terminologyList) FIVEWORDINLINE(0x2F3C, 0x000A, 0x110B, 0x7000, 0xA82A);
+
+/* Errors:
+ errOSASystemError operation failed
+ */
+/* Notes on terminology ID
+
+ A terminology ID is derived from script code and language code
+ as follows;
+
+ terminologyID = ((scriptCode & 0x7F) << 8) | (langCode & 0xFF)
+*/
+/**************************************************************************
+ Obsolete versions provided for backward compatibility:
+*/
+EXTERN_API( OSAError )
+ASSetProperty (ComponentInstance scriptingComponent,
+ OSAID contextID,
+ const AEDesc * variableName,
+ OSAID scriptValueID) FIVEWORDINLINE(0x2F3C, 0x000C, 0x1101, 0x7000, 0xA82A);
+
+EXTERN_API( OSAError )
+ASGetProperty (ComponentInstance scriptingComponent,
+ OSAID contextID,
+ const AEDesc * variableName,
+ OSAID * resultingScriptValueID) FIVEWORDINLINE(0x2F3C, 0x000C, 0x1102, 0x7000, 0xA82A);
+
+EXTERN_API( OSAError )
+ASSetHandler (ComponentInstance scriptingComponent,
+ OSAID contextID,
+ const AEDesc * handlerName,
+ OSAID compiledScriptID) FIVEWORDINLINE(0x2F3C, 0x000C, 0x1103, 0x7000, 0xA82A);
+
+EXTERN_API( OSAError )
+ASGetHandler (ComponentInstance scriptingComponent,
+ OSAID contextID,
+ const AEDesc * handlerName,
+ OSAID * resultingCompiledScriptID) FIVEWORDINLINE(0x2F3C, 0x000C, 0x1104, 0x7000, 0xA82A);
+
+EXTERN_API( OSAError )
+ASGetAppTerminology (ComponentInstance scriptingComponent,
+ FSSpec * fileSpec,
+ short terminologID,
+ Boolean * didLaunch,
+ AEDesc * terminologyList) FIVEWORDINLINE(0x2F3C, 0x000E, 0x1105, 0x7000, 0xA82A);
+
+/* Errors:
+ errOSASystemError operation failed
+ */
+/**************************************************************************/
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __ASDEBUGGING__ */
+
diff --git a/include/qt/ASRegistry.h b/include/qt/ASRegistry.h
new file mode 100644
index 000000000..a21c36d18
--- /dev/null
+++ b/include/qt/ASRegistry.h
@@ -0,0 +1,350 @@
+/*
+ File: ASRegistry.h
+
+ Contains: AppleScript Registry constants.
+
+ Version: Technology: AppleScript 1.3
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1991-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __ASREGISTRY__
+#define __ASREGISTRY__
+
+#ifndef __AEREGISTRY__
+#include "AERegistry.h"
+#endif
+
+#ifndef __AEOBJECTS__
+#include "AEObjects.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+
+enum {
+ keyAETarget = FOUR_CHAR_CODE('targ'), /* 0x74617267 */
+ keySubjectAttr = FOUR_CHAR_CODE('subj'), /* 0x7375626a */
+ /* Magic 'returning' parameter: */
+ keyASReturning = FOUR_CHAR_CODE('Krtn'), /* 0x4b72746e */
+ /* AppleScript Specific Codes: */
+ kASAppleScriptSuite = FOUR_CHAR_CODE('ascr'), /* 0x61736372 */
+ kASScriptEditorSuite = FOUR_CHAR_CODE('ToyS'), /* AppleScript 1.3 added from private headers */
+ kASTypeNamesSuite = FOUR_CHAR_CODE('tpnm'), /* 0x74706e6d */
+ /* dynamic terminologies */
+ typeAETE = FOUR_CHAR_CODE('aete'), /* 0x61657465 */
+ typeAEUT = FOUR_CHAR_CODE('aeut'), /* 0x61657574 */
+ kGetAETE = FOUR_CHAR_CODE('gdte'), /* 0x67647465 */
+ kGetAEUT = FOUR_CHAR_CODE('gdut'), /* 0x67647574 */
+ kUpdateAEUT = FOUR_CHAR_CODE('udut'), /* 0x75647574 */
+ kUpdateAETE = FOUR_CHAR_CODE('udte'), /* 0x75647465 */
+ kCleanUpAEUT = FOUR_CHAR_CODE('cdut'), /* 0x63647574 */
+ kASComment = FOUR_CHAR_CODE('cmnt'), /* 0x636d6e74 */
+ kASLaunchEvent = FOUR_CHAR_CODE('noop'), /* 0x6e6f6f70 */
+ keyScszResource = FOUR_CHAR_CODE('scsz'), /* 0x7363737A */
+ typeScszResource = FOUR_CHAR_CODE('scsz'), /* 0x7363737A */
+ /* subroutine calls */
+ kASSubroutineEvent = FOUR_CHAR_CODE('psbr'), /* 0x70736272 */
+ keyASSubroutineName = FOUR_CHAR_CODE('snam'), /* 0x736e616d */
+ kASPrepositionalSubroutine = FOUR_CHAR_CODE('psbr'), /* AppleScript 1.3 added from private headers */
+ keyASPositionalArgs = FOUR_CHAR_CODE('parg') /* AppleScript 1.3 added from private headers */
+};
+
+enum {
+ /* Miscellaneous AppleScript commands */
+ kASStartLogEvent = FOUR_CHAR_CODE('log1'), /* AppleScript 1.3 Script Editor Start Log */
+ kASStopLogEvent = FOUR_CHAR_CODE('log0'), /* AppleScript 1.3 Script Editor Stop Log */
+ kASCommentEvent = FOUR_CHAR_CODE('cmnt') /* AppleScript 1.3 magic "comment" event */
+};
+
+
+/* Operator Events: */
+enum {
+ /* Binary: */
+ kASAdd = FOUR_CHAR_CODE('+ '), /* 0x2b202020 */
+ kASSubtract = FOUR_CHAR_CODE('- '), /* 0x2d202020 */
+ kASMultiply = FOUR_CHAR_CODE('* '), /* 0x2a202020 */
+ kASDivide = FOUR_CHAR_CODE('/ '), /* 0x2f202020 */
+ kASQuotient = FOUR_CHAR_CODE('div '), /* 0x64697620 */
+ kASRemainder = FOUR_CHAR_CODE('mod '), /* 0x6d6f6420 */
+ kASPower = FOUR_CHAR_CODE('^ '), /* 0x5e202020 */
+ kASEqual = kAEEquals,
+ kASNotEqual = FOUR_CHAR_CODE('­ '), /* 0xad202020 */
+ kASGreaterThan = kAEGreaterThan,
+ kASGreaterThanOrEqual = kAEGreaterThanEquals,
+ kASLessThan = kAELessThan,
+ kASLessThanOrEqual = kAELessThanEquals,
+ kASComesBefore = FOUR_CHAR_CODE('cbfr'), /* 0x63626672 */
+ kASComesAfter = FOUR_CHAR_CODE('cafr'), /* 0x63616672 */
+ kASConcatenate = FOUR_CHAR_CODE('ccat'), /* 0x63636174 */
+ kASStartsWith = kAEBeginsWith,
+ kASEndsWith = kAEEndsWith,
+ kASContains = kAEContains
+};
+
+enum {
+ kASAnd = kAEAND,
+ kASOr = kAEOR, /* Unary: */
+ kASNot = kAENOT,
+ kASNegate = FOUR_CHAR_CODE('neg '), /* 0x6e656720 */
+ keyASArg = FOUR_CHAR_CODE('arg ') /* 0x61726720 */
+};
+
+enum {
+ /* event code for the 'error' statement */
+ kASErrorEventCode = FOUR_CHAR_CODE('err '), /* 0x65727220 */
+ kOSAErrorArgs = FOUR_CHAR_CODE('erra'), /* 0x65727261 */
+ keyAEErrorObject = FOUR_CHAR_CODE('erob'), /* Added in AppleScript 1.3 from AppleScript private headers */
+ /* Properties: */
+ pLength = FOUR_CHAR_CODE('leng'), /* 0x6c656e67 */
+ pReverse = FOUR_CHAR_CODE('rvse'), /* 0x72767365 */
+ pRest = FOUR_CHAR_CODE('rest'), /* 0x72657374 */
+ pInherits = FOUR_CHAR_CODE('c@#^'), /* 0x6340235e */
+ pProperties = FOUR_CHAR_CODE('pALL'), /* User-Defined Record Fields: */
+ keyASUserRecordFields = FOUR_CHAR_CODE('usrf'), /* 0x75737266 */
+ typeUserRecordFields = typeAEList
+};
+
+/* Prepositions: */
+enum {
+ keyASPrepositionAt = FOUR_CHAR_CODE('at '), /* 0x61742020 */
+ keyASPrepositionIn = FOUR_CHAR_CODE('in '), /* 0x696e2020 */
+ keyASPrepositionFrom = FOUR_CHAR_CODE('from'), /* 0x66726f6d */
+ keyASPrepositionFor = FOUR_CHAR_CODE('for '), /* 0x666f7220 */
+ keyASPrepositionTo = FOUR_CHAR_CODE('to '), /* 0x746f2020 */
+ keyASPrepositionThru = FOUR_CHAR_CODE('thru'), /* 0x74687275 */
+ keyASPrepositionThrough = FOUR_CHAR_CODE('thgh'), /* 0x74686768 */
+ keyASPrepositionBy = FOUR_CHAR_CODE('by '), /* 0x62792020 */
+ keyASPrepositionOn = FOUR_CHAR_CODE('on '), /* 0x6f6e2020 */
+ keyASPrepositionInto = FOUR_CHAR_CODE('into'), /* 0x696e746f */
+ keyASPrepositionOnto = FOUR_CHAR_CODE('onto'), /* 0x6f6e746f */
+ keyASPrepositionBetween = FOUR_CHAR_CODE('btwn'), /* 0x6274776e */
+ keyASPrepositionAgainst = FOUR_CHAR_CODE('agst'), /* 0x61677374 */
+ keyASPrepositionOutOf = FOUR_CHAR_CODE('outo'), /* 0x6f75746f */
+ keyASPrepositionInsteadOf = FOUR_CHAR_CODE('isto'), /* 0x6973746f */
+ keyASPrepositionAsideFrom = FOUR_CHAR_CODE('asdf'), /* 0x61736466 */
+ keyASPrepositionAround = FOUR_CHAR_CODE('arnd'), /* 0x61726e64 */
+ keyASPrepositionBeside = FOUR_CHAR_CODE('bsid'), /* 0x62736964 */
+ keyASPrepositionBeneath = FOUR_CHAR_CODE('bnth'), /* 0x626e7468 */
+ keyASPrepositionUnder = FOUR_CHAR_CODE('undr') /* 0x756e6472 */
+};
+
+enum {
+ keyASPrepositionOver = FOUR_CHAR_CODE('over'), /* 0x6f766572 */
+ keyASPrepositionAbove = FOUR_CHAR_CODE('abve'), /* 0x61627665 */
+ keyASPrepositionBelow = FOUR_CHAR_CODE('belw'), /* 0x62656c77 */
+ keyASPrepositionApartFrom = FOUR_CHAR_CODE('aprt'), /* 0x61707274 */
+ keyASPrepositionGiven = FOUR_CHAR_CODE('givn'), /* 0x6769766e */
+ keyASPrepositionWith = FOUR_CHAR_CODE('with'), /* 0x77697468 */
+ keyASPrepositionWithout = FOUR_CHAR_CODE('wout'), /* 0x776f7574 */
+ keyASPrepositionAbout = FOUR_CHAR_CODE('abou'), /* 0x61626f75 */
+ keyASPrepositionSince = FOUR_CHAR_CODE('snce'), /* 0x736e6365 */
+ keyASPrepositionUntil = FOUR_CHAR_CODE('till') /* 0x74696c6c */
+};
+
+enum {
+ /* Terminology & Dialect things: */
+ kDialectBundleResType = FOUR_CHAR_CODE('Dbdl'), /* 0x4462646c */
+ /* AppleScript Classes and Enums: */
+ cConstant = typeEnumerated,
+ cClassIdentifier = pClass,
+ cObjectBeingExamined = typeObjectBeingExamined,
+ cList = typeAEList,
+ cSmallReal = typeSMFloat,
+ cReal = typeFloat,
+ cRecord = typeAERecord,
+ cReference = cObjectSpecifier,
+ cUndefined = FOUR_CHAR_CODE('undf'), /* 0x756e6466 */
+ cMissingValue = FOUR_CHAR_CODE('msng'), /* AppleScript 1.3 newly created*/
+ cSymbol = FOUR_CHAR_CODE('symb'), /* 0x73796d62 */
+ cLinkedList = FOUR_CHAR_CODE('llst'), /* 0x6c6c7374 */
+ cVector = FOUR_CHAR_CODE('vect'), /* 0x76656374 */
+ cEventIdentifier = FOUR_CHAR_CODE('evnt'), /* 0x65766e74 */
+ cKeyIdentifier = FOUR_CHAR_CODE('kyid'), /* 0x6b796964 */
+ cUserIdentifier = FOUR_CHAR_CODE('uid '), /* 0x75696420 */
+ cPreposition = FOUR_CHAR_CODE('prep'), /* 0x70726570 */
+ cKeyForm = enumKeyForm,
+ cScript = FOUR_CHAR_CODE('scpt'), /* 0x73637074 */
+ cHandler = FOUR_CHAR_CODE('hand'), /* 0x68616e64 */
+ cProcedure = FOUR_CHAR_CODE('proc') /* 0x70726f63 */
+};
+
+enum {
+ cClosure = FOUR_CHAR_CODE('clsr'), /* 0x636c7372 */
+ cRawData = FOUR_CHAR_CODE('rdat'), /* 0x72646174 */
+ cStringClass = typeChar,
+ cNumber = FOUR_CHAR_CODE('nmbr'), /* 0x6e6d6272 */
+ cListElement = FOUR_CHAR_CODE('celm'), /* AppleScript 1.3 added from private headers */
+ cListOrRecord = FOUR_CHAR_CODE('lr '), /* 0x6c722020 */
+ cListOrString = FOUR_CHAR_CODE('ls '), /* 0x6c732020 */
+ cListRecordOrString = FOUR_CHAR_CODE('lrs '), /* 0x6c727320 */
+ cNumberOrString = FOUR_CHAR_CODE('ns '), /* AppleScript 1.3 for Display Dialog */
+ cNumberOrDateTime = FOUR_CHAR_CODE('nd '), /* 0x6e642020 */
+ cNumberDateTimeOrString = FOUR_CHAR_CODE('nds '), /* 0x6e647320 */
+ cAliasOrString = FOUR_CHAR_CODE('sf '),
+ cSeconds = FOUR_CHAR_CODE('scnd'), /* 0x73636e64 */
+ typeSound = FOUR_CHAR_CODE('snd '),
+ enumBooleanValues = FOUR_CHAR_CODE('boov'), /* Use this instead of typeBoolean to avoid with/without conversion */
+ kAETrue = typeTrue,
+ kAEFalse = typeFalse,
+ enumMiscValues = FOUR_CHAR_CODE('misc'), /* 0x6d697363 */
+ kASCurrentApplication = FOUR_CHAR_CODE('cura'), /* 0x63757261 */
+ /* User-defined property ospecs: */
+ formUserPropertyID = FOUR_CHAR_CODE('usrp') /* 0x75737270 */
+};
+
+enum {
+ cString = cStringClass /* old name for cStringClass - can't be used in .r files*/
+};
+
+enum {
+ /* Global properties: */
+ pASIt = FOUR_CHAR_CODE('it '), /* 0x69742020 */
+ pASMe = FOUR_CHAR_CODE('me '), /* 0x6d652020 */
+ pASResult = FOUR_CHAR_CODE('rslt'), /* 0x72736c74 */
+ pASSpace = FOUR_CHAR_CODE('spac'), /* 0x73706163 */
+ pASReturn = FOUR_CHAR_CODE('ret '), /* 0x72657420 */
+ pASTab = FOUR_CHAR_CODE('tab '), /* 0x74616220 */
+ pASPi = FOUR_CHAR_CODE('pi '), /* 0x70692020 */
+ pASParent = FOUR_CHAR_CODE('pare'), /* 0x70617265 */
+ kASInitializeEventCode = FOUR_CHAR_CODE('init'), /* 0x696e6974 */
+ pASPrintLength = FOUR_CHAR_CODE('prln'), /* 0x70726c6e */
+ pASPrintDepth = FOUR_CHAR_CODE('prdp'), /* 0x70726470 */
+ pASTopLevelScript = FOUR_CHAR_CODE('ascr') /* 0x61736372 */
+};
+
+enum {
+ /* Considerations */
+ kAECase = FOUR_CHAR_CODE('case'), /* 0x63617365 */
+ kAEDiacritic = FOUR_CHAR_CODE('diac'), /* 0x64696163 */
+ kAEWhiteSpace = FOUR_CHAR_CODE('whit'), /* 0x77686974 */
+ kAEHyphens = FOUR_CHAR_CODE('hyph'), /* 0x68797068 */
+ kAEExpansion = FOUR_CHAR_CODE('expa'), /* 0x65787061 */
+ kAEPunctuation = FOUR_CHAR_CODE('punc'), /* 0x70756e63 */
+ kAEZenkakuHankaku = FOUR_CHAR_CODE('zkhk'), /* 0x7a6b686b */
+ kAESmallKana = FOUR_CHAR_CODE('skna'), /* 0x736b6e61 */
+ kAEKataHiragana = FOUR_CHAR_CODE('hika'), /* 0x68696b61 */
+ /* AppleScript considerations: */
+ kASConsiderReplies = FOUR_CHAR_CODE('rmte'), /* 0x726d7465 */
+ enumConsiderations = FOUR_CHAR_CODE('cons') /* 0x636f6e73 */
+};
+
+enum {
+ cCoercion = FOUR_CHAR_CODE('coec'), /* 0x636f6563 */
+ cCoerceUpperCase = FOUR_CHAR_CODE('txup'), /* 0x74787570 */
+ cCoerceLowerCase = FOUR_CHAR_CODE('txlo'), /* 0x74786c6f */
+ cCoerceRemoveDiacriticals = FOUR_CHAR_CODE('txdc'), /* 0x74786463 */
+ cCoerceRemovePunctuation = FOUR_CHAR_CODE('txpc'), /* 0x74787063 */
+ cCoerceRemoveHyphens = FOUR_CHAR_CODE('txhy'), /* 0x74786879 */
+ cCoerceOneByteToTwoByte = FOUR_CHAR_CODE('txex'), /* 0x74786578 */
+ cCoerceRemoveWhiteSpace = FOUR_CHAR_CODE('txws'), /* 0x74787773 */
+ cCoerceSmallKana = FOUR_CHAR_CODE('txsk'), /* 0x7478736b */
+ cCoerceZenkakuhankaku = FOUR_CHAR_CODE('txze'), /* 0x74787a65 */
+ cCoerceKataHiragana = FOUR_CHAR_CODE('txkh'), /* 0x74786b68 */
+ /* Lorax things: */
+ cZone = FOUR_CHAR_CODE('zone'), /* 0x7a6f6e65 */
+ cMachine = FOUR_CHAR_CODE('mach'), /* 0x6d616368 */
+ cAddress = FOUR_CHAR_CODE('addr'), /* 0x61646472 */
+ cRunningAddress = FOUR_CHAR_CODE('radd'), /* 0x72616464 */
+ cStorage = FOUR_CHAR_CODE('stor') /* 0x73746f72 */
+};
+
+enum {
+ /* DateTime things: */
+ pASWeekday = FOUR_CHAR_CODE('wkdy'), /* 0x776b6479 */
+ pASMonth = FOUR_CHAR_CODE('mnth'), /* 0x6d6e7468 */
+ pASDay = FOUR_CHAR_CODE('day '), /* 0x64617920 */
+ pASYear = FOUR_CHAR_CODE('year'), /* 0x79656172 */
+ pASTime = FOUR_CHAR_CODE('time'), /* 0x74696d65 */
+ pASDateString = FOUR_CHAR_CODE('dstr'), /* 0x64737472 */
+ pASTimeString = FOUR_CHAR_CODE('tstr'), /* 0x74737472 */
+ /* Months */
+ cMonth = pASMonth,
+ cJanuary = FOUR_CHAR_CODE('jan '), /* 0x6a616e20 */
+ cFebruary = FOUR_CHAR_CODE('feb '), /* 0x66656220 */
+ cMarch = FOUR_CHAR_CODE('mar '), /* 0x6d617220 */
+ cApril = FOUR_CHAR_CODE('apr '), /* 0x61707220 */
+ cMay = FOUR_CHAR_CODE('may '), /* 0x6d617920 */
+ cJune = FOUR_CHAR_CODE('jun '), /* 0x6a756e20 */
+ cJuly = FOUR_CHAR_CODE('jul '), /* 0x6a756c20 */
+ cAugust = FOUR_CHAR_CODE('aug '), /* 0x61756720 */
+ cSeptember = FOUR_CHAR_CODE('sep '), /* 0x73657020 */
+ cOctober = FOUR_CHAR_CODE('oct '), /* 0x6f637420 */
+ cNovember = FOUR_CHAR_CODE('nov '), /* 0x6e6f7620 */
+ cDecember = FOUR_CHAR_CODE('dec ') /* 0x64656320 */
+};
+
+enum {
+ /* Weekdays */
+ cWeekday = pASWeekday,
+ cSunday = FOUR_CHAR_CODE('sun '), /* 0x73756e20 */
+ cMonday = FOUR_CHAR_CODE('mon '), /* 0x6d6f6e20 */
+ cTuesday = FOUR_CHAR_CODE('tue '), /* 0x74756520 */
+ cWednesday = FOUR_CHAR_CODE('wed '), /* 0x77656420 */
+ cThursday = FOUR_CHAR_CODE('thu '), /* 0x74687520 */
+ cFriday = FOUR_CHAR_CODE('fri '), /* 0x66726920 */
+ cSaturday = FOUR_CHAR_CODE('sat '), /* 0x73617420 */
+ /* AS 1.1 Globals: */
+ pASQuote = FOUR_CHAR_CODE('quot'), /* 0x71756f74 */
+ pASSeconds = FOUR_CHAR_CODE('secs'), /* 0x73656373 */
+ pASMinutes = FOUR_CHAR_CODE('min '), /* 0x6d696e20 */
+ pASHours = FOUR_CHAR_CODE('hour'), /* 0x686f7572 */
+ pASDays = FOUR_CHAR_CODE('days'), /* 0x64617973 */
+ pASWeeks = FOUR_CHAR_CODE('week'), /* 0x7765656b */
+ /* Writing Code things: */
+ cWritingCodeInfo = FOUR_CHAR_CODE('citl'), /* 0x6369746c */
+ pScriptCode = FOUR_CHAR_CODE('pscd'), /* 0x70736364 */
+ pLangCode = FOUR_CHAR_CODE('plcd'), /* 0x706c6364 */
+ /* Magic Tell and End Tell events for logging: */
+ kASMagicTellEvent = FOUR_CHAR_CODE('tell'), /* 0x74656c6c */
+ kASMagicEndTellEvent = FOUR_CHAR_CODE('tend') /* 0x74656e64 */
+};
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __ASREGISTRY__ */
+
diff --git a/include/qt/ATA.h b/include/qt/ATA.h
new file mode 100644
index 000000000..8ca77a687
--- /dev/null
+++ b/include/qt/ATA.h
@@ -0,0 +1,1124 @@
+/*
+ File: ATA.h
+
+ Contains: ATA (PC/AT Attachment) Interfaces
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __ATA__
+#define __ATA__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+
+/* This is the structure used for the AT Interface core routines below */
+enum {
+ kATATrap = 0xAAF1, /* Manager trap number <This should be defined in Traps.h>*/
+ kATAPBVers1 = 0x01, /* parameter block version number 1*/
+ kATAPBVers2 = 0x02, /* parameter block version number for structures*/
+ kATAPBVers3 = 0x03, /* parameter block version for ATA times*/
+ kATADefaultBlockSize = 512 /* default block size*/
+};
+
+/* Used to determine the presence of traps*/
+enum {
+ kFSMTrap = 0xAC,
+ mDQEChanged = 1 /* DQE has changed */
+};
+
+/* Task file definition ooo Error Register ooo*/
+enum {
+ bATABadBlock = 7, /* bit number of bad block error bit*/
+ bATAUncorrectable = 6, /* bit number of uncorrectable error bit*/
+ bATAMediaChanged = 5, /* bit number of media changed indicator*/
+ bATAIDNotFound = 4, /* bit number of ID not found error bit*/
+ bATAMediaChangeReq = 3, /* bit number of media changed request*/
+ bATACommandAborted = 2, /* bit number of command abort bit*/
+ bATATrack0NotFound = 1, /* bit number of track not found*/
+ bATAAddressNotFound = 0, /* bit number of address mark not found*/
+ mATABadBlock = 1 << bATABadBlock, /* Bad Block Detected*/
+ mATAUncorrectable = 1 << bATAUncorrectable, /* Uncorrectable Data Error*/
+ mATAMediaChanged = 1 << bATAMediaChanged, /* Media Changed Indicator (for removable)*/
+ mATAIDNotFound = 1 << bATAIDNotFound, /* ID Not Found*/
+ mATAMediaChangeReq = 1 << bATAMediaChangeReq, /* Media Change Requested (NOT IMPLEMENTED)*/
+ mATACommandAborted = 1 << bATACommandAborted, /* Aborted Command*/
+ mATATrack0NotFound = 1 << bATATrack0NotFound, /* Track 0 Not Found*/
+ mATAAddressNotFound = 1 << bATAAddressNotFound /* Address Mark Not Found*/
+};
+
+/* Task file definition ooo Features register ooo*/
+enum {
+ bATAPIuseDMA = 0, /* bit number of useDMA bit (ATAPI)*/
+ mATAPIuseDMA = 1 << bATAPIuseDMA
+};
+
+/* Task file definition ooo ataTFSDH Register ooo*/
+enum {
+ mATAHeadNumber = 0x0F, /* Head Number (bits 0-3) */
+ mATASectorSize = 0xA0, /* bit 7=1; bit 5 = 01 (512 sector size) <DP4>*/
+ mATADriveSelect = 0x10, /* Drive (0 = master, 1 = slave) */
+ mATALBASelect = 0x40 /* LBA mode bit (0 = chs, 1 = LBA)*/
+};
+
+/* Task file definition ooo Status Register ooo*/
+enum {
+ bATABusy = 7, /* bit number of BSY bit*/
+ bATADriveReady = 6, /* bit number of drive ready bit*/
+ bATAWriteFault = 5, /* bit number of write fault bit*/
+ bATASeekComplete = 4, /* bit number of seek complete bit*/
+ bATADataRequest = 3, /* bit number of data request bit*/
+ bATADataCorrected = 2, /* bit number of data corrected bit*/
+ bATAIndex = 1, /* bit number of index mark*/
+ bATAError = 0, /* bit number of error bit*/
+ mATABusy = 1 << bATABusy, /* Unit is busy*/
+ mATADriveReady = 1 << bATADriveReady, /* Unit is ready*/
+ mATAWriteFault = 1 << bATAWriteFault, /* Unit has a write fault condition*/
+ mATASeekComplete = 1 << bATASeekComplete, /* Unit seek complete*/
+ mATADataRequest = 1 << bATADataRequest, /* Unit data request*/
+ mATADataCorrected = 1 << bATADataCorrected, /* Data corrected*/
+ mATAIndex = 1 << bATAIndex, /* Index mark - NOT USED*/
+ mATAError = 1 << bATAError /* Error condition - see error register*/
+};
+
+/* Task file definition ooo Device Control Register ooo*/
+enum {
+ bATADCROne = 3, /* bit number of always one bit*/
+ bATADCRReset = 2, /* bit number of reset bit*/
+ bATADCRnIntEnable = 1, /* bit number of interrupt disable*/
+ mATADCROne = 1 << bATADCROne, /* always one bit*/
+ mATADCRReset = 1 << bATADCRReset, /* Reset (1 = reset)*/
+ mATADCRnIntEnable = 1 << bATADCRnIntEnable /* Interrupt Disable(0 = enabled)*/
+};
+
+/* ATA Command Opcode definition*/
+enum {
+ kATAcmdWORetry = 0x01, /* Without I/O retry option*/
+ kATAcmdNOP = 0x0000, /* NOP operation - media detect*/
+ kATAcmdRecal = 0x0010, /* Recalibrate command */
+ kATAcmdRead = 0x0020, /* Read command */
+ kATAcmdReadLong = 0x0022, /* Read Long command*/
+ kATAcmdWrite = 0x0030, /* Write command */
+ kATAcmdWriteLong = 0x0032, /* Write Long*/
+ kATAcmdWriteVerify = 0x003C, /* Write verify*/
+ kATAcmdReadVerify = 0x0040, /* Read Verify command */
+ kATAcmdFormatTrack = 0x0050, /* Format Track command */
+ kATAcmdSeek = 0x0070, /* Seek command */
+ kATAcmdDiagnostic = 0x0090, /* Drive Diagnostic command */
+ kATAcmdInitDrive = 0x0091, /* Init drive parameters command */
+ kATAcmdReadMultiple = 0x00C4, /* Read multiple*/
+ kATAcmdWriteMultiple = 0x00C5, /* Write multiple*/
+ kATAcmdSetRWMultiple = 0x00C6, /* Set Multiple for Read/Write Multiple*/
+ kATAcmdReadDMA = 0x00C8, /* Read DMA (with retries)*/
+ kATAcmdWriteDMA = 0x00CA, /* Write DMA (with retries)*/
+ kATAcmdMCAcknowledge = 0x00DB, /* Acknowledge media change - removable*/
+ kATAcmdDoorLock = 0x00DE, /* Door lock*/
+ kATAcmdDoorUnlock = 0x00DF, /* Door unlock*/
+ kATAcmdStandbyImmed = 0x00E0, /* Standby Immediate*/
+ kATAcmdIdleImmed = 0x00E1, /* Idle Immediate*/
+ kATAcmdStandby = 0x00E2, /* Standby*/
+ kATAcmdIdle = 0x00E3, /* Idle*/
+ kATAcmdReadBuffer = 0x00E4, /* Read sector buffer command */
+ kATAcmdCheckPowerMode = 0x00E5, /* Check power mode command <04/04/94>*/
+ kATAcmdSleep = 0x00E6, /* Sleep*/
+ kATAcmdWriteBuffer = 0x00E8, /* Write sector buffer command */
+ kATAcmdWriteSame = 0x00E9, /* Write same data to multiple sectors*/
+ kATAcmdDriveIdentify = 0x00EC, /* Identify Drive command */
+ kATAcmdMediaEject = 0x00ED, /* Media Eject*/
+ kATAcmdSetFeatures = 0x00EF /* Set Features*/
+};
+
+/* Set feature command opcodes*/
+enum {
+ kATAEnableWriteCache = 0x02, /* Enable write cache*/
+ kATASetTransferMode = 0x03, /* Set transfer mode*/
+ kATASetPIOMode = 0x08, /* PIO Flow Control Tx Mode bit*/
+ kATAEnableECC = 0x88, /* ECC enable*/
+ kATAEnableRetry = 0x99, /* Retry enable*/
+ kATAEnableReadAhead = 0xAA /* Read look-ahead enable*/
+};
+
+/*
+ --------------------------------------------------------------------------------
+ enums for dealing with device IDs
+*/
+
+enum {
+ kATABusIDMask = 0x000000FF,
+ kATADeviceIDMask = 0x0000FF00,
+ kATADeviceIDClippingMask = 0x0000FFFF,
+ kMinBusID = 0x00000000,
+ kMaxBusID = 0x000000FE
+};
+
+enum {
+ kATAStartIterateDeviceID = 0xFFFF,
+ kATAEndIterateDeviceID = 0xFF
+};
+
+/*--------------------------------------------------------------------------------*/
+/* Device Register Images (8 bytes) */
+
+struct ataTaskFile {
+ UInt8 ataTFFeatures; /* <-> Error(R) or ataTFFeatures(W) register image */
+ UInt8 ataTFCount; /* <-> Sector count/remaining */
+ UInt8 ataTFSector; /* <-> Sector start/finish */
+ UInt8 ataTFReserved; /* reserved */
+ UInt16 ataTFCylinder; /* <-> ataTFCylinder (Big endian) */
+ UInt8 ataTFSDH; /* <-> ataTFSDH register image*/
+ UInt8 ataTFCommand; /* <-> Status(R) or Command(W) register image */
+};
+typedef struct ataTaskFile ataTaskFile;
+/* ATA Manager Function Code Definition*/
+enum {
+ kATAMgrNOP = 0x00, /* No Operation*/
+ kATAMgrExecIO = 0x01, /* Execute ATA I/O*/
+ kATAMgrBusInquiry = 0x03, /* Bus Inquiry*/
+ kATAMgrQRelease = 0x04, /* I/O Queue Release*/
+ kATAMgrAbort = 0x10, /* Abort command*/
+ kATAMgrBusReset = 0x11, /* Reset ATA bus*/
+ kATAMgrRegAccess = 0x12, /* Register Access*/
+ kATAMgrDriveIdentify = 0x13, /* Drive Identify <DP03/10/94>*/
+ kATAMgrDriverLoad = 0x82, /* Load driver from either Media, ROM, etc.*/
+ kATAMgrDriveRegister = 0x85, /* Register a driver <4/18/94>*/
+ kATAMgrFindDriverRefnum = 0x86, /* lookup a driver refnum <4/18/94>*/
+ kATAMgrRemoveDriverRefnum = 0x87, /* De-register a driver <4/18/94>*/
+ kATAMgrModifyEventMask = 0x88, /* Modify driver event mask*/
+ kATAMgrDriveEject = 0x89, /* Eject the drive <8/1/94>*/
+ kATAMgrGetDrvConfiguration = 0x8A, /* Get device configuration <8/6/94>*/
+ kATAMgrSetDrvConfiguration = 0x8B, /* Set device configuration <8/6/94>*/
+ kATAMgrGetLocationIcon = 0x8C, /* Get card location icon <SM4>*/
+ kATAMgrManagerInquiry = 0x90, /* Manager Inquiry*/
+ kATAMgrManagerInit = 0x91, /* Manager initialization*/
+ kATAMgrManagerShutdown = 0x92, /* Manager ShutDown*/
+ /* note: functions 0x93 to 0x97 are reserved*/
+ kATAMgrFindSpecialDriverRefnum = 0x98, /* lookup a driver refnum; driverloader,notify-all or ROM driver.*/
+ kATAMgrNextAvailable = 0x99
+};
+
+/* used in the ataDrvrFlags field for kATAMgrDriveRegister,kATAMgrRemoveDriverRefnum & kATAMgrFindSpecialDriverRefnum*/
+enum {
+ kATANotifyAllDriver = 0, /* Notify-All driver*/
+ kATADriverLoader = 1, /* Driver loader driver */
+ kATAROMDriver = 2 /* ROM driver*/
+};
+
+/* 'ATAFlags' field of the PB header definition*/
+enum {
+ bATAFlagUseConfigSpeed = 15, /* bit number of use default speed flag*/
+ bATAFlagByteSwap = 14, /* bit number of byte swap flag*/
+ bATAFlagIORead = 13, /* bit number of I/O read flag*/
+ bATAFlagIOWrite = 12, /* bit number of I/O write flag*/
+ bATAFlagImmediate = 11, /* bit number of immediate flag*/
+ bATAFlagQLock = 10, /* bit number of que lock on error*/
+ bATAFlagReserved1 = 9, /* reserved*/
+ bATAFlagUseScatterGather = 8, /* bit numbers of scatter gather*/
+ bATAFlagUseDMA = 7, /* bit number of use DMA flag*/
+ bATAFlagProtocolATAPI = 5, /* bit number of ATAPI protocol*/
+ bATAFlagReserved2 = 4, /* reserved*/
+ bATAFlagTFRead = 3, /* bit number of register update*/
+ bATAFlagLEDEnable = 0, /* bit number of LED enable*/
+ mATAFlagUseConfigSpeed = 1 << bATAFlagUseConfigSpeed,
+ mATAFlagByteSwap = 1 << bATAFlagByteSwap, /* Swap data bytes (read - after; write - before)*/
+ mATAFlagIORead = 1 << bATAFlagIORead, /* Read (in) operation*/
+ mATAFlagIOWrite = 1 << bATAFlagIOWrite, /* Write (out) operation*/
+ mATAFlagImmediate = 1 << bATAFlagImmediate, /* Head of Que; Immediate operation*/
+ mATAFlagQLock = 1 << bATAFlagQLock, /* Manager queue lock on error (freeze the queue)*/
+ mATAFlagUseScatterGather = 1 << bATAFlagUseScatterGather, /* Scatter gather enable*/
+ mATAFlagUseDMA = 1 << bATAFlagUseDMA,
+ mATAFlagProtocolATAPI = 1 << bATAFlagProtocolATAPI, /* ATAPI protocol indicator*/
+ mATAFlagTFRead = 1 << bATAFlagTFRead, /* update reg block request upon detection of an error*/
+ mATAFlagLEDEnable = 1 << bATAFlagLEDEnable /* socket LED enable*/
+};
+
+/* These are legacy ATAFlags definitions, which will go away in the future*/
+enum {
+ bATAFlagScatterGather1 = bATAFlagReserved1, /* 9*/
+ bATAFlagScatterGather0 = bATAFlagUseScatterGather, /* 8*/
+ bATAFlagProtocol1 = bATAFlagProtocolATAPI, /* 5*/
+ bATAFlagProtocol0 = bATAFlagReserved2, /* 4*/
+ mATAFlagScatterGather1 = 1 << bATAFlagScatterGather1,
+ mATAFlagScatterGather0 = mATAFlagUseScatterGather,
+ mATAFlagScatterGathers = mATAFlagScatterGather1 + mATAFlagScatterGather0,
+ mATAFlagProtocol1 = mATAFlagProtocolATAPI,
+ mATAFlagProtocol0 = 1 << bATAFlagProtocol0,
+ mATAFlagProtocols = mATAFlagProtocol1 + mATAFlagProtocol0
+};
+
+
+typedef CALLBACK_API( void , ATACallbackProcPtr )(void *ataPB);
+typedef STACK_UPP_TYPE(ATACallbackProcPtr) ATACallbackUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(ATACallbackUPP)
+ NewATACallbackUPP (ATACallbackProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeATACallbackUPP (ATACallbackUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeATACallbackUPP (void * ataPB,
+ ATACallbackUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppATACallbackProcInfo = 0x000000C0 }; /* pascal no_return_value Func(4_bytes) */
+ #define NewATACallbackUPP(userRoutine) (ATACallbackUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppATACallbackProcInfo, GetCurrentArchitecture())
+ #define DisposeATACallbackUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeATACallbackUPP(ataPB, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppATACallbackProcInfo, (ataPB))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewATACallbackProc(userRoutine) NewATACallbackUPP(userRoutine)
+#define CallATACallbackProc(userRoutine, ataPB) InvokeATACallbackUPP(ataPB, userRoutine)
+/*
+
+ structure which defines the ATA bus/device ID, part of the Device 0/1 Software Guide
+ see <http://developer.apple.com/techpubs/hardware/Developer_Notes/System_Software/ATA_Device_Zero_One.pdf>
+ p 19 : Although ataPBDeviceID remains defined as a 32-bit number, drivers and applications
+ can typecast it to the ataDeviceID structure to determine the bus number and device number
+ for a specific ATA or ATAPI device
+*/
+
+struct ataDeviceID {
+ UInt16 Reserved; /* The upperword is reserved (0)*/
+ UInt8 devNum; /* device number (0 or 1)*/
+ UInt8 busNum; /* bus number*/
+};
+typedef struct ataDeviceID ataDeviceID;
+
+struct ataPBHeader {
+ /* Start of cloned common header ataPBHdr */
+ struct ataPBHeader * ataPBLink; /* a pointer to the next entry in the queue */
+ UInt16 ataPBQType; /* type byte for safety check*/
+ UInt8 ataPBVers; /* -->: parameter block version number*/
+ UInt8 ataPBReserved; /* Reserved */
+ Ptr ataPBReserved2; /* Reserved */
+ ATACallbackUPP ataPBCallbackPtr; /* -->: Completion Routine Pointer*/
+ OSErr ataPBResult; /* <--: Returned result */
+ UInt8 ataPBFunctionCode; /* -->: Manager Function Code */
+ UInt8 ataPBIOSpeed; /* -->: I/O Timing Class */
+ UInt16 ataPBFlags; /* -->: Various control options */
+ SInt16 ataPBReserved3; /* Reserved */
+ UInt32 ataPBDeviceID; /* -->: Device identifier (see ataDeviceID) */
+ UInt32 ataPBTimeOut; /* -->: Transaction timeout value in msec */
+ Ptr ataPBClientPtr1; /* Client's storage Ptr 1 */
+ Ptr ataPBClientPtr2; /* Client's storage Ptr 2 */
+ UInt16 ataPBState; /* Reserved for Manager; Initialize to 0 */
+ UInt16 ataPBSemaphores; /* Used internally by the manager*/
+ SInt32 ataPBReserved4; /* Reserved */
+ /* End of cloned common header ataPBHdr*/
+};
+typedef struct ataPBHeader ataPBHeader;
+/* data request entry structure (16 bytes)*/
+
+struct IOBlock {
+ UInt8 * ataPBBuffer; /* -->: Data buffer pointer*/
+ UInt32 ataPBByteCount; /* -->: Data transfer length in bytes*/
+};
+typedef struct IOBlock IOBlock;
+/*
+ For ATAPI devices the ExtendedPB field is a pointer to the Command Packet
+ record which exists of an array of words structured as follows... <06/15/94>
+*/
+
+struct ATAPICmdPacket {
+ SInt16 atapiPacketSize; /* Size of command packet in bytes <06/15/94>*/
+ SInt16 atapiCommandByte[8]; /* The command packet itself <06/15/94>*/
+};
+typedef struct ATAPICmdPacket ATAPICmdPacket;
+/* Manager parameter block structure (96 bytes)*/
+
+struct ataIOPB {
+ /* Start of cloned common header ataPBHdr*/
+ ataPBHeader * ataPBLink; /* a pointer to the next entry in the queue */
+ UInt16 ataPBQType; /* type byte for safety check*/
+ UInt8 ataPBVers; /* -->: parameter block version number; Must be 0x01*/
+ UInt8 ataPBReserved; /* Reserved */
+ Ptr ataPBReserved2; /* Reserved */
+ ATACallbackUPP ataPBCallbackPtr; /* -->: Completion Routine Pointer*/
+ OSErr ataPBResult; /* <--: Returned result */
+ UInt8 ataPBFunctionCode; /* -->: Manager Function Code */
+ UInt8 ataPBIOSpeed; /* -->: I/O Timing Class */
+ UInt16 ataPBFlags; /* -->: Various control options */
+ SInt16 ataPBReserved3; /* Reserved */
+ UInt32 ataPBDeviceID; /* -->: Device identifier (see ataDeviceID) */
+ UInt32 ataPBTimeOut; /* -->: Transaction timeout value in msec */
+ Ptr ataPBClientPtr1; /* Client's storage Ptr 1 */
+ Ptr ataPBClientPtr2; /* Client's storage Ptr 2 */
+ UInt16 ataPBState; /* Reserved for Manager; Initialize to 0 */
+ UInt16 ataPBSemaphores; /* Used internally by the manager*/
+ SInt32 ataPBReserved4; /* Reserved */
+ /* End of cloned common header ataPBHdr*/
+ SInt8 ataPBStatusRegister; /* <--: Last ATA status image*/
+ SInt8 ataPBErrorRegister; /* <--: Last ATA error image-valid if lsb of Status set*/
+ SInt16 ataPBReserved5; /* Reserved*/
+ UInt32 ataPBLogicalBlockSize; /* -->: Blind transfer size per interrupt (Logical block size)*/
+ UInt8 * ataPBBuffer; /* -->: Data buffer pointer*/
+ UInt32 ataPBByteCount; /* -->: Data transfer length in bytes*/
+ UInt32 ataPBActualTxCount; /* <--: Actual transfer count*/
+ UInt32 ataPBReserved6; /* Reserved*/
+ ataTaskFile ataPBTaskFile; /* <->: Device register images*/
+ ATAPICmdPacket * ataPBPacketPtr; /* -->: ATAPI packet command block pointer (valid with ATAPI bit set)*/
+ SInt16 ataPBReserved7[6]; /* Reserved for future expansion*/
+};
+typedef struct ataIOPB ataIOPB;
+/* Parameter block structure for bus and Manager inquiry command*/
+/* Manager parameter block structure*/
+
+struct ataBusInquiry {
+ /* Start of cloned common header ataPBHdr*/
+ ataPBHeader * ataPBLink; /* a pointer to the next entry in the queue */
+ UInt16 ataPBQType; /* type byte for safety check*/
+ UInt8 ataPBVers; /* -->: parameter block version number; Must be 0x01*/
+ UInt8 ataPBReserved; /* Reserved */
+ Ptr ataPBReserved2; /* Reserved */
+ ATACallbackUPP ataPBCallbackPtr; /* -->: Completion Routine Pointer*/
+ OSErr ataPBResult; /* <--: Returned result */
+ UInt8 ataPBFunctionCode; /* -->: Manager Function Code */
+ UInt8 ataPBIOSpeed; /* -->: I/O Timing Class */
+ UInt16 ataPBFlags; /* -->: Various control options */
+ SInt16 ataPBReserved3; /* Reserved */
+ UInt32 ataPBDeviceID; /* -->: Device identifier (see ataDeviceID) */
+ UInt32 ataPBTimeOut; /* -->: Transaction timeout value in msec */
+ Ptr ataPBClientPtr1; /* Client's storage Ptr 1 */
+ Ptr ataPBClientPtr2; /* Client's storage Ptr 2 */
+ UInt16 ataPBState; /* Reserved for Manager; Initialize to 0 */
+ UInt16 ataPBSemaphores; /* Used internally by the manager*/
+ SInt32 ataPBReserved4; /* Reserved */
+ /* End of cloned common header ataPBHdr*/
+ UInt16 ataEngineCount; /* <--: TBD; zero for now*/
+ UInt16 ataReserved1; /* Reserved*/
+ UInt32 ataDataTypes; /* <--: TBD; zero for now*/
+ UInt16 ataIOpbSize; /* <--: Size of ATA IO PB*/
+ UInt16 ataMaxIOpbSize; /* <--: TBD; zero for now*/
+ UInt32 ataFeatureFlags; /* <--: TBD*/
+ UInt8 ataVersionNum; /* <--: Version number for the HBA*/
+ UInt8 ataHBAInquiry; /* <--: TBD; zero for now*/
+ UInt16 ataReserved2; /* Reserved*/
+ UInt32 ataHBAPrivPtr; /* <--: Ptr to HBA private data area*/
+ UInt32 ataHBAPrivSize; /* <--: Size of HBA private data area*/
+ UInt32 ataAsyncFlags; /* <--: Event capability for callback*/
+ UInt8 ataPIOModes; /* <--: PIO modes supported (bit-significant)*/
+ UInt8 ataUltraDMAModes; /* <--: Ultra DMA modes supported (b-sig)*/
+ UInt8 ataSingleDMAModes; /* <--: Single Word DMA modes supported (b-sig) */
+ UInt8 ataMultiDMAModes; /* <--: Multiword DMA modes supported (b-sig)*/
+ UInt32 ataReserved4[4]; /* Reserved*/
+ SInt8 ataReserved5[16]; /* TBD*/
+ SInt8 ataHBAVendor[16]; /* <--: Vendor ID of the HBA*/
+ SInt8 ataContrlFamily[16]; /* <--: Family of ATA Controller*/
+ SInt8 ataContrlType[16]; /* <--: Model number of controller*/
+ SInt8 ataXPTversion[4]; /* <--: version number of XPT*/
+ SInt8 ataReserved6[4]; /* Reserved*/
+ NumVersion ataHBAversion; /* <--: version number of HBA*/
+ UInt8 ataHBAslotType; /* <--: type of slot*/
+ UInt8 ataHBAslotNum; /* <--: slot number of the HBA*/
+ UInt16 ataReserved7; /* Reserved*/
+ UInt32 ataReserved8; /* Reserved*/
+};
+typedef struct ataBusInquiry ataBusInquiry;
+/* Manager parameter block structure*/
+
+struct ataMgrInquiry {
+ /* Start of cloned common header ataPBHdr*/
+ ataPBHeader * ataPBLink; /* a pointer to the next entry in the queue */
+ UInt16 ataPBQType; /* type byte for safety check*/
+ UInt8 ataPBVers; /* -->: parameter block version number; Must be 0x01*/
+ UInt8 ataPBReserved; /* Reserved */
+ Ptr ataPBReserved2; /* Reserved */
+ ATACallbackUPP ataPBCallbackPtr; /* -->: Completion Routine Pointer*/
+ OSErr ataPBResult; /* <--: Returned result */
+ UInt8 ataPBFunctionCode; /* -->: Manager Function Code */
+ UInt8 ataPBIOSpeed; /* -->: I/O Timing Class */
+ UInt16 ataPBFlags; /* -->: Various control options */
+ SInt16 ataPBReserved3; /* Reserved */
+ UInt32 ataPBDeviceID; /* -->: Device identifier (see ataDeviceID) */
+ UInt32 ataPBTimeOut; /* -->: Transaction timeout value in msec */
+ Ptr ataPBClientPtr1; /* Client's storage Ptr 1 */
+ Ptr ataPBClientPtr2; /* Client's storage Ptr 2 */
+ UInt16 ataPBState; /* Reserved for Manager; Initialize to 0 */
+ UInt16 ataPBSemaphores; /* Used internally by the manager*/
+ SInt32 ataPBReserved4; /* Reserved */
+ /* End of cloned common header ataPBHdr*/
+ NumVersion ataMgrVersion; /* Manager Version information*/
+ UInt8 ataMgrPBVers; /* <--: Manager PB version number supported*/
+ UInt8 Reserved1; /* Reserved*/
+ UInt16 ataBusCnt; /* <--: Number of ATA buses in the system*/
+ UInt16 ataDevCnt; /* <--: Total number of ATA devices detected*/
+ UInt8 ataPioModes; /* <--: Maximum Programmed I/O speed mode supported*/
+ UInt8 Reserved2; /* Reserved*/
+ UInt16 ataIOClkResolution; /* <--: IO Clock resolution in nsec (Not supported)*/
+ UInt8 ataSingleDMAModes; /* <--: Single Word DMA modes supported */
+ UInt8 ataMultiDMAModes; /* <--: Multiword DMA modes supported*/
+ SInt16 Reserved[16]; /* Reserved for future expansion*/
+};
+typedef struct ataMgrInquiry ataMgrInquiry;
+/* Parameter block structure for Abort command*/
+/* Manager parameter block structure*/
+
+struct ataAbort {
+ /* Start of cloned common header ataPBHdr*/
+ ataPBHeader * ataPBLink; /* a pointer to the next entry in the queue */
+ UInt16 ataPBQType; /* type byte for safety check*/
+ UInt8 ataPBVers; /* -->: parameter block version number; Must be 0x01*/
+ UInt8 ataPBReserved; /* Reserved */
+ Ptr ataPBReserved2; /* Reserved */
+ ATACallbackUPP ataPBCallbackPtr; /* -->: Completion Routine Pointer*/
+ OSErr ataPBResult; /* <--: Returned result */
+ UInt8 ataPBFunctionCode; /* -->: Manager Function Code */
+ UInt8 ataPBIOSpeed; /* -->: I/O Timing Class */
+ UInt16 ataPBFlags; /* -->: Various control options */
+ SInt16 ataPBReserved3; /* Reserved */
+ UInt32 ataPBDeviceID; /* -->: Device identifier (see ataDeviceID) */
+ UInt32 ataPBTimeOut; /* -->: Transaction timeout value in msec */
+ Ptr ataPBClientPtr1; /* Client's storage Ptr 1 */
+ Ptr ataPBClientPtr2; /* Client's storage Ptr 2 */
+ UInt16 ataPBState; /* Reserved for Manager; Initialize to 0 */
+ UInt16 ataPBSemaphores; /* Used internally by the manager*/
+ SInt32 ataPBReserved4; /* Reserved */
+ /* End of cloned common header ataPBHdr*/
+ ataIOPB * ataAbortPB; /* -->: Parameter block to be aborted*/
+ SInt16 Reserved[22]; /* Reserved for future expansion*/
+};
+typedef struct ataAbort ataAbort;
+/* Manager parameter block structure*/
+
+struct ATAEventRec {
+ UInt16 ataEventCode; /* --> ATA event code*/
+ UInt16 ataPhysicalID; /* --> Physical drive reference*/
+ SInt32 ataDrvrContext; /* Context pointer saved by driver*/
+ UInt32 ataMarker; /* Always 'LOAD'*/
+ UInt32 ataEventRecVersion; /* Version number of this data structure*/
+ UInt32 ataDeviceType; /* Device type on bus (valid for load driver only)*/
+ UInt16 ataRefNum; /* RefNum of driver (valid for remove driver only)*/
+};
+typedef struct ATAEventRec ATAEventRec;
+typedef ATAEventRec * ATAEventRecPtr;
+typedef CALLBACK_API( SInt16 , ATAClientProcPtr )(ATAEventRecPtr ataERPtr);
+typedef STACK_UPP_TYPE(ATAClientProcPtr) ATAClientUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(ATAClientUPP)
+ NewATAClientUPP (ATAClientProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeATAClientUPP (ATAClientUPP userUPP);
+
+ EXTERN_API(SInt16)
+ InvokeATAClientUPP (ATAEventRecPtr ataERPtr,
+ ATAClientUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppATAClientProcInfo = 0x000000E0 }; /* pascal 2_bytes Func(4_bytes) */
+ #define NewATAClientUPP(userRoutine) (ATAClientUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppATAClientProcInfo, GetCurrentArchitecture())
+ #define DisposeATAClientUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeATAClientUPP(ataERPtr, userUPP) (SInt16)CALL_ONE_PARAMETER_UPP((userUPP), uppATAClientProcInfo, (ataERPtr))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewATAClientProc(userRoutine) NewATAClientUPP(userRoutine)
+#define CallATAClientProc(userRoutine, ataERPtr) InvokeATAClientUPP(ataERPtr, userRoutine)
+/* Parameter block structure for Driver Register command*/
+/* Manager parameter block structure*/
+
+struct ataDrvrRegister {
+ /* Start of cloned common header ataPBHdr*/
+ ataPBHeader * ataPBLink; /* a pointer to the next entry in the queue */
+ UInt16 ataPBQType; /* type byte for safety check*/
+ UInt8 ataPBVers; /* -->: parameter block version number; Must be 0x01*/
+ UInt8 ataPBReserved; /* Reserved */
+ Ptr ataPBReserved2; /* Reserved */
+ ATACallbackUPP ataPBCallbackPtr; /* -->: Completion Routine Pointer*/
+ OSErr ataPBResult; /* <--: Returned result */
+ UInt8 ataPBFunctionCode; /* -->: Manager Function Code */
+ UInt8 ataPBIOSpeed; /* -->: I/O Timing Class */
+ UInt16 ataPBFlags; /* -->: Various control options */
+ SInt16 ataPBReserved3; /* Reserved */
+ UInt32 ataPBDeviceID; /* -->: Device identifier (see ataDeviceID) */
+ UInt32 ataPBTimeOut; /* -->: Transaction timeout value in msec */
+ Ptr ataPBClientPtr1; /* Client's storage Ptr 1 */
+ Ptr ataPBClientPtr2; /* Client's storage Ptr 2 */
+ UInt16 ataPBState; /* Reserved for Manager; Initialize to 0 */
+ UInt16 ataPBSemaphores; /* Used internally by the manager*/
+ SInt32 ataPBReserved4; /* Reserved */
+ /* End of cloned common header ataPBHdr*/
+ SInt16 ataDrvrRefNum; /* <->: Driver reference number*/
+ UInt16 ataDrvrFlags; /* -->: 1 = loader driver if ataPBDeviceID = -1 {PB2}*/
+ UInt16 ataDeviceNextID; /* <--: used to specified the next drive ID*/
+ SInt16 ataDrvrLoadPriv; /* Driver loader private storage*/
+ ATAClientUPP ataEventHandler; /* <->: Pointer to ATA event callback routine {PB2}*/
+ SInt32 ataDrvrContext; /* <->: Context data saved by driver {PB2}*/
+ SInt32 ataEventMask; /* <->: Set to 1 for notification of event {PB2}*/
+ SInt16 Reserved[14]; /* Reserved for future expansion - from [21] {PB2}*/
+};
+typedef struct ataDrvrRegister ataDrvrRegister;
+/* Parameter block structure for Modify driver event mask command*/
+
+struct ataModifyEventMask {
+ /* Start of cloned common header ataPBHdr*/
+ ataPBHeader * ataPBLink; /* a pointer to the next entry in the queue */
+ UInt16 ataPBQType; /* type byte for safety check*/
+ UInt8 ataPBVers; /* -->: parameter block version number; Must be 0x01*/
+ UInt8 ataPBReserved; /* Reserved */
+ Ptr ataPBReserved2; /* Reserved */
+ ATACallbackUPP ataPBCallbackPtr; /* -->: Completion Routine Pointer*/
+ OSErr ataPBResult; /* <--: Returned result */
+ UInt8 ataPBFunctionCode; /* -->: Manager Function Code */
+ UInt8 ataPBIOSpeed; /* -->: I/O Timing Class */
+ UInt16 ataPBFlags; /* -->: Various control options */
+ SInt16 ataPBReserved3; /* Reserved */
+ UInt32 ataPBDeviceID; /* -->: Device identifier (see ataDeviceID) */
+ UInt32 ataPBTimeOut; /* -->: Transaction timeout value in msec */
+ Ptr ataPBClientPtr1; /* Client's storage Ptr 1 */
+ Ptr ataPBClientPtr2; /* Client's storage Ptr 2 */
+ UInt16 ataPBState; /* Reserved for Manager; Initialize to 0 */
+ UInt16 ataPBSemaphores; /* Used internally by the manager*/
+ SInt32 ataPBReserved4; /* Reserved */
+ /* End of cloned common header ataPBHdr*/
+ SInt32 ataModifiedEventMask; /* -->: new event mask value*/
+ SInt16 Reserved[22]; /* Reserved for future expansion*/
+};
+typedef struct ataModifyEventMask ataModifyEventMask;
+/* 'ataRegMask' field of the ataRegAccess definition*/
+enum {
+ bATAAltSDevCValid = 14, /* bit number of alternate status/device cntrl valid bit*/
+ bATAStatusCmdValid = 7, /* bit number of status/command valid bit*/
+ bATASDHValid = 6, /* bit number of ataTFSDH valid bit*/
+ bATACylinderHiValid = 5, /* bit number of cylinder high valid bit*/
+ bATACylinderLoValid = 4, /* bit number of cylinder low valid bit*/
+ bATASectorNumValid = 3, /* bit number of sector number valid bit*/
+ bATASectorCntValid = 2, /* bit number of sector count valid bit*/
+ bATAErrFeaturesValid = 1, /* bit number of error/features valid bit*/
+ bATADataValid = 0, /* bit number of data valid bit*/
+ mATAAltSDevCValid = 1 << bATAAltSDevCValid, /* alternate status/device control valid*/
+ mATAStatusCmdValid = 1 << bATAStatusCmdValid, /* status/command valid*/
+ mATASDHValid = 1 << bATASDHValid, /* ataTFSDH valid*/
+ mATACylinderHiValid = 1 << bATACylinderHiValid, /* cylinder high valid*/
+ mATACylinderLoValid = 1 << bATACylinderLoValid, /* cylinder low valid*/
+ mATASectorNumValid = 1 << bATASectorNumValid, /* sector number valid*/
+ mATASectorCntValid = 1 << bATASectorCntValid, /* sector count valid*/
+ mATAErrFeaturesValid = 1 << bATAErrFeaturesValid, /* error/features valid*/
+ mATADataValid = 1 << bATADataValid /* data valid*/
+};
+
+/* Parameter block structure for device register access command*/
+
+union ataRegValueUnion {
+ UInt8 ataByteRegValue; /* <->: Byte register value read or to be written*/
+ UInt16 ataWordRegValue; /* <->: Word register value read or to be written*/
+};
+typedef union ataRegValueUnion ataRegValueUnion;
+/* Manager parameter block structure*/
+
+struct ataRegAccess {
+ /* Start of cloned common header ataPBHdr*/
+ ataPBHeader * ataPBLink; /* a pointer to the next entry in the queue */
+ UInt16 ataPBQType; /* type byte for safety check*/
+ UInt8 ataPBVers; /* -->: parameter block version number; Must be 0x01*/
+ UInt8 ataPBReserved; /* Reserved */
+ Ptr ataPBReserved2; /* Reserved */
+ ATACallbackUPP ataPBCallbackPtr; /* -->: Completion Routine Pointer*/
+ OSErr ataPBResult; /* <--: Returned result */
+ UInt8 ataPBFunctionCode; /* -->: Manager Function Code */
+ UInt8 ataPBIOSpeed; /* -->: I/O Timing Class */
+ UInt16 ataPBFlags; /* -->: Various control options */
+ SInt16 ataPBReserved3; /* Reserved */
+ UInt32 ataPBDeviceID; /* -->: Device identifier (see ataDeviceID) */
+ UInt32 ataPBTimeOut; /* -->: Transaction timeout value in msec */
+ Ptr ataPBClientPtr1; /* Client's storage Ptr 1 */
+ Ptr ataPBClientPtr2; /* Client's storage Ptr 2 */
+ UInt16 ataPBState; /* Reserved for Manager; Initialize to 0 */
+ UInt16 ataPBSemaphores; /* Used internally by the manager*/
+ SInt32 ataPBReserved4; /* Reserved */
+ /* End of cloned common header ataPBHdr*/
+ UInt16 ataRegSelect; /* -->: Device Register Selector*/
+ /* DataReg 0 */
+ /* ErrorReg(R) or FeaturesReg(W) 1*/
+ /* SecCntReg 2*/
+ /* SecNumReg 3*/
+ /* CylLoReg 4*/
+ /* CylHiReg 5*/
+ /* SDHReg 6*/
+ /* StatusReg(R) or CmdReg(W) 7*/
+ /* AltStatus(R) or DevCntr(W) 0E*/
+ ataRegValueUnion ataRegValue;
+ /* Following fields are valid only if ataRegSelect = 0xFFFF*/
+ UInt16 ataRegMask; /* -->: mask for register(s) to update*/
+ /* bit 0 : data register valid*/
+ /* bit 1 : error/feaures register valid*/
+ /* bit 2 : sector count register valid*/
+ /* bit 3 : sector number register valid*/
+ /* bit 4 : cylinder low register valid*/
+ /* bit 5 : cylinder high register valid*/
+ /* bit 6 : ataTFSDH register valid*/
+ /* bit 7 : status/command register valid*/
+ /* bits 8 - 13 : reserved (set to 0)*/
+ /* bit 14: alternate status / device control reg valid*/
+ /* bit 15: reserved (set to 0)*/
+ ataTaskFile ataRegisterImage; /* <->: register images*/
+ UInt8 ataAltSDevCReg; /* <->: Alternate status(R) or Device Control(W) register image*/
+ UInt8 Reserved3; /* Reserved*/
+ SInt16 Reserved[16]; /* Reserved for future expansion*/
+};
+typedef struct ataRegAccess ataRegAccess;
+/* Manager parameter block structure <DP03/10/94>*/
+
+struct ataIdentify {
+ /* Start of cloned common header ataPBHdr*/
+ ataPBHeader * ataPBLink; /* a pointer to the next entry in the queue */
+ UInt16 ataPBQType; /* type byte for safety check*/
+ UInt8 ataPBVers; /* -->: parameter block version number; Must be 0x01*/
+ UInt8 ataPBReserved; /* Reserved */
+ Ptr ataPBReserved2; /* Reserved */
+ ATACallbackUPP ataPBCallbackPtr; /* -->: Completion Routine Pointer*/
+ OSErr ataPBResult; /* <--: Returned result */
+ UInt8 ataPBFunctionCode; /* -->: Manager Function Code */
+ UInt8 ataPBIOSpeed; /* -->: I/O Timing Class */
+ UInt16 ataPBFlags; /* -->: Various control options */
+ SInt16 ataPBReserved3; /* Reserved */
+ UInt32 ataPBDeviceID; /* -->: Device identifier (see ataDeviceID) */
+ UInt32 ataPBTimeOut; /* -->: Transaction timeout value in msec */
+ Ptr ataPBClientPtr1; /* Client's storage Ptr 1 */
+ Ptr ataPBClientPtr2; /* Client's storage Ptr 2 */
+ UInt16 ataPBState; /* Reserved for Manager; Initialize to 0 */
+ UInt16 ataPBSemaphores; /* Used internally by the manager*/
+ SInt32 ataPBReserved4; /* Reserved */
+ /* End of cloned common header ataPBHdr*/
+ UInt16 Reserved1[4]; /* Reserved. These are used internally by the Manager*/
+ UInt8 * ataPBBuffer; /* Buffer for the identify data (512 bytes)*/
+ UInt16 Reserved2[12]; /* Used internally by the ATA Manager*/
+ SInt16 Reserved3[6]; /* Reserved for future expansion*/
+};
+typedef struct ataIdentify ataIdentify;
+/* 'ataConfigSetting' field of the Get/Set Device Configuration definition <8/6/94>*/
+enum {
+ ATAPIpacketDRQ_bit = 6, /* bit number of ATAPI command packet DRQ option*/
+ ATAPIpacketDRQ = 1 << ATAPIpacketDRQ_bit /* ATAPI command packet DRQ option*/
+};
+
+/* atapcValid field definition*/
+enum {
+ bATApcAccessMode = 0,
+ bATApcVcc = 1,
+ bATApcVpp1 = 2,
+ bATApcVpp2 = 3,
+ bATApcStatus = 4,
+ bATApcPin = 5,
+ bATApcCopy = 6,
+ bATApcConfigIndex = 7,
+ bATApcLockUnlock = 15,
+ mATApcAccessMode = 1 << bATApcAccessMode,
+ mATApcVcc = 1 << bATApcVcc,
+ mATApcVpp1 = 1 << bATApcVpp1,
+ mATApcVpp2 = 1 << bATApcVpp2,
+ mATApcStatus = 1 << bATApcStatus,
+ mATApcPin = 1 << bATApcPin,
+ mATApcCopy = 1 << bATApcCopy,
+ mATApcConfigIndex = 1 << bATApcConfigIndex,
+ mATApcLockUnlock = 1 << bATApcLockUnlock
+};
+
+/* Device physical type & socket type indicator definition*/
+enum {
+ kATADeviceUnknown = 0x00, /* no device or type undetermined*/
+ kATADeviceATA = 0x01, /* traditional ATA protocol device <7/29/94>*/
+ kATADeviceATAPI = 0x02, /* ATAPI protocol device <7/29/94>*/
+ kATADeviceReserved = 0x03 /* reserved by Apple (was PCMCIA)*/
+};
+
+enum {
+ kATASocketInternal = 0x01, /* Internal ATA socket*/
+ kATASocketMB = 0x02, /* Media Bay socket*/
+ kATASocketPCMCIA = 0x03 /* PCMCIA socket*/
+};
+
+/* reserved words at the end of the devConfig structure*/
+enum {
+ kATAConfigReserved = 5 /* number of reserved words at the end*/
+};
+
+/*
+ Get/Set Device Configuration parameter block structure <8/6/94>
+ Manager parameter block structure
+*/
+
+struct ataDevConfiguration {
+ /* Start of cloned common header ataPBHdr*/
+ ataPBHeader * ataPBLink; /* a pointer to the next entry in the queue */
+ UInt16 ataPBQType; /* type byte for safety check*/
+ UInt8 ataPBVers; /* -->: parameter block version number; Must be 0x01*/
+ UInt8 ataPBReserved; /* Reserved */
+ Ptr ataPBReserved2; /* Reserved */
+ ATACallbackUPP ataPBCallbackPtr; /* -->: Completion Routine Pointer*/
+ OSErr ataPBResult; /* <--: Returned result */
+ UInt8 ataPBFunctionCode; /* -->: Manager Function Code */
+ UInt8 ataPBIOSpeed; /* -->: I/O Timing Class */
+ UInt16 ataPBFlags; /* -->: Various control options */
+ SInt16 ataPBReserved3; /* Reserved */
+ UInt32 ataPBDeviceID; /* -->: Device identifier (see ataDeviceID) */
+ UInt32 ataPBTimeOut; /* -->: Transaction timeout value in msec */
+ Ptr ataPBClientPtr1; /* Client's storage Ptr 1 */
+ Ptr ataPBClientPtr2; /* Client's storage Ptr 2 */
+ UInt16 ataPBState; /* Reserved for Manager; Initialize to 0 */
+ UInt16 ataPBSemaphores; /* Used internally by the manager*/
+ SInt32 ataPBReserved4; /* Reserved */
+ /* End of cloned common header ataPBHdr*/
+ SInt32 ataConfigSetting; /* <->: Configuration setting*/
+ /* Bits 3 - 0: Reserved*/
+ /* Bit 4: Reserved (allowLBAAccess)*/
+ /* Bit 5: Reserved (allowRWMultiple)*/
+ /* Bit 6: ATAPIpacketDRQ*/
+ /* 1 = Check for Interrupt DRQ on ATAPI command packet DRQ*/
+ /* 0 = Default: Check only for the assertion of command packet DRQ*/
+ /* Bits 31 - 7: Reserved*/
+ UInt8 ataPIOSpeedMode; /* <->: Device access speed in PIO Mode*/
+ UInt8 Reserved3; /* Reserved to force word alignment*/
+ UInt16 atapcValid; /* <->: Set when pcXXX fields are valid (atapcAccessMode - atapcConfigIndex)*/
+ /* bit 0 - atapcAccessMode field valid, when set*/
+ /* bit 1 - atapcVcc field valid, when set*/
+ /* bit 2 - atapcVpp1 field valid, when set*/
+ /* bit 3 - atapcVpp2 field valid, when set*/
+ /* bit 4 - atapcStatus field valid, when set*/
+ /* bit 5 - atapcPin field valid, when set*/
+ /* bit 6 - atapcCopy field valid, when set*/
+ /* bit 7 - atapcConfigIndex field valid, when set*/
+ /* bits 14-8 - Reserved*/
+ /* bit 15 - device lock/unlock request (write only)*/
+ UInt16 ataRWMultipleCount; /* Reserved for future (not supported yet)*/
+ UInt16 ataSectorsPerCylinder; /* Reserved for future (not supported yet)*/
+ UInt16 ataHeads; /* Reserved for future (not supported yet)*/
+ UInt16 ataSectorsPerTrack; /* Reserved for future (not supported yet)*/
+ UInt16 ataSocketNumber; /* <--: Socket number used by the CardServices*/
+ /* 0xFF = socket number invalid (Not a CardServices device)*/
+ /* other = socket number of the device*/
+ UInt8 ataSocketType; /* <--: Specifies the socket type (get config only)*/
+ /* 00 = Unknown socket*/
+ /* 01 = Internal ATA bus*/
+ /* 02 = Media Bay*/
+ /* 03 = PCMCIA*/
+ UInt8 ataDeviceType; /* <--: Specifies the device type (get config only)*/
+ /* 00 = Unknown device*/
+ /* 01 = standard ATA device (HD)*/
+ /* 02 = ATAPI device*/
+ /* 03 = PCMCIA ATA device*/
+ UInt8 atapcAccessMode; /* <->: Access mode: Memory vs. I/O (PCMCIA only)*/
+ UInt8 atapcVcc; /* <->: Voltage in tenths of a volt (PCMCIA only)*/
+ UInt8 atapcVpp1; /* <->: Voltage in tenths of a volt (PCMCIA only)*/
+ UInt8 atapcVpp2; /* <->: Voltage in tenths of a volt (PCMCIA only)*/
+ UInt8 atapcStatus; /* <->: Card Status register setting (PCMCIA only)*/
+ UInt8 atapcPin; /* <->: Card Pin register setting (PCMCIA only)*/
+ UInt8 atapcCopy; /* <->: Card Socket/Copy register setting (PCMCIA only)*/
+ UInt8 atapcConfigIndex; /* <->: Card Option register setting (PCMCIA only)*/
+ UInt8 ataSingleDMASpeed; /* <->: Single Word DMA Timing Class*/
+ UInt8 ataMultiDMASpeed; /* <->: Multiple Word DMA Timing Class*/
+ UInt16 ataPIOCycleTime; /* <->:Cycle time for PIO mode*/
+ UInt16 ataMultiCycleTime; /* <->:Cycle time for Multiword DMA mode*/
+ UInt8 ataUltraDMASpeed; /* <-> Ultra DMA timing class*/
+ UInt8 reserved2; /* reserved*/
+ UInt16 ataUltraCycleTime; /* <-> Cycle time for Ultra DMA mode*/
+ UInt16 Reserved1[5]; /* Reserved for future*/
+};
+typedef struct ataDevConfiguration ataDevConfiguration;
+/* Get Card Location Icon/Text <SM4>*/
+enum {
+ kATALargeIconHFS = 0x0001, /* Large B&W icon with mask (HFS)*/
+ kATALargeIconProDOS = 0x0081 /* Large B&W icon with mask (ProDOS)*/
+};
+
+/* Manager parameter block structure*/
+
+struct ataLocationData {
+ /* Start of cloned common header ataPBHdr*/
+ ataPBHeader * ataPBLink; /* a pointer to the next entry in the queue */
+ UInt16 ataPBQType; /* type byte for safety check*/
+ UInt8 ataPBVers; /* -->: parameter block version number; Must be 0x01*/
+ UInt8 ataPBReserved; /* Reserved */
+ Ptr ataPBReserved2; /* Reserved */
+ ATACallbackUPP ataPBCallbackPtr; /* -->: Completion Routine Pointer*/
+ OSErr ataPBResult; /* <--: Returned result */
+ UInt8 ataPBFunctionCode; /* -->: Manager Function Code */
+ UInt8 ataPBIOSpeed; /* -->: I/O Timing Class */
+ UInt16 ataPBFlags; /* -->: Various control options */
+ SInt16 ataPBReserved3; /* Reserved */
+ UInt32 ataPBDeviceID; /* -->: Device identifier (see ataDeviceID) */
+ UInt32 ataPBTimeOut; /* -->: Transaction timeout value in msec */
+ Ptr ataPBClientPtr1; /* Client's storage Ptr 1 */
+ Ptr ataPBClientPtr2; /* Client's storage Ptr 2 */
+ UInt16 ataPBState; /* Reserved for Manager; Initialize to 0 */
+ UInt16 ataPBSemaphores; /* Used internally by the manager*/
+ SInt32 ataPBReserved4; /* Reserved */
+ /* End of cloned common header ataPBHdr*/
+ SInt16 ataIconType; /* -->: icon type specifier*/
+ /* 1 = Large B&W icon with mask (256 bytes)*/
+ /* 0x81 = Same as 1, but ProDOS icon*/
+ SInt16 ataIconReserved; /* Reserved to be longword aligned*/
+ SInt8 * ataLocationIconPtr; /* -->: Icon Data buffer pointer*/
+ SInt8 * ataLocationStringPtr; /* -->: Icon String buffer pointer*/
+ UInt16 Reserved1[18]; /* Reserved for future*/
+};
+typedef struct ataLocationData ataLocationData;
+/* ataOSType available*/
+enum {
+ kATAddTypeMacOS = 0x0001 /* Blue Mac O/S ddType value*/
+};
+
+/* The parameter block definition for all other ATA Manager functions.*/
+
+
+struct ataGeneric {
+ /* Start of cloned common header ataPBHdr*/
+ ataPBHeader * ataPBLink; /* a pointer to the next entry in the queue */
+ UInt16 ataPBQType; /* type byte for safety check*/
+ UInt8 ataPBVers; /* -->: parameter block version number; Must be 0x01*/
+ UInt8 ataPBReserved; /* Reserved */
+ Ptr ataPBReserved2; /* Reserved */
+ ATACallbackUPP ataPBCallbackPtr; /* -->: Completion Routine Pointer*/
+ OSErr ataPBResult; /* <--: Returned result */
+ UInt8 ataPBFunctionCode; /* -->: Manager Function Code */
+ UInt8 ataPBIOSpeed; /* -->: I/O Timing Class */
+ UInt16 ataPBFlags; /* -->: Various control options */
+ SInt16 ataPBReserved3; /* Reserved */
+ UInt32 ataPBDeviceID; /* -->: Device identifier (see ataDeviceID) */
+ UInt32 ataPBTimeOut; /* -->: Transaction timeout value in msec */
+ Ptr ataPBClientPtr1; /* Client's storage Ptr 1 */
+ Ptr ataPBClientPtr2; /* Client's storage Ptr 2 */
+ UInt16 ataPBState; /* Reserved for Manager; Initialize to 0 */
+ UInt16 ataPBSemaphores; /* Used internally by the manager*/
+ SInt32 ataPBReserved4; /* Reserved */
+ /* End of cloned common header ataPBHdr*/
+ UInt16 Reserved[24]; /* Reserved for future*/
+};
+typedef struct ataGeneric ataGeneric;
+
+union ataPB {
+ ataIOPB ataIOParamBlock; /* parameter block for I/O*/
+ ataBusInquiry ataBIParamBlock; /* parameter block for bus inquiry*/
+ ataMgrInquiry ataMIParamBlock; /* parameter block for Manager inquiry*/
+ ataAbort ataAbortParamBlock; /* parameter block for abort*/
+ ataDrvrRegister ataDRParamBlock; /* parameter block for driver register*/
+ ataModifyEventMask ataMEParamBlock; /* parameter block for event mask modify*/
+ ataRegAccess ataRAParamBlock; /* parameter block for register access*/
+ ataIdentify ataDIParamBlock; /* parameter block for drive identify*/
+ ataDevConfiguration ataDCParamBlock; /* parameter block for device configuration*/
+ ataLocationData ataLDParamBlock; /* parameter block for location icon data*/
+ /*ataManagerInit ataInitParamBlock; // parameter block for Manager initialization*/
+ /*ataManagerShutDn ataSDParamBlock; // parameter block for Manager shutdown*/
+ /*ataDrvrLoad ataDLParamBlock; // parameter block for Driver loading*/
+ ataGeneric ataGenericParamBlock; /* parameter block for all other functions*/
+};
+typedef union ataPB ataPB;
+/* The ATA Event codes...*/
+enum {
+ kATANullEvent = 0x00, /* Just kidding -- nothing happened*/
+ kATAOnlineEvent = 0x01, /* An ATA device has come online*/
+ kATAOfflineEvent = 0x02, /* An ATA device has gone offline*/
+ kATARemovedEvent = 0x03, /* An ATA device has been removed from the bus*/
+ kATAResetEvent = 0x04, /* Someone gave a hard reset to the drive*/
+ kATAOfflineRequest = 0x05, /* Someone requesting to offline the drive*/
+ kATAEjectRequest = 0x06, /* Someone requesting to eject the drive*/
+ kATAUpdateEvent = 0x07, /* Potential configuration change reported by CardServices <SM4>*/
+ kATATaskTimeRequest = 0x08, /* The manager is requesting to be called at Task Time*/
+ kATALoadDriverNow = 0x09, /* Load the driver for the given bus immediately*/
+ kATAPIResetEvent = 0x0A, /* Someone gave a ATAPI reset to the drive*/
+ /* The following describes bit definitions in the eventMask field of ataDrvrRegister*/
+ bATANullEvent = 1 << kATANullEvent, /* null event bit*/
+ bATAOnlineEvent = 1 << kATAOnlineEvent, /* online event bit*/
+ bATAOfflineEvent = 1 << kATAOfflineEvent, /* offline event bit*/
+ bATARemovedEvent = 1 << kATARemovedEvent, /* removed event bit*/
+ bATAResetEvent = 1 << kATAResetEvent, /* ATA reset event bit*/
+ bATAOfflineRequest = 1 << kATAOfflineRequest, /* offline request event bit*/
+ bATAEjectRequest = 1 << kATAEjectRequest, /* eject request event bit*/
+ bATAUpdateEvent = 1 << kATAUpdateEvent, /* configuration update event bit*/
+ bATAPIResetEvent = 1 << kATAPIResetEvent /* ATAPI reset event bit*/
+};
+
+enum {
+ kATAEventMarker = FOUR_CHAR_CODE('LOAD'), /* Marker for the event data structure*/
+ kATAEventVersion1 = 0x00000001 /* Version 1 of the event structure*/
+};
+
+typedef CALLBACK_API( OSErr , ATADispatchProcPtr )(ataPB *pb);
+typedef STACK_UPP_TYPE(ATADispatchProcPtr) ATADispatchUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(ATADispatchUPP)
+ NewATADispatchUPP (ATADispatchProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeATADispatchUPP (ATADispatchUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeATADispatchUPP (ataPB * pb,
+ ATADispatchUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppATADispatchProcInfo = 0x000000E0 }; /* pascal 2_bytes Func(4_bytes) */
+ #define NewATADispatchUPP(userRoutine) (ATADispatchUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppATADispatchProcInfo, GetCurrentArchitecture())
+ #define DisposeATADispatchUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeATADispatchUPP(pb, userUPP) (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppATADispatchProcInfo, (pb))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewATADispatchProc(userRoutine) NewATADispatchUPP(userRoutine)
+#define CallATADispatchProc(userRoutine, pb) InvokeATADispatchUPP(pb, userRoutine)
+#if CALL_NOT_IN_CARBON
+EXTERN_API( SInt16 )
+ataManager (ataPB * pb) ONEWORDINLINE(0xAAF1);
+
+/* Device Error codes: 0xDB42 - 0xDB5F */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+enum {
+ ATABaseErrCode = -9406, /* Base error code - 0xDB42 */
+ ioPending = 1, /* Asynch I/O in progress status*/
+ AT_NRdyErr = ATABaseErrCode + 0x01, /* 0xDB43: Drive not Ready */
+ AT_IDNFErr = ATABaseErrCode + 0x02, /* 0xDB44: ID not found */
+ AT_DMarkErr = ATABaseErrCode + 0x03, /* 0xDB45: Data mark not found */
+ AT_BadBlkErr = ATABaseErrCode + 0x04, /* 0xDB46: Bad Block */
+ AT_CorDataErr = ATABaseErrCode + 0x05, /* 0xDB47: Data was corrected */
+ AT_UncDataErr = ATABaseErrCode + 0x06, /* 0xDB48: Data was not corrected */
+ AT_SeekErr = ATABaseErrCode + 0x07, /* 0xDB49: Seek error */
+ AT_WrFltErr = ATABaseErrCode + 0x08, /* 0xDB4A: Write fault */
+ AT_RecalErr = ATABaseErrCode + 0x09, /* 0xDB4B: Recalibrate failed */
+ AT_AbortErr = ATABaseErrCode + 0x0A, /* 0xDB4C: Command aborted by drive */
+ AT_MCErr = ATABaseErrCode + 0x0C, /* 0xDB4E: Media Changed error*/
+ ATAPICheckErr = ATABaseErrCode + 0x0D, /* 0xDB4F: ATAPI Check condition <06/15/94>*/
+ AT_UltraDMAiCRCErr = ATABaseErrCode + 0x0E, /* 0xDB50: CRC error during Ultra DMA xfer */
+ /* System error codes...Custom Driver Error Codes 0xDB60 - 0xDB6F*/
+ DRVRCantAllocate = ATABaseErrCode + 0x1E, /* 0xDB60: Allocation error during initialization*/
+ NoATAMgr = ATABaseErrCode + 0x1F, /* 0xDB61: MgrInquiry failed => No ATA Manager*/
+ ATAInitFail = ATABaseErrCode + 0x20, /* 0xDB62: Mgr Initialization failed*/
+ ATABufFail = ATABaseErrCode + 0x21, /* 0xDB63: Device buffer test failure*/
+ ATADevUnsupported = ATABaseErrCode + 0x22, /* 0xDB64: Device type not supported*/
+ ATAEjectDrvErr = ATABaseErrCode + 0x23, /* 0xDB65: Could not eject the drive*/
+ /* Manager Error Codes 0xDB70 - 0xDB8F*/
+ ATAMgrNotInitialized = ATABaseErrCode + 0x2E, /* 0xDB70: Mgr has not been initialized*/
+ ATAPBInvalid = ATABaseErrCode + 0x2F, /* 0xDB71: The bus base address couldn't be found*/
+ ATAFuncNotSupported = ATABaseErrCode + 0x30, /* 0xDB72: An unknown function code specified*/
+ ATABusy = ATABaseErrCode + 0x31, /* 0xDB73: Selected device is busy*/
+ ATATransTimeOut = ATABaseErrCode + 0x32, /* 0xDB74: Transaction timeout detected*/
+ ATAReqInProg = ATABaseErrCode + 0x33, /* 0xDB75: Channel busy; channel is processing another cmd*/
+ ATAUnknownState = ATABaseErrCode + 0x34, /* 0xDB76: Device status register reflects an unknown state*/
+ ATAQLocked = ATABaseErrCode + 0x35, /* 0xDB77: I/O Queue is locked due to previous I/O error.*/
+ ATAReqAborted = ATABaseErrCode + 0x36, /* 0xDB78: The I/O queue entry was aborted due to an abort req.*/
+ /* or due to Manager shutdown.*/
+ ATAUnableToAbort = ATABaseErrCode + 0x37, /* 0xDB79: The I/O queue entry could not be aborted.*/
+ ATAAbortedDueToRst = ATABaseErrCode + 0x38, /* 0xDB7A: Request aborted due to a device reset command.*/
+ ATAPIPhaseErr = ATABaseErrCode + 0x39, /* 0xDB7B: Unexpected phase - oooIS THIS VALID ERROR??? <06/15/94>*/
+ ATAPITxCntErr = ATABaseErrCode + 0x3A, /* 0xDB7C: Overrun/Underrun condition detected*/
+ ATANoClientErr = ATABaseErrCode + 0x3B, /* 0xDB7D: No client present to handle the event*/
+ ATAInternalErr = ATABaseErrCode + 0x3C, /* 0xDB7E: MagnumOpus returned an error*/
+ ATABusErr = ATABaseErrCode + 0x3D, /* 0xDB7F: Bus error detected on I/O */
+ AT_NoAddrErr = ATABaseErrCode + 0x3E, /* 0xDB80: Invalid AT base adress */
+ DriverLocked = ATABaseErrCode + 0x3F, /* 0xDB81: Current driver must be removed before adding another*/
+ CantHandleEvent = ATABaseErrCode + 0x40, /* 0xDB82: Particular event couldn't be handled (call others)*/
+ ATAMgrMemoryErr = ATABaseErrCode + 0x41, /* 0xDB83: Manager memory allocation error */
+ ATASDFailErr = ATABaseErrCode + 0x42, /* 0xDB84: Shutdown failure */
+ ATAXferParamErr = ATABaseErrCode + 0x43, /* 0xDB85: I/O xfer parameters inconsistent */
+ ATAXferModeErr = ATABaseErrCode + 0x44, /* 0xDB86: I/O xfer mode not supported */
+ ATAMgrConsistencyErr = ATABaseErrCode + 0x45, /* 0XDB87: Manager detected internal inconsistency. */
+ ATADmaXferErr = ATABaseErrCode + 0x46, /* 0XDB88: fatal error in DMA side of transfer */
+ /* Driver loader error Codes 0xDB90 - 0xDBA5*/
+ ATAInvalidDrvNum = ATABaseErrCode + 0x4E, /* 0xDB90: Invalid drive number from event*/
+ ATAMemoryErr = ATABaseErrCode + 0x4F, /* 0xDB91: Memory allocation error*/
+ ATANoDDMErr = ATABaseErrCode + 0x50, /* 0xDB92: No DDM found on media */
+ ATANoDriverErr = ATABaseErrCode + 0x51 /* 0xDB93: No driver found on the media */
+};
+
+/* ------------------------ Version 1 definition ------------------------------- */
+enum {
+ v1ATABaseErrCode = 0x0700, /* This needs a home somewhere*/
+ v1AT_NRdyErr = 0x01 - v1ATABaseErrCode, /* 0xF901: -0x1DBE */
+ v1AT_IDNFErr = 0x04 - v1ATABaseErrCode, /* 0xF904: -0x1DC0 */
+ v1AT_DMarkErr = 0x05 - v1ATABaseErrCode, /* 0xF905: -0x1DC0 */
+ v1AT_BadBlkErr = 0x06 - v1ATABaseErrCode, /* 0xF906: -0x1DC0 */
+ v1AT_CorDataErr = 0x07 - v1ATABaseErrCode, /* 0xF907: -0x1DC0 */
+ v1AT_UncDataErr = 0x08 - v1ATABaseErrCode, /* 0xF908: -0x1DC0 */
+ v1AT_SeekErr = 0x09 - v1ATABaseErrCode, /* 0xF909: -0x1DC0 */
+ v1AT_WrFltErr = 0x0A - v1ATABaseErrCode, /* 0xF90A: -0x1DC0 */
+ v1AT_RecalErr = 0x0B - v1ATABaseErrCode, /* 0xF90B: -0x1DC0 */
+ v1AT_AbortErr = 0x0C - v1ATABaseErrCode, /* 0xF90C: -0x1DC0 */
+ v1AT_NoAddrErr = 0x0D - v1ATABaseErrCode, /* 0xF90D: -0x1D8D */
+ v1AT_MCErr = 0x0E - v1ATABaseErrCode, /* 0xF90E: -0x1DC0*/
+ /* System error codes...Custom Driver Error Codes*/
+ v1DRVRCantAllocate = -(v1ATABaseErrCode + 1), /* 0xF8FF: -0x1D9F*/
+ v1NoATAMgr = -(v1ATABaseErrCode + 2), /* 0xF8FE: -0x1D9D*/
+ v1ATAInitFail = -(v1ATABaseErrCode + 3), /* 0xF8FD: -0x1D9B*/
+ v1ATABufFail = -(v1ATABaseErrCode + 4), /* 0xF8FC: -0x1D99*/
+ v1ATADevUnsupported = -(v1ATABaseErrCode + 5), /* 0xF8FB: -0x1c97*/
+ /* Manager Error Codes*/
+ v1ATAMgrNotInitialized = -(v1ATABaseErrCode + 10), /* 0xF8F6: -0x1D86*/
+ v1ATAPBInvalid = -(v1ATABaseErrCode + 11), /* 0xF8F5: -0x1D84*/
+ v1ATAFuncNotSupported = -(v1ATABaseErrCode + 12), /* 0xF8F4: -0x1D82*/
+ v1ATABusy = -(v1ATABaseErrCode + 13), /* 0xF8F3: -0x1D80*/
+ v1ATATransTimeOut = -(v1ATABaseErrCode + 14), /* 0xF8F2: -0x1D7E*/
+ v1ATAReqInProg = -(v1ATABaseErrCode + 15), /* 0xF8F1: -0x1D7C*/
+ v1ATAUnknownState = -(v1ATABaseErrCode + 16), /* 0xF8F0: -0x1D7A*/
+ v1ATAQLocked = -(v1ATABaseErrCode + 17), /* 0xF8EF: -0x1D78*/
+ v1ATAReqAborted = -(v1ATABaseErrCode + 18), /* 0xF8EE: -0x1D76*/
+ v1ATAUnableToAbort = -(v1ATABaseErrCode + 19), /* 0xF8ED: -0x1D74*/
+ v1ATAAbortedDueToRst = -(v1ATABaseErrCode + 20) /* 0xF8EC: -0x1D72*/
+};
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __ATA__ */
+
diff --git a/include/qt/ATSLayoutTypes.h b/include/qt/ATSLayoutTypes.h
new file mode 100644
index 000000000..0e6da92de
--- /dev/null
+++ b/include/qt/ATSLayoutTypes.h
@@ -0,0 +1,151 @@
+/*
+ File: ATSLayoutTypes.h
+
+ Contains: Apple Text Services layout public structures and constants.
+
+ Version: Technology: Allegro
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __ATSLAYOUTTYPES__
+#define __ATSLAYOUTTYPES__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __SFNTTYPES__
+#include "SFNTTypes.h"
+#endif
+
+#ifndef __SFNTLAYOUTTYPES__
+#include "SFNTLayoutTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* --------------------------------------------------------------------------- */
+/* CONSTANTS */
+/* --------------------------------------------------------------------------- */
+/* Miscellaneous constants */
+enum {
+ kATSItalicQDSkew = (1 << 16) / 4, /* fixed value of 0.25 */
+ kATSRadiansFactor = 1144, /* fixed value of approx. pi/180 (0.0174560546875) */
+ kATSUseLineHeight = 0x7FFFFFFF, /* assignment to use natural line ascent/descent values */
+ kATSNoTracking = (long)0x80000000 /* negativeInfinity */
+};
+
+/* LineOptions flags */
+enum {
+ kATSLineNoLayoutOptions = 0x00000000, /* no options */
+ kATSLineIsDisplayOnly = 0x00000001, /* specifies to optimize for displaying text only */
+ kATSLineHasNoHangers = 0x00000002, /* specifies that no hangers to be formed on the line */
+ kATSLineHasNoOpticalAlignment = 0x00000004, /* specifies that no optical alignment to be performed on the line */
+ kATSLineKeepSpacesOutOfMargin = 0x00000008, /* specifies that space charcters should not be treated as hangers */
+ kATSLineNoSpecialJustification = 0x00000010, /* specifies no post-compensation justification is to be performed */
+ kATSLineLastNoJustification = 0x00000020, /* specifies that if the line is the last of a paragraph, it will not get justified */
+ kATSLineFractDisable = 0x00000040, /* specifies that the displayed line glyphs will adjust for device metrics */
+ kATSLineImposeNoAngleForEnds = 0x00000080, /* specifies that the carets at the ends of the line will be guarenteed to be perpendicular to the baseline */
+ kATSLineFillOutToWidth = 0x00000100, /* highlights for the line end characters will be extended to 0 and the specified line width */
+ kATSLineTabAdjustEnabled = 0x00000200, /* specifies that the tab character width will be automatically adjusted to fit the specified line width */
+ kATSLineAppleReserved = (long)0xFFFFFC00 /* these bits are reserved by Apple and will result in a invalid value error if attemped to set */
+};
+
+/* For accessing glyph bounds */
+enum {
+ kATSUseCaretOrigins = 0,
+ kATSUseDeviceOrigins = 1,
+ kATSUseFractionalOrigins = 2,
+ kATSUseOriginFlags = 3
+};
+
+/* --------------------------------------------------------------------------- */
+/* TYPES */
+/* --------------------------------------------------------------------------- */
+typedef UInt32 ATSLineLayoutOptions;
+/*
+ Each individual glyph is assigned an index of its needed style
+ which could be changed during the layout process (in that case, the associated style's
+ ATSStyleSetting styleFlags field would have its kStyleSynthesized bit set).
+
+|*
+ The ATSTrapezoid structure supplies a convenient container
+ for glyph bounds in trapezoidal form.
+*/
+
+struct ATSTrapezoid {
+ FixedPoint upperLeft;
+ FixedPoint upperRight;
+ FixedPoint lowerRight;
+ FixedPoint lowerLeft;
+};
+typedef struct ATSTrapezoid ATSTrapezoid;
+/*
+ The JustWidthDeltaEntryOverride structure specifies values for the grow and shrink case during
+ justification, both on the left and on the right. It also contains flags. This particular structure
+ is used for passing justification overrides to LLC. For further sfnt resource 'just' table
+ constants and structures, see SFNTLayoutTypes.h.
+*/
+
+struct ATSJustWidthDeltaEntryOverride {
+ Fixed beforeGrowLimit; /* ems AW can grow by at most on LT */
+ Fixed beforeShrinkLimit; /* ems AW can shrink by at most on LT */
+ Fixed afterGrowLimit; /* ems AW can grow by at most on RB */
+ Fixed afterShrinkLimit; /* ems AW can shrink by at most on RB */
+ JustificationFlags growFlags; /* flags controlling grow case */
+ JustificationFlags shrinkFlags; /* flags controlling shrink case */
+};
+typedef struct ATSJustWidthDeltaEntryOverride ATSJustWidthDeltaEntryOverride;
+/* The JustPriorityOverrides type is an array of 4 width delta records, one per priority level override. */
+
+typedef ATSJustWidthDeltaEntryOverride ATSJustPriorityWidthDeltaOverrides[4];
+/* --------------------------------------------------------------------------- */
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __ATSLAYOUTTYPES__ */
+
diff --git a/include/qt/ATSTypes.h b/include/qt/ATSTypes.h
new file mode 100644
index 000000000..6d8bfff95
--- /dev/null
+++ b/include/qt/ATSTypes.h
@@ -0,0 +1,122 @@
+/*
+ File: ATSTypes.h
+
+ Contains: Public interfaces for Apple Type Services components.
+
+ Version: Technology: Post-Sonata, Post-Carbon 1.01
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1997-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __ATSTYPES__
+#define __ATSTYPES__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* ----------------------------------------------------------------------------------------- */
+/* CONSTANTS */
+/* Miscellaneous constants */
+enum {
+ kATSItalicQDSkew = (1 << 16) / 4, /* fixed value of 0.25 */
+ kATSRadiansFactor = 1144 /* fixed value of approx. pi/180 (0.0174560546875) */
+};
+
+/* Glyph outline path constants used in ATSGetGlyphPaths */
+enum {
+ kATSCubicCurveType = 0x0001,
+ kATSQuadCurveType = 0x0002
+};
+
+/* --------------------------------------------------------------------------- */
+/* TYPES */
+/* --------------------------------------------------------------------------- */
+typedef UInt16 GlyphID;
+typedef UInt16 ATSCurveType;
+/*
+ The StyleGroupPtr contains all of the style attributes associated with a run
+ of glyphs.
+*/
+typedef struct AttributeGroup *ATSStyleGroupPtr;
+
+struct ATSStyleSetting {
+ ATSStyleGroupPtr style; /* The style attribute group */
+ UInt32 styleFlags; /* Flag bits for this style */
+};
+typedef struct ATSStyleSetting ATSStyleSetting;
+/* Mapping3x3 is the basic matrix type. The third column actually contains Fract numbers */
+
+struct Mapping3x3 {
+ Fixed map[3][3];
+};
+typedef struct Mapping3x3 Mapping3x3;
+/* Rendering metrics type */
+
+struct ATSGlyphRenderingMetrics {
+ FixedPoint deviceAdvance;
+ FixedPoint topLeft;
+ UInt16 height;
+ UInt16 width;
+ FixedPoint sideBearing;
+ FixedPoint otherSideBearing;
+};
+typedef struct ATSGlyphRenderingMetrics ATSGlyphRenderingMetrics;
+/* Fractional metrics types */
+
+struct ATSGlyphFractionalMetrics {
+ FixedPoint advance;
+ FixedPoint sideBearing;
+ FixedPoint otherSideBearing;
+};
+typedef struct ATSGlyphFractionalMetrics ATSGlyphFractionalMetrics;
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __ATSTYPES__ */
+
diff --git a/include/qt/ATSUnicode.h b/include/qt/ATSUnicode.h
new file mode 100644
index 000000000..8c90fe990
--- /dev/null
+++ b/include/qt/ATSUnicode.h
@@ -0,0 +1,1054 @@
+/*
+ File: ATSUnicode.h
+
+ Contains: Public interfaces for Apple Type Services for Unicode Imaging
+
+ Version: Technology: Mac OS 9
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1997-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __ATSUNICODE__
+#define __ATSUNICODE__
+
+#ifndef __ATSLAYOUTTYPES__
+#include "ATSLayoutTypes.h"
+#endif
+
+#ifndef __SFNTLAYOUTTYPES__
+#include "SFNTLayoutTypes.h"
+#endif
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MACMEMORY__
+#include "MacMemory.h"
+#endif
+
+#ifndef __FONTS__
+#include "Fonts.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#ifndef __TEXTCOMMON__
+#include "TextCommon.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/************/
+/* Types */
+/************/
+/*
+ UniCharArrayHandle and UniCharArrayOffset are defined in the
+ TextCommon interface file.
+*/
+
+/*
+ ATSUTextMeasurement is specific to ATSUI in that measurement
+ quantities are in fractional Fixed format instead of shorts
+ used in QuickDraw Text. This provides exact outline metrics and
+ line specifications such as line width, ascent, descent, and so on.
+*/
+
+typedef Fixed ATSUTextMeasurement;
+/*
+ ATSUFontID indicates a particular font family and face.
+ ATSUFontID's are not guaranteed to remain constant across
+ reboots. Clients should use the font's unique name to
+ get a font token to store in documents which is
+ guaranteed to remain constant across reboots.
+*/
+typedef FMFont ATSUFontID;
+/*
+ ATSUFontFeatureType and ATSUFontFeatureSelector are used
+ to identify font features.
+*/
+typedef UInt16 ATSUFontFeatureType;
+typedef UInt16 ATSUFontFeatureSelector;
+/*
+ ATSUFontVariationAxis and ATSUFontVariationValue are used
+ in connection with font variations.
+*/
+typedef FourCharCode ATSUFontVariationAxis;
+typedef Fixed ATSUFontVariationValue;
+/*
+ ATSUTextLayout is used to store the attribute information
+ associated with a contiguous block of UniChar's (UInt16's)
+ in memory. It's typed to be an opaque structure.
+*/
+
+typedef struct OpaqueATSUTextLayout* ATSUTextLayout;
+/*
+ ATSUStyle is used to store a set of individual attributes,
+ font features, and font variations. It's typed to be
+ an opaque structure.
+*/
+typedef struct OpaqueATSUStyle* ATSUStyle;
+/*
+ ATSUAttributeTag is used to indicate the particular type
+ of attribute under consideration: font, size, color,
+ and so on.
+ Each style run may have at most one attribute with a
+ given ATSUAttributeTag (i.e., a style run can't have
+ more than one font or size) but may have none.
+*/
+typedef UInt32 ATSUAttributeTag;
+/*
+ ATSUAttributeValuePtr is used to provide generic access
+ to storage of attribute values, which vary in size.
+*/
+typedef void * ATSUAttributeValuePtr;
+/*
+ ATSUAttributeInfo is used to provide a tag/size pairing.
+ This makes it possible to provide the client information
+ about all the attributes for a given range of text. This
+ structure is only used to return to the client information
+ about a complete set of attributes. An array of
+ ATSUAttributeInfos is passed as a parameter so that the
+ client can find out what attributes are set and what their
+ individual sizes are; with that information, they can then
+ query about the values of the attributes they're interested
+ in. Because arrays of ATSUAttributeInfos are used as parameters
+ to functions, they have to be of a fixed size, hence the
+ value is not included in the structure.
+*/
+
+struct ATSUAttributeInfo {
+ ATSUAttributeTag fTag;
+ ByteCount fValueSize;
+};
+typedef struct ATSUAttributeInfo ATSUAttributeInfo;
+/*
+ ATSUCaret contains the complete information needed to render a
+ caret. fX and fY is the position of one of the caret's ends
+ relative to the origin position of the line the caret belongs.
+ fDeltaX and fDeltaY is the position of the caret's other end.
+ Hence, to draw a caret, simply call MoveTo(fX, fY) followed by
+ LineTo(fDeltaX, fDeltaY) or equivalent. The ATSUCaret will
+ contain the positions needed to draw carets on angled lines
+ and reflect angled carets and leading/trailing split caret
+ appearances.
+*/
+
+struct ATSUCaret {
+ Fixed fX;
+ Fixed fY;
+ Fixed fDeltaX;
+ Fixed fDeltaY;
+};
+typedef struct ATSUCaret ATSUCaret;
+/*
+ ATSUCursorMovementType currently can take three values
+ (kATSUByCharacter, kATSUByCluster, and kATSUByWord)
+ and is used to indicate how much to move the cursor.
+*/
+
+typedef UInt16 ATSUCursorMovementType;
+/*
+ ATSUVerticalCharacterType currently can take two values
+ (kATSUStronglyVertical, and kATSUStronglyHorizontal) and
+ is used to indicate whether text is to be laid out as
+ vertical glyphs or horizontal glyphs.
+*/
+typedef UInt16 ATSUVerticalCharacterType;
+/*
+ ATSUStyleComparison is an enumeration with four values
+ (kATUStyleUnequal, ATSUStyleContains, kATSUStyleEquals,
+ and kATSUStyleContainedBy), and is used by ATSUCompareStyles()
+ to indicate if the first style parameter contains as a
+ proper subset, is equal to, or is contained by the second
+ style parameter.
+*/
+typedef UInt16 ATSUStyleComparison;
+/*
+ ATSUFontFallbackMethod type defines the type of heap or memory callback
+ method ATSUI is to follow iin all its permanent memory allocations for
+ it clients.
+*/
+typedef UInt16 ATSUFontFallbackMethod;
+/*
+ ATSUMemoryCallbacks is a union struct that allows the ATSUI
+ client to specify a specific heap for ATSUI use or allocation
+ callbacks of which ATSUI is to use each time ATSUI performs a
+ memory operation (alloc, grow, free).
+*/
+typedef CALLBACK_API_C( void *, ATSUCustomAllocFunc )(void *refCon, ByteCount howMuch);
+typedef CALLBACK_API_C( void , ATSUCustomFreeFunc )(void *refCon, void *doomedBlock);
+typedef CALLBACK_API_C( void *, ATSUCustomGrowFunc )(void *refCon, void *oldBlock, ByteCount oldSize, ByteCount newSize);
+
+union ATSUMemoryCallbacks {
+ struct {
+ ATSUCustomAllocFunc Alloc;
+ ATSUCustomFreeFunc Free;
+ ATSUCustomGrowFunc Grow;
+ void * memoryRefCon;
+ } callbacks;
+
+ THz heapToUse;
+};
+typedef union ATSUMemoryCallbacks ATSUMemoryCallbacks;
+/*
+ ATSUHeapSpec provides allows the ATSUI client a means of
+ specifying the heap ATSUI should allocate it's dynamic memory
+ from or that ATSUI should use the memory callback provided by
+ the client.
+*/
+
+typedef UInt16 ATSUHeapSpec;
+/*
+ ATSUMemorySetting is used to store the results from a ATSUSetMemoryAlloc
+ or a ATSUGetCurrentMemorySetting call. It can also be used to change the
+ current ATSUMemorySetting by passing it into the ATSUSetCurrentMemorySetting
+ call.
+*/
+typedef struct OpaqueATSUMemorySetting* ATSUMemorySetting;
+/*******************************************************************************/
+/* ATSUI Attribute tags: Apple reserves values 0 to 65,535 (0 to 0x0000FFFF) */
+/* ATSUI clients may create their own tags with any other value */
+/*******************************************************************************/
+/* Line Control Attribute Tags */
+enum {
+ kATSULineWidthTag = 1L, /* Type: ATSUTextMeasurement*/
+ /* Default value: 0*/
+ kATSULineRotationTag = 2L, /* Type: Fixed (fixed value in degrees in right-handed coordinate system)*/
+ /* Default value: 0*/
+ kATSULineDirectionTag = 3L, /* Type: Boolean; values 0 or 1 (see below for value identities)*/
+ /* Default value: GetSysDirection() ? kATSURightToLeftBaseDirection : kATSULeftToRightBaseDirection*/
+ kATSULineJustificationFactorTag = 4L, /* Type: Fract between 0 and 1*/
+ /* Default value: kATSUNoJustification*/
+ kATSULineFlushFactorTag = 5L, /* Type: Fract between 0 and 1 */
+ /* Default value: kATSUStartAlignment*/
+ kATSULineBaselineValuesTag = 6L, /* Type: BslnBaselineRecord*/
+ /* Default value: All zeros. Calculated from other style attributes (e.g., font and point size)*/
+ kATSULineLayoutOptionsTag = 7L, /* Type: UInt32*/
+ /* Default value: kATSLineNoLayoutOptions - other options listed in ATSLayoutTypes.h*/
+ kATSULineAscentTag = 8L, /* Type: ATSUTextMeasurement*/
+ /* Default value: kATSUseLineHeight*/
+ kATSULineDescentTag = 9L, /* Type: ATSUTextMeasurement*/
+ /* Default value: kATSUseLineHeight*/
+ kATSULineLanguageTag = 10L, /* Type: RegionCode - region values listed in script.h interface file*/
+ /* Default value: kTextRegionDontCare*/
+ kATSULineTextLocatorTag = 11L, /* Type: TextBreakLocatorRef*/
+ /* Default value: NULL - set Region derived locator or the default Text Utilities locator*/
+ kATSUMaxLineTag = 12L /* This is just for convenience - the upper limit of the ATSUTextLayout attribute tags */
+};
+
+/* Run Style Attribute Tags */
+enum {
+ /* QuickDraw compatibility tags */
+ kATSUQDBoldfaceTag = 256L, /* Type: Boolean */
+ /* Default value: false*/
+ kATSUQDItalicTag = 257L, /* Type: Boolean */
+ /* Default value: false*/
+ kATSUQDUnderlineTag = 258L, /* Type: Boolean */
+ /* Default value: false*/
+ kATSUQDCondensedTag = 259L, /* Type: Boolean */
+ /* Default value: false*/
+ kATSUQDExtendedTag = 260L, /* Type: Boolean */
+ /* Default value: false*/
+ /* Common run tags */
+ kATSUFontTag = 261L, /* Type: ATSUFontID */
+ /* Default value: GetScriptVariable( smSystemScript, smScriptAppFond )*/
+ kATSUSizeTag = 262L, /* Type: Fixed */
+ /* Default value: GetScriptVariable( smSystemScript, smScriptAppFondSize ) */
+ kATSUColorTag = 263L, /* Type: RGBColor */
+ /* Default value: (0, 0, 0)*/
+ /* Less common run tags */
+ kATSULanguageTag = 264L, /* Type: RegionCode - region values listed in script.h interface file*/
+ /* Default value: GetScriptManagerVariable( smRegionCode )*/
+ kATSUVerticalCharacterTag = 265L, /* Type: ATSUVerticalCharacterType */
+ /* Default value: kATSUStronglyHorizontal*/
+ kATSUImposeWidthTag = 266L, /* Type: ATSUTextMeasurement*/
+ /* Default value: all glyphs use their own font defined advance widths*/
+ kATSUBeforeWithStreamShiftTag = 267L, /* Type: Fixed*/
+ /* Default value: 0*/
+ kATSUAfterWithStreamShiftTag = 268L, /* Type: Fixed*/
+ /* Default value: 0*/
+ kATSUCrossStreamShiftTag = 269L, /* Type: Fixed*/
+ /* Default value: 0*/
+ kATSUTrackingTag = 270L, /* Type: Fixed*/
+ /* Default value: kATSNoTracking*/
+ kATSUHangingInhibitFactorTag = 271L, /* Type: Fract between 0 and 1*/
+ /* Default value: 0*/
+ kATSUKerningInhibitFactorTag = 272L, /* Type: Fract between 0 and 1*/
+ /* Default value: 0*/
+ kATSUDecompositionFactorTag = 273L, /* Type: Fixed (-1.0 -> 1.0)*/
+ /* Default value: 0*/
+ kATSUBaselineClassTag = 274L, /* Type: BslnBaselineClass (see SFNTLayoutTypes.h)*/
+ /* Default value: kBSLNRomanBaseline - set to kBSLNNoBaselineOverride to use intrinsic baselines*/
+ kATSUPriorityJustOverrideTag = 275L, /* Type: ATSJustPriorityWidthDeltaOverrides (see ATSLayoutTypes.h)*/
+ /* Default value: all zeros*/
+ kATSUNoLigatureSplitTag = 276L, /* Type: Boolean*/
+ /* Default value: false - ligatures and compound characters have divisable components.*/
+ kATSUNoCaretAngleTag = 277L, /* Type: Boolean*/
+ /* Default value: false - use the character's angularity to determine its boundaries*/
+ kATSUSuppressCrossKerningTag = 278L, /* Type: Boolean*/
+ /* Default value: false - do not suppress automatic cross kerning (defined by font)*/
+ kATSUNoOpticalAlignmentTag = 279L, /* Type: Boolean*/
+ /* Default value: false - do not suppress character's automatic optical positional alignment*/
+ kATSUForceHangingTag = 280L, /* Type: Boolean*/
+ /* Default value: false - do not force the character's to hang beyond the line boundaries*/
+ kATSUNoSpecialJustificationTag = 281L, /* Type: Boolean*/
+ /* Default value: false - perform post-compensation justification if needed*/
+ kATSUStyleTextLocatorTag = 282L, /* Type: TextBreakLocatorRef*/
+ /* Default value: NULL - region derived locator or the default Text Utilities locator*/
+ kATSUMaxStyleTag = 283L, /* This is just for convenience - the upper limit of the ATSUStyle attribute tags */
+ kATSUMaxATSUITagValue = 65535L /* This is the maximum Apple ATSUI reserved tag value. Client defined tags must be larger.*/
+};
+
+/********************************/
+/* Enumerations and constants */
+/********************************/
+/* Cursor movement */
+enum {
+ kATSUByCharacter = 0,
+ kATSUByCluster = 1,
+ kATSUByWord = 2
+};
+
+/* Vertical text types */
+enum {
+ kATSUStronglyHorizontal = 0,
+ kATSUStronglyVertical = 1
+};
+
+/* Line direction types (used for kATSULineDirectionTag values) */
+enum {
+ kATSULeftToRightBaseDirection = 0, /* Impose left-to-right or top-to-bottom dominant direction */
+ kATSURightToLeftBaseDirection = 1 /* Impose right-to-left or bottom-to-top dominant direction */
+};
+
+/* Style comparison types */
+enum {
+ kATSUStyleUnequal = 0,
+ kATSUStyleContains = 1,
+ kATSUStyleEquals = 2,
+ kATSUStyleContainedBy = 3
+};
+
+/* Font Fallback methods */
+enum {
+ kATSUDefaultFontFallbacks = 0,
+ kATSULastResortOnlyFallback = 1,
+ kATSUSequentialFallbacksPreferred = 2,
+ kATSUSequentialFallbacksExclusive = 3
+};
+
+/* ATSUI heap or memory allocation specifiers (of type ATSUHeapSpec) */
+enum {
+ kATSUUseCurrentHeap = 0,
+ kATSUUseAppHeap = 1,
+ kATSUUseSpecificHeap = 2,
+ kATSUUseCallbacks = 3
+};
+
+/* LineFlushFactor convenience defined values */
+#define kATSUStartAlignment ((Fract) 0x00000000L)
+#define kATSUEndAlignment ((Fract) 0x40000000L)
+#define kATSUCenterAlignment ((Fract) 0x20000000L)
+/* LineJustificationFactor convenience defined values */
+#define kATSUNoJustification ((Fract) 0x00000000L)
+#define kATSUFullJustification ((Fract) 0x40000000L)
+/* Other constants */
+enum {
+ kATSUInvalidFontID = 0
+};
+
+
+enum {
+ kATSUUseLineControlWidth = 0x7FFFFFFF
+};
+
+
+enum {
+ kATSUNoSelector = 0x0000FFFF
+};
+
+
+enum {
+ kATSUUseGrafPortPenLoc = (long)0xFFFFFFFF,
+ kATSUClearAll = (long)0xFFFFFFFF
+};
+
+
+enum {
+ kATSUFromTextBeginning = (long)0xFFFFFFFF,
+ kATSUToTextEnd = (long)0xFFFFFFFF
+};
+
+
+/****************/
+/* Functions */
+/****************/
+
+/* Clipboard support, flattened style version 0 (is is advised to not use these routines and perform your own flattening) */
+EXTERN_API_C( OSStatus )
+ATSUCopyToHandle (ATSUStyle iStyle,
+ Handle oStyleHandle);
+
+EXTERN_API_C( OSStatus )
+ATSUPasteFromHandle (ATSUStyle iStyle,
+ Handle iStyleHandle);
+
+/* Memory allocation specification functions */
+EXTERN_API_C( OSStatus )
+ATSUCreateMemorySetting (ATSUHeapSpec iHeapSpec,
+ ATSUMemoryCallbacks * iMemoryCallbacks,
+ ATSUMemorySetting * oMemorySetting);
+
+EXTERN_API_C( OSStatus )
+ATSUSetCurrentMemorySetting (ATSUMemorySetting iMemorySetting);
+
+EXTERN_API_C( ATSUMemorySetting )
+ATSUGetCurrentMemorySetting (void);
+
+EXTERN_API_C( OSStatus )
+ATSUDisposeMemorySetting (ATSUMemorySetting iMemorySetting);
+
+/* Basic style functions */
+EXTERN_API_C( OSStatus )
+ATSUCreateStyle (ATSUStyle * oStyle);
+
+EXTERN_API_C( OSStatus )
+ATSUCreateAndCopyStyle (ATSUStyle iStyle,
+ ATSUStyle * oStyle);
+
+EXTERN_API_C( OSStatus )
+ATSUDisposeStyle (ATSUStyle iStyle);
+
+EXTERN_API_C( OSStatus )
+ATSUSetStyleRefCon (ATSUStyle iStyle,
+ UInt32 iRefCon);
+
+EXTERN_API_C( OSStatus )
+ATSUGetStyleRefCon (ATSUStyle iStyle,
+ UInt32 * oRefCon);
+
+/* Style comparison */
+EXTERN_API_C( OSStatus )
+ATSUCompareStyles (ATSUStyle iFirstStyle,
+ ATSUStyle iSecondStyle,
+ ATSUStyleComparison * oComparison);
+
+/* Attribute manipulations */
+EXTERN_API_C( OSStatus )
+ATSUCopyAttributes (ATSUStyle iSourceStyle,
+ ATSUStyle iDestinationStyle);
+
+EXTERN_API_C( OSStatus )
+ATSUOverwriteAttributes (ATSUStyle iSourceStyle,
+ ATSUStyle iDestinationStyle);
+
+EXTERN_API_C( OSStatus )
+ATSUUnderwriteAttributes (ATSUStyle iSourceStyle,
+ ATSUStyle iDestinationStyle);
+
+/* Empty styles */
+EXTERN_API_C( OSStatus )
+ATSUClearStyle (ATSUStyle iStyle);
+
+EXTERN_API_C( OSStatus )
+ATSUStyleIsEmpty (ATSUStyle iStyle,
+ Boolean * oIsClear);
+
+/* Get and set attributes */
+EXTERN_API_C( OSStatus )
+ATSUCalculateBaselineDeltas (ATSUStyle iStyle,
+ BslnBaselineClass iBaselineClass,
+ BslnBaselineRecord oBaselineDeltas);
+
+EXTERN_API_C( OSStatus )
+ATSUSetAttributes (ATSUStyle iStyle,
+ ItemCount iAttributeCount,
+ ATSUAttributeTag iTag[],
+ ByteCount iValueSize[],
+ ATSUAttributeValuePtr iValue[]);
+
+EXTERN_API_C( OSStatus )
+ATSUGetAttribute (ATSUStyle iStyle,
+ ATSUAttributeTag iTag,
+ ByteCount iExpectedValueSize,
+ ATSUAttributeValuePtr oValue,
+ ByteCount * oActualValueSize);
+
+EXTERN_API_C( OSStatus )
+ATSUGetAllAttributes (ATSUStyle iStyle,
+ ATSUAttributeInfo oAttributeInfoArray[],
+ ItemCount iTagValuePairArraySize,
+ ItemCount * oTagValuePairCount);
+
+EXTERN_API_C( OSStatus )
+ATSUClearAttributes (ATSUStyle iStyle,
+ ItemCount iTagCount,
+ ATSUAttributeTag iTag[]);
+
+/* Font features */
+EXTERN_API_C( OSStatus )
+ATSUSetFontFeatures (ATSUStyle iStyle,
+ ItemCount iFeatureCount,
+ ATSUFontFeatureType iType[],
+ ATSUFontFeatureSelector iSelector[]);
+
+EXTERN_API_C( OSStatus )
+ATSUGetFontFeature (ATSUStyle iStyle,
+ ItemCount iFeatureIndex,
+ ATSUFontFeatureType * oFeatureType,
+ ATSUFontFeatureSelector * oFeatureSelector);
+
+EXTERN_API_C( OSStatus )
+ATSUGetAllFontFeatures (ATSUStyle iStyle,
+ ItemCount iMaximumFeatureCount,
+ ATSUFontFeatureType oFeatureType[],
+ ATSUFontFeatureSelector oFeatureSelector[],
+ ItemCount * oActualFeatureCount);
+
+EXTERN_API_C( OSStatus )
+ATSUClearFontFeatures (ATSUStyle iStyle,
+ ItemCount iFeatureCount,
+ ATSUFontFeatureType iType[],
+ ATSUFontFeatureSelector iSelector[]);
+
+/* Font variations */
+EXTERN_API_C( OSStatus )
+ATSUSetVariations (ATSUStyle iStyle,
+ ItemCount iVariationCount,
+ ATSUFontVariationAxis iAxes[],
+ ATSUFontVariationValue iValue[]);
+
+EXTERN_API_C( OSStatus )
+ATSUGetFontVariationValue (ATSUStyle iStyle,
+ ATSUFontVariationAxis iFontVariationAxis,
+ ATSUFontVariationValue * oFontVariationValue);
+
+EXTERN_API_C( OSStatus )
+ATSUGetAllFontVariations (ATSUStyle iStyle,
+ ItemCount iVariationCount,
+ ATSUFontVariationAxis oVariationAxes[],
+ ATSUFontVariationValue oFontVariationValues[],
+ ItemCount * oActualVariationCount);
+
+EXTERN_API_C( OSStatus )
+ATSUClearFontVariations (ATSUStyle iStyle,
+ ItemCount iAxisCount,
+ ATSUFontVariationAxis iAxis[]);
+
+/* Basic text-layout functions */
+EXTERN_API_C( OSStatus )
+ATSUCreateTextLayout (ATSUTextLayout * oTextLayout);
+
+EXTERN_API_C( OSStatus )
+ATSUCreateAndCopyTextLayout (ATSUTextLayout iTextLayout,
+ ATSUTextLayout * oTextLayout);
+
+EXTERN_API_C( OSStatus )
+ATSUCreateTextLayoutWithTextPtr (ConstUniCharArrayPtr iText,
+ UniCharArrayOffset iTextOffset,
+ UniCharCount iTextLength,
+ UniCharCount iTextTotalLength,
+ ItemCount iNumberOfRuns,
+ UniCharCount iRunLengths[],
+ ATSUStyle iStyles[],
+ ATSUTextLayout * oTextLayout);
+
+EXTERN_API_C( OSStatus )
+ATSUCreateTextLayoutWithTextHandle (UniCharArrayHandle iText,
+ UniCharArrayOffset iTextOffset,
+ UniCharCount iTextLength,
+ UniCharCount iTextTotalLength,
+ ItemCount iNumberOfRuns,
+ UniCharCount iRunLengths[],
+ ATSUStyle iStyles[],
+ ATSUTextLayout * oTextLayout);
+
+EXTERN_API_C( OSStatus )
+ATSUClearLayoutCache (ATSUTextLayout iTextLayout,
+ UniCharArrayOffset iLineStart);
+
+EXTERN_API_C( OSStatus )
+ATSUDisposeTextLayout (ATSUTextLayout iTextLayout);
+
+EXTERN_API_C( OSStatus )
+ATSUSetTextLayoutRefCon (ATSUTextLayout iTextLayout,
+ UInt32 iRefCon);
+
+EXTERN_API_C( OSStatus )
+ATSUGetTextLayoutRefCon (ATSUTextLayout iTextLayout,
+ UInt32 * oRefCon);
+
+/* Glyph bounds retrieval */
+EXTERN_API_C( OSStatus )
+ATSUGetGlyphBounds (ATSUTextLayout iTextLayout,
+ ATSUTextMeasurement iTextBasePointX,
+ ATSUTextMeasurement iTextBasePointY,
+ UniCharArrayOffset iBoundsCharStart,
+ UniCharCount iBoundsCharLength,
+ UInt16 iTypeOfBounds,
+ ItemCount iMaxNumberOfBounds,
+ ATSTrapezoid oGlyphBounds[],
+ ItemCount * oActualNumberOfBounds);
+
+/* Idle processing */
+EXTERN_API_C( OSStatus )
+ATSUIdle (ATSUTextLayout iTextLayout);
+
+/* Text location */
+EXTERN_API_C( OSStatus )
+ATSUSetTextPointerLocation (ATSUTextLayout iTextLayout,
+ ConstUniCharArrayPtr iText,
+ UniCharArrayOffset iTextOffset,
+ UniCharCount iTextLength,
+ UniCharCount iTextTotalLength);
+
+EXTERN_API_C( OSStatus )
+ATSUSetTextHandleLocation (ATSUTextLayout iTextLayout,
+ UniCharArrayHandle iText,
+ UniCharArrayOffset iTextOffset,
+ UniCharCount iTextLength,
+ UniCharCount iTextTotalLength);
+
+EXTERN_API_C( OSStatus )
+ATSUGetTextLocation (ATSUTextLayout iTextLayout,
+ void ** oText,
+ Boolean * oTextIsStoredInHandle,
+ UniCharArrayOffset * oOffset,
+ UniCharCount * oTextLength,
+ UniCharCount * oTextTotalLength);
+
+/* Text manipulation */
+EXTERN_API_C( OSStatus )
+ATSUTextDeleted (ATSUTextLayout iTextLayout,
+ UniCharArrayOffset iDeletedRangeStart,
+ UniCharCount iDeletedRangeLength);
+
+EXTERN_API_C( OSStatus )
+ATSUTextInserted (ATSUTextLayout iTextLayout,
+ UniCharArrayOffset iInsertionLocation,
+ UniCharCount iInsertionLength);
+
+EXTERN_API_C( OSStatus )
+ATSUTextMoved (ATSUTextLayout iTextLayout,
+ ConstUniCharArrayPtr iNewLocation);
+
+/* Layout controls */
+EXTERN_API_C( OSStatus )
+ATSUCopyLayoutControls (ATSUTextLayout iSourceTextLayout,
+ ATSUTextLayout iDestTextLayout);
+
+EXTERN_API_C( OSStatus )
+ATSUSetLayoutControls (ATSUTextLayout iTextLayout,
+ ItemCount iAttributeCount,
+ ATSUAttributeTag iTag[],
+ ByteCount iValueSize[],
+ ATSUAttributeValuePtr iValue[]);
+
+EXTERN_API_C( OSStatus )
+ATSUGetLayoutControl (ATSUTextLayout iTextLayout,
+ ATSUAttributeTag iTag,
+ ByteCount iExpectedValueSize,
+ ATSUAttributeValuePtr oValue,
+ ByteCount * oActualValueSize);
+
+EXTERN_API_C( OSStatus )
+ATSUGetAllLayoutControls (ATSUTextLayout iTextLayout,
+ ATSUAttributeInfo oAttributeInfoArray[],
+ ItemCount iTagValuePairArraySize,
+ ItemCount * oTagValuePairCount);
+
+EXTERN_API_C( OSStatus )
+ATSUClearLayoutControls (ATSUTextLayout iTextLayout,
+ ItemCount iTagCount,
+ ATSUAttributeTag iTag[]);
+
+/* Single line layout controls */
+EXTERN_API_C( OSStatus )
+ATSUCopyLineControls (ATSUTextLayout iSourceTextLayout,
+ UniCharArrayOffset iSourceLineStart,
+ ATSUTextLayout iDestTextLayout,
+ UniCharArrayOffset iDestLineStart);
+
+EXTERN_API_C( OSStatus )
+ATSUSetLineControls (ATSUTextLayout iTextLayout,
+ UniCharArrayOffset iLineStart,
+ ItemCount iAttributeCount,
+ ATSUAttributeTag iTag[],
+ ByteCount iValueSize[],
+ ATSUAttributeValuePtr iValue[]);
+
+EXTERN_API_C( OSStatus )
+ATSUGetLineControl (ATSUTextLayout iTextLayout,
+ UniCharArrayOffset iLineStart,
+ ATSUAttributeTag iTag,
+ ByteCount iExpectedValueSize,
+ ATSUAttributeValuePtr oValue,
+ ByteCount * oActualValueSize);
+
+EXTERN_API_C( OSStatus )
+ATSUGetAllLineControls (ATSUTextLayout iTextLayout,
+ UniCharArrayOffset iLineStart,
+ ATSUAttributeInfo oAttributeInfoArray[],
+ ItemCount iTagValuePairArraySize,
+ ItemCount * oTagValuePairCount);
+
+EXTERN_API_C( OSStatus )
+ATSUClearLineControls (ATSUTextLayout iTextLayout,
+ UniCharArrayOffset iLineStart,
+ ItemCount iTagCount,
+ ATSUAttributeTag iTag[]);
+
+/* Style run processing */
+EXTERN_API_C( OSStatus )
+ATSUSetRunStyle (ATSUTextLayout iTextLayout,
+ ATSUStyle iStyle,
+ UniCharArrayOffset iRunStart,
+ UniCharCount iRunLength);
+
+EXTERN_API_C( OSStatus )
+ATSUGetRunStyle (ATSUTextLayout iTextLayout,
+ UniCharArrayOffset iOffset,
+ ATSUStyle * oStyle,
+ UniCharArrayOffset * oRunStart,
+ UniCharCount * oRunLength);
+
+EXTERN_API_C( OSStatus )
+ATSUGetContinuousAttributes (ATSUTextLayout iTextLayout,
+ UniCharArrayOffset iOffset,
+ UniCharCount iLength,
+ ATSUStyle oStyle);
+
+/* Drawing and measuring */
+EXTERN_API_C( OSStatus )
+ATSUDrawText (ATSUTextLayout iTextLayout,
+ UniCharArrayOffset iLineOffset,
+ UniCharCount iLineLength,
+ ATSUTextMeasurement iLocationX,
+ ATSUTextMeasurement iLocationY);
+
+EXTERN_API_C( OSStatus )
+ATSUMeasureText (ATSUTextLayout iTextLayout,
+ UniCharArrayOffset iLineStart,
+ UniCharCount iLineLength,
+ ATSUTextMeasurement * oTextBefore,
+ ATSUTextMeasurement * oTextAfter,
+ ATSUTextMeasurement * oAscent,
+ ATSUTextMeasurement * oDescent);
+
+EXTERN_API_C( OSStatus )
+ATSUMeasureTextImage (ATSUTextLayout iTextLayout,
+ UniCharArrayOffset iLineOffset,
+ UniCharCount iLineLength,
+ ATSUTextMeasurement iLocationX,
+ ATSUTextMeasurement iLocationY,
+ Rect * oTextImageRect);
+
+/* Highlighting */
+EXTERN_API_C( OSStatus )
+ATSUHighlightText (ATSUTextLayout iTextLayout,
+ ATSUTextMeasurement iTextBasePointX,
+ ATSUTextMeasurement iTextBasePointY,
+ UniCharArrayOffset iHighlightStart,
+ UniCharCount iHighlightLength);
+
+EXTERN_API_C( OSStatus )
+ATSUUnhighlightText (ATSUTextLayout iTextLayout,
+ ATSUTextMeasurement iTextBasePointX,
+ ATSUTextMeasurement iTextBasePointY,
+ UniCharArrayOffset iHighlightStart,
+ UniCharCount iHighlightLength);
+
+EXTERN_API_C( OSStatus )
+ATSUGetTextHighlight (ATSUTextLayout iTextLayout,
+ ATSUTextMeasurement iTextBasePointX,
+ ATSUTextMeasurement iTextBasePointY,
+ UniCharArrayOffset iHighlightStart,
+ UniCharCount iHighlightLength,
+ RgnHandle oHighlightRegion);
+
+/* Hit-testing */
+EXTERN_API_C( OSStatus )
+ATSUPositionToOffset (ATSUTextLayout iTextLayout,
+ ATSUTextMeasurement iLocationX,
+ ATSUTextMeasurement iLocationY,
+ UniCharArrayOffset * ioPrimaryOffset,
+ Boolean * oIsLeading,
+ UniCharArrayOffset * oSecondaryOffset);
+
+EXTERN_API_C( OSStatus )
+ATSUOffsetToPosition (ATSUTextLayout iTextLayout,
+ UniCharArrayOffset iOffset,
+ Boolean iIsLeading,
+ ATSUCaret * oMainCaret,
+ ATSUCaret * oSecondCaret,
+ Boolean * oCaretIsSplit);
+
+/* Cursor movement */
+EXTERN_API_C( OSStatus )
+ATSUNextCursorPosition (ATSUTextLayout iTextLayout,
+ UniCharArrayOffset iOldOffset,
+ ATSUCursorMovementType iMovementType,
+ UniCharArrayOffset * oNewOffset);
+
+EXTERN_API_C( OSStatus )
+ATSUPreviousCursorPosition (ATSUTextLayout iTextLayout,
+ UniCharArrayOffset iOldOffset,
+ ATSUCursorMovementType iMovementType,
+ UniCharArrayOffset * oNewOffset);
+
+EXTERN_API_C( OSStatus )
+ATSURightwardCursorPosition (ATSUTextLayout iTextLayout,
+ UniCharArrayOffset iOldOffset,
+ ATSUCursorMovementType iMovementType,
+ UniCharArrayOffset * oNewOffset);
+
+EXTERN_API_C( OSStatus )
+ATSULeftwardCursorPosition (ATSUTextLayout iTextLayout,
+ UniCharArrayOffset iOldOffset,
+ ATSUCursorMovementType iMovementType,
+ UniCharArrayOffset * oNewOffset);
+
+/* Line breaking */
+EXTERN_API_C( OSStatus )
+ATSUBreakLine (ATSUTextLayout iTextLayout,
+ UniCharArrayOffset iLineStart,
+ ATSUTextMeasurement iLineWidth,
+ Boolean iUseAsSoftLineBreak,
+ UniCharArrayOffset * oLineBreak);
+
+EXTERN_API_C( OSStatus )
+ATSUSetSoftLineBreak (ATSUTextLayout iTextLayout,
+ UniCharArrayOffset iLineBreak);
+
+EXTERN_API_C( OSStatus )
+ATSUGetSoftLineBreaks (ATSUTextLayout iTextLayout,
+ UniCharArrayOffset iRangeStart,
+ UniCharCount iRangeLength,
+ ItemCount iMaximumBreaks,
+ UniCharArrayOffset oBreaks[],
+ ItemCount * oBreakCount);
+
+EXTERN_API_C( OSStatus )
+ATSUClearSoftLineBreaks (ATSUTextLayout iTextLayout,
+ UniCharArrayOffset iRangeStart,
+ UniCharCount iRangeLength);
+
+/* Font matching */
+EXTERN_API_C( OSStatus )
+ATSUSetFontFallbacks (ItemCount iFontFallbacksCount,
+ ATSUFontID iFontIDs[],
+ ATSUFontFallbackMethod iFontFallbackMethod);
+
+EXTERN_API_C( OSStatus )
+ATSUGetFontFallbacks (ItemCount iMaxFontFallbacksCount,
+ ATSUFontID oFontIDs[],
+ ATSUFontFallbackMethod * oFontFallbackMethod,
+ ItemCount * oActualFallbacksCount);
+
+EXTERN_API_C( OSStatus )
+ATSUMatchFontsToText (ATSUTextLayout iTextLayout,
+ UniCharArrayOffset iTextStart,
+ UniCharCount iTextLength,
+ ATSUFontID * oFontID,
+ UniCharArrayOffset * oChangedOffset,
+ UniCharCount * oChangedLength);
+
+EXTERN_API_C( OSStatus )
+ATSUSetTransientFontMatching (ATSUTextLayout iTextLayout,
+ Boolean iTransientFontMatching);
+
+EXTERN_API_C( OSStatus )
+ATSUGetTransientFontMatching (ATSUTextLayout iTextLayout,
+ Boolean * oTransientFontMatching);
+
+/* Font ID's */
+EXTERN_API_C( OSStatus )
+ATSUFontCount (ItemCount * oFontCount);
+
+EXTERN_API_C( OSStatus )
+ATSUGetFontIDs (ATSUFontID oFontIDs[],
+ ItemCount iArraySize,
+ ItemCount * oFontCount);
+
+EXTERN_API_C( OSStatus )
+ATSUFONDtoFontID (short iFONDNumber,
+ Style iFONDStyle,
+ ATSUFontID * oFontID);
+
+EXTERN_API_C( OSStatus )
+ATSUFontIDtoFOND (ATSUFontID iFontID,
+ short * oFONDNumber,
+ Style * oFONDStyle);
+
+/* Font names */
+EXTERN_API_C( OSStatus )
+ATSUCountFontNames (ATSUFontID iFontID,
+ ItemCount * oFontNameCount);
+
+EXTERN_API_C( OSStatus )
+ATSUGetIndFontName (ATSUFontID iFontID,
+ ItemCount iFontNameIndex,
+ ByteCount iMaximumNameLength,
+ Ptr oName,
+ ByteCount * oActualNameLength,
+ FontNameCode * oFontNameCode,
+ FontPlatformCode * oFontNamePlatform,
+ FontScriptCode * oFontNameScript,
+ FontLanguageCode * oFontNameLanguage);
+
+EXTERN_API_C( OSStatus )
+ATSUFindFontName (ATSUFontID iFontID,
+ FontNameCode iFontNameCode,
+ FontPlatformCode iFontNamePlatform,
+ FontScriptCode iFontNameScript,
+ FontLanguageCode iFontNameLanguage,
+ ByteCount iMaximumNameLength,
+ Ptr oName,
+ ByteCount * oActualNameLength,
+ ItemCount * oFontNameIndex);
+
+EXTERN_API_C( OSStatus )
+ATSUFindFontFromName (Ptr iName,
+ ByteCount iNameLength,
+ FontNameCode iFontNameCode,
+ FontPlatformCode iFontNamePlatform,
+ FontScriptCode iFontNameScript,
+ FontLanguageCode iFontNameLanguage,
+ ATSUFontID * oFontID);
+
+/* Font features */
+EXTERN_API_C( OSStatus )
+ATSUCountFontFeatureTypes (ATSUFontID iFontID,
+ ItemCount * oTypeCount);
+
+EXTERN_API_C( OSStatus )
+ATSUCountFontFeatureSelectors (ATSUFontID iFontID,
+ ATSUFontFeatureType iType,
+ ItemCount * oSelectorCount);
+
+EXTERN_API_C( OSStatus )
+ATSUGetFontFeatureTypes (ATSUFontID iFontID,
+ ItemCount iMaximumTypes,
+ ATSUFontFeatureType oTypes[],
+ ItemCount * oActualTypeCount);
+
+EXTERN_API_C( OSStatus )
+ATSUGetFontFeatureSelectors (ATSUFontID iFontID,
+ ATSUFontFeatureType iType,
+ ItemCount iMaximumSelectors,
+ ATSUFontFeatureSelector oSelectors[],
+ Boolean oSelectorIsOnByDefault[],
+ ItemCount * oActualSelectorCount,
+ Boolean * oIsMutuallyExclusive);
+
+EXTERN_API_C( OSStatus )
+ATSUGetFontFeatureNameCode (ATSUFontID iFontID,
+ ATSUFontFeatureType iType,
+ ATSUFontFeatureSelector iSelector,
+ FontNameCode * oNameCode);
+
+/* Font tracking value & names */
+EXTERN_API_C( OSStatus )
+ATSUCountFontTracking (ATSUFontID iFontID,
+ ATSUVerticalCharacterType iCharacterOrientation,
+ ItemCount * oTrackingCount);
+
+EXTERN_API_C( OSStatus )
+ATSUGetIndFontTracking (ATSUFontID iFontID,
+ ATSUVerticalCharacterType iCharacterOrientation,
+ ItemCount iTrackIndex,
+ Fixed * oFontTrackingValue,
+ FontNameCode * oNameCode);
+
+/* Font variations */
+EXTERN_API_C( OSStatus )
+ATSUCountFontVariations (ATSUFontID iFontID,
+ ItemCount * oVariationCount);
+
+EXTERN_API_C( OSStatus )
+ATSUGetIndFontVariation (ATSUFontID iFontID,
+ ItemCount iVariationIndex,
+ ATSUFontVariationAxis * oATSUFontVariationAxis,
+ ATSUFontVariationValue * oMinimumValue,
+ ATSUFontVariationValue * oMaximumValue,
+ ATSUFontVariationValue * oDefaultValue);
+
+EXTERN_API_C( OSStatus )
+ATSUGetFontVariationNameCode (ATSUFontID iFontID,
+ ATSUFontVariationAxis iAxis,
+ FontNameCode * oNameCode);
+
+/* Font Instances */
+EXTERN_API_C( OSStatus )
+ATSUCountFontInstances (ATSUFontID iFontID,
+ ItemCount * oInstances);
+
+EXTERN_API_C( OSStatus )
+ATSUGetFontInstance (ATSUFontID iFontID,
+ ItemCount iFontInstanceIndex,
+ ItemCount iMaximumVariations,
+ ATSUFontVariationAxis oAxes[],
+ ATSUFontVariationValue oValues[],
+ ItemCount * oActualVariationCount);
+
+EXTERN_API_C( OSStatus )
+ATSUGetFontInstanceNameCode (ATSUFontID iFontID,
+ ItemCount iInstanceIndex,
+ FontNameCode * oNameCode);
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __ATSUNICODE__ */
+
diff --git a/include/qt/AVComponents.h b/include/qt/AVComponents.h
new file mode 100644
index 000000000..98ee96bf2
--- /dev/null
+++ b/include/qt/AVComponents.h
@@ -0,0 +1,641 @@
+/*
+ File: AVComponents.h
+
+ Contains: Standard includes for standard AV panels
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1989-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __AVCOMPONENTS__
+#define __AVCOMPONENTS__
+
+#ifndef __DIALOGS__
+#include "Dialogs.h"
+#endif
+
+#ifndef __VIDEO__
+#include "Video.h"
+#endif
+
+#ifndef __DISPLAYS__
+#include "Displays.h"
+#endif
+
+#ifndef __COMPONENTS__
+#include "Components.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*
+ The subtypes listed here are for example only. The display manager will find _all_ panels
+ with the appropriate types. These panels return class information that is used to devide them
+ up into groups to be displayed in the AV Windows (class means "geometry" or "color" or other groupings
+ like that.
+*/
+enum {
+ kAVPanelType = FOUR_CHAR_CODE('avpc'), /* Panel subtypes */
+ kBrightnessPanelSubType = FOUR_CHAR_CODE('brit'),
+ kContrastPanelSubType = FOUR_CHAR_CODE('cont'),
+ kBitDepthPanelSubType = FOUR_CHAR_CODE('bitd'),
+ kAVEngineType = FOUR_CHAR_CODE('avec'), /* Engine subtypes */
+ kBrightnessEngineSubType = FOUR_CHAR_CODE('brit'),
+ kContrastEngineSubType = FOUR_CHAR_CODE('cont'), /* kBitDepthEngineSubType = 'bitd', // Not used */
+ kAVPortType = FOUR_CHAR_CODE('avdp'), /* subtypes are defined in each port's public .h file */
+ kAVUtilityType = FOUR_CHAR_CODE('avuc'),
+ kAVBackChannelSubType = FOUR_CHAR_CODE('avbc'),
+ kAVCommunicationType = FOUR_CHAR_CODE('avcm'),
+ kAVDialogType = FOUR_CHAR_CODE('avdg')
+};
+
+/* PortComponent subtypes are up to the port and display manager does not use the subtype
+ to find port components. Instead, display manager uses an internal cache to search for portcompoennts.
+ It turns out to be useful to have a unique subtype so that engines can see if they should apply themselves to
+ a particular port component.
+
+ PortKinds are the "class" of port. When a port is registered with display manager (creating a display ID), the
+ caller of DMNewDisplayIDByPortComponent passes a portKind. Ports of this type are returned by
+ DMNewDevicePortList.
+
+ PortKinds are NOT subtypes of components
+ PortKinds ARE used to register and find port components with Display Manager. Here are the basic port kinds:
+
+ Video displays are distinct from video out because there are some video out ports that are not actaully displays.
+ if EZAV is looking to configure displays, it needs to look for kAVVideoDisplayPortKind not kAVVideoOutPortKind.
+*/
+enum {
+ kAVVideoDisplayPortKind = FOUR_CHAR_CODE('pkdo'), /* Video Display (CRT or panel display) */
+ kAVVideoOutPortKind = FOUR_CHAR_CODE('pkvo'), /* Video out port (camera output). */
+ kAVVideoInPortKind = FOUR_CHAR_CODE('pkvi'), /* Video in port (camera input) */
+ kAVSoundOutPortKind = FOUR_CHAR_CODE('pkso'), /* Sound out port (speaker or speaker jack) */
+ kAVSoundInPortKind = FOUR_CHAR_CODE('pksi'), /* Sound in port (microphone or microphone jack) */
+ kAVDeviceType = FOUR_CHAR_CODE('avdc'), /* Device Component subtypes are up to the manufacturor since each device may contain multiple function types (eg telecaster) */
+ kAVDisplayDeviceKind = FOUR_CHAR_CODE('dkvo'), /* Display device*/
+ /* Device Component subtypes are up to the manufacturor since each device may contain multiple function types (eg telecaster)*/
+ kAVCategoryType = FOUR_CHAR_CODE('avcc'),
+ kAVSoundInSubType = FOUR_CHAR_CODE('avao'),
+ kAVSoundOutSubType = FOUR_CHAR_CODE('avai'),
+ kAVVideoInSubType = FOUR_CHAR_CODE('vdin'),
+ kAVVideoOutSubType = FOUR_CHAR_CODE('vdou'),
+ kAVInvalidType = FOUR_CHAR_CODE('badt') /* Some calls return a component type, in case of errors, these types are set to kAVInvalidComponentType */
+};
+
+/*
+ Interface Signatures are used to identify what kind of component
+ calls can be made for a given component. Today this applies only
+ to ports, but could be applied to other components as well.
+*/
+enum {
+ kAVGenericInterfaceSignature = FOUR_CHAR_CODE('dmgr'),
+ kAVAppleVisionInterfaceSignature = FOUR_CHAR_CODE('avav')
+};
+
+/* ============================= */
+/* Panel Class Constants */
+/* ============================= */
+enum {
+ kAVPanelClassDisplayDefault = FOUR_CHAR_CODE('cdsp'),
+ kAVPanelClassColor = FOUR_CHAR_CODE('cclr'),
+ kAVPanelClassGeometry = FOUR_CHAR_CODE('cgeo'),
+ kAVPanelClassSound = FOUR_CHAR_CODE('csnd'),
+ kAVPanelClassPreferences = FOUR_CHAR_CODE('cprf'),
+ kAVPanelClassLCD = FOUR_CHAR_CODE('clcd'),
+ kAVPanelClassMonitorSound = FOUR_CHAR_CODE('cres'),
+ kAVPanelClassAlert = FOUR_CHAR_CODE('calr'),
+ kAVPanelClassExtras = FOUR_CHAR_CODE('cext'),
+ kAVPanelClassRearrange = FOUR_CHAR_CODE('crea')
+};
+
+
+/* ============================= */
+/* AV Notification Types */
+/* ============================= */
+/*
+ This notification will be sent whenever a
+ device has been reset, for whatever reason.
+*/
+enum {
+ kAVNotifyDeviceReset = FOUR_CHAR_CODE('rset')
+};
+
+
+/* ============================= */
+/* Component interface revision levels and history */
+/* ============================= */
+enum {
+ kAVPanelComponentInterfaceRevOne = 1,
+ kAVPanelComponentInterfaceRevTwo = 2,
+ kAVEngineComponentInterfaceRevOne = 1,
+ kAVPortComponentInterfaceRevOne = 1,
+ kAVDeviceComponentInterfaceRevOne = 1,
+ kAVUtilityComponentInterfaceRevOne = 1
+};
+
+
+/* ============================= */
+/* Adornment Constants */
+/* ============================= */
+enum {
+ kAVPanelAdornmentNoBorder = 0,
+ kAVPanelAdornmentStandardBorder = 1
+};
+
+enum {
+ kAVPanelAdornmentNoName = 0,
+ kAVPanelAdornmentStandardName = 1
+};
+
+
+/* ============================= */
+/* Selector Ranges */
+/* ============================= */
+enum {
+ kBaseAVComponentSelector = 256, /* First apple-defined selector for AV components */
+ kAppleAVComponentSelector = 512 /* First apple-defined type-specific selector for AV components */
+};
+
+
+/* ============================= */
+/* Panel Standard component selectors */
+/* ============================= */
+enum {
+ kAVPanelFakeRegisterSelect = kComponentRegisterSelect, /* -5 */
+ kAVPanelSetCustomDataSelect = 0,
+ kAVPanelGetDitlSelect = 1,
+ kAVPanelGetTitleSelect = 2,
+ kAVPanelInstallSelect = 3,
+ kAVPanelEventSelect = 4,
+ kAVPanelItemSelect = 5,
+ kAVPanelRemoveSelect = 6,
+ kAVPanelValidateInputSelect = 7,
+ kAVPanelGetSettingsIdentifiersSelect = 8,
+ kAVPanelGetSettingsSelect = 9,
+ kAVPanelSetSettingsSelect = 10,
+ kAVPanelSelectorGetFidelitySelect = kBaseAVComponentSelector,
+ kAVPanelSelectorTargetDeviceSelect = 257,
+ kAVPanelSelectorGetPanelClassSelect = 258,
+ kAVPanelSelectorGetPanelAdornmentSelect = 259,
+ kAVPanelSelectorGetBalloonHelpStringSelect = 260,
+ kAVPanelSelectorAppleGuideRequestSelect = 261
+};
+
+
+/* ============================= */
+/* Engine Standard component selectors */
+/* ============================= */
+enum {
+ kAVEngineGetEngineFidelitySelect = kBaseAVComponentSelector,
+ kAVEngineTargetDeviceSelect = 257
+};
+
+
+/* ============================= */
+/* Video Port Specific calls */
+/* ============================= */
+enum {
+ kAVPortCheckTimingModeSelect = 0,
+ kAVPortReserved1Select = 1, /* Reserved*/
+ kAVPortReserved2Select = 2, /* Reserved*/
+ kAVPortGetDisplayTimingInfoSelect = kAppleAVComponentSelector,
+ kAVPortGetDisplayProfileCountSelect = 513,
+ kAVPortGetIndexedDisplayProfileSelect = 514,
+ kAVPortGetDisplayGestaltSelect = 515
+};
+
+
+/* ============================= */
+/* AV Port Specific calls */
+/* ============================= */
+enum {
+ kAVPortGetAVDeviceFidelitySelect = kBaseAVComponentSelector, /* Port Standard Component selectors */
+ kAVPortGetWiggleSelect = 257,
+ kAVPortSetWiggleSelect = 258,
+ kAVPortGetNameSelect = 259,
+ kAVPortGetGraphicInfoSelect = 260,
+ kAVPortSetActiveSelect = 261,
+ kAVPortGetActiveSelect = 262,
+ kAVPortUnsed1Select = 263, /* Selector removed as part of API change. We don't want to mess up the following selectors, so we put in this spacer (ie kPadSelector). */
+ kAVPortGetAVIDSelect = 264,
+ kAVPortSetAVIDSelect = 265,
+ kAVPortSetDeviceAVIDSelect = 266, /* For registrar to set device (instead of hitting global directly) -- should only be called once */
+ kAVPortGetDeviceAVIDSelect = 267, /* Called by display mgr for generic ports */
+ kAVPortGetPowerStateSelect = 268,
+ kAVPortSetPowerStateSelect = 269,
+ kAVPortGetMakeAndModelSelect = 270, /* Get Make and model information*/
+ kAVPortGetInterfaceSignatureSelect = 271, /* To determine what VideoPort-specific calls can be made*/
+ kAVPortReserved3Select = 272, /* Reserved*/
+ kAVPortGetManufactureInfoSelect = 273 /* Get more Make and model information */
+};
+
+
+
+
+/* ============================= */
+/* Device Component Standard Component selectors */
+/* ============================= */
+enum {
+ kAVDeviceGetNameSelect = kBaseAVComponentSelector,
+ kAVDeviceGetGraphicInfoSelect = 257,
+ kAVDeviceGetPowerStateSelect = 258,
+ kAVDeviceSetPowerStateSelect = 259,
+ kAVDeviceGetAVIDSelect = 260,
+ kAVDeviceSetAVIDSelect = 261
+};
+
+/* ============================= */
+/* AV Back-Channel Selectors */
+/* ============================= */
+enum {
+ kAVBackChannelReservedSelector = 1,
+ kAVBackChannelPreModalFilterSelect = 2,
+ kAVBackChannelModalFilterSelect = 3,
+ kAVBackChannelAppleGuideLaunchSelect = 4
+};
+
+
+
+
+
+
+
+/* ============================= */
+/* Engine Standard component selectors */
+/* ============================= */
+#if CALL_NOT_IN_CARBON
+EXTERN_API( ComponentResult )
+AVEngineComponentGetFidelity (ComponentInstance engineComponent,
+ DisplayIDType displayID,
+ DMFidelityType * engineFidelity) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0100, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVEngineComponentTargetDevice (ComponentInstance engineComponent,
+ DisplayIDType displayID) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0101, 0x7000, 0xA82A);
+
+
+/* ============================= */
+/* Panel Standard Component calls */
+/* ============================= */
+EXTERN_API( ComponentResult )
+AVPanelFakeRegister (ComponentInstance ci) FIVEWORDINLINE(0x2F3C, 0x0000, 0xFFFB, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPanelSetCustomData (ComponentInstance ci,
+ long theCustomData) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0000, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPanelGetDitl (ComponentInstance ci,
+ Handle * ditl) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0001, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPanelGetTitle (ComponentInstance ci,
+ StringPtr title) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0002, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPanelInstall (ComponentInstance ci,
+ DialogPtr dialog,
+ long itemOffset) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0003, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPanelEvent (ComponentInstance ci,
+ DialogPtr dialog,
+ long itemOffset,
+ EventRecord * event,
+ short * itemHit,
+ Boolean * handled) FIVEWORDINLINE(0x2F3C, 0x0014, 0x0004, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPanelItem (ComponentInstance ci,
+ DialogPtr dialog,
+ long itemOffset,
+ short itemNum) FIVEWORDINLINE(0x2F3C, 0x000A, 0x0005, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPanelRemove (ComponentInstance ci,
+ DialogPtr dialog,
+ long itemOffset) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0006, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPanelValidateInput (ComponentInstance ci,
+ Boolean * ok) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0007, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPanelGetSettingsIdentifiers (ComponentInstance ci,
+ short * theID,
+ OSType * theType) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0008, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPanelGetSettings (ComponentInstance ci,
+ Handle * userDataHand,
+ long flags,
+ DialogPtr theDialog,
+ long itemsOffset) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0009, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPanelSetSettings (ComponentInstance ci,
+ Handle userDataHand,
+ long flags,
+ DialogPtr theDialog,
+ long itemsOffset) FIVEWORDINLINE(0x2F3C, 0x0010, 0x000A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPanelGetFidelity (ComponentInstance panelComponent,
+ DisplayIDType displayID,
+ DMFidelityType * panelFidelity) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0100, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPanelComponentTargetDevice (ComponentInstance panelComponent,
+ DisplayIDType displayID,
+ DialogPtr theDialog,
+ long itemsOffset) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0101, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPanelComponentGetPanelClass (ComponentInstance panelComponent,
+ ResType * panelClass,
+ ResType * subClass,
+ Ptr reserved1,
+ Ptr reserved2) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0102, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPanelComponentGetPanelAdornment (ComponentInstance panelComponent,
+ long * panelBorderType,
+ long * panelNameType) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0103, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPanelComponentGetBalloonHelpString (ComponentInstance panelComponent,
+ short item,
+ StringPtr balloonString) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0104, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPanelComponentAppleGuideRequest (ComponentInstance panelComponent,
+ OSType agSelector,
+ void * agDataReply) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0105, 0x7000, 0xA82A);
+
+/* ============================= */
+/* Port Component Standard Component selectors */
+/* ============================= */
+EXTERN_API( ComponentResult )
+AVPortGetAVDeviceFidelity (ComponentInstance portComponent,
+ AVIDType deviceAVID,
+ DMFidelityType * portFidelity) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0100, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPortGetWiggle (ComponentInstance portComponent,
+ Boolean * wiggleDevice) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0101, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPortSetWiggle (ComponentInstance portComponent,
+ Boolean wiggleDevice) FIVEWORDINLINE(0x2F3C, 0x0002, 0x0102, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPortGetName (ComponentInstance portComponent,
+ Str255 portName) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0103, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPortGetGraphicInfo (ComponentInstance portComponent,
+ PicHandle * thePict,
+ Handle * theIconSuite,
+ AVLocationPtr theLocation) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0104, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPortSetActive (ComponentInstance portComponent,
+ Boolean setActive) FIVEWORDINLINE(0x2F3C, 0x0002, 0x0105, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPortGetActive (ComponentInstance portComponent,
+ Boolean * isPortActive,
+ Boolean * portCanBeActivated,
+ void * reserved) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0106, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPortGetAVID (ComponentInstance portComponent,
+ AVIDType * avPortID) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0108, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPortSetAVID (ComponentInstance portComponent,
+ AVIDType avPortID) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0109, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPortSetDeviceAVID (ComponentInstance portComponent,
+ AVIDType avDeviceID) FIVEWORDINLINE(0x2F3C, 0x0004, 0x010A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPortGetDeviceAVID (ComponentInstance portComponent,
+ AVIDType * avDeviceID) FIVEWORDINLINE(0x2F3C, 0x0004, 0x010B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPortGetPowerState (ComponentInstance portComponent,
+ AVPowerStatePtr getPowerState) FIVEWORDINLINE(0x2F3C, 0x0004, 0x010C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPortSetPowerState (ComponentInstance portComponent,
+ AVPowerStatePtr setPowerState) FIVEWORDINLINE(0x2F3C, 0x0004, 0x010D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPortGetMakeAndModel (ComponentInstance portComponent,
+ DisplayIDType theDisplayID,
+ ResType * manufacturer,
+ UInt32 * model,
+ UInt32 * serialNumber) FIVEWORDINLINE(0x2F3C, 0x0010, 0x010E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPortGetInterfaceSignature (ComponentInstance portComponent,
+ OSType * interfaceSignature) FIVEWORDINLINE(0x2F3C, 0x0004, 0x010F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPortGetManufactureInfo (ComponentInstance portComponent,
+ DisplayIDType theDisplayID,
+ DMMakeAndModelPtr theMakeAndModel) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0111, 0x7000, 0xA82A);
+
+
+/* ============================= */
+/* Video Out Port Component Selectors */
+/* ============================= */
+EXTERN_API( ComponentResult )
+AVPortCheckTimingMode (ComponentInstance displayComponent,
+ DisplayIDType theDisplayID,
+ VDDisplayConnectInfoPtr connectInfo,
+ VDTimingInfoPtr modeTiming,
+ UInt32 reserved) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0000, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPortGetDisplayTimingInfo (ComponentInstance displayComponent,
+ VDTimingInfoPtr modeTiming,
+ UInt32 requestedVersion,
+ DMDisplayTimingInfoPtr modeInfo,
+ UInt32 reserved) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0200, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPortGetDisplayProfileCount (ComponentInstance displayComponent,
+ UInt32 reserved,
+ UInt32 * profileCount,
+ UInt32 * profileSeed) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0201, 0x7000, 0xA82A);
+
+/*pascal ComponentResult AVPortGetIndexedDisplayProfile(ComponentInstance displayComponent, UInt32 reserved, UInt32 profileIndex, UInt32 profileSeed, CMProfileRef* indexedProfile)*/
+EXTERN_API( ComponentResult )
+AVPortGetIndexedDisplayProfile (ComponentInstance displayComponent,
+ UInt32 reserved,
+ UInt32 profileIndex,
+ UInt32 profileSeed,
+ void * indexedProfile) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0202, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVPortGetDisplayGestalt (ComponentInstance displayComponent,
+ ResType displayGestaltSelector,
+ UInt32 * displayGestaltResponse) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0203, 0x7000, 0xA82A);
+
+
+
+/* ============================= */
+/* AV Device Component Selectors */
+/* ============================= */
+EXTERN_API( ComponentResult )
+AVDeviceGetName (ComponentInstance deviceComponent,
+ Str255 portName) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0100, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVDeviceGetGraphicInfo (ComponentInstance deviceComponent,
+ PicHandle * thePict,
+ Handle * theIconSuite,
+ AVLocationPtr theLocation) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0101, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVDeviceGetPowerState (ComponentInstance deviceComponent,
+ AVPowerStatePtr getPowerState) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0102, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVDeviceSetPowerState (ComponentInstance deviceComponent,
+ AVPowerStatePtr setPowerState) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0103, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVDeviceGetAVID (ComponentInstance deviceComponent,
+ AVIDType * avDeviceID) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0104, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVDeviceSetAVID (ComponentInstance deviceComponent,
+ AVIDType avDeviceID) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0105, 0x7000, 0xA82A);
+
+
+/* ============================= */
+/* AV BackChannel Component Selectors */
+/* ============================= */
+EXTERN_API( ComponentResult )
+AVBackChannelPreModalFilter (ComponentInstance compInstance) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0002, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVBackChannelModalFilter (ComponentInstance compInstance,
+ EventRecord * theEvent) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0003, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AVBackChannelAppleGuideLaunch (ComponentInstance compInstance,
+ StringPtr theSubject) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0004, 0x7000, 0xA82A);
+
+
+
+
+
+/* MixedMode ProcInfo constants for component calls */
+enum {
+ uppAVEngineComponentGetFidelityProcInfo = 0x00000FF0,
+ uppAVEngineComponentTargetDeviceProcInfo = 0x000003F0,
+ uppAVPanelFakeRegisterProcInfo = 0x000000F0,
+ uppAVPanelSetCustomDataProcInfo = 0x000003F0,
+ uppAVPanelGetDitlProcInfo = 0x000003F0,
+ uppAVPanelGetTitleProcInfo = 0x000003F0,
+ uppAVPanelInstallProcInfo = 0x00000FF0,
+ uppAVPanelEventProcInfo = 0x0003FFF0,
+ uppAVPanelItemProcInfo = 0x00002FF0,
+ uppAVPanelRemoveProcInfo = 0x00000FF0,
+ uppAVPanelValidateInputProcInfo = 0x000003F0,
+ uppAVPanelGetSettingsIdentifiersProcInfo = 0x00000FF0,
+ uppAVPanelGetSettingsProcInfo = 0x0000FFF0,
+ uppAVPanelSetSettingsProcInfo = 0x0000FFF0,
+ uppAVPanelGetFidelityProcInfo = 0x00000FF0,
+ uppAVPanelComponentTargetDeviceProcInfo = 0x00003FF0,
+ uppAVPanelComponentGetPanelClassProcInfo = 0x0000FFF0,
+ uppAVPanelComponentGetPanelAdornmentProcInfo = 0x00000FF0,
+ uppAVPanelComponentGetBalloonHelpStringProcInfo = 0x00000EF0,
+ uppAVPanelComponentAppleGuideRequestProcInfo = 0x00000FF0,
+ uppAVPortGetAVDeviceFidelityProcInfo = 0x00000FF0,
+ uppAVPortGetWiggleProcInfo = 0x000003F0,
+ uppAVPortSetWiggleProcInfo = 0x000001F0,
+ uppAVPortGetNameProcInfo = 0x000003F0,
+ uppAVPortGetGraphicInfoProcInfo = 0x00003FF0,
+ uppAVPortSetActiveProcInfo = 0x000001F0,
+ uppAVPortGetActiveProcInfo = 0x00003FF0,
+ uppAVPortGetAVIDProcInfo = 0x000003F0,
+ uppAVPortSetAVIDProcInfo = 0x000003F0,
+ uppAVPortSetDeviceAVIDProcInfo = 0x000003F0,
+ uppAVPortGetDeviceAVIDProcInfo = 0x000003F0,
+ uppAVPortGetPowerStateProcInfo = 0x000003F0,
+ uppAVPortSetPowerStateProcInfo = 0x000003F0,
+ uppAVPortGetMakeAndModelProcInfo = 0x0000FFF0,
+ uppAVPortGetInterfaceSignatureProcInfo = 0x000003F0,
+ uppAVPortGetManufactureInfoProcInfo = 0x00000FF0,
+ uppAVPortCheckTimingModeProcInfo = 0x0000FFF0,
+ uppAVPortGetDisplayTimingInfoProcInfo = 0x0000FFF0,
+ uppAVPortGetDisplayProfileCountProcInfo = 0x00003FF0,
+ uppAVPortGetIndexedDisplayProfileProcInfo = 0x0000FFF0,
+ uppAVPortGetDisplayGestaltProcInfo = 0x00000FF0,
+ uppAVDeviceGetNameProcInfo = 0x000003F0,
+ uppAVDeviceGetGraphicInfoProcInfo = 0x00003FF0,
+ uppAVDeviceGetPowerStateProcInfo = 0x000003F0,
+ uppAVDeviceSetPowerStateProcInfo = 0x000003F0,
+ uppAVDeviceGetAVIDProcInfo = 0x000003F0,
+ uppAVDeviceSetAVIDProcInfo = 0x000003F0,
+ uppAVBackChannelPreModalFilterProcInfo = 0x000000F0,
+ uppAVBackChannelModalFilterProcInfo = 0x000003F0,
+ uppAVBackChannelAppleGuideLaunchProcInfo = 0x000003F0
+};
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __AVCOMPONENTS__ */
+
diff --git a/include/qt/AVLTree.h b/include/qt/AVLTree.h
new file mode 100644
index 000000000..710ca1512
--- /dev/null
+++ b/include/qt/AVLTree.h
@@ -0,0 +1,350 @@
+/*
+ File: AVLTree.h
+
+ Contains: Prototypes for routines which create, destroy, allow for
+
+ Version: Technology:
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1999-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __AVLTREE__
+#define __AVLTREE__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+
+/* The visit stage for AVLWalk() walkProcs */
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+
+typedef UInt16 AVLVisitStage;
+enum {
+ kAVLPreOrder = 0,
+ kAVLInOrder = 1,
+ kAVLPostOrder = 2
+};
+
+/* The order the tree is walked or disposed of. */
+
+typedef UInt16 AVLOrder;
+enum {
+ kLeftToRight = 0,
+ kRightToLeft = 1
+};
+
+/* The type of the node being passed to a callback proc. */
+
+typedef UInt16 AVLNodeType;
+enum {
+ kAVLIsTree = 0,
+ kAVLIsLeftBranch = 1,
+ kAVLIsRightBranch = 2,
+ kAVLIsLeaf = 3,
+ kAVLNullNode = 4
+};
+
+enum {
+ errItemAlreadyInTree = -960,
+ errNotValidTree = -961,
+ errItemNotFoundInTree = -962,
+ errCanNotInsertWhileWalkProcInProgress = -963,
+ errTreeIsLocked = -964
+};
+
+/* The structure of a tree. It's opaque; don't assume it's 36 bytes in size.*/
+
+struct AVLTreeStruct {
+ OSType signature;
+ unsigned long privateStuff[8];
+};
+typedef struct AVLTreeStruct AVLTreeStruct;
+
+typedef AVLTreeStruct * AVLTreePtr;
+/*
+ Every tree must have a function which compares the data for two items and returns < 0, 0, or >0
+ for the items - < 0 if the first item is 'before' the second item according to some criteria,
+ == 0 if the two items are identical according to the criteria, or > 0 if the first item is
+ 'after' the second item according to the criteria. The comparison function is also passed the
+ node type, but most of the time this can be ignored.
+*/
+typedef CALLBACK_API( SInt32 , AVLCompareItemsProcPtr )(AVLTreePtr tree, const void *i1, const void *i2, AVLNodeType nd_typ);
+/*
+ Every tree must have a itemSizeProc; this routine gets passed a pointer to the item's data and
+ returns the size of the data. If a tree contains records of a fixed size, this function can
+ just return sizeof( that-struct ); otherwise it should calculate the size of the item based on
+ the data for the item.
+*/
+typedef CALLBACK_API( UInt32 , AVLItemSizeProcPtr )(AVLTreePtr tree, const void *itemPtr);
+/*
+ A tree may have an optional disposeItemProc, which gets called whenever an item is removed
+ from the tree ( via AVLRemove() or when AVLDispose() deletes all of the items in the tree ).
+ This might be useful if the nodes in the tree own 'resources' ( like, open files ) which
+ should be released before the item is removed.
+*/
+typedef CALLBACK_API( void , AVLDisposeItemProcPtr )(AVLTreePtr tree, const void *dataP);
+/*
+ The common way to iterate across all of the items in a tree is via AVLWalk(), which takes
+ a walkProcPtr. This function will get called for every item in the tree three times, as
+ the tree is being walked across. First, the walkProc will get called with visitStage ==
+ kAVLPreOrder, at which point internally the node of the tree for the given data has just
+ been reached. Later, this function will get called with visitStage == kAVLInOrder, and
+ lastly this function will get called with visitStage == kAVLPostOrder.
+ The 'minimum' item in the tree will get called with visitStage == kInOrder first, followed
+ by the 'next' item in the tree, up until the last item in the tree structure is called.
+ In general, you'll only care about calls to this function when visitStage == kAVLInOrder.
+*/
+typedef CALLBACK_API( OSErr , AVLWalkProcPtr )(AVLTreePtr tree, const void *dataP, AVLVisitStage visitStage, AVLNodeType node, UInt32 level, SInt32 balance, void *refCon);
+typedef STACK_UPP_TYPE(AVLCompareItemsProcPtr) AVLCompareItemsUPP;
+typedef STACK_UPP_TYPE(AVLItemSizeProcPtr) AVLItemSizeUPP;
+typedef STACK_UPP_TYPE(AVLDisposeItemProcPtr) AVLDisposeItemUPP;
+typedef STACK_UPP_TYPE(AVLWalkProcPtr) AVLWalkUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(AVLCompareItemsUPP)
+ NewAVLCompareItemsUPP (AVLCompareItemsProcPtr userRoutine);
+
+ EXTERN_API(AVLItemSizeUPP)
+ NewAVLItemSizeUPP (AVLItemSizeProcPtr userRoutine);
+
+ EXTERN_API(AVLDisposeItemUPP)
+ NewAVLDisposeItemUPP (AVLDisposeItemProcPtr userRoutine);
+
+ EXTERN_API(AVLWalkUPP)
+ NewAVLWalkUPP (AVLWalkProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeAVLCompareItemsUPP (AVLCompareItemsUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeAVLItemSizeUPP (AVLItemSizeUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeAVLDisposeItemUPP (AVLDisposeItemUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeAVLWalkUPP (AVLWalkUPP userUPP);
+
+ EXTERN_API(SInt32)
+ InvokeAVLCompareItemsUPP (AVLTreePtr tree,
+ const void * i1,
+ const void * i2,
+ AVLNodeType nd_typ,
+ AVLCompareItemsUPP userUPP);
+
+ EXTERN_API(UInt32)
+ InvokeAVLItemSizeUPP (AVLTreePtr tree,
+ const void * itemPtr,
+ AVLItemSizeUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeAVLDisposeItemUPP (AVLTreePtr tree,
+ const void * dataP,
+ AVLDisposeItemUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeAVLWalkUPP (AVLTreePtr tree,
+ const void * dataP,
+ AVLVisitStage visitStage,
+ AVLNodeType node,
+ UInt32 level,
+ SInt32 balance,
+ void * refCon,
+ AVLWalkUPP userUPP);
+
+#else
+ enum { uppAVLCompareItemsProcInfo = 0x00002FF0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes, 4_bytes, 2_bytes) */
+ enum { uppAVLItemSizeProcInfo = 0x000003F0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes) */
+ enum { uppAVLDisposeItemProcInfo = 0x000003C0 }; /* pascal no_return_value Func(4_bytes, 4_bytes) */
+ enum { uppAVLWalkProcInfo = 0x000FEBE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 2_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewAVLCompareItemsUPP(userRoutine) (AVLCompareItemsUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppAVLCompareItemsProcInfo, GetCurrentArchitecture())
+ #define NewAVLItemSizeUPP(userRoutine) (AVLItemSizeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppAVLItemSizeProcInfo, GetCurrentArchitecture())
+ #define NewAVLDisposeItemUPP(userRoutine) (AVLDisposeItemUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppAVLDisposeItemProcInfo, GetCurrentArchitecture())
+ #define NewAVLWalkUPP(userRoutine) (AVLWalkUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppAVLWalkProcInfo, GetCurrentArchitecture())
+ #define DisposeAVLCompareItemsUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeAVLItemSizeUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeAVLDisposeItemUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeAVLWalkUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeAVLCompareItemsUPP(tree, i1, i2, nd_typ, userUPP) (SInt32)CALL_FOUR_PARAMETER_UPP((userUPP), uppAVLCompareItemsProcInfo, (tree), (i1), (i2), (nd_typ))
+ #define InvokeAVLItemSizeUPP(tree, itemPtr, userUPP) (UInt32)CALL_TWO_PARAMETER_UPP((userUPP), uppAVLItemSizeProcInfo, (tree), (itemPtr))
+ #define InvokeAVLDisposeItemUPP(tree, dataP, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppAVLDisposeItemProcInfo, (tree), (dataP))
+ #define InvokeAVLWalkUPP(tree, dataP, visitStage, node, level, balance, refCon, userUPP) (OSErr)CALL_SEVEN_PARAMETER_UPP((userUPP), uppAVLWalkProcInfo, (tree), (dataP), (visitStage), (node), (level), (balance), (refCon))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewAVLCompareItemsProc(userRoutine) NewAVLCompareItemsUPP(userRoutine)
+#define NewAVLItemSizeProc(userRoutine) NewAVLItemSizeUPP(userRoutine)
+#define NewAVLDisposeItemProc(userRoutine) NewAVLDisposeItemUPP(userRoutine)
+#define NewAVLWalkProc(userRoutine) NewAVLWalkUPP(userRoutine)
+#define CallAVLCompareItemsProc(userRoutine, tree, i1, i2, nd_typ) InvokeAVLCompareItemsUPP(tree, i1, i2, nd_typ, userRoutine)
+#define CallAVLItemSizeProc(userRoutine, tree, itemPtr) InvokeAVLItemSizeUPP(tree, itemPtr, userRoutine)
+#define CallAVLDisposeItemProc(userRoutine, tree, dataP) InvokeAVLDisposeItemUPP(tree, dataP, userRoutine)
+#define CallAVLWalkProc(userRoutine, tree, dataP, visitStage, node, level, balance, refCon) InvokeAVLWalkUPP(tree, dataP, visitStage, node, level, balance, refCon, userRoutine)
+/*
+ Create an AVL tree. The compareItemsProc and the sizeItemProc are required; disposeItemProc is
+ optional and can be nil. The refCon is stored with the list, and is passed back to the
+ compareItemsProc, sizeItemProc, and disposeItemsProc calls. The allocation of the tree ( and all
+ nodes later added to the list with AVLInsert ) will be created in what is the current zone at the
+ time AVLInit() is called. Always call AVLDispose() to dispose of a list created with AVLInit().
+*/
+EXTERN_API( OSErr )
+AVLInit (UInt32 flags,
+ AVLCompareItemsUPP compareItemsProc,
+ AVLItemSizeUPP sizeItemProc,
+ AVLDisposeItemUPP disposeItemProc,
+ void * refCon,
+ AVLTreePtr * tree) THREEWORDINLINE(0x303C, 0x0C01, 0xAA80);
+
+/*
+ Dispose of an AVL tree. This will dispose of each item in the tree in the order specified,
+ call the tree's disposeProc proc for each item, and then dispose of the space allocated for
+ the tree itself.
+*/
+EXTERN_API( OSErr )
+AVLDispose (AVLTreePtr * tree,
+ AVLOrder order) THREEWORDINLINE(0x303C, 0x0302, 0xAA80);
+
+/*
+ Iterate across all of the items in the tree, in the order specified. kLeftToRight is
+ basically lowest-to-highest order, kRightToLeft is highest-to-lowest order. For each
+ node in the tree, it will call the walkProc with three messages ( at the appropriate
+ time ). First, with kAVLPreOrder when the walking gets to this node in the tree,
+ before handling either the left or right subtree, secondly, with kAVLInOrder after
+ handling one subtree but before handling the other, and lastly with kAVLPostOrder after
+ handling both subtrees. If you want to handle items in order, then only do something
+ if the visit stage is kAVLInOrder. You can only call AVLRemove() from inside a walkProc
+ if visit stage is kAVLPostOrder ( because if you remove a node during the pre or in order
+ stages you will corrupt the list ) OR if you return a non-zero result from the walkProc
+ call which called AVLRemove() to immediately terminate the walkProc. Do not call AVLInsert()
+ to insert a node into the tree from inside a walkProc.
+ The walkProc function gets called with the AVLTreePtr, a pointer to the data for the
+ current node ( which you can change in place as long as you do not affect the order within
+ the tree ), the visit stage, the type of the current node ( leaf node, right or left branch,
+ or full tree ), the level within the tree ( the root is level 1 ), the balance for the
+ current node, and the refCon passed to AVLWalk(). This refCon is different from the one passed
+ into AVLInit(); use AVLGetRefCon() to get that refCon if you want it inside a walkProc.
+ ( Most walkProcs will not care about the values for node type, level, or balance. )
+*/
+EXTERN_API( OSErr )
+AVLWalk (AVLTreePtr tree,
+ AVLWalkUPP walkProc,
+ AVLOrder order,
+ void * walkRefCon) THREEWORDINLINE(0x303C, 0x0703, 0xAA80);
+
+/* Return the number of items in the given tree.*/
+EXTERN_API( OSErr )
+AVLCount (AVLTreePtr tree,
+ UInt32 * count) THREEWORDINLINE(0x303C, 0x0804, 0xAA80);
+
+/*
+ Return the one-based index-th item from the tree by putting it's data at dataPtr
+ if dataPtr is non-nil, and it's size into *itemSize if itemSize is non-nil.
+ If index is out of range, return errItemNotFoundInTree. ( Internally, this does
+ an AVLWalk(), so the tree can not be modified while this call is in progress ).
+*/
+EXTERN_API( OSErr )
+AVLGetIndItem (AVLTreePtr tree,
+ UInt32 index,
+ void * dataPtr,
+ UInt32 * itemSize) THREEWORDINLINE(0x303C, 0x0805, 0xAA80);
+
+/*
+ Insert the given item into the tree. This will call the tree's sizeItemProc
+ to determine how big the item at data is, and then will make a copy of the
+ item and insert it into the tree in the appropriate place. If an item already
+ exists in the tree with the same key ( so that the compareItemsUPP returns 0
+ when asked to compare this item to an existing one ), then it will return
+ errItemNotFoundInTree.
+*/
+EXTERN_API( OSErr )
+AVLInsert (AVLTreePtr tree,
+ const void * data) THREEWORDINLINE(0x303C, 0x0406, 0xAA80);
+
+/*
+ Remove any item from the tree with the given key. If dataPtr != nil, then
+ copy the item's data to dataPtr before removing it from the tree. Before
+ removing the item, call the tree's disposeItemProc to let it release anything
+ used by the data in the tree. It is not necessary to fill in a complete
+ record for key, only that the compareItemsProc return 0 when asked to compare
+ the data at key with the node in the tree to be deleted. If the item cannot
+ be found in the tree, this will return errItemNotFoundInTree.
+*/
+EXTERN_API( OSErr )
+AVLRemove (AVLTreePtr tree,
+ const void * key,
+ void * dataPtr,
+ UInt32 * itemSize) THREEWORDINLINE(0x303C, 0x0807, 0xAA80);
+
+/*
+ Find the item in the tree with the given key, and return it's data in
+ dataPtr ( if dataPtr != nil ), and it's size in *itemSize ( if itemSize
+ != nil ). It is not necessary to fill in a complete record for key,
+ only that the compareItemsProc return 0 when asked to compare the data
+ at key with the node in the tree to be deleted. If the item cannot
+ be found in the tree, this will return errItemNotFoundInTree.
+*/
+EXTERN_API( OSErr )
+AVLFind (AVLTreePtr tree,
+ const void * key,
+ void * dataPtr,
+ UInt32 * itemSize) THREEWORDINLINE(0x303C, 0x0808, 0xAA80);
+
+/*
+ Get the refCon for the given tree ( set in AVLInit ) and return it.
+ If the given tree is invalid, then return nil.
+*/
+EXTERN_API( OSErr )
+AVLGetRefcon (AVLTreePtr tree,
+ void ** refCon) THREEWORDINLINE(0x303C, 0x0409, 0xAA80);
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __AVLTREE__ */
+
diff --git a/include/qt/Aliases.h b/include/qt/Aliases.h
new file mode 100644
index 000000000..bb8cd14ea
--- /dev/null
+++ b/include/qt/Aliases.h
@@ -0,0 +1,257 @@
+/*
+ File: Aliases.h
+
+ Contains: Alias Manager Interfaces.
+
+ Version: Technology: Mac OS 8.1
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1989-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __ALIASES__
+#define __ALIASES__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __APPLETALK__
+#include "AppleTalk.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ rAliasType = FOUR_CHAR_CODE('alis') /* Aliases are stored as resources of this type */
+};
+
+enum {
+ /* define alias resolution action rules mask */
+ kARMMountVol = 0x00000001, /* mount the volume automatically */
+ kARMNoUI = 0x00000002, /* no user interface allowed during resolution */
+ kARMMultVols = 0x00000008, /* search on multiple volumes */
+ kARMSearch = 0x00000100, /* search quickly */
+ kARMSearchMore = 0x00000200, /* search further */
+ kARMSearchRelFirst = 0x00000400 /* search target on a relative path first */
+};
+
+enum {
+ /* define alias record information types */
+ asiZoneName = -3, /* get zone name */
+ asiServerName = -2, /* get server name */
+ asiVolumeName = -1, /* get volume name */
+ asiAliasName = 0, /* get aliased file/folder/volume name */
+ asiParentName = 1 /* get parent folder name */
+};
+
+/* ResolveAliasFileWithMountFlags options */
+enum {
+ kResolveAliasFileNoUI = 0x00000001 /* no user interaction during resolution */
+};
+
+/* define the alias record that will be the blackbox for the caller */
+
+struct AliasRecord {
+ OSType userType; /* appl stored type like creator type */
+ unsigned short aliasSize; /* alias record size in bytes, for appl usage */
+};
+typedef struct AliasRecord AliasRecord;
+
+typedef AliasRecord * AliasPtr;
+typedef AliasPtr * AliasHandle;
+/* alias record information type */
+typedef short AliasInfoType;
+/* create a new alias between fromFile-target and return alias record handle */
+EXTERN_API( OSErr )
+NewAlias (const FSSpec * fromFile, /* can be NULL */
+ const FSSpec * target,
+ AliasHandle * alias) TWOWORDINLINE(0x7002, 0xA823);
+
+/* create a minimal new alias for a target and return alias record handle */
+EXTERN_API( OSErr )
+NewAliasMinimal (const FSSpec * target,
+ AliasHandle * alias) TWOWORDINLINE(0x7008, 0xA823);
+
+/* create a minimal new alias from a target fullpath (optional zone and server name) and return alias record handle */
+EXTERN_API( OSErr )
+NewAliasMinimalFromFullPath (short fullPathLength,
+ const void * fullPath,
+ ConstStr32Param zoneName,
+ ConstStr31Param serverName,
+ AliasHandle * alias) TWOWORDINLINE(0x7009, 0xA823);
+
+/* given an alias handle and fromFile, resolve the alias, update the alias record and return aliased filename and wasChanged flag. */
+EXTERN_API( OSErr )
+ResolveAlias (const FSSpec * fromFile, /* can be NULL */
+ AliasHandle alias,
+ FSSpec * target,
+ Boolean * wasChanged) TWOWORDINLINE(0x7003, 0xA823);
+
+/* given an alias handle and an index specifying requested alias information type, return the information from alias record as a string. */
+EXTERN_API( OSErr )
+GetAliasInfo (AliasHandle alias,
+ AliasInfoType index,
+ Str63 theString) TWOWORDINLINE(0x7007, 0xA823);
+
+
+EXTERN_API( OSErr )
+IsAliasFile (const FSSpec * fileFSSpec,
+ Boolean * aliasFileFlag,
+ Boolean * folderFlag) TWOWORDINLINE(0x702A, 0xA823);
+
+EXTERN_API( OSErr )
+ResolveAliasWithMountFlags (const FSSpec * fromFile,
+ AliasHandle alias,
+ FSSpec * target,
+ Boolean * wasChanged,
+ unsigned long mountFlags) TWOWORDINLINE(0x702B, 0xA823);
+
+/*
+ Given a file spec, return target file spec if input file spec is an alias.
+ It resolves the entire alias chain or one step of the chain. It returns
+ info about whether the target is a folder or file; and whether the input
+ file spec was an alias or not.
+*/
+EXTERN_API( OSErr )
+ResolveAliasFile (FSSpec * theSpec,
+ Boolean resolveAliasChains,
+ Boolean * targetIsFolder,
+ Boolean * wasAliased) TWOWORDINLINE(0x700C, 0xA823);
+
+
+EXTERN_API( OSErr )
+ResolveAliasFileWithMountFlags (FSSpec * theSpec,
+ Boolean resolveAliasChains,
+ Boolean * targetIsFolder,
+ Boolean * wasAliased,
+ unsigned long mountFlags) TWOWORDINLINE(0x7029, 0xA823);
+
+EXTERN_API( OSErr )
+FollowFinderAlias (ConstFSSpecPtr fromFile,
+ AliasHandle alias,
+ Boolean logon,
+ FSSpec * target,
+ Boolean * wasChanged) TWOWORDINLINE(0x700F, 0xA823);
+
+/*
+ Low Level Routines
+*/
+/* given a fromFile-target pair and an alias handle, update the lias record pointed to by alias handle to represent target as the new alias. */
+EXTERN_API( OSErr )
+UpdateAlias (const FSSpec * fromFile, /* can be NULL */
+ const FSSpec * target,
+ AliasHandle alias,
+ Boolean * wasChanged) TWOWORDINLINE(0x7006, 0xA823);
+
+
+typedef CALLBACK_API( Boolean , AliasFilterProcPtr )(CInfoPBPtr cpbPtr, Boolean *quitFlag, Ptr myDataPtr);
+typedef STACK_UPP_TYPE(AliasFilterProcPtr) AliasFilterUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(AliasFilterUPP)
+ NewAliasFilterUPP (AliasFilterProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeAliasFilterUPP (AliasFilterUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeAliasFilterUPP (CInfoPBPtr cpbPtr,
+ Boolean * quitFlag,
+ Ptr myDataPtr,
+ AliasFilterUPP userUPP);
+
+#else
+ enum { uppAliasFilterProcInfo = 0x00000FD0 }; /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes) */
+ #define NewAliasFilterUPP(userRoutine) (AliasFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppAliasFilterProcInfo, GetCurrentArchitecture())
+ #define DisposeAliasFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeAliasFilterUPP(cpbPtr, quitFlag, myDataPtr, userUPP) (Boolean)CALL_THREE_PARAMETER_UPP((userUPP), uppAliasFilterProcInfo, (cpbPtr), (quitFlag), (myDataPtr))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewAliasFilterProc(userRoutine) NewAliasFilterUPP(userRoutine)
+#define CallAliasFilterProc(userRoutine, cpbPtr, quitFlag, myDataPtr) InvokeAliasFilterUPP(cpbPtr, quitFlag, myDataPtr, userRoutine)
+
+/* Given an alias handle and fromFile, match the alias and return aliased filename(s) and needsUpdate flag */
+EXTERN_API( OSErr )
+MatchAlias (const FSSpec * fromFile, /* can be NULL */
+ unsigned long rulesMask,
+ AliasHandle alias,
+ short * aliasCount,
+ FSSpecArrayPtr aliasList,
+ Boolean * needsUpdate,
+ AliasFilterUPP aliasFilter,
+ void * yourDataPtr) TWOWORDINLINE(0x7005, 0xA823);
+
+
+
+/* The follow two calls are for Carbon only. They allow tools and background apps to have
+ AliasMgr functionality without ever having to deal with UI */
+EXTERN_API( OSErr )
+ResolveAliasFileWithMountFlagsNoUI (FSSpec * theSpec,
+ Boolean resolveAliasChains,
+ Boolean * targetIsFolder,
+ Boolean * wasAliased,
+ unsigned long mountFlags);
+
+EXTERN_API( OSErr )
+MatchAliasNoUI (const FSSpec * fromFile, /* can be NULL */
+ unsigned long rulesMask,
+ AliasHandle alias,
+ short * aliasCount,
+ FSSpecArrayPtr aliasList,
+ Boolean * needsUpdate,
+ AliasFilterUPP aliasFilter,
+ void * yourDataPtr);
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __ALIASES__ */
+
diff --git a/include/qt/Appearance.h b/include/qt/Appearance.h
new file mode 100644
index 000000000..a034bd56e
--- /dev/null
+++ b/include/qt/Appearance.h
@@ -0,0 +1,1661 @@
+/*
+ File: Appearance.h
+
+ Contains: Appearance Manager Interfaces.
+
+ Version: Technology: Mac OS 9
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __APPEARANCE__
+#define __APPEARANCE__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#ifndef __TEXTEDIT__
+#include "TextEdit.h"
+#endif
+
+#ifndef __QDOFFSCREEN__
+#include "QDOffscreen.h"
+#endif
+
+#ifndef __MACWINDOWS__
+#include "MacWindows.h"
+#endif
+
+#ifndef __CONTROLS__
+#include "Controls.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+
+/*----------------------------------------------------------------------------------*/
+/* Appearance Manager constants, etc. */
+/*----------------------------------------------------------------------------------*/
+/* Appearance Manager Apple Events (1.1 and later) */
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ kAppearanceEventClass = FOUR_CHAR_CODE('appr'), /* Event Class */
+ kAEAppearanceChanged = FOUR_CHAR_CODE('thme'), /* Appearance changed (e.g. platinum to hi-tech) */
+ kAESystemFontChanged = FOUR_CHAR_CODE('sysf'), /* system font changed */
+ kAESmallSystemFontChanged = FOUR_CHAR_CODE('ssfn'), /* small system font changed */
+ kAEViewsFontChanged = FOUR_CHAR_CODE('vfnt') /* views font changed */
+};
+
+/*----------------------------------------------------------------------------------*/
+/* Appearance Manager file types */
+/*----------------------------------------------------------------------------------*/
+enum {
+ kThemeDataFileType = FOUR_CHAR_CODE('thme'), /* file type for theme files */
+ kThemePlatinumFileType = FOUR_CHAR_CODE('pltn'), /* file type for platinum appearance */
+ kThemeCustomThemesFileType = FOUR_CHAR_CODE('scen'), /* file type for user themes */
+ kThemeSoundTrackFileType = FOUR_CHAR_CODE('tsnd')
+};
+
+
+enum {
+ kThemeBrushDialogBackgroundActive = 1, /* Dialogs */
+ kThemeBrushDialogBackgroundInactive = 2, /* Dialogs */
+ kThemeBrushAlertBackgroundActive = 3,
+ kThemeBrushAlertBackgroundInactive = 4,
+ kThemeBrushModelessDialogBackgroundActive = 5,
+ kThemeBrushModelessDialogBackgroundInactive = 6,
+ kThemeBrushUtilityWindowBackgroundActive = 7, /* Miscellaneous */
+ kThemeBrushUtilityWindowBackgroundInactive = 8, /* Miscellaneous */
+ kThemeBrushListViewSortColumnBackground = 9, /* Finder */
+ kThemeBrushListViewBackground = 10,
+ kThemeBrushIconLabelBackground = 11,
+ kThemeBrushListViewSeparator = 12,
+ kThemeBrushChasingArrows = 13,
+ kThemeBrushDragHilite = 14,
+ kThemeBrushDocumentWindowBackground = 15,
+ kThemeBrushFinderWindowBackground = 16
+};
+
+/* Brushes available in Appearance 1.1 or later */
+enum {
+ kThemeBrushScrollBarDelimiterActive = 17,
+ kThemeBrushScrollBarDelimiterInactive = 18,
+ kThemeBrushFocusHighlight = 19,
+ kThemeBrushPopupArrowActive = 20,
+ kThemeBrushPopupArrowPressed = 21,
+ kThemeBrushPopupArrowInactive = 22,
+ kThemeBrushAppleGuideCoachmark = 23,
+ kThemeBrushIconLabelBackgroundSelected = 24,
+ kThemeBrushStaticAreaFill = 25,
+ kThemeBrushActiveAreaFill = 26,
+ kThemeBrushButtonFrameActive = 27,
+ kThemeBrushButtonFrameInactive = 28,
+ kThemeBrushButtonFaceActive = 29,
+ kThemeBrushButtonFaceInactive = 30,
+ kThemeBrushButtonFacePressed = 31,
+ kThemeBrushButtonActiveDarkShadow = 32,
+ kThemeBrushButtonActiveDarkHighlight = 33,
+ kThemeBrushButtonActiveLightShadow = 34,
+ kThemeBrushButtonActiveLightHighlight = 35,
+ kThemeBrushButtonInactiveDarkShadow = 36,
+ kThemeBrushButtonInactiveDarkHighlight = 37,
+ kThemeBrushButtonInactiveLightShadow = 38,
+ kThemeBrushButtonInactiveLightHighlight = 39,
+ kThemeBrushButtonPressedDarkShadow = 40,
+ kThemeBrushButtonPressedDarkHighlight = 41,
+ kThemeBrushButtonPressedLightShadow = 42,
+ kThemeBrushButtonPressedLightHighlight = 43,
+ kThemeBrushBevelActiveLight = 44,
+ kThemeBrushBevelActiveDark = 45,
+ kThemeBrushBevelInactiveLight = 46,
+ kThemeBrushBevelInactiveDark = 47
+};
+
+/* Brushes available in Appearance 1.1.1 or later */
+enum {
+ kThemeBrushNotificationWindowBackground = 48
+};
+
+/* These values are meta-brushes, specific colors that do not */
+/* change from theme to theme. You can use them instead of using */
+/* direct RGB values. */
+enum {
+ kThemeBrushBlack = -1,
+ kThemeBrushWhite = -2
+};
+
+typedef SInt16 ThemeBrush;
+enum {
+ kThemeTextColorDialogActive = 1,
+ kThemeTextColorDialogInactive = 2,
+ kThemeTextColorAlertActive = 3,
+ kThemeTextColorAlertInactive = 4,
+ kThemeTextColorModelessDialogActive = 5,
+ kThemeTextColorModelessDialogInactive = 6,
+ kThemeTextColorWindowHeaderActive = 7,
+ kThemeTextColorWindowHeaderInactive = 8,
+ kThemeTextColorPlacardActive = 9,
+ kThemeTextColorPlacardInactive = 10,
+ kThemeTextColorPlacardPressed = 11,
+ kThemeTextColorPushButtonActive = 12,
+ kThemeTextColorPushButtonInactive = 13,
+ kThemeTextColorPushButtonPressed = 14,
+ kThemeTextColorBevelButtonActive = 15,
+ kThemeTextColorBevelButtonInactive = 16,
+ kThemeTextColorBevelButtonPressed = 17,
+ kThemeTextColorPopupButtonActive = 18,
+ kThemeTextColorPopupButtonInactive = 19,
+ kThemeTextColorPopupButtonPressed = 20,
+ kThemeTextColorIconLabel = 21,
+ kThemeTextColorListView = 22
+};
+
+/* Text Colors available in Appearance 1.0.1 or later */
+enum {
+ kThemeTextColorDocumentWindowTitleActive = 23,
+ kThemeTextColorDocumentWindowTitleInactive = 24,
+ kThemeTextColorMovableModalWindowTitleActive = 25,
+ kThemeTextColorMovableModalWindowTitleInactive = 26,
+ kThemeTextColorUtilityWindowTitleActive = 27,
+ kThemeTextColorUtilityWindowTitleInactive = 28,
+ kThemeTextColorPopupWindowTitleActive = 29,
+ kThemeTextColorPopupWindowTitleInactive = 30,
+ kThemeTextColorRootMenuActive = 31,
+ kThemeTextColorRootMenuSelected = 32,
+ kThemeTextColorRootMenuDisabled = 33,
+ kThemeTextColorMenuItemActive = 34,
+ kThemeTextColorMenuItemSelected = 35,
+ kThemeTextColorMenuItemDisabled = 36,
+ kThemeTextColorPopupLabelActive = 37,
+ kThemeTextColorPopupLabelInactive = 38
+};
+
+
+/* Text colors available in Appearance 1.1 or later */
+enum {
+ kThemeTextColorTabFrontActive = 39,
+ kThemeTextColorTabNonFrontActive = 40,
+ kThemeTextColorTabNonFrontPressed = 41,
+ kThemeTextColorTabFrontInactive = 42,
+ kThemeTextColorTabNonFrontInactive = 43,
+ kThemeTextColorIconLabelSelected = 44,
+ kThemeTextColorBevelButtonStickyActive = 45,
+ kThemeTextColorBevelButtonStickyInactive = 46
+};
+
+/* Text colors available in Appearance 1.1.1 or later */
+enum {
+ kThemeTextColorNotification = 47
+};
+
+/* These values are specific colors that do not change from */
+/* theme to theme. You can use them instead of using direct RGB values. */
+enum {
+ kThemeTextColorBlack = -1,
+ kThemeTextColorWhite = -2
+};
+
+typedef SInt16 ThemeTextColor;
+/* States to draw primitives: disabled, active, and pressed (hilited) */
+enum {
+ kThemeStateInactive = 0,
+ kThemeStateActive = 1,
+ kThemeStatePressed = 2,
+ kThemeStateRollover = 6,
+ kThemeStateDisabled = 7
+};
+
+enum {
+ kThemeStatePressedUp = 2, /* draw with up pressed (increment/decrement buttons) */
+ kThemeStatePressedDown = 3 /* draw with down pressed (increment/decrement buttons) */
+};
+
+typedef UInt32 ThemeDrawState;
+/*----------------------------------------------------------------------------------*/
+/* Theme cursor selectors available in Appearance 1.1 or later */
+/*----------------------------------------------------------------------------------*/
+enum {
+ kThemeArrowCursor = 0,
+ kThemeCopyArrowCursor = 1,
+ kThemeAliasArrowCursor = 2,
+ kThemeContextualMenuArrowCursor = 3,
+ kThemeIBeamCursor = 4,
+ kThemeCrossCursor = 5,
+ kThemePlusCursor = 6,
+ kThemeWatchCursor = 7, /* Can Animate */
+ kThemeClosedHandCursor = 8,
+ kThemeOpenHandCursor = 9,
+ kThemePointingHandCursor = 10,
+ kThemeCountingUpHandCursor = 11, /* Can Animate */
+ kThemeCountingDownHandCursor = 12, /* Can Animate */
+ kThemeCountingUpAndDownHandCursor = 13, /* Can Animate */
+ kThemeSpinningCursor = 14, /* Can Animate */
+ kThemeResizeLeftCursor = 15,
+ kThemeResizeRightCursor = 16,
+ kThemeResizeLeftRightCursor = 17
+};
+
+typedef UInt32 ThemeCursor;
+/*----------------------------------------------------------------------------------*/
+/* Theme menu bar drawing states */
+/*----------------------------------------------------------------------------------*/
+enum {
+ kThemeMenuBarNormal = 0,
+ kThemeMenuBarSelected = 1
+};
+
+typedef UInt16 ThemeMenuBarState;
+/* attributes */
+enum {
+ kThemeMenuSquareMenuBar = (1 << 0)
+};
+
+/*----------------------------------------------------------------------------------*/
+/* Theme menu drawing states */
+/*----------------------------------------------------------------------------------*/
+enum {
+ kThemeMenuActive = 0,
+ kThemeMenuSelected = 1,
+ kThemeMenuDisabled = 3
+};
+
+typedef UInt16 ThemeMenuState;
+/*------------------------------------------------------------------------------------------*/
+/* MenuType: add kThemeMenuTypeInactive to menu type for DrawThemeMenuBackground if entire */
+/* menu is inactive */
+/*------------------------------------------------------------------------------------------*/
+enum {
+ kThemeMenuTypePullDown = 0,
+ kThemeMenuTypePopUp = 1,
+ kThemeMenuTypeHierarchical = 2,
+ kThemeMenuTypeInactive = 0x0100
+};
+
+typedef UInt16 ThemeMenuType;
+enum {
+ kThemeMenuItemPlain = 0,
+ kThemeMenuItemHierarchical = 1, /* item has hierarchical arrow*/
+ kThemeMenuItemScrollUpArrow = 2, /* for scrollable menus, indicates item is scroller*/
+ kThemeMenuItemScrollDownArrow = 3,
+ kThemeMenuItemAtTop = 0x0100, /* indicates item is being drawn at top of menu*/
+ kThemeMenuItemAtBottom = 0x0200, /* indicates item is being drawn at bottom of menu*/
+ kThemeMenuItemHierBackground = 0x0400, /* item is within a hierarchical menu*/
+ kThemeMenuItemPopUpBackground = 0x0800, /* item is within a popped up menu*/
+ kThemeMenuItemHasIcon = 0x8000 /* add into non-arrow type when icon present.*/
+};
+
+typedef UInt16 ThemeMenuItemType;
+/*------------------------------------------------------------------------------------------*/
+/* Theme Backgrounds */
+/*------------------------------------------------------------------------------------------*/
+enum {
+ kThemeBackgroundTabPane = 1,
+ kThemeBackgroundPlacard = 2,
+ kThemeBackgroundWindowHeader = 3,
+ kThemeBackgroundListViewWindowHeader = 4
+};
+
+typedef UInt32 ThemeBackgroundKind;
+/*------------------------------------------------------------------------------------------*/
+/* Theme Collection tags for Get/SetTheme */
+/*------------------------------------------------------------------------------------------*/
+enum {
+ kThemeNameTag = FOUR_CHAR_CODE('name'), /* Str255*/
+ kThemeAppearanceFileNameTag = FOUR_CHAR_CODE('thme'), /* Str255*/
+ kThemeVariantNameTag = FOUR_CHAR_CODE('varn'), /* Str255*/
+ kThemeSystemFontTag = FOUR_CHAR_CODE('lgsf'), /* Str255*/
+ kThemeSmallSystemFontTag = FOUR_CHAR_CODE('smsf'), /* Str255*/
+ kThemeViewsFontTag = FOUR_CHAR_CODE('vfnt'), /* Str255*/
+ kThemeViewsFontSizeTag = FOUR_CHAR_CODE('vfsz'), /* SInt16*/
+ kThemeDesktopPatternNameTag = FOUR_CHAR_CODE('patn'), /* Str255*/
+ kThemeDesktopPatternTag = FOUR_CHAR_CODE('patt'), /* <variable-length data> (flattened pattern)*/
+ kThemeDesktopPictureNameTag = FOUR_CHAR_CODE('dpnm'), /* Str255*/
+ kThemeDesktopPictureAliasTag = FOUR_CHAR_CODE('dpal'), /* <alias handle>*/
+ kThemeDesktopPictureAlignmentTag = FOUR_CHAR_CODE('dpan'), /* UInt32*/
+ kThemeHighlightColorNameTag = FOUR_CHAR_CODE('hcnm'), /* Str255*/
+ kThemeHighlightColorTag = FOUR_CHAR_CODE('hcol'), /* RGBColor*/
+ kThemeExamplePictureIDTag = FOUR_CHAR_CODE('epic'), /* SInt16*/
+ kThemeSoundsEnabledTag = FOUR_CHAR_CODE('snds'), /* Boolean*/
+ kThemeSoundTrackNameTag = FOUR_CHAR_CODE('sndt'), /* Str255*/
+ kThemeSoundMaskTag = FOUR_CHAR_CODE('smsk'), /* UInt32*/
+ kThemeUserDefinedTag = FOUR_CHAR_CODE('user'), /* Boolean (this should _always_ be true if present - used by Control Panel).*/
+ kThemeScrollBarArrowStyleTag = FOUR_CHAR_CODE('sbar'), /* ThemeScrollBarArrowStyle*/
+ kThemeScrollBarThumbStyleTag = FOUR_CHAR_CODE('sbth'), /* ThemeScrollBarThumbStyle*/
+ kThemeSmoothFontEnabledTag = FOUR_CHAR_CODE('smoo'), /* Boolean*/
+ kThemeSmoothFontMinSizeTag = FOUR_CHAR_CODE('smos'), /* UInt16 (must be >= 12 and <= 24)*/
+ kThemeDblClickCollapseTag = FOUR_CHAR_CODE('coll') /* Boolean*/
+};
+
+/*------------------------------------------------------------------------------------------*/
+/* Theme Control Settings */
+/*------------------------------------------------------------------------------------------*/
+enum {
+ kThemeCheckBoxClassicX = 0, /* check box with an 'X'*/
+ kThemeCheckBoxCheckMark = 1 /* check box with a real check mark*/
+};
+
+typedef UInt16 ThemeCheckBoxStyle;
+enum {
+ kThemeScrollBarArrowsSingle = 0, /* single arrow on each end*/
+ kThemeScrollBarArrowsLowerRight = 1 /* double arrows only on right or bottom*/
+};
+
+typedef UInt16 ThemeScrollBarArrowStyle;
+enum {
+ kThemeScrollBarThumbNormal = 0, /* normal, classic thumb size*/
+ kThemeScrollBarThumbProportional = 1 /* proportional thumbs*/
+};
+
+typedef UInt16 ThemeScrollBarThumbStyle;
+/*------------------------------------------------------------------------------------------*/
+/* Font constants */
+/*------------------------------------------------------------------------------------------*/
+enum {
+ kThemeSystemFont = 0,
+ kThemeSmallSystemFont = 1,
+ kThemeSmallEmphasizedSystemFont = 2,
+ kThemeViewsFont = 3
+};
+
+typedef UInt16 ThemeFontID;
+/*------------------------------------------------------------------------------------------*/
+/* Tab constants */
+/*------------------------------------------------------------------------------------------*/
+enum {
+ kThemeTabNonFront = 0,
+ kThemeTabNonFrontPressed = 1,
+ kThemeTabNonFrontInactive = 2,
+ kThemeTabFront = 3,
+ kThemeTabFrontInactive = 4
+};
+
+typedef UInt16 ThemeTabStyle;
+enum {
+ kThemeTabNorth = 0,
+ kThemeTabSouth = 1,
+ kThemeTabEast = 2,
+ kThemeTabWest = 3
+};
+
+typedef UInt16 ThemeTabDirection;
+/* NOTE ON TAB HEIGHT */
+/* Use the kThemeSmallTabHeightMax and kThemeLargeTabHeightMax when calculating the rects */
+/* to draw tabs into. This height includes the tab frame overlap. Tabs that are not in the */
+/* front are only drawn down to where they meet the frame, as if the height was just */
+/* kThemeLargeTabHeight, for example, as opposed to the ...Max constant. Remember that for */
+/* East and West tabs, the height referred to below is actually the width. */
+enum {
+ kThemeSmallTabHeight = 16, /* amount small tabs protrude from frame.*/
+ kThemeLargeTabHeight = 21, /* amount large tabs protrude from frame.*/
+ kThemeTabPaneOverlap = 3, /* amount tabs overlap frame.*/
+ kThemeSmallTabHeightMax = 19, /* small tab height + overlap*/
+ kThemeLargeTabHeightMax = 24 /* large tab height + overlap*/
+};
+
+/*------------------------------------------------------------------------------------------*/
+/* Track kinds */
+/*------------------------------------------------------------------------------------------*/
+enum {
+ kThemeScrollBar = 0,
+ kThemeSmallScrollBar = 1,
+ kThemeSlider = 2,
+ kThemeProgressBar = 3,
+ kThemeIndeterminateBar = 4
+};
+
+typedef UInt16 ThemeTrackKind;
+/*------------------------------------------------------------------------------------------*/
+/* Track enable states */
+/*------------------------------------------------------------------------------------------*/
+enum {
+ /* track states */
+ kThemeTrackActive = 0,
+ kThemeTrackDisabled = 1,
+ kThemeTrackNothingToScroll = 2,
+ kThemeTrackInactive = 3
+};
+
+typedef UInt8 ThemeTrackEnableState;
+/*------------------------------------------------------------------------------------------*/
+/* Track pressed states */
+/*------------------------------------------------------------------------------------------*/
+enum {
+ /* press states (ignored unless track is active) */
+ kThemeLeftOutsideArrowPressed = 0x01,
+ kThemeLeftInsideArrowPressed = 0x02,
+ kThemeLeftTrackPressed = 0x04,
+ kThemeThumbPressed = 0x08,
+ kThemeRightTrackPressed = 0x10,
+ kThemeRightInsideArrowPressed = 0x20,
+ kThemeRightOutsideArrowPressed = 0x40,
+ kThemeTopOutsideArrowPressed = kThemeLeftOutsideArrowPressed,
+ kThemeTopInsideArrowPressed = kThemeLeftInsideArrowPressed,
+ kThemeTopTrackPressed = kThemeLeftTrackPressed,
+ kThemeBottomTrackPressed = kThemeRightTrackPressed,
+ kThemeBottomInsideArrowPressed = kThemeRightInsideArrowPressed,
+ kThemeBottomOutsideArrowPressed = kThemeRightOutsideArrowPressed
+};
+
+typedef UInt8 ThemeTrackPressState;
+/*------------------------------------------------------------------------------------------*/
+/* Thumb directions */
+/*------------------------------------------------------------------------------------------*/
+enum {
+ /* thumb direction */
+ kThemeThumbPlain = 0,
+ kThemeThumbUpward = 1,
+ kThemeThumbDownward = 2
+};
+
+typedef UInt8 ThemeThumbDirection;
+/*------------------------------------------------------------------------------------------*/
+/* Track attributes */
+/*------------------------------------------------------------------------------------------*/
+enum {
+ kThemeTrackHorizontal = (1 << 0), /* track is drawn horizontally*/
+ kThemeTrackRightToLeft = (1 << 1), /* track progresses from right to left*/
+ kThemeTrackShowThumb = (1 << 2), /* track's thumb should be drawn*/
+ kThemeTrackThumbRgnIsNotGhost = (1 << 3) /* the provided thumbRgn should be drawn opaque, not as a ghost*/
+};
+
+typedef UInt16 ThemeTrackAttributes;
+/*------------------------------------------------------------------------------------------*/
+/* Track info block */
+/*------------------------------------------------------------------------------------------*/
+
+struct ScrollBarTrackInfo {
+ SInt32 viewsize; /* current view range size */
+ ThemeTrackPressState pressState; /* pressed parts state */
+};
+typedef struct ScrollBarTrackInfo ScrollBarTrackInfo;
+
+struct SliderTrackInfo {
+ ThemeThumbDirection thumbDir; /* thumb direction */
+ ThemeTrackPressState pressState; /* pressed parts state */
+};
+typedef struct SliderTrackInfo SliderTrackInfo;
+
+struct ProgressTrackInfo {
+ UInt8 phase; /* phase for indeterminate progress */
+};
+typedef struct ProgressTrackInfo ProgressTrackInfo;
+
+struct ThemeTrackDrawInfo {
+ ThemeTrackKind kind; /* what kind of track this info is for */
+ Rect bounds; /* track basis rectangle */
+ SInt32 min; /* min track value */
+ SInt32 max; /* max track value */
+ SInt32 value; /* current thumb value */
+ UInt32 reserved;
+
+ ThemeTrackAttributes attributes; /* various track attributes */
+ ThemeTrackEnableState enableState; /* enable state */
+ UInt8 filler1;
+
+ union {
+ ScrollBarTrackInfo scrollbar;
+ SliderTrackInfo slider;
+ ProgressTrackInfo progress;
+ } trackInfo;
+};
+typedef struct ThemeTrackDrawInfo ThemeTrackDrawInfo;
+/*------------------------------------------------------------------------------------------*/
+/* ThemeWindowAttributes */
+/*------------------------------------------------------------------------------------------*/
+enum {
+ kThemeWindowHasGrow = (1 << 0), /* can the size of the window be changed by the user? */
+ kThemeWindowHasHorizontalZoom = (1 << 3), /* window can zoom only horizontally */
+ kThemeWindowHasVerticalZoom = (1 << 4), /* window can zoom only vertically */
+ kThemeWindowHasFullZoom = kThemeWindowHasHorizontalZoom + kThemeWindowHasVerticalZoom, /* window zooms in all directions */
+ kThemeWindowHasCloseBox = (1 << 5), /* window has a close box */
+ kThemeWindowHasCollapseBox = (1 << 6), /* window has a collapse box */
+ kThemeWindowHasTitleText = (1 << 7), /* window has a title/title icon */
+ kThemeWindowIsCollapsed = (1 << 8), /* window is in the collapsed state */
+ kThemeWindowHasA = (1 << 9),
+ kThemeWindowHasB = (1 << 10)
+};
+
+
+typedef UInt32 ThemeWindowAttributes;
+/*------------------------------------------------------------------------------------------*/
+/* Window Types Supported by the Appearance Manager */
+/*------------------------------------------------------------------------------------------*/
+enum {
+ kThemeDocumentWindow = 0,
+ kThemeDialogWindow = 1,
+ kThemeMovableDialogWindow = 2,
+ kThemeAlertWindow = 3,
+ kThemeMovableAlertWindow = 4,
+ kThemePlainDialogWindow = 5,
+ kThemeShadowDialogWindow = 6,
+ kThemePopupWindow = 7,
+ kThemeUtilityWindow = 8,
+ kThemeUtilitySideWindow = 9
+};
+
+typedef UInt16 ThemeWindowType;
+/*------------------------------------------------------------------------------------------*/
+/* Window Widgets Supported by the Appearance Manager */
+/*------------------------------------------------------------------------------------------*/
+enum {
+ kThemeWidgetCloseBox = 0,
+ kThemeWidgetZoomBox = 1,
+ kThemeWidgetCollapseBox = 2,
+ kThemeWidgetABox = 3,
+ kThemeWidgetBBox = 4,
+ kThemeWidgetBOffBox = 5
+};
+
+typedef UInt16 ThemeTitleBarWidget;
+/*------------------------------------------------------------------------------------------*/
+/* Popup arrow orientations */
+/*------------------------------------------------------------------------------------------*/
+enum {
+ kThemeArrowLeft = 0,
+ kThemeArrowDown = 1,
+ kThemeArrowRight = 2,
+ kThemeArrowUp = 3
+};
+
+typedef UInt16 ThemeArrowOrientation;
+/*------------------------------------------------------------------------------------------*/
+/* Popup arrow sizes */
+/*------------------------------------------------------------------------------------------*/
+enum {
+ kThemeArrow3pt = 0,
+ kThemeArrow5pt = 1,
+ kThemeArrow7pt = 2,
+ kThemeArrow9pt = 3
+};
+
+typedef UInt16 ThemePopupArrowSize;
+/*------------------------------------------------------------------------------------------*/
+/* Grow box directions */
+/*------------------------------------------------------------------------------------------*/
+enum {
+ kThemeGrowLeft = (1 << 0), /* can grow to the left */
+ kThemeGrowRight = (1 << 1), /* can grow to the right */
+ kThemeGrowUp = (1 << 2), /* can grow up */
+ kThemeGrowDown = (1 << 3) /* can grow down */
+};
+
+typedef UInt16 ThemeGrowDirection;
+/*------------------------------------------------------------------------------------------*/
+/* Button kinds */
+/*------------------------------------------------------------------------------------------*/
+enum {
+ kThemePushButton = 0,
+ kThemeCheckBox = 1,
+ kThemeRadioButton = 2,
+ kThemeBevelButton = 3, /* bevel button (obsolete) */
+ kThemeArrowButton = 4, /* popup button without text (no label) */
+ kThemePopupButton = 5, /* popup button */
+ kThemeDisclosureButton = 6,
+ kThemeIncDecButton = 7, /* increment/decrement buttons (no label) */
+ kThemeSmallBevelButton = 8, /* small-shadow bevel button */
+ kThemeMediumBevelButton = 3, /* med-shadow bevel button */
+ kThemeLargeBevelButton = 9 /* large-shadow bevel button */
+};
+
+typedef UInt16 ThemeButtonKind;
+/*------------------------------------------------------------------------------------------*/
+/* Common button values */
+/*------------------------------------------------------------------------------------------*/
+enum {
+ kThemeButtonOff = 0,
+ kThemeButtonOn = 1,
+ kThemeButtonMixed = 2,
+ kThemeDisclosureRight = 0,
+ kThemeDisclosureDown = 1,
+ kThemeDisclosureLeft = 2
+};
+
+typedef UInt16 ThemeButtonValue;
+/*------------------------------------------------------------------------------------------*/
+/* Button adornment types */
+/*------------------------------------------------------------------------------------------*/
+enum {
+ kThemeAdornmentNone = 0,
+ kThemeAdornmentDefault = (1 << 0), /* if set, draw default ornamentation ( push button only ) */
+ kThemeAdornmentFocus = (1 << 2), /* if set, draw focus */
+ kThemeAdornmentRightToLeft = (1 << 4), /* if set, draw right to left label */
+ kThemeAdornmentDrawIndicatorOnly = (1 << 5) /* if set, don't draw or erase label ( radio, check, disclosure ) */
+};
+
+typedef UInt16 ThemeButtonAdornment;
+/*------------------------------------------------------------------------------------------*/
+/* Button drawing info block */
+/*------------------------------------------------------------------------------------------*/
+
+struct ThemeButtonDrawInfo {
+ ThemeDrawState state;
+ ThemeButtonValue value;
+ ThemeButtonAdornment adornment;
+};
+typedef struct ThemeButtonDrawInfo ThemeButtonDrawInfo;
+typedef ThemeButtonDrawInfo * ThemeButtonDrawInfoPtr;
+/*------------------------------------------------------------------------------------------*/
+/* Sound Support */
+/*------------------------------------------------------------------------------------------*/
+/*------------------------------------------------------------------------------------------*/
+/* Sound classes */
+/* */
+/* You can use the constants below to set what sounds are active using the SetTheme API. */
+/* Use these with the kThemeSoundMask tag. */
+/*------------------------------------------------------------------------------------------*/
+enum {
+ kThemeNoSounds = 0,
+ kThemeWindowSoundsMask = (1 << 0),
+ kThemeMenuSoundsMask = (1 << 1),
+ kThemeControlSoundsMask = (1 << 2),
+ kThemeFinderSoundsMask = (1 << 3)
+};
+
+
+/*------------------------------------------------------------------------------------------*/
+/* Drag Sounds */
+/* */
+/* Drag sounds are looped for the duration of the drag. */
+/* */
+/* Call BeginThemeDragSound at the start of the drag. */
+/* Call EndThemeDragSound when the drag has finished. */
+/* */
+/* Note that in order to maintain a consistent user experience, only one drag sound may */
+/* occur at a time. The sound should be attached to a mouse action, start after the */
+/* mouse goes down and stop when the mouse is released. */
+/*------------------------------------------------------------------------------------------*/
+enum {
+ kThemeDragSoundNone = 0,
+ kThemeDragSoundMoveWindow = FOUR_CHAR_CODE('wmov'),
+ kThemeDragSoundGrowWindow = FOUR_CHAR_CODE('wgro'),
+ kThemeDragSoundMoveUtilWindow = FOUR_CHAR_CODE('umov'),
+ kThemeDragSoundGrowUtilWindow = FOUR_CHAR_CODE('ugro'),
+ kThemeDragSoundMoveDialog = FOUR_CHAR_CODE('dmov'),
+ kThemeDragSoundMoveAlert = FOUR_CHAR_CODE('amov'),
+ kThemeDragSoundMoveIcon = FOUR_CHAR_CODE('imov'),
+ kThemeDragSoundSliderThumb = FOUR_CHAR_CODE('slth'),
+ kThemeDragSoundSliderGhost = FOUR_CHAR_CODE('slgh'),
+ kThemeDragSoundScrollBarThumb = FOUR_CHAR_CODE('sbth'),
+ kThemeDragSoundScrollBarGhost = FOUR_CHAR_CODE('sbgh'),
+ kThemeDragSoundScrollBarArrowDecreasing = FOUR_CHAR_CODE('sbad'),
+ kThemeDragSoundScrollBarArrowIncreasing = FOUR_CHAR_CODE('sbai'),
+ kThemeDragSoundDragging = FOUR_CHAR_CODE('drag')
+};
+
+
+typedef OSType ThemeDragSoundKind;
+/*--------------------------------------------------------------------------*/
+/* State-change sounds */
+/* */
+/* State-change sounds are played asynchonously as a one-shot. */
+/* */
+/* Call PlayThemeSound to play the sound. The sound will play */
+/* asynchronously until complete, then stop automatically. */
+/*--------------------------------------------------------------------------*/
+enum {
+ kThemeSoundNone = 0,
+ kThemeSoundMenuOpen = FOUR_CHAR_CODE('mnuo'), /* menu sounds */
+ kThemeSoundMenuClose = FOUR_CHAR_CODE('mnuc'),
+ kThemeSoundMenuItemHilite = FOUR_CHAR_CODE('mnui'),
+ kThemeSoundMenuItemRelease = FOUR_CHAR_CODE('mnus'),
+ kThemeSoundWindowClosePress = FOUR_CHAR_CODE('wclp'), /* window sounds */
+ kThemeSoundWindowCloseEnter = FOUR_CHAR_CODE('wcle'),
+ kThemeSoundWindowCloseExit = FOUR_CHAR_CODE('wclx'),
+ kThemeSoundWindowCloseRelease = FOUR_CHAR_CODE('wclr'),
+ kThemeSoundWindowZoomPress = FOUR_CHAR_CODE('wzmp'),
+ kThemeSoundWindowZoomEnter = FOUR_CHAR_CODE('wzme'),
+ kThemeSoundWindowZoomExit = FOUR_CHAR_CODE('wzmx'),
+ kThemeSoundWindowZoomRelease = FOUR_CHAR_CODE('wzmr'),
+ kThemeSoundWindowCollapsePress = FOUR_CHAR_CODE('wcop'),
+ kThemeSoundWindowCollapseEnter = FOUR_CHAR_CODE('wcoe'),
+ kThemeSoundWindowCollapseExit = FOUR_CHAR_CODE('wcox'),
+ kThemeSoundWindowCollapseRelease = FOUR_CHAR_CODE('wcor'),
+ kThemeSoundWindowDragBoundary = FOUR_CHAR_CODE('wdbd'),
+ kThemeSoundUtilWinClosePress = FOUR_CHAR_CODE('uclp'), /* utility window sounds */
+ kThemeSoundUtilWinCloseEnter = FOUR_CHAR_CODE('ucle'),
+ kThemeSoundUtilWinCloseExit = FOUR_CHAR_CODE('uclx'),
+ kThemeSoundUtilWinCloseRelease = FOUR_CHAR_CODE('uclr'),
+ kThemeSoundUtilWinZoomPress = FOUR_CHAR_CODE('uzmp'),
+ kThemeSoundUtilWinZoomEnter = FOUR_CHAR_CODE('uzme'),
+ kThemeSoundUtilWinZoomExit = FOUR_CHAR_CODE('uzmx'),
+ kThemeSoundUtilWinZoomRelease = FOUR_CHAR_CODE('uzmr'),
+ kThemeSoundUtilWinCollapsePress = FOUR_CHAR_CODE('ucop'),
+ kThemeSoundUtilWinCollapseEnter = FOUR_CHAR_CODE('ucoe'),
+ kThemeSoundUtilWinCollapseExit = FOUR_CHAR_CODE('ucox'),
+ kThemeSoundUtilWinCollapseRelease = FOUR_CHAR_CODE('ucor'),
+ kThemeSoundUtilWinDragBoundary = FOUR_CHAR_CODE('udbd'),
+ kThemeSoundWindowOpen = FOUR_CHAR_CODE('wopn'), /* window close and zoom action */
+ kThemeSoundWindowClose = FOUR_CHAR_CODE('wcls'),
+ kThemeSoundWindowZoomIn = FOUR_CHAR_CODE('wzmi'),
+ kThemeSoundWindowZoomOut = FOUR_CHAR_CODE('wzmo'),
+ kThemeSoundWindowCollapseUp = FOUR_CHAR_CODE('wcol'),
+ kThemeSoundWindowCollapseDown = FOUR_CHAR_CODE('wexp'),
+ kThemeSoundWindowActivate = FOUR_CHAR_CODE('wact'),
+ kThemeSoundUtilWindowOpen = FOUR_CHAR_CODE('uopn'),
+ kThemeSoundUtilWindowClose = FOUR_CHAR_CODE('ucls'),
+ kThemeSoundUtilWindowZoomIn = FOUR_CHAR_CODE('uzmi'),
+ kThemeSoundUtilWindowZoomOut = FOUR_CHAR_CODE('uzmo'),
+ kThemeSoundUtilWindowCollapseUp = FOUR_CHAR_CODE('ucol'),
+ kThemeSoundUtilWindowCollapseDown = FOUR_CHAR_CODE('uexp'),
+ kThemeSoundUtilWindowActivate = FOUR_CHAR_CODE('uact'),
+ kThemeSoundDialogOpen = FOUR_CHAR_CODE('dopn'),
+ kThemeSoundDialogClose = FOUR_CHAR_CODE('dlgc'),
+ kThemeSoundAlertOpen = FOUR_CHAR_CODE('aopn'),
+ kThemeSoundAlertClose = FOUR_CHAR_CODE('altc'),
+ kThemeSoundPopupWindowOpen = FOUR_CHAR_CODE('pwop'),
+ kThemeSoundPopupWindowClose = FOUR_CHAR_CODE('pwcl'),
+ kThemeSoundButtonPress = FOUR_CHAR_CODE('btnp'), /* button */
+ kThemeSoundButtonEnter = FOUR_CHAR_CODE('btne'),
+ kThemeSoundButtonExit = FOUR_CHAR_CODE('btnx'),
+ kThemeSoundButtonRelease = FOUR_CHAR_CODE('btnr'),
+ kThemeSoundDefaultButtonPress = FOUR_CHAR_CODE('dbtp'), /* default button */
+ kThemeSoundDefaultButtonEnter = FOUR_CHAR_CODE('dbte'),
+ kThemeSoundDefaultButtonExit = FOUR_CHAR_CODE('dbtx'),
+ kThemeSoundDefaultButtonRelease = FOUR_CHAR_CODE('dbtr'),
+ kThemeSoundCancelButtonPress = FOUR_CHAR_CODE('cbtp'), /* cancel button */
+ kThemeSoundCancelButtonEnter = FOUR_CHAR_CODE('cbte'),
+ kThemeSoundCancelButtonExit = FOUR_CHAR_CODE('cbtx'),
+ kThemeSoundCancelButtonRelease = FOUR_CHAR_CODE('cbtr'),
+ kThemeSoundCheckboxPress = FOUR_CHAR_CODE('chkp'), /* checkboxes */
+ kThemeSoundCheckboxEnter = FOUR_CHAR_CODE('chke'),
+ kThemeSoundCheckboxExit = FOUR_CHAR_CODE('chkx'),
+ kThemeSoundCheckboxRelease = FOUR_CHAR_CODE('chkr'),
+ kThemeSoundRadioPress = FOUR_CHAR_CODE('radp'), /* radio buttons */
+ kThemeSoundRadioEnter = FOUR_CHAR_CODE('rade'),
+ kThemeSoundRadioExit = FOUR_CHAR_CODE('radx'),
+ kThemeSoundRadioRelease = FOUR_CHAR_CODE('radr'),
+ kThemeSoundScrollArrowPress = FOUR_CHAR_CODE('sbap'), /* scroll bars */
+ kThemeSoundScrollArrowEnter = FOUR_CHAR_CODE('sbae'),
+ kThemeSoundScrollArrowExit = FOUR_CHAR_CODE('sbax'),
+ kThemeSoundScrollArrowRelease = FOUR_CHAR_CODE('sbar'),
+ kThemeSoundScrollEndOfTrack = FOUR_CHAR_CODE('sbte'),
+ kThemeSoundScrollTrackPress = FOUR_CHAR_CODE('sbtp'),
+ kThemeSoundSliderEndOfTrack = FOUR_CHAR_CODE('slte'), /* sliders */
+ kThemeSoundSliderTrackPress = FOUR_CHAR_CODE('sltp'),
+ kThemeSoundBalloonOpen = FOUR_CHAR_CODE('blno'), /* help balloons */
+ kThemeSoundBalloonClose = FOUR_CHAR_CODE('blnc'),
+ kThemeSoundBevelPress = FOUR_CHAR_CODE('bevp'), /* Bevel buttons */
+ kThemeSoundBevelEnter = FOUR_CHAR_CODE('beve'),
+ kThemeSoundBevelExit = FOUR_CHAR_CODE('bevx'),
+ kThemeSoundBevelRelease = FOUR_CHAR_CODE('bevr'),
+ kThemeSoundLittleArrowUpPress = FOUR_CHAR_CODE('laup'), /* Little Arrows */
+ kThemeSoundLittleArrowDnPress = FOUR_CHAR_CODE('ladp'),
+ kThemeSoundLittleArrowEnter = FOUR_CHAR_CODE('lare'),
+ kThemeSoundLittleArrowExit = FOUR_CHAR_CODE('larx'),
+ kThemeSoundLittleArrowUpRelease = FOUR_CHAR_CODE('laur'),
+ kThemeSoundLittleArrowDnRelease = FOUR_CHAR_CODE('ladr'),
+ kThemeSoundPopupPress = FOUR_CHAR_CODE('popp'), /* Popup Buttons */
+ kThemeSoundPopupEnter = FOUR_CHAR_CODE('pope'),
+ kThemeSoundPopupExit = FOUR_CHAR_CODE('popx'),
+ kThemeSoundPopupRelease = FOUR_CHAR_CODE('popr'),
+ kThemeSoundDisclosurePress = FOUR_CHAR_CODE('dscp'), /* Disclosure Buttons */
+ kThemeSoundDisclosureEnter = FOUR_CHAR_CODE('dsce'),
+ kThemeSoundDisclosureExit = FOUR_CHAR_CODE('dscx'),
+ kThemeSoundDisclosureRelease = FOUR_CHAR_CODE('dscr'),
+ kThemeSoundTabPressed = FOUR_CHAR_CODE('tabp'), /* Tabs */
+ kThemeSoundTabEnter = FOUR_CHAR_CODE('tabe'),
+ kThemeSoundTabExit = FOUR_CHAR_CODE('tabx'),
+ kThemeSoundTabRelease = FOUR_CHAR_CODE('tabr'),
+ kThemeSoundDragTargetHilite = FOUR_CHAR_CODE('dthi'), /* drag manager */
+ kThemeSoundDragTargetUnhilite = FOUR_CHAR_CODE('dtuh'),
+ kThemeSoundDragTargetDrop = FOUR_CHAR_CODE('dtdr'),
+ kThemeSoundEmptyTrash = FOUR_CHAR_CODE('ftrs'), /* finder */
+ kThemeSoundSelectItem = FOUR_CHAR_CODE('fsel'),
+ kThemeSoundNewItem = FOUR_CHAR_CODE('fnew'),
+ kThemeSoundReceiveDrop = FOUR_CHAR_CODE('fdrp'),
+ kThemeSoundCopyDone = FOUR_CHAR_CODE('fcpd'),
+ kThemeSoundResolveAlias = FOUR_CHAR_CODE('fral'),
+ kThemeSoundLaunchApp = FOUR_CHAR_CODE('flap'),
+ kThemeSoundDiskInsert = FOUR_CHAR_CODE('dski'),
+ kThemeSoundDiskEject = FOUR_CHAR_CODE('dske'),
+ kThemeSoundFinderDragOnIcon = FOUR_CHAR_CODE('fdon'),
+ kThemeSoundFinderDragOffIcon = FOUR_CHAR_CODE('fdof')
+};
+
+typedef OSType ThemeSoundKind;
+/*------------------------------------------------------------------------------------------*/
+/* Window Metrics */
+/*------------------------------------------------------------------------------------------*/
+/* Window metrics are used by the Appearance manager to fill in the blanks necessary to */
+/* draw windows. If a value is not appropriate for the type of window, be sure to fill in */
+/* the slot in the structure with zero. For the popupTabOffset parameter, you can pass a*/
+/* real value based on the left edge of the window. This value might be interpreted in a */
+/* different manner when depending on the value of the popupTabPosition field. The values */
+/* you can pass into popupTabPosition are: */
+/* */
+/* kThemePopupTabNormalPosition */
+/* Starts the tab left edge at the position indicated by the popupTabOffset field. */
+/* */
+/* kThemePopupTabCenterOnWindow */
+/* tells us to ignore the offset field and instead simply center the width of the */
+/* handle on the window. */
+/* */
+/* kThemePopupTabCenterOnOffset */
+/* tells us to center the width of the handle around the value passed in offset. */
+/* */
+/* The Appearance Manager will try its best to accomodate the requested placement, but may */
+/* move the handle slightly to make it fit correctly. */
+/* */
+enum {
+ kThemePopupTabNormalPosition = 0,
+ kThemePopupTabCenterOnWindow = 1,
+ kThemePopupTabCenterOnOffset = 2
+};
+
+
+struct ThemeWindowMetrics {
+ UInt16 metricSize; /* should be always be sizeof( ThemeWindowMetrics )*/
+ SInt16 titleHeight;
+ SInt16 titleWidth;
+ SInt16 popupTabOffset;
+ SInt16 popupTabWidth;
+ UInt16 popupTabPosition;
+};
+typedef struct ThemeWindowMetrics ThemeWindowMetrics;
+typedef ThemeWindowMetrics * ThemeWindowMetricsPtr;
+/*------------------------------------------------------------------------------------------*/
+/* Theme Metrics */
+/*------------------------------------------------------------------------------------------*/
+/* Theme metrics allow you to find out sizes of things in the current environment, such as */
+/* how wide a scroll bar is, etc. */
+enum {
+ kThemeMetricScrollBarWidth = 0,
+ kThemeMetricSmallScrollBarWidth = 1,
+ kThemeMetricCheckBoxGlyphHeight = 2,
+ kThemeMetricRadioButtonGlyphHeight = 3
+};
+
+
+typedef UInt32 ThemeMetric;
+/*------------------------------------------------------------------------------------------*/
+/* Drawing State */
+/*------------------------------------------------------------------------------------------*/
+typedef struct OpaqueThemeDrawingState* ThemeDrawingState;
+/*------------------------------------------------------------------------------------------*/
+/* Callback procs */
+/*------------------------------------------------------------------------------------------*/
+typedef CALLBACK_API( void , ThemeTabTitleDrawProcPtr )(const Rect *bounds, ThemeTabStyle style, ThemeTabDirection direction, SInt16 depth, Boolean isColorDev, UInt32 userData);
+typedef CALLBACK_API( void , ThemeEraseProcPtr )(const Rect *bounds, UInt32 eraseData, SInt16 depth, Boolean isColorDev);
+typedef CALLBACK_API( void , ThemeButtonDrawProcPtr )(const Rect *bounds, ThemeButtonKind kind, const ThemeButtonDrawInfo *info, UInt32 userData, SInt16 depth, Boolean isColorDev);
+typedef CALLBACK_API( void , WindowTitleDrawingProcPtr )(const Rect *bounds, SInt16 depth, Boolean colorDevice, UInt32 userData);
+typedef CALLBACK_API( Boolean , ThemeIteratorProcPtr )(ConstStr255Param inFileName, SInt16 resID, Collection inThemeSettings, void *inUserData);
+typedef STACK_UPP_TYPE(ThemeTabTitleDrawProcPtr) ThemeTabTitleDrawUPP;
+typedef STACK_UPP_TYPE(ThemeEraseProcPtr) ThemeEraseUPP;
+typedef STACK_UPP_TYPE(ThemeButtonDrawProcPtr) ThemeButtonDrawUPP;
+typedef STACK_UPP_TYPE(WindowTitleDrawingProcPtr) WindowTitleDrawingUPP;
+typedef STACK_UPP_TYPE(ThemeIteratorProcPtr) ThemeIteratorUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(ThemeTabTitleDrawUPP)
+ NewThemeTabTitleDrawUPP (ThemeTabTitleDrawProcPtr userRoutine);
+
+ EXTERN_API(ThemeEraseUPP)
+ NewThemeEraseUPP (ThemeEraseProcPtr userRoutine);
+
+ EXTERN_API(ThemeButtonDrawUPP)
+ NewThemeButtonDrawUPP (ThemeButtonDrawProcPtr userRoutine);
+
+ EXTERN_API(WindowTitleDrawingUPP)
+ NewWindowTitleDrawingUPP (WindowTitleDrawingProcPtr userRoutine);
+
+ EXTERN_API(ThemeIteratorUPP)
+ NewThemeIteratorUPP (ThemeIteratorProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeThemeTabTitleDrawUPP (ThemeTabTitleDrawUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeThemeEraseUPP (ThemeEraseUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeThemeButtonDrawUPP (ThemeButtonDrawUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeWindowTitleDrawingUPP (WindowTitleDrawingUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeThemeIteratorUPP (ThemeIteratorUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeThemeTabTitleDrawUPP (const Rect * bounds,
+ ThemeTabStyle style,
+ ThemeTabDirection direction,
+ SInt16 depth,
+ Boolean isColorDev,
+ UInt32 userData,
+ ThemeTabTitleDrawUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeThemeEraseUPP (const Rect * bounds,
+ UInt32 eraseData,
+ SInt16 depth,
+ Boolean isColorDev,
+ ThemeEraseUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeThemeButtonDrawUPP (const Rect * bounds,
+ ThemeButtonKind kind,
+ const ThemeButtonDrawInfo * info,
+ UInt32 userData,
+ SInt16 depth,
+ Boolean isColorDev,
+ ThemeButtonDrawUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeWindowTitleDrawingUPP (const Rect * bounds,
+ SInt16 depth,
+ Boolean colorDevice,
+ UInt32 userData,
+ WindowTitleDrawingUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeThemeIteratorUPP (ConstStr255Param inFileName,
+ SInt16 resID,
+ Collection inThemeSettings,
+ void * inUserData,
+ ThemeIteratorUPP userUPP);
+
+#else
+ enum { uppThemeTabTitleDrawProcInfo = 0x00036AC0 }; /* pascal no_return_value Func(4_bytes, 2_bytes, 2_bytes, 2_bytes, 1_byte, 4_bytes) */
+ enum { uppThemeEraseProcInfo = 0x00001BC0 }; /* pascal no_return_value Func(4_bytes, 4_bytes, 2_bytes, 1_byte) */
+ enum { uppThemeButtonDrawProcInfo = 0x0001BEC0 }; /* pascal no_return_value Func(4_bytes, 2_bytes, 4_bytes, 4_bytes, 2_bytes, 1_byte) */
+ enum { uppWindowTitleDrawingProcInfo = 0x000036C0 }; /* pascal no_return_value Func(4_bytes, 2_bytes, 1_byte, 4_bytes) */
+ enum { uppThemeIteratorProcInfo = 0x00003ED0 }; /* pascal 1_byte Func(4_bytes, 2_bytes, 4_bytes, 4_bytes) */
+ #define NewThemeTabTitleDrawUPP(userRoutine) (ThemeTabTitleDrawUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppThemeTabTitleDrawProcInfo, GetCurrentArchitecture())
+ #define NewThemeEraseUPP(userRoutine) (ThemeEraseUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppThemeEraseProcInfo, GetCurrentArchitecture())
+ #define NewThemeButtonDrawUPP(userRoutine) (ThemeButtonDrawUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppThemeButtonDrawProcInfo, GetCurrentArchitecture())
+ #define NewWindowTitleDrawingUPP(userRoutine) (WindowTitleDrawingUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppWindowTitleDrawingProcInfo, GetCurrentArchitecture())
+ #define NewThemeIteratorUPP(userRoutine) (ThemeIteratorUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppThemeIteratorProcInfo, GetCurrentArchitecture())
+ #define DisposeThemeTabTitleDrawUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeThemeEraseUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeThemeButtonDrawUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeWindowTitleDrawingUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeThemeIteratorUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeThemeTabTitleDrawUPP(bounds, style, direction, depth, isColorDev, userData, userUPP) CALL_SIX_PARAMETER_UPP((userUPP), uppThemeTabTitleDrawProcInfo, (bounds), (style), (direction), (depth), (isColorDev), (userData))
+ #define InvokeThemeEraseUPP(bounds, eraseData, depth, isColorDev, userUPP) CALL_FOUR_PARAMETER_UPP((userUPP), uppThemeEraseProcInfo, (bounds), (eraseData), (depth), (isColorDev))
+ #define InvokeThemeButtonDrawUPP(bounds, kind, info, userData, depth, isColorDev, userUPP) CALL_SIX_PARAMETER_UPP((userUPP), uppThemeButtonDrawProcInfo, (bounds), (kind), (info), (userData), (depth), (isColorDev))
+ #define InvokeWindowTitleDrawingUPP(bounds, depth, colorDevice, userData, userUPP) CALL_FOUR_PARAMETER_UPP((userUPP), uppWindowTitleDrawingProcInfo, (bounds), (depth), (colorDevice), (userData))
+ #define InvokeThemeIteratorUPP(inFileName, resID, inThemeSettings, inUserData, userUPP) (Boolean)CALL_FOUR_PARAMETER_UPP((userUPP), uppThemeIteratorProcInfo, (inFileName), (resID), (inThemeSettings), (inUserData))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewThemeTabTitleDrawProc(userRoutine) NewThemeTabTitleDrawUPP(userRoutine)
+#define NewThemeEraseProc(userRoutine) NewThemeEraseUPP(userRoutine)
+#define NewThemeButtonDrawProc(userRoutine) NewThemeButtonDrawUPP(userRoutine)
+#define NewWindowTitleDrawingProc(userRoutine) NewWindowTitleDrawingUPP(userRoutine)
+#define NewThemeIteratorProc(userRoutine) NewThemeIteratorUPP(userRoutine)
+#define CallThemeTabTitleDrawProc(userRoutine, bounds, style, direction, depth, isColorDev, userData) InvokeThemeTabTitleDrawUPP(bounds, style, direction, depth, isColorDev, userData, userRoutine)
+#define CallThemeEraseProc(userRoutine, bounds, eraseData, depth, isColorDev) InvokeThemeEraseUPP(bounds, eraseData, depth, isColorDev, userRoutine)
+#define CallThemeButtonDrawProc(userRoutine, bounds, kind, info, userData, depth, isColorDev) InvokeThemeButtonDrawUPP(bounds, kind, info, userData, depth, isColorDev, userRoutine)
+#define CallWindowTitleDrawingProc(userRoutine, bounds, depth, colorDevice, userData) InvokeWindowTitleDrawingUPP(bounds, depth, colorDevice, userData, userRoutine)
+#define CallThemeIteratorProc(userRoutine, inFileName, resID, inThemeSettings, inUserData) InvokeThemeIteratorUPP(inFileName, resID, inThemeSettings, inUserData, userRoutine)
+/*----------------------------------------------------------------------------------*/
+/* Menu Drawing callbacks */
+/*----------------------------------------------------------------------------------*/
+typedef CALLBACK_API( void , MenuTitleDrawingProcPtr )(const Rect *inBounds, SInt16 inDepth, Boolean inIsColorDevice, SInt32 inUserData);
+typedef CALLBACK_API( void , MenuItemDrawingProcPtr )(const Rect *inBounds, SInt16 inDepth, Boolean inIsColorDevice, SInt32 inUserData);
+typedef STACK_UPP_TYPE(MenuTitleDrawingProcPtr) MenuTitleDrawingUPP;
+typedef STACK_UPP_TYPE(MenuItemDrawingProcPtr) MenuItemDrawingUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(MenuTitleDrawingUPP)
+ NewMenuTitleDrawingUPP (MenuTitleDrawingProcPtr userRoutine);
+
+ EXTERN_API(MenuItemDrawingUPP)
+ NewMenuItemDrawingUPP (MenuItemDrawingProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeMenuTitleDrawingUPP (MenuTitleDrawingUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeMenuItemDrawingUPP (MenuItemDrawingUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeMenuTitleDrawingUPP (const Rect * inBounds,
+ SInt16 inDepth,
+ Boolean inIsColorDevice,
+ SInt32 inUserData,
+ MenuTitleDrawingUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeMenuItemDrawingUPP (const Rect * inBounds,
+ SInt16 inDepth,
+ Boolean inIsColorDevice,
+ SInt32 inUserData,
+ MenuItemDrawingUPP userUPP);
+
+#else
+ enum { uppMenuTitleDrawingProcInfo = 0x000036C0 }; /* pascal no_return_value Func(4_bytes, 2_bytes, 1_byte, 4_bytes) */
+ enum { uppMenuItemDrawingProcInfo = 0x000036C0 }; /* pascal no_return_value Func(4_bytes, 2_bytes, 1_byte, 4_bytes) */
+ #define NewMenuTitleDrawingUPP(userRoutine) (MenuTitleDrawingUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMenuTitleDrawingProcInfo, GetCurrentArchitecture())
+ #define NewMenuItemDrawingUPP(userRoutine) (MenuItemDrawingUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMenuItemDrawingProcInfo, GetCurrentArchitecture())
+ #define DisposeMenuTitleDrawingUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeMenuItemDrawingUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeMenuTitleDrawingUPP(inBounds, inDepth, inIsColorDevice, inUserData, userUPP) CALL_FOUR_PARAMETER_UPP((userUPP), uppMenuTitleDrawingProcInfo, (inBounds), (inDepth), (inIsColorDevice), (inUserData))
+ #define InvokeMenuItemDrawingUPP(inBounds, inDepth, inIsColorDevice, inUserData, userUPP) CALL_FOUR_PARAMETER_UPP((userUPP), uppMenuItemDrawingProcInfo, (inBounds), (inDepth), (inIsColorDevice), (inUserData))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewMenuTitleDrawingProc(userRoutine) NewMenuTitleDrawingUPP(userRoutine)
+#define NewMenuItemDrawingProc(userRoutine) NewMenuItemDrawingUPP(userRoutine)
+#define CallMenuTitleDrawingProc(userRoutine, inBounds, inDepth, inIsColorDevice, inUserData) InvokeMenuTitleDrawingUPP(inBounds, inDepth, inIsColorDevice, inUserData, userRoutine)
+#define CallMenuItemDrawingProc(userRoutine, inBounds, inDepth, inIsColorDevice, inUserData) InvokeMenuItemDrawingUPP(inBounds, inDepth, inIsColorDevice, inUserData, userRoutine)
+/*----------------------------------------------------------------------------------*/
+/* Appearance Manager APIs */
+/*----------------------------------------------------------------------------------*/
+/* Registering Appearance-Savvy Applications */
+EXTERN_API( OSStatus )
+RegisterAppearanceClient (void) THREEWORDINLINE(0x303C, 0x0015, 0xAA74);
+
+EXTERN_API( OSStatus )
+UnregisterAppearanceClient (void) THREEWORDINLINE(0x303C, 0x0016, 0xAA74);
+
+EXTERN_API( Boolean )
+IsAppearanceClient (const ProcessSerialNumber * process) THREEWORDINLINE(0x303C, 0xFFFF, 0xAA74);
+
+/*****************************************************************************
+ NOTES ON THEME BRUSHES
+ Theme brushes can be either colors or patterns, depending on the theme.
+ Because of this, you should be prepared to handle the case where a brush
+ is a pattern and save and restore the pnPixPat and bkPixPat fields of
+ your GrafPorts when saving the fore and back colors. Also, since patterns
+ in bkPixPat override the background color of the window, you should use
+ BackPat to set your background pattern to a normal white pattern. This
+ will ensure that you can use RGBBackColor to set your back color to white,
+ call EraseRect and get the expected results.
+*****************************************************************************/
+
+EXTERN_API( OSStatus )
+SetThemePen (ThemeBrush inBrush,
+ SInt16 inDepth,
+ Boolean inIsColorDevice) THREEWORDINLINE(0x303C, 0x0001, 0xAA74);
+
+EXTERN_API( OSStatus )
+SetThemeBackground (ThemeBrush inBrush,
+ SInt16 inDepth,
+ Boolean inIsColorDevice) THREEWORDINLINE(0x303C, 0x0002, 0xAA74);
+
+EXTERN_API( OSStatus )
+SetThemeTextColor (ThemeTextColor inColor,
+ SInt16 inDepth,
+ Boolean inIsColorDevice) THREEWORDINLINE(0x303C, 0x0003, 0xAA74);
+
+EXTERN_API( OSStatus )
+SetThemeWindowBackground (WindowPtr inWindow,
+ ThemeBrush inBrush,
+ Boolean inUpdate) THREEWORDINLINE(0x303C, 0x0004, 0xAA74);
+
+/* Window Placards, Headers and Frames */
+EXTERN_API( OSStatus )
+DrawThemeWindowHeader (const Rect * inRect,
+ ThemeDrawState inState) THREEWORDINLINE(0x303C, 0x0005, 0xAA74);
+
+EXTERN_API( OSStatus )
+DrawThemeWindowListViewHeader (const Rect * inRect,
+ ThemeDrawState inState) THREEWORDINLINE(0x303C, 0x0006, 0xAA74);
+
+EXTERN_API( OSStatus )
+DrawThemePlacard (const Rect * inRect,
+ ThemeDrawState inState) THREEWORDINLINE(0x303C, 0x0007, 0xAA74);
+
+EXTERN_API( OSStatus )
+DrawThemeEditTextFrame (const Rect * inRect,
+ ThemeDrawState inState) THREEWORDINLINE(0x303C, 0x0009, 0xAA74);
+
+EXTERN_API( OSStatus )
+DrawThemeListBoxFrame (const Rect * inRect,
+ ThemeDrawState inState) THREEWORDINLINE(0x303C, 0x000A, 0xAA74);
+
+/* Keyboard Focus Drawing */
+EXTERN_API( OSStatus )
+DrawThemeFocusRect (const Rect * inRect,
+ Boolean inHasFocus) THREEWORDINLINE(0x303C, 0x000B, 0xAA74);
+
+/* Dialog Group Boxes and Separators */
+EXTERN_API( OSStatus )
+DrawThemePrimaryGroup (const Rect * inRect,
+ ThemeDrawState inState) THREEWORDINLINE(0x303C, 0x000C, 0xAA74);
+
+EXTERN_API( OSStatus )
+DrawThemeSecondaryGroup (const Rect * inRect,
+ ThemeDrawState inState) THREEWORDINLINE(0x303C, 0x000D, 0xAA74);
+
+EXTERN_API( OSStatus )
+DrawThemeSeparator (const Rect * inRect,
+ ThemeDrawState inState) THREEWORDINLINE(0x303C, 0x000E, 0xAA74);
+
+/*------------------------------ BEGIN APPEARANCE 1.0.1 --------------------------------------------*/
+/* The following Appearance Manager APIs are only available */
+/* in Appearance 1.0.1 or later */
+EXTERN_API( OSStatus )
+DrawThemeModelessDialogFrame (const Rect * inRect,
+ ThemeDrawState inState) THREEWORDINLINE(0x303C, 0x0008, 0xAA74);
+
+EXTERN_API( OSStatus )
+DrawThemeGenericWell (const Rect * inRect,
+ ThemeDrawState inState,
+ Boolean inFillCenter) THREEWORDINLINE(0x303C, 0x0022, 0xAA74);
+
+EXTERN_API( OSStatus )
+DrawThemeFocusRegion (RgnHandle inRegion,
+ Boolean inHasFocus) THREEWORDINLINE(0x303C, 0x0023, 0xAA74);
+
+EXTERN_API( Boolean )
+IsThemeInColor (SInt16 inDepth,
+ Boolean inIsColorDevice) THREEWORDINLINE(0x303C, 0x0024, 0xAA74);
+
+/* IMPORTANT: GetThemeAccentColors will only work in the platinum theme. Any other theme will */
+/* most likely return an error */
+EXTERN_API( OSStatus )
+GetThemeAccentColors (CTabHandle * outColors) THREEWORDINLINE(0x303C, 0x0025, 0xAA74);
+
+EXTERN_API( OSStatus )
+DrawThemeMenuBarBackground (const Rect * inBounds,
+ ThemeMenuBarState inState,
+ UInt32 inAttributes) THREEWORDINLINE(0x303C, 0x0018, 0xAA74);
+
+EXTERN_API( OSStatus )
+DrawThemeMenuTitle (const Rect * inMenuBarRect,
+ const Rect * inTitleRect,
+ ThemeMenuState inState,
+ UInt32 inAttributes,
+ MenuTitleDrawingUPP inTitleProc, /* can be NULL */
+ UInt32 inTitleData) THREEWORDINLINE(0x303C, 0x0019, 0xAA74);
+
+EXTERN_API( OSStatus )
+GetThemeMenuBarHeight (SInt16 * outHeight) THREEWORDINLINE(0x303C, 0x001A, 0xAA74);
+
+EXTERN_API( OSStatus )
+DrawThemeMenuBackground (const Rect * inMenuRect,
+ ThemeMenuType inMenuType) THREEWORDINLINE(0x303C, 0x001B, 0xAA74);
+
+EXTERN_API( OSStatus )
+GetThemeMenuBackgroundRegion (const Rect * inMenuRect,
+ ThemeMenuType menuType,
+ RgnHandle region) THREEWORDINLINE(0x303C, 0x001C, 0xAA74);
+
+EXTERN_API( OSStatus )
+DrawThemeMenuItem (const Rect * inMenuRect,
+ const Rect * inItemRect,
+ SInt16 inVirtualMenuTop,
+ SInt16 inVirtualMenuBottom,
+ ThemeMenuState inState,
+ ThemeMenuItemType inItemType,
+ MenuItemDrawingUPP inDrawProc, /* can be NULL */
+ UInt32 inUserData) THREEWORDINLINE(0x303C, 0x001D, 0xAA74);
+
+EXTERN_API( OSStatus )
+DrawThemeMenuSeparator (const Rect * inItemRect) THREEWORDINLINE(0x303C, 0x001E, 0xAA74);
+
+EXTERN_API( OSStatus )
+GetThemeMenuSeparatorHeight (SInt16 * outHeight) THREEWORDINLINE(0x303C, 0x001F, 0xAA74);
+
+EXTERN_API( OSStatus )
+GetThemeMenuItemExtra (ThemeMenuItemType inItemType,
+ SInt16 * outHeight,
+ SInt16 * outWidth) THREEWORDINLINE(0x303C, 0x0020, 0xAA74);
+
+EXTERN_API( OSStatus )
+GetThemeMenuTitleExtra (SInt16 * outWidth,
+ Boolean inIsSquished) THREEWORDINLINE(0x303C, 0x0021, 0xAA74);
+
+/*------------------------------- BEGIN APPEARANCE 1.1 ---------------------------------------------*/
+/*---------------------------------- THEME SWITCHING -----------------------------------------------*/
+EXTERN_API( OSStatus )
+GetTheme (Collection ioCollection);
+
+EXTERN_API( OSStatus )
+SetTheme (Collection ioCollection);
+
+EXTERN_API( OSStatus )
+IterateThemes (ThemeIteratorUPP inProc,
+ void * inUserData) /* can be NULL */;
+
+/*---------------------------------------- TABS ----------------------------------------------------*/
+EXTERN_API( OSStatus )
+DrawThemeTabPane (const Rect * inRect,
+ ThemeDrawState inState);
+
+EXTERN_API( OSStatus )
+DrawThemeTab (const Rect * inRect,
+ ThemeTabStyle inStyle,
+ ThemeTabDirection inDirection,
+ ThemeTabTitleDrawUPP labelProc, /* can be NULL */
+ UInt32 userData);
+
+EXTERN_API( OSStatus )
+GetThemeTabRegion (const Rect * inRect,
+ ThemeTabStyle inStyle,
+ ThemeTabDirection inDirection,
+ RgnHandle ioRgn);
+
+/*--------------------------------------- CURSORS --------------------------------------------------*/
+EXTERN_API( OSStatus )
+SetThemeCursor (ThemeCursor inCursor);
+
+EXTERN_API( OSStatus )
+SetAnimatedThemeCursor (ThemeCursor inCursor,
+ UInt32 inAnimationStep);
+
+/*-------------------------------- CONTROL STYLE SETTINGS ------------------------------------------*/
+EXTERN_API( OSStatus )
+GetThemeScrollBarThumbStyle (ThemeScrollBarThumbStyle * outStyle);
+
+EXTERN_API( OSStatus )
+GetThemeScrollBarArrowStyle (ThemeScrollBarArrowStyle * outStyle);
+
+EXTERN_API( OSStatus )
+GetThemeCheckBoxStyle (ThemeCheckBoxStyle * outStyle);
+
+/*---------------------------------------- FONTS ---------------------------------------------------*/
+EXTERN_API( OSStatus )
+UseThemeFont (ThemeFontID inFontID,
+ ScriptCode inScript);
+
+EXTERN_API( OSStatus )
+GetThemeFont (ThemeFontID inFontID,
+ ScriptCode inScript,
+ StringPtr outFontName,
+ SInt16 * outFontSize,
+ Style * outStyle);
+
+/*---------------------------------------- TRACKS --------------------------------------------------*/
+EXTERN_API( OSStatus )
+DrawThemeTrack (const ThemeTrackDrawInfo * drawInfo,
+ RgnHandle rgnGhost, /* can be NULL */
+ ThemeEraseUPP eraseProc, /* can be NULL */
+ UInt32 eraseData);
+
+EXTERN_API( Boolean )
+HitTestThemeTrack (const ThemeTrackDrawInfo * drawInfo,
+ Point mousePoint,
+ ControlPartCode * partHit);
+
+EXTERN_API( OSStatus )
+GetThemeTrackBounds (const ThemeTrackDrawInfo * drawInfo,
+ Rect * bounds);
+
+EXTERN_API( OSStatus )
+GetThemeTrackThumbRgn (const ThemeTrackDrawInfo * drawInfo,
+ RgnHandle thumbRgn);
+
+EXTERN_API( OSStatus )
+GetThemeTrackDragRect (const ThemeTrackDrawInfo * drawInfo,
+ Rect * dragRect);
+
+EXTERN_API( OSStatus )
+DrawThemeTrackTickMarks (const ThemeTrackDrawInfo * drawInfo,
+ ItemCount numTicks,
+ ThemeEraseUPP eraseProc, /* can be NULL */
+ UInt32 eraseData);
+
+EXTERN_API( OSStatus )
+GetThemeTrackThumbPositionFromOffset (const ThemeTrackDrawInfo * drawInfo,
+ Point thumbOffset,
+ SInt32 * relativePosition);
+
+EXTERN_API( OSStatus )
+GetThemeTrackThumbPositionFromRegion (const ThemeTrackDrawInfo * drawInfo,
+ RgnHandle thumbRgn,
+ SInt32 * relativePosition);
+
+EXTERN_API( OSStatus )
+GetThemeTrackLiveValue (const ThemeTrackDrawInfo * drawInfo,
+ SInt32 relativePosition,
+ SInt32 * value);
+
+/*----------------------------------- SCROLLBAR ARROWS ---------------------------------------------*/
+EXTERN_API( OSStatus )
+DrawThemeScrollBarArrows (const Rect * bounds,
+ ThemeTrackEnableState enableState,
+ ThemeTrackPressState pressState,
+ Boolean isHoriz,
+ Rect * trackBounds);
+
+EXTERN_API( OSStatus )
+GetThemeScrollBarTrackRect (const Rect * bounds,
+ ThemeTrackEnableState enableState,
+ ThemeTrackPressState pressState,
+ Boolean isHoriz,
+ Rect * trackBounds);
+
+EXTERN_API( Boolean )
+HitTestThemeScrollBarArrows (const Rect * scrollBarBounds,
+ ThemeTrackEnableState enableState,
+ ThemeTrackPressState pressState,
+ Boolean isHoriz,
+ Point ptHit,
+ Rect * trackBounds,
+ ControlPartCode * partcode);
+
+/*---------------------------------------- WINDOWS -------------------------------------------------*/
+EXTERN_API( OSStatus )
+GetThemeWindowRegion (ThemeWindowType flavor,
+ const Rect * contRect,
+ ThemeDrawState state,
+ const ThemeWindowMetrics * metrics,
+ ThemeWindowAttributes attributes,
+ WindowRegionCode winRegion,
+ RgnHandle rgn);
+
+EXTERN_API( OSStatus )
+DrawThemeWindowFrame (ThemeWindowType flavor,
+ const Rect * contRect,
+ ThemeDrawState state,
+ const ThemeWindowMetrics * metrics,
+ ThemeWindowAttributes attributes,
+ WindowTitleDrawingUPP titleProc, /* can be NULL */
+ UInt32 titleData);
+
+EXTERN_API( OSStatus )
+DrawThemeTitleBarWidget (ThemeWindowType flavor,
+ const Rect * contRect,
+ ThemeDrawState state,
+ const ThemeWindowMetrics * metrics,
+ ThemeWindowAttributes attributes,
+ ThemeTitleBarWidget widget);
+
+EXTERN_API( Boolean )
+GetThemeWindowRegionHit (ThemeWindowType flavor,
+ const Rect * inContRect,
+ ThemeDrawState state,
+ const ThemeWindowMetrics * metrics,
+ ThemeWindowAttributes inAttributes,
+ Point inPoint,
+ WindowRegionCode * outRegionHit);
+
+EXTERN_API( OSStatus )
+DrawThemeScrollBarDelimiters (ThemeWindowType flavor,
+ const Rect * inContRect,
+ ThemeDrawState state,
+ ThemeWindowAttributes attributes);
+
+/*---------------------------------------- BUTTONS -------------------------------------------------*/
+EXTERN_API( OSStatus )
+DrawThemeButton (const Rect * inBounds,
+ ThemeButtonKind inKind,
+ const ThemeButtonDrawInfo * inNewInfo,
+ const ThemeButtonDrawInfo * inPrevInfo, /* can be NULL */
+ ThemeEraseUPP inEraseProc, /* can be NULL */
+ ThemeButtonDrawUPP inLabelProc, /* can be NULL */
+ UInt32 inUserData);
+
+EXTERN_API( OSStatus )
+GetThemeButtonRegion (const Rect * inBounds,
+ ThemeButtonKind inKind,
+ const ThemeButtonDrawInfo * inNewInfo,
+ RgnHandle outRegion);
+
+EXTERN_API( OSStatus )
+GetThemeButtonContentBounds (const Rect * inBounds,
+ ThemeButtonKind inKind,
+ const ThemeButtonDrawInfo * inDrawInfo,
+ Rect * outBounds);
+
+EXTERN_API( OSStatus )
+GetThemeButtonBackgroundBounds (const Rect * inBounds,
+ ThemeButtonKind inKind,
+ const ThemeButtonDrawInfo * inDrawInfo,
+ Rect * outBounds);
+
+
+/*------------------------------------- INTERFACE SOUNDS -------------------------------------------*/
+EXTERN_API( OSStatus )
+PlayThemeSound (ThemeSoundKind kind) THREEWORDINLINE(0x303C, 0x0026, 0xAA74);
+
+EXTERN_API( OSStatus )
+BeginThemeDragSound (ThemeDragSoundKind kind) THREEWORDINLINE(0x303C, 0x0027, 0xAA74);
+
+EXTERN_API( OSStatus )
+EndThemeDragSound (void) THREEWORDINLINE(0x303C, 0x0028, 0xAA74);
+
+/*-------------------------------------- PRIMITIVES ------------------------------------------------*/
+EXTERN_API( OSStatus )
+DrawThemeTickMark (const Rect * bounds,
+ ThemeDrawState state);
+
+EXTERN_API( OSStatus )
+DrawThemeChasingArrows (const Rect * bounds,
+ UInt32 index,
+ ThemeDrawState state,
+ ThemeEraseUPP eraseProc, /* can be NULL */
+ UInt32 eraseData);
+
+EXTERN_API( OSStatus )
+DrawThemePopupArrow (const Rect * bounds,
+ ThemeArrowOrientation orientation,
+ ThemePopupArrowSize size,
+ ThemeDrawState state,
+ ThemeEraseUPP eraseProc, /* can be NULL */
+ UInt32 eraseData);
+
+EXTERN_API( OSStatus )
+DrawThemeStandaloneGrowBox (Point origin,
+ ThemeGrowDirection growDirection,
+ Boolean isSmall,
+ ThemeDrawState state);
+
+EXTERN_API( OSStatus )
+DrawThemeStandaloneNoGrowBox (Point origin,
+ ThemeGrowDirection growDirection,
+ Boolean isSmall,
+ ThemeDrawState state);
+
+EXTERN_API( OSStatus )
+GetThemeStandaloneGrowBoxBounds (Point origin,
+ ThemeGrowDirection growDirection,
+ Boolean isSmall,
+ Rect * bounds);
+
+/*------------------------------------- DRAWING STATE ----------------------------------------------*/
+/* The following routines help you save and restore the drawing state in a theme-savvy manner. With */
+/* these weapons in your arsenal, there is no grafport you cannot tame. Use ThemeGetDrawingState to */
+/* get the current drawing settings for the current port. It will return an opaque object for you */
+/* to pass into ThemeSetDrawingState later on. When you are finished with the state, call the */
+/* ThemeDisposeDrawingState routine. You can alternatively pass true into the inDisposeNow */
+/* parameter of the ThemeSetDrawingState routine. You can use this routine to copy the drawing */
+/* state from one port to another as well. */
+EXTERN_API( OSStatus )
+NormalizeThemeDrawingState (void);
+
+EXTERN_API( OSStatus )
+GetThemeDrawingState (ThemeDrawingState * outState);
+
+EXTERN_API( OSStatus )
+SetThemeDrawingState (ThemeDrawingState inState,
+ Boolean inDisposeNow);
+
+EXTERN_API( OSStatus )
+DisposeThemeDrawingState (ThemeDrawingState inState);
+
+/*------------------------------------- MISCELLANEOUS ----------------------------------------------*/
+/* ApplyThemeBackground is used to set up the background for embedded controls */
+/* It is normally called by controls that are embedders. The standard controls */
+/* call this API to ensure a correct background for the current theme. You pass */
+/* in the same rectangle you would if you were calling the drawing primitive. */
+EXTERN_API( OSStatus )
+ApplyThemeBackground (ThemeBackgroundKind inKind,
+ const Rect * bounds,
+ ThemeDrawState inState,
+ SInt16 inDepth,
+ Boolean inColorDev);
+
+EXTERN_API( OSStatus )
+SetThemeTextColorForWindow (WindowPtr window,
+ Boolean isActive,
+ SInt16 depth,
+ Boolean isColorDev);
+
+EXTERN_API( Boolean )
+IsValidAppearanceFileType (OSType fileType);
+
+EXTERN_API( OSStatus )
+GetThemeBrushAsColor (ThemeBrush inBrush,
+ SInt16 inDepth,
+ Boolean inColorDev,
+ RGBColor * outColor);
+
+EXTERN_API( OSStatus )
+GetThemeTextColor (ThemeTextColor inColor,
+ SInt16 inDepth,
+ Boolean inColorDev,
+ RGBColor * outColor);
+
+/*--------------------------------------- BEGIN CARBON ---------------------------------------------*/
+EXTERN_API( OSStatus )
+GetThemeMetric (ThemeMetric inMetric,
+ SInt32 * outMetric);
+
+/*--------------------------------------------------------------------------------------------------*/
+/* Obsolete symbolic names */
+/*--------------------------------------------------------------------------------------------------*/
+/* Obsolete error codes - use the new ones, s'il vous plait / kudasai */
+enum {
+ appearanceBadBrushIndexErr = themeInvalidBrushErr, /* pattern index invalid */
+ appearanceProcessRegisteredErr = themeProcessRegisteredErr,
+ appearanceProcessNotRegisteredErr = themeProcessNotRegisteredErr,
+ appearanceBadTextColorIndexErr = themeBadTextColorErr,
+ appearanceThemeHasNoAccents = themeHasNoAccentsErr,
+ appearanceBadCursorIndexErr = themeBadCursorIndexErr
+};
+
+enum {
+ kThemeActiveDialogBackgroundBrush = kThemeBrushDialogBackgroundActive,
+ kThemeInactiveDialogBackgroundBrush = kThemeBrushDialogBackgroundInactive,
+ kThemeActiveAlertBackgroundBrush = kThemeBrushAlertBackgroundActive,
+ kThemeInactiveAlertBackgroundBrush = kThemeBrushAlertBackgroundInactive,
+ kThemeActiveModelessDialogBackgroundBrush = kThemeBrushModelessDialogBackgroundActive,
+ kThemeInactiveModelessDialogBackgroundBrush = kThemeBrushModelessDialogBackgroundInactive,
+ kThemeActiveUtilityWindowBackgroundBrush = kThemeBrushUtilityWindowBackgroundActive,
+ kThemeInactiveUtilityWindowBackgroundBrush = kThemeBrushUtilityWindowBackgroundInactive,
+ kThemeListViewSortColumnBackgroundBrush = kThemeBrushListViewSortColumnBackground,
+ kThemeListViewBackgroundBrush = kThemeBrushListViewBackground,
+ kThemeIconLabelBackgroundBrush = kThemeBrushIconLabelBackground,
+ kThemeListViewSeparatorBrush = kThemeBrushListViewSeparator,
+ kThemeChasingArrowsBrush = kThemeBrushChasingArrows,
+ kThemeDragHiliteBrush = kThemeBrushDragHilite,
+ kThemeDocumentWindowBackgroundBrush = kThemeBrushDocumentWindowBackground,
+ kThemeFinderWindowBackgroundBrush = kThemeBrushFinderWindowBackground
+};
+
+enum {
+ kThemeActiveScrollBarDelimiterBrush = kThemeBrushScrollBarDelimiterActive,
+ kThemeInactiveScrollBarDelimiterBrush = kThemeBrushScrollBarDelimiterInactive,
+ kThemeFocusHighlightBrush = kThemeBrushFocusHighlight,
+ kThemeActivePopupArrowBrush = kThemeBrushPopupArrowActive,
+ kThemePressedPopupArrowBrush = kThemeBrushPopupArrowPressed,
+ kThemeInactivePopupArrowBrush = kThemeBrushPopupArrowInactive,
+ kThemeAppleGuideCoachmarkBrush = kThemeBrushAppleGuideCoachmark
+};
+
+enum {
+ kThemeActiveDialogTextColor = kThemeTextColorDialogActive,
+ kThemeInactiveDialogTextColor = kThemeTextColorDialogInactive,
+ kThemeActiveAlertTextColor = kThemeTextColorAlertActive,
+ kThemeInactiveAlertTextColor = kThemeTextColorAlertInactive,
+ kThemeActiveModelessDialogTextColor = kThemeTextColorModelessDialogActive,
+ kThemeInactiveModelessDialogTextColor = kThemeTextColorModelessDialogInactive,
+ kThemeActiveWindowHeaderTextColor = kThemeTextColorWindowHeaderActive,
+ kThemeInactiveWindowHeaderTextColor = kThemeTextColorWindowHeaderInactive,
+ kThemeActivePlacardTextColor = kThemeTextColorPlacardActive,
+ kThemeInactivePlacardTextColor = kThemeTextColorPlacardInactive,
+ kThemePressedPlacardTextColor = kThemeTextColorPlacardPressed,
+ kThemeActivePushButtonTextColor = kThemeTextColorPushButtonActive,
+ kThemeInactivePushButtonTextColor = kThemeTextColorPushButtonInactive,
+ kThemePressedPushButtonTextColor = kThemeTextColorPushButtonPressed,
+ kThemeActiveBevelButtonTextColor = kThemeTextColorBevelButtonActive,
+ kThemeInactiveBevelButtonTextColor = kThemeTextColorBevelButtonInactive,
+ kThemePressedBevelButtonTextColor = kThemeTextColorBevelButtonPressed,
+ kThemeActivePopupButtonTextColor = kThemeTextColorPopupButtonActive,
+ kThemeInactivePopupButtonTextColor = kThemeTextColorPopupButtonInactive,
+ kThemePressedPopupButtonTextColor = kThemeTextColorPopupButtonPressed,
+ kThemeIconLabelTextColor = kThemeTextColorIconLabel,
+ kThemeListViewTextColor = kThemeTextColorListView
+};
+
+enum {
+ kThemeActiveDocumentWindowTitleTextColor = kThemeTextColorDocumentWindowTitleActive,
+ kThemeInactiveDocumentWindowTitleTextColor = kThemeTextColorDocumentWindowTitleInactive,
+ kThemeActiveMovableModalWindowTitleTextColor = kThemeTextColorMovableModalWindowTitleActive,
+ kThemeInactiveMovableModalWindowTitleTextColor = kThemeTextColorMovableModalWindowTitleInactive,
+ kThemeActiveUtilityWindowTitleTextColor = kThemeTextColorUtilityWindowTitleActive,
+ kThemeInactiveUtilityWindowTitleTextColor = kThemeTextColorUtilityWindowTitleInactive,
+ kThemeActivePopupWindowTitleColor = kThemeTextColorPopupWindowTitleActive,
+ kThemeInactivePopupWindowTitleColor = kThemeTextColorPopupWindowTitleInactive,
+ kThemeActiveRootMenuTextColor = kThemeTextColorRootMenuActive,
+ kThemeSelectedRootMenuTextColor = kThemeTextColorRootMenuSelected,
+ kThemeDisabledRootMenuTextColor = kThemeTextColorRootMenuDisabled,
+ kThemeActiveMenuItemTextColor = kThemeTextColorMenuItemActive,
+ kThemeSelectedMenuItemTextColor = kThemeTextColorMenuItemSelected,
+ kThemeDisabledMenuItemTextColor = kThemeTextColorMenuItemDisabled,
+ kThemeActivePopupLabelTextColor = kThemeTextColorPopupLabelActive,
+ kThemeInactivePopupLabelTextColor = kThemeTextColorPopupLabelInactive
+};
+
+enum {
+ kAEThemeSwitch = kAEAppearanceChanged /* Event ID's: Theme Switched */
+};
+
+enum {
+ kThemeNoAdornment = kThemeAdornmentNone,
+ kThemeDefaultAdornment = kThemeAdornmentDefault,
+ kThemeFocusAdornment = kThemeAdornmentFocus,
+ kThemeRightToLeftAdornment = kThemeAdornmentRightToLeft,
+ kThemeDrawIndicatorOnly = kThemeAdornmentDrawIndicatorOnly
+};
+
+enum {
+ kThemeBrushPassiveAreaFill = kThemeBrushStaticAreaFill
+};
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __APPEARANCE__ */
+
diff --git a/include/qt/AppleEvents.h b/include/qt/AppleEvents.h
new file mode 100644
index 000000000..e158886a2
--- /dev/null
+++ b/include/qt/AppleEvents.h
@@ -0,0 +1,404 @@
+/*
+ File: AppleEvents.h
+
+ Contains: AppleEvent Package Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1989-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __APPLEEVENTS__
+#define __APPLEEVENTS__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+#ifndef __NOTIFICATION__
+#include "Notification.h"
+#endif
+
+#ifndef __EVENTS__
+#include "Events.h"
+#endif
+
+/*
+ Note: The functions and types for the building and parsing AppleEvent
+ messages has moved to AEDataModel.h
+*/
+#ifndef __AEDATAMODEL__
+#include "AEDataModel.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ /* Keywords for Apple event parameters */
+ keyDirectObject = FOUR_CHAR_CODE('----'),
+ keyErrorNumber = FOUR_CHAR_CODE('errn'),
+ keyErrorString = FOUR_CHAR_CODE('errs'),
+ keyProcessSerialNumber = FOUR_CHAR_CODE('psn '), /* Keywords for special handlers */
+ keyPreDispatch = FOUR_CHAR_CODE('phac'), /* preHandler accessor call */
+ keySelectProc = FOUR_CHAR_CODE('selh'), /* more selector call */
+ /* Keyword for recording */
+ keyAERecorderCount = FOUR_CHAR_CODE('recr'), /* available only in vers 1.0.1 and greater */
+ /* Keyword for version information */
+ keyAEVersion = FOUR_CHAR_CODE('vers') /* available only in vers 1.0.1 and greater */
+};
+
+/* Event Class */
+enum {
+ kCoreEventClass = FOUR_CHAR_CODE('aevt')
+};
+
+/* Event ID's */
+enum {
+ kAEOpenApplication = FOUR_CHAR_CODE('oapp'),
+ kAEOpenDocuments = FOUR_CHAR_CODE('odoc'),
+ kAEPrintDocuments = FOUR_CHAR_CODE('pdoc'),
+ kAEQuitApplication = FOUR_CHAR_CODE('quit'),
+ kAEAnswer = FOUR_CHAR_CODE('ansr'),
+ kAEApplicationDied = FOUR_CHAR_CODE('obit')
+};
+
+/* Constants for recording */
+enum {
+ kAEStartRecording = FOUR_CHAR_CODE('reca'), /* available only in vers 1.0.1 and greater */
+ kAEStopRecording = FOUR_CHAR_CODE('recc'), /* available only in vers 1.0.1 and greater */
+ kAENotifyStartRecording = FOUR_CHAR_CODE('rec1'), /* available only in vers 1.0.1 and greater */
+ kAENotifyStopRecording = FOUR_CHAR_CODE('rec0'), /* available only in vers 1.0.1 and greater */
+ kAENotifyRecording = FOUR_CHAR_CODE('recr') /* available only in vers 1.0.1 and greater */
+};
+
+
+/* parameter to AESend */
+typedef OptionBits AESendOptions;
+enum {
+ kAENeverInteract = 0x00000010, /* server should not interact with user */
+ kAECanInteract = 0x00000020, /* server may try to interact with user */
+ kAEAlwaysInteract = 0x00000030, /* server should always interact with user where appropriate */
+ kAECanSwitchLayer = 0x00000040, /* interaction may switch layer */
+ kAEDontRecord = 0x00001000, /* don't record this event - available only in vers 1.0.1 and greater */
+ kAEDontExecute = 0x00002000, /* don't send the event for recording - available only in vers 1.0.1 and greater */
+ kAEProcessNonReplyEvents = 0x00008000 /* allow processing of non-reply events while awaiting synchronous AppleEvent reply */
+};
+
+typedef SInt32 AESendMode;
+enum {
+ kAENoReply = 0x00000001, /* sender doesn't want a reply to event */
+ kAEQueueReply = 0x00000002, /* sender wants a reply but won't wait */
+ kAEWaitReply = 0x00000003, /* sender wants a reply and will wait */
+ kAEDontReconnect = 0x00000080, /* don't reconnect if there is a sessClosedErr from PPCToolbox */
+ kAEWantReceipt = 0x00000200 /* (nReturnReceipt) sender wants a receipt of message */
+};
+
+
+/* Constants for timeout durations */
+enum {
+ kAEDefaultTimeout = -1, /* timeout value determined by AEM */
+ kNoTimeOut = -2 /* wait until reply comes back, however long it takes */
+};
+
+
+/* priority param of AESend */
+typedef SInt16 AESendPriority;
+enum {
+ kAENormalPriority = 0x00000000, /* post message at the end of the event queue */
+ kAEHighPriority = 0x00000001 /* post message at the front of the event queue (same as nAttnMsg) */
+};
+
+
+typedef SInt8 AEEventSource;
+enum {
+ kAEUnknownSource = 0,
+ kAEDirectCall = 1,
+ kAESameProcess = 2,
+ kAELocalProcess = 3,
+ kAERemoteProcess = 4
+};
+
+
+
+typedef CALLBACK_API( OSErr , AEEventHandlerProcPtr )(const AppleEvent *theAppleEvent, AppleEvent *reply, UInt32 handlerRefcon);
+typedef CALLBACK_API( Boolean , AEIdleProcPtr )(EventRecord *theEvent, long *sleepTime, RgnHandle *mouseRgn);
+typedef CALLBACK_API( Boolean , AEFilterProcPtr )(EventRecord *theEvent, long returnID, long transactionID, const AEAddressDesc *sender);
+typedef STACK_UPP_TYPE(AEEventHandlerProcPtr) AEEventHandlerUPP;
+typedef STACK_UPP_TYPE(AEIdleProcPtr) AEIdleUPP;
+typedef STACK_UPP_TYPE(AEFilterProcPtr) AEFilterUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(AEEventHandlerUPP)
+ NewAEEventHandlerUPP (AEEventHandlerProcPtr userRoutine);
+
+ EXTERN_API(AEIdleUPP)
+ NewAEIdleUPP (AEIdleProcPtr userRoutine);
+
+ EXTERN_API(AEFilterUPP)
+ NewAEFilterUPP (AEFilterProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeAEEventHandlerUPP (AEEventHandlerUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeAEIdleUPP (AEIdleUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeAEFilterUPP (AEFilterUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeAEEventHandlerUPP (const AppleEvent * theAppleEvent,
+ AppleEvent * reply,
+ UInt32 handlerRefcon,
+ AEEventHandlerUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeAEIdleUPP (EventRecord * theEvent,
+ long * sleepTime,
+ RgnHandle * mouseRgn,
+ AEIdleUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeAEFilterUPP (EventRecord * theEvent,
+ long returnID,
+ long transactionID,
+ const AEAddressDesc * sender,
+ AEFilterUPP userUPP);
+
+#else
+ enum { uppAEEventHandlerProcInfo = 0x00000FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppAEIdleProcInfo = 0x00000FD0 }; /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppAEFilterProcInfo = 0x00003FD0 }; /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewAEEventHandlerUPP(userRoutine) (AEEventHandlerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppAEEventHandlerProcInfo, GetCurrentArchitecture())
+ #define NewAEIdleUPP(userRoutine) (AEIdleUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppAEIdleProcInfo, GetCurrentArchitecture())
+ #define NewAEFilterUPP(userRoutine) (AEFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppAEFilterProcInfo, GetCurrentArchitecture())
+ #define DisposeAEEventHandlerUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeAEIdleUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeAEFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeAEEventHandlerUPP(theAppleEvent, reply, handlerRefcon, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppAEEventHandlerProcInfo, (theAppleEvent), (reply), (handlerRefcon))
+ #define InvokeAEIdleUPP(theEvent, sleepTime, mouseRgn, userUPP) (Boolean)CALL_THREE_PARAMETER_UPP((userUPP), uppAEIdleProcInfo, (theEvent), (sleepTime), (mouseRgn))
+ #define InvokeAEFilterUPP(theEvent, returnID, transactionID, sender, userUPP) (Boolean)CALL_FOUR_PARAMETER_UPP((userUPP), uppAEFilterProcInfo, (theEvent), (returnID), (transactionID), (sender))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewAEEventHandlerProc(userRoutine) NewAEEventHandlerUPP(userRoutine)
+#define NewAEIdleProc(userRoutine) NewAEIdleUPP(userRoutine)
+#define NewAEFilterProc(userRoutine) NewAEFilterUPP(userRoutine)
+#define CallAEEventHandlerProc(userRoutine, theAppleEvent, reply, handlerRefcon) InvokeAEEventHandlerUPP(theAppleEvent, reply, handlerRefcon, userRoutine)
+#define CallAEIdleProc(userRoutine, theEvent, sleepTime, mouseRgn) InvokeAEIdleUPP(theEvent, sleepTime, mouseRgn, userRoutine)
+#define CallAEFilterProc(userRoutine, theEvent, returnID, transactionID, sender) InvokeAEFilterUPP(theEvent, returnID, transactionID, sender, userRoutine)
+
+/**************************************************************************
+ The next couple of calls are basic routines used to create, send,
+ and process AppleEvents.
+**************************************************************************/
+EXTERN_API( OSErr )
+AESend (const AppleEvent * theAppleEvent,
+ AppleEvent * reply,
+ AESendMode sendMode,
+ AESendPriority sendPriority,
+ long timeOutInTicks,
+ AEIdleUPP idleProc, /* can be NULL */
+ AEFilterUPP filterProc) /* can be NULL */ THREEWORDINLINE(0x303C, 0x0D17, 0xA816);
+
+EXTERN_API( OSErr )
+AEProcessAppleEvent (const EventRecord * theEventRecord) THREEWORDINLINE(0x303C, 0x021B, 0xA816);
+
+
+/*
+ Note: during event processing, an event handler may realize that it is likely
+ to exceed the client's timeout limit. Passing the reply to this
+ routine causes a wait event to be generated that asks the client
+ for more time.
+*/
+EXTERN_API( OSErr )
+AEResetTimer (const AppleEvent * reply) THREEWORDINLINE(0x303C, 0x0219, 0xA816);
+
+
+/**************************************************************************
+ The following three calls are used to allow applications to behave
+ courteously when a user interaction such as a dialog box is needed.
+**************************************************************************/
+
+typedef SInt8 AEInteractAllowed;
+enum {
+ kAEInteractWithSelf = 0,
+ kAEInteractWithLocal = 1,
+ kAEInteractWithAll = 2
+};
+
+EXTERN_API( OSErr )
+AEGetInteractionAllowed (AEInteractAllowed * level) THREEWORDINLINE(0x303C, 0x021D, 0xA816);
+
+EXTERN_API( OSErr )
+AESetInteractionAllowed (AEInteractAllowed level) THREEWORDINLINE(0x303C, 0x011E, 0xA816);
+
+EXTERN_API( OSErr )
+AEInteractWithUser (long timeOutInTicks,
+ NMRecPtr nmReqPtr,
+ AEIdleUPP idleProc) THREEWORDINLINE(0x303C, 0x061C, 0xA816);
+
+
+/**************************************************************************
+ These calls are used to set up and modify the event dispatch table.
+**************************************************************************/
+EXTERN_API( OSErr )
+AEInstallEventHandler (AEEventClass theAEEventClass,
+ AEEventID theAEEventID,
+ AEEventHandlerUPP handler,
+ long handlerRefcon,
+ Boolean isSysHandler) THREEWORDINLINE(0x303C, 0x091F, 0xA816);
+
+EXTERN_API( OSErr )
+AERemoveEventHandler (AEEventClass theAEEventClass,
+ AEEventID theAEEventID,
+ AEEventHandlerUPP handler,
+ Boolean isSysHandler) THREEWORDINLINE(0x303C, 0x0720, 0xA816);
+
+EXTERN_API( OSErr )
+AEGetEventHandler (AEEventClass theAEEventClass,
+ AEEventID theAEEventID,
+ AEEventHandlerUPP * handler,
+ long * handlerRefcon,
+ Boolean isSysHandler) THREEWORDINLINE(0x303C, 0x0921, 0xA816);
+
+
+/**************************************************************************
+ The following four calls are available for applications which need more
+ sophisticated control over when and how events are processed. Applications
+ which implement multi-session servers or which implement their own
+ internal event queueing will probably be the major clients of these
+ routines. They can be called from within a handler to prevent the AEM from
+ disposing of the AppleEvent when the handler returns. They can be used to
+ asynchronously process the event (as MacApp does).
+**************************************************************************/
+EXTERN_API( OSErr )
+AESuspendTheCurrentEvent (const AppleEvent * theAppleEvent) THREEWORDINLINE(0x303C, 0x022B, 0xA816);
+
+/*
+ Note: The following routine tells the AppleEvent manager that processing
+ is either about to resume or has been completed on a previously suspended
+ event. The procPtr passed in as the dispatcher parameter will be called to
+ attempt to redispatch the event. Several constants for the dispatcher
+ parameter allow special behavior. They are:
+ - kAEUseStandardDispatch means redispatch as if the event was just
+ received, using the standard AppleEvent dispatch mechanism.
+ - kAENoDispatch means ignore the parameter.
+ Use this in the case where the event has been handled and no
+ redispatch is needed.
+ - non nil means call the routine which the dispatcher points to.
+*/
+/* Constants for Refcon in AEResumeTheCurrentEvent with kAEUseStandardDispatch */
+enum {
+ kAEDoNotIgnoreHandler = 0x00000000,
+ kAEIgnoreAppPhacHandler = 0x00000001, /* available only in vers 1.0.1 and greater */
+ kAEIgnoreAppEventHandler = 0x00000002, /* available only in vers 1.0.1 and greater */
+ kAEIgnoreSysPhacHandler = 0x00000004, /* available only in vers 1.0.1 and greater */
+ kAEIgnoreSysEventHandler = 0x00000008, /* available only in vers 1.0.1 and greater */
+ kAEIngoreBuiltInEventHandler = 0x00000010, /* available only in vers 1.0.1 and greater */
+ kAEDontDisposeOnResume = (long)0x80000000 /* available only in vers 1.0.1 and greater */
+};
+
+/* Constants for AEResumeTheCurrentEvent */
+enum {
+ kAENoDispatch = 0, /* dispatch parameter to AEResumeTheCurrentEvent takes a pointer to a dispatch */
+ kAEUseStandardDispatch = (long)0xFFFFFFFF /* table, or one of these two constants */
+};
+
+EXTERN_API( OSErr )
+AEResumeTheCurrentEvent (const AppleEvent * theAppleEvent,
+ const AppleEvent * reply,
+ AEEventHandlerUPP dispatcher,
+ long handlerRefcon) THREEWORDINLINE(0x303C, 0x0818, 0xA816);
+
+EXTERN_API( OSErr )
+AEGetTheCurrentEvent (AppleEvent * theAppleEvent) THREEWORDINLINE(0x303C, 0x021A, 0xA816);
+
+EXTERN_API( OSErr )
+AESetTheCurrentEvent (const AppleEvent * theAppleEvent) THREEWORDINLINE(0x303C, 0x022C, 0xA816);
+
+
+/**************************************************************************
+ These calls are used to set up and modify special hooks into the
+ AppleEvent manager.
+**************************************************************************/
+EXTERN_API( OSErr )
+AEInstallSpecialHandler (AEKeyword functionClass,
+ AEEventHandlerUPP handler,
+ Boolean isSysHandler) THREEWORDINLINE(0x303C, 0x0500, 0xA816);
+
+EXTERN_API( OSErr )
+AERemoveSpecialHandler (AEKeyword functionClass,
+ AEEventHandlerUPP handler,
+ Boolean isSysHandler) THREEWORDINLINE(0x303C, 0x0501, 0xA816);
+
+EXTERN_API( OSErr )
+AEGetSpecialHandler (AEKeyword functionClass,
+ AEEventHandlerUPP * handler,
+ Boolean isSysHandler) THREEWORDINLINE(0x303C, 0x052D, 0xA816);
+
+
+/**************************************************************************
+ This call was added in version 1.0.1. If called with the keyword
+ keyAERecorderCount ('recr'), the number of recorders that are
+ currently active is returned in 'result'
+ (available only in vers 1.0.1 and greater).
+**************************************************************************/
+EXTERN_API( OSErr )
+AEManagerInfo (AEKeyword keyWord,
+ long * result) THREEWORDINLINE(0x303C, 0x0441, 0xA816);
+
+
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __APPLEEVENTS__ */
+
diff --git a/include/qt/AppleGuide.h b/include/qt/AppleGuide.h
new file mode 100644
index 000000000..fa62a3d18
--- /dev/null
+++ b/include/qt/AppleGuide.h
@@ -0,0 +1,557 @@
+/*
+ File: AppleGuide.h
+
+ Contains: Apple Guide Interfaces.
+
+ Version: Technology: Mac OS 8
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __APPLEGUIDE__
+#define __APPLEGUIDE__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __APPLEEVENTS__
+#include "AppleEvents.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* Types*/
+typedef UInt32 AGRefNum;
+typedef UInt32 AGCoachRefNum;
+typedef UInt32 AGContextRefNum;
+
+struct AGAppInfo {
+ AEEventID eventId;
+ long refCon;
+ void * contextObj; /* private system field*/
+};
+typedef struct AGAppInfo AGAppInfo;
+typedef AGAppInfo * AGAppInfoPtr;
+typedef AGAppInfoPtr * AGAppInfoHdl;
+typedef CALLBACK_API( OSErr , CoachReplyProcPtr )(Rect *pRect, Ptr name, long refCon);
+typedef CALLBACK_API( OSErr , ContextReplyProcPtr )(Ptr pInputData, Size inputDataSize, Ptr *ppOutputData, Size *pOutputDataSize, AGAppInfoHdl hAppInfo);
+typedef STACK_UPP_TYPE(CoachReplyProcPtr) CoachReplyUPP;
+typedef STACK_UPP_TYPE(ContextReplyProcPtr) ContextReplyUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(CoachReplyUPP)
+ NewCoachReplyUPP (CoachReplyProcPtr userRoutine);
+
+ EXTERN_API(ContextReplyUPP)
+ NewContextReplyUPP (ContextReplyProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeCoachReplyUPP (CoachReplyUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeContextReplyUPP (ContextReplyUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeCoachReplyUPP (Rect * pRect,
+ Ptr name,
+ long refCon,
+ CoachReplyUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeContextReplyUPP (Ptr pInputData,
+ Size inputDataSize,
+ Ptr * ppOutputData,
+ Size * pOutputDataSize,
+ AGAppInfoHdl hAppInfo,
+ ContextReplyUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppCoachReplyProcInfo = 0x00000FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppContextReplyProcInfo = 0x0000FFE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewCoachReplyUPP(userRoutine) (CoachReplyUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCoachReplyProcInfo, GetCurrentArchitecture())
+ #define NewContextReplyUPP(userRoutine) (ContextReplyUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppContextReplyProcInfo, GetCurrentArchitecture())
+ #define DisposeCoachReplyUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeContextReplyUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeCoachReplyUPP(pRect, name, refCon, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppCoachReplyProcInfo, (pRect), (name), (refCon))
+ #define InvokeContextReplyUPP(pInputData, inputDataSize, ppOutputData, pOutputDataSize, hAppInfo, userUPP) (OSErr)CALL_FIVE_PARAMETER_UPP((userUPP), uppContextReplyProcInfo, (pInputData), (inputDataSize), (ppOutputData), (pOutputDataSize), (hAppInfo))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewCoachReplyProc(userRoutine) NewCoachReplyUPP(userRoutine)
+#define NewContextReplyProc(userRoutine) NewContextReplyUPP(userRoutine)
+#define CallCoachReplyProc(userRoutine, pRect, name, refCon) InvokeCoachReplyUPP(pRect, name, refCon, userRoutine)
+#define CallContextReplyProc(userRoutine, pInputData, inputDataSize, ppOutputData, pOutputDataSize, hAppInfo) InvokeContextReplyUPP(pInputData, inputDataSize, ppOutputData, pOutputDataSize, hAppInfo, userRoutine)
+/* Constants*/
+
+
+enum {
+ kAGDefault = 0,
+ kAGFrontDatabase = 1,
+ kAGNoMixin = (-1)
+};
+
+
+enum {
+ kAGViewFullHowdy = 1, /* Full-size Howdy*/
+ kAGViewTopicAreas = 2, /* Full-size Topic Areas*/
+ kAGViewIndex = 3, /* Full-size Index Terms*/
+ kAGViewLookFor = 4, /* Full-size Look-For (Search)*/
+ kAGViewSingleHowdy = 5, /* Single-list-size Howdy*/
+ kAGViewSingleTopics = 6 /* Single-list-size Topics*/
+};
+
+
+enum {
+ kAGFileMain = FOUR_CHAR_CODE('poco'),
+ kAGFileMixin = FOUR_CHAR_CODE('mixn')
+};
+
+/* To test against AGGetAvailableDBTypes*/
+enum {
+ kAGDBTypeBitAny = 0x00000001,
+ kAGDBTypeBitHelp = 0x00000002,
+ kAGDBTypeBitTutorial = 0x00000004,
+ kAGDBTypeBitShortcuts = 0x00000008,
+ kAGDBTypeBitAbout = 0x00000010,
+ kAGDBTypeBitOther = 0x00000080
+};
+
+
+
+typedef UInt16 AGStatus;
+/* Returned by AGGetStatus*/
+enum {
+ kAGIsNotRunning = 0,
+ kAGIsSleeping = 1,
+ kAGIsActive = 2
+};
+
+/* Flags used in AGOpen, AGOpenWithSearch, AGOpenWithView*/
+enum {
+ kHelpViewerSearchAll = (1 << 0)
+};
+
+typedef UInt16 AGWindowKind;
+/* Returned by AGGetFrontWindowKind*/
+enum {
+ kAGNoWindow = 0,
+ kAGAccessWindow = 1,
+ kAGPresentationWindow = 2
+};
+
+/* Error Codes*/
+
+/* Not an enum, because other OSErrs are valid.*/
+typedef SInt16 AGErr;
+/* Apple Guide error codes*/
+enum {
+ /* -------------------- Apple event reply codes*/
+ kAGErrUnknownEvent = -2900,
+ kAGErrCantStartup = -2901,
+ kAGErrNoAccWin = -2902,
+ kAGErrNoPreWin = -2903,
+ kAGErrNoSequence = -2904,
+ kAGErrNotOopsSequence = -2905,
+ kAGErrReserved06 = -2906,
+ kAGErrNoPanel = -2907,
+ kAGErrContentNotFound = -2908,
+ kAGErrMissingString = -2909,
+ kAGErrInfoNotAvail = -2910,
+ kAGErrEventNotAvailable = -2911,
+ kAGErrCannotMakeCoach = -2912,
+ kAGErrSessionIDsNotMatch = -2913,
+ kAGErrMissingDatabaseSpec = -2914,
+ kAGMissingSequenceMap = -2915, /* -------------------- Coach's Chalkboard reply codes*/
+ kAGErrItemNotFound = -2925,
+ kAGErrBalloonResourceNotFound = -2926,
+ kAGErrChalkResourceNotFound = -2927,
+ kAGErrChdvResourceNotFound = -2928,
+ kAGErrAlreadyShowing = -2929,
+ kAGErrBalloonResourceSkip = -2930,
+ kAGErrItemNotVisible = -2931,
+ kAGErrReserved32 = -2932,
+ kAGErrNotFrontProcess = -2933,
+ kAGErrMacroResourceNotFound = -2934, /* -------------------- API reply codes*/
+ kAGErrAppleGuideNotAvailable = -2951,
+ kAGErrCannotInitCoach = -2952,
+ kAGErrCannotInitContext = -2953,
+ kAGErrCannotOpenAliasFile = -2954,
+ kAGErrNoAliasResource = -2955,
+ kAGErrDatabaseNotAvailable = -2956,
+ kAGErrDatabaseNotOpen = -2957,
+ kAGErrMissingAppInfoHdl = -2958,
+ kAGErrMissingContextObject = -2959,
+ kAGErrInvalidRefNum = -2960,
+ kAGErrDatabaseOpen = -2961,
+ kAGErrInsufficientMemory = -2962
+};
+
+/* Events*/
+
+/* Not an enum because we want to make assignments.*/
+typedef UInt32 AGEvent;
+/* Handy events for AGGeneral.*/
+enum {
+ /* Panel actions (Require a presentation window).*/
+ kAGEventDoCoach = FOUR_CHAR_CODE('doco'),
+ kAGEventDoHuh = FOUR_CHAR_CODE('dhuh'),
+ kAGEventGoNext = FOUR_CHAR_CODE('gonp'),
+ kAGEventGoPrev = FOUR_CHAR_CODE('gopp'),
+ kAGEventHidePanel = FOUR_CHAR_CODE('pahi'),
+ kAGEventReturnBack = FOUR_CHAR_CODE('gobk'),
+ kAGEventShowPanel = FOUR_CHAR_CODE('pash'),
+ kAGEventTogglePanel = FOUR_CHAR_CODE('patg')
+};
+
+/* Functions*/
+
+/*
+ AGClose
+ Close the database associated with the AGRefNum.
+*/
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( AGErr )
+AGClose (AGRefNum * refNum) TWOWORDINLINE(0x7011, 0xAA6E);
+
+/*
+ AGGeneral
+ Cause various events to happen.
+*/
+
+EXTERN_API( AGErr )
+AGGeneral (AGRefNum refNum,
+ AGEvent theEvent) TWOWORDINLINE(0x700D, 0xAA6E);
+
+/*
+ AGGetAvailableDBTypes
+ Return the database types available for this application.
+*/
+
+EXTERN_API( UInt32 )
+AGGetAvailableDBTypes (void) TWOWORDINLINE(0x7008, 0xAA6E);
+
+/*
+ AGGetFrontWindowKind
+ Return the kind of the front window.
+*/
+
+EXTERN_API( AGWindowKind )
+AGGetFrontWindowKind (AGRefNum refNum) TWOWORDINLINE(0x700C, 0xAA6E);
+
+/*
+ AGGetFSSpec
+ Return the FSSpec for the AGRefNum.
+*/
+
+EXTERN_API( AGErr )
+AGGetFSSpec (AGRefNum refNum,
+ FSSpec * fileSpec) TWOWORDINLINE(0x700F, 0xAA6E);
+
+/*
+ AGGetStatus
+ Return the status of Apple Guide.
+*/
+
+EXTERN_API( AGStatus )
+AGGetStatus (void) TWOWORDINLINE(0x7009, 0xAA6E);
+
+/*
+ AGInstallCoachHandler
+ Install a Coach object location query handler.
+*/
+
+EXTERN_API( AGErr )
+AGInstallCoachHandler (CoachReplyUPP coachReplyProc,
+ long refCon,
+ AGCoachRefNum * resultRefNum) TWOWORDINLINE(0x7012, 0xAA6E);
+
+/*
+ AGInstallContextHandler
+ Install a context check query handler.
+*/
+
+EXTERN_API( AGErr )
+AGInstallContextHandler (ContextReplyUPP contextReplyProc,
+ AEEventID eventID,
+ long refCon,
+ AGContextRefNum * resultRefNum) TWOWORDINLINE(0x7013, 0xAA6E);
+
+/*
+ AGIsDatabaseOpen
+ Return true if the database associated with the AGRefNum is open.
+*/
+
+EXTERN_API( Boolean )
+AGIsDatabaseOpen (AGRefNum refNum) TWOWORDINLINE(0x7006, 0xAA6E);
+
+/*
+ AGOpen
+ Open a guide database.
+*/
+
+EXTERN_API( AGErr )
+AGOpen (ConstFSSpecPtr fileSpec,
+ UInt32 flags,
+ Handle mixinControl,
+ AGRefNum * resultRefNum) TWOWORDINLINE(0x7001, 0xAA6E);
+
+/*
+ AGOpenWithSearch
+ Open a guide database and preset a search string.
+*/
+
+EXTERN_API( AGErr )
+AGOpenWithSearch (ConstFSSpecPtr fileSpec,
+ UInt32 flags,
+ Handle mixinControl,
+ ConstStr255Param searchString,
+ AGRefNum * resultRefNum) TWOWORDINLINE(0x7002, 0xAA6E);
+
+/*
+ AGOpenWithSequence
+ Open a guide database and display a presentation window sequence.
+*/
+
+EXTERN_API( AGErr )
+AGOpenWithSequence (ConstFSSpecPtr fileSpec,
+ UInt32 flags,
+ Handle mixinControl,
+ short sequenceID,
+ AGRefNum * resultRefNum) TWOWORDINLINE(0x7004, 0xAA6E);
+
+/*
+ AGOpenWithView
+ Open a guide database and override the default view.
+*/
+
+EXTERN_API( AGErr )
+AGOpenWithView (ConstFSSpecPtr fileSpec,
+ UInt32 flags,
+ Handle mixinControl,
+ short viewNum,
+ AGRefNum * resultRefNum) TWOWORDINLINE(0x7005, 0xAA6E);
+
+/*
+ AGQuit
+ Make Apple Guide quit.
+*/
+
+EXTERN_API( AGErr )
+AGQuit (void) TWOWORDINLINE(0x7010, 0xAA6E);
+
+/*
+ AGRemoveCoachHandler
+ Remove the Coach object location query handler.
+*/
+
+EXTERN_API( AGErr )
+AGRemoveCoachHandler (AGCoachRefNum * resultRefNum) TWOWORDINLINE(0x7014, 0xAA6E);
+
+/*
+ AGRemoveContextHandler
+ Remove the context check query handler.
+*/
+
+EXTERN_API( AGErr )
+AGRemoveContextHandler (AGContextRefNum * resultRefNum) TWOWORDINLINE(0x7015, 0xAA6E);
+
+/*
+ AGStart
+ Start up Apple Guide in the background.
+*/
+
+EXTERN_API( AGErr )
+AGStart (void) TWOWORDINLINE(0x700A, 0xAA6E);
+
+
+
+/* typedef's*/
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef FSSpec AGFileFSSpecType;
+typedef short AGFileSelectorCountType;
+typedef short AGFileSelectorIndexType;
+typedef OSType AGFileSelectorType;
+typedef long AGFileSelectorValueType;
+typedef short AGFileDBType;
+typedef Str63 AGFileDBMenuNamePtr;
+typedef short AGFileDBScriptType;
+typedef short AGFileDBRegionType;
+typedef short AGFileMajorRevType;
+typedef short AGFileMinorRevType;
+typedef short AGFileCountType;
+/* Database types (for AGFileDBType parameter).*/
+enum {
+ kAGFileDBTypeAny = 0,
+ kAGFileDBTypeHelp = 1,
+ kAGFileDBTypeTutorial = 2,
+ kAGFileDBTypeShortcuts = 3,
+ kAGFileDBTypeAbout = 4,
+ kAGFileDBTypeOther = 8
+};
+
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+AGFileGetDBMenuName (const FSSpec * fileSpec,
+ Str63 menuItemNameString);
+
+/* Get the database type.*/
+EXTERN_API( OSErr )
+AGFileGetDBType (const FSSpec * fileSpec,
+ AGFileDBType * databaseType);
+
+/*
+ Get the version of the software
+ that created this database.
+*/
+EXTERN_API( OSErr )
+AGFileGetDBVersion (const FSSpec * fileSpec,
+ AGFileMajorRevType * majorRev,
+ AGFileMinorRevType * minorRev);
+
+/* Get the database script and region information.*/
+EXTERN_API( OSErr )
+AGFileGetDBCountry (const FSSpec * fileSpec,
+ AGFileDBScriptType * script,
+ AGFileDBRegionType * region);
+
+/* Return the number of selectors in database.*/
+EXTERN_API( AGFileSelectorCountType )
+AGFileGetSelectorCount (const FSSpec * fileSpec);
+
+/*
+ Get the i-th database selector (1 to AGFileSelectorCountType)
+ and its value.
+*/
+EXTERN_API( OSErr )
+AGFileGetSelector (const FSSpec * fileSpec,
+ AGFileSelectorIndexType selectorNumber,
+ AGFileSelectorType * selector,
+ AGFileSelectorValueType * value);
+
+/* Return true if database is mixin.*/
+EXTERN_API( Boolean )
+AGFileIsMixin (const FSSpec * fileSpec);
+
+/*
+ Return the number of database files
+ of the specified databaseType and main/mixin.
+ Any file creator is acceptible,
+ but type must be kAGFileMain or kAGFileMixin.
+*/
+EXTERN_API( AGFileCountType )
+AGFileGetDBCount (short vRefNum,
+ long dirID,
+ AGFileDBType databaseType,
+ Boolean wantMixin);
+
+/*
+ Get the FSSpec for the dbIndex-th database
+ of the specified databaseType and main/mixin.
+ Any file creator is acceptible,
+ but type must be kAGFileMain or kAGFileMixin.
+*/
+EXTERN_API( OSErr )
+AGFileGetIndDB (short vRefNum,
+ long dirID,
+ AGFileDBType databaseType,
+ Boolean wantMixin,
+ short dbIndex,
+ FSSpec * fileSpec);
+
+/*
+ This selector must match with the application
+ creator in order for this file to appear in the
+ application's Help menu. Ignored for mixin files
+ because they never appear in the Help menu anyway.
+ If empty (zeros), will appear in the Help menu
+ of any host application.
+*/
+EXTERN_API( OSErr )
+AGFileGetHelpMenuAppCreator (const FSSpec * fileSpec,
+ OSType * helpMenuAppCreator);
+
+/*
+ This selector must match in the main and mixin
+ files in order for the mixin to mix-in with the main.
+ Empty (zeros) selectors are valid matches.
+ A '****' selector will mix-in with any main.
+*/
+EXTERN_API( OSErr )
+AGFileGetMixinMatchSelector (const FSSpec * fileSpec,
+ OSType * mixinMatchSelector);
+
+/*
+ This is the text of the balloon for the
+ Help menu item for this database.
+*/
+EXTERN_API( OSErr )
+AGFileGetHelpMenuBalloonText (const FSSpec * fileSpec,
+ Str255 helpMenuBalloonString);
+
+
+EXTERN_API( OSErr )
+AGGetSystemDB (AGFileDBType databaseType,
+ Boolean wantMixin,
+ FSSpec * pFileSpec);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __APPLEGUIDE__ */
+
diff --git a/include/qt/AppleScript.h b/include/qt/AppleScript.h
new file mode 100644
index 000000000..c8564c4da
--- /dev/null
+++ b/include/qt/AppleScript.h
@@ -0,0 +1,208 @@
+/*
+ File: AppleScript.h
+
+ Contains: AppleScript Specific Interfaces.
+
+ Version: Technology: AppleScript 1.1
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1992-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __APPLESCRIPT__
+#define __APPLESCRIPT__
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+#ifndef __APPLEEVENTS__
+#include "AppleEvents.h"
+#endif
+
+#ifndef __OSA__
+#include "OSA.h"
+#endif
+
+#ifndef __TEXTEDIT__
+#include "TextEdit.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/**************************************************************************
+ Types and Constants
+**************************************************************************/
+/*
+ The specific type for the AppleScript instance of the
+ Open Scripting Architecture type.
+*/
+enum {
+ typeAppleScript = FOUR_CHAR_CODE('ascr'),
+ kAppleScriptSubtype = typeAppleScript,
+ typeASStorage = typeAppleScript
+};
+
+/**************************************************************************
+ Component Selectors
+**************************************************************************/
+
+enum {
+ kASSelectInit = 0x1001,
+ kASSelectSetSourceStyles = 0x1002,
+ kASSelectGetSourceStyles = 0x1003,
+ kASSelectGetSourceStyleNames = 0x1004
+};
+
+
+/**************************************************************************
+ OSAGetScriptInfo Selectors
+**************************************************************************/
+enum {
+ kASHasOpenHandler = FOUR_CHAR_CODE('hsod')
+};
+
+/*
+ This selector is used to query a context as to whether it contains
+ a handler for the kAEOpenDocuments event. This allows "applets" to be
+ distinguished from "droplets." OSAGetScriptInfo returns false if
+ there is no kAEOpenDocuments handler, and returns the error value
+ errOSAInvalidAccess if the input is not a context.
+ */
+/**************************************************************************
+ Initialization
+**************************************************************************/
+EXTERN_API( OSAError )
+ASInit (ComponentInstance scriptingComponent,
+ long modeFlags,
+ long minStackSize,
+ long preferredStackSize,
+ long maxStackSize,
+ long minHeapSize,
+ long preferredHeapSize,
+ long maxHeapSize) FIVEWORDINLINE(0x2F3C, 0x001C, 0x1001, 0x7000, 0xA82A);
+
+/*
+ ComponentCallNow(kASSelectInit, 28);
+ This call can be used to explicitly initialize AppleScript. If it is
+ not called, the a scripting size resource is looked for and used. If
+ there is no scripting size resource, then the constants listed below
+ are used. If at any stage (the init call, the size resource, the
+ defaults) any of these parameters are zero, then parameters from the
+ next stage are used. ModeFlags are not currently used.
+ Errors:
+ errOSASystemError initialization failed
+ */
+/*
+ These values will be used if ASInit is not called explicitly, or if any
+ of ASInit's parameters are zero:
+*/
+enum {
+ kASDefaultMinStackSize = 4 * 1024,
+ kASDefaultPreferredStackSize = 16 * 1024,
+ kASDefaultMaxStackSize = 16 * 1024,
+ kASDefaultMinHeapSize = 4 * 1024,
+ kASDefaultPreferredHeapSize = 16 * 1024,
+ kASDefaultMaxHeapSize = 32L * 1024 * 1024
+};
+
+/**************************************************************************
+ Source Styles
+**************************************************************************/
+EXTERN_API( OSAError )
+ASSetSourceStyles (ComponentInstance scriptingComponent,
+ STHandle sourceStyles) FIVEWORDINLINE(0x2F3C, 0x0004, 0x1002, 0x7000, 0xA82A);
+
+/*
+ ComponentCallNow(kASSelectSetSourceStyles, 4);
+ Errors:
+ errOSASystemError operation failed
+ */
+EXTERN_API( OSAError )
+ASGetSourceStyles (ComponentInstance scriptingComponent,
+ STHandle * resultingSourceStyles) FIVEWORDINLINE(0x2F3C, 0x0004, 0x1003, 0x7000, 0xA82A);
+
+/*
+ ComponentCallNow(kASSelectGetSourceStyles, 4);
+ Errors:
+ errOSASystemError operation failed
+ */
+EXTERN_API( OSAError )
+ASGetSourceStyleNames (ComponentInstance scriptingComponent,
+ long modeFlags,
+ AEDescList * resultingSourceStyleNamesList) FIVEWORDINLINE(0x2F3C, 0x0008, 0x1004, 0x7000, 0xA82A);
+
+/*
+ ComponentCallNow(kASSelectGetSourceStyleNames, 8);
+ This call returns an AEList of styled text descriptors the names of the
+ source styles in the current dialect. The order of the names corresponds
+ to the order of the source style constants, below. The style of each
+ name is the same as the styles returned by ASGetSourceStyles.
+
+ Errors:
+ errOSASystemError operation failed
+ */
+/*
+ Elements of STHandle correspond to following categories of tokens, and
+ accessed through following index constants:
+*/
+enum {
+ kASSourceStyleUncompiledText = 0,
+ kASSourceStyleNormalText = 1,
+ kASSourceStyleLanguageKeyword = 2,
+ kASSourceStyleApplicationKeyword = 3,
+ kASSourceStyleComment = 4,
+ kASSourceStyleLiteral = 5,
+ kASSourceStyleUserSymbol = 6,
+ kASSourceStyleObjectSpecifier = 7,
+ kASNumberOfSourceStyles = 8
+};
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __APPLESCRIPT__ */
+
diff --git a/include/qt/AppleTalk.h b/include/qt/AppleTalk.h
new file mode 100644
index 000000000..c92597df9
--- /dev/null
+++ b/include/qt/AppleTalk.h
@@ -0,0 +1,1498 @@
+/*
+ File: AppleTalk.h
+
+ Contains: AppleTalk Interfaces.
+
+ Version: Technology: System 8.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __APPLETALK__
+#define __APPLETALK__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __OSUTILS__
+#include "OSUtils.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ /* Driver unit numbers (ADSP is dynamic) */
+ mppUnitNum = 9, /* MPP unit number */
+ atpUnitNum = 10, /* ATP unit number */
+ xppUnitNum = 40 /* XPP unit number */
+};
+
+enum {
+ /* Driver refNums (ADSP is dynamic) */
+ mppRefNum = -10, /* MPP reference number */
+ atpRefNum = -11, /* ATP reference number */
+ xppRefNum = -41 /* XPP reference number */
+};
+
+enum {
+ /* .MPP csCodes */
+ lookupReply = 242, /* This command queued to ourself */
+ writeLAP = 243, /* Write out LAP packet */
+ detachPH = 244, /* Detach LAP protocol handler */
+ attachPH = 245, /* Attach LAP protocol handler */
+ writeDDP = 246, /* Write out DDP packet */
+ closeSkt = 247, /* Close DDP socket */
+ openSkt = 248, /* Open DDP socket */
+ loadNBP = 249, /* Load NBP command-executing code */
+ lastResident = 249, /* Last resident command */
+ confirmName = 250, /* Confirm name */
+ lookupName = 251, /* Look up name on internet */
+ removeName = 252, /* Remove name from Names Table */
+ registerName = 253, /* Register name in Names Table */
+ killNBP = 254, /* Kill outstanding NBP request */
+ unloadNBP = 255, /* Unload NBP command code */
+ setSelfSend = 256, /* MPP: Set to allow writes to self */
+ SetMyZone = 257, /* Set my zone name */
+ GetATalkInfo = 258, /* get AppleTalk information */
+ ATalkClosePrep = 259 /* AppleTalk close query */
+};
+
+enum {
+ /* .ATP csCodes */
+ nSendRequest = 248, /* NSendRequest code */
+ relRspCB = 249, /* Release RspCB */
+ closeATPSkt = 250, /* Close ATP socket */
+ addResponse = 251, /* Add response code | Require open skt */
+ sendResponse = 252, /* Send response code */
+ getRequest = 253, /* Get request code */
+ openATPSkt = 254, /* Open ATP socket */
+ sendRequest = 255, /* Send request code */
+ relTCB = 256, /* Release TCB */
+ killGetReq = 257, /* Kill GetRequest */
+ killSendReq = 258, /* Kill SendRequest */
+ killAllGetReq = 259 /* Kill all getRequests for a skt */
+};
+
+enum {
+ /* .XPP csCodes */
+ openSess = 255, /* Open session */
+ closeSess = 254, /* Close session */
+ userCommand = 253, /* User command */
+ userWrite = 252, /* User write */
+ getStatus = 251, /* Get status */
+ afpCall = 250, /* AFP command (buffer has command code) */
+ getParms = 249, /* Get parameters */
+ abortOS = 248, /* Abort open session request */
+ closeAll = 247, /* Close all open sessions */
+ xCall = 246 /* .XPP extended calls */
+};
+
+enum {
+ /* Transition Queue transition types */
+ ATTransOpen = 0, /*AppleTalk has opened*/
+ ATTransClose = 2, /*AppleTalk is about to close*/
+ ATTransClosePrep = 3, /*Is it OK to close AppleTalk ?*/
+ ATTransCancelClose = 4 /*Cancel the ClosePrep transition*/
+};
+
+enum {
+ afpByteRangeLock = 1, /*AFPCall command codes*/
+ afpVolClose = 2, /*AFPCall command codes*/
+ afpDirClose = 3, /*AFPCall command codes*/
+ afpForkClose = 4, /*AFPCall command codes*/
+ afpCopyFile = 5, /*AFPCall command codes*/
+ afpDirCreate = 6, /*AFPCall command codes*/
+ afpFileCreate = 7, /*AFPCall command codes*/
+ afpDelete = 8, /*AFPCall command codes*/
+ afpEnumerate = 9, /*AFPCall command codes*/
+ afpFlush = 10, /*AFPCall command codes*/
+ afpForkFlush = 11, /*AFPCall command codes*/
+ afpGetDirParms = 12, /*AFPCall command codes*/
+ afpGetFileParms = 13, /*AFPCall command codes*/
+ afpGetForkParms = 14, /*AFPCall command codes*/
+ afpGetSInfo = 15, /*AFPCall command codes*/
+ afpGetSParms = 16, /*AFPCall command codes*/
+ afpGetVolParms = 17, /*AFPCall command codes*/
+ afpLogin = 18, /*AFPCall command codes*/
+ afpContLogin = 19, /*AFPCall command codes*/
+ afpLogout = 20, /*AFPCall command codes*/
+ afpMapID = 21, /*AFPCall command codes*/
+ afpMapName = 22, /*AFPCall command codes*/
+ afpMove = 23, /*AFPCall command codes*/
+ afpOpenVol = 24, /*AFPCall command codes*/
+ afpOpenDir = 25, /*AFPCall command codes*/
+ afpOpenFork = 26, /*AFPCall command codes*/
+ afpRead = 27, /*AFPCall command codes*/
+ afpRename = 28, /*AFPCall command codes*/
+ afpSetDirParms = 29, /*AFPCall command codes*/
+ afpSetFileParms = 30, /*AFPCall command codes*/
+ afpSetForkParms = 31, /*AFPCall command codes*/
+ afpSetVolParms = 32, /*AFPCall command codes*/
+ afpWrite = 33, /*AFPCall command codes*/
+ afpGetFlDrParms = 34, /*AFPCall command codes*/
+ afpSetFlDrParms = 35, /*AFPCall command codes*/
+ afpDTOpen = 48, /*AFPCall command codes*/
+ afpDTClose = 49, /*AFPCall command codes*/
+ afpGetIcon = 51, /*AFPCall command codes*/
+ afpGtIcnInfo = 52, /*AFPCall command codes*/
+ afpAddAPPL = 53, /*AFPCall command codes*/
+ afpRmvAPPL = 54, /*AFPCall command codes*/
+ afpGetAPPL = 55, /*AFPCall command codes*/
+ afpAddCmt = 56, /*AFPCall command codes*/
+ afpRmvCmt = 57, /*AFPCall command codes*/
+ afpGetCmt = 58, /*AFPCall command codes*/
+ afpAddIcon = 192 /*Special code for ASP Write commands*/
+};
+
+enum {
+ xppLoadedBit = 5, /* XPP bit in PortBUse */
+ scbMemSize = 192, /* Size of memory for SCB */
+ xppFlagClr = 0 /* Cs for AFPCommandBlock */
+};
+
+enum {
+ xppFlagSet = 128 /* StartEndFlag & NewLineFlag fields. */
+};
+
+enum {
+ lapSize = 20,
+ ddpSize = 26,
+ nbpSize = 26,
+ atpSize = 56
+};
+
+enum {
+ atpXOvalue = 32, /*ATP exactly-once bit */
+ atpEOMvalue = 16, /*ATP End-Of-Message bit */
+ atpSTSvalue = 8, /*ATP Send-Transmission-Status bit */
+ atpTIDValidvalue = 2, /*ATP trans. ID valid bit */
+ atpSendChkvalue = 1 /*ATP send checksum bit */
+};
+
+enum {
+ zipGetLocalZones = 5,
+ zipGetZoneList = 6,
+ zipGetMyZone = 7
+};
+
+enum {
+ LAPMgrPtr = 0x0B18 /*Entry point for LAP Manager*/
+};
+
+enum {
+ LAPMgrCall = 2, /*Offset to LAP routines*/
+ LAddAEQ = 23, /*LAPAddATQ routine selector*/
+ LRmvAEQ = 24 /*LAPRmvATQ routine selector*/
+};
+
+#define MPPioCompletion MPP.ioCompletion
+#define MPPioResult MPP.ioResult
+#define MPPioRefNum MPP.ioRefNum
+#define MPPcsCode MPP.csCode
+#define LAPprotType LAP.protType
+#define LAPwdsPointer LAP.u.wdsPointer
+#define LAPhandler LAP.u.handler
+#define DDPsocket DDP.socket
+#define DDPchecksumFlag DDP.checksumFlag
+#define DDPwdsPointer DDP.u.wdsPointer
+#define DDPlistener DDP.u.listener
+#define NBPinterval NBP.interval
+#define NBPcount NBP.count
+#define NBPntQElPtr NBP.nbpPtrs.ntQElPtr
+#define NBPentityPtr NBP.nbpPtrs.entityPtr
+#define NBPverifyFlag NBP.parm.verifyFlag
+#define NBPretBuffPtr NBP.parm.Lookup.retBuffPtr
+#define NBPretBuffSize NBP.parm.Lookup.retBuffSize
+#define NBPmaxToGet NBP.parm.Lookup.maxToGet
+#define NBPnumGotten NBP.parm.Lookup.numGotten
+#define NBPconfirmAddr NBP.parm.Confirm.confirmAddr
+#define NBPnKillQEl NBPKILL.nKillQEl
+#define NBPnewSocket NBP.parm.Confirm.newSocket
+#define ATPioCompletion ATP.ioCompletion
+#define ATPioResult ATP.ioResult
+#define ATPuserData ATP.userData
+#define ATPreqTID ATP.reqTID
+#define ATPioRefNum ATP.ioRefNum
+#define ATPcsCode ATP.csCode
+#define ATPatpSocket ATP.atpSocket
+#define ATPatpFlags ATP.atpFlags
+#define ATPaddrBlock ATP.addrBlock
+#define ATPreqLength ATP.reqLength
+#define ATPreqPointer ATP.reqPointer
+#define ATPbdsPointer ATP.bdsPointer
+#define ATPtimeOutVal SREQ.timeOutVal
+#define ATPnumOfResps SREQ.numOfResps
+#define ATPretryCount SREQ.retryCount
+#define ATPnumOfBuffs OTH1.u.numOfBuffs
+#define ATPbitMap OTH1.u.bitMap
+#define ATPrspNum OTH1.u.rspNum
+#define ATPbdsSize OTH2.bdsSize
+#define ATPtransID OTH2.transID
+#define ATPaKillQEl KILL.aKillQEl
+enum {
+ tLAPRead = 0,
+ tLAPWrite = 1,
+ tDDPRead = 2,
+ tDDPWrite = 3,
+ tNBPLookup = 4,
+ tNBPConfirm = 5,
+ tNBPRegister = 6,
+ tATPSndRequest = 7,
+ tATPGetRequest = 8,
+ tATPSdRsp = 9,
+ tATPAddRsp = 10,
+ tATPRequest = 11,
+ tATPResponse = 12
+};
+
+typedef SInt8 ABCallType;
+enum {
+ lapProto = 0,
+ ddpProto = 1,
+ nbpProto = 2,
+ atpProto = 3
+};
+
+typedef UInt8 ABProtoType;
+typedef Byte ABByte;
+
+struct LAPAdrBlock {
+ UInt8 dstNodeID;
+ UInt8 srcNodeID;
+ ABByte lapProtType;
+ UInt8 filler; /* Filler for proper byte alignment*/
+};
+typedef struct LAPAdrBlock LAPAdrBlock;
+typedef struct ATQEntry ATQEntry;
+
+typedef ATQEntry * ATQEntryPtr;
+typedef CALLBACK_API_C( long , ATalkTransitionEventProcPtr )(long eventCode, ATQEntryPtr qElem, void *eventParameter);
+typedef STACK_UPP_TYPE(ATalkTransitionEventProcPtr) ATalkTransitionEventUPP;
+typedef ATalkTransitionEventUPP ATalkTransitionEvent;
+
+struct ATQEntry {
+ struct ATQEntry * qLink; /*next queue entry*/
+ short qType; /*queue type*/
+ ATalkTransitionEventUPP CallAddr; /*your routine descriptor*/
+};
+
+/*
+ Real definition of EntityName is 3 PACKED strings of any length (32 is just an example). No
+ offests for Asm since each String address must be calculated by adding length byte to last string ptr.
+ In Pascal, String(32) will be 34 bytes long since fields never start on an odd byte unless they are
+ only a byte long. So this will generate correct looking interfaces for Pascal and C, but they will not
+ be the same, which is OK since they are not used.
+*/
+
+struct EntityName {
+ Str32Field objStr;
+ Str32Field typeStr;
+ Str32Field zoneStr;
+};
+typedef struct EntityName EntityName;
+
+typedef EntityName * EntityPtr;
+
+struct AddrBlock {
+ UInt16 aNet;
+ UInt8 aNode;
+ UInt8 aSocket;
+};
+typedef struct AddrBlock AddrBlock;
+
+struct RetransType {
+ UInt8 retransInterval;
+ UInt8 retransCount;
+};
+typedef struct RetransType RetransType;
+
+struct BDSElement {
+ short buffSize;
+ void * buffPtr;
+ short dataSize;
+ long userBytes;
+};
+typedef struct BDSElement BDSElement;
+
+typedef BDSElement BDSType[8];
+typedef BDSElement * BDSPtr;
+typedef char BitMapType;
+
+struct ATLAPRec {
+ ABCallType abOpcode;
+ SInt8 filler; /* Filler for proper byte alignment*/
+ short abResult;
+ long abUserReference;
+ LAPAdrBlock lapAddress;
+ short lapReqCount;
+ short lapActCount;
+ void * lapDataPtr;
+};
+typedef struct ATLAPRec ATLAPRec;
+typedef ATLAPRec * ATLAPRecPtr;
+typedef ATLAPRecPtr * ATLAPRecHandle;
+
+struct ATDDPRec {
+ ABCallType abOpcode;
+ SInt8 filler; /* Filler for proper byte alignment*/
+ short abResult;
+ long abUserReference;
+ short ddpType;
+ short ddpSocket;
+ AddrBlock ddpAddress;
+ short ddpReqCount;
+ short ddpActCount;
+ void * ddpDataPtr;
+ short ddpNodeID;
+};
+typedef struct ATDDPRec ATDDPRec;
+typedef ATDDPRec * ATDDPRecPtr;
+typedef ATDDPRecPtr * ATDDPRecHandle;
+
+struct ATNBPRec {
+ ABCallType abOpcode;
+ SInt8 filler; /* Filler for proper byte alignment*/
+ short abResult;
+ long abUserReference;
+ EntityPtr nbpEntityPtr;
+ void * nbpBufPtr;
+ short nbpBufSize;
+ short nbpDataField;
+ AddrBlock nbpAddress;
+ RetransType nbpRetransmitInfo;
+};
+typedef struct ATNBPRec ATNBPRec;
+typedef ATNBPRec * ATNBPRecPtr;
+typedef ATNBPRecPtr * ATNBPRecHandle;
+
+struct ATATPRec {
+ ABCallType abOpcode;
+ SInt8 filler1; /* Filler for proper byte alignment*/
+ short abResult;
+ long abUserReference;
+ short atpSocket;
+ AddrBlock atpAddress;
+ short atpReqCount;
+ void * atpDataPtr;
+ BDSPtr atpRspBDSPtr;
+ BitMapType atpBitMap;
+ SInt8 filler2; /* Filler for proper byte alignment*/
+ short atpTransID;
+ short atpActCount;
+ long atpUserData;
+ Boolean atpXO;
+ Boolean atpEOM;
+ short atpTimeOut;
+ short atpRetries;
+ short atpNumBufs;
+ short atpNumRsp;
+ short atpBDSSize;
+ long atpRspUData;
+ void * atpRspBuf;
+ short atpRspSize;
+};
+typedef struct ATATPRec ATATPRec;
+typedef ATATPRec * ATATPRecPtr;
+typedef ATATPRecPtr * ATATPRecHandle;
+
+struct AFPCommandBlock {
+ UInt8 cmdByte;
+ UInt8 startEndFlag;
+ short forkRefNum;
+ long rwOffset;
+ long reqCount;
+ UInt8 newLineFlag;
+ char newLineChar;
+};
+typedef struct AFPCommandBlock AFPCommandBlock;
+typedef union MPPParamBlock MPPParamBlock;
+typedef union ATPParamBlock ATPParamBlock;
+typedef union XPPParamBlock XPPParamBlock;
+
+typedef MPPParamBlock * MPPPBPtr;
+typedef ATPParamBlock * ATPPBPtr;
+typedef XPPParamBlock * XPPParmBlkPtr;
+typedef CALLBACK_API( void , MPPCompletionProcPtr )(MPPPBPtr thePBptr);
+/*
+ WARNING: MPPCompletionProcPtr uses register based parameters under classic 68k
+ and cannot be written in a high-level language without
+ the help of mixed mode or assembly glue.
+*/
+typedef CALLBACK_API( void , ATPCompletionProcPtr )(ATPPBPtr thePBptr);
+/*
+ WARNING: ATPCompletionProcPtr uses register based parameters under classic 68k
+ and cannot be written in a high-level language without
+ the help of mixed mode or assembly glue.
+*/
+typedef CALLBACK_API( void , XPPCompletionProcPtr )(XPPParmBlkPtr thePBptr);
+/*
+ WARNING: XPPCompletionProcPtr uses register based parameters under classic 68k
+ and cannot be written in a high-level language without
+ the help of mixed mode or assembly glue.
+*/
+typedef CALLBACK_API( void , AttnRoutineProcPtr )(short sessRefnum, short attnBytes);
+/*
+ WARNING: AttnRoutineProcPtr uses register based parameters under classic 68k
+ and cannot be written in a high-level language without
+ the help of mixed mode or assembly glue.
+*/
+typedef REGISTER_UPP_TYPE(MPPCompletionProcPtr) MPPCompletionUPP;
+typedef REGISTER_UPP_TYPE(ATPCompletionProcPtr) ATPCompletionUPP;
+typedef REGISTER_UPP_TYPE(XPPCompletionProcPtr) XPPCompletionUPP;
+typedef REGISTER_UPP_TYPE(AttnRoutineProcPtr) AttnRoutineUPP;
+
+
+struct WDSElement {
+ short entryLength;
+ Ptr entryPtr;
+};
+typedef struct WDSElement WDSElement;
+
+struct NTElement {
+ AddrBlock nteAddress; /*network address of entity*/
+ SInt8 filler;
+ SInt8 entityData[99]; /*Object, Type & Zone*/
+};
+typedef struct NTElement NTElement;
+
+struct NamesTableEntry {
+ Ptr qNext; /*ptr to next NTE*/
+ NTElement nt;
+};
+typedef struct NamesTableEntry NamesTableEntry;
+typedef CALLBACK_API( Boolean , MPPProtocolHandlerProcPtr )(Ptr SCCAddr1, Ptr SCCAddr2, Ptr MPPLocalVars, Ptr nextFreeByteInRHA, Ptr ReadPacketAndReadRestPtr, short numBytesLeftToReadInPacket);
+typedef CALLBACK_API( Boolean , DDPSocketListenerProcPtr )(Ptr SCCAddr1, Ptr SCCAddr2, Ptr MPPLocalVars, Ptr nextFreeByteInRHA, Ptr ReadPacketAndReadRestPtr, UInt8 packetDestinationNumber, short numBytesLeftToReadInPacket);
+typedef STACK_UPP_TYPE(MPPProtocolHandlerProcPtr) MPPProtocolHandlerUPP;
+typedef STACK_UPP_TYPE(DDPSocketListenerProcPtr) DDPSocketListenerUPP;
+/*
+ MPPProtocolHandlerProcs and DDPSocketListenerProcs cannot be written
+ in or called from a high-level language without the help of mixed mode
+ or assembly glue because they use the following parameter-passing conventions:
+
+ typedef Boolean (*MPPProtocolHandlerProcPtr)(Ptr SCCAddr1, Ptr SCCAddr2,
+ Ptr MPPLocalVars, Ptr nextFreeByteInRHA, Ptr ReadPacketAndReadRestPtr,
+ short numBytesLeftToReadInPacket);
+
+ In:
+ => SCCAddr1 A0.L
+ => SCCAddr2 A1.L
+ => MPPLocalVars A2.L
+ => nextFreeByteInRHA A3.L
+ => ReadPacketAndReadRestPtr A4.L
+ => numBytesLeftToReadInPacket D1.W
+ Out:
+ <= Boolean Z bit of CCR
+
+ typedef Boolean (*DDPSocketListenerProcPtr)(Ptr SCCAddr1, Ptr SCCAddr2,
+ Ptr MPPLocalVars, Ptr nextFreeByteInRHA, Ptr ReadPacketAndReadRestPtr,
+ UInt8 packetDestinationNumber, short numBytesLeftToReadInPacket);
+
+ In:
+ => SCCAddr1 A0.L
+ => SCCAddr2 A1.L
+ => MPPLocalVars A2.L
+ => nextFreeByteInRHA A3.L
+ => ReadPacketAndReadRestPtr A4.L
+ => packetDestinationNumber D0.B
+ => numBytesLeftToReadInPacket D1.W
+ Out:
+ <= Boolean Z bit of CCR
+
+*/
+
+struct MPPparms {
+ QElem * qLink; /*next queue entry*/
+ short qType; /*queue type*/
+ short ioTrap; /*routine trap*/
+ Ptr ioCmdAddr; /*routine address*/
+ ATPCompletionUPP ioCompletion; /*ATPCompletionUPP or MPPCompletionUPP*/
+ OSErr ioResult; /*result code*/
+ long userData; /*Command result (ATP user bytes)*/
+ short reqTID; /*request transaction ID*/
+ short ioRefNum; /*driver reference number*/
+ short csCode; /*Call command code*/
+};
+typedef struct MPPparms MPPparms;
+
+struct LAPparms {
+ QElem * qLink; /*next queue entry*/
+ short qType; /*queue type*/
+ short ioTrap; /*routine trap*/
+ Ptr ioCmdAddr; /*routine address*/
+ ATPCompletionUPP ioCompletion; /*ATPCompletionUPP or MPPCompletionUPP*/
+ OSErr ioResult; /*result code*/
+ long userData; /*Command result (ATP user bytes)*/
+ short reqTID; /*request transaction ID*/
+ short ioRefNum; /*driver reference number*/
+ short csCode; /*Call command code*/
+ UInt8 protType; /*ALAP protocol Type */
+ UInt8 filler;
+ union {
+ void * wdsPointer; /*-> write data structure*/
+ MPPProtocolHandlerUPP handler; /*-> protocol handler routine*/
+ } u;
+};
+typedef struct LAPparms LAPparms;
+
+struct DDPparms {
+ QElem * qLink; /*next queue entry*/
+ short qType; /*queue type*/
+ short ioTrap; /*routine trap*/
+ Ptr ioCmdAddr; /*routine address*/
+ ATPCompletionUPP ioCompletion; /*ATPCompletionUPP or MPPCompletionUPP*/
+ OSErr ioResult; /*result code*/
+ long userData; /*Command result (ATP user bytes)*/
+ short reqTID; /*request transaction ID*/
+ short ioRefNum; /*driver reference number*/
+ short csCode; /*Call command code*/
+ UInt8 socket; /*socket number */
+ UInt8 checksumFlag; /*check sum flag */
+ union {
+ void * wdsPointer; /*-> write data structure*/
+ DDPSocketListenerUPP listener; /*->write data structure or -> Listener*/
+ } u;
+};
+typedef struct DDPparms DDPparms;
+
+union NBPPtrs {
+ Ptr ntQElPtr;
+ Ptr entityPtr;
+};
+typedef union NBPPtrs NBPPtrs;
+
+union LookupConfirmParams {
+ UInt8 verifyFlag;
+ struct {
+ void * retBuffPtr;
+ short retBuffSize;
+ short maxToGet;
+ short numGotten;
+ } Lookup;
+ struct {
+ AddrBlock confirmAddr;
+ UInt8 newSocket;
+ SInt8 filler; /* Filler for proper byte alignment*/
+ } Confirm;
+};
+typedef union LookupConfirmParams LookupConfirmParams;
+
+struct NBPparms {
+ QElem * qLink; /*next queue entry*/
+ short qType; /*queue type*/
+ short ioTrap; /*routine trap*/
+ Ptr ioCmdAddr; /*routine address*/
+ ATPCompletionUPP ioCompletion; /*ATPCompletionUPP or MPPCompletionUPP*/
+ OSErr ioResult; /*result code*/
+ long userData; /*Command result (ATP user bytes)*/
+ short reqTID; /*request transaction ID*/
+ short ioRefNum; /*driver reference number*/
+ short csCode; /*Call command code*/
+ UInt8 interval; /*retry interval */
+ UInt8 count; /*retry count */
+ NBPPtrs nbpPtrs;
+ LookupConfirmParams parm;
+};
+typedef struct NBPparms NBPparms;
+
+struct SetSelfparms {
+ QElem * qLink; /*next queue entry*/
+ short qType; /*queue type*/
+ short ioTrap; /*routine trap*/
+ Ptr ioCmdAddr; /*routine address*/
+ ATPCompletionUPP ioCompletion; /*ATPCompletionUPP or MPPCompletionUPP*/
+ OSErr ioResult; /*result code*/
+ long userData; /*Command result (ATP user bytes)*/
+ short reqTID; /*request transaction ID*/
+ short ioRefNum; /*driver reference number*/
+ short csCode; /*Call command code*/
+ UInt8 newSelfFlag; /*self-send toggle flag */
+ UInt8 oldSelfFlag; /*previous self-send state */
+};
+typedef struct SetSelfparms SetSelfparms;
+
+struct NBPKillparms {
+ QElem * qLink; /*next queue entry*/
+ short qType; /*queue type*/
+ short ioTrap; /*routine trap*/
+ Ptr ioCmdAddr; /*routine address*/
+ ATPCompletionUPP ioCompletion; /*ATPCompletionUPP or MPPCompletionUPP*/
+ OSErr ioResult; /*result code*/
+ long userData; /*Command result (ATP user bytes)*/
+ short reqTID; /*request transaction ID*/
+ short ioRefNum; /*driver reference number*/
+ short csCode; /*Call command code*/
+ void * nKillQEl; /*ptr to i/o queue element to cancel */
+};
+typedef struct NBPKillparms NBPKillparms;
+
+
+struct GetAppleTalkInfoParm {
+ QElem * qLink; /*next queue entry*/
+ short qType; /*queue type*/
+ short ioTrap; /*routine trap*/
+ Ptr ioCmdAddr; /*routine address*/
+ ATPCompletionUPP ioCompletion; /*ATPCompletionUPP or MPPCompletionUPP*/
+ OSErr ioResult; /*result code*/
+ long userData; /*Command result (ATP user bytes)*/
+ short reqTID; /*request transaction ID*/
+ short ioRefNum; /*driver reference number*/
+ short csCode; /*Call command code*/
+ /*max. concurrent NBP requests*/
+ short version; /*requested info version*/
+ void * varsPtr; /*pointer to well known MPP vars*/
+ void * DCEPtr; /*pointer to MPP DCE*/
+ short portID; /*port number [0..7]*/
+ long configuration; /*32-bit configuration word*/
+ short selfSend; /*non zero if SelfSend enabled*/
+ short netLo; /*low value of network range*/
+ short netHi; /*high value of network range*/
+ long ourAdd; /*our 24-bit AppleTalk address*/
+ long routerAddr; /*24-bit address of (last) router*/
+ short numOfPHs; /*max. number of protocol handlers*/
+ short numOfSkts; /*max. number of static sockets*/
+ short numNBPEs; /*max. concurrent NBP requests*/
+ void * nTQueue; /*pointer to registered name queue*/
+ short LAlength; /*length in bytes of data link addr*/
+ void * linkAddr; /*data link address returned*/
+ Ptr zoneName; /*zone name returned*/
+};
+typedef struct GetAppleTalkInfoParm GetAppleTalkInfoParm;
+
+struct ATalkClosePrepParm {
+ QElem * qLink; /*next queue entry*/
+ short qType; /*queue type*/
+ short ioTrap; /*routine trap*/
+ Ptr ioCmdAddr; /*routine address*/
+ ATPCompletionUPP ioCompletion; /*ATPCompletionUPP or MPPCompletionUPP*/
+ OSErr ioResult; /*result code*/
+ long userData; /*Command result (ATP user bytes)*/
+ short reqTID; /*request transaction ID*/
+ short ioRefNum; /*driver reference number*/
+ short csCode; /*Call command code*/
+ Ptr appName; /*pointer to application name in buffer*/
+};
+typedef struct ATalkClosePrepParm ATalkClosePrepParm;
+
+union MPPParamBlock {
+ MPPparms MPP; /*General MPP parms*/
+ LAPparms LAP; /*ALAP calls*/
+ DDPparms DDP; /*DDP calls*/
+ NBPparms NBP; /*NBP calls*/
+ SetSelfparms SETSELF;
+ NBPKillparms NBPKILL;
+ GetAppleTalkInfoParm GAIINFO;
+ ATalkClosePrepParm ATALKCLOSE;
+};
+
+
+struct XPPPrmBlk {
+ QElem * qLink;
+ short qType;
+ short ioTrap;
+ Ptr ioCmdAddr;
+ XPPCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long cmdResult;
+ short ioVRefNum;
+ short ioRefNum;
+ short csCode;
+ short sessRefnum; /*Offset to session refnum */
+ UInt8 aspTimeout; /*Timeout for ATP */
+ UInt8 aspRetry; /*Retry count for ATP */
+ short cbSize; /*Command block size */
+ Ptr cbPtr; /*Command block pointer */
+ short rbSize; /*Reply buffer size */
+ Ptr rbPtr; /*Reply buffer pointer */
+ short wdSize; /*Write Data size*/
+ Ptr wdPtr; /*Write Data pointer*/
+ UInt8 ccbStart[296]; /*CCB memory allocated for driver afpWrite max size(CCB)=296 all other calls=150*/
+};
+typedef struct XPPPrmBlk XPPPrmBlk;
+
+struct ASPGetparmsBlk {
+ QElem * qLink;
+ short qType;
+ short ioTrap;
+ Ptr ioCmdAddr;
+ XPPCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long cmdResult;
+ short ioVRefNum;
+ short ioRefNum;
+ short csCode;
+ short aspMaxCmdSize; /*For SPGetParms*/
+ short aspQuantumSize;
+ short numSesss;
+};
+typedef struct ASPGetparmsBlk ASPGetparmsBlk;
+
+struct ASPAbortPrm {
+ QElem * qLink;
+ short qType;
+ short ioTrap;
+ Ptr ioCmdAddr;
+ XPPCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long cmdResult;
+ short ioVRefNum;
+ short ioRefNum;
+ short csCode;
+ Ptr abortSCBPtr; /*SCB pointer for AbortOS */
+};
+typedef struct ASPAbortPrm ASPAbortPrm;
+
+struct ASPOpenPrm {
+ QElem * qLink;
+ short qType;
+ short ioTrap;
+ Ptr ioCmdAddr;
+ XPPCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long cmdResult;
+ short ioVRefNum;
+ short ioRefNum;
+ short csCode;
+ short sessRefnum; /*Offset to session refnum */
+ UInt8 aspTimeout; /*Timeout for ATP */
+ UInt8 aspRetry; /*Retry count for ATP */
+ AddrBlock serverAddr; /*Server address block */
+ Ptr scbPointer; /*SCB pointer */
+ AttnRoutineUPP attnRoutine; /*Attention routine pointer*/
+};
+typedef struct ASPOpenPrm ASPOpenPrm;
+typedef ASPOpenPrm * ASPOpenPrmPtr;
+
+struct AFPLoginPrm {
+ QElem * qLink;
+ short qType;
+ short ioTrap;
+ Ptr ioCmdAddr;
+ XPPCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long cmdResult;
+ short ioVRefNum;
+ short ioRefNum;
+ short csCode;
+ short sessRefnum; /*Offset to session refnum */
+ UInt8 aspTimeout; /*Timeout for ATP */
+ UInt8 aspRetry; /*Retry count for ATP */
+ short cbSize; /*Command block size */
+ void * cbPtr; /*Command block pointer */
+ short rbSize; /*Reply buffer size */
+ void * rbPtr; /*Reply buffer pointer */
+ AddrBlock afpAddrBlock; /*block in AFP login */
+ void * afpSCBPtr; /*SCB pointer in AFP login */
+ AttnRoutineUPP afpAttnRoutine; /*routine pointer in AFP login */
+ UInt8 ccbFill[144]; /*CCB memory allocated for driver Login needs only 150 bytes BUT CCB really starts in the middle of AFPSCBPtr and also clobbers AFPAttnRoutine. */
+};
+typedef struct AFPLoginPrm AFPLoginPrm;
+
+struct XCallParam {
+ QElem * qLink;
+ short qType;
+ short ioTrap;
+ Ptr ioCmdAddr;
+ XPPCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long cmdResult;
+ short ioVRefNum;
+ short ioRefNum;
+ short csCode;
+ short xppSubCode;
+ UInt8 xppTimeout; /*retry interval (seconds)*/
+ UInt8 xppRetry; /*retry count*/
+ short filler1;
+ void * zipBuffPtr; /*pointer to buffer (must be 578 bytes)*/
+ short zipNumZones; /*no. of zone names in this response*/
+ UInt8 zipLastFlag; /*non-zero if no more zones*/
+ UInt8 filler2; /*filler*/
+ UInt8 zipInfoField[70]; /*on initial call, set first word to zero*/
+};
+typedef struct XCallParam XCallParam;
+
+union XPPParamBlock {
+ XPPPrmBlk XPP;
+ ASPGetparmsBlk GETPARM;
+ ASPAbortPrm ABORT;
+ ASPOpenPrm OPEN;
+ AFPLoginPrm LOGIN;
+ XCallParam XCALL;
+};
+
+
+
+struct ATPparms {
+ QElem * qLink; /*next queue entry*/
+ short qType; /*queue type*/
+ short ioTrap; /*routine trap*/
+ Ptr ioCmdAddr; /*routine address*/
+ ATPCompletionUPP ioCompletion; /*ATPCompletionUPP or MPPCompletionUPP*/
+ OSErr ioResult; /*result code*/
+ long userData; /*Command result (ATP user bytes)*/
+ short reqTID; /*request transaction ID*/
+ short ioRefNum; /*driver reference number*/
+ short csCode; /*Call command code*/
+ UInt8 atpSocket; /*currbitmap for requests or ATP socket number*/
+ UInt8 atpFlags; /*control information*/
+ AddrBlock addrBlock; /*source/dest. socket address*/
+ short reqLength; /*request/response length*/
+ void * reqPointer; /*->request/response Data*/
+ void * bdsPointer; /*->response BDS */
+};
+typedef struct ATPparms ATPparms;
+
+struct SendReqparms {
+ QElem * qLink; /*next queue entry*/
+ short qType; /*queue type*/
+ short ioTrap; /*routine trap*/
+ Ptr ioCmdAddr; /*routine address*/
+ ATPCompletionUPP ioCompletion; /*ATPCompletionUPP or MPPCompletionUPP*/
+ OSErr ioResult; /*result code*/
+ long userData; /*Command result (ATP user bytes)*/
+ short reqTID; /*request transaction ID*/
+ short ioRefNum; /*driver reference number*/
+ short csCode; /*Call command code*/
+ UInt8 atpSocket; /*currbitmap for requests or ATP socket number*/
+ UInt8 atpFlags; /*control information*/
+ AddrBlock addrBlock; /*source/dest. socket address*/
+ short reqLength; /*request/response length*/
+ void * reqPointer; /*->request/response Data*/
+ void * bdsPointer; /*->response BDS */
+ UInt8 numOfBuffs; /*numOfBuffs */
+ UInt8 timeOutVal; /*timeout interval */
+ UInt8 numOfResps; /*number of responses actually received */
+ UInt8 retryCount; /*number of retries */
+ short intBuff; /*used internally for NSendRequest */
+ UInt8 TRelTime; /*TRelease time for extended send request */
+ SInt8 filler0;
+};
+typedef struct SendReqparms SendReqparms;
+
+
+struct ATPmisc1 {
+ QElem * qLink; /*next queue entry*/
+ short qType; /*queue type*/
+ short ioTrap; /*routine trap*/
+ Ptr ioCmdAddr; /*routine address*/
+ ATPCompletionUPP ioCompletion; /*ATPCompletionUPP or MPPCompletionUPP*/
+ OSErr ioResult; /*result code*/
+ long userData; /*Command result (ATP user bytes)*/
+ short reqTID; /*request transaction ID*/
+ short ioRefNum; /*driver reference number*/
+ short csCode; /*Call command code*/
+ UInt8 atpSocket; /*currbitmap for requests or ATP socket number*/
+ UInt8 atpFlags; /*control information*/
+ AddrBlock addrBlock; /*source/dest. socket address*/
+ short reqLength; /*request/response length*/
+ void * reqPointer; /*->request/response Data*/
+ void * bdsPointer; /*->response BDS */
+ union {
+ UInt8 bitMap; /*bitmap received */
+ UInt8 numOfBuffs; /*number of responses being sent*/
+ UInt8 rspNum; /*sequence number*/
+ } u;
+};
+typedef struct ATPmisc1 ATPmisc1;
+
+struct ATPmisc2 {
+ QElem * qLink; /*next queue entry*/
+ short qType; /*queue type*/
+ short ioTrap; /*routine trap*/
+ Ptr ioCmdAddr; /*routine address*/
+ ATPCompletionUPP ioCompletion; /*ATPCompletionUPP or MPPCompletionUPP*/
+ OSErr ioResult; /*result code*/
+ long userData; /*Command result (ATP user bytes)*/
+ short reqTID; /*request transaction ID*/
+ short ioRefNum; /*driver reference number*/
+ short csCode; /*Call command code*/
+ UInt8 atpSocket; /*currbitmap for requests or ATP socket number*/
+ UInt8 atpFlags; /*control information*/
+ AddrBlock addrBlock; /*source/dest. socket address*/
+ short reqLength; /*request/response length*/
+ void * reqPointer; /*->request/response Data*/
+ void * bdsPointer; /*->response BDS */
+ UInt8 filler;
+ UInt8 bdsSize; /*number of BDS elements */
+ short transID; /*transaction ID recd. */
+};
+typedef struct ATPmisc2 ATPmisc2;
+
+struct Killparms {
+ QElem * qLink; /*next queue entry*/
+ short qType; /*queue type*/
+ short ioTrap; /*routine trap*/
+ Ptr ioCmdAddr; /*routine address*/
+ ATPCompletionUPP ioCompletion; /*ATPCompletionUPP or MPPCompletionUPP*/
+ OSErr ioResult; /*result code*/
+ long userData; /*Command result (ATP user bytes)*/
+ short reqTID; /*request transaction ID*/
+ short ioRefNum; /*driver reference number*/
+ short csCode; /*Call command code*/
+ UInt8 atpSocket; /*currbitmap for requests or ATP socket number*/
+ UInt8 atpFlags; /*control information*/
+ AddrBlock addrBlock; /*source/dest. socket address*/
+ short reqLength; /*request/response length*/
+ void * reqPointer; /*->request/response Data*/
+ void * bdsPointer; /*->response BDS */
+ void * aKillQEl; /*ptr to i/o queue element to cancel*/
+};
+typedef struct Killparms Killparms;
+
+union ATPParamBlock {
+ ATPparms ATP; /*General ATP parms*/
+ SendReqparms SREQ; /*sendrequest parms*/
+ ATPmisc1 OTH1; /*and a few others*/
+ ATPmisc2 OTH2; /*and a few others*/
+ Killparms KILL; /*and a few others*/
+};
+
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(ATalkTransitionEventUPP)
+ NewATalkTransitionEventUPP (ATalkTransitionEventProcPtr userRoutine);
+
+ EXTERN_API(MPPCompletionUPP)
+ NewMPPCompletionUPP (MPPCompletionProcPtr userRoutine);
+
+ EXTERN_API(ATPCompletionUPP)
+ NewATPCompletionUPP (ATPCompletionProcPtr userRoutine);
+
+ EXTERN_API(XPPCompletionUPP)
+ NewXPPCompletionUPP (XPPCompletionProcPtr userRoutine);
+
+ EXTERN_API(AttnRoutineUPP)
+ NewAttnRoutineUPP (AttnRoutineProcPtr userRoutine);
+
+ EXTERN_API(MPPProtocolHandlerUPP)
+ NewMPPProtocolHandlerUPP (MPPProtocolHandlerProcPtr userRoutine);
+
+ EXTERN_API(DDPSocketListenerUPP)
+ NewDDPSocketListenerUPP (DDPSocketListenerProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeATalkTransitionEventUPP (ATalkTransitionEventUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeMPPCompletionUPP (MPPCompletionUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeATPCompletionUPP (ATPCompletionUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeXPPCompletionUPP (XPPCompletionUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeAttnRoutineUPP (AttnRoutineUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeMPPProtocolHandlerUPP (MPPProtocolHandlerUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeDDPSocketListenerUPP (DDPSocketListenerUPP userUPP);
+
+ EXTERN_API(long)
+ InvokeATalkTransitionEventUPP (long eventCode,
+ ATQEntryPtr qElem,
+ void * eventParameter,
+ ATalkTransitionEventUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeMPPCompletionUPP (MPPPBPtr thePBptr,
+ MPPCompletionUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeATPCompletionUPP (ATPPBPtr thePBptr,
+ ATPCompletionUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeXPPCompletionUPP (XPPParmBlkPtr thePBptr,
+ XPPCompletionUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeAttnRoutineUPP (short sessRefnum,
+ short attnBytes,
+ AttnRoutineUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeMPPProtocolHandlerUPP (Ptr SCCAddr1,
+ Ptr SCCAddr2,
+ Ptr MPPLocalVars,
+ Ptr nextFreeByteInRHA,
+ Ptr ReadPacketAndReadRestPtr,
+ short numBytesLeftToReadInPacket,
+ MPPProtocolHandlerUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeDDPSocketListenerUPP (Ptr SCCAddr1,
+ Ptr SCCAddr2,
+ Ptr MPPLocalVars,
+ Ptr nextFreeByteInRHA,
+ Ptr ReadPacketAndReadRestPtr,
+ UInt8 packetDestinationNumber,
+ short numBytesLeftToReadInPacket,
+ DDPSocketListenerUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppATalkTransitionEventProcInfo = 0x00000FF1 }; /* 4_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppMPPCompletionProcInfo = 0x00009802 }; /* register no_return_value Func(4_bytes:A0) */
+ enum { uppATPCompletionProcInfo = 0x00009802 }; /* register no_return_value Func(4_bytes:A0) */
+ enum { uppXPPCompletionProcInfo = 0x00009802 }; /* register no_return_value Func(4_bytes:A0) */
+ enum { uppAttnRoutineProcInfo = 0x00061002 }; /* register no_return_value Func(2_bytes:D0, 2_bytes:D1) */
+ enum { uppMPPProtocolHandlerProcInfo = 0x0000007F }; /* SPECIAL_CASE_PROCINFO(7) */
+ enum { uppDDPSocketListenerProcInfo = 0x0000008F }; /* SPECIAL_CASE_PROCINFO(8) */
+ #define NewATalkTransitionEventUPP(userRoutine) (ATalkTransitionEventUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppATalkTransitionEventProcInfo, GetCurrentArchitecture())
+ #define NewMPPCompletionUPP(userRoutine) (MPPCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMPPCompletionProcInfo, GetCurrentArchitecture())
+ #define NewATPCompletionUPP(userRoutine) (ATPCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppATPCompletionProcInfo, GetCurrentArchitecture())
+ #define NewXPPCompletionUPP(userRoutine) (XPPCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppXPPCompletionProcInfo, GetCurrentArchitecture())
+ #define NewAttnRoutineUPP(userRoutine) (AttnRoutineUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppAttnRoutineProcInfo, GetCurrentArchitecture())
+ #define NewMPPProtocolHandlerUPP(userRoutine) (MPPProtocolHandlerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMPPProtocolHandlerProcInfo, GetCurrentArchitecture())
+ #define NewDDPSocketListenerUPP(userRoutine) (DDPSocketListenerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDDPSocketListenerProcInfo, GetCurrentArchitecture())
+ #define DisposeATalkTransitionEventUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeMPPCompletionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeATPCompletionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeXPPCompletionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeAttnRoutineUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeMPPProtocolHandlerUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeDDPSocketListenerUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeATalkTransitionEventUPP(eventCode, qElem, eventParameter, userUPP) (long)CALL_THREE_PARAMETER_UPP((userUPP), uppATalkTransitionEventProcInfo, (eventCode), (qElem), (eventParameter))
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter InvokeMPPCompletionUPP(__A0, __A1)
+ void InvokeMPPCompletionUPP(MPPPBPtr thePBptr, MPPCompletionUPP userUPP) = 0x4E91;
+ #else
+ #define InvokeMPPCompletionUPP(thePBptr, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppMPPCompletionProcInfo, (thePBptr))
+ #endif
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter InvokeATPCompletionUPP(__A0, __A1)
+ void InvokeATPCompletionUPP(ATPPBPtr thePBptr, ATPCompletionUPP userUPP) = 0x4E91;
+ #else
+ #define InvokeATPCompletionUPP(thePBptr, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppATPCompletionProcInfo, (thePBptr))
+ #endif
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter InvokeXPPCompletionUPP(__A0, __A1)
+ void InvokeXPPCompletionUPP(XPPParmBlkPtr thePBptr, XPPCompletionUPP userUPP) = 0x4E91;
+ #else
+ #define InvokeXPPCompletionUPP(thePBptr, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppXPPCompletionProcInfo, (thePBptr))
+ #endif
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter InvokeAttnRoutineUPP(__D0, __D1, __A0)
+ void InvokeAttnRoutineUPP(short sessRefnum, short attnBytes, AttnRoutineUPP userUPP) = 0x4E90;
+ #else
+ #define InvokeAttnRoutineUPP(sessRefnum, attnBytes, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppAttnRoutineProcInfo, (sessRefnum), (attnBytes))
+ #endif
+ #define InvokeMPPProtocolHandlerUPP(SCCAddr1, SCCAddr2, MPPLocalVars, nextFreeByteInRHA, ReadPacketAndReadRestPtr, numBytesLeftToReadInPacket, userUPP) (Boolean)CALL_SIX_PARAMETER_UPP((userUPP), uppMPPProtocolHandlerProcInfo, (SCCAddr1), (SCCAddr2), (MPPLocalVars), (nextFreeByteInRHA), (ReadPacketAndReadRestPtr), (numBytesLeftToReadInPacket))
+ #define InvokeDDPSocketListenerUPP(SCCAddr1, SCCAddr2, MPPLocalVars, nextFreeByteInRHA, ReadPacketAndReadRestPtr, packetDestinationNumber, numBytesLeftToReadInPacket, userUPP) (Boolean)CALL_SEVEN_PARAMETER_UPP((userUPP), uppDDPSocketListenerProcInfo, (SCCAddr1), (SCCAddr2), (MPPLocalVars), (nextFreeByteInRHA), (ReadPacketAndReadRestPtr), (packetDestinationNumber), (numBytesLeftToReadInPacket))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewATalkTransitionEventProc(userRoutine) NewATalkTransitionEventUPP(userRoutine)
+#define NewMPPCompletionProc(userRoutine) NewMPPCompletionUPP(userRoutine)
+#define NewATPCompletionProc(userRoutine) NewATPCompletionUPP(userRoutine)
+#define NewXPPCompletionProc(userRoutine) NewXPPCompletionUPP(userRoutine)
+#define NewAttnRoutineProc(userRoutine) NewAttnRoutineUPP(userRoutine)
+#define NewMPPProtocolHandlerProc(userRoutine) NewMPPProtocolHandlerUPP(userRoutine)
+#define NewDDPSocketListenerProc(userRoutine) NewDDPSocketListenerUPP(userRoutine)
+#define CallATalkTransitionEventProc(userRoutine, eventCode, qElem, eventParameter) InvokeATalkTransitionEventUPP(eventCode, qElem, eventParameter, userRoutine)
+#define CallMPPCompletionProc(userRoutine, thePBptr) InvokeMPPCompletionUPP(thePBptr, userRoutine)
+#define CallATPCompletionProc(userRoutine, thePBptr) InvokeATPCompletionUPP(thePBptr, userRoutine)
+#define CallXPPCompletionProc(userRoutine, thePBptr) InvokeXPPCompletionUPP(thePBptr, userRoutine)
+#define CallAttnRoutineProc(userRoutine, sessRefnum, attnBytes) InvokeAttnRoutineUPP(sessRefnum, attnBytes, userRoutine)
+#define CallMPPProtocolHandlerProc(userRoutine, SCCAddr1, SCCAddr2, MPPLocalVars, nextFreeByteInRHA, ReadPacketAndReadRestPtr, numBytesLeftToReadInPacket) InvokeMPPProtocolHandlerUPP(SCCAddr1, SCCAddr2, MPPLocalVars, nextFreeByteInRHA, ReadPacketAndReadRestPtr, numBytesLeftToReadInPacket, userRoutine)
+#define CallDDPSocketListenerProc(userRoutine, SCCAddr1, SCCAddr2, MPPLocalVars, nextFreeByteInRHA, ReadPacketAndReadRestPtr, packetDestinationNumber, numBytesLeftToReadInPacket) InvokeDDPSocketListenerUPP(SCCAddr1, SCCAddr2, MPPLocalVars, nextFreeByteInRHA, ReadPacketAndReadRestPtr, packetDestinationNumber, numBytesLeftToReadInPacket, userRoutine)
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+OpenXPP (short * xppRefnum);
+
+EXTERN_API( OSErr )
+ASPOpenSession (XPPParmBlkPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+ASPCloseSession (XPPParmBlkPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+ASPAbortOS (XPPParmBlkPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+ASPGetParms (XPPParmBlkPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+ASPCloseAll (XPPParmBlkPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+ASPUserWrite (XPPParmBlkPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+ASPUserCommand (XPPParmBlkPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+ASPGetStatus (XPPParmBlkPtr thePBptr,
+ Boolean async);
+
+#define ASPGetStatusSync(paramBlock) ASPGetStatus((paramBlock), false)
+EXTERN_API( OSErr )
+AFPCommand (XPPParmBlkPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+GetLocalZones (XPPParmBlkPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+GetZoneList (XPPParmBlkPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+GetMyZone (XPPParmBlkPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+PAttachPH (MPPPBPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+PDetachPH (MPPPBPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+PWriteLAP (MPPPBPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+POpenSkt (MPPPBPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+PCloseSkt (MPPPBPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+PWriteDDP (MPPPBPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+PRegisterName (MPPPBPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+PLookupName (MPPPBPtr thePBptr,
+ Boolean async);
+
+#define PLookupNameSync(paramBlock) PLookupName((paramBlock), false)
+EXTERN_API( OSErr )
+PConfirmName (MPPPBPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+PRemoveName (MPPPBPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+PSetSelfSend (MPPPBPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+PKillNBP (MPPPBPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+PGetAppleTalkInfo (MPPPBPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+PATalkClosePrep (MPPPBPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+POpenATPSkt (ATPPBPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+PCloseATPSkt (ATPPBPtr thePBPtr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+PSendRequest (ATPPBPtr thePBPtr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+PGetRequest (ATPPBPtr thePBPtr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+PSendResponse (ATPPBPtr thePBPtr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+PAddResponse (ATPPBPtr thePBPtr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+PRelTCB (ATPPBPtr thePBPtr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+PRelRspCB (ATPPBPtr thePBPtr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+PNSendRequest (ATPPBPtr thePBPtr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+PKillSendReq (ATPPBPtr thePBPtr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+PKillGetReq (ATPPBPtr thePBPtr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+ATPKillAllGetReq (ATPPBPtr thePBPtr,
+ Boolean async);
+
+EXTERN_API( void )
+BuildLAPwds (Ptr wdsPtr,
+ Ptr dataPtr,
+ short destHost,
+ short prototype,
+ short frameLen);
+
+EXTERN_API( void )
+BuildDDPwds (Ptr wdsPtr,
+ Ptr headerPtr,
+ Ptr dataPtr,
+ AddrBlock netAddr,
+ short ddpType,
+ short dataLen);
+
+EXTERN_API( void )
+NBPSetEntity (Ptr buffer,
+ ConstStr32Param nbpObject,
+ ConstStr32Param nbpType,
+ ConstStr32Param nbpZone);
+
+EXTERN_API( void )
+NBPSetNTE (Ptr ntePtr,
+ ConstStr32Param nbpObject,
+ ConstStr32Param nbpType,
+ ConstStr32Param nbpZone,
+ short socket);
+
+EXTERN_API( short )
+GetBridgeAddress (void);
+
+EXTERN_API( short )
+BuildBDS (Ptr buffPtr,
+ Ptr bdsPtr,
+ short buffSize);
+
+EXTERN_API( OSErr )
+MPPOpen (void);
+
+EXTERN_API( OSErr )
+LAPAddATQ (ATQEntryPtr theATQEntry);
+
+EXTERN_API( OSErr )
+LAPRmvATQ (ATQEntryPtr theATQEntry);
+
+EXTERN_API( OSErr )
+ATPLoad (void);
+
+EXTERN_API( OSErr )
+ATPUnload (void);
+
+EXTERN_API( OSErr )
+NBPExtract (Ptr theBuffer,
+ short numInBuf,
+ short whichOne,
+ EntityName * abEntity,
+ AddrBlock * address);
+
+EXTERN_API( OSErr )
+GetNodeAddress (short * myNode,
+ short * myNet);
+
+EXTERN_API( Boolean )
+IsMPPOpen (void);
+
+EXTERN_API( Boolean )
+IsATPOpen (void);
+
+EXTERN_API( void )
+ATEvent (long event,
+ Ptr infoPtr);
+
+EXTERN_API( OSErr )
+ATPreFlightEvent (long event,
+ long cancel,
+ Ptr infoPtr);
+
+/*
+ The following routines are obsolete and will not be supported on
+ PowerPC. Equivalent functionality is provided by the routines
+ above.
+*/
+#endif /* CALL_NOT_IN_CARBON */
+
+#if TARGET_CPU_68K
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+MPPClose (void);
+
+EXTERN_API( OSErr )
+LAPOpenProtocol (ABByte theLAPType,
+ Ptr protoPtr);
+
+EXTERN_API( OSErr )
+LAPCloseProtocol (ABByte theLAPType);
+
+EXTERN_API( OSErr )
+LAPWrite (ATLAPRecHandle abRecord,
+ Boolean async);
+
+EXTERN_API( OSErr )
+LAPRead (ATLAPRecHandle abRecord,
+ Boolean async);
+
+EXTERN_API( OSErr )
+LAPRdCancel (ATLAPRecHandle abRecord);
+
+EXTERN_API( OSErr )
+DDPOpenSocket (short * theSocket,
+ Ptr sktListener);
+
+EXTERN_API( OSErr )
+DDPCloseSocket (short theSocket);
+
+EXTERN_API( OSErr )
+DDPRead (ATDDPRecHandle abRecord,
+ Boolean retCksumErrs,
+ Boolean async);
+
+EXTERN_API( OSErr )
+DDPWrite (ATDDPRecHandle abRecord,
+ Boolean doChecksum,
+ Boolean async);
+
+EXTERN_API( OSErr )
+DDPRdCancel (ATDDPRecHandle abRecord);
+
+EXTERN_API( OSErr )
+ATPOpenSocket (AddrBlock addrRcvd,
+ short * atpSocket);
+
+EXTERN_API( OSErr )
+ATPCloseSocket (short atpSocket);
+
+EXTERN_API( OSErr )
+ATPSndRequest (ATATPRecHandle abRecord,
+ Boolean async);
+
+EXTERN_API( OSErr )
+ATPRequest (ATATPRecHandle abRecord,
+ Boolean async);
+
+EXTERN_API( OSErr )
+ATPReqCancel (ATATPRecHandle abRecord,
+ Boolean async);
+
+EXTERN_API( OSErr )
+ATPGetRequest (ATATPRecHandle abRecord,
+ Boolean async);
+
+EXTERN_API( OSErr )
+ATPSndRsp (ATATPRecHandle abRecord,
+ Boolean async);
+
+EXTERN_API( OSErr )
+ATPAddRsp (ATATPRecHandle abRecord);
+
+EXTERN_API( OSErr )
+ATPResponse (ATATPRecHandle abRecord,
+ Boolean async);
+
+EXTERN_API( OSErr )
+ATPRspCancel (ATATPRecHandle abRecord,
+ Boolean async);
+
+EXTERN_API( OSErr )
+NBPRegister (ATNBPRecHandle abRecord,
+ Boolean async);
+
+EXTERN_API( OSErr )
+NBPLookup (ATNBPRecHandle abRecord,
+ Boolean async);
+
+EXTERN_API( OSErr )
+NBPConfirm (ATNBPRecHandle abRecord,
+ Boolean async);
+
+EXTERN_API( OSErr )
+NBPRemove (EntityPtr abEntity);
+
+EXTERN_API( OSErr )
+NBPLoad (void);
+
+EXTERN_API( OSErr )
+NBPUnload (void);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_CPU_68K */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __APPLETALK__ */
+
diff --git a/include/qt/Balloons.h b/include/qt/Balloons.h
new file mode 100644
index 000000000..eb79aa50f
--- /dev/null
+++ b/include/qt/Balloons.h
@@ -0,0 +1,349 @@
+/*
+ File: Balloons.h
+
+ Contains: Balloon Help Package Interfaces.
+
+ Version: Technology: System 7.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1990-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __BALLOONS__
+#define __BALLOONS__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#ifndef __MENUS__
+#include "Menus.h"
+#endif
+
+#ifndef __TEXTEDIT__
+#include "TextEdit.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*
+ Carbon clients should use MacHelp. The definitions below will NOT work for Carbon and
+ are only defined for those files that need to build pre-Carbon applications.
+*/
+/* o.constants*/
+
+
+typedef SInt16 BalloonVariant;
+enum {
+ kTopLeftTipPointsLeftVariant = 0,
+ kTopLeftTipPointsUpVariant = 1,
+ kTopRightTipPointsUpVariant = 2,
+ kTopRightTipPointsRightVariant = 3,
+ kBottomRightTipPointsRightVariant = 4,
+ kBottomRightTipPointsDownVariant = 5,
+ kBottomLeftTipPointsDownVariant = 6,
+ kBottomLeftTipPointsLeftVariant = 7,
+ kBalloonVariantCount = 8
+};
+
+
+#ifndef __MACHELP__
+enum {
+ hmBalloonHelpVersion = 0x0002 /* The real version of the Help Manager */
+};
+
+#endif /* !defined(__MACHELP__) */
+
+enum {
+ kHMHelpMenuID = -16490, /* Resource ID and menu ID of help menu */
+ kHMAboutHelpItem = 1, /* help menu item number of About Balloon Help... */
+ kHMShowBalloonsItem = 3 /* help menu item number of Show/Hide Balloons */
+};
+
+enum {
+ kHMHelpID = -5696, /* ID of various Help Mgr package resources (in Pack14 range) */
+ kBalloonWDEFID = 126 /* Resource ID of the WDEF proc used in standard balloons */
+};
+
+enum {
+ /* Dialog item template type constant */
+ helpItem = 1 /* key value in DITL template that corresponds to the help item */
+};
+
+enum {
+ /* Options for Help Manager resources in 'hmnu', 'hdlg', 'hrct', 'hovr', & 'hfdr' resources */
+ hmDefaultOptions = 0, /* default options for help manager resources */
+ hmUseSubID = 1, /* treat resID's in resources as subID's of driver base ID (for Desk Accessories) */
+ hmAbsoluteCoords = 2 /* ignore window port origin and treat rectangles as absolute coords (local to window) */
+};
+
+enum {
+ hmSaveBitsNoWindow = 4, /* don't create a window, just blast bits on screen. No update event is generated */
+ hmSaveBitsWindow = 8, /* create a window, but restore bits behind window when window goes away & generate update event */
+ hmMatchInTitle = 16 /* for hwin resources, match string anywhere in window title string */
+};
+
+enum {
+ /* Constants for Help Types in 'hmnu', 'hdlg', 'hrct', 'hovr', & 'hfdr' resources */
+ kHMStringItem = 1, /* pstring used in resource */
+ kHMPictItem = 2, /* 'PICT' ResID used in resource */
+ kHMStringResItem = 3, /* 'STR#' ResID & index used in resource */
+ kHMTEResItem = 6, /* Styled Text Edit ResID used in resource ('TEXT' & 'styl') */
+ kHMSTRResItem = 7, /* 'STR ' ResID used in resource */
+ kHMSkipItem = 256, /* don't display a balloon */
+ kHMCompareItem = 512, /* Compare pstring in menu item w/ PString in resource item ('hmnu' only) */
+ kHMNamedResourceItem = 1024, /* Use pstring in menu item to get 'STR#', 'PICT', or 'STR ' resource ('hmnu' only) */
+ kHMTrackCntlItem = 2048 /* Reserved */
+};
+
+enum {
+ /* Constants for hmmHelpType's when filling out HMMessageRecord */
+ khmmString = 1, /* help message contains a PString */
+ khmmPict = 2, /* help message contains a resource ID to a 'PICT' resource */
+ khmmStringRes = 3, /* help message contains a res ID & index to a 'STR#' resource */
+ khmmTEHandle = 4, /* help message contains a Text Edit handle */
+ khmmPictHandle = 5, /* help message contains a Picture handle */
+ khmmTERes = 6, /* help message contains a res ID to 'TEXT' & 'styl' resources */
+ khmmSTRRes = 7, /* help message contains a res ID to a 'STR ' resource */
+ kHMEnabledItem = 0 /* item is enabled, but not checked or control value = 0 */
+};
+
+enum {
+ /* ResTypes for Styled TE Handles in Resources */
+ kHMTETextResType = FOUR_CHAR_CODE('TEXT'), /* Resource Type of text data for styled TE record w/o style info */
+ kHMTEStyleResType = FOUR_CHAR_CODE('styl') /* Resource Type of style information for styled TE record */
+};
+
+enum {
+ kHMDisabledItem = 1, /* item is disabled, grayed in menus or disabled in dialogs */
+ kHMCheckedItem = 2, /* item is enabled, and checked or control value = 1 */
+ kHMOtherItem = 3, /* item is enabled, and control value > 1 */
+ /* Method parameters to pass to HMShowBalloon */
+ kHMRegularWindow = 0, /* Create a regular window floating above all windows */
+ kHMSaveBitsNoWindow = 1, /* Just save the bits and draw (for MDEF calls) */
+ kHMSaveBitsWindow = 2 /* Regular window, save bits behind, AND generate update event */
+};
+
+enum {
+ /* Resource Types for whichType parameter used when extracting 'hmnu' & 'hdlg' messages */
+ kHMMenuResType = FOUR_CHAR_CODE('hmnu'), /* ResType of help resource for supporting menus */
+ kHMDialogResType = FOUR_CHAR_CODE('hdlg'), /* ResType of help resource for supporting dialogs */
+ kHMWindListResType = FOUR_CHAR_CODE('hwin'), /* ResType of help resource for supporting windows */
+ kHMRectListResType = FOUR_CHAR_CODE('hrct'), /* ResType of help resource for rectangles in windows */
+ kHMOverrideResType = FOUR_CHAR_CODE('hovr'), /* ResType of help resource for overriding system balloons */
+ kHMFinderApplResType = FOUR_CHAR_CODE('hfdr') /* ResType of help resource for custom balloon in Finder */
+};
+
+#ifndef __MACHELP__
+
+struct HMStringResType {
+ short hmmResID;
+ short hmmIndex;
+};
+typedef struct HMStringResType HMStringResType;
+#endif /* !defined(__MACHELP__) */
+
+
+struct HMMessageRecord {
+ SInt16 hmmHelpType;
+ union {
+ Str255 hmmString;
+ SInt16 hmmPict;
+ TEHandle hmmTEHandle;
+ HMStringResType hmmStringRes;
+ SInt16 hmmPictRes;
+ PicHandle hmmPictHandle;
+ SInt16 hmmTERes;
+ SInt16 hmmSTRRes;
+ } u;
+};
+typedef struct HMMessageRecord HMMessageRecord;
+
+typedef HMMessageRecord * HMMessageRecPtr;
+typedef CALLBACK_API( OSErr , TipFunctionProcPtr )(Point tip, RgnHandle structure, Rect *r, BalloonVariant *balloonVariant);
+typedef STACK_UPP_TYPE(TipFunctionProcPtr) TipFunctionUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(TipFunctionUPP)
+ NewTipFunctionUPP (TipFunctionProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeTipFunctionUPP (TipFunctionUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeTipFunctionUPP (Point tip,
+ RgnHandle structure,
+ Rect * r,
+ BalloonVariant * balloonVariant,
+ TipFunctionUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppTipFunctionProcInfo = 0x00003FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewTipFunctionUPP(userRoutine) (TipFunctionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTipFunctionProcInfo, GetCurrentArchitecture())
+ #define DisposeTipFunctionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeTipFunctionUPP(tip, structure, r, balloonVariant, userUPP) (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppTipFunctionProcInfo, (tip), (structure), (r), (balloonVariant))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewTipFunctionProc(userRoutine) NewTipFunctionUPP(userRoutine)
+#define CallTipFunctionProc(userRoutine, tip, structure, r, balloonVariant) InvokeTipFunctionUPP(tip, structure, r, balloonVariant, userRoutine)
+/* Public Interfaces */
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+HMGetHelpMenuHandle (MenuHandle * mh) THREEWORDINLINE(0x303C, 0x0200, 0xA830);
+
+EXTERN_API( OSErr )
+HMShowBalloon (const HMMessageRecord * inHelpMessage,
+ Point inTip,
+ Rect * inHotRect, /* can be NULL */
+ TipFunctionUPP inTipProc,
+ SInt16 inWindowProcID,
+ BalloonVariant inBalloonVariant,
+ SInt16 inMethod) THREEWORDINLINE(0x303C, 0x0B01, 0xA830);
+
+EXTERN_API( OSErr )
+HMShowMenuBalloon (SInt16 itemNum,
+ SInt16 itemMenuID,
+ SInt32 itemFlags,
+ SInt32 itemReserved,
+ Point tip,
+ Rect * alternateRect, /* can be NULL */
+ TipFunctionUPP tipProc,
+ SInt16 theProc,
+ BalloonVariant balloonVariant) THREEWORDINLINE(0x303C, 0x0E05, 0xA830);
+
+EXTERN_API( OSErr )
+HMRemoveBalloon (void) THREEWORDINLINE(0x303C, 0x0002, 0xA830);
+
+EXTERN_API( OSErr )
+HMGetIndHelpMsg (ResType inWhichResType,
+ SInt16 inWhichResID,
+ SInt16 inMessageIndex,
+ SInt16 inMessageState,
+ UInt32 * outOptions,
+ Point * outTip,
+ Rect * outHotRect,
+ SInt16 * outWindowProcID,
+ BalloonVariant * outBalloonVariant,
+ HMMessageRecord * outHelpMessage,
+ SInt16 * outMessageCount) THREEWORDINLINE(0x303C, 0x1306, 0xA830);
+
+EXTERN_API( Boolean )
+HMIsBalloon (void) THREEWORDINLINE(0x303C, 0x0007, 0xA830);
+
+EXTERN_API( Boolean )
+HMGetBalloons (void) THREEWORDINLINE(0x303C, 0x0003, 0xA830);
+
+EXTERN_API( OSErr )
+HMSetBalloons (Boolean flag) THREEWORDINLINE(0x303C, 0x0104, 0xA830);
+
+EXTERN_API( OSErr )
+HMSetFont (SInt16 font) THREEWORDINLINE(0x303C, 0x0108, 0xA830);
+
+EXTERN_API( OSErr )
+HMSetFontSize (UInt16 fontSize) THREEWORDINLINE(0x303C, 0x0109, 0xA830);
+
+EXTERN_API( OSErr )
+HMGetFont (SInt16 * font) THREEWORDINLINE(0x303C, 0x020A, 0xA830);
+
+EXTERN_API( OSErr )
+HMGetFontSize (UInt16 * fontSize) THREEWORDINLINE(0x303C, 0x020B, 0xA830);
+
+EXTERN_API( OSErr )
+HMSetDialogResID (SInt16 resID) THREEWORDINLINE(0x303C, 0x010C, 0xA830);
+
+EXTERN_API( OSErr )
+HMSetMenuResID (SInt16 menuID,
+ SInt16 resID) THREEWORDINLINE(0x303C, 0x020D, 0xA830);
+
+EXTERN_API( OSErr )
+HMBalloonRect (const HMMessageRecord * inMessage,
+ Rect * outRect) THREEWORDINLINE(0x303C, 0x040E, 0xA830);
+
+EXTERN_API( OSErr )
+HMBalloonPict (const HMMessageRecord * inMessage,
+ PicHandle * outPict) THREEWORDINLINE(0x303C, 0x040F, 0xA830);
+
+EXTERN_API( OSErr )
+HMScanTemplateItems (SInt16 whichID,
+ SInt16 whichResFile,
+ ResType whichType) THREEWORDINLINE(0x303C, 0x0410, 0xA830);
+
+EXTERN_API( OSErr )
+HMExtractHelpMsg (ResType inType,
+ SInt16 inResID,
+ SInt16 inMessageIndex,
+ SInt16 inMessageState,
+ HMMessageRecord * outMessage) THREEWORDINLINE(0x303C, 0x0711, 0xA830);
+
+EXTERN_API( OSErr )
+HMGetDialogResID (SInt16 * resID) THREEWORDINLINE(0x303C, 0x0213, 0xA830);
+
+EXTERN_API( OSErr )
+HMGetMenuResID (SInt16 menuID,
+ SInt16 * resID) THREEWORDINLINE(0x303C, 0x0314, 0xA830);
+
+EXTERN_API( OSErr )
+HMGetBalloonWindow (WindowPtr * window) THREEWORDINLINE(0x303C, 0x0215, 0xA830);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __BALLOONS__ */
+
diff --git a/include/qt/CFArray.h b/include/qt/CFArray.h
new file mode 100644
index 000000000..a47bfdc0f
--- /dev/null
+++ b/include/qt/CFArray.h
@@ -0,0 +1,193 @@
+/*
+ File: CFArray.h
+
+ Contains: CoreFoundation array collection
+
+ Version: Technology: Mac OS X
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1999-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CFARRAY__
+#define __CFARRAY__
+
+#ifndef __CFBASE__
+#include "CFBase.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+typedef CALLBACK_API_C( const void *, CFArrayRetainCallBack )(CFAllocatorRef allocator, const void *ptr);
+typedef CALLBACK_API_C( void , CFArrayReleaseCallBack )(CFAllocatorRef allocator, const void *ptr);
+typedef CALLBACK_API_C( CFStringRef , CFArrayCopyDescriptionCallBack )(const void *ptr);
+typedef CALLBACK_API_C( Boolean , CFArrayEqualCallBack )(const void *ptr1, const void *ptr2);
+
+struct CFArrayCallBacks {
+ CFIndex version;
+ CFArrayRetainCallBack retain;
+ CFArrayReleaseCallBack release;
+ CFArrayCopyDescriptionCallBack copyDescription;
+ CFArrayEqualCallBack equal;
+};
+typedef struct CFArrayCallBacks CFArrayCallBacks;
+extern const CFArrayCallBacks kCFTypeArrayCallBacks;
+typedef CALLBACK_API_C( void , CFArrayApplierFunction )(const void *val, void *context);
+typedef const struct __CFArray * CFArrayRef;
+typedef struct __CFArray * CFMutableArrayRef;
+EXTERN_API_C( CFTypeID )
+CFArrayGetTypeID (void);
+
+
+EXTERN_API_C( CFArrayRef )
+CFArrayCreate (CFAllocatorRef allocator,
+ const void ** values,
+ CFIndex numValues,
+ const CFArrayCallBacks * callBacks);
+
+EXTERN_API_C( CFArrayRef )
+CFArrayCreateCopy (CFAllocatorRef allocator,
+ CFArrayRef srcArray);
+
+EXTERN_API_C( CFMutableArrayRef )
+CFArrayCreateMutable (CFAllocatorRef allocator,
+ CFIndex capacity,
+ const CFArrayCallBacks * callBacks);
+
+EXTERN_API_C( CFMutableArrayRef )
+CFArrayCreateMutableCopy (CFAllocatorRef allocator,
+ CFIndex capacity,
+ CFArrayRef srcArray);
+
+
+EXTERN_API_C( CFIndex )
+CFArrayGetCount (CFArrayRef theArray);
+
+EXTERN_API_C( CFIndex )
+CFArrayGetCountOfValue (CFArrayRef theArray,
+ CFRange range,
+ const void * value);
+
+EXTERN_API_C( Boolean )
+CFArrayContainsValue (CFArrayRef theArray,
+ CFRange range,
+ const void * value);
+
+EXTERN_API_C( const void *)
+CFArrayGetValueAtIndex (CFArrayRef theArray,
+ CFIndex idx);
+
+EXTERN_API_C( void )
+CFArrayGetValues (CFArrayRef theArray,
+ CFRange range,
+ const void ** values);
+
+EXTERN_API_C( void )
+CFArrayApplyFunction (CFArrayRef theArray,
+ CFRange range,
+ CFArrayApplierFunction applier,
+ void * context);
+
+EXTERN_API_C( CFIndex )
+CFArrayGetFirstIndexOfValue (CFArrayRef theArray,
+ CFRange range,
+ const void * value);
+
+EXTERN_API_C( CFIndex )
+CFArrayGetLastIndexOfValue (CFArrayRef theArray,
+ CFRange range,
+ const void * value);
+
+EXTERN_API_C( CFIndex )
+CFArrayBSearchValues (CFArrayRef theArray,
+ CFRange range,
+ const void * value,
+ CFComparatorFunction comparator,
+ void * context);
+
+
+EXTERN_API_C( void )
+CFArrayAppendValue (CFMutableArrayRef theArray,
+ const void * value);
+
+EXTERN_API_C( void )
+CFArrayInsertValueAtIndex (CFMutableArrayRef theArray,
+ CFIndex idx,
+ const void * value);
+
+EXTERN_API_C( void )
+CFArraySetValueAtIndex (CFMutableArrayRef theArray,
+ CFIndex idx,
+ const void * value);
+
+EXTERN_API_C( void )
+CFArrayRemoveValueAtIndex (CFMutableArrayRef theArray,
+ CFIndex idx);
+
+EXTERN_API_C( void )
+CFArrayRemoveAllValues (CFMutableArrayRef theArray);
+
+EXTERN_API_C( void )
+CFArrayReplaceValues (CFMutableArrayRef theArray,
+ CFRange range,
+ const void ** newValues,
+ CFIndex newCount);
+
+EXTERN_API_C( void )
+CFArrayExchangeValuesAtIndices (CFMutableArrayRef theArray,
+ CFIndex idx1,
+ CFIndex idx2);
+
+EXTERN_API_C( void )
+CFArraySortValues (CFMutableArrayRef theArray,
+ CFRange range,
+ CFComparatorFunction comparator,
+ void * context);
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CFARRAY__ */
+
diff --git a/include/qt/CFBag.h b/include/qt/CFBag.h
new file mode 100644
index 000000000..9e8265345
--- /dev/null
+++ b/include/qt/CFBag.h
@@ -0,0 +1,162 @@
+/*
+ File: CFBag.h
+
+ Contains: CoreFoundation bag collection
+
+ Version: Technology: Mac OS X
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1999-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CFBAG__
+#define __CFBAG__
+
+#ifndef __CFBASE__
+#include "CFBase.h"
+#endif
+
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+typedef CALLBACK_API_C( const void *, CFBagRetainCallBack )(CFAllocatorRef allocator, const void *ptr);
+typedef CALLBACK_API_C( void , CFBagReleaseCallBack )(CFAllocatorRef allocator, const void *ptr);
+typedef CALLBACK_API_C( CFStringRef , CFBagCopyDescriptionCallBack )(const void *ptr);
+typedef CALLBACK_API_C( Boolean , CFBagEqualCallBack )(const void *ptr1, const void *ptr2);
+typedef CALLBACK_API_C( CFHashCode , CFBagHashCallBack )(const void *ptr);
+
+struct CFBagCallBacks {
+ CFIndex version;
+ CFBagRetainCallBack retain;
+ CFBagReleaseCallBack release;
+ CFBagCopyDescriptionCallBack copyDescription;
+ CFBagEqualCallBack equal;
+ CFBagHashCallBack hash;
+};
+typedef struct CFBagCallBacks CFBagCallBacks;
+extern const CFBagCallBacks kCFTypeBagCallBacks;
+extern const CFBagCallBacks kCFCopyStringBagCallBacks;
+typedef CALLBACK_API_C( void , CFBagApplierFunction )(const void *val, void *context);
+typedef const struct __CFBag * CFBagRef;
+typedef struct __CFBag * CFMutableBagRef;
+EXTERN_API_C( CFTypeID )
+CFBagGetTypeID (void);
+
+
+EXTERN_API_C( CFBagRef )
+CFBagCreate (CFAllocatorRef allocator,
+ const void ** values,
+ CFIndex numValues,
+ const CFBagCallBacks * callBacks);
+
+EXTERN_API_C( CFBagRef )
+CFBagCreateCopy (CFAllocatorRef allocator,
+ CFBagRef bag);
+
+EXTERN_API_C( CFMutableBagRef )
+CFBagCreateMutable (CFAllocatorRef allocator,
+ CFIndex capacity,
+ const CFBagCallBacks * callBacks);
+
+EXTERN_API_C( CFMutableBagRef )
+CFBagCreateMutableCopy (CFAllocatorRef allocator,
+ CFIndex capacity,
+ CFBagRef bag);
+
+
+EXTERN_API_C( CFIndex )
+CFBagGetCount (CFBagRef bag);
+
+EXTERN_API_C( CFIndex )
+CFBagGetCountOfValue (CFBagRef bag,
+ const void * value);
+
+EXTERN_API_C( Boolean )
+CFBagContainsValue (CFBagRef bag,
+ const void * value);
+
+EXTERN_API_C( const void *)
+CFBagGetValue (CFBagRef bag,
+ const void * candidate);
+
+EXTERN_API_C( Boolean )
+CFBagGetValueIfPresent (CFBagRef bag,
+ const void * candidate,
+ const void ** value);
+
+EXTERN_API_C( void )
+CFBagGetValues (CFBagRef bag,
+ const void ** values);
+
+EXTERN_API_C( void )
+CFBagApplyFunction (CFBagRef bag,
+ CFBagApplierFunction applier,
+ void * context);
+
+
+EXTERN_API_C( void )
+CFBagAddValue (CFMutableBagRef bag,
+ const void * value);
+
+EXTERN_API_C( void )
+CFBagReplaceValue (CFMutableBagRef bag,
+ const void * value);
+
+EXTERN_API_C( void )
+CFBagSetValue (CFMutableBagRef bag,
+ const void * value);
+
+EXTERN_API_C( void )
+CFBagRemoveValue (CFMutableBagRef bag,
+ const void * value);
+
+EXTERN_API_C( void )
+CFBagRemoveAllValues (CFMutableBagRef bag);
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CFBAG__ */
+
diff --git a/include/qt/CFBase.h b/include/qt/CFBase.h
new file mode 100644
index 000000000..a0fb01900
--- /dev/null
+++ b/include/qt/CFBase.h
@@ -0,0 +1,307 @@
+/*
+ File: CFBase.h
+
+ Contains: CoreFoundation base types
+
+ Version: Technology: Mac OS X
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1999-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CFBASE__
+#define __CFBASE__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+
+
+#if !defined(TRUE)
+ #define TRUE 1
+#endif
+
+#if !defined(FALSE)
+ #define FALSE 0
+#endif
+
+
+#if defined(__WIN32__)
+ #undef CF_EXPORT
+ #if defined(CF_BUILDING_CF)
+ #define CF_EXPORT __declspec(dllexport) extern
+ #else
+ #define CF_EXPORT __declspec(dllimport) extern
+ #endif
+#elif defined(macintosh)
+ #if defined(__MWERKS__)
+ #define CF_EXPORT __declspec(export) extern
+ #endif
+#endif
+
+#if !defined(CF_EXPORT)
+ #define CF_EXPORT extern
+#endif
+
+
+#if !defined(CF_INLINE)
+ #if defined(__GNUC__)
+ #define CF_INLINE static __inline__
+ #elif defined(__MWERKS__)
+ #define CF_INLINE static inline
+ #endif
+#endif
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __CFBASE__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __CFBASE__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+typedef UInt32 CFTypeID;
+typedef UInt32 CFOptionFlags;
+typedef UInt32 CFHashCode;
+typedef SInt32 CFIndex;
+#if !defined(__CFSTRING_STRUCT__)
+ #define __CFSTRING_STRUCT__ 1
+ typedef const struct __CFString * CFStringRef;
+ typedef struct __CFString * CFMutableStringRef;
+#endif
+/* Values returned from comparison functions */
+
+enum CFComparisonResult {
+ kCFCompareLessThan = -1,
+ kCFCompareEqualTo = 0,
+ kCFCompareGreaterThan = 1
+};
+typedef enum CFComparisonResult CFComparisonResult;
+
+/* A standard comparison function */
+typedef CALLBACK_API_C( CFComparisonResult , CFComparatorFunction )(const void *val1, const void *val2, void *context);
+/* Constant used by some functions to indicate failed searches. */
+/* This is of type CFIndex. */
+enum {
+ kCFNotFound = -1
+};
+
+/* Range type */
+
+struct CFRange {
+ CFIndex location;
+ CFIndex length;
+};
+typedef struct CFRange CFRange;
+
+#if defined(CF_INLINE)
+CF_INLINE CFRange CFRangeMake(CFIndex loc, CFIndex len) {
+ CFRange range;
+ range.location = loc;
+ range.length = len;
+ return range;
+}
+#else
+#define CFRangeMake(LOC, LEN) __CFRangeMake(LOC, LEN)
+#endif
+
+EXTERN_API_C( CFRange )
+__CFRangeMake (CFIndex loc,
+ CFIndex len);
+
+/* Private; do not use */
+/* Allocator API
+
+ Most of the time when specifying an allocator to Create functions, the NULL
+ argument indicates "use the default"; this is the same as using kCFAllocatorDefault
+ or the return value from CFAllocatorGetDefault(). This assures that you will use
+ the allocator in effect at that time.
+
+ You should rarely use kCFAllocatorSystemDefault, the default default allocator.
+*/
+typedef const struct __CFAllocator * CFAllocatorRef;
+/* This is a synonym for NULL, if you'd rather use a named constant. */
+extern const CFAllocatorRef kCFAllocatorDefault;
+/* Default system allocator. */
+extern const CFAllocatorRef kCFAllocatorSystemDefault;
+/* Null allocator which does nothing and allocates no memory. */
+extern const CFAllocatorRef kCFAllocatorNull;
+/* Special allocator argument to CFAllocatorCreate() which means
+ "use the functions given in the context to allocate the allocator itself as well".
+*/
+extern const CFAllocatorRef kCFAllocatorUseContext;
+typedef CALLBACK_API_C( const void *, CFAllocatorRetainCallBack )(const void *info);
+typedef CALLBACK_API_C( void , CFAllocatorReleaseCallBack )(const void *info);
+typedef CALLBACK_API_C( CFStringRef , CFAllocatorCopyDescriptionCallBack )(const void *info);
+typedef CALLBACK_API_C( void *, CFAllocatorAllocateCallBack )(CFIndex allocSize, CFOptionFlags hint, void *info);
+typedef CALLBACK_API_C( void *, CFAllocatorReallocateCallBack )(void *ptr, CFIndex newsize, CFOptionFlags hint, void *info);
+typedef CALLBACK_API_C( void , CFAllocatorDeallocateCallBack )(void *ptr, void *info);
+typedef CALLBACK_API_C( CFIndex , CFAllocatorPreferredSizeCallBack )(CFIndex size, CFOptionFlags hint, void *info);
+
+struct CFAllocatorContext {
+ CFIndex version;
+ void * info;
+ CFAllocatorRetainCallBack retain;
+ CFAllocatorReleaseCallBack release;
+ CFAllocatorCopyDescriptionCallBack copyDescription;
+ CFAllocatorAllocateCallBack allocate;
+ CFAllocatorReallocateCallBack reallocate;
+ CFAllocatorDeallocateCallBack deallocate;
+ CFAllocatorPreferredSizeCallBack preferredSize;
+};
+typedef struct CFAllocatorContext CFAllocatorContext;
+EXTERN_API_C( CFTypeID )
+CFAllocatorGetTypeID (void);
+
+
+/* CFAllocatorSetDefault() sets the allocator that is used in the current thread
+ whenever NULL is specified as an allocator argument. This means that most, if
+ not all allocations will go through this allocator. It also means that any
+ allocator set as the default needs to be ready to deal with arbitrary memory
+ allocation requests; in addition, the size and number of requests will change
+ between releases.
+
+ If you wish to use a custom allocator in a context, it's best to provide it as
+ the argument to the various creation functions rather than setting it as the
+ default. Setting the default allocator is not encouraged.
+
+ If you do set an allocator as the default, either do it for all time in your
+ app, or do it in a nested fashion (by restoring the previous allocator when
+ you exit your context). The latter might be appropriate for plug-ins or
+ libraries that wish to set the default allocator.
+*/
+EXTERN_API_C( void )
+CFAllocatorSetDefault (CFAllocatorRef allocator);
+
+EXTERN_API_C( CFAllocatorRef )
+CFAllocatorGetDefault (void);
+
+
+EXTERN_API_C( CFAllocatorRef )
+CFAllocatorCreate (CFAllocatorRef allocator,
+ CFAllocatorContext * context);
+
+
+EXTERN_API_C( void *)
+CFAllocatorAllocate (CFAllocatorRef allocator,
+ CFIndex size,
+ CFOptionFlags hint);
+
+EXTERN_API_C( void *)
+CFAllocatorReallocate (CFAllocatorRef allocator,
+ void * ptr,
+ CFIndex newsize,
+ CFOptionFlags hint);
+
+EXTERN_API_C( void )
+CFAllocatorDeallocate (CFAllocatorRef allocator,
+ void * ptr);
+
+EXTERN_API_C( CFIndex )
+CFAllocatorGetPreferredSizeForSize (CFAllocatorRef allocator,
+ CFIndex size,
+ CFOptionFlags hint);
+
+EXTERN_API_C( void )
+CFAllocatorGetContext (CFAllocatorRef allocator,
+ CFAllocatorContext * context);
+
+/* Base "type" of all "CF objects", and polymorphic functions on them */
+
+typedef const void * CFTypeRef;
+EXTERN_API_C( CFTypeID )
+CFGetTypeID (CFTypeRef cf);
+
+EXTERN_API_C( CFStringRef )
+CFCopyTypeIDDescription (CFTypeID theType);
+
+
+EXTERN_API_C( CFTypeRef )
+CFRetain (CFTypeRef cf);
+
+EXTERN_API_C( void )
+CFRelease (CFTypeRef cf);
+
+EXTERN_API_C( CFIndex )
+CFGetRetainCount (CFTypeRef cf);
+
+EXTERN_API_C( Boolean )
+CFEqual (CFTypeRef cf1,
+ CFTypeRef cf2);
+
+EXTERN_API_C( CFHashCode )
+CFHash (CFTypeRef cf);
+
+EXTERN_API_C( CFStringRef )
+CFCopyDescription (CFTypeRef cf);
+
+EXTERN_API_C( CFAllocatorRef )
+CFGetAllocator (CFTypeRef cf);
+
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __CFBASE__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__CFBASE__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CFBASE__ */
+
diff --git a/include/qt/CFBundle.h b/include/qt/CFBundle.h
new file mode 100644
index 000000000..4ab25db64
--- /dev/null
+++ b/include/qt/CFBundle.h
@@ -0,0 +1,209 @@
+/*
+ File: CFBundle.h
+
+ Contains: CoreFoundation bundle
+
+ Version: Technology: Mac OS X
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1999-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CFBUNDLE__
+#define __CFBUNDLE__
+
+#ifndef __CFBASE__
+#include "CFBase.h"
+#endif
+
+#ifndef __CFARRAY__
+#include "CFArray.h"
+#endif
+
+#ifndef __CFSTRING__
+#include "CFString.h"
+#endif
+
+#ifndef __CFURL__
+#include "CFURL.h"
+#endif
+
+#ifndef __CFDICTIONARY__
+#include "CFDictionary.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+typedef struct __CFBundle * CFBundleRef;
+typedef struct __CFBundle * CFPlugInRef;
+extern const CFStringRef kCFBundleInfoDictionaryVersionKey;
+extern const CFStringRef kCFBundleExecutableKey;
+extern const CFStringRef kCFBundleIdentifierKey;
+extern const CFStringRef kCFBundleVersionKey;
+extern const CFStringRef kCFBundleDevelopmentRegionKey;
+extern const CFStringRef kCFBundleNameKey;
+/* ===================== Finding Bundles ===================== */
+EXTERN_API_C( CFBundleRef )
+CFBundleGetMainBundle (void);
+
+EXTERN_API_C( CFBundleRef )
+CFBundleGetBundleWithIdentifier (CFStringRef bundleID);
+
+/* A bundle can name itself by providing a key in the info dictionary. */
+/* This facility is meant to allow bundle-writers to get hold of their */
+/* bundle from their code without having to know where it was on the disk. */
+/* This is meant to be a replacement mechanism for +bundleForClass: users. */
+/* ===================== Creating Bundles ===================== */
+EXTERN_API_C( UInt32 )
+CFBundleGetTypeID (void);
+
+EXTERN_API_C( CFBundleRef )
+CFBundleCreate (CFAllocatorRef allocator,
+ CFURLRef bundleURL);
+
+/* Might return an existing instance with the ref-count bumped. */
+EXTERN_API_C( CFArrayRef )
+CFBundleCreateBundlesFromDirectory (CFAllocatorRef allocator,
+ CFURLRef directoryURL,
+ CFStringRef bundleType);
+
+/* Create instances for all bundles in the given directory matching the given */
+/* type (or all of them if bundleType is NULL) */
+/* ==================== Basic Bundle Info ==================== */
+EXTERN_API_C( CFURLRef )
+CFBundleCopyBundleURL (CFBundleRef bundle);
+
+EXTERN_API_C( CFDictionaryRef )
+CFBundleGetInfoDictionary (CFBundleRef bundle);
+
+EXTERN_API_C( CFStringRef )
+CFBundleGetIdentifier (CFBundleRef bundle);
+
+EXTERN_API_C( CFStringRef )
+CFBundleGetDevelopmentRegion (CFBundleRef bundle);
+
+EXTERN_API_C( CFURLRef )
+CFBundleCopySupportFilesDirectoryURL (CFBundleRef bundle);
+
+EXTERN_API_C( CFURLRef )
+CFBundleCopyResourcesDirectoryURL (CFBundleRef bundle);
+
+/* ------------- Basic Bundle Info without a CFBundle instance ------------- */
+/* This API is provided to enable developers to use access a bundle Info */
+/* dictionary without having to create an instance of CFBundle. */
+EXTERN_API_C( CFDictionaryRef )
+CFBundleCopyInfoDictionaryInDirectory (CFURLRef bundleURL);
+
+/* ==================== Resource Handling API ==================== */
+EXTERN_API_C( CFURLRef )
+CFBundleCopyResourceURL (CFBundleRef bundle,
+ CFStringRef resourceName,
+ CFStringRef resourceType,
+ CFStringRef subDirName);
+
+EXTERN_API_C( CFArrayRef )
+CFBundleCopyResourceURLsOfType (CFBundleRef bundle,
+ CFStringRef resourceType,
+ CFStringRef subDirName);
+
+EXTERN_API_C( CFStringRef )
+CFBundleCopyLocalizedString (CFBundleRef bundle,
+ CFStringRef key,
+ CFStringRef value,
+ CFStringRef tableName);
+
+#define CFCopyLocalizedString(key, comment) CFBundleCopyLocalizedString(CFBundleGetMainBundle(), (key), (key), NULL)
+#define CFCopyLocalizedStringFromTable(key, tbl, comment) CFBundleCopyLocalizedString(CFBundleGetMainBundle(), (key), (key), (tbl))
+#define CFCopyLocalizedStringFromTableInBundle(key, tbl, bundle, comment) CFBundleCopyLocalizedString((bundle), (key), (key), (tbl))
+/* ------------- Resource Handling without a CFBundle instance ------------- */
+/* This API is provided to enable developers to use the CFBundle resource */
+/* searching policy without having to create an instance of CFBundle. */
+/* Because of caching behavior when a CFBundle instance exists, it will be faster */
+/* to actually create a CFBundle if you need to access several resources. */
+EXTERN_API_C( CFURLRef )
+CFBundleCopyResourceURLInDirectory (CFURLRef bundleURL,
+ CFStringRef resourceName,
+ CFStringRef resourceType,
+ CFStringRef subDirName);
+
+EXTERN_API_C( CFArrayRef )
+CFBundleCopyResourceURLsOfTypeInDirectory (CFURLRef bundleURL,
+ CFStringRef resourceType,
+ CFStringRef subDirName);
+
+/* ==================== Primitive Code Loading API ==================== */
+/* This API abstracts the variosu different executable formats supported on various platforms. */
+/* It can load DYLD, CFM, or DLL shared libraries (on their appropriate platforms) and gives a */
+/* uniform API for looking up functions. */
+EXTERN_API_C( CFURLRef )
+CFBundleCopyExecutableURL (CFBundleRef bundle);
+
+EXTERN_API_C( Boolean )
+CFBundleIsExecutableLoaded (CFBundleRef bundle);
+
+EXTERN_API_C( Boolean )
+CFBundleLoadExecutable (CFBundleRef bundle);
+
+EXTERN_API_C( void )
+CFBundleUnloadExecutable (CFBundleRef bundle);
+
+EXTERN_API_C( void *)
+CFBundleGetFunctionPointerForName (CFBundleRef bundle,
+ CFStringRef functionName);
+
+EXTERN_API_C( void )
+CFBundleGetFunctionPointersForNames (CFBundleRef bundle,
+ CFArrayRef functionNames,
+ void * ftbl[]);
+
+/* ==================== Getting a bundles plugIn ==================== */
+EXTERN_API_C( CFPlugInRef )
+CFBundleGetPlugIn (CFBundleRef bundle);
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CFBUNDLE__ */
+
diff --git a/include/qt/CFCharacterSet.h b/include/qt/CFCharacterSet.h
new file mode 100644
index 000000000..0ebae084e
--- /dev/null
+++ b/include/qt/CFCharacterSet.h
@@ -0,0 +1,187 @@
+/*
+ File: CFCharacterSet.h
+
+ Contains: CoreFoundation character sets
+
+ Version: Technology: Mac OS X
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1999-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CFCHARACTERSET__
+#define __CFCHARACTERSET__
+
+#ifndef __CFBASE__
+#include "CFBase.h"
+#endif
+
+#ifndef __CFSTRING__
+#include "CFString.h"
+#endif
+
+#ifndef __CFDATA__
+#include "CFData.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __CFCHARACTERSET__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __CFCHARACTERSET__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+typedef const struct __CFCharacterSet * CFCharacterSetRef;
+typedef struct __CFCharacterSet * CFMutableCharacterSetRef;
+/* Used by CFCharacterSetCreateWithPredefinedSet */
+
+enum CFCharacterSetPredefinedSet {
+ kCFCharacterSetControl = 1,
+ kCFCharacterSetWhitespace = 2,
+ kCFCharacterSetWhitespaceAndNewline = 3,
+ kCFCharacterSetDecimalDigit = 4,
+ kCFCharacterSetLetter = 5,
+ kCFCharacterSetLowercaseLetter = 6,
+ kCFCharacterSetUppercaseLetter = 7,
+ kCFCharacterSetNonBase = 8,
+ kCFCharacterSetDecomposable = 9,
+ kCFCharacterSetAlphaNumeric = 10,
+ kCFCharacterSetPunctuation = 11,
+ kCFCharacterSetIllegal = 12
+};
+typedef enum CFCharacterSetPredefinedSet CFCharacterSetPredefinedSet;
+
+/* CFCharacterSet type ID */
+EXTERN_API_C( CFTypeID )
+CFCharacterSetGetTypeID (void);
+
+/*** CharacterSet creation ***/
+/* Functions to create basic immutable characterset. */
+EXTERN_API_C( CFCharacterSetRef )
+CFCharacterSetGetPredefined (CFCharacterSetPredefinedSet theSetIdentifier);
+
+EXTERN_API_C( CFCharacterSetRef )
+CFCharacterSetCreateWithCharactersInRange (CFAllocatorRef alloc,
+ CFRange theRange);
+
+EXTERN_API_C( CFCharacterSetRef )
+CFCharacterSetCreateWithCharactersInString (CFAllocatorRef alloc,
+ CFStringRef theString);
+
+EXTERN_API_C( CFCharacterSetRef )
+CFCharacterSetCreateWithBitmapRepresentation (CFAllocatorRef alloc,
+ CFDataRef theData);
+
+/* Functions to create mutable characterset. */
+EXTERN_API_C( CFMutableCharacterSetRef )
+CFCharacterSetCreateMutable (CFAllocatorRef alloc);
+
+EXTERN_API_C( CFMutableCharacterSetRef )
+CFCharacterSetCreateMutableCopy (CFAllocatorRef alloc,
+ CFCharacterSetRef theSet);
+
+/*** Basic accessors ***/
+EXTERN_API_C( Boolean )
+CFCharacterSetIsCharacterMember (CFCharacterSetRef theSet,
+ UniChar theChar);
+
+EXTERN_API_C( CFDataRef )
+CFCharacterSetCreateBitmapRepresentation (CFAllocatorRef alloc,
+ CFCharacterSetRef theSet);
+
+/*** MutableCharacterSet functions ***/
+EXTERN_API_C( void )
+CFCharacterSetAddCharactersInRange (CFMutableCharacterSetRef theSet,
+ CFRange theRange);
+
+EXTERN_API_C( void )
+CFCharacterSetRemoveCharactersInRange (CFMutableCharacterSetRef theSet,
+ CFRange theRange);
+
+EXTERN_API_C( void )
+CFCharacterSetAddCharactersInString (CFMutableCharacterSetRef theSet,
+ CFStringRef theString);
+
+EXTERN_API_C( void )
+CFCharacterSetRemoveCharactersInString (CFMutableCharacterSetRef theSet,
+ CFStringRef theString);
+
+EXTERN_API_C( void )
+CFCharacterSetUnion (CFMutableCharacterSetRef theSet,
+ CFCharacterSetRef theOtherSet);
+
+EXTERN_API_C( void )
+CFCharacterSetIntersect (CFMutableCharacterSetRef theSet,
+ CFCharacterSetRef theOtherSet);
+
+EXTERN_API_C( void )
+CFCharacterSetInvert (CFMutableCharacterSetRef theSet);
+
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __CFCHARACTERSET__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__CFCHARACTERSET__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CFCHARACTERSET__ */
+
diff --git a/include/qt/CFData.h b/include/qt/CFData.h
new file mode 100644
index 000000000..8a5f1ea4a
--- /dev/null
+++ b/include/qt/CFData.h
@@ -0,0 +1,137 @@
+/*
+ File: CFData.h
+
+ Contains: CoreFoundation block of bytes
+
+ Version: Technology: Mac OS X
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1999-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CFDATA__
+#define __CFDATA__
+
+#ifndef __CFBASE__
+#include "CFBase.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+typedef const struct __CFData * CFDataRef;
+typedef struct __CFData * CFMutableDataRef;
+EXTERN_API_C( CFTypeID )
+CFDataGetTypeID (void);
+
+
+EXTERN_API_C( CFDataRef )
+CFDataCreate (CFAllocatorRef allocator,
+ const UInt8 * bytes,
+ CFIndex length);
+
+EXTERN_API_C( CFDataRef )
+CFDataCreateWithBytesNoCopy (CFAllocatorRef allocator,
+ const UInt8 * bytes,
+ CFIndex length,
+ CFAllocatorRef bytesDeallocator);
+
+/* Pass kCFAllocatorNull as bytesDeallocator to assure the bytes aren't freed */
+EXTERN_API_C( CFDataRef )
+CFDataCreateCopy (CFAllocatorRef allocator,
+ CFDataRef data);
+
+EXTERN_API_C( CFMutableDataRef )
+CFDataCreateMutable (CFAllocatorRef allocator,
+ CFIndex capacity);
+
+EXTERN_API_C( CFMutableDataRef )
+CFDataCreateMutableCopy (CFAllocatorRef allocator,
+ CFIndex capacity,
+ CFDataRef data);
+
+
+EXTERN_API_C( CFIndex )
+CFDataGetLength (CFDataRef data);
+
+EXTERN_API_C( const UInt8 *)
+CFDataGetBytePtr (CFDataRef data);
+
+EXTERN_API_C( UInt8 *)
+CFDataGetMutableBytePtr (CFMutableDataRef data);
+
+EXTERN_API_C( void )
+CFDataGetBytes (CFDataRef data,
+ CFRange range,
+ UInt8 * buffer);
+
+
+EXTERN_API_C( void )
+CFDataSetLength (CFMutableDataRef data,
+ CFIndex length);
+
+EXTERN_API_C( void )
+CFDataIncreaseLength (CFMutableDataRef data,
+ CFIndex extraLength);
+
+EXTERN_API_C( void )
+CFDataAppendBytes (CFMutableDataRef data,
+ const UInt8 * bytes,
+ CFIndex length);
+
+EXTERN_API_C( void )
+CFDataReplaceBytes (CFMutableDataRef data,
+ CFRange range,
+ const UInt8 * newBytes,
+ CFIndex newLength);
+
+EXTERN_API_C( void )
+CFDataDeleteBytes (CFMutableDataRef data,
+ CFRange range);
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CFDATA__ */
+
diff --git a/include/qt/CFDate.h b/include/qt/CFDate.h
new file mode 100644
index 000000000..e773bfc64
--- /dev/null
+++ b/include/qt/CFDate.h
@@ -0,0 +1,159 @@
+/*
+ File: CFDate.h
+
+ Contains: CoreFoundation date
+
+ Version: Technology: Mac OS X
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1999-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CFDATE__
+#define __CFDATE__
+
+#ifndef __CFBASE__
+#include "CFBase.h"
+#endif
+
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+typedef double CFTimeInterval;
+typedef CFTimeInterval CFAbsoluteTime;
+/* absolute time is the time interval since the reference date */
+/* the reference date (epoch) is 00:00:00 1 January 2001. */
+
+EXTERN_API_C( CFAbsoluteTime )
+CFAbsoluteTimeGetCurrent (void);
+
+extern const CFAbsoluteTime kCFAbsoluteTimeIntervalSince1970;
+extern const CFAbsoluteTime kCFAbsoluteTimeIntervalSince1904;
+typedef const struct __CFDate * CFDateRef;
+EXTERN_API_C( CFTypeID )
+CFDateGetTypeID (void);
+
+
+EXTERN_API_C( CFDateRef )
+CFDateCreate (CFAllocatorRef allocator,
+ CFAbsoluteTime at);
+
+
+EXTERN_API_C( CFAbsoluteTime )
+CFDateGetAbsoluteTime (CFDateRef date);
+
+EXTERN_API_C( CFTimeInterval )
+CFDateGetTimeIntervalSinceDate (CFDateRef date,
+ CFDateRef otherDate);
+
+EXTERN_API_C( CFComparisonResult )
+CFDateCompare (CFDateRef date,
+ CFDateRef otherDate,
+ void * context);
+
+#if !defined(__CFTIMEZONE_STRUCT__)
+ #define __CFTIMEZONE_STRUCT__ 1
+ typedef const struct __CFTimeZone * CFTimeZoneRef;
+#endif
+
+struct CFGregorianDate {
+ SInt32 year;
+ SInt8 month;
+ SInt8 day;
+ SInt8 hour;
+ SInt8 minute;
+ double second;
+};
+typedef struct CFGregorianDate CFGregorianDate;
+
+struct CFGregorianUnits {
+ SInt32 years;
+ SInt32 months;
+ SInt32 days;
+ SInt32 hours;
+ SInt32 minutes;
+ double seconds;
+};
+typedef struct CFGregorianUnits CFGregorianUnits;
+enum {
+ kCFGregorianUnitsYears = (1 << 0),
+ kCFGregorianUnitsMonths = (1 << 1),
+ kCFGregorianUnitsDays = (1 << 2),
+ kCFGregorianUnitsHours = (1 << 3),
+ kCFGregorianUnitsMinutes = (1 << 4),
+ kCFGregorianUnitsSeconds = (1 << 5),
+ kCFGregorianAllUnits = 0x00FFFFFF
+};
+
+
+EXTERN_API_C( Boolean )
+CFGregorianDateIsValid (CFGregorianDate gdate,
+ CFOptionFlags unitFlags);
+
+EXTERN_API_C( CFAbsoluteTime )
+CFGregorianDateGetAbsoluteTime (CFGregorianDate gdate,
+ CFTimeZoneRef tz);
+
+EXTERN_API_C( CFGregorianDate )
+CFAbsoluteTimeGetGregorianDate (CFAbsoluteTime at,
+ CFTimeZoneRef tz);
+
+EXTERN_API_C( SInt32 )
+CFAbsoluteTimeGetDayOfWeek (CFAbsoluteTime at,
+ CFTimeZoneRef tz);
+
+EXTERN_API_C( SInt32 )
+CFAbsoluteTimeGetDayOfYear (CFAbsoluteTime at,
+ CFTimeZoneRef tz);
+
+EXTERN_API_C( SInt32 )
+CFAbsoluteTimeGetWeekOfYear (CFAbsoluteTime at,
+ CFTimeZoneRef tz);
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CFDATE__ */
+
diff --git a/include/qt/CFDictionary.h b/include/qt/CFDictionary.h
new file mode 100644
index 000000000..f523133be
--- /dev/null
+++ b/include/qt/CFDictionary.h
@@ -0,0 +1,187 @@
+/*
+ File: CFDictionary.h
+
+ Contains: CoreFoundation dictionary collection
+
+ Version: Technology: Mac OS X
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1999-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CFDICTIONARY__
+#define __CFDICTIONARY__
+
+#ifndef __CFBASE__
+#include "CFBase.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+typedef CALLBACK_API_C( const void *, CFDictionaryRetainCallBack )(CFAllocatorRef allocator, const void *ptr);
+typedef CALLBACK_API_C( void , CFDictionaryReleaseCallBack )(CFAllocatorRef allocator, const void *ptr);
+typedef CALLBACK_API_C( CFStringRef , CFDictionaryCopyDescriptionCallBack )(const void *ptr);
+typedef CALLBACK_API_C( Boolean , CFDictionaryEqualCallBack )(const void *ptr1, const void *ptr2);
+typedef CALLBACK_API_C( CFHashCode , CFDictionaryHashCallBack )(const void *ptr);
+
+struct CFDictionaryKeyCallBacks {
+ CFIndex version;
+ CFDictionaryRetainCallBack retain;
+ CFDictionaryReleaseCallBack release;
+ CFDictionaryCopyDescriptionCallBack copyDescription;
+ CFDictionaryEqualCallBack equal;
+ CFDictionaryHashCallBack hash;
+};
+typedef struct CFDictionaryKeyCallBacks CFDictionaryKeyCallBacks;
+extern const CFDictionaryKeyCallBacks kCFTypeDictionaryKeyCallBacks;
+extern const CFDictionaryKeyCallBacks kCFCopyStringDictionaryKeyCallBacks;
+
+struct CFDictionaryValueCallBacks {
+ CFIndex version;
+ CFDictionaryRetainCallBack retain;
+ CFDictionaryReleaseCallBack release;
+ CFDictionaryCopyDescriptionCallBack copyDescription;
+ CFDictionaryEqualCallBack equal;
+};
+typedef struct CFDictionaryValueCallBacks CFDictionaryValueCallBacks;
+extern const CFDictionaryValueCallBacks kCFTypeDictionaryValueCallBacks;
+typedef CALLBACK_API_C( void , CFDictionaryApplierFunction )(const void *key, const void *val, void *context);
+typedef const struct __CFDictionary * CFDictionaryRef;
+typedef struct __CFDictionary * CFMutableDictionaryRef;
+EXTERN_API_C( CFTypeID )
+CFDictionaryGetTypeID (void);
+
+
+EXTERN_API_C( CFDictionaryRef )
+CFDictionaryCreate (CFAllocatorRef allocator,
+ const void ** keys,
+ const void ** values,
+ CFIndex numValues,
+ const CFDictionaryKeyCallBacks * keyCallBacks,
+ const CFDictionaryValueCallBacks * valueCallBacks);
+
+EXTERN_API_C( CFDictionaryRef )
+CFDictionaryCreateCopy (CFAllocatorRef allocator,
+ CFDictionaryRef dict);
+
+EXTERN_API_C( CFMutableDictionaryRef )
+CFDictionaryCreateMutable (CFAllocatorRef allocator,
+ CFIndex capacity,
+ const CFDictionaryKeyCallBacks * keyCallBacks,
+ const CFDictionaryValueCallBacks * valueCallBacks);
+
+EXTERN_API_C( CFMutableDictionaryRef )
+CFDictionaryCreateMutableCopy (CFAllocatorRef allocator,
+ CFIndex capacity,
+ CFDictionaryRef dict);
+
+
+EXTERN_API_C( CFIndex )
+CFDictionaryGetCount (CFDictionaryRef dict);
+
+EXTERN_API_C( CFIndex )
+CFDictionaryGetCountOfKey (CFDictionaryRef dict,
+ const void * key);
+
+EXTERN_API_C( CFIndex )
+CFDictionaryGetCountOfValue (CFDictionaryRef dict,
+ const void * value);
+
+EXTERN_API_C( Boolean )
+CFDictionaryContainsKey (CFDictionaryRef dict,
+ const void * key);
+
+EXTERN_API_C( Boolean )
+CFDictionaryContainsValue (CFDictionaryRef dict,
+ const void * value);
+
+EXTERN_API_C( const void *)
+CFDictionaryGetValue (CFDictionaryRef dict,
+ const void * key);
+
+EXTERN_API_C( Boolean )
+CFDictionaryGetValueIfPresent (CFDictionaryRef dict,
+ const void * key,
+ const void ** value);
+
+EXTERN_API_C( void )
+CFDictionaryGetKeysAndValues (CFDictionaryRef dict,
+ const void ** keys,
+ const void ** values);
+
+EXTERN_API_C( void )
+CFDictionaryApplyFunction (CFDictionaryRef dict,
+ CFDictionaryApplierFunction applier,
+ void * context);
+
+
+EXTERN_API_C( void )
+CFDictionaryAddValue (CFMutableDictionaryRef dict,
+ const void * key,
+ const void * value);
+
+EXTERN_API_C( void )
+CFDictionarySetValue (CFMutableDictionaryRef dict,
+ const void * key,
+ const void * value);
+
+EXTERN_API_C( void )
+CFDictionaryReplaceValue (CFMutableDictionaryRef dict,
+ const void * key,
+ const void * value);
+
+EXTERN_API_C( void )
+CFDictionaryRemoveValue (CFMutableDictionaryRef dict,
+ const void * key);
+
+EXTERN_API_C( void )
+CFDictionaryRemoveAllValues (CFMutableDictionaryRef dict);
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CFDICTIONARY__ */
+
diff --git a/include/qt/CFNumber.h b/include/qt/CFNumber.h
new file mode 100644
index 000000000..fa5693c65
--- /dev/null
+++ b/include/qt/CFNumber.h
@@ -0,0 +1,192 @@
+/*
+ File: CFNumber.h
+
+ Contains: CoreFoundation numbers
+
+ Version: Technology: Mac OS X
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1999-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CFNUMBER__
+#define __CFNUMBER__
+
+#ifndef __CFBASE__
+#include "CFBase.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __CFNUMBER__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __CFNUMBER__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+typedef const struct __CFBoolean * CFBooleanRef;
+extern const CFBooleanRef kCFBooleanTrue;
+extern const CFBooleanRef kCFBooleanFalse;
+EXTERN_API_C( CFTypeID )
+CFBooleanGetTypeID (void);
+
+
+/* Returns the value of the given CFBoolean instance. */
+EXTERN_API_C( Boolean )
+CFBooleanGetValue (CFBooleanRef boolean);
+
+
+
+enum CFNumberType {
+ /* Types from MacTypes.h */
+ kCFNumberSInt8Type = 1,
+ kCFNumberSInt16Type = 2,
+ kCFNumberSInt32Type = 3,
+ kCFNumberSInt64Type = 4,
+ kCFNumberFloat32Type = 5,
+ kCFNumberFloat64Type = 6, /* 64-bit IEEE 754 */
+ /* Basic C types */
+ kCFNumberCharType = 7,
+ kCFNumberShortType = 8,
+ kCFNumberIntType = 9,
+ kCFNumberLongType = 10,
+ kCFNumberLongLongType = 11,
+ kCFNumberFloatType = 12,
+ kCFNumberDoubleType = 13, /* Other */
+ kCFNumberCFIndexType = 14,
+ kCFNumberMaxType = 14
+};
+typedef enum CFNumberType CFNumberType;
+
+typedef const struct __CFNumber * CFNumberRef;
+extern const CFNumberRef kCFNumberPositiveInfinity;
+extern const CFNumberRef kCFNumberNegativeInfinity;
+extern const CFNumberRef kCFNumberNaN;
+EXTERN_API_C( CFTypeID )
+CFNumberGetTypeID (void);
+
+
+/* Creates a CFNumber with the given value. The type of number pointed
+to by the valuePtr is specified by type. If type is a floating point
+type and the value represents one of the infinities or NaN, the
+well-defined CFNumber for that value is returned. If either of valuePtr
+or type is an invalid value, the result it undefined. */
+EXTERN_API_C( CFNumberRef )
+CFNumberCreate (CFAllocatorRef allocator,
+ CFNumberType theType,
+ const void * valuePtr);
+
+
+/* Returns the storage format of the CFNumber's value. Note that
+this is not necessarily the type provided in CFNumberCreate(). */
+EXTERN_API_C( CFNumberType )
+CFNumberGetType (CFNumberRef number);
+
+
+/* Returns the size in bytes of the type of the number. */
+EXTERN_API_C( CFIndex )
+CFNumberGetByteSize (CFNumberRef number);
+
+
+/* Returns TRUE if the type of the CFNumber's value is one of the defined floating point types. */
+EXTERN_API_C( Boolean )
+CFNumberIsFloatType (CFNumberRef number);
+
+
+/* Copies the CFNumber's value into the space pointed to by
+valuePtr, as the specified type. If conversion needs to take
+place, the conversion rules follow human expectation and not
+C's promotion and truncation rules. If the conversion is
+lossy, or the value is out of range, FALSE is returned. Best
+attempt at conversion will still be in *valuePtr. */
+EXTERN_API_C( Boolean )
+CFNumberGetValue (CFNumberRef number,
+ CFNumberType numType,
+ void * valuePtr);
+
+
+/* Compares the two CFNumber instances. If conversion of the
+types of the values is needed, the conversion and comparison
+follow human expectations and not C's promotion and comparison
+rules. Negative zero compares less than positive zero.
+Positive infinity compares greater than everything except
+itself, to which it compares equal. Negative infinity compares
+less than everything except itself, to which it compares equal.
+Unlike standard practice, if both numbers are NaN, then they
+compare equal; if only one of the numbers is NaN, then the NaN
+compares greater than the other number if it is negative, and
+smaller than the other number if it is positive. [Note that in
+CFEqual() with two CFNumbers, if either or both of the numbers
+is NaN, FALSE is returned.] */
+EXTERN_API_C( CFComparisonResult )
+CFNumberCompare (CFNumberRef number,
+ CFNumberRef otherNumber,
+ void * context);
+
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __CFNUMBER__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__CFNUMBER__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CFNUMBER__ */
+
diff --git a/include/qt/CFPlugIn.h b/include/qt/CFPlugIn.h
new file mode 100644
index 000000000..a4d3c8ab9
--- /dev/null
+++ b/include/qt/CFPlugIn.h
@@ -0,0 +1,181 @@
+/*
+ File: CFPlugIn.h
+
+ Contains: CoreFoundation plugins
+
+ Version: Technology: Mac OS X
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1999-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CFPLUGIN__
+#define __CFPLUGIN__
+
+#ifndef __CFBASE__
+#include "CFBase.h"
+#endif
+
+
+
+
+#ifndef __CFARRAY__
+#include "CFArray.h"
+#endif
+
+#ifndef __CFSTRING__
+#include "CFString.h"
+#endif
+
+#ifndef __CFURL__
+#include "CFURL.h"
+#endif
+
+#ifndef __CFBUNDLE__
+#include "CFBundle.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+typedef struct __CFPlugInInstanceRef * CFPlugInInstanceRef;
+extern const CFStringRef kCFPlugInDynamicRegistrationKey;
+extern const CFStringRef kCFPlugInDynamicRegisterFunctionKey;
+extern const CFStringRef kCFPlugInUnloadFunctionKey;
+extern const CFStringRef kCFPlugInFactoriesKey;
+extern const CFStringRef kCFPlugInTypesKey;
+/* ================= Function prototypes for various callbacks ================= */
+typedef CALLBACK_API_C( void , CFPlugInDynamicRegisterFunction )(CFPlugInRef plugIn);
+typedef CALLBACK_API_C( void , CFPlugInUnloadFunction )(CFPlugInRef plugIn);
+typedef CALLBACK_API_C( CFPlugInInstanceRef , CFPlugInFactoryFunction )(CFAllocatorRef allocator, CFStringRef typeName);
+typedef CALLBACK_API_C( Boolean , CFPlugInInstanceGetInterfaceFunction )(CFPlugInInstanceRef instance, CFStringRef interfaceName, void **ftbl);
+typedef CALLBACK_API_C( void , CFPlugInInstanceDeallocateInstanceDataFunction )(void *instanceData);
+/* ================= Creating PlugIns ================= */
+EXTERN_API_C( UInt32 )
+CFPlugInGetTypeID (void);
+
+EXTERN_API_C( CFPlugInRef )
+CFPlugInCreate (CFAllocatorRef allocator,
+ CFURLRef plugInURL);
+
+/* Might return an existing instance with the ref-count bumped. */
+EXTERN_API_C( CFBundleRef )
+CFPlugInGetBundle (CFPlugInRef plugIn);
+
+/* ================= Controlling load on demand ================= */
+/* For plugIns. */
+/* A dynamic registration function can call CFPlugInSetLoadOnDemand. */
+EXTERN_API_C( void )
+CFPlugInSetLoadOnDemand (CFPlugInRef plugIn,
+ Boolean flag);
+
+EXTERN_API_C( Boolean )
+CFPlugInIsLoadOnDemand (CFPlugInRef plugIn);
+
+/* ================= Finding factories and creating instances ================= */
+/* For plugIn hosts. */
+/* Functions for finding factories to create specific types and actually creating instances of a type. */
+EXTERN_API_C( CFArrayRef )
+CFPlugInFindFactoriesForPlugInType (CFStringRef typeName);
+
+EXTERN_API_C( CFPlugInInstanceRef )
+CFPlugInInstanceCreate (CFAllocatorRef allocator,
+ CFStringRef factoryName,
+ CFStringRef typeName);
+
+/* ================= Using instances ================= */
+/* For plugIn hosts and/or plugIns. */
+/* Functions for dealing with instances. */
+EXTERN_API_C( Boolean )
+CFPlugInInstanceGetInterfaceFunctionTable (CFPlugInInstanceRef instance,
+ CFStringRef interfaceName,
+ void ** ftbl);
+
+EXTERN_API_C( CFStringRef )
+CFPlugInInstanceGetFactoryName (CFPlugInInstanceRef instance);
+
+EXTERN_API_C( void *)
+CFPlugInInstanceGetInstanceData (CFPlugInInstanceRef instance);
+
+/* ================= Registering factories and types ================= */
+/* For plugIn writers who must dynamically register things. */
+/* Functions to register factory functions and to associate factories with types. */
+EXTERN_API_C( Boolean )
+CFPlugInRegisterFactoryFunction (CFStringRef factoryName,
+ CFPlugInFactoryFunction func);
+
+EXTERN_API_C( Boolean )
+CFPlugInRegisterFactoryFunctionByName (CFStringRef factoryName,
+ CFPlugInRef plugIn,
+ CFStringRef functionName);
+
+EXTERN_API_C( Boolean )
+CFPlugInUnregisterFactory (CFStringRef factoryName);
+
+EXTERN_API_C( Boolean )
+CFPlugInRegisterPlugInType (CFStringRef factoryName,
+ CFStringRef typeName);
+
+EXTERN_API_C( Boolean )
+CFPlugInUnregisterPlugInType (CFStringRef factoryName,
+ CFStringRef typeName);
+
+/* ================= Primitive instance creation ================= */
+/* For plugIns. */
+/* Factory function implementations should use this to actually create an instance. */
+EXTERN_API_C( UInt32 )
+CFPlugInInstanceGetTypeID (void);
+
+EXTERN_API_C( CFPlugInInstanceRef )
+CFPlugInInstanceCreateWithInstanceDataSize (CFAllocatorRef allocator,
+ CFIndex instanceDataSize,
+ CFPlugInInstanceDeallocateInstanceDataFunction deallocateInstanceFunction,
+ CFStringRef factoryName,
+ CFPlugInInstanceGetInterfaceFunction getInterfaceFunction);
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CFPLUGIN__ */
+
diff --git a/include/qt/CFPreferences.h b/include/qt/CFPreferences.h
new file mode 100644
index 000000000..2ec4b37c7
--- /dev/null
+++ b/include/qt/CFPreferences.h
@@ -0,0 +1,138 @@
+/*
+ File: CFPreferences.h
+
+ Contains: CoreFoundation preferences
+
+ Version: Technology: Mac OS X
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1999-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CFPREFERENCES__
+#define __CFPREFERENCES__
+
+#ifndef __CFBASE__
+#include "CFBase.h"
+#endif
+
+#ifndef __CFARRAY__
+#include "CFArray.h"
+#endif
+
+#ifndef __CFDICTIONARY__
+#include "CFDictionary.h"
+#endif
+
+#ifndef __CFSTRING__
+#include "CFString.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+extern const CFStringRef kCFPreferencesAnyApplication;
+extern const CFStringRef kCFPreferencesAnyHost;
+extern const CFStringRef kCFPreferencesCurrentHost;
+extern const CFStringRef kCFPreferencesAnyUser;
+extern const CFStringRef kCFPreferencesCurrentUser;
+/* Searches the various sources of application defaults to find the value for the given key.
+ key must not be NULL. If a value is found, it returns it; otherwise returns NULL. Caller
+ must release the returned value */
+EXTERN_API_C( CFTypeRef )
+CFPreferencesCopyAppValue (CFStringRef key,
+ CFStringRef appName);
+
+/* Sets the given value for the given key in the "normal" place for application preferences.
+ key must not be NULL. If value is NULL, key is removed instead. */
+EXTERN_API_C( void )
+CFPreferencesSetAppValue (CFStringRef key,
+ CFTypeRef value,
+ CFStringRef appName);
+
+/* Writes all changes in all sources of application defaults. Returns success or failure. */
+EXTERN_API_C( Boolean )
+CFPreferencesAppSynchronize (CFStringRef appName);
+
+
+/* The primitive get mechanism; all arguments must be non-NULL (use the constants above for common values).
+ Only the exact location specified by app-user-host is searched. The returned CFType must be released by
+ the caller when it is finished with it. */
+EXTERN_API_C( CFTypeRef )
+CFPreferencesCopyValue (CFStringRef key,
+ CFStringRef appName,
+ CFStringRef user,
+ CFStringRef host);
+
+/* The primitive set function; all arguments except value must be non-NULL. If value is NULL, the given key is removed */
+EXTERN_API_C( void )
+CFPreferencesSetValue (CFStringRef key,
+ CFTypeRef value,
+ CFStringRef appName,
+ CFStringRef user,
+ CFStringRef host);
+
+EXTERN_API_C( Boolean )
+CFPreferencesSynchronize (CFStringRef appName,
+ CFStringRef user,
+ CFStringRef host);
+
+/* Constructs and returns the list of the name of all applications which have preferences in the scope of the given user and host.
+ The returned value must be released by the caller; neither argument may be NULL. */
+EXTERN_API_C( CFArrayRef )
+CFPreferencesCopyApplicationList (CFStringRef userName,
+ CFStringRef hostName);
+
+/* Constructs and returns the list of all keys set in the given location.
+ The returned value must be released by the caller; all arguments must be non-NULL */
+EXTERN_API_C( CFArrayRef )
+CFPreferencesCopyKeyList (CFStringRef appName,
+ CFStringRef userName,
+ CFStringRef hostName);
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CFPREFERENCES__ */
+
diff --git a/include/qt/CFPropertyList.h b/include/qt/CFPropertyList.h
new file mode 100644
index 000000000..18d6d2818
--- /dev/null
+++ b/include/qt/CFPropertyList.h
@@ -0,0 +1,114 @@
+/*
+ File: CFPropertyList.h
+
+ Contains: CoreFoundation PropertyList
+
+ Version: Technology: Mac OS X
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1999-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CFPROPERTYLIST__
+#define __CFPROPERTYLIST__
+
+#ifndef __CFBASE__
+#include "CFBase.h"
+#endif
+
+#ifndef __CFDATA__
+#include "CFData.h"
+#endif
+
+#ifndef __CFSTRING__
+#include "CFString.h"
+#endif
+
+
+
+/* Type to mean any instance of a property list type;
+ currently, CFString, CFData, CFNumber, CFBoolean, CFDate,
+ CFArray, and CFDictionary.
+*/
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+typedef CFTypeRef CFPropertyListRef;
+enum {
+ kCFPropertyListImmutable = 0,
+ kCFPropertyListMutableContainers = 1,
+ kCFPropertyListMutableContainersAndLeaves = 2
+};
+
+/*
+Creates a property list object (CFString, CFDictionary, CFArray, or CFData)
+from its XML description; xmlData should be the raw bytes of that description,
+possibly the contents of an XML file. Returns NULL if the data cannot be parsed;
+if the parse fails and errorString is non-NULL, a human-readable description of
+the failure is returned in errorString. It is the caller's responsibility to
+release either the returned object or the error string, whichever is applicable.
+*/
+EXTERN_API_C( CFPropertyListRef )
+CFPropertyListCreateFromXMLData (CFAllocatorRef allocator,
+ CFDataRef xmlData,
+ CFOptionFlags mutabilityOption,
+ CFStringRef * errorString);
+
+/*
+Returns the XML description of the given object; propertyList must be one of
+the supported property list types, and (for composite types like CFArray and CFDictionary)
+must not contain any elements that are not themselves of a property list type.
+If a non-property list type is encountered, NULL is returned. The returned data is
+appropriate for writing out to an XML file. Note that a data, not a string, is
+returned because the bytes contain in them a description of the string encoding used.
+*/
+EXTERN_API_C( CFDataRef )
+CFPropertyListCreateXMLData (CFAllocatorRef allocator,
+ CFPropertyListRef propertyList);
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CFPROPERTYLIST__ */
+
diff --git a/include/qt/CFSet.h b/include/qt/CFSet.h
new file mode 100644
index 000000000..e1122c384
--- /dev/null
+++ b/include/qt/CFSet.h
@@ -0,0 +1,163 @@
+/*
+ File: CFSet.h
+
+ Contains: CoreFoundation set collection
+
+ Version: Technology: Mac OS X
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1999-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CFSET__
+#define __CFSET__
+
+#ifndef __CFBASE__
+#include "CFBase.h"
+#endif
+
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+typedef CALLBACK_API_C( const void *, CFSetRetainCallBack )(CFAllocatorRef allocator, const void *ptr);
+typedef CALLBACK_API_C( void , CFSetReleaseCallBack )(CFAllocatorRef allocator, const void *ptr);
+typedef CALLBACK_API_C( CFStringRef , CFSetCopyDescriptionCallBack )(const void *ptr);
+typedef CALLBACK_API_C( Boolean , CFSetEqualCallBack )(const void *ptr1, const void *ptr2);
+typedef CALLBACK_API_C( CFHashCode , CFSetHashCallBack )(const void *ptr);
+
+struct CFSetCallBacks {
+ CFIndex version;
+ CFSetRetainCallBack retain;
+ CFSetReleaseCallBack release;
+ CFSetCopyDescriptionCallBack copyDescription;
+ CFSetEqualCallBack equal;
+ CFSetHashCallBack hash;
+};
+typedef struct CFSetCallBacks CFSetCallBacks;
+extern const CFSetCallBacks kCFTypeSetCallBacks;
+extern const CFSetCallBacks kCFCopyStringSetCallBacks;
+typedef CALLBACK_API_C( void , CFSetApplierFunction )(const void *val, void *context);
+typedef const struct __CFSet * CFSetRef;
+typedef struct __CFSet * CFMutableSetRef;
+
+EXTERN_API_C( CFTypeID )
+CFSetGetTypeID (void);
+
+
+EXTERN_API_C( CFSetRef )
+CFSetCreate (CFAllocatorRef allocator,
+ const void ** values,
+ CFIndex numValues,
+ const CFSetCallBacks * callBacks);
+
+EXTERN_API_C( CFSetRef )
+CFSetCreateCopy (CFAllocatorRef allocator,
+ CFSetRef theSet);
+
+EXTERN_API_C( CFMutableSetRef )
+CFSetCreateMutable (CFAllocatorRef allocator,
+ CFIndex capacity,
+ const CFSetCallBacks * callBacks);
+
+EXTERN_API_C( CFMutableSetRef )
+CFSetCreateMutableCopy (CFAllocatorRef allocator,
+ CFIndex capacity,
+ CFSetRef theSet);
+
+
+EXTERN_API_C( CFIndex )
+CFSetGetCount (CFSetRef theSet);
+
+EXTERN_API_C( CFIndex )
+CFSetGetCountOfValue (CFSetRef theSet,
+ const void * value);
+
+EXTERN_API_C( Boolean )
+CFSetContainsValue (CFSetRef theSet,
+ const void * value);
+
+EXTERN_API_C( const void *)
+CFSetGetValue (CFSetRef theSet,
+ const void * candidate);
+
+EXTERN_API_C( Boolean )
+CFSetGetValueIfPresent (CFSetRef theSet,
+ const void * candidate,
+ const void ** value);
+
+EXTERN_API_C( void )
+CFSetGetValues (CFSetRef theSet,
+ const void ** values);
+
+EXTERN_API_C( void )
+CFSetApplyFunction (CFSetRef theSet,
+ CFSetApplierFunction applier,
+ void * context);
+
+
+EXTERN_API_C( void )
+CFSetAddValue (CFMutableSetRef theSet,
+ const void * value);
+
+EXTERN_API_C( void )
+CFSetReplaceValue (CFMutableSetRef theSet,
+ const void * value);
+
+EXTERN_API_C( void )
+CFSetSetValue (CFMutableSetRef theSet,
+ const void * value);
+
+EXTERN_API_C( void )
+CFSetRemoveValue (CFMutableSetRef theSet,
+ const void * value);
+
+EXTERN_API_C( void )
+CFSetRemoveAllValues (CFMutableSetRef theSet);
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CFSET__ */
+
diff --git a/include/qt/CFString.h b/include/qt/CFString.h
new file mode 100644
index 000000000..af388c100
--- /dev/null
+++ b/include/qt/CFString.h
@@ -0,0 +1,724 @@
+/*
+ File: CFString.h
+
+ Contains: CoreFoundation strings
+
+ Version: Technology: Mac OS X
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1999-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CFSTRING__
+#define __CFSTRING__
+
+#ifndef __CFBASE__
+#include "CFBase.h"
+#endif
+
+#ifndef __CFARRAY__
+#include "CFArray.h"
+#endif
+
+#ifndef __CFDATA__
+#include "CFData.h"
+#endif
+
+#ifndef __CFDICTIONARY__
+#include "CFDictionary.h"
+#endif
+
+
+#include "stdarg.h"
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*
+Please note: CFStrings are conceptually an array of Unicode characters.
+However, in general, how a CFString stores this array is an implementation
+detail. For instance, CFString might choose to use an array of 8-bit characters;
+to store its contents; or it might use multiple blocks of memory; or whatever.
+Furthermore, the implementation might change depending on the default
+system encoding, the user's language, the OS, or even a given release.
+
+What this means is that you should use the following advanced functions with care:
+
+ CFStringGetPascalStringPtr()
+ CFStringGetCStringPtr()
+ CFStringGetCharactersPtr()
+
+These functions either return the desired pointer quickly, in constant time, or they
+return NULL, which indicates you should use some of the other function, as shown
+in this example:
+
+ Str255 buffer;
+ StringPtr ptr = CFStringGetPascalStringPtr(str, encoding);
+ if (ptr == NULL) {
+ if (CFStringGetPascalString(str, buffer, 256, encoding)) ptr = buffer;
+ }
+
+Note that CFStringGetPascalString call might still return NULL --- but that will happen
+in two circumstances only: The conversion from the UniChar contents of CFString
+to the specified encoding fails, or the buffer is too small.
+
+If you need a copy of the buffer in the above example, you might consider simply
+calling CFStringGetPascalString() in all cases --- CFStringGetPascalStringPtr()
+is simply an optimization.
+
+In addition, the following functions, which create immutable CFStrings from developer
+supplied buffers without copying the buffers, might have to actually copy
+under certain circumstances (If they do copy, the buffer will be dealt by the
+"contentsDeallocator" argument.):
+
+ CFStringCreateWithPascalStringNoCopy()
+ CFStringCreateWithCStringNoCopy()
+ CFStringCreateWithCharactersNoCopy()
+
+You should of course never depend on the backing store of these CFStrings being
+what you provided, and in other no circumstance should you change the contents
+of that buffer (given that would break the invariant about the CFString being immutable).
+
+Having said all this, there are actually ways to create a CFString where the backing store
+is external, and can be manipulated by the developer or CFString itself:
+
+ CFStringCreateMutableWithExternalCharactersNoCopy()
+ CFStringSetExternalCharactersNoCopy()
+
+A "contentsAllocator" is used to realloc or free the backing store by CFString.
+kCFAllocatorNull can be provided to assure CFString will never realloc or free the buffer.
+Developer can call CFStringSetExternalCharactersNoCopy() to update
+CFString's idea of what's going on, if the buffer is changed externally. In these
+strings, CFStringGetCharactersPtr() is guaranteed to return the external buffer.
+
+These functions are here to allow wrapping a buffer of UniChar characters in a CFString,
+allowing the buffer to passed into CFString functions and also manipulated via CFString
+mutation functions. In general, developers should not use this technique for all strings,
+as it prevents CFString from using certain optimizations.
+*/
+/*
+ CFStringRef and CFMutableStringRef are defined in CFBase.h
+*/
+
+/* Identifier for character encoding; the values are the same as Text Encoding Converter TextEncoding.
+*/
+typedef UInt32 CFStringEncoding;
+/* Platform-independent built-in encodings; always available on all platforms.
+*/
+enum {
+ kCFStringEncodingInvalidId = -1L,
+ kCFStringEncodingMacRoman = 0L,
+ kCFStringEncodingWindowsLatin1 = 0x0500, /* ANSI codepage 1252 */
+ kCFStringEncodingISOLatin1 = 0x0201, /* ISO 8850 1 */
+ kCFStringEncodingNextStepLatin = 0x0B01, /* NextStep encoding*/
+ kCFStringEncodingASCII = 0x0600, /* 0..127 */
+ kCFStringEncodingUnicode = 0x0100, /* kTextEncodingUnicodeDefault + kTextEncodingDefaultFormat (aka kUnicode16BitFormat) */
+ kCFStringEncodingUTF8 = 0x08000100, /* kTextEncodingUnicodeDefault + kUnicodeUTF8Format */
+ kCFStringEncodingNonLossyASCII = 0x0BFF /* 7bit Unicode variants used by YellowBox & Java */
+};
+
+
+/* CFString type ID
+*/
+EXTERN_API_C( CFTypeID )
+CFStringGetTypeID (void);
+
+/* Macro to allow creation of compile-time constant strings; the argument should be a constant string. This will work for now but we need something better.
+*/
+#define CFSTR(cStr) __CFStringMakeConstantString(cStr "")
+
+/*** Immutable string creation functions ***/
+/* Functions to create basic immutable strings. The provided allocator is used for all memory activity in these functions.
+*/
+/* These functions copy the provided buffer into CFString's internal storage.
+*/
+EXTERN_API_C( CFStringRef )
+CFStringCreateWithPascalString (CFAllocatorRef alloc,
+ ConstStringPtr pStr,
+ CFStringEncoding encoding);
+
+EXTERN_API_C( CFStringRef )
+CFStringCreateWithCString (CFAllocatorRef alloc,
+ const char * cStr,
+ CFStringEncoding encoding);
+
+EXTERN_API_C( CFStringRef )
+CFStringCreateWithCharacters (CFAllocatorRef alloc,
+ const UniChar * chars,
+ CFIndex numChars);
+
+/* These functions try not to copy the provided buffer. The buffer will be
+deallocated with the provided contentsDeallocator when it's no longer needed;
+to not free the buffer, specify kCFAllocatorNull here. As usual, NULL means
+default allocator.
+NOTE: Do not count on these buffers as being used by the string;
+in some cases the CFString might free the buffer and use something else
+(for instance if it decides to always use Unicode encoding internally).
+In addition, some encodings are not used internally; in
+those cases CFString might also dump the provided buffer and use its own.
+*/
+
+EXTERN_API_C( CFStringRef )
+CFStringCreateWithPascalStringNoCopy (CFAllocatorRef alloc,
+ ConstStringPtr pStr,
+ CFStringEncoding encoding,
+ CFAllocatorRef contentsDeallocator);
+
+EXTERN_API_C( CFStringRef )
+CFStringCreateWithCStringNoCopy (CFAllocatorRef alloc,
+ const char * cStr,
+ CFStringEncoding encoding,
+ CFAllocatorRef contentsDeallocator);
+
+EXTERN_API_C( CFStringRef )
+CFStringCreateWithCharactersNoCopy (CFAllocatorRef alloc,
+ const UniChar * chars,
+ CFIndex numChars,
+ CFAllocatorRef contentsDeallocator);
+
+/* Create copies of part or all of the string.
+*/
+EXTERN_API_C( CFStringRef )
+CFStringCreateWithSubstring (CFAllocatorRef alloc,
+ CFStringRef str,
+ CFRange range);
+
+EXTERN_API_C( CFStringRef )
+CFStringCreateCopy (CFAllocatorRef alloc,
+ CFStringRef theString);
+
+/* These functions create a CFString from the provided printf-format and arguments.
+*/
+EXTERN_API_C( CFStringRef )
+CFStringCreateWithFormat (CFAllocatorRef alloc,
+ CFDictionaryRef formatOptions,
+ CFStringRef format,
+ ...);
+
+EXTERN_API_C( CFStringRef )
+CFStringCreateWithFormatAndArguments (CFAllocatorRef alloc,
+ CFDictionaryRef formatOptions,
+ CFStringRef format,
+ va_list arguments);
+
+/* Functions to create mutable strings. "maxLength", if not 0, is a hard bound on the length of the string. If 0, there is no limit on the length.
+*/
+EXTERN_API_C( CFMutableStringRef )
+CFStringCreateMutable (CFAllocatorRef alloc,
+ CFIndex maxLength);
+
+EXTERN_API_C( CFMutableStringRef )
+CFStringCreateMutableCopy (CFAllocatorRef alloc,
+ CFIndex maxLength,
+ CFStringRef theString);
+
+/* This function creates a mutable string that has a developer supplied and directly editable backing store.
+The string will be manipulated within the provided buffer (if any) until it outgrows capacity; then the
+externalCharactersAllocator will be consulted for more memory. When the CFString is deallocated, the
+buffer will be freed with the externalCharactersAllocator. Provide kCFAllocatorNull here to prevent the buffer
+from ever being reallocated or deallocated by CFString. See comments at top of this file for more info.
+*/
+EXTERN_API_C( CFMutableStringRef )
+CFStringCreateMutableWithExternalCharactersNoCopy (CFAllocatorRef alloc,
+ UniChar * chars,
+ CFIndex numChars,
+ CFIndex capacity,
+ CFAllocatorRef externalCharactersAllocator);
+
+
+/*** Basic accessors for the contents ***/
+/* Number of 16-bit Unicode characters in the string.
+*/
+EXTERN_API_C( CFIndex )
+CFStringGetLength (CFStringRef theString);
+
+/* Extracting the contents of the string. For obtaining multiple characters, calling
+CFStringGetCharacters() is more efficient than multiple calls to CFStringGetCharacterAtIndex().
+If the length of the string is not known (so you can't use a fixed size buffer for CFStringGetCharacters()),
+another method is to use is CFStringGetCharacterFromInlineBuffer() (see further below).
+*/
+EXTERN_API_C( UniChar )
+CFStringGetCharacterAtIndex (CFStringRef theString,
+ CFIndex idx);
+
+EXTERN_API_C( void )
+CFStringGetCharacters (CFStringRef theString,
+ CFRange range,
+ UniChar * buffer);
+
+
+/*** Conversion to other encodings ***/
+
+/* These two convert into the provided buffer; they return FALSE if conversion isn't possible
+(due to conversion error, or not enough space in the provided buffer).
+These functions do zero-terminate or put the length byte; the provided bufferSize should include
+space for this (so pass 256 for Str255). More sophisticated usages can go through CFStringGetBytes().
+*/
+EXTERN_API_C( Boolean )
+CFStringGetPascalString (CFStringRef theString,
+ StringPtr buffer,
+ CFIndex bufferSize,
+ CFStringEncoding encoding);
+
+EXTERN_API_C( Boolean )
+CFStringGetCString (CFStringRef theString,
+ char * buffer,
+ CFIndex bufferSize,
+ CFStringEncoding encoding);
+
+/* These functions attempt to return in O(1) time the desired format for the string.
+Note that although this means a pointer to the internal structure is being returned,
+this can't always be counted on. Please see note at the top of the file for more
+details.
+*/
+EXTERN_API_C( ConstStringPtr )
+CFStringGetPascalStringPtr (CFStringRef theString,
+ CFStringEncoding encoding);
+
+/* Be prepared for NULL */
+EXTERN_API_C( const char *)
+CFStringGetCStringPtr (CFStringRef theString,
+ CFStringEncoding encoding);
+
+/* Be prepared for NULL */
+EXTERN_API_C( const UniChar *)
+CFStringGetCharactersPtr (CFStringRef theString);
+
+/* Be prepared for NULL */
+/* The primitive conversion routine; allows you to convert a string piece at a time
+ into a fixed size buffer. Returns number of characters converted.
+ Characters that cannot be converted to the specified encoding are represented
+ with the byte specified by lossByte; if lossByte is 0, then lossy conversion
+ is not allowed and conversion stops, returning partial results.
+ Pass buffer==NULL if you don't care about the converted string (but just the convertability,
+ or number of bytes required, indicated by usedBufLen).
+ maxBufLength indicates the maximum number of bytes to generate; it is consulted even
+ if buffer is NULL, so pass in INT_MAX if you want to find out the maximum number of bytes.
+ Does not zero-terminate. If you want to create Pascal or C string, allow one extra byte at start or end.
+ Setting isExternalRepresentation causes any extra bytes that would allow
+ the data to be made persistent to be included; for instance, the Unicode BOM.
+*/
+EXTERN_API_C( CFIndex )
+CFStringGetBytes (CFStringRef theString,
+ CFRange range,
+ CFStringEncoding encoding,
+ UInt8 lossByte,
+ Boolean isExternalRepresentation,
+ UInt8 * buffer,
+ CFIndex maxBufLen,
+ CFIndex * usedBufLen);
+
+/* This one goes the other way by creating a CFString from a bag of bytes.
+This is much like CFStringCreateWithPascalString or CFStringCreateWithCString,
+except the length is supplied explicitly. In addition, you can specify whether
+the data is an external format --- that is, whether to pay attention to the
+BOM character (if any) and do byte swapping if necessary
+*/
+EXTERN_API_C( CFStringRef )
+CFStringCreateWithBytes (CFAllocatorRef alloc,
+ const UInt8 * bytes,
+ CFIndex numBytes,
+ CFStringEncoding encoding,
+ Boolean isExternalRepresentation);
+
+/* Convenience functions String <-> Data. These generate "external" formats, that is, formats that
+ can be written out to disk. For instance, if the encoding is Unicode, CFStringCreateFromExternalRepresentation()
+ pays attention to the BOM character (if any) and does byte swapping if necessary.
+ Similarly CFStringCreateExternalRepresentation() will always include a BOM character if the encoding is
+ Unicode. See above for description of lossByte.
+*/
+EXTERN_API_C( CFStringRef )
+CFStringCreateFromExternalRepresentation (CFAllocatorRef alloc,
+ CFDataRef data,
+ CFStringEncoding encoding);
+
+/* May return NULL on conversion error */
+EXTERN_API_C( CFDataRef )
+CFStringCreateExternalRepresentation (CFAllocatorRef alloc,
+ CFStringRef theString,
+ CFStringEncoding encoding,
+ UInt8 lossByte);
+
+/* May return NULL on conversion error */
+/* Hints about the contents of a string
+*/
+EXTERN_API_C( CFStringEncoding )
+CFStringGetSmallestEncoding (CFStringRef theString);
+
+/* Result in O(n) time max */
+EXTERN_API_C( CFStringEncoding )
+CFStringGetFastestEncoding (CFStringRef theString);
+
+/* Result in O(1) time max */
+/* General encoding info
+*/
+EXTERN_API_C( CFStringEncoding )
+CFStringGetSystemEncoding (void);
+
+/* The default encoding for the system; untagged 8-bit characters are usually in this encoding */
+EXTERN_API_C( CFIndex )
+CFStringGetMaximumSizeForEncoding (CFIndex length,
+ CFStringEncoding encoding);
+
+/* Max bytes a string of specified length (in UniChars) will take up if encoded */
+
+/*** Comparison functions. ***/
+enum {
+ /* Flags used in all find and compare operations */
+ kCFCompareCaseInsensitive = 1,
+ kCFCompareBackwards = 4, /* Starting from the end of the string */
+ kCFCompareAnchored = 8, /* Only at the specified starting point */
+ kCFCompareNonliteral = 16, /* If specified, loose equivalence is performed (o-umlaut == o, umlaut) */
+ kCFCompareLocalized = 32, /* User's default locale is used for the comparisons */
+ kCFCompareNumerically = 64 /* Numeric comparison is used; that is, Foo2.txt < Foo7.txt < Foo25.txt */
+};
+
+/* The main comparison routine; compares specified range of the string to another.
+ locale == NULL indicates canonical locale
+*/
+EXTERN_API_C( CFComparisonResult )
+CFStringCompareWithOptions (CFStringRef string1,
+ CFStringRef string2,
+ CFRange rangeToCompare,
+ CFOptionFlags compareOptions);
+
+/* Comparison convenience suitable for passing as sorting functions.
+*/
+EXTERN_API_C( CFComparisonResult )
+CFStringCompare (CFStringRef string1,
+ CFStringRef string2,
+ CFOptionFlags compareOptions);
+
+/* Find routines; CFStringFindWithOptions() returns the found range in the CFRange * argument; You can pass NULL for simple discovery check.
+ CFStringCreateArrayWithFindResults() returns an array of CFRange pointers, or NULL if there are no matches.
+*/
+EXTERN_API_C( Boolean )
+CFStringFindWithOptions (CFStringRef theString,
+ CFStringRef stringToFind,
+ CFRange rangeToSearch,
+ CFOptionFlags searchOptions,
+ CFRange * result);
+
+EXTERN_API_C( CFArrayRef )
+CFStringCreateArrayWithFindResults (CFAllocatorRef alloc,
+ CFStringRef theString,
+ CFStringRef stringToFind,
+ CFRange rangeToSearch,
+ CFOptionFlags compareOptions);
+
+/* Find conveniences
+*/
+EXTERN_API_C( CFRange )
+CFStringFind (CFStringRef theString,
+ CFStringRef stringToFind,
+ CFOptionFlags compareOptions);
+
+EXTERN_API_C( Boolean )
+CFStringHasPrefix (CFStringRef theString,
+ CFStringRef prefix);
+
+EXTERN_API_C( Boolean )
+CFStringHasSuffix (CFStringRef theString,
+ CFStringRef suffix);
+
+/* Find range of bounds of the line(s) that span the indicated range (startIndex, numChars),
+ taking into account various possible line separator sequences (CR, CRLF, LF, and Unicode LS, PS).
+ All return values are "optional" (provide NULL if you don't want them)
+ lineStartIndex: index of first character in line
+ lineEndIndex: index of first character of the next line (including terminating line separator characters)
+ contentsEndIndex: index of the first line separator character
+ Thus, lineEndIndex - lineStartIndex is the number of chars in the line, including the line separators
+ contentsEndIndex - lineStartIndex is the number of chars in the line w/out the line separators
+*/
+EXTERN_API_C( void )
+CFStringGetLineBounds (CFStringRef theString,
+ CFRange range,
+ CFIndex * lineBeginIndex,
+ CFIndex * lineEndIndex,
+ CFIndex * contentsEndIndex);
+
+/*** Exploding and joining strings with a separator string ***/
+
+EXTERN_API_C( CFStringRef )
+CFStringCreateByCombiningStrings (CFAllocatorRef alloc,
+ CFArrayRef theArray,
+ CFStringRef separatorString);
+
+/* Empty array returns empty string; one element array returns the element */
+EXTERN_API_C( CFArrayRef )
+CFStringCreateArrayBySeparatingStrings (CFAllocatorRef alloc,
+ CFStringRef theString,
+ CFStringRef separatorString);
+
+/* No separators in the string returns array with that string; string == sep returns two empty strings */
+/*** Parsing non-localized numbers from strings ***/
+
+EXTERN_API_C( SInt32 )
+CFStringGetIntValue (CFStringRef str);
+
+/* Skips whitespace; returns 0 on error, MAX or -MAX on overflow */
+EXTERN_API_C( double )
+CFStringGetDoubleValue (CFStringRef str);
+
+/* Skips whitespace; returns 0.0 on error */
+/*** MutableString functions ***/
+/* CFStringAppend("abcdef", "xxxxx") -> "abcdefxxxxx"
+ CFStringDelete("abcdef", 2, 3) -> "abf"
+ CFStringReplace("abcdef", 2, 3, "xxxxx") -> "abxxxxxf"
+ CFStringReplaceAll("abcdef", "xxxxx") -> "xxxxx"
+*/
+EXTERN_API_C( void )
+CFStringAppend (CFMutableStringRef theString,
+ CFStringRef appendedString);
+
+EXTERN_API_C( void )
+CFStringAppendCharacters (CFMutableStringRef theString,
+ const UniChar * chars,
+ CFIndex numChars);
+
+EXTERN_API_C( void )
+CFStringAppendPascalString (CFMutableStringRef theString,
+ ConstStringPtr pStr,
+ CFStringEncoding encoding);
+
+EXTERN_API_C( void )
+CFStringAppendCString (CFMutableStringRef theString,
+ const char * cStr,
+ CFStringEncoding encoding);
+
+EXTERN_API_C( void )
+CFStringAppendFormat (CFMutableStringRef theString,
+ CFDictionaryRef formatOptions,
+ CFStringRef format,
+ ...);
+
+EXTERN_API_C( void )
+CFStringAppendFormatAndArguments (CFMutableStringRef theString,
+ CFDictionaryRef formatOptions,
+ CFStringRef format,
+ va_list arguments);
+
+EXTERN_API_C( void )
+CFStringInsert (CFMutableStringRef str,
+ CFIndex idx,
+ CFStringRef insertedStr);
+
+EXTERN_API_C( void )
+CFStringDelete (CFMutableStringRef theString,
+ CFRange range);
+
+EXTERN_API_C( void )
+CFStringReplace (CFMutableStringRef theString,
+ CFRange range,
+ CFStringRef replacement);
+
+EXTERN_API_C( void )
+CFStringReplaceAll (CFMutableStringRef theString,
+ CFStringRef replacement);
+
+/* Replaces whole string */
+/* This function will make the contents of a mutable CFString point directly at the specified UniChar array.
+it works only with CFStrings created with CFStringCreateMutableWithExternalCharactersNoCopy().
+This function does not free the previous buffer.
+The string will be manipulated within the provided buffer (if any) until it outgrows capacity; then the
+externalCharactersAllocator will be consulted for more memory.
+See comments at the top of this file for more info.
+*/
+EXTERN_API_C( void )
+CFStringSetExternalCharactersNoCopy (CFMutableStringRef theString,
+ UniChar * chars,
+ CFIndex length,
+ CFIndex capacity);
+
+/* Works only on specially created mutable strings! */
+
+/* CFStringPad() will pad or cut down a string to the specified size.
+ The pad string is used as the fill string; indexIntoPad specifies which character to start with.
+ CFStringPad("abc", " ", 9, 0) -> "abc "
+ CFStringPad("abc", ". ", 9, 1) -> "abc . . ."
+ CFStringPad("abcdef", ?, 3, ?) -> "abc"
+
+ CFStringTrim() will trim the specified string from both ends of the string.
+ CFStringTrimWhitespace() will do the same with white space characters (tab, newline, etc)
+ CFStringTrim(" abc ", " ") -> "abc"
+ CFStringTrim("* * * *abc * ", "* ") -> "*abc "
+*/
+EXTERN_API_C( void )
+CFStringPad (CFMutableStringRef theString,
+ CFStringRef padString,
+ CFIndex length,
+ CFIndex indexIntoPad);
+
+EXTERN_API_C( void )
+CFStringTrim (CFMutableStringRef theString,
+ CFStringRef trimString);
+
+EXTERN_API_C( void )
+CFStringTrimWhitespace (CFMutableStringRef theString);
+
+
+EXTERN_API_C( void )
+CFStringLowercase (CFMutableStringRef theString,
+ const void * localeTBD);
+
+EXTERN_API_C( void )
+CFStringUppercase (CFMutableStringRef theString,
+ const void * localeTBD);
+
+EXTERN_API_C( void )
+CFStringCapitalize (CFMutableStringRef theString,
+ const void * localeTBD);
+
+
+/* This returns availability of the encoding on the system
+*/
+EXTERN_API_C( Boolean )
+CFStringIsEncodingAvailable (CFStringEncoding encoding);
+
+/* This function returns list of available encodings. The returned list is terminated with kCFStringEncodingInvalidId and owned by the system.
+*/
+EXTERN_API_C( const CFStringEncoding *)
+CFStringGetListOfAvailableEncodings (void);
+
+/* Returns name of the encoding
+*/
+EXTERN_API_C( CFStringRef )
+CFStringGetNameOfEncoding (CFStringEncoding encoding);
+
+/* ID mapping functions from/to YellowBox NSStringEncoding. Returns kCFStringEncodingInvalidId if no mapping exists.
+*/
+EXTERN_API_C( UInt32 )
+CFStringConvertEncodingToNSStringEncoding (CFStringEncoding encoding);
+
+EXTERN_API_C( CFStringEncoding )
+CFStringConvertNSStringEncodingToEncoding (UInt32 encoding);
+
+/* ID mapping functions from/to Microsoft Windows codepage (covers both OEM & ANSI). Returns kCFStringEncodingInvalidId if no mapping exists.
+*/
+EXTERN_API_C( UInt32 )
+CFStringConvertEncodingToWindowsCodepage (CFStringEncoding encoding);
+
+EXTERN_API_C( CFStringEncoding )
+CFStringConvertWindowsCodepageToEncoding (UInt32 codepage);
+
+/* ID mapping functions from/to IANA registery charset names. Returns kCFStringEncodingInvalidId if no mapping exists.
+*/
+EXTERN_API_C( CFStringEncoding )
+CFStringConvertIANACharSetNameToEncoding (CFStringRef theString);
+
+EXTERN_API_C( CFStringRef )
+CFStringConvertEncodingToIANACharSetName (CFStringEncoding encoding);
+
+
+/* The next two functions allow "fast" access to the contents of a string,
+ assuming you are doing sequential or localized accesses. To use, call
+ CFStringInitInlineBuffer() with a CFStringInlineBuffer (on the stack, say),
+ and a range in the string to look at. Then call CFStringGetCharacterFromInlineBuffer()
+ as many times as you want, with a index into that range (relative to the start
+ of that range). These are INLINE functions and will end up calling CFString only
+ once in a while, to fill a buffer.
+*/
+#define __kCFStringInlineBufferLength 64
+typedef struct {
+ UniChar buffer[__kCFStringInlineBufferLength];
+ CFStringRef theString;
+ const UniChar *directBuffer;
+ CFRange rangeToBuffer; /* Range in string to buffer */
+ CFIndex bufferedRangeStart; /* Start of range currently buffered (relative to rangeToBuffer.location) */
+ CFIndex bufferedRangeEnd; /* bufferedRangeStart + number of chars actually buffered */
+} CFStringInlineBuffer;
+
+#if defined(CF_INLINE)
+CF_INLINE void CFStringInitInlineBuffer(CFStringRef str, CFStringInlineBuffer *buf, CFRange range) {
+ buf->theString = str;
+ buf->rangeToBuffer = range;
+ buf->directBuffer = CFStringGetCharactersPtr(str);
+ buf->bufferedRangeStart = buf->bufferedRangeEnd = 0;
+}
+
+
+CF_INLINE UniChar CFStringGetCharacterFromInlineBuffer(CFStringInlineBuffer *buf, CFIndex idx) {
+ if (buf->directBuffer) return buf->directBuffer[idx + buf->rangeToBuffer.location];
+ if (idx >= buf->bufferedRangeEnd || idx < buf->bufferedRangeStart) {
+ if (idx < 0 || idx > buf->rangeToBuffer.length) return 0;
+ if ((buf->bufferedRangeStart = idx - 4) < 0) buf->bufferedRangeStart = 0;
+ buf->bufferedRangeEnd = buf->bufferedRangeStart + __kCFStringInlineBufferLength;
+ if (buf->bufferedRangeEnd > buf->rangeToBuffer.length) buf->bufferedRangeEnd = buf->rangeToBuffer.length;
+ CFStringGetCharacters(buf->theString, CFRangeMake(buf->rangeToBuffer.location + buf->bufferedRangeStart, buf->bufferedRangeEnd - buf->bufferedRangeStart), buf->buffer);
+ }
+ return buf->buffer[idx - buf->bufferedRangeStart];
+}
+
+#else
+/* If INLINE functions are not available, we do somewhat less powerful macros that work similarly (except be aware that the buf argument ise evaluated multiple times).
+*/
+#define CFStringInitInlineBuffer(str, buf, range) \
+ {(buf)->theString = str; (buf)->rangeToBuffer = range; (buf)->directBuffer = CFStringGetCharactersPtr(str);}
+
+#define CFStringGetCharacterFromInlineBuffer(buf, idx) \
+ ((buf)->directBuffer ? (buf)->directBuffer[(idx) + (buf)->rangeToBuffer.location] : CFStringGetCharacterAtIndex((buf)->theString, (idx) + (buf)->rangeToBuffer.location))
+
+#endif /* CF_INLINE */
+
+/* Rest of the stuff in this file is private and should not be used directly
+*/
+/* For debugging only
+ Use CFShow() to printf the description of any CFType;
+ Use CFShowStr() to printf detailed info about a CFString
+*/
+EXTERN_API_C( void )
+CFShow (CFTypeRef obj);
+
+EXTERN_API_C( void )
+CFShowStr (CFStringRef str);
+
+/* This function is private and should not be used directly
+*/
+EXTERN_API_C( CFStringRef )
+__CFStringMakeConstantString (const char * cStr);
+
+/* Private; do not use */
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CFSTRING__ */
+
diff --git a/include/qt/CFStringEncodingExt.h b/include/qt/CFStringEncodingExt.h
new file mode 100644
index 000000000..41cea394d
--- /dev/null
+++ b/include/qt/CFStringEncodingExt.h
@@ -0,0 +1,197 @@
+/*
+ File: CFStringEncodingExt.h
+
+ Contains: CoreFoundation string encodings
+
+ Version: Technology: Mac OS X
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1999-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CFSTRINGENCODINGEXT__
+#define __CFSTRINGENCODINGEXT__
+
+#ifndef __CFBASE__
+#include "CFBase.h"
+#endif
+
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ /* kCFStringEncodingMacRoman = 0L, */
+ kCFStringEncodingMacJapanese = 1,
+ kCFStringEncodingMacChineseTrad = 2,
+ kCFStringEncodingMacKorean = 3,
+ kCFStringEncodingMacArabic = 4,
+ kCFStringEncodingMacHebrew = 5,
+ kCFStringEncodingMacGreek = 6,
+ kCFStringEncodingMacCyrillic = 7,
+ kCFStringEncodingMacDevanagari = 9,
+ kCFStringEncodingMacGurmukhi = 10,
+ kCFStringEncodingMacGujarati = 11,
+ kCFStringEncodingMacOriya = 12,
+ kCFStringEncodingMacBengali = 13,
+ kCFStringEncodingMacTamil = 14,
+ kCFStringEncodingMacTelugu = 15,
+ kCFStringEncodingMacKannada = 16,
+ kCFStringEncodingMacMalayalam = 17,
+ kCFStringEncodingMacSinhalese = 18,
+ kCFStringEncodingMacBurmese = 19,
+ kCFStringEncodingMacKhmer = 20,
+ kCFStringEncodingMacThai = 21,
+ kCFStringEncodingMacLaotian = 22,
+ kCFStringEncodingMacGeorgian = 23,
+ kCFStringEncodingMacArmenian = 24,
+ kCFStringEncodingMacChineseSimp = 25,
+ kCFStringEncodingMacTibetan = 26,
+ kCFStringEncodingMacMongolian = 27,
+ kCFStringEncodingMacEthiopic = 28,
+ kCFStringEncodingMacCentralEurRoman = 29,
+ kCFStringEncodingMacVietnamese = 30,
+ kCFStringEncodingMacExtArabic = 31, /* The following use script code 0, smRoman*/
+ kCFStringEncodingMacSymbol = 33,
+ kCFStringEncodingMacDingbats = 34,
+ kCFStringEncodingMacTurkish = 35,
+ kCFStringEncodingMacCroatian = 36,
+ kCFStringEncodingMacIcelandic = 37,
+ kCFStringEncodingMacRomanian = 38, /* The following use script code 4, smArabic*/
+ kCFStringEncodingMacFarsi = 0x8C, /* Like MacArabic but uses Farsi digits*/
+ /* The following use script code 7, smCyrillic*/
+ kCFStringEncodingMacUkrainian = 0x98, /* The following use script code 32, smUnimplemented*/
+ kCFStringEncodingMacVT100 = 0xFC, /* VT100/102 font from Comm Toolbox: Latin-1 repertoire + box drawing etc*/
+ /* Special Mac OS encodings*/
+ kCFStringEncodingMacHFS = 0xFF, /* Meta-value, should never appear in a table.*/
+ /* Unicode & ISO UCS encodings begin at 0x100*/
+ /* We don't use Unicode variations defined in TextEncoding. Use ones in CFString.h, instead */
+ /* ISO 8-bit and 7-bit encodings begin at 0x200*/
+ /* kCFStringEncodingISOLatin1 = 0x0201, */
+ kCFStringEncodingISOLatin2 = 0x0202, /* ISO 8859-2*/
+ kCFStringEncodingISOLatinCyrillic = 0x0205, /* ISO 8859-5*/
+ kCFStringEncodingISOLatinArabic = 0x0206, /* ISO 8859-6, = ASMO 708, =DOS CP 708*/
+ kCFStringEncodingISOLatinGreek = 0x0207, /* ISO 8859-7*/
+ kCFStringEncodingISOLatinHebrew = 0x0208, /* ISO 8859-8*/
+ kCFStringEncodingISOLatin5 = 0x0209, /* ISO 8859-9*/
+ kCFStringEncodingISOLatin6 = 0x020A, /* ISO 8859-10 */
+ kCFStringEncodingISOLatinThai = 0x020B, /* ISO 8859-11 */
+ kCFStringEncodingISOLatin7 = 0x020D, /* ISO 8859-13 */
+ kCFStringEncodingISOLatin8 = 0x020E, /* ISO 8859-14 */
+ kCFStringEncodingISOLatin9 = 0x020F, /* ISO 8859-15 */
+ /* MS-DOS & Windows encodings begin at 0x400*/
+ kCFStringEncodingDOSLatinUS = 0x0400, /* code page 437*/
+ kCFStringEncodingDOSGreek = 0x0405, /* code page 737 (formerly code page 437G)*/
+ kCFStringEncodingDOSBalticRim = 0x0406, /* code page 775*/
+ kCFStringEncodingDOSLatin1 = 0x0410, /* code page 850, "Multilingual"*/
+ kCFStringEncodingDOSGreek1 = 0x0411, /* code page 851*/
+ kCFStringEncodingDOSLatin2 = 0x0412, /* code page 852, Slavic*/
+ kCFStringEncodingDOSCyrillic = 0x0413, /* code page 855, IBM Cyrillic*/
+ kCFStringEncodingDOSTurkish = 0x0414, /* code page 857, IBM Turkish*/
+ kCFStringEncodingDOSPortuguese = 0x0415, /* code page 860*/
+ kCFStringEncodingDOSIcelandic = 0x0416, /* code page 861*/
+ kCFStringEncodingDOSHebrew = 0x0417, /* code page 862*/
+ kCFStringEncodingDOSCanadianFrench = 0x0418, /* code page 863*/
+ kCFStringEncodingDOSArabic = 0x0419, /* code page 864*/
+ kCFStringEncodingDOSNordic = 0x041A, /* code page 865*/
+ kCFStringEncodingDOSRussian = 0x041B, /* code page 866*/
+ kCFStringEncodingDOSGreek2 = 0x041C, /* code page 869, IBM Modern Greek*/
+ kCFStringEncodingDOSThai = 0x041D, /* code page 874, also for Windows*/
+ kCFStringEncodingDOSJapanese = 0x0420, /* code page 932, also for Windows*/
+ kCFStringEncodingDOSChineseSimplif = 0x0421, /* code page 936, also for Windows*/
+ kCFStringEncodingDOSKorean = 0x0422, /* code page 949, also for Windows; Unified Hangul Code*/
+ kCFStringEncodingDOSChineseTrad = 0x0423, /* code page 950, also for Windows*/
+ /* kCFStringEncodingWindowsLatin1 = 0x0500, */
+ kCFStringEncodingWindowsLatin2 = 0x0501, /* code page 1250, Central Europe*/
+ kCFStringEncodingWindowsCyrillic = 0x0502, /* code page 1251, Slavic Cyrillic*/
+ kCFStringEncodingWindowsGreek = 0x0503, /* code page 1253*/
+ kCFStringEncodingWindowsLatin5 = 0x0504, /* code page 1254, Turkish*/
+ kCFStringEncodingWindowsHebrew = 0x0505, /* code page 1255*/
+ kCFStringEncodingWindowsArabic = 0x0506, /* code page 1256*/
+ kCFStringEncodingWindowsBalticRim = 0x0507, /* code page 1257*/
+ kCFStringEncodingWindowsKoreanJohab = 0x0510, /* code page 1361, for Windows NT*/
+ kCFStringEncodingWindowsVietnamese = 0x0508, /* code page 1258*/
+ /* Various national standards begin at 0x600*/
+ /* kCFStringEncodingASCII = 0x0600, */
+ kCFStringEncodingJIS_X0201_76 = 0x0620,
+ kCFStringEncodingJIS_X0208_83 = 0x0621,
+ kCFStringEncodingJIS_X0208_90 = 0x0622,
+ kCFStringEncodingJIS_X0212_90 = 0x0623,
+ kCFStringEncodingJIS_C6226_78 = 0x0624,
+ kCFStringEncodingGB_2312_80 = 0x0630,
+ kCFStringEncodingGBK_95 = 0x0631, /* annex to GB 13000-93; for Windows 95*/
+ kCFStringEncodingKSC_5601_87 = 0x0640, /* same as KSC 5601-92 without Johab annex*/
+ kCFStringEncodingKSC_5601_92_Johab = 0x0641, /* KSC 5601-92 Johab annex*/
+ kCFStringEncodingCNS_11643_92_P1 = 0x0651, /* CNS 11643-1992 plane 1*/
+ kCFStringEncodingCNS_11643_92_P2 = 0x0652, /* CNS 11643-1992 plane 2*/
+ kCFStringEncodingCNS_11643_92_P3 = 0x0653, /* CNS 11643-1992 plane 3 (was plane 14 in 1986 version)*/
+ /* ISO 2022 collections begin at 0x800*/
+ kCFStringEncodingISO_2022_JP = 0x0820,
+ kCFStringEncodingISO_2022_JP_2 = 0x0821,
+ kCFStringEncodingISO_2022_CN = 0x0830,
+ kCFStringEncodingISO_2022_CN_EXT = 0x0831,
+ kCFStringEncodingISO_2022_KR = 0x0840, /* EUC collections begin at 0x900*/
+ kCFStringEncodingEUC_JP = 0x0920, /* ISO 646, 1-byte katakana, JIS 208, JIS 212*/
+ kCFStringEncodingEUC_CN = 0x0930, /* ISO 646, GB 2312-80*/
+ kCFStringEncodingEUC_TW = 0x0931, /* ISO 646, CNS 11643-1992 Planes 1-16*/
+ kCFStringEncodingEUC_KR = 0x0940, /* ISO 646, KS C 5601-1987*/
+ /* Misc standards begin at 0xA00*/
+ kCFStringEncodingShiftJIS = 0x0A01, /* plain Shift-JIS*/
+ kCFStringEncodingKOI8_R = 0x0A02, /* Russian internet standard*/
+ kCFStringEncodingBig5 = 0x0A03, /* Big-5 (has variants)*/
+ kCFStringEncodingMacRomanLatin1 = 0x0A04, /* Mac OS Roman permuted to align with ISO Latin-1*/
+ kCFStringEncodingHZ_GB_2312 = 0x0A05, /* HZ (RFC 1842, for Chinese mail & news)*/
+ kCFStringEncodingAutoDetect_JP = 0x0AFE, /* Auto Detect (Japanese) */
+ /* Other platform encodings*/
+ /* kCFStringEncodingNextStepLatin = 0x0B01, */
+ /* EBCDIC & IBM host encodings begin at 0xC00*/
+ kCFStringEncodingEBCDIC_US = 0x0C01, /* basic EBCDIC-US*/
+ kCFStringEncodingEBCDIC_CP037 = 0x0C02 /* code page 037, extended EBCDIC (Latin-1 set) for US,Canada...*/
+};
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CFSTRINGENCODINGEXT__ */
+
diff --git a/include/qt/CFTimeZone.h b/include/qt/CFTimeZone.h
new file mode 100644
index 000000000..8d101bdb3
--- /dev/null
+++ b/include/qt/CFTimeZone.h
@@ -0,0 +1,90 @@
+/*
+ File: CFTimeZone.h
+
+ Contains: CoreFoundation time zone
+
+ Version: Technology: Mac OS X
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1999-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CFTIMEZONE__
+#define __CFTIMEZONE__
+
+#ifndef __CFBASE__
+#include "CFBase.h"
+#endif
+
+#ifndef __CFARRAY__
+#include "CFArray.h"
+#endif
+
+#ifndef __CFDATA__
+#include "CFData.h"
+#endif
+
+#ifndef __CFDATE__
+#include "CFDate.h"
+#endif
+
+#ifndef __CFDICTIONARY__
+#include "CFDictionary.h"
+#endif
+
+#ifndef __CFSTRING__
+#include "CFString.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*
+ CFTimeZoneRef is defined in CFDate.h
+*/
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CFTIMEZONE__ */
+
diff --git a/include/qt/CFURL.h b/include/qt/CFURL.h
new file mode 100644
index 000000000..541f89b22
--- /dev/null
+++ b/include/qt/CFURL.h
@@ -0,0 +1,280 @@
+/*
+ File: CFURL.h
+
+ Contains: CoreFoundation urls
+
+ Version: Technology: Mac OS X
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1999-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CFURL__
+#define __CFURL__
+
+#ifndef __CFBASE__
+#include "CFBase.h"
+#endif
+
+#ifndef __CFDATA__
+#include "CFData.h"
+#endif
+
+#ifndef __CFSTRING__
+#include "CFString.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __CFURL__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __CFURL__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+typedef UInt32 CFURLPathStyle;
+enum {
+ kCFURLPOSIXPathStyle = 0,
+ kCFURLHFSPathStyle = 1,
+ kCFURLWindowsPathStyle = 2
+};
+
+typedef struct __CFURL * CFURLRef;
+EXTERN_API_C( CFTypeID )
+CFURLGetTypeID (void);
+
+/* encoding will be used both to interpret the bytes of URLBytes, and to */
+/* interpret any percent-escapes within the bytes. */
+EXTERN_API_C( CFURLRef )
+CFURLCreateWithBytes (CFAllocatorRef allocator,
+ const UInt8 * URLBytes,
+ CFIndex length,
+ CFStringEncoding encoding,
+ CFURLRef baseURL);
+
+/* Escapes any character that is not 7-bit ASCII with the byte-code */
+/* for the given encoding. If escapeWhitespace is true, whitespace */
+/* characters (' ', '\t', '\r', '\n') will be escaped also (desirable */
+/* if embedding the URL into a larger text stream like HTML) */
+EXTERN_API_C( CFDataRef )
+CFURLCreateData (CFAllocatorRef allocator,
+ CFURLRef url,
+ CFStringEncoding encoding,
+ Boolean escapeWhitespace);
+
+/* Any escape sequences in URLString will be interpreted via UTF-8. */
+EXTERN_API_C( CFURLRef )
+CFURLCreateWithString (CFAllocatorRef allocator,
+ CFStringRef URLString,
+ CFURLRef baseURL);
+
+/* filePath should be the URL's path expressed as a path of the type */
+/* fsType. If filePath is not absolute, the resulting URL will be */
+/* considered relative to the current working directory (evaluated */
+/* at creation time). isDirectory determines whether filePath is */
+/* treated as a directory path when resolving against relative path */
+/* components */
+EXTERN_API_C( CFURLRef )
+CFURLCreateWithFileSystemPath (CFAllocatorRef allocator,
+ CFStringRef filePath,
+ CFURLPathStyle pathStyle,
+ Boolean isDirectory);
+
+/* Returns the URL's path in a form suitable for file system use. */
+/* The path has been fully processed for the file system type requested */
+/* by fsType. If resolveAgainstBase is TRUE, then the URL's path is first */
+/* resolved against that of its base URL (if a base URL exists) before being returned. */
+EXTERN_API_C( CFStringRef )
+CFURLCreateStringWithFileSystemPath (CFAllocatorRef allocator,
+ CFURLRef anURL,
+ CFURLPathStyle pathStyle,
+ Boolean resolveAgainstBase);
+
+/* Creates a new URL by resolving the relative portion of relativeURL against its base. */
+EXTERN_API_C( CFURLRef )
+CFURLCopyAbsoluteURL (CFURLRef relativeURL);
+
+/* Returns the URL's string. */
+EXTERN_API_C( CFStringRef )
+CFURLGetString (CFURLRef anURL);
+
+/* Returns the base URL if it exists */
+EXTERN_API_C( CFURLRef )
+CFURLGetBaseURL (CFURLRef anURL);
+
+/* All URLs can be broken into two pieces - the scheme (preceding the first colon) and the resource */
+/* specifier (following the first colon). Most URLs are also "standard" URLs conforming to RFC 1808 */
+/* (available from www.w3c.org). This category includes URLs of the file, http, https, and ftp */
+/* schemes, to name a few. Standard URLs start the resource specifier with two slashes ("//"), and */
+/* can be broken into 4 distinct pieces - the scheme, the net location, the path, and further */
+/* resource specifiers (typically an optional parameter, query, and/or fragment). The net location */
+/* appears immediately following the two slashes and goes up to the next slash; it's format is */
+/* scheme-specific, but is usually composed of some or all of a username, password, host name, and */
+/* port. The path is a series of path components separated by slashes; if the net location is */
+/* present, the path always begins with a slash. Standard URLs can be relative to another URL, in */
+/* which case at least the scheme and possibly other pieces as well come from the base URL (see RFC */
+/* 1808 for precise details when resolving a relative URL against its base). The full URL is therefore */
+/* <scheme> "://" <net location> <path, always starting with a slash> <additional resource specifiers> */
+/* If a given CFURL can be decomposed (that is, conforms to RFC 1808), you can ask for each of the four */
+/* basic pieces (scheme, net location, path, and resource specifer) separately, as well as for its base */
+/* URL. The basic pieces are returned with any percent escape sequences still in place (although note */
+/* that the scheme may not legally include any percent escapes); this is to allow the caller to distinguish */
+/* between percent sequences that may have syntactic meaning if replaced by the character being escaped */
+/* (for instance, a '/' in a path component). Since only the individual schemes know which characters */
+/* are syntactically significant, CFURL cannot safely replace any percent escape sequences. However, */
+/* you can use CFStringCreateReplacingPercentEscapes() to create a new string with the percent escapes */
+/* removed. The first argument is the original string containing percent escapes; the second argument */
+/* is a string containing any characters that, if escaped in the original string, should NOT be replaced. */
+/* Note that this function may return the original string (retained) if the original string contains no */
+/* escape sequences to be processed. */
+/* If a given CFURL can not be decomposed, you can ask for its scheme and its resource specifier; asking */
+/* it for its net location or path will return NULL. */
+/* All of the methods discussed above do not require an autorelease pool to be in place. */
+/* To get more refined information about the components of a decomposable CFURL, you may ask for more */
+/* specific pieces of the URL, expressed with the percent escapes removed. These functions require an */
+/* autorelease pool to be in place, as they will return an autoreleased CFString. They are */
+/* CFURLHostName(), CFURLPortNumber() (actually returns an Int32; does not use the autorelease pool), */
+/* CFURLUserName(), CFURLPassword(), CFURLQuery(), CFURLParameters(), and CFURLFragment(). Because the */
+/* parameters, query, and fragment of an URL may contain scheme-specific syntaxes, these methods take a */
+/* second argument, giving a list of characters which should NOT be replaced if percent escaped. For */
+/* instance, the ftp parameter syntax gives simple key-value pairs as "<key>=<value>;" Clearly if a key */
+/* or value includes either '=' or ';', it must be escaped to avoid corrupting the meaning of the */
+/* parameters, so the caller may request the parameter string as */
+/* CFStringRef myParams = CFURLParameters(ftpURL, CFSTR("=;%")); */
+/* requesting that all percent escape sequences be replaced by the represented characters, except for escaped */
+/* '=', '%' or ';' characters. If you are not interested in any escape sequences being left in, pass NULL for the */
+/* second argument. */
+/* Returns TRUE if anURL conforms to RFC 1808 */
+EXTERN_API_C( Boolean )
+CFURLCanBeDecomposed (CFURLRef anURL);
+
+/* The next several methods leave any percent escape sequences intact */
+EXTERN_API_C( CFStringRef )
+CFURLCopyScheme (CFURLRef anURL);
+
+/* NULL if CFURLCanBeDecomposed(anURL) is FALSE */
+EXTERN_API_C( CFStringRef )
+CFURLCopyNetLocation (CFURLRef anURL);
+
+/* NULL if CFURLCanBeDecomposed(anURL) is FALSE; also does not resolve */
+/* the URL against its base. See also CFCreateAbsoluteURL() and */
+/* CFStringCreateFileSystemPathFromURL() */
+EXTERN_API_C( CFStringRef )
+CFURLCopyPath (CFURLRef anURL);
+
+/* Returns whether anURL's path represents a directory */
+/* (TRUE returned) or a simple file (FALSE returned) */
+EXTERN_API_C( Boolean )
+CFURLHasDirectoryPath (CFURLRef anURL);
+
+/* Any additional resource specifiers after the path. For URLs */
+/* that cannot be decomposed, this is everything except the scheme itself. */
+EXTERN_API_C( CFStringRef )
+CFURLCopyResourceSpecifier (CFURLRef anURL);
+
+EXTERN_API_C( CFStringRef )
+CFURLCopyHostName (CFURLRef anURL);
+
+EXTERN_API_C( SInt32 )
+CFURLGetPortNumber (CFURLRef anURL);
+
+/* Returns -1 if no port number is specified */
+EXTERN_API_C( CFStringRef )
+CFURLCopyUserName (CFURLRef anURL);
+
+EXTERN_API_C( CFStringRef )
+CFURLCopyPassword (CFURLRef anURL);
+
+/* These remove all percent escape sequences except those for */
+/* characters in charactersToLeaveEscaped. If charactersToLeaveEscaped */
+/* is empty (""), all percent escape sequences are replaced by their */
+/* corresponding characters. If charactersToLeaveEscaped is NULL, */
+/* then no escape sequences are removed at all */
+EXTERN_API_C( CFStringRef )
+CFURLCopyParameterString (CFURLRef anURL,
+ CFStringRef charactersToLeaveEscaped);
+
+EXTERN_API_C( CFStringRef )
+CFURLCopyQueryString (CFURLRef anURL,
+ CFStringRef charactersToLeaveEscaped);
+
+EXTERN_API_C( CFStringRef )
+CFURLCopyFragment (CFURLRef anURL,
+ CFStringRef charactersToLeaveEscaped);
+
+/* Returns a string with any percent escape sequences that do NOT */
+/* correspond to characters in charactersToLeaveEscaped with their */
+/* equivalent. Returns NULL on failure (if an invalid percent sequence */
+/* is encountered), or the original string itself if no characters need to be replaced. */
+EXTERN_API_C( CFStringRef )
+CFURLCreateStringByReplacingPercentEscapes (CFAllocatorRef allocator,
+ CFStringRef originalString,
+ CFStringRef charactersToLeaveEscaped);
+
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __CFURL__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__CFURL__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CFURL__ */
+
diff --git a/include/qt/CFURLAccess.h b/include/qt/CFURLAccess.h
new file mode 100644
index 000000000..dde2a61bb
--- /dev/null
+++ b/include/qt/CFURLAccess.h
@@ -0,0 +1,207 @@
+/*
+ File: CFURLAccess.h
+
+ Contains: CoreFoundation url access
+
+ Version: Technology: Mac OS X
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1999-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CFURLACCESS__
+#define __CFURLACCESS__
+
+#ifndef __CFURL__
+#include "CFURL.h"
+#endif
+
+#ifndef __CFARRAY__
+#include "CFArray.h"
+#endif
+
+#ifndef __CFDATA__
+#include "CFData.h"
+#endif
+
+#ifndef __CFDICTIONARY__
+#include "CFDictionary.h"
+#endif
+
+#ifndef __CFSTRING__
+#include "CFString.h"
+#endif
+
+
+/* Fills buffer with the file system's native representation of url's */
+/* path. No more than bufLen bytes are written to buffer. If resolveAgainstBase */
+/* is true, the url's relative portion is resolved against its base before */
+/* the path is computed. usedBufLen is set to the number of bytes actually */
+/* written; returns success or failure. */
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __CFURLACCESS__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __CFURLACCESS__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+EXTERN_API_C( Boolean )
+CFURLGetFileSystemRepresentation (CFURLRef url,
+ Boolean resolveAgainstBase,
+ char * buffer,
+ CFIndex bufLen);
+
+EXTERN_API_C( CFURLRef )
+CFURLCreateFromFileSystemRepresentation (CFAllocatorRef allocator,
+ const char * buffer,
+ CFIndex bufLen,
+ Boolean isDirectory);
+
+/* Attempts to read the data and properties for the given URL. */
+/* If only interested in one of the resourceData and properties, pass */
+/* NULL for the other. If properties is non-NULL and desiredProperties */
+/* is NULL, then all properties are fetched. Returns success or failure; */
+/* note that as much work as possible is done even if FALSE is returned. */
+/* So for instance if one property is not available, the others are fetched */
+/* anyway. errorCode is set to 0 on success, and some other value on failure. */
+/* If non-NULL, it is the caller 's responsibility to release resourceData */
+/* and properties. */
+/* Apple reserves for its use all negative error code values; these values */
+/* represent errors common to any scheme. Scheme-specific error codes */
+/* should be positive, non-zero, and should be used only if one of the */
+/* predefined Apple error codes does not apply. Error codes should be */
+/* publicized and documented with the scheme-specific properties. */
+EXTERN_API_C( Boolean )
+CFURLCreateDataAndPropertiesFromResource (CFAllocatorRef alloc,
+ CFURLRef url,
+ CFDataRef * resourceData,
+ CFDictionaryRef * properties,
+ CFArrayRef desiredProperties,
+ SInt32 * errorCode);
+
+/* Attempts to write the given data and properties to the given URL. */
+/* If dataToWrite is NULL, only properties are written out (use */
+/* CFURLDestroyResource() to delete a resource). Properties not present */
+/* in propertiesToWrite are left unchanged, hence if propertiesToWrite */
+/* is NULL or empty, the URL's properties are not changed at all. */
+/* Returns success or failure; errorCode is set as for */
+/* CFURLCreateDataAndPropertiesFromResource(), above. */
+EXTERN_API_C( Boolean )
+CFURLWriteDataAndPropertiesToResource (CFURLRef url,
+ CFDataRef dataToWrite,
+ CFDictionaryRef propertiesToWrite,
+ SInt32 * errorCode);
+
+/* Destroys the resource indicated by url. */
+/* Returns success or failure; errorCode set as above. */
+EXTERN_API_C( Boolean )
+CFURLDestroyResource (CFURLRef url,
+ SInt32 * errorCode);
+
+/* Convenience method which calls through to CFURLCreateDataAndPropertiesFromResource(). */
+/* Returns NULL on error and sets errorCode accordingly. */
+EXTERN_API_C( CFTypeRef )
+CFURLCreatePropertyFromResource (CFAllocatorRef alloc,
+ CFURLRef url,
+ CFStringRef property,
+ SInt32 * errorCode);
+
+/* Common error codes; this list is expected to grow */
+enum {
+ kCFURLUnknownError = -10,
+ kCFURLUnknownSchemeError = -11,
+ kCFURLResourceNotFoundError = -12,
+ kCFURLResourceAccessViolationError = -13,
+ kCFURLRemoteHostUnavailableError = -14,
+ kCFURLImproperArgumentsError = -15,
+ kCFURLUnknownPropertyKeyError = -16,
+ kCFURLPropertyKeyUnavailableError = -17,
+ kCFURLTimeoutError = -18
+};
+
+/* Properties and error codes for the file: scheme. These are ad hoc and expected to change */
+extern const CFStringRef kCFFileURLExists;
+extern const CFStringRef kCFFileURLPOSIXMode;
+extern const CFStringRef kCFFileURLDirectoryContents;
+extern const CFStringRef kCFFileURLSize;
+extern const CFStringRef kCFFileURLLastModificationTime;
+extern const CFStringRef kCFHTTPURLStatusCode;
+extern const CFStringRef kCFHTTPURLStatusLine;
+/* kCFFileURLExists is set to kCFFileURLExists if the file exists; any other value if not */
+/* kCFFileURLPOSIXMode encompasses permissions and file type; use the POSIX masks in stat.h */
+/* to get specifics. Value is a CFData wrapped around a mode_t */
+/* kCFFileURLDirectoryContents value is a CFArray with containing URLs for the directory's contents. */
+/* Empty array means the directory exists, but is empty. */
+/* NULL value (but no failure) means the URL exists but is not a directory. */
+/* Not settable */
+/* kCFHTTPURLStatusCode and kCFHTTPURLStatusLine are properties for the http: scheme. */
+/* Except for the common error */
+/* codes, above, errorCode will be set to the HTTP response status */
+/* code upon failure. The status code is a CFNumber, the status line is a CFString. */
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __CFURLACCESS__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__CFURLACCESS__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CFURLACCESS__ */
+
diff --git a/include/qt/CMAcceleration.h b/include/qt/CMAcceleration.h
new file mode 100644
index 000000000..9cd32ded7
--- /dev/null
+++ b/include/qt/CMAcceleration.h
@@ -0,0 +1,143 @@
+/*
+ File: CMAcceleration.h
+
+ Contains: ColorSync Acceleration Component API
+
+ Version: Technology: ColorSync 2.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CMACCELERATION__
+#define __CMACCELERATION__
+
+#ifndef __COMPONENTS__
+#include "Components.h"
+#endif
+
+#ifndef __CMAPPLICATION__
+#include "CMApplication.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* -------------------------------------- version info */
+enum {
+ cmAccelerationInterfaceVersion = 1
+};
+
+/* -------------------------------------- Component Type */
+enum {
+ cmAccelerationComponentType = FOUR_CHAR_CODE('csac')
+};
+
+/* -------------------------------------- Required Component function selectors */
+enum {
+ cmLoadTables = 0,
+ cmCalculateData = 1
+};
+
+/* -------------------------------------- table data for acceleration component */
+
+struct CMAccelerationTableData {
+ long inputLutEntryCount; /* count of entries for input lut for one dimension*/
+ long inputLutWordSize; /* count of bits of each entry ( e.g. 16 for WORD )*/
+ Handle inputLut; /* handle to input lut*/
+ long outputLutEntryCount; /* count of entries for output lut for one dimension */
+ long outputLutWordSize; /* count of bits of each entry ( e.g. 8 for BYTE )*/
+ Handle outputLut; /* handle to output lut*/
+ long colorLutInDim; /* input dimension ( e.g. 3 for LAB ; 4 for CMYK )*/
+ long colorLutOutDim; /* output dimension ( e.g. 3 for LAB ; 4 for CMYK )*/
+ long colorLutGridPoints; /* count of gridpoints for color lut ( for one Dimension ) */
+ long colorLutWordSize; /* count of bits of each entry ( e.g. 8 for BYTE )*/
+ Handle colorLut; /* handle to color lut*/
+ CMBitmapColorSpace inputColorSpace; /* packing info for input*/
+ CMBitmapColorSpace outputColorSpace; /* packing info for output*/
+ void * userData;
+ unsigned long reserved1;
+ unsigned long reserved2;
+ unsigned long reserved3;
+ unsigned long reserved4;
+ unsigned long reserved5;
+};
+typedef struct CMAccelerationTableData CMAccelerationTableData;
+typedef CMAccelerationTableData * CMAccelerationTableDataPtr;
+typedef CMAccelerationTableDataPtr * CMAccelerationTableDataHdl;
+/* -------------------------------------- calc data for acceleration component */
+
+struct CMAccelerationCalcData {
+ long pixelCount; /* count of input pixels*/
+ Ptr inputData; /* input array*/
+ Ptr outputData; /* output array*/
+ unsigned long reserved1;
+ unsigned long reserved2;
+};
+typedef struct CMAccelerationCalcData CMAccelerationCalcData;
+typedef CMAccelerationCalcData * CMAccelerationCalcDataPtr;
+typedef CMAccelerationCalcDataPtr * CMAccelerationCalcDataHdl;
+/*
+ ------------------------------------------------------------------------------------------------
+ A c c e l e r a t i o n C o m p o n e n t I n t e r f a c e s
+ ------------------------------------------------------------------------------------------------
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( CMError )
+CMAccelerationLoadTables (ComponentInstance CMSession,
+ CMAccelerationTableDataPtr tableData) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0000, 0x7000, 0xA82A);
+
+
+EXTERN_API( CMError )
+CMAccelerationCalculateData (ComponentInstance CMSession,
+ CMAccelerationCalcDataPtr calcData) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0001, 0x7000, 0xA82A);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CMACCELERATION__ */
+
diff --git a/include/qt/CMApplication.h b/include/qt/CMApplication.h
new file mode 100644
index 000000000..62376da33
--- /dev/null
+++ b/include/qt/CMApplication.h
@@ -0,0 +1,1508 @@
+/*
+ File: CMApplication.h
+
+ Contains: Color Matching Interfaces
+
+ Version: Technology: ColorSync 3.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1992-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CMAPPLICATION__
+#define __CMAPPLICATION__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+#ifndef __CMICCPROFILE__
+#include "CMICCProfile.h"
+#endif
+
+#ifndef __DISPLAYS__
+#include "Displays.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+#if TARGET_API_MAC_OS8
+#ifndef __PRINTING__
+#include "Printing.h"
+#endif
+
+#endif /* TARGET_API_MAC_OS8 */
+
+
+#if TARGET_OS_WIN32
+#include "windows.h"
+#endif
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ kDefaultCMMSignature = FOUR_CHAR_CODE('appl')
+};
+
+/* Macintosh 68K trap word */
+enum {
+ cmTrap = 0xABEE
+};
+
+
+/* PicComment IDs */
+enum {
+ cmBeginProfile = 220,
+ cmEndProfile = 221,
+ cmEnableMatching = 222,
+ cmDisableMatching = 223,
+ cmComment = 224
+};
+
+/* PicComment selectors for cmComment */
+enum {
+ cmBeginProfileSel = 0,
+ cmContinueProfileSel = 1,
+ cmEndProfileSel = 2,
+ cmProfileIdentifierSel = 3
+};
+
+
+/* Defines for version 1.0 CMProfileSearchRecord.fieldMask */
+enum {
+ cmMatchCMMType = 0x00000001,
+ cmMatchApplProfileVersion = 0x00000002,
+ cmMatchDataType = 0x00000004,
+ cmMatchDeviceType = 0x00000008,
+ cmMatchDeviceManufacturer = 0x00000010,
+ cmMatchDeviceModel = 0x00000020,
+ cmMatchDeviceAttributes = 0x00000040,
+ cmMatchFlags = 0x00000080,
+ cmMatchOptions = 0x00000100,
+ cmMatchWhite = 0x00000200,
+ cmMatchBlack = 0x00000400
+};
+
+/* Defines for version 2.0 CMSearchRecord.searchMask */
+enum {
+ cmMatchAnyProfile = 0x00000000,
+ cmMatchProfileCMMType = 0x00000001,
+ cmMatchProfileClass = 0x00000002,
+ cmMatchDataColorSpace = 0x00000004,
+ cmMatchProfileConnectionSpace = 0x00000008,
+ cmMatchManufacturer = 0x00000010,
+ cmMatchModel = 0x00000020,
+ cmMatchAttributes = 0x00000040,
+ cmMatchProfileFlags = 0x00000080
+};
+
+
+/* deviceType values for ColorSync 1.0 Device Profile access */
+enum {
+ cmSystemDevice = FOUR_CHAR_CODE('sys '),
+ cmGDevice = FOUR_CHAR_CODE('gdev')
+};
+
+/* Commands for CMFlattenUPP(...) */
+enum {
+ cmOpenReadSpool = 1,
+ cmOpenWriteSpool = 2,
+ cmReadSpool = 3,
+ cmWriteSpool = 4,
+ cmCloseSpool = 5
+};
+
+/* Flags for PostScript-related functions */
+enum {
+ cmPS7bit = 1,
+ cmPS8bit = 2
+};
+
+/* Flags for profile embedding functions */
+enum {
+ cmEmbedWholeProfile = 0x00000000,
+ cmEmbedProfileIdentifier = 0x00000001
+};
+
+/* Commands for CMAccessUPP(...) */
+enum {
+ cmOpenReadAccess = 1,
+ cmOpenWriteAccess = 2,
+ cmReadAccess = 3,
+ cmWriteAccess = 4,
+ cmCloseAccess = 5,
+ cmCreateNewAccess = 6,
+ cmAbortWriteAccess = 7,
+ cmBeginAccess = 8,
+ cmEndAccess = 9
+};
+
+
+/* Abstract data type for memory-based Profile */
+typedef struct OpaqueCMProfileRef* CMProfileRef;
+/* Abstract data type for Profile search result */
+typedef struct OpaqueCMProfileSearchRef* CMProfileSearchRef;
+/* Abstract data type for BeginMatching(...) reference */
+typedef struct OpaqueCMMatchRef* CMMatchRef;
+/* Abstract data type for ColorWorld reference */
+typedef struct OpaqueCMWorldRef* CMWorldRef;
+/* Caller-supplied flatten function */
+typedef CALLBACK_API( OSErr , CMFlattenProcPtr )(long command, long *size, void *data, void *refCon);
+/* Caller-supplied progress function for Bitmap & PixMap matching routines */
+typedef CALLBACK_API( Boolean , CMBitmapCallBackProcPtr )(long progress, void *refCon);
+/* Caller-supplied progress function for NCMMConcatInit & NCMMNewLinkProfile routines */
+typedef CALLBACK_API( Boolean , CMConcatCallBackProcPtr )(long progress, void *refCon);
+/* Caller-supplied filter function for Profile search */
+typedef CALLBACK_API( Boolean , CMProfileFilterProcPtr )(CMProfileRef prof, void *refCon);
+/* Caller-supplied function for profile access */
+typedef CALLBACK_API( OSErr , CMProfileAccessProcPtr )(long command, long offset, long *size, void *data, void *refCon);
+typedef STACK_UPP_TYPE(CMFlattenProcPtr) CMFlattenUPP;
+typedef STACK_UPP_TYPE(CMBitmapCallBackProcPtr) CMBitmapCallBackUPP;
+typedef STACK_UPP_TYPE(CMConcatCallBackProcPtr) CMConcatCallBackUPP;
+typedef STACK_UPP_TYPE(CMProfileFilterProcPtr) CMProfileFilterUPP;
+typedef STACK_UPP_TYPE(CMProfileAccessProcPtr) CMProfileAccessUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(CMFlattenUPP)
+ NewCMFlattenUPP (CMFlattenProcPtr userRoutine);
+
+ EXTERN_API(CMBitmapCallBackUPP)
+ NewCMBitmapCallBackUPP (CMBitmapCallBackProcPtr userRoutine);
+
+ EXTERN_API(CMConcatCallBackUPP)
+ NewCMConcatCallBackUPP (CMConcatCallBackProcPtr userRoutine);
+
+ EXTERN_API(CMProfileFilterUPP)
+ NewCMProfileFilterUPP (CMProfileFilterProcPtr userRoutine);
+
+ EXTERN_API(CMProfileAccessUPP)
+ NewCMProfileAccessUPP (CMProfileAccessProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeCMFlattenUPP (CMFlattenUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeCMBitmapCallBackUPP (CMBitmapCallBackUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeCMConcatCallBackUPP (CMConcatCallBackUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeCMProfileFilterUPP (CMProfileFilterUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeCMProfileAccessUPP (CMProfileAccessUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeCMFlattenUPP (long command,
+ long * size,
+ void * data,
+ void * refCon,
+ CMFlattenUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeCMBitmapCallBackUPP (long progress,
+ void * refCon,
+ CMBitmapCallBackUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeCMConcatCallBackUPP (long progress,
+ void * refCon,
+ CMConcatCallBackUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeCMProfileFilterUPP (CMProfileRef prof,
+ void * refCon,
+ CMProfileFilterUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeCMProfileAccessUPP (long command,
+ long offset,
+ long * size,
+ void * data,
+ void * refCon,
+ CMProfileAccessUPP userUPP);
+
+#else
+ enum { uppCMFlattenProcInfo = 0x00003FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppCMBitmapCallBackProcInfo = 0x000003D0 }; /* pascal 1_byte Func(4_bytes, 4_bytes) */
+ enum { uppCMConcatCallBackProcInfo = 0x000003D0 }; /* pascal 1_byte Func(4_bytes, 4_bytes) */
+ enum { uppCMProfileFilterProcInfo = 0x000003D0 }; /* pascal 1_byte Func(4_bytes, 4_bytes) */
+ enum { uppCMProfileAccessProcInfo = 0x0000FFE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewCMFlattenUPP(userRoutine) (CMFlattenUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCMFlattenProcInfo, GetCurrentArchitecture())
+ #define NewCMBitmapCallBackUPP(userRoutine) (CMBitmapCallBackUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCMBitmapCallBackProcInfo, GetCurrentArchitecture())
+ #define NewCMConcatCallBackUPP(userRoutine) (CMConcatCallBackUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCMConcatCallBackProcInfo, GetCurrentArchitecture())
+ #define NewCMProfileFilterUPP(userRoutine) (CMProfileFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCMProfileFilterProcInfo, GetCurrentArchitecture())
+ #define NewCMProfileAccessUPP(userRoutine) (CMProfileAccessUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCMProfileAccessProcInfo, GetCurrentArchitecture())
+ #define DisposeCMFlattenUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeCMBitmapCallBackUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeCMConcatCallBackUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeCMProfileFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeCMProfileAccessUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeCMFlattenUPP(command, size, data, refCon, userUPP) (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppCMFlattenProcInfo, (command), (size), (data), (refCon))
+ #define InvokeCMBitmapCallBackUPP(progress, refCon, userUPP) (Boolean)CALL_TWO_PARAMETER_UPP((userUPP), uppCMBitmapCallBackProcInfo, (progress), (refCon))
+ #define InvokeCMConcatCallBackUPP(progress, refCon, userUPP) (Boolean)CALL_TWO_PARAMETER_UPP((userUPP), uppCMConcatCallBackProcInfo, (progress), (refCon))
+ #define InvokeCMProfileFilterUPP(prof, refCon, userUPP) (Boolean)CALL_TWO_PARAMETER_UPP((userUPP), uppCMProfileFilterProcInfo, (prof), (refCon))
+ #define InvokeCMProfileAccessUPP(command, offset, size, data, refCon, userUPP) (OSErr)CALL_FIVE_PARAMETER_UPP((userUPP), uppCMProfileAccessProcInfo, (command), (offset), (size), (data), (refCon))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewCMFlattenProc(userRoutine) NewCMFlattenUPP(userRoutine)
+#define NewCMBitmapCallBackProc(userRoutine) NewCMBitmapCallBackUPP(userRoutine)
+#define NewCMConcatCallBackProc(userRoutine) NewCMConcatCallBackUPP(userRoutine)
+#define NewCMProfileFilterProc(userRoutine) NewCMProfileFilterUPP(userRoutine)
+#define NewCMProfileAccessProc(userRoutine) NewCMProfileAccessUPP(userRoutine)
+#define CallCMFlattenProc(userRoutine, command, size, data, refCon) InvokeCMFlattenUPP(command, size, data, refCon, userRoutine)
+#define CallCMBitmapCallBackProc(userRoutine, progress, refCon) InvokeCMBitmapCallBackUPP(progress, refCon, userRoutine)
+#define CallCMConcatCallBackProc(userRoutine, progress, refCon) InvokeCMConcatCallBackUPP(progress, refCon, userRoutine)
+#define CallCMProfileFilterProc(userRoutine, prof, refCon) InvokeCMProfileFilterUPP(prof, refCon, userRoutine)
+#define CallCMProfileAccessProc(userRoutine, command, offset, size, data, refCon) InvokeCMProfileAccessUPP(command, offset, size, data, refCon, userRoutine)
+typedef long CMError;
+/* For 1.0 and 2.0 profile header variants */
+/* CMAppleProfileHeader */
+
+union CMAppleProfileHeader {
+ CMHeader cm1;
+ CM2Header cm2;
+};
+typedef union CMAppleProfileHeader CMAppleProfileHeader;
+/* Param for CWConcatColorWorld(...) */
+
+struct CMConcatProfileSet {
+ UInt16 keyIndex; /* Zero-based */
+ UInt16 count; /* Min 1 */
+ CMProfileRef profileSet[1]; /* Variable. Ordered from Source -> Dest */
+};
+typedef struct CMConcatProfileSet CMConcatProfileSet;
+
+/* NCMConcatProfileSpec Tags */
+enum {
+ kNoTransform = 0, /* Not used */
+ kUseAtoB = 1, /* Use 'A2B*' tag from this profile or equivalent */
+ kUseBtoA = 2, /* Use 'B2A*' tag from this profile or equivalent */
+ kUseBtoB = 3, /* Use 'pre*' tag from this profile or equivalent */
+ /* For typical device profiles the following synonyms may be useful */
+ kDeviceToPCS = kUseAtoB, /* Device Dependent to Device Independent */
+ kPCSToDevice = kUseBtoA, /* Device Independent to Device Dependent */
+ kPCSToPCS = kUseBtoB, /* Independent, through device's gamut */
+ kUseProfileIntent = (long)0xFFFFFFFF /* For renderingIntent in NCMConcatProfileSpec */
+};
+
+/* NCMConcatProfileSpec */
+
+struct NCMConcatProfileSpec {
+ UInt32 renderingIntent; /* renderingIntent override */
+ UInt32 transformTag; /* transformTag, defined above */
+ CMProfileRef profile; /* profile */
+};
+typedef struct NCMConcatProfileSpec NCMConcatProfileSpec;
+/* NCMConcatProfileSet */
+
+struct NCMConcatProfileSet {
+ OSType cmm; /* e.g. 'KCMS', 'appl', ... uniquely ids the cmm, or 0000 */
+ UInt32 flags; /* specify quality, lookup only, no gamut checking ... */
+ UInt32 flagsMask; /* which bits of 'flags' to use to override profile */
+ UInt32 profileCount; /* how many ProfileSpecs in the following set */
+ NCMConcatProfileSpec profileSpecs[1]; /* Variable. Ordered from Source -> Dest */
+};
+typedef struct NCMConcatProfileSet NCMConcatProfileSet;
+/* ColorSync color data types */
+
+struct CMRGBColor {
+ UInt16 red; /* 0..65535 */
+ UInt16 green;
+ UInt16 blue;
+};
+typedef struct CMRGBColor CMRGBColor;
+
+struct CMCMYKColor {
+ UInt16 cyan; /* 0..65535 */
+ UInt16 magenta;
+ UInt16 yellow;
+ UInt16 black;
+};
+typedef struct CMCMYKColor CMCMYKColor;
+
+struct CMCMYColor {
+ UInt16 cyan; /* 0..65535 */
+ UInt16 magenta;
+ UInt16 yellow;
+};
+typedef struct CMCMYColor CMCMYColor;
+
+struct CMHLSColor {
+ UInt16 hue; /* 0..65535. Fraction of circle. Red at 0 */
+ UInt16 lightness; /* 0..65535 */
+ UInt16 saturation; /* 0..65535 */
+};
+typedef struct CMHLSColor CMHLSColor;
+
+struct CMHSVColor {
+ UInt16 hue; /* 0..65535. Fraction of circle. Red at 0 */
+ UInt16 saturation; /* 0..65535 */
+ UInt16 value; /* 0..65535 */
+};
+typedef struct CMHSVColor CMHSVColor;
+
+struct CMLabColor {
+ UInt16 L; /* 0..65535 maps to 0..100 */
+ UInt16 a; /* 0..65535 maps to -128..127.996 */
+ UInt16 b; /* 0..65535 maps to -128..127.996 */
+};
+typedef struct CMLabColor CMLabColor;
+
+struct CMLuvColor {
+ UInt16 L; /* 0..65535 maps to 0..100 */
+ UInt16 u; /* 0..65535 maps to -128..127.996 */
+ UInt16 v; /* 0..65535 maps to -128..127.996 */
+};
+typedef struct CMLuvColor CMLuvColor;
+
+struct CMYxyColor {
+ UInt16 capY; /* 0..65535 maps to 0..1 */
+ UInt16 x; /* 0..65535 maps to 0..1 */
+ UInt16 y; /* 0..65535 maps to 0..1 */
+};
+typedef struct CMYxyColor CMYxyColor;
+
+struct CMGrayColor {
+ UInt16 gray; /* 0..65535 */
+};
+typedef struct CMGrayColor CMGrayColor;
+
+struct CMMultichannel5Color {
+ UInt8 components[5]; /* 0..255 */
+};
+typedef struct CMMultichannel5Color CMMultichannel5Color;
+
+struct CMMultichannel6Color {
+ UInt8 components[6]; /* 0..255 */
+};
+typedef struct CMMultichannel6Color CMMultichannel6Color;
+
+struct CMMultichannel7Color {
+ UInt8 components[7]; /* 0..255 */
+};
+typedef struct CMMultichannel7Color CMMultichannel7Color;
+
+struct CMMultichannel8Color {
+ UInt8 components[8]; /* 0..255 */
+};
+typedef struct CMMultichannel8Color CMMultichannel8Color;
+
+struct CMNamedColor {
+ UInt32 namedColorIndex; /* 0..a lot */
+};
+typedef struct CMNamedColor CMNamedColor;
+
+union CMColor {
+ CMRGBColor rgb;
+ CMHSVColor hsv;
+ CMHLSColor hls;
+ CMXYZColor XYZ;
+ CMLabColor Lab;
+ CMLuvColor Luv;
+ CMYxyColor Yxy;
+ CMCMYKColor cmyk;
+ CMCMYColor cmy;
+ CMGrayColor gray;
+ CMMultichannel5Color mc5;
+ CMMultichannel6Color mc6;
+ CMMultichannel7Color mc7;
+ CMMultichannel8Color mc8;
+ CMNamedColor namedColor;
+};
+typedef union CMColor CMColor;
+
+struct CMProfileSearchRecord {
+ CMHeader header;
+ UInt32 fieldMask;
+ UInt32 reserved[2];
+};
+typedef struct CMProfileSearchRecord CMProfileSearchRecord;
+typedef CMProfileSearchRecord * CMProfileSearchRecordPtr;
+typedef CMProfileSearchRecordPtr * CMProfileSearchRecordHandle;
+/* Search definition for 2.0 */
+
+struct CMSearchRecord {
+ OSType CMMType;
+ OSType profileClass;
+ OSType dataColorSpace;
+ OSType profileConnectionSpace;
+ UInt32 deviceManufacturer;
+ UInt32 deviceModel;
+ UInt32 deviceAttributes[2];
+ UInt32 profileFlags;
+ UInt32 searchMask;
+ CMProfileFilterUPP filter;
+};
+typedef struct CMSearchRecord CMSearchRecord;
+/* CMMInfo structure */
+
+struct CMMInfo {
+ UInt32 dataSize; /* Size of this structure - compatibility*/
+ OSType CMMType; /* Signature, e.g. 'KCMS'*/
+ OSType CMMMfr; /* Vendor, e.g. 'appl'*/
+ UInt32 CMMVersion; /* cmm version number*/
+ unsigned char ASCIIName[32]; /* pascal string - name*/
+ unsigned char ASCIIDesc[256]; /* pascal string - description or copyright*/
+ UniCharCount UniCodeNameCount; /* count of UniChars in following array*/
+ UniChar UniCodeName[32]; /* the name in UniCode chars*/
+ UniCharCount UniCodeDescCount; /* count of UniChars in following array*/
+ UniChar UniCodeDesc[256]; /* the description in UniCode chars*/
+};
+typedef struct CMMInfo CMMInfo;
+/* GetCWInfo structures */
+
+struct CMMInfoRecord {
+ OSType CMMType;
+ long CMMVersion;
+};
+typedef struct CMMInfoRecord CMMInfoRecord;
+
+struct CMCWInfoRecord {
+ UInt32 cmmCount;
+ CMMInfoRecord cmmInfo[2];
+};
+typedef struct CMCWInfoRecord CMCWInfoRecord;
+/* profile identifier structures */
+
+struct CMProfileIdentifier {
+ CM2Header profileHeader;
+ CMDateTime calibrationDate;
+ UInt32 ASCIIProfileDescriptionLen;
+ char ASCIIProfileDescription[1]; /* variable length */
+};
+typedef struct CMProfileIdentifier CMProfileIdentifier;
+typedef CMProfileIdentifier * CMProfileIdentifierPtr;
+/* packing formats */
+enum {
+ cmNoColorPacking = 0x0000,
+ cmWord5ColorPacking = 0x0500,
+ cmWord565ColorPacking = 0x0600,
+ cmLong8ColorPacking = 0x0800,
+ cmLong10ColorPacking = 0x0A00,
+ cmAlphaFirstPacking = 0x1000,
+ cmOneBitDirectPacking = 0x0B00,
+ cmAlphaLastPacking = 0x0000,
+ cm8_8ColorPacking = 0x2800,
+ cm16_8ColorPacking = 0x2000,
+ cm24_8ColorPacking = 0x2100,
+ cm32_8ColorPacking = cmLong8ColorPacking,
+ cm40_8ColorPacking = 0x2200,
+ cm48_8ColorPacking = 0x2300,
+ cm56_8ColorPacking = 0x2400,
+ cm64_8ColorPacking = 0x2500,
+ cm32_16ColorPacking = 0x2600,
+ cm48_16ColorPacking = 0x2900,
+ cm64_16ColorPacking = 0x2A00,
+ cm32_32ColorPacking = 0x2700,
+ cmLittleEndianPacking = 0x4000,
+ cmReverseChannelPacking = 0x8000
+};
+
+/* colorspace masks */
+enum {
+ cmColorSpaceSpaceMask = 0x0000007F,
+ cmColorSpaceAlphaMask = 0x00000080,
+ cmColorSpaceSpaceAndAlphaMask = 0x000000FF,
+ cmColorSpacePackingMask = 0x0000FF00,
+ cmColorSpaceReservedMask = (long)0xFFFF0000
+};
+
+/* general colorspaces */
+enum {
+ cmNoSpace = 0,
+ cmRGBSpace = 1,
+ cmCMYKSpace = 2,
+ cmHSVSpace = 3,
+ cmHLSSpace = 4,
+ cmYXYSpace = 5,
+ cmXYZSpace = 6,
+ cmLUVSpace = 7,
+ cmLABSpace = 8,
+ cmReservedSpace1 = 9,
+ cmGraySpace = 10,
+ cmReservedSpace2 = 11,
+ cmGamutResultSpace = 12,
+ cmNamedIndexedSpace = 16,
+ cmMCFiveSpace = 17,
+ cmMCSixSpace = 18,
+ cmMCSevenSpace = 19,
+ cmMCEightSpace = 20,
+ cmAlphaSpace = 0x80,
+ cmRGBASpace = cmRGBSpace + cmAlphaSpace,
+ cmGrayASpace = cmGraySpace + cmAlphaSpace
+};
+
+/* supported CMBitmapColorSpaces - Each of the following is a */
+/* combination of a general colospace and a packing formats. */
+/* Each can also be or'd with cmReverseChannelPacking. */
+enum {
+ cmGray8Space = cmGraySpace + cm8_8ColorPacking,
+ cmGrayA16Space = cmGrayASpace + cm16_8ColorPacking,
+ cmGray16Space = cmGraySpace,
+ cmGrayA32Space = cmGrayASpace,
+ cmGray16LSpace = cmGraySpace + cmLittleEndianPacking,
+ cmGrayA32LSpace = cmGrayASpace + cmLittleEndianPacking,
+ cmRGB16Space = cmRGBSpace + cmWord5ColorPacking,
+ cmRGB16LSpace = cmRGBSpace + cmWord5ColorPacking + cmLittleEndianPacking,
+ cmRGB565Space = cmRGBSpace + cmWord565ColorPacking,
+ cmRGB565LSpace = cmRGBSpace + cmWord565ColorPacking + cmLittleEndianPacking,
+ cmRGB24Space = cmRGBSpace + cm24_8ColorPacking,
+ cmRGB32Space = cmRGBSpace + cm32_8ColorPacking,
+ cmRGB48Space = cmRGBSpace + cm48_16ColorPacking,
+ cmRGB48LSpace = cmRGBSpace + cm48_16ColorPacking + cmLittleEndianPacking,
+ cmARGB32Space = cmRGBASpace + cm32_8ColorPacking + cmAlphaFirstPacking,
+ cmARGB64Space = cmRGBASpace + cm64_16ColorPacking + cmAlphaFirstPacking,
+ cmARGB64LSpace = cmRGBASpace + cm64_16ColorPacking + cmAlphaFirstPacking + cmLittleEndianPacking,
+ cmRGBA32Space = cmRGBASpace + cm32_8ColorPacking + cmAlphaLastPacking,
+ cmRGBA64Space = cmRGBASpace + cm64_16ColorPacking + cmAlphaLastPacking,
+ cmRGBA64LSpace = cmRGBASpace + cm64_16ColorPacking + cmAlphaLastPacking + cmLittleEndianPacking,
+ cmCMYK32Space = cmCMYKSpace + cm32_8ColorPacking,
+ cmCMYK64Space = cmCMYKSpace + cm64_16ColorPacking,
+ cmCMYK64LSpace = cmCMYKSpace + cm64_16ColorPacking + cmLittleEndianPacking,
+ cmHSV32Space = cmHSVSpace + cmLong10ColorPacking,
+ cmHLS32Space = cmHLSSpace + cmLong10ColorPacking,
+ cmYXY32Space = cmYXYSpace + cmLong10ColorPacking,
+ cmXYZ24Space = cmXYZSpace + cm24_8ColorPacking,
+ cmXYZ32Space = cmXYZSpace + cmLong10ColorPacking,
+ cmXYZ48Space = cmXYZSpace + cm48_16ColorPacking,
+ cmXYZ48LSpace = cmXYZSpace + cm48_16ColorPacking + cmLittleEndianPacking,
+ cmLUV32Space = cmLUVSpace + cmLong10ColorPacking,
+ cmLAB24Space = cmLABSpace + cm24_8ColorPacking,
+ cmLAB32Space = cmLABSpace + cmLong10ColorPacking,
+ cmLAB48Space = cmLABSpace + cm48_16ColorPacking,
+ cmLAB48LSpace = cmLABSpace + cm48_16ColorPacking + cmLittleEndianPacking,
+ cmGamutResult1Space = cmOneBitDirectPacking + cmGamutResultSpace,
+ cmNamedIndexed32Space = cm32_32ColorPacking + cmNamedIndexedSpace,
+ cmNamedIndexed32LSpace = cm32_32ColorPacking + cmNamedIndexedSpace + cmLittleEndianPacking,
+ cmMCFive8Space = cm40_8ColorPacking + cmMCFiveSpace,
+ cmMCSix8Space = cm48_8ColorPacking + cmMCSixSpace,
+ cmMCSeven8Space = cm56_8ColorPacking + cmMCSevenSpace,
+ cmMCEight8Space = cm64_8ColorPacking + cmMCEightSpace
+};
+
+
+
+typedef UInt32 CMBitmapColorSpace;
+
+struct CMBitmap {
+ char * image;
+ long width;
+ long height;
+ long rowBytes;
+ long pixelSize;
+ CMBitmapColorSpace space;
+ long user1;
+ long user2;
+};
+typedef struct CMBitmap CMBitmap;
+
+/* Classic Print Manager Stuff */
+#if TARGET_OS_MAC
+enum {
+ enableColorMatchingOp = 12,
+ registerProfileOp = 13
+};
+
+#endif /* TARGET_OS_MAC */
+
+/* Profile Locations */
+enum {
+ CS_MAX_PATH = 256
+};
+
+enum {
+ cmNoProfileBase = 0,
+ cmFileBasedProfile = 1,
+ cmHandleBasedProfile = 2,
+ cmPtrBasedProfile = 3,
+ cmProcedureBasedProfile = 4,
+ cmPathBasedProfile = 5,
+ cmBufferBasedProfile = 6
+};
+
+
+struct CMFileLocation {
+ FSSpec spec;
+};
+typedef struct CMFileLocation CMFileLocation;
+
+struct CMHandleLocation {
+ Handle h;
+};
+typedef struct CMHandleLocation CMHandleLocation;
+
+struct CMPtrLocation {
+ Ptr p;
+};
+typedef struct CMPtrLocation CMPtrLocation;
+
+struct CMProcedureLocation {
+ CMProfileAccessUPP proc;
+ void * refCon;
+};
+typedef struct CMProcedureLocation CMProcedureLocation;
+
+struct CMPathLocation {
+ char path[256];
+};
+typedef struct CMPathLocation CMPathLocation;
+
+struct CMBufferLocation {
+ void * buffer;
+ UInt32 size;
+};
+typedef struct CMBufferLocation CMBufferLocation;
+
+union CMProfLoc {
+ CMFileLocation fileLoc;
+ CMHandleLocation handleLoc;
+ CMPtrLocation ptrLoc;
+ CMProcedureLocation procLoc;
+ CMPathLocation pathLoc;
+ CMBufferLocation bufferLoc;
+};
+typedef union CMProfLoc CMProfLoc;
+
+struct CMProfileLocation {
+ short locType;
+ CMProfLoc u;
+};
+typedef struct CMProfileLocation CMProfileLocation;
+#if TARGET_OS_MAC
+enum {
+ cmOriginalProfileLocationSize = 72,
+ cmCurrentProfileLocationSize = 2 + CS_MAX_PATH
+};
+
+#else
+enum {
+ cmOriginalProfileLocationSize = 2 + CS_MAX_PATH,
+ cmCurrentProfileLocationSize = 2 + CS_MAX_PATH
+};
+
+#endif /* TARGET_OS_MAC */
+
+/* Struct and enums used for Profile iteration */
+enum {
+ cmProfileIterateDataVersion1 = 0x00010000,
+ cmProfileIterateDataVersion2 = 0x00020000
+};
+
+
+struct CMProfileIterateData {
+ UInt32 dataVersion; /* cmProfileIterateDataVersion2 */
+ CM2Header header;
+ ScriptCode code;
+ Str255 name;
+ CMProfileLocation location;
+ UniCharCount uniCodeNameCount;
+ UniChar * uniCodeName;
+ unsigned char * asciiName;
+ CMMakeAndModel * makeAndModel;
+};
+typedef struct CMProfileIterateData CMProfileIterateData;
+/* Caller-supplied callback function for Profile & CMM iteration */
+typedef CALLBACK_API( OSErr , CMProfileIterateProcPtr )(CMProfileIterateData *iterateData, void *refCon);
+typedef CALLBACK_API( OSErr , CMMIterateProcPtr )(CMMInfo *iterateData, void *refCon);
+typedef STACK_UPP_TYPE(CMProfileIterateProcPtr) CMProfileIterateUPP;
+typedef STACK_UPP_TYPE(CMMIterateProcPtr) CMMIterateUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(CMProfileIterateUPP)
+ NewCMProfileIterateUPP (CMProfileIterateProcPtr userRoutine);
+
+ EXTERN_API(CMMIterateUPP)
+ NewCMMIterateUPP (CMMIterateProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeCMProfileIterateUPP (CMProfileIterateUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeCMMIterateUPP (CMMIterateUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeCMProfileIterateUPP (CMProfileIterateData * iterateData,
+ void * refCon,
+ CMProfileIterateUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeCMMIterateUPP (CMMInfo * iterateData,
+ void * refCon,
+ CMMIterateUPP userUPP);
+
+#else
+ enum { uppCMProfileIterateProcInfo = 0x000003E0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes) */
+ enum { uppCMMIterateProcInfo = 0x000003E0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes) */
+ #define NewCMProfileIterateUPP(userRoutine) (CMProfileIterateUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCMProfileIterateProcInfo, GetCurrentArchitecture())
+ #define NewCMMIterateUPP(userRoutine) (CMMIterateUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCMMIterateProcInfo, GetCurrentArchitecture())
+ #define DisposeCMProfileIterateUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeCMMIterateUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeCMProfileIterateUPP(iterateData, refCon, userUPP) (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppCMProfileIterateProcInfo, (iterateData), (refCon))
+ #define InvokeCMMIterateUPP(iterateData, refCon, userUPP) (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppCMMIterateProcInfo, (iterateData), (refCon))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewCMProfileIterateProc(userRoutine) NewCMProfileIterateUPP(userRoutine)
+#define NewCMMIterateProc(userRoutine) NewCMMIterateUPP(userRoutine)
+#define CallCMProfileIterateProc(userRoutine, iterateData, refCon) InvokeCMProfileIterateUPP(iterateData, refCon, userRoutine)
+#define CallCMMIterateProc(userRoutine, iterateData, refCon) InvokeCMMIterateUPP(iterateData, refCon, userRoutine)
+/* Profile file and element access */
+EXTERN_API( CMError )
+CMNewProfile (CMProfileRef * prof,
+ const CMProfileLocation * theProfile) FOURWORDINLINE(0x203C, 0x0008, 0x001B, 0xABEE);
+
+EXTERN_API( CMError )
+CMOpenProfile (CMProfileRef * prof,
+ const CMProfileLocation * theProfile) FOURWORDINLINE(0x203C, 0x0008, 0x001C, 0xABEE);
+
+EXTERN_API( CMError )
+CMCloseProfile (CMProfileRef prof) FOURWORDINLINE(0x203C, 0x0004, 0x001D, 0xABEE);
+
+EXTERN_API( CMError )
+CMUpdateProfile (CMProfileRef prof) FOURWORDINLINE(0x203C, 0x0004, 0x0034, 0xABEE);
+
+EXTERN_API( CMError )
+CMCopyProfile (CMProfileRef * targetProf,
+ const CMProfileLocation * targetLocation,
+ CMProfileRef srcProf) FOURWORDINLINE(0x203C, 0x000C, 0x0025, 0xABEE);
+
+EXTERN_API( CMError )
+CMValidateProfile (CMProfileRef prof,
+ Boolean * valid,
+ Boolean * preferredCMMnotfound) FOURWORDINLINE(0x203C, 0x000C, 0x0026, 0xABEE);
+
+EXTERN_API( CMError )
+CMGetProfileLocation (CMProfileRef prof,
+ CMProfileLocation * theProfile) FOURWORDINLINE(0x203C, 0x0008, 0x003C, 0xABEE);
+
+EXTERN_API( CMError )
+NCMGetProfileLocation (CMProfileRef prof,
+ CMProfileLocation * theProfile,
+ UInt32 * locationSize) FOURWORDINLINE(0x203C, 0x000C, 0x0059, 0xABEE);
+
+EXTERN_API( CMError )
+CMFlattenProfile (CMProfileRef prof,
+ UInt32 flags,
+ CMFlattenUPP proc,
+ void * refCon,
+ Boolean * preferredCMMnotfound) FOURWORDINLINE(0x203C, 0x0014, 0x0031, 0xABEE);
+
+#if TARGET_OS_MAC
+EXTERN_API( CMError )
+CMUnflattenProfile (FSSpec * resultFileSpec,
+ CMFlattenUPP proc,
+ void * refCon,
+ Boolean * preferredCMMnotfound) FOURWORDINLINE(0x203C, 0x0010, 0x0032, 0xABEE);
+
+#endif /* TARGET_OS_MAC */
+
+EXTERN_API( CMError )
+CMGetProfileHeader (CMProfileRef prof,
+ CMAppleProfileHeader * header) FOURWORDINLINE(0x203C, 0x0008, 0x0039, 0xABEE);
+
+EXTERN_API( CMError )
+CMSetProfileHeader (CMProfileRef prof,
+ const CMAppleProfileHeader * header) FOURWORDINLINE(0x203C, 0x0008, 0x003A, 0xABEE);
+
+EXTERN_API( CMError )
+CMProfileElementExists (CMProfileRef prof,
+ OSType tag,
+ Boolean * found) FOURWORDINLINE(0x203C, 0x000C, 0x001E, 0xABEE);
+
+EXTERN_API( CMError )
+CMCountProfileElements (CMProfileRef prof,
+ UInt32 * elementCount) FOURWORDINLINE(0x203C, 0x0008, 0x001F, 0xABEE);
+
+EXTERN_API( CMError )
+CMGetProfileElement (CMProfileRef prof,
+ OSType tag,
+ UInt32 * elementSize,
+ void * elementData) FOURWORDINLINE(0x203C, 0x0010, 0x0020, 0xABEE);
+
+EXTERN_API( CMError )
+CMSetProfileElement (CMProfileRef prof,
+ OSType tag,
+ UInt32 elementSize,
+ void * elementData) FOURWORDINLINE(0x203C, 0x0010, 0x0023, 0xABEE);
+
+EXTERN_API( CMError )
+CMSetProfileElementSize (CMProfileRef prof,
+ OSType tag,
+ UInt32 elementSize) FOURWORDINLINE(0x203C, 0x000C, 0x0038, 0xABEE);
+
+EXTERN_API( CMError )
+CMSetProfileElementReference (CMProfileRef prof,
+ OSType elementTag,
+ OSType referenceTag) FOURWORDINLINE(0x203C, 0x000C, 0x0035, 0xABEE);
+
+EXTERN_API( CMError )
+CMGetPartialProfileElement (CMProfileRef prof,
+ OSType tag,
+ UInt32 offset,
+ UInt32 * byteCount,
+ void * elementData) FOURWORDINLINE(0x203C, 0x0014, 0x0036, 0xABEE);
+
+EXTERN_API( CMError )
+CMSetPartialProfileElement (CMProfileRef prof,
+ OSType tag,
+ UInt32 offset,
+ UInt32 byteCount,
+ void * elementData) FOURWORDINLINE(0x203C, 0x0014, 0x0037, 0xABEE);
+
+EXTERN_API( CMError )
+CMGetIndProfileElementInfo (CMProfileRef prof,
+ UInt32 index,
+ OSType * tag,
+ UInt32 * elementSize,
+ Boolean * refs) FOURWORDINLINE(0x203C, 0x0014, 0x0021, 0xABEE);
+
+EXTERN_API( CMError )
+CMGetIndProfileElement (CMProfileRef prof,
+ UInt32 index,
+ UInt32 * elementSize,
+ void * elementData) FOURWORDINLINE(0x203C, 0x0010, 0x0022, 0xABEE);
+
+EXTERN_API( CMError )
+CMRemoveProfileElement (CMProfileRef prof,
+ OSType tag) FOURWORDINLINE(0x203C, 0x0008, 0x0024, 0xABEE);
+
+EXTERN_API( CMError )
+CMGetScriptProfileDescription (CMProfileRef prof,
+ Str255 name,
+ ScriptCode * code) FOURWORDINLINE(0x203C, 0x000C, 0x003E, 0xABEE);
+
+EXTERN_API( CMError )
+CMGetProfileDescriptions (CMProfileRef prof,
+ char * aName,
+ UInt32 * aCount,
+ Str255 mName,
+ ScriptCode * mCode,
+ UniChar * uName,
+ UniCharCount * uCount) FOURWORDINLINE(0x203C, 0x001A, 0x0067, 0xABEE);
+
+EXTERN_API( CMError )
+CMSetProfileDescriptions (CMProfileRef prof,
+ const char * aName,
+ UInt32 aCount,
+ ConstStr255Param mName,
+ ScriptCode mCode,
+ const UniChar * uName,
+ UniCharCount uCount) FOURWORDINLINE(0x203C, 0x001A, 0x0068, 0xABEE);
+
+EXTERN_API( CMError )
+CMCloneProfileRef (CMProfileRef prof) FOURWORDINLINE(0x203C, 0x0004, 0x0042, 0xABEE);
+
+EXTERN_API( CMError )
+CMGetProfileRefCount (CMProfileRef prof,
+ long * count) FOURWORDINLINE(0x203C, 0x0008, 0x0043, 0xABEE);
+
+EXTERN_API( CMError )
+CMProfileModified (CMProfileRef prof,
+ Boolean * modified) FOURWORDINLINE(0x203C, 0x0008, 0x0044, 0xABEE);
+
+
+/* named Color access functions */
+EXTERN_API( CMError )
+CMGetNamedColorInfo (CMProfileRef prof,
+ UInt32 * deviceChannels,
+ OSType * deviceColorSpace,
+ OSType * PCSColorSpace,
+ UInt32 * count,
+ StringPtr prefix,
+ StringPtr suffix) FOURWORDINLINE(0x203C, 0x001C, 0x0046, 0xABEE);
+
+EXTERN_API( CMError )
+CMGetNamedColorValue (CMProfileRef prof,
+ StringPtr name,
+ CMColor * deviceColor,
+ CMColor * PCSColor) FOURWORDINLINE(0x203C, 0x0010, 0x0047, 0xABEE);
+
+EXTERN_API( CMError )
+CMGetIndNamedColorValue (CMProfileRef prof,
+ UInt32 index,
+ CMColor * deviceColor,
+ CMColor * PCSColor) FOURWORDINLINE(0x203C, 0x0010, 0x0048, 0xABEE);
+
+EXTERN_API( CMError )
+CMGetNamedColorIndex (CMProfileRef prof,
+ StringPtr name,
+ UInt32 * index) FOURWORDINLINE(0x203C, 0x000C, 0x0049, 0xABEE);
+
+EXTERN_API( CMError )
+CMGetNamedColorName (CMProfileRef prof,
+ UInt32 index,
+ StringPtr name) FOURWORDINLINE(0x203C, 0x000C, 0x004A, 0xABEE);
+
+
+/* General-purpose matching functions */
+EXTERN_API( CMError )
+NCWNewColorWorld (CMWorldRef * cw,
+ CMProfileRef src,
+ CMProfileRef dst) FOURWORDINLINE(0x203C, 0x000C, 0x0014, 0xABEE);
+
+EXTERN_API( CMError )
+CWConcatColorWorld (CMWorldRef * cw,
+ CMConcatProfileSet * profileSet) FOURWORDINLINE(0x203C, 0x0008, 0x0015, 0xABEE);
+
+EXTERN_API( CMError )
+CWNewLinkProfile (CMProfileRef * prof,
+ const CMProfileLocation * targetLocation,
+ CMConcatProfileSet * profileSet) FOURWORDINLINE(0x203C, 0x000C, 0x0033, 0xABEE);
+
+EXTERN_API( CMError )
+NCWConcatColorWorld (CMWorldRef * cw,
+ NCMConcatProfileSet * profileSet,
+ CMConcatCallBackUPP proc,
+ void * refCon) FOURWORDINLINE(0x203C, 0x0008, 0x0061, 0xABEE);
+
+EXTERN_API( CMError )
+NCWNewLinkProfile (CMProfileRef * prof,
+ const CMProfileLocation * targetLocation,
+ NCMConcatProfileSet * profileSet,
+ CMConcatCallBackUPP proc,
+ void * refCon) FOURWORDINLINE(0x203C, 0x000C, 0x0062, 0xABEE);
+
+EXTERN_API( void )
+CWDisposeColorWorld (CMWorldRef cw) FOURWORDINLINE(0x203C, 0x0004, 0x0001, 0xABEE);
+
+EXTERN_API( CMError )
+CWMatchColors (CMWorldRef cw,
+ CMColor * myColors,
+ UInt32 count) FOURWORDINLINE(0x203C, 0x000C, 0x0002, 0xABEE);
+
+EXTERN_API( CMError )
+CWCheckColors (CMWorldRef cw,
+ CMColor * myColors,
+ UInt32 count,
+ UInt32 * result) FOURWORDINLINE(0x203C, 0x0010, 0x0003, 0xABEE);
+
+EXTERN_API( CMError )
+CWMatchBitmap (CMWorldRef cw,
+ CMBitmap * bitmap,
+ CMBitmapCallBackUPP progressProc,
+ void * refCon,
+ CMBitmap * matchedBitmap) FOURWORDINLINE(0x203C, 0x0010, 0x002C, 0xABEE);
+
+EXTERN_API( CMError )
+CWCheckBitmap (CMWorldRef cw,
+ const CMBitmap * bitmap,
+ CMBitmapCallBackUPP progressProc,
+ void * refCon,
+ CMBitmap * resultBitmap) FOURWORDINLINE(0x203C, 0x0014, 0x002D, 0xABEE);
+
+
+/* Quickdraw-specific matching */
+EXTERN_API( CMError )
+CWMatchPixMap (CMWorldRef cw,
+ PixMap * myPixMap,
+ CMBitmapCallBackUPP progressProc,
+ void * refCon) FOURWORDINLINE(0x203C, 0x0010, 0x0004, 0xABEE);
+
+EXTERN_API( CMError )
+CWCheckPixMap (CMWorldRef cw,
+ PixMap * myPixMap,
+ CMBitmapCallBackUPP progressProc,
+ void * refCon,
+ BitMap * resultBitMap) FOURWORDINLINE(0x203C, 0x0014, 0x0007, 0xABEE);
+
+#if TARGET_API_MAC_OS8 || TARGET_API_MAC_CARBON
+EXTERN_API( CMError )
+NCMBeginMatching (CMProfileRef src,
+ CMProfileRef dst,
+ CMMatchRef * myRef) FOURWORDINLINE(0x203C, 0x000C, 0x0016, 0xABEE);
+
+EXTERN_API( void )
+CMEndMatching (CMMatchRef myRef) FOURWORDINLINE(0x203C, 0x0004, 0x000B, 0xABEE);
+
+EXTERN_API( void )
+NCMDrawMatchedPicture (PicHandle myPicture,
+ CMProfileRef dst,
+ Rect * myRect) FOURWORDINLINE(0x203C, 0x000C, 0x0017, 0xABEE);
+
+EXTERN_API( void )
+CMEnableMatchingComment (Boolean enableIt) FOURWORDINLINE(0x203C, 0x0002, 0x000D, 0xABEE);
+
+EXTERN_API( CMError )
+NCMUseProfileComment (CMProfileRef prof,
+ UInt32 flags) FOURWORDINLINE(0x203C, 0x0008, 0x003B, 0xABEE);
+
+#endif /* TARGET_API_MAC_OS8 || TARGET_API_MAC_CARBON */
+
+#if TARGET_OS_WIN32
+#if CALL_NOT_IN_CARBON
+EXTERN_API( CMError )
+CWMatchHBITMAP (CMWorldRef cw,
+ HBITMAP hBitmap,
+ CMBitmapCallBackUPP progressProc,
+ void * refCon);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_OS_WIN32 */
+
+EXTERN_API( CMError )
+CMCreateProfileIdentifier (CMProfileRef prof,
+ CMProfileIdentifierPtr ident,
+ UInt32 * size) FOURWORDINLINE(0x203C, 0x000C, 0x0041, 0xABEE);
+
+
+/* System Profile access */
+EXTERN_API( CMError )
+CMGetSystemProfile (CMProfileRef * prof) FOURWORDINLINE(0x203C, 0x0004, 0x0018, 0xABEE);
+
+EXTERN_API( CMError )
+CMSetSystemProfile (const FSSpec * profileFileSpec) FOURWORDINLINE(0x203C, 0x0004, 0x0019, 0xABEE);
+
+EXTERN_API( CMError )
+NCMSetSystemProfile (const CMProfileLocation * profLoc) FOURWORDINLINE(0x203C, 0x0004, 0x0064, 0xABEE);
+
+EXTERN_API( CMError )
+CMGetDefaultProfileBySpace (OSType dataColorSpace,
+ CMProfileRef * prof) FOURWORDINLINE(0x203C, 0x0008, 0x005A, 0xABEE);
+
+EXTERN_API( CMError )
+CMSetDefaultProfileBySpace (OSType dataColorSpace,
+ CMProfileRef prof) FOURWORDINLINE(0x203C, 0x0008, 0x005B, 0xABEE);
+
+#if TARGET_OS_MAC
+EXTERN_API( CMError )
+CMGetProfileByAVID (AVIDType theAVID,
+ CMProfileRef * prof) FOURWORDINLINE(0x203C, 0x0008, 0x005C, 0xABEE);
+
+EXTERN_API( CMError )
+CMSetProfileByAVID (AVIDType theAVID,
+ CMProfileRef prof) FOURWORDINLINE(0x203C, 0x0008, 0x005D, 0xABEE);
+
+#endif /* TARGET_OS_MAC */
+
+/* Profile Use enumerations */
+enum {
+ cmInputUse = FOUR_CHAR_CODE('inpt'),
+ cmOutputUse = FOUR_CHAR_CODE('outp'),
+ cmDisplayUse = FOUR_CHAR_CODE('dply'),
+ cmProofUse = FOUR_CHAR_CODE('pruf')
+};
+
+/* Profile access by Use */
+EXTERN_API( CMError )
+CMGetDefaultProfileByUse (OSType use,
+ CMProfileRef * prof) FOURWORDINLINE(0x203C, 0x0008, 0x0069, 0xABEE);
+
+EXTERN_API( CMError )
+CMSetDefaultProfileByUse (OSType use,
+ CMProfileRef prof) FOURWORDINLINE(0x203C, 0x0008, 0x0079, 0xABEE);
+
+/* Profile Management */
+EXTERN_API( CMError )
+CMNewProfileSearch (CMSearchRecord * searchSpec,
+ void * refCon,
+ UInt32 * count,
+ CMProfileSearchRef * searchResult) FOURWORDINLINE(0x203C, 0x0010, 0x0027, 0xABEE);
+
+EXTERN_API( CMError )
+CMUpdateProfileSearch (CMProfileSearchRef search,
+ void * refCon,
+ UInt32 * count) FOURWORDINLINE(0x203C, 0x000C, 0x0028, 0xABEE);
+
+EXTERN_API( void )
+CMDisposeProfileSearch (CMProfileSearchRef search) FOURWORDINLINE(0x203C, 0x0004, 0x0029, 0xABEE);
+
+EXTERN_API( CMError )
+CMSearchGetIndProfile (CMProfileSearchRef search,
+ UInt32 index,
+ CMProfileRef * prof) FOURWORDINLINE(0x203C, 0x000C, 0x002A, 0xABEE);
+
+EXTERN_API( CMError )
+CMSearchGetIndProfileFileSpec (CMProfileSearchRef search,
+ UInt32 index,
+ FSSpec * profileFile) FOURWORDINLINE(0x203C, 0x000C, 0x002B, 0xABEE);
+
+EXTERN_API( CMError )
+CMProfileIdentifierFolderSearch (CMProfileIdentifierPtr ident,
+ UInt32 * matchedCount,
+ CMProfileSearchRef * searchResult) FOURWORDINLINE(0x203C, 0x000C, 0x003F, 0xABEE);
+
+EXTERN_API( CMError )
+CMProfileIdentifierListSearch (CMProfileIdentifierPtr ident,
+ CMProfileRef * profileList,
+ UInt32 listSize,
+ UInt32 * matchedCount,
+ CMProfileRef * matchedList) FOURWORDINLINE(0x203C, 0x0014, 0x0040, 0xABEE);
+
+EXTERN_API( CMError )
+CMIterateColorSyncFolder (CMProfileIterateUPP proc,
+ UInt32 * seed,
+ UInt32 * count,
+ void * refCon) FOURWORDINLINE(0x203C, 0x0010, 0x0058, 0xABEE);
+
+EXTERN_API( CMError )
+NCMUnflattenProfile (CMProfileLocation * targetLocation,
+ CMFlattenUPP proc,
+ void * refCon,
+ Boolean * preferredCMMnotfound) FOURWORDINLINE(0x203C, 0x0010, 0x0065, 0xABEE);
+
+/* Utilities */
+#if TARGET_OS_MAC
+EXTERN_API( CMError )
+CMGetColorSyncFolderSpec (short vRefNum,
+ Boolean createFolder,
+ short * foundVRefNum,
+ long * foundDirID) FOURWORDINLINE(0x203C, 0x000C, 0x0011, 0xABEE);
+
+#endif /* TARGET_OS_MAC */
+
+#if TARGET_OS_WIN32 || TARGET_OS_UNIX
+#if CALL_NOT_IN_CARBON
+EXTERN_API( CMError )
+CMGetColorSyncFolderPath (Boolean createFolder,
+ char * lpBuffer,
+ UInt32 uSize);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_OS_WIN32 || TARGET_OS_UNIX */
+
+EXTERN_API( CMError )
+CMGetCWInfo (CMWorldRef cw,
+ CMCWInfoRecord * info) FOURWORDINLINE(0x203C, 0x0008, 0x001A, 0xABEE);
+
+#if TARGET_API_MAC_OS8
+#if CALL_NOT_IN_CARBON
+EXTERN_API( CMError )
+CMConvertProfile2to1 (CMProfileRef profv2,
+ CMProfileHandle * profv1) FOURWORDINLINE(0x203C, 0x0008, 0x0045, 0xABEE);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_API_MAC_OS8 */
+
+EXTERN_API( CMError )
+CMGetPreferredCMM (OSType * cmmType,
+ Boolean * preferredCMMnotfound) FOURWORDINLINE(0x203C, 0x0008, 0x005E, 0xABEE);
+
+EXTERN_API( CMError )
+CMIterateCMMInfo (CMMIterateUPP proc,
+ UInt32 * count,
+ void * refCon) FOURWORDINLINE(0x203C, 0x000C, 0x0063, 0xABEE);
+
+EXTERN_API( CMError )
+CMGetColorSyncVersion (UInt32 * version) FOURWORDINLINE(0x203C, 0x0004, 0x0066, 0xABEE);
+
+EXTERN_API( CMError )
+CMLaunchControlPanel (UInt32 flags);
+
+/* ColorSpace conversion functions */
+EXTERN_API( CMError )
+CMConvertXYZToLab (const CMColor * src,
+ const CMXYZColor * white,
+ CMColor * dst,
+ UInt32 count) FOURWORDINLINE(0x203C, 0x0010, 0x004B, 0xABEE);
+
+EXTERN_API( CMError )
+CMConvertLabToXYZ (const CMColor * src,
+ const CMXYZColor * white,
+ CMColor * dst,
+ UInt32 count) FOURWORDINLINE(0x203C, 0x0010, 0x004C, 0xABEE);
+
+EXTERN_API( CMError )
+CMConvertXYZToLuv (const CMColor * src,
+ const CMXYZColor * white,
+ CMColor * dst,
+ UInt32 count) FOURWORDINLINE(0x203C, 0x0010, 0x004D, 0xABEE);
+
+EXTERN_API( CMError )
+CMConvertLuvToXYZ (const CMColor * src,
+ const CMXYZColor * white,
+ CMColor * dst,
+ UInt32 count) FOURWORDINLINE(0x203C, 0x0010, 0x004E, 0xABEE);
+
+EXTERN_API( CMError )
+CMConvertXYZToYxy (const CMColor * src,
+ CMColor * dst,
+ UInt32 count) FOURWORDINLINE(0x203C, 0x000C, 0x004F, 0xABEE);
+
+EXTERN_API( CMError )
+CMConvertYxyToXYZ (const CMColor * src,
+ CMColor * dst,
+ UInt32 count) FOURWORDINLINE(0x203C, 0x000C, 0x0050, 0xABEE);
+
+EXTERN_API( CMError )
+CMConvertRGBToHLS (const CMColor * src,
+ CMColor * dst,
+ UInt32 count) FOURWORDINLINE(0x203C, 0x000C, 0x0051, 0xABEE);
+
+EXTERN_API( CMError )
+CMConvertHLSToRGB (const CMColor * src,
+ CMColor * dst,
+ UInt32 count) FOURWORDINLINE(0x203C, 0x000C, 0x0052, 0xABEE);
+
+EXTERN_API( CMError )
+CMConvertRGBToHSV (const CMColor * src,
+ CMColor * dst,
+ UInt32 count) FOURWORDINLINE(0x203C, 0x000C, 0x0053, 0xABEE);
+
+EXTERN_API( CMError )
+CMConvertHSVToRGB (const CMColor * src,
+ CMColor * dst,
+ UInt32 count) FOURWORDINLINE(0x203C, 0x000C, 0x0054, 0xABEE);
+
+EXTERN_API( CMError )
+CMConvertRGBToGray (const CMColor * src,
+ CMColor * dst,
+ UInt32 count) FOURWORDINLINE(0x203C, 0x000C, 0x0055, 0xABEE);
+
+EXTERN_API( CMError )
+CMConvertXYZToFixedXYZ (const CMXYZColor * src,
+ CMFixedXYZColor * dst,
+ UInt32 count) FOURWORDINLINE(0x203C, 0x000C, 0x0056, 0xABEE);
+
+EXTERN_API( CMError )
+CMConvertFixedXYZToXYZ (const CMFixedXYZColor * src,
+ CMXYZColor * dst,
+ UInt32 count) FOURWORDINLINE(0x203C, 0x000C, 0x0057, 0xABEE);
+
+
+/* PS-related */
+EXTERN_API( CMError )
+CMGetPS2ColorSpace (CMProfileRef srcProf,
+ UInt32 flags,
+ CMFlattenUPP proc,
+ void * refCon,
+ Boolean * preferredCMMnotfound) FOURWORDINLINE(0x203C, 0x0014, 0x002E, 0xABEE);
+
+EXTERN_API( CMError )
+CMGetPS2ColorRenderingIntent (CMProfileRef srcProf,
+ UInt32 flags,
+ CMFlattenUPP proc,
+ void * refCon,
+ Boolean * preferredCMMnotfound) FOURWORDINLINE(0x203C, 0x0014, 0x002F, 0xABEE);
+
+EXTERN_API( CMError )
+CMGetPS2ColorRendering (CMProfileRef srcProf,
+ CMProfileRef dstProf,
+ UInt32 flags,
+ CMFlattenUPP proc,
+ void * refCon,
+ Boolean * preferredCMMnotfound) FOURWORDINLINE(0x203C, 0x0018, 0x0030, 0xABEE);
+
+EXTERN_API( CMError )
+CMGetPS2ColorRenderingVMSize (CMProfileRef srcProf,
+ CMProfileRef dstProf,
+ UInt32 * vmSize,
+ Boolean * preferredCMMnotfound) FOURWORDINLINE(0x203C, 0x0010, 0x003D, 0xABEE);
+
+
+/* ColorSync 1.0 functions which have parallel 2.0 counterparts */
+#if TARGET_API_MAC_OS8
+#if CALL_NOT_IN_CARBON
+EXTERN_API( CMError )
+CWNewColorWorld (CMWorldRef * cw,
+ CMProfileHandle src,
+ CMProfileHandle dst) FOURWORDINLINE(0x203C, 0x000C, 0x0000, 0xABEE);
+
+EXTERN_API( CMError )
+ConcatenateProfiles (CMProfileHandle thru,
+ CMProfileHandle dst,
+ CMProfileHandle * newDst) FOURWORDINLINE(0x203C, 0x000C, 0x000C, 0xABEE);
+
+EXTERN_API( CMError )
+CMBeginMatching (CMProfileHandle src,
+ CMProfileHandle dst,
+ CMMatchRef * myRef) FOURWORDINLINE(0x203C, 0x000C, 0x000A, 0xABEE);
+
+EXTERN_API( void )
+CMDrawMatchedPicture (PicHandle myPicture,
+ CMProfileHandle dst,
+ Rect * myRect) FOURWORDINLINE(0x203C, 0x000C, 0x0009, 0xABEE);
+
+EXTERN_API( CMError )
+CMUseProfileComment (CMProfileHandle profile) FOURWORDINLINE(0x203C, 0x0004, 0x0008, 0xABEE);
+
+EXTERN_API( void )
+CMGetProfileName (CMProfileHandle myProfile,
+ CMIString * IStringResult) FOURWORDINLINE(0x203C, 0x0008, 0x000E, 0xABEE);
+
+EXTERN_API( long )
+CMGetProfileAdditionalDataOffset (CMProfileHandle myProfile) FOURWORDINLINE(0x203C, 0x0004, 0x000F, 0xABEE);
+
+
+/* ProfileResponder functions */
+EXTERN_API( CMError )
+GetProfile (OSType deviceType,
+ long refNum,
+ CMProfileHandle aProfile,
+ CMProfileHandle * returnedProfile) FOURWORDINLINE(0x203C, 0x0010, 0x0005, 0xABEE);
+
+EXTERN_API( CMError )
+SetProfile (OSType deviceType,
+ long refNum,
+ CMProfileHandle newProfile) FOURWORDINLINE(0x203C, 0x000C, 0x0006, 0xABEE);
+
+EXTERN_API( CMError )
+SetProfileDescription (OSType deviceType,
+ long refNum,
+ long deviceData,
+ CMProfileHandle hProfile) FOURWORDINLINE(0x203C, 0x0010, 0x0010, 0xABEE);
+
+EXTERN_API( CMError )
+GetIndexedProfile (OSType deviceType,
+ long refNum,
+ CMProfileSearchRecordHandle search,
+ CMProfileHandle * returnProfile,
+ long * index) FOURWORDINLINE(0x203C, 0x0014, 0x0012, 0xABEE);
+
+EXTERN_API( CMError )
+DeleteDeviceProfile (OSType deviceType,
+ long refNum,
+ CMProfileHandle deleteMe) FOURWORDINLINE(0x203C, 0x000C, 0x0013, 0xABEE);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if OLDROUTINENAMES
+/* constants */
+
+typedef CMFlattenProcPtr CMFlattenProc;
+typedef CMBitmapCallBackProcPtr CMBitmapCallBackProc;
+typedef CMProfileFilterProcPtr CMProfileFilterProc;
+enum {
+ CMTrap = cmTrap,
+ CMBeginProfile = cmBeginProfile,
+ CMEndProfile = cmEndProfile,
+ CMEnableMatching = cmEnableMatching,
+ CMDisableMatching = cmDisableMatching
+};
+
+/* 1.0 Error codes, for compatibility with older applications. 1.0 CMM's may return obsolete error codes */
+enum {
+ CMNoError = 0, /* obsolete name, use noErr */
+ CMProfileError = cmProfileError,
+ CMMethodError = cmMethodError,
+ CMMemFullError = -172, /* obsolete, 2.0 uses memFullErr */
+ CMUnimplementedError = -173, /* obsolete, 2.0 uses unimpErr */
+ CMParamError = -174, /* obsolete, 2.0 uses paramErr */
+ CMMethodNotFound = cmMethodNotFound,
+ CMProfileNotFound = cmProfileNotFound,
+ CMProfilesIdentical = cmProfilesIdentical,
+ CMCantConcatenateError = cmCantConcatenateError,
+ CMCantXYZ = cmCantXYZ,
+ CMCantDeleteProfile = cmCantDeleteProfile,
+ CMUnsupportedDataType = cmUnsupportedDataType,
+ CMNoCurrentProfile = cmNoCurrentProfile
+};
+
+enum {
+ qdSystemDevice = cmSystemDevice,
+ qdGDevice = cmGDevice
+};
+
+
+enum {
+ kMatchCMMType = cmMatchCMMType,
+ kMatchApplProfileVersion = cmMatchApplProfileVersion,
+ kMatchDataType = cmMatchDataType,
+ kMatchDeviceType = cmMatchDeviceType,
+ kMatchDeviceManufacturer = cmMatchDeviceManufacturer,
+ kMatchDeviceModel = cmMatchDeviceModel,
+ kMatchDeviceAttributes = cmMatchDeviceAttributes,
+ kMatchFlags = cmMatchFlags,
+ kMatchOptions = cmMatchOptions,
+ kMatchWhite = cmMatchWhite,
+ kMatchBlack = cmMatchBlack
+};
+
+/* types */
+typedef CMCMYKColor CMYKColor;
+typedef CMWorldRef CWorld;
+typedef long * CMGamutResult;
+/* functions */
+#define EndMatching(myRef) CMEndMatching(myRef)
+#define EnableMatching(enableIt) CMEnableMatchingComment(enableIt)
+#define GetColorSyncFolderSpec(vRefNum, createFolder, foundVRefNum, foundDirID) CMGetColorSyncFolderSpec(vRefNum, createFolder, foundVRefNum, foundDirID)
+#define BeginMatching(src, dst, myRef) CMBeginMatching(src, dst, myRef)
+#define DrawMatchedPicture(myPicture, dst, myRect) CMDrawMatchedPicture(myPicture, dst, myRect)
+#define UseProfile(profile) CMUseProfileComment(profile)
+#define GetProfileName(myProfile, IStringResult) CMGetProfileName(myProfile, IStringResult)
+#define GetProfileAdditionalDataOffset(myProfile) CMGetProfileAdditionalDataOffset(myProfile)
+#endif /* OLDROUTINENAMES */
+
+/* Deprecated stuff*/
+
+/* PrGeneral parameter blocks */
+
+struct TEnableColorMatchingBlk {
+ short iOpCode;
+ short iError;
+ long lReserved;
+ THPrint hPrint;
+ Boolean fEnableIt;
+ SInt8 filler;
+};
+typedef struct TEnableColorMatchingBlk TEnableColorMatchingBlk;
+
+struct TRegisterProfileBlk {
+ short iOpCode;
+ short iError;
+ long lReserved;
+ THPrint hPrint;
+ Boolean fRegisterIt;
+ SInt8 filler;
+};
+typedef struct TRegisterProfileBlk TRegisterProfileBlk;
+#endif /* TARGET_API_MAC_OS8 */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CMAPPLICATION__ */
+
diff --git a/include/qt/CMCalibrator.h b/include/qt/CMCalibrator.h
new file mode 100644
index 000000000..2fe58a625
--- /dev/null
+++ b/include/qt/CMCalibrator.h
@@ -0,0 +1,213 @@
+/*
+ File: CMCalibrator.h
+
+ Contains: ColorSync Calibration API
+
+ Version: Technology: ColorSync 2.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1998-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CMCALIBRATOR__
+#define __CMCALIBRATOR__
+
+#ifndef __CMAPPLICATION__
+#include "CMApplication.h"
+#endif
+
+#ifndef __DISPLAYS__
+#include "Displays.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+typedef CALLBACK_API( void , CalibrateEventProcPtr )(EventRecord *event);
+typedef STACK_UPP_TYPE(CalibrateEventProcPtr) CalibrateEventUPP;
+
+/* Interface for new ColorSync monitor calibrators (ColorSync 2.6 and greater) */
+
+enum {
+ kCalibratorNamePrefix = FOUR_CHAR_CODE('cali')
+};
+
+
+struct CalibratorInfo {
+ UInt32 dataSize; /* Size of this structure - compatibility */
+ AVIDType displayID; /* Contains an hDC on Win32 */
+ UInt32 profileLocationSize; /* Max size for returned profile location */
+ CMProfileLocation * profileLocationPtr; /* For returning the profile */
+ CalibrateEventUPP eventProc; /* Ignored on Win32 */
+ Boolean isGood; /* true or false */
+};
+typedef struct CalibratorInfo CalibratorInfo;
+typedef CALLBACK_API( Boolean , CanCalibrateProcPtr )(AVIDType displayID, Str255 errMessage);
+typedef CALLBACK_API( OSErr , CalibrateProcPtr )(CalibratorInfo *theInfo);
+typedef STACK_UPP_TYPE(CanCalibrateProcPtr) CanCalibrateUPP;
+typedef STACK_UPP_TYPE(CalibrateProcPtr) CalibrateUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(CalibrateEventUPP)
+ NewCalibrateEventUPP (CalibrateEventProcPtr userRoutine);
+
+ EXTERN_API(CanCalibrateUPP)
+ NewCanCalibrateUPP (CanCalibrateProcPtr userRoutine);
+
+ EXTERN_API(CalibrateUPP)
+ NewCalibrateUPP (CalibrateProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeCalibrateEventUPP (CalibrateEventUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeCanCalibrateUPP (CanCalibrateUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeCalibrateUPP (CalibrateUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeCalibrateEventUPP (EventRecord * event,
+ CalibrateEventUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeCanCalibrateUPP (AVIDType displayID,
+ Str255 errMessage,
+ CanCalibrateUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeCalibrateUPP (CalibratorInfo * theInfo,
+ CalibrateUPP userUPP);
+
+#else
+ enum { uppCalibrateEventProcInfo = 0x000000C0 }; /* pascal no_return_value Func(4_bytes) */
+ enum { uppCanCalibrateProcInfo = 0x000003D0 }; /* pascal 1_byte Func(4_bytes, 4_bytes) */
+ enum { uppCalibrateProcInfo = 0x000000E0 }; /* pascal 2_bytes Func(4_bytes) */
+ #define NewCalibrateEventUPP(userRoutine) (CalibrateEventUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCalibrateEventProcInfo, GetCurrentArchitecture())
+ #define NewCanCalibrateUPP(userRoutine) (CanCalibrateUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCanCalibrateProcInfo, GetCurrentArchitecture())
+ #define NewCalibrateUPP(userRoutine) (CalibrateUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCalibrateProcInfo, GetCurrentArchitecture())
+ #define DisposeCalibrateEventUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeCanCalibrateUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeCalibrateUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeCalibrateEventUPP(event, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppCalibrateEventProcInfo, (event))
+ #define InvokeCanCalibrateUPP(displayID, errMessage, userUPP) (Boolean)CALL_TWO_PARAMETER_UPP((userUPP), uppCanCalibrateProcInfo, (displayID), (errMessage))
+ #define InvokeCalibrateUPP(theInfo, userUPP) (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppCalibrateProcInfo, (theInfo))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewCalibrateEventProc(userRoutine) NewCalibrateEventUPP(userRoutine)
+#define NewCanCalibrateProc(userRoutine) NewCanCalibrateUPP(userRoutine)
+#define NewCalibrateProc(userRoutine) NewCalibrateUPP(userRoutine)
+#define CallCalibrateEventProc(userRoutine, event) InvokeCalibrateEventUPP(event, userRoutine)
+#define CallCanCalibrateProc(userRoutine, displayID, errMessage) InvokeCanCalibrateUPP(displayID, errMessage, userRoutine)
+#define CallCalibrateProc(userRoutine, theInfo) InvokeCalibrateUPP(theInfo, userRoutine)
+#if OLDROUTINENAMES
+/* Interface for original ColorSync monitor calibrators (ColorSync 2.5.x) */
+enum {
+ kOldCalibratorNamePrefix = FOUR_CHAR_CODE('Cali')
+};
+
+
+struct OldCalibratorInfo {
+ AVIDType displayID; /* Contains an hDC on Win32 */
+ CMProfileLocation profileLocation;
+ CalibrateEventUPP eventProc; /* Ignored on Win32 */
+ UInt32 reserved; /* Unused */
+ UInt32 flags; /* Unused */
+ Boolean isGood; /* true or false */
+ SInt8 byteFiller; /* Unused */
+};
+typedef struct OldCalibratorInfo OldCalibratorInfo;
+typedef CALLBACK_API( Boolean , OldCanCalibrateProcPtr )(AVIDType displayID);
+typedef CALLBACK_API( OSErr , OldCalibrateProcPtr )(OldCalibratorInfo *theInfo);
+typedef STACK_UPP_TYPE(OldCanCalibrateProcPtr) OldCanCalibrateUPP;
+typedef STACK_UPP_TYPE(OldCalibrateProcPtr) OldCalibrateUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(OldCanCalibrateUPP)
+ NewOldCanCalibrateUPP (OldCanCalibrateProcPtr userRoutine);
+
+ EXTERN_API(OldCalibrateUPP)
+ NewOldCalibrateUPP (OldCalibrateProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeOldCanCalibrateUPP (OldCanCalibrateUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeOldCalibrateUPP (OldCalibrateUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeOldCanCalibrateUPP (AVIDType displayID,
+ OldCanCalibrateUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeOldCalibrateUPP (OldCalibratorInfo * theInfo,
+ OldCalibrateUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppOldCanCalibrateProcInfo = 0x000000D0 }; /* pascal 1_byte Func(4_bytes) */
+ enum { uppOldCalibrateProcInfo = 0x000000E0 }; /* pascal 2_bytes Func(4_bytes) */
+ #define NewOldCanCalibrateUPP(userRoutine) (OldCanCalibrateUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppOldCanCalibrateProcInfo, GetCurrentArchitecture())
+ #define NewOldCalibrateUPP(userRoutine) (OldCalibrateUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppOldCalibrateProcInfo, GetCurrentArchitecture())
+ #define DisposeOldCanCalibrateUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeOldCalibrateUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeOldCanCalibrateUPP(displayID, userUPP) (Boolean)CALL_ONE_PARAMETER_UPP((userUPP), uppOldCanCalibrateProcInfo, (displayID))
+ #define InvokeOldCalibrateUPP(theInfo, userUPP) (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppOldCalibrateProcInfo, (theInfo))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewOldCanCalibrateProc(userRoutine) NewOldCanCalibrateUPP(userRoutine)
+#define NewOldCalibrateProc(userRoutine) NewOldCalibrateUPP(userRoutine)
+#define CallOldCanCalibrateProc(userRoutine, displayID) InvokeOldCanCalibrateUPP(displayID, userRoutine)
+#define CallOldCalibrateProc(userRoutine, theInfo) InvokeOldCalibrateUPP(theInfo, userRoutine)
+#endif /* OLDROUTINENAMES */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CMCALIBRATOR__ */
+
diff --git a/include/qt/CMComponent.h b/include/qt/CMComponent.h
new file mode 100644
index 000000000..74d74d089
--- /dev/null
+++ b/include/qt/CMComponent.h
@@ -0,0 +1,39 @@
+/*
+ File: CMComponent.h
+
+ Contains: ColorSync CMM Component API
+
+ Version: Technology: ColorSync 2.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1993-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CMCOMPONENT__
+#define __CMCOMPONENT__
+
+/*
+ This file has been included to allow older source code
+ to #include "CMComponent.h". Please update your source
+ code to directly #include "CMMComponent.h"
+ and #include "CMPRComponent.h"
+
+*/
+/* #include the two ColorSync 2.0 files equivalent to the v. 1.0 file */
+#ifndef __CMMCOMPONENT__
+#include "CMMComponent.h"
+#endif
+
+#ifndef __CMPRCOMPONENT__
+#include "CMPRComponent.h"
+#endif
+
+
+
+#endif /* __CMCOMPONENT__ */
+
diff --git a/include/qt/CMConversions.h b/include/qt/CMConversions.h
new file mode 100644
index 000000000..f8186f54c
--- /dev/null
+++ b/include/qt/CMConversions.h
@@ -0,0 +1,182 @@
+/*
+ File: CMConversions.h
+
+ Contains: ColorSync Conversion Component API
+
+ Version: Technology: ColorSync 2.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1993-2001 by Apple Computer, Inc. All rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CMCONVERSIONS__
+#define __CMCONVERSIONS__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __COMPONENTS__
+#include "Components.h"
+#endif
+
+#ifndef __CMAPPLICATION__
+#include "CMApplication.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ CMConversionInterfaceVersion = 1
+};
+
+/* Component function selectors */
+enum {
+ kCMXYZToLab = 0,
+ kCMLabToXYZ = 1,
+ kCMXYZToLuv = 2,
+ kCMLuvToXYZ = 3,
+ kCMXYZToYxy = 4,
+ kCMYxyToXYZ = 5,
+ kCMRGBToHLS = 6,
+ kCMHLSToRGB = 7,
+ kCMRGBToHSV = 8,
+ kCMHSVToRGB = 9,
+ kCMRGBToGRAY = 10,
+ kCMXYZToFixedXYZ = 11,
+ kCMFixedXYZToXYZ = 12
+};
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( ComponentResult )
+CMXYZToLab (ComponentInstance ci,
+ const CMColor * src,
+ const CMXYZColor * white,
+ CMColor * dst,
+ unsigned long count) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0000, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CMLabToXYZ (ComponentInstance ci,
+ const CMColor * src,
+ const CMXYZColor * white,
+ CMColor * dst,
+ unsigned long count) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0001, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CMXYZToLuv (ComponentInstance ci,
+ const CMColor * src,
+ const CMXYZColor * white,
+ CMColor * dst,
+ unsigned long count) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0002, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CMLuvToXYZ (ComponentInstance ci,
+ const CMColor * src,
+ const CMXYZColor * white,
+ CMColor * dst,
+ unsigned long count) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0003, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CMXYZToYxy (ComponentInstance ci,
+ const CMColor * src,
+ CMColor * dst,
+ unsigned long count) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0004, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CMYxyToXYZ (ComponentInstance ci,
+ const CMColor * src,
+ CMColor * dst,
+ unsigned long count) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0005, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CMRGBToHLS (ComponentInstance ci,
+ const CMColor * src,
+ CMColor * dst,
+ unsigned long count) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0006, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CMHLSToRGB (ComponentInstance ci,
+ const CMColor * src,
+ CMColor * dst,
+ unsigned long count) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0007, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CMRGBToHSV (ComponentInstance ci,
+ const CMColor * src,
+ CMColor * dst,
+ unsigned long count) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0008, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CMHSVToRGB (ComponentInstance ci,
+ const CMColor * src,
+ CMColor * dst,
+ unsigned long count) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0009, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CMRGBToGray (ComponentInstance ci,
+ const CMColor * src,
+ CMColor * dst,
+ unsigned long count) FIVEWORDINLINE(0x2F3C, 0x000C, 0x000A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CMXYZToFixedXYZ (ComponentInstance ci,
+ const CMXYZColor * src,
+ CMFixedXYZColor * dst,
+ unsigned long count) FIVEWORDINLINE(0x2F3C, 0x000C, 0x000B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CMFixedXYZToXYZ (ComponentInstance ci,
+ const CMFixedXYZColor * src,
+ CMXYZColor * dst,
+ unsigned long count) FIVEWORDINLINE(0x2F3C, 0x000C, 0x000C, 0x7000, 0xA82A);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CMCONVERSIONS__ */
+
diff --git a/include/qt/CMICCProfile.h b/include/qt/CMICCProfile.h
new file mode 100644
index 000000000..98f06f57a
--- /dev/null
+++ b/include/qt/CMICCProfile.h
@@ -0,0 +1,932 @@
+/*
+ File: CMICCProfile.h
+
+ Contains: ICC Profile Format Definitions
+
+ Version: Technology: ColorSync 2.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CMICCPROFILE__
+#define __CMICCPROFILE__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* ICC Profile version constants */
+enum {
+ cmICCProfileVersion2 = 0x02000000,
+ cmICCProfileVersion21 = 0x02100000,
+ cmCS2ProfileVersion = cmICCProfileVersion2,
+ cmCS1ProfileVersion = 0x00000100 /* ColorSync 1.0 profile version */
+};
+
+/* Current Major version number */
+enum {
+ cmProfileMajorVersionMask = (long)0xFF000000,
+ cmCurrentProfileMajorVersion = 0x02000000
+};
+
+/* magic cookie number for anonymous file ID */
+enum {
+ cmMagicNumber = FOUR_CHAR_CODE('acsp')
+};
+
+
+/************************************************************************/
+/*************** ColorSync 2.0 profile specification ********************/
+/************************************************************************/
+/**** flags field ****/
+enum {
+ cmICCReservedFlagsMask = 0x0000FFFF, /* these bits of the flags field are defined and reserved by ICC */
+ cmEmbeddedMask = 0x00000001, /* if bit 0 is 0 then not embedded profile, if 1 then embedded profile */
+ cmEmbeddedUseMask = 0x00000002, /* if bit 1 is 0 then ok to use anywhere, if 1 then ok to use as embedded profile only */
+ cmCMSReservedFlagsMask = (long)0xFFFF0000, /* these bits of the flags field are defined and reserved by CMS vendor */
+ cmQualityMask = 0x00030000, /* if bits 16-17 is 0 then normal, if 1 then draft, if 2 then best */
+ cmInterpolationMask = 0x00040000, /* if bit 18 is 0 then interpolation, if 1 then lookup only */
+ cmGamutCheckingMask = 0x00080000 /* if bit 19 is 0 then create gamut checking info, if 1 then no gamut checking info */
+};
+
+/* copyright-protection flag options */
+enum {
+ cmEmbeddedProfile = 0, /* 0 is not embedded profile, 1 is embedded profile */
+ cmEmbeddedUse = 1 /* 0 is to use anywhere, 1 is to use as embedded profile only */
+};
+
+/* speed and quality flag options */
+enum {
+ cmNormalMode = 0, /* it uses the least significent two bits in the high word of flag */
+ cmDraftMode = 1, /* it should be evaulated like this: right shift 16 bits first, mask off the */
+ cmBestMode = 2 /* high 14 bits, and then compare with the enum to determine the option value */
+};
+
+
+/**** deviceAttributes fields ****/
+/* deviceAttributes[0] is defined by and reserved for device vendors */
+/* deviceAttributes[1] is defined by and reserved for ICC */
+/* The following bits of deviceAttributes[1] are currently defined */
+enum {
+ cmReflectiveTransparentMask = 0x00000001, /* if bit 0 is 0 then reflective media, if 1 then transparency media */
+ cmGlossyMatteMask = 0x00000002 /* if bit 1 is 0 then glossy, if 1 then matte */
+};
+
+/* device/media attributes element values */
+enum {
+ cmReflective = 0, /* if bit 0 is 0 then reflective media, if 1 then transparency media */
+ cmGlossy = 1 /* if bit 1 is 0 then glossy, if 1 then matte */
+};
+
+
+/**** renderingIntent field ****/
+enum {
+ cmPerceptual = 0, /* Photographic images */
+ cmRelativeColorimetric = 1, /* Logo Colors */
+ cmSaturation = 2, /* Business graphics */
+ cmAbsoluteColorimetric = 3 /* Logo Colors */
+};
+
+
+
+/* data type element values */
+enum {
+ cmAsciiData = 0,
+ cmBinaryData = 1
+};
+
+/* screen encodings */
+enum {
+ cmPrtrDefaultScreens = 0, /* Use printer default screens. 0 is false, 1 is ture */
+ cmLinesPer = 1 /* 0 is LinesPerCm, 1 is LinesPerInch */
+};
+
+/* 2.0 tag type information */
+enum {
+ cmNumHeaderElements = 10
+};
+
+/* public tags */
+enum {
+ cmAToB0Tag = FOUR_CHAR_CODE('A2B0'),
+ cmAToB1Tag = FOUR_CHAR_CODE('A2B1'),
+ cmAToB2Tag = FOUR_CHAR_CODE('A2B2'),
+ cmBlueColorantTag = FOUR_CHAR_CODE('bXYZ'),
+ cmBlueTRCTag = FOUR_CHAR_CODE('bTRC'),
+ cmBToA0Tag = FOUR_CHAR_CODE('B2A0'),
+ cmBToA1Tag = FOUR_CHAR_CODE('B2A1'),
+ cmBToA2Tag = FOUR_CHAR_CODE('B2A2'),
+ cmCalibrationDateTimeTag = FOUR_CHAR_CODE('calt'),
+ cmCharTargetTag = FOUR_CHAR_CODE('targ'),
+ cmCopyrightTag = FOUR_CHAR_CODE('cprt'),
+ cmDeviceMfgDescTag = FOUR_CHAR_CODE('dmnd'),
+ cmDeviceModelDescTag = FOUR_CHAR_CODE('dmdd'),
+ cmGamutTag = FOUR_CHAR_CODE('gamt'),
+ cmGrayTRCTag = FOUR_CHAR_CODE('kTRC'),
+ cmGreenColorantTag = FOUR_CHAR_CODE('gXYZ'),
+ cmGreenTRCTag = FOUR_CHAR_CODE('gTRC'),
+ cmLuminanceTag = FOUR_CHAR_CODE('lumi'),
+ cmMeasurementTag = FOUR_CHAR_CODE('meas'),
+ cmMediaBlackPointTag = FOUR_CHAR_CODE('bkpt'),
+ cmMediaWhitePointTag = FOUR_CHAR_CODE('wtpt'),
+ cmNamedColorTag = FOUR_CHAR_CODE('ncol'),
+ cmNamedColor2Tag = FOUR_CHAR_CODE('ncl2'),
+ cmPreview0Tag = FOUR_CHAR_CODE('pre0'),
+ cmPreview1Tag = FOUR_CHAR_CODE('pre1'),
+ cmPreview2Tag = FOUR_CHAR_CODE('pre2'),
+ cmProfileDescriptionTag = FOUR_CHAR_CODE('desc'),
+ cmProfileSequenceDescTag = FOUR_CHAR_CODE('pseq'),
+ cmPS2CRD0Tag = FOUR_CHAR_CODE('psd0'),
+ cmPS2CRD1Tag = FOUR_CHAR_CODE('psd1'),
+ cmPS2CRD2Tag = FOUR_CHAR_CODE('psd2'),
+ cmPS2CRD3Tag = FOUR_CHAR_CODE('psd3'),
+ cmPS2CSATag = FOUR_CHAR_CODE('ps2s'),
+ cmPS2RenderingIntentTag = FOUR_CHAR_CODE('ps2i'),
+ cmRedColorantTag = FOUR_CHAR_CODE('rXYZ'),
+ cmRedTRCTag = FOUR_CHAR_CODE('rTRC'),
+ cmScreeningDescTag = FOUR_CHAR_CODE('scrd'),
+ cmScreeningTag = FOUR_CHAR_CODE('scrn'),
+ cmTechnologyTag = FOUR_CHAR_CODE('tech'),
+ cmUcrBgTag = FOUR_CHAR_CODE('bfd '),
+ cmViewingConditionsDescTag = FOUR_CHAR_CODE('vued'),
+ cmViewingConditionsTag = FOUR_CHAR_CODE('view')
+};
+
+/* custom tags */
+enum {
+ cmPS2CRDVMSizeTag = FOUR_CHAR_CODE('psvm'),
+ cmVideoCardGammaTag = FOUR_CHAR_CODE('vcgt'),
+ cmMakeAndModelTag = FOUR_CHAR_CODE('mmod')
+};
+
+/* technology tag descriptions */
+enum {
+ cmTechnologyFilmScanner = FOUR_CHAR_CODE('fscn'),
+ cmTechnologyReflectiveScanner = FOUR_CHAR_CODE('rscn'),
+ cmTechnologyInkJetPrinter = FOUR_CHAR_CODE('ijet'),
+ cmTechnologyThermalWaxPrinter = FOUR_CHAR_CODE('twax'),
+ cmTechnologyElectrophotographicPrinter = FOUR_CHAR_CODE('epho'),
+ cmTechnologyElectrostaticPrinter = FOUR_CHAR_CODE('esta'),
+ cmTechnologyDyeSublimationPrinter = FOUR_CHAR_CODE('dsub'),
+ cmTechnologyPhotographicPaperPrinter = FOUR_CHAR_CODE('rpho'),
+ cmTechnologyFilmWriter = FOUR_CHAR_CODE('fprn'),
+ cmTechnologyVideoMonitor = FOUR_CHAR_CODE('vidm'),
+ cmTechnologyVideoCamera = FOUR_CHAR_CODE('vidc'),
+ cmTechnologyProjectionTelevision = FOUR_CHAR_CODE('pjtv'),
+ cmTechnologyCRTDisplay = FOUR_CHAR_CODE('CRT '),
+ cmTechnologyPMDisplay = FOUR_CHAR_CODE('PMD '),
+ cmTechnologyAMDisplay = FOUR_CHAR_CODE('AMD '),
+ cmTechnologyPhotoCD = FOUR_CHAR_CODE('KPCD'),
+ cmTechnologyPhotoImageSetter = FOUR_CHAR_CODE('imgs'),
+ cmTechnologyGravure = FOUR_CHAR_CODE('grav'),
+ cmTechnologyOffsetLithography = FOUR_CHAR_CODE('offs'),
+ cmTechnologySilkscreen = FOUR_CHAR_CODE('silk'),
+ cmTechnologyFlexography = FOUR_CHAR_CODE('flex')
+};
+
+/* public type signatures */
+enum {
+ cmSigCurveType = FOUR_CHAR_CODE('curv'),
+ cmSigDataType = FOUR_CHAR_CODE('data'),
+ cmSigDateTimeType = FOUR_CHAR_CODE('dtim'),
+ cmSigLut16Type = FOUR_CHAR_CODE('mft2'),
+ cmSigLut8Type = FOUR_CHAR_CODE('mft1'),
+ cmSigMeasurementType = FOUR_CHAR_CODE('meas'),
+ cmSigNamedColorType = FOUR_CHAR_CODE('ncol'),
+ cmSigNamedColor2Type = FOUR_CHAR_CODE('ncl2'),
+ cmSigProfileDescriptionType = FOUR_CHAR_CODE('desc'),
+ cmSigScreeningType = FOUR_CHAR_CODE('scrn'),
+ cmSigS15Fixed16Type = FOUR_CHAR_CODE('sf32'),
+ cmSigSignatureType = FOUR_CHAR_CODE('sig '),
+ cmSigTextType = FOUR_CHAR_CODE('text'),
+ cmSigU16Fixed16Type = FOUR_CHAR_CODE('uf32'),
+ cmSigU1Fixed15Type = FOUR_CHAR_CODE('uf16'),
+ cmSigUInt32Type = FOUR_CHAR_CODE('ui32'),
+ cmSigUInt64Type = FOUR_CHAR_CODE('ui64'),
+ cmSigUInt8Type = FOUR_CHAR_CODE('ui08'),
+ cmSigUnicodeTextType = FOUR_CHAR_CODE('utxt'),
+ cmSigViewingConditionsType = FOUR_CHAR_CODE('view'),
+ cmSigXYZType = FOUR_CHAR_CODE('XYZ ')
+};
+
+/* custom type signatures */
+enum {
+ cmSigVideoCardGammaType = FOUR_CHAR_CODE('vcgt'),
+ cmSigMakeAndModelType = FOUR_CHAR_CODE('mmod')
+};
+
+
+/* Measurement type encodings */
+/* Measurement Flare */
+enum {
+ cmFlare0 = 0x00000000,
+ cmFlare100 = 0x00000001
+};
+
+/* Measurement Geometry */
+enum {
+ cmGeometryUnknown = 0x00000000,
+ cmGeometry045or450 = 0x00000001,
+ cmGeometry0dord0 = 0x00000002
+};
+
+/* Standard Observer */
+enum {
+ cmStdobsUnknown = 0x00000000,
+ cmStdobs1931TwoDegrees = 0x00000001,
+ cmStdobs1964TenDegrees = 0x00000002
+};
+
+/* Standard Illuminant */
+enum {
+ cmIlluminantUnknown = 0x00000000,
+ cmIlluminantD50 = 0x00000001,
+ cmIlluminantD65 = 0x00000002,
+ cmIlluminantD93 = 0x00000003,
+ cmIlluminantF2 = 0x00000004,
+ cmIlluminantD55 = 0x00000005,
+ cmIlluminantA = 0x00000006,
+ cmIlluminantEquiPower = 0x00000007,
+ cmIlluminantF8 = 0x00000008
+};
+
+/* Spot Function Value */
+enum {
+ cmSpotFunctionUnknown = 0,
+ cmSpotFunctionDefault = 1,
+ cmSpotFunctionRound = 2,
+ cmSpotFunctionDiamond = 3,
+ cmSpotFunctionEllipse = 4,
+ cmSpotFunctionLine = 5,
+ cmSpotFunctionSquare = 6,
+ cmSpotFunctionCross = 7
+};
+
+/* Color Space Signatures */
+enum {
+ cmXYZData = FOUR_CHAR_CODE('XYZ '),
+ cmLabData = FOUR_CHAR_CODE('Lab '),
+ cmLuvData = FOUR_CHAR_CODE('Luv '),
+ cmYxyData = FOUR_CHAR_CODE('Yxy '),
+ cmRGBData = FOUR_CHAR_CODE('RGB '),
+ cmGrayData = FOUR_CHAR_CODE('GRAY'),
+ cmHSVData = FOUR_CHAR_CODE('HSV '),
+ cmHLSData = FOUR_CHAR_CODE('HLS '),
+ cmCMYKData = FOUR_CHAR_CODE('CMYK'),
+ cmCMYData = FOUR_CHAR_CODE('CMY '),
+ cmMCH5Data = FOUR_CHAR_CODE('MCH5'),
+ cmMCH6Data = FOUR_CHAR_CODE('MCH6'),
+ cmMCH7Data = FOUR_CHAR_CODE('MCH7'),
+ cmMCH8Data = FOUR_CHAR_CODE('MCH8'),
+ cm3CLRData = FOUR_CHAR_CODE('3CLR'),
+ cm4CLRData = FOUR_CHAR_CODE('4CLR'),
+ cm5CLRData = FOUR_CHAR_CODE('5CLR'),
+ cm6CLRData = FOUR_CHAR_CODE('6CLR'),
+ cm7CLRData = FOUR_CHAR_CODE('7CLR'),
+ cm8CLRData = FOUR_CHAR_CODE('8CLR'),
+ cmNamedData = FOUR_CHAR_CODE('NAME')
+};
+
+/* profileClass enumerations */
+enum {
+ cmInputClass = FOUR_CHAR_CODE('scnr'),
+ cmDisplayClass = FOUR_CHAR_CODE('mntr'),
+ cmOutputClass = FOUR_CHAR_CODE('prtr'),
+ cmLinkClass = FOUR_CHAR_CODE('link'),
+ cmAbstractClass = FOUR_CHAR_CODE('abst'),
+ cmColorSpaceClass = FOUR_CHAR_CODE('spac'),
+ cmNamedColorClass = FOUR_CHAR_CODE('nmcl')
+};
+
+/* platform enumerations */
+enum {
+ cmMacintosh = FOUR_CHAR_CODE('APPL'),
+ cmMicrosoft = FOUR_CHAR_CODE('MSFT'),
+ cmSolaris = FOUR_CHAR_CODE('SUNW'),
+ cmSiliconGraphics = FOUR_CHAR_CODE('SGI '),
+ cmTaligent = FOUR_CHAR_CODE('TGNT')
+};
+
+/* ColorSync 1.0 elements */
+enum {
+ cmCS1ChromTag = FOUR_CHAR_CODE('chrm'),
+ cmCS1TRCTag = FOUR_CHAR_CODE('trc '),
+ cmCS1NameTag = FOUR_CHAR_CODE('name'),
+ cmCS1CustTag = FOUR_CHAR_CODE('cust')
+};
+
+/* General element data types */
+
+struct CMDateTime {
+ unsigned short year;
+ unsigned short month;
+ unsigned short dayOfTheMonth;
+ unsigned short hours;
+ unsigned short minutes;
+ unsigned short seconds;
+};
+typedef struct CMDateTime CMDateTime;
+
+struct CMFixedXYZColor {
+ Fixed X;
+ Fixed Y;
+ Fixed Z;
+};
+typedef struct CMFixedXYZColor CMFixedXYZColor;
+
+typedef unsigned short CMXYZComponent;
+
+struct CMXYZColor {
+ CMXYZComponent X;
+ CMXYZComponent Y;
+ CMXYZComponent Z;
+};
+typedef struct CMXYZColor CMXYZColor;
+
+struct CM2Header {
+ unsigned long size; /* This is the total size of the Profile */
+ OSType CMMType; /* CMM signature, Registered with CS2 consortium */
+ unsigned long profileVersion; /* Version of CMProfile format */
+ OSType profileClass; /* input, display, output, devicelink, abstract, or color conversion profile type */
+ OSType dataColorSpace; /* color space of data */
+ OSType profileConnectionSpace; /* profile connection color space */
+ CMDateTime dateTime; /* date and time of profile creation */
+ OSType CS2profileSignature; /* 'acsp' constant ColorSync 2.0 file ID */
+ OSType platform; /* primary profile platform, Registered with CS2 consortium */
+ unsigned long flags; /* profile flags */
+ OSType deviceManufacturer; /* Registered with ICC consortium */
+ unsigned long deviceModel; /* Registered with ICC consortium */
+ unsigned long deviceAttributes[2]; /* Attributes[0] is for device vendors, [1] is for ICC */
+ unsigned long renderingIntent; /* preferred rendering intent of tagged object */
+ CMFixedXYZColor white; /* profile illuminant */
+ OSType creator; /* profile creator */
+ char reserved[44]; /* reserved for future use */
+};
+typedef struct CM2Header CM2Header;
+
+struct CMTagRecord {
+ OSType tag; /* Registered with CS2 consortium */
+ unsigned long elementOffset; /* Relative to start of CMProfile */
+ unsigned long elementSize;
+};
+typedef struct CMTagRecord CMTagRecord;
+
+struct CMTagElemTable {
+ unsigned long count;
+ CMTagRecord tagList[1]; /* Variable size */
+};
+typedef struct CMTagElemTable CMTagElemTable;
+/* External 0x02002001 CMProfile */
+
+struct CM2Profile {
+ CM2Header header;
+ CMTagElemTable tagTable;
+ char elemData[1]; /* Tagged element storage. Variable size */
+};
+typedef struct CM2Profile CM2Profile;
+typedef CM2Profile * CM2ProfilePtr;
+typedef CM2ProfilePtr * CM2ProfileHandle;
+/* Tag Type Definitions */
+
+struct CMCurveType {
+ OSType typeDescriptor; /* 'curv' */
+ unsigned long reserved; /* fill with 0x00 */
+ unsigned long countValue; /* number of entries in table that follows */
+ unsigned short data[1]; /* Tagged element storage. Variable size */
+};
+typedef struct CMCurveType CMCurveType;
+
+struct CMDataType {
+ OSType typeDescriptor; /* 'data' */
+ unsigned long reserved; /* fill with 0x00 */
+ unsigned long dataFlag; /* 0 = ASCII, 1 = binary */
+ char data[1]; /* Tagged element storage. Variable size */
+};
+typedef struct CMDataType CMDataType;
+
+struct CMDateTimeType {
+ OSType typeDescriptor; /* 'dtim' */
+ unsigned long reserved;
+ CMDateTime dateTime;
+};
+typedef struct CMDateTimeType CMDateTimeType;
+
+struct CMLut16Type {
+ OSType typeDescriptor; /* 'mft2' */
+ unsigned long reserved; /* fill with 0x00 */
+ unsigned char inputChannels; /* Number of input channels */
+ unsigned char outputChannels; /* Number of output channels */
+ unsigned char gridPoints; /* Number of clutTable grid points */
+ unsigned char reserved2; /* fill with 0x00 */
+ Fixed matrix[3][3]; /* */
+ unsigned short inputTableEntries; /* */
+ unsigned short outputTableEntries; /* */
+ unsigned short inputTable[1]; /* Variable size */
+ unsigned short CLUT[1]; /* Variable size */
+ unsigned short outputTable[1]; /* Variable size */
+};
+typedef struct CMLut16Type CMLut16Type;
+
+struct CMLut8Type {
+ OSType typeDescriptor; /* 'mft1' */
+ unsigned long reserved; /* fill with 0x00 */
+ unsigned char inputChannels; /* */
+ unsigned char outputChannels; /* */
+ unsigned char gridPoints; /* */
+ unsigned char reserved2; /* fill with 0x00 */
+ Fixed matrix[3][3]; /* */
+ unsigned char inputTable[256]; /* fixed size of 256 */
+ unsigned char CLUT[2]; /* Variable size */
+ unsigned char outputTable[256]; /* fixed size of 256 */
+};
+typedef struct CMLut8Type CMLut8Type;
+
+struct CMMeasurementType {
+ OSType typeDescriptor; /* 'meas' */
+ unsigned long reserved; /* fill with 0x00 */
+ unsigned long standardObserver; /* 0 : unknown, 1 : CIE 1931, 2 : CIE 1964 */
+ CMFixedXYZColor backingXYZ; /* absolute XYZ values of backing */
+ unsigned long geometry; /* 0 : unknown, 1 : 0/45 or 45/0, 2 :0/d or d/0 */
+ unsigned long flare; /* 0 : 0%, 1 : 100% flare */
+ unsigned long illuminant; /* standard illuminant */
+};
+typedef struct CMMeasurementType CMMeasurementType;
+
+struct CMNamedColorType {
+ OSType typeDescriptor; /* 'ncol' */
+ unsigned long reserved; /* fill with 0x00 */
+ unsigned long vendorFlag; /* */
+ unsigned long count; /* count of named colors in array that follows */
+ unsigned char prefixName[1]; /* Variable size, max = 32, to access fields after this one, have to count bytes */
+ unsigned char suffixName[1]; /* Variable size, max = 32 */
+ char data[1]; /* varaible size data as explained below */
+};
+typedef struct CMNamedColorType CMNamedColorType;
+/*
+ A variable size array of structs appears as the last block of data
+ in the above struct, CMNamedColorType. The data structure
+ is as follows: (example in C)
+
+ struct {
+ unsigned char rootName[1]; * Variable size, max = 32
+ unsigned char colorCoords[1]; * Variable size
+ } colorName[1]; * Variable size
+*/
+
+struct CMNamedColor2Type {
+ OSType typeDescriptor; /* 'ncl2' */
+ unsigned long reserved; /* fill with 0x00 */
+ unsigned long vendorFlag; /* lower 16 bits reserved for ICC use */
+ unsigned long count; /* count of named colors in array that follows */
+ unsigned long deviceChannelCount; /* number of device channels, 0 indicates no device value available */
+ unsigned char prefixName[32]; /* 32 byte field. 7 bit ASCII null terminated */
+ unsigned char suffixName[32]; /* 32 byte field. 7 bit ASCII null terminated */
+ char data[1]; /* varaible size data as definced below */
+};
+typedef struct CMNamedColor2Type CMNamedColor2Type;
+
+struct CMNamedColor2EntryType {
+ unsigned char rootName[32]; /* 32 byte field. 7 bit ASCII null terminated */
+ unsigned short PCSColorCoords[3]; /* Lab or XYZ color */
+ unsigned short DeviceColorCoords[1]; /* Variable size */
+};
+typedef struct CMNamedColor2EntryType CMNamedColor2EntryType;
+
+struct CMTextDescriptionType {
+ OSType typeDescriptor; /* 'desc' */
+ unsigned long reserved; /* fill with 0x00 */
+ unsigned long ASCIICount; /* the count of "bytes" */
+ unsigned char ASCIIName[2]; /* Variable size, to access fields after this one, have to count bytes */
+ unsigned long UniCodeCode;
+ unsigned long UniCodeCount; /* the count of characters, each character has two bytes */
+ unsigned char UniCodeName[2]; /* Variable size */
+ short ScriptCodeCode;
+ unsigned char ScriptCodeCount; /* the count of "bytes" */
+ unsigned char ScriptCodeName[2]; /* Variable size */
+};
+typedef struct CMTextDescriptionType CMTextDescriptionType;
+
+struct CMTextType {
+ OSType typeDescriptor; /* 'text' */
+ unsigned long reserved; /* fill with 0x00 */
+ unsigned char text[1]; /* count of text is obtained from tag size element */
+};
+typedef struct CMTextType CMTextType;
+
+struct CMUnicodeTextType {
+ OSType typeDescriptor; /* 'utxt' */
+ unsigned long reserved; /* fill with 0x00 */
+ unsigned short text[1]; /* count of text is obtained from tag size element */
+};
+typedef struct CMUnicodeTextType CMUnicodeTextType;
+
+struct CMScreeningType {
+ OSType typeDescriptor; /* 'scrn' */
+ unsigned long reserved; /* fill with 0x00 */
+ unsigned long screeningFlag; /* bit 0 : use printer default screens, bit 1 : inch/cm */
+ unsigned long channelCount;
+ char data[1]; /* varaible size data as explained below */
+};
+typedef struct CMScreeningType CMScreeningType;
+/*
+ A variable size array of structs appears as the last block of data
+ in the above struct, CMScreeningType. The data structure
+ is as follows: (example in C)
+
+ struct {
+ Fixed frequency;
+ Fixed angle;
+ unsigned long sportFunction;
+ } channelScreening[1]; * Variable size
+*/
+
+struct CMSignatureType {
+ OSType typeDescriptor; /* 'sig ' */
+ unsigned long reserved; /* fill with 0x00 */
+ OSType signature;
+};
+typedef struct CMSignatureType CMSignatureType;
+
+struct CMS15Fixed16ArrayType {
+ OSType typeDescriptor; /* 'sf32' */
+ unsigned long reserved; /* fill with 0x00 */
+ Fixed value[1]; /* Variable size */
+};
+typedef struct CMS15Fixed16ArrayType CMS15Fixed16ArrayType;
+
+struct CMU16Fixed16ArrayType {
+ OSType typeDescriptor; /* 'uf32' */
+ unsigned long reserved; /* fill with 0x00 */
+ unsigned long value[1]; /* Variable size */
+};
+typedef struct CMU16Fixed16ArrayType CMU16Fixed16ArrayType;
+
+struct CMUInt16ArrayType {
+ OSType typeDescriptor; /* 'ui16' */
+ unsigned long reserved; /* fill with 0x00 */
+ unsigned short value[1]; /* Variable size */
+};
+typedef struct CMUInt16ArrayType CMUInt16ArrayType;
+
+struct CMUInt32ArrayType {
+ OSType typeDescriptor; /* 'ui32' */
+ unsigned long reserved; /* fill with 0x00 */
+ unsigned long value[1]; /* Variable size */
+};
+typedef struct CMUInt32ArrayType CMUInt32ArrayType;
+
+struct CMUInt64ArrayType {
+ OSType typeDescriptor; /* 'ui64' */
+ unsigned long reserved; /* fill with 0x00 */
+ unsigned long value[1]; /* Variable size (x2) */
+};
+typedef struct CMUInt64ArrayType CMUInt64ArrayType;
+
+struct CMUInt8ArrayType {
+ OSType typeDescriptor; /* 'ui08' */
+ unsigned long reserved; /* fill with 0x00 */
+ unsigned char value[1]; /* Variable size */
+};
+typedef struct CMUInt8ArrayType CMUInt8ArrayType;
+
+struct CMViewingConditionsType {
+ OSType typeDescriptor; /* 'view' */
+ unsigned long reserved; /* fill with 0x00 */
+ CMFixedXYZColor illuminant; /* absolute XYZs of illuminant in cd/m^2 */
+ CMFixedXYZColor surround; /* absolute XYZs of surround in cd/m^2 */
+ unsigned long stdIlluminant; /* see definitions of std illuminants */
+};
+typedef struct CMViewingConditionsType CMViewingConditionsType;
+
+struct CMXYZType {
+ OSType typeDescriptor; /* 'XYZ ' */
+ unsigned long reserved; /* fill with 0x00 */
+ CMFixedXYZColor XYZ[1]; /* variable size XYZ tristimulus values */
+};
+typedef struct CMXYZType CMXYZType;
+/* Profile sequence description type */
+
+struct CMProfileSequenceDescType {
+ OSType typeDescriptor; /* 'pseq ' */
+ unsigned long reserved; /* fill with 0x00 */
+ unsigned long count; /* Number of descriptions */
+ char data[1]; /* varaible size data as explained below */
+};
+typedef struct CMProfileSequenceDescType CMProfileSequenceDescType;
+/*
+ A variable size array of structs appears as the last block of data
+ in the above struct, CMProfileSequenceDescType. The data structure
+ is as follows: (example in C)
+
+ struct {
+ OSType deviceMfg; * Device Manufacturer
+ OSType deviceModel; * Decvice Model
+ unsigned long attributes[2]; * Device attributes
+ OSType technology; * Technology signature
+ unsigned long mfgDescASCIICount; * the count of "bytes"
+ unsigned char mfgDescASCIIName[2]; * Variable size
+ unsigned long mfgDescUniCodeCode;
+ unsigned long mfgDescUniCodeCount; * the count of characters, each character has two bytes
+ unsigned char mfgDescUniCodeName[2]; * Variable size
+ unsigned long mfgDescScriptCodeCode;
+ unsigned long mfgDescScriptCodeCount; * the count of "bytes"
+ unsigned char mfgDescScriptCodeName[2]; * Variable size
+ unsigned long modelDescASCIICount; * the count of "bytes"
+ unsigned char modelDescASCIIName[2]; * Variable size
+ unsigned long modelDescUniCodeCode;
+ unsigned long modelDescUniCodeCount; * the count of characters, each character has two bytes
+ unsigned char modelDescUniCodeName[2]; * Variable size
+ short modelDescScriptCodeCode;
+ unsigned char modelDescScriptCodeCount; * the count of "bytes"
+ SInt8 filler; * For proper alignment across languages
+ unsigned char modelDescScriptCodeName[2]; * Variable size
+ } profileDescription[1];
+*/
+
+/* Under color removal, black generation type */
+
+struct CMUcrBgType {
+ OSType typeDescriptor; /* 'bfd ' */
+ unsigned long reserved; /* fill with 0x00 */
+ unsigned long ucrCount; /* Number of UCR entries */
+ unsigned short ucrValues[1]; /* variable size */
+ unsigned long bgCount; /* Number of BG entries */
+ unsigned short bgValues[1]; /* variable size */
+ unsigned char ucrbgASCII[1]; /* null terminated ASCII string */
+};
+typedef struct CMUcrBgType CMUcrBgType;
+
+struct CMIntentCRDVMSize {
+ long renderingIntent; /* rendering intent */
+ unsigned long VMSize; /* VM size taken up by the CRD */
+};
+typedef struct CMIntentCRDVMSize CMIntentCRDVMSize;
+
+struct CMPS2CRDVMSizeType {
+ OSType typeDescriptor; /* 'psvm' */
+ unsigned long reserved; /* fill with 0x00 */
+ unsigned long count; /* number of intent entries */
+ CMIntentCRDVMSize intentCRD[1]; /* variable size */
+};
+typedef struct CMPS2CRDVMSizeType CMPS2CRDVMSizeType;
+/* Video Card Gamma type */
+enum {
+ cmVideoCardGammaTableType = 0,
+ cmVideoCardGammaFormulaType = 1
+};
+
+
+
+struct CMVideoCardGammaTable {
+ unsigned short channels; /* # of gamma channels (1 or 3) */
+ unsigned short entryCount; /* 1-based number of entries per channel */
+ unsigned short entrySize; /* size on bytes of each entry */
+ char data[1]; /* variable size data follows */
+};
+typedef struct CMVideoCardGammaTable CMVideoCardGammaTable;
+
+struct CMVideoCardGammaFormula {
+ Fixed redGamma; /* must be > 0.0 */
+ Fixed redMin; /* must be > 0.0 and < 1.0 */
+ Fixed redMax; /* must be > 0.0 and < 1.0 */
+ Fixed greenGamma; /* must be > 0.0 */
+ Fixed greenMin; /* must be > 0.0 and < 1.0 */
+ Fixed greenMax; /* must be > 0.0 and < 1.0 */
+ Fixed blueGamma; /* must be > 0.0 */
+ Fixed blueMin; /* must be > 0.0 and < 1.0 */
+ Fixed blueMax; /* must be > 0.0 and < 1.0 */
+};
+typedef struct CMVideoCardGammaFormula CMVideoCardGammaFormula;
+
+struct CMVideoCardGamma {
+ unsigned long tagType;
+ union {
+ CMVideoCardGammaTable table;
+ CMVideoCardGammaFormula formula;
+ } u;
+};
+typedef struct CMVideoCardGamma CMVideoCardGamma;
+
+struct CMVideoCardGammaType {
+ OSType typeDescriptor; /* 'vcgt' */
+ unsigned long reserved; /* fill with 0x00 */
+ CMVideoCardGamma gamma;
+};
+typedef struct CMVideoCardGammaType CMVideoCardGammaType;
+
+struct CMMakeAndModel {
+ OSType manufacturer;
+ unsigned long model;
+ unsigned long serialNumber;
+ unsigned long manufactureDate;
+ unsigned long reserved1; /* fill with 0x00 */
+ unsigned long reserved2; /* fill with 0x00 */
+ unsigned long reserved3; /* fill with 0x00 */
+ unsigned long reserved4; /* fill with 0x00 */
+};
+typedef struct CMMakeAndModel CMMakeAndModel;
+
+struct CMMakeAndModelType {
+ OSType typeDescriptor; /* 'mmod' */
+ unsigned long reserved; /* fill with 0x00 */
+ CMMakeAndModel makeAndModel;
+};
+typedef struct CMMakeAndModelType CMMakeAndModelType;
+/************************************************************************/
+/*************** ColorSync 1.0 profile specification ********************/
+/************************************************************************/
+enum {
+ cmGrayResponse = 0,
+ cmRedResponse = 1,
+ cmGreenResponse = 2,
+ cmBlueResponse = 3,
+ cmCyanResponse = 4,
+ cmMagentaResponse = 5,
+ cmYellowResponse = 6,
+ cmUcrResponse = 7,
+ cmBgResponse = 8,
+ cmOnePlusLastResponse = 9
+};
+
+
+/* Device types */
+enum {
+ cmMonitorDevice = FOUR_CHAR_CODE('mntr'),
+ cmScannerDevice = FOUR_CHAR_CODE('scnr'),
+ cmPrinterDevice = FOUR_CHAR_CODE('prtr')
+};
+
+
+
+struct CMIString {
+ ScriptCode theScript;
+ Str63 theString;
+};
+typedef struct CMIString CMIString;
+/* Profile options */
+enum {
+ cmPerceptualMatch = 0x0000, /* Default. For photographic images */
+ cmColorimetricMatch = 0x0001, /* Exact matching when possible */
+ cmSaturationMatch = 0x0002 /* For solid colors */
+};
+
+/* Profile flags */
+enum {
+ cmNativeMatchingPreferred = 0x00000001, /* Default to native not preferred */
+ cmTurnOffCache = 0x00000002 /* Default to turn on CMM cache */
+};
+
+
+typedef long CMMatchOption;
+typedef long CMMatchFlag;
+
+struct CMHeader {
+ unsigned long size;
+ OSType CMMType;
+ unsigned long applProfileVersion;
+ OSType dataType;
+ OSType deviceType;
+ OSType deviceManufacturer;
+ unsigned long deviceModel;
+ unsigned long deviceAttributes[2];
+ unsigned long profileNameOffset;
+ unsigned long customDataOffset;
+ CMMatchFlag flags;
+ CMMatchOption options;
+ CMXYZColor white;
+ CMXYZColor black;
+};
+typedef struct CMHeader CMHeader;
+
+struct CMProfileChromaticities {
+ CMXYZColor red;
+ CMXYZColor green;
+ CMXYZColor blue;
+ CMXYZColor cyan;
+ CMXYZColor magenta;
+ CMXYZColor yellow;
+};
+typedef struct CMProfileChromaticities CMProfileChromaticities;
+
+struct CMProfileResponse {
+ unsigned short counts[9];
+ unsigned short data[1]; /* Variable size */
+};
+typedef struct CMProfileResponse CMProfileResponse;
+
+struct CMProfile {
+ CMHeader header;
+ CMProfileChromaticities profile;
+ CMProfileResponse response;
+ CMIString profileName;
+ char customData[1]; /* Variable size */
+};
+typedef struct CMProfile CMProfile;
+typedef CMProfile * CMProfilePtr;
+typedef CMProfilePtr * CMProfileHandle;
+#if OLDROUTINENAMES
+enum {
+ kCMApplProfileVersion = cmCS1ProfileVersion
+};
+
+enum {
+ grayResponse = cmGrayResponse,
+ redResponse = cmRedResponse,
+ greenResponse = cmGreenResponse,
+ blueResponse = cmBlueResponse,
+ cyanResponse = cmCyanResponse,
+ magentaResponse = cmMagentaResponse,
+ yellowResponse = cmYellowResponse,
+ ucrResponse = cmUcrResponse,
+ bgResponse = cmBgResponse,
+ onePlusLastResponse = cmOnePlusLastResponse
+};
+
+enum {
+ rgbData = cmRGBData,
+ cmykData = cmCMYKData,
+ grayData = cmGrayData,
+ xyzData = cmXYZData
+};
+
+enum {
+ XYZData = cmXYZData
+};
+
+enum {
+ monitorDevice = cmMonitorDevice,
+ scannerDevice = cmScannerDevice,
+ printerDevice = cmPrinterDevice
+};
+
+enum {
+ CMNativeMatchingPreferred = cmNativeMatchingPreferred, /* Default to native not preferred */
+ CMTurnOffCache = cmTurnOffCache /* Default to turn on CMM cache */
+};
+
+enum {
+ CMPerceptualMatch = cmPerceptualMatch, /* Default. For photographic images */
+ CMColorimetricMatch = cmColorimetricMatch, /* Exact matching when possible */
+ CMSaturationMatch = cmSaturationMatch /* For solid colors */
+};
+
+
+typedef unsigned short XYZComponent;
+typedef CMXYZColor XYZColor;
+typedef unsigned short CMResponseData;
+typedef CMIString IString;
+typedef long CMResponseColor;
+typedef CMResponseColor responseColor;
+#endif /* OLDROUTINENAMES */
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CMICCPROFILE__ */
+
diff --git a/include/qt/CMMComponent.h b/include/qt/CMMComponent.h
new file mode 100644
index 000000000..08a211b7c
--- /dev/null
+++ b/include/qt/CMMComponent.h
@@ -0,0 +1,411 @@
+/*
+ File: CMMComponent.h
+
+ Contains: ColorSync CMM Component API
+
+ Version: Technology: ColorSync 2.6
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CMMCOMPONENT__
+#define __CMMCOMPONENT__
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#ifndef __COMPONENTS__
+#include "Components.h"
+#endif
+
+#ifndef __CMAPPLICATION__
+#include "CMApplication.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ CMMInterfaceVersion = 1
+};
+
+
+/* Component function selectors */
+enum {
+ /* Required */
+ kNCMMInit = 6,
+ kCMMMatchColors = 1,
+ kCMMCheckColors = 2,
+
+ /* Optional */
+ kCMMValidateProfile = 8,
+ kCMMMatchBitmap = 9,
+ kCMMCheckBitmap = 10,
+ kCMMMatchPixMap = 3,
+ kCMMCheckPixMap = 4,
+ kCMMConcatenateProfiles = 5,
+ kCMMConcatInit = 7,
+ kCMMNewLinkProfile = 16,
+ kNCMMConcatInit = 18,
+ kNCMMNewLinkProfile = 19,
+ kCMMGetPS2ColorSpace = 11,
+ kCMMGetPS2ColorRenderingIntent = 12,
+ kCMMGetPS2ColorRendering = 13,
+ kCMMGetPS2ColorRenderingVMSize = 17,
+
+ /* obsolete with ColorSync 2.5 */
+ kCMMFlattenProfile = 14,
+ kCMMUnflattenProfile = 15,
+
+ /* obsolete with ColorSync 2.6 */
+ kCMMInit = 0,
+ kCMMGetNamedColorInfo = 70,
+ kCMMGetNamedColorValue = 71,
+ kCMMGetIndNamedColorValue = 72,
+ kCMMGetNamedColorIndex = 73,
+ kCMMGetNamedColorName = 74
+};
+
+#if TARGET_API_MAC_OS8
+typedef ComponentInstance CMMComponentInst;
+#if CALL_NOT_IN_CARBON
+EXTERN_API( CMError )
+NCMMInit (CMMComponentInst cmm,
+ CMProfileRef srcProfile,
+ CMProfileRef dstProfile) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0006, 0x7000, 0xA82A);
+
+EXTERN_API( CMError )
+CMMInit (CMMComponentInst cmm,
+ CMProfileHandle srcProfile,
+ CMProfileHandle dstProfile) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0000, 0x7000, 0xA82A);
+
+EXTERN_API( CMError )
+CMMMatchColors (CMMComponentInst cmm,
+ CMColor * colors,
+ UInt32 count) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0001, 0x7000, 0xA82A);
+
+EXTERN_API( CMError )
+CMMCheckColors (CMMComponentInst cmm,
+ CMColor * colors,
+ UInt32 count,
+ UInt32 * result) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0002, 0x7000, 0xA82A);
+
+EXTERN_API( CMError )
+CMMValidateProfile (CMMComponentInst cmm,
+ CMProfileRef prof,
+ Boolean * valid) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0008, 0x7000, 0xA82A);
+
+EXTERN_API( CMError )
+CMMFlattenProfile (CMMComponentInst cmm,
+ CMProfileRef prof,
+ UInt32 flags,
+ CMFlattenUPP proc,
+ void * refCon) FIVEWORDINLINE(0x2F3C, 0x0010, 0x000E, 0x7000, 0xA82A);
+
+EXTERN_API( CMError )
+CMMUnflattenProfile (CMMComponentInst cmm,
+ FSSpec * resultFileSpec,
+ CMFlattenUPP proc,
+ void * refCon) FIVEWORDINLINE(0x2F3C, 0x000C, 0x000F, 0x7000, 0xA82A);
+
+EXTERN_API( CMError )
+CMMMatchBitmap (CMMComponentInst cmm,
+ CMBitmap * bitmap,
+ CMBitmapCallBackUPP progressProc,
+ void * refCon,
+ CMBitmap * matchedBitmap) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0009, 0x7000, 0xA82A);
+
+EXTERN_API( CMError )
+CMMCheckBitmap (CMMComponentInst cmm,
+ const CMBitmap * bitmap,
+ CMBitmapCallBackUPP progressProc,
+ void * refCon,
+ CMBitmap * resultBitmap) FIVEWORDINLINE(0x2F3C, 0x0010, 0x000A, 0x7000, 0xA82A);
+
+EXTERN_API( CMError )
+CMMMatchPixMap (CMMComponentInst cmm,
+ PixMap * pixMap,
+ CMBitmapCallBackUPP progressProc,
+ void * refCon) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0003, 0x7000, 0xA82A);
+
+EXTERN_API( CMError )
+CMMCheckPixMap (CMMComponentInst cmm,
+ const PixMap * pixMap,
+ CMBitmapCallBackUPP progressProc,
+ BitMap * bitMap,
+ void * refCon) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0004, 0x7000, 0xA82A);
+
+EXTERN_API( CMError )
+CMMConcatInit (CMMComponentInst cmm,
+ CMConcatProfileSet * profileSet) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0007, 0x7000, 0xA82A);
+
+EXTERN_API( CMError )
+NCMMConcatInit (CMMComponentInst cmm,
+ NCMConcatProfileSet * profileSet,
+ CMConcatCallBackUPP proc,
+ void * refCon) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0012, 0x7000, 0xA82A);
+
+EXTERN_API( CMError )
+CMMNewLinkProfile (CMMComponentInst cmm,
+ CMProfileRef * prof,
+ const CMProfileLocation * targetLocation,
+ CMConcatProfileSet * profileSet) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0010, 0x7000, 0xA82A);
+
+EXTERN_API( CMError )
+NCMMNewLinkProfile (CMMComponentInst cmm,
+ CMProfileRef prof,
+ NCMConcatProfileSet * profileSet,
+ CMConcatCallBackUPP proc,
+ void * refCon) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0013, 0x7000, 0xA82A);
+
+EXTERN_API( CMError )
+CMMGetPS2ColorSpace (CMMComponentInst cmm,
+ CMProfileRef srcProf,
+ UInt32 flags,
+ CMFlattenUPP proc,
+ void * refCon) FIVEWORDINLINE(0x2F3C, 0x0010, 0x000B, 0x7000, 0xA82A);
+
+EXTERN_API( CMError )
+CMMGetPS2ColorRenderingIntent (CMMComponentInst cmm,
+ CMProfileRef srcProf,
+ UInt32 flags,
+ CMFlattenUPP proc,
+ void * refCon) FIVEWORDINLINE(0x2F3C, 0x0010, 0x000C, 0x7000, 0xA82A);
+
+EXTERN_API( CMError )
+CMMGetPS2ColorRendering (CMMComponentInst cmm,
+ CMProfileRef srcProf,
+ CMProfileRef dstProf,
+ UInt32 flags,
+ CMFlattenUPP proc,
+ void * refCon) FIVEWORDINLINE(0x2F3C, 0x0014, 0x000D, 0x7000, 0xA82A);
+
+EXTERN_API( CMError )
+CMMGetPS2ColorRenderingVMSize (CMMComponentInst cmm,
+ CMProfileRef srcProf,
+ CMProfileRef dstProf,
+ UInt32 * vmSize) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0011, 0x7000, 0xA82A);
+
+EXTERN_API( CMError )
+CMMConcatenateProfiles (CMMComponentInst cmm,
+ CMProfileHandle thru,
+ CMProfileHandle dst,
+ CMProfileHandle * newDst) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0005, 0x7000, 0xA82A);
+
+EXTERN_API( CMError )
+CMMGetNamedColorInfo (CMMComponentInst cmm,
+ CMProfileRef srcProf,
+ UInt32 * deviceChannels,
+ OSType * deviceColorSpace,
+ OSType * PCSColorSpace,
+ UInt32 * count,
+ StringPtr prefix,
+ StringPtr suffix) FIVEWORDINLINE(0x2F3C, 0x001C, 0x0046, 0x7000, 0xA82A);
+
+EXTERN_API( CMError )
+CMMGetNamedColorValue (CMMComponentInst cmm,
+ CMProfileRef prof,
+ StringPtr name,
+ CMColor * deviceColor,
+ CMColor * PCSColor) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0047, 0x7000, 0xA82A);
+
+EXTERN_API( CMError )
+CMMGetIndNamedColorValue (CMMComponentInst cmm,
+ CMProfileRef prof,
+ UInt32 index,
+ CMColor * deviceColor,
+ CMColor * PCSColor) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0048, 0x7000, 0xA82A);
+
+EXTERN_API( CMError )
+CMMGetNamedColorIndex (CMMComponentInst cmm,
+ CMProfileRef prof,
+ StringPtr name,
+ UInt32 * index) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0049, 0x7000, 0xA82A);
+
+EXTERN_API( CMError )
+CMMGetNamedColorName (CMMComponentInst cmm,
+ CMProfileRef prof,
+ UInt32 index,
+ StringPtr name) FIVEWORDINLINE(0x2F3C, 0x000C, 0x004A, 0x7000, 0xA82A);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if OLDROUTINENAMES
+#define NCMInit(cmm, srcProfile, dstProfile) NCMMInit(cmm, srcProfile, dstProfile)
+#define CMInit(cmm, srcProfile, dstProfile) CMMInit(cmm, srcProfile, dstProfile)
+#define CMMatchColors(cmm, colors, count) CMMMatchColors(cmm, colors, count)
+#define CMCheckColors(cmm, colors, count, result) CMMCheckColors(cmm, colors, count, result)
+#define CMMatchBitmap(cmm, bitmap, progressProc, refCon, matchedBitmap) CMMMatchBitmap(cmm, bitmap, progressProc, refCon, matchedBitmap)
+#define CMCheckBitmap(cmm, bitmap, progressProc, refCon, resultBitmap) CMMCheckBitmap(cmm, bitmap, progressProc, refCon, resultBitmap)
+#define CMMatchPixMap(cmm, pixMap, progressProc, refCon) CMMMatchPixMap(cmm, pixMap, progressProc, refCon)
+#define CMCheckPixMap(cmm, pixMap, progressProc, bitMap, refCon) CMMCheckPixMap(cmm, pixMap, progressProc, bitMap, refCon)
+#define CMConcatInit(cmm, profileSet) CMMConcatInit(cmm, profileSet)
+#define CMConcatenateProfiles(cmm, thru, dst, newDst) CMMConcatenateProfiles(cmm, thru, dst, newDst)
+#define CMNewLinkProfile(cmm, prof, targetLocation, profileSet) CMMNewLinkProfile(cmm, prof, targetLocation, profileSet)
+#endif /* OLDROUTINENAMES */
+
+#else
+#if CALL_NOT_IN_CARBON
+EXTERN_API( CMError )
+CMMOpen (UInt32 * cmmStorage,
+ void * hInstance);
+
+EXTERN_API( CMError )
+CMMClose (UInt32 * cmmStorage);
+
+EXTERN_API( CMError )
+CMMGetCMMInfo (UInt32 * cmmStorage,
+ CMMInfo * info);
+
+EXTERN_API( CMError )
+NCMMInit (UInt32 * cmmStorage,
+ CMProfileRef srcProfile,
+ CMProfileRef dstProfile);
+
+EXTERN_API( CMError )
+CMMMatchColors (UInt32 * cmmStorage,
+ CMColor * colors,
+ UInt32 count);
+
+EXTERN_API( CMError )
+CMMCheckColors (UInt32 * cmmStorage,
+ CMColor * colors,
+ UInt32 count,
+ UInt32 * result);
+
+EXTERN_API( CMError )
+CMMValidateProfile (UInt32 * cmmStorage,
+ CMProfileRef prof,
+ Boolean * valid);
+
+EXTERN_API( CMError )
+CMMMatchBitmap (UInt32 * cmmStorage,
+ CMBitmap * bitmap,
+ CMBitmapCallBackUPP progressProc,
+ void * refCon,
+ CMBitmap * matchedBitmap);
+
+EXTERN_API( CMError )
+CMMCheckBitmap (UInt32 * cmmStorage,
+ const CMBitmap * bitmap,
+ CMBitmapCallBackUPP progressProc,
+ void * refCon,
+ CMBitmap * resultBitmap);
+
+EXTERN_API( CMError )
+CMMMatchPixMap (UInt32 * cmmStorage,
+ PixMap * pixMap,
+ CMBitmapCallBackUPP progressProc,
+ void * refCon);
+
+EXTERN_API( CMError )
+CMMCheckPixMap (UInt32 * cmmStorage,
+ const PixMap * pixMap,
+ CMBitmapCallBackUPP progressProc,
+ BitMap * bitMap,
+ void * refCon);
+
+EXTERN_API( CMError )
+CMMConcatInit (UInt32 * cmmStorage,
+ CMConcatProfileSet * profileSet);
+
+EXTERN_API( CMError )
+NCMMConcatInit (UInt32 * cmmStorage,
+ NCMConcatProfileSet * profileSet,
+ CMConcatCallBackUPP proc,
+ void * refCon);
+
+EXTERN_API( CMError )
+CMMNewLinkProfile (UInt32 * cmmStorage,
+ CMProfileRef * prof,
+ const CMProfileLocation * targetLocation,
+ CMConcatProfileSet * profileSet);
+
+EXTERN_API( CMError )
+NCMMNewLinkProfile (UInt32 * cmmStorage,
+ CMProfileRef prof,
+ NCMConcatProfileSet * profileSet,
+ CMConcatCallBackUPP proc,
+ void * refCon);
+
+EXTERN_API( CMError )
+CMMGetPS2ColorSpace (UInt32 * cmmStorage,
+ CMProfileRef srcProf,
+ UInt32 flags,
+ CMFlattenUPP proc,
+ void * refCon);
+
+EXTERN_API( CMError )
+CMMGetPS2ColorRenderingIntent (UInt32 * cmmStorage,
+ CMProfileRef srcProf,
+ UInt32 flags,
+ CMFlattenUPP proc,
+ void * refCon);
+
+EXTERN_API( CMError )
+CMMGetPS2ColorRendering (UInt32 * cmmStorage,
+ CMProfileRef srcProf,
+ CMProfileRef dstProf,
+ UInt32 flags,
+ CMFlattenUPP proc,
+ void * refCon);
+
+EXTERN_API( CMError )
+CMMGetPS2ColorRenderingVMSize (UInt32 * cmmStorage,
+ CMProfileRef srcProf,
+ CMProfileRef dstProf,
+ UInt32 * vmSize);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_API_MAC_OS8 */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CMMCOMPONENT__ */
+
diff --git a/include/qt/CMPRComponent.h b/include/qt/CMPRComponent.h
new file mode 100644
index 000000000..07b476a0f
--- /dev/null
+++ b/include/qt/CMPRComponent.h
@@ -0,0 +1,121 @@
+/*
+ File: CMPRComponent.h
+
+ Contains: ColorSync ProfileResponder Component API
+
+ Version: Technology: ColorSync 1.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1993-2001 by Apple Computer, Inc. All rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CMPRCOMPONENT__
+#define __CMPRCOMPONENT__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#ifndef __COMPONENTS__
+#include "Components.h"
+#endif
+
+#ifndef __CMAPPLICATION__
+#include "CMApplication.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ CMPRInterfaceVersion = 0
+};
+
+/* Component function selectors */
+enum {
+ kCMPRGetProfile = 0,
+ kCMPRSetProfile = 1,
+ kCMPRSetProfileDescription = 2,
+ kCMPRGetIndexedProfile = 3,
+ kCMPRDeleteDeviceProfile = 4
+};
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( CMError )
+CMGetProfile (ComponentInstance pr,
+ CMProfileHandle aProfile,
+ CMProfileHandle * returnedProfile) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0000, 0x7000, 0xA82A);
+
+EXTERN_API( CMError )
+CMSetProfile (ComponentInstance pr,
+ CMProfileHandle newProfile) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0001, 0x7000, 0xA82A);
+
+EXTERN_API( CMError )
+CMSetProfileDescription (ComponentInstance pr,
+ long DeviceData,
+ CMProfileHandle hProfile) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0002, 0x7000, 0xA82A);
+
+EXTERN_API( CMError )
+CMGetIndexedProfile (ComponentInstance pr,
+ CMProfileSearchRecordHandle search,
+ CMProfileHandle * returnProfile,
+ long * index) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0003, 0x7000, 0xA82A);
+
+EXTERN_API( CMError )
+CMDeleteDeviceProfile (ComponentInstance pr,
+ CMProfileHandle deleteMe) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0004, 0x7000, 0xA82A);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CMPRCOMPONENT__ */
+
diff --git a/include/qt/CMScriptingPlugin.h b/include/qt/CMScriptingPlugin.h
new file mode 100644
index 000000000..c9cb1467e
--- /dev/null
+++ b/include/qt/CMScriptingPlugin.h
@@ -0,0 +1,171 @@
+/*
+ File: CMScriptingPlugin.h
+
+ Contains: ColorSync Scripting Plugin API
+
+ Version: Technology: ColorSync 2.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1998-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CMSCRIPTINGPLUGIN__
+#define __CMSCRIPTINGPLUGIN__
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+#ifndef __CMAPPLICATION__
+#include "CMApplication.h"
+#endif
+
+#ifndef __CODEFRAGMENTS__
+#include "CodeFragments.h"
+#endif
+
+
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ /* ColorSync Scripting AppleEvent Errors */
+ cmspInvalidImageFile = -4220, /* Plugin cannot handle this image file type */
+ cmspInvalidImageSpace = -4221, /* Plugin cannot create an image file of this colorspace */
+ cmspInvalidProfileEmbed = -4222, /* Specific invalid profile errors */
+ cmspInvalidProfileSource = -4223,
+ cmspInvalidProfileDest = -4224,
+ cmspInvalidProfileProof = -4225,
+ cmspInvalidProfileLink = -4226
+};
+
+
+/**** embedFlags field ****/
+/* reserved for future use: currently 0 */
+
+/**** matchFlags field ****/
+enum {
+ cmspFavorEmbeddedMask = 0x00000001 /* if bit 0 is 0 then use srcProf profile, if 1 then use profile embedded in image if present*/
+};
+
+
+/**** scripting plugin entry points ****/
+typedef CALLBACK_API_C( CMError , ValidateImageProcPtr )(const FSSpec *spec);
+typedef CALLBACK_API_C( CMError , GetImageSpaceProcPtr )(const FSSpec *spec, OSType *space);
+typedef CALLBACK_API_C( CMError , ValidateSpaceProcPtr )(const FSSpec *spec, OSType *space);
+typedef CALLBACK_API_C( CMError , EmbedImageProcPtr )(const FSSpec *specFrom, const FSSpec *specInto, CMProfileRef embedProf, UInt32 embedFlags);
+typedef CALLBACK_API_C( CMError , UnembedImageProcPtr )(const FSSpec *specFrom, const FSSpec *specInto);
+typedef CALLBACK_API_C( CMError , MatchImageProcPtr )(const FSSpec *specFrom, const FSSpec *specInto, UInt32 qual, UInt32 srcIntent, CMProfileRef srcProf, CMProfileRef dstProf, CMProfileRef prfProf, UInt32 matchFlags);
+typedef CALLBACK_API_C( CMError , CountImageProfilesProcPtr )(const FSSpec *spec, UInt32 *count);
+typedef CALLBACK_API_C( CMError , GetIndImageProfileProcPtr )(const FSSpec *spec, UInt32 index, CMProfileRef *prof);
+typedef CALLBACK_API_C( CMError , SetIndImageProfileProcPtr )(const FSSpec *specFrom, const FSSpec *specInto, UInt32 index, CMProfileRef prof, UInt32 embedFlags);
+/**** CSScriptingLib API ****/
+
+EXTERN_API_C( CMError )
+CMValidImage (const FSSpec * spec);
+
+EXTERN_API_C( CMError )
+CMGetImageSpace (const FSSpec * spec,
+ OSType * space);
+
+EXTERN_API_C( CMError )
+CMEmbedImage (const FSSpec * specFrom,
+ const FSSpec * specInto,
+ Boolean repl,
+ CMProfileRef embProf);
+
+EXTERN_API_C( CMError )
+CMUnembedImage (const FSSpec * specFrom,
+ const FSSpec * specInto,
+ Boolean repl);
+
+EXTERN_API_C( CMError )
+CMMatchImage (const FSSpec * specFrom,
+ const FSSpec * specInto,
+ Boolean repl,
+ UInt32 qual,
+ CMProfileRef srcProf,
+ UInt32 srcIntent,
+ CMProfileRef dstProf);
+
+EXTERN_API_C( CMError )
+CMProofImage (const FSSpec * specFrom,
+ const FSSpec * specInto,
+ Boolean repl,
+ UInt32 qual,
+ CMProfileRef srcProf,
+ UInt32 srcIntent,
+ CMProfileRef dstProf,
+ CMProfileRef prfProf);
+
+EXTERN_API_C( CMError )
+CMLinkImage (const FSSpec * specFrom,
+ const FSSpec * specInto,
+ Boolean repl,
+ UInt32 qual,
+ CMProfileRef lnkProf,
+ UInt32 lnkIntent);
+
+EXTERN_API_C( CMError )
+CMCountImageProfiles (const FSSpec * spec,
+ UInt32 * count);
+
+EXTERN_API_C( CMError )
+CMGetIndImageProfile (const FSSpec * spec,
+ UInt32 index,
+ CMProfileRef * prof);
+
+EXTERN_API_C( CMError )
+CMSetIndImageProfile (const FSSpec * specFrom,
+ const FSSpec * specInto,
+ Boolean repl,
+ UInt32 index,
+ CMProfileRef prof);
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CMSCRIPTINGPLUGIN__ */
+
diff --git a/include/qt/CRMSerialDevices.h b/include/qt/CRMSerialDevices.h
new file mode 100644
index 000000000..fdb5849cd
--- /dev/null
+++ b/include/qt/CRMSerialDevices.h
@@ -0,0 +1,102 @@
+/*
+ File: CRMSerialDevices.h
+
+ Contains: Communications Resource Manager Serial Device interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1988-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CRMSERIALDEVICES__
+#define __CRMSERIALDEVICES__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if CALL_NOT_IN_CARBON
+enum {
+ /* for the crmDeviceType field of the CRMRec data structure */
+ crmSerialDevice = 1, /* version of the CRMSerialRecord below */
+ curCRMSerRecVers = 1
+};
+
+/* Maintains compatibility w/ apps & tools that expect an old style icon */
+
+struct CRMIconRecord {
+ long oldIcon[32]; /* ICN# */
+ long oldMask[32];
+ Handle theSuite; /* Handle to an IconSuite */
+ long reserved;
+};
+typedef struct CRMIconRecord CRMIconRecord;
+
+typedef CRMIconRecord * CRMIconPtr;
+typedef CRMIconPtr * CRMIconHandle;
+
+struct CRMSerialRecord {
+ short version;
+ StringHandle inputDriverName;
+ StringHandle outputDriverName;
+ StringHandle name;
+ CRMIconHandle deviceIcon;
+ long ratedSpeed;
+ long maxSpeed;
+ long reserved;
+};
+typedef struct CRMSerialRecord CRMSerialRecord;
+
+typedef CRMSerialRecord * CRMSerialPtr;
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CRMSERIALDEVICES__ */
+
diff --git a/include/qt/CTBUtilities.h b/include/qt/CTBUtilities.h
new file mode 100644
index 000000000..b746b9831
--- /dev/null
+++ b/include/qt/CTBUtilities.h
@@ -0,0 +1,275 @@
+/*
+ File: CTBUtilities.h
+
+ Contains: Communications Toolbox Utilities interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1988-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CTBUTILITIES__
+#define __CTBUTILITIES__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+#ifndef __DIALOGS__
+#include "Dialogs.h"
+#endif
+
+#ifndef __APPLETALK__
+#include "AppleTalk.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if CALL_NOT_IN_CARBON
+enum {
+ curCTBUVersion = 2 /* version of Comm Toolbox Utilities*/
+};
+
+enum {
+ /* Error codes/types */
+ ctbuGenericError = -1,
+ ctbuNoErr = 0
+};
+
+typedef OSErr CTBUErr;
+enum {
+ chooseDisaster = -2,
+ chooseFailed = -1,
+ chooseAborted = 0,
+ chooseOKMinor = 1,
+ chooseOKMajor = 2,
+ chooseCancel = 3
+};
+
+typedef unsigned short ChooseReturnCode;
+enum {
+ nlOk = 0,
+ nlCancel = 1,
+ nlEject = 2
+};
+
+typedef unsigned short NuLookupReturnCode;
+enum {
+ nameInclude = 1,
+ nameDisable = 2,
+ nameReject = 3
+};
+
+typedef unsigned short NameFilterReturnCode;
+enum {
+ zoneInclude = 1,
+ zoneDisable = 2,
+ zoneReject = 3
+};
+
+typedef unsigned short ZoneFilterReturnCode;
+enum {
+ /* Values for hookProc items */
+ hookOK = 1,
+ hookCancel = 2,
+ hookOutline = 3,
+ hookTitle = 4,
+ hookItemList = 5,
+ hookZoneTitle = 6,
+ hookZoneList = 7,
+ hookLine = 8,
+ hookVersion = 9,
+ hookReserved1 = 10,
+ hookReserved2 = 11,
+ hookReserved3 = 12,
+ hookReserved4 = 13, /* "virtual" hookProc items */
+ hookNull = 100,
+ hookItemRefresh = 101,
+ hookZoneRefresh = 102,
+ hookEject = 103,
+ hookPreflight = 104,
+ hookPostflight = 105,
+ hookKeyBase = 1000
+};
+
+
+/* NuLookup structures/constants */
+
+struct NLTypeEntry {
+ Handle hIcon;
+ Str32 typeStr;
+};
+typedef struct NLTypeEntry NLTypeEntry;
+
+typedef NLTypeEntry NLType[4];
+
+struct NBPReply {
+ EntityName theEntity;
+ AddrBlock theAddr;
+};
+typedef struct NBPReply NBPReply;
+typedef CALLBACK_API( short , DialogHookProcPtr )(short item, DialogPtr theDialog);
+typedef CALLBACK_API( short , NameFilterProcPtr )(const EntityName *theEntity)/* (22) added const */;
+typedef CALLBACK_API( short , ZoneFilterProcPtr )(ConstStr32Param theZone);
+typedef STACK_UPP_TYPE(DialogHookProcPtr) DialogHookUPP;
+typedef STACK_UPP_TYPE(NameFilterProcPtr) NameFilterUPP;
+typedef STACK_UPP_TYPE(ZoneFilterProcPtr) ZoneFilterUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(DialogHookUPP)
+ NewDialogHookUPP (DialogHookProcPtr userRoutine);
+
+ EXTERN_API(NameFilterUPP)
+ NewNameFilterUPP (NameFilterProcPtr userRoutine);
+
+ EXTERN_API(ZoneFilterUPP)
+ NewZoneFilterUPP (ZoneFilterProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeDialogHookUPP (DialogHookUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeNameFilterUPP (NameFilterUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeZoneFilterUPP (ZoneFilterUPP userUPP);
+
+ EXTERN_API(short)
+ InvokeDialogHookUPP (short item,
+ DialogPtr theDialog,
+ DialogHookUPP userUPP);
+
+ EXTERN_API(short)
+ InvokeNameFilterUPP (const EntityName * theEntity,
+ NameFilterUPP userUPP);
+
+ EXTERN_API(short)
+ InvokeZoneFilterUPP (ConstStr32Param theZone,
+ ZoneFilterUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppDialogHookProcInfo = 0x000003A0 }; /* pascal 2_bytes Func(2_bytes, 4_bytes) */
+ enum { uppNameFilterProcInfo = 0x000000E0 }; /* pascal 2_bytes Func(4_bytes) */
+ enum { uppZoneFilterProcInfo = 0x000000E0 }; /* pascal 2_bytes Func(4_bytes) */
+ #define NewDialogHookUPP(userRoutine) (DialogHookUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDialogHookProcInfo, GetCurrentArchitecture())
+ #define NewNameFilterUPP(userRoutine) (NameFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNameFilterProcInfo, GetCurrentArchitecture())
+ #define NewZoneFilterUPP(userRoutine) (ZoneFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppZoneFilterProcInfo, GetCurrentArchitecture())
+ #define DisposeDialogHookUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeNameFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeZoneFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeDialogHookUPP(item, theDialog, userUPP) (short)CALL_TWO_PARAMETER_UPP((userUPP), uppDialogHookProcInfo, (item), (theDialog))
+ #define InvokeNameFilterUPP(theEntity, userUPP) (short)CALL_ONE_PARAMETER_UPP((userUPP), uppNameFilterProcInfo, (theEntity))
+ #define InvokeZoneFilterUPP(theZone, userUPP) (short)CALL_ONE_PARAMETER_UPP((userUPP), uppZoneFilterProcInfo, (theZone))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewDialogHookProc(userRoutine) NewDialogHookUPP(userRoutine)
+#define NewNameFilterProc(userRoutine) NewNameFilterUPP(userRoutine)
+#define NewZoneFilterProc(userRoutine) NewZoneFilterUPP(userRoutine)
+#define CallDialogHookProc(userRoutine, item, theDialog) InvokeDialogHookUPP(item, theDialog, userRoutine)
+#define CallNameFilterProc(userRoutine, theEntity) InvokeNameFilterUPP(theEntity, userRoutine)
+#define CallZoneFilterProc(userRoutine, theZone) InvokeZoneFilterUPP(theZone, userRoutine)
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( CTBUErr )
+InitCTBUtilities (void);
+
+EXTERN_API( short )
+CTBGetCTBVersion (void);
+
+EXTERN_API( short )
+StandardNBP (Point where,
+ ConstStr255Param prompt,
+ short numTypes,
+ NLType typeList,
+ NameFilterUPP nameFilter,
+ ZoneFilterUPP zoneFilter,
+ DialogHookUPP hook,
+ NBPReply * theReply);
+
+EXTERN_API( short )
+CustomNBP (Point where,
+ ConstStr255Param prompt,
+ short numTypes,
+ NLType typeList,
+ NameFilterUPP nameFilter,
+ ZoneFilterUPP zoneFilter,
+ DialogHookUPP hook,
+ long userData,
+ short dialogID,
+ ModalFilterUPP filter,
+ NBPReply * theReply);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if OLDROUTINENAMES
+#define NuLookup(where, prompt, numTypes, typeList, nameFilter, zoneFilter, \
+hook, theReply) \
+StandardNBP(where, prompt, numTypes, typeList, nameFilter, zoneFilter, \
+hook, theReply)
+#define NuPLookup(where, prompt, numTypes, typeList, nameFilter, \
+zoneFilter, hook, userData, dialogID, filter, theReply) \
+CustomNBP(where, prompt, numTypes, typeList, nameFilter, \
+zoneFilter, hook, userData, dialogID, filter, theReply)
+#endif /* OLDROUTINENAMES */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CTBUTILITIES__ */
+
diff --git a/include/qt/CarbonEvents.h b/include/qt/CarbonEvents.h
new file mode 100644
index 000000000..9e0461160
--- /dev/null
+++ b/include/qt/CarbonEvents.h
@@ -0,0 +1,1432 @@
+/*
+ File: CarbonEvents.h
+
+ Contains: Carbon Event Manager
+
+ Version: Technology: Version 1.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1999-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CARBONEVENTS__
+#define __CARBONEVENTS__
+
+#ifndef __EVENTS__
+#include "Events.h"
+#endif
+
+#ifndef __MENUS__
+#include "Menus.h"
+#endif
+
+#ifndef __CONTROLS__
+#include "Controls.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*======================================================================================*/
+/* EVENT COMMON */
+/*======================================================================================*/
+
+
+enum {
+ eventAlreadyPostedErr = -9860,
+ eventClassInvalidErr = -9862,
+ eventClassAlreadyExistsErr = -9863,
+ eventClassIncorrectErr = -9864,
+ eventClassInvalidVersionErr = -9865,
+ eventHandlerAlreadyInstalledErr = -9866,
+ eventCantInstallHandlerErr = -9867,
+ eventInternalErr = -9868,
+ eventKindIncorrectErr = -9869,
+ eventDataTagNotSupportedErr = -9870,
+ eventDataSizeMismatchErr = -9871
+};
+
+/*======================================================================================*/
+/* EVENT CORE */
+/*======================================================================================*/
+/*--------------------------------------------------------------------------------------*/
+/* o Event Flags, options */
+/*--------------------------------------------------------------------------------------*/
+
+typedef SInt16 EventPriority;
+enum {
+ kEventPriorityLow = 0,
+ kEventPriorityStandard = 1,
+ kEventPriorityHigh = 2
+};
+
+
+typedef UInt32 EventAttributes;
+enum {
+ kEventAttributeNone = 0,
+ kEventAttributeUserEvent = (1 << 0),
+ kEventAttributeRouteToUserFocus = (1 << 1)
+};
+
+enum {
+ kEventLeaveInQueue = false,
+ kEventRemoveFromQueue = true
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o Event Times */
+/* */
+/* EventTime is in seconds since boot. Use the constants to make life easy. */
+/*--------------------------------------------------------------------------------------*/
+typedef double EventTime;
+typedef EventTime EventTimeout;
+typedef EventTime EventTimerInterval;
+
+#define kEventDurationSecond 1.0
+#define kEventDurationMillisecond kEventDurationSecond / 1000
+#define kEventDurationMicrosecond kEventDurationSecond / 1000000
+#define kEventDurationNanosecond kEventDurationSecond / 1000000000
+#define kEventDurationMinute kEventDurationSecond * 60
+#define kEventDurationHour kEventDurationMinute * 60
+#define kEventDurationDay kEventDurationHour * 24
+#define kEventDurationNoWait 0.0
+#define kEventDurationForever -1.0
+
+/* Helpful doodads to convert from and to ticks from event times*/
+#ifdef __cplusplus
+ inline EventTime TicksToEventTime( UInt32 t ) { return ( (t) / 60.0 ); }
+ inline UInt32 EventTimeToTicks( EventTime t ) { return (UInt32)( (t) * 60 ); }
+#else
+ #define TicksToEventTime( t ) (EventTime)( (t) / 60.0 )
+ #define EventTimeToTicks( t ) (UInt32)( (t) * 60 )
+#endif /* defined(__cplusplus) */
+
+
+/*--------------------------------------------------------------------------------------*/
+/* EventTypeSpec structure */
+/* */
+/* This structure is used in many routines to pass a list of event types to a function. */
+/* You typically would declare a const array of these types to pass in. */
+/*--------------------------------------------------------------------------------------*/
+
+struct EventTypeSpec {
+ UInt32 eventClass;
+ UInt32 eventKind;
+};
+typedef struct EventTypeSpec EventTypeSpec;
+
+/* MouseTrackingResults returned from TrackMouse*/
+
+
+typedef UInt16 MouseTrackingResult;
+enum {
+ kMouseTrackingMousePressed = 1,
+ kMouseTrackingMouseReleased = 2,
+ kMouseTrackingMouseExited = 3,
+ kMouseTrackingMouseEntered = 4,
+ kMouseTrackingMouseMoved = 5
+};
+
+typedef struct OpaqueEventRef* EventRef;
+
+typedef UInt32 EventClassID;
+typedef UInt32 EventClass;
+typedef UInt32 EventType;
+/*--------------------------------------------------------------------------------------*/
+/* o EventLoop */
+/*--------------------------------------------------------------------------------------*/
+typedef struct OpaqueEventLoopRef* EventLoopRef;
+EXTERN_API( EventLoopRef )
+GetCurrentEventLoop (void);
+
+EXTERN_API( EventLoopRef )
+GetMainEventLoop (void);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Low-level event blocking */
+/*--------------------------------------------------------------------------------------*/
+
+EXTERN_API( void )
+BlockEventLoop (EventTimeout timeout);
+
+EXTERN_API( void )
+WakeEventLoop (void);
+
+EXTERN_API( Boolean )
+BlockUntilNextEvent (EventTimeout timeout,
+ Boolean pullEvent,
+ EventRef * outEvent);
+
+EXTERN_API( Boolean )
+BlockUntilNextEventMatchingList (UInt32 numTypes,
+ const EventTypeSpec * list,
+ EventTimeout timeout,
+ Boolean pullEvent,
+ EventRef * outEvent);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Core event lifetime APIs */
+/*--------------------------------------------------------------------------------------*/
+
+EXTERN_API( EventRef )
+CopyEvent (EventRef inOther);
+
+EXTERN_API( EventRef )
+RetainEvent (EventRef inEvent);
+
+EXTERN_API( UInt32 )
+GetEventRetainCount (EventRef inEvent);
+
+EXTERN_API( void )
+ReleaseEvent (EventRef inEvent);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Getters for 'base-class' event info */
+/*--------------------------------------------------------------------------------------*/
+
+EXTERN_API( UInt32 )
+GetEventClass (EventRef inEvent);
+
+EXTERN_API( UInt32 )
+GetEventKind (EventRef inEvent);
+
+EXTERN_API( EventAttributes )
+GetEventAttributes (EventRef inEvent);
+
+EXTERN_API( EventTime )
+GetEventTime (EventRef inEvent);
+
+EXTERN_API( UInt32 )
+GetEventPriority (EventRef inEvent);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Setters for 'base-class' event info */
+/*--------------------------------------------------------------------------------------*/
+EXTERN_API( OSStatus )
+SetEventTime (EventRef inEvent,
+ EventTime inTime);
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Getting/setting common event data via tags */
+/* */
+/* NOTE: THIS STUFF IS NOT YET ACTIVE. DO NOT ATTEMPT TO USE IT. */
+/*--------------------------------------------------------------------------------------*/
+enum {
+ kEventTagKeyModifiers = FOUR_CHAR_CODE('mods'), /* UInt32*/
+ kEventTagMouseLocation = FOUR_CHAR_CODE('mloc') /* Point*/
+};
+
+typedef UInt32 EventDataTag;
+EXTERN_API( OSStatus )
+GetEventDataByTag (EventRef inEvent,
+ EventDataTag inKey,
+ void * buffer,
+ Size bufferSize,
+ Size * actualSize) /* can be NULL */;
+
+EXTERN_API( OSStatus )
+SetEventDataByTag (EventRef inEvent,
+ EventDataTag inKey,
+ void * buffer,
+ Size bufferSize);
+
+/* Common, type-safe wrappers for the above...*/
+
+EXTERN_API( OSStatus )
+GetEventKeyModifiers (EventRef inEvent,
+ UInt32 * outModifiers);
+
+EXTERN_API( OSStatus )
+SetEventKeyModifiers (EventRef inEvent,
+ UInt32 inModifiers);
+
+EXTERN_API( OSStatus )
+GetEventMouseLocation (EventRef inEvent,
+ Point * outMouseLoc);
+
+EXTERN_API( OSStatus )
+SetEventMouseLocation (EventRef inEvent,
+ Point inMouseLoc);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Event Queue routines (posting, finding, flushing) */
+/*--------------------------------------------------------------------------------------*/
+
+typedef CALLBACK_API( Boolean , EventComparatorProcPtr )(EventRef inEvent, void *inCompareData);
+typedef STACK_UPP_TYPE(EventComparatorProcPtr) EventComparatorUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(EventComparatorUPP)
+ NewEventComparatorUPP (EventComparatorProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeEventComparatorUPP (EventComparatorUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeEventComparatorUPP (EventRef inEvent,
+ void * inCompareData,
+ EventComparatorUPP userUPP);
+
+#else
+ enum { uppEventComparatorProcInfo = 0x000003D0 }; /* pascal 1_byte Func(4_bytes, 4_bytes) */
+ #define NewEventComparatorUPP(userRoutine) (EventComparatorUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppEventComparatorProcInfo, GetCurrentArchitecture())
+ #define DisposeEventComparatorUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeEventComparatorUPP(inEvent, inCompareData, userUPP) (Boolean)CALL_TWO_PARAMETER_UPP((userUPP), uppEventComparatorProcInfo, (inEvent), (inCompareData))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewEventComparatorProc(userRoutine) NewEventComparatorUPP(userRoutine)
+#define CallEventComparatorProc(userRoutine, inEvent, inCompareData) InvokeEventComparatorUPP(inEvent, inCompareData, userRoutine)
+/*
+ PostEventToQueue retains the given event. You would normally release it after calling
+ this function.
+*/
+EXTERN_API( OSStatus )
+PostEventToQueue (EventRef inEvent,
+ EventPriority inPriority);
+
+EXTERN_API( Boolean )
+IsEventInQueue (EventRef inEvent);
+
+EXTERN_API( OSStatus )
+FlushEventsMatchingListFromQueue (UInt32 inNumTypes,
+ const EventTypeSpec * inList);
+
+EXTERN_API( OSStatus )
+FlushSpecificEventsFromQueue (EventComparatorUPP comparator,
+ void * compareData);
+
+EXTERN_API( void )
+FlushEventQueue (void);
+
+/*
+ Remove EventFromQueue removes the event from the event queue and releases it. If you
+ want to keep the event around, you should make sure to copy or retain it.
+*/
+
+EXTERN_API( void )
+RemoveEventFromQueue (EventRef inEvent);
+
+EXTERN_API( EventRef )
+FindSpecificEventInQueue (EventComparatorUPP comparator,
+ void * compareData);
+
+EXTERN_API( UInt32 )
+GetNumEventsInQueue (void);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Helpful utilities */
+/*--------------------------------------------------------------------------------------*/
+EXTERN_API( EventTime )
+GetCurrentEventTime (void);
+
+EXTERN_API( Boolean )
+IsUserCancelEventRef (EventRef event);
+
+EXTERN_API( Boolean )
+CheckEventQueueForUserCancel (void);
+
+EXTERN_API( OSStatus )
+TrackMouseLocation (GrafPtr port, /* can be NULL */
+ Point * outPt,
+ MouseTrackingResult * result);
+
+EXTERN_API( OSStatus )
+TrackMouseRegion (GrafPtr port, /* can be NULL */
+ RgnHandle region,
+ Boolean * wasInRgn,
+ MouseTrackingResult * result);
+
+EXTERN_API( Boolean )
+ConvertEventRefToEventRecord (EventRef inEvent,
+ EventRecord * outEvent);
+
+EXTERN_API( Boolean )
+IsEventInMask (EventRef inEvent,
+ EventMask inMask);
+
+EXTERN_API( EventTime )
+GetLastUserEventTime (void);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Timers */
+/*--------------------------------------------------------------------------------------*/
+/* Timers, the new null processing mechanism.*/
+/* Not just good, but good for ya. */
+
+typedef struct OpaqueEventLoopTimerRef* EventLoopTimerRef;
+typedef CALLBACK_API( void , EventLoopTimerProcPtr )(EventLoopTimerRef inTimer, void *inUserData);
+typedef STACK_UPP_TYPE(EventLoopTimerProcPtr) EventLoopTimerUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(EventLoopTimerUPP)
+ NewEventLoopTimerUPP (EventLoopTimerProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeEventLoopTimerUPP (EventLoopTimerUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeEventLoopTimerUPP (EventLoopTimerRef inTimer,
+ void * inUserData,
+ EventLoopTimerUPP userUPP);
+
+#else
+ enum { uppEventLoopTimerProcInfo = 0x000003C0 }; /* pascal no_return_value Func(4_bytes, 4_bytes) */
+ #define NewEventLoopTimerUPP(userRoutine) (EventLoopTimerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppEventLoopTimerProcInfo, GetCurrentArchitecture())
+ #define DisposeEventLoopTimerUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeEventLoopTimerUPP(inTimer, inUserData, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppEventLoopTimerProcInfo, (inTimer), (inUserData))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewEventLoopTimerProc(userRoutine) NewEventLoopTimerUPP(userRoutine)
+#define CallEventLoopTimerProc(userRoutine, inTimer, inUserData) InvokeEventLoopTimerUPP(inTimer, inUserData, userRoutine)
+EXTERN_API( OSStatus )
+InstallEventLoopTimer (EventLoopRef inEventLoop,
+ EventTimerInterval inFirstFire,
+ EventTimerInterval inInterval,
+ EventLoopTimerUPP inTimerProc,
+ void * inUserData,
+ EventLoopTimerRef * outRef);
+
+EXTERN_API( OSStatus )
+RemoveEventLoopTimer (EventLoopTimerRef inTimer);
+
+EXTERN_API( OSStatus )
+SetEventLoopTimerNextFireTime (EventLoopTimerRef inTimer,
+ EventTimerInterval nextFire);
+
+
+/*======================================================================================*/
+/* EVENT CLASSES */
+/*======================================================================================*/
+enum {
+ kEventClassMouse = FOUR_CHAR_CODE('mous'),
+ kEventClassKeyboard = FOUR_CHAR_CODE('keyb'),
+ kEventClassTextInput = FOUR_CHAR_CODE('text'),
+ kEventClassApplication = FOUR_CHAR_CODE('appl'),
+ kEventClassEPPC = FOUR_CHAR_CODE('eppc'),
+ kEventClassMenu = FOUR_CHAR_CODE('menu'),
+ kEventClassWindow = FOUR_CHAR_CODE('wind'),
+ kEventClassControl = FOUR_CHAR_CODE('cntl'),
+ kEventClassCommand = FOUR_CHAR_CODE('cmds')
+};
+
+/* Mouse Events */
+enum {
+ kEventLeftMouseDown = 1,
+ kEventLeftMouseUp = 2,
+ kEventRightMouseDown = 3,
+ kEventRightMouseUp = 4,
+ kEventMouseMoved = 5,
+ kEventLeftMouseDragged = 6, /* mouse moved while button down*/
+ kEventRightMouseDragged = 7,
+ kEventMouseEntered = 8,
+ kEventMouseExited = 9,
+ kEventMouseWheelMoved = 10 /* placeholder. Not yet operational, unlike the new Death Star.*/
+};
+
+enum {
+ kEventMouseButtonPrimary = 0, /* only button for a one-button mouse (usually left button for multi-button mouse)*/
+ kEventMouseButtonSecondary = 1, /* usually right button for a multi-button mouse*/
+ kEventMouseButtonTertiary = 2 /* usually middle button for a three-button mouse*/
+};
+
+typedef UInt16 EventMouseButton;
+enum {
+ kEventMouseWheelDirectionUp = 0,
+ kEventMouseWheelDirectionDown = 1,
+ kEventMouseWheelDirectionLeft = 2,
+ kEventMouseWheelDirectionRight = 3
+};
+
+typedef UInt16 EventMouseWheelDirection;
+/* Keyboard Events */
+enum {
+ kEventRawKeyDown = 1, /* hardware-level events*/
+ kEventRawKeyRepeat = 2,
+ kEventRawKeyUp = 3,
+ kEventRawKeyModifiersChanged = 4
+};
+
+enum {
+ kEventTextInput = 5 /* high-level keyboard event (not available yet)*/
+};
+
+/* Application Events */
+enum {
+ kEventAppActivated = 1, /* resume, in old parlance*/
+ kEventAppDeactivated = 2, /* suspend, in old parlance*/
+ kEventAppQuit = 3, /* this app is quitting.*/
+ kEventAppLaunchNotification = 4 /* response to async application launch.*/
+};
+
+/* Apple Events */
+enum {
+ kEventHighLevelEvent = 1
+};
+
+
+/*
+ Window Refresh Events
+
+ o kEventWindowUpdate
+ low-level update event. You must call BeginUpdate, call SetPort,
+ draw your window content, and then call EndUpdate.
+
+ o kEventWindowDrawContent
+ sent when the standard window handler sees an update event.
+ BeginUpdate, SetPort, and EndUpdate are called for you; all you do
+ is draw.
+
+ o kEventWindowDrawStructure
+ sent after the window manager has drawn the window frame. The
+ current port is a global port clipped to the window structure
+ region, not the window's port.
+
+ o kEventWindowEraseContent
+ called when the window manager wishes to erase the window
+ background (In ShowWindow, for example). The current port is set
+ to the window's port.
+
+ o kEventWindowActivate
+ window is active now
+
+ o kEventWindowDeactivate
+ window is inactive now
+*/
+enum {
+ kEventWindowUpdate = 1,
+ kEventWindowDrawContent = 2,
+ kEventWindowDrawStructure = 3,
+ kEventWindowEraseContent = 4,
+ kEventWindowActivate = 5,
+ kEventWindowDeactivate = 6
+};
+
+/*
+ Window State Change Events
+
+ o kEventWindowZOrderChanged
+ Sent after the window has changed position relative
+ to other windows in the application window list.
+
+ o kEventWindowActivationChanged
+ Sent after the window has changed activation state
+
+ o kEventWindowOriginChange
+ kEventWindowSizeChange
+ Sent during ResizeWindow/DragWindow, before the window is
+ actually modified. Alter the current bounds in the event to
+ change the intended location of the window. "Origin"
+ indicates that the window's place location onscreen is
+ different. "Size" indicates that the window's size has
+ changed (the origin may also be different).
+
+ o kEventWindowOriginChanged
+ kEventWindowSizeChanged
+ Sent after the window has been resized or moved.
+*/
+
+enum {
+ kEventWindowZOrderChanged = 16,
+ kEventWindowActivationChanged = 18,
+ kEventWindowOriginChange = 20,
+ kEventWindowOriginChanged = 21,
+ kEventWindowSizeChange = 22,
+ kEventWindowSizeChanged = 23
+};
+
+/*
+ Window Click Events
+
+ Low-level events which generate higher-level "action" events.
+ Most clients should allow the standard window handler to implement
+ these events.
+
+ o kEventWindowClickDragRgn
+ sent when the mouse is down in the drag region. Calls DragWindow.
+
+ o kEventWindowClickResizeRgn
+ sent when the mouse is down in the resize area. Calls ResizeWindow.
+
+ o kEventWindowClickCollapseRgn
+ sent when the mouse is down in the collapse widget. Generates
+ kEventWindowExpand or kEventWindowCollapse (whichever is the opposite
+ of the window's current collapse state).
+
+ o kEventWindowClickCloseRgn
+ sent when the mouse is down in the close widget. Generates
+ kEventWindowClose.
+
+ o kEventWindowClickZoomRgn
+ sent when the mouse is down in the zoom widget. Generates
+ kEventWindowZoom.
+
+ o kEventWindowClickContentRgn
+ sent when the mouse is down in the content region.
+
+ o kEventWindowClickProxyIconRgn
+ sent when the mouse is down in the proxy icon. Generates proxy
+ icon events.
+*/
+enum {
+ kEventWindowClickDragRgn = 32,
+ kEventWindowClickResizeRgn = 33,
+ kEventWindowClickCollapseRgn = 34,
+ kEventWindowClickCloseRgn = 35,
+ kEventWindowClickZoomRgn = 36,
+ kEventWindowClickContentRgn = 37,
+ kEventWindowClickProxyIconRgn = 38
+};
+
+/*
+ Window Action Events
+
+ o kEventWindowCollapse
+ If the window is not collapsed, this event is sent by the standard
+ window handler after it has received kEventWindowClickCollapseRgn
+ and received true from a call to TrackBox. Standard window handler
+ calls CollapseWindow and then sends kEventWindowCollapsed if no
+ error is received from CollapseWindow.
+
+ o kEventWindowCollapsed
+ Notification that the object has successfully collapsed.
+
+ o kEventWindowCollapseAll
+ Sent by the standard window handler (when the option key is down)
+ after it has received kEventWindowClickCollapseRgn and then
+ received true from a call to TrackBox. The standard window
+ handler's response is to send each window of the same class as the
+ clicked window a kEventWindowCollapse event.
+
+ o kEventWindowExpand
+ If the window is collapsed, this event is sent by the standard
+ window handler after it has received kEventWindowClickCollapseRgn
+ and received true from a call to TrackBox. The standard window
+ handler's response is to call CollapseWindow, then send
+ kEventWindowExpanded.
+
+ o kEventWindowExpanded
+ Sent by the standard window handler (when the option key is down)
+ after it has received kEventWindowClickCollapseRgn and then
+ received true from a call to TrackBox. The standard window
+ handler's response is to send each window of the same class as the
+ clicked window a kEventWindowExpand event.
+
+ o kEventWindowExpandAll
+ Notification that the window has successfully expanded.
+
+ o kEventWindowClose
+ Sent by the standard window handler after it has received
+ kEventWindowClickCloseRgn and successfully called TrackBox.
+
+ o kEventWindowClosed
+ Dispatched by DisposeWindow before the object is disposed.
+
+ o kEventWindowCloseAll
+ Sent by the standard window handler (when the option key is down)
+ after it has received kEventWindowClickCloseRgn and received true
+ from a call to TrackGoAway. The standard window handler's response
+ is to send each window with the same class as the clicked window a
+ kEventWindowClose event.
+
+ o kEventWindowZoom
+ Sent by the standard window handler upon receiving
+ kEventWindowClickZoomRgn and then receiving true from a call to
+ TrackBox. The standard window handler's response is to zoom the
+ window using the sample code taken from the 8.5 Window Manager
+ documentation. Upon successful zoom, kEventWindowZoomed is sent.
+
+ o kEventWindowZoomed
+ Notification that object has been successfully zoomed.
+
+ o kEventWindowZoomAll
+ Sent by the standard window handler (when the option key is down)
+ after it has received kEventObjectClickZoomRgn and received true
+ from a call to TrackBox. The standard window handler's response is
+ to send each window with the same class as the clicked window a
+ kEventObjectZoom event and then to reposition all zoomed windows
+ using the kWindowCascadeOnParentWindowScreen positioning method.
+
+ o kEventWindowContextualMenuSelect
+ Sent when either the right mouse button is pressed, or the control
+ key is held down and the left mouse button is pressed, or the left
+ mouse button is held down for more than 1/4th of a second (and
+ nothing else is handling the generated mouse tracking events).
+ The standard window handler ignores this event.
+
+ o kEventWindowPathSelect
+ Sent when IsWindowPathSelectClick would return true. Set the
+ MenuRef in the event if you wish to customize the menu passed to
+ WindowPathSelect.
+
+ o kEventWindowGetIdealSize
+ Sent by the standard window handler to determine the standard state
+ for zooming.
+ o kEventWindowGetMinimumSize
+ Sent by the standard window handler to determine the minimum size
+ of the window (used during window resizing).
+
+ o kEventWindowProxyBeginDrag
+ Sent before a proxy icon drag; you can attach data to the DragRef
+ in the event.
+
+ o kEventWindowProxyEndDrag
+ Sent after the proxy icon drag is complete, whether successful or
+ not.
+*/
+enum {
+ kEventWindowCollapse = 66,
+ kEventWindowCollapsed = 67,
+ kEventWindowCollapseAll = 68,
+ kEventWindowExpand = 69,
+ kEventWindowExpanded = 70,
+ kEventWindowExpandAll = 71,
+ kEventWindowClose = 72,
+ kEventWindowClosed = 73,
+ kEventWindowCloseAll = 74,
+ kEventWindowZoom = 75,
+ kEventWindowZoomed = 76,
+ kEventWindowZoomAll = 77,
+ kEventWindowContextualMenuSelect = 78,
+ kEventWindowPathSelect = 79,
+ kEventWindowGetIdealSize = 80,
+ kEventWindowGetMinimumSize = 81,
+ kEventWindowProxyBeginDrag = 128,
+ kEventWindowProxyEndDrag = 129
+};
+
+/* Menu Events */
+enum {
+ kEventMenuBeginTracking = 1,
+ kEventMenuEndTracking = 2,
+ kEventMenuChangeTrackingMode = 3,
+ kEventMenuOpening = 4,
+ kEventMenuClosed = 5,
+ kEventMenuTargetItem = 6,
+ kEventMenuMatchKey = 7
+};
+
+/* Command-related events */
+enum {
+ kEventProcessCommand = 1
+};
+
+
+/* Control Events */
+enum {
+ kEventControlHit = 1,
+ kEventControlSimulateHit = 2
+};
+
+/* HI Commands */
+enum {
+ kHICommandCancel = FOUR_CHAR_CODE('not!'), /* the most important command: cancel the current operation! sent when the user presses command-period*/
+ kHICommandQuit = FOUR_CHAR_CODE('quit'),
+ kHICommandUndo = FOUR_CHAR_CODE('undo'),
+ kHICommandRedo = FOUR_CHAR_CODE('redo'),
+ kHICommandCut = FOUR_CHAR_CODE('cut '),
+ kHICommandCopy = FOUR_CHAR_CODE('copy'),
+ kHICommandPaste = FOUR_CHAR_CODE('past'),
+ kHICommandClear = FOUR_CHAR_CODE('clea'),
+ kHICommandSelectAll = FOUR_CHAR_CODE('sall')
+};
+
+enum {
+ kHICommandFromMenu = (1L << 0)
+};
+
+
+struct HICommand {
+ UInt32 attributes;
+ UInt32 commandID;
+ struct {
+ MenuRef menuRef;
+ UInt16 menuItemIndex;
+ } menu;
+};
+typedef struct HICommand HICommand;
+/*--------------------------------------------------------------------------------------*/
+/* Mouse Events */
+/*--------------------------------------------------------------------------------------*/
+
+EXTERN_API( OSStatus )
+CreateMouseEvent (UInt32 kind,
+ EventTime when,
+ Point where,
+ UInt32 modifiers,
+ EventRef * outEvent);
+
+EXTERN_API( OSStatus )
+SetMouseEventMouseLocation (EventRef inEvent,
+ Point inPoint);
+
+EXTERN_API( OSStatus )
+SetMouseEventKeyModifiers (EventRef inEvent,
+ UInt32 inModifiers);
+
+EXTERN_API( OSStatus )
+SetMouseEventClickCount (EventRef inEvent,
+ UInt32 inCount);
+
+EXTERN_API( OSStatus )
+GetMouseEventMouseLocation (EventRef inEvent,
+ Point * outPoint);
+
+EXTERN_API( OSStatus )
+GetMouseEventKeyModifiers (EventRef inEvent,
+ UInt32 * outModifiers);
+
+EXTERN_API( OSStatus )
+GetMouseEventClickCount (EventRef inEvent,
+ UInt32 * outCount);
+
+
+/*--------------------------------------------------------------------------------------*/
+/* Keyboard Events */
+/*--------------------------------------------------------------------------------------*/
+
+EXTERN_API( OSStatus )
+CreateKeyboardEvent (UInt32 kind,
+ EventTime when,
+ UInt32 inKeyChar,
+ UInt32 inKeyCode,
+ UInt32 inKeyModifiers,
+ EventRef * outEvent);
+
+EXTERN_API( OSStatus )
+SetKeyboardEventKeyCode (EventRef inEvent,
+ UInt32 inKeyCode);
+
+EXTERN_API( OSStatus )
+SetKeyboardEventKeyChar (EventRef inEvent,
+ UInt32 inKeyChar);
+
+EXTERN_API( OSStatus )
+SetKeyboardEventKeyModifiers (EventRef inEvent,
+ UInt32 inModifiers);
+
+EXTERN_API( OSStatus )
+GetKeyboardEventKeyCode (EventRef inEvent,
+ UInt32 * outKeyCode);
+
+EXTERN_API( OSStatus )
+GetKeyboardEventKeyChar (EventRef inEvent,
+ UInt32 * outKeyChar);
+
+EXTERN_API( OSStatus )
+GetKeyboardEventKeyModifiers (EventRef inEvent,
+ UInt32 * outModifiers);
+
+/*--------------------------------------------------------------------------------------*/
+/* Window Events */
+/*--------------------------------------------------------------------------------------*/
+EXTERN_API( OSStatus )
+CreateWindowEvent (UInt32 kind,
+ EventTime when,
+ WindowRef window,
+ EventRef * outEvent);
+
+EXTERN_API( OSStatus )
+SetWindowEventWindowRef (EventRef inEvent,
+ WindowRef inWindow);
+
+EXTERN_API( OSStatus )
+SetWindowEventKeyModifiers (EventRef inEvent,
+ UInt32 inModifiers);
+
+EXTERN_API( OSStatus )
+SetWindowEventMouseLocation (EventRef inEvent,
+ Point inWhere);
+
+EXTERN_API( OSStatus )
+SetWindowEventWindowSize (EventRef inEvent,
+ Point inSize);
+
+EXTERN_API( OSStatus )
+GetWindowEventWindowRef (EventRef inEvent,
+ WindowRef * outWindow);
+
+EXTERN_API( OSStatus )
+GetWindowEventKeyModifiers (EventRef inEvent,
+ UInt32 * outModifiers);
+
+EXTERN_API( OSStatus )
+GetWindowEventMouseLocation (EventRef inEvent,
+ Point * outWhere);
+
+EXTERN_API( OSStatus )
+GetWindowEventWindowSize (EventRef inEvent,
+ Point * outSize);
+
+/* window proxy events contain dragrefs*/
+EXTERN_API( OSStatus )
+GetWindowEventDragRef (EventRef eventRef,
+ DragRef * outDrag);
+
+EXTERN_API( OSStatus )
+SetWindowEventDragRef (EventRef eventRef,
+ DragRef inDrag);
+
+EXTERN_API( OSStatus )
+GetWindowEventMenuRef (EventRef eventRef,
+ MenuRef * outMenu);
+
+EXTERN_API( OSStatus )
+SetWindowEventMenuRef (EventRef eventRef,
+ MenuRef inMenu);
+
+/* window bounds-changed events*/
+EXTERN_API( OSStatus )
+GetWindowEventOriginalBounds (EventRef eventRef,
+ Rect * outBounds);
+
+EXTERN_API( OSStatus )
+SetWindowEventOriginalBounds (EventRef eventRef,
+ const Rect * inBounds);
+
+EXTERN_API( OSStatus )
+GetWindowEventPreviousBounds (EventRef eventRef,
+ Rect * outBounds);
+
+EXTERN_API( OSStatus )
+SetWindowEventPreviousBounds (EventRef eventRef,
+ const Rect * inBounds);
+
+EXTERN_API( OSStatus )
+GetWindowEventCurrentBounds (EventRef eventRef,
+ Rect * outBounds);
+
+EXTERN_API( OSStatus )
+SetWindowEventCurrentBounds (EventRef eventRef,
+ const Rect * inBounds);
+
+EXTERN_API( OSStatus )
+GetWindowEventGrafPort (EventRef eventRef,
+ GrafPtr * outPort);
+
+EXTERN_API( OSStatus )
+SetWindowEventGrafPort (EventRef eventRef,
+ GrafPtr inPort);
+
+/* window click events each contain a reference to the original mouse down event*/
+EXTERN_API( OSStatus )
+GetWindowEventMouseEvent (EventRef eventRef,
+ EventRef * outEvent);
+
+EXTERN_API( OSStatus )
+SetWindowEventMouseEvent (EventRef eventRef,
+ EventRef inEvent);
+
+
+/*--------------------------------------------------------------------------------------*/
+/* Control Events */
+/*--------------------------------------------------------------------------------------*/
+EXTERN_API( OSStatus )
+CreateControlEvent (UInt32 kind,
+ EventTime when,
+ ControlRef control,
+ EventRef * outEvent);
+
+EXTERN_API( OSStatus )
+SetControlEventControlRef (EventRef inEvent,
+ ControlRef inControl);
+
+EXTERN_API( OSStatus )
+SetControlEventControlPartCode (EventRef inEvent,
+ ControlPartCode inPart);
+
+EXTERN_API( OSStatus )
+SetControlEventKeyModifiers (EventRef inEvent,
+ UInt32 inModifiers);
+
+EXTERN_API( OSStatus )
+GetControlEventControlRef (EventRef inEvent,
+ ControlRef * outControl);
+
+EXTERN_API( OSStatus )
+GetControlEventControlPartCode (EventRef inEvent,
+ ControlPartCode * outPart);
+
+EXTERN_API( OSStatus )
+GetControlEventKeyModifiers (EventRef inEvent,
+ UInt32 * outModifiers);
+
+/*--------------------------------------------------------------------------------------*/
+/* Menu Events */
+/*--------------------------------------------------------------------------------------*/
+EXTERN_API( OSStatus )
+CreateMenuEvent (UInt32 kind,
+ EventTime when,
+ MenuRef menu,
+ EventRef * outEvent);
+
+EXTERN_API( OSStatus )
+SetMenuEventMenuRef (EventRef inEvent,
+ MenuRef inMenu);
+
+EXTERN_API( OSStatus )
+SetMenuEventTrackingMode (EventRef inEvent,
+ MenuTrackingMode inMode,
+ Boolean setCurrent);
+
+EXTERN_API( OSStatus )
+SetMenuEventFirstTimeOpen (EventRef inEvent,
+ Boolean inFirstTimeOpen);
+
+EXTERN_API( OSStatus )
+SetMenuEventItemIndex (EventRef inEvent,
+ MenuItemIndex inItemIndex);
+
+EXTERN_API( OSStatus )
+SetMenuEventCommandID (EventRef inEvent,
+ MenuCommand inCommand);
+
+EXTERN_API( OSStatus )
+SetMenuEventKeyEvent (EventRef inEvent,
+ EventRef inKeyEvent);
+
+EXTERN_API( OSStatus )
+SetMenuEventHICommand (EventRef inEvent,
+ const HICommand * inCommand);
+
+EXTERN_API( OSStatus )
+GetMenuEventMenuRef (EventRef inEvent,
+ MenuRef * outMenu);
+
+EXTERN_API( OSStatus )
+GetMenuEventTrackingMode (EventRef inEvent,
+ Boolean getCurrent,
+ MenuTrackingMode * outMode);
+
+EXTERN_API( OSStatus )
+GetMenuEventFirstTimeOpen (EventRef inEvent,
+ Boolean * outFirstTimeOpen);
+
+EXTERN_API( OSStatus )
+GetMenuEventItemIndex (EventRef inEvent,
+ MenuItemIndex * outItemIndex);
+
+EXTERN_API( OSStatus )
+GetMenuEventCommandID (EventRef inEvent,
+ MenuCommand * outCommand);
+
+EXTERN_API( OSStatus )
+GetMenuEventKeyEvent (EventRef inEvent,
+ EventRef * outKeyEvent);
+
+EXTERN_API( OSStatus )
+GetMenuEventHICommand (EventRef inEvent,
+ HICommand * outCommand);
+
+/*--------------------------------------------------------------------------------------*/
+/* Command Events */
+/*--------------------------------------------------------------------------------------*/
+
+EXTERN_API( OSStatus )
+CreateCommandEvent (UInt32 kind,
+ EventTime when,
+ const HICommand * inCommand,
+ EventRef * outEvent);
+
+EXTERN_API( OSStatus )
+GetCommandEventCommand (EventRef inEvent,
+ HICommand * outCommand);
+
+/*--------------------------------------------------------------------------------------*/
+/* Miscellany */
+/*--------------------------------------------------------------------------------------*/
+
+EXTERN_API( OSStatus )
+CreateApplicationEvent (UInt32 kind,
+ EventTime when,
+ EventRef * outEvent);
+
+
+/*
+ This routine is used to get information about an async application launch
+ It is only valid on Mac OS X.
+*/
+
+EXTERN_API( OSStatus )
+GetApplicationEventLaunchData (EventRef event,
+ OSStatus * outLaunchErr,
+ ProcessSerialNumber * outProcess,
+ void ** outLaunchRefCon);
+
+/*======================================================================================*/
+/* EVENT HANDLERS */
+/*======================================================================================*/
+
+typedef UInt32 EventHandlerResult;
+enum {
+ kEventHandlerHandled = 0,
+ kEventHandlerNotHandled = 1,
+ kEventHandlerPassUpChain = 2,
+ kEventHandlerStopProcessing = 3
+};
+
+
+enum {
+ kEventHandlerStandard = -1L
+};
+
+
+
+
+typedef struct OpaqueEventHandlerRef* EventHandlerRef;
+
+/*--------------------------------------------------------------------------------------*/
+/* o EventHandler specification */
+/*--------------------------------------------------------------------------------------*/
+
+typedef CALLBACK_API( EventHandlerResult , EventHandlerProcPtr )(EventHandlerRef inHandlerRef, EventRef inEvent, void *userData);
+typedef STACK_UPP_TYPE(EventHandlerProcPtr) EventHandlerUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(EventHandlerUPP)
+ NewEventHandlerUPP (EventHandlerProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeEventHandlerUPP (EventHandlerUPP userUPP);
+
+ EXTERN_API(EventHandlerResult)
+ InvokeEventHandlerUPP (EventHandlerRef inHandlerRef,
+ EventRef inEvent,
+ void * userData,
+ EventHandlerUPP userUPP);
+
+#else
+ enum { uppEventHandlerProcInfo = 0x00000FF0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ #define NewEventHandlerUPP(userRoutine) (EventHandlerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppEventHandlerProcInfo, GetCurrentArchitecture())
+ #define DisposeEventHandlerUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeEventHandlerUPP(inHandlerRef, inEvent, userData, userUPP) (EventHandlerResult)CALL_THREE_PARAMETER_UPP((userUPP), uppEventHandlerProcInfo, (inHandlerRef), (inEvent), (userData))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewEventHandlerProc(userRoutine) NewEventHandlerUPP(userRoutine)
+#define CallEventHandlerProc(userRoutine, inHandlerRef, inEvent, userData) InvokeEventHandlerUPP(inHandlerRef, inEvent, userData, userRoutine)
+/*--------------------------------------------------------------------------------------*/
+/* o Installing Event Handlers */
+/* */
+/* Use these routines to install event handlers for a specific toolbox object. You may */
+/* pass zero for inNumTypes and NULL for inList if you need to be in a situation where */
+/* you know you will be receiving events, but not exactly which ones at the time you */
+/* are installing the handler. Later, your application can call the Add/Remove routines */
+/* listed below this section. */
+/* */
+/* You can only install a specific handler once. The combination of inHandler and */
+/* inUserData is considered the 'signature' of a handler. Any attempt to install a new */
+/* handler with the same proc and user data as an already-installed handler will result */
+/* in eventHandlerAlreadyInstalledErr. Installing the same proc and user data on a */
+/* different object is legal. */
+/* */
+/* Upon successful completion of this routine, you are returned an EventHandlerRef, */
+/* which you can use in various other calls, and is passed to your event handler. You */
+/* use it to extract information about the handler, such as the target (window, etc.) */
+/* if you have the same handler installed for different objects and need to perform */
+/* actions on the current target (say, call a window manager function). */
+/*--------------------------------------------------------------------------------------*/
+EXTERN_API( OSStatus )
+InstallApplicationEventHandler (EventHandlerUPP inHandler,
+ UInt32 inNumTypes,
+ const EventTypeSpec * inList,
+ void * inUserData,
+ EventHandlerRef * outRef);
+
+EXTERN_API( OSStatus )
+InstallWindowEventHandler (WindowRef inWindowRef,
+ EventHandlerUPP inHandler,
+ UInt32 inNumTypes,
+ const EventTypeSpec * inList,
+ void * inUserData,
+ EventHandlerRef * outRef);
+
+EXTERN_API( OSStatus )
+InstallControlEventHandler (ControlRef inControlRef,
+ EventHandlerUPP inHandler,
+ UInt32 inNumTypes,
+ const EventTypeSpec * inList,
+ void * inUserData,
+ EventHandlerRef * outRef);
+
+EXTERN_API( OSStatus )
+InstallMenuEventHandler (MenuRef inMenuRef,
+ EventHandlerUPP inHandler,
+ UInt32 inNumTypes,
+ const EventTypeSpec * inList,
+ void * inUserData,
+ EventHandlerRef * outRef);
+
+EXTERN_API( OSStatus )
+RemoveEventHandler (EventHandlerRef inHandlerRef);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Adjusting set of event types after a handler is created */
+/* */
+/* After installing a handler with the routine above, you can adjust the event type */
+/* list telling the toolbox what events to send to that handler by calling the two */
+/* routines below. If you add an event type twice for the same handler, your handler */
+/* will only be called once, but it will take two RemoveEventType calls to stop your */
+/* handler from being called with that event type. In other words, the install count */
+/* for each event type is maintained by the toolbox. This might allow you, for example */
+/* to have subclasses of a window object register for types without caring if the base */
+/* class has already registered for that type. When the subclass removes its types, it */
+/* can succesfully do so without affecting the base class' reception of its events */
+/* types, yielding eternal bliss. */
+/*--------------------------------------------------------------------------------------*/
+
+EXTERN_API( OSStatus )
+AddEventTypesToHandler (EventHandlerRef inHandlerRef,
+ UInt32 inNumTypes,
+ const EventTypeSpec * inList);
+
+EXTERN_API( OSStatus )
+RemoveEventTypesFromHandler (EventHandlerRef inHandlerRef,
+ UInt32 inNumTypes,
+ const EventTypeSpec * inList);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Explicit Propogation */
+/*--------------------------------------------------------------------------------------*/
+
+EXTERN_API( EventHandlerResult )
+CallNextEventHandler (EventHandlerRef inThisHandler,
+ EventRef inEvent);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Getting the target from a handler ref */
+/*--------------------------------------------------------------------------------------*/
+
+EXTERN_API( ControlRef )
+GetEventHandlerTargetControl (EventHandlerRef inHandler);
+
+EXTERN_API( WindowRef )
+GetEventHandlerTargetWindow (EventHandlerRef inHandler);
+
+EXTERN_API( MenuRef )
+GetEventHandlerTargetMenu (EventHandlerRef inHandler);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Sending Events */
+/*--------------------------------------------------------------------------------------*/
+
+EXTERN_API( EventHandlerResult )
+SendEventToApplication (EventRef inEvent);
+
+EXTERN_API( EventHandlerResult )
+SendEventToWindow (EventRef inEvent,
+ WindowRef inWindow);
+
+EXTERN_API( EventHandlerResult )
+SendEventToControl (EventRef inEvent,
+ ControlRef inControl);
+
+EXTERN_API( EventHandlerResult )
+SendEventToMenu (EventRef inEvent,
+ MenuRef inMenu);
+
+EXTERN_API( EventHandlerResult )
+SendEventToUserFocus (EventRef inEvent);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Command Routines */
+/*--------------------------------------------------------------------------------------*/
+
+EXTERN_API( EventHandlerResult )
+ProcessHICommand (const HICommand * inCommand);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Event Loop Routines */
+/*--------------------------------------------------------------------------------------*/
+
+EXTERN_API( void )
+RunApplicationEventLoop (void);
+
+EXTERN_API( void )
+QuitApplicationEventLoop (void);
+
+/*--------------------------------------------------------------------------------------*/
+/* o User Focus */
+/*--------------------------------------------------------------------------------------*/
+
+EXTERN_API( void )
+SetUserFocusWindow (WindowRef inWindow);
+
+EXTERN_API( WindowRef )
+GetUserFocusWindow (void);
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Default/Cancel buttons */
+/*--------------------------------------------------------------------------------------*/
+
+EXTERN_API( OSStatus )
+SetWindowDefaultButton (WindowRef inWindow,
+ ControlRef inControl) /* can be NULL */;
+
+EXTERN_API( OSStatus )
+SetWindowCancelButton (WindowRef inWindow,
+ ControlRef inControl) /* can be NULL */;
+
+EXTERN_API( OSStatus )
+GetWindowDefaultButton (WindowRef inWindow,
+ ControlRef * outControl);
+
+EXTERN_API( OSStatus )
+GetWindowCancelButton (WindowRef inWindow,
+ ControlRef * outControl);
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Mouse Tracking Areas */
+/* */
+/* Mouse tracking areas control the generation of mouse-enter and */
+/* mouse-exit events. When the user moves the mouse into a tracking */
+/* area, kEventMouseEnter is sent to the window. When the user moves */
+/* the mouse out of a tracking area, kEventMouseExit is sent. */
+/* */
+/* Mouse tracking regions are uniquely identified within the scope of */
+/* a window by a client signature/MouseTrackingRef pair. The client */
+/* signature is the usual DTS-registered creator OSType. */
+/* */
+/* Mouse tracking areas can overlap, but are not exclusive. Mouse */
+/* motion events are generated for each of the tracking areas */
+/* intersected by the mouse. */
+/* */
+/* Mouse tracking areas are initially enabled. You can explicitly */
+/* disable a mouse tracking area to prevent mouse-enter/exit events */
+/* from being generated. */
+/* */
+/* Unlike global mouse-moved events, mouse-enter and mouse-exit are */
+/* generated while your app is in the background. If this is not */
+/* considered desirable, disable the tracking areas while the */
+/* application is in the background. */
+/*--------------------------------------------------------------------------------------*/
+typedef struct OpaqueMouseTrackingRef* MouseTrackingRef;
+/*
+ Tracking Options
+ If locally clipped, the region is expected in local coordinates and
+ mouse movement tracking is clipped to the window's content region.
+ If globally clipped, the region is expected in global coordinates and
+ the tracking area is clipped to window's structure region.
+*/
+
+typedef OptionBits MouseTrackingOptions;
+enum {
+ kMouseTrackingOptionLocalClip = 0, /* specify a region in local coordinates; it will be clipped to the window's content region*/
+ kMouseTrackingOptionGlobalClip = 1, /* specify a region in global coordinates; it will be clipped to the window's structure region*/
+ kMouseTrackingOptionsStandard = kMouseTrackingOptionLocalClip
+};
+
+/* Creation*/
+EXTERN_API( OSStatus )
+CreateMouseTrackingArea (WindowRef inWindow,
+ OSType inCreator,
+ MouseTrackingOptions inOptions,
+ RgnHandle inRegion,
+ MouseTrackingRef * outMouseRef);
+
+EXTERN_API( OSStatus )
+RetainMouseTrackingArea (MouseTrackingRef inMouseRef);
+
+EXTERN_API( OSStatus )
+ReleaseMouseTrackingArea (MouseTrackingRef inMouseRef);
+
+/* Accessors*/
+EXTERN_API( OSStatus )
+SetMouseTrackingAreaRefCon (MouseTrackingRef inMouseRef,
+ UInt32 refCon);
+
+EXTERN_API( OSStatus )
+GetMouseTrackingAreaRefCon (MouseTrackingRef inMouseRef,
+ UInt32 * outRefCon);
+
+/* Geometry*/
+EXTERN_API( OSStatus )
+MoveMouseTrackingArea (MouseTrackingRef inMouseRef,
+ SInt16 deltaH,
+ SInt16 deltaV);
+
+EXTERN_API( OSStatus )
+SetMouseTrackingAreaRegion (MouseTrackingRef inMouseRef,
+ RgnHandle inRegion);
+
+EXTERN_API( OSStatus )
+GetMouseTrackingAreaRegion (MouseTrackingRef inMouseRef,
+ RgnHandle outRgn);
+
+/* Enable/disable*/
+EXTERN_API( OSStatus )
+SetMouseTrackingAreaEnabled (MouseTrackingRef inMouseRef,
+ Boolean enabled);
+
+/* Namespace-scoped operations*/
+EXTERN_API( OSStatus )
+ReleaseWindowMouseTrackingAreas (WindowRef inWindow,
+ OSType creator);
+
+EXTERN_API( OSStatus )
+MoveWindowMouseTrackingAreas (WindowRef inWindow,
+ OSType creator,
+ SInt16 deltaH,
+ SInt16 deltaV);
+
+EXTERN_API( OSStatus )
+SetWindowMouseTrackingAreasEnabled (WindowRef inWindow,
+ OSType creator,
+ Boolean enabled);
+
+/* Mouse event accessor additions*/
+
+/* Mouse-enter and exit events contain the tracking ref for which they are generated.*/
+EXTERN_API( OSStatus )
+SetMouseEventTrackingArea (EventRef inEvent,
+ MouseTrackingRef inMouseRef);
+
+EXTERN_API( OSStatus )
+GetMouseEventTrackingArea (EventRef inEvent,
+ MouseTrackingRef * outMouseRef);
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CARBONEVENTS__ */
+
diff --git a/include/qt/CardServices.h b/include/qt/CardServices.h
new file mode 100644
index 000000000..e5edd51f1
--- /dev/null
+++ b/include/qt/CardServices.h
@@ -0,0 +1,914 @@
+/*
+ File: CardServices.h
+
+ Contains: The client interface to Card and Socket Services.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc. All rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CARDSERVICES__
+#define __CARDSERVICES__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __PCCARDTUPLES__
+#include "PCCardTuples.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* miscellaneous*/
+
+enum {
+ CS_MAX_SOCKETS = 32 /* a long is used as a socket bitmap*/
+};
+
+
+/* Will move to <Traps.h>*/
+enum {
+ _PCCardDispatch = 0xAAF0 /* Card Services entry trap*/
+};
+
+/* Will move to <Errors.h>*/
+
+/* result codes*/
+
+enum {
+ kCSBadAdapterErr = -9050, /* invalid adapter number*/
+ kCSBadAttributeErr = -9051, /* specified attributes field value is invalid*/
+ kCSBadBaseErr = -9052, /* specified base system memory address is invalid*/
+ kCSBadEDCErr = -9053, /* specified EDC generator specified is invalid*/
+ kCSBadIRQErr = -9054, /* specified IRQ level is invalid*/
+ kCSBadOffsetErr = -9055, /* specified PC card memory array offset is invalid*/
+ kCSBadPageErr = -9056, /* specified page is invalid*/
+ kCSBadSizeErr = -9057, /* specified size is invalid*/
+ kCSBadSocketErr = -9058, /* specified logical or physical socket number is invalid*/
+ kCSBadTypeErr = -9059, /* specified window or interface type is invalid*/
+ kCSBadVccErr = -9060, /* specified Vcc power level index is invalid*/
+ kCSBadVppErr = -9061, /* specified Vpp1 or Vpp2 power level index is invalid*/
+ kCSBadWindowErr = -9062, /* specified window is invalid*/
+ kCSBadArgLengthErr = -9063, /* ArgLength argument is invalid*/
+ kCSBadArgsErr = -9064, /* values in argument packet are invalid*/
+ kCSBadHandleErr = -9065, /* clientHandle is invalid*/
+ kCSBadCISErr = -9066, /* CIS on card is invalid*/
+ kCSBadSpeedErr = -9067, /* specified speed is unavailable*/
+ kCSReadFailureErr = -9068, /* unable to complete read request*/
+ kCSWriteFailureErr = -9069, /* unable to complete write request*/
+ kCSGeneralFailureErr = -9070, /* an undefined error has occurred*/
+ kCSNoCardErr = -9071, /* no PC card in the socket*/
+ kCSUnsupportedFunctionErr = -9072, /* function is not supported by this implementation*/
+ kCSUnsupportedModeErr = -9073, /* mode is not supported*/
+ kCSBusyErr = -9074, /* unable to process request at this time - try later*/
+ kCSWriteProtectedErr = -9075, /* media is write-protected*/
+ kCSConfigurationLockedErr = -9076, /* a configuration has already been locked*/
+ kCSInUseErr = -9077, /* requested resource is being used by a client*/
+ kCSNoMoreItemsErr = -9078, /* there are no more of the requested item*/
+ kCSOutOfResourceErr = -9079 /* Card Services has exhausted the resource*/
+};
+
+
+
+/* messages sent to client's event handler*/
+
+enum {
+ kCSNullMessage = 0x00, /* no messages pending (not sent to clients)*/
+ kCSCardInsertionMessage = 0x01, /* card has been inserted into the socket*/
+ kCSCardRemovalMessage = 0x02, /* card has been removed from the socket*/
+ kCSCardLockMessage = 0x03, /* card is locked into the socket with a mechanical latch*/
+ kCSCardUnlockMessage = 0x04, /* card is no longer locked into the socket*/
+ kCSCardReadyMessage = 0x05, /* card is ready to be accessed*/
+ kCSCardResetMessage = 0x06, /* physical reset has completed*/
+ kCSInsertionRequestMessage = 0x07, /* request to insert a card using insertion motor*/
+ kCSInsertionCompleteMessage = 0x08, /* insertion motor has finished inserting a card*/
+ kCSEjectionRequestMessage = 0x09, /* user or other client is requesting a card ejection*/
+ kCSEjectionFailedMessage = 0x0A, /* eject failure due to electrical/mechanical problems*/
+ kCSPMResumeMessage = 0x0B, /* power management resume (TBD)*/
+ kCSPMSuspendMessage = 0x0C, /* power management suspend (TBD)*/
+ kCSResetPhysicalMessage = 0x0D, /* physical reset is about to occur on this card*/
+ kCSResetRequestMessage = 0x0E, /* physical reset has been requested by a client*/
+ kCSResetCompleteMessage = 0x0F, /* ResetCard() background reset has completed*/
+ kCSBatteryDeadMessage = 0x10, /* battery is no longer useable, data will be lost*/
+ kCSBatteryLowMessage = 0x11, /* battery is weak and should be replaced*/
+ kCSWriteProtectMessage = 0x12, /* card is now write protected*/
+ kCSWriteEnabledMessage = 0x13, /* card is now write enabled*/
+ kCSClientInfoMessage = 0x14, /* client is to return client information*/
+ kCSSSUpdatedMessage = 0x15, /* AddSocketServices/ReplaceSocket services has changed SS support*/
+ kCSFunctionInterruptMessage = 0x16, /* card function interrupt*/
+ kCSAccessErrorMessage = 0x17, /* client bus errored on access to socket*/
+ kCSCardUnconfiguredMessage = 0x18, /* a CARD_READY was delivered to all clients and no client */
+ /* requested a configuration for the socket*/
+ kCSStatusChangedMessage = 0x19 /* status change for cards in I/O mode*/
+};
+
+/*
+ The following is a mapping of the PCMCIA name space to the Macintosh name space.
+ These two enum lists will be removed and given to developers as a separate file.
+*/
+enum {
+ SUCCESS = noErr,
+ BAD_ADAPTER = kCSBadAdapterErr,
+ BAD_ATTRIBUTE = kCSBadAttributeErr,
+ BAD_BASE = kCSBadBaseErr,
+ BAD_EDC = kCSBadEDCErr,
+ BAD_IRQ = kCSBadIRQErr,
+ BAD_OFFSET = kCSBadOffsetErr,
+ BAD_PAGE = kCSBadPageErr,
+ BAD_SIZE = kCSBadSizeErr,
+ BAD_SOCKET = kCSBadSocketErr,
+ BAD_TYPE = kCSBadTypeErr,
+ BAD_VCC = kCSBadVccErr,
+ BAD_VPP = kCSBadVppErr,
+ BAD_WINDOW = kCSBadWindowErr,
+ BAD_ARG_LENGTH = kCSBadArgLengthErr,
+ BAD_ARGS = kCSBadArgsErr,
+ BAD_HANDLE = kCSBadHandleErr,
+ BAD_CIS = kCSBadCISErr,
+ BAD_SPEED = kCSBadSpeedErr,
+ READ_FAILURE = kCSReadFailureErr,
+ WRITE_FAILURE = kCSWriteFailureErr,
+ GENERAL_FAILURE = kCSGeneralFailureErr,
+ NO_CARD = kCSNoCardErr,
+ UNSUPPORTED_FUNCTION = kCSUnsupportedFunctionErr,
+ UNSUPPORTED_MODE = kCSUnsupportedModeErr,
+ BUSY = kCSBusyErr,
+ WRITE_PROTECTED = kCSWriteProtectedErr,
+ CONFIGURATION_LOCKED = kCSConfigurationLockedErr,
+ IN_USE = kCSInUseErr,
+ NO_MORE_ITEMS = kCSNoMoreItemsErr,
+ OUT_OF_RESOURCE = kCSOutOfResourceErr
+};
+
+
+/* messages sent to client's event handler*/
+
+enum {
+ NULL_MESSAGE = kCSNullMessage,
+ CARD_INSERTION = kCSCardInsertionMessage,
+ CARD_REMOVAL = kCSCardRemovalMessage,
+ CARD_LOCK = kCSCardLockMessage,
+ CARD_UNLOCK = kCSCardUnlockMessage,
+ CARD_READY = kCSCardReadyMessage,
+ CARD_RESET = kCSCardResetMessage,
+ INSERTION_REQUEST = kCSInsertionRequestMessage,
+ INSERTION_COMPLETE = kCSInsertionCompleteMessage,
+ EJECTION_REQUEST = kCSEjectionRequestMessage,
+ EJECTION_FAILED = kCSEjectionFailedMessage,
+ PM_RESUME = kCSPMResumeMessage,
+ PM_SUSPEND = kCSPMSuspendMessage,
+ RESET_PHYSICAL = kCSResetPhysicalMessage,
+ RESET_REQUEST = kCSResetRequestMessage,
+ RESET_COMPLETE = kCSResetCompleteMessage,
+ BATTERY_DEAD = kCSBatteryDeadMessage,
+ BATTERY_LOW = kCSBatteryLowMessage,
+ WRITE_PROTECT = kCSWriteProtectMessage,
+ WRITE_ENABLED = kCSWriteEnabledMessage,
+ CLIENT_INFO = kCSClientInfoMessage,
+ SS_UPDATED = kCSSSUpdatedMessage,
+ FUNCTION_INTERRUPT = kCSFunctionInterruptMessage,
+ ACCESS_ERROR = kCSAccessErrorMessage,
+ CARD_UNCONFIGURED = kCSCardUnconfiguredMessage,
+ STATUS_CHANGED = kCSStatusChangedMessage
+};
+
+
+/*---------------- CSAccessConfigurationRegister ----------------*/
+
+
+struct AccessConfigurationRegisterPB {
+ UInt16 socket; /* -> global socket number*/
+ UInt8 action; /* -> read/write*/
+ UInt8 offset; /* -> offset from config register base*/
+ UInt8 value; /* <-> value to read/write*/
+ UInt8 padding[1]; /* */
+};
+typedef struct AccessConfigurationRegisterPB AccessConfigurationRegisterPB;
+/* 'action' field values*/
+
+enum {
+ kCSReadConfigRegister = 0x00,
+ kCSWriteConfigRegister = 0x01
+};
+
+
+/*---------------- CSGetCardServicesInfo ----------------*/
+
+
+struct GetCardServicesInfoPB {
+ UInt8 signature[2]; /* <- two ascii chars 'CS'*/
+ UInt16 count; /* <- total number of sockets installed*/
+ UInt16 revision; /* <- BCD*/
+ UInt16 csLevel; /* <- BCD*/
+ UInt16 reserved; /* -> zero*/
+ UInt16 vStrLen; /* <-> in: client's buffer size, out: vendor string length*/
+ UInt8 * vendorString; /* <-> in: pointer to buffer to hold CS vendor string (zero-terminated)*/
+ /* out: CS vendor string copied to buffer*/
+};
+typedef struct GetCardServicesInfoPB GetCardServicesInfoPB;
+/*---------------- CSGetClientInfo ----------------*/
+
+
+/* upper byte of attributes is kCSClientInfoSubfunction*/
+
+struct ClientInfoParam {
+ UInt32 clientHandle; /* -> clientHandle returned by RegisterClient*/
+ UInt16 attributes; /* <-> subfunction + bitmapped client attributes*/
+ UInt16 revision; /* <- BCD value of client's revision*/
+ UInt16 csLevel; /* <- BCD value of CS release*/
+ UInt16 revDate; /* <- revision date: y[15-9], m[8-5], d[4-0]*/
+ SInt16 nameLen; /* <-> in: max length of client name string, out: actual length*/
+ SInt16 vStringLen; /* <-> in: max length of vendor string, out: actual length*/
+ UInt8 * nameString; /* <- pointer to client name string (zero-terminated)*/
+ UInt8 * vendorString; /* <- pointer to vendor string (zero-terminated)*/
+};
+typedef struct ClientInfoParam ClientInfoParam;
+/*
+ upper byte of attributes is kCSCardNameSubfunction,
+ kCSCardTypeSubfunction,
+ kCSHelpStringSubfunction
+*/
+
+struct AlternateTextStringParam {
+ UInt32 clientHandle; /* -> clientHandle returned by RegisterClient*/
+ UInt16 attributes; /* <-> subfunction + bitmapped client attributes*/
+ UInt16 socket; /* -> logical socket number*/
+ UInt16 reserved; /* -> zero*/
+ SInt16 length; /* <-> in: max length of string, out: actual length*/
+ UInt8 * text; /* <- pointer to string (zero-terminated)*/
+};
+typedef struct AlternateTextStringParam AlternateTextStringParam;
+/* upper byte of attributes is kCSCardIconSubfunction*/
+
+struct AlternateCardIconParam {
+ UInt32 clientHandle; /* -> clientHandle returned by RegisterClient*/
+ UInt16 attributes; /* <-> subfunction + bitmapped client attributes*/
+ UInt16 socket; /* -> logical socket number*/
+ Handle iconSuite; /* <- handle to icon suite containing all icons*/
+};
+typedef struct AlternateCardIconParam AlternateCardIconParam;
+/* upper byte of attributes is kCSActionProcSubfunction*/
+
+struct CustomActionProcParam {
+ UInt32 clientHandle; /* -> clientHandle returned by RegisterClient*/
+ UInt16 attributes; /* <-> subfunction + bitmapped client attributes*/
+ UInt16 socket; /* -> logical socket number*/
+};
+typedef struct CustomActionProcParam CustomActionProcParam;
+
+struct GetClientInfoPB {
+ union {
+ ClientInfoParam clientInfo;
+ AlternateTextStringParam alternateTextString;
+ AlternateCardIconParam alternateIcon;
+ CustomActionProcParam customActionProc;
+ } u;
+};
+typedef struct GetClientInfoPB GetClientInfoPB;
+/* 'attributes' field values*/
+enum {
+ kCSMemoryClient = 0x0001,
+ kCSIOClient = 0x0004,
+ kCSClientTypeMask = 0x0007,
+ kCSShareableCardInsertEvents = 0x0008,
+ kCSExclusiveCardInsertEvents = 0x0010,
+ kCSInfoSubfunctionMask = 0xFF00,
+ kCSClientInfoSubfunction = 0x0000,
+ kCSCardNameSubfunction = 0x8000,
+ kCSCardTypeSubfunction = 0x8100,
+ kCSHelpStringSubfunction = 0x8200,
+ kCSCardIconSubfunction = 0x8300,
+ kCSActionProcSubfunction = 0x8400
+};
+
+
+/*
+ ---------------- CSGetConfigurationInfo ----------------
+ ---------------- CSModifyConfiguration ----------------
+ ---------------- CSRequestConfiguration ----------------
+*/
+
+
+struct GetModRequestConfigInfoPB {
+ UInt32 clientHandle; /* -> clientHandle returned by RegisterClient*/
+ UInt16 socket; /* -> logical socket number*/
+ UInt16 attributes; /* <-> bitmap of configuration attributes*/
+ UInt8 vcc; /* <-> Vcc setting*/
+ UInt8 vpp1; /* <-> Vpp1 setting*/
+ UInt8 vpp2; /* <-> Vpp2 setting*/
+ UInt8 intType; /* <-> interface type (memory or memory+I/O)*/
+ UInt32 configBase; /* <-> card base address of configuration registers*/
+ UInt8 status; /* <-> card status register setting, if present*/
+ UInt8 pin; /* <-> card pin register setting, if present*/
+ UInt8 copy; /* <-> card socket/copy register setting, if present*/
+ UInt8 configIndex; /* <-> card option register setting, if present*/
+ UInt8 present; /* <-> bitmap of which configuration registers are present*/
+ UInt8 firstDevType; /* <- from DeviceID tuple*/
+ UInt8 funcCode; /* <- from FuncID tuple*/
+ UInt8 sysInitMask; /* <- from FuncID tuple*/
+ UInt16 manufCode; /* <- from ManufacturerID tuple*/
+ UInt16 manufInfo; /* <- from ManufacturerID tuple*/
+ UInt8 cardValues; /* <- valid card register values*/
+ UInt8 padding[1]; /* */
+};
+typedef struct GetModRequestConfigInfoPB GetModRequestConfigInfoPB;
+/* 'attributes' field values*/
+enum {
+ kCSExclusivelyUsed = 0x0001,
+ kCSEnableIREQs = 0x0002,
+ kCSVccChangeValid = 0x0004,
+ kCSVpp1ChangeValid = 0x0008,
+ kCSVpp2ChangeValid = 0x0010,
+ kCSValidClient = 0x0020,
+ kCSSleepPower = 0x0040, /* request that power be applied to socket during Sleep*/
+ kCSLockSocket = 0x0080,
+ kCSTurnOnInUse = 0x0100
+};
+
+/* 'intType' field values*/
+
+enum {
+ kCSMemoryInterface = 0x01,
+ kCSMemory_And_IO_Interface = 0x02
+};
+
+/* 'present' field values*/
+
+enum {
+ kCSOptionRegisterPresent = 0x01,
+ kCSStatusRegisterPresent = 0x02,
+ kCSPinReplacementRegisterPresent = 0x04,
+ kCSCopyRegisterPresent = 0x08
+};
+
+/* 'cardValues' field values*/
+
+enum {
+ kCSOptionValueValid = 0x01,
+ kCSStatusValueValid = 0x02,
+ kCSPinReplacementValueValid = 0x04,
+ kCSCopyValueValid = 0x08
+};
+
+
+/*
+ ---------------- CSGetClientEventMask ----------------
+ ---------------- CSSetClientEventMask ----------------
+*/
+
+
+struct GetSetClientEventMaskPB {
+ UInt32 clientHandle; /* -> clientHandle returned by RegisterClient*/
+ UInt16 attributes; /* <-> bitmap of attributes*/
+ UInt16 eventMask; /* <-> bitmap of events to be passed to client for this socket*/
+ UInt16 socket; /* -> logical socket number*/
+};
+typedef struct GetSetClientEventMaskPB GetSetClientEventMaskPB;
+/* 'attributes' field values*/
+enum {
+ kCSEventMaskThisSocketOnly = 0x0001
+};
+
+/* 'eventMask' field values*/
+
+enum {
+ kCSWriteProtectEvent = 0x0001,
+ kCSCardLockChangeEvent = 0x0002,
+ kCSEjectRequestEvent = 0x0004,
+ kCSInsertRequestEvent = 0x0008,
+ kCSBatteryDeadEvent = 0x0010,
+ kCSBatteryLowEvent = 0x0020,
+ kCSReadyChangeEvent = 0x0040,
+ kCSCardDetectChangeEvent = 0x0080,
+ kCSPMChangeEvent = 0x0100,
+ kCSResetEvent = 0x0200,
+ kCSSSUpdateEvent = 0x0400,
+ kCSFunctionInterrupt = 0x0800,
+ kCSAllEvents = 0xFFFF
+};
+
+
+/*
+ ---------------- CSGetFirstClient ----------------
+ ---------------- CSGetNextClient ----------------
+*/
+
+
+struct GetClientPB {
+ UInt32 clientHandle; /* <- clientHandle for this client*/
+ UInt16 socket; /* -> logical socket number*/
+ UInt16 attributes; /* -> bitmap of attributes*/
+};
+typedef struct GetClientPB GetClientPB;
+/* 'attributes' field values*/
+enum {
+ kCSClientsForAllSockets = 0x0000,
+ kCSClientsThisSocketOnly = 0x0001
+};
+
+
+/*
+ ---------------- CSGetFirstTuple ----------------
+ ---------------- CSGetNextTuple ----------------
+ ---------------- CSGetTupleData ----------------
+*/
+
+
+struct GetTuplePB {
+ UInt16 socket; /* -> logical socket number*/
+ UInt16 attributes; /* -> bitmap of attributes*/
+ UInt8 desiredTuple; /* -> desired tuple code value, or $FF for all*/
+ UInt8 tupleOffset; /* -> offset into tuple from link byte*/
+ UInt16 flags; /* <-> internal use*/
+ UInt32 linkOffset; /* <-> internal use*/
+ UInt32 cisOffset; /* <-> internal use*/
+
+ union {
+ struct {
+ UInt8 tupleCode; /* <- tuple code found*/
+ UInt8 tupleLink; /* <- link value for tuple found*/
+ } TuplePB;
+
+ struct {
+ UInt16 tupleDataMax; /* -> maximum size of tuple data area*/
+ UInt16 tupleDataLen; /* <- number of bytes in tuple body*/
+ TupleBody tupleData; /* <- tuple data*/
+ } TupleDataPB;
+ } u;
+};
+typedef struct GetTuplePB GetTuplePB;
+/* 'attributes' field values*/
+enum {
+ kCSReturnLinkTuples = 0x0001
+};
+
+
+/*
+ ---------------- CSRequestSocketMask ----------------
+ ---------------- CSReleaseSocketMask ----------------
+*/
+
+
+struct ReqRelSocketMaskPB {
+ UInt32 clientHandle; /* -> clientHandle returned by RegisterClient*/
+ UInt16 socket; /* -> logical socket*/
+ UInt16 eventMask; /* -> bitmap of events to be passed to client for this socket*/
+};
+typedef struct ReqRelSocketMaskPB ReqRelSocketMaskPB;
+/* 'eventMask' field values (see above for Get/SetClientEventMask*/
+
+/*---------------- CSGetStatus ----------------*/
+
+
+struct GetStatusPB {
+ UInt16 socket; /* -> logical socket number*/
+ UInt16 cardState; /* <- current state of installed card*/
+ UInt16 socketState; /* <- current state of the socket*/
+};
+typedef struct GetStatusPB GetStatusPB;
+/* 'cardState' field values*/
+enum {
+ kCSWriteProtected = 0x0001,
+ kCSCardLocked = 0x0002,
+ kCSEjectRequest = 0x0004,
+ kCSInsertRequest = 0x0008,
+ kCSBatteryDead = 0x0010,
+ kCSBatteryLow = 0x0020,
+ kCSReady = 0x0040,
+ kCSCardDetected = 0x0080
+};
+
+/* 'socketState' field values*/
+
+enum {
+ kCSWriteProtectChanged = 0x0001,
+ kCSCardLockChanged = 0x0002,
+ kCSEjectRequestPending = 0x0004,
+ kCSInsertRequestPending = 0x0008,
+ kCSBatteryDeadChanged = 0x0010,
+ kCSBatteryLowChanged = 0x0020,
+ kCSReadyChanged = 0x0040,
+ kCSCardDetectChanged = 0x0080
+};
+
+
+/*
+ ---------------- CSModifyWindow ----------------
+ ---------------- CSReleaseWindow ----------------
+ ---------------- CSRequestWindow ----------------
+*/
+
+
+struct ReqModRelWindowPB {
+ UInt32 clientHandle; /* -> clientHandle returned by RegisterClient*/
+ UInt32 windowHandle; /* <-> window descriptor*/
+ UInt16 socket; /* -> logical socket number*/
+ UInt16 attributes; /* -> window attributes (bitmap)*/
+ UInt32 base; /* <-> system base address*/
+ UInt32 size; /* <-> memory window size*/
+ UInt8 accessSpeed; /* -> window access speed (bitmap)*/
+ /* (not applicable for I/O mode)*/
+ UInt8 padding[1]; /* */
+};
+typedef struct ReqModRelWindowPB ReqModRelWindowPB;
+/* 'attributes' field values*/
+enum {
+ kCSMemoryWindow = 0x0001,
+ kCSIOWindow = 0x0002,
+ kCSAttributeWindow = 0x0004, /* not normally used by Card Services clients*/
+ kCSWindowTypeMask = 0x0007,
+ kCSEnableWindow = 0x0008,
+ kCSAccessSpeedValid = 0x0010,
+ kCSLittleEndian = 0x0020, /* configure socket for little endianess*/
+ kCS16BitDataPath = 0x0040,
+ kCSWindowPaged = 0x0080, /* */
+ kCSWindowShared = 0x0100,
+ kCSWindowFirstShared = 0x0200, /* */
+ kCSWindowProgrammable = 0x0400 /* */
+};
+
+/* 'accessSpeed' field values*/
+
+enum {
+ kCSDeviceSpeedCodeMask = 0x07,
+ kCSSpeedExponentMask = 0x07,
+ kCSSpeedMantissaMask = 0x78,
+ kCSUseWait = 0x80,
+ kCSAccessSpeed250nsec = 0x01,
+ kCSAccessSpeed200nsec = 0x02,
+ kCSAccessSpeed150nsec = 0x03,
+ kCSAccessSpeed100nsec = 0x04,
+ kCSExtAccSpeedMant1pt0 = 0x01,
+ kCSExtAccSpeedMant1pt2 = 0x02,
+ kCSExtAccSpeedMant1pt3 = 0x03,
+ kCSExtAccSpeedMant1pt5 = 0x04,
+ kCSExtAccSpeedMant2pt0 = 0x05,
+ kCSExtAccSpeedMant2pt5 = 0x06,
+ kCSExtAccSpeedMant3pt0 = 0x07,
+ kCSExtAccSpeedMant3pt5 = 0x08,
+ kCSExtAccSpeedMant4pt0 = 0x09,
+ kCSExtAccSpeedMant4pt5 = 0x0A,
+ kCSExtAccSpeedMant5pt0 = 0x0B,
+ kCSExtAccSpeedMant5pt5 = 0x0C,
+ kCSExtAccSpeedMant6pt0 = 0x0D,
+ kCSExtAccSpeedMant7pt0 = 0x0E,
+ kCSExtAccSpeedMant8pt0 = 0x0F,
+ kCSExtAccSpeedExp1ns = 0x00,
+ kCSExtAccSpeedExp10ns = 0x01,
+ kCSExtAccSpeedExp100ns = 0x02,
+ kCSExtAccSpeedExp1us = 0x03,
+ kCSExtAccSpeedExp10us = 0x04,
+ kCSExtAccSpeedExp100us = 0x05,
+ kCSExtAccSpeedExp1ms = 0x06,
+ kCSExtAccSpeedExp10ms = 0x07
+};
+
+
+/*
+ ---------------- CSRegisterClient ----------------
+ ---------------- CSDeregisterClient ----------------
+*/
+
+
+struct ClientCallbackPB {
+ UInt16 message; /* -> which event this is*/
+ UInt16 socket; /* -> logical socket number*/
+ UInt16 info; /* -> function-specific*/
+ UInt16 misc; /* -> function-specific*/
+ Ptr reserved; /* -> pointer to MTD request block*/
+ Ptr buffer; /* -> function-specific*/
+ Ptr clientData; /* -> pointer to client's data (from RegisterClient)*/
+};
+typedef struct ClientCallbackPB ClientCallbackPB;
+typedef ClientCallbackPB * ClientCallbackPBPtr;
+typedef CALLBACK_API( UInt16 , PCCardCSClientProcPtr )(ClientCallbackPBPtr ccPBPtr);
+typedef STACK_UPP_TYPE(PCCardCSClientProcPtr) PCCardCSClientUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(PCCardCSClientUPP)
+ NewPCCardCSClientUPP (PCCardCSClientProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposePCCardCSClientUPP (PCCardCSClientUPP userUPP);
+
+ EXTERN_API(UInt16)
+ InvokePCCardCSClientUPP (ClientCallbackPBPtr ccPBPtr,
+ PCCardCSClientUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppPCCardCSClientProcInfo = 0x000000E0 }; /* pascal 2_bytes Func(4_bytes) */
+ #define NewPCCardCSClientUPP(userRoutine) (PCCardCSClientUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPCCardCSClientProcInfo, GetCurrentArchitecture())
+ #define DisposePCCardCSClientUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokePCCardCSClientUPP(ccPBPtr, userUPP) (UInt16)CALL_ONE_PARAMETER_UPP((userUPP), uppPCCardCSClientProcInfo, (ccPBPtr))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewPCCardCSClientProc(userRoutine) NewPCCardCSClientUPP(userRoutine)
+#define CallPCCardCSClientProc(userRoutine, ccPBPtr) InvokePCCardCSClientUPP(ccPBPtr, userRoutine)
+
+struct RegisterClientPB {
+ UInt32 clientHandle; /* <- client descriptor*/
+ PCCardCSClientUPP clientEntry; /* -> universal procPtr to client's event handler*/
+ UInt16 attributes; /* -> bitmap of client attributes*/
+ UInt16 eventMask; /* -> bitmap of events to notify client*/
+ Ptr clientData; /* -> pointer to client's data*/
+ UInt16 version; /* -> Card Services version this client expects*/
+};
+typedef struct RegisterClientPB RegisterClientPB;
+/* 'attributes' field values (see GetClientInfo)*/
+/*
+ kCSMemoryClient = 0x0001,
+ kCSIOClient = 0x0004,
+ kCSShareableCardInsertEvents = 0x0008,
+ kCSExclusiveCardInsertEvents = 0x0010
+*/
+
+
+/*---------------- CSReleaseConfiguration ----------------*/
+
+
+struct ReleaseConfigurationPB {
+ UInt32 clientHandle; /* -> clientHandle returned by RegisterClient*/
+ UInt16 socket; /* -> */
+};
+typedef struct ReleaseConfigurationPB ReleaseConfigurationPB;
+/*---------------- CSResetCard ----------------*/
+
+
+struct ResetCardPB {
+ UInt32 clientHandle; /* -> clientHandle returned by RegisterClient*/
+ UInt16 socket; /* -> */
+ UInt16 attributes; /* -> xxx*/
+};
+typedef struct ResetCardPB ResetCardPB;
+/*---------------- CSValidateCIS ----------------*/
+
+
+struct ValidateCISPB {
+ UInt16 socket; /* -> */
+ UInt16 chains; /* -> whether link/null tuples should be included*/
+};
+typedef struct ValidateCISPB ValidateCISPB;
+/*
+ ---------------- CSRequestIO ----------------
+ ---------------- CSReleaseIO ----------------
+*/
+
+
+struct ReqRelIOPB {
+ UInt32 clientHandle; /* -> clientHandle returned by RegisterClient*/
+ UInt16 socket; /* -> socket number*/
+ UInt16 reserved;
+ UInt16 basePort1; /* -> base I/O port for range*/
+ UInt8 numPorts1; /* -> number of ports (e.g., bytes).*/
+ UInt8 attributes1; /* -> attributes*/
+
+ UInt16 basePort2; /* -> base I/O port for range*/
+ UInt8 numPorts2; /* -> number of ports*/
+ UInt8 attributes2; /* -> attributes*/
+
+ UInt8 ioAddrLines; /* -> number of I/O lines decoded by card*/
+ UInt8 reserved1;
+};
+typedef struct ReqRelIOPB ReqRelIOPB;
+/*---------------- CSVendorSpecific ----------------*/
+
+struct VendorSpecificPB {
+ UInt32 clientHandle; /* -> clientHandle returned by RegisterClient*/
+ UInt16 vsCode;
+ UInt16 socket;
+ UInt32 dataLen; /* -> length of buffer pointed to by vsDataPtr*/
+ UInt8 * vsDataPtr; /* -> Card Services version this client expects*/
+};
+typedef struct VendorSpecificPB VendorSpecificPB;
+/* 'vsCode' field values*/
+
+enum {
+ vsAppleReserved = 0x0000,
+ vsEjectCard = 0x0001,
+ vsGetCardInfo = 0x0002,
+ vsEnableSocketEvents = 0x0003,
+ vsGetCardLocationIcon = 0x0004,
+ vsGetCardLocationText = 0x0005,
+ vsGetAdapterInfo = 0x0006
+};
+
+/*
+ ///////////////////////////////////////////////////////////////////////////////////////
+ GetAdapterInfo parameter block (vendor-specific call #6)
+*/
+
+
+struct GetAdapterInfoPB {
+ UInt32 attributes; /* <- capabilties of socket's adapter*/
+ UInt16 revision; /* <- id of adapter*/
+ UInt16 reserved; /* */
+ UInt16 numVoltEntries; /* <- number of valid voltage values*/
+ UInt8 * voltages; /* <-> array of BCD voltage values*/
+};
+typedef struct GetAdapterInfoPB GetAdapterInfoPB;
+/* 'attributes' field values*/
+enum {
+ kCSLevelModeInterrupts = 0x00000001,
+ kCSPulseModeInterrupts = 0x00000002,
+ kCSProgrammableWindowAddr = 0x00000004,
+ kCSProgrammableWindowSize = 0x00000008,
+ kCSSocketSleepPower = 0x00000010,
+ kCSSoftwareEject = 0x00000020,
+ kCSLockableSocket = 0x00000040,
+ kCSInUseIndicator = 0x00000080
+};
+
+/*
+ ///////////////////////////////////////////////////////////////////////////////////////
+ GetCardInfo parameter block (vendor-specific call #2)
+*/
+
+
+struct GetCardInfoPB {
+ UInt8 cardType; /* <- type of card in this socket (defined at top of file)*/
+ UInt8 subType; /* <- more detailed card type (defined at top of file)*/
+ UInt16 reserved; /* <-> reserved (should be set to zero)*/
+ UInt16 cardNameLen; /* -> maximum length of card name to be returned*/
+ UInt16 vendorNameLen; /* -> maximum length of vendor name to be returned*/
+ UInt8 * cardName; /* -> pointer to card name string (read from CIS), or nil*/
+ UInt8 * vendorName; /* -> pointer to vendor name string (read from CIS), or nil*/
+};
+typedef struct GetCardInfoPB GetCardInfoPB;
+/* GetCardInfo card types*/
+enum {
+ kCSUnknownCardType = 0,
+ kCSMultiFunctionCardType = 1,
+ kCSMemoryCardType = 2,
+ kCSSerialPortCardType = 3,
+ kCSSerialOnlyType = 0,
+ kCSDataModemType = 1,
+ kCSFaxModemType = 2,
+ kCSFaxAndDataModemMask = (kCSDataModemType | kCSFaxModemType),
+ kCSVoiceEncodingType = 4,
+ kCSParallelPortCardType = 4,
+ kCSFixedDiskCardType = 5,
+ kCSUnknownFixedDiskType = 0,
+ kCSATAInterface = 1,
+ kCSRotatingDevice = (0 << 7),
+ kCSSiliconDevice = (1 << 7),
+ kCSVideoAdaptorCardType = 6,
+ kCSNetworkAdaptorCardType = 7,
+ kCSAIMSCardType = 8,
+ kCSNumCardTypes = 9
+};
+
+
+#ifndef __PCCARDENABLERPLUGIN__
+/*
+ NOTE: These prototypes conflict with PCCardEnablerPlugin.*
+ You cannot use both PCCardEnablerPlugin.h and CardServices.h
+
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+CSVendorSpecific (VendorSpecificPB * pb) TWOWORDINLINE(0x7000, 0xAAF0);
+
+EXTERN_API( OSErr )
+CSRegisterClient (RegisterClientPB * pb) TWOWORDINLINE(0x7001, 0xAAF0);
+
+EXTERN_API( OSErr )
+CSDeregisterClient (RegisterClientPB * pb) TWOWORDINLINE(0x7002, 0xAAF0);
+
+EXTERN_API( OSErr )
+CSGetFirstTuple (GetTuplePB * pb) TWOWORDINLINE(0x7003, 0xAAF0);
+
+EXTERN_API( OSErr )
+CSGetNextTuple (GetTuplePB * pb) TWOWORDINLINE(0x7004, 0xAAF0);
+
+EXTERN_API( OSErr )
+CSGetTupleData (GetTuplePB * pb) TWOWORDINLINE(0x7005, 0xAAF0);
+
+EXTERN_API( OSErr )
+CSGetConfigurationInfo (GetModRequestConfigInfoPB * pb) TWOWORDINLINE(0x7006, 0xAAF0);
+
+EXTERN_API( OSErr )
+CSGetCardServicesInfo (GetCardServicesInfoPB * pb) TWOWORDINLINE(0x7007, 0xAAF0);
+
+EXTERN_API( OSErr )
+CSGetStatus (GetStatusPB * pb) TWOWORDINLINE(0x7008, 0xAAF0);
+
+EXTERN_API( OSErr )
+CSValidateCIS (ValidateCISPB * pb) TWOWORDINLINE(0x7009, 0xAAF0);
+
+EXTERN_API( OSErr )
+CSGetFirstClient (GetClientPB * pb) TWOWORDINLINE(0x700F, 0xAAF0);
+
+EXTERN_API( OSErr )
+CSGetNextClient (GetClientPB * pb) TWOWORDINLINE(0x7010, 0xAAF0);
+
+EXTERN_API( OSErr )
+CSGetClientInfo (GetClientInfoPB * pb) TWOWORDINLINE(0x7011, 0xAAF0);
+
+EXTERN_API( OSErr )
+CSResetCard (ResetCardPB * pb) TWOWORDINLINE(0x7012, 0xAAF0);
+
+EXTERN_API( OSErr )
+CSRequestWindow (ReqModRelWindowPB * pb) TWOWORDINLINE(0x7013, 0xAAF0);
+
+EXTERN_API( OSErr )
+CSModifyWindow (ReqModRelWindowPB * pb) TWOWORDINLINE(0x7014, 0xAAF0);
+
+EXTERN_API( OSErr )
+CSReleaseWindow (ReqModRelWindowPB * pb) TWOWORDINLINE(0x7015, 0xAAF0);
+
+EXTERN_API( OSErr )
+CSRequestConfiguration (GetModRequestConfigInfoPB * pb) TWOWORDINLINE(0x701B, 0xAAF0);
+
+EXTERN_API( OSErr )
+CSModifyConfiguration (GetModRequestConfigInfoPB * pb) TWOWORDINLINE(0x701C, 0xAAF0);
+
+EXTERN_API( OSErr )
+CSAccessConfigurationRegister (AccessConfigurationRegisterPB * pb) TWOWORDINLINE(0x701D, 0xAAF0);
+
+EXTERN_API( OSErr )
+CSReleaseConfiguration (ReleaseConfigurationPB * pb) TWOWORDINLINE(0x701E, 0xAAF0);
+
+EXTERN_API( OSErr )
+CSGetClientEventMask (GetSetClientEventMaskPB * pb) TWOWORDINLINE(0x701F, 0xAAF0);
+
+EXTERN_API( OSErr )
+CSSetClientEventMask (GetSetClientEventMaskPB * pb) TWOWORDINLINE(0x7020, 0xAAF0);
+
+EXTERN_API( OSErr )
+CSRequestSocketMask (ReqRelSocketMaskPB * pb) TWOWORDINLINE(0x7021, 0xAAF0);
+
+EXTERN_API( OSErr )
+CSReleaseSocketMask (ReqRelSocketMaskPB * pb) TWOWORDINLINE(0x7022, 0xAAF0);
+
+
+/*
+ Additional calls which are required for all I/O clients when running on
+ systems which do not reserve dedicated I/O-spaces for each PC Card.
+*/
+
+EXTERN_API( OSErr )
+CSRequestIO (ReqRelIOPB * pb) TWOWORDINLINE(0x7025, 0xAAF0);
+
+EXTERN_API( OSErr )
+CSReleaseIO (ReqRelIOPB * pb) TWOWORDINLINE(0x7026, 0xAAF0);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* !defined(__PCCARDENABLERPLUGIN__) */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CARDSERVICES__ */
+
diff --git a/include/qt/CodeFragments.h b/include/qt/CodeFragments.h
new file mode 100644
index 000000000..2697ef0ea
--- /dev/null
+++ b/include/qt/CodeFragments.h
@@ -0,0 +1,538 @@
+/*
+ File: CodeFragments.h
+
+ Contains: Public Code Fragment Manager Interfaces.
+
+ Version: Technology: Mac OS 8.1
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1992-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+/*
+ o
+ ===========================================================================================
+ The Code Fragment Manager API
+ =============================
+*/
+
+
+#ifndef __CODEFRAGMENTS__
+#define __CODEFRAGMENTS__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*
+ .
+ ===========================================================================================
+ General Types and Constants
+ ===========================
+*/
+
+
+enum {
+ kCFragResourceType = FOUR_CHAR_CODE('cfrg'),
+ kCFragResourceID = 0,
+ kCFragLibraryFileType = FOUR_CHAR_CODE('shlb'),
+ kCFragAllFileTypes = (long)0xFFFFFFFF
+};
+
+
+typedef OSType CFragArchitecture;
+enum {
+ kPowerPCCFragArch = FOUR_CHAR_CODE('pwpc'),
+ kMotorola68KCFragArch = FOUR_CHAR_CODE('m68k'),
+ kAnyCFragArch = 0x3F3F3F3F
+};
+
+#if TARGET_CPU_PPC
+enum {
+ kCompiledCFragArch = kPowerPCCFragArch
+};
+
+#endif /* TARGET_CPU_PPC */
+
+#if TARGET_CPU_68K
+enum {
+ kCompiledCFragArch = kMotorola68KCFragArch
+};
+
+#endif /* TARGET_CPU_68K */
+
+typedef UInt32 CFragVersionNumber;
+enum {
+ kNullCFragVersion = 0,
+ kWildcardCFragVersion = (long)0xFFFFFFFF
+};
+
+
+typedef UInt8 CFragUsage;
+enum {
+ kImportLibraryCFrag = 0, /* Standard CFM import library.*/
+ kApplicationCFrag = 1, /* MacOS application.*/
+ kDropInAdditionCFrag = 2, /* Application or library private extension/plug-in*/
+ kStubLibraryCFrag = 3, /* Import library used for linking only*/
+ kWeakStubLibraryCFrag = 4 /* Import library used for linking only and will be automatically weak linked*/
+};
+
+
+enum {
+ kIsCompleteCFrag = 0, /* A "base" fragment, not an update.*/
+ kFirstCFragUpdate = 1 /* The first update, others are numbered 2, 3, ...*/
+};
+
+
+enum {
+ kCFragGoesToEOF = 0
+};
+
+
+
+
+typedef UInt8 CFragLocatorKind;
+enum {
+ kMemoryCFragLocator = 0, /* Container is already addressable.*/
+ kDataForkCFragLocator = 1, /* Container is in a file's data fork.*/
+ kResourceCFragLocator = 2, /* Container is in a file's resource fork.*/
+ kNamedFragmentCFragLocator = 4 /* ! Reserved for possible future use!*/
+};
+
+
+/*
+ --------------------------------------------------------------------------------------
+ A 'cfrg' resource consists of a header followed by a sequence of variable length
+ members. The constant kDefaultCFragNameLen only provides for a legal ANSI declaration
+ and for a reasonable display in a debugger. The actual name field is cut to fit.
+ There may be "extensions" after the name, the memberSize field includes them. The
+ general form of an extension is a 16 bit type code followed by a 16 bit size in bytes.
+ Only one standard extension type is defined at present, it is used by SOM's searching
+ mechanism.
+*/
+
+
+
+union CFragUsage1Union { /* ! Meaning differs depending on value of "usage".*/
+ UInt32 appStackSize; /* If the fragment is an application. (Not used by CFM!)*/
+};
+typedef union CFragUsage1Union CFragUsage1Union;
+
+union CFragUsage2Union { /* ! Meaning differs depending on value of "usage".*/
+ SInt16 appSubdirID; /* If the fragment is an application.*/
+ UInt16 libFlags; /* If the fragment is an import library.*/
+};
+typedef union CFragUsage2Union CFragUsage2Union;
+enum {
+ /* Bit masks for the CFragUsage2Union libFlags variant.*/
+ kCFragLibUsageMapPrivatelyMask = 0x0001 /* Put container in app heap if necessary.*/
+};
+
+
+union CFragWhere1Union { /* ! Meaning differs depending on value of "where".*/
+ UInt32 spaceID; /* If the fragment is in memory. (Actually an AddressSpaceID.)*/
+ OSType forkKind; /* If the fragment is in an arbitrary byte stream fork.*/
+};
+typedef union CFragWhere1Union CFragWhere1Union;
+
+union CFragWhere2Union { /* ! Meaning differs depending on value of "where".*/
+ UInt16 forkInstance; /* If the fragment is in an arbitrary byte stream fork.*/
+};
+typedef union CFragWhere2Union CFragWhere2Union;
+enum {
+ kDefaultCFragNameLen = 16
+};
+
+
+
+struct CFragResourceMember {
+ CFragArchitecture architecture;
+ UInt16 reservedA; /* ! Must be zero!*/
+ UInt8 reservedB; /* ! Must be zero!*/
+ UInt8 updateLevel;
+ CFragVersionNumber currentVersion;
+ CFragVersionNumber oldDefVersion;
+ CFragUsage1Union uUsage1;
+ CFragUsage2Union uUsage2;
+ CFragUsage usage;
+ CFragLocatorKind where;
+ UInt32 offset;
+ UInt32 length;
+ CFragWhere1Union uWhere1;
+ CFragWhere2Union uWhere2;
+ UInt16 extensionCount; /* The number of extensions beyond the name.*/
+ UInt16 memberSize; /* Size in bytes, includes all extensions.*/
+ unsigned char name[16]; /* ! Actually a sized PString.*/
+};
+typedef struct CFragResourceMember CFragResourceMember;
+typedef CFragResourceMember * CFragResourceMemberPtr;
+
+struct CFragResourceExtensionHeader {
+ UInt16 extensionKind;
+ UInt16 extensionSize;
+};
+typedef struct CFragResourceExtensionHeader CFragResourceExtensionHeader;
+typedef CFragResourceExtensionHeader * CFragResourceExtensionHeaderPtr;
+
+struct CFragResourceSearchExtension {
+ CFragResourceExtensionHeader header;
+ OSType libKind;
+ unsigned char qualifiers[1]; /* ! Actually four PStrings.*/
+};
+typedef struct CFragResourceSearchExtension CFragResourceSearchExtension;
+typedef CFragResourceSearchExtension * CFragResourceSearchExtensionPtr;
+enum {
+ kCFragResourceSearchExtensionKind = 0x30EE
+};
+
+
+
+struct CFragResource {
+ UInt32 reservedA; /* ! Must be zero!*/
+ UInt32 reservedB; /* ! Must be zero!*/
+ UInt16 reservedC; /* ! Must be zero!*/
+ UInt16 version;
+ UInt32 reservedD; /* ! Must be zero!*/
+ UInt32 reservedE; /* ! Must be zero!*/
+ UInt32 reservedF; /* ! Must be zero!*/
+ UInt32 reservedG; /* ! Must be zero!*/
+ UInt16 reservedH; /* ! Must be zero!*/
+ UInt16 memberCount;
+ CFragResourceMember firstMember;
+};
+typedef struct CFragResource CFragResource;
+typedef CFragResource * CFragResourcePtr;
+typedef CFragResourcePtr * CFragResourceHandle;
+enum {
+ kCurrCFragResourceVersion = 1
+};
+
+
+#define AlignToFour(aValue) (((aValue) + 3) & ~3)
+#define kBaseCFragResourceMemberSize (offsetof ( CFragResourceMember, name ) )
+#define kBaseCFragResourceSize (offsetof ( CFragResource, firstMember.name ) )
+#define NextCFragResourceMemberPtr(aMemberPtr) \
+ ((CFragResourceMemberPtr) ((BytePtr)aMemberPtr + aMemberPtr->memberSize))
+#define FirstCFragResourceExtensionPtr(aMemberPtr) \
+ ((CFragResourceExtensionHeaderPtr) ((BytePtr)aMemberPtr + \
+ AlignToFour ( kBaseCFragResourceMemberSize + \
+ aMemberPtr->name[0] + 1 ) ))
+#define NextCFragResourceExtensionPtr(anExtensionPtr) \
+ ((CFragResourceExtensionHeaderPtr) ((BytePtr)anExtensionPtr + \
+ ((CFragResourceExtensionHeaderPtr)anExtensionPtr)->extensionSize ))
+#define FirstCFragResourceSearchQualifier(searchExtensionPtr) \
+ ((StringPtr) ((BytePtr)searchExtensionPtr + \
+ offsetof ( CFragResourceSearchExtension, qualifiers ) ))
+#define NextCFragResourceSearchQualifier(searchQualifierPtr) \
+ ((StringPtr) ((BytePtr)searchQualifierPtr + searchQualifierPtr[0] + 1))
+
+typedef struct OpaqueCFragConnectionID* CFragConnectionID;
+typedef struct OpaqueCFragClosureID* CFragClosureID;
+typedef struct OpaqueCFragContainerID* CFragContainerID;
+typedef struct OpaqueCFragContextID* CFragContextID;
+
+typedef UInt32 CFragLoadOptions;
+enum {
+ kReferenceCFrag = 0x0001, /* Try to use existing copy, increment reference counts.*/
+ kFindCFrag = 0x0002, /* Try find an existing copy, do not increment reference counts.*/
+ kPrivateCFragCopy = 0x0005 /* Prepare a new private copy. (kReferenceCFrag | 0x0004)*/
+};
+
+
+enum {
+ kUnresolvedCFragSymbolAddress = 0
+};
+
+
+typedef UInt8 CFragSymbolClass;
+enum {
+ kCodeCFragSymbol = 0,
+ kDataCFragSymbol = 1,
+ kTVectorCFragSymbol = 2,
+ kTOCCFragSymbol = 3,
+ kGlueCFragSymbol = 4
+};
+
+
+/*
+ .
+ ===========================================================================================
+ Macros and Functions
+ ====================
+*/
+
+
+#define CFragHasFileLocation(where) \
+ ( ((where) == kDataForkCFragLocator) || ((where) == kResourceCFragLocator) )
+EXTERN_API( OSErr )
+GetSharedLibrary (ConstStr63Param libName,
+ CFragArchitecture archType,
+ CFragLoadOptions loadFlags,
+ CFragConnectionID * connID, /* can be NULL */
+ Ptr * mainAddr, /* can be NULL */
+ Str255 errMessage) /* can be NULL */ THREEWORDINLINE(0x3F3C, 0x0001, 0xAA5A);
+
+EXTERN_API( OSErr )
+GetDiskFragment (const FSSpec * fileSpec,
+ UInt32 offset,
+ UInt32 length,
+ ConstStr63Param fragName, /* can be NULL */
+ CFragLoadOptions loadFlags,
+ CFragConnectionID * connID, /* can be NULL */
+ Ptr * mainAddr, /* can be NULL */
+ Str255 errMessage) /* can be NULL */ THREEWORDINLINE(0x3F3C, 0x0002, 0xAA5A);
+
+EXTERN_API( OSErr )
+GetMemFragment (void * memAddr,
+ UInt32 length,
+ ConstStr63Param fragName, /* can be NULL */
+ CFragLoadOptions loadFlags,
+ CFragConnectionID * connID, /* can be NULL */
+ Ptr * mainAddr, /* can be NULL */
+ Str255 errMessage) /* can be NULL */ THREEWORDINLINE(0x3F3C, 0x0003, 0xAA5A);
+
+EXTERN_API( OSErr )
+CloseConnection (CFragConnectionID * connID) THREEWORDINLINE(0x3F3C, 0x0004, 0xAA5A);
+
+EXTERN_API( OSErr )
+FindSymbol (CFragConnectionID connID,
+ ConstStr255Param symName,
+ Ptr * symAddr, /* can be NULL */
+ CFragSymbolClass * symClass) /* can be NULL */ THREEWORDINLINE(0x3F3C, 0x0005, 0xAA5A);
+
+EXTERN_API( OSErr )
+CountSymbols (CFragConnectionID connID,
+ long * symCount) THREEWORDINLINE(0x3F3C, 0x0006, 0xAA5A);
+
+EXTERN_API( OSErr )
+GetIndSymbol (CFragConnectionID connID,
+ long symIndex,
+ Str255 symName, /* can be NULL */
+ Ptr * symAddr, /* can be NULL */
+ CFragSymbolClass * symClass) /* can be NULL */ THREEWORDINLINE(0x3F3C, 0x0007, 0xAA5A);
+
+
+/*
+ .
+ ===========================================================================================
+ Initialization & Termination Routines
+ =====================================
+*/
+
+
+/*
+ -----------------------------------------------------------------------------------------
+ A fragment's initialization and termination routines are called when a new incarnation of
+ the fragment is created or destroyed, respectively. Exactly when this occurs depends on
+ what kinds of section sharing the fragment has and how the fragment is prepared. Import
+ libraries have at most one incarnation per process. Fragments prepared with option
+ kPrivateCFragCopy may have many incarnations per process.
+ The initialization function is passed a pointer to an initialization information structure
+ and returns an OSErr. If an initialization function returns a non-zero value the entire
+ closure of which it is a part fails. The C prototype for an initialization function is:
+ OSErr CFragInitFunction ( const CFragInitBlock * initBlock );
+ The termination procedure takes no parameters and returns nothing. The C prototype for a
+ termination procedure is:
+ void CFragTermProcedure ( void );
+ Note that since the initialization and termination routines are themselves "CFM"-style
+ routines whether or not they have the "pascal" keyword is irrelevant.
+*/
+
+
+/*
+ -----------------------------------------------------------------------------------------
+ ! Note:
+ ! The "System7" portion of these type names was introduced during the evolution towards
+ ! the now defunct Copland version of Mac OS. Copland was to be called System 8 and there
+ ! were slightly different types for System 7 and System 8. The "generic" type names were
+ ! conditionally defined for the desired target system.
+ ! Always use the generic types, e.g. CFragInitBlock! The "System7" names have been kept
+ ! only to avoid perturbing code that (improperly) used the target specific type.
+*/
+
+
+
+struct CFragSystem7MemoryLocator {
+ LogicalAddress address;
+ UInt32 length;
+ Boolean inPlace;
+ UInt8 reservedA; /* ! Must be zero!*/
+ UInt16 reservedB; /* ! Must be zero!*/
+};
+typedef struct CFragSystem7MemoryLocator CFragSystem7MemoryLocator;
+
+struct CFragSystem7DiskFlatLocator {
+ FSSpecPtr fileSpec;
+ UInt32 offset;
+ UInt32 length;
+};
+typedef struct CFragSystem7DiskFlatLocator CFragSystem7DiskFlatLocator;
+/* ! This must have a file specification at the same offset as a disk flat locator!*/
+
+struct CFragSystem7SegmentedLocator {
+ FSSpecPtr fileSpec;
+ OSType rsrcType;
+ SInt16 rsrcID;
+ UInt16 reservedA; /* ! Must be zero!*/
+};
+typedef struct CFragSystem7SegmentedLocator CFragSystem7SegmentedLocator;
+
+struct CFragSystem7Locator {
+ SInt32 where;
+ union {
+ CFragSystem7DiskFlatLocator onDisk;
+ CFragSystem7MemoryLocator inMem;
+ CFragSystem7SegmentedLocator inSegs;
+ } u;
+};
+typedef struct CFragSystem7Locator CFragSystem7Locator;
+typedef CFragSystem7Locator * CFragSystem7LocatorPtr;
+
+struct CFragSystem7InitBlock {
+ CFragContextID contextID;
+ CFragClosureID closureID;
+ CFragConnectionID connectionID;
+ CFragSystem7Locator fragLocator;
+ StringPtr libName;
+ UInt32 reservedA; /* ! Must be zero!*/
+};
+typedef struct CFragSystem7InitBlock CFragSystem7InitBlock;
+typedef CFragSystem7InitBlock * CFragSystem7InitBlockPtr;
+
+typedef CFragSystem7InitBlock CFragInitBlock;
+typedef CFragSystem7InitBlockPtr CFragInitBlockPtr;
+/* These init/term routine types are only of value to CFM itself.*/
+typedef CALLBACK_API_C( OSErr , CFragInitFunction )(const CFragInitBlock *initBlock);
+typedef CALLBACK_API_C( void , CFragTermProcedure )(void );
+/*
+ .
+ ===========================================================================================
+ Old Name Spellings
+ ==================
+*/
+
+
+/*
+ -------------------------------------------------------------------------------------------
+ We've tried to reduce the risk of name collisions in the future by introducing the phrase
+ "CFrag" into constant and type names. The old names are defined below in terms of the new.
+*/
+
+
+enum {
+ kLoadCFrag = kReferenceCFrag
+};
+
+
+#if OLDROUTINENAMES
+#define IsFileLocation CFragHasFileLocation
+typedef CFragConnectionID ConnectionID;
+typedef CFragLoadOptions LoadFlags;
+typedef CFragSymbolClass SymClass;
+typedef CFragInitBlock InitBlock;
+typedef CFragInitBlockPtr InitBlockPtr;
+typedef CFragSystem7MemoryLocator MemFragment;
+typedef CFragSystem7DiskFlatLocator DiskFragment;
+typedef CFragSystem7SegmentedLocator SegmentedFragment;
+typedef CFragSystem7Locator FragmentLocator;
+typedef CFragSystem7LocatorPtr FragmentLocatorPtr;
+typedef CFragSystem7MemoryLocator CFragHFSMemoryLocator;
+typedef CFragSystem7DiskFlatLocator CFragHFSDiskFlatLocator;
+typedef CFragSystem7SegmentedLocator CFragHFSSegmentedLocator;
+typedef CFragSystem7Locator CFragHFSLocator;
+typedef CFragSystem7LocatorPtr CFragHFSLocatorPtr;
+enum {
+ kPowerPCArch = kPowerPCCFragArch,
+ kMotorola68KArch = kMotorola68KCFragArch,
+ kAnyArchType = kAnyCFragArch,
+ kNoLibName = 0,
+ kNoConnectionID = 0,
+ kLoadLib = kLoadCFrag,
+ kFindLib = kFindCFrag,
+ kNewCFragCopy = kPrivateCFragCopy,
+ kLoadNewCopy = kPrivateCFragCopy,
+ kUseInPlace = 0x80,
+ kCodeSym = kCodeCFragSymbol,
+ kDataSym = kDataCFragSymbol,
+ kTVectSym = kTVectorCFragSymbol,
+ kTOCSym = kTOCCFragSymbol,
+ kGlueSym = kGlueCFragSymbol,
+ kInMem = kMemoryCFragLocator,
+ kOnDiskFlat = kDataForkCFragLocator,
+ kOnDiskSegmented = kResourceCFragLocator,
+ kIsLib = kImportLibraryCFrag,
+ kIsApp = kApplicationCFrag,
+ kIsDropIn = kDropInAdditionCFrag,
+ kFullLib = kIsCompleteCFrag,
+ kUpdateLib = kFirstCFragUpdate,
+ kWholeFork = kCFragGoesToEOF,
+ kCFMRsrcType = kCFragResourceType,
+ kCFMRsrcID = kCFragResourceID,
+ kSHLBFileType = kCFragLibraryFileType,
+ kUnresolvedSymbolAddress = kUnresolvedCFragSymbolAddress
+};
+
+enum {
+ kPowerPC = kPowerPCCFragArch,
+ kMotorola68K = kMotorola68KCFragArch
+};
+
+#endif /* OLDROUTINENAMES */
+
+
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CODEFRAGMENTS__ */
+
diff --git a/include/qt/Collections.h b/include/qt/Collections.h
new file mode 100644
index 000000000..a30835ed0
--- /dev/null
+++ b/include/qt/Collections.h
@@ -0,0 +1,548 @@
+/*
+ File: Collections.h
+
+ Contains: Collection Manager Interfaces
+
+ Version: Technology: System 7.x
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1989-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __COLLECTIONS__
+#define __COLLECTIONS__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*************/
+/* Constants */
+/*************/
+/* Convenience constants for functions which optionally return values */
+enum {
+ kCollectionDontWantTag = 0L,
+ kCollectionDontWantId = 0L,
+ kCollectionDontWantSize = 0L,
+ kCollectionDontWantAttributes = 0L,
+ kCollectionDontWantIndex = 0L,
+ kCollectionDontWantData = 0L
+};
+
+
+/* attributes bits */
+enum {
+ kCollectionNoAttributes = 0x00000000, /* no attributes bits set */
+ kCollectionAllAttributes = (long)0xFFFFFFFF, /* all attributes bits set */
+ kCollectionUserAttributes = 0x0000FFFF, /* user attributes bits */
+ kCollectionDefaultAttributes = 0x40000000 /* default attributes - unlocked, persistent */
+};
+
+
+/*
+ Attribute bits 0 through 15 (entire low word) are reserved for use by the application.
+ Attribute bits 16 through 31 (entire high word) are reserved for use by the Collection Manager.
+ Only bits 31 (kCollectionLockBit) and 30 (kCollectionPersistenceBit) currently have meaning.
+*/
+enum {
+ kCollectionUser0Bit = 0,
+ kCollectionUser1Bit = 1,
+ kCollectionUser2Bit = 2,
+ kCollectionUser3Bit = 3,
+ kCollectionUser4Bit = 4,
+ kCollectionUser5Bit = 5,
+ kCollectionUser6Bit = 6,
+ kCollectionUser7Bit = 7,
+ kCollectionUser8Bit = 8,
+ kCollectionUser9Bit = 9,
+ kCollectionUser10Bit = 10,
+ kCollectionUser11Bit = 11,
+ kCollectionUser12Bit = 12,
+ kCollectionUser13Bit = 13,
+ kCollectionUser14Bit = 14,
+ kCollectionUser15Bit = 15,
+ kCollectionReserved0Bit = 16,
+ kCollectionReserved1Bit = 17,
+ kCollectionReserved2Bit = 18,
+ kCollectionReserved3Bit = 19,
+ kCollectionReserved4Bit = 20,
+ kCollectionReserved5Bit = 21,
+ kCollectionReserved6Bit = 22,
+ kCollectionReserved7Bit = 23,
+ kCollectionReserved8Bit = 24,
+ kCollectionReserved9Bit = 25,
+ kCollectionReserved10Bit = 26,
+ kCollectionReserved11Bit = 27,
+ kCollectionReserved12Bit = 28,
+ kCollectionReserved13Bit = 29,
+ kCollectionPersistenceBit = 30,
+ kCollectionLockBit = 31
+};
+
+
+/* attribute masks */
+enum {
+ kCollectionUser0Mask = 1L << kCollectionUser0Bit,
+ kCollectionUser1Mask = 1L << kCollectionUser1Bit,
+ kCollectionUser2Mask = 1L << kCollectionUser2Bit,
+ kCollectionUser3Mask = 1L << kCollectionUser3Bit,
+ kCollectionUser4Mask = 1L << kCollectionUser4Bit,
+ kCollectionUser5Mask = 1L << kCollectionUser5Bit,
+ kCollectionUser6Mask = 1L << kCollectionUser6Bit,
+ kCollectionUser7Mask = 1L << kCollectionUser7Bit,
+ kCollectionUser8Mask = 1L << kCollectionUser8Bit,
+ kCollectionUser9Mask = 1L << kCollectionUser9Bit,
+ kCollectionUser10Mask = 1L << kCollectionUser10Bit,
+ kCollectionUser11Mask = 1L << kCollectionUser11Bit,
+ kCollectionUser12Mask = 1L << kCollectionUser12Bit,
+ kCollectionUser13Mask = 1L << kCollectionUser13Bit,
+ kCollectionUser14Mask = 1L << kCollectionUser14Bit,
+ kCollectionUser15Mask = 1L << kCollectionUser15Bit,
+ kCollectionReserved0Mask = 1L << kCollectionReserved0Bit,
+ kCollectionReserved1Mask = 1L << kCollectionReserved1Bit,
+ kCollectionReserved2Mask = 1L << kCollectionReserved2Bit,
+ kCollectionReserved3Mask = 1L << kCollectionReserved3Bit,
+ kCollectionReserved4Mask = 1L << kCollectionReserved4Bit,
+ kCollectionReserved5Mask = 1L << kCollectionReserved5Bit,
+ kCollectionReserved6Mask = 1L << kCollectionReserved6Bit,
+ kCollectionReserved7Mask = 1L << kCollectionReserved7Bit,
+ kCollectionReserved8Mask = 1L << kCollectionReserved8Bit,
+ kCollectionReserved9Mask = 1L << kCollectionReserved9Bit,
+ kCollectionReserved10Mask = 1L << kCollectionReserved10Bit,
+ kCollectionReserved11Mask = 1L << kCollectionReserved11Bit,
+ kCollectionReserved12Mask = 1L << kCollectionReserved12Bit,
+ kCollectionReserved13Mask = 1L << kCollectionReserved13Bit,
+ kCollectionPersistenceMask = 1L << kCollectionPersistenceBit,
+ kCollectionLockMask = 1L << kCollectionLockBit
+};
+
+
+/***********/
+/* Types */
+/***********/
+/* abstract data type for a collection */
+typedef struct OpaqueCollection* Collection;
+/* collection member 4 byte tag */
+typedef FourCharCode CollectionTag;
+typedef CALLBACK_API( OSErr , CollectionFlattenProcPtr )(SInt32 size, void *data, void *refCon);
+typedef CALLBACK_API( OSErr , CollectionExceptionProcPtr )(Collection c, OSErr status);
+typedef STACK_UPP_TYPE(CollectionFlattenProcPtr) CollectionFlattenUPP;
+typedef STACK_UPP_TYPE(CollectionExceptionProcPtr) CollectionExceptionUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(CollectionFlattenUPP)
+ NewCollectionFlattenUPP (CollectionFlattenProcPtr userRoutine);
+
+ EXTERN_API(CollectionExceptionUPP)
+ NewCollectionExceptionUPP (CollectionExceptionProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeCollectionFlattenUPP (CollectionFlattenUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeCollectionExceptionUPP (CollectionExceptionUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeCollectionFlattenUPP (SInt32 size,
+ void * data,
+ void * refCon,
+ CollectionFlattenUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeCollectionExceptionUPP (Collection c,
+ OSErr status,
+ CollectionExceptionUPP userUPP);
+
+#else
+ enum { uppCollectionFlattenProcInfo = 0x00000FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppCollectionExceptionProcInfo = 0x000002E0 }; /* pascal 2_bytes Func(4_bytes, 2_bytes) */
+ #define NewCollectionFlattenUPP(userRoutine) (CollectionFlattenUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCollectionFlattenProcInfo, GetCurrentArchitecture())
+ #define NewCollectionExceptionUPP(userRoutine) (CollectionExceptionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCollectionExceptionProcInfo, GetCurrentArchitecture())
+ #define DisposeCollectionFlattenUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeCollectionExceptionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeCollectionFlattenUPP(size, data, refCon, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppCollectionFlattenProcInfo, (size), (data), (refCon))
+ #define InvokeCollectionExceptionUPP(c, status, userUPP) (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppCollectionExceptionProcInfo, (c), (status))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewCollectionFlattenProc(userRoutine) NewCollectionFlattenUPP(userRoutine)
+#define NewCollectionExceptionProc(userRoutine) NewCollectionExceptionUPP(userRoutine)
+#define CallCollectionFlattenProc(userRoutine, size, data, refCon) InvokeCollectionFlattenUPP(size, data, refCon, userRoutine)
+#define CallCollectionExceptionProc(userRoutine, c, status) InvokeCollectionExceptionUPP(c, status, userRoutine)
+/*********************************************/
+/************* Public interfaces *************/
+/*********************************************/
+EXTERN_API( Collection )
+NewCollection (void) TWOWORDINLINE(0x7000, 0xABF6);
+
+
+EXTERN_API( void )
+DisposeCollection (Collection c) TWOWORDINLINE(0x7001, 0xABF6);
+
+
+EXTERN_API( Collection )
+CloneCollection (Collection c) TWOWORDINLINE(0x7002, 0xABF6);
+
+
+EXTERN_API( SInt32 )
+CountCollectionOwners (Collection c) TWOWORDINLINE(0x7003, 0xABF6);
+
+
+EXTERN_API( Collection )
+CopyCollection (Collection srcCollection,
+ Collection dstCollection) TWOWORDINLINE(0x7004, 0xABF6);
+
+
+EXTERN_API( SInt32 )
+GetCollectionDefaultAttributes (Collection c) TWOWORDINLINE(0x7005, 0xABF6);
+
+
+EXTERN_API( void )
+SetCollectionDefaultAttributes (Collection c,
+ SInt32 whichAttributes,
+ SInt32 newAttributes) TWOWORDINLINE(0x7006, 0xABF6);
+
+
+EXTERN_API( SInt32 )
+CountCollectionItems (Collection c) TWOWORDINLINE(0x7007, 0xABF6);
+
+
+EXTERN_API( OSErr )
+AddCollectionItem (Collection c,
+ CollectionTag tag,
+ SInt32 id,
+ SInt32 itemSize,
+ const void * itemData) TWOWORDINLINE(0x7008, 0xABF6);
+
+
+EXTERN_API( OSErr )
+GetCollectionItem (Collection c,
+ CollectionTag tag,
+ SInt32 id,
+ SInt32 * itemSize,
+ void * itemData) TWOWORDINLINE(0x7009, 0xABF6);
+
+
+EXTERN_API( OSErr )
+RemoveCollectionItem (Collection c,
+ CollectionTag tag,
+ SInt32 id) TWOWORDINLINE(0x700A, 0xABF6);
+
+
+EXTERN_API( OSErr )
+SetCollectionItemInfo (Collection c,
+ CollectionTag tag,
+ SInt32 id,
+ SInt32 whichAttributes,
+ SInt32 newAttributes) TWOWORDINLINE(0x700B, 0xABF6);
+
+
+EXTERN_API( OSErr )
+GetCollectionItemInfo (Collection c,
+ CollectionTag tag,
+ SInt32 id,
+ SInt32 * index,
+ SInt32 * itemSize,
+ SInt32 * attributes) TWOWORDINLINE(0x700C, 0xABF6);
+
+
+EXTERN_API( OSErr )
+ReplaceIndexedCollectionItem (Collection c,
+ SInt32 index,
+ SInt32 itemSize,
+ const void * itemData) TWOWORDINLINE(0x700D, 0xABF6);
+
+
+EXTERN_API( OSErr )
+GetIndexedCollectionItem (Collection c,
+ SInt32 index,
+ SInt32 * itemSize,
+ void * itemData) TWOWORDINLINE(0x700E, 0xABF6);
+
+
+EXTERN_API( OSErr )
+RemoveIndexedCollectionItem (Collection c,
+ SInt32 index) TWOWORDINLINE(0x700F, 0xABF6);
+
+
+EXTERN_API( OSErr )
+SetIndexedCollectionItemInfo (Collection c,
+ SInt32 index,
+ SInt32 whichAttributes,
+ SInt32 newAttributes) TWOWORDINLINE(0x7010, 0xABF6);
+
+
+EXTERN_API( OSErr )
+GetIndexedCollectionItemInfo (Collection c,
+ SInt32 index,
+ CollectionTag * tag,
+ SInt32 * id,
+ SInt32 * itemSize,
+ SInt32 * attributes) TWOWORDINLINE(0x7011, 0xABF6);
+
+
+EXTERN_API( Boolean )
+CollectionTagExists (Collection c,
+ CollectionTag tag) TWOWORDINLINE(0x7012, 0xABF6);
+
+
+EXTERN_API( SInt32 )
+CountCollectionTags (Collection c) TWOWORDINLINE(0x7013, 0xABF6);
+
+
+EXTERN_API( OSErr )
+GetIndexedCollectionTag (Collection c,
+ SInt32 tagIndex,
+ CollectionTag * tag) TWOWORDINLINE(0x7014, 0xABF6);
+
+
+EXTERN_API( SInt32 )
+CountTaggedCollectionItems (Collection c,
+ CollectionTag tag) TWOWORDINLINE(0x7015, 0xABF6);
+
+
+EXTERN_API( OSErr )
+GetTaggedCollectionItem (Collection c,
+ CollectionTag tag,
+ SInt32 whichItem,
+ SInt32 * itemSize,
+ void * itemData) TWOWORDINLINE(0x7016, 0xABF6);
+
+
+EXTERN_API( OSErr )
+GetTaggedCollectionItemInfo (Collection c,
+ CollectionTag tag,
+ SInt32 whichItem,
+ SInt32 * id,
+ SInt32 * index,
+ SInt32 * itemSize,
+ SInt32 * attributes) TWOWORDINLINE(0x7017, 0xABF6);
+
+
+EXTERN_API( void )
+PurgeCollection (Collection c,
+ SInt32 whichAttributes,
+ SInt32 matchingAttributes) TWOWORDINLINE(0x7018, 0xABF6);
+
+
+EXTERN_API( void )
+PurgeCollectionTag (Collection c,
+ CollectionTag tag) TWOWORDINLINE(0x7019, 0xABF6);
+
+
+EXTERN_API( void )
+EmptyCollection (Collection c) TWOWORDINLINE(0x701A, 0xABF6);
+
+EXTERN_API( OSErr )
+FlattenCollection (Collection c,
+ CollectionFlattenUPP flattenProc,
+ void * refCon) TWOWORDINLINE(0x701B, 0xABF6);
+
+
+EXTERN_API( OSErr )
+FlattenPartialCollection (Collection c,
+ CollectionFlattenUPP flattenProc,
+ void * refCon,
+ SInt32 whichAttributes,
+ SInt32 matchingAttributes) TWOWORDINLINE(0x701C, 0xABF6);
+
+
+EXTERN_API( OSErr )
+UnflattenCollection (Collection c,
+ CollectionFlattenUPP flattenProc,
+ void * refCon) TWOWORDINLINE(0x701D, 0xABF6);
+
+
+EXTERN_API( CollectionExceptionUPP )
+GetCollectionExceptionProc (Collection c) TWOWORDINLINE(0x701E, 0xABF6);
+
+
+EXTERN_API( void )
+SetCollectionExceptionProc (Collection c,
+ CollectionExceptionUPP exceptionProc) TWOWORDINLINE(0x701F, 0xABF6);
+
+
+EXTERN_API( Collection )
+GetNewCollection (SInt16 collectionID) TWOWORDINLINE(0x7020, 0xABF6);
+
+
+/**********************************************************************/
+/************** Utility routines for handle-based access **************/
+/**********************************************************************/
+EXTERN_API( OSErr )
+AddCollectionItemHdl (Collection aCollection,
+ CollectionTag tag,
+ SInt32 id,
+ Handle itemData) TWOWORDINLINE(0x7021, 0xABF6);
+
+
+EXTERN_API( OSErr )
+GetCollectionItemHdl (Collection aCollection,
+ CollectionTag tag,
+ SInt32 id,
+ Handle itemData) TWOWORDINLINE(0x7022, 0xABF6);
+
+
+EXTERN_API( OSErr )
+ReplaceIndexedCollectionItemHdl (Collection aCollection,
+ SInt32 index,
+ Handle itemData) TWOWORDINLINE(0x7023, 0xABF6);
+
+
+EXTERN_API( OSErr )
+GetIndexedCollectionItemHdl (Collection aCollection,
+ SInt32 index,
+ Handle itemData) TWOWORDINLINE(0x7024, 0xABF6);
+
+
+EXTERN_API( OSErr )
+FlattenCollectionToHdl (Collection aCollection,
+ Handle flattened) TWOWORDINLINE(0x7025, 0xABF6);
+
+
+EXTERN_API( OSErr )
+UnflattenCollectionFromHdl (Collection aCollection,
+ Handle flattened) TWOWORDINLINE(0x7026, 0xABF6);
+
+
+#if OLDROUTINENAMES
+enum {
+ dontWantTag = kCollectionDontWantTag,
+ dontWantId = kCollectionDontWantId,
+ dontWantSize = kCollectionDontWantSize,
+ dontWantAttributes = kCollectionDontWantAttributes,
+ dontWantIndex = kCollectionDontWantIndex,
+ dontWantData = kCollectionDontWantData
+};
+
+enum {
+ noCollectionAttributes = kCollectionNoAttributes,
+ allCollectionAttributes = kCollectionAllAttributes,
+ userCollectionAttributes = kCollectionUserAttributes,
+ defaultCollectionAttributes = kCollectionDefaultAttributes
+};
+
+enum {
+ collectionUser0Bit = kCollectionUser0Bit,
+ collectionUser1Bit = kCollectionUser1Bit,
+ collectionUser2Bit = kCollectionUser2Bit,
+ collectionUser3Bit = kCollectionUser3Bit,
+ collectionUser4Bit = kCollectionUser4Bit,
+ collectionUser5Bit = kCollectionUser5Bit,
+ collectionUser6Bit = kCollectionUser6Bit,
+ collectionUser7Bit = kCollectionUser7Bit,
+ collectionUser8Bit = kCollectionUser8Bit,
+ collectionUser9Bit = kCollectionUser9Bit,
+ collectionUser10Bit = kCollectionUser10Bit,
+ collectionUser11Bit = kCollectionUser11Bit,
+ collectionUser12Bit = kCollectionUser12Bit,
+ collectionUser13Bit = kCollectionUser13Bit,
+ collectionUser14Bit = kCollectionUser14Bit,
+ collectionUser15Bit = kCollectionUser15Bit,
+ collectionReserved0Bit = kCollectionReserved0Bit,
+ collectionReserved1Bit = kCollectionReserved1Bit,
+ collectionReserved2Bit = kCollectionReserved2Bit,
+ collectionReserved3Bit = kCollectionReserved3Bit,
+ collectionReserved4Bit = kCollectionReserved4Bit,
+ collectionReserved5Bit = kCollectionReserved5Bit,
+ collectionReserved6Bit = kCollectionReserved6Bit,
+ collectionReserved7Bit = kCollectionReserved7Bit,
+ collectionReserved8Bit = kCollectionReserved8Bit,
+ collectionReserved9Bit = kCollectionReserved9Bit,
+ collectionReserved10Bit = kCollectionReserved10Bit,
+ collectionReserved11Bit = kCollectionReserved11Bit,
+ collectionReserved12Bit = kCollectionReserved12Bit,
+ collectionReserved13Bit = kCollectionReserved13Bit,
+ collectionPersistenceBit = kCollectionPersistenceBit,
+ collectionLockBit = kCollectionLockBit
+};
+
+enum {
+ collectionUser0Mask = kCollectionUser0Mask,
+ collectionUser1Mask = kCollectionUser1Mask,
+ collectionUser2Mask = kCollectionUser2Mask,
+ collectionUser3Mask = kCollectionUser3Mask,
+ collectionUser4Mask = kCollectionUser4Mask,
+ collectionUser5Mask = kCollectionUser5Mask,
+ collectionUser6Mask = kCollectionUser6Mask,
+ collectionUser7Mask = kCollectionUser7Mask,
+ collectionUser8Mask = kCollectionUser8Mask,
+ collectionUser9Mask = kCollectionUser9Mask,
+ collectionUser10Mask = kCollectionUser10Mask,
+ collectionUser11Mask = kCollectionUser11Mask,
+ collectionUser12Mask = kCollectionUser12Mask,
+ collectionUser13Mask = kCollectionUser13Mask,
+ collectionUser14Mask = kCollectionUser14Mask,
+ collectionUser15Mask = kCollectionUser15Mask,
+ collectionReserved0Mask = kCollectionReserved0Mask,
+ collectionReserved1Mask = kCollectionReserved1Mask,
+ collectionReserved2Mask = kCollectionReserved2Mask,
+ collectionReserved3Mask = kCollectionReserved3Mask,
+ collectionReserved4Mask = kCollectionReserved4Mask,
+ collectionReserved5Mask = kCollectionReserved5Mask,
+ collectionReserved6Mask = kCollectionReserved6Mask,
+ collectionReserved7Mask = kCollectionReserved7Mask,
+ collectionReserved8Mask = kCollectionReserved8Mask,
+ collectionReserved9Mask = kCollectionReserved9Mask,
+ collectionReserved10Mask = kCollectionReserved10Mask,
+ collectionReserved11Mask = kCollectionReserved11Mask,
+ collectionReserved12Mask = kCollectionReserved12Mask,
+ collectionReserved13Mask = kCollectionReserved13Mask,
+ collectionPersistenceMask = kCollectionPersistenceMask,
+ collectionLockMask = kCollectionLockMask
+};
+
+#endif /* OLDROUTINENAMES */
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __COLLECTIONS__ */
+
diff --git a/include/qt/ColorPicker.h b/include/qt/ColorPicker.h
new file mode 100644
index 000000000..7674d46df
--- /dev/null
+++ b/include/qt/ColorPicker.h
@@ -0,0 +1,345 @@
+/*
+ File: ColorPicker.h
+
+ Contains: Color Picker package Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1987-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __COLORPICKER__
+#define __COLORPICKER__
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#ifndef __CMAPPLICATION__
+#include "CMApplication.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ /*Maximum small fract value, as long*/
+ kMaximumSmallFract = 0x0000FFFF
+};
+
+enum {
+ kDefaultColorPickerWidth = 383,
+ kDefaultColorPickerHeight = 238
+};
+
+
+typedef SInt16 DialogPlacementSpec;
+enum {
+ kAtSpecifiedOrigin = 0,
+ kDeepestColorScreen = 1,
+ kCenterOnMainScreen = 2
+};
+
+
+/* These are for the flags field in the structs below (for example ColorPickerInfo). */
+enum {
+ kColorPickerDialogIsMoveable = 1,
+ kColorPickerDialogIsModal = 2,
+ kColorPickerCanModifyPalette = 4,
+ kColorPickerCanAnimatePalette = 8,
+ kColorPickerAppIsColorSyncAware = 16,
+ kColorPickerInSystemDialog = 32,
+ kColorPickerInApplicationDialog = 64,
+ kColorPickerInPickerDialog = 128,
+ kColorPickerDetachedFromChoices = 256,
+ kColorPickerCallColorProcLive = 512
+};
+
+
+#if OLDROUTINENAMES
+enum {
+ /*Maximum small fract value, as long*/
+ MaxSmallFract = 0x0000FFFF
+};
+
+enum {
+ kDefaultWidth = 383,
+ kDefaultHeight = 238
+};
+
+/* These are for the flags field in the structs below (for example ColorPickerInfo). */
+enum {
+ DialogIsMoveable = 1,
+ DialogIsModal = 2,
+ CanModifyPalette = 4,
+ CanAnimatePalette = 8,
+ AppIsColorSyncAware = 16,
+ InSystemDialog = 32,
+ InApplicationDialog = 64,
+ InPickerDialog = 128,
+ DetachedFromChoices = 256,
+ CallColorProcLive = 512
+};
+
+#endif /* OLDROUTINENAMES */
+
+/* A SmallFract value is just the fractional part of a Fixed number,
+which is the low order word. SmallFracts are used to save room,
+and to be compatible with Quickdraw's RGBColor. They can be
+assigned directly to and from INTEGERs. */
+/* Unsigned fraction between 0 and 1 */
+typedef unsigned short SmallFract;
+/* For developmental simplicity in switching between the HLS and HSV
+models, HLS is reordered into HSL. Thus both models start with
+hue and saturation values; value/lightness/brightness is last. */
+
+
+struct HSVColor {
+ SmallFract hue; /*Fraction of circle, red at 0*/
+ SmallFract saturation; /*0-1, 0 for gray, 1 for pure color*/
+ SmallFract value; /*0-1, 0 for black, 1 for max intensity*/
+};
+typedef struct HSVColor HSVColor;
+
+struct HSLColor {
+ SmallFract hue; /*Fraction of circle, red at 0*/
+ SmallFract saturation; /*0-1, 0 for gray, 1 for pure color*/
+ SmallFract lightness; /*0-1, 0 for black, 1 for white*/
+};
+typedef struct HSLColor HSLColor;
+
+struct CMYColor {
+ SmallFract cyan;
+ SmallFract magenta;
+ SmallFract yellow;
+};
+typedef struct CMYColor CMYColor;
+
+struct PMColor {
+ CMProfileHandle profile;
+ CMColor color;
+};
+typedef struct PMColor PMColor;
+typedef PMColor * PMColorPtr;
+
+struct NPMColor {
+ CMProfileRef profile;
+ CMColor color;
+};
+typedef struct NPMColor NPMColor;
+typedef NPMColor * NPMColorPtr;
+typedef struct OpaquePicker* Picker;
+typedef Picker picker;
+
+struct PickerMenuItemInfo {
+ short editMenuID;
+ short cutItem;
+ short copyItem;
+ short pasteItem;
+ short clearItem;
+ short undoItem;
+};
+typedef struct PickerMenuItemInfo PickerMenuItemInfo;
+/* Structs related to deprecated API's have been pulled from this file. */
+/* Those structs necessary for developers writing their own color pickers... */
+/* have been moved to ColorPickerComponents.h. */
+
+typedef CALLBACK_API( void , ColorChangedProcPtr )(long userData, PMColor *newColor);
+typedef CALLBACK_API( void , NColorChangedProcPtr )(long userData, NPMColor *newColor);
+typedef CALLBACK_API( Boolean , UserEventProcPtr )(EventRecord *event);
+typedef STACK_UPP_TYPE(ColorChangedProcPtr) ColorChangedUPP;
+typedef STACK_UPP_TYPE(NColorChangedProcPtr) NColorChangedUPP;
+typedef STACK_UPP_TYPE(UserEventProcPtr) UserEventUPP;
+
+struct ColorPickerInfo {
+ PMColor theColor;
+ CMProfileHandle dstProfile;
+ UInt32 flags;
+ DialogPlacementSpec placeWhere;
+ Point dialogOrigin;
+ OSType pickerType;
+ UserEventUPP eventProc;
+ ColorChangedUPP colorProc;
+ UInt32 colorProcData;
+ Str255 prompt;
+ PickerMenuItemInfo mInfo;
+ Boolean newColorChosen;
+ SInt8 filler;
+};
+typedef struct ColorPickerInfo ColorPickerInfo;
+
+struct NColorPickerInfo {
+ NPMColor theColor;
+ CMProfileRef dstProfile;
+ UInt32 flags;
+ DialogPlacementSpec placeWhere;
+ Point dialogOrigin;
+ OSType pickerType;
+ UserEventUPP eventProc;
+ NColorChangedUPP colorProc;
+ UInt32 colorProcData;
+ Str255 prompt;
+ PickerMenuItemInfo mInfo;
+ Boolean newColorChosen;
+ UInt8 reserved; /*Must be 0*/
+};
+typedef struct NColorPickerInfo NColorPickerInfo;
+
+/* Below are the color conversion routines.*/
+EXTERN_API( SmallFract )
+Fix2SmallFract (Fixed f) THREEWORDINLINE(0x3F3C, 0x0001, 0xA82E);
+
+EXTERN_API( Fixed )
+SmallFract2Fix (SmallFract s) THREEWORDINLINE(0x3F3C, 0x0002, 0xA82E);
+
+EXTERN_API( void )
+CMY2RGB (const CMYColor * cColor,
+ RGBColor * rColor) THREEWORDINLINE(0x3F3C, 0x0003, 0xA82E);
+
+EXTERN_API( void )
+RGB2CMY (const RGBColor * rColor,
+ CMYColor * cColor) THREEWORDINLINE(0x3F3C, 0x0004, 0xA82E);
+
+EXTERN_API( void )
+HSL2RGB (const HSLColor * hColor,
+ RGBColor * rColor) THREEWORDINLINE(0x3F3C, 0x0005, 0xA82E);
+
+EXTERN_API( void )
+RGB2HSL (const RGBColor * rColor,
+ HSLColor * hColor) THREEWORDINLINE(0x3F3C, 0x0006, 0xA82E);
+
+EXTERN_API( void )
+HSV2RGB (const HSVColor * hColor,
+ RGBColor * rColor) THREEWORDINLINE(0x3F3C, 0x0007, 0xA82E);
+
+EXTERN_API( void )
+RGB2HSV (const RGBColor * rColor,
+ HSVColor * hColor) THREEWORDINLINE(0x3F3C, 0x0008, 0xA82E);
+
+
+/* GetColor() works with or without the Color Picker extension.*/
+EXTERN_API( Boolean )
+GetColor (Point where,
+ ConstStr255Param prompt,
+ const RGBColor * inColor,
+ RGBColor * outColor) THREEWORDINLINE(0x3F3C, 0x0009, 0xA82E);
+
+
+/* PickColor() requires the Color Picker extension (version 2.0 or greater).*/
+EXTERN_API( OSErr )
+PickColor (ColorPickerInfo * theColorInfo) THREEWORDINLINE(0x3F3C, 0x0213, 0xA82E);
+
+/* NPickColor() requires the Color Picker extension (version 2.1 or greater).*/
+EXTERN_API( OSErr )
+NPickColor (NColorPickerInfo * theColorInfo) THREEWORDINLINE(0x3F3C, 0x0227, 0xA82E);
+
+
+/* A suite of mid-level API calls have been deprecated. Likely you never... */
+/* used them anyway. They were removed from this file and should not be... */
+/* used in the future as they are not gauranteed to be supported. */
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(ColorChangedUPP)
+ NewColorChangedUPP (ColorChangedProcPtr userRoutine);
+
+ EXTERN_API(NColorChangedUPP)
+ NewNColorChangedUPP (NColorChangedProcPtr userRoutine);
+
+ EXTERN_API(UserEventUPP)
+ NewUserEventUPP (UserEventProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeColorChangedUPP (ColorChangedUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeNColorChangedUPP (NColorChangedUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeUserEventUPP (UserEventUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeColorChangedUPP (long userData,
+ PMColor * newColor,
+ ColorChangedUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeNColorChangedUPP (long userData,
+ NPMColor * newColor,
+ NColorChangedUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeUserEventUPP (EventRecord * event,
+ UserEventUPP userUPP);
+
+#else
+ enum { uppColorChangedProcInfo = 0x000003C0 }; /* pascal no_return_value Func(4_bytes, 4_bytes) */
+ enum { uppNColorChangedProcInfo = 0x000003C0 }; /* pascal no_return_value Func(4_bytes, 4_bytes) */
+ enum { uppUserEventProcInfo = 0x000000D0 }; /* pascal 1_byte Func(4_bytes) */
+ #define NewColorChangedUPP(userRoutine) (ColorChangedUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppColorChangedProcInfo, GetCurrentArchitecture())
+ #define NewNColorChangedUPP(userRoutine) (NColorChangedUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNColorChangedProcInfo, GetCurrentArchitecture())
+ #define NewUserEventUPP(userRoutine) (UserEventUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppUserEventProcInfo, GetCurrentArchitecture())
+ #define DisposeColorChangedUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeNColorChangedUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeUserEventUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeColorChangedUPP(userData, newColor, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppColorChangedProcInfo, (userData), (newColor))
+ #define InvokeNColorChangedUPP(userData, newColor, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppNColorChangedProcInfo, (userData), (newColor))
+ #define InvokeUserEventUPP(event, userUPP) (Boolean)CALL_ONE_PARAMETER_UPP((userUPP), uppUserEventProcInfo, (event))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewColorChangedProc(userRoutine) NewColorChangedUPP(userRoutine)
+#define NewNColorChangedProc(userRoutine) NewNColorChangedUPP(userRoutine)
+#define NewUserEventProc(userRoutine) NewUserEventUPP(userRoutine)
+#define CallColorChangedProc(userRoutine, userData, newColor) InvokeColorChangedUPP(userData, newColor, userRoutine)
+#define CallNColorChangedProc(userRoutine, userData, newColor) InvokeNColorChangedUPP(userData, newColor, userRoutine)
+#define CallUserEventProc(userRoutine, event) InvokeUserEventUPP(event, userRoutine)
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __COLORPICKER__ */
+
diff --git a/include/qt/ColorPickerComponents.h b/include/qt/ColorPickerComponents.h
new file mode 100644
index 000000000..a1e358b5c
--- /dev/null
+++ b/include/qt/ColorPickerComponents.h
@@ -0,0 +1,1183 @@
+/*
+ File: ColorPickerComponents.h
+
+ Contains: Color Picker Component Interfaces.
+
+ Version: Technology: Mac OS 8.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __COLORPICKERCOMPONENTS__
+#define __COLORPICKERCOMPONENTS__
+
+#ifndef __COLORPICKER__
+#include "ColorPicker.h"
+#endif
+
+#ifndef __COMPONENTS__
+#include "Components.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+#ifndef __BALLOONS__
+#include "Balloons.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ kPickerComponentType = FOUR_CHAR_CODE('cpkr')
+};
+
+enum {
+ kPickerInit = 0,
+ kPickerTestGraphicsWorld = 1,
+ kPickerGetDialog = 2,
+ kPickerGetItemList = 3,
+ kPickerGetColor = 4,
+ kPickerSetColor = 5,
+ kPickerEvent = 6,
+ kPickerEdit = 7,
+ kPickerSetVisibility = 8,
+ kPickerDisplay = 9,
+ kPickerItemHit = 10,
+ kPickerSetBaseItem = 11,
+ kPickerGetProfile = 12,
+ kPickerSetProfile = 13,
+ kPickerGetPrompt = 14,
+ kPickerSetPrompt = 15,
+ kPickerGetIconData = 16,
+ kPickerGetEditMenuState = 17,
+ kPickerSetOrigin = 18,
+ kPickerExtractHelpItem = 19,
+ kPickerSetColorChangedProc = 20,
+ kNPickerGetColor = 21,
+ kNPickerSetColor = 22,
+ kNPickerGetProfile = 23,
+ kNPickerSetProfile = 24,
+ kNPickerSetColorChangedProc = 25
+};
+
+/* These structs were moved here from the ColorPicker header.*/
+enum {
+ kPickerDidNothing = 0, /* was kDidNothing */
+ kPickerColorChanged = 1, /* was kColorChanged */
+ kPickerOkHit = 2, /* was kOkHit */
+ kPickerCancelHit = 3, /* was kCancelHit */
+ kPickerNewPickerChosen = 4, /* was kNewPickerChosen */
+ kPickerApplItemHit = 5 /* was kApplItemHit */
+};
+
+typedef short PickerAction;
+enum {
+ kOriginalColor = 0,
+ kNewColor = 1
+};
+
+typedef short PickerColorType;
+enum {
+ kPickerCut = 0, /* was kCut */
+ kPickerCopy = 1, /* was kCopy */
+ kPickerPaste = 2, /* was kPaste */
+ kPickerClear = 3, /* was kClear */
+ kPickerUndo = 4 /* was kUndo */
+};
+
+typedef short PickerEditOperation;
+enum {
+ kPickerMouseDown = 0, /* was kMouseDown */
+ kPickerKeyDown = 1, /* was kKeyDown */
+ kPickerFieldEntered = 2, /* was kFieldEntered */
+ kPickerFieldLeft = 3, /* was kFieldLeft */
+ kPickerCutOp = 4, /* was kCutOp */
+ kPickerCopyOp = 5, /* was kCopyOp */
+ kPickerPasteOp = 6, /* was kPasteOp */
+ kPickerClearOp = 7, /* was kClearOp */
+ kPickerUndoOp = 8 /* was kUndoOp */
+};
+
+typedef short PickerItemModifier;
+/* These are for the flags field in the picker's 'thng' resource. */
+enum {
+ kPickerCanDoColor = 1, /* was CanDoColor */
+ kPickerCanDoBlackWhite = 2, /* was CanDoBlackWhite */
+ kPickerAlwaysModifiesPalette = 4, /* was AlwaysModifiesPalette */
+ kPickerMayModifyPalette = 8, /* was MayModifyPalette */
+ kPickerIsColorSyncAware = 16, /* was PickerIsColorSyncAware */
+ kPickerCanDoSystemDialog = 32, /* was CanDoSystemDialog */
+ kPickerCanDoApplDialog = 64, /* was CanDoApplDialog */
+ kPickerHasOwnDialog = 128, /* was HasOwnDialog */
+ kPickerCanDetach = 256, /* was CanDetach */
+ kPickerIsColorSync2Aware = 512 /* was PickerIsColorSync2Aware */
+};
+
+enum {
+ kPickerNoForcast = 0, /* was kNoForcast */
+ kPickerMenuChoice = 1, /* was kMenuChoice */
+ kPickerDialogAccept = 2, /* was kDialogAccept */
+ kPickerDialogCancel = 3, /* was kDialogCancel */
+ kPickerLeaveFocus = 4, /* was kLeaveFocus */
+ kPickerSwitch = 5,
+ kPickerNormalKeyDown = 6, /* was kNormalKeyDown */
+ kPickerNormalMouseDown = 7 /* was kNormalMouseDown */
+};
+
+typedef short PickerEventForcaster;
+
+struct PickerIconData {
+ short scriptCode;
+ short iconSuiteID;
+ ResType helpResType;
+ short helpResID;
+};
+typedef struct PickerIconData PickerIconData;
+
+struct PickerInitData {
+ DialogPtr pickerDialog;
+ DialogPtr choicesDialog;
+ long flags;
+ Picker yourself;
+};
+typedef struct PickerInitData PickerInitData;
+
+struct PickerMenuState {
+ Boolean cutEnabled;
+ Boolean copyEnabled;
+ Boolean pasteEnabled;
+ Boolean clearEnabled;
+ Boolean undoEnabled;
+ SInt8 filler;
+ Str255 undoString;
+};
+typedef struct PickerMenuState PickerMenuState;
+
+struct SystemDialogInfo {
+ long flags;
+ long pickerType;
+ DialogPlacementSpec placeWhere;
+ Point dialogOrigin;
+ PickerMenuItemInfo mInfo;
+};
+typedef struct SystemDialogInfo SystemDialogInfo;
+
+struct PickerDialogInfo {
+ long flags;
+ long pickerType;
+ Point * dialogOrigin;
+ PickerMenuItemInfo mInfo;
+};
+typedef struct PickerDialogInfo PickerDialogInfo;
+
+struct ApplicationDialogInfo {
+ long flags;
+ long pickerType;
+ DialogPtr theDialog;
+ Point pickerOrigin;
+ PickerMenuItemInfo mInfo;
+};
+typedef struct ApplicationDialogInfo ApplicationDialogInfo;
+
+struct PickerEventData {
+ EventRecord * event;
+ PickerAction action;
+ short itemHit;
+ Boolean handled;
+ SInt8 filler;
+ ColorChangedUPP colorProc;
+ long colorProcData;
+ PickerEventForcaster forcast;
+};
+typedef struct PickerEventData PickerEventData;
+
+struct PickerEditData {
+ PickerEditOperation theEdit;
+ PickerAction action;
+ Boolean handled;
+ SInt8 filler;
+};
+typedef struct PickerEditData PickerEditData;
+
+struct PickerItemHitData {
+ short itemHit;
+ PickerItemModifier iMod;
+ PickerAction action;
+ ColorChangedUPP colorProc;
+ long colorProcData;
+ Point where;
+};
+typedef struct PickerItemHitData PickerItemHitData;
+
+struct PickerHelpItemInfo {
+ long options;
+ Point tip;
+ Rect altRect;
+ short theProc;
+ short helpVariant;
+ HMMessageRecord helpMessage;
+};
+typedef struct PickerHelpItemInfo PickerHelpItemInfo;
+#if OLDROUTINENAMES
+enum {
+ kInitPicker = kPickerInit,
+ kTestGraphicsWorld = kPickerTestGraphicsWorld,
+ kGetDialog = kPickerGetDialog,
+ kGetItemList = kPickerGetItemList,
+ kGetColor = kPickerGetColor,
+ kSetColor = kPickerSetColor,
+ kEvent = kPickerEvent,
+ kEdit = kPickerEdit,
+ kSetVisibility = kPickerSetVisibility,
+ kDrawPicker = kPickerDisplay,
+ kItemHit = kPickerItemHit,
+ kSetBaseItem = kPickerSetBaseItem,
+ kGetProfile = kPickerGetProfile,
+ kSetProfile = kPickerSetProfile,
+ kGetPrompt = kPickerGetPrompt,
+ kSetPrompt = kPickerSetPrompt,
+ kGetIconData = kPickerGetIconData,
+ kGetEditMenuState = kPickerGetEditMenuState,
+ kSetOrigin = kPickerSetOrigin,
+ kExtractHelpItem = kPickerExtractHelpItem
+};
+
+enum {
+ kDidNothing = kPickerDidNothing,
+ kColorChanged = kPickerColorChanged,
+ kOkHit = kPickerOkHit,
+ kCancelHit = kPickerCancelHit,
+ kNewPickerChosen = kPickerNewPickerChosen,
+ kApplItemHit = kPickerApplItemHit
+};
+
+enum {
+ kCut = kPickerCut,
+ kCopy = kPickerCopy,
+ kPaste = kPickerPaste,
+ kClear = kPickerClear,
+ kUndo = kPickerUndo
+};
+
+enum {
+ kMouseDown = kPickerMouseDown,
+ kKeyDown = kPickerKeyDown,
+ kFieldEntered = kPickerFieldEntered,
+ kFieldLeft = kPickerFieldLeft,
+ kCutOp = kPickerCutOp,
+ kCopyOp = kPickerCopyOp,
+ kPasteOp = kPickerPasteOp,
+ kClearOp = kPickerClearOp,
+ kUndoOp = kPickerUndoOp
+};
+
+enum {
+ kNoForcast = kPickerNoForcast,
+ kMenuChoice = kPickerMenuChoice,
+ kDialogAccept = kPickerDialogAccept,
+ kDialogCancel = kPickerDialogCancel,
+ kLeaveFocus = kPickerLeaveFocus,
+ kNormalKeyDown = kPickerNormalKeyDown,
+ kNormalMouseDown = kPickerNormalMouseDown
+};
+
+
+typedef short ColorType;
+typedef short EditOperation;
+typedef short ItemModifier;
+typedef short EventForcaster;
+
+struct EventData {
+ EventRecord * event;
+ PickerAction action;
+ short itemHit;
+ Boolean handled;
+ SInt8 filler;
+ ColorChangedUPP colorProc;
+ long colorProcData;
+ EventForcaster forcast;
+};
+typedef struct EventData EventData;
+
+struct EditData {
+ EditOperation theEdit;
+ PickerAction action;
+ Boolean handled;
+ SInt8 filler;
+};
+typedef struct EditData EditData;
+
+struct ItemHitData {
+ short itemHit;
+ ItemModifier iMod;
+ PickerAction action;
+ ColorChangedUPP colorProc;
+ long colorProcData;
+ Point where;
+};
+typedef struct ItemHitData ItemHitData;
+
+struct HelpItemInfo {
+ long options;
+ Point tip;
+ Rect altRect;
+ short theProc;
+ short helpVariant;
+ HMMessageRecord helpMessage;
+};
+typedef struct HelpItemInfo HelpItemInfo;
+#endif /* OLDROUTINENAMES */
+
+typedef CALLBACK_API( ComponentResult , PickerOpenProcPtr )(long storage, ComponentInstance self);
+typedef CALLBACK_API( ComponentResult , PickerCloseProcPtr )(long storage, ComponentInstance self);
+typedef CALLBACK_API( ComponentResult , PickerCanDoProcPtr )(long storage, short selector);
+typedef CALLBACK_API( ComponentResult , PickerVersionProcPtr )(long storage);
+typedef CALLBACK_API( ComponentResult , PickerRegisterProcPtr )(long storage);
+typedef CALLBACK_API( ComponentResult , PickerSetTargetProcPtr )(long storage, ComponentInstance topOfCallChain);
+typedef STACK_UPP_TYPE(PickerOpenProcPtr) PickerOpenUPP;
+typedef STACK_UPP_TYPE(PickerCloseProcPtr) PickerCloseUPP;
+typedef STACK_UPP_TYPE(PickerCanDoProcPtr) PickerCanDoUPP;
+typedef STACK_UPP_TYPE(PickerVersionProcPtr) PickerVersionUPP;
+typedef STACK_UPP_TYPE(PickerRegisterProcPtr) PickerRegisterUPP;
+typedef STACK_UPP_TYPE(PickerSetTargetProcPtr) PickerSetTargetUPP;
+EXTERN_API( ComponentResult )
+PickerInit (long storage,
+ PickerInitData * data) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0000, 0x7000, 0xA82A);
+
+typedef CALLBACK_API( ComponentResult , PickerInitProcPtr )(long storage, PickerInitData *data);
+EXTERN_API( ComponentResult )
+PickerTestGraphicsWorld (long storage,
+ PickerInitData * data) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0001, 0x7000, 0xA82A);
+
+typedef CALLBACK_API( ComponentResult , PickerTestGraphicsWorldProcPtr )(long storage, PickerInitData *data);
+EXTERN_API( ComponentResult )
+PickerGetDialog (long storage) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0002, 0x7000, 0xA82A);
+
+typedef CALLBACK_API( ComponentResult , PickerGetDialogProcPtr )(long storage);
+EXTERN_API( ComponentResult )
+PickerGetItemList (long storage) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0003, 0x7000, 0xA82A);
+
+typedef CALLBACK_API( ComponentResult , PickerGetItemListProcPtr )(long storage);
+EXTERN_API( ComponentResult )
+PickerGetColor (long storage,
+ PickerColorType whichColor,
+ PMColorPtr color) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0004, 0x7000, 0xA82A);
+
+typedef CALLBACK_API( ComponentResult , PickerGetColorProcPtr )(long storage, PickerColorType whichColor, PMColorPtr color);
+typedef STACK_UPP_TYPE(PickerInitProcPtr) PickerInitUPP;
+typedef STACK_UPP_TYPE(PickerTestGraphicsWorldProcPtr) PickerTestGraphicsWorldUPP;
+typedef STACK_UPP_TYPE(PickerGetDialogProcPtr) PickerGetDialogUPP;
+typedef STACK_UPP_TYPE(PickerGetItemListProcPtr) PickerGetItemListUPP;
+typedef STACK_UPP_TYPE(PickerGetColorProcPtr) PickerGetColorUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(PickerOpenUPP)
+ NewPickerOpenUPP (PickerOpenProcPtr userRoutine);
+
+ EXTERN_API(PickerCloseUPP)
+ NewPickerCloseUPP (PickerCloseProcPtr userRoutine);
+
+ EXTERN_API(PickerCanDoUPP)
+ NewPickerCanDoUPP (PickerCanDoProcPtr userRoutine);
+
+ EXTERN_API(PickerVersionUPP)
+ NewPickerVersionUPP (PickerVersionProcPtr userRoutine);
+
+ EXTERN_API(PickerRegisterUPP)
+ NewPickerRegisterUPP (PickerRegisterProcPtr userRoutine);
+
+ EXTERN_API(PickerSetTargetUPP)
+ NewPickerSetTargetUPP (PickerSetTargetProcPtr userRoutine);
+
+ EXTERN_API(PickerInitUPP)
+ NewPickerInitUPP (PickerInitProcPtr userRoutine);
+
+ EXTERN_API(PickerTestGraphicsWorldUPP)
+ NewPickerTestGraphicsWorldUPP (PickerTestGraphicsWorldProcPtr userRoutine);
+
+ EXTERN_API(PickerGetDialogUPP)
+ NewPickerGetDialogUPP (PickerGetDialogProcPtr userRoutine);
+
+ EXTERN_API(PickerGetItemListUPP)
+ NewPickerGetItemListUPP (PickerGetItemListProcPtr userRoutine);
+
+ EXTERN_API(PickerGetColorUPP)
+ NewPickerGetColorUPP (PickerGetColorProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposePickerOpenUPP (PickerOpenUPP userUPP);
+
+ EXTERN_API(void)
+ DisposePickerCloseUPP (PickerCloseUPP userUPP);
+
+ EXTERN_API(void)
+ DisposePickerCanDoUPP (PickerCanDoUPP userUPP);
+
+ EXTERN_API(void)
+ DisposePickerVersionUPP (PickerVersionUPP userUPP);
+
+ EXTERN_API(void)
+ DisposePickerRegisterUPP (PickerRegisterUPP userUPP);
+
+ EXTERN_API(void)
+ DisposePickerSetTargetUPP (PickerSetTargetUPP userUPP);
+
+ EXTERN_API(void)
+ DisposePickerInitUPP (PickerInitUPP userUPP);
+
+ EXTERN_API(void)
+ DisposePickerTestGraphicsWorldUPP (PickerTestGraphicsWorldUPP userUPP);
+
+ EXTERN_API(void)
+ DisposePickerGetDialogUPP (PickerGetDialogUPP userUPP);
+
+ EXTERN_API(void)
+ DisposePickerGetItemListUPP (PickerGetItemListUPP userUPP);
+
+ EXTERN_API(void)
+ DisposePickerGetColorUPP (PickerGetColorUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokePickerOpenUPP (long storage,
+ ComponentInstance self,
+ PickerOpenUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokePickerCloseUPP (long storage,
+ ComponentInstance self,
+ PickerCloseUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokePickerCanDoUPP (long storage,
+ short selector,
+ PickerCanDoUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokePickerVersionUPP (long storage,
+ PickerVersionUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokePickerRegisterUPP (long storage,
+ PickerRegisterUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokePickerSetTargetUPP (long storage,
+ ComponentInstance topOfCallChain,
+ PickerSetTargetUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokePickerInitUPP (long storage,
+ PickerInitData * data,
+ PickerInitUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokePickerTestGraphicsWorldUPP (long storage,
+ PickerInitData * data,
+ PickerTestGraphicsWorldUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokePickerGetDialogUPP (long storage,
+ PickerGetDialogUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokePickerGetItemListUPP (long storage,
+ PickerGetItemListUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokePickerGetColorUPP (long storage,
+ PickerColorType whichColor,
+ PMColorPtr color,
+ PickerGetColorUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppPickerOpenProcInfo = 0x000003F0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes) */
+ enum { uppPickerCloseProcInfo = 0x000003F0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes) */
+ enum { uppPickerCanDoProcInfo = 0x000002F0 }; /* pascal 4_bytes Func(4_bytes, 2_bytes) */
+ enum { uppPickerVersionProcInfo = 0x000000F0 }; /* pascal 4_bytes Func(4_bytes) */
+ enum { uppPickerRegisterProcInfo = 0x000000F0 }; /* pascal 4_bytes Func(4_bytes) */
+ enum { uppPickerSetTargetProcInfo = 0x000003F0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes) */
+ enum { uppPickerInitProcInfo = 0x000003F0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes) */
+ enum { uppPickerTestGraphicsWorldProcInfo = 0x000003F0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes) */
+ enum { uppPickerGetDialogProcInfo = 0x000000F0 }; /* pascal 4_bytes Func(4_bytes) */
+ enum { uppPickerGetItemListProcInfo = 0x000000F0 }; /* pascal 4_bytes Func(4_bytes) */
+ enum { uppPickerGetColorProcInfo = 0x00000EF0 }; /* pascal 4_bytes Func(4_bytes, 2_bytes, 4_bytes) */
+ #define NewPickerOpenUPP(userRoutine) (PickerOpenUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPickerOpenProcInfo, GetCurrentArchitecture())
+ #define NewPickerCloseUPP(userRoutine) (PickerCloseUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPickerCloseProcInfo, GetCurrentArchitecture())
+ #define NewPickerCanDoUPP(userRoutine) (PickerCanDoUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPickerCanDoProcInfo, GetCurrentArchitecture())
+ #define NewPickerVersionUPP(userRoutine) (PickerVersionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPickerVersionProcInfo, GetCurrentArchitecture())
+ #define NewPickerRegisterUPP(userRoutine) (PickerRegisterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPickerRegisterProcInfo, GetCurrentArchitecture())
+ #define NewPickerSetTargetUPP(userRoutine) (PickerSetTargetUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPickerSetTargetProcInfo, GetCurrentArchitecture())
+ #define NewPickerInitUPP(userRoutine) (PickerInitUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPickerInitProcInfo, GetCurrentArchitecture())
+ #define NewPickerTestGraphicsWorldUPP(userRoutine) (PickerTestGraphicsWorldUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPickerTestGraphicsWorldProcInfo, GetCurrentArchitecture())
+ #define NewPickerGetDialogUPP(userRoutine) (PickerGetDialogUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPickerGetDialogProcInfo, GetCurrentArchitecture())
+ #define NewPickerGetItemListUPP(userRoutine) (PickerGetItemListUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPickerGetItemListProcInfo, GetCurrentArchitecture())
+ #define NewPickerGetColorUPP(userRoutine) (PickerGetColorUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPickerGetColorProcInfo, GetCurrentArchitecture())
+ #define DisposePickerOpenUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposePickerCloseUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposePickerCanDoUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposePickerVersionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposePickerRegisterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposePickerSetTargetUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposePickerInitUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposePickerTestGraphicsWorldUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposePickerGetDialogUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposePickerGetItemListUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposePickerGetColorUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokePickerOpenUPP(storage, self, userUPP) (ComponentResult)CALL_TWO_PARAMETER_UPP((userUPP), uppPickerOpenProcInfo, (storage), (self))
+ #define InvokePickerCloseUPP(storage, self, userUPP) (ComponentResult)CALL_TWO_PARAMETER_UPP((userUPP), uppPickerCloseProcInfo, (storage), (self))
+ #define InvokePickerCanDoUPP(storage, selector, userUPP) (ComponentResult)CALL_TWO_PARAMETER_UPP((userUPP), uppPickerCanDoProcInfo, (storage), (selector))
+ #define InvokePickerVersionUPP(storage, userUPP) (ComponentResult)CALL_ONE_PARAMETER_UPP((userUPP), uppPickerVersionProcInfo, (storage))
+ #define InvokePickerRegisterUPP(storage, userUPP) (ComponentResult)CALL_ONE_PARAMETER_UPP((userUPP), uppPickerRegisterProcInfo, (storage))
+ #define InvokePickerSetTargetUPP(storage, topOfCallChain, userUPP) (ComponentResult)CALL_TWO_PARAMETER_UPP((userUPP), uppPickerSetTargetProcInfo, (storage), (topOfCallChain))
+ #define InvokePickerInitUPP(storage, data, userUPP) (ComponentResult)CALL_TWO_PARAMETER_UPP((userUPP), uppPickerInitProcInfo, (storage), (data))
+ #define InvokePickerTestGraphicsWorldUPP(storage, data, userUPP) (ComponentResult)CALL_TWO_PARAMETER_UPP((userUPP), uppPickerTestGraphicsWorldProcInfo, (storage), (data))
+ #define InvokePickerGetDialogUPP(storage, userUPP) (ComponentResult)CALL_ONE_PARAMETER_UPP((userUPP), uppPickerGetDialogProcInfo, (storage))
+ #define InvokePickerGetItemListUPP(storage, userUPP) (ComponentResult)CALL_ONE_PARAMETER_UPP((userUPP), uppPickerGetItemListProcInfo, (storage))
+ #define InvokePickerGetColorUPP(storage, whichColor, color, userUPP) (ComponentResult)CALL_THREE_PARAMETER_UPP((userUPP), uppPickerGetColorProcInfo, (storage), (whichColor), (color))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewPickerOpenProc(userRoutine) NewPickerOpenUPP(userRoutine)
+#define NewPickerCloseProc(userRoutine) NewPickerCloseUPP(userRoutine)
+#define NewPickerCanDoProc(userRoutine) NewPickerCanDoUPP(userRoutine)
+#define NewPickerVersionProc(userRoutine) NewPickerVersionUPP(userRoutine)
+#define NewPickerRegisterProc(userRoutine) NewPickerRegisterUPP(userRoutine)
+#define NewPickerSetTargetProc(userRoutine) NewPickerSetTargetUPP(userRoutine)
+#define NewPickerInitProc(userRoutine) NewPickerInitUPP(userRoutine)
+#define NewPickerTestGraphicsWorldProc(userRoutine) NewPickerTestGraphicsWorldUPP(userRoutine)
+#define NewPickerGetDialogProc(userRoutine) NewPickerGetDialogUPP(userRoutine)
+#define NewPickerGetItemListProc(userRoutine) NewPickerGetItemListUPP(userRoutine)
+#define NewPickerGetColorProc(userRoutine) NewPickerGetColorUPP(userRoutine)
+#define CallPickerOpenProc(userRoutine, storage, self) InvokePickerOpenUPP(storage, self, userRoutine)
+#define CallPickerCloseProc(userRoutine, storage, self) InvokePickerCloseUPP(storage, self, userRoutine)
+#define CallPickerCanDoProc(userRoutine, storage, selector) InvokePickerCanDoUPP(storage, selector, userRoutine)
+#define CallPickerVersionProc(userRoutine, storage) InvokePickerVersionUPP(storage, userRoutine)
+#define CallPickerRegisterProc(userRoutine, storage) InvokePickerRegisterUPP(storage, userRoutine)
+#define CallPickerSetTargetProc(userRoutine, storage, topOfCallChain) InvokePickerSetTargetUPP(storage, topOfCallChain, userRoutine)
+#define CallPickerInitProc(userRoutine, storage, data) InvokePickerInitUPP(storage, data, userRoutine)
+#define CallPickerTestGraphicsWorldProc(userRoutine, storage, data) InvokePickerTestGraphicsWorldUPP(storage, data, userRoutine)
+#define CallPickerGetDialogProc(userRoutine, storage) InvokePickerGetDialogUPP(storage, userRoutine)
+#define CallPickerGetItemListProc(userRoutine, storage) InvokePickerGetItemListUPP(storage, userRoutine)
+#define CallPickerGetColorProc(userRoutine, storage, whichColor, color) InvokePickerGetColorUPP(storage, whichColor, color, userRoutine)
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( ComponentResult )
+PickerSetColor (long storage,
+ PickerColorType whichColor,
+ PMColorPtr color) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0005, 0x7000, 0xA82A);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API( ComponentResult , PickerSetColorProcPtr )(long storage, PickerColorType whichColor, PMColorPtr color);
+#if CALL_NOT_IN_CARBON
+EXTERN_API( ComponentResult )
+PickerEvent (long storage,
+ PickerEventData * data) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0006, 0x7000, 0xA82A);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API( ComponentResult , PickerEventProcPtr )(long storage, PickerEventData *data);
+#if CALL_NOT_IN_CARBON
+EXTERN_API( ComponentResult )
+PickerEdit (long storage,
+ PickerEditData * data) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0007, 0x7000, 0xA82A);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API( ComponentResult , PickerEditProcPtr )(long storage, PickerEditData *data);
+#if CALL_NOT_IN_CARBON
+EXTERN_API( ComponentResult )
+PickerSetVisibility (long storage,
+ Boolean visible) FIVEWORDINLINE(0x2F3C, 0x0002, 0x0008, 0x7000, 0xA82A);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API( ComponentResult , PickerSetVisibilityProcPtr )(long storage, Boolean visible);
+#if CALL_NOT_IN_CARBON
+EXTERN_API( ComponentResult )
+PickerDisplay (long storage) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0009, 0x7000, 0xA82A);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API( ComponentResult , PickerDisplayProcPtr )(long storage);
+#if CALL_NOT_IN_CARBON
+EXTERN_API( ComponentResult )
+PickerItemHit (long storage,
+ PickerItemHitData * data) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000A, 0x7000, 0xA82A);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API( ComponentResult , PickerItemHitProcPtr )(long storage, PickerItemHitData *data);
+#if CALL_NOT_IN_CARBON
+EXTERN_API( ComponentResult )
+PickerSetBaseItem (long storage,
+ short baseItem) FIVEWORDINLINE(0x2F3C, 0x0002, 0x000B, 0x7000, 0xA82A);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API( ComponentResult , PickerSetBaseItemProcPtr )(long storage, short baseItem);
+#if CALL_NOT_IN_CARBON
+EXTERN_API( ComponentResult )
+PickerGetProfile (long storage) FIVEWORDINLINE(0x2F3C, 0x0000, 0x000C, 0x7000, 0xA82A);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API( ComponentResult , PickerGetProfileProcPtr )(long storage);
+#if CALL_NOT_IN_CARBON
+EXTERN_API( ComponentResult )
+PickerSetProfile (long storage,
+ CMProfileHandle profile) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000D, 0x7000, 0xA82A);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API( ComponentResult , PickerSetProfileProcPtr )(long storage, CMProfileHandle profile);
+#if CALL_NOT_IN_CARBON
+EXTERN_API( ComponentResult )
+PickerGetPrompt (long storage,
+ Str255 prompt) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000E, 0x7000, 0xA82A);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API( ComponentResult , PickerGetPromptProcPtr )(long storage, Str255 prompt);
+#if CALL_NOT_IN_CARBON
+EXTERN_API( ComponentResult )
+PickerSetPrompt (long storage,
+ ConstStr255Param prompt) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000F, 0x7000, 0xA82A);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API( ComponentResult , PickerSetPromptProcPtr )(long storage, ConstStr255Param prompt);
+#if CALL_NOT_IN_CARBON
+EXTERN_API( ComponentResult )
+PickerGetIconData (long storage,
+ PickerIconData * data) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0010, 0x7000, 0xA82A);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API( ComponentResult , PickerGetIconDataProcPtr )(long storage, PickerIconData *data);
+#if CALL_NOT_IN_CARBON
+EXTERN_API( ComponentResult )
+PickerGetEditMenuState (long storage,
+ PickerMenuState * mState) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0011, 0x7000, 0xA82A);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API( ComponentResult , PickerGetEditMenuStateProcPtr )(long storage, PickerMenuState *mState);
+#if CALL_NOT_IN_CARBON
+EXTERN_API( ComponentResult )
+PickerSetOrigin (long storage,
+ Point where) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0012, 0x7000, 0xA82A);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API( ComponentResult , PickerSetOriginProcPtr )(long storage, Point where);
+/* Below are the ColorPicker 2.1 routines.*/
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( ComponentResult )
+PickerSetColorChangedProc (long storage,
+ ColorChangedUPP colorProc,
+ long colorProcData) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0014, 0x7000, 0xA82A);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API( ComponentResult , PickerSetColorChangedProcProcPtr )(long storage, NColorChangedUPP colorProc, long colorProcData);
+/* New Color Picker 2.1 messages. If you don't wish to support these you should already be... */
+/* returning a badComponentSelector in your main entry routine. They have new selectors*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( ComponentResult )
+NPickerGetColor (long storage,
+ PickerColorType whichColor,
+ NPMColor * color) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0015, 0x7000, 0xA82A);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API( ComponentResult , NPickerGetColorProcPtr )(long storage, PickerColorType whichColor, NPMColor *color);
+#if CALL_NOT_IN_CARBON
+EXTERN_API( ComponentResult )
+NPickerSetColor (long storage,
+ PickerColorType whichColor,
+ NPMColor * color) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0016, 0x7000, 0xA82A);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API( ComponentResult , NPickerSetColorProcPtr )(long storage, PickerColorType whichColor, NPMColor *color);
+#if CALL_NOT_IN_CARBON
+EXTERN_API( ComponentResult )
+NPickerGetProfile (long storage,
+ CMProfileRef * profile) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0017, 0x7000, 0xA82A);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API( ComponentResult , NPickerGetProfileProcPtr )(long storage, CMProfileRef *profile);
+#if CALL_NOT_IN_CARBON
+EXTERN_API( ComponentResult )
+NPickerSetProfile (long storage,
+ CMProfileRef profile) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0018, 0x7000, 0xA82A);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API( ComponentResult , NPickerSetProfileProcPtr )(long storage, CMProfileRef profile);
+#if CALL_NOT_IN_CARBON
+EXTERN_API( ComponentResult )
+NPickerSetColorChangedProc (long storage,
+ NColorChangedUPP colorProc,
+ long colorProcData) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0019, 0x7000, 0xA82A);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API( ComponentResult , NPickerSetColorChangedProcProcPtr )(long storage, NColorChangedUPP colorProc, long colorProcData);
+#if CALL_NOT_IN_CARBON
+EXTERN_API( ComponentResult )
+PickerExtractHelpItem (long storage,
+ short itemNo,
+ short whichMsg,
+ PickerHelpItemInfo * helpInfo) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0013, 0x7000, 0xA82A);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API( ComponentResult , PickerExtractHelpItemProcPtr )(long storage, short itemNo, short whichMsg, PickerHelpItemInfo *helpInfo);
+typedef STACK_UPP_TYPE(PickerSetColorProcPtr) PickerSetColorUPP;
+typedef STACK_UPP_TYPE(PickerEventProcPtr) PickerEventUPP;
+typedef STACK_UPP_TYPE(PickerEditProcPtr) PickerEditUPP;
+typedef STACK_UPP_TYPE(PickerSetVisibilityProcPtr) PickerSetVisibilityUPP;
+typedef STACK_UPP_TYPE(PickerDisplayProcPtr) PickerDisplayUPP;
+typedef STACK_UPP_TYPE(PickerItemHitProcPtr) PickerItemHitUPP;
+typedef STACK_UPP_TYPE(PickerSetBaseItemProcPtr) PickerSetBaseItemUPP;
+typedef STACK_UPP_TYPE(PickerGetProfileProcPtr) PickerGetProfileUPP;
+typedef STACK_UPP_TYPE(PickerSetProfileProcPtr) PickerSetProfileUPP;
+typedef STACK_UPP_TYPE(PickerGetPromptProcPtr) PickerGetPromptUPP;
+typedef STACK_UPP_TYPE(PickerSetPromptProcPtr) PickerSetPromptUPP;
+typedef STACK_UPP_TYPE(PickerGetIconDataProcPtr) PickerGetIconDataUPP;
+typedef STACK_UPP_TYPE(PickerGetEditMenuStateProcPtr) PickerGetEditMenuStateUPP;
+typedef STACK_UPP_TYPE(PickerSetOriginProcPtr) PickerSetOriginUPP;
+typedef STACK_UPP_TYPE(PickerSetColorChangedProcProcPtr) PickerSetColorChangedProcUPP;
+typedef STACK_UPP_TYPE(NPickerGetColorProcPtr) NPickerGetColorUPP;
+typedef STACK_UPP_TYPE(NPickerSetColorProcPtr) NPickerSetColorUPP;
+typedef STACK_UPP_TYPE(NPickerGetProfileProcPtr) NPickerGetProfileUPP;
+typedef STACK_UPP_TYPE(NPickerSetProfileProcPtr) NPickerSetProfileUPP;
+typedef STACK_UPP_TYPE(NPickerSetColorChangedProcProcPtr) NPickerSetColorChangedProcUPP;
+typedef STACK_UPP_TYPE(PickerExtractHelpItemProcPtr) PickerExtractHelpItemUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(PickerSetColorUPP)
+ NewPickerSetColorUPP (PickerSetColorProcPtr userRoutine);
+
+ EXTERN_API(PickerEventUPP)
+ NewPickerEventUPP (PickerEventProcPtr userRoutine);
+
+ EXTERN_API(PickerEditUPP)
+ NewPickerEditUPP (PickerEditProcPtr userRoutine);
+
+ EXTERN_API(PickerSetVisibilityUPP)
+ NewPickerSetVisibilityUPP (PickerSetVisibilityProcPtr userRoutine);
+
+ EXTERN_API(PickerDisplayUPP)
+ NewPickerDisplayUPP (PickerDisplayProcPtr userRoutine);
+
+ EXTERN_API(PickerItemHitUPP)
+ NewPickerItemHitUPP (PickerItemHitProcPtr userRoutine);
+
+ EXTERN_API(PickerSetBaseItemUPP)
+ NewPickerSetBaseItemUPP (PickerSetBaseItemProcPtr userRoutine);
+
+ EXTERN_API(PickerGetProfileUPP)
+ NewPickerGetProfileUPP (PickerGetProfileProcPtr userRoutine);
+
+ EXTERN_API(PickerSetProfileUPP)
+ NewPickerSetProfileUPP (PickerSetProfileProcPtr userRoutine);
+
+ EXTERN_API(PickerGetPromptUPP)
+ NewPickerGetPromptUPP (PickerGetPromptProcPtr userRoutine);
+
+ EXTERN_API(PickerSetPromptUPP)
+ NewPickerSetPromptUPP (PickerSetPromptProcPtr userRoutine);
+
+ EXTERN_API(PickerGetIconDataUPP)
+ NewPickerGetIconDataUPP (PickerGetIconDataProcPtr userRoutine);
+
+ EXTERN_API(PickerGetEditMenuStateUPP)
+ NewPickerGetEditMenuStateUPP (PickerGetEditMenuStateProcPtr userRoutine);
+
+ EXTERN_API(PickerSetOriginUPP)
+ NewPickerSetOriginUPP (PickerSetOriginProcPtr userRoutine);
+
+ EXTERN_API(PickerSetColorChangedProcUPP)
+ NewPickerSetColorChangedProcUPP (PickerSetColorChangedProcProcPtr userRoutine);
+
+ EXTERN_API(NPickerGetColorUPP)
+ NewNPickerGetColorUPP (NPickerGetColorProcPtr userRoutine);
+
+ EXTERN_API(NPickerSetColorUPP)
+ NewNPickerSetColorUPP (NPickerSetColorProcPtr userRoutine);
+
+ EXTERN_API(NPickerGetProfileUPP)
+ NewNPickerGetProfileUPP (NPickerGetProfileProcPtr userRoutine);
+
+ EXTERN_API(NPickerSetProfileUPP)
+ NewNPickerSetProfileUPP (NPickerSetProfileProcPtr userRoutine);
+
+ EXTERN_API(NPickerSetColorChangedProcUPP)
+ NewNPickerSetColorChangedProcUPP (NPickerSetColorChangedProcProcPtr userRoutine);
+
+ EXTERN_API(PickerExtractHelpItemUPP)
+ NewPickerExtractHelpItemUPP (PickerExtractHelpItemProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposePickerSetColorUPP (PickerSetColorUPP userUPP);
+
+ EXTERN_API(void)
+ DisposePickerEventUPP (PickerEventUPP userUPP);
+
+ EXTERN_API(void)
+ DisposePickerEditUPP (PickerEditUPP userUPP);
+
+ EXTERN_API(void)
+ DisposePickerSetVisibilityUPP (PickerSetVisibilityUPP userUPP);
+
+ EXTERN_API(void)
+ DisposePickerDisplayUPP (PickerDisplayUPP userUPP);
+
+ EXTERN_API(void)
+ DisposePickerItemHitUPP (PickerItemHitUPP userUPP);
+
+ EXTERN_API(void)
+ DisposePickerSetBaseItemUPP (PickerSetBaseItemUPP userUPP);
+
+ EXTERN_API(void)
+ DisposePickerGetProfileUPP (PickerGetProfileUPP userUPP);
+
+ EXTERN_API(void)
+ DisposePickerSetProfileUPP (PickerSetProfileUPP userUPP);
+
+ EXTERN_API(void)
+ DisposePickerGetPromptUPP (PickerGetPromptUPP userUPP);
+
+ EXTERN_API(void)
+ DisposePickerSetPromptUPP (PickerSetPromptUPP userUPP);
+
+ EXTERN_API(void)
+ DisposePickerGetIconDataUPP (PickerGetIconDataUPP userUPP);
+
+ EXTERN_API(void)
+ DisposePickerGetEditMenuStateUPP (PickerGetEditMenuStateUPP userUPP);
+
+ EXTERN_API(void)
+ DisposePickerSetOriginUPP (PickerSetOriginUPP userUPP);
+
+ EXTERN_API(void)
+ DisposePickerSetColorChangedProcUPP (PickerSetColorChangedProcUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeNPickerGetColorUPP (NPickerGetColorUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeNPickerSetColorUPP (NPickerSetColorUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeNPickerGetProfileUPP (NPickerGetProfileUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeNPickerSetProfileUPP (NPickerSetProfileUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeNPickerSetColorChangedProcUPP (NPickerSetColorChangedProcUPP userUPP);
+
+ EXTERN_API(void)
+ DisposePickerExtractHelpItemUPP (PickerExtractHelpItemUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokePickerSetColorUPP (long storage,
+ PickerColorType whichColor,
+ PMColorPtr color,
+ PickerSetColorUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokePickerEventUPP (long storage,
+ PickerEventData * data,
+ PickerEventUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokePickerEditUPP (long storage,
+ PickerEditData * data,
+ PickerEditUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokePickerSetVisibilityUPP (long storage,
+ Boolean visible,
+ PickerSetVisibilityUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokePickerDisplayUPP (long storage,
+ PickerDisplayUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokePickerItemHitUPP (long storage,
+ PickerItemHitData * data,
+ PickerItemHitUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokePickerSetBaseItemUPP (long storage,
+ short baseItem,
+ PickerSetBaseItemUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokePickerGetProfileUPP (long storage,
+ PickerGetProfileUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokePickerSetProfileUPP (long storage,
+ CMProfileHandle profile,
+ PickerSetProfileUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokePickerGetPromptUPP (long storage,
+ Str255 prompt,
+ PickerGetPromptUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokePickerSetPromptUPP (long storage,
+ ConstStr255Param prompt,
+ PickerSetPromptUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokePickerGetIconDataUPP (long storage,
+ PickerIconData * data,
+ PickerGetIconDataUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokePickerGetEditMenuStateUPP (long storage,
+ PickerMenuState * mState,
+ PickerGetEditMenuStateUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokePickerSetOriginUPP (long storage,
+ Point where,
+ PickerSetOriginUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokePickerSetColorChangedProcUPP (long storage,
+ NColorChangedUPP colorProc,
+ long colorProcData,
+ PickerSetColorChangedProcUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokeNPickerGetColorUPP (long storage,
+ PickerColorType whichColor,
+ NPMColor * color,
+ NPickerGetColorUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokeNPickerSetColorUPP (long storage,
+ PickerColorType whichColor,
+ NPMColor * color,
+ NPickerSetColorUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokeNPickerGetProfileUPP (long storage,
+ CMProfileRef * profile,
+ NPickerGetProfileUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokeNPickerSetProfileUPP (long storage,
+ CMProfileRef profile,
+ NPickerSetProfileUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokeNPickerSetColorChangedProcUPP (long storage,
+ NColorChangedUPP colorProc,
+ long colorProcData,
+ NPickerSetColorChangedProcUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokePickerExtractHelpItemUPP (long storage,
+ short itemNo,
+ short whichMsg,
+ PickerHelpItemInfo * helpInfo,
+ PickerExtractHelpItemUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppPickerSetColorProcInfo = 0x00000EF0 }; /* pascal 4_bytes Func(4_bytes, 2_bytes, 4_bytes) */
+ enum { uppPickerEventProcInfo = 0x000003F0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes) */
+ enum { uppPickerEditProcInfo = 0x000003F0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes) */
+ enum { uppPickerSetVisibilityProcInfo = 0x000001F0 }; /* pascal 4_bytes Func(4_bytes, 1_byte) */
+ enum { uppPickerDisplayProcInfo = 0x000000F0 }; /* pascal 4_bytes Func(4_bytes) */
+ enum { uppPickerItemHitProcInfo = 0x000003F0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes) */
+ enum { uppPickerSetBaseItemProcInfo = 0x000002F0 }; /* pascal 4_bytes Func(4_bytes, 2_bytes) */
+ enum { uppPickerGetProfileProcInfo = 0x000000F0 }; /* pascal 4_bytes Func(4_bytes) */
+ enum { uppPickerSetProfileProcInfo = 0x000003F0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes) */
+ enum { uppPickerGetPromptProcInfo = 0x000003F0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes) */
+ enum { uppPickerSetPromptProcInfo = 0x000003F0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes) */
+ enum { uppPickerGetIconDataProcInfo = 0x000003F0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes) */
+ enum { uppPickerGetEditMenuStateProcInfo = 0x000003F0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes) */
+ enum { uppPickerSetOriginProcInfo = 0x000003F0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes) */
+ enum { uppPickerSetColorChangedProcProcInfo = 0x00000FF0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppNPickerGetColorProcInfo = 0x00000EF0 }; /* pascal 4_bytes Func(4_bytes, 2_bytes, 4_bytes) */
+ enum { uppNPickerSetColorProcInfo = 0x00000EF0 }; /* pascal 4_bytes Func(4_bytes, 2_bytes, 4_bytes) */
+ enum { uppNPickerGetProfileProcInfo = 0x000003F0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes) */
+ enum { uppNPickerSetProfileProcInfo = 0x000003F0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes) */
+ enum { uppNPickerSetColorChangedProcProcInfo = 0x00000FF0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppPickerExtractHelpItemProcInfo = 0x00003AF0 }; /* pascal 4_bytes Func(4_bytes, 2_bytes, 2_bytes, 4_bytes) */
+ #define NewPickerSetColorUPP(userRoutine) (PickerSetColorUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPickerSetColorProcInfo, GetCurrentArchitecture())
+ #define NewPickerEventUPP(userRoutine) (PickerEventUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPickerEventProcInfo, GetCurrentArchitecture())
+ #define NewPickerEditUPP(userRoutine) (PickerEditUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPickerEditProcInfo, GetCurrentArchitecture())
+ #define NewPickerSetVisibilityUPP(userRoutine) (PickerSetVisibilityUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPickerSetVisibilityProcInfo, GetCurrentArchitecture())
+ #define NewPickerDisplayUPP(userRoutine) (PickerDisplayUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPickerDisplayProcInfo, GetCurrentArchitecture())
+ #define NewPickerItemHitUPP(userRoutine) (PickerItemHitUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPickerItemHitProcInfo, GetCurrentArchitecture())
+ #define NewPickerSetBaseItemUPP(userRoutine) (PickerSetBaseItemUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPickerSetBaseItemProcInfo, GetCurrentArchitecture())
+ #define NewPickerGetProfileUPP(userRoutine) (PickerGetProfileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPickerGetProfileProcInfo, GetCurrentArchitecture())
+ #define NewPickerSetProfileUPP(userRoutine) (PickerSetProfileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPickerSetProfileProcInfo, GetCurrentArchitecture())
+ #define NewPickerGetPromptUPP(userRoutine) (PickerGetPromptUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPickerGetPromptProcInfo, GetCurrentArchitecture())
+ #define NewPickerSetPromptUPP(userRoutine) (PickerSetPromptUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPickerSetPromptProcInfo, GetCurrentArchitecture())
+ #define NewPickerGetIconDataUPP(userRoutine) (PickerGetIconDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPickerGetIconDataProcInfo, GetCurrentArchitecture())
+ #define NewPickerGetEditMenuStateUPP(userRoutine) (PickerGetEditMenuStateUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPickerGetEditMenuStateProcInfo, GetCurrentArchitecture())
+ #define NewPickerSetOriginUPP(userRoutine) (PickerSetOriginUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPickerSetOriginProcInfo, GetCurrentArchitecture())
+ #define NewPickerSetColorChangedProcUPP(userRoutine) (PickerSetColorChangedProcUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPickerSetColorChangedProcProcInfo, GetCurrentArchitecture())
+ #define NewNPickerGetColorUPP(userRoutine) (NPickerGetColorUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNPickerGetColorProcInfo, GetCurrentArchitecture())
+ #define NewNPickerSetColorUPP(userRoutine) (NPickerSetColorUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNPickerSetColorProcInfo, GetCurrentArchitecture())
+ #define NewNPickerGetProfileUPP(userRoutine) (NPickerGetProfileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNPickerGetProfileProcInfo, GetCurrentArchitecture())
+ #define NewNPickerSetProfileUPP(userRoutine) (NPickerSetProfileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNPickerSetProfileProcInfo, GetCurrentArchitecture())
+ #define NewNPickerSetColorChangedProcUPP(userRoutine) (NPickerSetColorChangedProcUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNPickerSetColorChangedProcProcInfo, GetCurrentArchitecture())
+ #define NewPickerExtractHelpItemUPP(userRoutine) (PickerExtractHelpItemUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPickerExtractHelpItemProcInfo, GetCurrentArchitecture())
+ #define DisposePickerSetColorUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposePickerEventUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposePickerEditUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposePickerSetVisibilityUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposePickerDisplayUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposePickerItemHitUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposePickerSetBaseItemUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposePickerGetProfileUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposePickerSetProfileUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposePickerGetPromptUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposePickerSetPromptUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposePickerGetIconDataUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposePickerGetEditMenuStateUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposePickerSetOriginUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposePickerSetColorChangedProcUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeNPickerGetColorUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeNPickerSetColorUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeNPickerGetProfileUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeNPickerSetProfileUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeNPickerSetColorChangedProcUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposePickerExtractHelpItemUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokePickerSetColorUPP(storage, whichColor, color, userUPP) (ComponentResult)CALL_THREE_PARAMETER_UPP((userUPP), uppPickerSetColorProcInfo, (storage), (whichColor), (color))
+ #define InvokePickerEventUPP(storage, data, userUPP) (ComponentResult)CALL_TWO_PARAMETER_UPP((userUPP), uppPickerEventProcInfo, (storage), (data))
+ #define InvokePickerEditUPP(storage, data, userUPP) (ComponentResult)CALL_TWO_PARAMETER_UPP((userUPP), uppPickerEditProcInfo, (storage), (data))
+ #define InvokePickerSetVisibilityUPP(storage, visible, userUPP) (ComponentResult)CALL_TWO_PARAMETER_UPP((userUPP), uppPickerSetVisibilityProcInfo, (storage), (visible))
+ #define InvokePickerDisplayUPP(storage, userUPP) (ComponentResult)CALL_ONE_PARAMETER_UPP((userUPP), uppPickerDisplayProcInfo, (storage))
+ #define InvokePickerItemHitUPP(storage, data, userUPP) (ComponentResult)CALL_TWO_PARAMETER_UPP((userUPP), uppPickerItemHitProcInfo, (storage), (data))
+ #define InvokePickerSetBaseItemUPP(storage, baseItem, userUPP) (ComponentResult)CALL_TWO_PARAMETER_UPP((userUPP), uppPickerSetBaseItemProcInfo, (storage), (baseItem))
+ #define InvokePickerGetProfileUPP(storage, userUPP) (ComponentResult)CALL_ONE_PARAMETER_UPP((userUPP), uppPickerGetProfileProcInfo, (storage))
+ #define InvokePickerSetProfileUPP(storage, profile, userUPP) (ComponentResult)CALL_TWO_PARAMETER_UPP((userUPP), uppPickerSetProfileProcInfo, (storage), (profile))
+ #define InvokePickerGetPromptUPP(storage, prompt, userUPP) (ComponentResult)CALL_TWO_PARAMETER_UPP((userUPP), uppPickerGetPromptProcInfo, (storage), (prompt))
+ #define InvokePickerSetPromptUPP(storage, prompt, userUPP) (ComponentResult)CALL_TWO_PARAMETER_UPP((userUPP), uppPickerSetPromptProcInfo, (storage), (prompt))
+ #define InvokePickerGetIconDataUPP(storage, data, userUPP) (ComponentResult)CALL_TWO_PARAMETER_UPP((userUPP), uppPickerGetIconDataProcInfo, (storage), (data))
+ #define InvokePickerGetEditMenuStateUPP(storage, mState, userUPP) (ComponentResult)CALL_TWO_PARAMETER_UPP((userUPP), uppPickerGetEditMenuStateProcInfo, (storage), (mState))
+ #define InvokePickerSetOriginUPP(storage, where, userUPP) (ComponentResult)CALL_TWO_PARAMETER_UPP((userUPP), uppPickerSetOriginProcInfo, (storage), (where))
+ #define InvokePickerSetColorChangedProcUPP(storage, colorProc, colorProcData, userUPP) (ComponentResult)CALL_THREE_PARAMETER_UPP((userUPP), uppPickerSetColorChangedProcProcInfo, (storage), (colorProc), (colorProcData))
+ #define InvokeNPickerGetColorUPP(storage, whichColor, color, userUPP) (ComponentResult)CALL_THREE_PARAMETER_UPP((userUPP), uppNPickerGetColorProcInfo, (storage), (whichColor), (color))
+ #define InvokeNPickerSetColorUPP(storage, whichColor, color, userUPP) (ComponentResult)CALL_THREE_PARAMETER_UPP((userUPP), uppNPickerSetColorProcInfo, (storage), (whichColor), (color))
+ #define InvokeNPickerGetProfileUPP(storage, profile, userUPP) (ComponentResult)CALL_TWO_PARAMETER_UPP((userUPP), uppNPickerGetProfileProcInfo, (storage), (profile))
+ #define InvokeNPickerSetProfileUPP(storage, profile, userUPP) (ComponentResult)CALL_TWO_PARAMETER_UPP((userUPP), uppNPickerSetProfileProcInfo, (storage), (profile))
+ #define InvokeNPickerSetColorChangedProcUPP(storage, colorProc, colorProcData, userUPP) (ComponentResult)CALL_THREE_PARAMETER_UPP((userUPP), uppNPickerSetColorChangedProcProcInfo, (storage), (colorProc), (colorProcData))
+ #define InvokePickerExtractHelpItemUPP(storage, itemNo, whichMsg, helpInfo, userUPP) (ComponentResult)CALL_FOUR_PARAMETER_UPP((userUPP), uppPickerExtractHelpItemProcInfo, (storage), (itemNo), (whichMsg), (helpInfo))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewPickerSetColorProc(userRoutine) NewPickerSetColorUPP(userRoutine)
+#define NewPickerEventProc(userRoutine) NewPickerEventUPP(userRoutine)
+#define NewPickerEditProc(userRoutine) NewPickerEditUPP(userRoutine)
+#define NewPickerSetVisibilityProc(userRoutine) NewPickerSetVisibilityUPP(userRoutine)
+#define NewPickerDisplayProc(userRoutine) NewPickerDisplayUPP(userRoutine)
+#define NewPickerItemHitProc(userRoutine) NewPickerItemHitUPP(userRoutine)
+#define NewPickerSetBaseItemProc(userRoutine) NewPickerSetBaseItemUPP(userRoutine)
+#define NewPickerGetProfileProc(userRoutine) NewPickerGetProfileUPP(userRoutine)
+#define NewPickerSetProfileProc(userRoutine) NewPickerSetProfileUPP(userRoutine)
+#define NewPickerGetPromptProc(userRoutine) NewPickerGetPromptUPP(userRoutine)
+#define NewPickerSetPromptProc(userRoutine) NewPickerSetPromptUPP(userRoutine)
+#define NewPickerGetIconDataProc(userRoutine) NewPickerGetIconDataUPP(userRoutine)
+#define NewPickerGetEditMenuStateProc(userRoutine) NewPickerGetEditMenuStateUPP(userRoutine)
+#define NewPickerSetOriginProc(userRoutine) NewPickerSetOriginUPP(userRoutine)
+#define NewPickerSetColorChangedProcProc(userRoutine) NewPickerSetColorChangedProcUPP(userRoutine)
+#define NewNPickerGetColorProc(userRoutine) NewNPickerGetColorUPP(userRoutine)
+#define NewNPickerSetColorProc(userRoutine) NewNPickerSetColorUPP(userRoutine)
+#define NewNPickerGetProfileProc(userRoutine) NewNPickerGetProfileUPP(userRoutine)
+#define NewNPickerSetProfileProc(userRoutine) NewNPickerSetProfileUPP(userRoutine)
+#define NewNPickerSetColorChangedProcProc(userRoutine) NewNPickerSetColorChangedProcUPP(userRoutine)
+#define NewPickerExtractHelpItemProc(userRoutine) NewPickerExtractHelpItemUPP(userRoutine)
+#define CallPickerSetColorProc(userRoutine, storage, whichColor, color) InvokePickerSetColorUPP(storage, whichColor, color, userRoutine)
+#define CallPickerEventProc(userRoutine, storage, data) InvokePickerEventUPP(storage, data, userRoutine)
+#define CallPickerEditProc(userRoutine, storage, data) InvokePickerEditUPP(storage, data, userRoutine)
+#define CallPickerSetVisibilityProc(userRoutine, storage, visible) InvokePickerSetVisibilityUPP(storage, visible, userRoutine)
+#define CallPickerDisplayProc(userRoutine, storage) InvokePickerDisplayUPP(storage, userRoutine)
+#define CallPickerItemHitProc(userRoutine, storage, data) InvokePickerItemHitUPP(storage, data, userRoutine)
+#define CallPickerSetBaseItemProc(userRoutine, storage, baseItem) InvokePickerSetBaseItemUPP(storage, baseItem, userRoutine)
+#define CallPickerGetProfileProc(userRoutine, storage) InvokePickerGetProfileUPP(storage, userRoutine)
+#define CallPickerSetProfileProc(userRoutine, storage, profile) InvokePickerSetProfileUPP(storage, profile, userRoutine)
+#define CallPickerGetPromptProc(userRoutine, storage, prompt) InvokePickerGetPromptUPP(storage, prompt, userRoutine)
+#define CallPickerSetPromptProc(userRoutine, storage, prompt) InvokePickerSetPromptUPP(storage, prompt, userRoutine)
+#define CallPickerGetIconDataProc(userRoutine, storage, data) InvokePickerGetIconDataUPP(storage, data, userRoutine)
+#define CallPickerGetEditMenuStateProc(userRoutine, storage, mState) InvokePickerGetEditMenuStateUPP(storage, mState, userRoutine)
+#define CallPickerSetOriginProc(userRoutine, storage, where) InvokePickerSetOriginUPP(storage, where, userRoutine)
+#define CallPickerSetColorChangedProcProc(userRoutine, storage, colorProc, colorProcData) InvokePickerSetColorChangedProcUPP(storage, colorProc, colorProcData, userRoutine)
+#define CallNPickerGetColorProc(userRoutine, storage, whichColor, color) InvokeNPickerGetColorUPP(storage, whichColor, color, userRoutine)
+#define CallNPickerSetColorProc(userRoutine, storage, whichColor, color) InvokeNPickerSetColorUPP(storage, whichColor, color, userRoutine)
+#define CallNPickerGetProfileProc(userRoutine, storage, profile) InvokeNPickerGetProfileUPP(storage, profile, userRoutine)
+#define CallNPickerSetProfileProc(userRoutine, storage, profile) InvokeNPickerSetProfileUPP(storage, profile, userRoutine)
+#define CallNPickerSetColorChangedProcProc(userRoutine, storage, colorProc, colorProcData) InvokeNPickerSetColorChangedProcUPP(storage, colorProc, colorProcData, userRoutine)
+#define CallPickerExtractHelpItemProc(userRoutine, storage, itemNo, whichMsg, helpInfo) InvokePickerExtractHelpItemUPP(storage, itemNo, whichMsg, helpInfo, userRoutine)
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __COLORPICKERCOMPONENTS__ */
+
diff --git a/include/qt/CommResources.h b/include/qt/CommResources.h
new file mode 100644
index 000000000..b22d1e76e
--- /dev/null
+++ b/include/qt/CommResources.h
@@ -0,0 +1,208 @@
+/*
+ File: CommResources.h
+
+ Contains: Communications Toolbox Resource Manager Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1988-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __COMMRESOURCES__
+#define __COMMRESOURCES__
+
+#ifndef __OSUTILS__
+#include "OSUtils.h"
+#endif
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if CALL_NOT_IN_CARBON
+enum {
+ /* tool classes (also the tool file types) */
+ classCM = FOUR_CHAR_CODE('cbnd'),
+ classFT = FOUR_CHAR_CODE('fbnd'),
+ classTM = FOUR_CHAR_CODE('tbnd')
+};
+
+enum {
+ /* version of the Comm Resource Manager */
+ curCRMVersion = 2, /* constants general to the use of the Communications Resource Manager */
+ crmType = 9, /* queue type */
+ crmRecVersion = 1, /* version of queue structure */
+ /* error codes */
+ crmGenericError = -1,
+ crmNoErr = 0
+};
+
+/* data structures general to the use of the Communications Resource Manager */
+typedef OSErr CRMErr;
+
+struct CRMRec {
+ QElemPtr qLink; /*reserved*/
+ short qType; /*queue type -- ORD(crmType) = 9*/
+ short crmVersion; /*version of queue element data structure*/
+ long crmPrivate; /*reserved*/
+ short crmReserved; /*reserved*/
+ long crmDeviceType; /*type of device, assigned by DTS*/
+ long crmDeviceID; /*device ID; assigned when CRMInstall is called*/
+ long crmAttributes; /*pointer to attribute block*/
+ long crmStatus; /*status variable - device specific*/
+ long crmRefCon; /*for device private use*/
+};
+typedef struct CRMRec CRMRec;
+typedef CRMRec * CRMRecPtr;
+#if CALL_NOT_IN_CARBON
+EXTERN_API( CRMErr )
+InitCRM (void);
+
+EXTERN_API( QHdrPtr )
+CRMGetHeader (void);
+
+EXTERN_API( void )
+CRMInstall (CRMRecPtr crmReqPtr);
+
+EXTERN_API( OSErr )
+CRMRemove (CRMRecPtr crmReqPtr);
+
+EXTERN_API( CRMRecPtr )
+CRMSearch (CRMRecPtr crmReqPtr);
+
+EXTERN_API( short )
+CRMGetCRMVersion (void);
+
+EXTERN_API( Handle )
+CRMGetResource (ResType theType,
+ short theID);
+
+EXTERN_API( Handle )
+CRMGet1Resource (ResType theType,
+ short theID);
+
+EXTERN_API( Handle )
+CRMGetIndResource (ResType theType,
+ short index);
+
+EXTERN_API( Handle )
+CRMGet1IndResource (ResType theType,
+ short index);
+
+EXTERN_API( Handle )
+CRMGetNamedResource (ResType theType,
+ ConstStr255Param name);
+
+EXTERN_API( Handle )
+CRMGet1NamedResource (ResType theType,
+ ConstStr255Param name);
+
+EXTERN_API( void )
+CRMReleaseResource (Handle theHandle);
+
+EXTERN_API( Handle )
+CRMGetToolResource (short procID,
+ ResType theType,
+ short theID);
+
+EXTERN_API( Handle )
+CRMGetToolNamedResource (short procID,
+ ResType theType,
+ ConstStr255Param name);
+
+EXTERN_API( void )
+CRMReleaseToolResource (short procID,
+ Handle theHandle);
+
+EXTERN_API( long )
+CRMGetIndex (Handle theHandle);
+
+EXTERN_API( short )
+CRMLocalToRealID (ResType bundleType,
+ short toolID,
+ ResType theType,
+ short localID);
+
+EXTERN_API( short )
+CRMRealToLocalID (ResType bundleType,
+ short toolID,
+ ResType theType,
+ short realID);
+
+EXTERN_API( OSErr )
+CRMGetIndToolName (OSType bundleType,
+ short index,
+ Str255 toolName);
+
+EXTERN_API( OSErr )
+CRMFindCommunications (short * vRefNum,
+ long * dirID);
+
+EXTERN_API( Boolean )
+CRMIsDriverOpen (ConstStr255Param driverName);
+
+EXTERN_API( CRMErr )
+CRMParseCAPSResource (Handle theHandle,
+ ResType selector,
+ unsigned long * value);
+
+EXTERN_API( OSErr )
+CRMReserveRF (short refNum);
+
+EXTERN_API( OSErr )
+CRMReleaseRF (short refNum);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __COMMRESOURCES__ */
+
diff --git a/include/qt/Components.h b/include/qt/Components.h
new file mode 100644
index 000000000..27df56692
--- /dev/null
+++ b/include/qt/Components.h
@@ -0,0 +1,687 @@
+/*
+ File: Components.h
+
+ Contains: QuickTime Interfaces.
+
+ Version: Technology: QuickTime 6.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1990-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __COMPONENTS__
+#define __COMPONENTS__
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ kAppleManufacturer = FOUR_CHAR_CODE('appl'), /* Apple supplied components */
+ kComponentResourceType = FOUR_CHAR_CODE('thng'), /* a components resource type */
+ kComponentAliasResourceType = FOUR_CHAR_CODE('thga') /* component alias resource type */
+};
+
+enum {
+ kAnyComponentType = 0,
+ kAnyComponentSubType = 0,
+ kAnyComponentManufacturer = 0,
+ kAnyComponentFlagsMask = 0
+};
+
+enum {
+ cmpIsMissing = 1L << 29,
+ cmpWantsRegisterMessage = 1L << 31
+};
+
+enum {
+ kComponentOpenSelect = -1, /* ComponentInstance for this open */
+ kComponentCloseSelect = -2, /* ComponentInstance for this close */
+ kComponentCanDoSelect = -3, /* selector # being queried */
+ kComponentVersionSelect = -4, /* no params */
+ kComponentRegisterSelect = -5, /* no params */
+ kComponentTargetSelect = -6, /* ComponentInstance for top of call chain */
+ kComponentUnregisterSelect = -7, /* no params */
+ kComponentGetMPWorkFunctionSelect = -8, /* some params */
+ kComponentExecuteWiredActionSelect = -9, /* QTAtomContainer actionContainer, QTAtom actionAtom, QTCustomActionTargetPtr target, QTEventRecordPtr event */
+ kComponentGetPublicResourceSelect = -10 /* OSType resourceType, short resourceId, Handle *resource */
+};
+
+/* Component Resource Extension flags */
+enum {
+ componentDoAutoVersion = (1 << 0),
+ componentWantsUnregister = (1 << 1),
+ componentAutoVersionIncludeFlags = (1 << 2),
+ componentHasMultiplePlatforms = (1 << 3),
+ componentLoadResident = (1 << 4)
+};
+
+
+
+/* Set Default Component flags */
+enum {
+ defaultComponentIdentical = 0,
+ defaultComponentAnyFlags = 1,
+ defaultComponentAnyManufacturer = 2,
+ defaultComponentAnySubType = 4,
+ defaultComponentAnyFlagsAnyManufacturer = (defaultComponentAnyFlags + defaultComponentAnyManufacturer),
+ defaultComponentAnyFlagsAnyManufacturerAnySubType = (defaultComponentAnyFlags + defaultComponentAnyManufacturer + defaultComponentAnySubType)
+};
+
+/* RegisterComponentResource flags */
+enum {
+ registerComponentGlobal = 1,
+ registerComponentNoDuplicates = 2,
+ registerComponentAfterExisting = 4,
+ registerComponentAliasesOnly = 8
+};
+
+
+
+struct ComponentDescription {
+ OSType componentType; /* A unique 4-byte code indentifying the command set */
+ OSType componentSubType; /* Particular flavor of this instance */
+ OSType componentManufacturer; /* Vendor indentification */
+ unsigned long componentFlags; /* 8 each for Component,Type,SubType,Manuf/revision */
+ unsigned long componentFlagsMask; /* Mask for specifying which flags to consider in search, zero during registration */
+};
+typedef struct ComponentDescription ComponentDescription;
+
+
+struct ResourceSpec {
+ OSType resType; /* 4-byte code */
+ short resID; /* */
+};
+typedef struct ResourceSpec ResourceSpec;
+
+struct ComponentResource {
+ ComponentDescription cd; /* Registration parameters */
+ ResourceSpec component; /* resource where Component code is found */
+ ResourceSpec componentName; /* name string resource */
+ ResourceSpec componentInfo; /* info string resource */
+ ResourceSpec componentIcon; /* icon resource */
+};
+typedef struct ComponentResource ComponentResource;
+typedef ComponentResource * ComponentResourcePtr;
+typedef ComponentResourcePtr * ComponentResourceHandle;
+
+struct ComponentPlatformInfo {
+ long componentFlags; /* flags of Component */
+ ResourceSpec component; /* resource where Component code is found */
+ short platformType; /* gestaltSysArchitecture result */
+};
+typedef struct ComponentPlatformInfo ComponentPlatformInfo;
+
+struct ComponentResourceExtension {
+ long componentVersion; /* version of Component */
+ long componentRegisterFlags; /* flags for registration */
+ short componentIconFamily; /* resource id of Icon Family */
+};
+typedef struct ComponentResourceExtension ComponentResourceExtension;
+
+struct ComponentPlatformInfoArray {
+ long count;
+ ComponentPlatformInfo platformArray[1];
+};
+typedef struct ComponentPlatformInfoArray ComponentPlatformInfoArray;
+
+struct ExtComponentResource {
+ ComponentDescription cd; /* registration parameters */
+ ResourceSpec component; /* resource where Component code is found */
+ ResourceSpec componentName; /* name string resource */
+ ResourceSpec componentInfo; /* info string resource */
+ ResourceSpec componentIcon; /* icon resource */
+ long componentVersion; /* version of Component */
+ long componentRegisterFlags; /* flags for registration */
+ short componentIconFamily; /* resource id of Icon Family */
+ long count; /* elements in platformArray */
+ ComponentPlatformInfo platformArray[1];
+};
+typedef struct ExtComponentResource ExtComponentResource;
+typedef ExtComponentResource * ExtComponentResourcePtr;
+typedef ExtComponentResourcePtr * ExtComponentResourceHandle;
+
+struct ComponentAliasResource {
+ ComponentResource cr; /* Registration parameters */
+ ComponentDescription aliasCD; /* component alias description */
+};
+typedef struct ComponentAliasResource ComponentAliasResource;
+/* Structure received by Component: */
+
+struct ComponentParameters {
+ UInt8 flags; /* call modifiers: sync/async, deferred, immed, etc */
+ UInt8 paramSize; /* size in bytes of actual parameters passed to this call */
+ short what; /* routine selector, negative for Component management calls */
+ long params[1]; /* actual parameters for the indicated routine */
+};
+typedef struct ComponentParameters ComponentParameters;
+
+struct ComponentRecord {
+ long data[1];
+};
+typedef struct ComponentRecord ComponentRecord;
+
+typedef ComponentRecord * Component;
+
+struct ComponentInstanceRecord {
+ long data[1];
+};
+typedef struct ComponentInstanceRecord ComponentInstanceRecord;
+
+typedef ComponentInstanceRecord * ComponentInstance;
+
+struct RegisteredComponentRecord {
+ long data[1];
+};
+typedef struct RegisteredComponentRecord RegisteredComponentRecord;
+typedef RegisteredComponentRecord * RegisteredComponentRecordPtr;
+
+typedef RegisteredComponentRecord * RegisteredComponentPtr;
+
+struct RegisteredComponentInstanceRecord {
+ long data[1];
+};
+typedef struct RegisteredComponentInstanceRecord RegisteredComponentInstanceRecord;
+typedef RegisteredComponentInstanceRecord * RegisteredComponentInstanceRecordPtr;
+
+typedef RegisteredComponentInstanceRecord * RegisteredComponentInstancePtr;
+typedef long ComponentResult;
+enum {
+ platform68k = 1, /* platform type (response from gestaltComponentPlatform) */
+ platformPowerPC = 2, /* (when gestaltComponentPlatform is not implemented, use */
+ platformInterpreted = 3, /* gestaltSysArchitecture) */
+ platformWin32 = 4,
+ platformPowerPCNativeEntryPoint = 5
+};
+
+enum {
+ mpWorkFlagDoWork = (1 << 0),
+ mpWorkFlagDoCompletion = (1 << 1),
+ mpWorkFlagCopyWorkBlock = (1 << 2),
+ mpWorkFlagDontBlock = (1 << 3),
+ mpWorkFlagGetProcessorCount = (1 << 4),
+ mpWorkFlagGetIsRunning = (1 << 6)
+};
+
+enum {
+ cmpAliasNoFlags = 0,
+ cmpAliasOnlyThisFile = 1
+};
+
+
+struct ComponentMPWorkFunctionHeaderRecord {
+ UInt32 headerSize;
+ UInt32 recordSize;
+ UInt32 workFlags;
+ UInt16 processorCount;
+ UInt8 unused;
+ UInt8 isRunning;
+};
+typedef struct ComponentMPWorkFunctionHeaderRecord ComponentMPWorkFunctionHeaderRecord;
+typedef ComponentMPWorkFunctionHeaderRecord * ComponentMPWorkFunctionHeaderRecordPtr;
+typedef CALLBACK_API( ComponentResult , ComponentMPWorkFunctionProcPtr )(void *globalRefCon, ComponentMPWorkFunctionHeaderRecordPtr header);
+typedef CALLBACK_API( ComponentResult , ComponentRoutineProcPtr )(ComponentParameters *cp, Handle componentStorage);
+typedef CALLBACK_API( OSErr , GetMissingComponentResourceProcPtr )(Component c, OSType resType, short resID, void *refCon, Handle *resource);
+typedef STACK_UPP_TYPE(ComponentMPWorkFunctionProcPtr) ComponentMPWorkFunctionUPP;
+typedef STACK_UPP_TYPE(ComponentRoutineProcPtr) ComponentRoutineUPP;
+typedef STACK_UPP_TYPE(GetMissingComponentResourceProcPtr) GetMissingComponentResourceUPP;
+/*
+ The parameter list for each ComponentFunction is unique. It is
+ therefore up to users to create the appropriate procInfo for their
+ own ComponentFunctions where necessary.
+*/
+
+typedef UniversalProcPtr ComponentFunctionUPP;
+/*
+ For Carbon, we add NewComponentFunctionUPP and DisposeComponentFunctionUPP
+ calls that take a procInfo as their second parameter. This allows native
+ Component writers to easily write a Carbon compliant component. Note that
+ there is no InvokeComponentFunctionUPP, use the CallComponentFunction calls
+ with the UPP instead.
+*/
+
+#if OPAQUE_UPP_TYPES
+EXTERN_API( ComponentFunctionUPP )
+NewComponentFunctionUPP (ProcPtr userRoutine,
+ ProcInfoType procInfo);
+
+EXTERN_API( void )
+DisposeComponentFunctionUPP (ComponentFunctionUPP userUPP);
+
+#else
+#define NewComponentFunctionUPP(userRoutine,procInfo) (ComponentFunctionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), (ProcInfoType)procInfo, GetCurrentArchitecture())
+#define DisposeComponentFunctionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+#endif /* OPAQUE_UPP_TYPES */
+
+#if TARGET_RT_MAC_CFM
+/*
+ CallComponentUPP is a global variable exported from InterfaceLib.
+ It is the ProcPtr passed to CallUniversalProc to manually call a component function.
+*/
+extern UniversalProcPtr CallComponentUPP;
+#endif
+
+#define ComponentCallNow( callNumber, paramSize ) \
+ FIVEWORDINLINE( 0x2F3C,paramSize,callNumber,0x7000,0xA82A )
+
+/********************************************************
+* *
+* APPLICATION LEVEL CALLS *
+* *
+********************************************************/
+/********************************************************
+* Component Database Add, Delete, and Query Routines
+********************************************************/
+EXTERN_API( Component )
+RegisterComponent (ComponentDescription * cd,
+ ComponentRoutineUPP componentEntryPoint,
+ short global,
+ Handle componentName,
+ Handle componentInfo,
+ Handle componentIcon) TWOWORDINLINE(0x7001, 0xA82A);
+
+EXTERN_API( Component )
+RegisterComponentResource (ComponentResourceHandle cr,
+ short global) TWOWORDINLINE(0x7012, 0xA82A);
+
+EXTERN_API( OSErr )
+UnregisterComponent (Component aComponent) TWOWORDINLINE(0x7002, 0xA82A);
+
+EXTERN_API( Component )
+FindNextComponent (Component aComponent,
+ ComponentDescription * looking) TWOWORDINLINE(0x7004, 0xA82A);
+
+EXTERN_API( long )
+CountComponents (ComponentDescription * looking) TWOWORDINLINE(0x7003, 0xA82A);
+
+EXTERN_API( OSErr )
+GetComponentInfo (Component aComponent,
+ ComponentDescription * cd,
+ Handle componentName,
+ Handle componentInfo,
+ Handle componentIcon) TWOWORDINLINE(0x7005, 0xA82A);
+
+EXTERN_API( long )
+GetComponentListModSeed (void) TWOWORDINLINE(0x7006, 0xA82A);
+
+EXTERN_API( long )
+GetComponentTypeModSeed (OSType componentType) TWOWORDINLINE(0x702C, 0xA82A);
+
+/********************************************************
+* Component Instance Allocation and dispatch routines
+********************************************************/
+EXTERN_API( OSErr )
+OpenAComponent (Component aComponent,
+ ComponentInstance * ci) TWOWORDINLINE(0x702D, 0xA82A);
+
+EXTERN_API( ComponentInstance )
+OpenComponent (Component aComponent) TWOWORDINLINE(0x7007, 0xA82A);
+
+EXTERN_API( OSErr )
+CloseComponent (ComponentInstance aComponentInstance) TWOWORDINLINE(0x7008, 0xA82A);
+
+EXTERN_API( OSErr )
+GetComponentInstanceError (ComponentInstance aComponentInstance) TWOWORDINLINE(0x700A, 0xA82A);
+
+/********************************************************
+* Component aliases
+********************************************************/
+EXTERN_API( Component )
+ResolveComponentAlias (Component aComponent) TWOWORDINLINE(0x7020, 0xA82A);
+
+/********************************************************
+* Component public resources and public string lists
+********************************************************/
+/* Note: GetComponentPublicResource returns a Handle, not a resource. The caller must dispose it with DisposeHandle. */
+EXTERN_API( OSErr )
+GetComponentPublicResource (Component aComponent,
+ OSType resourceType,
+ short resourceID,
+ Handle * theResource) TWOWORDINLINE(0x7038, 0xA82A);
+
+EXTERN_API( OSErr )
+GetComponentPublicResourceList (OSType resourceType,
+ short resourceID,
+ long flags,
+ ComponentDescription * cd,
+ GetMissingComponentResourceUPP missingProc,
+ void * refCon,
+ void * atomContainerPtr) TWOWORDINLINE(0x7039, 0xA82A);
+
+EXTERN_API( OSErr )
+GetComponentPublicIndString (Component aComponent,
+ Str255 theString,
+ short strListID,
+ short index) TWOWORDINLINE(0x703A, 0xA82A);
+
+/********************************************************
+* *
+* CALLS MADE BY COMPONENTS *
+* *
+********************************************************/
+/********************************************************
+* Component Management routines
+********************************************************/
+EXTERN_API( void )
+SetComponentInstanceError (ComponentInstance aComponentInstance,
+ OSErr theError) TWOWORDINLINE(0x700B, 0xA82A);
+
+EXTERN_API( long )
+GetComponentRefcon (Component aComponent) TWOWORDINLINE(0x7010, 0xA82A);
+
+EXTERN_API( void )
+SetComponentRefcon (Component aComponent,
+ long theRefcon) TWOWORDINLINE(0x7011, 0xA82A);
+
+EXTERN_API( short )
+OpenComponentResFile (Component aComponent) TWOWORDINLINE(0x7015, 0xA82A);
+
+EXTERN_API( OSErr )
+OpenAComponentResFile (Component aComponent,
+ short * resRef) TWOWORDINLINE(0x702F, 0xA82A);
+
+EXTERN_API( OSErr )
+CloseComponentResFile (short refnum) TWOWORDINLINE(0x7018, 0xA82A);
+
+/* Note: GetComponentResource returns a Handle, not a resource. The caller must dispose it with DisposeHandle. */
+EXTERN_API( OSErr )
+GetComponentResource (Component aComponent,
+ OSType resType,
+ short resID,
+ Handle * theResource) TWOWORDINLINE(0x7035, 0xA82A);
+
+EXTERN_API( OSErr )
+GetComponentIndString (Component aComponent,
+ Str255 theString,
+ short strListID,
+ short index) TWOWORDINLINE(0x7036, 0xA82A);
+
+/********************************************************
+* Component Instance Management routines
+********************************************************/
+EXTERN_API( Handle )
+GetComponentInstanceStorage (ComponentInstance aComponentInstance) TWOWORDINLINE(0x700C, 0xA82A);
+
+EXTERN_API( void )
+SetComponentInstanceStorage (ComponentInstance aComponentInstance,
+ Handle theStorage) TWOWORDINLINE(0x700D, 0xA82A);
+
+EXTERN_API( long )
+GetComponentInstanceA5 (ComponentInstance aComponentInstance) TWOWORDINLINE(0x700E, 0xA82A);
+
+EXTERN_API( void )
+SetComponentInstanceA5 (ComponentInstance aComponentInstance,
+ long theA5) TWOWORDINLINE(0x700F, 0xA82A);
+
+EXTERN_API( long )
+CountComponentInstances (Component aComponent) TWOWORDINLINE(0x7013, 0xA82A);
+
+/* useful helper routines for convenient method dispatching */
+EXTERN_API( long )
+CallComponentFunction (ComponentParameters * params,
+ ComponentFunctionUPP func) TWOWORDINLINE(0x70FF, 0xA82A);
+
+EXTERN_API( long )
+CallComponentFunctionWithStorage (Handle storage,
+ ComponentParameters * params,
+ ComponentFunctionUPP func) TWOWORDINLINE(0x70FF, 0xA82A);
+
+#if TARGET_OS_MAC
+EXTERN_API( long )
+CallComponentFunctionWithStorageProcInfo (Handle storage,
+ ComponentParameters * params,
+ ProcPtr func,
+ ProcInfoType funcProcInfo);
+
+#else
+#define CallComponentFunctionWithStorageProcInfo(storage, params, func, funcProcInfo ) CallComponentFunctionWithStorage(storage, params, func)
+
+#endif /* TARGET_OS_MAC */
+
+EXTERN_API( long )
+DelegateComponentCall (ComponentParameters * originalParams,
+ ComponentInstance ci) TWOWORDINLINE(0x7024, 0xA82A);
+
+EXTERN_API( OSErr )
+SetDefaultComponent (Component aComponent,
+ short flags) TWOWORDINLINE(0x701E, 0xA82A);
+
+EXTERN_API( ComponentInstance )
+OpenDefaultComponent (OSType componentType,
+ OSType componentSubType) TWOWORDINLINE(0x7021, 0xA82A);
+
+EXTERN_API( OSErr )
+OpenADefaultComponent (OSType componentType,
+ OSType componentSubType,
+ ComponentInstance * ci) TWOWORDINLINE(0x702E, 0xA82A);
+
+EXTERN_API( Component )
+CaptureComponent (Component capturedComponent,
+ Component capturingComponent) TWOWORDINLINE(0x701C, 0xA82A);
+
+EXTERN_API( OSErr )
+UncaptureComponent (Component aComponent) TWOWORDINLINE(0x701D, 0xA82A);
+
+EXTERN_API( long )
+RegisterComponentResourceFile (short resRefNum,
+ short global) TWOWORDINLINE(0x7014, 0xA82A);
+
+EXTERN_API( OSErr )
+GetComponentIconSuite (Component aComponent,
+ Handle * iconSuite) TWOWORDINLINE(0x7029, 0xA82A);
+
+
+/********************************************************
+* *
+* Direct calls to the Components *
+* *
+********************************************************/
+/* Old style names*/
+
+EXTERN_API( long )
+ComponentFunctionImplemented (ComponentInstance ci,
+ short ftnNumber) FIVEWORDINLINE(0x2F3C, 0x0002, 0xFFFD, 0x7000, 0xA82A);
+
+EXTERN_API( long )
+GetComponentVersion (ComponentInstance ci) FIVEWORDINLINE(0x2F3C, 0x0000, 0xFFFC, 0x7000, 0xA82A);
+
+EXTERN_API( long )
+ComponentSetTarget (ComponentInstance ci,
+ ComponentInstance target) FIVEWORDINLINE(0x2F3C, 0x0004, 0xFFFA, 0x7000, 0xA82A);
+
+/* New style names*/
+
+EXTERN_API( ComponentResult )
+CallComponentOpen (ComponentInstance ci,
+ ComponentInstance self) FIVEWORDINLINE(0x2F3C, 0x0004, 0xFFFF, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CallComponentClose (ComponentInstance ci,
+ ComponentInstance self) FIVEWORDINLINE(0x2F3C, 0x0004, 0xFFFE, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CallComponentCanDo (ComponentInstance ci,
+ short ftnNumber) FIVEWORDINLINE(0x2F3C, 0x0002, 0xFFFD, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CallComponentVersion (ComponentInstance ci) FIVEWORDINLINE(0x2F3C, 0x0000, 0xFFFC, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CallComponentRegister (ComponentInstance ci) FIVEWORDINLINE(0x2F3C, 0x0000, 0xFFFB, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CallComponentTarget (ComponentInstance ci,
+ ComponentInstance target) FIVEWORDINLINE(0x2F3C, 0x0004, 0xFFFA, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CallComponentUnregister (ComponentInstance ci) FIVEWORDINLINE(0x2F3C, 0x0000, 0xFFF9, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CallComponentGetMPWorkFunction (ComponentInstance ci,
+ ComponentMPWorkFunctionUPP * workFunction,
+ void ** refCon) FIVEWORDINLINE(0x2F3C, 0x0008, 0xFFF8, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CallComponentGetPublicResource (ComponentInstance ci,
+ OSType resourceType,
+ short resourceID,
+ Handle * resource) FIVEWORDINLINE(0x2F3C, 0x000A, 0xFFF6, 0x7000, 0xA82A);
+
+
+#if !TARGET_OS_MAC
+/*
+ CallComponent is used by ComponentGlue routines to manually call a component function.
+ */
+EXTERN_API( ComponentResult )
+CallComponent (ComponentInstance ci,
+ ComponentParameters * cp);
+
+#endif /* !TARGET_OS_MAC */
+
+/*
+ CallComponentDispatch is a CarbonLib routine that replaces CallComponent inline glue
+ to call a component function.
+ */
+EXTERN_API( ComponentResult )
+CallComponentDispatch (ComponentParameters * cp);
+
+
+/* UPP call backs */
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(ComponentMPWorkFunctionUPP)
+ NewComponentMPWorkFunctionUPP (ComponentMPWorkFunctionProcPtr userRoutine);
+
+ EXTERN_API(ComponentRoutineUPP)
+ NewComponentRoutineUPP (ComponentRoutineProcPtr userRoutine);
+
+ EXTERN_API(GetMissingComponentResourceUPP)
+ NewGetMissingComponentResourceUPP (GetMissingComponentResourceProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeComponentMPWorkFunctionUPP (ComponentMPWorkFunctionUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeComponentRoutineUPP (ComponentRoutineUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeGetMissingComponentResourceUPP (GetMissingComponentResourceUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokeComponentMPWorkFunctionUPP (void * globalRefCon,
+ ComponentMPWorkFunctionHeaderRecordPtr header,
+ ComponentMPWorkFunctionUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokeComponentRoutineUPP (ComponentParameters * cp,
+ Handle componentStorage,
+ ComponentRoutineUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGetMissingComponentResourceUPP (Component c,
+ OSType resType,
+ short resID,
+ void * refCon,
+ Handle * resource,
+ GetMissingComponentResourceUPP userUPP);
+
+#else
+ enum { uppComponentMPWorkFunctionProcInfo = 0x000003F0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes) */
+ enum { uppComponentRoutineProcInfo = 0x000003F0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes) */
+ enum { uppGetMissingComponentResourceProcInfo = 0x0000FBE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 2_bytes, 4_bytes, 4_bytes) */
+ #define NewComponentMPWorkFunctionUPP(userRoutine) (ComponentMPWorkFunctionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppComponentMPWorkFunctionProcInfo, GetCurrentArchitecture())
+ #define NewComponentRoutineUPP(userRoutine) (ComponentRoutineUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppComponentRoutineProcInfo, GetCurrentArchitecture())
+ #define NewGetMissingComponentResourceUPP(userRoutine) (GetMissingComponentResourceUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGetMissingComponentResourceProcInfo, GetCurrentArchitecture())
+ #define DisposeComponentMPWorkFunctionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeComponentRoutineUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeGetMissingComponentResourceUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeComponentMPWorkFunctionUPP(globalRefCon, header, userUPP) (ComponentResult)CALL_TWO_PARAMETER_UPP((userUPP), uppComponentMPWorkFunctionProcInfo, (globalRefCon), (header))
+ #define InvokeComponentRoutineUPP(cp, componentStorage, userUPP) (ComponentResult)CALL_TWO_PARAMETER_UPP((userUPP), uppComponentRoutineProcInfo, (cp), (componentStorage))
+ #define InvokeGetMissingComponentResourceUPP(c, resType, resID, refCon, resource, userUPP) (OSErr)CALL_FIVE_PARAMETER_UPP((userUPP), uppGetMissingComponentResourceProcInfo, (c), (resType), (resID), (refCon), (resource))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewComponentMPWorkFunctionProc(userRoutine) NewComponentMPWorkFunctionUPP(userRoutine)
+#define NewComponentRoutineProc(userRoutine) NewComponentRoutineUPP(userRoutine)
+#define NewGetMissingComponentResourceProc(userRoutine) NewGetMissingComponentResourceUPP(userRoutine)
+#define CallComponentMPWorkFunctionProc(userRoutine, globalRefCon, header) InvokeComponentMPWorkFunctionUPP(globalRefCon, header, userRoutine)
+#define CallComponentRoutineProc(userRoutine, cp, componentStorage) InvokeComponentRoutineUPP(cp, componentStorage, userRoutine)
+#define CallGetMissingComponentResourceProc(userRoutine, c, resType, resID, refCon, resource) InvokeGetMissingComponentResourceUPP(c, resType, resID, refCon, resource, userRoutine)
+/* ProcInfos */
+
+/* MixedMode ProcInfo constants for component calls */
+enum {
+ uppComponentFunctionImplementedProcInfo = 0x000002F0,
+ uppGetComponentVersionProcInfo = 0x000000F0,
+ uppComponentSetTargetProcInfo = 0x000003F0,
+ uppCallComponentOpenProcInfo = 0x000003F0,
+ uppCallComponentCloseProcInfo = 0x000003F0,
+ uppCallComponentCanDoProcInfo = 0x000002F0,
+ uppCallComponentVersionProcInfo = 0x000000F0,
+ uppCallComponentRegisterProcInfo = 0x000000F0,
+ uppCallComponentTargetProcInfo = 0x000003F0,
+ uppCallComponentUnregisterProcInfo = 0x000000F0,
+ uppCallComponentGetMPWorkFunctionProcInfo = 0x00000FF0,
+ uppCallComponentGetPublicResourceProcInfo = 0x00003BF0
+};
+
+
+
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __COMPONENTS__ */
+
diff --git a/include/qt/ConditionalMacros.h b/include/qt/ConditionalMacros.h
new file mode 100644
index 000000000..c59ba0fba
--- /dev/null
+++ b/include/qt/ConditionalMacros.h
@@ -0,0 +1,1810 @@
+/*
+ File: ConditionalMacros.h
+
+ Contains: Set up for compiler independent conditionals
+
+ Version: Technology: Universal Interface Files 3.3
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1993-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CONDITIONALMACROS__
+#define __CONDITIONALMACROS__
+
+/****************************************************************************************************
+ UNIVERSAL_INTERFACES_VERSION
+
+ 0x0330 => version 3.3
+ 0x0320 => version 3.2
+ 0x0310 => version 3.1
+ 0x0301 => version 3.0.1
+ 0x0300 => version 3.0
+ 0x0210 => version 2.1
+ This conditional did not exist prior to version 2.1
+****************************************************************************************************/
+#define UNIVERSAL_INTERFACES_VERSION 0x0330
+
+/****************************************************************************************************
+
+ TARGET_CPU_*
+ These conditionals specify which microprocessor instruction set is being
+ generated. At most one of these is true, the rest are false.
+
+ TARGET_CPU_PPC - Compiler is generating PowerPC instructions
+ TARGET_CPU_68K - Compiler is generating 680x0 instructions
+ TARGET_CPU_X86 - Compiler is generating x86 instructions
+ TARGET_CPU_MIPS - Compiler is generating MIPS instructions
+ TARGET_CPU_SPARC - Compiler is generating Sparc instructions
+ TARGET_CPU_ALPHA - Compiler is generating Dec Alpha instructions
+
+
+ TARGET_OS_*
+ These conditionals specify in which Operating System the generated code will
+ run. At most one of the these is true, the rest are false.
+
+ TARGET_OS_MAC - Generate code will run under Mac OS
+ TARGET_OS_WIN32 - Generate code will run under 32-bit Windows
+ TARGET_OS_UNIX - Generate code will run under some unix
+
+
+ TARGET_RT_*
+ These conditionals specify in which runtime the generated code will
+ run. This is needed when the OS and CPU support more than one runtime
+ (e.g. MacOS on 68K supports CFM68K and Classic 68k).
+
+ TARGET_RT_LITTLE_ENDIAN - Generated code uses little endian format for integers
+ TARGET_RT_BIG_ENDIAN - Generated code uses big endian format for integers
+ TARGET_RT_MAC_CFM - TARGET_OS_MAC is true and CFM68K or PowerPC CFM (TVectors) are used
+ TARGET_RT_MAC_MACHO - TARGET_OS_MAC is true and Mach-O style runtime
+ TARGET_RT_MAC_68881 - TARGET_OS_MAC is true and 68881 floating point instructions used
+
+
+ TARGET__API_*_*
+ These conditionals are used to differentiate between sets of API's on the same
+ processor under the same OS. The first section after _API_ is the OS. The
+ second section is the API set. Unlike TARGET_OS_ and TARGET_CPU_, these
+ conditionals are not mutally exclusive. This file will attempt to auto-configure
+ all TARGET_API_*_* values, but will often need a TARGET_API_*_* value predefined
+ in order to disambiguate.
+
+ TARGET_API_MAC_OS8 - Code is being compiled to run on System 7 through Mac OS 8.x
+ TARGET_API_MAC_CARBON - Code is being compiled to run on Mac OS 8 and Mac OS X via CarbonLib
+ TARGET_API_MAC_OSX - Code is being compiled to run on Mac OS X
+
+
+ PRAGMA_*
+ These conditionals specify whether the compiler supports particular #pragma's
+
+ PRAGMA_IMPORT - Compiler supports: #pragma import on/off/reset
+ PRAGMA_ONCE - Compiler supports: #pragma once
+ PRAGMA_STRUCT_ALIGN - Compiler supports: #pragma options align=mac68k/power/reset
+ PRAGMA_STRUCT_PACK - Compiler supports: #pragma pack(n)
+ PRAGMA_STRUCT_PACKPUSH - Compiler supports: #pragma pack(push, n)/pack(pop)
+ PRAGMA_ENUM_PACK - Compiler supports: #pragma options(!pack_enums)
+ PRAGMA_ENUM_ALWAYSINT - Compiler supports: #pragma enumsalwaysint on/off/reset
+ PRAGMA_ENUM_OPTIONS - Compiler supports: #pragma options enum=int/small/reset
+
+
+ FOUR_CHAR_CODE
+ This conditional does the proper byte swapping to assue that a four character code (e.g. 'TEXT')
+ is compiled down to the correct value on all compilers.
+
+ FOUR_CHAR_CODE('abcd') - Convert a four-char-code to the correct 32-bit value
+
+
+ TYPE_*
+ These conditionals specify whether the compiler supports particular types.
+
+ TYPE_LONGLONG - Compiler supports "long long" 64-bit integers
+ TYPE_BOOL - Compiler supports "bool"
+ TYPE_EXTENDED - Compiler supports "extended" 80/96 bit floating point
+
+
+ FUNCTION_*
+ These conditionals specify whether the compiler supports particular language extensions
+ to function prototypes and definitions.
+
+ FUNCTION_PASCAL - Compiler supports "pascal void Foo()"
+ FUNCTION_DECLSPEC - Compiler supports "__declspec(xxx) void Foo()"
+ FUNCTION_WIN32CC - Compiler supports "void __cdecl Foo()" and "void __stdcall Foo()"
+
+****************************************************************************************************/
+
+#if defined(__MRC__)
+ /*
+ MrC[pp] compiler from Apple Computer, Inc.
+ */
+ #define TARGET_CPU_PPC 1
+ #define TARGET_CPU_68K 0
+ #define TARGET_CPU_X86 0
+ #define TARGET_CPU_MIPS 0
+ #define TARGET_CPU_SPARC 0
+ #define TARGET_CPU_ALPHA 0
+ #define TARGET_OS_MAC 1
+ #define TARGET_OS_WIN32 0
+ #define TARGET_OS_UNIX 0
+ #define TARGET_RT_LITTLE_ENDIAN 0
+ #define TARGET_RT_BIG_ENDIAN 1
+ #define TARGET_RT_MAC_CFM 1
+ #define TARGET_RT_MAC_MACHO 0
+ #define TARGET_RT_MAC_68881 0
+ #if (__MRC__ > 0x0200) && (__MRC__ < 0x0700)
+ #define PRAGMA_IMPORT 1
+ #else
+ #define PRAGMA_IMPORT 0
+ #endif
+ #define PRAGMA_STRUCT_ALIGN 1
+ #define PRAGMA_ONCE 1
+ #define PRAGMA_STRUCT_PACK 0
+ #define PRAGMA_STRUCT_PACKPUSH 0
+ #define PRAGMA_ENUM_PACK 1
+ #define PRAGMA_ENUM_ALWAYSINT 0
+ #define PRAGMA_ENUM_OPTIONS 0
+ #define FOUR_CHAR_CODE(x) (x)
+
+ #if (__MRC__ > 0x0300) && (__MRC__ < 0x0700)
+ #if __option(longlong)
+
+
+ #define TYPE_LONGLONG 1
+
+
+ #else
+ #define TYPE_LONGLONG 0
+ #endif
+ #if __option(bool)
+ #define TYPE_BOOL 1
+ #else
+ #define TYPE_BOOL 0
+ #endif
+ #define SLASH_INCLUDES_UNSUPPORTED !__option(unix_includes)
+ #else
+ #define TYPE_LONGLONG 0
+ #define TYPE_BOOL 0
+ #define SLASH_INCLUDES_UNSUPPORTED 1
+ #endif
+ #define TYPE_EXTENDED 0
+
+ #define FUNCTION_PASCAL 1
+ #define FUNCTION_DECLSPEC 0
+ #define FUNCTION_WIN32CC 0
+
+
+
+#elif defined(__SC__) && (defined(MPW_CPLUS) || defined(MPW_C))
+ /*
+ SC[pp] compiler from Apple Computer, Inc.
+ */
+ #define TARGET_CPU_PPC 0
+ #define TARGET_CPU_68K 1
+ #define TARGET_CPU_X86 0
+ #define TARGET_CPU_MIPS 0
+ #define TARGET_CPU_SPARC 0
+ #define TARGET_CPU_ALPHA 0
+ #define TARGET_OS_MAC 1
+ #define TARGET_OS_WIN32 0
+ #define TARGET_OS_UNIX 0
+ #define TARGET_RT_LITTLE_ENDIAN 0
+ #define TARGET_RT_BIG_ENDIAN 1
+ #if defined(__CFM68K__)
+ #define TARGET_RT_MAC_CFM 1
+ #else
+ #define TARGET_RT_MAC_CFM 0
+ #endif
+ #define TARGET_RT_MAC_MACHO 0
+ #if defined(mc68881)
+ #define TARGET_RT_MAC_68881 1
+ #else
+ #define TARGET_RT_MAC_68881 0
+ #endif
+ #if TARGET_RT_MAC_CFM
+ #define PRAGMA_IMPORT 1
+ #if (__SC__ <= 0x0810)
+ /* old versions of SC don't support Ò#pragma import resetÓ */
+ #define PRAGMA_IMPORT_OFF 1
+ #endif
+ #else
+ #define PRAGMA_IMPORT 0
+ #endif
+ #if (__SC__ >= 0x0801)
+ #define PRAGMA_STRUCT_ALIGN 1
+ #else
+ #define PRAGMA_STRUCT_ALIGN 0
+ #endif
+ #define PRAGMA_ONCE 0
+ #define PRAGMA_STRUCT_PACK 0
+ #define PRAGMA_STRUCT_PACKPUSH 0
+ #define PRAGMA_ENUM_PACK 1
+ #define PRAGMA_ENUM_ALWAYSINT 0
+ #define PRAGMA_ENUM_OPTIONS 0
+ #define FOUR_CHAR_CODE(x) (x)
+
+ #define TYPE_LONGLONG 0
+ #define TYPE_EXTENDED 1
+ #if (__SC__ > 0x0810)
+ #if __option(bool)
+ #define TYPE_BOOL 1
+ #else
+ #define TYPE_BOOL 0
+ #endif
+ #else
+ #define TYPE_BOOL 0
+ #endif
+ #if TARGET_RT_MAC_CFM
+ #define FUNCTION_PASCAL 0
+ #else
+ #define FUNCTION_PASCAL 1
+ #endif
+ #define FUNCTION_DECLSPEC 0
+ #define FUNCTION_WIN32CC 0
+ #define SLASH_INCLUDES_UNSUPPORTED !__option(unix_includes)
+
+
+#elif defined(__MWERKS__)
+ /*
+ CodeWarrior compiler from Metrowerks, Inc.
+ */
+ #if (__MWERKS__ < 0x0900) || macintosh
+ #define TARGET_OS_MAC 1
+ #define TARGET_OS_WIN32 0
+ #define TARGET_OS_UNIX 0
+ #define TARGET_CPU_X86 0
+ #define TARGET_CPU_MIPS 0
+ #define TARGET_CPU_SPARC 0
+ #define TARGET_CPU_ALPHA 0
+ #define TARGET_RT_LITTLE_ENDIAN 0
+ #define TARGET_RT_BIG_ENDIAN 1
+ #if powerc
+ #define TARGET_CPU_PPC 1
+ #define TARGET_CPU_68K 0
+ #define TARGET_RT_MAC_CFM 1
+ #define TARGET_RT_MAC_MACHO 0
+ #define TARGET_RT_MAC_68881 0
+ #else
+ #define TARGET_CPU_PPC 0
+ #define TARGET_CPU_68K 1
+ #if defined(__CFM68K__)
+ #define TARGET_RT_MAC_CFM 1
+ #else
+ #define TARGET_RT_MAC_CFM 0
+ #endif
+ #define TARGET_RT_MAC_MACHO 0
+ #if __MC68881__
+ #define TARGET_RT_MAC_68881 1
+ #else
+ #define TARGET_RT_MAC_68881 0
+ #endif
+ #endif
+ #define PRAGMA_ONCE 1
+ #if (__MWERKS__ >= 0x0700)
+ #define PRAGMA_IMPORT TARGET_RT_MAC_CFM
+ #else
+ #define PRAGMA_IMPORT 0
+ #endif
+ #define PRAGMA_STRUCT_ALIGN 1
+ #define PRAGMA_STRUCT_PACK 0
+ #define PRAGMA_STRUCT_PACKPUSH 0
+ #define PRAGMA_ENUM_PACK 0
+ #define PRAGMA_ENUM_ALWAYSINT 1
+ #define PRAGMA_ENUM_OPTIONS 0
+ #if __option(enumsalwaysint) && __option(ANSI_strict)
+ #define FOUR_CHAR_CODE(x) ((long)(x)) /* otherwise compiler will complain about values with high bit set */
+ #else
+ #define FOUR_CHAR_CODE(x) (x)
+ #endif
+ #if TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #define FUNCTION_PASCAL 1
+ #else
+ #define FUNCTION_PASCAL 0
+ #endif
+ #if (__MWERKS__ >= 0x2000)
+ #define FUNCTION_DECLSPEC 0
+ #else
+ #define FUNCTION_DECLSPEC 0
+ #endif
+ #define FUNCTION_WIN32CC 0
+
+
+ #elif (__MWERKS__ >= 0x0900) && __INTEL__
+ #define TARGET_CPU_PPC 0
+ #define TARGET_CPU_68K 0
+ #define TARGET_CPU_X86 1
+ #define TARGET_CPU_MIPS 0
+ #define TARGET_CPU_SPARC 0
+ #define TARGET_CPU_ALPHA 0
+ #define TARGET_OS_MAC 0
+ #define TARGET_OS_WIN32 1
+ #define TARGET_OS_UNIX 0
+ #define TARGET_RT_LITTLE_ENDIAN 1
+ #define TARGET_RT_BIG_ENDIAN 0
+ #define PRAGMA_ONCE 1
+ #define PRAGMA_IMPORT 0
+ #define PRAGMA_STRUCT_ALIGN 0
+ #define PRAGMA_STRUCT_PACK 1
+ #define PRAGMA_STRUCT_PACKPUSH 1
+ #define PRAGMA_ENUM_PACK 0
+ #define PRAGMA_ENUM_ALWAYSINT 1
+ #define PRAGMA_ENUM_OPTIONS 0
+ #define FOUR_CHAR_CODE(x) (x)
+ #define FUNCTION_PASCAL 0
+ #ifndef FUNCTION_DECLSPEC /* allow use of __declspec(dllimport) to be enabled */
+ #define FUNCTION_DECLSPEC 0 /* QuickTime for Windows cannot use dllimport */
+ #endif
+ #ifndef FUNCTION_WIN32CC /* allow calling convention to be overriddden */
+ #define FUNCTION_WIN32CC 1
+ #endif
+
+
+ #elif (__MWERKS__ >= 0x1900) && __MIPS__
+ #define TARGET_CPU_PPC 0
+ #define TARGET_CPU_68K 0
+ #define TARGET_CPU_X86 0
+ #define TARGET_CPU_MIPS 1
+ #define TARGET_CPU_SPARC 0
+ #define TARGET_CPU_ALPHA 0
+ #define TARGET_OS_MAC 0
+ #define TARGET_OS_WIN32 0
+ #define TARGET_OS_UNIX 1
+ #if __option(little_endian)
+ #define TARGET_RT_LITTLE_ENDIAN 1
+ #define TARGET_RT_BIG_ENDIAN 0
+ #else
+ #define TARGET_RT_LITTLE_ENDIAN 0
+ #define TARGET_RT_BIG_ENDIAN 1
+ #endif
+ #define PRAGMA_ONCE 1
+ #define PRAGMA_IMPORT 0
+ #define PRAGMA_STRUCT_ALIGN 0
+ #define PRAGMA_STRUCT_PACK 1
+ #define PRAGMA_STRUCT_PACKPUSH 0
+ #define PRAGMA_ENUM_PACK 0
+ #define PRAGMA_ENUM_ALWAYSINT 1
+ #define PRAGMA_ENUM_OPTIONS 0
+ #define FOUR_CHAR_CODE(x) (x)
+ #define FUNCTION_PASCAL 0
+ #define FUNCTION_DECLSPEC 0
+ #define FUNCTION_WIN32CC 0
+
+
+ #elif (__MWERKS__ >= 0x2110) && __MACH__
+ #define TARGET_CPU_PPC 1
+ #define TARGET_CPU_68K 0
+ #define TARGET_CPU_X86 0
+ #define TARGET_CPU_MIPS 0
+ #define TARGET_CPU_SPARC 0
+ #define TARGET_CPU_ALPHA 0
+ #define TARGET_OS_MAC 1
+ #define TARGET_OS_WIN32 0
+ #define TARGET_OS_UNIX 0
+ #if __option(little_endian)
+ #define TARGET_RT_LITTLE_ENDIAN 1
+ #define TARGET_RT_BIG_ENDIAN 0
+ #else
+ #define TARGET_RT_LITTLE_ENDIAN 0
+ #define TARGET_RT_BIG_ENDIAN 1
+ #endif
+ #define TARGET_RT_MAC_CFM 0
+ #define TARGET_RT_MAC_MACHO 1
+ #define TARGET_RT_MAC_68881 0
+ #define PRAGMA_ONCE 1
+ #define PRAGMA_IMPORT 0
+ #define PRAGMA_STRUCT_ALIGN 1
+ #define PRAGMA_STRUCT_PACK 1
+ #define PRAGMA_STRUCT_PACKPUSH 0
+ #define PRAGMA_ENUM_PACK 0
+ #define PRAGMA_ENUM_ALWAYSINT 1
+ #define PRAGMA_ENUM_OPTIONS 0
+ #define FOUR_CHAR_CODE(x) (x)
+ #define FUNCTION_PASCAL 0
+ #define FUNCTION_DECLSPEC 0
+ #define FUNCTION_WIN32CC 0
+ #else
+ #error unknown Metrowerks compiler
+ #endif
+
+
+ #if (__MWERKS__ >= 0x1100)
+ #if __option(longlong)
+ #define TYPE_LONGLONG 1
+ #else
+ #define TYPE_LONGLONG 0
+ #endif
+ #else
+ #define TYPE_LONGLONG 0
+ #endif
+ #if (__MWERKS__ >= 0x1000)
+ #if __option(bool)
+ #define TYPE_BOOL 1
+ #else
+ #define TYPE_BOOL 0
+ #endif
+ #else
+ #define TYPE_BOOL 0
+ #endif
+ #define TYPE_EXTENDED 0
+ #define SLASH_INCLUDES_UNSUPPORTED 1
+
+
+#elif defined(SYMANTEC_CPLUS) || defined(SYMANTEC_C)
+ /*
+ C and C++ compiler from Symantec, Inc.
+ */
+ #define TARGET_OS_MAC 1
+ #define TARGET_OS_WIN32 0
+ #define TARGET_OS_UNIX 0
+ #define TARGET_CPU_X86 0
+ #define TARGET_CPU_MIPS 0
+ #define TARGET_CPU_SPARC 0
+ #define TARGET_CPU_ALPHA 0
+ #define TARGET_RT_LITTLE_ENDIAN 0
+ #define TARGET_RT_BIG_ENDIAN 1
+ #if powerc
+ #define TARGET_CPU_PPC 1
+ #define TARGET_CPU_68K 0
+ #define TARGET_RT_MAC_CFM 1
+ #define TARGET_RT_MAC_MACHO 0
+ #define TARGET_RT_MAC_68881 0
+ #else
+ #define TARGET_CPU_PPC 0
+ #define TARGET_CPU_68K 1
+ #if defined(__CFM68K)
+ #define TARGET_RT_MAC_CFM 1
+ #else
+ #define TARGET_RT_MAC_CFM 0
+ #endif
+ #define TARGET_RT_MAC_MACHO 0
+ #if mc68881
+ #define TARGET_RT_MAC_68881 1
+ #else
+ #define TARGET_RT_MAC_68881 0
+ #endif
+ #endif
+ #define PRAGMA_IMPORT 0
+ #define PRAGMA_ONCE 1
+ #define PRAGMA_STRUCT_ALIGN 1
+ #define PRAGMA_STRUCT_PACK 0
+ #define PRAGMA_STRUCT_PACKPUSH 0
+ #define PRAGMA_ENUM_PACK 1
+ #define PRAGMA_ENUM_ALWAYSINT 0
+ #define PRAGMA_ENUM_OPTIONS 0
+ #define FOUR_CHAR_CODE(x) (x)
+
+ #if __useAppleExts__
+ #define TYPE_EXTENDED 1
+ #else
+ #define TYPE_EXTENDED 0
+ #endif
+ #define TYPE_LONGLONG 0
+ #define TYPE_BOOL 0
+
+ #define FUNCTION_PASCAL 0
+ #define FUNCTION_DECLSPEC 0
+ #define FUNCTION_WIN32CC 0
+ #define SLASH_INCLUDES_UNSUPPORTED 1
+
+
+#elif defined(THINK_C)
+ /*
+ THINK C compiler from Symantec, Inc. << WARNING: Unsupported Compiler >>
+ */
+ #define TARGET_CPU_PPC 0
+ #define TARGET_CPU_68K 1
+ #define TARGET_CPU_X86 0
+ #define TARGET_CPU_MIPS 0
+ #define TARGET_CPU_SPARC 0
+ #define TARGET_CPU_ALPHA 0
+ #define TARGET_OS_MAC 1
+ #define TARGET_OS_WIN32 0
+ #define TARGET_OS_UNIX 0
+ #define TARGET_RT_LITTLE_ENDIAN 0
+ #define TARGET_RT_BIG_ENDIAN 1
+ #define TARGET_RT_MAC_CFM 0
+ #define TARGET_RT_MAC_MACHO 0
+ #if defined(mc68881)
+ #define TARGET_RT_MAC_68881 1
+ #else
+ #define TARGET_RT_MAC_68881 0
+ #endif
+ #define PRAGMA_IMPORT 0
+ #define PRAGMA_STRUCT_ALIGN 0
+ #define PRAGMA_ONCE 1
+ #define PRAGMA_STRUCT_PACK 0
+ #define PRAGMA_STRUCT_PACKPUSH 0
+ #define PRAGMA_ENUM_PACK 1
+ #define PRAGMA_ENUM_ALWAYSINT 0
+ #define PRAGMA_ENUM_OPTIONS 0
+ #define FOUR_CHAR_CODE(x) (x)
+
+ #define TYPE_EXTENDED 1
+ #define TYPE_LONGLONG 0
+ #define TYPE_BOOL 0
+
+ #define FUNCTION_PASCAL 1
+ #define FUNCTION_DECLSPEC 0
+ #define FUNCTION_WIN32CC 0
+ #define SLASH_INCLUDES_UNSUPPORTED 1
+
+
+#elif defined(__PPCC__)
+ /*
+ PPCC compiler from Apple Computer, Inc. << WARNING: Unsupported Compiler >>
+ */
+ #define TARGET_CPU_PPC 1
+ #define TARGET_CPU_68K 0
+ #define TARGET_CPU_X86 0
+ #define TARGET_CPU_MIPS 0
+ #define TARGET_CPU_SPARC 0
+ #define TARGET_CPU_ALPHA 0
+ #define TARGET_OS_MAC 1
+ #define TARGET_OS_WIN32 0
+ #define TARGET_OS_UNIX 0
+ #define TARGET_RT_LITTLE_ENDIAN 0
+ #define TARGET_RT_BIG_ENDIAN 1
+ #define TARGET_RT_MAC_CFM 1
+ #define TARGET_RT_MAC_MACHO 0
+ #define TARGET_RT_MAC_68881 0
+ #define PRAGMA_IMPORT 0
+ #define PRAGMA_STRUCT_ALIGN 1
+ #define PRAGMA_ONCE 0
+ #define PRAGMA_STRUCT_PACK 0
+ #define PRAGMA_STRUCT_PACKPUSH 0
+ #define PRAGMA_ENUM_PACK 0
+ #define PRAGMA_ENUM_ALWAYSINT 0
+ #define PRAGMA_ENUM_OPTIONS 0
+ #define FOUR_CHAR_CODE(x) (x)
+
+ #define TYPE_EXTENDED 0
+ #define TYPE_LONGLONG 0
+ #define TYPE_BOOL 0
+
+ #define FUNCTION_PASCAL 0
+ #define FUNCTION_DECLSPEC 0
+ #define FUNCTION_WIN32CC 0
+ #define SLASH_INCLUDES_UNSUPPORTED 1
+
+
+#elif defined(applec) && !defined(__SC__)
+ /*
+ MPW C compiler from Apple Computer, Inc. << WARNING: Unsupported Compiler >>
+ */
+ #define TARGET_CPU_PPC 0
+ #define TARGET_CPU_68K 1
+ #define TARGET_CPU_X86 0
+ #define TARGET_CPU_MIPS 0
+ #define TARGET_CPU_SPARC 0
+ #define TARGET_CPU_ALPHA 0
+ #define TARGET_OS_MAC 1
+ #define TARGET_OS_WIN32 0
+ #define TARGET_OS_UNIX 0
+ #define TARGET_RT_LITTLE_ENDIAN 0
+ #define TARGET_RT_BIG_ENDIAN 1
+ #define TARGET_RT_MAC_CFM 0
+ #define TARGET_RT_MAC_MACHO 0
+ #if defined(mc68881)
+ #define TARGET_RT_MAC_68881 1
+ #else
+ #define TARGET_RT_MAC_68881 0
+ #endif
+ #define PRAGMA_IMPORT 0
+ #define PRAGMA_STRUCT_ALIGN 0
+ #define PRAGMA_ONCE 0
+ #define PRAGMA_STRUCT_PACK 0
+ #define PRAGMA_STRUCT_PACKPUSH 0
+ #define PRAGMA_ENUM_PACK 0
+ #define PRAGMA_ENUM_ALWAYSINT 0
+ #define PRAGMA_ENUM_OPTIONS 0
+ /* Note: MPW C 3.2 had a bug where MACRO('xx ') would cause 'xx ' to be misevaluated */
+ #define FOUR_CHAR_CODE
+
+ #define TYPE_EXTENDED 1
+ #define TYPE_LONGLONG 0
+ #define TYPE_BOOL 0
+
+ #define FUNCTION_PASCAL 1
+ #define FUNCTION_DECLSPEC 0
+ #define FUNCTION_WIN32CC 0
+ #define SLASH_INCLUDES_UNSUPPORTED 1
+
+
+#elif defined(__GNUC__) && (defined(__APPLE_CPP__) || defined(__APPLE_CC__) || defined(__NEXT_CPP__))
+ /*
+ gcc based compilers used on OpenStep -> Rhapsody -> Mac OS X
+ */
+ #if defined(__ppc__) || defined(powerpc) || defined(ppc)
+ #define TARGET_CPU_PPC 1
+ #define TARGET_CPU_68K 0
+ #define TARGET_CPU_X86 0
+ #define TARGET_CPU_MIPS 0
+ #define TARGET_CPU_SPARC 0
+ #define TARGET_CPU_ALPHA 0
+ #define TARGET_RT_MAC_CFM 0
+ #define TARGET_RT_MAC_MACHO 1
+ #define TARGET_RT_MAC_68881 0
+ #define TARGET_RT_LITTLE_ENDIAN 0
+ #define TARGET_RT_BIG_ENDIAN 1
+ #elif defined(m68k)
+ #define TARGET_CPU_PPC 0
+ #define TARGET_CPU_68K 1
+ #define TARGET_CPU_X86 0
+ #define TARGET_CPU_MIPS 0
+ #define TARGET_CPU_SPARC 0
+ #define TARGET_CPU_ALPHA 0
+ #define TARGET_RT_MAC_CFM 0
+ #define TARGET_RT_MAC_MACHO 1
+ #define TARGET_RT_MAC_68881 0
+ #define TARGET_RT_LITTLE_ENDIAN 0
+ #define TARGET_RT_BIG_ENDIAN 1
+ #elif defined(sparc)
+ #define TARGET_CPU_PPC 0
+ #define TARGET_CPU_68K 0
+ #define TARGET_CPU_X86 0
+ #define TARGET_CPU_MIPS 0
+ #define TARGET_CPU_SPARC 1
+ #define TARGET_CPU_ALPHA 0
+ #define TARGET_RT_MAC_CFM 0
+ #define TARGET_RT_MAC_MACHO 1
+ #define TARGET_RT_MAC_68881 0
+ #define TARGET_RT_LITTLE_ENDIAN 0
+ #define TARGET_RT_BIG_ENDIAN 1
+ #elif defined(__i386__) || defined(i386) || defined(intel)
+ #define TARGET_CPU_PPC 0
+ #define TARGET_CPU_68K 0
+ #define TARGET_CPU_X86 1
+ #define TARGET_CPU_MIPS 0
+ #define TARGET_CPU_SPARC 0
+ #define TARGET_CPU_ALPHA 0
+ #define TARGET_RT_MAC_CFM 0
+ #define TARGET_RT_MAC_MACHO 1
+ #define TARGET_RT_MAC_68881 0
+ #define TARGET_RT_LITTLE_ENDIAN 1
+ #define TARGET_RT_BIG_ENDIAN 0
+ #else
+ #error unrecognized GNU C compiler
+ #endif
+
+
+#ifndef TARGET_OS_MAC
+ #define TARGET_OS_MAC 1
+#endif
+#ifndef TARGET_OS_WIN32
+ #define TARGET_OS_WIN32 0
+#endif
+#ifndef TARGET_OS_UNIX
+ #define TARGET_OS_UNIX 0
+#endif
+
+ #define PRAGMA_IMPORT 0
+ #define PRAGMA_STRUCT_ALIGN 1
+ #define PRAGMA_ONCE 0
+ #define PRAGMA_STRUCT_PACK 0
+ #define PRAGMA_STRUCT_PACKPUSH 0
+ #define PRAGMA_ENUM_PACK 0
+ #define PRAGMA_ENUM_ALWAYSINT 0
+ #define PRAGMA_ENUM_OPTIONS 0
+ #define FOUR_CHAR_CODE(x) (x)
+
+ #define TYPE_EXTENDED 0
+ #if __GNUC__ >= 2
+ #define TYPE_LONGLONG 1
+ #else
+ #define TYPE_LONGLONG 0
+ #endif
+ #ifdef __cplusplus
+ #define TYPE_BOOL 1
+ #else
+ #define TYPE_BOOL 0
+ #endif
+
+ #define FUNCTION_PASCAL 0
+ #define FUNCTION_DECLSPEC 0
+ #define FUNCTION_WIN32CC 0
+
+
+#elif defined(__GNUC__) && defined(__linux__)
+ /*
+ gcc (egcs, really) for MkLinux. << WARNING: Unsupported Compiler >>
+ */
+ #if #cpu(powerpc)
+ #define TARGET_CPU_PPC 1
+ #define TARGET_CPU_68K 0
+ #define TARGET_CPU_X86 0
+ #define TARGET_CPU_MIPS 0
+ #define TARGET_CPU_SPARC 0
+ #define TARGET_CPU_ALPHA 0
+ #define TARGET_RT_MAC_CFM 1
+ #define TARGET_RT_MAC_MACHO 0
+ #define TARGET_RT_MAC_68881 0
+ #elif #cpu(m68k)
+ #define TARGET_CPU_PPC 0
+ #define TARGET_CPU_68K 1
+ #define TARGET_CPU_X86 0
+ #define TARGET_CPU_MIPS 0
+ #define TARGET_CPU_SPARC 0
+ #define TARGET_CPU_ALPHA 0
+ #define TARGET_RT_MAC_CFM 0
+ #define TARGET_RT_MAC_MACHO 0
+ #define TARGET_RT_MAC_68881 0
+ #else
+ #error unsupported GNU C compiler
+ #endif
+
+ #if #system(macos)
+ #define TARGET_OS_MAC 1
+ #define TARGET_OS_WIN32 0
+ #define TARGET_OS_UNIX 0
+ #elif #system(unix)
+ #define TARGET_OS_MAC 0
+ #define TARGET_OS_WIN32 0
+ #define TARGET_OS_UNIX 1
+ #else
+ #error unsupported GNU C compiler
+ #endif
+
+
+
+ #define TARGET_RT_LITTLE_ENDIAN 0
+ #define TARGET_RT_BIG_ENDIAN 1
+ #define PRAGMA_IMPORT 0
+ #define PRAGMA_STRUCT_ALIGN 0
+ #define PRAGMA_ONCE 0
+ #define PRAGMA_STRUCT_PACK 1
+ #define PRAGMA_STRUCT_PACKPUSH 0
+ #define PRAGMA_ENUM_PACK 0
+ #define PRAGMA_ENUM_ALWAYSINT 0
+ #define PRAGMA_ENUM_OPTIONS 0
+ #define FOUR_CHAR_CODE(x) (x)
+
+ #define TYPE_EXTENDED 0
+ #ifdef _LONG_LONG
+ #define TYPE_LONGLONG 1
+ #else
+ #define TYPE_LONGLONG 0
+ #endif
+ #define TYPE_BOOL 0
+
+ #define FUNCTION_PASCAL 0
+ #define FUNCTION_DECLSPEC 0
+ #define FUNCTION_WIN32CC 0
+
+
+#elif defined(__GNUC__) && defined(__MINGW32__)
+ /*
+ Mingw gnu gcc/egcs compiler for Win32 systems (http://www.mingw.org).
+ */
+ #define TARGET_CPU_PPC 0
+ #define TARGET_CPU_68K 0
+ #define TARGET_CPU_X86 1
+ #define TARGET_CPU_MIPS 0
+ #define TARGET_CPU_SPARC 0
+ #define TARGET_CPU_ALPHA 0
+ #define TARGET_RT_MAC_CFM 0
+ #define TARGET_RT_MAC_MACHO 0
+ #define TARGET_RT_MAC_68881 0
+ #define TARGET_OS_MAC 0
+ #define TARGET_OS_WIN32 1
+ #define TARGET_OS_UNIX 0
+ #define TARGET_RT_LITTLE_ENDIAN 1
+ #define TARGET_RT_BIG_ENDIAN 0
+ #define PRAGMA_IMPORT 0
+ #define PRAGMA_STRUCT_ALIGN 0
+ #define PRAGMA_ONCE 0
+ #define PRAGMA_STRUCT_PACK 1
+ #define PRAGMA_STRUCT_PACKPUSH 0
+ #define PRAGMA_ENUM_PACK 0
+ #define PRAGMA_ENUM_ALWAYSINT 0
+ #define PRAGMA_ENUM_OPTIONS 0
+ #define FOUR_CHAR_CODE(x) (x)
+ #define TYPE_EXTENDED 0
+ #define TYPE_LONGLONG 1
+ #define TYPE_BOOL 1
+ #define FUNCTION_PASCAL 0
+ #define FUNCTION_DECLSPEC 0
+ #define FUNCTION_WIN32CC 0
+
+
+#elif defined(__GNUC__)
+ /*
+ gC for MPW from Free Software Foundation, Inc.
+ */
+ #if #cpu(powerpc)
+ #define TARGET_CPU_PPC 1
+ #define TARGET_CPU_68K 0
+ #define TARGET_CPU_X86 0
+ #define TARGET_CPU_MIPS 0
+ #define TARGET_CPU_SPARC 0
+ #define TARGET_CPU_ALPHA 0
+ #define TARGET_RT_MAC_CFM 1
+ #define TARGET_RT_MAC_MACHO 0
+ #define TARGET_RT_MAC_68881 0
+ #elif #cpu(m68k)
+ #define TARGET_CPU_PPC 0
+ #define TARGET_CPU_68K 1
+ #define TARGET_CPU_X86 0
+ #define TARGET_CPU_MIPS 0
+ #define TARGET_CPU_SPARC 0
+ #define TARGET_CPU_ALPHA 0
+ #define TARGET_RT_MAC_CFM 0
+ #define TARGET_RT_MAC_MACHO 0
+ #define TARGET_RT_MAC_68881 0
+ #else
+ #error unsupported GNU C compiler
+ #endif
+
+ #if #system(macos)
+ #define TARGET_OS_MAC 1
+ #define TARGET_OS_WIN32 0
+ #define TARGET_OS_UNIX 0
+ #elif #system(unix)
+ #define TARGET_OS_MAC 0
+ #define TARGET_OS_WIN32 0
+ #define TARGET_OS_UNIX 1
+ #else
+ #error unsupported GNU C compiler
+ #endif
+
+ #define TARGET_RT_LITTLE_ENDIAN 0
+ #define TARGET_RT_BIG_ENDIAN 1
+ #define PRAGMA_IMPORT 0
+ #define PRAGMA_STRUCT_ALIGN 1
+ #define PRAGMA_ONCE 0
+ #define PRAGMA_STRUCT_PACK 0
+ #define PRAGMA_STRUCT_PACKPUSH 0
+ #define PRAGMA_ENUM_PACK 0
+ #define PRAGMA_ENUM_ALWAYSINT 0
+ #define PRAGMA_ENUM_OPTIONS 0
+ #define FOUR_CHAR_CODE(x) (x)
+
+ #define TYPE_EXTENDED 0
+ #ifdef _LONG_LONG
+ #define TYPE_LONGLONG 1
+ #else
+ #define TYPE_LONGLONG 0
+ #endif
+ #define TYPE_BOOL 0
+
+ #define FUNCTION_PASCAL 0
+ #define FUNCTION_DECLSPEC 0
+ #define FUNCTION_WIN32CC 0
+
+
+#elif defined(__xlc) || defined(__xlC) || defined(__xlC__) || defined(__XLC121__)
+ /*
+ xlc and xlC on RS/6000 from IBM, Inc.
+ */
+ #define TARGET_CPU_PPC 1
+ #define TARGET_CPU_68K 0
+ #define TARGET_CPU_X86 0
+ #define TARGET_CPU_MIPS 0
+ #define TARGET_CPU_SPARC 0
+ #define TARGET_CPU_ALPHA 0
+ #if defined(_AIX)
+ #define TARGET_OS_MAC 0
+ #define TARGET_OS_UNIX 1
+ #else
+ #define TARGET_OS_MAC 1
+ #define TARGET_OS_UNIX 0
+ #endif
+ #define TARGET_OS_WIN32 0
+ #define TARGET_RT_LITTLE_ENDIAN 0
+ #define TARGET_RT_BIG_ENDIAN 1
+ #define TARGET_RT_MAC_CFM 1
+ #define TARGET_RT_MAC_MACHO 0
+ #define TARGET_RT_MAC_68881 0
+ #define PRAGMA_IMPORT 0
+ #define PRAGMA_STRUCT_ALIGN 1
+ #define PRAGMA_ONCE 0
+ #define PRAGMA_STRUCT_PACK 0
+ #define PRAGMA_STRUCT_PACKPUSH 0
+ #define PRAGMA_ENUM_PACK 0
+ #define PRAGMA_ENUM_ALWAYSINT 0
+ #define PRAGMA_ENUM_OPTIONS 1
+ #define FOUR_CHAR_CODE(x) (x)
+
+ #define TYPE_EXTENDED 0
+ #ifdef _LONG_LONG
+ #define TYPE_LONGLONG 1
+ #else
+ #define TYPE_LONGLONG 0
+ #endif
+ #define TYPE_BOOL 0
+
+ #define FUNCTION_PASCAL 0
+ #define FUNCTION_DECLSPEC 0
+ #define FUNCTION_WIN32CC 0
+
+
+#elif defined(_MSC_VER) && !defined(__MWERKS__)
+ /*
+ Visual Studio C/C++ from Microsoft, Inc.
+ */
+ #if defined(_M_M68K) /* Visual C++ with Macintosh 68K target */
+ #define TARGET_CPU_PPC 0
+ #define TARGET_CPU_68K 1
+ #define TARGET_CPU_X86 0
+ #define TARGET_CPU_MIPS 0
+ #define TARGET_CPU_SPARC 0
+ #define TARGET_CPU_ALPHA 0
+ #define TARGET_OS_MAC 1
+ #define TARGET_OS_WIN32 0
+ #define TARGET_OS_UNIX 0
+ #define TARGET_RT_LITTLE_ENDIAN 0
+ #define TARGET_RT_BIG_ENDIAN 1
+ #define TARGET_RT_MAC_CFM 0
+ #define TARGET_RT_MAC_MACHO 0
+ #define TARGET_RT_MAC_68881 0
+ #define PRAGMA_IMPORT 0
+ #define PRAGMA_STRUCT_ALIGN 1
+ #define PRAGMA_ONCE 0
+ #define PRAGMA_STRUCT_PACK 1
+ #define PRAGMA_STRUCT_PACKPUSH 1
+ #define PRAGMA_ENUM_PACK 0
+ #define PRAGMA_ENUM_ALWAYSINT 0
+ #define PRAGMA_ENUM_OPTIONS 0
+ #define FOUR_CHAR_CODE(x) (x)
+ #define TYPE_EXTENDED 0
+ #define TYPE_LONGLONG 0
+ #define TYPE_BOOL 0
+ #define FUNCTION_PASCAL 1
+ #define FUNCTION_DECLSPEC 0
+ #define FUNCTION_WIN32CC 0
+
+ #elif defined(_M_MPPC) /* Visual C++ with Macintosh PowerPC target */
+ #define TARGET_CPU_PPC 1
+ #define TARGET_CPU_68K 0
+ #define TARGET_CPU_X86 0
+ #define TARGET_CPU_MIPS 0
+ #define TARGET_CPU_SPARC 0
+ #define TARGET_CPU_ALPHA 0
+ #define TARGET_OS_MAC 1
+ #define TARGET_OS_WIN32 0
+ #define TARGET_OS_UNIX 0
+ #define TARGET_RT_LITTLE_ENDIAN 0
+ #define TARGET_RT_BIG_ENDIAN 1
+ #define TARGET_RT_MAC_CFM 1
+ #define TARGET_RT_MAC_MACHO 0
+ #define TARGET_RT_MAC_68881 0
+ #define PRAGMA_IMPORT 0
+ #define PRAGMA_STRUCT_ALIGN 1
+ #define PRAGMA_ONCE 0
+ #define PRAGMA_STRUCT_PACK 1
+ #define PRAGMA_STRUCT_PACKPUSH 1
+ #define PRAGMA_ENUM_PACK 0
+ #define PRAGMA_ENUM_ALWAYSINT 0
+ #define PRAGMA_ENUM_OPTIONS 0
+ #define FOUR_CHAR_CODE(x) (x)
+ #define TYPE_EXTENDED 0
+ #define TYPE_LONGLONG 0
+ #define TYPE_BOOL 0
+ #define FUNCTION_PASCAL 0
+ #define FUNCTION_DECLSPEC 0
+ #define FUNCTION_WIN32CC 0
+
+ #elif defined(_M_IX86) /* Visual Studio with Intel x86 target */
+ #define TARGET_CPU_PPC 0
+ #define TARGET_CPU_68K 0
+ #define TARGET_CPU_X86 1
+ #define TARGET_CPU_MIPS 0
+ #define TARGET_CPU_SPARC 0
+ #define TARGET_CPU_ALPHA 0
+ #define TARGET_OS_MAC 0
+ #define TARGET_OS_WIN32 1
+ #define TARGET_OS_UNIX 0
+ #define TARGET_RT_LITTLE_ENDIAN 1
+ #define TARGET_RT_BIG_ENDIAN 0
+ #define PRAGMA_IMPORT 0
+ #define PRAGMA_STRUCT_ALIGN 0
+ #define PRAGMA_ONCE 0
+ #define PRAGMA_STRUCT_PACK 1
+ #define PRAGMA_STRUCT_PACKPUSH 1
+ #define PRAGMA_ENUM_PACK 0
+ #define PRAGMA_ENUM_ALWAYSINT 0
+ #define PRAGMA_ENUM_OPTIONS 0
+ #define FOUR_CHAR_CODE(x) (x)
+ #define TYPE_EXTENDED 0
+ #define TYPE_LONGLONG 1 /* note: uses __int64 instead of long long */
+ #define LONGLONG_TYPENAME __int64
+ #define LONGLONG_SIGNED_MAX (9223372036854775807i64)
+ #define LONGLONG_SIGNED_MIN (-9223372036854775807i64 - 1)
+ #define LONGLONG_UNSIGNED_MAX (0xffffffffffffffffui64)
+ #if defined(__cplusplus) && (_MSC_VER >= 1100)
+ #define TYPE_BOOL 1
+ #else
+ #define TYPE_BOOL 0
+ #endif
+ #define FUNCTION_PASCAL 0
+ #ifndef FUNCTION_DECLSPEC /* allow use of __declspec(dllimport) to be enabled */
+ #define FUNCTION_DECLSPEC 0 /* QuickTime for Windows cannot use dllimport */
+ #endif
+ #ifndef FUNCTION_WIN32CC /* allow calling convention to be overriddden */
+ #define FUNCTION_WIN32CC 1
+ #endif
+ /* Warning: This macros away the pascal word in source code. */
+ /* Very useful for code that needs to compile on Mac 68k and Windows */
+ /* but can silently change code */
+ #undef pascal
+ #define pascal
+
+ #elif defined(_M_ALPHA) /* Visual C++ with Dec Alpha target */
+ #define TARGET_CPU_PPC 0
+ #define TARGET_CPU_68K 0
+ #define TARGET_CPU_X86 0
+ #define TARGET_CPU_MIPS 0
+ #define TARGET_CPU_SPARC 0
+ #define TARGET_CPU_ALPHA 1
+ #define TARGET_OS_MAC 0
+ #define TARGET_OS_WIN32 1
+ #define TARGET_OS_UNIX 0
+ #define TARGET_RT_LITTLE_ENDIAN 1
+ #define TARGET_RT_BIG_ENDIAN 0
+ #define PRAGMA_IMPORT 0
+ #define PRAGMA_STRUCT_ALIGN 0
+ #define PRAGMA_ONCE 0
+ #define PRAGMA_STRUCT_PACK 1
+ #define PRAGMA_STRUCT_PACKPUSH 1
+ #define PRAGMA_ENUM_PACK 0
+ #define PRAGMA_ENUM_ALWAYSINT 0
+ #define PRAGMA_ENUM_OPTIONS 0
+ #define FOUR_CHAR_CODE(x) (((unsigned long) ((x) & 0x000000FF)) << 24) \
+ | (((unsigned long) ((x) & 0x0000FF00)) << 8) \
+ | (((unsigned long) ((x) & 0x00FF0000)) >> 8) \
+ | (((unsigned long) ((x) & 0xFF000000)) >> 24)
+ #define TYPE_EXTENDED 0
+ #define TYPE_LONGLONG 0
+ #define TYPE_BOOL 0
+ #define FUNCTION_PASCAL 0
+ #define FUNCTION_DECLSPEC 0
+ #define FUNCTION_WIN32CC 0
+
+ #elif defined(_M_PPC) /* Visual C++ for Windows NT on PowerPC target */
+ #define TARGET_CPU_PPC 1
+ #define TARGET_CPU_68K 0
+ #define TARGET_CPU_X86 0
+ #define TARGET_CPU_MIPS 0
+ #define TARGET_CPU_SPARC 0
+ #define TARGET_CPU_ALPHA 0
+ #define TARGET_OS_MAC 0
+ #define TARGET_OS_WIN32 1
+ #define TARGET_OS_UNIX 0
+ #define TARGET_RT_LITTLE_ENDIAN 1
+ #define TARGET_RT_BIG_ENDIAN 0
+ #define PRAGMA_IMPORT 0
+ #define PRAGMA_STRUCT_ALIGN 0
+ #define PRAGMA_ONCE 0
+ #define PRAGMA_STRUCT_PACK 1
+ #define PRAGMA_STRUCT_PACKPUSH 1
+ #define PRAGMA_ENUM_PACK 0
+ #define PRAGMA_ENUM_ALWAYSINT 0
+ #define PRAGMA_ENUM_OPTIONS 0
+ #define FOUR_CHAR_CODE(x) (((unsigned long) ((x) & 0x000000FF)) << 24) \
+ | (((unsigned long) ((x) & 0x0000FF00)) << 8) \
+ | (((unsigned long) ((x) & 0x00FF0000)) >> 8) \
+ | (((unsigned long) ((x) & 0xFF000000)) >> 24)
+ #define TYPE_EXTENDED 0
+ #define TYPE_LONGLONG 0
+ #define TYPE_BOOL 0
+ #define FUNCTION_PASCAL 0
+ #define FUNCTION_DECLSPEC 0
+ #define FUNCTION_WIN32CC 0
+
+ #elif defined(_M_MRX000) /* Visual C++ for Windows NT on MIPS target */
+ #define TARGET_CPU_PPC 0
+ #define TARGET_CPU_68K 0
+ #define TARGET_CPU_X86 0
+ #define TARGET_CPU_MIPS 1
+ #define TARGET_CPU_SPARC 0
+ #define TARGET_CPU_ALPHA 0
+ #define TARGET_OS_MAC 0
+ #define TARGET_OS_WIN32 1
+ #define TARGET_OS_UNIX 0
+ #define TARGET_RT_LITTLE_ENDIAN 1
+ #define TARGET_RT_BIG_ENDIAN 0
+ #define PRAGMA_IMPORT 0
+ #define PRAGMA_STRUCT_ALIGN 0
+ #define PRAGMA_ONCE 0
+ #define PRAGMA_STRUCT_PACK 1
+ #define PRAGMA_STRUCT_PACKPUSH 1
+ #define PRAGMA_ENUM_PACK 0
+ #define PRAGMA_ENUM_ALWAYSINT 0
+ #define PRAGMA_ENUM_OPTIONS 0
+ #define FOUR_CHAR_CODE(x) (((unsigned long) ((x) & 0x000000FF)) << 24) \
+ | (((unsigned long) ((x) & 0x0000FF00)) << 8) \
+ | (((unsigned long) ((x) & 0x00FF0000)) >> 8) \
+ | (((unsigned long) ((x) & 0xFF000000)) >> 24)
+ #define TYPE_EXTENDED 0
+ #define TYPE_LONGLONG 0
+ #define TYPE_BOOL 0
+ #define FUNCTION_PASCAL 0
+ #define FUNCTION_DECLSPEC 0
+ #define FUNCTION_WIN32CC 0
+ #endif
+
+
+#elif defined(__MOTO__)
+ /*
+ mcc from Motorola, Inc.
+ */
+ #define TARGET_CPU_PPC 1
+ #define TARGET_CPU_68K 0
+ #define TARGET_CPU_X86 0
+ #define TARGET_CPU_MIPS 0
+ #define TARGET_CPU_SPARC 0
+ #define TARGET_CPU_ALPHA 0
+ #define TARGET_OS_MAC 1
+ #define TARGET_OS_WIN32 0
+ #define TARGET_OS_UNIX 0
+ #define TARGET_RT_LITTLE_ENDIAN 0
+ #define TARGET_RT_BIG_ENDIAN 1
+ #define TARGET_RT_MAC_CFM 1
+ #define TARGET_RT_MAC_MACHO 0
+ #define TARGET_RT_MAC_68881 0
+ #define PRAGMA_IMPORT 0 /* how is this detected ?? */
+ #define PRAGMA_STRUCT_ALIGN 1
+ #if __MOTO__ >= 40702 /* MCC version 4.7.2 */
+ #define PRAGMA_ONCE 1
+ #else
+ #define PRAGMA_ONCE 0
+ #endif
+ #define PRAGMA_STRUCT_PACK 0
+ #define PRAGMA_STRUCT_PACKPUSH 0
+ #define PRAGMA_ENUM_PACK 0
+ #define PRAGMA_ENUM_ALWAYSINT 0
+ #define PRAGMA_ENUM_OPTIONS 0
+ #define FOUR_CHAR_CODE(x) (x)
+ #define TYPE_LONGLONG 0 /* how is this detected ?? */
+ #ifdef _BOOL
+ #define TYPE_BOOL 1
+ #else
+ #define TYPE_BOOL 0
+ #endif
+ #define TYPE_EXTENDED 0
+ #define FUNCTION_PASCAL 0
+ #define FUNCTION_DECLSPEC 0
+ #define FUNCTION_WIN32CC 0
+
+
+
+#elif defined(_MIPS_ISA)
+ /*
+ MIPSpro compiler from Silicon Graphics Inc.
+ */
+ #define TARGET_CPU_PPC 0
+ #define TARGET_CPU_68K 0
+ #define TARGET_CPU_X86 0
+ #define TARGET_CPU_MIPS 1
+ #define TARGET_CPU_SPARC 0
+ #define TARGET_CPU_ALPHA 0
+ #define TARGET_OS_MAC 0
+ #define TARGET_OS_WIN32 0
+ #define TARGET_OS_UNIX 1
+ #define TARGET_RT_LITTLE_ENDIAN 0
+ #define TARGET_RT_BIG_ENDIAN 1
+ #define PRAGMA_IMPORT 0
+ #define PRAGMA_STRUCT_ALIGN 0
+ #define PRAGMA_ONCE 0
+ #define PRAGMA_STRUCT_PACK 1
+ #define PRAGMA_STRUCT_PACKPUSH 0
+ #define PRAGMA_ENUM_PACK 0
+ #define PRAGMA_ENUM_ALWAYSINT 0
+ #define PRAGMA_ENUM_OPTIONS 0
+ #define FOUR_CHAR_CODE(x) (x)
+ #define TYPE_EXTENDED 0
+ #define TYPE_LONGLONG 0
+ #define TYPE_BOOL 0
+ #define FUNCTION_PASCAL 0
+ #define FUNCTION_DECLSPEC 0
+ #define FUNCTION_WIN32CC 0
+
+
+#elif defined(__sparc)
+ /*
+ SPARCompiler compiler from Sun Microsystems Inc.
+ */
+ #define TARGET_CPU_PPC 0
+ #define TARGET_CPU_68K 0
+ #define TARGET_CPU_X86 0
+ #define TARGET_CPU_MIPS 0
+ #define TARGET_CPU_SPARC 1
+ #define TARGET_CPU_ALPHA 0
+ #define TARGET_OS_MAC 0
+ #define TARGET_OS_WIN32 0
+ #define TARGET_OS_UNIX 1
+ #define TARGET_RT_LITTLE_ENDIAN 0
+ #define TARGET_RT_BIG_ENDIAN 1
+ #define PRAGMA_IMPORT 0
+ #define PRAGMA_STRUCT_ALIGN 0
+ #define PRAGMA_ONCE 0
+ #define PRAGMA_STRUCT_PACK 1
+ #define PRAGMA_STRUCT_PACKPUSH 0
+ #define PRAGMA_ENUM_PACK 0
+ #define PRAGMA_ENUM_ALWAYSINT 0
+ #define PRAGMA_ENUM_OPTIONS 0
+ #define FOUR_CHAR_CODE(x) (((unsigned long) ((x) & 0x000000FF)) << 24) \
+ | (((unsigned long) ((x) & 0x0000FF00)) << 8) \
+ | (((unsigned long) ((x) & 0x00FF0000)) >> 8) \
+ | (((unsigned long) ((x) & 0xFF000000)) >> 24)
+ #define TYPE_EXTENDED 0
+ #define TYPE_LONGLONG 0
+ #define TYPE_BOOL 0
+ #define FUNCTION_PASCAL 0
+ #define FUNCTION_DECLSPEC 0
+ #define FUNCTION_WIN32CC 0
+
+
+#else
+ /*
+ Unknown compiler, perhaps set up from the command line (e.g. -d TARGET_CPU_MIPS , etc.)
+ */
+ #if defined(TARGET_CPU_PPC) && TARGET_CPU_PPC
+ #define TARGET_CPU_68K 0
+ #define TARGET_CPU_X86 0
+ #define TARGET_CPU_MIPS 0
+ #define TARGET_CPU_SPARC 0
+ #define TARGET_CPU_ALPHA 0
+ #elif defined(TARGET_CPU_68K) && TARGET_CPU_68K
+ #define TARGET_CPU_PPC 0
+ #define TARGET_CPU_X86 0
+ #define TARGET_CPU_MIPS 0
+ #define TARGET_CPU_SPARC 0
+ #define TARGET_CPU_ALPHA 0
+ #elif defined(TARGET_CPU_X86) && TARGET_CPU_X86
+ #define TARGET_CPU_PPC 0
+ #define TARGET_CPU_68K 0
+ #define TARGET_CPU_MIPS 0
+ #define TARGET_CPU_SPARC 0
+ #define TARGET_CPU_ALPHA 0
+ #elif defined(TARGET_CPU_MIPS) && TARGET_CPU_MIPS
+ #define TARGET_CPU_PPC 0
+ #define TARGET_CPU_68K 0
+ #define TARGET_CPU_X86 0
+ #define TARGET_CPU_SPARC 0
+ #define TARGET_CPU_ALPHA 0
+ #elif defined(TARGET_CPU_SPARC) && TARGET_CPU_SPARC
+ #define TARGET_CPU_PPC 0
+ #define TARGET_CPU_68K 0
+ #define TARGET_CPU_X86 0
+ #define TARGET_CPU_MIPS 0
+ #define TARGET_CPU_ALPHA 0
+ #elif defined(TARGET_CPU_ALPHA) && TARGET_CPU_ALPHA
+ #define TARGET_CPU_PPC 0
+ #define TARGET_CPU_68K 0
+ #define TARGET_CPU_X86 0
+ #define TARGET_CPU_MIPS 0
+ #define TARGET_CPU_SPARC 0
+
+
+ #else
+ /*
+ NOTE: If your compiler errors out here then support for your compiler
+ has not yet been added to ConditionalMacros.h.
+
+ ConditionalMacros.h is designed to be plug-and-play. It auto detects
+ which compiler is being run and configures the TARGET_ conditionals
+ appropriately.
+
+ The short term work around is to set the TARGET_CPU_ and TARGET_OS_
+ on the command line to the compiler (e.g. d TARGET_CPU_MIPS -d TARGET_OS_UNIX)
+
+ The long term solution is to add a new case to this file which
+ auto detects your compiler and sets up the TARGET_ conditionals.
+ If you do this, send the changes you made to devsupport@apple.com
+ to get it integrated into the next release of ConditionalMacros.h.
+ */
+ #error ConditionalMacros.h: unknown compiler (see comment above)
+ #define TARGET_CPU_PPC 0
+ #define TARGET_CPU_68K 0
+ #define TARGET_CPU_X86 0
+ #define TARGET_CPU_MIPS 0
+ #define TARGET_CPU_SPARC 0
+ #define TARGET_CPU_ALPHA 0
+ #endif
+
+
+
+ #if defined(TARGET_OS_MAC) && TARGET_OS_MAC
+ #define TARGET_OS_WIN32 0
+ #define TARGET_OS_UNIX 0
+ #elif defined(TARGET_OS_WIN32) && TARGET_OS_WIN32
+ #define TARGET_OS_MAC 0
+ #define TARGET_OS_UNIX 0
+ #elif defined(TARGET_OS_UNIX) && TARGET_OS_UNIX
+ #define TARGET_OS_MAC 0
+ #define TARGET_OS_WIN32 0
+ #elif TARGET_CPU_PPC || TARGET_CPU_68K
+ #define TARGET_OS_MAC 1
+ #define TARGET_OS_WIN32 0
+ #define TARGET_OS_UNIX 0
+ #else
+ #error ConditionalMacros.h: unknown target OS (see comment above)
+ #endif
+
+ #if !defined(TARGET_RT_BIG_ENDIAN) && !defined(TARGET_RT_LITTLE_ENDIAN)
+ #if TARGET_OS_MAC
+ #define TARGET_RT_LITTLE_ENDIAN 0
+ #define TARGET_RT_BIG_ENDIAN 1
+ #elif TARGET_OS_WIN32
+ #define TARGET_RT_LITTLE_ENDIAN 1
+ #define TARGET_RT_BIG_ENDIAN 0
+ #endif
+ #endif
+
+ #if defined(TARGET_RT_BIG_ENDIAN) && !defined(TARGET_RT_LITTLE_ENDIAN)
+ #define TARGET_RT_LITTLE_ENDIAN !TARGET_RT_BIG_ENDIAN
+ #elif !defined(TARGET_RT_BIG_ENDIAN) && defined(TARGET_RT_LITTLE_ENDIAN)
+ #define TARGET_RT_BIG_ENDIAN !TARGET_RT_LITTLE_ENDIAN
+ #endif
+
+ #if !defined(TARGET_RT_BIG_ENDIAN) && !defined(TARGET_RT_LITTLE_ENDIAN)
+ #error unknown endianess of target processor
+ #endif
+
+ #if TARGET_OS_MAC
+ #ifndef TARGET_RT_MAC_CFM
+ #define TARGET_RT_MAC_CFM TARGET_CPU_PPC
+ #endif
+ #ifndef TARGET_RT_MAC_68881
+ #define TARGET_RT_MAC_68881 0
+ #endif
+ #ifndef TARGET_RT_MAC_MACHO
+ #define TARGET_RT_MAC_MACHO !TARGET_RT_MAC_CFM
+ #endif
+ #endif
+
+
+
+ #ifndef PRAGMA_IMPORT
+ #define PRAGMA_IMPORT 0
+ #endif
+ #ifndef PRAGMA_STRUCT_ALIGN
+ #define PRAGMA_STRUCT_ALIGN 0
+ #endif
+ #ifndef PRAGMA_ONCE
+ #define PRAGMA_ONCE 0
+ #endif
+ #ifndef PRAGMA_STRUCT_PACK
+ #define PRAGMA_STRUCT_PACK 0
+ #endif
+ #ifndef PRAGMA_STRUCT_PACKPUSH
+ #define PRAGMA_STRUCT_PACKPUSH 0
+ #endif
+ #ifndef PRAGMA_ENUM_PACK
+ #define PRAGMA_ENUM_PACK 0
+ #endif
+ #ifndef PRAGMA_ENUM_ALWAYSINT
+ #define PRAGMA_ENUM_ALWAYSINT 0
+ #endif
+ #ifndef PRAGMA_ENUM_OPTIONS
+ #define PRAGMA_ENUM_OPTIONS 0
+ #endif
+ #ifndef FOUR_CHAR_CODE
+ #define FOUR_CHAR_CODE(x) (x)
+ #endif
+
+ #ifndef TYPE_EXTENDED
+ #define TYPE_EXTENDED 0
+ #endif
+ #ifndef TYPE_LONGLONG
+ #define TYPE_LONGLONG 0
+ #endif
+ #ifndef TYPE_BOOL
+ #define TYPE_BOOL 0
+ #endif
+ #ifndef FUNCTION_PASCAL
+ #define FUNCTION_PASCAL 0
+ #endif
+ #ifndef FUNCTION_DECLSPEC
+ #define FUNCTION_DECLSPEC 0
+ #endif
+ #ifndef FUNCTION_WIN32CC
+ #define FUNCTION_WIN32CC 0
+ #endif
+#endif
+
+
+
+
+/****************************************************************************************************
+
+ Under MacOS, the classic 68k runtime has two calling conventions: pascal or C
+ Under Win32, there are two calling conventions: __cdecl or __stdcall
+ Headers and implementation files can use the following macros to make their
+ source more portable by hiding the calling convention details:
+
+ EXTERN_API*
+ These macros are used to specify the calling convention on a function prototype.
+
+ EXTERN_API - Classic 68k: pascal, Win32: __cdecl
+ EXTERN_API_C - Classic 68k: C, Win32: __cdecl
+ EXTERN_API_STDCALL - Classic 68k: pascal, Win32: __stdcall
+ EXTERN_API_C_STDCALL - Classic 68k: C, Win32: __stdcall
+
+
+ DEFINE_API*
+ These macros are used to specify the calling convention on a function definition.
+
+ DEFINE_API - Classic 68k: pascal, Win32: __cdecl
+ DEFINE_API_C - Classic 68k: C, Win32: __cdecl
+ DEFINE_API_STDCALL - Classic 68k: pascal, Win32: __stdcall
+ DEFINE_API_C_STDCALL - Classic 68k: C, Win32: __stdcall
+
+
+ CALLBACK_API*
+ These macros are used to specify the calling convention of a function pointer.
+
+ CALLBACK_API - Classic 68k: pascal, Win32: __stdcall
+ CALLBACK_API_C - Classic 68k: C, Win32: __stdcall
+ CALLBACK_API_STDCALL - Classic 68k: pascal, Win32: __cdecl
+ CALLBACK_API_C_STDCALL - Classic 68k: C, Win32: __cdecl
+
+****************************************************************************************************/
+
+#if FUNCTION_PASCAL && !FUNCTION_DECLSPEC && !FUNCTION_WIN32CC
+ /* compiler supports pascal keyword only */
+ #define EXTERN_API(_type) extern pascal _type
+ #define EXTERN_API_C(_type) extern _type
+ #define EXTERN_API_STDCALL(_type) extern pascal _type
+ #define EXTERN_API_C_STDCALL(_type) extern _type
+
+ #define DEFINE_API(_type) pascal _type
+ #define DEFINE_API_C(_type) _type
+ #define DEFINE_API_STDCALL(_type) pascal _type
+ #define DEFINE_API_C_STDCALL(_type) _type
+
+ #define CALLBACK_API(_type, _name) pascal _type (*_name)
+ #define CALLBACK_API_C(_type, _name) _type (*_name)
+ #define CALLBACK_API_STDCALL(_type, _name) pascal _type (*_name)
+ #define CALLBACK_API_C_STDCALL(_type, _name) _type (*_name)
+
+#elif FUNCTION_PASCAL && FUNCTION_DECLSPEC && !FUNCTION_WIN32CC
+ /* compiler supports pascal and __declspec() */
+ #define EXTERN_API(_type) extern pascal __declspec(dllimport) _type
+ #define EXTERN_API_C(_type) extern __declspec(dllimport) _type
+ #define EXTERN_API_STDCALL(_type) extern pascal __declspec(dllimport) _type
+ #define EXTERN_API_C_STDCALL(_type) extern __declspec(dllimport) _type
+
+ #define DEFINE_API(_type) pascal __declspec(dllexport) _type
+ #define DEFINE_API_C(_type) __declspec(dllexport) _type
+ #define DEFINE_API_STDCALL(_type) pascal __declspec(dllexport) _type
+ #define DEFINE_API_C_STDCALL(_type) __declspec(dllexport) _type
+
+ #define CALLBACK_API(_type, _name) pascal _type (*_name)
+ #define CALLBACK_API_C(_type, _name) _type (*_name)
+ #define CALLBACK_API_STDCALL(_type, _name) pascal _type (*_name)
+ #define CALLBACK_API_C_STDCALL(_type, _name) _type (*_name)
+
+#elif !FUNCTION_PASCAL && FUNCTION_DECLSPEC && !FUNCTION_WIN32CC
+ /* compiler supports __declspec() */
+ #define EXTERN_API(_type) extern __declspec(dllimport) _type
+ #define EXTERN_API_C(_type) extern __declspec(dllimport) _type
+ #define EXTERN_API_STDCALL(_type) extern __declspec(dllimport) _type
+ #define EXTERN_API_C_STDCALL(_type) extern __declspec(dllimport) _type
+
+ #define DEFINE_API(_type) __declspec(dllexport) _type
+ #define DEFINE_API_C(_type) __declspec(dllexport) _type
+ #define DEFINE_API_STDCALL(_type) __declspec(dllexport) _type
+ #define DEFINE_API_C_STDCALL(_type) __declspec(dllexport) _type
+
+ #define CALLBACK_API(_type, _name) _type ( * _name)
+ #define CALLBACK_API_C(_type, _name) _type ( * _name)
+ #define CALLBACK_API_STDCALL(_type, _name) _type ( * _name)
+ #define CALLBACK_API_C_STDCALL(_type, _name) _type ( * _name)
+
+#elif !FUNCTION_PASCAL && FUNCTION_DECLSPEC && FUNCTION_WIN32CC
+ /* compiler supports __declspec() and __cdecl */
+ #define EXTERN_API(_type) __declspec(dllimport) _type __cdecl
+ #define EXTERN_API_C(_type) __declspec(dllimport) _type __cdecl
+ #define EXTERN_API_STDCALL(_type) __declspec(dllimport) _type __stdcall
+ #define EXTERN_API_C_STDCALL(_type) __declspec(dllimport) _type __stdcall
+
+ #define DEFINE_API(_type) __declspec(dllexport) _type __cdecl
+ #define DEFINE_API_C(_type) __declspec(dllexport) _type __cdecl
+ #define DEFINE_API_STDCALL(_type) __declspec(dllexport) _type __stdcall
+ #define DEFINE_API_C_STDCALL(_type) __declspec(dllexport) _type __stdcall
+
+ #define CALLBACK_API(_type, _name) _type (__cdecl * _name)
+ #define CALLBACK_API_C(_type, _name) _type (__cdecl * _name)
+ #define CALLBACK_API_STDCALL(_type, _name) _type (__stdcall * _name)
+ #define CALLBACK_API_C_STDCALL(_type, _name) _type (__stdcall * _name)
+
+#elif !FUNCTION_PASCAL && !FUNCTION_DECLSPEC && FUNCTION_WIN32CC
+ /* compiler supports __cdecl */
+ #define EXTERN_API(_type) _type __cdecl
+ #define EXTERN_API_C(_type) _type __cdecl
+ #define EXTERN_API_STDCALL(_type) _type __stdcall
+ #define EXTERN_API_C_STDCALL(_type) _type __stdcall
+
+ #define DEFINE_API(_type) _type __cdecl
+ #define DEFINE_API_C(_type) _type __cdecl
+ #define DEFINE_API_STDCALL(_type) _type __stdcall
+ #define DEFINE_API_C_STDCALL(_type) _type __stdcall
+
+ #define CALLBACK_API(_type, _name) _type (__cdecl * _name)
+ #define CALLBACK_API_C(_type, _name) _type (__cdecl * _name)
+ #define CALLBACK_API_STDCALL(_type, _name) _type (__stdcall * _name)
+ #define CALLBACK_API_C_STDCALL(_type, _name) _type (__stdcall * _name)
+
+#else
+ /* compiler supports no extensions */
+ #define EXTERN_API(_type) extern _type
+ #define EXTERN_API_C(_type) extern _type
+ #define EXTERN_API_STDCALL(_type) extern _type
+ #define EXTERN_API_C_STDCALL(_type) extern _type
+
+ #define DEFINE_API(_type) _type
+ #define DEFINE_API_C(_type) _type
+ #define DEFINE_API_STDCALL(_type) _type
+ #define DEFINE_API_C_STDCALL(_type) _type
+
+ #define CALLBACK_API(_type, _name) _type ( * _name)
+ #define CALLBACK_API_C(_type, _name) _type ( * _name)
+ #define CALLBACK_API_STDCALL(_type, _name) _type ( * _name)
+ #define CALLBACK_API_C_STDCALL(_type, _name) _type ( * _name)
+ #undef pascal
+ #define pascal
+#endif
+
+/****************************************************************************************************
+
+ Set up TARGET_API_*_* values
+
+****************************************************************************************************/
+#if TARGET_OS_MAC
+#if !defined(TARGET_API_MAC_OS8) && !defined(TARGET_API_MAC_OSX) && !defined(TARGET_API_MAC_CARBON)
+/* No TARGET_API_MAC_* predefind on command line */
+#if defined(TARGET_CARBON) && TARGET_CARBON
+/* grandfather in use of TARGET_CARBON */
+#define TARGET_API_MAC_OS8 0
+#define TARGET_API_MAC_CARBON 1
+#define TARGET_API_MAC_OSX 0
+#elif TARGET_CPU_PPC && TARGET_RT_MAC_CFM
+/* Looks like CFM style PPC compiler */
+#define TARGET_API_MAC_OS8 1
+#define TARGET_API_MAC_CARBON 0
+#define TARGET_API_MAC_OSX 0
+#elif TARGET_RT_MAC_MACHO
+/* Looks like MachO style PPC compiler */
+#define TARGET_API_MAC_OS8 0
+#define TARGET_API_MAC_CARBON 0
+#define TARGET_API_MAC_OSX 1
+#else
+/* 68k or some other compiler */
+#define TARGET_API_MAC_OS8 1
+#define TARGET_API_MAC_CARBON 0
+#define TARGET_API_MAC_OSX 0
+#endif /* */
+
+#else
+#ifndef TARGET_API_MAC_OS8
+#define TARGET_API_MAC_OS8 0
+#endif /* !defined(TARGET_API_MAC_OS8) */
+
+#ifndef TARGET_API_MAC_CARBON
+#define TARGET_API_MAC_CARBON 0
+#endif /* !defined(TARGET_API_MAC_CARBON) */
+
+#ifndef TARGET_API_MAC_OSX
+#define TARGET_API_MAC_OSX 0
+#endif /* !defined(TARGET_API_MAC_OSX) */
+
+#endif /* !defined(TARGET_API_MAC_OS8) && !defined(TARGET_API_MAC_OSX) && !defined(TARGET_API_MAC_CARBON) */
+
+#if TARGET_API_MAC_OS8 && TARGET_API_MAC_OSX
+#error TARGET_API_MAC_OS8 and TARGET_API_MAC_OSX are mutually exclusive
+#endif /* TARGET_API_MAC_OS8 && TARGET_API_MAC_OSX */
+
+#if !TARGET_API_MAC_OS8 && !TARGET_API_MAC_CARBON && !TARGET_API_MAC_OSX
+#error At least one of TARGET_API_MAC_* must be true
+#endif /* !TARGET_API_MAC_OS8 && !TARGET_API_MAC_CARBON && !TARGET_API_MAC_OSX */
+
+#else
+#define TARGET_API_MAC_OS8 0
+#define TARGET_API_MAC_CARBON 0
+#define TARGET_API_MAC_OSX 0
+#endif /* TARGET_OS_MAC */
+
+/* Support source code still using TARGET_CARBON */
+#ifndef TARGET_CARBON
+#if TARGET_API_MAC_CARBON && !TARGET_API_MAC_OS8
+#define TARGET_CARBON 1
+#else
+#define TARGET_CARBON 0
+#endif /* TARGET_API_MAC_CARBON && !TARGET_API_MAC_OS8 */
+
+#endif /* !defined(TARGET_CARBON) */
+
+/* Set forCarbon to 0 if it's not already defined */
+#ifndef forCarbon
+#define forCarbon 0
+#endif /* !defined(forCarbon) */
+
+/****************************************************************************************************
+ Backward compatibility for clients expecting 2.x version on ConditionalMacros.h
+
+ GENERATINGPOWERPC - Compiler is generating PowerPC instructions
+ GENERATING68K - Compiler is generating 68k family instructions
+ GENERATING68881 - Compiler is generating mc68881 floating point instructions
+ GENERATINGCFM - Code being generated assumes CFM calling conventions
+ CFMSYSTEMCALLS - No A-traps. Systems calls are made using CFM and UPP's
+ PRAGMA_ALIGN_SUPPORTED - Compiler supports: #pragma options align=mac68k/power/reset
+ PRAGMA_IMPORT_SUPPORTED - Compiler supports: #pragma import on/off/reset
+ CGLUESUPPORTED - Clients can use all lowercase toolbox functions that take C strings instead of pascal strings
+
+****************************************************************************************************/
+#if TARGET_API_MAC_OS8 || !TARGET_OS_MAC
+#define GENERATINGPOWERPC TARGET_CPU_PPC
+#define GENERATING68K TARGET_CPU_68K
+#define GENERATING68881 TARGET_RT_MAC_68881
+#define GENERATINGCFM TARGET_RT_MAC_CFM
+#define CFMSYSTEMCALLS TARGET_RT_MAC_CFM
+#ifndef CGLUESUPPORTED
+#define CGLUESUPPORTED 0
+#endif /* !defined(CGLUESUPPORTED) */
+
+#ifndef OLDROUTINELOCATIONS
+#define OLDROUTINELOCATIONS 0
+#endif /* !defined(OLDROUTINELOCATIONS) */
+
+#define PRAGMA_ALIGN_SUPPORTED PRAGMA_STRUCT_ALIGN
+#define PRAGMA_IMPORT_SUPPORTED PRAGMA_IMPORT
+#else
+/* Carbon code should not use old conditionals */
+#define PRAGMA_ALIGN_SUPPORTED ..PRAGMA_ALIGN_SUPPORTED_is_obsolete..
+#define GENERATINGPOWERPC ..GENERATINGPOWERPC_is_obsolete..
+#define GENERATING68K ..GENERATING68K_is_obsolete..
+#define GENERATING68881 ..GENERATING68881_is_obsolete..
+#define GENERATINGCFM ..GENERATINGCFM_is_obsolete..
+#define CFMSYSTEMCALLS ..CFMSYSTEMCALLS_is_obsolete..
+#endif /* TARGET_API_MAC_OS8 || !TARGET_OS_MAC */
+
+
+
+/****************************************************************************************************
+
+ OLDROUTINENAMES - "Old" names for Macintosh system calls are allowed in source code.
+ (e.g. DisposPtr instead of DisposePtr). The names of system routine
+ are now more sensitive to change because CFM binds by name. In the
+ past, system routine names were compiled out to just an A-Trap.
+ Macros have been added that each map an old name to its new name.
+ This allows old routine names to be used in existing source files,
+ but the macros only work if OLDROUTINENAMES is true. This support
+ will be removed in the near future. Thus, all source code should
+ be changed to use the new names! You can set OLDROUTINENAMES to false
+ to see if your code has any old names left in it.
+
+****************************************************************************************************/
+#ifndef OLDROUTINENAMES
+#define OLDROUTINENAMES 0
+#endif /* !defined(OLDROUTINENAMES) */
+
+
+
+/****************************************************************************************************
+ The following macros isolate the use of 68K inlines in function prototypes.
+ On the Mac OS under the Classic 68K runtime, function prototypes were followed
+ by a list of 68K opcodes which the compiler inserted in the generated code instead
+ of a JSR. Under Classic 68K on the Mac OS, this macro will put the opcodes
+ in the right syntax. For all other OS's and runtimes the macro suppress the opcodes.
+ Example:
+
+ EXTERN_P void DrawPicture(PicHandle myPicture, const Rect *dstRect)
+ ONEWORDINLINE(0xA8F6);
+
+****************************************************************************************************/
+
+#if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #define ONEWORDINLINE(w1) = w1
+ #define TWOWORDINLINE(w1,w2) = {w1,w2}
+ #define THREEWORDINLINE(w1,w2,w3) = {w1,w2,w3}
+ #define FOURWORDINLINE(w1,w2,w3,w4) = {w1,w2,w3,w4}
+ #define FIVEWORDINLINE(w1,w2,w3,w4,w5) = {w1,w2,w3,w4,w5}
+ #define SIXWORDINLINE(w1,w2,w3,w4,w5,w6) = {w1,w2,w3,w4,w5,w6}
+ #define SEVENWORDINLINE(w1,w2,w3,w4,w5,w6,w7) = {w1,w2,w3,w4,w5,w6,w7}
+ #define EIGHTWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8) = {w1,w2,w3,w4,w5,w6,w7,w8}
+ #define NINEWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9) = {w1,w2,w3,w4,w5,w6,w7,w8,w9}
+ #define TENWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10) = {w1,w2,w3,w4,w5,w6,w7,w8,w9,w10}
+ #define ELEVENWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11) = {w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11}
+ #define TWELVEWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11,w12) = {w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11,w12}
+#else
+ #define ONEWORDINLINE(w1)
+ #define TWOWORDINLINE(w1,w2)
+ #define THREEWORDINLINE(w1,w2,w3)
+ #define FOURWORDINLINE(w1,w2,w3,w4)
+ #define FIVEWORDINLINE(w1,w2,w3,w4,w5)
+ #define SIXWORDINLINE(w1,w2,w3,w4,w5,w6)
+ #define SEVENWORDINLINE(w1,w2,w3,w4,w5,w6,w7)
+ #define EIGHTWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8)
+ #define NINEWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9)
+ #define TENWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10)
+ #define ELEVENWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11)
+ #define TWELVEWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11,w12)
+#endif
+
+
+/****************************************************************************************************
+
+ TARGET_CARBON - default: false. Switches all of the above as described. Overrides all others
+ - NOTE: If you set TARGET_CARBON to 1, then the other switches will be setup by
+ ConditionalMacros, and should not be set manually.
+
+ If you wish to do development for pre-Carbon Systems, you can set the following:
+
+ OPAQUE_TOOLBOX_STRUCTS - default: false. True for Carbon builds, hides struct fields.
+ OPAQUE_UPP_TYPES - default: false. True for Carbon builds, UPP types are unique and opaque.
+ ACCESSOR_CALLS_ARE_FUNCTIONS - default: false. True for Carbon builds, enables accessor functions.
+ CALL_NOT_IN_CARBON - default: true. False for Carbon builds, hides calls not supported in Carbon.
+
+ Specifically, if you are building a non-Carbon application (one that links against InterfaceLib)
+ but you wish to use some of the accessor functions, you can set ACCESSOR_CALLS_ARE_FUNCTIONS to 1
+ and link with CarbonAccessors.o, which implements just the accessor functions. This will help you
+ preserve source compatibility between your Carbon and non-Carbon application targets.
+
+ MIXEDMODE_CALLS_ARE_FUNCTIONS - deprecated.
+
+****************************************************************************************************/
+#if TARGET_API_MAC_CARBON && !TARGET_API_MAC_OS8
+#ifndef OPAQUE_TOOLBOX_STRUCTS
+#define OPAQUE_TOOLBOX_STRUCTS 1
+#endif /* !defined(OPAQUE_TOOLBOX_STRUCTS) */
+
+#ifndef OPAQUE_UPP_TYPES
+#define OPAQUE_UPP_TYPES 1
+#endif /* !defined(OPAQUE_UPP_TYPES) */
+
+#ifndef ACCESSOR_CALLS_ARE_FUNCTIONS
+#define ACCESSOR_CALLS_ARE_FUNCTIONS 1
+#endif /* !defined(ACCESSOR_CALLS_ARE_FUNCTIONS) */
+
+#ifndef CALL_NOT_IN_CARBON
+#define CALL_NOT_IN_CARBON 0
+#endif /* !defined(CALL_NOT_IN_CARBON) */
+
+#ifndef MIXEDMODE_CALLS_ARE_FUNCTIONS
+#define MIXEDMODE_CALLS_ARE_FUNCTIONS 1
+#endif /* !defined(MIXEDMODE_CALLS_ARE_FUNCTIONS) */
+
+#else
+#ifndef OPAQUE_TOOLBOX_STRUCTS
+#define OPAQUE_TOOLBOX_STRUCTS 0
+#endif /* !defined(OPAQUE_TOOLBOX_STRUCTS) */
+
+#ifndef OPAQUE_UPP_TYPES
+#define OPAQUE_UPP_TYPES 0
+#endif /* !defined(OPAQUE_UPP_TYPES) */
+
+#ifndef ACCESSOR_CALLS_ARE_FUNCTIONS
+#define ACCESSOR_CALLS_ARE_FUNCTIONS 0
+#endif /* !defined(ACCESSOR_CALLS_ARE_FUNCTIONS) */
+
+/*
+ * It's possible to have ACCESSOR_CALLS_ARE_FUNCTIONS set to true and OPAQUE_TOOLBOX_STRUCTS
+ * set to false, but not the other way around, so make sure the defines are not set this way.
+ */
+#if OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
+#error OPAQUE_TOOLBOX_STRUCTS cannot be true when ACCESSOR_CALLS_ARE_FUNCTIONS is false
+#endif /* OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS */
+
+#ifndef CALL_NOT_IN_CARBON
+#define CALL_NOT_IN_CARBON 1
+#endif /* !defined(CALL_NOT_IN_CARBON) */
+
+#ifndef MIXEDMODE_CALLS_ARE_FUNCTIONS
+#define MIXEDMODE_CALLS_ARE_FUNCTIONS 0
+#endif /* !defined(MIXEDMODE_CALLS_ARE_FUNCTIONS) */
+
+#endif /* TARGET_API_MAC_CARBON && !TARGET_API_MAC_OS8 */
+
+
+#if TARGET_RT_MAC_MACHO && TARGET_RT_LITTLE_ENDIAN
+#define OLD_COMPONENT_GLUE 1
+#endif
+
+
+
+
+#endif /* __CONDITIONALMACROS__ */
+
diff --git a/include/qt/ConnectionTools.h b/include/qt/ConnectionTools.h
new file mode 100644
index 000000000..b27ef59a6
--- /dev/null
+++ b/include/qt/ConnectionTools.h
@@ -0,0 +1,176 @@
+/*
+ File: ConnectionTools.h
+
+ Contains: Communications Toolbox Connection Tools Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1988-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CONNECTIONTOOLS__
+#define __CONNECTIONTOOLS__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __DIALOGS__
+#include "Dialogs.h"
+#endif
+
+#ifndef __CONNECTIONS__
+#include "Connections.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if CALL_NOT_IN_CARBON
+enum {
+ /* messages for DefProc */
+ cmInitMsg = 0,
+ cmDisposeMsg = 1,
+ cmSuspendMsg = 2,
+ cmResumeMsg = 3,
+ cmMenuMsg = 4,
+ cmEventMsg = 5,
+ cmActivateMsg = 6,
+ cmDeactivateMsg = 7,
+ cmIdleMsg = 50,
+ cmResetMsg = 51,
+ cmAbortMsg = 52,
+ cmReadMsg = 100,
+ cmWriteMsg = 101,
+ cmStatusMsg = 102,
+ cmListenMsg = 103,
+ cmAcceptMsg = 104,
+ cmCloseMsg = 105,
+ cmOpenMsg = 106,
+ cmBreakMsg = 107,
+ cmIOKillMsg = 108,
+ cmEnvironsMsg = 109, /* new connection tool messages for ctb 1.1 */
+ cmNewIOPBMsg = 110,
+ cmDisposeIOPBMsg = 111,
+ cmGetErrorStringMsg = 112,
+ cmPBReadMsg = 113,
+ cmPBWriteMsg = 114,
+ cmPBIOKillMsg = 115
+};
+
+enum {
+ /* messages for validate DefProc */
+ cmValidateMsg = 0,
+ cmDefaultMsg = 1
+};
+
+enum {
+ /* messages for Setup DefProc */
+ cmSpreflightMsg = 0,
+ cmSsetupMsg = 1,
+ cmSitemMsg = 2,
+ cmSfilterMsg = 3,
+ cmScleanupMsg = 4
+};
+
+enum {
+ /* messages for scripting defProc */
+ cmMgetMsg = 0,
+ cmMsetMsg = 1
+};
+
+enum {
+ /* messages for localization defProc */
+ cmL2English = 0,
+ cmL2Intl = 1
+};
+
+enum {
+ /* private data constants */
+ cdefType = FOUR_CHAR_CODE('cdef'), /* main connection definition procedure */
+ cvalType = FOUR_CHAR_CODE('cval'), /* validation definition procedure */
+ csetType = FOUR_CHAR_CODE('cset'), /* connection setup definition procedure */
+ clocType = FOUR_CHAR_CODE('cloc'), /* connection configuration localization defProc */
+ cscrType = FOUR_CHAR_CODE('cscr'), /* connection scripting defProc interfaces */
+ cbndType = FOUR_CHAR_CODE('cbnd'), /* bundle type for connection */
+ cverType = FOUR_CHAR_CODE('vers')
+};
+
+
+struct CMDataBuffer {
+ Ptr thePtr;
+ long count;
+ CMChannel channel;
+ CMFlags flags;
+};
+typedef struct CMDataBuffer CMDataBuffer;
+typedef CMDataBuffer * CMDataBufferPtr;
+
+struct CMCompletorRecord {
+ Boolean async;
+ SInt8 filler;
+ ConnectionCompletionUPP completionRoutine;
+};
+typedef struct CMCompletorRecord CMCompletorRecord;
+
+typedef CMCompletorRecord * CMCompletorPtr;
+/* Private Data Structure */
+
+struct CMSetupStruct {
+ DialogPtr theDialog;
+ short count;
+ Ptr theConfig;
+ short procID; /* procID of the tool */
+};
+typedef struct CMSetupStruct CMSetupStruct;
+
+typedef CMSetupStruct * CMSetupPtr;
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CONNECTIONTOOLS__ */
+
diff --git a/include/qt/Connections.h b/include/qt/Connections.h
new file mode 100644
index 000000000..01f498483
--- /dev/null
+++ b/include/qt/Connections.h
@@ -0,0 +1,572 @@
+/*
+ File: Connections.h
+
+ Contains: Communications Toolbox Connection Manager Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1988-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CONNECTIONS__
+#define __CONNECTIONS__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+#ifndef __DIALOGS__
+#include "Dialogs.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if CALL_NOT_IN_CARBON
+enum {
+ curCMVersion = 2 /* current Connection Manager version*/
+};
+
+enum {
+ curConnEnvRecVers = 0 /* current Connection Manager Environment Record version*/
+};
+
+enum {
+ /* CMErr */
+ cmGenericError = -1,
+ cmNoErr = 0,
+ cmRejected = 1,
+ cmFailed = 2,
+ cmTimeOut = 3,
+ cmNotOpen = 4,
+ cmNotClosed = 5,
+ cmNoRequestPending = 6,
+ cmNotSupported = 7,
+ cmNoTools = 8,
+ cmUserCancel = 9,
+ cmUnknownError = 11
+};
+
+typedef OSErr CMErr;
+
+enum {
+ cmData = 1L << 0,
+ cmCntl = 1L << 1,
+ cmAttn = 1L << 2,
+ cmDataNoTimeout = 1L << 4,
+ cmCntlNoTimeout = 1L << 5,
+ cmAttnNoTimeout = 1L << 6,
+ cmDataClean = 1L << 8,
+ cmCntlClean = 1L << 9,
+ cmAttnClean = 1L << 10, /* Only for CMRecFlags (not CMChannel) in the rest of this enum */
+ cmNoMenus = 1L << 16,
+ cmQuiet = 1L << 17,
+ cmConfigChanged = 1L << 18
+};
+
+/* CMRecFlags and CMChannel */
+/* Low word of CMRecFlags is same as CMChannel */
+typedef long CMRecFlags;
+typedef short CMChannel;
+
+
+enum {
+ cmStatusOpening = 1L << 0,
+ cmStatusOpen = 1L << 1,
+ cmStatusClosing = 1L << 2,
+ cmStatusDataAvail = 1L << 3,
+ cmStatusCntlAvail = 1L << 4,
+ cmStatusAttnAvail = 1L << 5,
+ cmStatusDRPend = 1L << 6, /* data read pending */
+ cmStatusDWPend = 1L << 7, /* data write pending */
+ cmStatusCRPend = 1L << 8, /* cntl read pending */
+ cmStatusCWPend = 1L << 9, /* cntl write pending */
+ cmStatusARPend = 1L << 10, /* attn read pending */
+ cmStatusAWPend = 1L << 11, /* attn write pending */
+ cmStatusBreakPend = 1L << 12,
+ cmStatusListenPend = 1L << 13,
+ cmStatusIncomingCallPresent = 1L << 14,
+ cmStatusReserved0 = 1L << 15
+};
+
+typedef unsigned long CMStatFlags;
+enum {
+ cmDataIn = 0,
+ cmDataOut = 1,
+ cmCntlIn = 2,
+ cmCntlOut = 3,
+ cmAttnIn = 4,
+ cmAttnOut = 5,
+ cmRsrvIn = 6,
+ cmRsrvOut = 7
+};
+
+typedef unsigned short CMBufFields;
+typedef Ptr CMBuffers[8];
+typedef long CMBufferSizes[8];
+typedef const long * ConstCMBufferSizesParam;
+enum {
+ cmSearchSevenBit = 1L << 0
+};
+
+typedef unsigned short CMSearchFlags;
+enum {
+ cmFlagsEOM = 1L << 0
+};
+
+typedef unsigned short CMFlags;
+
+struct ConnEnvironRec {
+ short version;
+ long baudRate;
+ short dataBits;
+ CMChannel channels;
+ Boolean swFlowControl;
+ Boolean hwFlowControl;
+ CMFlags flags;
+};
+typedef struct ConnEnvironRec ConnEnvironRec;
+typedef ConnEnvironRec * ConnEnvironRecPtr;
+typedef struct ConnRecord ConnRecord;
+
+typedef ConnRecord * ConnPtr;
+typedef ConnPtr * ConnHandle;
+typedef CALLBACK_API( long , ConnectionToolDefProcPtr )(ConnHandle hConn, short msg, long p1, long p2, long p3);
+typedef CALLBACK_API( void , ConnectionSearchCallBackProcPtr )(ConnHandle hConn, Ptr matchPtr, long refNum);
+typedef CALLBACK_API( void , ConnectionCompletionProcPtr )(ConnHandle hConn);
+typedef CALLBACK_API( void , ConnectionChooseIdleProcPtr )(void );
+typedef STACK_UPP_TYPE(ConnectionToolDefProcPtr) ConnectionToolDefUPP;
+typedef STACK_UPP_TYPE(ConnectionSearchCallBackProcPtr) ConnectionSearchCallBackUPP;
+typedef STACK_UPP_TYPE(ConnectionCompletionProcPtr) ConnectionCompletionUPP;
+typedef STACK_UPP_TYPE(ConnectionChooseIdleProcPtr) ConnectionChooseIdleUPP;
+
+struct ConnRecord {
+ short procID;
+ CMRecFlags flags;
+ CMErr errCode;
+ long refCon;
+ long userData;
+ ConnectionToolDefUPP defProc;
+ Ptr config;
+ Ptr oldConfig;
+ long asyncEOM;
+ long reserved1;
+ long reserved2;
+ Ptr cmPrivate;
+ CMBuffers bufferArray;
+ CMBufferSizes bufSizes;
+ long mluField;
+ CMBufferSizes asyncCount;
+};
+
+enum {
+ /* CMIOPB constants and structure */
+ cmIOPBQType = 10,
+ cmIOPBversion = 0
+};
+
+
+struct CMIOPB {
+ QElemPtr qLink;
+ short qType; /* cmIOPBQType */
+ ConnHandle hConn;
+ Ptr theBuffer;
+ long count;
+ CMFlags flags;
+ ConnectionCompletionUPP userCompletion;
+ long timeout;
+ CMErr errCode;
+ CMChannel channel;
+ long asyncEOM;
+ long reserved1;
+ short reserved2;
+ short version; /* cmIOPBversion */
+ long refCon; /* for application */
+ long toolData1; /* for tool */
+ long toolData2; /* for tool */
+};
+typedef struct CMIOPB CMIOPB;
+typedef CMIOPB * CMIOPBPtr;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(ConnectionToolDefUPP)
+ NewConnectionToolDefUPP (ConnectionToolDefProcPtr userRoutine);
+
+ EXTERN_API(ConnectionSearchCallBackUPP)
+ NewConnectionSearchCallBackUPP (ConnectionSearchCallBackProcPtr userRoutine);
+
+ EXTERN_API(ConnectionCompletionUPP)
+ NewConnectionCompletionUPP (ConnectionCompletionProcPtr userRoutine);
+
+ EXTERN_API(ConnectionChooseIdleUPP)
+ NewConnectionChooseIdleUPP (ConnectionChooseIdleProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeConnectionToolDefUPP (ConnectionToolDefUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeConnectionSearchCallBackUPP (ConnectionSearchCallBackUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeConnectionCompletionUPP (ConnectionCompletionUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeConnectionChooseIdleUPP (ConnectionChooseIdleUPP userUPP);
+
+ EXTERN_API(long)
+ InvokeConnectionToolDefUPP (ConnHandle hConn,
+ short msg,
+ long p1,
+ long p2,
+ long p3,
+ ConnectionToolDefUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeConnectionSearchCallBackUPP (ConnHandle hConn,
+ Ptr matchPtr,
+ long refNum,
+ ConnectionSearchCallBackUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeConnectionCompletionUPP (ConnHandle hConn,
+ ConnectionCompletionUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeConnectionChooseIdleUPP (ConnectionChooseIdleUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppConnectionToolDefProcInfo = 0x0000FEF0 }; /* pascal 4_bytes Func(4_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppConnectionSearchCallBackProcInfo = 0x00000FC0 }; /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppConnectionCompletionProcInfo = 0x000000C0 }; /* pascal no_return_value Func(4_bytes) */
+ enum { uppConnectionChooseIdleProcInfo = 0x00000000 }; /* pascal no_return_value Func() */
+ #define NewConnectionToolDefUPP(userRoutine) (ConnectionToolDefUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppConnectionToolDefProcInfo, GetCurrentArchitecture())
+ #define NewConnectionSearchCallBackUPP(userRoutine) (ConnectionSearchCallBackUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppConnectionSearchCallBackProcInfo, GetCurrentArchitecture())
+ #define NewConnectionCompletionUPP(userRoutine) (ConnectionCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppConnectionCompletionProcInfo, GetCurrentArchitecture())
+ #define NewConnectionChooseIdleUPP(userRoutine) (ConnectionChooseIdleUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppConnectionChooseIdleProcInfo, GetCurrentArchitecture())
+ #define DisposeConnectionToolDefUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeConnectionSearchCallBackUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeConnectionCompletionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeConnectionChooseIdleUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeConnectionToolDefUPP(hConn, msg, p1, p2, p3, userUPP) (long)CALL_FIVE_PARAMETER_UPP((userUPP), uppConnectionToolDefProcInfo, (hConn), (msg), (p1), (p2), (p3))
+ #define InvokeConnectionSearchCallBackUPP(hConn, matchPtr, refNum, userUPP) CALL_THREE_PARAMETER_UPP((userUPP), uppConnectionSearchCallBackProcInfo, (hConn), (matchPtr), (refNum))
+ #define InvokeConnectionCompletionUPP(hConn, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppConnectionCompletionProcInfo, (hConn))
+ #define InvokeConnectionChooseIdleUPP(userUPP) CALL_ZERO_PARAMETER_UPP((userUPP), uppConnectionChooseIdleProcInfo)
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewConnectionToolDefProc(userRoutine) NewConnectionToolDefUPP(userRoutine)
+#define NewConnectionSearchCallBackProc(userRoutine) NewConnectionSearchCallBackUPP(userRoutine)
+#define NewConnectionCompletionProc(userRoutine) NewConnectionCompletionUPP(userRoutine)
+#define NewConnectionChooseIdleProc(userRoutine) NewConnectionChooseIdleUPP(userRoutine)
+#define CallConnectionToolDefProc(userRoutine, hConn, msg, p1, p2, p3) InvokeConnectionToolDefUPP(hConn, msg, p1, p2, p3, userRoutine)
+#define CallConnectionSearchCallBackProc(userRoutine, hConn, matchPtr, refNum) InvokeConnectionSearchCallBackUPP(hConn, matchPtr, refNum, userRoutine)
+#define CallConnectionCompletionProc(userRoutine, hConn) InvokeConnectionCompletionUPP(hConn, userRoutine)
+#define CallConnectionChooseIdleProc(userRoutine) InvokeConnectionChooseIdleUPP(userRoutine)
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( CMErr )
+InitCM (void);
+
+EXTERN_API( Handle )
+CMGetVersion (ConnHandle hConn);
+
+EXTERN_API( short )
+CMGetCMVersion (void);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( ConnHandle )
+CMNew (short procID,
+ CMRecFlags flags,
+ ConstCMBufferSizesParam desiredSizes,
+ long refCon,
+ long userData);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+CMDispose (ConnHandle hConn);
+
+EXTERN_API( CMErr )
+CMListen (ConnHandle hConn,
+ Boolean async,
+ ConnectionCompletionUPP completor,
+ long timeout);
+
+EXTERN_API( CMErr )
+CMAccept (ConnHandle hConn,
+ Boolean accept);
+
+EXTERN_API( CMErr )
+CMOpen (ConnHandle hConn,
+ Boolean async,
+ ConnectionCompletionUPP completor,
+ long timeout);
+
+EXTERN_API( CMErr )
+CMClose (ConnHandle hConn,
+ Boolean async,
+ ConnectionCompletionUPP completor,
+ long timeout,
+ Boolean now);
+
+EXTERN_API( CMErr )
+CMAbort (ConnHandle hConn);
+
+EXTERN_API( CMErr )
+CMStatus (ConnHandle hConn,
+ CMBufferSizes sizes,
+ CMStatFlags * flags);
+
+EXTERN_API( void )
+CMIdle (ConnHandle hConn);
+
+EXTERN_API( void )
+CMReset (ConnHandle hConn);
+
+EXTERN_API( void )
+CMBreak (ConnHandle hConn,
+ long duration,
+ Boolean async,
+ ConnectionCompletionUPP completor);
+
+EXTERN_API( CMErr )
+CMRead (ConnHandle hConn,
+ void * theBuffer,
+ long * toRead,
+ CMChannel theChannel,
+ Boolean async,
+ ConnectionCompletionUPP completor,
+ long timeout,
+ CMFlags * flags);
+
+EXTERN_API( CMErr )
+CMWrite (ConnHandle hConn,
+ const void * theBuffer,
+ long * toWrite,
+ CMChannel theChannel,
+ Boolean async,
+ ConnectionCompletionUPP completor,
+ long timeout,
+ CMFlags flags);
+
+EXTERN_API( CMErr )
+CMIOKill (ConnHandle hConn,
+ short which);
+
+EXTERN_API( void )
+CMActivate (ConnHandle hConn,
+ Boolean activate);
+
+EXTERN_API( void )
+CMResume (ConnHandle hConn,
+ Boolean resume);
+
+EXTERN_API( Boolean )
+CMMenu (ConnHandle hConn,
+ short menuID,
+ short item);
+
+EXTERN_API( Boolean )
+CMValidate (ConnHandle hConn);
+
+EXTERN_API( void )
+CMDefault (Ptr * theConfig,
+ short procID,
+ Boolean allocate);
+
+EXTERN_API( Handle )
+CMSetupPreflight (short procID,
+ long * magicCookie);
+
+EXTERN_API( Boolean )
+CMSetupFilter (short procID,
+ const void * theConfig,
+ short count,
+ DialogPtr theDialog,
+ EventRecord * theEvent,
+ short * theItem,
+ long * magicCookie);
+
+EXTERN_API( void )
+CMSetupSetup (short procID,
+ const void * theConfig,
+ short count,
+ DialogPtr theDialog,
+ long * magicCookie);
+
+EXTERN_API( void )
+CMSetupItem (short procID,
+ const void * theConfig,
+ short count,
+ DialogPtr theDialog,
+ short * theItem,
+ long * magicCookie);
+
+EXTERN_API( void )
+CMSetupXCleanup (short procID,
+ const void * theConfig,
+ short count,
+ DialogPtr theDialog,
+ Boolean OKed,
+ long * magicCookie);
+
+EXTERN_API( void )
+CMSetupPostflight (short procID);
+
+EXTERN_API( Ptr )
+CMGetConfig (ConnHandle hConn);
+
+EXTERN_API( short )
+CMSetConfig (ConnHandle hConn,
+ const void * thePtr);
+
+EXTERN_API( OSErr )
+CMIntlToEnglish (ConnHandle hConn,
+ const void * inputPtr,
+ Ptr * outputPtr,
+ short language);
+
+EXTERN_API( OSErr )
+CMEnglishToIntl (ConnHandle hConn,
+ const void * inputPtr,
+ Ptr * outputPtr,
+ short language);
+
+EXTERN_API( long )
+CMAddSearch (ConnHandle hConn,
+ ConstStr255Param theString,
+ CMSearchFlags flags,
+ ConnectionSearchCallBackUPP callBack);
+
+EXTERN_API( void )
+CMRemoveSearch (ConnHandle hConn,
+ long refnum);
+
+EXTERN_API( void )
+CMClearSearch (ConnHandle hConn);
+
+EXTERN_API( CMErr )
+CMGetConnEnvirons (ConnHandle hConn,
+ ConnEnvironRec * theEnvirons);
+
+EXTERN_API( short )
+CMChoose (ConnHandle * hConn,
+ Point where,
+ ConnectionChooseIdleUPP idle);
+
+EXTERN_API( void )
+CMEvent (ConnHandle hConn,
+ const EventRecord * theEvent);
+
+EXTERN_API( void )
+CMGetToolName (short procID,
+ Str255 name);
+
+EXTERN_API( short )
+CMGetProcID (ConstStr255Param name);
+
+EXTERN_API( void )
+CMSetRefCon (ConnHandle hConn,
+ long refCon);
+
+EXTERN_API( long )
+CMGetRefCon (ConnHandle hConn);
+
+EXTERN_API( long )
+CMGetUserData (ConnHandle hConn);
+
+EXTERN_API( void )
+CMSetUserData (ConnHandle hConn,
+ long userData);
+
+EXTERN_API( void )
+CMGetErrorString (ConnHandle hConn,
+ short id,
+ Str255 errMsg);
+
+EXTERN_API( CMErr )
+CMNewIOPB (ConnHandle hConn,
+ CMIOPBPtr * theIOPB);
+
+EXTERN_API( CMErr )
+CMDisposeIOPB (ConnHandle hConn,
+ CMIOPBPtr theIOPB);
+
+EXTERN_API( CMErr )
+CMPBRead (ConnHandle hConn,
+ CMIOPBPtr theIOPB,
+ Boolean async);
+
+EXTERN_API( CMErr )
+CMPBWrite (ConnHandle hConn,
+ CMIOPBPtr theIOPB,
+ Boolean async);
+
+EXTERN_API( CMErr )
+CMPBIOKill (ConnHandle hConn,
+ CMIOPBPtr theIOPB);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CONNECTIONS__ */
+
diff --git a/include/qt/ControlDefinitions.h b/include/qt/ControlDefinitions.h
new file mode 100644
index 000000000..5e795f79d
--- /dev/null
+++ b/include/qt/ControlDefinitions.h
@@ -0,0 +1,1294 @@
+/*
+ File: ControlDefinitions.h
+
+ Contains: Definitions of controls used by Control Mgr
+
+ Version: Technology: Mac OS 9
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1999-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CONTROLDEFINITIONS__
+#define __CONTROLDEFINITIONS__
+
+#ifndef __APPEARANCE__
+#include "Appearance.h"
+#endif
+
+#ifndef __CONTROLS__
+#include "Controls.h"
+#endif
+
+#ifndef __LISTS__
+#include "Lists.h"
+#endif
+
+#ifndef __MACHELP__
+#include "MacHelp.h"
+#endif
+
+#ifndef __MENUS__
+#include "Menus.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*------------------------------------------------------------------------------------------------------*/
+/* o Resource Types */
+/*------------------------------------------------------------------------------------------------------*/
+
+enum {
+ kControlTabListResType = FOUR_CHAR_CODE('tab#'), /* used for tab control (Appearance 1.0 and later)*/
+ kControlListDescResType = FOUR_CHAR_CODE('ldes') /* used for list box control (Appearance 1.0 and later)*/
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o Check Box Values */
+/*--------------------------------------------------------------------------------------*/
+enum {
+ kControlCheckBoxUncheckedValue = 0,
+ kControlCheckBoxCheckedValue = 1,
+ kControlCheckBoxMixedValue = 2
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o Radio Button Values */
+/*--------------------------------------------------------------------------------------*/
+enum {
+ kControlRadioButtonUncheckedValue = 0,
+ kControlRadioButtonCheckedValue = 1,
+ kControlRadioButtonMixedValue = 2
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o Pop-Up Menu Control Constants */
+/*--------------------------------------------------------------------------------------*/
+/* Variant codes for the System 7 pop-up menu*/
+enum {
+ popupFixedWidth = 1 << 0,
+ popupVariableWidth = 1 << 1,
+ popupUseAddResMenu = 1 << 2,
+ popupUseWFont = 1 << 3
+};
+
+/* Menu label styles for the System 7 pop-up menu*/
+enum {
+ popupTitleBold = 1 << 8,
+ popupTitleItalic = 1 << 9,
+ popupTitleUnderline = 1 << 10,
+ popupTitleOutline = 1 << 11,
+ popupTitleShadow = 1 << 12,
+ popupTitleCondense = 1 << 13,
+ popupTitleExtend = 1 << 14,
+ popupTitleNoStyle = 1 << 15
+};
+
+/* Menu label justifications for the System 7 pop-up menu*/
+enum {
+ popupTitleLeftJust = 0x00000000,
+ popupTitleCenterJust = 0x00000001,
+ popupTitleRightJust = 0x000000FF
+};
+
+/*------------------------------------------------------------------------------------------------------*/
+/* o PopUp Menu Private Data Structure */
+/*------------------------------------------------------------------------------------------------------*/
+#if !OPAQUE_TOOLBOX_STRUCTS
+
+struct PopupPrivateData {
+ MenuHandle mHandle;
+ SInt16 mID;
+};
+typedef struct PopupPrivateData PopupPrivateData;
+typedef PopupPrivateData * PopupPrivateDataPtr;
+typedef PopupPrivateDataPtr * PopupPrivateDataHandle;
+#endif /* !OPAQUE_TOOLBOX_STRUCTS */
+
+/*------------------------------------------------------------------------------------------------------*/
+/* o Control Definition ID's */
+/*------------------------------------------------------------------------------------------------------*/
+/* Standard System 7 procIDs*/
+
+enum {
+ pushButProc = 0,
+ checkBoxProc = 1,
+ radioButProc = 2,
+ scrollBarProc = 16,
+ popupMenuProc = 1008
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o Control Part Codes */
+/*--------------------------------------------------------------------------------------*/
+enum {
+ kControlLabelPart = 1,
+ kControlMenuPart = 2,
+ kControlTrianglePart = 4,
+ kControlEditTextPart = 5, /* Appearance 1.0 and later*/
+ kControlPicturePart = 6, /* Appearance 1.0 and later*/
+ kControlIconPart = 7, /* Appearance 1.0 and later*/
+ kControlClockPart = 8, /* Appearance 1.0 and later*/
+ kControlListBoxPart = 24, /* Appearance 1.0 and later*/
+ kControlListBoxDoubleClickPart = 25, /* Appearance 1.0 and later*/
+ kControlImageWellPart = 26, /* Appearance 1.0 and later*/
+ kControlRadioGroupPart = 27, /* Appearance 1.0.2 and later*/
+ kControlButtonPart = 10,
+ kControlCheckBoxPart = 11,
+ kControlRadioButtonPart = 11,
+ kControlUpButtonPart = 20,
+ kControlDownButtonPart = 21,
+ kControlPageUpPart = 22,
+ kControlPageDownPart = 23,
+ kControlClockHourDayPart = 9, /* Appearance 1.1 and later*/
+ kControlClockMinuteMonthPart = 10, /* Appearance 1.1 and later*/
+ kControlClockSecondYearPart = 11, /* Appearance 1.1 and later*/
+ kControlClockAMPMPart = 12, /* Appearance 1.1 and later*/
+ kControlDataBrowserPart = 24, /* CarbonLib 1.0 and later*/
+ kControlDataBrowserDraggedPart = 25 /* CarbonLib 1.0 and later*/
+};
+
+
+
+/*------------------------------------------------------------------------------------------------------*/
+/* o Control Types and ID's available only with Appearance 1.0 and later */
+/*------------------------------------------------------------------------------------------------------*/
+/*--------------------------------------------------------------------------------------*/
+/* o BEVEL BUTTON INTERFACE (CDEF 2) */
+/*--------------------------------------------------------------------------------------*/
+/* Bevel buttons allow you to control the content type (pict/icon/etc.), the behavior */
+/* (pushbutton/toggle/sticky), and the bevel size. You also have the option of */
+/* attaching a menu to it. When a menu is present, you can specify which way the */
+/* popup arrow is facing (down or right). */
+/* */
+/* This is all made possible by overloading the Min, Max, and Value parameters for the */
+/* control, as well as adjusting the variant. Here's the breakdown of what goes where: */
+/* */
+/* Parameter What Goes Here */
+/* ------------------- ---------------------------------------------------- */
+/* Min Hi Byte = Behavior, Lo Byte = content type. */
+/* Max ResID for resource-based content types. */
+/* Value MenuID to attach, 0 = no menu, please. */
+/* */
+/* The variant is broken down into two halfs. The low 2 bits control the bevel type. */
+/* Bit 2 controls the popup arrow direction (if a menu is present) and bit 3 controls */
+/* whether or not to use the control's owning window's font. */
+/* */
+/* Constants for all you need to put this together are below. The values for behaviors */
+/* are set up so that you can simply add them to the content type and pass them into */
+/* the Min parameter of NewControl. */
+/* */
+/* An example call: */
+/* */
+/* control = NewControl( window, &bounds, "\p", true, 0, kContentIconSuiteRes + */
+/* kBehaviorToggles, myIconSuiteID, bevelButtonSmallBevelProc, */
+/* 0L ); */
+/* */
+/* Attaching a menu: */
+/* */
+/* control = NewControl( window, &bounds, "\p", true, kMyMenuID, kContentIconSuiteRes, */
+/* myIconSuiteID, bevelButtonSmallBevelProc + kBevelButtonMenuOnRight, 0L ); */
+/* */
+/* This will attach menu ID kMyMenuID to the button, with the popup arrow facing right.*/
+/* This also puts the menu up to the right of the button. You can also specify that a */
+/* menu can have multiple items checked at once by adding kBehaviorMultiValueMenus */
+/* into the Min parameter. If you do use multivalue menus, the GetBevelButtonMenuValue */
+/* helper function will return the last item chosen from the menu, whether or not it */
+/* was checked. */
+/* */
+/* NOTE: Bevel buttons with menus actually have *two* values. The value of the */
+/* button (on/off), and the value of the menu. The menu value can be gotten */
+/* with the GetBevelButtonMenuValue helper function. */
+/* */
+/* Handle-based Content */
+/* -------------------- */
+/* You can create your control and then set the content to an existing handle to an */
+/* icon suite, etc. using the macros below. Please keep in mind that resource-based */
+/* content is owned by the control, handle-based content is owned by you. The CDEF will*/
+/* not try to dispose of handle-based content. If you are changing the content type of */
+/* the button on the fly, you must make sure that if you are replacing a handle- */
+/* based content with a resource-based content to properly dispose of the handle, */
+/* else a memory leak will ensue. */
+/* */
+/* Bevel Button Proc IDs */
+enum {
+ kControlBevelButtonSmallBevelProc = 32,
+ kControlBevelButtonNormalBevelProc = 33,
+ kControlBevelButtonLargeBevelProc = 34
+};
+
+/* Add these variant codes to kBevelButtonSmallBevelProc to change the type of button */
+enum {
+ kControlBevelButtonSmallBevelVariant = 0,
+ kControlBevelButtonNormalBevelVariant = (1 << 0),
+ kControlBevelButtonLargeBevelVariant = (1 << 1),
+ kControlBevelButtonMenuOnRightVariant = (1 << 2)
+};
+
+/* Bevel Thicknesses */
+
+typedef UInt16 ControlBevelThickness;
+enum {
+ kControlBevelButtonSmallBevel = 0,
+ kControlBevelButtonNormalBevel = 1,
+ kControlBevelButtonLargeBevel = 2
+};
+
+/* Behaviors of bevel buttons. These are set up so you can add */
+/* them together with the content types. */
+enum {
+ kControlBehaviorPushbutton = 0,
+ kControlBehaviorToggles = 0x0100,
+ kControlBehaviorSticky = 0x0200,
+ kControlBehaviorSingleValueMenu = 0,
+ kControlBehaviorMultiValueMenu = 0x4000, /* only makes sense when a menu is attached.*/
+ kControlBehaviorOffsetContents = 0x8000
+};
+
+/* Behaviors for 1.0.1 or later */
+enum {
+ kControlBehaviorCommandMenu = 0x2000 /* menu holds commands, not choices. Overrides multi-value bit.*/
+};
+
+
+typedef UInt16 ControlBevelButtonBehavior;
+typedef UInt16 ControlBevelButtonMenuBehavior;
+/* Bevel Button Menu Placements */
+
+typedef UInt16 ControlBevelButtonMenuPlacement;
+enum {
+ kControlBevelButtonMenuOnBottom = 0,
+ kControlBevelButtonMenuOnRight = (1 << 2)
+};
+
+
+/* Graphic Alignments */
+
+typedef SInt16 ControlButtonGraphicAlignment;
+enum {
+ kControlBevelButtonAlignSysDirection = -1, /* only left or right*/
+ kControlBevelButtonAlignCenter = 0,
+ kControlBevelButtonAlignLeft = 1,
+ kControlBevelButtonAlignRight = 2,
+ kControlBevelButtonAlignTop = 3,
+ kControlBevelButtonAlignBottom = 4,
+ kControlBevelButtonAlignTopLeft = 5,
+ kControlBevelButtonAlignBottomLeft = 6,
+ kControlBevelButtonAlignTopRight = 7,
+ kControlBevelButtonAlignBottomRight = 8
+};
+
+/* Text Alignments */
+
+typedef SInt16 ControlButtonTextAlignment;
+enum {
+ kControlBevelButtonAlignTextSysDirection = teFlushDefault,
+ kControlBevelButtonAlignTextCenter = teCenter,
+ kControlBevelButtonAlignTextFlushRight = teFlushRight,
+ kControlBevelButtonAlignTextFlushLeft = teFlushLeft
+};
+
+/* Text Placements */
+
+typedef SInt16 ControlButtonTextPlacement;
+enum {
+ kControlBevelButtonPlaceSysDirection = -1, /* if graphic on right, then on left*/
+ kControlBevelButtonPlaceNormally = 0,
+ kControlBevelButtonPlaceToRightOfGraphic = 1,
+ kControlBevelButtonPlaceToLeftOfGraphic = 2,
+ kControlBevelButtonPlaceBelowGraphic = 3,
+ kControlBevelButtonPlaceAboveGraphic = 4
+};
+
+
+/* Data tags supported by the bevel button controls */
+enum {
+ kControlBevelButtonContentTag = FOUR_CHAR_CODE('cont'), /* ButtonContentInfo*/
+ kControlBevelButtonTransformTag = FOUR_CHAR_CODE('tran'), /* IconTransformType*/
+ kControlBevelButtonTextAlignTag = FOUR_CHAR_CODE('tali'), /* ButtonTextAlignment*/
+ kControlBevelButtonTextOffsetTag = FOUR_CHAR_CODE('toff'), /* SInt16*/
+ kControlBevelButtonGraphicAlignTag = FOUR_CHAR_CODE('gali'), /* ButtonGraphicAlignment*/
+ kControlBevelButtonGraphicOffsetTag = FOUR_CHAR_CODE('goff'), /* Point*/
+ kControlBevelButtonTextPlaceTag = FOUR_CHAR_CODE('tplc'), /* ButtonTextPlacement*/
+ kControlBevelButtonMenuValueTag = FOUR_CHAR_CODE('mval'), /* SInt16*/
+ kControlBevelButtonMenuHandleTag = FOUR_CHAR_CODE('mhnd'), /* MenuHandle*/
+ kControlBevelButtonCenterPopupGlyphTag = FOUR_CHAR_CODE('pglc') /* Boolean: true = center, false = bottom right*/
+};
+
+/* These are tags in 1.0.1 or later */
+enum {
+ kControlBevelButtonLastMenuTag = FOUR_CHAR_CODE('lmnu'), /* SInt16: menuID of last menu item selected from*/
+ kControlBevelButtonMenuDelayTag = FOUR_CHAR_CODE('mdly') /* SInt32: ticks to delay before menu appears*/
+};
+
+/* tags available with Appearance 1.1 or later */
+enum {
+ /* Boolean: True = if an icon of the ideal size for*/
+ /* the button isn't available, scale a larger or*/
+ /* smaller icon to the ideal size. False = don't*/
+ /* scale; draw a smaller icon or clip a larger icon.*/
+ /* Default is false. Only applies to IconSuites and*/
+ kControlBevelButtonScaleIconTag = FOUR_CHAR_CODE('scal') /* IconRefs.*/
+};
+
+/* Helper routines are available only thru the shared library/glue. */
+EXTERN_API( OSErr )
+GetBevelButtonMenuValue (ControlHandle inButton,
+ SInt16 * outValue);
+
+EXTERN_API( OSErr )
+SetBevelButtonMenuValue (ControlHandle inButton,
+ SInt16 inValue);
+
+EXTERN_API( OSErr )
+GetBevelButtonMenuHandle (ControlHandle inButton,
+ MenuHandle * outHandle);
+
+EXTERN_API( OSErr )
+GetBevelButtonContentInfo (ControlHandle inButton,
+ ControlButtonContentInfoPtr outContent);
+
+EXTERN_API( OSErr )
+SetBevelButtonContentInfo (ControlHandle inButton,
+ ControlButtonContentInfoPtr inContent);
+
+EXTERN_API( OSErr )
+SetBevelButtonTransform (ControlHandle inButton,
+ IconTransformType transform);
+
+EXTERN_API( OSErr )
+SetBevelButtonGraphicAlignment (ControlHandle inButton,
+ ControlButtonGraphicAlignment inAlign,
+ SInt16 inHOffset,
+ SInt16 inVOffset);
+
+EXTERN_API( OSErr )
+SetBevelButtonTextAlignment (ControlHandle inButton,
+ ControlButtonTextAlignment inAlign,
+ SInt16 inHOffset);
+
+EXTERN_API( OSErr )
+SetBevelButtonTextPlacement (ControlHandle inButton,
+ ControlButtonTextPlacement inWhere);
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o SLIDER (CDEF 3) */
+/*--------------------------------------------------------------------------------------*/
+/* There are several variants that control the behavior of the slider control. Any */
+/* combination of the following three constants can be added to the basic CDEF ID */
+/* (kSliderProc). */
+/* */
+/* Variants: */
+/* */
+/* kSliderLiveFeedback Slider does not use "ghosted" indicator when tracking. */
+/* ActionProc is called (set via SetControlAction) as the */
+/* indicator is dragged. The value is updated so that the */
+/* actionproc can adjust some other property based on the */
+/* value each time the action proc is called. If no action */
+/* proc is installed, it reverts to the ghost indicator. */
+/* */
+/* kSliderHasTickMarks Slider is drawn with 'tick marks'. The control */
+/* rectangle must be large enough to accomidate the tick */
+/* marks. */
+/* */
+/* kSliderReverseDirection Slider thumb points in opposite direction than normal. */
+/* If the slider is vertical, the thumb will point to the */
+/* left, if the slider is horizontal, the thumb will point */
+/* upwards. */
+/* */
+/* kSliderNonDirectional This option overrides the kSliderReverseDirection and */
+/* kSliderHasTickMarks variants. It creates an indicator */
+/* which is rectangular and doesn't point in any direction */
+/* like the normal indicator does. */
+/* Slider proc ID and variants */
+enum {
+ kControlSliderProc = 48,
+ kControlSliderLiveFeedback = (1 << 0),
+ kControlSliderHasTickMarks = (1 << 1),
+ kControlSliderReverseDirection = (1 << 2),
+ kControlSliderNonDirectional = (1 << 3)
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o DISCLOSURE TRIANGLE (CDEF 4) */
+/*--------------------------------------------------------------------------------------*/
+/* This control can be used as either left or right facing. It can also handle its own */
+/* tracking if you wish. This means that when the 'autotoggle' variant is used, if the */
+/* user clicks the control, it's state will change automatically from open to closed */
+/* and vice-versa depending on its initial state. After a successful call to Track- */
+/* Control, you can just check the current value to see what state it was switched to. */
+/* Triangle proc IDs */
+enum {
+ kControlTriangleProc = 64,
+ kControlTriangleLeftFacingProc = 65,
+ kControlTriangleAutoToggleProc = 66,
+ kControlTriangleLeftFacingAutoToggleProc = 67
+};
+
+/* Tagged data supported by disclosure triangles */
+enum {
+ kControlTriangleLastValueTag = FOUR_CHAR_CODE('last') /* SInt16*/
+};
+
+/* Helper routines are available only thru the shared library/glue. */
+EXTERN_API( OSErr )
+SetDisclosureTriangleLastValue (ControlHandle inTabControl,
+ SInt16 inValue);
+
+/*--------------------------------------------------------------------------------------*/
+/* o PROGRESS INDICATOR (CDEF 5) */
+/*--------------------------------------------------------------------------------------*/
+/* This CDEF implements both determinate and indeterminate progress bars. To switch, */
+/* just use SetControlData to set the indeterminate flag to make it indeterminate call */
+/* IdleControls to step thru the animation. IdleControls should be called at least */
+/* once during your event loop. */
+/* */
+/* Progress Bar proc IDs */
+enum {
+ kControlProgressBarProc = 80
+};
+
+/* Tagged data supported by progress bars */
+enum {
+ kControlProgressBarIndeterminateTag = FOUR_CHAR_CODE('inde') /* Boolean*/
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o LITTLE ARROWS (CDEF 6) */
+/*--------------------------------------------------------------------------------------*/
+/* This control implements the little up and down arrows you'd see in the Memory */
+/* control panel for adjusting the cache size. */
+/* Little Arrows proc IDs */
+enum {
+ kControlLittleArrowsProc = 96
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o CHASING ARROWS (CDEF 7) */
+/*--------------------------------------------------------------------------------------*/
+/* To animate this control, make sure to call IdleControls repeatedly. */
+/* */
+/* Chasing Arrows proc IDs */
+enum {
+ kControlChasingArrowsProc = 112
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o TABS (CDEF 8) */
+/*--------------------------------------------------------------------------------------*/
+/* Tabs use an auxiliary resource (tab#) to hold tab information such as the tab name */
+/* and an icon suite ID for each tab. */
+/* */
+/* The ID of the tab# resource that you wish to associate with a tab control should */
+/* be passed in as the Value parameter of the control. If you are using GetNewControl, */
+/* then the Value slot in the CNTL resource should have the ID of the 'tab#' resource */
+/* on creation. */
+/* */
+/* Passing zero in for the tab# resource tells the control not to read in a tab# res. */
+/* You can then use SetControlMaximum to add tabs, followed by a call to SetControlData*/
+/* with the kControlTabInfoTag, passing in a pointer to a ControlTabInfoRec. This sets */
+/* the name and optionally an icon for a tab. */
+/* Tabs proc IDs */
+enum {
+ kControlTabLargeProc = 128, /* Large tab size, north facing */
+ kControlTabSmallProc = 129, /* Small tab size, north facing */
+ kControlTabLargeNorthProc = 128, /* Large tab size, north facing */
+ kControlTabSmallNorthProc = 129, /* Small tab size, north facing */
+ kControlTabLargeSouthProc = 130, /* Large tab size, south facing */
+ kControlTabSmallSouthProc = 131, /* Small tab size, south facing */
+ kControlTabLargeEastProc = 132, /* Large tab size, east facing */
+ kControlTabSmallEastProc = 133, /* Small tab size, east facing */
+ kControlTabLargeWestProc = 134, /* Large tab size, west facing */
+ kControlTabSmallWestProc = 135 /* Small tab size, west facing */
+};
+
+/* Tagged data supported by tabs */
+enum {
+ kControlTabContentRectTag = FOUR_CHAR_CODE('rect'), /* Rect*/
+ kControlTabEnabledFlagTag = FOUR_CHAR_CODE('enab'), /* Boolean*/
+ kControlTabFontStyleTag = kControlFontStyleTag /* ControlFontStyleRec*/
+};
+
+/* New tags in 1.0.1 or later */
+enum {
+ kControlTabInfoTag = FOUR_CHAR_CODE('tabi') /* ControlTabInfoRec*/
+};
+
+enum {
+ kControlTabInfoVersionZero = 0
+};
+
+
+struct ControlTabInfoRec {
+ SInt16 version; /* version of this structure.*/
+ SInt16 iconSuiteID; /* icon suite to use. Zero indicates no icon*/
+ Str255 name; /* name to be displayed on the tab*/
+};
+typedef struct ControlTabInfoRec ControlTabInfoRec;
+/* Helper routines are available only thru the shared library/glue. */
+EXTERN_API( OSErr )
+GetTabContentRect (ControlHandle inTabControl,
+ Rect * outContentRect);
+
+EXTERN_API( OSErr )
+SetTabEnabled (ControlHandle inTabControl,
+ SInt16 inTabToHilite,
+ Boolean inEnabled);
+
+/*--------------------------------------------------------------------------------------*/
+/* o VISUAL SEPARATOR (CDEF 9) */
+/*--------------------------------------------------------------------------------------*/
+/* Separator lines determine their orientation (horizontal or vertical) automatically */
+/* based on the relative height and width of their contrlRect. */
+/* Visual separator proc IDs */
+enum {
+ kControlSeparatorLineProc = 144
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o GROUP BOX (CDEF 10) */
+/*--------------------------------------------------------------------------------------*/
+/* The group box CDEF can be use in several ways. It can have no title, a text title, */
+/* a check box as the title, or a popup button as a title. There are two versions of */
+/* group boxes, primary and secondary, which look slightly different. */
+/* Group Box proc IDs */
+enum {
+ kControlGroupBoxTextTitleProc = 160,
+ kControlGroupBoxCheckBoxProc = 161,
+ kControlGroupBoxPopupButtonProc = 162,
+ kControlGroupBoxSecondaryTextTitleProc = 164,
+ kControlGroupBoxSecondaryCheckBoxProc = 165,
+ kControlGroupBoxSecondaryPopupButtonProc = 166
+};
+
+/* Tagged data supported by group box */
+enum {
+ kControlGroupBoxMenuHandleTag = FOUR_CHAR_CODE('mhan'), /* MenuHandle (popup title only)*/
+ kControlGroupBoxFontStyleTag = kControlFontStyleTag /* ControlFontStyleRec*/
+};
+
+/* tags available with Appearance 1.1 or later */
+enum {
+ kControlGroupBoxTitleRectTag = FOUR_CHAR_CODE('trec') /* Rect. Rectangle that the title text/control is drawn in. (get only)*/
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o IMAGE WELL (CDEF 11) */
+/*--------------------------------------------------------------------------------------*/
+/* Image Wells allow you to control the content type (pict/icon/etc.) shown in the */
+/* well. */
+/* */
+/* This is made possible by overloading the Min and Value parameters for the control. */
+/* */
+/* Parameter What Goes Here */
+/* ------------------- -------------------------------------------------- */
+/* Min content type (see constants for bevel buttons) */
+/* Value Resource ID of content type, if resource-based. */
+/* */
+/* */
+/* Handle-based Content */
+/* -------------------- */
+/* You can create your control and then set the content to an existing handle to an */
+/* icon suite, etc. using the macros below. Please keep in mind that resource-based */
+/* content is owned by the control, handle-based content is owned by you. The CDEF will*/
+/* not try to dispose of handle-based content. If you are changing the content type of */
+/* the button on the fly, you must make sure that if you are replacing a handle- */
+/* based content with a resource-based content to properly dispose of the handle, */
+/* else a memory leak will ensue. */
+/* */
+/* Image Well proc IDs */
+enum {
+ kControlImageWellProc = 176
+};
+
+/* Tagged data supported by image wells */
+enum {
+ kControlImageWellContentTag = FOUR_CHAR_CODE('cont'), /* ButtonContentInfo*/
+ kControlImageWellTransformTag = FOUR_CHAR_CODE('tran') /* IconTransformType*/
+};
+
+/* Helper routines are available only thru the shared library/glue. */
+EXTERN_API( OSErr )
+GetImageWellContentInfo (ControlHandle inButton,
+ ControlButtonContentInfoPtr outContent);
+
+EXTERN_API( OSErr )
+SetImageWellContentInfo (ControlHandle inButton,
+ ControlButtonContentInfoPtr inContent);
+
+EXTERN_API( OSErr )
+SetImageWellTransform (ControlHandle inButton,
+ IconTransformType inTransform);
+
+/*--------------------------------------------------------------------------------------*/
+/* o POPUP ARROW (CDEF 12) */
+/*--------------------------------------------------------------------------------------*/
+/* The popup arrow CDEF is used to draw the small arrow normally associated with a */
+/* popup control. The arrow can point in four directions, and a small or large version */
+/* can be used. This control is provided to allow clients to draw the arrow in a */
+/* normalized fashion which will take advantage of themes automatically. */
+/* */
+/* Popup Arrow proc IDs */
+enum {
+ kControlPopupArrowEastProc = 192,
+ kControlPopupArrowWestProc = 193,
+ kControlPopupArrowNorthProc = 194,
+ kControlPopupArrowSouthProc = 195,
+ kControlPopupArrowSmallEastProc = 196,
+ kControlPopupArrowSmallWestProc = 197,
+ kControlPopupArrowSmallNorthProc = 198,
+ kControlPopupArrowSmallSouthProc = 199
+};
+
+/* Popup Arrow Orientations */
+enum {
+ kControlPopupArrowOrientationEast = 0,
+ kControlPopupArrowOrientationWest = 1,
+ kControlPopupArrowOrientationNorth = 2,
+ kControlPopupArrowOrientationSouth = 3
+};
+
+
+typedef UInt16 ControlPopupArrowOrientation;
+/*--------------------------------------------------------------------------------------*/
+/* o PLACARD (CDEF 14) */
+/*--------------------------------------------------------------------------------------*/
+/* Placard proc IDs */
+enum {
+ kControlPlacardProc = 224
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o CLOCK (CDEF 15) */
+/*--------------------------------------------------------------------------------------*/
+/* NOTE: You can specify more options in the Value paramter when creating the clock. */
+/* See below. */
+/* */
+/* NOTE: Under Appearance 1.1, the clock control knows and returns more part codes. */
+/* The new clock-specific part codes are defined with the other control parts. */
+/* Besides these clock-specific parts, we also return kControlUpButtonPart */
+/* and kControlDownButtonPart when they hit the up and down arrows. */
+/* The new part codes give you more flexibility for focusing and hit testing. */
+/* */
+/* The original kControlClockPart is still valid. When hit testing, it means */
+/* that some non-editable area of the clock's whitespace has been clicked. */
+/* When focusing a currently unfocused clock, it changes the focus to the */
+/* first part; it is the same as passing kControlFocusNextPart. When */
+/* re-focusing a focused clock, it will not change the focus at all. */
+/* Clock proc IDs */
+enum {
+ kControlClockTimeProc = 240,
+ kControlClockTimeSecondsProc = 241,
+ kControlClockDateProc = 242,
+ kControlClockMonthYearProc = 243
+};
+
+/* Clock Types */
+
+typedef UInt16 ControlClockType;
+enum {
+ kControlClockTypeHourMinute = 0,
+ kControlClockTypeHourMinuteSecond = 1,
+ kControlClockTypeMonthDay = 2,
+ kControlClockTypeMonthDayYear = 3
+};
+
+/* Clock Flags */
+/* These flags can be passed into 'value' field on creation of the control. */
+/* Value is set to 0 after control is created. */
+
+typedef UInt32 ControlClockFlags;
+enum {
+ kControlClockFlagStandard = 0, /* editable, non-live*/
+ kControlClockNoFlags = 0,
+ kControlClockFlagDisplayOnly = 1, /* add this to become non-editable*/
+ kControlClockIsDisplayOnly = 1,
+ kControlClockFlagLive = 2, /* automatically shows current time on idle. only valid with display only.*/
+ kControlClockIsLive = 2
+};
+
+/* Tagged data supported by clocks */
+enum {
+ kControlClockLongDateTag = FOUR_CHAR_CODE('date'), /* LongDateRec*/
+ kControlClockFontStyleTag = kControlFontStyleTag /* ControlFontStyleRec*/
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o USER PANE (CDEF 16) */
+/*--------------------------------------------------------------------------------------*/
+/* User Pane proc IDs */
+enum {
+ kControlUserPaneProc = 256
+};
+
+/* Tagged data supported by user panes */
+/* Currently, they are all proc ptrs for doing things like drawing and hit testing, etc. */
+enum {
+ kControlUserItemDrawProcTag = FOUR_CHAR_CODE('uidp'), /* UserItemUPP*/
+ kControlUserPaneDrawProcTag = FOUR_CHAR_CODE('draw'), /* ControlUserPaneDrawingUPP*/
+ kControlUserPaneHitTestProcTag = FOUR_CHAR_CODE('hitt'), /* ControlUserPaneHitTestUPP*/
+ kControlUserPaneTrackingProcTag = FOUR_CHAR_CODE('trak'), /* ControlUserPaneTrackingUPP*/
+ kControlUserPaneIdleProcTag = FOUR_CHAR_CODE('idle'), /* ControlUserPaneIdleUPP*/
+ kControlUserPaneKeyDownProcTag = FOUR_CHAR_CODE('keyd'), /* ControlUserPaneKeyDownUPP*/
+ kControlUserPaneActivateProcTag = FOUR_CHAR_CODE('acti'), /* ControlUserPaneActivateUPP*/
+ kControlUserPaneFocusProcTag = FOUR_CHAR_CODE('foci'), /* ControlUserPaneFocusUPP*/
+ kControlUserPaneBackgroundProcTag = FOUR_CHAR_CODE('back') /* ControlUserPaneBackgroundUPP*/
+};
+
+typedef CALLBACK_API( void , ControlUserPaneDrawProcPtr )(ControlHandle control, SInt16 part);
+typedef CALLBACK_API( ControlPartCode , ControlUserPaneHitTestProcPtr )(ControlHandle control, Point where);
+typedef CALLBACK_API( ControlPartCode , ControlUserPaneTrackingProcPtr )(ControlHandle control, Point startPt, ControlActionUPP actionProc);
+typedef CALLBACK_API( void , ControlUserPaneIdleProcPtr )(ControlHandle control);
+typedef CALLBACK_API( ControlPartCode , ControlUserPaneKeyDownProcPtr )(ControlHandle control, SInt16 keyCode, SInt16 charCode, SInt16 modifiers);
+typedef CALLBACK_API( void , ControlUserPaneActivateProcPtr )(ControlHandle control, Boolean activating);
+typedef CALLBACK_API( ControlPartCode , ControlUserPaneFocusProcPtr )(ControlHandle control, ControlFocusPart action);
+typedef CALLBACK_API( void , ControlUserPaneBackgroundProcPtr )(ControlHandle control, ControlBackgroundPtr info);
+typedef STACK_UPP_TYPE(ControlUserPaneDrawProcPtr) ControlUserPaneDrawUPP;
+typedef STACK_UPP_TYPE(ControlUserPaneHitTestProcPtr) ControlUserPaneHitTestUPP;
+typedef STACK_UPP_TYPE(ControlUserPaneTrackingProcPtr) ControlUserPaneTrackingUPP;
+typedef STACK_UPP_TYPE(ControlUserPaneIdleProcPtr) ControlUserPaneIdleUPP;
+typedef STACK_UPP_TYPE(ControlUserPaneKeyDownProcPtr) ControlUserPaneKeyDownUPP;
+typedef STACK_UPP_TYPE(ControlUserPaneActivateProcPtr) ControlUserPaneActivateUPP;
+typedef STACK_UPP_TYPE(ControlUserPaneFocusProcPtr) ControlUserPaneFocusUPP;
+typedef STACK_UPP_TYPE(ControlUserPaneBackgroundProcPtr) ControlUserPaneBackgroundUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(ControlUserPaneDrawUPP)
+ NewControlUserPaneDrawUPP (ControlUserPaneDrawProcPtr userRoutine);
+
+ EXTERN_API(ControlUserPaneHitTestUPP)
+ NewControlUserPaneHitTestUPP (ControlUserPaneHitTestProcPtr userRoutine);
+
+ EXTERN_API(ControlUserPaneTrackingUPP)
+ NewControlUserPaneTrackingUPP (ControlUserPaneTrackingProcPtr userRoutine);
+
+ EXTERN_API(ControlUserPaneIdleUPP)
+ NewControlUserPaneIdleUPP (ControlUserPaneIdleProcPtr userRoutine);
+
+ EXTERN_API(ControlUserPaneKeyDownUPP)
+ NewControlUserPaneKeyDownUPP (ControlUserPaneKeyDownProcPtr userRoutine);
+
+ EXTERN_API(ControlUserPaneActivateUPP)
+ NewControlUserPaneActivateUPP (ControlUserPaneActivateProcPtr userRoutine);
+
+ EXTERN_API(ControlUserPaneFocusUPP)
+ NewControlUserPaneFocusUPP (ControlUserPaneFocusProcPtr userRoutine);
+
+ EXTERN_API(ControlUserPaneBackgroundUPP)
+ NewControlUserPaneBackgroundUPP (ControlUserPaneBackgroundProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeControlUserPaneDrawUPP (ControlUserPaneDrawUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeControlUserPaneHitTestUPP (ControlUserPaneHitTestUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeControlUserPaneTrackingUPP (ControlUserPaneTrackingUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeControlUserPaneIdleUPP (ControlUserPaneIdleUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeControlUserPaneKeyDownUPP (ControlUserPaneKeyDownUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeControlUserPaneActivateUPP (ControlUserPaneActivateUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeControlUserPaneFocusUPP (ControlUserPaneFocusUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeControlUserPaneBackgroundUPP (ControlUserPaneBackgroundUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeControlUserPaneDrawUPP (ControlHandle control,
+ SInt16 part,
+ ControlUserPaneDrawUPP userUPP);
+
+ EXTERN_API(ControlPartCode)
+ InvokeControlUserPaneHitTestUPP (ControlHandle control,
+ Point where,
+ ControlUserPaneHitTestUPP userUPP);
+
+ EXTERN_API(ControlPartCode)
+ InvokeControlUserPaneTrackingUPP (ControlHandle control,
+ Point startPt,
+ ControlActionUPP actionProc,
+ ControlUserPaneTrackingUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeControlUserPaneIdleUPP (ControlHandle control,
+ ControlUserPaneIdleUPP userUPP);
+
+ EXTERN_API(ControlPartCode)
+ InvokeControlUserPaneKeyDownUPP (ControlHandle control,
+ SInt16 keyCode,
+ SInt16 charCode,
+ SInt16 modifiers,
+ ControlUserPaneKeyDownUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeControlUserPaneActivateUPP (ControlHandle control,
+ Boolean activating,
+ ControlUserPaneActivateUPP userUPP);
+
+ EXTERN_API(ControlPartCode)
+ InvokeControlUserPaneFocusUPP (ControlHandle control,
+ ControlFocusPart action,
+ ControlUserPaneFocusUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeControlUserPaneBackgroundUPP (ControlHandle control,
+ ControlBackgroundPtr info,
+ ControlUserPaneBackgroundUPP userUPP);
+
+#else
+ enum { uppControlUserPaneDrawProcInfo = 0x000002C0 }; /* pascal no_return_value Func(4_bytes, 2_bytes) */
+ enum { uppControlUserPaneHitTestProcInfo = 0x000003E0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes) */
+ enum { uppControlUserPaneTrackingProcInfo = 0x00000FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppControlUserPaneIdleProcInfo = 0x000000C0 }; /* pascal no_return_value Func(4_bytes) */
+ enum { uppControlUserPaneKeyDownProcInfo = 0x00002AE0 }; /* pascal 2_bytes Func(4_bytes, 2_bytes, 2_bytes, 2_bytes) */
+ enum { uppControlUserPaneActivateProcInfo = 0x000001C0 }; /* pascal no_return_value Func(4_bytes, 1_byte) */
+ enum { uppControlUserPaneFocusProcInfo = 0x000002E0 }; /* pascal 2_bytes Func(4_bytes, 2_bytes) */
+ enum { uppControlUserPaneBackgroundProcInfo = 0x000003C0 }; /* pascal no_return_value Func(4_bytes, 4_bytes) */
+ #define NewControlUserPaneDrawUPP(userRoutine) (ControlUserPaneDrawUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlUserPaneDrawProcInfo, GetCurrentArchitecture())
+ #define NewControlUserPaneHitTestUPP(userRoutine) (ControlUserPaneHitTestUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlUserPaneHitTestProcInfo, GetCurrentArchitecture())
+ #define NewControlUserPaneTrackingUPP(userRoutine) (ControlUserPaneTrackingUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlUserPaneTrackingProcInfo, GetCurrentArchitecture())
+ #define NewControlUserPaneIdleUPP(userRoutine) (ControlUserPaneIdleUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlUserPaneIdleProcInfo, GetCurrentArchitecture())
+ #define NewControlUserPaneKeyDownUPP(userRoutine) (ControlUserPaneKeyDownUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlUserPaneKeyDownProcInfo, GetCurrentArchitecture())
+ #define NewControlUserPaneActivateUPP(userRoutine) (ControlUserPaneActivateUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlUserPaneActivateProcInfo, GetCurrentArchitecture())
+ #define NewControlUserPaneFocusUPP(userRoutine) (ControlUserPaneFocusUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlUserPaneFocusProcInfo, GetCurrentArchitecture())
+ #define NewControlUserPaneBackgroundUPP(userRoutine) (ControlUserPaneBackgroundUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlUserPaneBackgroundProcInfo, GetCurrentArchitecture())
+ #define DisposeControlUserPaneDrawUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeControlUserPaneHitTestUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeControlUserPaneTrackingUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeControlUserPaneIdleUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeControlUserPaneKeyDownUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeControlUserPaneActivateUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeControlUserPaneFocusUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeControlUserPaneBackgroundUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeControlUserPaneDrawUPP(control, part, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppControlUserPaneDrawProcInfo, (control), (part))
+ #define InvokeControlUserPaneHitTestUPP(control, where, userUPP) (ControlPartCode)CALL_TWO_PARAMETER_UPP((userUPP), uppControlUserPaneHitTestProcInfo, (control), (where))
+ #define InvokeControlUserPaneTrackingUPP(control, startPt, actionProc, userUPP) (ControlPartCode)CALL_THREE_PARAMETER_UPP((userUPP), uppControlUserPaneTrackingProcInfo, (control), (startPt), (actionProc))
+ #define InvokeControlUserPaneIdleUPP(control, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppControlUserPaneIdleProcInfo, (control))
+ #define InvokeControlUserPaneKeyDownUPP(control, keyCode, charCode, modifiers, userUPP) (ControlPartCode)CALL_FOUR_PARAMETER_UPP((userUPP), uppControlUserPaneKeyDownProcInfo, (control), (keyCode), (charCode), (modifiers))
+ #define InvokeControlUserPaneActivateUPP(control, activating, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppControlUserPaneActivateProcInfo, (control), (activating))
+ #define InvokeControlUserPaneFocusUPP(control, action, userUPP) (ControlPartCode)CALL_TWO_PARAMETER_UPP((userUPP), uppControlUserPaneFocusProcInfo, (control), (action))
+ #define InvokeControlUserPaneBackgroundUPP(control, info, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppControlUserPaneBackgroundProcInfo, (control), (info))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewControlUserPaneDrawProc(userRoutine) NewControlUserPaneDrawUPP(userRoutine)
+#define NewControlUserPaneHitTestProc(userRoutine) NewControlUserPaneHitTestUPP(userRoutine)
+#define NewControlUserPaneTrackingProc(userRoutine) NewControlUserPaneTrackingUPP(userRoutine)
+#define NewControlUserPaneIdleProc(userRoutine) NewControlUserPaneIdleUPP(userRoutine)
+#define NewControlUserPaneKeyDownProc(userRoutine) NewControlUserPaneKeyDownUPP(userRoutine)
+#define NewControlUserPaneActivateProc(userRoutine) NewControlUserPaneActivateUPP(userRoutine)
+#define NewControlUserPaneFocusProc(userRoutine) NewControlUserPaneFocusUPP(userRoutine)
+#define NewControlUserPaneBackgroundProc(userRoutine) NewControlUserPaneBackgroundUPP(userRoutine)
+#define CallControlUserPaneDrawProc(userRoutine, control, part) InvokeControlUserPaneDrawUPP(control, part, userRoutine)
+#define CallControlUserPaneHitTestProc(userRoutine, control, where) InvokeControlUserPaneHitTestUPP(control, where, userRoutine)
+#define CallControlUserPaneTrackingProc(userRoutine, control, startPt, actionProc) InvokeControlUserPaneTrackingUPP(control, startPt, actionProc, userRoutine)
+#define CallControlUserPaneIdleProc(userRoutine, control) InvokeControlUserPaneIdleUPP(control, userRoutine)
+#define CallControlUserPaneKeyDownProc(userRoutine, control, keyCode, charCode, modifiers) InvokeControlUserPaneKeyDownUPP(control, keyCode, charCode, modifiers, userRoutine)
+#define CallControlUserPaneActivateProc(userRoutine, control, activating) InvokeControlUserPaneActivateUPP(control, activating, userRoutine)
+#define CallControlUserPaneFocusProc(userRoutine, control, action) InvokeControlUserPaneFocusUPP(control, action, userRoutine)
+#define CallControlUserPaneBackgroundProc(userRoutine, control, info) InvokeControlUserPaneBackgroundUPP(control, info, userRoutine)
+/*
+ ------------------------------------------------------------------------------------------
+ o EDIT TEXT (CDEF 17)
+ ------------------------------------------------------------------------------------------
+*/
+/* Edit Text proc IDs */
+enum {
+ kControlEditTextProc = 272,
+ kControlEditTextPasswordProc = 274
+};
+
+/* proc IDs available with Appearance 1.1 or later */
+enum {
+ kControlEditTextInlineInputProc = 276 /* Can't combine with the other variants*/
+};
+
+/* Tagged data supported by edit text */
+enum {
+ kControlEditTextStyleTag = kControlFontStyleTag, /* ControlFontStyleRec*/
+ kControlEditTextTextTag = FOUR_CHAR_CODE('text'), /* Buffer of chars - you supply the buffer*/
+ kControlEditTextTEHandleTag = FOUR_CHAR_CODE('than'), /* The TEHandle of the text edit record*/
+ kControlEditTextKeyFilterTag = kControlKeyFilterTag,
+ kControlEditTextSelectionTag = FOUR_CHAR_CODE('sele'), /* EditTextSelectionRec*/
+ kControlEditTextPasswordTag = FOUR_CHAR_CODE('pass') /* The clear text password text*/
+};
+
+/* tags available with Appearance 1.1 or later */
+enum {
+ kControlEditTextKeyScriptBehaviorTag = FOUR_CHAR_CODE('kscr'), /* ControlKeyScriptBehavior. Defaults to "PrefersRoman" for password fields,*/
+ /* or "AllowAnyScript" for non-password fields.*/
+ kControlEditTextLockedTag = FOUR_CHAR_CODE('lock'), /* Boolean. Locking disables editability.*/
+ kControlEditTextFixedTextTag = FOUR_CHAR_CODE('ftxt'), /* Like the normal text tag, but fixes inline input first*/
+ kControlEditTextValidationProcTag = FOUR_CHAR_CODE('vali'), /* ControlEditTextValidationUPP. Called when a key filter can't be: after cut, paste, etc.*/
+ kControlEditTextInlinePreUpdateProcTag = FOUR_CHAR_CODE('prup'), /* TSMTEPreUpdateUPP and TSMTEPostUpdateUpp. For use with inline input variant...*/
+ kControlEditTextInlinePostUpdateProcTag = FOUR_CHAR_CODE('poup') /* ...The refCon parameter will contain the ControlHandle.*/
+};
+
+/* Structure for getting the edit text selection */
+
+struct ControlEditTextSelectionRec {
+ SInt16 selStart;
+ SInt16 selEnd;
+};
+typedef struct ControlEditTextSelectionRec ControlEditTextSelectionRec;
+
+typedef ControlEditTextSelectionRec * ControlEditTextSelectionPtr;
+typedef CALLBACK_API( void , ControlEditTextValidationProcPtr )(ControlHandle control);
+typedef STACK_UPP_TYPE(ControlEditTextValidationProcPtr) ControlEditTextValidationUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(ControlEditTextValidationUPP)
+ NewControlEditTextValidationUPP (ControlEditTextValidationProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeControlEditTextValidationUPP (ControlEditTextValidationUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeControlEditTextValidationUPP (ControlHandle control,
+ ControlEditTextValidationUPP userUPP);
+
+#else
+ enum { uppControlEditTextValidationProcInfo = 0x000000C0 }; /* pascal no_return_value Func(4_bytes) */
+ #define NewControlEditTextValidationUPP(userRoutine) (ControlEditTextValidationUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlEditTextValidationProcInfo, GetCurrentArchitecture())
+ #define DisposeControlEditTextValidationUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeControlEditTextValidationUPP(control, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppControlEditTextValidationProcInfo, (control))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewControlEditTextValidationProc(userRoutine) NewControlEditTextValidationUPP(userRoutine)
+#define CallControlEditTextValidationProc(userRoutine, control) InvokeControlEditTextValidationUPP(control, userRoutine)
+/*--------------------------------------------------------------------------------------*/
+/* o STATIC TEXT (CDEF 18) */
+/*--------------------------------------------------------------------------------------*/
+/* Static Text proc IDs */
+enum {
+ kControlStaticTextProc = 288
+};
+
+/* Tagged data supported by static text */
+enum {
+ kControlStaticTextStyleTag = kControlFontStyleTag, /* ControlFontStyleRec*/
+ kControlStaticTextTextTag = FOUR_CHAR_CODE('text'), /* Copy of text*/
+ kControlStaticTextTextHeightTag = FOUR_CHAR_CODE('thei') /* SInt16*/
+};
+
+/* Tags available with appearance 1.1 or later */
+enum {
+ kControlStaticTextTruncTag = FOUR_CHAR_CODE('trun') /* TruncCode (-1 means no truncation)*/
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o PICTURE CONTROL (CDEF 19) */
+/*--------------------------------------------------------------------------------------*/
+/* Value parameter should contain the ID of the picture you wish to display when */
+/* creating controls of this type. If you don't want the control tracked at all, use */
+/* the 'no track' variant. */
+/* Picture control proc IDs */
+enum {
+ kControlPictureProc = 304,
+ kControlPictureNoTrackProc = 305 /* immediately returns kControlPicturePart*/
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o ICON CONTROL (CDEF 20) */
+/*--------------------------------------------------------------------------------------*/
+/* Value parameter should contain the ID of the ICON or cicn you wish to display when */
+/* creating controls of this type. If you don't want the control tracked at all, use */
+/* the 'no track' variant. */
+/* Icon control proc IDs */
+enum {
+ kControlIconProc = 320,
+ kControlIconNoTrackProc = 321, /* immediately returns kControlIconPart*/
+ kControlIconSuiteProc = 322,
+ kControlIconSuiteNoTrackProc = 323 /* immediately returns kControlIconPart*/
+};
+
+enum {
+ /* icon ref controls may have either an icon, color icon, icon suite, or icon ref.*/
+ /* for data other than icon, you must set the data by passing a*/
+ /* ControlButtonContentInfo to SetControlData*/
+ kControlIconRefProc = 324,
+ kControlIconRefNoTrackProc = 325 /* immediately returns kControlIconPart*/
+};
+
+/* Tagged data supported by icon controls */
+enum {
+ kControlIconTransformTag = FOUR_CHAR_CODE('trfm'), /* IconTransformType*/
+ kControlIconAlignmentTag = FOUR_CHAR_CODE('algn') /* IconAlignmentType*/
+};
+
+/* Tags available with appearance 1.1 or later */
+enum {
+ kControlIconResourceIDTag = FOUR_CHAR_CODE('ires'), /* SInt16 resource ID of icon to use*/
+ kControlIconContentTag = FOUR_CHAR_CODE('cont') /* accepts a ControlButtonContentInfo*/
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o WINDOW HEADER (CDEF 21) */
+/*--------------------------------------------------------------------------------------*/
+/* Window Header proc IDs */
+enum {
+ kControlWindowHeaderProc = 336, /* normal header*/
+ kControlWindowListViewHeaderProc = 337 /* variant for list views - no bottom line*/
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o LIST BOX (CDEF 22) */
+/*--------------------------------------------------------------------------------------*/
+/* Lists use an auxiliary resource to define their format. The resource type used is */
+/* 'ldes' and a definition for it can be found in Appearance.r. The resource ID for */
+/* the ldes is passed in the 'value' parameter when creating the control. You may pass */
+/* zero in value. This tells the List Box control to not use a resource. The list will */
+/* be created with default values, and will use the standard LDEF (0). You can change */
+/* the list by getting the list handle. You can set the LDEF to use by using the tag */
+/* below (kControlListBoxLDEFTag) */
+/* List Box proc IDs */
+enum {
+ kControlListBoxProc = 352,
+ kControlListBoxAutoSizeProc = 353
+};
+
+/* Tagged data supported by list box */
+enum {
+ kControlListBoxListHandleTag = FOUR_CHAR_CODE('lhan'), /* ListHandle*/
+ kControlListBoxKeyFilterTag = kControlKeyFilterTag, /* ControlKeyFilterUPP*/
+ kControlListBoxFontStyleTag = kControlFontStyleTag /* ControlFontStyleRec*/
+};
+
+/* New tags in 1.0.1 or later */
+enum {
+ kControlListBoxDoubleClickTag = FOUR_CHAR_CODE('dblc'), /* Boolean. Was last click a double-click?*/
+ kControlListBoxLDEFTag = FOUR_CHAR_CODE('ldef') /* SInt16. ID of LDEF to use.*/
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o PUSH BUTTON (CDEF 23) */
+/*--------------------------------------------------------------------------------------*/
+/* The new standard checkbox and radio button controls support a "mixed" value that */
+/* indicates that the current setting contains a mixed set of on and off values. The */
+/* control value used to display this indication is defined in Controls.h: */
+/* */
+/* kControlCheckBoxMixedValue = 2 */
+/* */
+/* Two new variants of the standard pushbutton have been added to the standard control */
+/* suite that draw a color icon next to the control title. One variant draws the icon */
+/* on the left side, the other draws it on the right side (when the system justifica- */
+/* tion is right to left, these are reversed). */
+/* */
+/* When either of the icon pushbuttons are created, the contrlMax field of the control */
+/* record is used to determine the ID of the 'cicn' resource drawn in the pushbutton. */
+/* */
+/* In addition, a push button can now be told to draw with a default outline using the */
+/* SetControlData routine with the kPushButtonDefaultTag below. */
+/* */
+/* A push button may also be marked using the kControlPushButtonCancelTag. This has */
+/* no visible representation, but does cause the button to play the CancelButton theme */
+/* sound instead of the regular pushbutton theme sound when pressed. */
+/* */
+/* Theme Push Button/Check Box/Radio Button proc IDs */
+enum {
+ kControlPushButtonProc = 368,
+ kControlCheckBoxProc = 369,
+ kControlRadioButtonProc = 370,
+ kControlPushButLeftIconProc = 374, /* Standard pushbutton with left-side icon*/
+ kControlPushButRightIconProc = 375 /* Standard pushbutton with right-side icon*/
+};
+
+/* Variants with Appearance 1.1 or later */
+enum {
+ kControlCheckBoxAutoToggleProc = 371,
+ kControlRadioButtonAutoToggleProc = 372
+};
+
+/* Tagged data supported by standard buttons */
+enum {
+ kControlPushButtonDefaultTag = FOUR_CHAR_CODE('dflt'), /* default ring flag*/
+ kControlPushButtonCancelTag = FOUR_CHAR_CODE('cncl') /* cancel button flag (1.1 and later)*/
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o SCROLL BAR (CDEF 24) */
+/*--------------------------------------------------------------------------------------*/
+/* This is the new Appearance scroll bar. */
+/* */
+/* Theme Scroll Bar proc IDs */
+enum {
+ kControlScrollBarProc = 384, /* normal scroll bar*/
+ kControlScrollBarLiveProc = 386 /* live scrolling variant*/
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o POPUP BUTTON (CDEF 25) */
+/*--------------------------------------------------------------------------------------*/
+/* This is the new Appearance Popup Button. It takes the same variants and does the */
+/* same overloading as the previous popup menu control. There are some differences: */
+/* */
+/* Passing in a menu ID of -12345 causes the popup not to try and get the menu from a */
+/* resource. Instead, you can build the menu and later stuff the menuhandle field in */
+/* the popup data information. */
+/* */
+/* You can pass -1 in the Max parameter to have the control calculate the width of the */
+/* title on its own instead of guessing and then tweaking to get it right. It adds the */
+/* appropriate amount of space between the title and the popup. */
+/* */
+/* Theme Popup Button proc IDs */
+enum {
+ kControlPopupButtonProc = 400,
+ kControlPopupFixedWidthVariant = 1 << 0,
+ kControlPopupVariableWidthVariant = 1 << 1,
+ kControlPopupUseAddResMenuVariant = 1 << 2,
+ kControlPopupUseWFontVariant = kControlUsesOwningWindowsFontVariant
+};
+
+/* These tags are available in 1.0.1 or later of Appearance */
+enum {
+ kControlPopupButtonMenuHandleTag = FOUR_CHAR_CODE('mhan'), /* MenuHandle*/
+ kControlPopupButtonMenuIDTag = FOUR_CHAR_CODE('mnid') /* SInt16*/
+};
+
+/* These tags are available in 1.1 or later of Appearance */
+enum {
+ kControlPopupButtonExtraHeightTag = FOUR_CHAR_CODE('exht') /* SInt16 extra vertical whitespace within the button*/
+};
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o RADIO GROUP (CDEF 26) */
+/*--------------------------------------------------------------------------------------*/
+/* This control implements a radio group. It is an embedding control and can therefore */
+/* only be used when a control hierarchy is established for its owning window. You */
+/* should only embed radio buttons within it. As radio buttons are embedded into it, */
+/* the group sets up its value, min, and max to represent the number of embedded items.*/
+/* The current value of the control is the index of the sub-control that is the current*/
+/* 'on' radio button. To get the current radio button control handle, you can use the */
+/* control manager call GetIndSubControl, passing in the value of the radio group. */
+/* */
+/* NOTE: This control is only available with Appearance 1.0.1. */
+/* Radio Group Proc ID */
+enum {
+ kControlRadioGroupProc = 416
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o SCROLL TEXT BOX (CDEF 27) */
+/*--------------------------------------------------------------------------------------*/
+/* This control implements a scrolling box of (non-editable) text. This is useful for */
+/* credits in about boxes, etc. */
+/* The standard version of this control has a scroll bar, but the autoscrolling */
+/* variant does not. The autoscrolling variant needs two pieces of information to */
+/* work: delay (in ticks) before the scrolling starts, and time (in ticks) between */
+/* scrolls. It will scroll one pixel at a time, unless changed via SetControlData. */
+/* */
+/* Parameter What Goes Here */
+/* ------------------- ---------------------------------------------------- */
+/* Value Resource ID of 'TEXT'/'styl' content. */
+/* Min Scroll start delay (in ticks) . */
+/* Max Delay (in ticks) between scrolls. */
+/* */
+/* NOTE: This control is only available with Appearance 1.1. */
+/* Scroll Text Box Proc IDs */
+enum {
+ kControlScrollTextBoxProc = 432,
+ kControlScrollTextBoxAutoScrollProc = 433
+};
+
+/* Tagged data supported by Scroll Text Box */
+enum {
+ kControlScrollTextBoxDelayBeforeAutoScrollTag = FOUR_CHAR_CODE('stdl'), /* UInt32 (ticks until autoscrolling starts)*/
+ kControlScrollTextBoxDelayBetweenAutoScrollTag = FOUR_CHAR_CODE('scdl'), /* UInt32 (ticks between scrolls)*/
+ kControlScrollTextBoxAutoScrollAmountTag = FOUR_CHAR_CODE('samt'), /* UInt16 (pixels per scroll) -- defaults to 1*/
+ kControlScrollTextBoxContentsTag = FOUR_CHAR_CODE('tres') /* SInt16 (resource ID of 'TEXT'/'styl') -- write only!*/
+};
+
+#if OLDROUTINENAMES
+/*--------------------------------------------------------------------------------------*/
+/* o OLDROUTINENAMES */
+/*--------------------------------------------------------------------------------------*/
+enum {
+ kControlCheckboxUncheckedValue = kControlCheckBoxUncheckedValue,
+ kControlCheckboxCheckedValue = kControlCheckBoxCheckedValue,
+ kControlCheckboxMixedValue = kControlCheckBoxMixedValue
+};
+
+enum {
+ inLabel = kControlLabelPart,
+ inMenu = kControlMenuPart,
+ inTriangle = kControlTrianglePart,
+ inButton = kControlButtonPart,
+ inCheckBox = kControlCheckBoxPart,
+ inUpButton = kControlUpButtonPart,
+ inDownButton = kControlDownButtonPart,
+ inPageUp = kControlPageUpPart,
+ inPageDown = kControlPageDownPart
+};
+
+enum {
+ kInLabelControlPart = kControlLabelPart,
+ kInMenuControlPart = kControlMenuPart,
+ kInTriangleControlPart = kControlTrianglePart,
+ kInButtonControlPart = kControlButtonPart,
+ kInCheckBoxControlPart = kControlCheckBoxPart,
+ kInUpButtonControlPart = kControlUpButtonPart,
+ kInDownButtonControlPart = kControlDownButtonPart,
+ kInPageUpControlPart = kControlPageUpPart,
+ kInPageDownControlPart = kControlPageDownPart
+};
+
+
+#endif /* OLDROUTINENAMES */
+
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CONTROLDEFINITIONS__ */
+
diff --git a/include/qt/ControlStrip.h b/include/qt/ControlStrip.h
new file mode 100644
index 000000000..b08d0fdb7
--- /dev/null
+++ b/include/qt/ControlStrip.h
@@ -0,0 +1,242 @@
+/*
+ File: ControlStrip.h
+
+ Contains: Control Strip (for Powerbooks and Duos) Interfaces.
+
+ Version: Technology: ControlStrip 1.4
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1992-2001 by Apple Computer, Inc. All rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CONTROLSTRIP__
+#define __CONTROLSTRIP__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MENUS__
+#include "Menus.h"
+#endif
+
+#ifndef __DIALOGS__
+#include "Dialogs.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*********************************************************************************************
+
+ messages passed to the modules
+
+*********************************************************************************************/
+enum {
+ sdevInitModule = 0, /* initialize the module*/
+ sdevCloseModule = 1, /* clean up before being closed*/
+ sdevFeatures = 2, /* return feature bits*/
+ sdevGetDisplayWidth = 3, /* returns the width of the module's display*/
+ sdevPeriodicTickle = 4, /* periodic tickle when nothing else is happening*/
+ sdevDrawStatus = 5, /* update the interface in the Control Strip*/
+ sdevMouseClick = 6, /* user clicked on the module's display area in the Control Strip*/
+ sdevSaveSettings = 7, /* saved any changed settings in module's preferences file*/
+ sdevShowBalloonHelp = 8 /* puts up a help balloon, if the module has one to display*/
+};
+
+/*********************************************************************************************
+
+ Features supported by the module. If a bit is set, it means that feature is supported.
+ All undefined bits are reserved for future use by Apple, and should be set to zero.
+
+*********************************************************************************************/
+enum {
+ sdevWantMouseClicks = 0, /* notify the module of mouseDown events*/
+ sdevDontAutoTrack = 1, /* call the module to do mouse tracking*/
+ sdevHasCustomHelp = 2, /* module provides its own help messages*/
+ sdevKeepModuleLocked = 3 /* module needs to be locked in the heap*/
+};
+
+/*********************************************************************************************
+
+ Result values returned by the sdevPeriodicTickle and sdevIconMouseClick selectors.
+ If a bit is set, the module can request that a specific function is performed by
+ the Control Strip. A result of zero will do nothing. All undefined bits are reserved
+ for future use by Apple, and should be set to zero.
+
+*********************************************************************************************/
+enum {
+ sdevResizeDisplay = 0, /* resize the module's display*/
+ sdevNeedToSave = 1, /* need to save changed settings, when convenient*/
+ sdevHelpStateChange = 2, /* need to update the help message because of a state change*/
+ sdevCloseNow = 3 /* close a module because it doesn't want to stay around*/
+};
+
+
+/*********************************************************************************************
+
+ miscellaneous
+
+*********************************************************************************************/
+enum {
+ sdevFileType = FOUR_CHAR_CODE('sdev') /* module's file type*/
+};
+
+enum {
+ sdevMenuItemMark = 0xA5 /* 'o': 'checkmark' to use in popup menus*/
+};
+
+
+/* direction values for SBDrawBarGraph*/
+
+enum {
+ BarGraphSlopeLeft = -1, /* max end of sloping bar graph is on the left*/
+ BarGraphFlatRight = 0, /* max end of flat bar graph is on the right*/
+ BarGraphSlopeRight = 1 /* max end of sloping bar graph is on the right*/
+};
+
+/*********************************************************************************************
+
+ utility routines to provide standard interface elements and support for common functions
+
+*********************************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( Boolean )
+SBIsControlStripVisible (void) TWOWORDINLINE(0x7000, 0xAAF2);
+
+EXTERN_API( void )
+SBShowHideControlStrip (Boolean showIt) THREEWORDINLINE(0x303C, 0x0101, 0xAAF2);
+
+EXTERN_API( Boolean )
+SBSafeToAccessStartupDisk (void) TWOWORDINLINE(0x7002, 0xAAF2);
+
+EXTERN_API( short )
+SBOpenModuleResourceFile (OSType fileCreator) THREEWORDINLINE(0x303C, 0x0203, 0xAAF2);
+
+EXTERN_API( OSErr )
+SBLoadPreferences (ConstStr255Param prefsResourceName,
+ Handle * preferences) THREEWORDINLINE(0x303C, 0x0404, 0xAAF2);
+
+EXTERN_API( OSErr )
+SBSavePreferences (ConstStr255Param prefsResourceName,
+ Handle preferences) THREEWORDINLINE(0x303C, 0x0405, 0xAAF2);
+
+EXTERN_API( void )
+SBGetDetachedIndString (StringPtr theString,
+ Handle stringList,
+ short whichString) THREEWORDINLINE(0x303C, 0x0506, 0xAAF2);
+
+EXTERN_API( OSErr )
+SBGetDetachIconSuite (Handle * theIconSuite,
+ short theResID,
+ unsigned long selector) THREEWORDINLINE(0x303C, 0x0507, 0xAAF2);
+
+EXTERN_API( short )
+SBTrackPopupMenu (const Rect * moduleRect,
+ MenuHandle theMenu) THREEWORDINLINE(0x303C, 0x0408, 0xAAF2);
+
+EXTERN_API( short )
+SBTrackSlider (const Rect * moduleRect,
+ short ticksOnSlider,
+ short initialValue) THREEWORDINLINE(0x303C, 0x0409, 0xAAF2);
+
+EXTERN_API( OSErr )
+SBShowHelpString (const Rect * moduleRect,
+ StringPtr helpString) THREEWORDINLINE(0x303C, 0x040A, 0xAAF2);
+
+EXTERN_API( short )
+SBGetBarGraphWidth (short barCount) THREEWORDINLINE(0x303C, 0x010B, 0xAAF2);
+
+EXTERN_API( void )
+SBDrawBarGraph (short level,
+ short barCount,
+ short direction,
+ Point barGraphTopLeft) THREEWORDINLINE(0x303C, 0x050C, 0xAAF2);
+
+EXTERN_API( void )
+SBModalDialogInContext (ModalFilterUPP filterProc,
+ short * itemHit) THREEWORDINLINE(0x303C, 0x040D, 0xAAF2);
+
+/* The following routines are available in Control Strip 1.2 and later. */
+EXTERN_API( OSErr )
+SBGetControlStripFontID (short * fontID) THREEWORDINLINE(0x303C, 0x020E, 0xAAF2);
+
+EXTERN_API( OSErr )
+SBSetControlStripFontID (short fontID) THREEWORDINLINE(0x303C, 0x010F, 0xAAF2);
+
+EXTERN_API( OSErr )
+SBGetControlStripFontSize (short * fontSize) THREEWORDINLINE(0x303C, 0x0210, 0xAAF2);
+
+EXTERN_API( OSErr )
+SBSetControlStripFontSize (short fontSize) THREEWORDINLINE(0x303C, 0x0111, 0xAAF2);
+
+EXTERN_API( OSErr )
+SBGetShowHideHotKey (short * modifiers,
+ unsigned char * keyCode) THREEWORDINLINE(0x303C, 0x0412, 0xAAF2);
+
+EXTERN_API( OSErr )
+SBSetShowHideHotKey (short modifiers,
+ unsigned char keyCode) THREEWORDINLINE(0x303C, 0x0213, 0xAAF2);
+
+EXTERN_API( OSErr )
+SBIsShowHideHotKeyEnabled (Boolean * enabled) THREEWORDINLINE(0x303C, 0x0214, 0xAAF2);
+
+EXTERN_API( OSErr )
+SBEnableShowHideHotKey (Boolean enabled) THREEWORDINLINE(0x303C, 0x0115, 0xAAF2);
+
+/* The following routines are available in Control Strip 1.4 and later. */
+EXTERN_API( short )
+SBHitTrackSlider (const Rect * moduleRect,
+ short ticksOnSlider,
+ short initialValue,
+ Boolean * hit) THREEWORDINLINE(0x303C, 0x0616, 0xAAF2);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CONTROLSTRIP__ */
+
diff --git a/include/qt/Controls.h b/include/qt/Controls.h
new file mode 100644
index 000000000..21e107c38
--- /dev/null
+++ b/include/qt/Controls.h
@@ -0,0 +1,1592 @@
+/*
+ File: Controls.h
+
+ Contains: Control Manager interfaces
+
+ Version: Technology: Mac OS 9
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CONTROLS__
+#define __CONTROLS__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#ifndef __MENUS__
+#include "Menus.h"
+#endif
+
+#ifndef __TEXTEDIT__
+#include "TextEdit.h"
+#endif
+
+#ifndef __DRAG__
+#include "Drag.h"
+#endif
+
+#ifndef __ICONS__
+#include "Icons.h"
+#endif
+
+#ifndef __COLLECTIONS__
+#include "Collections.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*------------------------------------------------------------------------------------------------------*/
+/* o Resource Types */
+/*------------------------------------------------------------------------------------------------------*/
+enum {
+ kControlDefProcType = FOUR_CHAR_CODE('CDEF'),
+ kControlTemplateResourceType = FOUR_CHAR_CODE('CNTL'),
+ kControlColorTableResourceType = FOUR_CHAR_CODE('cctb'),
+ kControlDefProcResourceType = FOUR_CHAR_CODE('CDEF')
+};
+
+/*------------------------------------------------------------------------------------------------------*/
+/* o Format of a 'CNTL' resource */
+/*------------------------------------------------------------------------------------------------------*/
+
+struct ControlTemplate {
+ Rect controlRect;
+ SInt16 controlValue;
+ Boolean controlVisible;
+ UInt8 fill;
+ SInt16 controlMaximum;
+ SInt16 controlMinimum;
+ SInt16 controlDefProcID;
+ SInt32 controlReference;
+ Str255 controlTitle;
+};
+typedef struct ControlTemplate ControlTemplate;
+typedef ControlTemplate * ControlTemplatePtr;
+typedef ControlTemplatePtr * ControlTemplateHandle;
+
+
+#if !TARGET_OS_MAC
+/*
+ ---------------------------------------------------------------------------------------------------------
+ o NON-MAC COMPATIBILITY CODES (QuickTime 3.0)
+ ---------------------------------------------------------------------------------------------------------
+*/
+
+typedef UInt32 ControlNotification;
+enum {
+ controlNotifyNothing = FOUR_CHAR_CODE('nada'), /* No (null) notification*/
+ controlNotifyClick = FOUR_CHAR_CODE('clik'), /* Control was clicked*/
+ controlNotifyFocus = FOUR_CHAR_CODE('focu'), /* Control got keyboard focus*/
+ controlNotifyKey = FOUR_CHAR_CODE('key ') /* Control got a keypress*/
+};
+
+typedef UInt32 ControlCapabilities;
+enum {
+ kControlCanAutoInvalidate = 1L << 0 /* Control component automatically invalidates areas left behind after hide/move operation.*/
+};
+
+/* procID's for our added "controls"*/
+enum {
+ staticTextProc = 256, /* static text*/
+ editTextProc = 272, /* editable text*/
+ iconProc = 288, /* icon*/
+ userItemProc = 304, /* user drawn item*/
+ pictItemProc = 320 /* pict*/
+};
+
+#endif /* !TARGET_OS_MAC */
+
+/*------------------------------------------------------------------------------------------------------*/
+/* o ControlRef */
+/*------------------------------------------------------------------------------------------------------*/
+#if !OPAQUE_TOOLBOX_STRUCTS
+typedef struct ControlRecord ControlRecord;
+typedef ControlRecord * ControlPtr;
+typedef ControlPtr * ControlRef;
+#else
+typedef struct OpaqueControlRef* ControlRef;
+#endif /* !OPAQUE_TOOLBOX_STRUCTS */
+
+/* ControlHandle is obsolete. Use ControlRef.*/
+typedef ControlRef ControlHandle;
+typedef SInt16 ControlPartCode;
+/*------------------------------------------------------------------------------------------------------*/
+/* o Control ActionProcPtr */
+/*------------------------------------------------------------------------------------------------------*/
+typedef CALLBACK_API( void , ControlActionProcPtr )(ControlRef theControl, ControlPartCode partCode);
+typedef STACK_UPP_TYPE(ControlActionProcPtr) ControlActionUPP;
+/*------------------------------------------------------------------------------------------------------*/
+/* o ControlRecord */
+/*------------------------------------------------------------------------------------------------------*/
+#if !OPAQUE_TOOLBOX_STRUCTS
+
+struct ControlRecord {
+ ControlRef nextControl;
+ WindowPtr contrlOwner;
+ Rect contrlRect;
+ UInt8 contrlVis;
+ UInt8 contrlHilite;
+ SInt16 contrlValue;
+ SInt16 contrlMin;
+ SInt16 contrlMax;
+ Handle contrlDefProc;
+ Handle contrlData;
+ ControlActionUPP contrlAction;
+ SInt32 contrlRfCon;
+ Str255 contrlTitle;
+};
+
+#endif /* !OPAQUE_TOOLBOX_STRUCTS */
+
+/*------------------------------------------------------------------------------------------------------*/
+/* o Control ActionProcPtr : Epilogue */
+/*------------------------------------------------------------------------------------------------------*/
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(ControlActionUPP)
+ NewControlActionUPP (ControlActionProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeControlActionUPP (ControlActionUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeControlActionUPP (ControlRef theControl,
+ ControlPartCode partCode,
+ ControlActionUPP userUPP);
+
+#else
+ enum { uppControlActionProcInfo = 0x000002C0 }; /* pascal no_return_value Func(4_bytes, 2_bytes) */
+ #define NewControlActionUPP(userRoutine) (ControlActionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlActionProcInfo, GetCurrentArchitecture())
+ #define DisposeControlActionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeControlActionUPP(theControl, partCode, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppControlActionProcInfo, (theControl), (partCode))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewControlActionProc(userRoutine) NewControlActionUPP(userRoutine)
+#define CallControlActionProc(userRoutine, theControl, partCode) InvokeControlActionUPP(theControl, partCode, userRoutine)
+/*------------------------------------------------------------------------------------------------------*/
+/* o Control Color Table */
+/*------------------------------------------------------------------------------------------------------*/
+enum {
+ cFrameColor = 0,
+ cBodyColor = 1,
+ cTextColor = 2,
+ cThumbColor = 3,
+ kNumberCtlCTabEntries = 4
+};
+
+
+struct CtlCTab {
+ SInt32 ccSeed;
+ SInt16 ccRider;
+ SInt16 ctSize;
+ ColorSpec ctTable[4];
+};
+typedef struct CtlCTab CtlCTab;
+
+typedef CtlCTab * CCTabPtr;
+typedef CCTabPtr * CCTabHandle;
+/*------------------------------------------------------------------------------------------------------*/
+/* o Auxiliary Control Record */
+/*------------------------------------------------------------------------------------------------------*/
+#if !OPAQUE_TOOLBOX_STRUCTS
+
+struct AuxCtlRec {
+ Handle acNext;
+ ControlRef acOwner;
+ CCTabHandle acCTable;
+ SInt16 acFlags;
+ SInt32 acReserved;
+ SInt32 acRefCon;
+};
+typedef struct AuxCtlRec AuxCtlRec;
+
+typedef AuxCtlRec * AuxCtlPtr;
+typedef AuxCtlPtr * AuxCtlHandle;
+#endif /* !OPAQUE_TOOLBOX_STRUCTS */
+
+/*--------------------------------------------------------------------------------------*/
+/* o Control Variants */
+/*--------------------------------------------------------------------------------------*/
+typedef SInt16 ControlVariant;
+enum {
+ kControlNoVariant = 0, /* No variant*/
+ kControlUsesOwningWindowsFontVariant = 1 << 3 /* Control uses owning windows font to display text*/
+};
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Control Part Codes */
+/*--------------------------------------------------------------------------------------*/
+/* Basic part codes */
+enum {
+ kControlNoPart = 0,
+ kControlIndicatorPart = 129,
+ kControlDisabledPart = 254,
+ kControlInactivePart = 255
+};
+
+/* Use this constant in Get/SetControlData when the data referred to is not */
+/* specific to a part, but rather the entire control, e.g. the list handle of a */
+/* list box control. */
+enum {
+ kControlEntireControl = 0
+};
+
+/* Meta-Parts */
+/* */
+/* If you haven't guessed from looking at other toolbox headers. We like the word */
+/* 'meta'. It's cool. So here's one more for you. A meta-part is a part used in a call */
+/* to the GetControlRegion API. These parts are parts that might be defined by a */
+/* control, but should not be returned from calls like TestControl, et al. They define */
+/* a region of a control, presently the structure and the content region. The content */
+/* region is only defined by controls that can embed other controls. It is the area */
+/* that embedded content can live. */
+/* */
+/* Along with these parts, you can also pass in normal part codes to get the regions */
+/* of the parts. Not all controls fully support this at the time this was written. */
+enum {
+ kControlStructureMetaPart = -1,
+ kControlContentMetaPart = -2
+};
+
+/* focusing part codes */
+enum {
+ kControlFocusNoPart = 0, /* tells control to clear its focus*/
+ kControlFocusNextPart = -1, /* tells control to focus on the next part*/
+ kControlFocusPrevPart = -2 /* tells control to focus on the previous part*/
+};
+
+typedef SInt16 ControlFocusPart;
+/*------------------------------------------------------------------------------------------------------*/
+/* o Control Collection Tags */
+/*------------------------------------------------------------------------------------------------------*/
+/* These are standard tags that you will find in a flattened Control's Collection. */
+/* */
+/* All tags at ID zero in a flattened Control's Collection is reserved for Control Manager use. */
+/* Custom control definitions should use other IDs. */
+/* */
+/* Most of these tags are interpreted when you call CreateCustomControl; the Control Manager will */
+/* put value in the right place before calling the Control Definition with the initialization message. */
+/* Other tags are only interpreted when calling UnflattenControl. */
+enum {
+ kControlCollectionTagBounds = FOUR_CHAR_CODE('boun'), /* Rect - the bounding rectangle*/
+ kControlCollectionTagValue = FOUR_CHAR_CODE('valu'), /* SInt32 - the value*/
+ kControlCollectionTagMinimum = FOUR_CHAR_CODE('min '), /* SInt32 - the minimum*/
+ kControlCollectionTagMaximum = FOUR_CHAR_CODE('max '), /* SInt32 - the maximum*/
+ kControlCollectionTagViewSize = FOUR_CHAR_CODE('view'), /* SInt32 - the view size*/
+ kControlCollectionTagVisibility = FOUR_CHAR_CODE('visi'), /* Boolean - the visible state*/
+ kControlCollectionTagRefCon = FOUR_CHAR_CODE('refc'), /* SInt32 - the refCon*/
+ kControlCollectionTagTitle = FOUR_CHAR_CODE('titl') /* arbitrarily sized character array - the title*/
+};
+
+/* The following are additional tags which are only interpreted by UnflattenControl. */
+enum {
+ kControlCollectionTagSubControls = FOUR_CHAR_CODE('subc') /* data for all of a control's subcontrols*/
+};
+
+
+/*------------------------------------------------------------------------------------------------------*/
+/* o Control Image Content */
+/*------------------------------------------------------------------------------------------------------*/
+enum {
+ kControlContentTextOnly = 0,
+ kControlNoContent = 0,
+ kControlContentIconSuiteRes = 1,
+ kControlContentCIconRes = 2,
+ kControlContentPictRes = 3,
+ kControlContentICONRes = 4,
+ kControlContentIconSuiteHandle = 129,
+ kControlContentCIconHandle = 130,
+ kControlContentPictHandle = 131,
+ kControlContentIconRef = 132,
+ kControlContentICON = 133
+};
+
+typedef SInt16 ControlContentType;
+
+struct ControlButtonContentInfo {
+ ControlContentType contentType;
+ union {
+ SInt16 resID;
+ CIconHandle cIconHandle;
+ Handle iconSuite;
+ IconRef iconRef;
+ PicHandle picture;
+ Handle ICONHandle;
+ } u;
+};
+typedef struct ControlButtonContentInfo ControlButtonContentInfo;
+typedef ControlButtonContentInfo * ControlButtonContentInfoPtr;
+
+typedef ControlButtonContentInfo ControlImageContentInfo;
+typedef ControlButtonContentInfo * ControlImageContentInfoPtr;
+/*------------------------------------------------------------------------------------------------------*/
+/* o Control Key Script Behavior */
+/*------------------------------------------------------------------------------------------------------*/
+enum {
+ kControlKeyScriptBehaviorAllowAnyScript = FOUR_CHAR_CODE('any '), /* leaves the current keyboard alone and allows user to change the keyboard.*/
+ kControlKeyScriptBehaviorPrefersRoman = FOUR_CHAR_CODE('prmn'), /* switches the keyboard to roman, but allows them to change it as desired.*/
+ kControlKeyScriptBehaviorRequiresRoman = FOUR_CHAR_CODE('rrmn') /* switches the keyboard to roman and prevents the user from changing it.*/
+};
+
+typedef UInt32 ControlKeyScriptBehavior;
+/*------------------------------------------------------------------------------------------------------*/
+/* o Control Font Style */
+/*------------------------------------------------------------------------------------------------------*/
+/* SPECIAL FONT USAGE NOTES: You can specify the font to use for many control types.
+ The constants below are meta-font numbers which you can use to set a particular
+ control's font usage. There are essentially two modes you can use: 1) default,
+ which is essentially the same as it always has been, i.e. it uses the system font, unless
+ directed to use the window font via a control variant. 2) you can specify to use
+ the big or small system font in a generic manner. The Big system font is the font
+ used in menus, etc. Chicago has filled that role for some time now. Small system
+ font is currently Geneva 10. The meta-font number implies the size and style.
+
+ NOTE: Not all font attributes are used by all controls. Most, in fact, ignore
+ the fore and back color (Static Text is the only one that does, for
+ backwards compatibility). Also size, face, and addFontSize are ignored
+ when using the meta-font numbering.
+*/
+/* Meta-font numbering - see note above */
+enum {
+ kControlFontBigSystemFont = -1, /* force to big system font*/
+ kControlFontSmallSystemFont = -2, /* force to small system font*/
+ kControlFontSmallBoldSystemFont = -3, /* force to small bold system font*/
+ kControlFontViewSystemFont = -4 /* force to views system font (DataBrowser control only)*/
+};
+
+/* Add these masks together to set the flags field of a ControlFontStyleRec */
+/* They specify which fields to apply to the text. It is important to make */
+/* sure that you specify only the fields that you wish to set. */
+enum {
+ kControlUseFontMask = 0x0001,
+ kControlUseFaceMask = 0x0002,
+ kControlUseSizeMask = 0x0004,
+ kControlUseForeColorMask = 0x0008,
+ kControlUseBackColorMask = 0x0010,
+ kControlUseModeMask = 0x0020,
+ kControlUseJustMask = 0x0040,
+ kControlUseAllMask = 0x00FF,
+ kControlAddFontSizeMask = 0x0100
+};
+
+/* AddToMetaFont indicates that we want to start with a standard system */
+/* font, but then we'd like to add the other attributes. Normally, the meta */
+/* font ignores all other flags */
+enum {
+ kControlAddToMetaFontMask = 0x0200 /* Available in Appearance 1.1 or later*/
+};
+
+
+struct ControlFontStyleRec {
+ SInt16 flags;
+ SInt16 font;
+ SInt16 size;
+ SInt16 style;
+ SInt16 mode;
+ SInt16 just;
+ RGBColor foreColor;
+ RGBColor backColor;
+};
+typedef struct ControlFontStyleRec ControlFontStyleRec;
+
+typedef ControlFontStyleRec * ControlFontStylePtr;
+/*------------------------------------------------------------------------------------------------------*/
+/* o Click Activation Results */
+/*------------------------------------------------------------------------------------------------------*/
+/* These are for use with GetControlClickActivation. The enumerated values should be pretty */
+/* self-explanatory, but just in case: */
+/* o Activate/DoNotActivate indicates whether or not to change the owning window's z-ordering before */
+/* processing the click. If activation is requested, you may also want to immediately redraw the */
+/* newly exposed portion of the window. */
+/* o Ignore/Handle Click indicates whether or not to call an appropriate click handling API (like */
+/* HandleControlClick) in respose to the event. */
+enum {
+ kDoNotActivateAndIgnoreClick = 0, /* probably never used. here for completeness.*/
+ kDoNotActivateAndHandleClick = 1, /* let the control handle the click while the window is still in the background.*/
+ kActivateAndIgnoreClick = 2, /* control doesn't want to respond directly to the click, but window should still be brought forward.*/
+ kActivateAndHandleClick = 3 /* control wants to respond to the click, but only after the window has been activated.*/
+};
+
+typedef UInt32 ClickActivationResult;
+/*------------------------------------------------------------------------------------------------------*/
+/* o Common data tags for Get/SetControlData */
+/*------------------------------------------------------------------------------------------------------*/
+enum {
+ kControlFontStyleTag = FOUR_CHAR_CODE('font'),
+ kControlKeyFilterTag = FOUR_CHAR_CODE('fltr')
+};
+
+
+/*------------------------------------------------------------------------------------------------------*/
+/* o Control Feature Bits */
+/*------------------------------------------------------------------------------------------------------*/
+enum {
+ /* Control feature bits - returned by GetControlFeatures */
+ kControlSupportsGhosting = 1 << 0,
+ kControlSupportsEmbedding = 1 << 1,
+ kControlSupportsFocus = 1 << 2,
+ kControlWantsIdle = 1 << 3,
+ kControlWantsActivate = 1 << 4,
+ kControlHandlesTracking = 1 << 5,
+ kControlSupportsDataAccess = 1 << 6,
+ kControlHasSpecialBackground = 1 << 7,
+ kControlGetsFocusOnClick = 1 << 8,
+ kControlSupportsCalcBestRect = 1 << 9,
+ kControlSupportsLiveFeedback = 1 << 10,
+ kControlHasRadioBehavior = 1 << 11, /* Available in Appearance 1.0.1 or later*/
+ kControlSupportsDragAndDrop = 1 << 12, /* Available in Carbon*/
+ kControlAutoToggles = 1 << 14, /* Available in Appearance 1.1 or later*/
+ kControlSupportsGetRegion = 1 << 17, /* Available in Appearance 1.1 or later*/
+ kControlSupportsFlattening = 1 << 19, /* Available in Carbon*/
+ kControlSupportsSetCursor = 1 << 20, /* Available in Carbon*/
+ kControlSupportsContextualMenus = 1 << 21, /* Available in Carbon*/
+ kControlSupportsClickActivation = 1 << 22 /* Available in Carbon*/
+};
+
+/*------------------------------------------------------------------------------------------------------*/
+/* o Control Messages */
+/*------------------------------------------------------------------------------------------------------*/
+enum {
+ drawCntl = 0,
+ testCntl = 1,
+ calcCRgns = 2,
+ initCntl = 3,
+ dispCntl = 4,
+ posCntl = 5,
+ thumbCntl = 6,
+ dragCntl = 7,
+ autoTrack = 8,
+ calcCntlRgn = 10,
+ calcThumbRgn = 11,
+ drawThumbOutline = 12,
+ kControlMsgDrawGhost = 13,
+ kControlMsgCalcBestRect = 14, /* Calculate best fitting rectangle for control*/
+ kControlMsgHandleTracking = 15,
+ kControlMsgFocus = 16, /* param indicates action.*/
+ kControlMsgKeyDown = 17,
+ kControlMsgIdle = 18,
+ kControlMsgGetFeatures = 19,
+ kControlMsgSetData = 20,
+ kControlMsgGetData = 21,
+ kControlMsgActivate = 22,
+ kControlMsgSetUpBackground = 23,
+ kControlMsgCalcValueFromPos = 26,
+ kControlMsgTestNewMsgSupport = 27, /* See if this control supports new messaging*/
+ kControlMsgSubValueChanged = 25, /* Available in Appearance 1.0.1 or later*/
+ kControlMsgSubControlAdded = 28, /* Available in Appearance 1.0.1 or later*/
+ kControlMsgSubControlRemoved = 29, /* Available in Appearance 1.0.1 or later*/
+ kControlMsgApplyTextColor = 30, /* Available in Appearance 1.1 or later*/
+ kControlMsgGetRegion = 31, /* Available in Appearance 1.1 or later*/
+ kControlMsgFlatten = 32, /* Available in Carbon. Param is Collection.*/
+ kControlMsgSetCursor = 33, /* Available in Carbon. Param is ControlSetCursorRec*/
+ kControlMsgDragEnter = 38, /* Available in Carbon. Param is DragRef, result is boolean indicating acceptibility of drag.*/
+ kControlMsgDragLeave = 39, /* Available in Carbon. As above.*/
+ kControlMsgDragWithin = 40, /* Available in Carbon. As above.*/
+ kControlMsgDragReceive = 41, /* Available in Carbon. Param is DragRef, result is OSStatus indicating success/failure.*/
+ kControlMsgDisplayDebugInfo = 46, /* Available in Carbon on X.*/
+ kControlMsgContextualMenuClick = 47, /* Available in Carbon. Param is ControlContextualMenuClickRec*/
+ kControlMsgGetClickActivation = 48 /* Available in Carbon. Param is ControlClickActivationRec*/
+};
+
+typedef SInt16 ControlDefProcMessage;
+/*--------------------------------------------------------------------------------------*/
+/* o Constants for drawCntl message (passed in param) */
+/*--------------------------------------------------------------------------------------*/
+enum {
+ kDrawControlEntireControl = 0,
+ kDrawControlIndicatorOnly = 129
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o Constants for dragCntl message (passed in param) */
+/*--------------------------------------------------------------------------------------*/
+enum {
+ kDragControlEntireControl = 0,
+ kDragControlIndicator = 1
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o Drag Constraint Structure for thumbCntl message (passed in param) */
+/*--------------------------------------------------------------------------------------*/
+
+struct IndicatorDragConstraint {
+ Rect limitRect;
+ Rect slopRect;
+ DragConstraint axis;
+};
+typedef struct IndicatorDragConstraint IndicatorDragConstraint;
+typedef IndicatorDragConstraint * IndicatorDragConstraintPtr;
+/*--------------------------------------------------------------------------------------*/
+/* CDEF should return as result of kControlMsgTestNewMsgSupport */
+/*--------------------------------------------------------------------------------------*/
+enum {
+ kControlSupportsNewMessages = FOUR_CHAR_CODE(' ok ')
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* This structure is passed into a CDEF when called with the kControlMsgHandleTracking */
+/* message */
+/*--------------------------------------------------------------------------------------*/
+
+struct ControlTrackingRec {
+ Point startPt;
+ EventModifiers modifiers;
+ ControlActionUPP action;
+};
+typedef struct ControlTrackingRec ControlTrackingRec;
+
+typedef ControlTrackingRec * ControlTrackingPtr;
+/*--------------------------------------------------------------------------------------*/
+/* This structure is passed into a CDEF when called with the kControlMsgKeyDown message */
+/*--------------------------------------------------------------------------------------*/
+
+struct ControlKeyDownRec {
+ EventModifiers modifiers;
+ SInt16 keyCode;
+ SInt16 charCode;
+};
+typedef struct ControlKeyDownRec ControlKeyDownRec;
+
+typedef ControlKeyDownRec * ControlKeyDownPtr;
+/*--------------------------------------------------------------------------------------*/
+/* This structure is passed into a CDEF when called with the kControlMsgGetData or */
+/* kControlMsgSetData message */
+/*--------------------------------------------------------------------------------------*/
+
+struct ControlDataAccessRec {
+ ResType tag;
+ ResType part;
+ Size size;
+ Ptr dataPtr;
+};
+typedef struct ControlDataAccessRec ControlDataAccessRec;
+
+typedef ControlDataAccessRec * ControlDataAccessPtr;
+/*--------------------------------------------------------------------------------------*/
+/* This structure is passed into a CDEF when called with the kControlCalcBestRect msg */
+/*--------------------------------------------------------------------------------------*/
+
+struct ControlCalcSizeRec {
+ SInt16 height;
+ SInt16 width;
+ SInt16 baseLine;
+};
+typedef struct ControlCalcSizeRec ControlCalcSizeRec;
+
+typedef ControlCalcSizeRec * ControlCalcSizePtr;
+/*--------------------------------------------------------------------------------------*/
+/* This structure is passed into a CDEF when called with the kControlMsgSetUpBackground */
+/* message is sent */
+/*--------------------------------------------------------------------------------------*/
+
+struct ControlBackgroundRec {
+ SInt16 depth;
+ Boolean colorDevice;
+};
+typedef struct ControlBackgroundRec ControlBackgroundRec;
+
+typedef ControlBackgroundRec * ControlBackgroundPtr;
+/*--------------------------------------------------------------------------------------*/
+/* This structure is passed into a CDEF when called with the kControlMsgApplyTextColor */
+/* message is sent */
+/*--------------------------------------------------------------------------------------*/
+
+struct ControlApplyTextColorRec {
+ SInt16 depth;
+ Boolean colorDevice;
+ Boolean active;
+};
+typedef struct ControlApplyTextColorRec ControlApplyTextColorRec;
+
+typedef ControlApplyTextColorRec * ControlApplyTextColorPtr;
+/*--------------------------------------------------------------------------------------*/
+/* This structure is passed into a CDEF when called with the kControlMsgGetRegion */
+/* message is sent */
+/*--------------------------------------------------------------------------------------*/
+
+struct ControlGetRegionRec {
+ RgnHandle region;
+ ControlPartCode part;
+};
+typedef struct ControlGetRegionRec ControlGetRegionRec;
+
+typedef ControlGetRegionRec * ControlGetRegionPtr;
+/*--------------------------------------------------------------------------------------*/
+/* This structure is passed into a CDEF when the kControlMsgSetCursor message is sent */
+/* Only sent on Carbon */
+/*--------------------------------------------------------------------------------------*/
+
+struct ControlSetCursorRec {
+ Point localPoint;
+ EventModifiers modifiers;
+ Boolean cursorWasSet; /* your CDEF must set this to true if you set the cursor, or false otherwise*/
+};
+typedef struct ControlSetCursorRec ControlSetCursorRec;
+
+typedef ControlSetCursorRec * ControlSetCursorPtr;
+/*--------------------------------------------------------------------------------------*/
+/* This structure is passed into a CDEF when the kControlMsgContextualMenuClick message */
+/* is sent */
+/* Only sent on Carbon */
+/*--------------------------------------------------------------------------------------*/
+
+struct ControlContextualMenuClickRec {
+ Point localPoint;
+ Boolean menuDisplayed; /* your CDEF must set this to true if you displayed a menu, or false otherwise*/
+};
+typedef struct ControlContextualMenuClickRec ControlContextualMenuClickRec;
+
+typedef ControlContextualMenuClickRec * ControlContextualMenuClickPtr;
+/*--------------------------------------------------------------------------------------*/
+/* This structure is passed into a CDEF when the kControlMsgGetClickActivation message */
+/* is sent */
+/* Only sent on Carbon */
+/*--------------------------------------------------------------------------------------*/
+
+struct ControlClickActivationRec {
+ Point localPoint;
+ EventModifiers modifiers;
+ ClickActivationResult result; /* your CDEF must pass the desired result back*/
+};
+typedef struct ControlClickActivationRec ControlClickActivationRec;
+
+typedef ControlClickActivationRec * ControlClickActivationPtr;
+/*--------------------------------------------------------------------------------------*/
+/* o 'CDEF' entrypoint */
+/*--------------------------------------------------------------------------------------*/
+typedef CALLBACK_API( SInt32 , ControlDefProcPtr )(SInt16 varCode, ControlRef theControl, ControlDefProcMessage message, SInt32 param);
+typedef STACK_UPP_TYPE(ControlDefProcPtr) ControlDefUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(ControlDefUPP)
+ NewControlDefUPP (ControlDefProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeControlDefUPP (ControlDefUPP userUPP);
+
+ EXTERN_API(SInt32)
+ InvokeControlDefUPP (SInt16 varCode,
+ ControlRef theControl,
+ ControlDefProcMessage message,
+ SInt32 param,
+ ControlDefUPP userUPP);
+
+#else
+ enum { uppControlDefProcInfo = 0x00003BB0 }; /* pascal 4_bytes Func(2_bytes, 4_bytes, 2_bytes, 4_bytes) */
+ #define NewControlDefUPP(userRoutine) (ControlDefUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlDefProcInfo, GetCurrentArchitecture())
+ #define DisposeControlDefUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeControlDefUPP(varCode, theControl, message, param, userUPP) (SInt32)CALL_FOUR_PARAMETER_UPP((userUPP), uppControlDefProcInfo, (varCode), (theControl), (message), (param))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewControlDefProc(userRoutine) NewControlDefUPP(userRoutine)
+#define CallControlDefProc(userRoutine, varCode, theControl, message, param) InvokeControlDefUPP(varCode, theControl, message, param, userRoutine)
+/*--------------------------------------------------------------------------------------*/
+/* Control Key Filter */
+/*--------------------------------------------------------------------------------------*/
+/* Certain controls can have a keyfilter attached to them. */
+/* Definition of a key filter for intercepting and possibly changing keystrokes */
+/* which are destined for a control. */
+/* Key Filter Result Codes */
+/* The filter proc should return one of the two constants below. If */
+/* kKeyFilterBlockKey is returned, the key is blocked and never makes it to the */
+/* control. If kKeyFilterPassKey is returned, the control receives the keystroke. */
+enum {
+ kControlKeyFilterBlockKey = 0,
+ kControlKeyFilterPassKey = 1
+};
+
+typedef SInt16 ControlKeyFilterResult;
+typedef CALLBACK_API( ControlKeyFilterResult , ControlKeyFilterProcPtr )(ControlRef theControl, SInt16 *keyCode, SInt16 *charCode, EventModifiers *modifiers);
+typedef STACK_UPP_TYPE(ControlKeyFilterProcPtr) ControlKeyFilterUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(ControlKeyFilterUPP)
+ NewControlKeyFilterUPP (ControlKeyFilterProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeControlKeyFilterUPP (ControlKeyFilterUPP userUPP);
+
+ EXTERN_API(ControlKeyFilterResult)
+ InvokeControlKeyFilterUPP (ControlRef theControl,
+ SInt16 * keyCode,
+ SInt16 * charCode,
+ EventModifiers * modifiers,
+ ControlKeyFilterUPP userUPP);
+
+#else
+ enum { uppControlKeyFilterProcInfo = 0x00003FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewControlKeyFilterUPP(userRoutine) (ControlKeyFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlKeyFilterProcInfo, GetCurrentArchitecture())
+ #define DisposeControlKeyFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeControlKeyFilterUPP(theControl, keyCode, charCode, modifiers, userUPP) (ControlKeyFilterResult)CALL_FOUR_PARAMETER_UPP((userUPP), uppControlKeyFilterProcInfo, (theControl), (keyCode), (charCode), (modifiers))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewControlKeyFilterProc(userRoutine) NewControlKeyFilterUPP(userRoutine)
+#define CallControlKeyFilterProc(userRoutine, theControl, keyCode, charCode, modifiers) InvokeControlKeyFilterUPP(theControl, keyCode, charCode, modifiers, userRoutine)
+
+/*--------------------------------------------------------------------------------------*/
+/* o DragGrayRgn Constatns */
+/* */
+/* For DragGrayRgnUPP used in TrackControl() */
+/*--------------------------------------------------------------------------------------*/
+enum {
+ noConstraint = kNoConstraint,
+ hAxisOnly = 1,
+ vAxisOnly = 2
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o Control Creation/Deletion/Persistence */
+/*--------------------------------------------------------------------------------------*/
+/* CreateCustomControl is only available as part of Carbon */
+enum {
+ kControlDefProcPtr = 0 /* raw proc-ptr based access*/
+};
+
+typedef UInt32 ControlDefType;
+
+struct ControlDefSpec {
+ ControlDefType defType;
+ union {
+ ControlDefUPP defProc;
+ } u;
+};
+typedef struct ControlDefSpec ControlDefSpec;
+EXTERN_API( OSStatus )
+CreateCustomControl (WindowRef owningWindow,
+ const Rect * contBounds,
+ const ControlDefSpec * def,
+ Collection initData,
+ ControlRef * outControl);
+
+EXTERN_API( ControlRef )
+NewControl (WindowPtr owningWindow,
+ const Rect * boundsRect,
+ ConstStr255Param controlTitle,
+ Boolean initiallyVisible,
+ SInt16 initialValue,
+ SInt16 minimumValue,
+ SInt16 maximumValue,
+ SInt16 procID,
+ SInt32 controlReference) ONEWORDINLINE(0xA954);
+
+EXTERN_API( ControlRef )
+GetNewControl (SInt16 resourceID,
+ WindowPtr owningWindow) ONEWORDINLINE(0xA9BE);
+
+EXTERN_API( void )
+DisposeControl (ControlRef theControl) ONEWORDINLINE(0xA955);
+
+EXTERN_API( void )
+KillControls (WindowPtr theWindow) ONEWORDINLINE(0xA956);
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSStatus )
+FlattenControl (ControlRef control,
+ Boolean flattenSubControls,
+ Collection collection);
+
+EXTERN_API( OSStatus )
+UnflattenControl (WindowRef window,
+ Collection collection,
+ ControlRef * outControl);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+/*--------------------------------------------------------------------------------------*/
+/* o Control Definition Registration */
+/*--------------------------------------------------------------------------------------*/
+/* In GetNewControl on Carbon, the Control Manager needs to know how to map the procID */
+/* to a ControlDefSpec. With RegisterControlDefinition, your application can inform */
+/* the Control Manager which ControlDefSpec to call when it sees a request to use a */
+/* 'CDEF' of a particular resource ID. */
+/* */
+/* Since custom control definitions receive their initialization data in a Collection, */
+/* you must also provide a procedure to convert the bounds, min, max, and other fields */
+/* from the 'CNTL' resource into a Collection. If you don't provide a conversion proc, */
+/* your control will receive an empty collection when it is sent the initialization */
+/* message. */
+/* If you want the value, min, visibility, etc. to be given to the control, you must */
+/* add the appropriate tagged data to the collection. See the Control Collection Tags */
+/* above. */
+/* RegisterControlDefinition is only available as part of Carbon */
+typedef CALLBACK_API( OSStatus , ControlCNTLToCollectionProcPtr )(const Rect *bounds, SInt16 value, Boolean visible, SInt16 max, SInt16 min, SInt16 procID, SInt32 refCon, ConstStr255Param title, Collection collection);
+typedef STACK_UPP_TYPE(ControlCNTLToCollectionProcPtr) ControlCNTLToCollectionUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(ControlCNTLToCollectionUPP)
+ NewControlCNTLToCollectionUPP (ControlCNTLToCollectionProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeControlCNTLToCollectionUPP (ControlCNTLToCollectionUPP userUPP);
+
+ EXTERN_API(OSStatus)
+ InvokeControlCNTLToCollectionUPP (const Rect * bounds,
+ SInt16 value,
+ Boolean visible,
+ SInt16 max,
+ SInt16 min,
+ SInt16 procID,
+ SInt32 refCon,
+ ConstStr255Param title,
+ Collection collection,
+ ControlCNTLToCollectionUPP userUPP);
+
+#else
+ enum { uppControlCNTLToCollectionProcInfo = 0x00FEA6F0 }; /* pascal 4_bytes Func(4_bytes, 2_bytes, 1_byte, 2_bytes, 2_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewControlCNTLToCollectionUPP(userRoutine) (ControlCNTLToCollectionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlCNTLToCollectionProcInfo, GetCurrentArchitecture())
+ #define DisposeControlCNTLToCollectionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeControlCNTLToCollectionUPP(bounds, value, visible, max, min, procID, refCon, title, collection, userUPP) (OSStatus)CALL_NINE_PARAMETER_UPP((userUPP), uppControlCNTLToCollectionProcInfo, (bounds), (value), (visible), (max), (min), (procID), (refCon), (title), (collection))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewControlCNTLToCollectionProc(userRoutine) NewControlCNTLToCollectionUPP(userRoutine)
+#define CallControlCNTLToCollectionProc(userRoutine, bounds, value, visible, max, min, procID, refCon, title, collection) InvokeControlCNTLToCollectionUPP(bounds, value, visible, max, min, procID, refCon, title, collection, userRoutine)
+EXTERN_API( OSStatus )
+RegisterControlDefinition (SInt16 CDEFResID,
+ const ControlDefSpec * def,
+ ControlCNTLToCollectionUPP conversionProc);
+
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Control Visible State */
+/*--------------------------------------------------------------------------------------*/
+EXTERN_API( void )
+HiliteControl (ControlRef theControl,
+ ControlPartCode hiliteState) ONEWORDINLINE(0xA95D);
+
+EXTERN_API( void )
+ShowControl (ControlRef theControl) ONEWORDINLINE(0xA957);
+
+EXTERN_API( void )
+HideControl (ControlRef theControl) ONEWORDINLINE(0xA958);
+
+
+/* following state routines available only with Appearance 1.0 and later*/
+EXTERN_API( Boolean )
+IsControlActive (ControlRef inControl) THREEWORDINLINE(0x303C, 0x0005, 0xAA73);
+
+EXTERN_API( Boolean )
+IsControlVisible (ControlRef inControl) THREEWORDINLINE(0x303C, 0x0006, 0xAA73);
+
+EXTERN_API( OSErr )
+ActivateControl (ControlRef inControl) THREEWORDINLINE(0x303C, 0x0007, 0xAA73);
+
+EXTERN_API( OSErr )
+DeactivateControl (ControlRef inControl) THREEWORDINLINE(0x303C, 0x0008, 0xAA73);
+
+EXTERN_API( OSErr )
+SetControlVisibility (ControlRef inControl,
+ Boolean inIsVisible,
+ Boolean inDoDraw) THREEWORDINLINE(0x303C, 0x001E, 0xAA73);
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Control Imaging */
+/*--------------------------------------------------------------------------------------*/
+EXTERN_API( void )
+DrawControls (WindowPtr theWindow) ONEWORDINLINE(0xA969);
+
+EXTERN_API( void )
+Draw1Control (ControlRef theControl) ONEWORDINLINE(0xA96D);
+
+#define DrawOneControl(theControl) Draw1Control(theControl)
+
+EXTERN_API( void )
+UpdateControls (WindowPtr theWindow,
+ RgnHandle updateRegion) ONEWORDINLINE(0xA953);
+
+
+/* following imaging routines available only with Appearance 1.0 and later*/
+EXTERN_API( OSErr )
+GetBestControlRect (ControlRef inControl,
+ Rect * outRect,
+ SInt16 * outBaseLineOffset) THREEWORDINLINE(0x303C, 0x001B, 0xAA73);
+
+EXTERN_API( OSErr )
+SetControlFontStyle (ControlRef inControl,
+ const ControlFontStyleRec * inStyle) THREEWORDINLINE(0x303C, 0x001C, 0xAA73);
+
+EXTERN_API( void )
+DrawControlInCurrentPort (ControlRef inControl) THREEWORDINLINE(0x303C, 0x0018, 0xAA73);
+
+EXTERN_API( OSErr )
+SetUpControlBackground (ControlRef inControl,
+ SInt16 inDepth,
+ Boolean inIsColorDevice) THREEWORDINLINE(0x303C, 0x001D, 0xAA73);
+
+/* SetUpControlTextColor is available in Appearance 1.1 or later.*/
+EXTERN_API( OSErr )
+SetUpControlTextColor (ControlRef inControl,
+ SInt16 inDepth,
+ Boolean inIsColorDevice);
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Control Mousing */
+/*--------------------------------------------------------------------------------------*/
+/*
+ NOTE ON CONTROL ACTION PROCS
+
+ When using the TrackControl() call when tracking an indicator, the actionProc parameter
+ (type ControlActionUPP) should be replaced by a parameter of type DragGrayRgnUPP
+ (see Quickdraw.h).
+
+ If, however, you are using the live feedback variants of scroll bars or sliders, you
+ can pass a ControlActionUPP in when tracking the indicator as well. This functionality
+ is available in Appearance 1.0 or later.
+*/
+EXTERN_API( ControlPartCode )
+TrackControl (ControlRef theControl,
+ Point startPoint,
+ ControlActionUPP actionProc) /* can be NULL */ ONEWORDINLINE(0xA968);
+
+EXTERN_API( void )
+DragControl (ControlRef theControl,
+ Point startPoint,
+ const Rect * limitRect,
+ const Rect * slopRect,
+ DragConstraint axis) ONEWORDINLINE(0xA967);
+
+EXTERN_API( ControlPartCode )
+TestControl (ControlRef theControl,
+ Point testPoint) ONEWORDINLINE(0xA966);
+
+EXTERN_API( ControlPartCode )
+FindControl (Point testPoint,
+ WindowPtr theWindow,
+ ControlRef * theControl) ONEWORDINLINE(0xA96C);
+
+/* The following mousing routines available only with Appearance 1.0 and later */
+/* */
+/* HandleControlClick is preferable to TrackControl when running under */
+/* Appearance 1.0 as you can pass in modifiers, which some of the new controls */
+/* use, such as edit text and list boxes. */
+EXTERN_API( ControlRef )
+FindControlUnderMouse (Point inWhere,
+ WindowPtr inWindow,
+ SInt16 * outPart) THREEWORDINLINE(0x303C, 0x0009, 0xAA73);
+
+EXTERN_API( ControlPartCode )
+HandleControlClick (ControlRef inControl,
+ Point inWhere,
+ EventModifiers inModifiers,
+ ControlActionUPP inAction) /* can be NULL */ THREEWORDINLINE(0x303C, 0x000A, 0xAA73);
+
+/* Contextual Menu support in the Control Manager is only available on Carbon. */
+/* If the control didn't display a contextual menu (possibly because the point */
+/* was in a non-interesting part), the menuDisplayed output parameter will be */
+/* false. If the control did display a menu, menuDisplayed will be true. */
+/* This in on Carbon only */
+EXTERN_API( OSStatus )
+HandleControlContextualMenuClick (ControlRef inControl,
+ Point inWhere,
+ Boolean * menuDisplayed);
+
+/* Some complex controls (like Data Browser) require proper sequencing of */
+/* window activation and click processing. In some cases, the control might */
+/* want the window to be left inactive yet still handle the click, or vice- */
+/* versa. The GetControlClickActivation routine lets a control client ask the */
+/* control how it wishes to behave for a particular click. */
+/* This in on Carbon only. */
+EXTERN_API( OSStatus )
+GetControlClickActivation (ControlRef inControl,
+ Point inWhere,
+ EventModifiers inModifiers,
+ ClickActivationResult * outResult);
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Control Events (available only with Appearance 1.0 and later) */
+/*--------------------------------------------------------------------------------------*/
+EXTERN_API( SInt16 )
+HandleControlKey (ControlRef inControl,
+ SInt16 inKeyCode,
+ SInt16 inCharCode,
+ EventModifiers inModifiers) THREEWORDINLINE(0x303C, 0x000B, 0xAA73);
+
+EXTERN_API( void )
+IdleControls (WindowPtr inWindow) THREEWORDINLINE(0x303C, 0x000C, 0xAA73);
+
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Control Mouse Tracking (available with Carbon) */
+/*--------------------------------------------------------------------------------------*/
+/* The HandleControlSetCursor routine requests that a given control set the cursor to */
+/* something appropriate based on the mouse location. */
+/* If the control didn't want to set the cursor (because the point was in a */
+/* non-interesting part), the cursorWasSet output parameter will be false. If the */
+/* control did set the cursor, cursorWasSet will be true. */
+/* Carbon only. */
+EXTERN_API( OSStatus )
+HandleControlSetCursor (ControlRef control,
+ Point localPoint,
+ EventModifiers modifiers,
+ Boolean * cursorWasSet);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Control Positioning */
+/*--------------------------------------------------------------------------------------*/
+EXTERN_API( void )
+MoveControl (ControlRef theControl,
+ SInt16 h,
+ SInt16 v) ONEWORDINLINE(0xA959);
+
+EXTERN_API( void )
+SizeControl (ControlRef theControl,
+ SInt16 w,
+ SInt16 h) ONEWORDINLINE(0xA95C);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Control Title */
+/*--------------------------------------------------------------------------------------*/
+EXTERN_API( void )
+SetControlTitle (ControlRef theControl,
+ ConstStr255Param title) ONEWORDINLINE(0xA95F);
+
+EXTERN_API( void )
+GetControlTitle (ControlRef theControl,
+ Str255 title) ONEWORDINLINE(0xA95E);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Control Value */
+/*--------------------------------------------------------------------------------------*/
+EXTERN_API( SInt16 )
+GetControlValue (ControlRef theControl) ONEWORDINLINE(0xA960);
+
+EXTERN_API( void )
+SetControlValue (ControlRef theControl,
+ SInt16 newValue) ONEWORDINLINE(0xA963);
+
+EXTERN_API( SInt16 )
+GetControlMinimum (ControlRef theControl) ONEWORDINLINE(0xA961);
+
+EXTERN_API( void )
+SetControlMinimum (ControlRef theControl,
+ SInt16 newMinimum) ONEWORDINLINE(0xA964);
+
+EXTERN_API( SInt16 )
+GetControlMaximum (ControlRef theControl) ONEWORDINLINE(0xA962);
+
+EXTERN_API( void )
+SetControlMaximum (ControlRef theControl,
+ SInt16 newMaximum) ONEWORDINLINE(0xA965);
+
+
+/* proportional scrolling/32-bit value support is new with Appearance 1.1*/
+
+EXTERN_API( SInt32 )
+GetControlViewSize (ControlRef theControl);
+
+EXTERN_API( void )
+SetControlViewSize (ControlRef theControl,
+ SInt32 newViewSize);
+
+EXTERN_API( SInt32 )
+GetControl32BitValue (ControlRef theControl);
+
+EXTERN_API( void )
+SetControl32BitValue (ControlRef theControl,
+ SInt32 newValue);
+
+EXTERN_API( SInt32 )
+GetControl32BitMaximum (ControlRef theControl);
+
+EXTERN_API( void )
+SetControl32BitMaximum (ControlRef theControl,
+ SInt32 newMaximum);
+
+EXTERN_API( SInt32 )
+GetControl32BitMinimum (ControlRef theControl);
+
+EXTERN_API( void )
+SetControl32BitMinimum (ControlRef theControl,
+ SInt32 newMinimum);
+
+/*
+ IsValidControlHandle will tell you if the handle you pass in belongs to a control
+ the Control Manager knows about. It does not sanity check the data in the control.
+*/
+
+EXTERN_API( Boolean )
+IsValidControlHandle (ControlRef theControl);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Control IDs */
+/* Carbon only. */
+/*--------------------------------------------------------------------------------------*/
+
+struct ControlID {
+ OSType signature;
+ SInt32 id;
+};
+typedef struct ControlID ControlID;
+EXTERN_API( OSStatus )
+SetControlID (ControlRef inControl,
+ const ControlID * inID);
+
+EXTERN_API( OSStatus )
+GetControlID (ControlRef inControl,
+ ControlID * outID);
+
+EXTERN_API( OSStatus )
+GetControlByID (WindowRef inWindow,
+ const ControlID * inID,
+ ControlRef * outControl);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Properties */
+/*--------------------------------------------------------------------------------------*/
+enum {
+ kControlPropertyPersistent = 0x00000001 /* whether this property gets saved when flattening the control*/
+};
+
+EXTERN_API( OSStatus )
+GetControlProperty (ControlRef control,
+ OSType propertyCreator,
+ OSType propertyTag,
+ UInt32 bufferSize,
+ UInt32 * actualSize,
+ void * propertyBuffer);
+
+EXTERN_API( OSStatus )
+GetControlPropertySize (ControlRef control,
+ OSType propertyCreator,
+ OSType propertyTag,
+ UInt32 * size);
+
+EXTERN_API( OSStatus )
+SetControlProperty (ControlRef control,
+ OSType propertyCreator,
+ OSType propertyTag,
+ UInt32 propertySize,
+ void * propertyData);
+
+EXTERN_API( OSStatus )
+RemoveControlProperty (ControlRef control,
+ OSType propertyCreator,
+ OSType propertyTag);
+
+EXTERN_API( OSStatus )
+GetControlPropertyAttributes (ControlRef control,
+ OSType propertyCreator,
+ OSType propertyTag,
+ UInt32 * attributes);
+
+EXTERN_API( OSStatus )
+ChangeControlPropertyAttributes (ControlRef control,
+ OSType propertyCreator,
+ OSType propertyTag,
+ UInt32 attributesToSet,
+ UInt32 attributesToClear);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Control Regions (Appearance 1.1 or later) */
+/* */
+/* See the discussion on meta-parts in this header for more information */
+/*--------------------------------------------------------------------------------------*/
+EXTERN_API( OSStatus )
+GetControlRegion (ControlRef inControl,
+ ControlPartCode inPart,
+ RgnHandle outRegion);
+
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Control Variant */
+/*--------------------------------------------------------------------------------------*/
+EXTERN_API( ControlVariant )
+GetControlVariant (ControlRef theControl) ONEWORDINLINE(0xA809);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Control Action */
+/*--------------------------------------------------------------------------------------*/
+EXTERN_API( void )
+SetControlAction (ControlRef theControl,
+ ControlActionUPP actionProc) ONEWORDINLINE(0xA96B);
+
+EXTERN_API( ControlActionUPP )
+GetControlAction (ControlRef theControl) ONEWORDINLINE(0xA96A);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Control Accessors */
+/*--------------------------------------------------------------------------------------*/
+EXTERN_API( void )
+SetControlReference (ControlRef theControl,
+ SInt32 data) ONEWORDINLINE(0xA95B);
+
+EXTERN_API( SInt32 )
+GetControlReference (ControlRef theControl) ONEWORDINLINE(0xA95A);
+
+#if !OPAQUE_TOOLBOX_STRUCTS
+EXTERN_API( Boolean )
+GetAuxiliaryControlRecord (ControlRef theControl,
+ AuxCtlHandle * acHndl) ONEWORDINLINE(0xAA44);
+
+#endif /* !OPAQUE_TOOLBOX_STRUCTS */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+SetControlColor (ControlRef theControl,
+ CCTabHandle newColorTable) ONEWORDINLINE(0xAA43);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Control Hierarchy (Appearance 1.0 and later only) */
+/*--------------------------------------------------------------------------------------*/
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( SInt32 )
+SendControlMessage (ControlRef inControl,
+ SInt16 inMessage,
+ SInt32 inParam) THREEWORDINLINE(0x303C, 0xFFFE, 0xAA73);
+
+EXTERN_API( OSErr )
+DumpControlHierarchy (WindowPtr inWindow,
+ const FSSpec * inDumpFile) THREEWORDINLINE(0x303C, 0xFFFF, 0xAA73);
+
+EXTERN_API( OSErr )
+CreateRootControl (WindowPtr inWindow,
+ ControlRef * outControl) THREEWORDINLINE(0x303C, 0x0001, 0xAA73);
+
+EXTERN_API( OSErr )
+GetRootControl (WindowPtr inWindow,
+ ControlRef * outControl) THREEWORDINLINE(0x303C, 0x0002, 0xAA73);
+
+EXTERN_API( OSErr )
+EmbedControl (ControlRef inControl,
+ ControlRef inContainer) THREEWORDINLINE(0x303C, 0x0003, 0xAA73);
+
+EXTERN_API( OSErr )
+AutoEmbedControl (ControlRef inControl,
+ WindowPtr inWindow) THREEWORDINLINE(0x303C, 0x0004, 0xAA73);
+
+EXTERN_API( OSErr )
+GetSuperControl (ControlRef inControl,
+ ControlRef * outParent) THREEWORDINLINE(0x303C, 0x0015, 0xAA73);
+
+EXTERN_API( OSErr )
+CountSubControls (ControlRef inControl,
+ UInt16 * outNumChildren) THREEWORDINLINE(0x303C, 0x0016, 0xAA73);
+
+EXTERN_API( OSErr )
+GetIndexedSubControl (ControlRef inControl,
+ UInt16 inIndex,
+ ControlRef * outSubControl) THREEWORDINLINE(0x303C, 0x0017, 0xAA73);
+
+EXTERN_API( OSErr )
+SetControlSupervisor (ControlRef inControl,
+ ControlRef inBoss) THREEWORDINLINE(0x303C, 0x001A, 0xAA73);
+
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Keyboard Focus (available only with Appearance 1.0 and later) */
+/*--------------------------------------------------------------------------------------*/
+EXTERN_API( OSErr )
+GetKeyboardFocus (WindowPtr inWindow,
+ ControlRef * outControl) THREEWORDINLINE(0x303C, 0x000D, 0xAA73);
+
+EXTERN_API( OSErr )
+SetKeyboardFocus (WindowPtr inWindow,
+ ControlRef inControl,
+ ControlFocusPart inPart) THREEWORDINLINE(0x303C, 0x000E, 0xAA73);
+
+EXTERN_API( OSErr )
+AdvanceKeyboardFocus (WindowPtr inWindow) THREEWORDINLINE(0x303C, 0x000F, 0xAA73);
+
+EXTERN_API( OSErr )
+ReverseKeyboardFocus (WindowPtr inWindow) THREEWORDINLINE(0x303C, 0x0010, 0xAA73);
+
+EXTERN_API( OSErr )
+ClearKeyboardFocus (WindowPtr inWindow) THREEWORDINLINE(0x303C, 0x0019, 0xAA73);
+
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Control Data (available only with Appearance 1.0 and later) */
+/*--------------------------------------------------------------------------------------*/
+
+EXTERN_API( OSErr )
+GetControlFeatures (ControlRef inControl,
+ UInt32 * outFeatures) THREEWORDINLINE(0x303C, 0x0011, 0xAA73);
+
+EXTERN_API( OSErr )
+SetControlData (ControlRef inControl,
+ ControlPartCode inPart,
+ ResType inTagName,
+ Size inSize,
+ void * inData) THREEWORDINLINE(0x303C, 0x0012, 0xAA73);
+
+EXTERN_API( OSErr )
+GetControlData (ControlRef inControl,
+ ControlPartCode inPart,
+ ResType inTagName,
+ Size inBufferSize,
+ void * inBuffer,
+ Size * outActualSize) THREEWORDINLINE(0x303C, 0x0013, 0xAA73);
+
+EXTERN_API( OSErr )
+GetControlDataSize (ControlRef inControl,
+ ControlPartCode inPart,
+ ResType inTagName,
+ Size * outMaxSize) THREEWORDINLINE(0x303C, 0x0014, 0xAA73);
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Control Drag & Drop */
+/* Carbon only. */
+/*--------------------------------------------------------------------------------------*/
+/* some simple redefinitions of the messages found in the Drag header*/
+enum {
+ kDragTrackingEnterControl = kDragTrackingEnterWindow,
+ kDragTrackingInControl = kDragTrackingInWindow,
+ kDragTrackingLeaveControl = kDragTrackingLeaveWindow
+};
+
+EXTERN_API( OSStatus )
+HandleControlDragTracking (ControlRef inControl,
+ DragTrackingMessage inMessage,
+ DragReference inDrag,
+ Boolean * outLikesDrag);
+
+EXTERN_API( OSStatus )
+HandleControlDragReceive (ControlRef inControl,
+ DragReference inDrag);
+
+EXTERN_API( OSStatus )
+SetControlDragTrackingEnabled (ControlRef theControl,
+ Boolean tracks);
+
+EXTERN_API( OSStatus )
+IsControlDragTrackingEnabled (ControlRef theControl,
+ Boolean * tracks);
+
+EXTERN_API( OSStatus )
+SetAutomaticControlDragTrackingEnabledForWindow (WindowPtr theWindow,
+ Boolean tracks);
+
+EXTERN_API( OSStatus )
+IsAutomaticControlDragTrackingEnabledForWindow (WindowPtr theWindow,
+ Boolean * tracks);
+
+
+#if !TARGET_OS_MAC
+/*--------------------------------------------------------------------------------------*/
+/* o QuickTime 3.0 Win32/unix notification mechanism */
+/*--------------------------------------------------------------------------------------*/
+/* Proc used to notify window that something happened to the control*/
+typedef CALLBACK_API_C( void , ControlNotificationProcPtr )(WindowPtr theWindow, ControlRef theControl, ControlNotification notification, long param1, long param2);
+/*
+ Proc used to prefilter events before handled by control. A client of a control calls
+ CTRLSetPreFilterProc() to have the control call this proc before handling the event.
+ If the proc returns TRUE, the control can go ahead and handle the event.
+*/
+typedef CALLBACK_API_C( Boolean , PreFilterEventProc )(ControlRef theControl, EventRecord *theEvent);
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( long )
+GetControlComponentInstance (ControlRef theControl);
+
+EXTERN_API_C( ControlRef )
+GetControlHandleFromCookie (long cookie);
+
+EXTERN_API_C( void )
+SetControlDefProc (short resID,
+ ControlDefProcPtr proc);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+typedef ControlNotificationProcPtr ControlNotificationUPP;
+#endif /* !TARGET_OS_MAC */
+
+/*--------------------------------------------------------------------------------------*/
+/* o C Glue */
+/*--------------------------------------------------------------------------------------*/
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( void )
+dragcontrol (ControlRef theControl,
+ Point * startPt,
+ const Rect * limitRect,
+ const Rect * slopRect,
+ short axis);
+
+EXTERN_API_C( ControlRef )
+newcontrol (WindowPtr theWindow,
+ const Rect * boundsRect,
+ const char * title,
+ Boolean visible,
+ short value,
+ short min,
+ short max,
+ short procID,
+ long refCon);
+
+EXTERN_API_C( short )
+findcontrol (Point * thePoint,
+ WindowPtr theWindow,
+ ControlRef * theControl);
+
+EXTERN_API_C( void )
+getcontroltitle (ControlRef theControl,
+ char * title);
+
+EXTERN_API_C( void )
+setcontroltitle (ControlRef theControl,
+ const char * title);
+
+EXTERN_API_C( short )
+trackcontrol (ControlRef theControl,
+ Point * thePoint,
+ ControlActionUPP actionProc);
+
+EXTERN_API_C( short )
+testcontrol (ControlRef theControl,
+ Point * thePt);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if OLDROUTINENAMES
+/*--------------------------------------------------------------------------------------*/
+/* o OLDROUTINENAMES */
+/*--------------------------------------------------------------------------------------*/
+enum {
+ useWFont = kControlUsesOwningWindowsFontVariant
+};
+
+enum {
+ inThumb = kControlIndicatorPart,
+ kNoHiliteControlPart = kControlNoPart,
+ kInIndicatorControlPart = kControlIndicatorPart,
+ kReservedControlPart = kControlDisabledPart,
+ kControlInactiveControlPart = kControlInactivePart
+};
+
+
+#define SetCTitle(theControl, title) SetControlTitle(theControl, title)
+#define GetCTitle(theControl, title) GetControlTitle(theControl, title)
+#define UpdtControl(theWindow, updateRgn) UpdateControls(theWindow, updateRgn)
+#define SetCtlValue(theControl, theValue) SetControlValue(theControl, theValue)
+#define GetCtlValue(theControl) GetControlValue(theControl)
+#define SetCtlMin(theControl, minValue) SetControlMinimum(theControl, minValue)
+#define GetCtlMin(theControl) GetControlMinimum(theControl)
+#define SetCtlMax(theControl, maxValue) SetControlMaximum(theControl, maxValue)
+#define GetCtlMax(theControl) GetControlMaximum(theControl)
+#define GetAuxCtl(theControl, acHndl) GetAuxiliaryControlRecord(theControl, acHndl)
+#define SetCRefCon(theControl, data) SetControlReference(theControl, data)
+#define GetCRefCon(theControl) GetControlReference(theControl)
+#define SetCtlAction(theControl, actionProc) SetControlAction(theControl, actionProc)
+#define GetCtlAction(theControl) GetControlAction(theControl)
+#define SetCtlColor(theControl, newColorTable) SetControlColor(theControl, newColorTable)
+#define GetCVariant(theControl) GetControlVariant(theControl)
+#define getctitle(theControl, title) getcontroltitle(theControl, title)
+#define setctitle(theControl, title) setcontroltitle(theControl, title)
+#endif /* OLDROUTINENAMES */
+
+#if ACCESSOR_CALLS_ARE_FUNCTIONS
+/* Getters */
+EXTERN_API( Rect *)
+GetControlBounds (ControlRef control,
+ Rect * bounds);
+
+EXTERN_API( Boolean )
+IsControlHilited (ControlRef control);
+
+EXTERN_API( UInt16 )
+GetControlHilite (ControlRef control);
+
+EXTERN_API( WindowPtr )
+GetControlOwner (ControlRef control);
+
+EXTERN_API( Handle )
+GetControlDataHandle (ControlRef control);
+
+EXTERN_API( MenuHandle )
+GetControlPopupMenuHandle (ControlRef control);
+
+EXTERN_API( short )
+GetControlPopupMenuID (ControlRef control);
+
+/* Setters */
+EXTERN_API( void )
+SetControlDataHandle (ControlRef control,
+ Handle dataHandle);
+
+EXTERN_API( void )
+SetControlBounds (ControlRef control,
+ const Rect * bounds);
+
+EXTERN_API( void )
+SetControlPopupMenuHandle (ControlRef control,
+ MenuHandle popupMenu);
+
+EXTERN_API( void )
+SetControlPopupMenuID (ControlRef control,
+ short menuID);
+
+#endif /* ACCESSOR_CALLS_ARE_FUNCTIONS */
+
+#if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
+#define GetControlListFromWindow(theWindow) ( *(ControlRef *) (((UInt8 *) theWindow) + sizeof(GrafPort) + 0x20))
+#define GetControlOwningWindowControlList(theWindow) ( *(ControlRef *) (((UInt8 *) theWindow) + sizeof(GrafPort) + 0x20))
+#endif /* !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS */
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CONTROLS__ */
+
diff --git a/include/qt/CoreFoundation.h b/include/qt/CoreFoundation.h
new file mode 100644
index 000000000..77f28733b
--- /dev/null
+++ b/include/qt/CoreFoundation.h
@@ -0,0 +1,95 @@
+/*
+ File: CoreFoundation.h
+
+ Contains: CoreFoundation master header
+
+ Version: Technology: Mac OS X
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1999-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __COREFOUNDATION__
+#define __COREFOUNDATION__
+
+#ifndef __CFBASE__
+#include "CFBase.h"
+#endif
+
+#ifndef __CFARRAY__
+#include "CFArray.h"
+#endif
+
+#ifndef __CFBAG__
+#include "CFBag.h"
+#endif
+
+#ifndef __CFBUNDLE__
+#include "CFBundle.h"
+#endif
+
+#ifndef __CFCHARACTERSET__
+#include "CFCharacterSet.h"
+#endif
+
+#ifndef __CFDATA__
+#include "CFData.h"
+#endif
+
+#ifndef __CFDATE__
+#include "CFDate.h"
+#endif
+
+#ifndef __CFDICTIONARY__
+#include "CFDictionary.h"
+#endif
+
+#ifndef __CFNUMBER__
+#include "CFNumber.h"
+#endif
+
+#ifndef __CFPLUGIN__
+#include "CFPlugIn.h"
+#endif
+
+#ifndef __CFPREFERENCES__
+#include "CFPreferences.h"
+#endif
+
+#ifndef __CFPROPERTYLIST__
+#include "CFPropertyList.h"
+#endif
+
+#ifndef __CFSET__
+#include "CFSet.h"
+#endif
+
+#ifndef __CFSTRING__
+#include "CFString.h"
+#endif
+
+#ifndef __CFSTRINGENCODINGEXT__
+#include "CFStringEncodingExt.h"
+#endif
+
+#ifndef __CFTIMEZONE__
+#include "CFTimeZone.h"
+#endif
+
+#ifndef __CFURL__
+#include "CFURL.h"
+#endif
+
+#ifndef __CFURLACCESS__
+#include "CFURLAccess.h"
+#endif
+
+
+
+#endif /* __COREFOUNDATION__ */
+
diff --git a/include/qt/CryptoMessageSyntax.h b/include/qt/CryptoMessageSyntax.h
new file mode 100644
index 000000000..2f5f8f696
--- /dev/null
+++ b/include/qt/CryptoMessageSyntax.h
@@ -0,0 +1,138 @@
+/*
+ File: CryptoMessageSyntax.h
+
+ Contains: CMS Interfaces.
+
+ Version: Technology: 1.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1999-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CRYPTOMESSAGESYNTAX__
+#define __CRYPTOMESSAGESYNTAX__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __CFARRAY__
+#include "CFArray.h"
+#endif
+
+#ifndef __CFBAG__
+#include "CFBag.h"
+#endif
+
+#ifndef __CFDATA__
+#include "CFData.h"
+#endif
+
+#ifndef __CFDATE__
+#include "CFDate.h"
+#endif
+
+#ifndef __CFSET__
+#include "CFSet.h"
+#endif
+
+#ifndef __CFSTRING__
+#include "CFString.h"
+#endif
+
+#ifndef __KEYCHAIN__
+#include "Keychain.h"
+#endif
+
+
+/*
+ Data structures and types
+*/
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+typedef struct OpaqueSecTypeRef* SecTypeRef;
+typedef struct OpaqueSecSignerRef* SecSignerRef;
+/* Signer object manipulation */
+EXTERN_API( OSStatus )
+SecSignerGetStatus (SecSignerRef signer);
+
+EXTERN_API( SecTypeRef )
+SecRetain (SecTypeRef sec);
+
+EXTERN_API( void )
+SecRelease (SecTypeRef sec);
+
+EXTERN_API( UInt32 )
+SecRetainCount (SecTypeRef sec);
+
+/* Errors Codes */
+enum {
+ errSecUnsupported = -13843,
+ errSecInvalidData = -13844,
+ errSecTooMuchData = -13845,
+ errSecMissingData = -13846,
+ errSecNoSigners = -13847,
+ errSecSignerFailed = -13848,
+ errSecInvalidPolicy = -13849,
+ errSecUnknownPolicy = -13850,
+ errSecInvalidStopOn = -13851,
+ errSecMissingCert = -13852,
+ errSecInvalidCert = -13853,
+ errSecNotSigner = -13854,
+ errSecNotTrusted = -13855,
+ errSecMissingAttribute = -13856,
+ errSecMissingDigest = -13857,
+ errSecDigestMismatch = -13858,
+ errSecInvalidSignature = -13859,
+ errSecAlgMismatch = -13860,
+ errSecUnsupportedAlgorithm = -13864,
+ errSecContentTypeMismatch = -13865,
+ errSecDebugRoot = -13866
+};
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CRYPTOMESSAGESYNTAX__ */
+
diff --git a/include/qt/CursorDevices.h b/include/qt/CursorDevices.h
new file mode 100644
index 000000000..e94e30fa6
--- /dev/null
+++ b/include/qt/CursorDevices.h
@@ -0,0 +1,266 @@
+/*
+ File: CursorDevices.h
+
+ Contains: Cursor Devices (mouse/trackball/etc) Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1993-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __CURSORDEVICES__
+#define __CURSORDEVICES__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*
+ * * * I M P O R T A N T * * *
+
+ You will need CursorDevicesGlue.o to use CDM from PowerPC
+
+
+ In order to use the Cursor Devices Manager (CDM) on PowerPC systems, you must
+ link with the file CursorDevicesGlue.o and InterfaceLib 1.1.3. This is necessary
+ because the original MixedMode transition code for CDM in InterfaceLib in ROM
+ was wrong. The code in CursorDevicesGlue.o will check to see if the ROM has
+ been fixed and calls through to it if so. If it detects that the ROM has not
+ been fixed, it uses its own implementation of the CDM MixedMode transition
+ routines.
+
+*/
+
+typedef short ButtonOpcode;
+/* ButtonOpcodes */
+enum {
+ kButtonNoOp = 0, /* No action for this button */
+ kButtonSingleClick = 1, /* Normal mouse button */
+ kButtonDoubleClick = 2, /* Click-release-click when pressed */
+ kButtonClickLock = 3 /* Click on press, release on next press */
+};
+
+enum {
+ kButtonCustom = 6 /* Custom behavior, data = CursorDeviceCustomButtonUPP */
+};
+
+/* Device Classes */
+enum {
+ kDeviceClassAbsolute = 0, /* a flat-response device */
+ kDeviceClassMouse = 1, /* mechanical or optical mouse */
+ kDeviceClassTrackball = 2, /* trackball */
+ kDeviceClassTrackPad = 3
+};
+
+enum {
+ kDeviceClass3D = 6 /* a 3D pointing device */
+};
+
+/* Structures used in Cursor Device Manager calls */
+
+struct CursorData {
+ struct CursorData * nextCursorData; /* next in global list */
+ Ptr displayInfo; /* unused (reserved for future) */
+ Fixed whereX; /* horizontal position */
+ Fixed whereY; /* vertical position */
+ Point where; /* the pixel position */
+ Boolean isAbs; /* has been stuffed with absolute coords */
+ UInt8 buttonCount; /* number of buttons currently pressed */
+ long screenRes; /* pixels per inch on the current display */
+ short privateFields[22]; /* fields use internally by CDM */
+};
+typedef struct CursorData CursorData;
+typedef CursorData * CursorDataPtr;
+
+struct CursorDevice {
+ struct CursorDevice * nextCursorDevice; /* pointer to next record in linked list */
+ CursorData * whichCursor; /* pointer to data for target cursor */
+ long refCon; /* application-defined */
+ long unused; /* reserved for future */
+ OSType devID; /* device identifier (from ADB reg 1) */
+ Fixed resolution; /* units/inch (orig. from ADB reg 1) */
+ UInt8 devClass; /* device class (from ADB reg 1) */
+ UInt8 cntButtons; /* number of buttons (from ADB reg 1) */
+ UInt8 filler1; /* reserved for future */
+ UInt8 buttons; /* state of all buttons */
+ UInt8 buttonOp[8]; /* action performed per button */
+ unsigned long buttonTicks[8]; /* ticks when button last went up (for debounce) */
+ long buttonData[8]; /* data for the button operation */
+ unsigned long doubleClickTime; /* device-specific double click speed */
+ Fixed acceleration; /* current acceleration */
+ short privateFields[15]; /* fields used internally to CDM */
+};
+typedef struct CursorDevice CursorDevice;
+typedef CursorDevice * CursorDevicePtr;
+/* for use with CursorDeviceButtonOp when opcode = kButtonCustom */
+typedef CALLBACK_API( void , CursorDeviceCustomButtonProcPtr )(CursorDevicePtr ourDevice, short button);
+/*
+ WARNING: CursorDeviceCustomButtonProcPtr uses register based parameters under classic 68k
+ and cannot be written in a high-level language without
+ the help of mixed mode or assembly glue.
+*/
+typedef REGISTER_UPP_TYPE(CursorDeviceCustomButtonProcPtr) CursorDeviceCustomButtonUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(CursorDeviceCustomButtonUPP)
+ NewCursorDeviceCustomButtonUPP (CursorDeviceCustomButtonProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeCursorDeviceCustomButtonUPP (CursorDeviceCustomButtonUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeCursorDeviceCustomButtonUPP (CursorDevicePtr ourDevice,
+ short button,
+ CursorDeviceCustomButtonUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppCursorDeviceCustomButtonProcInfo = 0x000ED802 }; /* register no_return_value Func(4_bytes:A2, 2_bytes:D3) */
+ #define NewCursorDeviceCustomButtonUPP(userRoutine) (CursorDeviceCustomButtonUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCursorDeviceCustomButtonProcInfo, GetCurrentArchitecture())
+ #define DisposeCursorDeviceCustomButtonUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ /* InvokeCursorDeviceCustomButtonUPP can't be called from classic 68k without glue code */
+ #else
+ #define InvokeCursorDeviceCustomButtonUPP(ourDevice, button, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppCursorDeviceCustomButtonProcInfo, (ourDevice), (button))
+ #endif
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewCursorDeviceCustomButtonProc(userRoutine) NewCursorDeviceCustomButtonUPP(userRoutine)
+#define CallCursorDeviceCustomButtonProc(userRoutine, ourDevice, button) InvokeCursorDeviceCustomButtonUPP(ourDevice, button, userRoutine)
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+CursorDeviceMove (CursorDevicePtr ourDevice,
+ long deltaX,
+ long deltaY) TWOWORDINLINE(0x7000, 0xAADB);
+
+EXTERN_API( OSErr )
+CursorDeviceMoveTo (CursorDevicePtr ourDevice,
+ long absX,
+ long absY) TWOWORDINLINE(0x7001, 0xAADB);
+
+EXTERN_API( OSErr )
+CursorDeviceFlush (CursorDevicePtr ourDevice) TWOWORDINLINE(0x7002, 0xAADB);
+
+EXTERN_API( OSErr )
+CursorDeviceButtons (CursorDevicePtr ourDevice,
+ short buttons) TWOWORDINLINE(0x7003, 0xAADB);
+
+EXTERN_API( OSErr )
+CursorDeviceButtonDown (CursorDevicePtr ourDevice) TWOWORDINLINE(0x7004, 0xAADB);
+
+EXTERN_API( OSErr )
+CursorDeviceButtonUp (CursorDevicePtr ourDevice) TWOWORDINLINE(0x7005, 0xAADB);
+
+EXTERN_API( OSErr )
+CursorDeviceButtonOp (CursorDevicePtr ourDevice,
+ short buttonNumber,
+ ButtonOpcode opcode,
+ long data) TWOWORDINLINE(0x7006, 0xAADB);
+
+EXTERN_API( OSErr )
+CursorDeviceSetButtons (CursorDevicePtr ourDevice,
+ short numberOfButtons) TWOWORDINLINE(0x7007, 0xAADB);
+
+EXTERN_API( OSErr )
+CursorDeviceSetAcceleration (CursorDevicePtr ourDevice,
+ Fixed acceleration) TWOWORDINLINE(0x7008, 0xAADB);
+
+EXTERN_API( OSErr )
+CursorDeviceDoubleTime (CursorDevicePtr ourDevice,
+ long durationTicks) TWOWORDINLINE(0x7009, 0xAADB);
+
+EXTERN_API( OSErr )
+CursorDeviceUnitsPerInch (CursorDevicePtr ourDevice,
+ Fixed resolution) TWOWORDINLINE(0x700A, 0xAADB);
+
+EXTERN_API( OSErr )
+CursorDeviceNextDevice (CursorDevicePtr * ourDevice) TWOWORDINLINE(0x700B, 0xAADB);
+
+EXTERN_API( OSErr )
+CursorDeviceNewDevice (CursorDevicePtr * ourDevice) TWOWORDINLINE(0x700C, 0xAADB);
+
+EXTERN_API( OSErr )
+CursorDeviceDisposeDevice (CursorDevicePtr ourDevice) TWOWORDINLINE(0x700D, 0xAADB);
+
+
+/*
+ * * * W A R N I N G * * *
+
+ The routines CrsrDevMoveTo and CrsrDevNextDevice are no longer needed.
+ They were added as a work around until the glue code CursorDevicesGlue.o
+ was created. Please use the functions CursorDeviceMoveTo and
+ CursorDeviceNextDevice instead.
+
+*/
+#endif /* CALL_NOT_IN_CARBON */
+
+#if OLDROUTINENAMES
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+CrsrDevMoveTo (CursorDevicePtr ourDevice,
+ long absX,
+ long absY) TWOWORDINLINE(0x7001, 0xAADB);
+
+EXTERN_API( OSErr )
+CrsrDevNextDevice (CursorDevicePtr * ourDevice) TWOWORDINLINE(0x700B, 0xAADB);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* OLDROUTINENAMES */
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CURSORDEVICES__ */
+
diff --git a/include/qt/DatabaseAccess.h b/include/qt/DatabaseAccess.h
new file mode 100644
index 000000000..727c25b9c
--- /dev/null
+++ b/include/qt/DatabaseAccess.h
@@ -0,0 +1,438 @@
+/*
+ File: DatabaseAccess.h
+
+ Contains: Database Access Manager Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1989-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __DATABASEACCESS__
+#define __DATABASEACCESS__
+
+#ifndef __RESOURCES__
+#include "Resources.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* data type codes */
+enum {
+ typeNone = FOUR_CHAR_CODE('none'),
+ typeDate = FOUR_CHAR_CODE('date'),
+ typeTime = FOUR_CHAR_CODE('time'),
+ typeTimeStamp = FOUR_CHAR_CODE('tims'),
+ typeDecimal = FOUR_CHAR_CODE('deci'),
+ typeMoney = FOUR_CHAR_CODE('mone'),
+ typeVChar = FOUR_CHAR_CODE('vcha'),
+ typeVBin = FOUR_CHAR_CODE('vbin'),
+ typeLChar = FOUR_CHAR_CODE('lcha'),
+ typeLBin = FOUR_CHAR_CODE('lbin'),
+ typeDiscard = FOUR_CHAR_CODE('disc'), /* "dummy" types for DBResultsToText */
+ typeUnknown = FOUR_CHAR_CODE('unkn'),
+ typeColBreak = FOUR_CHAR_CODE('colb'),
+ typeRowBreak = FOUR_CHAR_CODE('rowb'), /* pass this in to DBGetItem for any data type */
+ typeAnyType = 0
+};
+
+/* infinite timeout value for DBGetItem */
+enum {
+ /* messages for status functions for DBStartQuery */
+ kDBUpdateWind = 0,
+ kDBAboutToInit = 1,
+ kDBInitComplete = 2,
+ kDBSendComplete = 3,
+ kDBExecComplete = 4,
+ kDBStartQueryComplete = 5
+};
+
+enum {
+ /* messages for status functions for DBGetQueryResults */
+ kDBGetItemComplete = 6,
+ kDBGetQueryResultsComplete = 7,
+ kDBWaitForever = -1
+};
+
+enum {
+ /* flags for DBGetItem */
+ kDBLastColFlag = 0x0001,
+ kDBNullFlag = 0x0004
+};
+
+typedef OSType DBType;
+typedef struct DBAsyncParamBlockRec DBAsyncParamBlockRec;
+typedef DBAsyncParamBlockRec * DBAsyncParmBlkPtr;
+typedef CALLBACK_API( void , DBCompletionProcPtr )(DBAsyncParmBlkPtr pb);
+/*
+ WARNING: DBCompletionProcPtr uses register based parameters under classic 68k
+ and cannot be written in a high-level language without
+ the help of mixed mode or assembly glue.
+*/
+typedef REGISTER_UPP_TYPE(DBCompletionProcPtr) DBCompletionUPP;
+/* structure for asynchronous parameter block */
+
+struct DBAsyncParamBlockRec {
+ DBCompletionUPP completionProc; /* pointer to completion routine */
+ OSErr result; /* result of call */
+ long userRef; /* for application's use */
+ long ddevRef; /* for ddev's use */
+ long reserved; /* for internal use */
+};
+
+/* structure for resource list in QueryRecord */
+
+struct ResListElem {
+ ResType theType; /* resource type */
+ short id; /* resource id */
+};
+typedef struct ResListElem ResListElem;
+
+typedef ResListElem * ResListPtr;
+typedef ResListPtr * ResListHandle;
+/* structure for query list in QueryRecord */
+typedef Handle QueryArray[256];
+typedef Handle * QueryListPtr;
+typedef QueryListPtr * QueryListHandle;
+
+struct QueryRecord {
+ short version; /* version */
+ short id; /* id of 'qrsc' this came from */
+ Handle queryProc; /* handle to query def proc */
+ Str63 ddevName; /* ddev name */
+ Str255 host; /* host name */
+ Str255 user; /* user name */
+ Str255 password; /* password */
+ Str255 connStr; /* connection string */
+ short currQuery; /* index of current query */
+ short numQueries; /* number of queries in list */
+ QueryListHandle queryList; /* handle to array of handles to text */
+ short numRes; /* number of resources in list */
+ ResListHandle resList; /* handle to array of resource list elements */
+ Handle dataHandle; /* for use by query def proc */
+ long refCon; /* for use by application */
+};
+typedef struct QueryRecord QueryRecord;
+
+typedef QueryRecord * QueryPtr;
+typedef QueryPtr * QueryHandle;
+/* structure of column types array in ResultsRecord */
+typedef DBType ColTypesArray[256];
+typedef Handle ColTypesHandle;
+/* structure for column info in ResultsRecord */
+
+struct DBColInfoRecord {
+ short len;
+ short places;
+ short flags;
+};
+typedef struct DBColInfoRecord DBColInfoRecord;
+
+typedef DBColInfoRecord ColInfoArray[256];
+typedef Handle ColInfoHandle;
+/* structure of results returned by DBGetResults */
+
+struct ResultsRecord {
+ short numRows; /* number of rows in result */
+ short numCols; /* number of columns per row */
+ ColTypesHandle colTypes; /* data type array */
+ Handle colData; /* actual results */
+ ColInfoHandle colInfo; /* DBColInfoRecord array */
+};
+typedef struct ResultsRecord ResultsRecord;
+enum {
+ /* messages sent to a 'ddev'*/
+ kDBInit = 0,
+ kDBEnd = 1,
+ kDBGetConnInfo = 2,
+ kDBGetSessionNum = 3,
+ kDBSend = 4,
+ kDBSendItem = 5,
+ kDBExec = 6,
+ kDBState = 7,
+ kDBGetErr = 8,
+ kDBBreak = 9,
+ kDBGetItem = 10,
+ kDBUngetItem = 11,
+ kDBKill = 12,
+ kDBOpen = 100,
+ kDBClose = 101,
+ kDBIdle = 102
+};
+
+typedef CALLBACK_API( OSErr , DBQueryDefProcPtr )(long *sessID, QueryHandle query);
+typedef CALLBACK_API( Boolean , DBStatusProcPtr )(short message, OSErr result, short dataLen, short dataPlaces, short dataFlags, DBType dataType, Ptr dataPtr);
+typedef CALLBACK_API( OSErr , DBResultHandlerProcPtr )(DBType dataType, short theLen, short thePlaces, short theFlags, Ptr theData, Handle theText);
+typedef STACK_UPP_TYPE(DBQueryDefProcPtr) DBQueryDefUPP;
+typedef STACK_UPP_TYPE(DBStatusProcPtr) DBStatusUPP;
+typedef STACK_UPP_TYPE(DBResultHandlerProcPtr) DBResultHandlerUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(DBCompletionUPP)
+ NewDBCompletionUPP (DBCompletionProcPtr userRoutine);
+
+ EXTERN_API(DBQueryDefUPP)
+ NewDBQueryDefUPP (DBQueryDefProcPtr userRoutine);
+
+ EXTERN_API(DBStatusUPP)
+ NewDBStatusUPP (DBStatusProcPtr userRoutine);
+
+ EXTERN_API(DBResultHandlerUPP)
+ NewDBResultHandlerUPP (DBResultHandlerProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeDBCompletionUPP (DBCompletionUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeDBQueryDefUPP (DBQueryDefUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeDBStatusUPP (DBStatusUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeDBResultHandlerUPP (DBResultHandlerUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeDBCompletionUPP (DBAsyncParmBlkPtr pb,
+ DBCompletionUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeDBQueryDefUPP (long * sessID,
+ QueryHandle query,
+ DBQueryDefUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeDBStatusUPP (short message,
+ OSErr result,
+ short dataLen,
+ short dataPlaces,
+ short dataFlags,
+ DBType dataType,
+ Ptr dataPtr,
+ DBStatusUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeDBResultHandlerUPP (DBType dataType,
+ short theLen,
+ short thePlaces,
+ short theFlags,
+ Ptr theData,
+ Handle theText,
+ DBResultHandlerUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppDBCompletionProcInfo = 0x0000B802 }; /* register no_return_value Func(4_bytes:A1) */
+ enum { uppDBQueryDefProcInfo = 0x000003E0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes) */
+ enum { uppDBStatusProcInfo = 0x000FAA90 }; /* pascal 1_byte Func(2_bytes, 2_bytes, 2_bytes, 2_bytes, 2_bytes, 4_bytes, 4_bytes) */
+ enum { uppDBResultHandlerProcInfo = 0x0003EAE0 }; /* pascal 2_bytes Func(4_bytes, 2_bytes, 2_bytes, 2_bytes, 4_bytes, 4_bytes) */
+ #define NewDBCompletionUPP(userRoutine) (DBCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDBCompletionProcInfo, GetCurrentArchitecture())
+ #define NewDBQueryDefUPP(userRoutine) (DBQueryDefUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDBQueryDefProcInfo, GetCurrentArchitecture())
+ #define NewDBStatusUPP(userRoutine) (DBStatusUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDBStatusProcInfo, GetCurrentArchitecture())
+ #define NewDBResultHandlerUPP(userRoutine) (DBResultHandlerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDBResultHandlerProcInfo, GetCurrentArchitecture())
+ #define DisposeDBCompletionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeDBQueryDefUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeDBStatusUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeDBResultHandlerUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter InvokeDBCompletionUPP(__A1, __A0)
+ void InvokeDBCompletionUPP(DBAsyncParmBlkPtr pb, DBCompletionUPP userUPP) = 0x4E90;
+ #else
+ #define InvokeDBCompletionUPP(pb, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppDBCompletionProcInfo, (pb))
+ #endif
+ #define InvokeDBQueryDefUPP(sessID, query, userUPP) (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppDBQueryDefProcInfo, (sessID), (query))
+ #define InvokeDBStatusUPP(message, result, dataLen, dataPlaces, dataFlags, dataType, dataPtr, userUPP) (Boolean)CALL_SEVEN_PARAMETER_UPP((userUPP), uppDBStatusProcInfo, (message), (result), (dataLen), (dataPlaces), (dataFlags), (dataType), (dataPtr))
+ #define InvokeDBResultHandlerUPP(dataType, theLen, thePlaces, theFlags, theData, theText, userUPP) (OSErr)CALL_SIX_PARAMETER_UPP((userUPP), uppDBResultHandlerProcInfo, (dataType), (theLen), (thePlaces), (theFlags), (theData), (theText))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewDBCompletionProc(userRoutine) NewDBCompletionUPP(userRoutine)
+#define NewDBQueryDefProc(userRoutine) NewDBQueryDefUPP(userRoutine)
+#define NewDBStatusProc(userRoutine) NewDBStatusUPP(userRoutine)
+#define NewDBResultHandlerProc(userRoutine) NewDBResultHandlerUPP(userRoutine)
+#define CallDBCompletionProc(userRoutine, pb) InvokeDBCompletionUPP(pb, userRoutine)
+#define CallDBQueryDefProc(userRoutine, sessID, query) InvokeDBQueryDefUPP(sessID, query, userRoutine)
+#define CallDBStatusProc(userRoutine, message, result, dataLen, dataPlaces, dataFlags, dataType, dataPtr) InvokeDBStatusUPP(message, result, dataLen, dataPlaces, dataFlags, dataType, dataPtr, userRoutine)
+#define CallDBResultHandlerProc(userRoutine, dataType, theLen, thePlaces, theFlags, theData, theText) InvokeDBResultHandlerUPP(dataType, theLen, thePlaces, theFlags, theData, theText, userRoutine)
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+InitDBPack (void) FIVEWORDINLINE(0x3F3C, 0x0004, 0x303C, 0x0100, 0xA82F);
+
+EXTERN_API( OSErr )
+DBInit (long * sessID,
+ ConstStr63Param ddevName,
+ ConstStr255Param host,
+ ConstStr255Param user,
+ ConstStr255Param passwd,
+ ConstStr255Param connStr,
+ DBAsyncParmBlkPtr asyncPB) THREEWORDINLINE(0x303C, 0x0E02, 0xA82F);
+
+EXTERN_API( OSErr )
+DBEnd (long sessID,
+ DBAsyncParmBlkPtr asyncPB) THREEWORDINLINE(0x303C, 0x0403, 0xA82F);
+
+EXTERN_API( OSErr )
+DBGetConnInfo (long sessID,
+ short sessNum,
+ long * returnedID,
+ long * version,
+ Str63 ddevName,
+ Str255 host,
+ Str255 user,
+ Str255 network,
+ Str255 connStr,
+ long * start,
+ OSErr * state,
+ DBAsyncParmBlkPtr asyncPB) THREEWORDINLINE(0x303C, 0x1704, 0xA82F);
+
+EXTERN_API( OSErr )
+DBGetSessionNum (long sessID,
+ short * sessNum,
+ DBAsyncParmBlkPtr asyncPB) THREEWORDINLINE(0x303C, 0x0605, 0xA82F);
+
+EXTERN_API( OSErr )
+DBSend (long sessID,
+ Ptr text,
+ short len,
+ DBAsyncParmBlkPtr asyncPB) THREEWORDINLINE(0x303C, 0x0706, 0xA82F);
+
+EXTERN_API( OSErr )
+DBSendItem (long sessID,
+ DBType dataType,
+ short len,
+ short places,
+ short flags,
+ void * buffer,
+ DBAsyncParmBlkPtr asyncPB) THREEWORDINLINE(0x303C, 0x0B07, 0xA82F);
+
+EXTERN_API( OSErr )
+DBExec (long sessID,
+ DBAsyncParmBlkPtr asyncPB) THREEWORDINLINE(0x303C, 0x0408, 0xA82F);
+
+EXTERN_API( OSErr )
+DBState (long sessID,
+ DBAsyncParmBlkPtr asyncPB) THREEWORDINLINE(0x303C, 0x0409, 0xA82F);
+
+EXTERN_API( OSErr )
+DBGetErr (long sessID,
+ long * err1,
+ long * err2,
+ Str255 item1,
+ Str255 item2,
+ Str255 errorMsg,
+ DBAsyncParmBlkPtr asyncPB) THREEWORDINLINE(0x303C, 0x0E0A, 0xA82F);
+
+EXTERN_API( OSErr )
+DBBreak (long sessID,
+ Boolean abort,
+ DBAsyncParmBlkPtr asyncPB) THREEWORDINLINE(0x303C, 0x050B, 0xA82F);
+
+EXTERN_API( OSErr )
+DBGetItem (long sessID,
+ long timeout,
+ DBType * dataType,
+ short * len,
+ short * places,
+ short * flags,
+ void * buffer,
+ DBAsyncParmBlkPtr asyncPB) THREEWORDINLINE(0x303C, 0x100C, 0xA82F);
+
+EXTERN_API( OSErr )
+DBUnGetItem (long sessID,
+ DBAsyncParmBlkPtr asyncPB) THREEWORDINLINE(0x303C, 0x040D, 0xA82F);
+
+EXTERN_API( OSErr )
+DBKill (DBAsyncParmBlkPtr asyncPB) THREEWORDINLINE(0x303C, 0x020E, 0xA82F);
+
+EXTERN_API( OSErr )
+DBGetNewQuery (short queryID,
+ QueryHandle * query) THREEWORDINLINE(0x303C, 0x030F, 0xA82F);
+
+EXTERN_API( OSErr )
+DBDisposeQuery (QueryHandle query) THREEWORDINLINE(0x303C, 0x0210, 0xA82F);
+
+EXTERN_API( OSErr )
+DBStartQuery (long * sessID,
+ QueryHandle query,
+ DBStatusUPP statusProc,
+ DBAsyncParmBlkPtr asyncPB) THREEWORDINLINE(0x303C, 0x0811, 0xA82F);
+
+EXTERN_API( OSErr )
+DBGetQueryResults (long sessID,
+ ResultsRecord * results,
+ long timeout,
+ DBStatusUPP statusProc,
+ DBAsyncParmBlkPtr asyncPB) THREEWORDINLINE(0x303C, 0x0A12, 0xA82F);
+
+EXTERN_API( OSErr )
+DBResultsToText (ResultsRecord * results,
+ Handle * theText) THREEWORDINLINE(0x303C, 0x0413, 0xA82F);
+
+EXTERN_API( OSErr )
+DBInstallResultHandler (DBType dataType,
+ DBResultHandlerUPP theHandler,
+ Boolean isSysHandler) THREEWORDINLINE(0x303C, 0x0514, 0xA82F);
+
+EXTERN_API( OSErr )
+DBRemoveResultHandler (DBType dataType) THREEWORDINLINE(0x303C, 0x0215, 0xA82F);
+
+EXTERN_API( OSErr )
+DBGetResultHandler (DBType dataType,
+ DBResultHandlerUPP * theHandler,
+ Boolean getSysHandler) THREEWORDINLINE(0x303C, 0x0516, 0xA82F);
+
+EXTERN_API( OSErr )
+DBIdle (void) THREEWORDINLINE(0x303C, 0x00FF, 0xA82F);
+
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __DATABASEACCESS__ */
+
diff --git a/include/qt/DateTimeUtils.h b/include/qt/DateTimeUtils.h
new file mode 100644
index 000000000..f037b082a
--- /dev/null
+++ b/include/qt/DateTimeUtils.h
@@ -0,0 +1,466 @@
+/*
+ File: DateTimeUtils.h
+
+ Contains: International Date and Time Interfaces (previously in TextUtils)
+
+ Version: Technology: Mac OS 8.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __DATETIMEUTILS__
+#define __DATETIMEUTILS__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*
+
+ Here are the current routine names and the translations to the older forms.
+ Please use the newer forms in all new code and migrate the older names out of existing
+ code as maintainance permits.
+
+ New Name Old Name(s)
+
+ DateString IUDatePString IUDateString
+ InitDateCache
+ LongDateString IULDateString
+ LongTimeString IULTimeString
+ StringToDate String2Date
+ StringToTime
+ TimeString IUTimeString IUTimePString
+ LongDateToSeconds LongDate2Secs
+ LongSecondsToDate LongSecs2Date
+ DateToSeconds Date2Secs
+ SecondsToDate Secs2Date
+
+
+ Carbon only supports the new names. The old names are undefined for Carbon targets.
+ This is true for C, Assembly and Pascal.
+
+ InterfaceLib always has exported the old names. For C macros have been defined to allow
+ the use of the new names. For Pascal and Assembly using the new names will result
+ in link errors.
+
+*/
+
+
+typedef SInt16 ToggleResults;
+enum {
+ /* Toggle results */
+ toggleUndefined = 0,
+ toggleOK = 1,
+ toggleBadField = 2,
+ toggleBadDelta = 3,
+ toggleBadChar = 4,
+ toggleUnknown = 5,
+ toggleBadNum = 6,
+ toggleOutOfRange = 7, /*synonym for toggleErr3*/
+ toggleErr3 = 7,
+ toggleErr4 = 8,
+ toggleErr5 = 9
+};
+
+enum {
+ /* Date equates */
+ smallDateBit = 31, /*Restrict valid date/time to range of Time global*/
+ togChar12HourBit = 30, /*If toggling hour by char, accept hours 1..12 only*/
+ togCharZCycleBit = 29, /*Modifier for togChar12HourBit: accept hours 0..11 only*/
+ togDelta12HourBit = 28, /*If toggling hour up/down, restrict to 12-hour range (am/pm)*/
+ genCdevRangeBit = 27, /*Restrict date/time to range used by genl CDEV*/
+ validDateFields = -1,
+ maxDateField = 10
+};
+
+enum {
+ eraMask = 0x0001,
+ yearMask = 0x0002,
+ monthMask = 0x0004,
+ dayMask = 0x0008,
+ hourMask = 0x0010,
+ minuteMask = 0x0020,
+ secondMask = 0x0040,
+ dayOfWeekMask = 0x0080,
+ dayOfYearMask = 0x0100,
+ weekOfYearMask = 0x0200,
+ pmMask = 0x0400,
+ dateStdMask = 0x007F /*default for ValidDate flags and ToggleDate TogglePB.togFlags*/
+};
+
+
+typedef SInt8 LongDateField;
+enum {
+ eraField = 0,
+ yearField = 1,
+ monthField = 2,
+ dayField = 3,
+ hourField = 4,
+ minuteField = 5,
+ secondField = 6,
+ dayOfWeekField = 7,
+ dayOfYearField = 8,
+ weekOfYearField = 9,
+ pmField = 10,
+ res1Field = 11,
+ res2Field = 12,
+ res3Field = 13
+};
+
+
+typedef SInt8 DateForm;
+enum {
+ shortDate = 0,
+ longDate = 1,
+ abbrevDate = 2
+};
+
+enum {
+ /* StringToDate status values */
+ fatalDateTime = 0x8000, /* StringToDate and String2Time mask to a fatal error */
+ longDateFound = 1, /* StringToDate mask to long date found */
+ leftOverChars = 2, /* StringToDate & Time mask to warn of left over characters */
+ sepNotIntlSep = 4, /* StringToDate & Time mask to warn of non-standard separators */
+ fieldOrderNotIntl = 8, /* StringToDate & Time mask to warn of non-standard field order */
+ extraneousStrings = 16, /* StringToDate & Time mask to warn of unparsable strings in text */
+ tooManySeps = 32, /* StringToDate & Time mask to warn of too many separators */
+ sepNotConsistent = 64, /* StringToDate & Time mask to warn of inconsistent separators */
+ tokenErr = 0x8100, /* StringToDate & Time mask for 'tokenizer err encountered' */
+ cantReadUtilities = 0x8200,
+ dateTimeNotFound = 0x8400,
+ dateTimeInvalid = 0x8800
+};
+
+typedef short StringToDateStatus;
+typedef StringToDateStatus String2DateStatus;
+
+struct DateCacheRecord {
+ short hidden[256]; /* only for temporary use */
+};
+typedef struct DateCacheRecord DateCacheRecord;
+
+typedef DateCacheRecord * DateCachePtr;
+
+struct DateTimeRec {
+ short year;
+ short month;
+ short day;
+ short hour;
+ short minute;
+ short second;
+ short dayOfWeek;
+};
+typedef struct DateTimeRec DateTimeRec;
+
+typedef SInt64 LongDateTime;
+
+union LongDateCvt {
+ SInt64 c;
+ struct {
+ UInt32 lHigh;
+ UInt32 lLow;
+ } hl;
+};
+typedef union LongDateCvt LongDateCvt;
+
+union LongDateRec {
+ struct {
+ short era;
+ short year;
+ short month;
+ short day;
+ short hour;
+ short minute;
+ short second;
+ short dayOfWeek;
+ short dayOfYear;
+ short weekOfYear;
+ short pm;
+ short res1;
+ short res2;
+ short res3;
+ } ld;
+ short list[14]; /*Index by LongDateField!*/
+ struct {
+ short eraAlt;
+ DateTimeRec oldDate;
+ } od;
+};
+typedef union LongDateRec LongDateRec;
+
+typedef SInt8 DateDelta;
+
+struct TogglePB {
+ long togFlags; /*caller normally sets low word to dateStdMask=$7F*/
+ ResType amChars; /*from 'itl0', but uppercased*/
+ ResType pmChars; /*from 'itl0', but uppercased*/
+ long reserved[4];
+};
+typedef struct TogglePB TogglePB;
+/*
+ These routine are available in Carbon with their new name
+*/
+EXTERN_API( void )
+DateString (long dateTime,
+ DateForm longFlag,
+ Str255 result,
+ Handle intlHandle) THREEWORDINLINE(0x3F3C, 0x000E, 0xA9ED);
+
+EXTERN_API( void )
+TimeString (long dateTime,
+ Boolean wantSeconds,
+ Str255 result,
+ Handle intlHandle) THREEWORDINLINE(0x3F3C, 0x0010, 0xA9ED);
+
+EXTERN_API( void )
+LongDateString (LongDateTime * dateTime,
+ DateForm longFlag,
+ Str255 result,
+ Handle intlHandle) THREEWORDINLINE(0x3F3C, 0x0014, 0xA9ED);
+
+EXTERN_API( void )
+LongTimeString (LongDateTime * dateTime,
+ Boolean wantSeconds,
+ Str255 result,
+ Handle intlHandle) THREEWORDINLINE(0x3F3C, 0x0016, 0xA9ED);
+
+
+/*
+ These routine are available in Carbon and InterfaceLib with their new name
+*/
+EXTERN_API( OSErr )
+InitDateCache (DateCachePtr theCache) FOURWORDINLINE(0x2F3C, 0x8204, 0xFFF8, 0xA8B5);
+
+EXTERN_API( StringToDateStatus )
+StringToDate (Ptr textPtr,
+ long textLen,
+ DateCachePtr theCache,
+ long * lengthUsed,
+ LongDateRec * dateTime) FOURWORDINLINE(0x2F3C, 0x8214, 0xFFF6, 0xA8B5);
+
+EXTERN_API( StringToDateStatus )
+StringToTime (Ptr textPtr,
+ long textLen,
+ DateCachePtr theCache,
+ long * lengthUsed,
+ LongDateRec * dateTime) FOURWORDINLINE(0x2F3C, 0x8214, 0xFFF4, 0xA8B5);
+
+EXTERN_API( void )
+LongDateToSeconds (const LongDateRec * lDate,
+ LongDateTime * lSecs) FOURWORDINLINE(0x2F3C, 0x8008, 0xFFF2, 0xA8B5);
+
+EXTERN_API( void )
+LongSecondsToDate (const LongDateTime * lSecs,
+ LongDateRec * lDate) FOURWORDINLINE(0x2F3C, 0x8008, 0xFFF0, 0xA8B5);
+
+EXTERN_API( ToggleResults )
+ToggleDate (LongDateTime * lSecs,
+ LongDateField field,
+ DateDelta delta,
+ short ch,
+ const TogglePB * params) FOURWORDINLINE(0x2F3C, 0x820E, 0xFFEE, 0xA8B5);
+
+EXTERN_API( short )
+ValidDate (const LongDateRec * vDate,
+ long flags,
+ LongDateTime * newSecs) FOURWORDINLINE(0x2F3C, 0x820C, 0xFFE4, 0xA8B5);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 ReadDateTime(__A0)
+ #endif
+EXTERN_API( OSErr )
+ReadDateTime (unsigned long * time) ONEWORDINLINE(0xA039);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter GetDateTime(__A0)
+ #endif
+EXTERN_API( void )
+GetDateTime (unsigned long * secs) TWOWORDINLINE(0x20B8, 0x020C);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SetDateTime(__D0)
+ #endif
+EXTERN_API( OSErr )
+SetDateTime (unsigned long time) ONEWORDINLINE(0xA03A);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter SetTime(__A0)
+ #endif
+EXTERN_API( void )
+SetTime (const DateTimeRec * d) TWOWORDINLINE(0xA9C7, 0xA03A);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter GetTime(__A0)
+ #endif
+EXTERN_API( void )
+GetTime (DateTimeRec * d) THREEWORDINLINE(0x2038, 0x020C, 0xA9C6);
+
+EXTERN_API( void )
+DateToSeconds (const DateTimeRec * d,
+ unsigned long * secs);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter SecondsToDate(__D0, __A0)
+ #endif
+EXTERN_API( void )
+SecondsToDate (unsigned long secs,
+ DateTimeRec * d) ONEWORDINLINE(0xA9C6);
+
+
+/*
+ These routine are available in InterfaceLib using their old name.
+ Macros allow using the new names in all source code.
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+IUDateString (long dateTime,
+ DateForm longFlag,
+ Str255 result) TWOWORDINLINE(0x4267, 0xA9ED);
+
+EXTERN_API( void )
+IUTimeString (long dateTime,
+ Boolean wantSeconds,
+ Str255 result) THREEWORDINLINE(0x3F3C, 0x0002, 0xA9ED);
+
+EXTERN_API( void )
+IUDatePString (long dateTime,
+ DateForm longFlag,
+ Str255 result,
+ Handle intlHandle) THREEWORDINLINE(0x3F3C, 0x000E, 0xA9ED);
+
+EXTERN_API( void )
+IUTimePString (long dateTime,
+ Boolean wantSeconds,
+ Str255 result,
+ Handle intlHandle) THREEWORDINLINE(0x3F3C, 0x0010, 0xA9ED);
+
+EXTERN_API( void )
+IULDateString (LongDateTime * dateTime,
+ DateForm longFlag,
+ Str255 result,
+ Handle intlHandle) THREEWORDINLINE(0x3F3C, 0x0014, 0xA9ED);
+
+EXTERN_API( void )
+IULTimeString (LongDateTime * dateTime,
+ Boolean wantSeconds,
+ Str255 result,
+ Handle intlHandle) THREEWORDINLINE(0x3F3C, 0x0016, 0xA9ED);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#define DateString(dateTime, longFlag, result, intlHandle) \
+ IUDatePString( dateTime, longFlag, result, intlHandle)
+#define TimeString(dateTime, wantSeconds, result, intlHandle) \
+ IUTimePString(dateTime, wantSeconds, result, intlHandle)
+#define LongDateString(dateTime, longFlag, result, intlHandle) \
+ IULDateString(dateTime, longFlag, result, intlHandle)
+#define LongTimeString(dateTime, wantSeconds, result, intlHandle) \
+ IULTimeString(dateTime, wantSeconds, result, intlHandle)
+#endif /* CALL_NOT_IN_CARBON */
+#if OLDROUTINENAMES
+#define String2Date(textPtr, textLen, theCache, lengthUsed, dateTime) \
+ StringToDate(textPtr, textLen, theCache, lengthUsed, dateTime)
+#define String2Time(textPtr, textLen, theCache, lengthUsed, dateTime) \
+ StringToTime(textPtr, textLen, theCache, lengthUsed, dateTime)
+#define LongDate2Secs(lDate, lSecs) LongDateToSeconds(lDate, lSecs)
+#define LongSecs2Date(lSecs, lDate) LongSecondsToDate(lSecs, lDate)
+#define Date2Secs(d, secs) DateToSeconds(d, secs)
+#define Secs2Date(secs, d) SecondsToDate(secs, d)
+#endif /* OLDROUTINENAMES */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( void )
+iudatestring (long dateTime,
+ DateForm longFlag,
+ char * result);
+
+EXTERN_API_C( void )
+iudatepstring (long dateTime,
+ DateForm longFlag,
+ char * result,
+ Handle intlHandle);
+
+EXTERN_API_C( void )
+iutimestring (long dateTime,
+ Boolean wantSeconds,
+ char * result);
+
+EXTERN_API_C( void )
+iutimepstring (long dateTime,
+ Boolean wantSeconds,
+ char * result,
+ Handle intlHandle);
+
+EXTERN_API_C( void )
+iuldatestring (LongDateTime * dateTime,
+ DateForm longFlag,
+ char * result,
+ Handle intlHandle);
+
+EXTERN_API_C( void )
+iultimestring (LongDateTime * dateTime,
+ Boolean wantSeconds,
+ char * result,
+ Handle intlHandle);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __DATETIMEUTILS__ */
+
diff --git a/include/qt/Debugging.h b/include/qt/Debugging.h
new file mode 100644
index 000000000..b7197c932
--- /dev/null
+++ b/include/qt/Debugging.h
@@ -0,0 +1,797 @@
+/*
+ File: Debugging.h
+
+ Contains: Macros to handle exceptions and assertions.
+
+ Version: Technology: Carbon
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1989-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __DEBUGGING__
+#define __DEBUGGING__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+
+/*______________________________________________________________________________________*/
+/* */
+/* This file defines standard exception handling and assertion macros for */
+/* system-level programming in C. Originally used in QuickDraw GX, and heavily */
+/* modified since, these macros are used extensively throughout Mac OS system */
+/* software. Now *you* can look and feel like a system software engineer. */
+/* */
+/* To activate debugger breaks, #define DEBUG to 1 (one) before including this file. */
+/* Five further levels of debugging are available, selected by #defining one */
+/* of the following conditionals to 1 after DEBUG is defined to 1. */
+/* */
+/* DEBUG_INTERNAL the default; includes file and line number information */
+/* */
+/* DEBUG_EXTERNAL used for code which must ship to developers outside */
+/* your organization; no file or line number information is */
+/* included in asserts */
+/* */
+/* DEBUG_BREAK_ONLY where an assertion would normally be sent to the debugger, */
+/* send an empty string instead. */
+/* */
+/* PRODUCTION used for shipping code; no debugger breaks are emitted */
+/* */
+/* PERFORMANCE same as PRODUCTION */
+/* */
+/* #defining DEBUG to 0 is equivalent to #defining PRODUCTION 1 when DEBUG is 1. */
+/* (No code for debugger breaks is emitted in either case.) */
+/* */
+/* Of the multitude of macros, the preferred ones are: */
+/* */
+/* debug_string(c-string) */
+/* If debugging is on, c-string is printed in the debugger. */
+/* In production builds, debug_string() does nothing. */
+/* */
+/* check(expression) */
+/* check_noerr(error) */
+/* If (expression) evaluates to false, break into the debugger. */
+/* In production builds, check() does nothing. */
+/* Code inside check() statements is not compiled into production builds. */
+/* */
+/* require(expression, label) */
+/* require_noerr(expression, label) */
+/* If (expression) evaluates to false, announce this fact via the */
+/* debugger and then goto label. In production builds, does not call */
+/* the debugger but still goes to label if expression is false. */
+/* */
+/* require_action(expression, label, action) */
+/* require_noerr_action(expression, label, action) */
+/* Same as require, but executes (action) before jumping to label. */
+/* */
+/* check_string(expression, c-string) */
+/* require_string(expression, label, c-string) */
+/* require_noerr_string(expression, label, c-string) */
+/* If expression evaluates to false, print string and then proceed as in */
+/* a normal check/require statement */
+/* */
+/* verify(expression) */
+/* verify_noerr(error) */
+/* If debugging is on, verify is the same as check(expression). */
+/* If debugging is off, verify still evaluates (expression) */
+/* but ignores the result. Code inside verify() statements */
+/* is executed in both production and debug builds. */
+/* */
+/* Common usage: */
+/* */
+/* // my pixmap is not purgeable, so locking it should never fail */
+/* verify( LockPixels(myPixMap) ); */
+/* verify_noerr( DisposeThread(myThread, &threadResult, true) ); */
+/*______________________________________________________________________________________*/
+
+/*______________________________________________________________________________________*/
+/* */
+/* Before including this file, #define kCompentSignatureString to a C-string */
+/* containing the name of your client. */
+/* */
+/* example: #define kComponentSignatureString "SurfWriter" */
+/*______________________________________________________________________________________*/
+
+#ifndef kComponentSignatureString
+#define kComponentSignatureString "Third Party Client"
+#endif
+
+
+
+#define DEBUG_LEVEL_PRODUCTION 0
+#define DEBUG_LEVEL_BREAK_ONLY 1
+#define DEBUG_LEVEL_EXTERNAL 3
+#define DEBUG_LEVEL_INTERNAL 4
+#define DEBUGFULL DEBUG_LEVEL_INTERNAL
+#define DEBUG_NO_OPTIONS 0
+
+
+#ifdef DEBUGLEVEL
+#undef DEBUGLEVEL
+#endif
+
+#if DEBUG
+ #if PRODUCTION
+ #define DEBUGLEVEL DEBUG_LEVEL_PRODUCTION
+ #elif DEBUG_EXTERNAL
+ #define DEBUGLEVEL DEBUG_LEVEL_EXTERNAL
+ #elif DEBUG_INTERNAL
+ #define DEBUGLEVEL DEBUG_LEVEL_INTERNAL
+ #elif PERFORMANCE
+ #define DEBUGLEVEL DEBUG_LEVEL_PRODUCTION
+ #elif DEBUG_BREAK_ONLY
+ #define DEBUGLEVEL DEBUG_LEVEL_BREAK_ONLY
+ #else
+ #define DEBUGLEVEL DEBUG_LEVEL_INTERNAL
+ #endif
+#endif
+
+#ifndef DEBUGLEVEL
+#define DEBUGLEVEL DEBUG_LEVEL_PRODUCTION
+#endif
+
+
+#ifndef COMPONENT_SIGNATURE
+#define COMPONENT_SIGNATURE '?*?*'
+#endif
+
+
+
+#define QuoteExceptionString(x) #x
+
+
+/*______________________________________________________________________________________*/
+/* */
+/* DEBUGASSERTMSG - all error reporting is routed through this macro, which calls the */
+/* system routine DebugAssert(). If you wish to use your own assertion/debugger break */
+/* routine, you can override DEBUGASSERTMSG by defining it before including this file. */
+/*______________________________________________________________________________________*/
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+EXTERN_API( void )
+DebugAssert (OSType componentSignature,
+ UInt32 options,
+ char * assertionString,
+ char * exceptionString,
+ char * errorString,
+ char * fileName,
+ long lineNumber,
+ void * value) TWOWORDINLINE(0x7000, 0xAA7E);
+
+
+#ifndef DEBUGASSERTMSG
+#if DEBUGLEVEL == DEBUG_LEVEL_BREAK_ONLY
+#define DEBUGASSERTMSG(componentSignature, options, assertionString, exceptionString, errorString, fileName, lineNumber, value ) \
+ Debugger()
+#elif DEBUGLEVEL == DEBUG_LEVEL_EXTERNAL
+/* exclude code structure information */
+#if (applec && (!__powerc))
+#define DEBUGASSERTMSG(componentSignature, options, assertionString, exceptionString, errorString, fileName, lineNumber, value ) \
+ DebugAssert(componentSignature, options, kComponentSignatureString, assertionString, nil, nil, 0, value )
+#else
+#define DEBUGASSERTMSG(componentSignature, options, assertionString, exceptionString, errorString, fileName, lineNumber, value ) \
+ DebugAssert(componentSignature, options, kComponentSignatureString ": " assertionString, nil, nil, nil, 0, value )
+#endif
+#elif DEBUGLEVEL == DEBUG_LEVEL_INTERNAL
+/* include all info */
+#if (applec && (!__powerc))
+#define DEBUGASSERTMSG(componentSignature, options, assertionString, exceptionString, errorString, fileName, lineNumber, value ) \
+ DebugAssert(componentSignature, options, kComponentSignatureString, assertionString, nil, nil, 0, value )
+#else
+#define DEBUGASSERTMSG(componentSignature, options, assertionString, exceptionString, errorString, fileName, lineNumber, value ) \
+ DebugAssert(componentSignature, options, kComponentSignatureString ": " assertionString, exceptionString, errorString, fileName, lineNumber, value )
+#endif
+#else
+/* no debugger message */
+#define DEBUGASSERTMSG(componentSignature, options, assertionString, exceptionString, errorString, fileName, lineNumber, value )
+#endif
+#endif
+
+/*
+ kBlessedBusErrorBait is an address that will never be mapped
+ by Mac OS 8 or 9. It is close to the middle of the 64K range from
+ 0x68F10000 to 0x68F1FFFF that is unmapped and cannot be accessed
+ without causing an exception. Thus, it's a good value to use for
+ filling uninitialized pointers, etc.
+*/
+enum {
+ kBlessedBusErrorBait = 0x68F168F1
+};
+
+
+/* TaskLevel masks*/
+enum {
+ k68kInterruptLevelMask = 0x00000007,
+ kInVBLTaskMask = 0x00000010,
+ kInDeferredTaskMask = 0x00000020,
+ kInSecondaryIntHandlerMask = 0x00000040
+};
+
+enum {
+ kComponentDebugOption = 0 /* optionSelectorNum to turn breaks for component on/off*/
+};
+
+enum {
+ kGetDebugOption = 1, /* get current debug option setting*/
+ kSetDebugOption = 2 /* set debug option*/
+};
+
+/*
+ DebugComponentCallback
+ DebugComponentCallback is the callback into a component that registers with DebugLib.
+ It is called to get the debug option setting, or to turn a debug option on or off.
+ Inputs:
+ optionSelectorNum The component debug option to set
+ command The command:
+ kGetDebugOption - get current debug option setting
+ kSetDebugOption - set debug option
+ Outputs:
+ optionSetting The current setting if kGetDebugOption;
+ the new debug option if kSetDebugOption
+*/
+typedef CALLBACK_API( void , DebugComponentCallbackProcPtr )(SInt32 optionSelectorNum, UInt32 command, Boolean *optionSetting);
+typedef STACK_UPP_TYPE(DebugComponentCallbackProcPtr) DebugComponentCallbackUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(DebugComponentCallbackUPP)
+ NewDebugComponentCallbackUPP (DebugComponentCallbackProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeDebugComponentCallbackUPP (DebugComponentCallbackUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeDebugComponentCallbackUPP (SInt32 optionSelectorNum,
+ UInt32 command,
+ Boolean * optionSetting,
+ DebugComponentCallbackUPP userUPP);
+
+#else
+ enum { uppDebugComponentCallbackProcInfo = 0x00000FC0 }; /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes) */
+ #define NewDebugComponentCallbackUPP(userRoutine) (DebugComponentCallbackUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDebugComponentCallbackProcInfo, GetCurrentArchitecture())
+ #define DisposeDebugComponentCallbackUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeDebugComponentCallbackUPP(optionSelectorNum, command, optionSetting, userUPP) CALL_THREE_PARAMETER_UPP((userUPP), uppDebugComponentCallbackProcInfo, (optionSelectorNum), (command), (optionSetting))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewDebugComponentCallbackProc(userRoutine) NewDebugComponentCallbackUPP(userRoutine)
+#define CallDebugComponentCallbackProc(userRoutine, optionSelectorNum, command, optionSetting) InvokeDebugComponentCallbackUPP(optionSelectorNum, command, optionSetting, userRoutine)
+/*
+ TaskLevel
+ TaskLevel returns 0 if we're (probably) running at non-interrupt time.
+ There's no way to make this perfect, but this is as close as we can get.
+ If TaskLevel doesn't return 0, then the following masks can be used to learn more:
+ k68kInterruptLevelMask = 0x00000007,
+ kInVBLTaskMask = 0x00000010,
+ kInDeferredTaskMask = 0x00000020,
+ kInSecondaryIntHandlerMask = 0x00000040
+*/
+EXTERN_API( UInt32 )
+TaskLevel (void) TWOWORDINLINE(0x7001, 0xAA7E);
+
+
+#define ATTASKLEVEL0() ( TaskLevel() == 0 )
+
+/*
+ NewDebugComponent
+ NewDebugComponent registers a component with DebugLib.
+ Inputs:
+ componentSignature The unique signature of component
+ componentName The displayable string naming the component
+ componentCallback The callback into component for working with options
+ Result:
+ noErr no error
+ memFullErr could not allocate memory
+ debuggingExecutionContextErr routine cannot be called at this time
+ debuggingDuplicateSignatureErr componentSignature already registered
+ debuggingInvalidNameErr componentName is invalid (NULL)
+*/
+EXTERN_API( OSStatus )
+NewDebugComponent (OSType componentSignature,
+ ConstStr255Param componentName,
+ DebugComponentCallbackUPP componentCallback) TWOWORDINLINE(0x7002, 0xAA7E);
+
+
+/*
+ NewDebugOption
+ NewDebugOption registers a debug option with DebugLib.
+ Inputs:
+ componentSignature The signature of component to register a debug option for
+ optionSelectorNum The selector number of this debug option
+ optionName The displayable string naming this debug option
+ Result:
+ noErr no error
+ memFullErr could not allocate memory
+ debuggingExecutionContextErr called at interrupt time
+ debuggingDuplicateOptionErr optionSelectorNum already registered
+ debuggingInvalidSignatureErr componentSignature not registered
+ debuggingInvalidNameErr optionName is invalid (NULL)
+ debuggingNoCallbackErr debugging component has no callback
+*/
+EXTERN_API( OSStatus )
+NewDebugOption (OSType componentSignature,
+ SInt32 optionSelectorNum,
+ ConstStr255Param optionName) TWOWORDINLINE(0x7003, 0xAA7E);
+
+
+/*
+ DisposeDebugComponent
+ DisposeDebugComponent removes a component registration and all related debug options from DebugLib.
+ Input:
+ componentSignature The unique signature of a component
+ Result:
+ noErr no error
+ debuggingExecutionContextErr called at interrupt time
+ debuggingInvalidSignatureErr componentSignature not registered
+*/
+EXTERN_API( OSStatus )
+DisposeDebugComponent (OSType componentSignature) TWOWORDINLINE(0x7004, 0xAA7E);
+
+
+/*
+ GetDebugComponentInfo
+ GetDebugComponentInfo returns a component registered with DebugLib.
+ Inputs:
+ index The index into the list of registered components (1-based)
+ Outputs:
+ componentSignature The unique signature of a component
+ componentName The displayable string naming a component
+ Result:
+ noErr no error
+ debuggingNoMatchErr debugging component not found at this index
+*/
+EXTERN_API( OSStatus )
+GetDebugComponentInfo (UInt32 index,
+ OSType * componentSignature,
+ Str255 componentName) TWOWORDINLINE(0x7005, 0xAA7E);
+
+
+/*
+ GetDebugOptionInfo
+ GetDebugOptionInfo returns a debug option registered with DebugLib.
+ Inputs:
+ index The index into the list of registered debug options (0-based);
+ 0 = kComponentDebugOption
+ componentSignature The unique signature of a component
+ Outputs:
+ optionSelectorNum The selector number of this debug option
+ optionName The displayable string naming this debug option
+ optionSetting The current debug option setting
+ Result:
+ noErr no error
+ debuggingInvalidSignatureErr componentSignature not registered
+ debuggingNoMatchErr option not found at this index
+*/
+EXTERN_API( OSStatus )
+GetDebugOptionInfo (UInt32 index,
+ OSType componentSignature,
+ SInt32 * optionSelectorNum,
+ Str255 optionName,
+ Boolean * optionSetting) TWOWORDINLINE(0x7006, 0xAA7E);
+
+
+/*
+ SetDebugOptionValue
+ SetDebugOptionValue sets a debug option registered with DebugLib.
+ Inputs:
+ componentSignature The unique signature of a component
+ optionSelectorNum The selector number of this debug option
+ newOptionSetting The new debug option setting
+ Result:
+ noErr no error
+ debuggingInvalidSignatureErr componentSignature not registered
+ debuggingInvalidOptionErr optionSelectorNum is not registered
+*/
+EXTERN_API( OSStatus )
+SetDebugOptionValue (OSType componentSignature,
+ SInt32 optionSelectorNum,
+ Boolean newOptionSetting) TWOWORDINLINE(0x7007, 0xAA7E);
+
+/*
+ DebugAssertOutputHandler
+ DebugAssertOutputHandler is the callback that registers with DebugLib to handle the
+ output from DebugAssert.
+ Inputs:
+ "componentSignature" through "value" are the raw values passed to DebugAssert
+ when an exception occurs.
+ outputMsg is the string DebugAssert build which would normally be passed to
+ DebugStr if a DebugAssertOutputHandler isn't installed.
+*/
+typedef CALLBACK_API( void , DebugAssertOutputHandlerProcPtr )(OSType componentSignature, UInt32 options, char *assertionString, char *exceptionString, char *errorString, char *fileName, long lineNumber, void *value, ConstStr255Param outputMsg);
+typedef STACK_UPP_TYPE(DebugAssertOutputHandlerProcPtr) DebugAssertOutputHandlerUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(DebugAssertOutputHandlerUPP)
+ NewDebugAssertOutputHandlerUPP (DebugAssertOutputHandlerProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeDebugAssertOutputHandlerUPP (DebugAssertOutputHandlerUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeDebugAssertOutputHandlerUPP (OSType componentSignature,
+ UInt32 options,
+ char * assertionString,
+ char * exceptionString,
+ char * errorString,
+ char * fileName,
+ long lineNumber,
+ void * value,
+ ConstStr255Param outputMsg,
+ DebugAssertOutputHandlerUPP userUPP);
+
+#else
+ enum { uppDebugAssertOutputHandlerProcInfo = 0x00FFFFC0 }; /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewDebugAssertOutputHandlerUPP(userRoutine) (DebugAssertOutputHandlerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDebugAssertOutputHandlerProcInfo, GetCurrentArchitecture())
+ #define DisposeDebugAssertOutputHandlerUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeDebugAssertOutputHandlerUPP(componentSignature, options, assertionString, exceptionString, errorString, fileName, lineNumber, value, outputMsg, userUPP) CALL_NINE_PARAMETER_UPP((userUPP), uppDebugAssertOutputHandlerProcInfo, (componentSignature), (options), (assertionString), (exceptionString), (errorString), (fileName), (lineNumber), (value), (outputMsg))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewDebugAssertOutputHandlerProc(userRoutine) NewDebugAssertOutputHandlerUPP(userRoutine)
+#define CallDebugAssertOutputHandlerProc(userRoutine, componentSignature, options, assertionString, exceptionString, errorString, fileName, lineNumber, value, outputMsg) InvokeDebugAssertOutputHandlerUPP(componentSignature, options, assertionString, exceptionString, errorString, fileName, lineNumber, value, outputMsg, userRoutine)
+/*
+ InstallDebugAssertOutputHandler
+ InstallDebugAssertOutputHandler installs a DebugAssertOutputHandler which DebugAssert calls
+ instead of DebugStr.
+ Inputs:
+ handler the DebugAssertOutputHandler to install or NULL to switch back to
+ the default handler (DebugStr).
+*/
+EXTERN_API( void )
+InstallDebugAssertOutputHandler (DebugAssertOutputHandlerUPP handler) TWOWORDINLINE(0x7008, 0xAA7E);
+
+/*______________________________________________________________________________________*/
+/* */
+/* Tech Q&A PLAT-30 says to check bit 5 of the byte at 0xbff to */
+/* determine whether Macsbug ( or any other low level debugger ) */
+/* is installed; I also check that MacJmp ( which points to the */
+/* entry point for the debugger ) is not nil and not -1. */
+/* */
+/* MacJmpFlag: */
+/* Bit 5 should be set to indicate the debugger is installed. */
+/* Bit 6 should be set to indicate the debugger is initialized. */
+/* Bit 7 should be clear to indicate that the debugger is NOT busy */
+/* */
+/* Dr. Macsbug says to also check that the byte at 0xBFF isn't 0xFF. */
+/*______________________________________________________________________________________*/
+
+#define LocalLMGetMacJmp() (*(( unsigned long *)0x0120))
+#define LocalLMGetMacJmpFlag() (*(( UInt8 *)0x0BFF))
+
+#define ISLOWLEVELDEBUGGERCALLABLE() \
+ ( ( LocalLMGetMacJmpFlag() != (UInt8) 0xff ) && \
+ ( (LocalLMGetMacJmpFlag() & (UInt8) 0xe0) == (UInt8) 0x60 ) && \
+ ( LocalLMGetMacJmp() != 0 ) && \
+ ( LocalLMGetMacJmp() != (unsigned long) 0xffffffff ) )
+
+#if DEBUG
+
+#define DEBUGGER() \
+ do { \
+ if ( ISLOWLEVELDEBUGGERCALLABLE() ) \
+ Debugger(); \
+ } while ( false )
+
+#define DEBUGSTR(str) \
+ do { \
+ if ( ISLOWLEVELDEBUGGERCALLABLE() ) \
+ DebugStr ( str ); \
+ } while ( false )
+
+#else
+
+#define DEBUGGER()
+
+#define DEBUGSTR(str)
+
+#endif
+
+
+/* no-op asserts for production code*/
+
+#if DEBUGLEVEL == DEBUG_LEVEL_PRODUCTION
+#define check(assertion)
+#define check_string( assertion, cstring )
+#define check_noerr(err)
+#define check_noerr_string( error, cstring )
+#define debug_string( cstring )
+#define require( assertion, label ) do { if( !(assertion) ) goto label; } while(false)
+#define require_string( assertion, label, string ) require(assertion, label)
+#define require_quiet( assertion, label ) require( assertion, label )
+#define require_noerr( error, label ) do { if( (error) != noErr ) goto label; } while(false)
+#define require_noerr_quiet( assertion, label ) require_noerr( assertion, label )
+#define require_noerr_action( error, label, action ) do { if( (error) != noErr ) { {action;}; goto label; } } while(false)
+#define require_noerr_action_quiet( assertion, label, action ) require_noerr_action( assertion, label, action )
+#define require_action( assertion, label, action ) do { if( !(assertion) ) { {action;}; goto label; } } while(false)
+#define require_action_quiet( assertion, label, action ) require_action( assertion, label, action )
+#define require_action_string( assertion, label, action, cstring ) do { if( !(assertion) ) { {action;}; goto label; } } while(false)
+
+#else
+
+
+/*______________________________________________________________________________________*/
+
+#define debug_string(string) \
+ do { \
+ DEBUGASSERTMSG(COMPONENT_SIGNATURE, DEBUG_NO_OPTIONS, \
+ QuoteExceptionString(string), nil, nil, \
+ __FILE__, __LINE__, 0); \
+ } while (false)
+
+/*______________________________________________________________________________________*/
+
+#define check(assertion) \
+ do { \
+ if (assertion) ; \
+ else { \
+ DEBUGASSERTMSG(COMPONENT_SIGNATURE, DEBUG_NO_OPTIONS, \
+ QuoteExceptionString(assertion), nil, nil, \
+ __FILE__, __LINE__, 0); \
+ } \
+ } while (false)
+
+/*______________________________________________________________________________________*/
+
+
+
+#define check_string(assertion, cstring) \
+ do { \
+ if (assertion) ; \
+ else { \
+ DEBUGASSERTMSG(COMPONENT_SIGNATURE, DEBUG_NO_OPTIONS, \
+ QuoteExceptionString(assertion), cstring, nil, \
+ __FILE__, __LINE__, 0); \
+ } \
+ } while (false)
+
+
+
+/*______________________________________________________________________________________*/
+
+#define check_noerr(error) \
+ do { \
+ OSStatus localError = error; \
+ if (localError == noErr) ; \
+ else { \
+ DEBUGASSERTMSG(COMPONENT_SIGNATURE, DEBUG_NO_OPTIONS, \
+ QuoteExceptionString(error) "== noErr", nil, nil, \
+ __FILE__, __LINE__, (void *)localError); \
+ } \
+ } while (false)
+
+/*______________________________________________________________________________________*/
+
+#define check_noerr_string(error, cstring) \
+ do { \
+ OSStatus localError = error; \
+ if (localError == noErr) ; \
+ else { \
+ DEBUGASSERTMSG(COMPONENT_SIGNATURE, DEBUG_NO_OPTIONS, \
+ QuoteExceptionString(error) "== noErr\n", cstring, nil, \
+ __FILE__, __LINE__, (void *)localError); \
+ } \
+ } while (false)
+
+/*______________________________________________________________________________________*/
+
+#define require(assertion, exception) \
+ do { \
+ if (assertion) ; \
+ else { \
+ DEBUGASSERTMSG(COMPONENT_SIGNATURE, DEBUG_NO_OPTIONS, \
+ QuoteExceptionString(assertion), \
+ QuoteExceptionString(exception), \
+ nil, __FILE__, __LINE__, 0); \
+ goto exception; \
+ } \
+ } while (false)
+
+/*______________________________________________________________________________________*/
+
+#define require_noerr(error, exception) \
+ do { \
+ OSStatus localError = error; \
+ if (localError == noErr) ; \
+ else { \
+ DEBUGASSERTMSG(COMPONENT_SIGNATURE, DEBUG_NO_OPTIONS, \
+ QuoteExceptionString(error) "== noErr", \
+ QuoteExceptionString(exception), \
+ nil, __FILE__, __LINE__, (void *)localError ); \
+ goto exception; \
+ } \
+ } while (false)
+
+/*______________________________________________________________________________________*/
+
+#define require_string(assertion, exception, string) \
+ do { \
+ if (assertion) ; \
+ else { \
+ DEBUGASSERTMSG(COMPONENT_SIGNATURE, DEBUG_NO_OPTIONS, \
+ string, QuoteExceptionString(exception), \
+ QuoteExceptionString(exception), \
+ __FILE__, __LINE__, 0 ); \
+ goto exception; \
+ } \
+ } while (false)
+
+
+/*______________________________________________________________________________________*/
+
+#define require_noerr_action(error, exception, action) \
+ do { \
+ OSStatus localError = error; \
+ if (localError == noErr) ; \
+ else { \
+ DEBUGASSERTMSG(COMPONENT_SIGNATURE, DEBUG_NO_OPTIONS, \
+ QuoteExceptionString(error) "== noErr", \
+ QuoteExceptionString(exception), \
+ nil, __FILE__, __LINE__, (void *)localError ); \
+ { action; } \
+ goto exception; \
+ } \
+ } while (false)
+
+/*______________________________________________________________________________________*/
+
+#define require_noerr_quiet(error, exception) \
+ do { \
+ if (error == noErr) ; \
+ else { \
+ goto exception; \
+ } \
+ } while (false)
+
+
+/*______________________________________________________________________________________*/
+
+#define require_noerr_action_quiet(error, exception, action) \
+ do { \
+ if (error == noErr) ; \
+ else { \
+ { action; } \
+ goto exception; \
+ } \
+ } while (false)
+
+
+/*______________________________________________________________________________________*/
+
+#define require_action(assertion, exception, action) \
+ do { \
+ if (assertion) ; \
+ else { \
+ DEBUGASSERTMSG(COMPONENT_SIGNATURE, DEBUG_NO_OPTIONS, \
+ QuoteExceptionString(assertion), \
+ QuoteExceptionString(exception), \
+ nil, __FILE__, __LINE__, 0); \
+ { action; } \
+ goto exception; \
+ } \
+ } while (false)
+
+/*______________________________________________________________________________________*/
+
+#define require_action_string(assertion, exception, action, cstring) \
+ do { \
+ if (assertion) ; \
+ else { \
+ DEBUGASSERTMSG(COMPONENT_SIGNATURE, DEBUG_NO_OPTIONS, \
+ cstring ": " QuoteExceptionString(assertion), \
+ QuoteExceptionString(exception), \
+ nil, __FILE__, __LINE__, 0); \
+ { action; } \
+ goto exception; \
+ } \
+ } while (false)
+
+/*______________________________________________________________________________________*/
+
+#define require_quiet(assertion, exception) \
+ do { \
+ if (assertion) ; \
+ else { \
+ goto exception; \
+ } \
+ } while (false)
+
+
+/*______________________________________________________________________________________*/
+
+#define require_action_quiet(assertion, exception, action) \
+ do { \
+ if (assertion) ; \
+ else { \
+ { action; } \
+ goto exception; \
+ } \
+ } while (false)
+
+
+
+#endif /* DEBUG_LEVEL_PRODUCTION */
+
+/* Define these in terms of the check() and require macros. In non-debug builds, the check calls
+ go away and the require macros are mostly checks and jumps.
+*/
+#define check_tasklevel0( ) check( ATTASKLEVEL0() )
+#define check_tasklevel0_string( string ) check_string( ATTASKLEVEL0(), string )
+
+#define require_tasklevel0( label ) require( ATTASKLEVEL0(), label )
+#define require_tasklevel0_string( label, string ) require_string( ATTASKLEVEL0(), label, string )
+#define require_tasklevel0_action( label, string, action ) require_action( ATTASKLEVEL0(), label, action )
+#define require_tasklevel0_action_string( label, string, action ) require_action_string( ATTASKLEVEL0(), label, action, string )
+
+
+/*______________________________________________________________________________________*/
+
+#if DEBUGLEVEL > DEBUG_LEVEL_PRODUCTION
+ #define verify(assertion) check(assertion)
+ #define verify_noerr(assertion) check_noerr( (assertion) )
+#else
+ #define verify(assertion) do { (void) (assertion); } while (0)
+ #define verify_noerr(assertion) verify(assertion)
+#endif
+
+
+
+/*______________________________________________________________________________________*/
+
+#define ncheck(assertion) check( !(assertion) )
+#define ncheck_string(assertion, cstring) check_string( !(assertion), cstring )
+#define nrequire(assertion, exception) require( !(assertion), exception )
+#define nrequire_action(assertion, exception, action) require_action( !(assertion), exception, action )
+#define nrequire_quiet(assertion, exception) require_quiet( !(assertion), exception )
+#define nrequire_action_quiet(assertion, exception, action) require_action_quiet( !(assertion), exception, action )
+#define nrequire_string(assertion, exception, string) require_string( !(assertion), exception, string )
+
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __DEBUGGING__ */
+
diff --git a/include/qt/DeskBus.h b/include/qt/DeskBus.h
new file mode 100644
index 000000000..7b6ab2ad1
--- /dev/null
+++ b/include/qt/DeskBus.h
@@ -0,0 +1,297 @@
+/*
+ File: DeskBus.h
+
+ Contains: Apple Desktop Bus (ADB) Interfaces.
+
+ Version: Technology: System 8.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1987-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __DESKBUS__
+#define __DESKBUS__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if TARGET_OS_MAC
+typedef SInt8 ADBAddress;
+#if CALL_NOT_IN_CARBON
+typedef CALLBACK_API( void , ADBCompletionProcPtr )(Ptr buffer, Ptr refCon, long command);
+/*
+ WARNING: ADBCompletionProcPtr uses register based parameters under classic 68k
+ and cannot be written in a high-level language without
+ the help of mixed mode or assembly glue.
+*/
+typedef CALLBACK_API( void , ADBDeviceDriverProcPtr )(SInt8 devAddress, SInt8 devType);
+/*
+ WARNING: ADBDeviceDriverProcPtr uses register based parameters under classic 68k
+ and cannot be written in a high-level language without
+ the help of mixed mode or assembly glue.
+*/
+/*
+ TempADBServiceRoutineUPP is needed because of circular definition of
+ ADBServiceRoutineProcPtr and ADBServiceRoutineUPP depending on each other.
+*/
+typedef REGISTER_UPP_TYPE(ADBServiceRoutineProcPtr) TempADBServiceRoutineUPP;
+typedef CALLBACK_API( void , ADBServiceRoutineProcPtr )(Ptr buffer, TempADBServiceRoutineUPP completionProc, Ptr refCon, long command);
+/*
+ WARNING: ADBServiceRoutineProcPtr uses register based parameters under classic 68k
+ and cannot be written in a high-level language without
+ the help of mixed mode or assembly glue.
+*/
+typedef CALLBACK_API( void , ADBInitProcPtr )(SInt8 callOrder);
+/*
+ WARNING: ADBInitProcPtr uses register based parameters under classic 68k
+ and cannot be written in a high-level language without
+ the help of mixed mode or assembly glue.
+*/
+typedef REGISTER_UPP_TYPE(ADBCompletionProcPtr) ADBCompletionUPP;
+typedef REGISTER_UPP_TYPE(ADBDeviceDriverProcPtr) ADBDeviceDriverUPP;
+typedef REGISTER_UPP_TYPE(ADBServiceRoutineProcPtr) ADBServiceRoutineUPP;
+typedef REGISTER_UPP_TYPE(ADBInitProcPtr) ADBInitUPP;
+
+struct ADBDataBlock {
+ SInt8 devType; /* original handler ID */
+ SInt8 origADBAddr; /* original ADB Address */
+ ADBServiceRoutineUPP dbServiceRtPtr; /* service routine pointer */
+ Ptr dbDataAreaAddr; /* this field is passed as the refCon parameter to the service routine */
+};
+typedef struct ADBDataBlock ADBDataBlock;
+
+typedef ADBDataBlock * ADBDBlkPtr;
+
+struct ADBSetInfoBlock {
+ ADBServiceRoutineUPP siService; /* service routine pointer */
+ Ptr siDataAreaAddr; /* this field is passed as the refCon parameter to the service routine */
+};
+typedef struct ADBSetInfoBlock ADBSetInfoBlock;
+
+typedef ADBSetInfoBlock * ADBSInfoPtr;
+/* ADBOpBlock is only used when calling ADBOp from 68k assembly code */
+
+struct ADBOpBlock {
+ Ptr dataBuffPtr; /* buffer: pointer to variable length data buffer */
+ ADBServiceRoutineUPP opServiceRtPtr; /* completionProc: completion routine pointer */
+ Ptr opDataAreaPtr; /* refCon: this field is passed as the refCon parameter to the completion routine */
+};
+typedef struct ADBOpBlock ADBOpBlock;
+
+typedef ADBOpBlock * ADBOpBPtr;
+#endif /* CALL_NOT_IN_CARBON */
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+ADBReInit (void) ONEWORDINLINE(0xA07B);
+
+/*
+ ADBOp has a different interface for 68k assembly than for everything else
+ for 68k assembly the interface is
+ #pragma parameter __D0 ADBOp(__A0,__D0)
+ OSErr ADBOp( ADBOpBlock * pb, short commandNum );
+*/
+/*
+ IMPORTANT NOTE:
+ "Inside Macintosh: Devices" documents the completion routine for ADBOp will be called with
+ four parameters using 68k register based calling conventions, specifically the completion routine
+ passed in should be of type ADBServiceRoutineProcPtr. However, when upp types were first added
+ to this interface file, the type ADBCompletionUPP was mistakenly used for the second parameter
+ to ADBOp. Since applications have shipped using completion routines of type ADBCompletionUPP,
+ the mistake cannot be corrected.
+ The only difference between ADBServiceRoutineUPP and ADBCompletionUPP is the former takes an extra
+ argument which is a pointer to itself, fortunately not needed for PowerPC code.
+ For compatibility with existing 68k code, when an ADBOp completion routine is called,
+ 68k register A1 will point to the completion routine, as documented in Inside Mac.
+*/
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+ADBOp (Ptr refCon,
+ ADBCompletionUPP compRout,
+ Ptr buffer,
+ short commandNum);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 CountADBs
+ #endif
+EXTERN_API( short )
+CountADBs (void) ONEWORDINLINE(0xA077);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 GetIndADB(__A0, __D0)
+ #endif
+EXTERN_API( ADBAddress )
+GetIndADB (ADBDataBlock * info,
+ short devTableIndex) ONEWORDINLINE(0xA078);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 GetADBInfo(__A0, __D0)
+ #endif
+EXTERN_API( OSErr )
+GetADBInfo (ADBDataBlock * info,
+ ADBAddress adbAddr) ONEWORDINLINE(0xA079);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SetADBInfo(__A0, __D0)
+ #endif
+EXTERN_API( OSErr )
+SetADBInfo (const ADBSetInfoBlock * info,
+ ADBAddress adbAddr) ONEWORDINLINE(0xA07A);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(ADBCompletionUPP)
+ NewADBCompletionUPP (ADBCompletionProcPtr userRoutine);
+
+ EXTERN_API(ADBDeviceDriverUPP)
+ NewADBDeviceDriverUPP (ADBDeviceDriverProcPtr userRoutine);
+
+ EXTERN_API(ADBServiceRoutineUPP)
+ NewADBServiceRoutineUPP (ADBServiceRoutineProcPtr userRoutine);
+
+ EXTERN_API(ADBInitUPP)
+ NewADBInitUPP (ADBInitProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeADBCompletionUPP (ADBCompletionUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeADBDeviceDriverUPP (ADBDeviceDriverUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeADBServiceRoutineUPP (ADBServiceRoutineUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeADBInitUPP (ADBInitUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeADBCompletionUPP (Ptr buffer,
+ Ptr refCon,
+ long command,
+ ADBCompletionUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeADBDeviceDriverUPP (SInt8 devAddress,
+ SInt8 devType,
+ ADBDeviceDriverUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeADBServiceRoutineUPP (Ptr buffer,
+ TempADBServiceRoutineUPP completionProc,
+ Ptr refCon,
+ long command,
+ ADBServiceRoutineUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeADBInitUPP (SInt8 callOrder,
+ ADBInitUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppADBCompletionProcInfo = 0x007B9802 }; /* register no_return_value Func(4_bytes:A0, 4_bytes:A2, 4_bytes:D0) */
+ enum { uppADBDeviceDriverProcInfo = 0x00050802 }; /* register no_return_value Func(1_byte:D0, 1_byte:D1) */
+ enum { uppADBServiceRoutineProcInfo = 0x0F779802 }; /* register no_return_value Func(4_bytes:A0, 4_bytes:A1, 4_bytes:A2, 4_bytes:D0) */
+ enum { uppADBInitProcInfo = 0x00000802 }; /* register no_return_value Func(1_byte:D0) */
+ #define NewADBCompletionUPP(userRoutine) (ADBCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppADBCompletionProcInfo, GetCurrentArchitecture())
+ #define NewADBDeviceDriverUPP(userRoutine) (ADBDeviceDriverUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppADBDeviceDriverProcInfo, GetCurrentArchitecture())
+ #define NewADBServiceRoutineUPP(userRoutine) (ADBServiceRoutineUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppADBServiceRoutineProcInfo, GetCurrentArchitecture())
+ #define NewADBInitUPP(userRoutine) (ADBInitUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppADBInitProcInfo, GetCurrentArchitecture())
+ #define DisposeADBCompletionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeADBDeviceDriverUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeADBServiceRoutineUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeADBInitUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ /* InvokeADBCompletionUPP can't be called from classic 68k without glue code */
+ #else
+ #define InvokeADBCompletionUPP(buffer, refCon, command, userUPP) CALL_THREE_PARAMETER_UPP((userUPP), uppADBCompletionProcInfo, (buffer), (refCon), (command))
+ #endif
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter InvokeADBDeviceDriverUPP(__D0, __D1, __A0)
+ void InvokeADBDeviceDriverUPP(SInt8 devAddress, SInt8 devType, ADBDeviceDriverUPP userUPP) = 0x4E90;
+ #else
+ #define InvokeADBDeviceDriverUPP(devAddress, devType, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppADBDeviceDriverProcInfo, (devAddress), (devType))
+ #endif
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ /* InvokeADBServiceRoutineUPP can't be called from classic 68k without glue code */
+ #else
+ #define InvokeADBServiceRoutineUPP(buffer, completionProc, refCon, command, userUPP) CALL_FOUR_PARAMETER_UPP((userUPP), uppADBServiceRoutineProcInfo, (buffer), (completionProc), (refCon), (command))
+ #endif
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter InvokeADBInitUPP(__D0, __A0)
+ void InvokeADBInitUPP(SInt8 callOrder, ADBInitUPP userUPP) = 0x4E90;
+ #else
+ #define InvokeADBInitUPP(callOrder, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppADBInitProcInfo, (callOrder))
+ #endif
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewADBCompletionProc(userRoutine) NewADBCompletionUPP(userRoutine)
+#define NewADBDeviceDriverProc(userRoutine) NewADBDeviceDriverUPP(userRoutine)
+#define NewADBServiceRoutineProc(userRoutine) NewADBServiceRoutineUPP(userRoutine)
+#define NewADBInitProc(userRoutine) NewADBInitUPP(userRoutine)
+#define CallADBCompletionProc(userRoutine, buffer, refCon, command) InvokeADBCompletionUPP(buffer, refCon, command, userRoutine)
+#define CallADBDeviceDriverProc(userRoutine, devAddress, devType) InvokeADBDeviceDriverUPP(devAddress, devType, userRoutine)
+#define CallADBServiceRoutineProc(userRoutine, buffer, completionProc, refCon, command) InvokeADBServiceRoutineUPP(buffer, completionProc, refCon, command, userRoutine)
+#define CallADBInitProc(userRoutine, callOrder) InvokeADBInitUPP(callOrder, userRoutine)
+#endif /* TARGET_OS_MAC */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __DESKBUS__ */
+
diff --git a/include/qt/DeviceControl.h b/include/qt/DeviceControl.h
new file mode 100644
index 000000000..aeb555e36
--- /dev/null
+++ b/include/qt/DeviceControl.h
@@ -0,0 +1,95 @@
+/*
+ File: DeviceControl.h
+
+ Contains: Component API for doing AVC transactions.
+
+ Version: Technology: xxx put version here xxx
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1999-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __DEVICECONTROL__
+#define __DEVICECONTROL__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __COMPONENTS__
+#include "Components.h"
+#endif
+
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+typedef CALLBACK_API_C( UInt32 , DCResponseHandler )(UInt32 fwCommandObjectID, Ptr responseBuffer, UInt32 responseLength);
+
+struct DVCTransactionParams {
+ Ptr commandBufferPtr;
+ UInt32 commandLength;
+ Ptr responseBufferPtr;
+ UInt32 responseBufferSize;
+ DCResponseHandler * responseHandler;
+};
+typedef struct DVCTransactionParams DVCTransactionParams;
+#if CALL_NOT_IN_CARBON
+EXTERN_API( ComponentResult )
+DeviceControlDoAVCTransaction (ComponentInstance instance,
+ DVCTransactionParams * params) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0001, 0x7000, 0xA82A);
+
+
+
+/* selectors for component calls */
+enum {
+ kDeviceControlDoAVCTransactionSelect = 0x0001
+};
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __DEVICECONTROL__ */
+
diff --git a/include/qt/Devices.h b/include/qt/Devices.h
new file mode 100644
index 000000000..2a76739b7
--- /dev/null
+++ b/include/qt/Devices.h
@@ -0,0 +1,857 @@
+/*
+ File: Devices.h
+
+ Contains: Device Manager Interfaces.
+
+ Version: Technology: Mac OS 8
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __DEVICES__
+#define __DEVICES__
+
+#ifndef __OSUTILS__
+#include "OSUtils.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#ifndef __NAMEREGISTRY__
+#include "NameRegistry.h"
+#endif
+
+#ifndef __CODEFRAGMENTS__
+#include "CodeFragments.h"
+#endif
+
+#ifndef __DRIVERFAMILYMATCHING__
+#include "DriverFamilyMatching.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* Values of the 'message' parameter to a Chooser device package */
+enum {
+ chooserInitMsg = 11, /* the user selected this device package */
+ newSelMsg = 12, /* the user made new device selections */
+ fillListMsg = 13, /* fill the device list with choices */
+ getSelMsg = 14, /* mark one or more choices as selected */
+ selectMsg = 15, /* the user made a selection */
+ deselectMsg = 16, /* the user canceled a selection */
+ terminateMsg = 17, /* allows device package to clean up */
+ buttonMsg = 19 /* the user selected a button */
+};
+
+
+/* Values of the 'caller' parameter to a Chooser device package */
+enum {
+ chooserID = 1
+};
+
+
+/* Values of the 'message' parameter to a Monitor 'mntr' */
+enum {
+ initMsg = 1, /*initialization*/
+ okMsg = 2, /*user clicked OK button*/
+ cancelMsg = 3, /*user clicked Cancel button*/
+ hitMsg = 4, /*user clicked control in Options dialog*/
+ nulMsg = 5, /*periodic event*/
+ updateMsg = 6, /*update event*/
+ activateMsg = 7, /*not used*/
+ deactivateMsg = 8, /*not used*/
+ keyEvtMsg = 9, /*keyboard event*/
+ superMsg = 10, /*show superuser controls*/
+ normalMsg = 11, /*show only normal controls*/
+ startupMsg = 12 /*code has been loaded*/
+};
+
+
+/* control codes for DeskAccessories */
+enum {
+ goodbye = -1, /* heap being reinitialized */
+ killCode = 1, /* KillIO requested */
+ accEvent = 64, /* handle an event */
+ accRun = 65, /* time for periodic action */
+ accCursor = 66, /* change cursor shape */
+ accMenu = 67, /* handle menu item */
+ accUndo = 68, /* handle undo command */
+ accCut = 70, /* handle cut command */
+ accCopy = 71, /* handle copy command */
+ accPaste = 72, /* handle paste command */
+ accClear = 73 /* handle clear command */
+};
+
+/* Control/Status Call Codes */
+enum {
+ drvStsCode = 8, /* status call code for drive status */
+ ejectCode = 7, /* control call eject code */
+ tgBuffCode = 8 /* set tag buffer code */
+};
+
+/* miscellaneous Device Manager constants */
+enum {
+ ioInProgress = 1, /* predefined value of ioResult while I/O is pending */
+ aRdCmd = 2, /* low byte of ioTrap for Read calls */
+ aWrCmd = 3, /* low byte of ioTrap for Write calls */
+ asyncTrpBit = 10, /* trap word modifier */
+ noQueueBit = 9 /* trap word modifier */
+};
+
+/* flags used in the driver header and device control entry */
+enum {
+ dReadEnable = 0, /* set if driver responds to read requests */
+ dWritEnable = 1, /* set if driver responds to write requests */
+ dCtlEnable = 2, /* set if driver responds to control requests */
+ dStatEnable = 3, /* set if driver responds to status requests */
+ dNeedGoodBye = 4, /* set if driver needs time for performing periodic tasks */
+ dNeedTime = 5, /* set if driver needs time for performing periodic tasks */
+ dNeedLock = 6 /* set if driver must be locked in memory as soon as it is opened */
+};
+
+enum {
+ dNeedLockMask = 0x4000, /* set if driver must be locked in memory as soon as it is opened */
+ dNeedTimeMask = 0x2000, /* set if driver needs time for performing periodic tasks */
+ dNeedGoodByeMask = 0x1000, /* set if driver needs to be called before the application heap is initialized */
+ dStatEnableMask = 0x0800, /* set if driver responds to status requests */
+ dCtlEnableMask = 0x0400, /* set if driver responds to control requests */
+ dWritEnableMask = 0x0200, /* set if driver responds to write requests */
+ dReadEnableMask = 0x0100 /* set if driver responds to read requests */
+};
+
+
+/* run-time flags used in the device control entry */
+enum {
+ dVMImmuneBit = 0, /* driver does not need VM protection */
+ dOpened = 5, /* driver is open */
+ dRAMBased = 6, /* dCtlDriver is a handle (1) or pointer (0) */
+ drvrActive = 7 /* driver is currently processing a request */
+};
+
+enum {
+ dVMImmuneMask = 0x0001, /* driver does not need VM protection */
+ dOpenedMask = 0x0020, /* driver is open */
+ dRAMBasedMask = 0x0040, /* dCtlDriver is a handle (1) or pointer (0) */
+ drvrActiveMask = 0x0080 /* driver is currently processing a request */
+};
+
+
+
+struct DRVRHeader {
+ short drvrFlags;
+ short drvrDelay;
+ short drvrEMask;
+ short drvrMenu;
+ short drvrOpen;
+ short drvrPrime;
+ short drvrCtl;
+ short drvrStatus;
+ short drvrClose;
+ unsigned char drvrName[1];
+};
+typedef struct DRVRHeader DRVRHeader;
+typedef DRVRHeader * DRVRHeaderPtr;
+typedef DRVRHeaderPtr * DRVRHeaderHandle;
+
+struct DCtlEntry {
+ Ptr dCtlDriver;
+ volatile short dCtlFlags;
+ QHdr dCtlQHdr;
+ volatile long dCtlPosition;
+ Handle dCtlStorage;
+ short dCtlRefNum;
+ long dCtlCurTicks;
+ GrafPtr dCtlWindow;
+ short dCtlDelay;
+ short dCtlEMask;
+ short dCtlMenu;
+};
+typedef struct DCtlEntry DCtlEntry;
+
+typedef DCtlEntry * DCtlPtr;
+typedef DCtlPtr * DCtlHandle;
+
+struct AuxDCE {
+ Ptr dCtlDriver;
+ volatile short dCtlFlags;
+ QHdr dCtlQHdr;
+ long dCtlPosition;
+ Handle dCtlStorage;
+ short dCtlRefNum;
+ long dCtlCurTicks;
+ GrafPtr dCtlWindow;
+ short dCtlDelay;
+ short dCtlEMask;
+ short dCtlMenu;
+ SInt8 dCtlSlot;
+ SInt8 dCtlSlotId;
+ long dCtlDevBase;
+ Ptr dCtlOwner;
+ SInt8 dCtlExtDev;
+ SInt8 fillByte;
+ UInt32 dCtlNodeID;
+};
+typedef struct AuxDCE AuxDCE;
+typedef AuxDCE * AuxDCEPtr;
+typedef AuxDCEPtr * AuxDCEHandle;
+/* The NDRV Driver IO Entry Point and Commands */
+
+typedef UInt16 UnitNumber;
+typedef UInt32 DriverOpenCount;
+typedef SInt16 DriverRefNum;
+typedef SInt16 DriverFlags;
+typedef UInt32 IOCommandCode;
+enum {
+ kOpenCommand = 0,
+ kCloseCommand = 1,
+ kReadCommand = 2,
+ kWriteCommand = 3,
+ kControlCommand = 4,
+ kStatusCommand = 5,
+ kKillIOCommand = 6,
+ kInitializeCommand = 7, /* init driver and device*/
+ kFinalizeCommand = 8, /* shutdown driver and device*/
+ kReplaceCommand = 9, /* replace an old driver*/
+ kSupersededCommand = 10, /* prepare to be replaced by a new driver*/
+ kSuspendCommand = 11, /* prepare driver to go to sleep*/
+ kResumeCommand = 12 /* wake up sleeping driver*/
+};
+
+typedef struct OpaqueAddressSpaceID* AddressSpaceID;
+typedef struct OpaqueIOCommandID* IOCommandID;
+typedef UInt32 IOCommandKind;
+enum {
+ kSynchronousIOCommandKind = 0x00000001,
+ kAsynchronousIOCommandKind = 0x00000002,
+ kImmediateIOCommandKind = 0x00000004
+};
+
+
+struct DriverInitInfo {
+ DriverRefNum refNum;
+ RegEntryID deviceEntry;
+};
+typedef struct DriverInitInfo DriverInitInfo;
+typedef DriverInitInfo * DriverInitInfoPtr;
+
+typedef DriverInitInfo DriverReplaceInfo;
+typedef DriverInitInfo * DriverReplaceInfoPtr;
+
+struct DriverFinalInfo {
+ DriverRefNum refNum;
+ RegEntryID deviceEntry;
+};
+typedef struct DriverFinalInfo DriverFinalInfo;
+typedef DriverFinalInfo * DriverFinalInfoPtr;
+
+typedef DriverFinalInfo DriverSupersededInfo;
+typedef DriverFinalInfo * DriverSupersededInfoPtr;
+
+/* Contents are command specific*/
+
+
+union IOCommandContents {
+ ParmBlkPtr pb;
+ DriverInitInfoPtr initialInfo;
+ DriverFinalInfoPtr finalInfo;
+ DriverReplaceInfoPtr replaceInfo;
+ DriverSupersededInfoPtr supersededInfo;
+};
+typedef union IOCommandContents IOCommandContents;
+typedef CALLBACK_API_C( OSErr , DriverEntryPointPtr )(AddressSpaceID SpaceID, IOCommandID CommandID, IOCommandContents Contents, IOCommandCode Code, IOCommandKind Kind);
+/* Record to describe a file-based driver candidate */
+
+struct FileBasedDriverRecord {
+ FSSpec theSpec; /* file specification*/
+ MacDriverType theType; /* nameInfoStr + version number*/
+ Boolean compatibleProp; /* true if matched using a compatible name*/
+ UInt8 pad[3]; /* alignment*/
+};
+typedef struct FileBasedDriverRecord FileBasedDriverRecord;
+typedef FileBasedDriverRecord * FileBasedDriverRecordPtr;
+/* Detailed Record to describe a file-based driver candidate. Includes fragment name */
+
+struct FileBasedDriverDetailed {
+ FileBasedDriverRecord fileBasedDriver;
+ Str63 fragName;
+};
+typedef struct FileBasedDriverDetailed FileBasedDriverDetailed;
+typedef FileBasedDriverDetailed * FileBasedDriverDetailedPtr;
+/* Driver Loader API */
+#define DECLARE_DRIVERDESCRIPTION(N_ADDITIONAL_SERVICES)\
+ struct {\
+ DriverDescription fixed;\
+ DriverServiceInfo additional_service[N_ADDITIONAL_SERVICES-1];\
+ };
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( SInt16 )
+HigherDriverVersion (const NumVersion * driverVersion1,
+ const NumVersion * driverVersion2);
+
+EXTERN_API_C( OSErr )
+VerifyFragmentAsDriver (CFragConnectionID fragmentConnID,
+ DriverEntryPointPtr * fragmentMain,
+ DriverDescriptionPtr * driverDesc);
+
+EXTERN_API_C( OSErr )
+GetDriverMemoryFragment (Ptr memAddr,
+ long length,
+ ConstStr63Param fragName,
+ CFragConnectionID * fragmentConnID,
+ DriverEntryPointPtr * fragmentMain,
+ DriverDescriptionPtr * driverDesc);
+
+EXTERN_API_C( OSErr )
+GetDriverDiskFragment (FSSpecPtr fragmentSpec,
+ CFragConnectionID * fragmentConnID,
+ DriverEntryPointPtr * fragmentMain,
+ DriverDescriptionPtr * driverDesc);
+
+EXTERN_API_C( OSErr )
+GetNamedDriverDiskFragment (FSSpecPtr fragmentSpec,
+ ConstStr63Param fragName,
+ CFragConnectionID * fragmentConnID,
+ DriverEntryPointPtr * fragmentMain,
+ DriverDescriptionPtr * driverDesc);
+
+EXTERN_API_C( OSErr )
+InstallDriverFromFragment (CFragConnectionID fragmentConnID,
+ RegEntryID * device,
+ UnitNumber beginningUnit,
+ UnitNumber endingUnit,
+ DriverRefNum * refNum);
+
+EXTERN_API_C( OSErr )
+InstallDriverFromFile (FSSpecPtr fragmentSpec,
+ RegEntryID * device,
+ UnitNumber beginningUnit,
+ UnitNumber endingUnit,
+ DriverRefNum * refNum);
+
+EXTERN_API_C( OSErr )
+InstallDriverFromMemory (Ptr memory,
+ long length,
+ ConstStr63Param fragName,
+ RegEntryID * device,
+ UnitNumber beginningUnit,
+ UnitNumber endingUnit,
+ DriverRefNum * refNum);
+
+EXTERN_API_C( OSErr )
+InstallDriverFromResource (SInt16 theRsrcID,
+ ConstStr255Param theRsrcName,
+ RegEntryIDPtr theDevice,
+ UnitNumber theBeginningUnit,
+ UnitNumber theEndingUnit,
+ DriverRefNum * theRefNum);
+
+EXTERN_API_C( OSErr )
+InstallDriverFromDisk (Ptr theDriverName,
+ RegEntryID * theDevice,
+ UnitNumber theBeginningUnit,
+ UnitNumber theEndingUnit,
+ DriverRefNum * theRefNum);
+
+EXTERN_API_C( OSErr )
+FindDriversForDevice (RegEntryID * device,
+ FSSpec * fragmentSpec,
+ DriverDescription * fileDriverDesc,
+ Ptr * memAddr,
+ long * length,
+ StringPtr fragName,
+ DriverDescription * memDriverDesc);
+
+EXTERN_API_C( OSErr )
+FindDriverForDeviceFromFile (RegEntryID * device,
+ FSSpec * fragmentSpec,
+ DriverDescription * driverDesc,
+ StringPtr fragName);
+
+EXTERN_API_C( OSErr )
+FindDriverCandidates (RegEntryID * deviceID,
+ Ptr * propBasedDriver,
+ RegPropertyValueSize * propBasedDriverSize,
+ StringPtr deviceName,
+ MacDriverType * propBasedDriverType,
+ Boolean * gotPropBasedDriver,
+ FileBasedDriverRecordPtr fileBasedDrivers,
+ ItemCount * nFileBasedDrivers);
+
+EXTERN_API_C( OSErr )
+FindDriverCandidatesDetailed (RegEntryIDPtr deviceID,
+ Ptr * propBasedDriver,
+ RegPropertyValueSize * propBasedDriverSize,
+ StringPtr deviceName,
+ MacDriverType * propBasedDriverType,
+ Boolean * gotPropBasedDriver,
+ FileBasedDriverDetailedPtr fileBasedDrivers,
+ ItemCount * nFileBasedDrivers);
+
+EXTERN_API_C( OSErr )
+ScanDriverCandidates (RegEntryID * deviceID,
+ FileBasedDriverRecordPtr fileBasedDrivers,
+ ItemCount nFileBasedDrivers,
+ FileBasedDriverRecordPtr matchingDrivers,
+ ItemCount * nMatchingDrivers);
+
+EXTERN_API_C( OSErr )
+ScanDriverCandidatesDetailed (RegEntryID * deviceID,
+ FileBasedDriverDetailedPtr fileBasedDrivers,
+ ItemCount nFileBasedDrivers,
+ FileBasedDriverDetailedPtr matchingDrivers,
+ ItemCount * nMatchingDrivers);
+
+EXTERN_API_C( SInt16 )
+CompareFileCandToPropCand (RegEntryID * device,
+ StringPtr deviceName,
+ DriverTypePtr propBasedCandidate,
+ FileBasedDriverRecordPtr fileBasedCandidate);
+
+EXTERN_API_C( void )
+GetCompatibleProperty (RegEntryID * device,
+ StringPtr * compatibleNames,
+ ItemCount * nCompatibleNames);
+
+EXTERN_API_C( Boolean )
+CompatibleDriverNames (StringPtr nameInfoStr,
+ StringPtr compatibleNames,
+ ItemCount nCompatibleNames,
+ long * nameCount);
+
+EXTERN_API_C( OSErr )
+GetDriverForDevice (RegEntryID * device,
+ CFragConnectionID * fragmentConnID,
+ DriverEntryPointPtr * fragmentMain,
+ DriverDescriptionPtr * driverDesc);
+
+EXTERN_API_C( OSErr )
+InstallDriverForDevice (RegEntryID * device,
+ UnitNumber beginningUnit,
+ UnitNumber endingUnit,
+ DriverRefNum * refNum);
+
+EXTERN_API_C( OSErr )
+GetDriverInformation (DriverRefNum refNum,
+ UnitNumber * unitNum,
+ DriverFlags * flags,
+ DriverOpenCount * count,
+ StringPtr name,
+ RegEntryID * device,
+ CFragSystem7Locator * driverLoadLocation,
+ CFragConnectionID * fragmentConnID,
+ DriverEntryPointPtr * fragmentMain,
+ DriverDescription * driverDesc);
+
+EXTERN_API_C( OSErr )
+GetDriverDescription (LogicalAddress fragmentPtr,
+ DriverDescriptionPtr * theDriverDesc);
+
+EXTERN_API_C( OSStatus )
+GetNamedDriverDescFromFSSpec (FSSpecPtr fragmentSpec,
+ StringPtr fragName,
+ DriverDescriptionPtr * driverDesc);
+
+EXTERN_API_C( OSErr )
+SetDriverClosureMemory (CFragConnectionID fragmentConnID,
+ Boolean holdDriverMemory);
+
+EXTERN_API_C( OSErr )
+ReplaceDriverWithFragment (DriverRefNum theRefNum,
+ CFragConnectionID fragmentConnID);
+
+EXTERN_API_C( OSErr )
+OpenInstalledDriver (DriverRefNum refNum,
+ SInt8 ioPermission);
+
+EXTERN_API_C( OSErr )
+RenameDriver (DriverRefNum refNum,
+ StringPtr newDriverName);
+
+EXTERN_API_C( OSErr )
+RemoveDriver (DriverRefNum refNum,
+ Boolean immediate);
+
+EXTERN_API_C( OSErr )
+LookupDrivers (UnitNumber beginningUnit,
+ UnitNumber endingUnit,
+ Boolean emptyUnits,
+ ItemCount * returnedRefNums,
+ DriverRefNum * refNums);
+
+EXTERN_API_C( UnitNumber )
+HighestUnitNumber (void);
+
+EXTERN_API_C( OSErr )
+DriverGestaltOn (DriverRefNum refNum);
+
+EXTERN_API_C( OSErr )
+DriverGestaltOff (DriverRefNum refNum);
+
+EXTERN_API_C( Boolean )
+DriverGestaltIsOn (DriverFlags flags);
+
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBOpenSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBOpenSync (ParmBlkPtr paramBlock) ONEWORDINLINE(0xA000);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBOpenAsync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBOpenAsync (ParmBlkPtr paramBlock) ONEWORDINLINE(0xA400);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBOpenImmed(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBOpenImmed (ParmBlkPtr paramBlock) ONEWORDINLINE(0xA200);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBCloseSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBCloseSync (ParmBlkPtr paramBlock) ONEWORDINLINE(0xA001);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBCloseAsync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBCloseAsync (ParmBlkPtr paramBlock) ONEWORDINLINE(0xA401);
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBCloseImmed(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBCloseImmed (ParmBlkPtr paramBlock) ONEWORDINLINE(0xA201);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBReadSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBReadSync (ParmBlkPtr paramBlock) ONEWORDINLINE(0xA002);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBReadAsync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBReadAsync (ParmBlkPtr paramBlock) ONEWORDINLINE(0xA402);
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBReadImmed(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBReadImmed (ParmBlkPtr paramBlock) ONEWORDINLINE(0xA202);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBWriteSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBWriteSync (ParmBlkPtr paramBlock) ONEWORDINLINE(0xA003);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBWriteAsync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBWriteAsync (ParmBlkPtr paramBlock) ONEWORDINLINE(0xA403);
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBWriteImmed(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBWriteImmed (ParmBlkPtr paramBlock) ONEWORDINLINE(0xA203);
+
+/*
+ PBWaitIOComplete is a friendly way for applications to monitor
+ a pending asynchronous I/O operation in power-managed and
+ preemptive multitasking systems.
+ */
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( OSErr )
+PBWaitIOComplete (ParmBlkPtr paramBlock,
+ Duration timeout);
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+AddDrive (short drvrRefNum,
+ short drvNum,
+ DrvQElPtr qEl);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( QHdrPtr )
+GetDrvQHdr (void) THREEWORDINLINE(0x2EBC, 0x0000, 0x0308);
+
+
+EXTERN_API( DCtlHandle )
+GetDCtlEntry (short refNum);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+/*
+ SetChooserAlert used to simply set a bit in a low-mem global
+ to tell the Chooser not to display its warning message when
+ the printer is changed. However, under MultiFinder and System 7,
+ this low-mem is swapped out when a layer change occurs, and the
+ Chooser never sees the change. It is obsolete, and completely
+ unsupported on the PowerPC. 68K apps can still call it if they
+ wish.
+
+ pascal Boolean SetChooserAlert(Boolean f);
+
+*/
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 DriverInstall(__A0, __D0)
+ #endif
+EXTERN_API( OSErr )
+DriverInstall (DRVRHeaderPtr drvrPtr,
+ short refNum) ONEWORDINLINE(0xA03D);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 DriverInstallReserveMem(__A0, __D0)
+ #endif
+EXTERN_API( OSErr )
+DriverInstallReserveMem (DRVRHeaderPtr drvrPtr,
+ short refNum) ONEWORDINLINE(0xA43D);
+
+/*
+ Note: DrvrInstall() is no longer supported, becuase it never really worked anyways.
+ There will soon be a DriverInstall() which does the right thing.
+
+ DrvrRemove has been renamed to DriverRemove. But, InterfaceLib for PowerPC
+ still exports DrvrRemove, so a macro is used to map the new name to old.
+
+*/
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 DrvrRemove(__D0)
+ #endif
+EXTERN_API( OSErr )
+DrvrRemove (short refNum) ONEWORDINLINE(0xA03E);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#define DriverRemove(refNum) DrvrRemove(refNum)
+
+#if CALL_NOT_IN_CARBON
+#if TARGET_OS_MAC
+ #define MacOpenDriver OpenDriver
+#endif
+EXTERN_API( OSErr )
+MacOpenDriver (ConstStr255Param name,
+ short * drvrRefNum);
+
+#if TARGET_OS_MAC
+ #define MacCloseDriver CloseDriver
+#endif
+EXTERN_API( OSErr )
+MacCloseDriver (short refNum);
+
+EXTERN_API( OSErr )
+Control (short refNum,
+ short csCode,
+ const void * csParamPtr);
+
+EXTERN_API( OSErr )
+Status (short refNum,
+ short csCode,
+ void * csParamPtr);
+
+EXTERN_API( OSErr )
+KillIO (short refNum);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 Fetch(__A1)
+ #endif
+EXTERN_API( long )
+Fetch (DCtlPtr dce) THREEWORDINLINE(0x2078, 0x08F4, 0x4E90);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 Stash(__A1, __D0)
+ #endif
+EXTERN_API( long )
+Stash (DCtlPtr dce,
+ char data) THREEWORDINLINE(0x2078, 0x08F8, 0x4E90);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter IODone(__A1, __D0)
+ #endif
+EXTERN_API( void )
+IODone (DCtlPtr dce,
+ OSErr ioResult) THREEWORDINLINE(0x2078, 0x08FC, 0x4E90);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBControlSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBControlSync (ParmBlkPtr paramBlock) ONEWORDINLINE(0xA004);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBControlAsync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBControlAsync (ParmBlkPtr paramBlock) ONEWORDINLINE(0xA404);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBControlImmed(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBControlImmed (ParmBlkPtr paramBlock) ONEWORDINLINE(0xA204);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBStatusSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBStatusSync (ParmBlkPtr paramBlock) ONEWORDINLINE(0xA005);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBStatusAsync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBStatusAsync (ParmBlkPtr paramBlock) ONEWORDINLINE(0xA405);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBStatusImmed(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBStatusImmed (ParmBlkPtr paramBlock) ONEWORDINLINE(0xA205);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBKillIOSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBKillIOSync (ParmBlkPtr paramBlock) ONEWORDINLINE(0xA006);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBKillIOAsync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBKillIOAsync (ParmBlkPtr paramBlock) ONEWORDINLINE(0xA406);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBKillIOImmed(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBKillIOImmed (ParmBlkPtr paramBlock) ONEWORDINLINE(0xA206);
+
+EXTERN_API( short )
+OpenDeskAcc (ConstStr255Param deskAccName) ONEWORDINLINE(0xA9B6);
+
+EXTERN_API( void )
+CloseDeskAcc (short refNum) ONEWORDINLINE(0xA9B7);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( short )
+opendeskacc (const char * deskAccName);
+
+EXTERN_API_C( OSErr )
+opendriver (const char * driverName,
+ short * refNum);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+/*
+ The PBxxx() routines are obsolete.
+
+ Use the PBxxxSync(), PBxxxAsync(), or PBxxxImmed version instead.
+*/
+#define PBControl(pb, async) ((async) ? PBControlAsync(pb) : PBControlSync(pb))
+#define PBStatus(pb, async) ((async) ? PBStatusAsync(pb) : PBStatusSync(pb))
+#define PBKillIO(pb, async) ((async) ? PBKillIOAsync(pb) : PBKillIOSync(pb))
+
+#define PBOpen(pb, async) ((async) ? PBOpenAsync(pb) : PBOpenSync(pb))
+#define PBClose(pb, async) ((async) ? PBCloseAsync(pb) : PBCloseSync(pb))
+#define PBRead(pb, async) ((async) ? PBReadAsync(pb) : PBReadSync(pb))
+#define PBWrite(pb, async) ((async) ? PBWriteAsync(pb) : PBWriteSync(pb))
+
+
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __DEVICES__ */
+
diff --git a/include/qt/Dialogs.h b/include/qt/Dialogs.h
new file mode 100644
index 000000000..c8e505c77
--- /dev/null
+++ b/include/qt/Dialogs.h
@@ -0,0 +1,872 @@
+/*
+ File: Dialogs.h
+
+ Contains: Dialog Manager interfaces.
+
+ Version: Technology: Mac OS 9
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __DIALOGS__
+#define __DIALOGS__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+#ifndef __EVENTS__
+#include "Events.h"
+#endif
+
+#ifndef __MACWINDOWS__
+#include "MacWindows.h"
+#endif
+
+#ifndef __TEXTEDIT__
+#include "TextEdit.h"
+#endif
+
+#ifndef __CONTROLS__
+#include "Controls.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ /* new, more standard names for dialog item types*/
+ kControlDialogItem = 4,
+ kButtonDialogItem = kControlDialogItem | 0,
+ kCheckBoxDialogItem = kControlDialogItem | 1,
+ kRadioButtonDialogItem = kControlDialogItem | 2,
+ kResourceControlDialogItem = kControlDialogItem | 3,
+ kStaticTextDialogItem = 8,
+ kEditTextDialogItem = 16,
+ kIconDialogItem = 32,
+ kPictureDialogItem = 64,
+ kUserDialogItem = 0,
+ kItemDisableBit = 128
+};
+
+enum {
+ /* old names for dialog item types*/
+ ctrlItem = 4,
+ btnCtrl = 0,
+ chkCtrl = 1,
+ radCtrl = 2,
+ resCtrl = 3,
+ statText = 8,
+ editText = 16,
+ iconItem = 32,
+ picItem = 64,
+ userItem = 0,
+ itemDisable = 128
+};
+
+enum {
+ /* standard dialog item numbers*/
+ kStdOkItemIndex = 1,
+ kStdCancelItemIndex = 2, /* old names*/
+ ok = kStdOkItemIndex,
+ cancel = kStdCancelItemIndex
+};
+
+enum {
+ /* standard icon resource id's */
+ kStopIcon = 0,
+ kNoteIcon = 1,
+ kCautionIcon = 2, /* old names*/
+ stopIcon = kStopIcon,
+ noteIcon = kNoteIcon,
+ cautionIcon = kCautionIcon
+};
+
+
+
+
+#if OLDROUTINENAMES
+/*
+ These constants lived briefly on ETO 16. They suggest
+ that there is only one index you can use for the OK
+ item, which is not true. You can put the ok item
+ anywhere you want in the DITL.
+*/
+enum {
+ kOkItemIndex = 1,
+ kCancelItemIndex = 2
+};
+
+#endif /* OLDROUTINENAMES */
+
+/* Dialog Item List Manipulation Constants */
+typedef SInt16 DITLMethod;
+enum {
+ overlayDITL = 0,
+ appendDITLRight = 1,
+ appendDITLBottom = 2
+};
+
+typedef SInt16 StageList;
+/* DialogRef is obsolete. Use DialogPtr instead.*/
+typedef DialogPtr DialogRef;
+#if !OPAQUE_TOOLBOX_STRUCTS
+
+struct DialogRecord {
+ WindowRecord window;
+ Handle items;
+ TEHandle textH;
+ SInt16 editField;
+ SInt16 editOpen;
+ SInt16 aDefItem;
+};
+typedef struct DialogRecord DialogRecord;
+
+typedef DialogRecord * DialogPeek;
+#endif /* !OPAQUE_TOOLBOX_STRUCTS */
+
+
+struct DialogTemplate {
+ Rect boundsRect;
+ SInt16 procID;
+ Boolean visible;
+ Boolean filler1;
+ Boolean goAwayFlag;
+ Boolean filler2;
+ SInt32 refCon;
+ SInt16 itemsID;
+ Str255 title;
+};
+typedef struct DialogTemplate DialogTemplate;
+
+typedef DialogTemplate * DialogTPtr;
+typedef DialogTPtr * DialogTHndl;
+
+struct AlertTemplate {
+ Rect boundsRect;
+ SInt16 itemsID;
+ StageList stages;
+};
+typedef struct AlertTemplate AlertTemplate;
+
+typedef AlertTemplate * AlertTPtr;
+typedef AlertTPtr * AlertTHndl;
+/* new type abstractions for the dialog manager */
+typedef SInt16 DialogItemIndexZeroBased;
+typedef SInt16 DialogItemIndex;
+typedef SInt16 DialogItemType;
+/* dialog manager callbacks */
+typedef CALLBACK_API( void , SoundProcPtr )(SInt16 soundNumber);
+typedef CALLBACK_API( Boolean , ModalFilterProcPtr )(DialogPtr theDialog, EventRecord *theEvent, DialogItemIndex *itemHit);
+typedef CALLBACK_API( void , UserItemProcPtr )(DialogPtr theDialog, DialogItemIndex itemNo);
+typedef STACK_UPP_TYPE(SoundProcPtr) SoundUPP;
+typedef STACK_UPP_TYPE(ModalFilterProcPtr) ModalFilterUPP;
+typedef STACK_UPP_TYPE(UserItemProcPtr) UserItemUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(SoundUPP)
+ NewSoundUPP (SoundProcPtr userRoutine);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ EXTERN_API(ModalFilterUPP)
+ NewModalFilterUPP (ModalFilterProcPtr userRoutine);
+
+ EXTERN_API(UserItemUPP)
+ NewUserItemUPP (UserItemProcPtr userRoutine);
+
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(void)
+ DisposeSoundUPP (SoundUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ EXTERN_API(void)
+ DisposeModalFilterUPP (ModalFilterUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeUserItemUPP (UserItemUPP userUPP);
+
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(void)
+ InvokeSoundUPP (SInt16 soundNumber,
+ SoundUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ EXTERN_API(Boolean)
+ InvokeModalFilterUPP (DialogPtr theDialog,
+ EventRecord * theEvent,
+ DialogItemIndex * itemHit,
+ ModalFilterUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeUserItemUPP (DialogPtr theDialog,
+ DialogItemIndex itemNo,
+ UserItemUPP userUPP);
+
+#else
+ enum { uppSoundProcInfo = 0x00000080 }; /* pascal no_return_value Func(2_bytes) */
+ enum { uppModalFilterProcInfo = 0x00000FD0 }; /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppUserItemProcInfo = 0x000002C0 }; /* pascal no_return_value Func(4_bytes, 2_bytes) */
+ #define NewSoundUPP(userRoutine) (SoundUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSoundProcInfo, GetCurrentArchitecture())
+ #define NewModalFilterUPP(userRoutine) (ModalFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppModalFilterProcInfo, GetCurrentArchitecture())
+ #define NewUserItemUPP(userRoutine) (UserItemUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppUserItemProcInfo, GetCurrentArchitecture())
+ #define DisposeSoundUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeModalFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeUserItemUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeSoundUPP(soundNumber, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppSoundProcInfo, (soundNumber))
+ #define InvokeModalFilterUPP(theDialog, theEvent, itemHit, userUPP) (Boolean)CALL_THREE_PARAMETER_UPP((userUPP), uppModalFilterProcInfo, (theDialog), (theEvent), (itemHit))
+ #define InvokeUserItemUPP(theDialog, itemNo, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppUserItemProcInfo, (theDialog), (itemNo))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewSoundProc(userRoutine) NewSoundUPP(userRoutine)
+#define NewModalFilterProc(userRoutine) NewModalFilterUPP(userRoutine)
+#define NewUserItemProc(userRoutine) NewUserItemUPP(userRoutine)
+#define CallSoundProc(userRoutine, soundNumber) InvokeSoundUPP(soundNumber, userRoutine)
+#define CallModalFilterProc(userRoutine, theDialog, theEvent, itemHit) InvokeModalFilterUPP(theDialog, theEvent, itemHit, userRoutine)
+#define CallUserItemProc(userRoutine, theDialog, itemNo) InvokeUserItemUPP(theDialog, itemNo, userRoutine)
+
+#if !TARGET_OS_MAC
+/* QuickTime 3.0 */
+typedef CALLBACK_API_C( void , QTModelessCallbackProcPtr )(EventRecord *theEvent, DialogPtr theDialog, DialogItemIndex itemHit);
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+SetModelessDialogCallbackProc (DialogPtr theDialog,
+ QTModelessCallbackProcPtr callbackProc);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef QTModelessCallbackProcPtr QTModelessCallbackUPP;
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+GetDialogControlNotificationProc (void * theProc);
+
+EXTERN_API( void )
+SetDialogMovableModal (DialogPtr theDialog);
+
+EXTERN_API( void *)
+GetDialogParent (DialogPtr theDialog);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* !TARGET_OS_MAC */
+
+/*
+ ---------------------------------------------------------------------------------------------------------
+ o Following types are valid with Appearance 1.0 and later
+ ---------------------------------------------------------------------------------------------------------
+*/
+enum {
+ /* Alert types to pass into StandardAlert */
+ kAlertStopAlert = 0,
+ kAlertNoteAlert = 1,
+ kAlertCautionAlert = 2,
+ kAlertPlainAlert = 3
+};
+
+typedef SInt16 AlertType;
+enum {
+ kAlertDefaultOKText = -1, /* "OK"*/
+ kAlertDefaultCancelText = -1, /* "Cancel"*/
+ kAlertDefaultOtherText = -1 /* "Don't Save"*/
+};
+
+/* StandardAlert alert button numbers */
+enum {
+ kAlertStdAlertOKButton = 1,
+ kAlertStdAlertCancelButton = 2,
+ kAlertStdAlertOtherButton = 3,
+ kAlertStdAlertHelpButton = 4
+};
+
+enum {
+ /* Dialog Flags for use in NewFeaturesDialog or dlgx resource */
+ kDialogFlagsUseThemeBackground = (1 << 0),
+ kDialogFlagsUseControlHierarchy = (1 << 1),
+ kDialogFlagsHandleMovableModal = (1 << 2),
+ kDialogFlagsUseThemeControls = (1 << 3)
+};
+
+enum {
+ /* Alert Flags for use in alrx resource */
+ kAlertFlagsUseThemeBackground = (1 << 0),
+ kAlertFlagsUseControlHierarchy = (1 << 1),
+ kAlertFlagsAlertIsMovable = (1 << 2),
+ kAlertFlagsUseThemeControls = (1 << 3)
+};
+
+/* For dftb resource */
+enum {
+ kDialogFontNoFontStyle = 0,
+ kDialogFontUseFontMask = 0x0001,
+ kDialogFontUseFaceMask = 0x0002,
+ kDialogFontUseSizeMask = 0x0004,
+ kDialogFontUseForeColorMask = 0x0008,
+ kDialogFontUseBackColorMask = 0x0010,
+ kDialogFontUseModeMask = 0x0020,
+ kDialogFontUseJustMask = 0x0040,
+ kDialogFontUseAllMask = 0x00FF,
+ kDialogFontAddFontSizeMask = 0x0100,
+ kDialogFontUseFontNameMask = 0x0200,
+ kDialogFontAddToMetaFontMask = 0x0400
+};
+
+
+struct AlertStdAlertParamRec {
+ Boolean movable; /* Make alert movable modal */
+ Boolean helpButton; /* Is there a help button? */
+ ModalFilterUPP filterProc; /* Event filter */
+ ConstStringPtr defaultText; /* Text for button in OK position */
+ ConstStringPtr cancelText; /* Text for button in cancel position */
+ ConstStringPtr otherText; /* Text for button in left position */
+ SInt16 defaultButton; /* Which button behaves as the default */
+ SInt16 cancelButton; /* Which one behaves as cancel (can be 0) */
+ UInt16 position; /* Position (kWindowDefaultPosition in this case */
+ /* equals kWindowAlertPositionParentWindowScreen) */
+};
+typedef struct AlertStdAlertParamRec AlertStdAlertParamRec;
+
+typedef AlertStdAlertParamRec * AlertStdAlertParamPtr;
+/* --- end Appearance 1.0 or later stuff*/
+
+
+/*
+ NOTE: Code running under MultiFinder or System 7.0 or newer
+ should always pass NULL to InitDialogs.
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+InitDialogs (void * ignored) ONEWORDINLINE(0xA97B);
+
+EXTERN_API( void )
+ErrorSound (SoundUPP soundProc) ONEWORDINLINE(0xA98C);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( DialogPtr )
+NewDialog (void * dStorage,
+ const Rect * boundsRect,
+ ConstStr255Param title,
+ Boolean visible,
+ SInt16 procID,
+ WindowPtr behind,
+ Boolean goAwayFlag,
+ SInt32 refCon,
+ Handle items) ONEWORDINLINE(0xA97D);
+
+EXTERN_API( DialogPtr )
+GetNewDialog (SInt16 dialogID,
+ void * dStorage,
+ WindowPtr behind) ONEWORDINLINE(0xA97C);
+
+EXTERN_API( DialogPtr )
+NewColorDialog (void * dStorage,
+ const Rect * boundsRect,
+ ConstStr255Param title,
+ Boolean visible,
+ SInt16 procID,
+ WindowPtr behind,
+ Boolean goAwayFlag,
+ SInt32 refCon,
+ Handle items) ONEWORDINLINE(0xAA4B);
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+CloseDialog (DialogPtr theDialog) ONEWORDINLINE(0xA982);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( void )
+DisposeDialog (DialogPtr theDialog) ONEWORDINLINE(0xA983);
+
+EXTERN_API( void )
+ModalDialog (ModalFilterUPP modalFilter,
+ DialogItemIndex * itemHit) ONEWORDINLINE(0xA991);
+
+EXTERN_API( Boolean )
+IsDialogEvent (const EventRecord * theEvent) ONEWORDINLINE(0xA97F);
+
+EXTERN_API( Boolean )
+DialogSelect (const EventRecord * theEvent,
+ DialogPtr * theDialog,
+ DialogItemIndex * itemHit) ONEWORDINLINE(0xA980);
+
+EXTERN_API( void )
+DrawDialog (DialogPtr theDialog) ONEWORDINLINE(0xA981);
+
+EXTERN_API( void )
+UpdateDialog (DialogPtr theDialog,
+ RgnHandle updateRgn) ONEWORDINLINE(0xA978);
+
+EXTERN_API( void )
+HideDialogItem (DialogPtr theDialog,
+ DialogItemIndex itemNo) ONEWORDINLINE(0xA827);
+
+EXTERN_API( void )
+ShowDialogItem (DialogPtr theDialog,
+ DialogItemIndex itemNo) ONEWORDINLINE(0xA828);
+
+EXTERN_API( DialogItemIndexZeroBased )
+FindDialogItem (DialogPtr theDialog,
+ Point thePt) ONEWORDINLINE(0xA984);
+
+EXTERN_API( void )
+DialogCut (DialogPtr theDialog);
+
+EXTERN_API( void )
+DialogPaste (DialogPtr theDialog);
+
+EXTERN_API( void )
+DialogCopy (DialogPtr theDialog);
+
+EXTERN_API( void )
+DialogDelete (DialogPtr theDialog);
+
+EXTERN_API( DialogItemIndex )
+Alert (SInt16 alertID,
+ ModalFilterUPP modalFilter) ONEWORDINLINE(0xA985);
+
+EXTERN_API( DialogItemIndex )
+StopAlert (SInt16 alertID,
+ ModalFilterUPP modalFilter) ONEWORDINLINE(0xA986);
+
+EXTERN_API( DialogItemIndex )
+NoteAlert (SInt16 alertID,
+ ModalFilterUPP modalFilter) ONEWORDINLINE(0xA987);
+
+EXTERN_API( DialogItemIndex )
+CautionAlert (SInt16 alertID,
+ ModalFilterUPP modalFilter) ONEWORDINLINE(0xA988);
+
+EXTERN_API( void )
+GetDialogItem (DialogPtr theDialog,
+ DialogItemIndex itemNo,
+ DialogItemType * itemType,
+ Handle * item,
+ Rect * box) ONEWORDINLINE(0xA98D);
+
+EXTERN_API( void )
+SetDialogItem (DialogPtr theDialog,
+ DialogItemIndex itemNo,
+ DialogItemType itemType,
+ Handle item,
+ const Rect * box) ONEWORDINLINE(0xA98E);
+
+EXTERN_API( void )
+ParamText (ConstStr255Param param0,
+ ConstStr255Param param1,
+ ConstStr255Param param2,
+ ConstStr255Param param3) ONEWORDINLINE(0xA98B);
+
+EXTERN_API( void )
+SelectDialogItemText (DialogPtr theDialog,
+ DialogItemIndex itemNo,
+ SInt16 strtSel,
+ SInt16 endSel) ONEWORDINLINE(0xA97E);
+
+EXTERN_API( void )
+GetDialogItemText (Handle item,
+ Str255 text) ONEWORDINLINE(0xA990);
+
+EXTERN_API( void )
+SetDialogItemText (Handle item,
+ ConstStr255Param text) ONEWORDINLINE(0xA98F);
+
+EXTERN_API( SInt16 )
+GetAlertStage (void) TWOWORDINLINE(0x3EB8, 0x0A9A);
+
+EXTERN_API( void )
+SetDialogFont (SInt16 fontNum) TWOWORDINLINE(0x31DF, 0x0AFA);
+
+EXTERN_API( void )
+ResetAlertStage (void) TWOWORDINLINE(0x4278, 0x0A9A);
+
+/* APIs in Carbon*/
+EXTERN_API( void )
+GetParamText (StringPtr param0,
+ StringPtr param1,
+ StringPtr param2,
+ StringPtr param3);
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( DialogPtr )
+newdialog (void * dStorage,
+ const Rect * boundsRect,
+ const char * title,
+ Boolean visible,
+ SInt16 procID,
+ WindowPtr behind,
+ Boolean goAwayFlag,
+ SInt32 refCon,
+ Handle items);
+
+EXTERN_API_C( DialogPtr )
+newcolordialog (void * dStorage,
+ const Rect * boundsRect,
+ const char * title,
+ Boolean visible,
+ SInt16 procID,
+ WindowPtr behind,
+ Boolean goAwayFlag,
+ SInt32 refCon,
+ Handle items);
+
+EXTERN_API_C( void )
+paramtext (const char * param0,
+ const char * param1,
+ const char * param2,
+ const char * param3);
+
+EXTERN_API_C( void )
+getdialogitemtext (Handle item,
+ char * text);
+
+EXTERN_API_C( void )
+setdialogitemtext (Handle item,
+ const char * text);
+
+EXTERN_API_C( DialogItemIndexZeroBased )
+finddialogitem (DialogPtr theDialog,
+ Point * thePt);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( void )
+AppendDITL (DialogPtr theDialog,
+ Handle theHandle,
+ DITLMethod method);
+
+EXTERN_API( DialogItemIndex )
+CountDITL (DialogPtr theDialog);
+
+EXTERN_API( void )
+ShortenDITL (DialogPtr theDialog,
+ DialogItemIndex numberItems);
+
+EXTERN_API( OSStatus )
+InsertDialogItem (DialogPtr theDialog,
+ DialogItemIndex afterItem,
+ DialogItemType itemType,
+ Handle itemHandle,
+ const Rect * box);
+
+EXTERN_API( OSStatus )
+RemoveDialogItems (DialogPtr theDialog,
+ DialogItemIndex itemNo,
+ DialogItemIndex amountToRemove,
+ Boolean disposeItemData);
+
+EXTERN_API( Boolean )
+StdFilterProc (DialogPtr theDialog,
+ EventRecord * event,
+ DialogItemIndex * itemHit);
+
+EXTERN_API( OSErr )
+GetStdFilterProc (ModalFilterUPP * theProc) THREEWORDINLINE(0x303C, 0x0203, 0xAA68);
+
+EXTERN_API( OSErr )
+SetDialogDefaultItem (DialogPtr theDialog,
+ DialogItemIndex newItem) THREEWORDINLINE(0x303C, 0x0304, 0xAA68);
+
+EXTERN_API( OSErr )
+SetDialogCancelItem (DialogPtr theDialog,
+ DialogItemIndex newItem) THREEWORDINLINE(0x303C, 0x0305, 0xAA68);
+
+EXTERN_API( OSErr )
+SetDialogTracksCursor (DialogPtr theDialog,
+ Boolean tracks) THREEWORDINLINE(0x303C, 0x0306, 0xAA68);
+
+
+
+/*
+ ---------------------------------------------------------------------------------------------------------
+ o Appearance Dialog Routines (available only with Appearance 1.0 and later)
+ ---------------------------------------------------------------------------------------------------------
+*/
+
+EXTERN_API( DialogPtr )
+NewFeaturesDialog (void * inStorage,
+ const Rect * inBoundsRect,
+ ConstStr255Param inTitle,
+ Boolean inIsVisible,
+ SInt16 inProcID,
+ WindowPtr inBehind,
+ Boolean inGoAwayFlag,
+ SInt32 inRefCon,
+ Handle inItemListHandle,
+ UInt32 inFlags) THREEWORDINLINE(0x303C, 0x110C, 0xAA68);
+
+EXTERN_API( OSErr )
+AutoSizeDialog (DialogPtr inDialog) THREEWORDINLINE(0x303C, 0x020D, 0xAA68);
+
+/*
+ Regarding StandardAlert and constness:
+ Even though the inAlertParam parameter is marked const here, there was
+ a chance Dialog Manager would modify it on versions of Mac OS prior to 9.
+*/
+EXTERN_API( OSErr )
+StandardAlert (AlertType inAlertType,
+ ConstStr255Param inError,
+ ConstStr255Param inExplanation,
+ const AlertStdAlertParamRec * inAlertParam,
+ SInt16 * outItemHit) THREEWORDINLINE(0x303C, 0x090E, 0xAA68);
+
+EXTERN_API( OSErr )
+GetDialogItemAsControl (DialogPtr inDialog,
+ SInt16 inItemNo,
+ ControlHandle * outControl) THREEWORDINLINE(0x303C, 0x050F, 0xAA68);
+
+EXTERN_API( OSErr )
+MoveDialogItem (DialogPtr inDialog,
+ SInt16 inItemNo,
+ SInt16 inHoriz,
+ SInt16 inVert) THREEWORDINLINE(0x303C, 0x0510, 0xAA68);
+
+EXTERN_API( OSErr )
+SizeDialogItem (DialogPtr inDialog,
+ SInt16 inItemNo,
+ SInt16 inWidth,
+ SInt16 inHeight) THREEWORDINLINE(0x303C, 0x0511, 0xAA68);
+
+EXTERN_API( OSErr )
+AppendDialogItemList (DialogPtr dialog,
+ SInt16 ditlID,
+ DITLMethod method) THREEWORDINLINE(0x303C, 0x0412, 0xAA68);
+
+/*
+ ---------------------------------------------------------------------------------------------------------
+ o Dialog Routines available only with Appearance 1.1 and later
+ ---------------------------------------------------------------------------------------------------------
+*/
+
+EXTERN_API( OSStatus )
+SetDialogTimeout (DialogPtr inDialog,
+ SInt16 inButtonToPress,
+ UInt32 inSecondsToWait);
+
+EXTERN_API( OSStatus )
+GetDialogTimeout (DialogPtr inDialog,
+ SInt16 * outButtonToPress,
+ UInt32 * outSecondsToWait,
+ UInt32 * outSecondsRemaining);
+
+EXTERN_API( OSStatus )
+SetModalDialogEventMask (DialogPtr inDialog,
+ EventMask inMask);
+
+EXTERN_API( OSStatus )
+GetModalDialogEventMask (DialogPtr inDialog,
+ EventMask * outMask);
+
+#if OLDROUTINENAMES
+#define DisposDialog(theDialog) DisposeDialog(theDialog)
+#define UpdtDialog(theDialog, updateRgn) UpdateDialog(theDialog, updateRgn)
+#define GetDItem(theDialog, itemNo, itemType, item, box) GetDialogItem(theDialog, itemNo, itemType, item, box)
+#define SetDItem(theDialog, itemNo, itemType, item, box) SetDialogItem(theDialog, itemNo, itemType, item, box)
+#define HideDItem(theDialog, itemNo) HideDialogItem(theDialog, itemNo)
+#define ShowDItem(theDialog, itemNo) ShowDialogItem(theDialog, itemNo)
+#define SelIText(theDialog, itemNo, strtSel, endSel) SelectDialogItemText(theDialog, itemNo, strtSel, endSel)
+#define GetIText(item, text) GetDialogItemText(item, text)
+#define SetIText(item, text) SetDialogItemText(item, text)
+#define FindDItem(theDialog, thePt) FindDialogItem(theDialog, thePt)
+#define NewCDialog(dStorage, boundsRect, title, visible, procID, behind, goAwayFlag, refCon, items) \
+NewColorDialog(dStorage, boundsRect, title, visible, procID, behind, goAwayFlag, refCon, items)
+#define GetAlrtStage() GetAlertStage()
+#define ResetAlrtStage() ResetAlertStage()
+#define DlgCut(theDialog) DialogCut(theDialog)
+#define DlgPaste(theDialog) DialogPaste(theDialog)
+#define DlgCopy(theDialog) DialogCopy(theDialog)
+#define DlgDelete(theDialog) DialogDelete(theDialog)
+#define SetDAFont(fontNum) SetDialogFont(fontNum)
+#if CGLUESUPPORTED
+#define newcdialog(dStorage, boundsRect, title, visible, procID, behind, goAwayFlag, refCon, items) \
+newcolordialog(dStorage, boundsRect, title, visible, procID, behind, goAwayFlag, refCon, items)
+#define getitext(item, text) getdialogitemtext(item, text)
+#define setitext(item, text) setdialogitemtext(item, text)
+#define findditem(theDialog, thePt) finddialogitem(theDialog, thePt)
+#endif
+
+#endif /* OLDROUTINENAMES */
+
+/*
+ *****************************************************************************
+ * *
+ * The conditional STRICT_DIALOGS has been removed from this interface file. *
+ * The accessor macros to a DialogRecord are no longer necessary. *
+ * *
+ * All *Ref Types have reverted to their original Handle and Ptr Types. *
+ * *
+ *****************************************************************************
+
+ Details:
+ The original purpose of the STRICT_ conditionals and accessor macros was to
+ help ease the transition to Copland. Shared data structures are difficult
+ to coordinate in a preemptive multitasking OS. By hiding the fields in a
+ WindowRecord and other data structures, we would begin the migration to the
+ discipline wherein system data structures are completely hidden from
+ applications.
+
+ After many design reviews, we finally concluded that with this sort of
+ migration, the system could never tell when an application was no longer
+ peeking at a WindowRecord, and thus the data structure might never become
+ system owned. Additionally, there were many other limitations in the
+ classic toolbox that were begging to be addressed. The final decision was
+ to leave the traditional toolbox as a compatibility mode.
+
+ We also decided to use the Handle and Ptr based types in the function
+ declarations. For example, NewWindow now returns a WindowPtr rather than a
+ WindowRef. The Ref types are still defined in the header files, so all
+ existing code will still compile exactly as it did before. There are
+ several reasons why we chose to do this:
+
+ - The importance of backwards compatibility makes it unfeasible for us to
+ enforce real opaque references in the implementation anytime in the
+ foreseeable future. Therefore, any opaque data types (e.g. WindowRef,
+ ControlRef, etc.) in the documentation and header files would always be a
+ fake veneer of opacity.
+
+ - There exists a significant base of books and sample code that neophyte
+ Macintosh developers use to learn how to program the Macintosh. These
+ books and sample code all use direct data access. Introducing opaque data
+ types at this point would confuse neophyte programmers more than it would
+ help them.
+
+ - Direct data structure access is used by nearly all Macintosh developers.
+ Changing the interfaces to reflect a false opacity would not provide any
+ benefit to these developers.
+
+ - Accessor functions are useful in and of themselves as convenience
+ functions, without being tied to opaque data types. We will complete and
+ document the Windows and Dialogs accessor functions in an upcoming release
+ of the interfaces.
+*/
+#if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
+#ifdef __cplusplus
+inline WindowPtr GetDialogWindow(DialogPtr dialog) { return (WindowPtr) dialog; }
+inline SInt16 GetDialogDefaultItem(DialogPtr dialog) { return (*(SInt16 *) (((UInt8 *) dialog) + 168)); }
+inline SInt16 GetDialogCancelItem(DialogPtr dialog) { return (*(SInt16 *) (((UInt8 *) dialog) + 166)); }
+inline SInt16 GetDialogKeyboardFocusItem(DialogPtr dialog) { return (SInt16) ((*(SInt16 *) (((UInt8 *) dialog) + 164)) < 0 ? -1 : (*(SInt16 *) (((UInt8 *) dialog) + 164)) + 1); }
+inline void SetGrafPortOfDialog(DialogPtr dialog) { MacSetPort ((GrafPtr) dialog); }
+#else
+#define GetDialogWindow(dialog) ((WindowPtr) dialog)
+#define GetDialogDefaultItem(dialog) (*(SInt16 *) (((UInt8 *) dialog) + 168))
+#define GetDialogCancelItem(dialog) (*(SInt16 *) (((UInt8 *) dialog) + 166))
+#define GetDialogKeyboardFocusItem(dialog) ((SInt16)((*(SInt16 *) (((UInt8 *) dialog) + 164)) < 0 ? -1 : (*(SInt16 *) (((UInt8 *) dialog) + 164)) + 1))
+#define SetGrafPortOfDialog(dialog) do { MacSetPort ((GrafPtr) dialog); } while (false)
+#endif
+#endif /* !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS */
+
+#if ACCESSOR_CALLS_ARE_FUNCTIONS
+/* Getters */
+EXTERN_API( WindowPtr )
+GetDialogWindow (DialogPtr dialog);
+
+EXTERN_API( TEHandle )
+GetDialogTextEditHandle (DialogPtr dialog);
+
+EXTERN_API( SInt16 )
+GetDialogDefaultItem (DialogPtr dialog);
+
+EXTERN_API( SInt16 )
+GetDialogCancelItem (DialogPtr dialog);
+
+EXTERN_API( SInt16 )
+GetDialogKeyboardFocusItem (DialogPtr dialog);
+
+/* Setters */
+/* Utilities */
+EXTERN_API( void )
+SetPortDialogPort (DialogPtr dialog);
+
+EXTERN_API( CGrafPtr )
+GetDialogPort (DialogPtr dialog);
+
+/* To prevent upward dependencies, GetDialogFromWindow() is defined here instead of MacWindows.i */
+EXTERN_API( DialogPtr )
+GetDialogFromWindow (WindowPtr window);
+
+#endif /* ACCESSOR_CALLS_ARE_FUNCTIONS */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+CouldDialog (SInt16 dialogID) ONEWORDINLINE(0xA979);
+
+EXTERN_API( void )
+FreeDialog (SInt16 dialogID) ONEWORDINLINE(0xA97A);
+
+EXTERN_API( void )
+CouldAlert (SInt16 alertID) ONEWORDINLINE(0xA989);
+
+EXTERN_API( void )
+FreeAlert (SInt16 alertID) ONEWORDINLINE(0xA98A);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+
+
+#if !TARGET_OS_MAC
+#endif /* !TARGET_OS_MAC */
+
+
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __DIALOGS__ */
+
diff --git a/include/qt/Dictionary.h b/include/qt/Dictionary.h
new file mode 100644
index 000000000..aea75bc48
--- /dev/null
+++ b/include/qt/Dictionary.h
@@ -0,0 +1,734 @@
+/*
+ File: Dictionary.h
+
+ Contains: Dictionary Manager Interfaces
+
+ Version: Technology: System 7
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1992-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __DICTIONARY__
+#define __DICTIONARY__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+#ifndef __AEREGISTRY__
+#include "AERegistry.h"
+#endif
+
+#ifndef __CODEFRAGMENTS__
+#include "CodeFragments.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*
+=============================================================================================
+ Modern Dictionary Manager
+=============================================================================================
+*/
+/*
+ Dictionary information
+*/
+enum {
+ kDictionaryFileType = FOUR_CHAR_CODE('dict'),
+ kDCMDictionaryHeaderSignature = FOUR_CHAR_CODE('dict'),
+ kDCMDictionaryHeaderVersion = 2
+};
+
+enum {
+ kDCMAnyFieldTag = typeWildCard,
+ kDCMAnyFieldType = typeWildCard
+};
+
+/*
+ Contents of a Field Info Record (an AERecord)
+*/
+enum {
+ keyDCMFieldTag = FOUR_CHAR_CODE('ftag'), /* typeEnumeration */
+ keyDCMFieldType = FOUR_CHAR_CODE('ftyp'), /* typeEnumeration */
+ keyDCMMaxRecordSize = FOUR_CHAR_CODE('mrsz'), /* typeMagnitude */
+ keyDCMFieldAttributes = FOUR_CHAR_CODE('fatr'),
+ keyDCMFieldDefaultData = FOUR_CHAR_CODE('fdef'),
+ keyDCMFieldName = FOUR_CHAR_CODE('fnam'), /* typeChar */
+ keyDCMFieldFindMethods = FOUR_CHAR_CODE('ffnd') /* typeAEList of typeDCMFindMethod */
+};
+
+/*
+ Special types for fields of a Field Info Record
+*/
+enum {
+ typeDCMFieldAttributes = FOUR_CHAR_CODE('fatr'),
+ typeDCMFindMethod = FOUR_CHAR_CODE('fmth')
+};
+
+
+/*
+ Field attributes
+*/
+enum {
+ kDCMIndexedFieldMask = 0x00000001,
+ kDCMRequiredFieldMask = 0x00000002,
+ kDCMIdentifyFieldMask = 0x00000004,
+ kDCMFixedSizeFieldMask = 0x00000008,
+ kDCMHiddenFieldMask = (long)0x80000000
+};
+
+typedef OptionBits DCMFieldAttributes;
+/*
+ Standard dictionary properties
+*/
+enum {
+ pDCMAccessMethod = FOUR_CHAR_CODE('amtd'), /* data type: typeChar ReadOnly */
+ pDCMPermission = FOUR_CHAR_CODE('perm'), /* data type: typeUInt16 */
+ pDCMListing = FOUR_CHAR_CODE('list'), /* data type: typeUInt16 */
+ pDCMMaintenance = FOUR_CHAR_CODE('mtnc'), /* data type: typeUInt16 */
+ pDCMLocale = FOUR_CHAR_CODE('locl'), /* data type: typeUInt32. Optional; default = kLocaleIdentifierWildCard */
+ pDCMClass = pClass, /* data type: typeUInt16 */
+ pDCMCopyright = FOUR_CHAR_CODE('info') /* data type: typeChar */
+};
+
+/*
+ pDCMPermission property constants
+*/
+enum {
+ kDCMReadOnlyDictionary = 0,
+ kDCMReadWriteDictionary = 1
+};
+
+/*
+ pDCMListing property constants
+*/
+enum {
+ kDCMAllowListing = 0,
+ kDCMProhibitListing = 1
+};
+
+/*
+ pDCMClass property constants
+*/
+enum {
+ kDCMUserDictionaryClass = 0,
+ kDCMSpecificDictionaryClass = 1,
+ kDCMBasicDictionaryClass = 2
+};
+
+/*
+ Standard search method
+*/
+enum {
+ kDCMFindMethodExactMatch = kAEEquals,
+ kDCMFindMethodBeginningMatch = kAEBeginsWith,
+ kDCMFindMethodContainsMatch = kAEContains,
+ kDCMFindMethodEndingMatch = kAEEndsWith,
+ kDCMFindMethodForwardTrie = FOUR_CHAR_CODE('ftri'), /* used for morphological analysis*/
+ kDCMFindMethodBackwardTrie = FOUR_CHAR_CODE('btri') /* used for morphological analysis*/
+};
+
+typedef OSType DCMFindMethod;
+/*
+ AccessMethod features
+*/
+enum {
+ kDCMCanUseFileDictionaryMask = 0x00000001,
+ kDCMCanUseMemoryDictionaryMask = 0x00000002,
+ kDCMCanStreamDictionaryMask = 0x00000004,
+ kDCMCanHaveMultipleIndexMask = 0x00000008,
+ kDCMCanModifyDictionaryMask = 0x00000010,
+ kDCMCanCreateDictionaryMask = 0x00000020,
+ kDCMCanAddDictionaryFieldMask = 0x00000040,
+ kDCMCanUseTransactionMask = 0x00000080
+};
+
+typedef OptionBits DCMAccessMethodFeature;
+typedef UInt32 DCMUniqueID;
+typedef struct OpaqueDCMObjectID* DCMObjectID;
+typedef DCMObjectID DCMAccessMethodID;
+typedef DCMObjectID DCMDictionaryID;
+#define kDCMInvalidObjectID ((DCMObjectID) kInvalidID)
+typedef struct OpaqueDCMObjectRef* DCMObjectRef;
+typedef DCMObjectRef DCMDictionaryRef;
+typedef DCMObjectRef DCMDictionaryStreamRef;
+#define kDCMInvalidObjectRef ((DCMObjectRef) kInvalidID)
+typedef struct OpaqueDCMObjectIterator* DCMObjectIterator;
+typedef DCMObjectIterator DCMAccessMethodIterator;
+typedef DCMObjectIterator DCMDictionaryIterator;
+typedef struct OpaqueDCMFoundRecordIterator* DCMFoundRecordIterator;
+/*
+ Field specification declarations
+*/
+typedef DescType DCMFieldTag;
+typedef DescType DCMFieldType;
+/*
+ Dictionary header information
+*/
+
+struct DCMDictionaryHeader {
+ FourCharCode headerSignature;
+ UInt32 headerVersion;
+ ByteCount headerSize;
+ Str63 accessMethod;
+};
+typedef struct DCMDictionaryHeader DCMDictionaryHeader;
+/*
+ Callback routines
+*/
+typedef CALLBACK_API( Boolean , DCMProgressFilterProcPtr )(Boolean determinateProcess, UInt16 percentageComplete, UInt32 callbackUD);
+typedef STACK_UPP_TYPE(DCMProgressFilterProcPtr) DCMProgressFilterUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(DCMProgressFilterUPP)
+ NewDCMProgressFilterUPP (DCMProgressFilterProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeDCMProgressFilterUPP (DCMProgressFilterUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeDCMProgressFilterUPP (Boolean determinateProcess,
+ UInt16 percentageComplete,
+ UInt32 callbackUD,
+ DCMProgressFilterUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppDCMProgressFilterProcInfo = 0x00000E50 }; /* pascal 1_byte Func(1_byte, 2_bytes, 4_bytes) */
+ #define NewDCMProgressFilterUPP(userRoutine) (DCMProgressFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDCMProgressFilterProcInfo, GetCurrentArchitecture())
+ #define DisposeDCMProgressFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeDCMProgressFilterUPP(determinateProcess, percentageComplete, callbackUD, userUPP) (Boolean)CALL_THREE_PARAMETER_UPP((userUPP), uppDCMProgressFilterProcInfo, (determinateProcess), (percentageComplete), (callbackUD))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewDCMProgressFilterProc(userRoutine) NewDCMProgressFilterUPP(userRoutine)
+#define CallDCMProgressFilterProc(userRoutine, determinateProcess, percentageComplete, callbackUD) InvokeDCMProgressFilterUPP(determinateProcess, percentageComplete, callbackUD, userRoutine)
+/*
+ Library version
+*/
+EXTERN_API( UInt32 )
+DCMLibraryVersion (void);
+
+/*
+ Create/delete dictionary
+*/
+EXTERN_API( OSStatus )
+DCMNewDictionary (DCMAccessMethodID accessMethodID,
+ const FSSpec * newDictionaryFile,
+ ScriptCode scriptTag,
+ const AEDesc * listOfFieldInfoRecords,
+ Boolean invisible,
+ ItemCount recordCapacity,
+ DCMDictionaryID * newDictionary);
+
+EXTERN_API( OSStatus )
+DCMDeriveNewDictionary (DCMDictionaryID srcDictionary,
+ const FSSpec * newDictionaryFile,
+ ScriptCode scriptTag,
+ Boolean invisible,
+ ItemCount recordCapacity,
+ DCMDictionaryID * newDictionary);
+
+EXTERN_API( OSStatus )
+DCMDeleteDictionary (DCMDictionaryID dictionaryID);
+
+/*
+ Register dictionary
+*/
+EXTERN_API( OSStatus )
+DCMRegisterDictionaryFile (const FSSpec * dictionaryFile,
+ DCMDictionaryID * dictionaryID);
+
+EXTERN_API( OSStatus )
+DCMUnregisterDictionary (DCMDictionaryID dictionaryID);
+
+/*
+ Open dictionary
+*/
+EXTERN_API( OSStatus )
+DCMOpenDictionary (DCMDictionaryID dictionaryID,
+ ByteCount protectKeySize,
+ ConstLogicalAddress protectKey,
+ DCMDictionaryRef * dictionaryRef);
+
+EXTERN_API( OSStatus )
+DCMCloseDictionary (DCMDictionaryRef dictionaryRef);
+
+/*
+ Change access privilege
+*/
+EXTERN_API( OSStatus )
+DCMGetDictionaryWriteAccess (DCMDictionaryRef dictionaryRef,
+ Duration timeOutDuration);
+
+EXTERN_API( OSStatus )
+DCMReleaseDictionaryWriteAccess (DCMDictionaryRef dictionaryRef,
+ Boolean commitTransaction);
+
+/*
+ Find records
+*/
+EXTERN_API( OSStatus )
+DCMFindRecords (DCMDictionaryRef dictionaryRef,
+ DCMFieldTag keyFieldTag,
+ ByteCount keySize,
+ ConstLogicalAddress keyData,
+ DCMFindMethod findMethod,
+ ItemCount preFetchedDataNum,
+ DCMFieldTag preFetchedData[],
+ ItemCount skipCount,
+ ItemCount maxRecordCount,
+ DCMFoundRecordIterator * recordIterator);
+
+EXTERN_API( ItemCount )
+DCMCountRecordIterator (DCMFoundRecordIterator recordIterator);
+
+EXTERN_API( OSStatus )
+DCMIterateFoundRecord (DCMFoundRecordIterator recordIterator,
+ ByteCount maxKeySize,
+ ByteCount * actualKeySize,
+ LogicalAddress keyData,
+ DCMUniqueID * uniqueID,
+ AEDesc * dataList);
+
+EXTERN_API( OSStatus )
+DCMDisposeRecordIterator (DCMFoundRecordIterator recordIterator);
+
+/*
+ Dump dictionary
+*/
+EXTERN_API( OSStatus )
+DCMCountRecord (DCMDictionaryID dictionaryID,
+ ItemCount * count);
+
+EXTERN_API( OSStatus )
+DCMGetRecordSequenceNumber (DCMDictionaryRef dictionaryRef,
+ DCMFieldTag keyFieldTag,
+ ByteCount keySize,
+ ConstLogicalAddress keyData,
+ DCMUniqueID uniqueID,
+ ItemCount * sequenceNum);
+
+EXTERN_API( OSStatus )
+DCMGetNthRecord (DCMDictionaryRef dictionaryRef,
+ DCMFieldTag keyFieldTag,
+ ItemCount serialNum,
+ ByteCount maxKeySize,
+ ByteCount * keySize,
+ LogicalAddress keyData,
+ DCMUniqueID * uniqueID);
+
+EXTERN_API( OSStatus )
+DCMGetNextRecord (DCMDictionaryRef dictionaryRef,
+ DCMFieldTag keyFieldTag,
+ ByteCount keySize,
+ ConstLogicalAddress keyData,
+ DCMUniqueID uniqueID,
+ ByteCount maxKeySize,
+ ByteCount * nextKeySize,
+ LogicalAddress nextKeyData,
+ DCMUniqueID * nextUniqueID);
+
+EXTERN_API( OSStatus )
+DCMGetPrevRecord (DCMDictionaryRef dictionaryRef,
+ DCMFieldTag keyFieldTag,
+ ByteCount keySize,
+ ConstLogicalAddress keyData,
+ DCMUniqueID uniqueID,
+ ByteCount maxKeySize,
+ ByteCount * prevKeySize,
+ LogicalAddress prevKeyData,
+ DCMUniqueID * prevUniqueID);
+
+/*
+ Get field data
+*/
+EXTERN_API( OSStatus )
+DCMGetFieldData (DCMDictionaryRef dictionaryRef,
+ DCMFieldTag keyFieldTag,
+ ByteCount keySize,
+ ConstLogicalAddress keyData,
+ DCMUniqueID uniqueID,
+ ItemCount numOfData,
+ const DCMFieldTag dataTag[],
+ AEDesc * dataList);
+
+EXTERN_API( OSStatus )
+DCMSetFieldData (DCMDictionaryRef dictionaryRef,
+ DCMFieldTag keyFieldTag,
+ ByteCount keySize,
+ ConstLogicalAddress keyData,
+ DCMUniqueID uniqueID,
+ const AEDesc * dataList);
+
+/*
+ Add record
+*/
+EXTERN_API( OSStatus )
+DCMAddRecord (DCMDictionaryRef dictionaryRef,
+ DCMFieldTag keyFieldTag,
+ ByteCount keySize,
+ ConstLogicalAddress keyData,
+ Boolean checkOnly,
+ const AEDesc * dataList,
+ DCMUniqueID * newUniqueID);
+
+EXTERN_API( OSStatus )
+DCMDeleteRecord (DCMDictionaryRef dictionaryRef,
+ DCMFieldTag keyFieldTag,
+ ByteCount keySize,
+ ConstLogicalAddress keyData,
+ DCMUniqueID uniqueID);
+
+/*
+ Reorganize/compact dictionary
+*/
+EXTERN_API( OSStatus )
+DCMReorganizeDictionary (DCMDictionaryID dictionaryID,
+ ItemCount extraCapacity,
+ DCMProgressFilterUPP progressProc,
+ UInt32 userData);
+
+EXTERN_API( OSStatus )
+DCMCompactDictionary (DCMDictionaryID dictionaryID,
+ DCMProgressFilterUPP progressProc,
+ UInt32 userData);
+
+/*
+ DictionaryID utilities
+*/
+EXTERN_API( OSStatus )
+DCMGetFileFromDictionaryID (DCMDictionaryID dictionaryID,
+ FSSpec * fileRef);
+
+EXTERN_API( OSStatus )
+DCMGetDictionaryIDFromFile (const FSSpec * fileRef,
+ DCMDictionaryID * dictionaryID);
+
+EXTERN_API( DCMDictionaryID )
+DCMGetDictionaryIDFromRef (DCMDictionaryRef dictionaryRef);
+
+/*
+ Field information and manipulation
+*/
+EXTERN_API( OSStatus )
+DCMGetDictionaryFieldInfo (DCMDictionaryID dictionaryID,
+ DCMFieldTag fieldTag,
+ AEDesc * fieldInfoRecord);
+
+/*
+ Dictionary property
+*/
+EXTERN_API( OSStatus )
+DCMGetDictionaryProperty (DCMDictionaryID dictionaryID,
+ DCMFieldTag propertyTag,
+ ByteCount maxPropertySize,
+ ByteCount * actualSize,
+ LogicalAddress propertyValue);
+
+EXTERN_API( OSStatus )
+DCMSetDictionaryProperty (DCMDictionaryID dictionaryID,
+ DCMFieldTag propertyTag,
+ ByteCount propertySize,
+ ConstLogicalAddress propertyValue);
+
+EXTERN_API( OSStatus )
+DCMGetDictionaryPropertyList (DCMDictionaryID dictionaryID,
+ ItemCount maxPropertyNum,
+ ItemCount * numProperties,
+ DCMFieldTag propertyTag[]);
+
+/*
+ Seaarch dictionary
+*/
+EXTERN_API( OSStatus )
+DCMCreateDictionaryIterator (DCMDictionaryIterator * dictionaryIterator);
+
+/*
+ Search AccessMethod
+*/
+EXTERN_API( OSStatus )
+DCMCreateAccessMethodIterator (DCMAccessMethodIterator * accessMethodIterator);
+
+/*
+ Iterator Operation
+*/
+EXTERN_API( ItemCount )
+DCMCountObjectIterator (DCMObjectIterator iterator);
+
+EXTERN_API( OSStatus )
+DCMIterateObject (DCMObjectIterator iterator,
+ DCMObjectID * objectID);
+
+EXTERN_API( OSStatus )
+DCMResetObjectIterator (DCMObjectIterator iterator);
+
+EXTERN_API( OSStatus )
+DCMDisposeObjectIterator (DCMObjectIterator iterator);
+
+/*
+ Get AccessMethod information
+*/
+EXTERN_API( OSStatus )
+DCMGetAccessMethodIDFromName (ConstStr63Param accessMethodName,
+ DCMAccessMethodID * accessMethodID);
+
+/*
+ Field Info Record routines
+*/
+EXTERN_API( OSStatus )
+DCMCreateFieldInfoRecord (DescType fieldTag,
+ DescType fieldType,
+ ByteCount maxRecordSize,
+ DCMFieldAttributes fieldAttributes,
+ AEDesc * fieldDefaultData,
+ ItemCount numberOfFindMethods,
+ DCMFindMethod findMethods[],
+ AEDesc * fieldInfoRecord);
+
+EXTERN_API( OSStatus )
+DCMGetFieldTagAndType (const AEDesc * fieldInfoRecord,
+ DCMFieldTag * fieldTag,
+ DCMFieldType * fieldType);
+
+EXTERN_API( OSStatus )
+DCMGetFieldMaxRecordSize (const AEDesc * fieldInfoRecord,
+ ByteCount * maxRecordSize);
+
+EXTERN_API( OSStatus )
+DCMGetFieldAttributes (const AEDesc * fieldInfoRecord,
+ DCMFieldAttributes * attributes);
+
+EXTERN_API( OSStatus )
+DCMGetFieldDefaultData (const AEDesc * fieldInfoRecord,
+ DescType desiredType,
+ AEDesc * fieldDefaultData);
+
+EXTERN_API( OSStatus )
+DCMGetFieldFindMethods (const AEDesc * fieldInfoRecord,
+ ItemCount findMethodsArrayMaxSize,
+ DCMFindMethod findMethods[],
+ ItemCount * actualNumberOfFindMethods);
+
+/*
+ Check Dictionary Manager availability
+*/
+#if TARGET_RT_MAC_CFM
+#ifdef __cplusplus
+ inline pascal Boolean DCMDictionaryManagerAvailable() { return (DCMLibraryVersion != (void*)kUnresolvedCFragSymbolAddress); }
+#else
+ #define DCMDictionaryManagerAvailable() ((DCMLibraryVersion != (void*)kUnresolvedCFragSymbolAddress)
+#endif
+#elif TARGET_RT_MAC_MACHO
+/* Dictionary Manager is always available on OS X */
+#ifdef __cplusplus
+ inline pascal Boolean DCMDictionaryManagerAvailable() { return true; }
+#else
+ #define DCMDictionaryManagerAvailable() (true)
+#endif
+#endif /* */
+
+/*
+=============================================================================================
+ Definitions for Japanese Analysis Module
+=============================================================================================
+*/
+/*
+ Default dictionary access method for Japanese analysis
+*/
+#define kAppleJapaneseDefaultAccessMethodName "\pDAM:Apple Backward Trie Access Method"
+/*
+ Data length limitations of Apple Japanese dictionaries
+*/
+enum {
+ kMaxYomiLengthInAppleJapaneseDictionary = 40,
+ kMaxKanjiLengthInAppleJapaneseDictionary = 64
+};
+
+/*
+ Defined field tags of Apple Japanese dictionary
+*/
+enum {
+ kDCMJapaneseYomiTag = FOUR_CHAR_CODE('yomi'),
+ kDCMJapaneseHyokiTag = FOUR_CHAR_CODE('hyok'),
+ kDCMJapaneseHinshiTag = FOUR_CHAR_CODE('hins'),
+ kDCMJapaneseWeightTag = FOUR_CHAR_CODE('hind'),
+ kDCMJapanesePhoneticTag = FOUR_CHAR_CODE('hton'),
+ kDCMJapaneseAccentTag = FOUR_CHAR_CODE('acnt'),
+ kDCMJapaneseOnKunReadingTag = FOUR_CHAR_CODE('OnKn'),
+ kDCMJapaneseFukugouInfoTag = FOUR_CHAR_CODE('fuku')
+};
+
+enum {
+ kDCMJapaneseYomiType = typeUnicodeText,
+ kDCMJapaneseHyokiType = typeUnicodeText,
+ kDCMJapaneseHinshiType = FOUR_CHAR_CODE('hins'),
+ kDCMJapaneseWeightType = typeShortInteger,
+ kDCMJapanesePhoneticType = typeUnicodeText,
+ kDCMJapaneseAccentType = FOUR_CHAR_CODE('byte'),
+ kDCMJapaneseOnKunReadingType = typeUnicodeText,
+ kDCMJapaneseFukugouInfoType = FOUR_CHAR_CODE('fuku')
+};
+
+
+/*
+=============================================================================================
+ System 7 Dictionary Manager
+=============================================================================================
+*/
+
+#if PRAGMA_STRUCT_ALIGN
+#pragma options align=reset
+#pragma options align=mac68k
+#endif
+
+enum {
+ /* Dictionary data insertion modes */
+ kInsert = 0, /* Only insert the input entry if there is nothing in the dictionary that matches the key. */
+ kReplace = 1, /* Only replace the entries which match the key with the input entry. */
+ kInsertOrReplace = 2 /* Insert the entry if there is nothing in the dictionary which matches the key, otherwise replaces the existing matched entries with the input entry. */
+};
+
+/* This Was InsertMode */
+
+typedef short DictionaryDataInsertMode;
+enum {
+ /* Key attribute constants */
+ kIsCaseSensitive = 0x10, /* case sensitive = 16 */
+ kIsNotDiacriticalSensitive = 0x20 /* diac not sensitive = 32 */
+};
+
+enum {
+ /* Registered attribute type constants. */
+ kNoun = -1,
+ kVerb = -2,
+ kAdjective = -3,
+ kAdverb = -4
+};
+
+/* This Was AttributeType */
+typedef SInt8 DictionaryEntryAttribute;
+/* Dictionary information record */
+
+struct DictionaryInformation {
+ FSSpec dictionaryFSSpec;
+ SInt32 numberOfRecords;
+ SInt32 currentGarbageSize;
+ ScriptCode script;
+ SInt16 maximumKeyLength;
+ SInt8 keyAttributes;
+};
+typedef struct DictionaryInformation DictionaryInformation;
+
+struct DictionaryAttributeTable {
+ UInt8 datSize;
+ DictionaryEntryAttribute datTable[1];
+};
+typedef struct DictionaryAttributeTable DictionaryAttributeTable;
+typedef DictionaryAttributeTable * DictionaryAttributeTablePtr;
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+InitializeDictionary (const FSSpec * theFsspecPtr,
+ SInt16 maximumKeyLength,
+ SInt8 keyAttributes,
+ ScriptCode script) THREEWORDINLINE(0x303C, 0x0500, 0xAA53);
+
+EXTERN_API( OSErr )
+OpenDictionary (const FSSpec * theFsspecPtr,
+ SInt8 accessPermission,
+ SInt32 * dictionaryReference) THREEWORDINLINE(0x303C, 0x0501, 0xAA53);
+
+EXTERN_API( OSErr )
+CloseDictionary (SInt32 dictionaryReference) THREEWORDINLINE(0x303C, 0x0202, 0xAA53);
+
+EXTERN_API( OSErr )
+InsertRecordToDictionary (SInt32 dictionaryReference,
+ ConstStr255Param key,
+ Handle recordDataHandle,
+ DictionaryDataInsertMode whichMode) THREEWORDINLINE(0x303C, 0x0703, 0xAA53);
+
+EXTERN_API( OSErr )
+DeleteRecordFromDictionary (SInt32 dictionaryReference,
+ ConstStr255Param key) THREEWORDINLINE(0x303C, 0x0404, 0xAA53);
+
+EXTERN_API( OSErr )
+FindRecordInDictionary (SInt32 dictionaryReference,
+ ConstStr255Param key,
+ DictionaryAttributeTablePtr requestedAttributeTablePointer,
+ Handle recordDataHandle) THREEWORDINLINE(0x303C, 0x0805, 0xAA53);
+
+EXTERN_API( OSErr )
+FindRecordByIndexInDictionary (SInt32 dictionaryReference,
+ SInt32 recordIndex,
+ DictionaryAttributeTablePtr requestedAttributeTablePointer,
+ Str255 recordKey,
+ Handle recordDataHandle) THREEWORDINLINE(0x303C, 0x0A06, 0xAA53);
+
+EXTERN_API( OSErr )
+GetDictionaryInformation (SInt32 dictionaryReference,
+ DictionaryInformation * theDictionaryInformation) THREEWORDINLINE(0x303C, 0x0407, 0xAA53);
+
+EXTERN_API( OSErr )
+CompactDictionary (SInt32 dictionaryReference) THREEWORDINLINE(0x303C, 0x0208, 0xAA53);
+
+
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __DICTIONARY__ */
+
diff --git a/include/qt/DigitalSignature.h b/include/qt/DigitalSignature.h
new file mode 100644
index 000000000..4ff293c05
--- /dev/null
+++ b/include/qt/DigitalSignature.h
@@ -0,0 +1,415 @@
+/*
+ File: DigitalSignature.h
+
+ Contains: Digital Signature Interfaces.
+
+ Version: Technology: AOCE toolbox 1.02
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __DIGITALSIGNATURE__
+#define __DIGITALSIGNATURE__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* values of SIGNameAttributeType */
+enum {
+ kSIGCountryCode = 0,
+ kSIGOrganization = 1,
+ kSIGStreetAddress = 2,
+ kSIGState = 3,
+ kSIGLocality = 4,
+ kSIGCommonName = 5,
+ kSIGTitle = 6,
+ kSIGOrganizationUnit = 7,
+ kSIGPostalCode = 8
+};
+
+typedef unsigned short SIGNameAttributeType;
+/*
+Certificate status codes returned in SIGCertInfo or SIGSignerInfo from
+either SIGGetCertInfo or SIGGetSignerInfo respectively. kSIGValid means that
+the certificate is currently valid. kSIGPending means the certificate is
+currently not valid - but will be. kSIGExpired means the certificate has
+expired. A time is always associated with a SIGCertStatus. In each case the
+time has a specific interpretation. When the status is kSIGValid the time is
+when the certificate will expire. When the status is kSIGPending the time is
+when the certificate will become valid. When the status is kSIGExpired the time
+is when the certificate expired. In the SIGCertInfo structure, the startDate
+and endDate fields hold the appropriate date information. In the SIGSignerInfo
+structure, this information is provided in the certSetStatusTime field. In the
+SIGSignerInfo struct, the status time is actually represented by the SIGSignatureStatus
+field which can contain any of the types below. NOTE: The only time you will get
+a kSIGInvalid status is when it pertains to a SIGSignatureStatus field and only when
+you get a signature that was created after the certificates expiration date, something
+we are not allowing on the Mac but that may not be restricted on other platforms. Also,
+it will not be possible to get a kSIGPending value for SIGSignatureStatus on the Mac but
+possibly allowed by other platforms.
+*/
+/* Values for SIGCertStatus or SIGSignatureStatus */
+enum {
+ kSIGValid = 0, /* possible for either a SIGCertStatus or SIGSignatureStatus */
+ kSIGPending = 1, /* possible for either a SIGCertStatus or SIGSignatureStatus */
+ kSIGExpired = 2, /* possible for either a SIGCertStatus or SIGSignatureStatus * possible only for a SIGSignatureStatus */
+ kSIGInvalid = 3
+};
+
+typedef unsigned short SIGCertStatus;
+typedef unsigned short SIGSignatureStatus;
+/* Number of bytes needed for a digest record when using SIGDigest */
+enum {
+ kSIGDigestSize = 16
+};
+
+typedef Byte SIGDigestData[16];
+typedef Byte * SIGDigestDataPtr;
+
+struct SIGCertInfo {
+ unsigned long startDate; /* cert start validity date */
+ unsigned long endDate; /* cert end validity date */
+ SIGCertStatus certStatus; /* see comment on SIGCertStatus for definition */
+ unsigned long certAttributeCount; /* number of name attributes in this cert */
+ unsigned long issuerAttributeCount; /* number of name attributes in this certs issuer */
+ Str255 serialNumber; /* cert serial number */
+};
+typedef struct SIGCertInfo SIGCertInfo;
+typedef SIGCertInfo * SIGCertInfoPtr;
+
+struct SIGSignerInfo {
+ unsigned long signingTime; /* time of signing */
+ unsigned long certCount; /* number of certificates in the cert set */
+ unsigned long certSetStatusTime; /* Worst cert status time. See comment on SIGCertStatus for definition */
+ SIGSignatureStatus signatureStatus; /* The status of the signature. See comment on SIGCertStatus for definition*/
+};
+typedef struct SIGSignerInfo SIGSignerInfo;
+typedef SIGSignerInfo * SIGSignerInfoPtr;
+
+struct SIGNameAttributesInfo {
+ Boolean onNewLevel;
+ Boolean filler1;
+ SIGNameAttributeType attributeType;
+ ScriptCode attributeScript;
+ Str255 attribute;
+};
+typedef struct SIGNameAttributesInfo SIGNameAttributesInfo;
+typedef SIGNameAttributesInfo * SIGNameAttributesInfoPtr;
+
+typedef Ptr SIGContextPtr;
+typedef Ptr SIGSignaturePtr;
+/*
+Certificates are always in order. That is, the signers cert is always 0, the
+issuer of the signers cert is always 1 etc... to the number of certificates-1.
+You can use this constant for readability in your code.
+*/
+enum {
+ kSIGSignerCertIndex = 0
+};
+
+/*
+Call back procedure supplied by developer, return false to cancel the current
+process.
+*/
+typedef CALLBACK_API( Boolean , SIGStatusProcPtr )(void );
+typedef STACK_UPP_TYPE(SIGStatusProcPtr) SIGStatusUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(SIGStatusUPP)
+ NewSIGStatusUPP (SIGStatusProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeSIGStatusUPP (SIGStatusUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeSIGStatusUPP (SIGStatusUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppSIGStatusProcInfo = 0x00000010 }; /* pascal 1_byte Func() */
+ #define NewSIGStatusUPP(userRoutine) (SIGStatusUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSIGStatusProcInfo, GetCurrentArchitecture())
+ #define DisposeSIGStatusUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeSIGStatusUPP(userUPP) (Boolean)CALL_ZERO_PARAMETER_UPP((userUPP), uppSIGStatusProcInfo)
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewSIGStatusProc(userRoutine) NewSIGStatusUPP(userRoutine)
+#define CallSIGStatusProc(userRoutine) InvokeSIGStatusUPP(userRoutine)
+/*
+Resource id's of standard signature icon suite, all sizes and colors are available.
+*/
+enum {
+ kSIGSignatureIconResID = -16797,
+ kSIGValidSignatureIconResID = -16799,
+ kSIGInvalidSignatureIconResID = -16798
+};
+
+/* ------------------------------- CONTEXT CALLS -------------------------------
+To use the Digital Signature toolbox you will need a SIGContextPtr. To create
+a SIGContextPtr you simply call SIGNewContext and it will create and initialize
+a context for you. To free the memory occupied by the context and invalidate
+its internal data, call SIGDisposeContext. An initialized context has no notion
+of the type of operation it will be performing however, once you call
+SIGSignPrepare SIGVerifyPrepare, or SIGDigestPrepare, the contexts operation
+type is set and to switch to another type of operation will require creating a
+new context. Be sure to pass the same context to corresponding toolbox calls
+(ie SIGSignPrepare, SIGProcessData, SIGSign) in other words mixing lets say
+signing and verify calls with the same context is not allowed.
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+SIGNewContext (SIGContextPtr * context) FOURWORDINLINE(0x203C, 0x0002, 0x076C, 0xAA5D);
+
+EXTERN_API( OSErr )
+SIGDisposeContext (SIGContextPtr context) FOURWORDINLINE(0x203C, 0x0002, 0x076D, 0xAA5D);
+
+
+/* ------------------------------- SIGNING CALLS -------------------------------
+Once you have created a SIGContextPtr, you create a signature by calling
+SIGSignPrepare once, followed by n calls to SIGProcessData, followed by one call
+toRcpt SIGSign. To create another signature on different data but for the same
+signer, don't dispose of the context and call SIGProcessData for the new data
+followed by a call SIGSign again. In this case the signer will not be prompted
+for their signer and password again as it was already provided. Once you call
+SIGDisposeContext, all signer information will be cleared out of the context and
+the signer will be re-prompted. The signer file FSSpecPtr should be set to nil
+if you want the toolbox to use the last signer by default or prompt for a signer
+if none exists. The prompt parameter can be used to pass a string to be displayed
+in the dialog that prompts the user for their password. If the substring "^1"
+(without the quotes) is in the prompt string, then the toolbox will replace it
+with the name of the signer from the signer selected by the user. If an empty
+string is passed, the following default string will be sent to the toolbox
+"\pSigning as ^1.". You can call any of the utility routines after SIGSignPrepare
+or SIGSign to get information about the signer or certs.
+*/
+EXTERN_API( OSErr )
+SIGSignPrepare (SIGContextPtr context,
+ const FSSpec * signerFile,
+ ConstStr255Param prompt,
+ Size * signatureSize) FOURWORDINLINE(0x203C, 0x0008, 0x076E, 0xAA5D);
+
+EXTERN_API( OSErr )
+SIGSign (SIGContextPtr context,
+ SIGSignaturePtr signature,
+ SIGStatusUPP statusProc) FOURWORDINLINE(0x203C, 0x0006, 0x076F, 0xAA5D);
+
+
+/* ------------------------------- VERIFYING CALLS -------------------------------
+Once you have created a SIGContextPtr, you verify a signature by calling
+SIGVerifyPrepare once, followed by n calls to SIGProcessData, followed by one
+call to SIGVerify. Check the return code from SIGVerify to see if the signature
+verified or not (noErr is returned on success otherwise the appropriate error
+code). Upon successfull verification, you can call any of the utility routines
+toRcpt find out who signed the data.
+*/
+EXTERN_API( OSErr )
+SIGVerifyPrepare (SIGContextPtr context,
+ SIGSignaturePtr signature,
+ Size signatureSize,
+ SIGStatusUPP statusProc) FOURWORDINLINE(0x203C, 0x0008, 0x0770, 0xAA5D);
+
+EXTERN_API( OSErr )
+SIGVerify (SIGContextPtr context) FOURWORDINLINE(0x203C, 0x0002, 0x0771, 0xAA5D);
+
+/* ------------------------------ DIGESTING CALLS ------------------------------
+Once you have created a SIGContextPtr, you create a digest by calling
+SIGDigestPrepare once, followed by n calls to SIGProcessData, followed by one
+call to SIGDigest. You can dispose of the context after SIGDigest as the
+SIGDigestData does not reference back into it. SIGDigest returns the digest in
+digest.
+*/
+EXTERN_API( OSErr )
+SIGDigestPrepare (SIGContextPtr context) FOURWORDINLINE(0x203C, 0x0002, 0x0772, 0xAA5D);
+
+EXTERN_API( OSErr )
+SIGDigest (SIGContextPtr context,
+ SIGDigestData digest) FOURWORDINLINE(0x203C, 0x0004, 0x0773, 0xAA5D);
+
+
+/* ------------------------------ PROCESSING DATA ------------------------------
+To process data during a digest, sign, or verify operation call SIGProcessData
+as many times as necessary and with any sized blocks of data. The data needs to
+be processed in the same order during corresponding sign and verify operations
+but does not need to be processed in the same sized chunks (i.e., the toolbox
+just sees it as a continuous bit stream).
+*/
+EXTERN_API( OSErr )
+SIGProcessData (SIGContextPtr context,
+ const void * data,
+ Size dataSize) FOURWORDINLINE(0x203C, 0x0006, 0x0774, 0xAA5D);
+
+
+/* ------------------------------- UTILITY CALLS -------------------------------
+Given a context that has successfully performed a verification SIGShowSigner
+will display a modal dialog with the entire distinguished name of the person
+who signed the data. the prompt (if supplied) will appear at the top of the
+dialog. If no prompt is specified, the default prompt "\pVerification
+Successfull." will appear.
+
+Given a context that has been populated by calling SIGSignPrepare, SIGSign or a
+successful SIGVerify, you can make the remaining utility calls:
+
+SIGGetSignerInfo will return the SignerInfo record. The certCount can be used
+toRcpt index into the certificate set when calling SIGGetCertInfo,
+SIGGetCertNameAttributes or SIGGetCertIssuerNameAttributes. The signingTime is
+only defined if the call is made after SIGSign or SIGVerify. The certSetStatus
+will tell you the best status of the entire certificate set while
+certSetStatusTime will correspond to the time associated with that status (see
+definitions above).
+
+SIGGetCertInfo will return the SIGCertInfo record when given a valid index into
+the cert set in certIndex. Note: The cert at index kSIGSignerCertIndex is
+always the signers certificate. The serial number, start date and end date
+are there should you wish to display that info. The certAttributeCount and
+issuerAttributeCount provide the number of parts in the name of that certificate
+or that certificates issuer respectively. You use these numbers to index into
+either SIGGetCertNameAttributes or SIGGetCertIssuerNameAttributes to retrieve
+the name. The certStatus will tell you the status of the certificate while
+certStatusTime will correspond to the time associated with that status (see
+definitions above).
+
+SIGGetCertNameAttributes and SIGGetCertIssuerNameAttributes return name parts
+of the certificate at certIndex and attributeIndex. The newLevel return value
+tells you wether the name attribute returned is at the same level in the name
+hierarchy as the previous attribute. The type return value tells you the type
+of attribute returned. nameAttribute is the actual string containing the name
+attribute. So, if you wanted to display the entire distinguished name of the
+person who's signature was just validated you could do something like this;
+
+ (...... variable declarations and verification code would preceed this sample ......)
+
+ error = SIGGetCertInfo(verifyContext, kSIGSignerCertIndex, &certInfo);
+ HandleErr(error);
+
+ for (i = 0; i <= certInfo.certAttributeCount-1; i++)
+ {
+ error = SIGGetCertNameAttributes(
+ verifyContext, kSIGSignerCertIndex, i, &newLevel, &type, theAttribute);
+ HandleErr(error);
+ DisplayNamePart(theAttribute, type, newLevel);
+ }
+*/
+EXTERN_API( OSErr )
+SIGShowSigner (SIGContextPtr context,
+ ConstStr255Param prompt) FOURWORDINLINE(0x203C, 0x0004, 0x0775, 0xAA5D);
+
+EXTERN_API( OSErr )
+SIGGetSignerInfo (SIGContextPtr context,
+ SIGSignerInfo * signerInfo) FOURWORDINLINE(0x203C, 0x0004, 0x0776, 0xAA5D);
+
+EXTERN_API( OSErr )
+SIGGetCertInfo (SIGContextPtr context,
+ unsigned long certIndex,
+ SIGCertInfo * certInfo) FOURWORDINLINE(0x203C, 0x0006, 0x0777, 0xAA5D);
+
+EXTERN_API( OSErr )
+SIGGetCertNameAttributes (SIGContextPtr context,
+ unsigned long certIndex,
+ unsigned long attributeIndex,
+ SIGNameAttributesInfo * attributeInfo) FOURWORDINLINE(0x203C, 0x0008, 0x0778, 0xAA5D);
+
+EXTERN_API( OSErr )
+SIGGetCertIssuerNameAttributes (SIGContextPtr context,
+ unsigned long certIndex,
+ unsigned long attributeIndex,
+ SIGNameAttributesInfo * attributeInfo) FOURWORDINLINE(0x203C, 0x0008, 0x0779, 0xAA5D);
+
+
+
+/* --------------------------- FILE SIGN & VERIFY CALLS --------------------------
+These calls allow you to detect the presence of a standard signtaure in a file as
+well as sign and verify files in a standard way. An example of this is the Finder,
+which uses these calls to allow the user to "drop sign" a file.
+
+To detect if a file is signed in the standard way, pass the FSSpec of the file to SIGFileIsSigned.
+A result of noErr means the file is in fact signed, otherwise, a kSIGNoSignature error will
+be returned.
+
+Once you have created a SIGContextPtr, you can make calls to either sign or verify a file in
+a standard way:
+
+To sign a file, call SIGSignPrepare followed by 'n' number of calls to SIGSignFile,
+passing it the file spec for each file you wish to sign in turn. You supply the context, the signature
+size that was returned from SIGSignPrepare and an optional call back proc. The call will take care of all
+the processing of data and affixing the signature to the file. If a signature already exists in the file,
+it is replaced with the newly created signature.
+
+To verify a file that was signed using SIGSignFile, call SIGVerifyFile passing it a new context and
+the file spec. Once this call has completed, if the verification is successfull, you can pass the context
+to SIGShowSigner to display the name of the person who signed the file.
+*/
+EXTERN_API( OSErr )
+SIGFileIsSigned (const FSSpec * fileSpec) FOURWORDINLINE(0x203C, 0x0002, 0x09C4, 0xAA5D);
+
+EXTERN_API( OSErr )
+SIGSignFile (SIGContextPtr context,
+ Size signatureSize,
+ const FSSpec * fileSpec,
+ SIGStatusUPP statusProc) FOURWORDINLINE(0x203C, 0x0008, 0x09C5, 0xAA5D);
+
+EXTERN_API( OSErr )
+SIGVerifyFile (SIGContextPtr context,
+ const FSSpec * fileSpec,
+ SIGStatusUPP statusProc) FOURWORDINLINE(0x203C, 0x0006, 0x09C6, 0xAA5D);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __DIGITALSIGNATURE__ */
+
diff --git a/include/qt/DiskInit.h b/include/qt/DiskInit.h
new file mode 100644
index 000000000..cedd94b6c
--- /dev/null
+++ b/include/qt/DiskInit.h
@@ -0,0 +1,161 @@
+/*
+ File: DiskInit.h
+
+ Contains: Disk Initialization Package ('PACK' 2) Interfaces.
+
+ Version: Technology: System 8.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __DISKINIT__
+#define __DISKINIT__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+
+struct HFSDefaults {
+ char sigWord[2]; /* signature word */
+ long abSize; /* allocation block size in bytes */
+ long clpSize; /* clump size in bytes */
+ long nxFreeFN; /* next free file number */
+ long btClpSize; /* B-Tree clump size in bytes */
+ short rsrv1; /* reserved */
+ short rsrv2; /* reserved */
+ short rsrv3; /* reserved */
+};
+typedef struct HFSDefaults HFSDefaults;
+enum {
+ kHFSPlusDefaultsVersion = 1
+};
+
+
+struct HFSPlusDefaults {
+ UInt16 version; /* version of this structure */
+ UInt16 flags; /* currently undefined; pass zero */
+ UInt32 blockSize; /* allocation block size in bytes */
+ UInt32 rsrcClumpSize; /* clump size for resource forks */
+ UInt32 dataClumpSize; /* clump size for data forks */
+ UInt32 nextFreeFileID; /* next free file number */
+ UInt32 catalogClumpSize; /* clump size for catalog B-tree */
+ UInt32 catalogNodeSize; /* node size for catalog B-tree */
+ UInt32 extentsClumpSize; /* clump size for extents B-tree */
+ UInt32 extentsNodeSize; /* node size for extents B-tree */
+ UInt32 attributesClumpSize; /* clump size for attributes B-tree */
+ UInt32 attributesNodeSize; /* node size for attributes B-tree */
+ UInt32 allocationClumpSize; /* clump size for allocation bitmap file */
+};
+typedef struct HFSPlusDefaults HFSPlusDefaults;
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+DILoad (void) THREEWORDINLINE(0x7002, 0x3F00, 0xA9E9);
+
+EXTERN_API( void )
+DIUnload (void) THREEWORDINLINE(0x7004, 0x3F00, 0xA9E9);
+
+EXTERN_API( short )
+DIBadMount (Point where,
+ UInt32 evtMessage) THREEWORDINLINE(0x7000, 0x3F00, 0xA9E9);
+
+EXTERN_API( OSErr )
+DIFormat (short drvNum) THREEWORDINLINE(0x7006, 0x3F00, 0xA9E9);
+
+EXTERN_API( OSErr )
+DIVerify (short drvNum) THREEWORDINLINE(0x7008, 0x3F00, 0xA9E9);
+
+EXTERN_API( OSErr )
+DIZero (short drvNum,
+ ConstStr255Param volName) THREEWORDINLINE(0x700A, 0x3F00, 0xA9E9);
+
+/*
+ DIXFormat, DIXZero, and DIReformat are only available when FSM (File System Manager) is installed.
+ FSM is part of Macintosh PC Exchange and System 7.5.
+*/
+EXTERN_API( OSErr )
+DIXFormat (short drvNum,
+ Boolean fmtFlag,
+ unsigned long fmtArg,
+ unsigned long * actSize) THREEWORDINLINE(0x700C, 0x3F00, 0xA9E9);
+
+EXTERN_API( OSErr )
+DIXZero (short drvNum,
+ ConstStr255Param volName,
+ short fsid,
+ short mediaStatus,
+ short volTypeSelector,
+ unsigned long volSize,
+ void * extendedInfoPtr) THREEWORDINLINE(0x700E, 0x3F00, 0xA9E9);
+
+EXTERN_API( OSErr )
+DIReformat (short drvNum,
+ short fsid,
+ ConstStr255Param volName,
+ ConstStr255Param msgText) THREEWORDINLINE(0x7010, 0x3F00, 0xA9E9);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSErr )
+dibadmount (Point * where,
+ long evtMessage);
+
+EXTERN_API_C( OSErr )
+dizero (short drvnum,
+ const char * volName);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __DISKINIT__ */
+
diff --git a/include/qt/Disks.h b/include/qt/Disks.h
new file mode 100644
index 000000000..99de6c3ce
--- /dev/null
+++ b/include/qt/Disks.h
@@ -0,0 +1,170 @@
+/*
+ File: Disks.h
+
+ Contains: Disk Driver Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __DISKS__
+#define __DISKS__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __OSUTILS__
+#include "OSUtils.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ sony = 0,
+ hard20 = 1
+};
+
+/* Disk Driver Status csCodes */
+enum {
+ kReturnFormatList = 6, /* .Sony */
+ kDriveStatus = 8,
+ kMFMStatus = 10
+};
+
+/* Disk Driver Control csCodes */
+enum {
+ kVerify = 5,
+ kFormat = 6,
+ kEject = 7,
+ kSetTagBuffer = 8, /* .Sony */
+ kTrackCache = 9, /* .Sony */
+ kDriveIcon = 21,
+ kMediaIcon = 22,
+ kDriveInfo = 23,
+ kRawTrack = 18244 /* .Sony: "diagnostic" raw track dump */
+};
+
+/*
+ Note:
+
+ qLink is usually the first field in queues, but back in the MacPlus
+ days, the DrvSts record needed to be expanded. In order to do this without
+ breaking disk drivers that already added stuff to the end, the fields
+ where added to the beginning. This was originally done in assembly language
+ and the record was defined to start at a negative offset, so that the qLink
+ field would end up at offset zero. When the C and pascal interfaces where
+ made, they could not support negative record offsets, so qLink was no longer
+ the first field. Universal Interfaces are auto generated and don't support
+ negative offsets for any language, so DrvSts in Disks.a has qLinks at a
+ none zero offset. Assembly code which switches to Universal Interfaces will
+ need to compensate for that.
+
+*/
+
+
+struct DrvSts {
+ short track; /* current track */
+ char writeProt; /* bit 7 = 1 if volume is locked */
+ char diskInPlace; /* disk in drive */
+ char installed; /* drive installed */
+ char sides; /* -1 for 2-sided, 0 for 1-sided */
+ QElemPtr qLink; /* next queue entry */
+ short qType; /* 1 for HD20 */
+ short dQDrive; /* drive number */
+ short dQRefNum; /* driver reference number */
+ short dQFSID; /* file system ID */
+ char twoSideFmt; /* after 1st rd/wrt: 0=1 side, -1=2 side */
+ char needsFlush; /* -1 for MacPlus drive */
+ short diskErrs; /* soft error count */
+};
+typedef struct DrvSts DrvSts;
+
+struct DrvSts2 {
+ short track;
+ char writeProt;
+ char diskInPlace;
+ char installed;
+ char sides;
+ QElemPtr qLink;
+ short qType;
+ short dQDrive;
+ short dQRefNum;
+ short dQFSID;
+ short driveSize;
+ short driveS1;
+ short driveType;
+ short driveManf;
+ short driveChar;
+ char driveMisc;
+};
+typedef struct DrvSts2 DrvSts2;
+enum {
+ kdqManualEjectBit = 5
+};
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+DiskEject (short drvNum);
+
+EXTERN_API( OSErr )
+SetTagBuffer (void * buffPtr);
+
+EXTERN_API( OSErr )
+DriveStatus (short drvNum,
+ DrvSts * status);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __DISKS__ */
+
diff --git a/include/qt/Displays.h b/include/qt/Displays.h
new file mode 100644
index 000000000..8d6baa337
--- /dev/null
+++ b/include/qt/Displays.h
@@ -0,0 +1,783 @@
+/*
+ File: Displays.h
+
+ Contains: Display Manager Interfaces.
+
+ Version: Technology: Mac OS 8
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1993-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __DISPLAYS__
+#define __DISPLAYS__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __COMPONENTS__
+#include "Components.h"
+#endif
+
+#ifndef __VIDEO__
+#include "Video.h"
+#endif
+
+
+#ifndef __APPLEEVENTS__
+#include "AppleEvents.h"
+#endif
+
+#ifndef __EVENTS__
+#include "Events.h"
+#endif
+
+#ifndef __PROCESSES__
+#include "Processes.h"
+#endif
+
+#ifndef __DIALOGS__
+#include "Dialogs.h"
+#endif
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ /* AppleEvents Core Suite */
+ kAESystemConfigNotice = FOUR_CHAR_CODE('cnfg'), /* Core Suite types */
+ kAEDisplayNotice = FOUR_CHAR_CODE('dspl'),
+ kAEDisplaySummary = FOUR_CHAR_CODE('dsum'),
+ keyDMConfigVersion = FOUR_CHAR_CODE('dmcv'),
+ keyDMConfigFlags = FOUR_CHAR_CODE('dmcf'),
+ keyDMConfigReserved = FOUR_CHAR_CODE('dmcr'),
+ keyDisplayID = FOUR_CHAR_CODE('dmid'),
+ keyDisplayComponent = FOUR_CHAR_CODE('dmdc'),
+ keyDisplayDevice = FOUR_CHAR_CODE('dmdd'),
+ keyDisplayFlags = FOUR_CHAR_CODE('dmdf'),
+ keyDisplayMode = FOUR_CHAR_CODE('dmdm'),
+ keyDisplayModeReserved = FOUR_CHAR_CODE('dmmr'),
+ keyDisplayReserved = FOUR_CHAR_CODE('dmdr'),
+ keyDisplayMirroredId = FOUR_CHAR_CODE('dmmi'),
+ keyDeviceFlags = FOUR_CHAR_CODE('dddf'),
+ keyDeviceDepthMode = FOUR_CHAR_CODE('dddm'),
+ keyDeviceRect = FOUR_CHAR_CODE('dddr'),
+ keyPixMapRect = FOUR_CHAR_CODE('dpdr'),
+ keyPixMapHResolution = FOUR_CHAR_CODE('dphr'),
+ keyPixMapVResolution = FOUR_CHAR_CODE('dpvr'),
+ keyPixMapPixelType = FOUR_CHAR_CODE('dppt'),
+ keyPixMapPixelSize = FOUR_CHAR_CODE('dpps'),
+ keyPixMapCmpCount = FOUR_CHAR_CODE('dpcc'),
+ keyPixMapCmpSize = FOUR_CHAR_CODE('dpcs'),
+ keyPixMapAlignment = FOUR_CHAR_CODE('dppa'),
+ keyPixMapResReserved = FOUR_CHAR_CODE('dprr'),
+ keyPixMapReserved = FOUR_CHAR_CODE('dppr'),
+ keyPixMapColorTableSeed = FOUR_CHAR_CODE('dpct'),
+ keySummaryMenubar = FOUR_CHAR_CODE('dsmb'),
+ keySummaryChanges = FOUR_CHAR_CODE('dsch'),
+ keyDisplayOldConfig = FOUR_CHAR_CODE('dold'),
+ keyDisplayNewConfig = FOUR_CHAR_CODE('dnew')
+};
+
+enum {
+ dmOnlyActiveDisplays = true,
+ dmAllDisplays = false
+};
+
+
+enum {
+ /* DMSendDependentNotification notifyClass */
+ kDependentNotifyClassShowCursor = FOUR_CHAR_CODE('shcr'), /* When display mgr shows a hidden cursor during an unmirror */
+ kDependentNotifyClassDriverOverride = FOUR_CHAR_CODE('ndrv'), /* When a driver is overridden */
+ kDependentNotifyClassDisplayMgrOverride = FOUR_CHAR_CODE('dmgr'), /* When display manager is upgraded */
+ kDependentNotifyClassProfileChanged = FOUR_CHAR_CODE('prof') /* When DMSetProfileByAVID is called */
+};
+
+
+enum {
+ /* Switch Flags */
+ kNoSwitchConfirmBit = 0, /* Flag indicating that there is no need to confirm a switch to this mode */
+ kDepthNotAvailableBit = 1, /* Current depth not available in new mode */
+ kShowModeBit = 3, /* Show this mode even though it requires a confirm. */
+ kModeNotResizeBit = 4, /* Do not use this mode to resize display (for cards that mode drives a different connector). */
+ kNeverShowModeBit = 5 /* This mode should not be shown in the user interface. */
+};
+
+/* Summary Change Flags (sticky bits indicating an operation was performed)
+ For example, moving a display then moving it back will still set the kMovedDisplayBit.
+*/
+enum {
+ kBeginEndConfigureBit = 0,
+ kMovedDisplayBit = 1,
+ kSetMainDisplayBit = 2,
+ kSetDisplayModeBit = 3,
+ kAddDisplayBit = 4,
+ kRemoveDisplayBit = 5,
+ kNewDisplayBit = 6,
+ kDisposeDisplayBit = 7,
+ kEnabledDisplayBit = 8,
+ kDisabledDisplayBit = 9,
+ kMirrorDisplayBit = 10,
+ kUnMirrorDisplayBit = 11
+};
+
+
+enum {
+ /* Notification Messages for extended call back routines */
+ kDMNotifyRequestConnectionProbe = 0, /* Like kDMNotifyRequestDisplayProbe only not for smart displays (used in wake before all busses are awake) */
+ kDMNotifyInstalled = 1, /* At install time */
+ kDMNotifyEvent = 2, /* Post change time */
+ kDMNotifyRemoved = 3, /* At remove time */
+ kDMNotifyPrep = 4, /* Pre change time */
+ kDMNotifyExtendEvent = 5, /* Allow registrees to extend apple event before it is sent */
+ kDMNotifyDependents = 6, /* Minor notification check without full update */
+ kDMNotifySuspendConfigure = 7, /* Temporary end of configuration */
+ kDMNotifyResumeConfigure = 8, /* Resume configuration */
+ kDMNotifyRequestDisplayProbe = 9, /* Request smart displays re-probe (used in sleep and hot plugging) */
+ /* Notification Flags */
+ kExtendedNotificationProc = (1L << 16)
+};
+
+
+/* types for notifyType */
+enum {
+ kFullNotify = 0, /* This is the appleevent whole nine yards notify */
+ kFullDependencyNotify = 1 /* Only sends to those who want to know about interrelated functionality (used for updating UI) */
+};
+
+/* DisplayID/DeviceID constants */
+enum {
+ kDummyDeviceID = 0x00FF, /* This is the ID of the dummy display, used when the last "real" display is disabled.*/
+ kInvalidDisplayID = 0x0000, /* This is the invalid ID*/
+ kFirstDisplayID = 0x0100
+};
+
+enum {
+ /* bits for panelListFlags */
+ kAllowDuplicatesBit = 0
+};
+
+enum {
+ /* bits for nameFlags */
+ kSuppressNumberBit = 0,
+ kSuppressNumberMask = 1,
+ kForceNumberBit = 1,
+ kForceNumberMask = 2,
+ kSuppressNameBit = 2,
+ kSuppressNameMask = 4
+};
+
+
+
+/* Constants for fidelity checks */
+enum {
+ kNoFidelity = 0,
+ kMinimumFidelity = 1,
+ kDefaultFidelity = 500, /* I'm just picking a number for Apple default panels and engines*/
+ kDefaultManufacturerFidelity = 1000 /* I'm just picking a number for Manufacturer's panels and engines (overrides apple defaults)*/
+};
+
+enum {
+ kAnyPanelType = 0, /* Pass to DMNewEngineList for list of all panels (as opposed to specific types)*/
+ kAnyEngineType = 0, /* Pass to DMNewEngineList for list of all engines*/
+ kAnyDeviceType = 0, /* Pass to DMNewDeviceList for list of all devices*/
+ kAnyPortType = 0 /* Pass to DMNewDevicePortList for list of all devices*/
+};
+
+/* portListFlags for DM_NewDevicePortList */
+enum {
+ /* Should offline devices be put into the port list (such as dummy display) */
+ kPLIncludeOfflineDevicesBit = 0
+};
+
+
+/* confirmFlags for DMConfirmConfiguration */
+enum {
+ kForceConfirmBit = 0, /* Force a confirm dialog */
+ kForceConfirmMask = (1 << kForceConfirmBit)
+};
+
+
+/* Flags for displayModeFlags */
+enum {
+ kDisplayModeListNotPreferredBit = 0,
+ kDisplayModeListNotPreferredMask = (1 << kDisplayModeListNotPreferredBit)
+};
+
+
+/* Flags for itemFlags */
+enum {
+ kComponentListNotPreferredBit = 0,
+ kComponentListNotPreferredMask = (1 << kComponentListNotPreferredBit)
+};
+
+enum {
+ kDisplayTimingInfoVersionZero = 1,
+ kDisplayTimingInfoReservedCountVersionZero = 16,
+ kDisplayModeEntryVersionZero = 0, /* displayModeVersion - original version*/
+ kDisplayModeEntryVersionOne = 1 /* displayModeVersion - added displayModeOverrideInfo*/
+};
+
+
+enum {
+ kMakeAndModelReservedCount = 4 /* Number of reserved fields*/
+};
+
+typedef unsigned long DMFidelityType;
+/*
+ AVID is an ID for ports and devices the old DisplayID type
+ is carried on for compatibility
+*/
+
+typedef unsigned long AVIDType;
+typedef AVIDType DisplayIDType;
+typedef void * DMListType;
+typedef unsigned long DMListIndexType;
+typedef VDPowerStateRec AVPowerStateRec;
+typedef VDPowerStateRec * AVPowerStatePtr;
+
+struct DMDisplayTimingInfoRec {
+ UInt32 timingInfoVersion;
+ UInt32 timingInfoAttributes; /* Flags */
+ SInt32 timingInfoRelativeQuality; /* quality of the timing */
+ SInt32 timingInfoRelativeDefault; /* relative default of the timing */
+
+ UInt32 timingInfoReserved[16]; /* Reserved */
+};
+typedef struct DMDisplayTimingInfoRec DMDisplayTimingInfoRec;
+
+typedef DMDisplayTimingInfoRec * DMDisplayTimingInfoPtr;
+
+
+struct DMComponentListEntryRec {
+ DisplayIDType itemID; /* DisplayID Manager*/
+ Component itemComponent; /* Component Manager*/
+ ComponentDescription itemDescription; /* We can always construct this if we use something beyond the compontent mgr.*/
+
+ ResType itemClass; /* Class of group to put this panel (eg geometry/color/etc for panels, brightness/contrast for engines, video out/sound/etc for devices)*/
+ DMFidelityType itemFidelity; /* How good is this item for the specified search?*/
+ ResType itemSubClass; /* Subclass of group to put this panel. Can use to do sub-grouping (eg volume for volume panel and mute panel)*/
+ Point itemSort; /* Set to 0 - future to sort the items in a sub group.*/
+
+ unsigned long itemFlags; /* Set to 0 (future expansion)*/
+ ResType itemReserved; /* What kind of code does the itemReference point to (right now - kPanelEntryTypeComponentMgr only)*/
+ unsigned long itemFuture1; /* Set to 0 (future expansion - probably an alternate code style)*/
+ unsigned long itemFuture2; /* Set to 0 (future expansion - probably an alternate code style)*/
+ unsigned long itemFuture3; /* Set to 0 (future expansion - probably an alternate code style)*/
+ unsigned long itemFuture4; /* Set to 0 (future expansion - probably an alternate code style)*/
+};
+typedef struct DMComponentListEntryRec DMComponentListEntryRec;
+
+typedef DMComponentListEntryRec * DMComponentListEntryPtr;
+/* ooo Move AVLocationRec to AVComponents.i AFTER AVComponents.i is created*/
+
+struct AVLocationRec {
+ unsigned long locationConstant; /* Set to 0 (future expansion - probably an alternate code style)*/
+};
+typedef struct AVLocationRec AVLocationRec;
+
+typedef AVLocationRec * AVLocationPtr;
+
+struct DMDepthInfoRec {
+ VDSwitchInfoPtr depthSwitchInfo; /* This is the switch mode to choose this timing/depth */
+ VPBlockPtr depthVPBlock; /* VPBlock (including size, depth and format) */
+ UInt32 depthFlags; /* VDVideoParametersInfoRec.csDepthFlags */
+ UInt32 depthReserved1; /* Reserved */
+ UInt32 depthReserved2; /* Reserved */
+};
+typedef struct DMDepthInfoRec DMDepthInfoRec;
+
+typedef DMDepthInfoRec * DMDepthInfoPtr;
+
+struct DMDepthInfoBlockRec {
+ unsigned long depthBlockCount; /* How many depths are there? */
+ DMDepthInfoPtr depthVPBlock; /* Array of DMDepthInfoRec */
+ unsigned long depthBlockFlags; /* Reserved */
+ unsigned long depthBlockReserved1; /* Reserved */
+ unsigned long depthBlockReserved2; /* Reserved */
+};
+typedef struct DMDepthInfoBlockRec DMDepthInfoBlockRec;
+
+typedef DMDepthInfoBlockRec * DMDepthInfoBlockPtr;
+
+struct DMDisplayModeListEntryRec {
+ UInt32 displayModeFlags;
+ VDSwitchInfoPtr displayModeSwitchInfo;
+ VDResolutionInfoPtr displayModeResolutionInfo;
+ VDTimingInfoPtr displayModeTimingInfo;
+ DMDepthInfoBlockPtr displayModeDepthBlockInfo; /* Information about all the depths*/
+ UInt32 displayModeVersion; /* What version is this record (now kDisplayModeEntryVersionOne)*/
+ StringPtr displayModeName; /* Name of the timing mode*/
+ DMDisplayTimingInfoPtr displayModeDisplayInfo; /* Information from the display.*/
+};
+typedef struct DMDisplayModeListEntryRec DMDisplayModeListEntryRec;
+
+typedef DMDisplayModeListEntryRec * DMDisplayModeListEntryPtr;
+
+
+struct DependentNotifyRec {
+ ResType notifyType; /* What type was the engine that made the change (may be zero)*/
+ ResType notifyClass; /* What class was the change (eg geometry, color etc)*/
+ DisplayIDType notifyPortID; /* Which device was touched (kInvalidDisplayID -> all or none)*/
+ ComponentInstance notifyComponent; /* What engine did it (may be 0)?*/
+
+ unsigned long notifyVersion; /* Set to 0 (future expansion)*/
+ unsigned long notifyFlags; /* Set to 0 (future expansion)*/
+ unsigned long notifyReserved; /* Set to 0 (future expansion)*/
+ unsigned long notifyFuture; /* Set to 0 (future expansion)*/
+};
+typedef struct DependentNotifyRec DependentNotifyRec;
+
+typedef DependentNotifyRec * DependentNotifyPtr;
+
+
+struct DMMakeAndModelRec {
+ ResType manufacturer;
+ UInt32 model;
+ UInt32 serialNumber;
+ UInt32 manufactureDate;
+
+ UInt32 makeReserved[4];
+};
+typedef struct DMMakeAndModelRec DMMakeAndModelRec;
+
+typedef DMMakeAndModelRec * DMMakeAndModelPtr;
+typedef CALLBACK_API( void , DMNotificationProcPtr )(AppleEvent *theEvent);
+typedef CALLBACK_API( void , DMExtendedNotificationProcPtr )(void *userData, short theMessage, void *notifyData);
+typedef CALLBACK_API( void , DMComponentListIteratorProcPtr )(void *userData, DMListIndexType itemIndex, DMComponentListEntryPtr componentInfo);
+typedef CALLBACK_API( void , DMDisplayModeListIteratorProcPtr )(void *userData, DMListIndexType itemIndex, DMDisplayModeListEntryPtr displaymodeInfo);
+typedef STACK_UPP_TYPE(DMNotificationProcPtr) DMNotificationUPP;
+typedef STACK_UPP_TYPE(DMExtendedNotificationProcPtr) DMExtendedNotificationUPP;
+typedef STACK_UPP_TYPE(DMComponentListIteratorProcPtr) DMComponentListIteratorUPP;
+typedef STACK_UPP_TYPE(DMDisplayModeListIteratorProcPtr) DMDisplayModeListIteratorUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(DMNotificationUPP)
+ NewDMNotificationUPP (DMNotificationProcPtr userRoutine);
+
+ EXTERN_API(DMExtendedNotificationUPP)
+ NewDMExtendedNotificationUPP (DMExtendedNotificationProcPtr userRoutine);
+
+ EXTERN_API(DMComponentListIteratorUPP)
+ NewDMComponentListIteratorUPP (DMComponentListIteratorProcPtr userRoutine);
+
+ EXTERN_API(DMDisplayModeListIteratorUPP)
+ NewDMDisplayModeListIteratorUPP (DMDisplayModeListIteratorProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeDMNotificationUPP (DMNotificationUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeDMExtendedNotificationUPP (DMExtendedNotificationUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeDMComponentListIteratorUPP (DMComponentListIteratorUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeDMDisplayModeListIteratorUPP (DMDisplayModeListIteratorUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeDMNotificationUPP (AppleEvent * theEvent,
+ DMNotificationUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeDMExtendedNotificationUPP (void * userData,
+ short theMessage,
+ void * notifyData,
+ DMExtendedNotificationUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeDMComponentListIteratorUPP (void * userData,
+ DMListIndexType itemIndex,
+ DMComponentListEntryPtr componentInfo,
+ DMComponentListIteratorUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeDMDisplayModeListIteratorUPP (void * userData,
+ DMListIndexType itemIndex,
+ DMDisplayModeListEntryPtr displaymodeInfo,
+ DMDisplayModeListIteratorUPP userUPP);
+
+#else
+ enum { uppDMNotificationProcInfo = 0x000000C0 }; /* pascal no_return_value Func(4_bytes) */
+ enum { uppDMExtendedNotificationProcInfo = 0x00000EC0 }; /* pascal no_return_value Func(4_bytes, 2_bytes, 4_bytes) */
+ enum { uppDMComponentListIteratorProcInfo = 0x00000FC0 }; /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppDMDisplayModeListIteratorProcInfo = 0x00000FC0 }; /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes) */
+ #define NewDMNotificationUPP(userRoutine) (DMNotificationUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDMNotificationProcInfo, GetCurrentArchitecture())
+ #define NewDMExtendedNotificationUPP(userRoutine) (DMExtendedNotificationUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDMExtendedNotificationProcInfo, GetCurrentArchitecture())
+ #define NewDMComponentListIteratorUPP(userRoutine) (DMComponentListIteratorUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDMComponentListIteratorProcInfo, GetCurrentArchitecture())
+ #define NewDMDisplayModeListIteratorUPP(userRoutine) (DMDisplayModeListIteratorUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDMDisplayModeListIteratorProcInfo, GetCurrentArchitecture())
+ #define DisposeDMNotificationUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeDMExtendedNotificationUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeDMComponentListIteratorUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeDMDisplayModeListIteratorUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeDMNotificationUPP(theEvent, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppDMNotificationProcInfo, (theEvent))
+ #define InvokeDMExtendedNotificationUPP(userData, theMessage, notifyData, userUPP) CALL_THREE_PARAMETER_UPP((userUPP), uppDMExtendedNotificationProcInfo, (userData), (theMessage), (notifyData))
+ #define InvokeDMComponentListIteratorUPP(userData, itemIndex, componentInfo, userUPP) CALL_THREE_PARAMETER_UPP((userUPP), uppDMComponentListIteratorProcInfo, (userData), (itemIndex), (componentInfo))
+ #define InvokeDMDisplayModeListIteratorUPP(userData, itemIndex, displaymodeInfo, userUPP) CALL_THREE_PARAMETER_UPP((userUPP), uppDMDisplayModeListIteratorProcInfo, (userData), (itemIndex), (displaymodeInfo))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewDMNotificationProc(userRoutine) NewDMNotificationUPP(userRoutine)
+#define NewDMExtendedNotificationProc(userRoutine) NewDMExtendedNotificationUPP(userRoutine)
+#define NewDMComponentListIteratorProc(userRoutine) NewDMComponentListIteratorUPP(userRoutine)
+#define NewDMDisplayModeListIteratorProc(userRoutine) NewDMDisplayModeListIteratorUPP(userRoutine)
+#define CallDMNotificationProc(userRoutine, theEvent) InvokeDMNotificationUPP(theEvent, userRoutine)
+#define CallDMExtendedNotificationProc(userRoutine, userData, theMessage, notifyData) InvokeDMExtendedNotificationUPP(userData, theMessage, notifyData, userRoutine)
+#define CallDMComponentListIteratorProc(userRoutine, userData, itemIndex, componentInfo) InvokeDMComponentListIteratorUPP(userData, itemIndex, componentInfo, userRoutine)
+#define CallDMDisplayModeListIteratorProc(userRoutine, userData, itemIndex, displaymodeInfo) InvokeDMDisplayModeListIteratorUPP(userData, itemIndex, displaymodeInfo, userRoutine)
+
+EXTERN_API( GDHandle )
+DMGetFirstScreenDevice (Boolean activeOnly) TWOWORDINLINE(0x7000, 0xABEB);
+
+EXTERN_API( GDHandle )
+DMGetNextScreenDevice (GDHandle theDevice,
+ Boolean activeOnly) TWOWORDINLINE(0x7001, 0xABEB);
+
+EXTERN_API( void )
+DMDrawDesktopRect (Rect * globalRect) TWOWORDINLINE(0x7002, 0xABEB);
+
+EXTERN_API( void )
+DMDrawDesktopRegion (RgnHandle globalRgn) TWOWORDINLINE(0x7003, 0xABEB);
+
+
+
+EXTERN_API( OSErr )
+DMBeginConfigureDisplays (Handle * displayState) THREEWORDINLINE(0x303C, 0x0206, 0xABEB);
+
+EXTERN_API( OSErr )
+DMEndConfigureDisplays (Handle displayState) THREEWORDINLINE(0x303C, 0x0207, 0xABEB);
+
+EXTERN_API( OSErr )
+DMAddDisplay (GDHandle newDevice,
+ short driver,
+ unsigned long mode,
+ unsigned long reserved,
+ unsigned long displayID,
+ Component displayComponent,
+ Handle displayState) THREEWORDINLINE(0x303C, 0x0D08, 0xABEB);
+
+EXTERN_API( OSErr )
+DMMoveDisplay (GDHandle moveDevice,
+ short x,
+ short y,
+ Handle displayState) THREEWORDINLINE(0x303C, 0x0609, 0xABEB);
+
+EXTERN_API( OSErr )
+DMDisableDisplay (GDHandle disableDevice,
+ Handle displayState) THREEWORDINLINE(0x303C, 0x040A, 0xABEB);
+
+EXTERN_API( OSErr )
+DMEnableDisplay (GDHandle enableDevice,
+ Handle displayState) THREEWORDINLINE(0x303C, 0x040B, 0xABEB);
+
+EXTERN_API( OSErr )
+DMRemoveDisplay (GDHandle removeDevice,
+ Handle displayState) THREEWORDINLINE(0x303C, 0x040C, 0xABEB);
+
+
+
+
+EXTERN_API( OSErr )
+DMSetMainDisplay (GDHandle newMainDevice,
+ Handle displayState) THREEWORDINLINE(0x303C, 0x0410, 0xABEB);
+
+EXTERN_API( OSErr )
+DMSetDisplayMode (GDHandle theDevice,
+ unsigned long mode,
+ unsigned long * depthMode,
+ unsigned long reserved,
+ Handle displayState) THREEWORDINLINE(0x303C, 0x0A11, 0xABEB);
+
+EXTERN_API( OSErr )
+DMCheckDisplayMode (GDHandle theDevice,
+ unsigned long mode,
+ unsigned long depthMode,
+ unsigned long * switchFlags,
+ unsigned long reserved,
+ Boolean * modeOk) THREEWORDINLINE(0x303C, 0x0C12, 0xABEB);
+
+EXTERN_API( OSErr )
+DMGetDeskRegion (RgnHandle * desktopRegion) THREEWORDINLINE(0x303C, 0x0213, 0xABEB);
+
+EXTERN_API( OSErr )
+DMRegisterNotifyProc (DMNotificationUPP notificationProc,
+ ProcessSerialNumberPtr whichPSN) THREEWORDINLINE(0x303C, 0x0414, 0xABEB);
+
+EXTERN_API( OSErr )
+DMRemoveNotifyProc (DMNotificationUPP notificationProc,
+ ProcessSerialNumberPtr whichPSN) THREEWORDINLINE(0x303C, 0x0415, 0xABEB);
+
+EXTERN_API( OSErr )
+DMQDIsMirroringCapable (Boolean * qdIsMirroringCapable) THREEWORDINLINE(0x303C, 0x0216, 0xABEB);
+
+EXTERN_API( OSErr )
+DMCanMirrorNow (Boolean * canMirrorNow) THREEWORDINLINE(0x303C, 0x0217, 0xABEB);
+
+EXTERN_API( OSErr )
+DMIsMirroringOn (Boolean * isMirroringOn) THREEWORDINLINE(0x303C, 0x0218, 0xABEB);
+
+EXTERN_API( OSErr )
+DMMirrorDevices (GDHandle gD1,
+ GDHandle gD2,
+ Handle displayState) THREEWORDINLINE(0x303C, 0x0619, 0xABEB);
+
+EXTERN_API( OSErr )
+DMUnmirrorDevice (GDHandle gDevice,
+ Handle displayState) THREEWORDINLINE(0x303C, 0x041A, 0xABEB);
+
+EXTERN_API( OSErr )
+DMGetNextMirroredDevice (GDHandle gDevice,
+ GDHandle * mirroredDevice) THREEWORDINLINE(0x303C, 0x041B, 0xABEB);
+
+EXTERN_API( OSErr )
+DMBlockMirroring (void) TWOWORDINLINE(0x701C, 0xABEB);
+
+EXTERN_API( OSErr )
+DMUnblockMirroring (void) TWOWORDINLINE(0x701D, 0xABEB);
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+DMGetDisplayMgrA5World (Ptr * dmA5) THREEWORDINLINE(0x303C, 0x021E, 0xABEB);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( OSErr )
+DMGetDisplayIDByGDevice (GDHandle displayDevice,
+ DisplayIDType * displayID,
+ Boolean failToMain) THREEWORDINLINE(0x303C, 0x051F, 0xABEB);
+
+EXTERN_API( OSErr )
+DMGetGDeviceByDisplayID (DisplayIDType displayID,
+ GDHandle * displayDevice,
+ Boolean failToMain) THREEWORDINLINE(0x303C, 0x0520, 0xABEB);
+
+EXTERN_API( OSErr )
+DMSetDisplayComponent (GDHandle theDevice,
+ Component displayComponent) THREEWORDINLINE(0x303C, 0x0421, 0xABEB);
+
+EXTERN_API( OSErr )
+DMGetDisplayComponent (GDHandle theDevice,
+ Component * displayComponent) THREEWORDINLINE(0x303C, 0x0422, 0xABEB);
+
+EXTERN_API( OSErr )
+DMNewDisplay (GDHandle * newDevice,
+ short driverRefNum,
+ unsigned long mode,
+ unsigned long reserved,
+ DisplayIDType displayID,
+ Component displayComponent,
+ Handle displayState) THREEWORDINLINE(0x303C, 0x0D23, 0xABEB);
+
+EXTERN_API( OSErr )
+DMDisposeDisplay (GDHandle disposeDevice,
+ Handle displayState) THREEWORDINLINE(0x303C, 0x0424, 0xABEB);
+
+EXTERN_API( OSErr )
+DMResolveDisplayComponents (void) TWOWORDINLINE(0x7025, 0xABEB);
+
+EXTERN_API( OSErr )
+DMRegisterExtendedNotifyProc (DMExtendedNotificationUPP notifyProc,
+ void * notifyUserData,
+ unsigned short nofifyOnFlags,
+ ProcessSerialNumberPtr whichPSN) THREEWORDINLINE(0x303C, 0x07EF, 0xABEB);
+
+EXTERN_API( OSErr )
+DMRemoveExtendedNotifyProc (DMExtendedNotificationUPP notifyProc,
+ void * notifyUserData,
+ ProcessSerialNumberPtr whichPSN,
+ unsigned short removeFlags) THREEWORDINLINE(0x303C, 0x0726, 0xABEB);
+
+EXTERN_API( OSErr )
+DMNewAVPanelList (DisplayIDType displayID,
+ ResType panelType,
+ DMFidelityType minimumFidelity,
+ unsigned long panelListFlags,
+ unsigned long reserved,
+ DMListIndexType * thePanelCount,
+ DMListType * thePanelList) THREEWORDINLINE(0x303C, 0x0C27, 0xABEB);
+
+EXTERN_API( OSErr )
+DMNewAVEngineList (DisplayIDType displayID,
+ ResType engineType,
+ DMFidelityType minimumFidelity,
+ unsigned long engineListFlags,
+ unsigned long reserved,
+ DMListIndexType * engineCount,
+ DMListType * engineList) THREEWORDINLINE(0x303C, 0x0C28, 0xABEB);
+
+EXTERN_API( OSErr )
+DMNewAVDeviceList (ResType deviceType,
+ unsigned long deviceListFlags,
+ unsigned long reserved,
+ DMListIndexType * deviceCount,
+ DMListType * deviceList) THREEWORDINLINE(0x303C, 0x0A29, 0xABEB);
+
+EXTERN_API( OSErr )
+DMNewAVPortListByPortType (ResType subType,
+ unsigned long portListFlags,
+ unsigned long reserved,
+ DMListIndexType * devicePortCount,
+ DMListType * theDevicePortList) THREEWORDINLINE(0x303C, 0x0A2A, 0xABEB);
+
+EXTERN_API( OSErr )
+DMGetIndexedComponentFromList (DMListType panelList,
+ DMListIndexType itemIndex,
+ unsigned long reserved,
+ DMComponentListIteratorUPP listIterator,
+ void * userData) THREEWORDINLINE(0x303C, 0x0A2B, 0xABEB);
+
+EXTERN_API( OSErr )
+DMDisposeList (DMListType panelList) THREEWORDINLINE(0x303C, 0x022C, 0xABEB);
+
+EXTERN_API( OSErr )
+DMGetNameByAVID (AVIDType theID,
+ unsigned long nameFlags,
+ Str255 name) THREEWORDINLINE(0x303C, 0x062D, 0xABEB);
+
+EXTERN_API( OSErr )
+DMNewAVIDByPortComponent (Component thePortComponent,
+ ResType portKind,
+ unsigned long reserved,
+ AVIDType * newID) THREEWORDINLINE(0x303C, 0x082E, 0xABEB);
+
+EXTERN_API( OSErr )
+DMGetPortComponentByAVID (DisplayIDType thePortID,
+ Component * thePortComponent,
+ ComponentDescription * theDesciption,
+ ResType * thePortKind) THREEWORDINLINE(0x303C, 0x082F, 0xABEB);
+
+EXTERN_API( OSErr )
+DMSendDependentNotification (ResType notifyType,
+ ResType notifyClass,
+ AVIDType displayID,
+ ComponentInstance notifyComponent) THREEWORDINLINE(0x303C, 0x0830, 0xABEB);
+
+EXTERN_API( OSErr )
+DMDisposeAVComponent (Component theAVComponent) THREEWORDINLINE(0x303C, 0x0231, 0xABEB);
+
+EXTERN_API( OSErr )
+DMSaveScreenPrefs (unsigned long reserved1,
+ unsigned long saveFlags,
+ unsigned long reserved2) THREEWORDINLINE(0x303C, 0x0632, 0xABEB);
+
+EXTERN_API( OSErr )
+DMNewAVIDByDeviceComponent (Component theDeviceComponent,
+ ResType portKind,
+ unsigned long reserved,
+ DisplayIDType * newID) THREEWORDINLINE(0x303C, 0x0833, 0xABEB);
+
+EXTERN_API( OSErr )
+DMNewAVPortListByDeviceAVID (AVIDType theID,
+ DMFidelityType minimumFidelity,
+ unsigned long portListFlags,
+ unsigned long reserved,
+ DMListIndexType * devicePortCount,
+ DMListType * theDevicePortList) THREEWORDINLINE(0x303C, 0x0C34, 0xABEB);
+
+EXTERN_API( OSErr )
+DMGetDeviceComponentByAVID (AVIDType theDeviceID,
+ Component * theDeviceComponent,
+ ComponentDescription * theDesciption,
+ ResType * theDeviceKind) THREEWORDINLINE(0x303C, 0x0835, 0xABEB);
+
+EXTERN_API( OSErr )
+DMNewDisplayModeList (DisplayIDType displayID,
+ unsigned long modeListFlags,
+ unsigned long reserved,
+ DMListIndexType * thePanelCount,
+ DMListType * thePanelList) THREEWORDINLINE(0x303C, 0x0A36, 0xABEB);
+
+EXTERN_API( OSErr )
+DMGetIndexedDisplayModeFromList (DMListType panelList,
+ DMListIndexType itemIndex,
+ unsigned long reserved,
+ DMDisplayModeListIteratorUPP listIterator,
+ void * userData) THREEWORDINLINE(0x303C, 0x0A37, 0xABEB);
+
+EXTERN_API( OSErr )
+DMGetGraphicInfoByAVID (AVIDType theID,
+ PicHandle * theAVPcit,
+ Handle * theAVIconSuite,
+ AVLocationRec * theAVLocation) THREEWORDINLINE(0x303C, 0x0838, 0xABEB);
+
+EXTERN_API( OSErr )
+DMGetAVPowerState (AVIDType theID,
+ AVPowerStatePtr getPowerState,
+ unsigned long reserved1) THREEWORDINLINE(0x303C, 0x0839, 0xABEB);
+
+EXTERN_API( OSErr )
+DMSetAVPowerState (AVIDType theID,
+ AVPowerStatePtr setPowerState,
+ unsigned long powerFlags,
+ Handle displayState) THREEWORDINLINE(0x303C, 0x083A, 0xABEB);
+
+EXTERN_API( OSErr )
+DMGetDeviceAVIDByPortAVID (AVIDType portAVID,
+ AVIDType * deviceAVID) THREEWORDINLINE(0x303C, 0x043B, 0xABEB);
+
+EXTERN_API( OSErr )
+DMGetEnableByAVID (AVIDType theAVID,
+ Boolean * isAVIDEnabledNow,
+ Boolean * canChangeEnableNow) THREEWORDINLINE(0x303C, 0x063C, 0xABEB);
+
+EXTERN_API( OSErr )
+DMSetEnableByAVID (AVIDType theAVID,
+ Boolean doEnable,
+ Handle displayState) THREEWORDINLINE(0x303C, 0x053D, 0xABEB);
+
+EXTERN_API( OSErr )
+DMGetDisplayMode (GDHandle theDevice,
+ VDSwitchInfoPtr switchInfo) THREEWORDINLINE(0x303C, 0x043E, 0xABEB);
+
+EXTERN_API( OSErr )
+DMConfirmConfiguration (ModalFilterUPP filterProc,
+ UInt32 confirmFlags,
+ UInt32 reserved,
+ Handle displayState) THREEWORDINLINE(0x303C, 0x083F, 0xABEB);
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __DISPLAYS__ */
+
diff --git a/include/qt/Drag.h b/include/qt/Drag.h
new file mode 100644
index 000000000..800651ed3
--- /dev/null
+++ b/include/qt/Drag.h
@@ -0,0 +1,722 @@
+/*
+ File: Drag.h
+
+ Contains: Drag and Drop Interfaces.
+
+ Version: Technology: Mac OS 9
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1992-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __DRAG__
+#define __DRAG__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __EVENTS__
+#include "Events.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+#ifndef __APPLEEVENTS__
+#include "AppleEvents.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*
+ _________________________________________________________________________________________________________
+
+ o DRAG MANAGER DATA TYPES
+ _________________________________________________________________________________________________________
+*/
+
+typedef struct OpaqueDragRef* DragRef;
+typedef UInt32 DragItemRef;
+typedef OSType FlavorType;
+/*
+ _________________________________________________________________________________________________________
+
+ o DRAG ATTRIBUTES
+ _________________________________________________________________________________________________________
+*/
+
+typedef UInt32 DragAttributes;
+enum {
+ kDragHasLeftSenderWindow = (1L << 0), /* drag has left the source window since TrackDrag*/
+ kDragInsideSenderApplication = (1L << 1), /* drag is occurring within the sender application*/
+ kDragInsideSenderWindow = (1L << 2) /* drag is occurring within the sender window*/
+};
+
+/*
+ _________________________________________________________________________________________________________
+
+ o DRAG BEHAVIORS
+ _________________________________________________________________________________________________________
+*/
+
+typedef UInt32 DragBehaviors;
+enum {
+ kDragBehaviorNone = 0,
+ kDragBehaviorZoomBackAnimation = (1L << 0) /* do zoomback animation for failed drags (normally enabled).*/
+};
+
+/*
+ _________________________________________________________________________________________________________
+
+ o DRAG IMAGE FLAGS
+ _________________________________________________________________________________________________________
+*/
+
+typedef UInt32 DragImageFlags;
+enum {
+ kDragRegionAndImage = (1L << 4) /* drag region and image*/
+};
+
+/*
+ _________________________________________________________________________________________________________
+
+ o DRAG IMAGE TRANSLUCENCY LEVELS
+ _________________________________________________________________________________________________________
+*/
+
+enum {
+ kDragStandardTranslucency = 0L, /* 65% image translucency (standard)*/
+ kDragDarkTranslucency = 1L, /* 50% image translucency*/
+ kDragDarkerTranslucency = 2L, /* 25% image translucency*/
+ kDragOpaqueTranslucency = 3L /* 0% image translucency (opaque)*/
+};
+
+/*
+ _________________________________________________________________________________________________________
+
+ o DRAG DRAWING PROCEDURE MESSAGES
+ _________________________________________________________________________________________________________
+*/
+
+
+typedef SInt16 DragRegionMessage;
+enum {
+ kDragRegionBegin = 1, /* initialize drawing*/
+ kDragRegionDraw = 2, /* draw drag feedback*/
+ kDragRegionHide = 3, /* hide drag feedback*/
+ kDragRegionIdle = 4, /* drag feedback idle time*/
+ kDragRegionEnd = 5 /* end of drawing*/
+};
+
+/*
+ _________________________________________________________________________________________________________
+
+ o ZOOM ACCELERATION
+ _________________________________________________________________________________________________________
+*/
+
+
+typedef SInt16 ZoomAcceleration;
+enum {
+ kZoomNoAcceleration = 0, /* use linear interpolation*/
+ kZoomAccelerate = 1, /* ramp up step size*/
+ kZoomDecelerate = 2 /* ramp down step size*/
+};
+
+/*
+ _________________________________________________________________________________________________________
+
+ o FLAVOR FLAGS
+ _________________________________________________________________________________________________________
+*/
+
+
+typedef UInt32 FlavorFlags;
+enum {
+ flavorSenderOnly = (1 << 0), /* flavor is available to sender only*/
+ flavorSenderTranslated = (1 << 1), /* flavor is translated by sender*/
+ flavorNotSaved = (1 << 2), /* flavor should not be saved*/
+ flavorSystemTranslated = (1 << 8) /* flavor is translated by system*/
+};
+
+/*
+ _________________________________________________________________________________________________________
+
+ o SPECIAL FLAVORS
+ _________________________________________________________________________________________________________
+*/
+
+enum {
+ flavorTypeHFS = FOUR_CHAR_CODE('hfs '), /* flavor type for HFS data*/
+ flavorTypePromiseHFS = FOUR_CHAR_CODE('phfs'), /* flavor type for promised HFS data*/
+ flavorTypeDirectory = FOUR_CHAR_CODE('diry') /* flavor type for AOCE directories*/
+};
+
+/*
+ _________________________________________________________________________________________________________
+
+ o FLAVORS FOR FINDER 8.0 AND LATER
+ _________________________________________________________________________________________________________
+*/
+
+enum {
+ kFlavorTypeClippingName = FOUR_CHAR_CODE('clnm'), /* name hint for clipping file (preferred over 'clfn')*/
+ kFlavorTypeClippingFilename = FOUR_CHAR_CODE('clfn'), /* name for clipping file*/
+ kFlavorTypeDragToTrashOnly = FOUR_CHAR_CODE('fdtt'), /* for apps that want to allow dragging private data to the trash*/
+ kFlavorTypeFinderNoTrackingBehavior = FOUR_CHAR_CODE('fntb') /* Finder completely ignores any drag containing this flavor*/
+};
+
+/*
+ _________________________________________________________________________________________________________
+
+ o DRAG TRACKING HANDLER MESSAGES
+ _________________________________________________________________________________________________________
+*/
+
+
+typedef SInt16 DragTrackingMessage;
+enum {
+ kDragTrackingEnterHandler = 1, /* drag has entered handler*/
+ kDragTrackingEnterWindow = 2, /* drag has entered window*/
+ kDragTrackingInWindow = 3, /* drag is moving within window*/
+ kDragTrackingLeaveWindow = 4, /* drag has exited window*/
+ kDragTrackingLeaveHandler = 5 /* drag has exited handler*/
+};
+
+/*
+ _________________________________________________________________________________________________________
+
+ o HFS FLAVORS
+ _________________________________________________________________________________________________________
+*/
+
+
+struct HFSFlavor {
+ OSType fileType; /* file type */
+ OSType fileCreator; /* file creator */
+ UInt16 fdFlags; /* Finder flags */
+ FSSpec fileSpec; /* file system specification */
+};
+typedef struct HFSFlavor HFSFlavor;
+
+struct PromiseHFSFlavor {
+ OSType fileType; /* file type */
+ OSType fileCreator; /* file creator */
+ UInt16 fdFlags; /* Finder flags */
+ FlavorType promisedFlavor; /* promised flavor containing an FSSpec */
+};
+typedef struct PromiseHFSFlavor PromiseHFSFlavor;
+/*
+ _________________________________________________________________________________________________________
+
+ o APPLICATION-DEFINED DRAG HANDLER ROUTINES
+ _________________________________________________________________________________________________________
+*/
+typedef CALLBACK_API( OSErr , DragTrackingHandlerProcPtr )(DragTrackingMessage message, WindowRef theWindow, void *handlerRefCon, DragRef theDrag);
+typedef CALLBACK_API( OSErr , DragReceiveHandlerProcPtr )(WindowRef theWindow, void *handlerRefCon, DragRef theDrag);
+typedef STACK_UPP_TYPE(DragTrackingHandlerProcPtr) DragTrackingHandlerUPP;
+typedef STACK_UPP_TYPE(DragReceiveHandlerProcPtr) DragReceiveHandlerUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(DragTrackingHandlerUPP)
+ NewDragTrackingHandlerUPP (DragTrackingHandlerProcPtr userRoutine);
+
+ EXTERN_API(DragReceiveHandlerUPP)
+ NewDragReceiveHandlerUPP (DragReceiveHandlerProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeDragTrackingHandlerUPP (DragTrackingHandlerUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeDragReceiveHandlerUPP (DragReceiveHandlerUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeDragTrackingHandlerUPP (DragTrackingMessage message,
+ WindowRef theWindow,
+ void * handlerRefCon,
+ DragRef theDrag,
+ DragTrackingHandlerUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeDragReceiveHandlerUPP (WindowRef theWindow,
+ void * handlerRefCon,
+ DragRef theDrag,
+ DragReceiveHandlerUPP userUPP);
+
+#else
+ enum { uppDragTrackingHandlerProcInfo = 0x00003FA0 }; /* pascal 2_bytes Func(2_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppDragReceiveHandlerProcInfo = 0x00000FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ #define NewDragTrackingHandlerUPP(userRoutine) (DragTrackingHandlerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDragTrackingHandlerProcInfo, GetCurrentArchitecture())
+ #define NewDragReceiveHandlerUPP(userRoutine) (DragReceiveHandlerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDragReceiveHandlerProcInfo, GetCurrentArchitecture())
+ #define DisposeDragTrackingHandlerUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeDragReceiveHandlerUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeDragTrackingHandlerUPP(message, theWindow, handlerRefCon, theDrag, userUPP) (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppDragTrackingHandlerProcInfo, (message), (theWindow), (handlerRefCon), (theDrag))
+ #define InvokeDragReceiveHandlerUPP(theWindow, handlerRefCon, theDrag, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppDragReceiveHandlerProcInfo, (theWindow), (handlerRefCon), (theDrag))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewDragTrackingHandlerProc(userRoutine) NewDragTrackingHandlerUPP(userRoutine)
+#define NewDragReceiveHandlerProc(userRoutine) NewDragReceiveHandlerUPP(userRoutine)
+#define CallDragTrackingHandlerProc(userRoutine, message, theWindow, handlerRefCon, theDrag) InvokeDragTrackingHandlerUPP(message, theWindow, handlerRefCon, theDrag, userRoutine)
+#define CallDragReceiveHandlerProc(userRoutine, theWindow, handlerRefCon, theDrag) InvokeDragReceiveHandlerUPP(theWindow, handlerRefCon, theDrag, userRoutine)
+/*
+ _________________________________________________________________________________________________________
+
+ o APPLICATION-DEFINED ROUTINES
+ _________________________________________________________________________________________________________
+*/
+typedef CALLBACK_API( OSErr , DragSendDataProcPtr )(FlavorType theType, void *dragSendRefCon, DragItemRef theItemRef, DragRef theDrag);
+typedef CALLBACK_API( OSErr , DragInputProcPtr )(Point *mouse, SInt16 *modifiers, void *dragInputRefCon, DragRef theDrag);
+typedef CALLBACK_API( OSErr , DragDrawingProcPtr )(DragRegionMessage message, RgnHandle showRegion, Point showOrigin, RgnHandle hideRegion, Point hideOrigin, void *dragDrawingRefCon, DragRef theDrag);
+typedef STACK_UPP_TYPE(DragSendDataProcPtr) DragSendDataUPP;
+typedef STACK_UPP_TYPE(DragInputProcPtr) DragInputUPP;
+typedef STACK_UPP_TYPE(DragDrawingProcPtr) DragDrawingUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(DragSendDataUPP)
+ NewDragSendDataUPP (DragSendDataProcPtr userRoutine);
+
+ EXTERN_API(DragInputUPP)
+ NewDragInputUPP (DragInputProcPtr userRoutine);
+
+ EXTERN_API(DragDrawingUPP)
+ NewDragDrawingUPP (DragDrawingProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeDragSendDataUPP (DragSendDataUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeDragInputUPP (DragInputUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeDragDrawingUPP (DragDrawingUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeDragSendDataUPP (FlavorType theType,
+ void * dragSendRefCon,
+ DragItemRef theItemRef,
+ DragRef theDrag,
+ DragSendDataUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeDragInputUPP (Point * mouse,
+ SInt16 * modifiers,
+ void * dragInputRefCon,
+ DragRef theDrag,
+ DragInputUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeDragDrawingUPP (DragRegionMessage message,
+ RgnHandle showRegion,
+ Point showOrigin,
+ RgnHandle hideRegion,
+ Point hideOrigin,
+ void * dragDrawingRefCon,
+ DragRef theDrag,
+ DragDrawingUPP userUPP);
+
+#else
+ enum { uppDragSendDataProcInfo = 0x00003FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppDragInputProcInfo = 0x00003FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppDragDrawingProcInfo = 0x000FFFA0 }; /* pascal 2_bytes Func(2_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewDragSendDataUPP(userRoutine) (DragSendDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDragSendDataProcInfo, GetCurrentArchitecture())
+ #define NewDragInputUPP(userRoutine) (DragInputUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDragInputProcInfo, GetCurrentArchitecture())
+ #define NewDragDrawingUPP(userRoutine) (DragDrawingUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDragDrawingProcInfo, GetCurrentArchitecture())
+ #define DisposeDragSendDataUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeDragInputUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeDragDrawingUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeDragSendDataUPP(theType, dragSendRefCon, theItemRef, theDrag, userUPP) (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppDragSendDataProcInfo, (theType), (dragSendRefCon), (theItemRef), (theDrag))
+ #define InvokeDragInputUPP(mouse, modifiers, dragInputRefCon, theDrag, userUPP) (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppDragInputProcInfo, (mouse), (modifiers), (dragInputRefCon), (theDrag))
+ #define InvokeDragDrawingUPP(message, showRegion, showOrigin, hideRegion, hideOrigin, dragDrawingRefCon, theDrag, userUPP) (OSErr)CALL_SEVEN_PARAMETER_UPP((userUPP), uppDragDrawingProcInfo, (message), (showRegion), (showOrigin), (hideRegion), (hideOrigin), (dragDrawingRefCon), (theDrag))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewDragSendDataProc(userRoutine) NewDragSendDataUPP(userRoutine)
+#define NewDragInputProc(userRoutine) NewDragInputUPP(userRoutine)
+#define NewDragDrawingProc(userRoutine) NewDragDrawingUPP(userRoutine)
+#define CallDragSendDataProc(userRoutine, theType, dragSendRefCon, theItemRef, theDrag) InvokeDragSendDataUPP(theType, dragSendRefCon, theItemRef, theDrag, userRoutine)
+#define CallDragInputProc(userRoutine, mouse, modifiers, dragInputRefCon, theDrag) InvokeDragInputUPP(mouse, modifiers, dragInputRefCon, theDrag, userRoutine)
+#define CallDragDrawingProc(userRoutine, message, showRegion, showOrigin, hideRegion, hideOrigin, dragDrawingRefCon, theDrag) InvokeDragDrawingUPP(message, showRegion, showOrigin, hideRegion, hideOrigin, dragDrawingRefCon, theDrag, userRoutine)
+/*
+ _________________________________________________________________________________________________________
+
+ o INSTALLING AND REMOVING HANDLERS API'S
+ _________________________________________________________________________________________________________
+*/
+
+EXTERN_API( OSErr )
+InstallTrackingHandler (DragTrackingHandlerUPP trackingHandler,
+ WindowRef theWindow,
+ void * handlerRefCon) TWOWORDINLINE(0x7001, 0xABED);
+
+EXTERN_API( OSErr )
+InstallReceiveHandler (DragReceiveHandlerUPP receiveHandler,
+ WindowRef theWindow,
+ void * handlerRefCon) TWOWORDINLINE(0x7002, 0xABED);
+
+EXTERN_API( OSErr )
+RemoveTrackingHandler (DragTrackingHandlerUPP trackingHandler,
+ WindowRef theWindow) TWOWORDINLINE(0x7003, 0xABED);
+
+EXTERN_API( OSErr )
+RemoveReceiveHandler (DragReceiveHandlerUPP receiveHandler,
+ WindowRef theWindow) TWOWORDINLINE(0x7004, 0xABED);
+
+/*
+ _________________________________________________________________________________________________________
+
+ o CREATING & DISPOSING
+ _________________________________________________________________________________________________________
+*/
+
+EXTERN_API( OSErr )
+NewDrag (DragRef * theDrag) TWOWORDINLINE(0x7005, 0xABED);
+
+EXTERN_API( OSErr )
+DisposeDrag (DragRef theDrag) TWOWORDINLINE(0x7006, 0xABED);
+
+/*
+ _________________________________________________________________________________________________________
+
+ o ADDING DRAG ITEM FLAVORS
+ _________________________________________________________________________________________________________
+*/
+
+EXTERN_API( OSErr )
+AddDragItemFlavor (DragRef theDrag,
+ DragItemRef theItemRef,
+ FlavorType theType,
+ const void * dataPtr,
+ Size dataSize,
+ FlavorFlags theFlags) TWOWORDINLINE(0x7007, 0xABED);
+
+EXTERN_API( OSErr )
+SetDragItemFlavorData (DragRef theDrag,
+ DragItemRef theItemRef,
+ FlavorType theType,
+ const void * dataPtr,
+ Size dataSize,
+ UInt32 dataOffset) TWOWORDINLINE(0x7009, 0xABED);
+
+/*
+ _________________________________________________________________________________________________________
+
+ o PROVIDING CALLBACK PROCEDURES
+ _________________________________________________________________________________________________________
+*/
+
+EXTERN_API( OSErr )
+SetDragSendProc (DragRef theDrag,
+ DragSendDataUPP sendProc,
+ void * dragSendRefCon) TWOWORDINLINE(0x700A, 0xABED);
+
+
+EXTERN_API( OSErr )
+SetDragInputProc (DragRef theDrag,
+ DragInputUPP inputProc,
+ void * dragInputRefCon) TWOWORDINLINE(0x700B, 0xABED);
+
+EXTERN_API( OSErr )
+SetDragDrawingProc (DragRef theDrag,
+ DragDrawingUPP drawingProc,
+ void * dragDrawingRefCon) TWOWORDINLINE(0x700C, 0xABED);
+
+/*
+ _________________________________________________________________________________________________________
+
+ o SETTING THE DRAG IMAGE
+ _________________________________________________________________________________________________________
+*/
+
+EXTERN_API( OSErr )
+SetDragImage (DragRef theDrag,
+ PixMapHandle imagePixMap,
+ RgnHandle imageRgn,
+ Point imageOffsetPt,
+ DragImageFlags theImageFlags) TWOWORDINLINE(0x7027, 0xABED);
+
+/*
+ _________________________________________________________________________________________________________
+
+ o ALTERING THE BEHAVIOR OF A DRAG
+ _________________________________________________________________________________________________________
+*/
+EXTERN_API( OSErr )
+ChangeDragBehaviors (DragRef theDrag,
+ DragBehaviors inBehaviorsToSet,
+ DragBehaviors inBehaviorsToClear) TWOWORDINLINE(0x7028, 0xABED);
+
+/*
+ _________________________________________________________________________________________________________
+
+ o PERFORMING A DRAG
+ _________________________________________________________________________________________________________
+*/
+EXTERN_API( OSErr )
+TrackDrag (DragRef theDrag,
+ const EventRecord * theEvent,
+ RgnHandle theRegion) TWOWORDINLINE(0x700D, 0xABED);
+
+/*
+ _________________________________________________________________________________________________________
+
+ o GETTING DRAG ITEM INFORMATION
+ _________________________________________________________________________________________________________
+*/
+EXTERN_API( OSErr )
+CountDragItems (DragRef theDrag,
+ UInt16 * numItems) TWOWORDINLINE(0x700E, 0xABED);
+
+EXTERN_API( OSErr )
+GetDragItemReferenceNumber (DragRef theDrag,
+ UInt16 index,
+ DragItemRef * theItemRef) TWOWORDINLINE(0x700F, 0xABED);
+
+EXTERN_API( OSErr )
+CountDragItemFlavors (DragRef theDrag,
+ DragItemRef theItemRef,
+ UInt16 * numFlavors) TWOWORDINLINE(0x7010, 0xABED);
+
+EXTERN_API( OSErr )
+GetFlavorType (DragRef theDrag,
+ DragItemRef theItemRef,
+ UInt16 index,
+ FlavorType * theType) TWOWORDINLINE(0x7011, 0xABED);
+
+EXTERN_API( OSErr )
+GetFlavorFlags (DragRef theDrag,
+ DragItemRef theItemRef,
+ FlavorType theType,
+ FlavorFlags * theFlags) TWOWORDINLINE(0x7012, 0xABED);
+
+EXTERN_API( OSErr )
+GetFlavorDataSize (DragRef theDrag,
+ DragItemRef theItemRef,
+ FlavorType theType,
+ Size * dataSize) TWOWORDINLINE(0x7013, 0xABED);
+
+EXTERN_API( OSErr )
+GetFlavorData (DragRef theDrag,
+ DragItemRef theItemRef,
+ FlavorType theType,
+ void * dataPtr,
+ Size * dataSize,
+ UInt32 dataOffset) TWOWORDINLINE(0x7014, 0xABED);
+
+/*
+ _________________________________________________________________________________________________________
+
+ o DRAG ITEM BOUNDS
+ _________________________________________________________________________________________________________
+*/
+
+EXTERN_API( OSErr )
+GetDragItemBounds (DragRef theDrag,
+ DragItemRef theItemRef,
+ Rect * itemBounds) TWOWORDINLINE(0x7015, 0xABED);
+
+EXTERN_API( OSErr )
+SetDragItemBounds (DragRef theDrag,
+ DragItemRef theItemRef,
+ const Rect * itemBounds) TWOWORDINLINE(0x7016, 0xABED);
+
+/*
+ _________________________________________________________________________________________________________
+
+ o DROP LOCATIONS
+ _________________________________________________________________________________________________________
+*/
+
+EXTERN_API( OSErr )
+GetDropLocation (DragRef theDrag,
+ AEDesc * dropLocation) TWOWORDINLINE(0x7017, 0xABED);
+
+EXTERN_API( OSErr )
+SetDropLocation (DragRef theDrag,
+ const AEDesc * dropLocation) TWOWORDINLINE(0x7018, 0xABED);
+
+/*
+ _________________________________________________________________________________________________________
+
+ o GETTING INFORMATION ABOUT A DRAG
+ _________________________________________________________________________________________________________
+*/
+
+EXTERN_API( OSErr )
+GetDragAttributes (DragRef theDrag,
+ DragAttributes * flags) TWOWORDINLINE(0x7019, 0xABED);
+
+EXTERN_API( OSErr )
+GetDragMouse (DragRef theDrag,
+ Point * mouse,
+ Point * globalPinnedMouse) TWOWORDINLINE(0x701A, 0xABED);
+
+EXTERN_API( OSErr )
+SetDragMouse (DragRef theDrag,
+ Point globalPinnedMouse) TWOWORDINLINE(0x701B, 0xABED);
+
+EXTERN_API( OSErr )
+GetDragOrigin (DragRef theDrag,
+ Point * globalInitialMouse) TWOWORDINLINE(0x701C, 0xABED);
+
+EXTERN_API( OSErr )
+GetDragModifiers (DragRef theDrag,
+ SInt16 * modifiers,
+ SInt16 * mouseDownModifiers,
+ SInt16 * mouseUpModifiers) TWOWORDINLINE(0x701D, 0xABED);
+
+/*
+ _________________________________________________________________________________________________________
+
+ o DRAG HIGHLIGHTING
+ _________________________________________________________________________________________________________
+*/
+
+EXTERN_API( OSErr )
+ShowDragHilite (DragRef theDrag,
+ RgnHandle hiliteFrame,
+ Boolean inside) TWOWORDINLINE(0x701E, 0xABED);
+
+EXTERN_API( OSErr )
+HideDragHilite (DragRef theDrag) TWOWORDINLINE(0x701F, 0xABED);
+
+EXTERN_API( OSErr )
+DragPreScroll (DragRef theDrag,
+ SInt16 dH,
+ SInt16 dV) TWOWORDINLINE(0x7020, 0xABED);
+
+EXTERN_API( OSErr )
+DragPostScroll (DragRef theDrag) TWOWORDINLINE(0x7021, 0xABED);
+
+EXTERN_API( OSErr )
+UpdateDragHilite (DragRef theDrag,
+ RgnHandle updateRgn) TWOWORDINLINE(0x7022, 0xABED);
+
+EXTERN_API( OSErr )
+GetDragHiliteColor (WindowRef window,
+ RGBColor * color) TWOWORDINLINE(0x7026, 0xABED);
+
+
+/*
+ _________________________________________________________________________________________________________
+
+ o UTILITIES
+ _________________________________________________________________________________________________________
+*/
+
+
+EXTERN_API( Boolean )
+WaitMouseMoved (Point initialMouse) TWOWORDINLINE(0x7023, 0xABED);
+
+
+EXTERN_API( OSErr )
+ZoomRects (const Rect * fromRect,
+ const Rect * toRect,
+ SInt16 zoomSteps,
+ ZoomAcceleration acceleration) TWOWORDINLINE(0x7024, 0xABED);
+
+EXTERN_API( OSErr )
+ZoomRegion (RgnHandle region,
+ Point zoomDistance,
+ SInt16 zoomSteps,
+ ZoomAcceleration acceleration) TWOWORDINLINE(0x7025, 0xABED);
+
+
+/*
+ _________________________________________________________________________________________________________
+ o OLD NAMES
+ These are provided for compatiblity with older source bases. It is recommended to not use them since
+ they may removed from this interface file at any time.
+ _________________________________________________________________________________________________________
+*/
+
+
+typedef DragRef DragReference;
+typedef DragItemRef ItemReference;
+#if OLDROUTINENAMES
+enum {
+ dragHasLeftSenderWindow = kDragHasLeftSenderWindow, /* drag has left the source window since TrackDrag */
+ dragInsideSenderApplication = kDragInsideSenderApplication, /* drag is occurring within the sender application */
+ dragInsideSenderWindow = kDragInsideSenderWindow /* drag is occurring within the sender window */
+};
+
+enum {
+ dragTrackingEnterHandler = kDragTrackingEnterHandler, /* drag has entered handler */
+ dragTrackingEnterWindow = kDragTrackingEnterWindow, /* drag has entered window */
+ dragTrackingInWindow = kDragTrackingInWindow, /* drag is moving within window */
+ dragTrackingLeaveWindow = kDragTrackingLeaveWindow, /* drag has exited window */
+ dragTrackingLeaveHandler = kDragTrackingLeaveHandler /* drag has exited handler */
+};
+
+enum {
+ dragRegionBegin = kDragRegionBegin, /* initialize drawing */
+ dragRegionDraw = kDragRegionDraw, /* draw drag feedback */
+ dragRegionHide = kDragRegionHide, /* hide drag feedback */
+ dragRegionIdle = kDragRegionIdle, /* drag feedback idle time */
+ dragRegionEnd = kDragRegionEnd /* end of drawing */
+};
+
+enum {
+ zoomNoAcceleration = kZoomNoAcceleration, /* use linear interpolation */
+ zoomAccelerate = kZoomAccelerate, /* ramp up step size */
+ zoomDecelerate = kZoomDecelerate /* ramp down step size */
+};
+
+enum {
+ kDragStandardImage = kDragStandardTranslucency, /* 65% image translucency (standard)*/
+ kDragDarkImage = kDragDarkTranslucency, /* 50% image translucency*/
+ kDragDarkerImage = kDragDarkerTranslucency, /* 25% image translucency*/
+ kDragOpaqueImage = kDragOpaqueTranslucency /* 0% image translucency (opaque)*/
+};
+
+#endif /* OLDROUTINENAMES */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __DRAG__ */
+
diff --git a/include/qt/DrawSprocket.h b/include/qt/DrawSprocket.h
new file mode 100644
index 000000000..ee6301c07
--- /dev/null
+++ b/include/qt/DrawSprocket.h
@@ -0,0 +1,487 @@
+/*
+ File: DrawSprocket.h
+
+ Contains: Games Sprockets: DrawSprocket interfaces
+
+ Version: Technology: Draw Sprocket 1.7
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1996-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __DRAWSPROCKET__
+#define __DRAWSPROCKET__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __EVENTS__
+#include "Events.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#ifndef __QDOFFSCREEN__
+#include "QDOffscreen.h"
+#endif
+
+#ifndef __DISPLAYS__
+#include "Displays.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __DRAWSPROCKET__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __DRAWSPROCKET__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+/*
+********************************************************************************
+** constants
+********************************************************************************
+*/
+
+enum DSpDepthMask {
+ kDSpDepthMask_1 = 1 << 0,
+ kDSpDepthMask_2 = 1 << 1,
+ kDSpDepthMask_4 = 1 << 2,
+ kDSpDepthMask_8 = 1 << 3,
+ kDSpDepthMask_16 = 1 << 4,
+ kDSpDepthMask_32 = 1 << 5,
+ kDSpDepthMask_All = -1L
+};
+typedef enum DSpDepthMask DSpDepthMask;
+
+
+enum DSpColorNeeds {
+ kDSpColorNeeds_DontCare = 0L,
+ kDSpColorNeeds_Request = 1L,
+ kDSpColorNeeds_Require = 2L
+};
+typedef enum DSpColorNeeds DSpColorNeeds;
+
+
+enum DSpContextState {
+ kDSpContextState_Active = 0L,
+ kDSpContextState_Paused = 1L,
+ kDSpContextState_Inactive = 2L
+};
+typedef enum DSpContextState DSpContextState;
+
+/* kDSpContextOption_QD3DAccel not yet implemented */
+
+enum DSpContextOption {
+ /* kDSpContextOption_QD3DAccel = 1<<0,*/
+ kDSpContextOption_PageFlip = 1 << 1,
+ kDSpContextOption_DontSyncVBL = 1 << 2,
+ kDSpContextOption_Stereoscopic = 1 << 3
+};
+typedef enum DSpContextOption DSpContextOption;
+
+
+enum DSpAltBufferOption {
+ kDSpAltBufferOption_RowBytesEqualsWidth = 1 << 0
+};
+typedef enum DSpAltBufferOption DSpAltBufferOption;
+
+
+enum DSpBufferKind {
+ kDSpBufferKind_Normal = 0
+};
+typedef enum DSpBufferKind DSpBufferKind;
+
+
+enum DSpBlitMode {
+ kDSpBlitMode_Plain = 0,
+ kDSpBlitMode_SrcKey = 1 << 0,
+ kDSpBlitMode_DstKey = 1 << 1,
+ kDSpBlitMode_Interpolation = 1 << 2
+};
+typedef enum DSpBlitMode DSpBlitMode;
+
+/*
+********************************************************************************
+** data types
+********************************************************************************
+*/
+typedef struct OpaqueDSpAltBufferReference* DSpAltBufferReference;
+typedef struct OpaqueDSpContextReference* DSpContextReference;
+#define kDSpEveryContext ((DSpContextReference)NULL)
+typedef CALLBACK_API_C( Boolean , DSpEventProcPtr )(EventRecord *inEvent);
+typedef CALLBACK_API_C( Boolean , DSpCallbackProcPtr )(DSpContextReference inContext, void *inRefCon);
+
+struct DSpContextAttributes {
+ Fixed frequency;
+ UInt32 displayWidth;
+ UInt32 displayHeight;
+ UInt32 reserved1;
+ UInt32 reserved2;
+ UInt32 colorNeeds;
+ CTabHandle colorTable;
+ OptionBits contextOptions;
+ OptionBits backBufferDepthMask;
+ OptionBits displayDepthMask;
+ UInt32 backBufferBestDepth;
+ UInt32 displayBestDepth;
+ UInt32 pageCount;
+ char filler[3];
+ Boolean gameMustConfirmSwitch;
+ UInt32 reserved3[4];
+};
+typedef struct DSpContextAttributes DSpContextAttributes;
+typedef DSpContextAttributes * DSpContextAttributesPtr;
+
+struct DSpAltBufferAttributes {
+ UInt32 width;
+ UInt32 height;
+ DSpAltBufferOption options;
+ UInt32 reserved[4];
+};
+typedef struct DSpAltBufferAttributes DSpAltBufferAttributes;
+typedef struct DSpBlitInfo DSpBlitInfo;
+typedef CALLBACK_API_C( void , DSpBlitDoneProc )(DSpBlitInfo *info);
+
+struct DSpBlitInfo {
+ Boolean completionFlag;
+ char filler[3];
+ DSpBlitDoneProc completionProc;
+ DSpContextReference srcContext;
+ CGrafPtr srcBuffer;
+ Rect srcRect;
+ UInt32 srcKey;
+
+ DSpContextReference dstContext;
+ CGrafPtr dstBuffer;
+ Rect dstRect;
+ UInt32 dstKey;
+
+ DSpBlitMode mode;
+ UInt32 reserved[4];
+};
+
+
+typedef DSpBlitInfo * DSpBlitInfoPtr;
+/*
+********************************************************************************
+** function prototypes
+********************************************************************************
+*/
+/*
+** global operations
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+DSpStartup (void);
+
+EXTERN_API_C( OSStatus )
+DSpShutdown (void);
+
+EXTERN_API_C( NumVersion )
+DSpGetVersion (void);
+
+EXTERN_API_C( OSStatus )
+DSpGetFirstContext (DisplayIDType inDisplayID,
+ DSpContextReference * outContext);
+
+EXTERN_API_C( OSStatus )
+DSpGetNextContext (DSpContextReference inCurrentContext,
+ DSpContextReference * outContext);
+
+EXTERN_API_C( OSStatus )
+DSpGetCurrentContext (DisplayIDType inDisplayID,
+ DSpContextReference * outContext);
+
+EXTERN_API_C( OSStatus )
+DSpFindBestContext (DSpContextAttributesPtr inDesiredAttributes,
+ DSpContextReference * outContext);
+
+EXTERN_API_C( OSStatus )
+DSpFindBestContextOnDisplayID (DSpContextAttributesPtr inDesiredAttributes,
+ DSpContextReference * outContext,
+ DisplayIDType inDisplayID);
+
+EXTERN_API_C( OSStatus )
+DSpCanUserSelectContext (DSpContextAttributesPtr inDesiredAttributes,
+ Boolean * outUserCanSelectContext);
+
+EXTERN_API_C( OSStatus )
+DSpUserSelectContext (DSpContextAttributesPtr inDesiredAttributes,
+ DisplayIDType inDialogDisplayLocation,
+ DSpEventProcPtr inEventProc,
+ DSpContextReference * outContext);
+
+EXTERN_API_C( OSStatus )
+DSpProcessEvent (EventRecord * inEvent,
+ Boolean * outEventWasProcessed);
+
+EXTERN_API_C( OSStatus )
+DSpSetBlankingColor (const RGBColor * inRGBColor);
+
+EXTERN_API_C( OSStatus )
+DSpSetDebugMode (Boolean inDebugMode);
+
+EXTERN_API_C( OSStatus )
+DSpFindContextFromPoint (Point inGlobalPoint,
+ DSpContextReference * outContext);
+
+EXTERN_API_C( OSStatus )
+DSpGetMouse (Point * outGlobalPoint);
+
+/*
+** alternate buffer operations
+*/
+EXTERN_API_C( OSStatus )
+DSpAltBuffer_New (DSpContextReference inContext,
+ Boolean inVRAMBuffer,
+ DSpAltBufferAttributes * inAttributes,
+ DSpAltBufferReference * outAltBuffer);
+
+EXTERN_API_C( OSStatus )
+DSpAltBuffer_Dispose (DSpAltBufferReference inAltBuffer);
+
+EXTERN_API_C( OSStatus )
+DSpAltBuffer_InvalRect (DSpAltBufferReference inAltBuffer,
+ const Rect * inInvalidRect);
+
+EXTERN_API_C( OSStatus )
+DSpAltBuffer_GetCGrafPtr (DSpAltBufferReference inAltBuffer,
+ DSpBufferKind inBufferKind,
+ CGrafPtr * outCGrafPtr,
+ GDHandle * outGDevice);
+
+/*
+** context operations
+*/
+/* general */
+EXTERN_API_C( OSStatus )
+DSpContext_GetAttributes (DSpContextReference inContext,
+ DSpContextAttributesPtr outAttributes);
+
+EXTERN_API_C( OSStatus )
+DSpContext_Reserve (DSpContextReference inContext,
+ DSpContextAttributesPtr inDesiredAttributes);
+
+EXTERN_API_C( OSStatus )
+DSpContext_Queue (DSpContextReference inParentContext,
+ DSpContextReference inChildContext,
+ DSpContextAttributesPtr inDesiredAttributes);
+
+EXTERN_API_C( OSStatus )
+DSpContext_Switch (DSpContextReference inOldContext,
+ DSpContextReference inNewContext);
+
+EXTERN_API_C( OSStatus )
+DSpContext_Release (DSpContextReference inContext);
+
+EXTERN_API_C( OSStatus )
+DSpContext_GetDisplayID (DSpContextReference inContext,
+ DisplayIDType * outDisplayID);
+
+EXTERN_API_C( OSStatus )
+DSpContext_GlobalToLocal (DSpContextReference inContext,
+ Point * ioPoint);
+
+EXTERN_API_C( OSStatus )
+DSpContext_LocalToGlobal (DSpContextReference inContext,
+ Point * ioPoint);
+
+EXTERN_API_C( OSStatus )
+DSpContext_SetVBLProc (DSpContextReference inContext,
+ DSpCallbackProcPtr inProcPtr,
+ void * inRefCon);
+
+EXTERN_API_C( OSStatus )
+DSpContext_GetFlattenedSize (DSpContextReference inContext,
+ UInt32 * outFlatContextSize);
+
+EXTERN_API_C( OSStatus )
+DSpContext_Flatten (DSpContextReference inContext,
+ void * outFlatContext);
+
+EXTERN_API_C( OSStatus )
+DSpContext_Restore (void * inFlatContext,
+ DSpContextReference * outRestoredContext);
+
+EXTERN_API_C( OSStatus )
+DSpContext_GetMonitorFrequency (DSpContextReference inContext,
+ Fixed * outFrequency);
+
+EXTERN_API_C( OSStatus )
+DSpContext_SetMaxFrameRate (DSpContextReference inContext,
+ UInt32 inMaxFPS);
+
+EXTERN_API_C( OSStatus )
+DSpContext_GetMaxFrameRate (DSpContextReference inContext,
+ UInt32 * outMaxFPS);
+
+EXTERN_API_C( OSStatus )
+DSpContext_SetState (DSpContextReference inContext,
+ DSpContextState inState);
+
+EXTERN_API_C( OSStatus )
+DSpContext_GetState (DSpContextReference inContext,
+ DSpContextState * outState);
+
+EXTERN_API_C( OSStatus )
+DSpContext_IsBusy (DSpContextReference inContext,
+ Boolean * outBusyFlag);
+
+/* dirty rectangles */
+EXTERN_API_C( OSStatus )
+DSpContext_SetDirtyRectGridSize (DSpContextReference inContext,
+ UInt32 inCellPixelWidth,
+ UInt32 inCellPixelHeight);
+
+EXTERN_API_C( OSStatus )
+DSpContext_GetDirtyRectGridSize (DSpContextReference inContext,
+ UInt32 * outCellPixelWidth,
+ UInt32 * outCellPixelHeight);
+
+EXTERN_API_C( OSStatus )
+DSpContext_GetDirtyRectGridUnits (DSpContextReference inContext,
+ UInt32 * outCellPixelWidth,
+ UInt32 * outCellPixelHeight);
+
+EXTERN_API_C( OSStatus )
+DSpContext_InvalBackBufferRect (DSpContextReference inContext,
+ const Rect * inRect);
+
+/* underlays */
+EXTERN_API_C( OSStatus )
+DSpContext_SetUnderlayAltBuffer (DSpContextReference inContext,
+ DSpAltBufferReference inNewUnderlay);
+
+EXTERN_API_C( OSStatus )
+DSpContext_GetUnderlayAltBuffer (DSpContextReference inContext,
+ DSpAltBufferReference * outUnderlay);
+
+/* gamma */
+EXTERN_API_C( OSStatus )
+DSpContext_FadeGammaOut (DSpContextReference inContext,
+ RGBColor * inZeroIntensityColor);
+
+EXTERN_API_C( OSStatus )
+DSpContext_FadeGammaIn (DSpContextReference inContext,
+ RGBColor * inZeroIntensityColor);
+
+EXTERN_API_C( OSStatus )
+DSpContext_FadeGamma (DSpContextReference inContext,
+ SInt32 inPercentOfOriginalIntensity,
+ RGBColor * inZeroIntensityColor);
+
+/* buffering */
+EXTERN_API_C( OSStatus )
+DSpContext_SwapBuffers (DSpContextReference inContext,
+ DSpCallbackProcPtr inBusyProc,
+ void * inUserRefCon);
+
+EXTERN_API_C( OSStatus )
+DSpContext_GetBackBuffer (DSpContextReference inContext,
+ DSpBufferKind inBufferKind,
+ CGrafPtr * outBackBuffer);
+
+EXTERN_API_C( OSStatus )
+DSpContext_GetFrontBuffer (DSpContextReference inContext,
+ CGrafPtr * outFrontBuffer);
+
+/* clut operations */
+EXTERN_API_C( OSStatus )
+DSpContext_SetCLUTEntries (DSpContextReference inContext,
+ const ColorSpec * inEntries,
+ UInt16 inStartingEntry,
+ UInt16 inLastEntry);
+
+EXTERN_API_C( OSStatus )
+DSpContext_GetCLUTEntries (DSpContextReference inContext,
+ ColorSpec * outEntries,
+ UInt16 inStartingEntry,
+ UInt16 inLastEntry);
+
+/* blit operations */
+EXTERN_API_C( OSStatus )
+DSpBlit_Faster (DSpBlitInfoPtr inBlitInfo,
+ Boolean inAsyncFlag);
+
+EXTERN_API_C( OSStatus )
+DSpBlit_Fastest (DSpBlitInfoPtr inBlitInfo,
+ Boolean inAsyncFlag);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __DRAWSPROCKET__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__DRAWSPROCKET__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __DRAWSPROCKET__ */
+
diff --git a/include/qt/DriverFamilyMatching.h b/include/qt/DriverFamilyMatching.h
new file mode 100644
index 000000000..765342b3c
--- /dev/null
+++ b/include/qt/DriverFamilyMatching.h
@@ -0,0 +1,214 @@
+/*
+ File: DriverFamilyMatching.h
+
+ Contains: Interfaces for create native drivers NDRV
+
+ Version: Technology:
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __DRIVERFAMILYMATCHING__
+#define __DRIVERFAMILYMATCHING__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __NAMEREGISTRY__
+#include "NameRegistry.h"
+#endif
+
+#ifndef __CODEFRAGMENTS__
+#include "CodeFragments.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*
+ ##############################################
+ Well known properties in the Name Registry
+ ##############################################
+*/
+
+#define kPropertyName "name"
+#define kPropertyCompatible "compatible"
+#define kPropertyDriverPtr "driver-ptr"
+#define kPropertyDriverDesc "driver-description"
+#define kPropertyReg "reg"
+#define kPropertyAAPLAddress "AAPL,address"
+#define kPropertyMatching "matching"
+#define kPropertyAAPLDriverName "AAPL,driver-name"
+
+/* CPassThru */
+/*
+ #########################################################
+ Descriptor for Drivers and NDRVs
+ #########################################################
+*/
+/*
+ QuickTime 3.0: "DriverType" has a name collision with cross-platform code.
+ Use Mac prefix to avoid collision
+*/
+/* Driver Typing Information Used to Match Drivers With Devices */
+
+struct MacDriverType {
+ Str31 nameInfoStr; /* Driver Name/Info String*/
+ NumVersion version; /* Driver Version Number*/
+};
+typedef struct MacDriverType MacDriverType;
+#if TARGET_OS_MAC
+
+typedef MacDriverType DriverType;
+#endif /* TARGET_OS_MAC */
+
+typedef MacDriverType * DriverTypePtr;
+/* OS Runtime Information Used to Setup and Maintain a Driver's Runtime Environment */
+typedef OptionBits RuntimeOptions;
+enum {
+ kDriverIsLoadedUponDiscovery = 0x00000001, /* auto-load driver when discovered*/
+ kDriverIsOpenedUponLoad = 0x00000002, /* auto-open driver when loaded*/
+ kDriverIsUnderExpertControl = 0x00000004, /* I/O expert handles loads/opens*/
+ kDriverIsConcurrent = 0x00000008, /* supports concurrent requests*/
+ kDriverQueuesIOPB = 0x00000010, /* device manager doesn't queue IOPB*/
+ kDriverIsLoadedAtBoot = 0x00000020, /* Driver is loaded at the boot time */
+ kDriverIsForVirtualDevice = 0x00000040, /* Driver is for a virtual Device */
+ kDriverSupportDMSuspendAndResume = 0x00000080 /* Driver supports Device Manager Suspend and Resume command */
+};
+
+
+struct DriverOSRuntime {
+ RuntimeOptions driverRuntime; /* Options for OS Runtime*/
+ Str31 driverName; /* Driver's name to the OS*/
+ UInt32 driverDescReserved[8]; /* Reserved area*/
+};
+typedef struct DriverOSRuntime DriverOSRuntime;
+typedef DriverOSRuntime * DriverOSRuntimePtr;
+/* OS Service Information Used To Declare What APIs a Driver Supports */
+
+typedef UInt32 ServiceCount;
+
+struct DriverServiceInfo {
+ OSType serviceCategory; /* Service Category Name*/
+ OSType serviceType; /* Type within Category*/
+ NumVersion serviceVersion; /* Version of service*/
+};
+typedef struct DriverServiceInfo DriverServiceInfo;
+typedef DriverServiceInfo * DriverServiceInfoPtr;
+
+struct DriverOSService {
+ ServiceCount nServices; /* Number of Services Supported*/
+ DriverServiceInfo service[1]; /* The List of Services (at least one)*/
+};
+typedef struct DriverOSService DriverOSService;
+typedef DriverOSService * DriverOSServicePtr;
+/* Categories */
+enum {
+ kServiceCategoryDisplay = FOUR_CHAR_CODE('disp'), /* Display Manager*/
+ kServiceCategoryOpenTransport = FOUR_CHAR_CODE('otan'), /* Open Transport*/
+ kServiceCategoryBlockStorage = FOUR_CHAR_CODE('blok'), /* Block Storage*/
+ kServiceCategoryNdrvDriver = FOUR_CHAR_CODE('ndrv'), /* Generic Native Driver*/
+ kServiceCategoryScsiSIM = FOUR_CHAR_CODE('scsi'), /* SCSI */
+ kServiceCategoryFileManager = FOUR_CHAR_CODE('file'), /* File Manager */
+ kServiceCategoryIDE = FOUR_CHAR_CODE('ide-'), /* ide */
+ kServiceCategoryADB = FOUR_CHAR_CODE('adb-'), /* adb */
+ kServiceCategoryPCI = FOUR_CHAR_CODE('pci-'), /* pci bus */
+ /* Nu Bus */
+ kServiceCategoryDFM = FOUR_CHAR_CODE('dfm-'), /* DFM */
+ kServiceCategoryMotherBoard = FOUR_CHAR_CODE('mrbd'), /* mother Board */
+ kServiceCategoryKeyboard = FOUR_CHAR_CODE('kybd'), /* Keyboard */
+ kServiceCategoryPointing = FOUR_CHAR_CODE('poit'), /* Pointing */
+ kServiceCategoryRTC = FOUR_CHAR_CODE('rtc-'), /* RTC */
+ kServiceCategoryNVRAM = FOUR_CHAR_CODE('nram'), /* NVRAM */
+ kServiceCategorySound = FOUR_CHAR_CODE('sond'), /* Sound (1/3/96 MCS) */
+ kServiceCategoryPowerMgt = FOUR_CHAR_CODE('pgmt'), /* Power Management */
+ kServiceCategoryGeneric = FOUR_CHAR_CODE('genr') /* Generic Service Category to receive general Events */
+};
+
+/* Ndrv ServiceCategory Types */
+enum {
+ kNdrvTypeIsGeneric = FOUR_CHAR_CODE('genr'), /* generic*/
+ kNdrvTypeIsVideo = FOUR_CHAR_CODE('vido'), /* video*/
+ kNdrvTypeIsBlockStorage = FOUR_CHAR_CODE('blok'), /* block storage*/
+ kNdrvTypeIsNetworking = FOUR_CHAR_CODE('netw'), /* networking*/
+ kNdrvTypeIsSerial = FOUR_CHAR_CODE('serl'), /* serial*/
+ kNdrvTypeIsParallel = FOUR_CHAR_CODE('parl'), /* parallel */
+ kNdrvTypeIsSound = FOUR_CHAR_CODE('sond'), /* sound*/
+ kNdrvTypeIsBusBridge = FOUR_CHAR_CODE('brdg'),
+ kNdrvTypeIsFWConference = FOUR_CHAR_CODE('crsh'), /* FireWire conference camera */
+ kNdrvTypeIsAVC = FOUR_CHAR_CODE('avc ') /* FireWire AVC devices (DV cameras) */
+};
+
+
+typedef UInt32 DriverDescVersion;
+/* The Driver Description */
+enum {
+ kTheDescriptionSignature = FOUR_CHAR_CODE('mtej'),
+ kDriverDescriptionSignature = FOUR_CHAR_CODE('pdes')
+};
+
+enum {
+ kInitialDriverDescriptor = 0,
+ kVersionOneDriverDescriptor = 1
+};
+
+
+struct DriverDescription {
+ OSType driverDescSignature; /* Signature field of this structure*/
+ DriverDescVersion driverDescVersion; /* Version of this data structure*/
+ MacDriverType driverType; /* Type of Driver*/
+ DriverOSRuntime driverOSRuntimeInfo; /* OS Runtime Requirements of Driver*/
+ DriverOSService driverServices; /* Apple Service API Membership*/
+};
+typedef struct DriverDescription DriverDescription;
+typedef DriverDescription * DriverDescriptionPtr;
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __DRIVERFAMILYMATCHING__ */
+
diff --git a/include/qt/DriverGestalt.h b/include/qt/DriverGestalt.h
new file mode 100644
index 000000000..4488b36df
--- /dev/null
+++ b/include/qt/DriverGestalt.h
@@ -0,0 +1,674 @@
+/*
+ File: DriverGestalt.h
+
+ Contains: Driver Gestalt interfaces
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __DRIVERGESTALT__
+#define __DRIVERGESTALT__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __OSUTILS__
+#include "OSUtils.h"
+#endif
+
+#ifndef __NAMEREGISTRY__
+#include "NameRegistry.h"
+#endif
+
+#ifndef __SCSI__
+#include "SCSI.h"
+#endif
+
+#ifndef __USB__
+#include "USB.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*__________________________________________________________________________________*/
+/* The Driver Gestalt bit in the dCtlFlags */
+enum {
+ kbDriverGestaltEnable = 2,
+ kmDriverGestaltEnableMask = (1 << kbDriverGestaltEnable)
+};
+
+/*__________________________________________________________________________________*/
+/* Driver Gestalt related csCodes */
+enum {
+ kDriverGestaltCode = 43, /* various uses */
+ kDriverConfigureCode = 43, /* various uses */
+ kcsSetBootPartitionCode = 44, /* Set Startup Partition Control Call */
+ kcsGetBootPartitionStatus = 44, /* Get Startup Partition Status Call */
+ kdgLowPowerMode = 70, /* Sets/Returns the current energy consumption level */
+ kdgReturnDeviceID = 120, /* returns SCSI DevID in csParam[0] */
+ kdgGetCDDeviceInfo = 121 /* returns CDDeviceCharacteristics in csParam[0] */
+};
+
+/*__________________________________________________________________________________*/
+/* Driver Gestalt selectors */
+enum {
+ kdgVersion = FOUR_CHAR_CODE('vers'), /* Version number of the driver in standard Apple format */
+ kdgDeviceType = FOUR_CHAR_CODE('devt'), /* The type of device the driver is driving. */
+ kdgInterface = FOUR_CHAR_CODE('intf'), /* The underlying interface that the driver is using (if any) */
+ kdgSync = FOUR_CHAR_CODE('sync'), /* True if driver only behaves synchronously. */
+ kdgBoot = FOUR_CHAR_CODE('boot'), /* value to place in PRAM for this drive (long) */
+ kdgWide = FOUR_CHAR_CODE('wide'), /* True if driver supports ioWPosOffset */
+ kdgPurge = FOUR_CHAR_CODE('purg'), /* Driver purge permission (True = purge; False = no purge) */
+ kdgSupportsSwitching = FOUR_CHAR_CODE('lpwr'), /* True if driver supports power switching */
+ kdgMin3VPower = FOUR_CHAR_CODE('pmn3'), /* Minimum 3.3V power consumption in microWatts */
+ kdgMin5VPower = FOUR_CHAR_CODE('pmn5'), /* Minimum 5V power consumption in microWatts */
+ kdgMax3VPower = FOUR_CHAR_CODE('pmx3'), /* Maximum 3.3V power consumption in microWatts */
+ kdgMax5VPower = FOUR_CHAR_CODE('pmx5'), /* Maximum 5V power consumption in microWatts */
+ kdgInHighPower = FOUR_CHAR_CODE('psta'), /* True if device is currently in high power mode */
+ kdgSupportsPowerCtl = FOUR_CHAR_CODE('psup'), /* True if driver supports following five calls */
+ kdgAPI = FOUR_CHAR_CODE('dAPI'), /* API support for PC Exchange */
+ kdgEject = FOUR_CHAR_CODE('ejec'), /* Eject options for shutdown/restart (Shutdown Mgr) */
+ kdgFlush = FOUR_CHAR_CODE('flus'), /* Determine if disk driver supports flush and if it needs a flush */
+ kdgVMOptions = FOUR_CHAR_CODE('vmop'), /* Disk drive's Virtual Memory options */
+ kdgMediaInfo = FOUR_CHAR_CODE('minf'), /* return media specific information */
+ kdgPhysDriveIconSuite = FOUR_CHAR_CODE('dics'), /* Return a pointer to a IconFamily ('icns') data structure for */
+ /* Disk Driver physical drive (formerly in csCode 21) in driverGestaltResponse. */
+ kdgMediaIconSuite = FOUR_CHAR_CODE('mics'), /* Return a pointer to a IconFamily ('icns') data structure for */
+ /* Disk Driver media (formerly in csCode 22) in driverGestaltResponse. */
+ /* See IconServices.r for information detailing the 'icns' resource data format */
+ kdgMediaName = FOUR_CHAR_CODE('mnam'), /* Return a pointer to a pascal string describing the Disk Driver (formerly in csCode 21) in driverGestaltResponse. */
+ /* DriverGestalt selector for ATA drivers to signify that they are device 0/1 compliant. */
+ /* see http://developer.apple.com/techpubs/hardware/Developer_Notes/System_Software/ATA_Device_Zero_One.pdf */
+ kdgATADev1 = FOUR_CHAR_CODE('dev1'),
+ kdgDeviceReference = FOUR_CHAR_CODE('dvrf'), /* Returns a 32-bit reference number for the device, format is interface specific */
+ kdgNameRegistryEntry = FOUR_CHAR_CODE('nmrg'), /* Returns a pointer to the Name Registry ID for the device */
+ kdgDeviceModelInfo = FOUR_CHAR_CODE('info'), /* Returns a pointer to a Device Model Info structure */
+ kdgSupportedMediaTypes = FOUR_CHAR_CODE('mdty'), /* Returns a count and a pointer to list of all media types supported by the device */
+ kdgOpenFirmwareBootSupport = FOUR_CHAR_CODE('ofpt'), /* Returns information that Open Firmware needs to support booting from the device */
+ kdgOpenFirmwareBootingSupport = FOUR_CHAR_CODE('ofbt') /* Returns same information as kdgOpenFirmwareBootSupport, but is only used during booting*/
+};
+
+/*__________________________________________________________________________________*/
+/* Driver Configure selectors */
+enum {
+ kdcFlush = FOUR_CHAR_CODE('flus'), /* Tell a disk driver to flush its cache and any hardware caches */
+ kdcVMOptions = FOUR_CHAR_CODE('vmop') /* Change the disk driver's Virtual Memory options */
+};
+
+/*__________________________________________________________________________________*/
+/* control parameter block for Driver Configure calls */
+
+struct DriverConfigParam {
+ QElemPtr qLink;
+ short qType;
+ short ioTrap;
+ Ptr ioCmdAddr;
+ ProcPtr ioCompletion;
+ OSErr ioResult;
+ StringPtr ioNamePtr;
+ short ioVRefNum;
+ short ioCRefNum; /* refNum for I/O operation */
+ short csCode; /* == kDriverConfigureCode */
+ OSType driverConfigureSelector;
+ UInt32 driverConfigureParameter;
+};
+typedef struct DriverConfigParam DriverConfigParam;
+/*__________________________________________________________________________________*/
+/* status parameter block for Driver Gestalt calls */
+
+struct DriverGestaltParam {
+ QElemPtr qLink;
+ short qType;
+ short ioTrap;
+ Ptr ioCmdAddr;
+ ProcPtr ioCompletion;
+ OSErr ioResult;
+ StringPtr ioNamePtr;
+ short ioVRefNum;
+ short ioCRefNum; /* refNum for I/O operation */
+ short csCode; /* == kDriverGestaltCode */
+ OSType driverGestaltSelector; /* 'sync', 'vers', etc. */
+ UInt32 driverGestaltResponse; /* Could be a pointer, bit field or other format */
+ UInt32 driverGestaltResponse1; /* Could be a pointer, bit field or other format */
+ UInt32 driverGestaltResponse2; /* Could be a pointer, bit field or other format */
+ UInt32 driverGestaltResponse3; /* Could be a pointer, bit field or other format */
+ UInt16 driverGestaltfiller; /* To pad out to the size of a controlPB */
+};
+typedef struct DriverGestaltParam DriverGestaltParam;
+/* Note that the various response definitions are overlays of the response fields above.
+ For instance the deviceType response would be returned in driverGestaltResponse.
+ The DriverGestaltPurgeResponse would be in driverGestaltResponse and driverGestaltResponse1
+ */
+/* GetDriverGestaltDevTResponse(gestaltPtr)->deviceType */
+#define GetDriverGestaltDevTResponse(p) ((DriverGestaltDevTResponse *)(&((p)->driverGestaltResponse)))
+#define GetDriverGestaltIntfResponse(p) ((DriverGestaltIntfResponse *)(&((p)->driverGestaltResponse)))
+#define GetDriverGestaltPowerResponse(p) ((DriverGestaltPowerResponse *)(&((p)->driverGestaltResponse)))
+#define GetDriverGestaltSyncResponse(p) ((DriverGestaltSyncResponse *)(&((p)->driverGestaltResponse)))
+#define GetDriverGestaltBootResponse(p) ((DriverGestaltBootResponse *)(&((p)->driverGestaltResponse)))
+#define GetDriverGestaltBootResponse(p) ((DriverGestaltBootResponse *)(&((p)->driverGestaltResponse)))
+#define GetDriverGestaltPurgeResponse(p) ((DriverGestaltPurgeResponse *)(&((p)->driverGestaltResponse)))
+#define GetDriverGestaltEjectResponse(p) ((DriverGestaltEjectResponse *)(&((p)->driverGestaltResponse)))
+#define GetDriverGestaltVersionResponse(p) (((NumVersion*)(&((p)->driverGestaltResponse))))
+#define GetDriverGestaltAPIResponse(p) ((DriverGestaltAPIResponse *)(&((p)->driverGestaltResponse)))
+#define GetDriverGestaltBooleanResponse(p) ((Boolean *)(&((p)->driverGestaltResponse)))
+#define GetDriverGestaltFlushResponse(p) ((DriverGestaltFlushResponse *)(&((p)->driverGestaltResponse)))
+#define GetDriverGestaltVMOptionsResponse(p) ((DriverGestaltVMOptionsResponse *)(&((p)->driverGestaltResponse)))
+#define GetDriverGestaltMediaInfoResponse(p) ((DriverGestaltMediaInfoResponse *)(&((p)->driverGestaltResponse)))
+#define GetDriverGestaltDeviceReferenceResponse(p) ((DriverGestaltDeviceReferenceResponse *)(&((p)->driverGestaltResponse)))
+#define GetDriverGestaltNameRegistryResponse(p) ((DriverGestaltNameRegistryResponse *)(&((p)->driverGestaltResponse)))
+#define GetDriverGestaltDeviceModelInfoResponse(p) ((DriverGestaltDeviceModelInfoResponse **)(&((p)->driverGestaltResponse)))
+#define GetDriverGestaltSupportedMediaTypesResponse(p) ((DriverGestaltSupportedMediaTypesResponse **)(&((p)->driverGestaltResponse)))
+#define GetDriverGestaltOFBootSupportResponse(p) ((DriverGestaltOFBootSupportResponse *)(&((p)->driverGestaltResponse)))
+#define GetDriverGestaltATADev1Response(p) ((DriverGestaltATADev1Response *) (&((p)->driverGestaltResponse)))
+/*__________________________________________________________________________________*/
+/* Device Types response */
+
+struct DriverGestaltDevTResponse {
+ OSType deviceType;
+};
+typedef struct DriverGestaltDevTResponse DriverGestaltDevTResponse;
+enum {
+ kdgDiskType = FOUR_CHAR_CODE('disk'), /* standard r/w disk drive */
+ kdgTapeType = FOUR_CHAR_CODE('tape'), /* tape drive */
+ kdgPrinterType = FOUR_CHAR_CODE('prnt'), /* printer */
+ kdgProcessorType = FOUR_CHAR_CODE('proc'), /* processor */
+ kdgWormType = FOUR_CHAR_CODE('worm'), /* write-once */
+ kdgCDType = FOUR_CHAR_CODE('cdrm'), /* cd-rom drive */
+ kdgFloppyType = FOUR_CHAR_CODE('flop'), /* floppy disk drive */
+ kdgScannerType = FOUR_CHAR_CODE('scan'), /* scanner */
+ kdgFileType = FOUR_CHAR_CODE('file'), /* Logical Partition type based on a file (Drive Container) */
+ kdgRemovableType = FOUR_CHAR_CODE('rdsk') /* A removable media hard disk drive ie. Syquest, Bernioulli */
+};
+
+/*__________________________________________________________________________________*/
+/* Device Interfaces response */
+
+struct DriverGestaltIntfResponse {
+ OSType interfaceType;
+};
+typedef struct DriverGestaltIntfResponse DriverGestaltIntfResponse;
+enum {
+ kdgScsiIntf = FOUR_CHAR_CODE('scsi'),
+ kdgPcmciaIntf = FOUR_CHAR_CODE('pcmc'),
+ kdgATAIntf = FOUR_CHAR_CODE('ata '),
+ kdgUSBIntf = FOUR_CHAR_CODE('usb '),
+ kdgFireWireIntf = FOUR_CHAR_CODE('fire'),
+ kdgExtBus = FOUR_CHAR_CODE('card'),
+ kdgNetworkIntf = FOUR_CHAR_CODE('net ')
+};
+
+/*__________________________________________________________________________________*/
+/* Power Saving */
+
+struct DriverGestaltPowerResponse {
+ unsigned long powerValue; /* Power consumed in .Watts */
+};
+typedef struct DriverGestaltPowerResponse DriverGestaltPowerResponse;
+/*__________________________________________________________________________________*/
+/* Disk Specific */
+
+struct DriverGestaltSyncResponse {
+ Boolean behavesSynchronously;
+ UInt8 pad[3];
+};
+typedef struct DriverGestaltSyncResponse DriverGestaltSyncResponse;
+
+struct DriverGestaltBootResponse {
+ UInt8 extDev; /* Packed target (upper 5 bits) LUN (lower 3 bits) */
+ UInt8 partition; /* Unused */
+ UInt8 SIMSlot; /* Slot */
+ UInt8 SIMsRSRC; /* sRsrcID */
+};
+typedef struct DriverGestaltBootResponse DriverGestaltBootResponse;
+
+struct DriverGestaltAPIResponse {
+ short partitionCmds; /* if bit 0 is nonzero, supports partition control and status calls */
+ /* prohibitMounting (control, kProhibitMounting) */
+ /* partitionToVRef (status, kGetPartitionStatus) */
+ /* getPartitionInfo (status, kGetPartInfo) */
+ short unused1; /* all the unused fields should be zero */
+ short unused2;
+ short unused3;
+ short unused4;
+ short unused5;
+ short unused6;
+ short unused7;
+ short unused8;
+ short unused9;
+ short unused10;
+};
+typedef struct DriverGestaltAPIResponse DriverGestaltAPIResponse;
+
+struct DriverGestaltFlushResponse {
+ Boolean canFlush; /* Return true if driver supports the */
+ /* kdcFlush Driver Configure _Control call */
+ Boolean needsFlush; /* Return true if driver/device has data cached */
+ /* and needs to be flushed when the disk volume */
+ /* is flushed by the File Manager */
+ UInt8 pad[2];
+};
+typedef struct DriverGestaltFlushResponse DriverGestaltFlushResponse;
+/* Flags for purge permissions */
+enum {
+ kbCloseOk = 0, /* Ok to call Close */
+ kbRemoveOk = 1, /* Ok to call RemoveDrvr */
+ kbPurgeOk = 2, /* Ok to call DisposePtr */
+ kmNoCloseNoPurge = 0,
+ kmOkCloseNoPurge = (1 << kbCloseOk) + (1 << kbRemoveOk),
+ kmOkCloseOkPurge = (1 << kbCloseOk) + (1 << kbRemoveOk) + (1 << kbPurgeOk)
+};
+
+/* Driver purge permission structure */
+
+struct DriverGestaltPurgeResponse {
+ UInt16 purgePermission; /* 0 = Do not change the state of the driver */
+ /* 3 = Do Close() and DrvrRemove() this driver */
+ /* but don't deallocate driver code */
+ /* 7 = Do Close(), DrvrRemove(), and DisposePtr() */
+ UInt16 purgeReserved;
+ Ptr purgeDriverPointer; /* pointer to the start of the driver block (valid */
+ /* only of DisposePtr permission is given */
+};
+typedef struct DriverGestaltPurgeResponse DriverGestaltPurgeResponse;
+
+struct DriverGestaltEjectResponse {
+ UInt32 ejectFeatures; /* */
+};
+typedef struct DriverGestaltEjectResponse DriverGestaltEjectResponse;
+/* Flags for Ejection Features field */
+enum {
+ kRestartDontEject = 0, /* Dont Want eject during Restart */
+ kShutDownDontEject = 1, /* Dont Want eject during Shutdown */
+ kRestartDontEject_Mask = 1 << kRestartDontEject,
+ kShutDownDontEject_Mask = 1 << kShutDownDontEject
+};
+
+/*
+ The DriverGestaltVMOptionsResponse is returned by a disk driver in response to a
+ kdgVMOptions Driver Gestalt request. This allows a disk driver to tell VM a few
+ things about a disk drive. For example:
+
+ o A drive that should never be in the page fault path should return kAllowVMNoneMask.
+ Examples of this are drives that have manual eject buttons that are not disabled by
+ software, drives with very slow throughput, or drives that depend on
+ a network connection.
+ o A drive that should never be written to but is safe for read-only file mapping
+ should return kAllowVMReadOnlyMask. Examples of this are WORM drives where each write
+ eats write-once space on the disk and CD-ROM drives which are read-only media.
+ o A drive that should allow VM to create its main backing store file should return
+ kAllowVMReadWriteMask. Examples of this are fast read/write drives that don't allow
+ manual eject and don't use a network connection.
+
+ A disk driver must look at the ioVRefNum field of the DriverGestaltParam to determine
+ what disk drive this call is for. This is a per-drive call, not a per-driver call.
+
+ The only three valid responses to kdgVMOptions at this time are kAllowVMNoneMask,
+ kAllowVMReadOnlyMask, and kAllowVMReadWriteMask (i.e., setting only kAllowVMWriteBit
+ is not valid).
+
+ Important: All bits not defined here are reserved and should be set to zero until
+ they are defined for a specific purpose.
+
+ The kdcVMOptions Driver Configure _Control call provides the ability to change a driver's
+ response to kdgVMOptions Driver Gestalt requests. A driver should return controlErr if
+ it doesn't want to provide the ability to change the kdgVMOptions response. If a driver
+ supports the kdcVMOptions Driver Configure _Control call, but is asked to set an option bit
+ that it doesn't support (for example, if a read-only device is asked to set the kAllowVMWriteBit),
+ it should return paramErr.
+*/
+
+struct DriverGestaltVMOptionsResponse {
+ UInt32 vmOptions;
+};
+typedef struct DriverGestaltVMOptionsResponse DriverGestaltVMOptionsResponse;
+/* Bits and masks for DriverGestaltVMOptionsResponse.vmOptions field */
+enum {
+ kAllowVMReadBit = 0, /* Allow VM to use this drive for read access */
+ kAllowVMWriteBit = 1, /* Allow VM to use this drive for write access */
+ kAllowVMNoneMask = 0,
+ kAllowVMReadOnlyMask = 1 << kAllowVMReadBit,
+ kAllowVMReadWriteMask = (1 << kAllowVMReadBit) + (1 << kAllowVMWriteBit)
+};
+
+/*
+ The DriverGestaltMediaInfoResponse is returned by a disk driver in response to a
+ kdgMediaInfo DriverGestalt request. This allows a disk driver to tell callers the
+ physical block size, the number of blocks that are of that size, and the media type
+ for a given device.
+
+ A disk driver must look at the ioVRefNum field of the DriverGestaltParam to determine
+ what disk drive this call is for. This is a per-drive call, not a per-driver call.
+
+ On drives that support ejectable media, the response can change depending on what
+ media is currently in the drive.
+*/
+
+struct DriverGestaltMediaInfoResponse {
+ UInt32 numberBlocks; /* number of blocks */
+ UInt32 blockSize; /* physical size of blocks */
+ SInt16 mediaType; /* media type identifier */
+};
+typedef struct DriverGestaltMediaInfoResponse DriverGestaltMediaInfoResponse;
+/* DriverGestaltMediaInfoResponse.mediaType constants */
+enum {
+ kMediaTypeUnknown = 128, /* media type is unknown */
+ kMediaTypeCDROM = 129, /* media type is a CD-ROM */
+ kMediaTypeDVDROM = 130, /* media type is a DVD-ROM */
+ kMediaTypeDVDRAM = 131, /* media type is a DVD-RAM */
+ kMediaTypeDVDR = 132, /* media type is a DVD-RW */
+ kMediaTypeReadOnly = 133, /* basic read only type */
+ kMediaTypeWriteOnce = 134, /* basic write once type */
+ kMediaTypeRewritable = 135, /* rewritable media, i.e CD-RW */
+ kMediaTypeOverwritable = 136, /* random access read write media */
+ kMediaTypeNoMedia = -1 /* no media is present */
+};
+
+
+struct DriverGestaltATADev1Response {
+ UInt32 dev1Support; /* 1 = supports devices 0 and 1*/
+};
+typedef struct DriverGestaltATADev1Response DriverGestaltATADev1Response;
+/*__________________________________________________________________________________*/
+/* Device Reference */
+/*
+ The driver will return a 32-bit device reference number in the driverGestaltResponse
+ field of the DriverGestaltParam structure. The device refernce number will be interpreted
+ differently depending on the interface retrieved by using the 'intf' Driver Gestalt call.
+*/
+/*The union for the kdgDeviceReference Gestalt */
+
+union DriverGestaltDeviceReferenceResponse {
+ UInt32 devRef; /* Generic reference number for interfaces not specified */
+ DeviceIdent scsiID; /* kdgScsiIntf devices will return a DeviceIdent */
+ DeviceIdent ataID; /* kdgATAIntf devices will return a DeviceIdent */
+ USBDeviceRef usbRef; /* kdgUSBIntf devices will return a USBDeviceRef*/
+};
+typedef union DriverGestaltDeviceReferenceResponse DriverGestaltDeviceReferenceResponse;
+/*__________________________________________________________________________________*/
+/* Name Registry ID */
+/*
+ The driver will pass back in the driverGestaltResponse field of the DriverGestaltParam
+ a pointer to the Name Registry Entry ID for the device that it controls
+*/
+/* The structure for the kdgNameRegistryEntry Gestalt */
+
+struct DriverGestaltNameRegistryResponse {
+ RegEntryIDPtr entryID;
+};
+typedef struct DriverGestaltNameRegistryResponse DriverGestaltNameRegistryResponse;
+/*__________________________________________________________________________________*/
+/* Device Model Information */
+/*
+ The driver will pass a pointer to the DriverGestaltDeviceModelInfoResponse in the
+ driverGestaltResponse field of the DriverGestaltParam structure
+
+ The structure for the kdgDeviceModelInfo Gestalt
+ If any of theses pointers are nil, that means that the device doesn't provide that information
+*/
+
+struct DriverGestaltDeviceModelInfoResponse {
+ UInt32 infoStructVersion;
+ StringPtr vendorName;
+ StringPtr productName;
+ StringPtr revisionNumber;
+ StringPtr subRevisionNumber;
+ StringPtr serialNumber;
+};
+typedef struct DriverGestaltDeviceModelInfoResponse DriverGestaltDeviceModelInfoResponse;
+/* infoStructVersion field values */
+/* NOTE: May need/want to add a UniCode version of the InfoStruct at some point */
+enum {
+ kInfoStructStringPtrsVers1 = 1
+};
+
+
+/*__________________________________________________________________________________*/
+/* Supported Media Types */
+/*
+ The driver will return the number of media types supported by the device in the
+ driverGestaltResponse field of the DriverGestaltParam structure and an array of
+ 'devt' values for the supported media types will be returned in the driverGestaltResponse1
+ field of the DriverGestaltParam.
+
+ This call will return the number of media types supported by the device, and an array
+ of 'devt' values for the media types (i.e. if a device supports floppy disks
+ and large capacity removables, the driver would return that 2 media types are supported,
+ and the array would contain kdgFloppyType ('flop') and kdgRemovableType ('rdsk')).
+*/
+/* The structure for the kdgSupportedMediaTypes Gestalt */
+
+struct DriverGestaltSupportedMediaTypesResponse {
+ UInt32 supportTypesCount; /* The number of Media Types in the array */
+ OSType supportedTypesArray[1]; /* Array of supported media types */
+};
+typedef struct DriverGestaltSupportedMediaTypesResponse DriverGestaltSupportedMediaTypesResponse;
+/*__________________________________________________________________________________*/
+/* Open Firmware Boot support and Open Firmware Booting support */
+/*
+ The kdgOpenFirmwareBootSupport selector is used to get information about boot support
+ for the driver/device. The kdgOpenFirmwareBootingSupport is used during the boot
+ process to allow booting from partitions that Open Firmware may not be able to read
+ directly (i.e. Disk Array partitions, encrypted partitions, compressed partitions, etc..)
+
+ The driver will return the bootPartitionQualifier value in the driverGestaltResponse
+ field of the DriverGestaltParam and will return the exact partition map entry for
+ the boot partition in the driverGestaltResponse1 field of the DriverGestaltParam if
+ kOFBootSpecifiedPartition is returned in the driverGestaltResponse.
+ The number that is returned for the bootPartitionMapEntry field if the kOFBootSpecifiedPartition
+ is returned is the partition map entry number for the partition. (i.e. If the partition map entry
+ for the boot partition is the 2nd partition entry in the partition map, the bootPartitionMapEntry
+ field would be set to 2. If the partition map entry for the boot partition is the 3rd partition
+ map, the bootPartitionMapEntry field would be set to 3 and etc.)
+*/
+
+struct DriverGestaltOFBootSupportResponse {
+ UInt32 bootPartitionQualifier; /* The exact level of booting that the driver and device supports */
+ UInt32 bootPartitionMapEntry; /* The Partition Map entry for the boot partition if applicable */
+};
+typedef struct DriverGestaltOFBootSupportResponse DriverGestaltOFBootSupportResponse;
+/* Levels of boot support that the driver/device supports */
+/* These values are used in the bootPartitionQualifier field of the DriverGestaltOFBootSupportResponse */
+enum {
+ kOFBootAnyPartition = 1,
+ kOFBootSpecifiedPartition = 2,
+ kOFBootNotBootable = 3,
+ kOFBootNotPartitioned = 4
+};
+
+/*__________________________________________________________________________________*/
+/* CD-ROM Specific */
+/* The CDDeviceCharacteristics result is returned in csParam[0] and csParam[1] of a
+ standard CntrlParam parameter block called with csCode kdgGetCDDeviceInfo.
+*/
+
+struct CDDeviceCharacteristics {
+ UInt8 speedMajor; /* High byte of fixed point number containing drive speed */
+ UInt8 speedMinor; /* Low byte of "" CD 300 == 2.2, CD_SC == 1.0 etc. */
+ UInt16 cdFeatures; /* Flags field for features and transport type of this CD-ROM */
+};
+typedef struct CDDeviceCharacteristics CDDeviceCharacteristics;
+enum {
+ cdFeatureFlagsMask = 0xFFFC, /* The Flags are in the first 14 bits of the cdFeatures field */
+ cdTransportMask = 0x0003 /* The transport type is in the last 2 bits of the cdFeatures field */
+};
+
+
+/* Flags for CD Features field */
+enum {
+ cdPowerInject = 0, /* device supports power inject of media*/
+ cdNotPowerEject = 1, /* device does not support power eject of media*/
+ cdMute = 2, /* device supports audio channels muting*/
+ cdLeftToChannel = 3, /* device supports left channel only mono audio*/
+ cdRightToChannel = 4, /* device supports right channel only mono audio*/
+ cdLeftPlusRight = 5, /* device supports left + right channels mono audio*/
+ cdSCSI_2 = 10, /* device supports SCSI2 command set (SCSI only)*/
+ cdStereoVolume = 11, /* device supports independent volume per channel*/
+ cdDisconnect = 12, /* device supports disconnect / reconnect (SCSI only)*/
+ cdWriteOnce = 13, /* device is a write-once type of drive*/
+ cdPowerInject_Mask = 1 << cdPowerInject,
+ cdNotPowerEject_Mask = 1 << cdNotPowerEject,
+ cdMute_Mask = 1 << cdMute,
+ cdLeftToChannel_Mask = 1 << cdLeftToChannel,
+ cdRightToChannel_Mask = 1 << cdRightToChannel,
+ cdLeftPlusRight_Mask = 1 << cdLeftPlusRight,
+ cdSCSI_2_Mask = 1 << cdSCSI_2,
+ cdStereoVolume_Mask = 1 << cdStereoVolume,
+ cdDisconnect_Mask = 1 << cdDisconnect,
+ cdWriteOnce_Mask = 1 << cdWriteOnce
+};
+
+/* Transport types */
+enum {
+ cdCaddy = 0, /* CD_SC,CD_SC_PLUS,CD-300 etc. - power eject only*/
+ cdTray = cdPowerInject_Mask, /* CD_300_PLUS etc. - power inject only*/
+ cdLid = cdNotPowerEject_Mask /* Power CD - no power inject/no power eject*/
+};
+
+/* the following are used by PC Exchange (and Apple DOS/PC Compatibility Card)*/
+
+/* Control Codes*/
+enum {
+ kRegisterPartition = 50, /* PCX needs a new Drive (for a non-macintosh partition found on the disk)*/
+ OLD_REGISTER_PARTITION = 301, /* left in for compatibility with shipping Apple DOS/PC Compatibility Card*/
+ THE_DRIVE = 0, /* DrvQElPtr for the partition to register*/
+ THE_PHYS_START = 1, /* The start of the partition in logical blocks*/
+ THE_PHYS_SIZE = 2, /* The size of the partition in logical blocks*/
+ kGetADrive = 51, /* control call to ask the driver to create a drive*/
+ OLD_GET_A_DRIVE = 302, /* left in for compatibility with shipping Apple DOS/PC Compatibility Card*/
+ THE_VAR_QUEL = 0, /* a VAR parameter for the returned DrvQElPtr*/
+ kProhibitMounting = 52, /* Dont allow mounting of the following drives*/
+ kOldProhibitMounting = 2100, /* left in for compatibility with shipping Apple DOS/PC Compatibility Card*/
+ kProhibitDevice = 0, /* CS Param 0 and 1 (partInfoRecPtr)*/
+ kIsContainerMounted = 53,
+ kOldIsContainerMounted = 2201, /* left in for compatibility with shipping Apple DOS/PC Compatibility Card */
+ kContainerVRef = 0, /* CS Param 0 and 1 (VRefNum)*/
+ kContainerParID = 1, /* CS Param 2 and 3 (Parent ID)*/
+ kContainerName = 2, /* CS Param 4 and 5 (File Name)*/
+ kContainerResponse = 3, /* CS Param 6 and 7 (VAR pointer to short result)*/
+ kMountVolumeImg = 54,
+ OLD_MOUNT_VOLUME_IMG = 2000,
+ MV_HOST_VREFNUM = 0,
+ MV_HOST_PAR_ID = 1,
+ MV_HOST_NAME = 2,
+ MV_REQ_PERM = 3
+};
+
+/* Status Codes*/
+
+enum {
+ kGetPartitionStatus = 50, /* what is the status of this partition?*/
+ kOldGetPartitionStatus = 2200, /* left in for compatibility with shipping Apple DOS/PC Compatibility Card*/
+ kDeviceToQuery = 0, /* CS Param 0 and 1 (partInfoRecPtr)*/
+ kDeviceResponse = 1, /* CS Param 2 and 3 (VAR pointer to short result)*/
+ kGetPartInfo = 51, /* Get a partition info record based on the provided vrefnum*/
+ kOldGetPartInfo = 2300, /* left in for compatibility with shipping Apple DOS/PC Compatibility Card*/
+ kPartInfoResponse = 0, /* var parameter (pointer to partInfoRec) CSParam [0-1]*/
+ kGetContainerAlias = 52, /* Get the alias that describes the file this drive was mounted from.*/
+ kOldGetContainerAlias = 2400, /* left in for compatibility with shipping Apple DOS/PC Compatibility Card*/
+ kGetAliasResponse = 0 /* var parameter (pointer to a Handle) CSParam [0-1]*/
+};
+
+/* the result codes to come from the driver interface */
+
+enum {
+ DRIVER_NOT_INSTALLED = -1,
+ DRIVER_BUSY = -2,
+ CANT_MOUNT_WITHIN_THIS_FS = -3, /* can only mount container within residing on HFS volume*/
+ VOLUME_ALREADY_MOUNTED = -4 /* Already Mounted*/
+};
+
+/* requisite structures for PCX control and status calls*/
+
+enum {
+ kMaxProhibted = 2 /* the max number of volumes the PC can possibly have mounted*/
+};
+
+/* GestaltSelector for Finding Driver information*/
+
+enum {
+ kGetDriverInfo = FOUR_CHAR_CODE('vdrc')
+};
+
+enum {
+ VerifyCmd = 5,
+ FormatCmd = 6,
+ EjectCmd = 7
+};
+
+/* Partition information passed back and forth between PCX and the driver*/
+
+struct partInfoRec {
+ DeviceIdent SCSIID; /* DeviceIdent for the device*/
+ UInt32 physPartitionLoc; /* physical block number of beginning of partition*/
+ UInt32 partitionNumber; /* the partition number of this partition*/
+};
+typedef struct partInfoRec partInfoRec;
+typedef partInfoRec * partInfoRecPtr;
+
+struct vPartInfoRec {
+ UInt8 VPRTVers; /* Virtual partition version number*/
+ UInt8 VPRTType; /* virtual partition type (DOS, HFS, etc)*/
+ SInt16 drvrRefNum; /* Driver Reference number of partition driver*/
+};
+typedef struct vPartInfoRec vPartInfoRec;
+typedef vPartInfoRec * vPartInfoRecPtr;
+/* Information related to DOS partitions*/
+enum {
+ kDOSSigLow = 0x01FE, /* offset into boot block for DOS signature*/
+ kDOSSigHi = 0x01FF, /* offset into boot block for DOS signature*/
+ kDOSSigValLo = 0x55, /* DOS signature value in low byte*/
+ kDOSSigValHi = 0xAA /* DOS signature value in high byte*/
+};
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __DRIVERGESTALT__ */
+
diff --git a/include/qt/DriverServices.h b/include/qt/DriverServices.h
new file mode 100644
index 000000000..dfbc2da3f
--- /dev/null
+++ b/include/qt/DriverServices.h
@@ -0,0 +1,680 @@
+/*
+ File: DriverServices.h
+
+ Contains: Driver Services Interfaces.
+
+ Version: Technology: PowerSurge 1.0.2
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __DRIVERSERVICES__
+#define __DRIVERSERVICES__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+#ifndef __MACHINEEXCEPTIONS__
+#include "MachineExceptions.h"
+#endif
+
+#ifndef __DEVICES__
+#include "Devices.h"
+#endif
+
+#ifndef __DRIVERSYNCHRONIZATION__
+#include "DriverSynchronization.h"
+#endif
+
+#ifndef __NAMEREGISTRY__
+#include "NameRegistry.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/******************************************************************
+ *
+ * Previously in Kernel.h
+ *
+ ******************************************************************/
+/* Kernel basics*/
+typedef struct OpaqueIOPreparationID* IOPreparationID;
+typedef struct OpaqueSoftwareInterruptID* SoftwareInterruptID;
+typedef struct OpaqueTaskID* TaskID;
+typedef struct OpaqueTimerID* TimerID;
+/* Tasking*/
+typedef UInt32 ExecutionLevel;
+enum {
+ kTaskLevel = 0,
+ kSoftwareInterruptLevel = 1,
+ kAcceptFunctionLevel = 2,
+ kKernelLevel = 3,
+ kSIHAcceptFunctionLevel = 4,
+ kSecondaryInterruptLevel = 5,
+ kHardwareInterruptLevel = 6
+};
+
+typedef CALLBACK_API_C( void , SoftwareInterruptHandler )(void *p1, void *p2);
+typedef CALLBACK_API_C( OSStatus , SecondaryInterruptHandler2 )(void *p1, void *p2);
+#define kCurrentAddressSpaceID ((AddressSpaceID) -1)
+/* Memory System basics*/
+
+struct LogicalAddressRange {
+ LogicalAddress address;
+ ByteCount count;
+};
+typedef struct LogicalAddressRange LogicalAddressRange;
+typedef LogicalAddressRange * LogicalAddressRangePtr;
+
+struct PhysicalAddressRange {
+ PhysicalAddress address;
+ ByteCount count;
+};
+typedef struct PhysicalAddressRange PhysicalAddressRange;
+typedef PhysicalAddressRange * PhysicalAddressRangePtr;
+/* For PrepareMemoryForIO and CheckpointIO*/
+
+typedef OptionBits IOPreparationOptions;
+enum {
+ kIOMultipleRanges = 0x00000001,
+ kIOLogicalRanges = 0x00000002,
+ kIOMinimalLogicalMapping = 0x00000004,
+ kIOShareMappingTables = 0x00000008,
+ kIOIsInput = 0x00000010,
+ kIOIsOutput = 0x00000020,
+ kIOCoherentDataPath = 0x00000040,
+ kIOTransferIsLogical = 0x00000080,
+ kIOClientIsUserMode = 0x00000080
+};
+
+typedef OptionBits IOPreparationState;
+enum {
+ kIOStateDone = 0x00000001
+};
+
+enum {
+ kInvalidPageAddress = (-1)
+};
+
+
+struct AddressRange {
+ void * base;
+ ByteCount length;
+};
+typedef struct AddressRange AddressRange;
+/* C's treatment of arrays and array pointers is atypical*/
+
+typedef LogicalAddress * LogicalMappingTablePtr;
+typedef PhysicalAddress * PhysicalMappingTablePtr;
+typedef AddressRange * AddressRangeTablePtr;
+
+struct MultipleAddressRange {
+ ItemCount entryCount;
+ AddressRangeTablePtr rangeTable;
+};
+typedef struct MultipleAddressRange MultipleAddressRange;
+/*
+ Separate C definition so that union has a name. A future version of the interfacer
+ tool will allow a name (that gets thrown out in Pascal and Asm).
+*/
+
+struct IOPreparationTable {
+ IOPreparationOptions options;
+ IOPreparationState state;
+ IOPreparationID preparationID;
+ AddressSpaceID addressSpace;
+ ByteCount granularity;
+ ByteCount firstPrepared;
+ ByteCount lengthPrepared;
+ ItemCount mappingEntryCount;
+ LogicalMappingTablePtr logicalMapping;
+ PhysicalMappingTablePtr physicalMapping;
+ union {
+ AddressRange range;
+ MultipleAddressRange multipleRanges;
+ } rangeInfo;
+};
+typedef struct IOPreparationTable IOPreparationTable;
+
+typedef OptionBits IOCheckpointOptions;
+enum {
+ kNextIOIsInput = 0x00000001,
+ kNextIOIsOutput = 0x00000002,
+ kMoreIOTransfers = 0x00000004
+};
+
+/* For SetProcessorCacheMode*/
+
+typedef UInt32 ProcessorCacheMode;
+enum {
+ kProcessorCacheModeDefault = 0,
+ kProcessorCacheModeInhibited = 1,
+ kProcessorCacheModeWriteThrough = 2,
+ kProcessorCacheModeCopyBack = 3
+};
+
+/*
+ For GetPageInformation
+ (Note: if kPageInformationVersion fails, try 0 -- old versions of DSL defined kPageInformationVersion as 0)
+*/
+
+enum {
+ kPageInformationVersion = 1
+};
+
+typedef UInt32 PageStateInformation;
+enum {
+ kPageIsProtected = 0x00000001,
+ kPageIsProtectedPrivileged = 0x00000002,
+ kPageIsModified = 0x00000004,
+ kPageIsReferenced = 0x00000008,
+ kPageIsLockedResident = 0x00000010, /* held and locked resident*/
+ kPageIsInMemory = 0x00000020,
+ kPageIsShared = 0x00000040,
+ kPageIsWriteThroughCached = 0x00000080,
+ kPageIsCopyBackCached = 0x00000100,
+ kPageIsHeldResident = 0x00000200, /* held resident - use kPageIsLockedResident to check for locked state*/
+ kPageIsLocked = kPageIsLockedResident, /* Deprecated*/
+ kPageIsResident = kPageIsInMemory /* Deprecated*/
+};
+
+
+struct PageInformation {
+ AreaID area;
+ ItemCount count;
+ PageStateInformation information[1];
+};
+typedef struct PageInformation PageInformation;
+typedef PageInformation * PageInformationPtr;
+
+/* Tasks */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( ExecutionLevel )
+CurrentExecutionLevel (void);
+
+EXTERN_API_C( TaskID )
+CurrentTaskID (void);
+
+EXTERN_API_C( OSStatus )
+DelayFor (Duration delayDuration);
+
+EXTERN_API_C( Boolean )
+InPrivilegedMode (void);
+
+
+/* Software Interrupts */
+EXTERN_API_C( OSStatus )
+CreateSoftwareInterrupt (SoftwareInterruptHandler handler,
+ TaskID task,
+ void * p1,
+ Boolean persistent,
+ SoftwareInterruptID * theSoftwareInterrupt);
+
+
+EXTERN_API_C( OSStatus )
+SendSoftwareInterrupt (SoftwareInterruptID theSoftwareInterrupt,
+ void * p2);
+
+EXTERN_API_C( OSStatus )
+DeleteSoftwareInterrupt (SoftwareInterruptID theSoftwareInterrupt);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if TARGET_OS_MAC
+/* Secondary Interrupts */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+CallSecondaryInterruptHandler2 (SecondaryInterruptHandler2 theHandler,
+ ExceptionHandler exceptionHandler,
+ void * p1,
+ void * p2);
+
+EXTERN_API_C( OSStatus )
+QueueSecondaryInterruptHandler (SecondaryInterruptHandler2 theHandler,
+ ExceptionHandler exceptionHandler,
+ void * p1,
+ void * p2);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_OS_MAC */
+
+/* Timers */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+SetInterruptTimer (const AbsoluteTime * expirationTime,
+ SecondaryInterruptHandler2 handler,
+ void * p1,
+ TimerID * theTimer);
+
+EXTERN_API_C( OSStatus )
+SetPersistentTimer (Duration frequency,
+ SecondaryInterruptHandler2 theHandler,
+ void * p1,
+ TimerID * theTimer);
+
+EXTERN_API_C( OSStatus )
+CancelTimer (TimerID theTimer,
+ AbsoluteTime * timeRemaining);
+
+
+/* I/O related Operations */
+EXTERN_API_C( OSStatus )
+PrepareMemoryForIO (IOPreparationTable * theIOPreparationTable);
+
+EXTERN_API_C( OSStatus )
+CheckpointIO (IOPreparationID theIOPreparation,
+ IOCheckpointOptions options);
+
+
+/* Memory Operations */
+EXTERN_API_C( OSStatus )
+GetPageInformation (AddressSpaceID addressSpace,
+ ConstLogicalAddress base,
+ ByteCount length,
+ PBVersion version,
+ PageInformation * thePageInfo);
+
+/* Processor Cache Related */
+EXTERN_API_C( OSStatus )
+SetProcessorCacheMode (AddressSpaceID addressSpace,
+ ConstLogicalAddress base,
+ ByteCount length,
+ ProcessorCacheMode cacheMode);
+
+/******************************************************************
+ *
+ * Was in DriverSupport.h or DriverServices.h
+ *
+ ******************************************************************/
+#define kAAPLDeviceLogicalAddress "AAPL,address"
+#endif /* CALL_NOT_IN_CARBON */
+
+
+typedef LogicalAddress * DeviceLogicalAddressPtr;
+enum {
+ durationMicrosecond = -1L, /* Microseconds are negative*/
+ durationMillisecond = 1L, /* Milliseconds are positive*/
+ durationSecond = 1000L, /* 1000 * durationMillisecond*/
+ durationMinute = 60000L, /* 60 * durationSecond,*/
+ durationHour = 3600000L, /* 60 * durationMinute,*/
+ durationDay = 86400000L, /* 24 * durationHour,*/
+ durationNoWait = 0L, /* don't block*/
+ durationForever = 0x7FFFFFFF /* no time limit*/
+};
+
+enum {
+ k8BitAccess = 0, /* access as 8 bit*/
+ k16BitAccess = 1, /* access as 16 bit*/
+ k32BitAccess = 2 /* access as 32 bit*/
+};
+
+typedef UnsignedWide Nanoseconds;
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSErr )
+IOCommandIsComplete (IOCommandID theID,
+ OSErr theResult);
+
+EXTERN_API_C( OSErr )
+GetIOCommandInfo (IOCommandID theID,
+ IOCommandContents * theContents,
+ IOCommandCode * theCommand,
+ IOCommandKind * theKind);
+
+EXTERN_API_C( void )
+UpdateDeviceActivity (RegEntryID * deviceEntry);
+
+EXTERN_API_C( void )
+BlockCopy (const void * srcPtr,
+ void * destPtr,
+ Size byteCount);
+
+EXTERN_API_C( LogicalAddress )
+PoolAllocateResident (ByteCount byteSize,
+ Boolean clear);
+
+EXTERN_API_C( OSStatus )
+PoolDeallocate (LogicalAddress address);
+
+EXTERN_API_C( ByteCount )
+GetLogicalPageSize (void);
+
+EXTERN_API_C( ByteCount )
+GetDataCacheLineSize (void);
+
+EXTERN_API_C( OSStatus )
+FlushProcessorCache (AddressSpaceID spaceID,
+ LogicalAddress base,
+ ByteCount length);
+
+EXTERN_API_C( LogicalAddress )
+MemAllocatePhysicallyContiguous (ByteCount byteSize,
+ Boolean clear);
+
+EXTERN_API_C( OSStatus )
+MemDeallocatePhysicallyContiguous (LogicalAddress address);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API_C( AbsoluteTime )
+UpTime (void);
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( void )
+GetTimeBaseInfo (UInt32 * minAbsoluteTimeDelta,
+ UInt32 * theAbsoluteTimeToNanosecondNumerator,
+ UInt32 * theAbsoluteTimeToNanosecondDenominator,
+ UInt32 * theProcessorToAbsoluteTimeNumerator,
+ UInt32 * theProcessorToAbsoluteTimeDenominator);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API_C( Nanoseconds )
+AbsoluteToNanoseconds (AbsoluteTime absoluteTime);
+
+EXTERN_API_C( Duration )
+AbsoluteToDuration (AbsoluteTime absoluteTime);
+
+EXTERN_API_C( AbsoluteTime )
+NanosecondsToAbsolute (Nanoseconds nanoseconds);
+
+EXTERN_API_C( AbsoluteTime )
+DurationToAbsolute (Duration duration);
+
+EXTERN_API_C( AbsoluteTime )
+AddAbsoluteToAbsolute (AbsoluteTime absoluteTime1,
+ AbsoluteTime absoluteTime2);
+
+EXTERN_API_C( AbsoluteTime )
+SubAbsoluteFromAbsolute (AbsoluteTime leftAbsoluteTime,
+ AbsoluteTime rightAbsoluteTime);
+
+EXTERN_API_C( AbsoluteTime )
+AddNanosecondsToAbsolute (Nanoseconds nanoseconds,
+ AbsoluteTime absoluteTime);
+
+EXTERN_API_C( AbsoluteTime )
+AddDurationToAbsolute (Duration duration,
+ AbsoluteTime absoluteTime);
+
+EXTERN_API_C( AbsoluteTime )
+SubNanosecondsFromAbsolute (Nanoseconds nanoseconds,
+ AbsoluteTime absoluteTime);
+
+EXTERN_API_C( AbsoluteTime )
+SubDurationFromAbsolute (Duration duration,
+ AbsoluteTime absoluteTime);
+
+EXTERN_API_C( Nanoseconds )
+AbsoluteDeltaToNanoseconds (AbsoluteTime leftAbsoluteTime,
+ AbsoluteTime rightAbsoluteTime);
+
+EXTERN_API_C( Duration )
+AbsoluteDeltaToDuration (AbsoluteTime leftAbsoluteTime,
+ AbsoluteTime rightAbsoluteTime);
+
+EXTERN_API_C( Nanoseconds )
+DurationToNanoseconds (Duration theDuration);
+
+EXTERN_API_C( Duration )
+NanosecondsToDuration (Nanoseconds theNanoseconds);
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSErr )
+PBQueueInit (QHdrPtr qHeader);
+
+EXTERN_API_C( OSErr )
+PBQueueCreate (QHdrPtr * qHeader);
+
+EXTERN_API_C( OSErr )
+PBQueueDelete (QHdrPtr qHeader);
+
+EXTERN_API_C( void )
+PBEnqueue (QElemPtr qElement,
+ QHdrPtr qHeader);
+
+EXTERN_API_C( OSErr )
+PBEnqueueLast (QElemPtr qElement,
+ QHdrPtr qHeader);
+
+EXTERN_API_C( OSErr )
+PBDequeue (QElemPtr qElement,
+ QHdrPtr qHeader);
+
+EXTERN_API_C( OSErr )
+PBDequeueFirst (QHdrPtr qHeader,
+ QElemPtr * theFirstqElem);
+
+EXTERN_API_C( OSErr )
+PBDequeueLast (QHdrPtr qHeader,
+ QElemPtr * theLastqElem);
+
+EXTERN_API_C( char *)
+CStrCopy (char * dst,
+ const char * src);
+
+EXTERN_API_C( StringPtr )
+PStrCopy (StringPtr dst,
+ ConstStr255Param src);
+
+EXTERN_API_C( char *)
+CStrNCopy (char * dst,
+ const char * src,
+ UInt32 max);
+
+EXTERN_API_C( StringPtr )
+PStrNCopy (StringPtr dst,
+ ConstStr255Param src,
+ UInt32 max);
+
+EXTERN_API_C( char *)
+CStrCat (char * dst,
+ const char * src);
+
+EXTERN_API_C( StringPtr )
+PStrCat (StringPtr dst,
+ ConstStr255Param src);
+
+EXTERN_API_C( char *)
+CStrNCat (char * dst,
+ const char * src,
+ UInt32 max);
+
+EXTERN_API_C( StringPtr )
+PStrNCat (StringPtr dst,
+ ConstStr255Param src,
+ UInt32 max);
+
+EXTERN_API_C( void )
+PStrToCStr (char * dst,
+ ConstStr255Param src);
+
+EXTERN_API_C( void )
+CStrToPStr (Str255 dst,
+ const char * src);
+
+EXTERN_API_C( SInt16 )
+CStrCmp (const char * s1,
+ const char * s2);
+
+EXTERN_API_C( SInt16 )
+PStrCmp (ConstStr255Param str1,
+ ConstStr255Param str2);
+
+EXTERN_API_C( SInt16 )
+CStrNCmp (const char * s1,
+ const char * s2,
+ UInt32 max);
+
+EXTERN_API_C( SInt16 )
+PStrNCmp (ConstStr255Param str1,
+ ConstStr255Param str2,
+ UInt32 max);
+
+EXTERN_API_C( UInt32 )
+CStrLen (const char * src);
+
+EXTERN_API_C( UInt32 )
+PStrLen (ConstStr255Param src);
+
+EXTERN_API_C( OSStatus )
+DeviceProbe (void * theSrc,
+ void * theDest,
+ UInt32 AccessType);
+
+EXTERN_API_C( OSStatus )
+DelayForHardware (AbsoluteTime absoluteTime);
+
+
+
+/******************************************************************
+ *
+ * Was in Interrupts.h
+ *
+ ******************************************************************/
+/* Interrupt types */
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef struct OpaqueInterruptSetID* InterruptSetID;
+typedef long InterruptMemberNumber;
+
+struct InterruptSetMember {
+ InterruptSetID setID;
+ InterruptMemberNumber member;
+};
+typedef struct InterruptSetMember InterruptSetMember;
+enum {
+ kISTChipInterruptSource = 0,
+ kISTOutputDMAInterruptSource = 1,
+ kISTInputDMAInterruptSource = 2,
+ kISTPropertyMemberCount = 3
+};
+
+
+typedef InterruptSetMember ISTProperty[3];
+#define kISTPropertyName "driver-ist"
+
+typedef long InterruptReturnValue;
+enum {
+ kFirstMemberNumber = 1,
+ kIsrIsComplete = 0,
+ kIsrIsNotComplete = -1,
+ kMemberNumberParent = -2
+};
+
+typedef Boolean InterruptSourceState;
+enum {
+ kSourceWasEnabled = true,
+ kSourceWasDisabled = false
+};
+
+
+typedef CALLBACK_API_C( InterruptMemberNumber , InterruptHandler )(InterruptSetMember ISTmember, void *refCon, UInt32 theIntCount);
+typedef CALLBACK_API_C( void , InterruptEnabler )(InterruptSetMember ISTmember, void *refCon);
+typedef CALLBACK_API_C( InterruptSourceState , InterruptDisabler )(InterruptSetMember ISTmember, void *refCon);
+enum {
+ kReturnToParentWhenComplete = 0x00000001,
+ kReturnToParentWhenNotComplete = 0x00000002
+};
+
+typedef OptionBits InterruptSetOptions;
+/* Interrupt Services */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+CreateInterruptSet (InterruptSetID parentSet,
+ InterruptMemberNumber parentMember,
+ InterruptMemberNumber setSize,
+ InterruptSetID * setID,
+ InterruptSetOptions options);
+
+
+EXTERN_API_C( OSStatus )
+InstallInterruptFunctions (InterruptSetID setID,
+ InterruptMemberNumber member,
+ void * refCon,
+ InterruptHandler handlerFunction,
+ InterruptEnabler enableFunction,
+ InterruptDisabler disableFunction);
+
+
+EXTERN_API_C( OSStatus )
+GetInterruptFunctions (InterruptSetID setID,
+ InterruptMemberNumber member,
+ void ** refCon,
+ InterruptHandler * handlerFunction,
+ InterruptEnabler * enableFunction,
+ InterruptDisabler * disableFunction);
+
+EXTERN_API_C( OSStatus )
+ChangeInterruptSetOptions (InterruptSetID setID,
+ InterruptSetOptions options);
+
+EXTERN_API_C( OSStatus )
+GetInterruptSetOptions (InterruptSetID setID,
+ InterruptSetOptions * options);
+
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __DRIVERSERVICES__ */
+
diff --git a/include/qt/DriverSupport.h b/include/qt/DriverSupport.h
new file mode 100644
index 000000000..f61c4d5ee
--- /dev/null
+++ b/include/qt/DriverSupport.h
@@ -0,0 +1,30 @@
+/*
+ File: DriverSupport.h
+
+ Contains: Driver Support Interfaces.
+
+ Version: Technology: Sustem 8
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __DRIVERSUPPORT__
+#define __DRIVERSUPPORT__
+
+#ifndef __DRIVERSERVICES__
+#include "DriverServices.h"
+#endif
+
+
+/*
+ The contents of DriverSupport.h has been merged into DriverServices.h
+*/
+
+#endif /* __DRIVERSUPPORT__ */
+
diff --git a/include/qt/DriverSynchronization.h b/include/qt/DriverSynchronization.h
new file mode 100644
index 000000000..d2d7cb232
--- /dev/null
+++ b/include/qt/DriverSynchronization.h
@@ -0,0 +1,157 @@
+/*
+ File: DriverSynchronization.h
+
+ Contains: Driver Synchronization Interfaces.
+
+ Version: Technology: MacOS 8
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __DRIVERSYNCHRONIZATION__
+#define __DRIVERSYNCHRONIZATION__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( void )
+SynchronizeIO (void) ONEWORDINLINE(0x4E71);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API_C( Boolean )
+CompareAndSwap (UInt32 oldVvalue,
+ UInt32 newValue,
+ UInt32 * OldValueAdr);
+
+EXTERN_API_C( Boolean )
+TestAndClear (UInt32 bit,
+ UInt8 * startAddress);
+
+EXTERN_API_C( Boolean )
+TestAndSet (UInt32 bit,
+ UInt8 * startAddress);
+
+EXTERN_API_C( SInt8 )
+IncrementAtomic8 (SInt8 * value);
+
+EXTERN_API_C( SInt8 )
+DecrementAtomic8 (SInt8 * value);
+
+EXTERN_API_C( SInt8 )
+AddAtomic8 (SInt32 amount,
+ SInt8 * value);
+
+EXTERN_API_C( UInt8 )
+BitAndAtomic8 (UInt32 mask,
+ UInt8 * value);
+
+EXTERN_API_C( UInt8 )
+BitOrAtomic8 (UInt32 mask,
+ UInt8 * value);
+
+EXTERN_API_C( UInt8 )
+BitXorAtomic8 (UInt32 mask,
+ UInt8 * value);
+
+EXTERN_API_C( SInt16 )
+IncrementAtomic16 (SInt16 * value);
+
+EXTERN_API_C( SInt16 )
+DecrementAtomic16 (SInt16 * value);
+
+EXTERN_API_C( SInt16 )
+AddAtomic16 (SInt32 amount,
+ SInt16 * value);
+
+EXTERN_API_C( UInt16 )
+BitAndAtomic16 (UInt32 mask,
+ UInt16 * value);
+
+EXTERN_API_C( UInt16 )
+BitOrAtomic16 (UInt32 mask,
+ UInt16 * value);
+
+EXTERN_API_C( UInt16 )
+BitXorAtomic16 (UInt32 mask,
+ UInt16 * value);
+
+EXTERN_API_C( SInt32 )
+IncrementAtomic (SInt32 * value);
+
+EXTERN_API_C( SInt32 )
+DecrementAtomic (SInt32 * value);
+
+EXTERN_API_C( SInt32 )
+AddAtomic (SInt32 amount,
+ SInt32 * value);
+
+EXTERN_API_C( UInt32 )
+BitAndAtomic (UInt32 mask,
+ UInt32 * value);
+
+EXTERN_API_C( UInt32 )
+BitOrAtomic (UInt32 mask,
+ UInt32 * value);
+
+EXTERN_API_C( UInt32 )
+BitXorAtomic (UInt32 mask,
+ UInt32 * value);
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __DRIVERSYNCHRONIZATION__ */
+
diff --git a/include/qt/ENET.h b/include/qt/ENET.h
new file mode 100644
index 000000000..a00a4e9b7
--- /dev/null
+++ b/include/qt/ENET.h
@@ -0,0 +1,190 @@
+/*
+ File: ENET.h
+
+ Contains: Ethernet Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1990-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __ENET__
+#define __ENET__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __OSUTILS__
+#include "OSUtils.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ ENetSetGeneral = 253, /*Set "general" mode*/
+ ENetGetInfo = 252, /*Get info*/
+ ENetRdCancel = 251, /*Cancel read*/
+ ENetRead = 250, /*Read*/
+ ENetWrite = 249, /*Write*/
+ ENetDetachPH = 248, /*Detach protocol handler*/
+ ENetAttachPH = 247, /*Attach protocol handler*/
+ ENetAddMulti = 246, /*Add a multicast address*/
+ ENetDelMulti = 245 /*Delete a multicast address*/
+};
+
+enum {
+ EAddrRType = FOUR_CHAR_CODE('eadr') /*Alternate address resource type*/
+};
+
+typedef struct EParamBlock EParamBlock;
+typedef EParamBlock * EParamBlkPtr;
+typedef CALLBACK_API( void , ENETCompletionProcPtr )(EParamBlkPtr thePBPtr);
+/*
+ WARNING: ENETCompletionProcPtr uses register based parameters under classic 68k
+ and cannot be written in a high-level language without
+ the help of mixed mode or assembly glue.
+*/
+typedef REGISTER_UPP_TYPE(ENETCompletionProcPtr) ENETCompletionUPP;
+
+struct EParamBlock {
+ QElem * qLink; /*General EParams*/
+ short qType; /*queue type*/
+ short ioTrap; /*routine trap*/
+ Ptr ioCmdAddr; /*routine address*/
+ ENETCompletionUPP ioCompletion; /*completion routine*/
+ OSErr ioResult; /*result code*/
+ StringPtr ioNamePtr; /*->filename*/
+ short ioVRefNum; /*volume reference or drive number*/
+ short ioRefNum; /*driver reference number*/
+ short csCode; /*Call command code*/
+ union {
+ struct {
+ short eProtType; /*Ethernet protocol type*/
+ Ptr ePointer; /*No support for PowerPC code*/
+ short eBuffSize; /*buffer size*/
+ short eDataSize; /*number of bytes read*/
+ } EParms1;
+ struct {
+ Byte eMultiAddr[6]; /*Multicast Address*/
+ } EParms2;
+ } u;
+};
+
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(ENETCompletionUPP)
+ NewENETCompletionUPP (ENETCompletionProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeENETCompletionUPP (ENETCompletionUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeENETCompletionUPP (EParamBlkPtr thePBPtr,
+ ENETCompletionUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppENETCompletionProcInfo = 0x00009802 }; /* register no_return_value Func(4_bytes:A0) */
+ #define NewENETCompletionUPP(userRoutine) (ENETCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppENETCompletionProcInfo, GetCurrentArchitecture())
+ #define DisposeENETCompletionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter InvokeENETCompletionUPP(__A0, __A1)
+ void InvokeENETCompletionUPP(EParamBlkPtr thePBPtr, ENETCompletionUPP userUPP) = 0x4E91;
+ #else
+ #define InvokeENETCompletionUPP(thePBPtr, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppENETCompletionProcInfo, (thePBPtr))
+ #endif
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewENETCompletionProc(userRoutine) NewENETCompletionUPP(userRoutine)
+#define CallENETCompletionProc(userRoutine, thePBPtr) InvokeENETCompletionUPP(thePBPtr, userRoutine)
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+EWrite (EParamBlkPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+EAttachPH (EParamBlkPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+EDetachPH (EParamBlkPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+ERead (EParamBlkPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+ERdCancel (EParamBlkPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+EGetInfo (EParamBlkPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+ESetGeneral (EParamBlkPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+EAddMulti (EParamBlkPtr thePBptr,
+ Boolean async);
+
+EXTERN_API( OSErr )
+EDelMulti (EParamBlkPtr thePBptr,
+ Boolean async);
+
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __ENET__ */
+
diff --git a/include/qt/EPPC.h b/include/qt/EPPC.h
new file mode 100644
index 000000000..1afa95596
--- /dev/null
+++ b/include/qt/EPPC.h
@@ -0,0 +1,224 @@
+/*
+ File: EPPC.h
+
+ Contains: High Level Event Manager Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1988-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __EPPC__
+#define __EPPC__
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+#ifndef __APPLETALK__
+#include "AppleTalk.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+#ifndef __PPCTOOLBOX__
+#include "PPCToolbox.h"
+#endif
+
+#ifndef __PROCESSES__
+#include "Processes.h"
+#endif
+
+#ifndef __EVENTS__
+#include "Events.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ /* postOptions currently supported */
+ receiverIDMask = 0x0000F000,
+ receiverIDisPSN = 0x00008000,
+ receiverIDisSignature = 0x00007000,
+ receiverIDisSessionID = 0x00006000,
+ receiverIDisTargetID = 0x00005000,
+ systemOptionsMask = 0x00000F00,
+ nReturnReceipt = 0x00000200,
+ priorityMask = 0x000000FF,
+ nAttnMsg = 0x00000001
+};
+
+enum {
+ /* constant for return receipts */
+ HighLevelEventMsgClass = FOUR_CHAR_CODE('jaym'),
+ rtrnReceiptMsgID = FOUR_CHAR_CODE('rtrn')
+};
+
+enum {
+ msgWasPartiallyAccepted = 2,
+ msgWasFullyAccepted = 1,
+ msgWasNotAccepted = 0
+};
+
+
+struct TargetID {
+ long sessionID;
+ PPCPortRec name;
+ LocationNameRec location;
+ PPCPortRec recvrName;
+};
+typedef struct TargetID TargetID;
+typedef TargetID * TargetIDPtr;
+typedef TargetIDPtr * TargetIDHandle;
+typedef TargetIDHandle TargetIDHdl;
+
+typedef TargetID SenderID;
+typedef SenderID * SenderIDPtr;
+
+struct HighLevelEventMsg {
+ unsigned short HighLevelEventMsgHeaderLength;
+ unsigned short version;
+ unsigned long reserved1;
+ EventRecord theMsgEvent;
+ unsigned long userRefcon;
+ unsigned long postingOptions;
+ unsigned long msgLength;
+};
+typedef struct HighLevelEventMsg HighLevelEventMsg;
+typedef HighLevelEventMsg * HighLevelEventMsgPtr;
+typedef HighLevelEventMsgPtr * HighLevelEventMsgHandle;
+typedef HighLevelEventMsgHandle HighLevelEventMsgHdl;
+typedef CALLBACK_API( Boolean , GetSpecificFilterProcPtr )(void *contextPtr, HighLevelEventMsgPtr msgBuff, const TargetID *sender);
+typedef STACK_UPP_TYPE(GetSpecificFilterProcPtr) GetSpecificFilterUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GetSpecificFilterUPP)
+ NewGetSpecificFilterUPP (GetSpecificFilterProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGetSpecificFilterUPP (GetSpecificFilterUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeGetSpecificFilterUPP (void * contextPtr,
+ HighLevelEventMsgPtr msgBuff,
+ const TargetID * sender,
+ GetSpecificFilterUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGetSpecificFilterProcInfo = 0x00000FD0 }; /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes) */
+ #define NewGetSpecificFilterUPP(userRoutine) (GetSpecificFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGetSpecificFilterProcInfo, GetCurrentArchitecture())
+ #define DisposeGetSpecificFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGetSpecificFilterUPP(contextPtr, msgBuff, sender, userUPP) (Boolean)CALL_THREE_PARAMETER_UPP((userUPP), uppGetSpecificFilterProcInfo, (contextPtr), (msgBuff), (sender))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGetSpecificFilterProc(userRoutine) NewGetSpecificFilterUPP(userRoutine)
+#define CallGetSpecificFilterProc(userRoutine, contextPtr, msgBuff, sender) InvokeGetSpecificFilterUPP(contextPtr, msgBuff, sender, userRoutine)
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+PostHighLevelEvent (const EventRecord * theEvent,
+ void * receiverID,
+ unsigned long msgRefcon,
+ void * msgBuff,
+ unsigned long msgLen,
+ unsigned long postingOptions) THREEWORDINLINE(0x3F3C, 0x0034, 0xA88F);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+AcceptHighLevelEvent (TargetID * sender,
+ unsigned long * msgRefcon,
+ void * msgBuff,
+ unsigned long * msgLen) THREEWORDINLINE(0x3F3C, 0x0033, 0xA88F);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+GetProcessSerialNumberFromPortName (const PPCPortRec * portName,
+ ProcessSerialNumber * pPSN) THREEWORDINLINE(0x3F3C, 0x0035, 0xA88F);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+GetPortNameFromProcessSerialNumber (PPCPortRec * portName,
+ const ProcessSerialNumber * pPSN) THREEWORDINLINE(0x3F3C, 0x0046, 0xA88F);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( Boolean )
+GetSpecificHighLevelEvent (GetSpecificFilterUPP aFilter,
+ void * contextPtr,
+ OSErr * err) THREEWORDINLINE(0x3F3C, 0x0045, 0xA88F);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __EPPC__ */
+
diff --git a/include/qt/Editions.h b/include/qt/Editions.h
new file mode 100644
index 000000000..a5791ac19
--- /dev/null
+++ b/include/qt/Editions.h
@@ -0,0 +1,528 @@
+/*
+ File: Editions.h
+
+ Contains: Edition Manager Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1989-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __EDITIONS__
+#define __EDITIONS__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+#ifndef __ALIASES__
+#include "Aliases.h"
+#endif
+
+#ifndef __DIALOGS__
+#include "Dialogs.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ /* resource types */
+ rSectionType = FOUR_CHAR_CODE('sect'), /* ResType of saved SectionRecords */
+ /* Finder types for edition files */
+ kPICTEditionFileType = FOUR_CHAR_CODE('edtp'),
+ kTEXTEditionFileType = FOUR_CHAR_CODE('edtt'),
+ ksndEditionFileType = FOUR_CHAR_CODE('edts'),
+ kUnknownEditionFileType = FOUR_CHAR_CODE('edtu'),
+ kPublisherDocAliasFormat = FOUR_CHAR_CODE('alis'),
+ kPreviewFormat = FOUR_CHAR_CODE('prvw'),
+ kFormatListFormat = FOUR_CHAR_CODE('fmts')
+};
+
+enum {
+ /* section types */
+ stSubscriber = 0x01,
+ stPublisher = 0x0A
+};
+
+enum {
+ sumAutomatic = 0, /* subscriber update mode - Automatically */
+ sumManual = 1, /* subscriber update mode - Manually */
+ pumOnSave = 0, /* publisher update mode - OnSave */
+ pumManual = 1 /* publisher update mode - Manually */
+};
+
+enum {
+ kPartsNotUsed = 0,
+ kPartNumberUnknown = -1
+};
+
+enum {
+ kPreviewWidth = 120,
+ kPreviewHeight = 120
+};
+
+enum {
+ /* bits for formatsMask */
+ kPICTformatMask = 1,
+ kTEXTformatMask = 2,
+ ksndFormatMask = 4
+};
+
+
+enum {
+ /* pseudo-item hits for dialogHooks the first is for NewPublisher or NewSubscriber Dialogs */
+ emHookRedrawPreview = 150, /* the following are for SectionOptions Dialog */
+ emHookCancelSection = 160,
+ emHookGoToPublisher = 161,
+ emHookGetEditionNow = 162,
+ emHookSendEditionNow = 162,
+ emHookManualUpdateMode = 163,
+ emHookAutoUpdateMode = 164
+};
+
+
+enum {
+ /* the refcon field of the dialog record during a modalfilter or dialoghook contains one the following */
+ emOptionsDialogRefCon = FOUR_CHAR_CODE('optn'),
+ emCancelSectionDialogRefCon = FOUR_CHAR_CODE('cncl'),
+ emGoToPubErrDialogRefCon = FOUR_CHAR_CODE('gerr')
+};
+
+enum {
+ kFormatLengthUnknown = -1
+};
+
+/* one byte, stSubscriber or stPublisher */
+typedef SignedByte SectionType;
+/* seconds since 1904 */
+typedef unsigned long TimeStamp;
+/* similar to ResType */
+typedef FourCharCode FormatType;
+/* used in Edition I/O */
+typedef Handle EditionRefNum;
+/* update modes */
+/* sumAutomatic, pumSuspend, etc */
+typedef short UpdateMode;
+typedef struct SectionRecord SectionRecord;
+typedef SectionRecord * SectionPtr;
+typedef SectionPtr * SectionHandle;
+
+struct SectionRecord {
+ SignedByte version; /* always 0x01 in system 7.0 */
+ SectionType kind; /* stSubscriber or stPublisher */
+ UpdateMode mode; /* auto or manual */
+ TimeStamp mdDate; /* last change in document */
+ long sectionID; /* app. specific, unique per document */
+ long refCon; /* application specific */
+ AliasHandle alias; /* handle to Alias Record */
+ long subPart; /* which part of container file */
+ SectionHandle nextSection; /* for linked list of app's Sections */
+ Handle controlBlock; /* used internally */
+ EditionRefNum refNum; /* used internally */
+};
+
+
+struct EditionContainerSpec {
+ FSSpec theFile;
+ ScriptCode theFileScript;
+ long thePart;
+ Str31 thePartName;
+ ScriptCode thePartScript;
+};
+typedef struct EditionContainerSpec EditionContainerSpec;
+typedef EditionContainerSpec * EditionContainerSpecPtr;
+
+struct EditionInfoRecord {
+ TimeStamp crDate; /* date EditionContainer was created */
+ TimeStamp mdDate; /* date of last change */
+ OSType fdCreator; /* file creator */
+ OSType fdType; /* file type */
+ EditionContainerSpec container; /* the Edition */
+};
+typedef struct EditionInfoRecord EditionInfoRecord;
+
+struct NewPublisherReply {
+ Boolean canceled; /* O */
+ Boolean replacing;
+ Boolean usePart; /* I */
+ SInt8 filler;
+ Handle preview; /* I */
+ FormatType previewFormat; /* I */
+ EditionContainerSpec container; /* I/O */
+};
+typedef struct NewPublisherReply NewPublisherReply;
+
+struct NewSubscriberReply {
+ Boolean canceled; /* O */
+ SignedByte formatsMask;
+ EditionContainerSpec container; /*I/O*/
+};
+typedef struct NewSubscriberReply NewSubscriberReply;
+
+struct SectionOptionsReply {
+ Boolean canceled; /* O */
+ Boolean changed; /* O */
+ SectionHandle sectionH; /* I */
+ ResType action; /* O */
+};
+typedef struct SectionOptionsReply SectionOptionsReply;
+typedef CALLBACK_API( Boolean , ExpModalFilterProcPtr )(DialogPtr theDialog, EventRecord *theEvent, short itemOffset, short *itemHit, Ptr yourDataPtr);
+typedef CALLBACK_API( short , ExpDlgHookProcPtr )(short itemOffset, short itemHit, DialogPtr theDialog, Ptr yourDataPtr);
+typedef STACK_UPP_TYPE(ExpModalFilterProcPtr) ExpModalFilterUPP;
+typedef STACK_UPP_TYPE(ExpDlgHookProcPtr) ExpDlgHookUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(ExpModalFilterUPP)
+ NewExpModalFilterUPP (ExpModalFilterProcPtr userRoutine);
+
+ EXTERN_API(ExpDlgHookUPP)
+ NewExpDlgHookUPP (ExpDlgHookProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeExpModalFilterUPP (ExpModalFilterUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeExpDlgHookUPP (ExpDlgHookUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeExpModalFilterUPP (DialogPtr theDialog,
+ EventRecord * theEvent,
+ short itemOffset,
+ short * itemHit,
+ Ptr yourDataPtr,
+ ExpModalFilterUPP userUPP);
+
+ EXTERN_API(short)
+ InvokeExpDlgHookUPP (short itemOffset,
+ short itemHit,
+ DialogPtr theDialog,
+ Ptr yourDataPtr,
+ ExpDlgHookUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppExpModalFilterProcInfo = 0x0000FBD0 }; /* pascal 1_byte Func(4_bytes, 4_bytes, 2_bytes, 4_bytes, 4_bytes) */
+ enum { uppExpDlgHookProcInfo = 0x00003EA0 }; /* pascal 2_bytes Func(2_bytes, 2_bytes, 4_bytes, 4_bytes) */
+ #define NewExpModalFilterUPP(userRoutine) (ExpModalFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppExpModalFilterProcInfo, GetCurrentArchitecture())
+ #define NewExpDlgHookUPP(userRoutine) (ExpDlgHookUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppExpDlgHookProcInfo, GetCurrentArchitecture())
+ #define DisposeExpModalFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeExpDlgHookUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeExpModalFilterUPP(theDialog, theEvent, itemOffset, itemHit, yourDataPtr, userUPP) (Boolean)CALL_FIVE_PARAMETER_UPP((userUPP), uppExpModalFilterProcInfo, (theDialog), (theEvent), (itemOffset), (itemHit), (yourDataPtr))
+ #define InvokeExpDlgHookUPP(itemOffset, itemHit, theDialog, yourDataPtr, userUPP) (short)CALL_FOUR_PARAMETER_UPP((userUPP), uppExpDlgHookProcInfo, (itemOffset), (itemHit), (theDialog), (yourDataPtr))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewExpModalFilterProc(userRoutine) NewExpModalFilterUPP(userRoutine)
+#define NewExpDlgHookProc(userRoutine) NewExpDlgHookUPP(userRoutine)
+#define CallExpModalFilterProc(userRoutine, theDialog, theEvent, itemOffset, itemHit, yourDataPtr) InvokeExpModalFilterUPP(theDialog, theEvent, itemOffset, itemHit, yourDataPtr, userRoutine)
+#define CallExpDlgHookProc(userRoutine, itemOffset, itemHit, theDialog, yourDataPtr) InvokeExpDlgHookUPP(itemOffset, itemHit, theDialog, yourDataPtr, userRoutine)
+
+typedef SInt8 FormatIOVerb;
+enum {
+ ioHasFormat = 0,
+ ioReadFormat = 1,
+ ioNewFormat = 2,
+ ioWriteFormat = 3
+};
+
+
+typedef SInt8 EditionOpenerVerb;
+enum {
+ eoOpen = 0,
+ eoClose = 1,
+ eoOpenNew = 2,
+ eoCloseNew = 3,
+ eoCanSubscribe = 4
+};
+
+
+
+struct FormatIOParamBlock {
+ long ioRefNum;
+ FormatType format;
+ long formatIndex;
+ unsigned long offset;
+ Ptr buffPtr;
+ unsigned long buffLen;
+};
+typedef struct FormatIOParamBlock FormatIOParamBlock;
+typedef struct EditionOpenerParamBlock EditionOpenerParamBlock;
+typedef CALLBACK_API( short , FormatIOProcPtr )(FormatIOVerb selector, FormatIOParamBlock *PB);
+typedef CALLBACK_API( short , EditionOpenerProcPtr )(EditionOpenerVerb selector, EditionOpenerParamBlock *PB);
+typedef STACK_UPP_TYPE(FormatIOProcPtr) FormatIOUPP;
+typedef STACK_UPP_TYPE(EditionOpenerProcPtr) EditionOpenerUPP;
+
+struct EditionOpenerParamBlock {
+ EditionInfoRecord info;
+ SectionHandle sectionH;
+ const FSSpec * document;
+ OSType fdCreator;
+ long ioRefNum;
+ FormatIOUPP ioProc;
+ Boolean success;
+ SignedByte formatsMask;
+};
+
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(FormatIOUPP)
+ NewFormatIOUPP (FormatIOProcPtr userRoutine);
+
+ EXTERN_API(EditionOpenerUPP)
+ NewEditionOpenerUPP (EditionOpenerProcPtr userRoutine);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppFormatIOProcInfo = 0x00000360 }; /* pascal 2_bytes Func(1_byte, 4_bytes) */
+ enum { uppEditionOpenerProcInfo = 0x00000360 }; /* pascal 2_bytes Func(1_byte, 4_bytes) */
+ #define NewFormatIOUPP(userRoutine) (FormatIOUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppFormatIOProcInfo, GetCurrentArchitecture())
+ #define NewEditionOpenerUPP(userRoutine) (EditionOpenerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppEditionOpenerProcInfo, GetCurrentArchitecture())
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewFormatIOProc(userRoutine) NewFormatIOUPP(userRoutine)
+#define NewEditionOpenerProc(userRoutine) NewEditionOpenerUPP(userRoutine)
+/*
+ Section events now arrive in the message buffer using the AppleEvent format.
+ The direct object parameter is an aeTemporaryIDParamType ('tid '). The temporary
+ ID's type is rSectionType ('sect') and the 32-bit value is a SectionHandle.
+ The following is a sample buffer
+
+ name offset contents
+ ---- ------ --------
+ header 0 'aevt'
+ majorVersion 4 0x01
+ minorVersion 6 0x01
+ endOfMetaData 8 ';;;;'
+ directObjKey 12 '----'
+ paramType 16 'tid '
+ paramLength 20 0x0008
+ tempIDType 24 'sect'
+ tempID 28 the SectionHandle <-- this is want you want
+*/
+
+enum {
+ sectionEventMsgClass = FOUR_CHAR_CODE('sect'),
+ sectionReadMsgID = FOUR_CHAR_CODE('read'),
+ sectionWriteMsgID = FOUR_CHAR_CODE('writ'),
+ sectionScrollMsgID = FOUR_CHAR_CODE('scrl'),
+ sectionCancelMsgID = FOUR_CHAR_CODE('cncl')
+};
+
+enum {
+ currentEditionMgrVers = 0x0011
+};
+
+
+#if TARGET_RT_MAC_CFM
+#define InitEditionPack() InitEditionPackVersion(currentEditionMgrVers)
+#else
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+InitEditionPack (void) FIVEWORDINLINE(0x3F3C, 0x0011, 0x303C, 0x0100, 0xA82D);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_RT_MAC_CFM */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+InitEditionPackVersion (short curEditionMgrVers) THREEWORDINLINE(0x303C, 0x0100, 0xA82D);
+
+EXTERN_API( OSErr )
+NewSection (const EditionContainerSpec * container,
+ const FSSpec * sectionDocument, /* can be NULL */
+ SectionType kind,
+ long sectionID,
+ UpdateMode initalMode,
+ SectionHandle * sectionH) THREEWORDINLINE(0x303C, 0x0A02, 0xA82D);
+
+EXTERN_API( OSErr )
+RegisterSection (const FSSpec * sectionDocument,
+ SectionHandle sectionH,
+ Boolean * aliasWasUpdated) THREEWORDINLINE(0x303C, 0x0604, 0xA82D);
+
+EXTERN_API( OSErr )
+UnRegisterSection (SectionHandle sectionH) THREEWORDINLINE(0x303C, 0x0206, 0xA82D);
+
+EXTERN_API( OSErr )
+IsRegisteredSection (SectionHandle sectionH) THREEWORDINLINE(0x303C, 0x0208, 0xA82D);
+
+EXTERN_API( OSErr )
+AssociateSection (SectionHandle sectionH,
+ const FSSpec * newSectionDocument) THREEWORDINLINE(0x303C, 0x040C, 0xA82D);
+
+EXTERN_API( OSErr )
+CreateEditionContainerFile (const FSSpec * editionFile,
+ OSType fdCreator,
+ ScriptCode editionFileNameScript) THREEWORDINLINE(0x303C, 0x050E, 0xA82D);
+
+EXTERN_API( OSErr )
+DeleteEditionContainerFile (const FSSpec * editionFile) THREEWORDINLINE(0x303C, 0x0210, 0xA82D);
+
+EXTERN_API( OSErr )
+OpenEdition (SectionHandle subscriberSectionH,
+ EditionRefNum * refNum) THREEWORDINLINE(0x303C, 0x0412, 0xA82D);
+
+EXTERN_API( OSErr )
+OpenNewEdition (SectionHandle publisherSectionH,
+ OSType fdCreator,
+ const FSSpec * publisherSectionDocument, /* can be NULL */
+ EditionRefNum * refNum) THREEWORDINLINE(0x303C, 0x0814, 0xA82D);
+
+EXTERN_API( OSErr )
+CloseEdition (EditionRefNum whichEdition,
+ Boolean successful) THREEWORDINLINE(0x303C, 0x0316, 0xA82D);
+
+EXTERN_API( OSErr )
+EditionHasFormat (EditionRefNum whichEdition,
+ FormatType whichFormat,
+ Size * formatSize) THREEWORDINLINE(0x303C, 0x0618, 0xA82D);
+
+EXTERN_API( OSErr )
+ReadEdition (EditionRefNum whichEdition,
+ FormatType whichFormat,
+ void * buffPtr,
+ Size * buffLen) THREEWORDINLINE(0x303C, 0x081A, 0xA82D);
+
+EXTERN_API( OSErr )
+WriteEdition (EditionRefNum whichEdition,
+ FormatType whichFormat,
+ const void * buffPtr,
+ Size buffLen) THREEWORDINLINE(0x303C, 0x081C, 0xA82D);
+
+EXTERN_API( OSErr )
+GetEditionFormatMark (EditionRefNum whichEdition,
+ FormatType whichFormat,
+ unsigned long * currentMark) THREEWORDINLINE(0x303C, 0x061E, 0xA82D);
+
+EXTERN_API( OSErr )
+SetEditionFormatMark (EditionRefNum whichEdition,
+ FormatType whichFormat,
+ unsigned long setMarkTo) THREEWORDINLINE(0x303C, 0x0620, 0xA82D);
+
+EXTERN_API( OSErr )
+GetEditionInfo (SectionHandle sectionH,
+ EditionInfoRecord * editionInfo) THREEWORDINLINE(0x303C, 0x0422, 0xA82D);
+
+EXTERN_API( OSErr )
+GoToPublisherSection (const EditionContainerSpec * container) THREEWORDINLINE(0x303C, 0x0224, 0xA82D);
+
+EXTERN_API( OSErr )
+GetLastEditionContainerUsed (EditionContainerSpec * container) THREEWORDINLINE(0x303C, 0x0226, 0xA82D);
+
+EXTERN_API( OSErr )
+GetStandardFormats (const EditionContainerSpec * container,
+ FormatType * previewFormat,
+ Handle preview,
+ Handle publisherAlias,
+ Handle formats) THREEWORDINLINE(0x303C, 0x0A28, 0xA82D);
+
+EXTERN_API( OSErr )
+GetEditionOpenerProc (EditionOpenerUPP * opener) THREEWORDINLINE(0x303C, 0x022A, 0xA82D);
+
+EXTERN_API( OSErr )
+SetEditionOpenerProc (EditionOpenerUPP opener) THREEWORDINLINE(0x303C, 0x022C, 0xA82D);
+
+EXTERN_API( OSErr )
+CallEditionOpenerProc (EditionOpenerVerb selector,
+ EditionOpenerParamBlock * PB,
+ EditionOpenerUPP routine) THREEWORDINLINE(0x303C, 0x052E, 0xA82D);
+
+EXTERN_API( OSErr )
+CallFormatIOProc (FormatIOVerb selector,
+ FormatIOParamBlock * PB,
+ FormatIOUPP routine) THREEWORDINLINE(0x303C, 0x0530, 0xA82D);
+
+EXTERN_API( OSErr )
+NewSubscriberDialog (NewSubscriberReply * reply) THREEWORDINLINE(0x303C, 0x0232, 0xA82D);
+
+EXTERN_API( OSErr )
+NewSubscriberExpDialog (NewSubscriberReply * reply,
+ Point where,
+ short expansionDITLresID,
+ ExpDlgHookUPP dlgHook,
+ ExpModalFilterUPP filter,
+ void * yourDataPtr) THREEWORDINLINE(0x303C, 0x0B34, 0xA82D);
+
+EXTERN_API( OSErr )
+NewPublisherDialog (NewPublisherReply * reply) THREEWORDINLINE(0x303C, 0x0236, 0xA82D);
+
+EXTERN_API( OSErr )
+NewPublisherExpDialog (NewPublisherReply * reply,
+ Point where,
+ short expansionDITLresID,
+ ExpDlgHookUPP dlgHook,
+ ExpModalFilterUPP filter,
+ void * yourDataPtr) THREEWORDINLINE(0x303C, 0x0B38, 0xA82D);
+
+EXTERN_API( OSErr )
+SectionOptionsDialog (SectionOptionsReply * reply) THREEWORDINLINE(0x303C, 0x023A, 0xA82D);
+
+EXTERN_API( OSErr )
+SectionOptionsExpDialog (SectionOptionsReply * reply,
+ Point where,
+ short expansionDITLresID,
+ ExpDlgHookUPP dlgHook,
+ ExpModalFilterUPP filter,
+ void * yourDataPtr) THREEWORDINLINE(0x303C, 0x0B3C, 0xA82D);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __EDITIONS__ */
+
diff --git a/include/qt/Endian.h b/include/qt/Endian.h
new file mode 100644
index 000000000..137c365ff
--- /dev/null
+++ b/include/qt/Endian.h
@@ -0,0 +1,451 @@
+/*
+ File: Endian.h
+
+ Contains: QuickTime Interfaces
+
+ Version: Technology: QuickTime 3.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1997-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __ENDIAN__
+#define __ENDIAN__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*
+ This file provides Endian Flipping routines for dealing with converting data
+ between Big-Endian and Little-Endian machines. These routines are useful
+ when writing code to compile for both Big and Little Endian machines and
+ which must handle other endian number formats, such as reading or writing
+ to a file or network packet.
+
+ These routines are named as follows:
+
+ Endian<U><W>_<S>to<D>
+
+ where
+ <U> is whether the integer is signed ('S') or unsigned ('U')
+ <W> is integer bit width: 16, 32, or 64
+ <S> is the source endian format: 'B' for big, 'L' for little, or 'N' for native
+ <D> is the destination endian format: 'B' for big, 'L' for little, or 'N' for native
+
+ For example, to convert a Big Endian 32-bit unsigned integer to the current native format use:
+
+ long i = EndianU32_BtoN(data);
+
+ This file is set up so that the function macro to nothing when the target runtime already
+ is the desired format (e.g. on Big Endian machines, EndianU32_BtoN() macros away).
+
+ If long long's are not supported, you cannot get 64-bit quantities as a single value.
+ The macros are not defined in that case.
+
+
+
+ <<< W A R N I N G >>>
+
+ It is very important not to put any autoincrements inside the macros. This
+ will produce erroneous results because each time the address is accessed in the macro,
+ the increment occurs.
+
+ */
+/*
+ Note: These functions are currently not implemented in any library
+ and are only listed here as function prototypes to document the macros
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( SInt16 )
+EndianS16_BtoN (SInt16 value);
+
+EXTERN_API_C( SInt16 )
+EndianS16_NtoB (SInt16 value);
+
+EXTERN_API_C( SInt16 )
+EndianS16_LtoN (SInt16 value);
+
+EXTERN_API_C( SInt16 )
+EndianS16_NtoL (SInt16 value);
+
+EXTERN_API_C( SInt16 )
+EndianS16_LtoB (SInt16 value);
+
+EXTERN_API_C( SInt16 )
+EndianS16_BtoL (SInt16 value);
+
+EXTERN_API_C( UInt16 )
+EndianU16_BtoN (UInt16 value);
+
+EXTERN_API_C( UInt16 )
+EndianU16_NtoB (UInt16 value);
+
+EXTERN_API_C( UInt16 )
+EndianU16_LtoN (UInt16 value);
+
+EXTERN_API_C( UInt16 )
+EndianU16_NtoL (UInt16 value);
+
+EXTERN_API_C( UInt16 )
+EndianU16_LtoB (UInt16 value);
+
+EXTERN_API_C( UInt16 )
+EndianU16_BtoL (UInt16 value);
+
+EXTERN_API_C( SInt32 )
+EndianS32_BtoN (SInt32 value);
+
+EXTERN_API_C( SInt32 )
+EndianS32_NtoB (SInt32 value);
+
+EXTERN_API_C( SInt32 )
+EndianS32_LtoN (SInt32 value);
+
+EXTERN_API_C( SInt32 )
+EndianS32_NtoL (SInt32 value);
+
+EXTERN_API_C( SInt32 )
+EndianS32_LtoB (SInt32 value);
+
+EXTERN_API_C( SInt32 )
+EndianS32_BtoL (SInt32 value);
+
+EXTERN_API_C( UInt32 )
+EndianU32_BtoN (UInt32 value);
+
+EXTERN_API_C( UInt32 )
+EndianU32_NtoB (UInt32 value);
+
+EXTERN_API_C( UInt32 )
+EndianU32_LtoN (UInt32 value);
+
+EXTERN_API_C( UInt32 )
+EndianU32_NtoL (UInt32 value);
+
+EXTERN_API_C( UInt32 )
+EndianU32_LtoB (UInt32 value);
+
+EXTERN_API_C( UInt32 )
+EndianU32_BtoL (UInt32 value);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if !TYPE_LONGLONG
+/*
+ Note: If these Int64 functions ever were implemented in a library,
+ we would need two libraries, one for compilers that
+ support long long and one for other compilers.
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( SInt64 )
+EndianS64_BtoN (SInt64 value);
+
+EXTERN_API_C( SInt64 )
+EndianS64_NtoB (SInt64 value);
+
+EXTERN_API_C( SInt64 )
+EndianS64_LtoN (SInt64 value);
+
+EXTERN_API_C( SInt64 )
+EndianS64_NtoL (SInt64 value);
+
+EXTERN_API_C( SInt64 )
+EndianS64_LtoB (SInt64 value);
+
+EXTERN_API_C( SInt64 )
+EndianS64_BtoL (SInt64 value);
+
+EXTERN_API_C( UInt64 )
+EndianU64_BtoN (UInt64 value);
+
+EXTERN_API_C( UInt64 )
+EndianU64_NtoB (UInt64 value);
+
+EXTERN_API_C( UInt64 )
+EndianU64_LtoN (UInt64 value);
+
+EXTERN_API_C( UInt64 )
+EndianU64_NtoL (UInt64 value);
+
+EXTERN_API_C( UInt64 )
+EndianU64_LtoB (UInt64 value);
+
+EXTERN_API_C( UInt64 )
+EndianU64_BtoL (UInt64 value);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* !TYPE_LONGLONG */
+
+/*
+ These types are used for structures that contain data that is
+ always in BigEndian format. This extra typing prevents little
+ endian code from directly changing the data, thus saving much
+ time in the debugger.
+*/
+
+#if TARGET_RT_LITTLE_ENDIAN
+
+struct BigEndianLong {
+ long bigEndianValue;
+};
+typedef struct BigEndianLong BigEndianLong;
+
+struct BigEndianUnsignedLong {
+ unsigned long bigEndianValue;
+};
+typedef struct BigEndianUnsignedLong BigEndianUnsignedLong;
+
+struct BigEndianShort {
+ short bigEndianValue;
+};
+typedef struct BigEndianShort BigEndianShort;
+
+struct BigEndianUnsignedShort {
+ unsigned short bigEndianValue;
+};
+typedef struct BigEndianUnsignedShort BigEndianUnsignedShort;
+
+struct BigEndianFixed {
+ Fixed bigEndianValue;
+};
+typedef struct BigEndianFixed BigEndianFixed;
+
+struct BigEndianUnsignedFixed {
+ UnsignedFixed bigEndianValue;
+};
+typedef struct BigEndianUnsignedFixed BigEndianUnsignedFixed;
+
+struct BigEndianOSType {
+ OSType bigEndianValue;
+};
+typedef struct BigEndianOSType BigEndianOSType;
+#else
+
+typedef long BigEndianLong;
+typedef unsigned long BigEndianUnsignedLong;
+typedef short BigEndianShort;
+typedef unsigned short BigEndianUnsignedShort;
+typedef Fixed BigEndianFixed;
+typedef UnsignedFixed BigEndianUnsignedFixed;
+typedef OSType BigEndianOSType;
+#endif /* TARGET_RT_LITTLE_ENDIAN */
+
+
+/*
+ Macro away no-op functions
+*/
+#if TARGET_RT_BIG_ENDIAN
+ #define EndianS16_BtoN(value) (value)
+ #define EndianS16_NtoB(value) (value)
+ #define EndianU16_BtoN(value) (value)
+ #define EndianU16_NtoB(value) (value)
+ #define EndianS32_BtoN(value) (value)
+ #define EndianS32_NtoB(value) (value)
+ #define EndianU32_BtoN(value) (value)
+ #define EndianU32_NtoB(value) (value)
+ #define EndianS64_BtoN(value) (value)
+ #define EndianS64_NtoB(value) (value)
+ #define EndianU64_BtoN(value) (value)
+ #define EndianU64_NtoB(value) (value)
+#else
+ #define EndianS16_LtoN(value) (value)
+ #define EndianS16_NtoL(value) (value)
+ #define EndianU16_LtoN(value) (value)
+ #define EndianU16_NtoL(value) (value)
+ #define EndianS32_LtoN(value) (value)
+ #define EndianS32_NtoL(value) (value)
+ #define EndianU32_LtoN(value) (value)
+ #define EndianU32_NtoL(value) (value)
+ #define EndianS64_LtoN(value) (value)
+ #define EndianS64_NtoL(value) (value)
+ #define EndianU64_LtoN(value) (value)
+ #define EndianU64_NtoL(value) (value)
+#endif
+
+
+
+/*
+ Map native to actual
+*/
+#if TARGET_RT_BIG_ENDIAN
+ #define EndianS16_LtoN(value) EndianS16_LtoB(value)
+ #define EndianS16_NtoL(value) EndianS16_BtoL(value)
+ #define EndianU16_LtoN(value) EndianU16_LtoB(value)
+ #define EndianU16_NtoL(value) EndianU16_BtoL(value)
+ #define EndianS32_LtoN(value) EndianS32_LtoB(value)
+ #define EndianS32_NtoL(value) EndianS32_BtoL(value)
+ #define EndianU32_LtoN(value) EndianU32_LtoB(value)
+ #define EndianU32_NtoL(value) EndianU32_BtoL(value)
+ #define EndianS64_LtoN(value) EndianS64_LtoB(value)
+ #define EndianS64_NtoL(value) EndianS64_BtoL(value)
+ #define EndianU64_LtoN(value) EndianU64_LtoB(value)
+ #define EndianU64_NtoL(value) EndianU64_BtoL(value)
+#else
+ #define EndianS16_BtoN(value) EndianS16_BtoL(value)
+ #define EndianS16_NtoB(value) EndianS16_LtoB(value)
+ #define EndianU16_BtoN(value) EndianU16_BtoL(value)
+ #define EndianU16_NtoB(value) EndianU16_LtoB(value)
+ #define EndianS32_BtoN(value) EndianS32_BtoL(value)
+ #define EndianS32_NtoB(value) EndianS32_LtoB(value)
+ #define EndianU32_BtoN(value) EndianU32_BtoL(value)
+ #define EndianU32_NtoB(value) EndianU32_LtoB(value)
+ #define EndianS64_BtoN(value) EndianS64_BtoL(value)
+ #define EndianS64_NtoB(value) EndianS64_LtoB(value)
+ #define EndianU64_BtoN(value) EndianU64_BtoL(value)
+ #define EndianU64_NtoB(value) EndianU64_LtoB(value)
+#endif
+
+
+
+/*
+ Implement ÅLtoB and ÅBtoL
+*/
+#define EndianS16_LtoB(value) ((SInt16)Endian16_Swap(value))
+#define EndianS16_BtoL(value) ((SInt16)Endian16_Swap(value))
+#define EndianU16_LtoB(value) ((UInt16)Endian16_Swap(value))
+#define EndianU16_BtoL(value) ((UInt16)Endian16_Swap(value))
+#define EndianS32_LtoB(value) ((SInt32)Endian32_Swap(value))
+#define EndianS32_BtoL(value) ((SInt32)Endian32_Swap(value))
+#define EndianU32_LtoB(value) ((UInt32)Endian32_Swap(value))
+#define EndianU32_BtoL(value) ((UInt32)Endian32_Swap(value))
+#define EndianS64_LtoB(value) ((SInt64)Endian64_Swap((UInt64)value))
+#define EndianS64_BtoL(value) ((SInt64)Endian64_Swap((UInt64)value))
+#define EndianU64_LtoB(value) ((UInt64)Endian64_Swap(value))
+#define EndianU64_BtoL(value) ((UInt64)Endian64_Swap(value))
+
+
+
+
+/*
+ Implement low level Å_Swap functions.
+
+ extern UInt16 Endian16_Swap(UInt16 value);
+ extern UInt32 Endian32_Swap(UInt32 value);
+ extern UInt64 Endian64_Swap(UInt64 value);
+
+ Note: Depending on the processor, you might want to implement
+ these as function calls instead of macros.
+
+*/
+#if TARGET_CPU_68K && TARGET_OS_MAC
+ #pragma parameter __D0 Endian16_Swap(__D0)
+ pascal UInt16 Endian16_Swap(UInt16 value)
+ = { 0xE158 };
+
+ #pragma parameter __D0 Endian32_Swap (__D0)
+ pascal UInt32 Endian32_Swap(UInt32 value)
+ = { 0xE158, 0x4840, 0xE158 };
+#else
+ #define Endian16_Swap(value) \
+ (((((UInt16)value)<<8) & 0xFF00) | \
+ ((((UInt16)value)>>8) & 0x00FF))
+
+ #define Endian32_Swap(value) \
+ (((((UInt32)value)<<24) & 0xFF000000) | \
+ ((((UInt32)value)<< 8) & 0x00FF0000) | \
+ ((((UInt32)value)>> 8) & 0x0000FF00) | \
+ ((((UInt32)value)>>24) & 0x000000FF))
+#endif
+
+
+#if TYPE_LONGLONG
+ #if TARGET_OS_WIN32
+ /* the inline macros crash MSDEV's optimizer on Windows. */
+ extern UInt64 Endian64_Swap(UInt64 value);
+ #elif defined(__MWERKS__) && (__MWERKS__ < 0x1800)
+ /* older Metrowerks compilers errored on LL suffix */
+ #define Endian64_Swap(value) \
+ (((((UInt64)value)<<56) & 0xFF00000000000000) | \
+ ((((UInt64)value)<<40) & 0x00FF000000000000) | \
+ ((((UInt64)value)<<24) & 0x0000FF0000000000) | \
+ ((((UInt64)value)<< 8) & 0x000000FF00000000) | \
+ ((((UInt64)value)>> 8) & 0x00000000FF000000) | \
+ ((((UInt64)value)>>24) & 0x0000000000FF0000) | \
+ ((((UInt64)value)>>40) & 0x000000000000FF00) | \
+ ((((UInt64)value)>>56) & 0x00000000000000FF))
+ #else
+ #define Endian64_Swap(value) \
+ (((((UInt64)value)<<56) & 0xFF00000000000000ULL) | \
+ ((((UInt64)value)<<40) & 0x00FF000000000000ULL) | \
+ ((((UInt64)value)<<24) & 0x0000FF0000000000ULL) | \
+ ((((UInt64)value)<< 8) & 0x000000FF00000000ULL) | \
+ ((((UInt64)value)>> 8) & 0x00000000FF000000ULL) | \
+ ((((UInt64)value)>>24) & 0x0000000000FF0000ULL) | \
+ ((((UInt64)value)>>40) & 0x000000000000FF00ULL) | \
+ ((((UInt64)value)>>56) & 0x00000000000000FFULL))
+ #endif
+#else
+ /*
+ Note: When using C compilers that don't support "long long",
+ Endian64_Swap must be implemented as glue.
+ */
+ #ifdef __cplusplus
+ inline static UInt64 Endian64_Swap(UInt64 value)
+ {
+ UInt64 temp;
+ ((UnsignedWide*)&temp)->lo = Endian32_Swap(((UnsignedWide*)&value)->hi);
+ ((UnsignedWide*)&temp)->hi = Endian32_Swap(((UnsignedWide*)&value)->lo);
+ return temp;
+ }
+ #else
+ extern UInt64 Endian64_Swap(UInt64 value);
+ #endif
+#endif
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __ENDIAN__ */
+
diff --git a/include/qt/Events.h b/include/qt/Events.h
new file mode 100644
index 000000000..050798a0b
--- /dev/null
+++ b/include/qt/Events.h
@@ -0,0 +1,426 @@
+/*
+ File: Events.h
+
+ Contains: Event Manager Interfaces.
+
+ Version: Technology: Mac OS 8
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __EVENTS__
+#define __EVENTS__
+
+#ifndef __OSUTILS__
+#include "OSUtils.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#if !TARGET_OS_MAC || !TARGET_API_MAC_OS8
+#ifndef __ENDIAN__
+#include "Endian.h"
+#endif
+
+#endif /* !TARGET_OS_MAC || !TARGET_API_MAC_OS8 */
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+typedef UInt16 EventKind;
+typedef UInt16 EventMask;
+enum {
+ nullEvent = 0,
+ mouseDown = 1,
+ mouseUp = 2,
+ keyDown = 3,
+ keyUp = 4,
+ autoKey = 5,
+ updateEvt = 6,
+ diskEvt = 7,
+ activateEvt = 8,
+ osEvt = 15,
+ kHighLevelEvent = 23
+};
+
+enum {
+ mDownMask = 1 << mouseDown, /* mouse button pressed*/
+ mUpMask = 1 << mouseUp, /* mouse button released*/
+ keyDownMask = 1 << keyDown, /* key pressed*/
+ keyUpMask = 1 << keyUp, /* key released*/
+ autoKeyMask = 1 << autoKey, /* key repeatedly held down*/
+ updateMask = 1 << updateEvt, /* window needs updating*/
+ diskMask = 1 << diskEvt, /* disk inserted*/
+ activMask = 1 << activateEvt, /* activate/deactivate window*/
+ highLevelEventMask = 0x0400, /* high-level events (includes AppleEvents)*/
+ osMask = 1 << osEvt, /* operating system events (suspend, resume)*/
+ everyEvent = 0xFFFF /* all of the above*/
+};
+
+enum {
+ charCodeMask = 0x000000FF,
+ keyCodeMask = 0x0000FF00,
+ adbAddrMask = 0x00FF0000,
+ osEvtMessageMask = (unsigned long)0xFF000000
+};
+
+enum {
+ /* OS event messages. Event (sub)code is in the high byte of the message field.*/
+ mouseMovedMessage = 0x00FA,
+ suspendResumeMessage = 0x0001
+};
+
+enum {
+ resumeFlag = 1, /* Bit 0 of message indicates resume vs suspend*/
+ convertClipboardFlag = 2 /* Bit 1 in resume message indicates clipboard change*/
+};
+
+
+typedef UInt16 EventModifiers;
+enum {
+ /* modifiers */
+ activeFlagBit = 0, /* activate? (activateEvt and mouseDown)*/
+ btnStateBit = 7, /* state of button?*/
+ cmdKeyBit = 8, /* command key down?*/
+ shiftKeyBit = 9, /* shift key down?*/
+ alphaLockBit = 10, /* alpha lock down?*/
+ optionKeyBit = 11, /* option key down?*/
+ controlKeyBit = 12, /* control key down?*/
+ rightShiftKeyBit = 13, /* right shift key down?*/
+ rightOptionKeyBit = 14, /* right Option key down?*/
+ rightControlKeyBit = 15 /* right Control key down?*/
+};
+
+enum {
+ activeFlag = 1 << activeFlagBit,
+ btnState = 1 << btnStateBit,
+ cmdKey = 1 << cmdKeyBit,
+ shiftKey = 1 << shiftKeyBit,
+ alphaLock = 1 << alphaLockBit,
+ optionKey = 1 << optionKeyBit,
+ controlKey = 1 << controlKeyBit,
+ rightShiftKey = 1 << rightShiftKeyBit,
+ rightOptionKey = 1 << rightOptionKeyBit,
+ rightControlKey = 1 << rightControlKeyBit
+};
+
+enum {
+ kNullCharCode = 0,
+ kHomeCharCode = 1,
+ kEnterCharCode = 3,
+ kEndCharCode = 4,
+ kHelpCharCode = 5,
+ kBellCharCode = 7,
+ kBackspaceCharCode = 8,
+ kTabCharCode = 9,
+ kLineFeedCharCode = 10,
+ kVerticalTabCharCode = 11,
+ kPageUpCharCode = 11,
+ kFormFeedCharCode = 12,
+ kPageDownCharCode = 12,
+ kReturnCharCode = 13,
+ kFunctionKeyCharCode = 16,
+ kEscapeCharCode = 27,
+ kClearCharCode = 27,
+ kLeftArrowCharCode = 28,
+ kRightArrowCharCode = 29,
+ kUpArrowCharCode = 30,
+ kDownArrowCharCode = 31,
+ kDeleteCharCode = 127,
+ kNonBreakingSpaceCharCode = 202
+};
+
+
+struct EventRecord {
+ EventKind what;
+ UInt32 message;
+ UInt32 when;
+ Point where;
+ EventModifiers modifiers;
+};
+typedef struct EventRecord EventRecord;
+typedef CALLBACK_API( void , FKEYProcPtr )(void );
+typedef STACK_UPP_TYPE(FKEYProcPtr) FKEYUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(FKEYUPP)
+ NewFKEYUPP (FKEYProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeFKEYUPP (FKEYUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeFKEYUPP (FKEYUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppFKEYProcInfo = 0x00000000 }; /* pascal no_return_value Func() */
+ #define NewFKEYUPP(userRoutine) (FKEYUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppFKEYProcInfo, GetCurrentArchitecture())
+ #define DisposeFKEYUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeFKEYUPP(userUPP) CALL_ZERO_PARAMETER_UPP((userUPP), uppFKEYProcInfo)
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewFKEYProc(userRoutine) NewFKEYUPP(userRoutine)
+#define CallFKEYProc(userRoutine) InvokeFKEYUPP(userRoutine)
+EXTERN_API( void )
+GetMouse (Point * mouseLoc) ONEWORDINLINE(0xA972);
+
+EXTERN_API( Boolean )
+Button (void) ONEWORDINLINE(0xA974);
+
+EXTERN_API( Boolean )
+StillDown (void) ONEWORDINLINE(0xA973);
+
+EXTERN_API( Boolean )
+WaitMouseUp (void) ONEWORDINLINE(0xA977);
+
+EXTERN_API( UInt32 )
+TickCount (void) ONEWORDINLINE(0xA975);
+
+EXTERN_API( UInt32 )
+KeyTranslate (const void * transData,
+ UInt16 keycode,
+ UInt32 * state) ONEWORDINLINE(0xA9C3);
+
+EXTERN_API( UInt32 )
+GetCaretTime (void) TWOWORDINLINE(0x2EB8, 0x02F4);
+
+
+/*
+ QuickTime 3.0 supports GetKeys() on unix and win32
+ But, on little endian machines you will have to be
+ careful about bit numberings and/or use a KeyMapByteArray
+ instead.
+*/
+#if TARGET_OS_MAC && TARGET_API_MAC_OS8
+
+typedef UInt32 KeyMap[4];
+#else
+typedef BigEndianLong KeyMap[4];
+#endif /* TARGET_OS_MAC && TARGET_API_MAC_OS8 */
+
+typedef UInt8 KeyMapByteArray[16];
+EXTERN_API( void )
+GetKeys (KeyMap theKeys) ONEWORDINLINE(0xA976);
+
+/* Obsolete event types & masks */
+enum {
+ networkEvt = 10,
+ driverEvt = 11,
+ app1Evt = 12,
+ app2Evt = 13,
+ app3Evt = 14,
+ app4Evt = 15,
+ networkMask = 0x0400,
+ driverMask = 0x0800,
+ app1Mask = 0x1000,
+ app2Mask = 0x2000,
+ app3Mask = 0x4000,
+ app4Mask = 0x8000
+};
+
+
+struct EvQEl {
+ QElemPtr qLink;
+ SInt16 qType;
+ EventKind evtQWhat; /* this part is identical to the EventRecord as defined above */
+ UInt32 evtQMessage;
+ UInt32 evtQWhen;
+ Point evtQWhere;
+ EventModifiers evtQModifiers;
+};
+typedef struct EvQEl EvQEl;
+typedef EvQEl * EvQElPtr;
+typedef CALLBACK_API( void , GetNextEventFilterProcPtr )(EventRecord *theEvent, Boolean *result);
+typedef STACK_UPP_TYPE(GetNextEventFilterProcPtr) GetNextEventFilterUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(GetNextEventFilterUPP)
+ NewGetNextEventFilterUPP (GetNextEventFilterProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGetNextEventFilterUPP (GetNextEventFilterUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeGetNextEventFilterUPP (EventRecord * theEvent,
+ Boolean * result,
+ GetNextEventFilterUPP userUPP);
+
+#else
+ enum { uppGetNextEventFilterProcInfo = 0x000000BF }; /* SPECIAL_CASE_PROCINFO(11) */
+ #define NewGetNextEventFilterUPP(userRoutine) (GetNextEventFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGetNextEventFilterProcInfo, GetCurrentArchitecture())
+ #define DisposeGetNextEventFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGetNextEventFilterUPP(theEvent, result, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppGetNextEventFilterProcInfo, (theEvent), (result))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGetNextEventFilterProc(userRoutine) NewGetNextEventFilterUPP(userRoutine)
+#define CallGetNextEventFilterProc(userRoutine, theEvent, result) InvokeGetNextEventFilterUPP(theEvent, result, userRoutine)
+
+typedef GetNextEventFilterUPP GNEFilterUPP;
+EXTERN_API( UInt32 )
+GetDblTime (void) TWOWORDINLINE(0x2EB8, 0x02F0);
+
+EXTERN_API( void )
+SetEventMask (EventMask value) TWOWORDINLINE(0x31DF, 0x0144);
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( QHdrPtr )
+GetEvQHdr (void) THREEWORDINLINE(0x2EBC, 0x0000, 0x014A);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PPostEvent(__A0, __D0, __A1)
+ #endif
+EXTERN_API( OSErr )
+PPostEvent (EventKind eventCode,
+ UInt32 eventMsg,
+ EvQElPtr * qEl) TWOWORDINLINE(0xA12F, 0x2288);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( Boolean )
+GetNextEvent (EventMask eventMask,
+ EventRecord * theEvent) ONEWORDINLINE(0xA970);
+
+EXTERN_API( Boolean )
+WaitNextEvent (EventMask eventMask,
+ EventRecord * theEvent,
+ UInt32 sleep,
+ RgnHandle mouseRgn) /* can be NULL */ ONEWORDINLINE(0xA860);
+
+EXTERN_API( Boolean )
+EventAvail (EventMask eventMask,
+ EventRecord * theEvent) ONEWORDINLINE(0xA971);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PostEvent(__A0, __D0)
+ #endif
+EXTERN_API( OSErr )
+PostEvent (EventKind eventNum,
+ UInt32 eventMsg) ONEWORDINLINE(0xA02F);
+
+/*
+ For Carbon, use EventAvail, TickCount, GetGlobalMouse,
+ GetKeys, or GetCurrentKeyModifiers instead of
+ OSEventAvail, and use GetNextEvent or WaitNextEvent
+ instead of GetOSEvent.
+*/
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 OSEventAvail(__D0, __A0)
+ #endif
+EXTERN_API( Boolean )
+OSEventAvail (EventMask mask,
+ EventRecord * theEvent) TWOWORDINLINE(0xA030, 0x5240);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 GetOSEvent(__D0, __A0)
+ #endif
+EXTERN_API( Boolean )
+GetOSEvent (EventMask mask,
+ EventRecord * theEvent) TWOWORDINLINE(0xA031, 0x5240);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( void )
+FlushEvents (EventMask whichMask,
+ EventMask stopMask) TWOWORDINLINE(0x201F, 0xA032);
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+SystemClick (const EventRecord * theEvent,
+ WindowPtr theWindow) ONEWORDINLINE(0xA9B3);
+
+EXTERN_API( void )
+SystemTask (void) ONEWORDINLINE(0xA9B4);
+
+EXTERN_API( Boolean )
+SystemEvent (const EventRecord * theEvent) ONEWORDINLINE(0xA9B2);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if OLDROUTINENAMES
+#define KeyTrans(transData, keycode, state) KeyTranslate(transData, keycode, state)
+#endif /* OLDROUTINENAMES */
+
+/*
+ GetGlobalMouse and GetCurrentKeyModifiers
+ are only available as part of the Carbon API.
+*/
+
+EXTERN_API( void )
+GetGlobalMouse (Point * globalMouse);
+
+EXTERN_API( UInt32 )
+GetCurrentKeyModifiers (void);
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( UInt32 )
+ParseTheCmdLine (void);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __EVENTS__ */
+
diff --git a/include/qt/FSM.h b/include/qt/FSM.h
new file mode 100644
index 000000000..686ecd44b
--- /dev/null
+++ b/include/qt/FSM.h
@@ -0,0 +1,1183 @@
+/*
+ File: FSM.h
+
+ Contains: HFS External File System Interfaces.
+
+ Version: Technology: Mac OS 9
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __FSM__
+#define __FSM__
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+#ifndef __HFSVOLUMES__
+#include "HFSVolumes.h"
+#endif
+
+#ifndef __PROCESSES__
+#include "Processes.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* VolMount declarations are now in Files.* */
+
+/*
+ * Miscellaneous file system values not in Files.*
+ */
+enum {
+ fsUsrCNID = 16, /* First assignable directory or file number */
+ /* File system trap word attribute bits */
+ kHFSBit = 9, /* HFS call: bit 9 */
+ kHFSMask = 0x0200,
+ kAsyncBit = 10, /* Asynchronous call: bit 10 */
+ kAsyncMask = 0x0400
+};
+
+
+/*
+ * HFSCIProc selectCode values
+ * Note: The trap attribute bits (the HFS bit and the asynchronous bit)
+ * may be set in these selectCode values.
+ */
+enum {
+ kFSMOpen = 0xA000,
+ kFSMClose = 0xA001,
+ kFSMRead = 0xA002,
+ kFSMWrite = 0xA003,
+ kFSMGetVolInfo = 0xA007,
+ kFSMCreate = 0xA008,
+ kFSMDelete = 0xA009,
+ kFSMOpenRF = 0xA00A,
+ kFSMRename = 0xA00B,
+ kFSMGetFileInfo = 0xA00C,
+ kFSMSetFileInfo = 0xA00D,
+ kFSMUnmountVol = 0xA00E,
+ kFSMMountVol = 0xA00F,
+ kFSMAllocate = 0xA010,
+ kFSMGetEOF = 0xA011,
+ kFSMSetEOF = 0xA012,
+ kFSMFlushVol = 0xA013,
+ kFSMGetVol = 0xA014,
+ kFSMSetVol = 0xA015,
+ kFSMEject = 0xA017,
+ kFSMGetFPos = 0xA018,
+ kFSMOffline = 0xA035,
+ kFSMSetFilLock = 0xA041,
+ kFSMRstFilLock = 0xA042,
+ kFSMSetFilType = 0xA043,
+ kFSMSetFPos = 0xA044,
+ kFSMFlushFile = 0xA045, /* The File System HFSDispatch selectCodes */
+ kFSMOpenWD = 0x0001,
+ kFSMCloseWD = 0x0002,
+ kFSMCatMove = 0x0005,
+ kFSMDirCreate = 0x0006,
+ kFSMGetWDInfo = 0x0007,
+ kFSMGetFCBInfo = 0x0008,
+ kFSMGetCatInfo = 0x0009,
+ kFSMSetCatInfo = 0x000A,
+ kFSMSetVolInfo = 0x000B,
+ kFSMLockRng = 0x0010,
+ kFSMUnlockRng = 0x0011,
+ kFSMXGetVolInfo = 0x0012,
+ kFSMCreateFileIDRef = 0x0014,
+ kFSMDeleteFileIDRef = 0x0015,
+ kFSMResolveFileIDRef = 0x0016,
+ kFSMExchangeFiles = 0x0017,
+ kFSMCatSearch = 0x0018,
+ kFSMOpenDF = 0x001A,
+ kFSMMakeFSSpec = 0x001B, /* The Desktop Manager HFSDispatch selectCodes */
+ kFSMDTGetPath = 0x0020,
+ kFSMDTCloseDown = 0x0021,
+ kFSMDTAddIcon = 0x0022,
+ kFSMDTGetIcon = 0x0023,
+ kFSMDTGetIconInfo = 0x0024,
+ kFSMDTAddAPPL = 0x0025,
+ kFSMDTRemoveAPPL = 0x0026,
+ kFSMDTGetAPPL = 0x0027,
+ kFSMDTSetComment = 0x0028,
+ kFSMDTRemoveComment = 0x0029,
+ kFSMDTGetComment = 0x002A,
+ kFSMDTFlush = 0x002B,
+ kFSMDTReset = 0x002C,
+ kFSMDTGetInfo = 0x002D,
+ kFSMDTOpenInform = 0x002E,
+ kFSMDTDelete = 0x002F, /* The AppleShare HFSDispatch selectCodes */
+ kFSMGetVolParms = 0x0030,
+ kFSMGetLogInInfo = 0x0031,
+ kFSMGetDirAccess = 0x0032,
+ kFSMSetDirAccess = 0x0033,
+ kFSMMapID = 0x0034,
+ kFSMMapName = 0x0035,
+ kFSMCopyFile = 0x0036,
+ kFSMMoveRename = 0x0037,
+ kFSMOpenDeny = 0x0038,
+ kFSMOpenRFDeny = 0x0039,
+ kFSMGetXCatInfo = 0x003A,
+ kFSMGetVolMountInfoSize = 0x003F,
+ kFSMGetVolMountInfo = 0x0040,
+ kFSMVolumeMount = 0x0041,
+ kFSMShare = 0x0042,
+ kFSMUnShare = 0x0043,
+ kFSMGetUGEntry = 0x0044,
+ kFSMGetForeignPrivs = 0x0060,
+ kFSMSetForeignPrivs = 0x0061, /* The HFSPlus API SelectCodes */
+ kFSMGetVolumeInfo = 0x001D,
+ kFSMSetVolumeInfo = 0x001E,
+ kFSMReadFork = 0x0051,
+ kFSMWriteFork = 0x0052,
+ kFSMGetForkPosition = 0x0053,
+ kFSMSetForkPosition = 0x0054,
+ kFSMGetForkSize = 0x0055,
+ kFSMSetForkSize = 0x0056,
+ kFSMAllocateFork = 0x0057,
+ kFSMFlushFork = 0x0058,
+ kFSMCloseFork = 0x0059,
+ kFSMGetForkCBInfo = 0x005A,
+ kFSMCloseIterator = 0x005B,
+ kFSMGetCatalogInfoBulk = 0x005C,
+ kFSMCatalogSearch = 0x005D,
+ kFSMMakeFSRef = 0x006E,
+ kFSMCreateFileUnicode = 0x0070,
+ kFSMCreateDirUnicode = 0x0071,
+ kFSMDeleteObject = 0x0072,
+ kFSMMoveObject = 0x0073,
+ kFSMRenameUnicode = 0x0074,
+ kFSMExchangeObjects = 0x0075,
+ kFSMGetCatalogInfo = 0x0076,
+ kFSMSetCatalogInfo = 0x0077,
+ kFSMOpenIterator = 0x0078,
+ kFSMOpenFork = 0x0079,
+ kFSMMakeFSRefUnicode = 0x007A,
+ kFSMCompareFSRefs = 0x007C,
+ kFSMCreateFork = 0x007D,
+ kFSMDeleteFork = 0x007E,
+ kFSMIterateForks = 0x007F
+};
+
+/*
+ * UTDetermineVol status values
+ */
+enum {
+ dtmvError = 0, /* param error */
+ dtmvFullPathame = 1, /* determined by full pathname */
+ dtmvVRefNum = 2, /* determined by volume refNum */
+ dtmvWDRefNum = 3, /* determined by working directory refNum */
+ dtmvDriveNum = 4, /* determined by drive number */
+ dtmvDefault = 5 /* determined by default volume */
+};
+
+
+/*
+ * UTGetBlock options
+ */
+enum {
+ gbDefault = 0, /* default value - read if not found */
+ /* bits and masks */
+ gbReadBit = 0, /* read block from disk (forced read) */
+ gbReadMask = 0x0001,
+ gbExistBit = 1, /* get existing cache block */
+ gbExistMask = 0x0002,
+ gbNoReadBit = 2, /* don't read block from disk if not found in cache */
+ gbNoReadMask = 0x0004,
+ gbReleaseBit = 3, /* release block immediately after GetBlock */
+ gbReleaseMask = 0x0008
+};
+
+
+/*
+ * UTReleaseBlock options
+ */
+enum {
+ rbDefault = 0, /* default value - just mark the buffer not in-use */
+ /* bits and masks */
+ rbWriteBit = 0, /* force write buffer to disk */
+ rbWriteMask = 0x0001,
+ rbTrashBit = 1, /* trash buffer contents after release */
+ rbTrashMask = 0x0002,
+ rbDirtyBit = 2, /* mark buffer dirty */
+ rbDirtyMask = 0x0004,
+ rbFreeBit = 3, /* free the buffer (save in the hash) */
+ rbFreeMask = 0x000A /* rbFreeMask (rbFreeBit + rbTrashBit) works as rbTrash on < System 7.0 RamCache; on >= System 7.0, rbfreeMask overrides rbTrash */
+};
+
+
+/*
+ * UTFlushCache options
+ */
+enum {
+ fcDefault = 0, /* default value - pass this fcOption to just flush any dirty buffers */
+ /* bits and masks */
+ fcTrashBit = 0, /* (don't pass this as fcOption, use only for testing bit) */
+ fcTrashMask = 0x0001, /* pass this fcOption value to flush and trash cache blocks */
+ fcFreeBit = 1, /* (don't pass this as fcOption, use only for testing bit) */
+ fcFreeMask = 0x0003 /* pass this fcOption to flush and free cache blocks (Note: both fcTrash and fcFree bits are set) */
+};
+
+
+/*
+ * UTCacheReadIP and UTCacheWriteIP cacheOption bits and masks are the ioPosMode
+ * bits and masks in Files.x
+ */
+
+/*
+ * Cache routine internal error codes
+ */
+enum {
+ chNoBuf = 1, /* no free cache buffers (all in use) */
+ chInUse = 2, /* requested block in use */
+ chnotfound = 3, /* requested block not found */
+ chNotInUse = 4 /* block being released was not in use */
+};
+
+
+/*
+ * FCBRec.fcbFlags bits
+ */
+enum {
+ fcbWriteBit = 0, /* Data can be written to this file */
+ fcbWriteMask = 0x01,
+ fcbResourceBit = 1, /* This file is a resource fork */
+ fcbResourceMask = 0x02,
+ fcbWriteLockedBit = 2, /* File has a locked byte range */
+ fcbWriteLockedMask = 0x04,
+ fcbLargeFileBit = 3, /* File may grow beyond 2GB; cache uses file blocks, not bytes */
+ fcbLargeFileMask = 0x08,
+ fcbSharedWriteBit = 4, /* File is open for shared write access */
+ fcbSharedWriteMask = 0x10,
+ fcbFileLockedBit = 5, /* File is locked (write-protected) */
+ fcbFileLockedMask = 0x20,
+ fcbOwnClumpBit = 6, /* File has clump size specified in FCB */
+ fcbOwnClumpMask = 0x40,
+ fcbModifiedBit = 7, /* File has changed since it was last flushed */
+ fcbModifiedMask = 0x80
+};
+
+
+/*
+ * ForkControlBlock.moreFlags bits
+ */
+enum {
+ fcbIteratorBit = 0, /* FCB belongs to an FSIterator */
+ fcbIteratorMask = 0x0001,
+ fcbUseForkIDBit = 1, /* Use the FCB's forkID instead of fcbResourceBit */
+ fcbUseForkIDMask = 0x0002
+};
+
+
+/*
+ * HFS Component Interface constants
+ */
+
+/*
+ * compInterfMask bits specific to HFS component
+ */
+enum {
+ hfsCIDoesHFSBit = 23, /* set if file system supports HFS calls */
+ hfsCIDoesHFSMask = 0x00800000,
+ hfsCIDoesAppleShareBit = 22, /* set if AppleShare calls supported */
+ hfsCIDoesAppleShareMask = 0x00400000,
+ hfsCIDoesDeskTopBit = 21, /* set if Desktop Database calls supported */
+ hfsCIDoesDeskTopMask = 0x00200000,
+ hfsCIDoesDynamicLoadBit = 20, /* set if dynamically loading code resource */
+ hfsCIDoesDynamicLoadMask = 0x00100000, /* supported */
+ hfsCIResourceLoadedBit = 19, /* set if code resource already loaded */
+ hfsCIResourceLoadedMask = 0x00080000,
+ hfsCIHasHLL2PProcBit = 18, /* set if FFS' log2PhyProc */
+ hfsCIHasHLL2PProcMask = 0x00040000, /* is written in a high level language. (i.e., uses Pascal calling convention) */
+ hfsCIWantsDTSupportBit = 17, /* set if FFS wants the Mac OS's Desktop Manager code to handle */
+ hfsCIWantsDTSupportMask = 0x00020000 /* all Desktop Manager requests to its volumes. */
+};
+
+
+/*
+ * Disk Initialization Component Interface constants
+ */
+
+/*
+ * compInterfMask bits specific to Disk Initialization component
+ */
+enum {
+ diCIHasExtFormatParamsBit = 18, /* set if file system needs extended format */
+ diCIHasExtFormatParamsMask = 0x00040000, /* parameters */
+ diCIHasMultiVolTypesBit = 17, /* set if file system supports more than one */
+ diCIHasMultiVolTypesMask = 0x00020000, /* volume type */
+ diCIDoesSparingBit = 16, /* set if file system supports disk sparing */
+ diCIDoesSparingMask = 0x00010000,
+ diCILiveBit = 0, /* set if file system is candidate for current */
+ diCILiveMask = 0x00000001 /* formatting operation (set by PACK2) */
+};
+
+
+/*
+ * Disk Initialization Component Function selectors
+ */
+enum {
+ diCILoad = 1, /* Make initialization code memory resident */
+ diCIUnload = 2, /* Make initialization code purgeable */
+ diCIEvaluateSizeChoices = 3, /* Evaluate size choices */
+ diCIExtendedZero = 4, /* Write an empty volume directory */
+ diCIValidateVolName = 5, /* Validate volume name */
+ diCIGetVolTypeInfo = 6, /* get volume type info */
+ diCIGetFormatString = 7, /* get dialog format string */
+ diCIGetExtFormatParams = 8, /* get extended format parameters */
+ diCIGetDefectList = 9 /* return the defect list for the indicated disk - reserved for future use */
+};
+
+
+/*
+ * Constants used in the DICIEvaluateSizeRec and FormatListRec
+ */
+enum {
+ diCIFmtListMax = 8, /* maximum number of format list entries in DICIEvaluateSizeRec.numSizeEntries */
+ /* bits in FormatListRec.formatFlags: */
+ diCIFmtFlagsValidBit = 7, /* set if sec, side, tracks valid */
+ diCIFmtFlagsValidMask = 0x80,
+ diCIFmtFlagsCurrentBit = 6, /* set if current disk has this fmt */
+ diCIFmtFlagsCurrentMask = 0x40, /* bits in FormatListRec.sizeListFlags: */
+ diCISizeListOKBit = 15, /* set if this disk size usable */
+ diCISizeListOKMask = 0x8000
+};
+
+
+/*
+ * DICIGetFormatStringRec.stringKind format strings
+ */
+enum {
+ diCIAlternateFormatStr = 1, /* get alternate format string (Balloon Help) */
+ diCISizePresentationStr = 2 /* get size presentation string (for dialog) */
+};
+
+
+/*
+ * Error codes returned by Disk Sparing
+ */
+enum {
+ diCIUserCancelErr = 1, /* user cancelled the disk init */
+ diCICriticalSectorBadErr = 20, /* critical sectors are bad (hopeless) */
+ diCISparingFailedErr = 21, /* disk cannot be spared */
+ diCITooManyBadSectorsErr = 22, /* too many bad sectors */
+ diCIUnknownVolTypeErr = 23, /* the volume type passed in diCIExtendedZero paramBlock is not supported */
+ diCIVolSizeMismatchErr = 24, /* specified volume size doesn't match with formatted disk size */
+ diCIUnknownDICallErr = 25, /* bogus DI function call selector */
+ diCINoSparingErr = 26, /* disk is bad but the target FS doesn't do disk sparing */
+ diCINoExtendInfoErr = 27, /* missing file system specific extra parameter in diCIExtendedZero call */
+ diCINoMessageTextErr = 28 /* missing message text in DIReformat call */
+};
+
+
+/*
+ * File System Manager constants
+ */
+
+/*
+ * Miscellaneous constants used by FSM
+ */
+enum {
+ fsdVersion1 = 1, /* current version of FSD record */
+ fsmIgnoreFSID = 0xFFFE, /* this FSID should be ignored by the driver */
+ fsmGenericFSID = 0xFFFF /* unknown foreign file system ID */
+};
+
+
+/*
+ * compInterfMask bits common to all FSM components
+ */
+enum {
+ fsmComponentEnableBit = 31, /* set if FSM component interface is enabled */
+ fsmComponentEnableMask = (long)0x80000000,
+ fsmComponentBusyBit = 30, /* set if FSM component interface is busy */
+ fsmComponentBusyMask = 0x40000000
+};
+
+
+/*
+ * Selectors for GetFSInfo
+ */
+enum {
+ fsmGetFSInfoByIndex = -1, /* get fs info by index */
+ fsmGetFSInfoByFSID = 0, /* get fs info by FSID */
+ fsmGetFSInfoByRefNum = 1 /* get fs info by file/vol refnum */
+};
+
+
+/*
+ * InformFSM messages
+ */
+enum {
+ fsmNopMessage = 0, /* nop */
+ fsmDrvQElChangedMessage = 1, /* DQE has changed */
+ fsmGetFSIconMessage = 2 /* Get FFS's disk icon */
+};
+
+
+/*
+ * Messages passed to the fileSystemCommProc
+ */
+enum {
+ ffsNopMessage = 0, /* nop, should always return noErr */
+ ffsGetIconMessage = 1, /* return disk icon and mask */
+ ffsIDDiskMessage = 2, /* identify the about-to-be-mounted volume */
+ ffsLoadMessage = 3, /* load in the FFS */
+ ffsUnloadMessage = 4, /* unload the FFS */
+ ffsIDVolMountMessage = 5, /* identify a VolMountInfo record */
+ ffsInformMessage = 6, /* FFS defined message */
+ ffsGetIconInfoMessage = 7
+};
+
+
+
+/*
+ * HFS Utility routine records
+ */
+
+/*
+ * record used by UTGetPathComponentName
+ */
+
+struct ParsePathRec {
+ StringPtr namePtr; /* pathname to parse */
+ short startOffset; /* where to start parsing */
+ short componentLength; /* the length of the pathname component parsed */
+ SignedByte moreName; /* non-zero if there are more components after this one */
+ SignedByte foundDelimiter; /* non-zero if parsing stopped because a colon (:) delimiter was found */
+};
+typedef struct ParsePathRec ParsePathRec;
+typedef ParsePathRec * ParsePathRecPtr;
+
+struct WDCBRec {
+ VCBPtr wdVCBPtr; /* Pointer to VCB of this working directory */
+ long wdDirID; /* Directory ID number of this working directory */
+ long wdCatHint; /* Hint for finding this working directory */
+ long wdProcID; /* Process that created this working directory */
+};
+typedef struct WDCBRec WDCBRec;
+typedef WDCBRec * WDCBRecPtr;
+
+struct FCBRec {
+ unsigned long fcbFlNm; /* FCB file number. Non-zero marks FCB used */
+ SignedByte fcbFlags; /* FCB flags */
+ SignedByte fcbTypByt; /* File type byte */
+ unsigned short fcbSBlk; /* File start block (in alloc size blks) */
+ unsigned long fcbEOF; /* Logical length or EOF in bytes */
+ unsigned long fcbPLen; /* Physical file length in bytes */
+ unsigned long fcbCrPs; /* Current position within file */
+ VCBPtr fcbVPtr; /* Pointer to the corresponding VCB */
+ Ptr fcbBfAdr; /* File's buffer address */
+ unsigned short fcbFlPos; /* Directory block this file is in */
+ /* FCB Extensions for HFS */
+ unsigned long fcbClmpSize; /* Number of bytes per clump */
+ Ptr fcbBTCBPtr; /* Pointer to B*-Tree control block for file */
+ HFSExtentRecord fcbExtRec; /* First 3 file extents */
+ OSType fcbFType; /* File's 4 Finder Type bytes */
+ unsigned long fcbCatPos; /* Catalog hint for use on Close */
+ unsigned long fcbDirID; /* Parent Directory ID */
+ Str31 fcbCName; /* CName of open file */
+};
+typedef struct FCBRec FCBRec;
+typedef FCBRec * FCBRecPtr;
+
+struct ForkControlBlock {
+ unsigned long fcbFlNm; /* FCB file number. Non-zero marks FCB used */
+ SignedByte fcbFlags; /* FCB flags */
+ SignedByte fcbTypByt; /* File type byte */
+ unsigned short fcbSBlk; /* File start block (in alloc size blks) */
+ unsigned long fcbEOF; /* Logical length or EOF in bytes */
+ unsigned long fcbPLen; /* Physical file length in bytes */
+ unsigned long fcbCrPs; /* Current position within file */
+ VCBPtr fcbVPtr; /* Pointer to the corresponding VCB */
+ Ptr fcbBfAdr; /* File's buffer address */
+ unsigned short fcbFlPos; /* Directory block this file is in */
+ /* FCB Extensions for HFS */
+ unsigned long fcbClmpSize; /* Number of bytes per clump */
+ Ptr fcbBTCBPtr; /* Pointer to B*-Tree control block for file */
+ HFSExtentRecord fcbExtRec; /* First 3 file extents */
+ OSType fcbFType; /* File's 4 Finder Type bytes */
+ unsigned long fcbCatPos; /* Catalog hint for use on Close */
+ unsigned long fcbDirID; /* Parent Directory ID */
+ Str31 fcbCName; /* CName of open file */
+
+ /* New fields start here*/
+
+ unsigned short moreFlags; /* more flags, align following fields*/
+
+ /* Old ExtendedFCB fields*/
+
+ ProcessSerialNumber processID; /* Process Mgr process that opened the file (used to clean up at process death).*/
+ HFSPlusExtentRecord extents; /* extents for HFS+ volumes*/
+
+ /* New fields for HFS Plus APIs*/
+
+ UInt64 endOfFile; /* logical size of this fork*/
+ UInt64 physicalEOF; /* amount of space physically allocated to this fork*/
+ UInt64 currentPosition; /* default offset for next read/write*/
+ UInt32 forkID;
+ Ptr searchListPtr; /* reserved for File Manager's use*/
+ UInt8 reserved1[8]; /* reserved*/
+};
+typedef struct ForkControlBlock ForkControlBlock;
+typedef ForkControlBlock * ForkControlBlockPtr;
+/*
+ * IteratorControlBlock - a ForkControlBlock used by a FSIterator
+ */
+
+struct IteratorControlBlock {
+ unsigned long containerID; /* directory ID of iterator's container*/
+ unsigned short flags; /* reserved*/
+ UInt8 user1[14]; /* 14 bytes iterator's use*/
+ VCBPtr vcbPtr; /* pointer to the iterator's VCB*/
+ unsigned long reserved2; /* reserved*/
+ UInt8 user2[6]; /* 6 bytes for iterator's use*/
+ unsigned long reserved3; /* reserved*/
+ UInt8 user3[12]; /* 12 bytes for iterator's use*/
+ OSType cbType; /* must be 'fold'*/
+ UInt8 user4[40]; /* 40 bytes for iterator's use*/
+ unsigned short moreFlags; /* must be fcbIteratorMask*/
+ ProcessSerialNumber processID; /* Process Mgr process that opened the iterator (used to clean up at process death).*/
+ UInt8 user5[92]; /* 92 bytes for iterator's use*/
+ Ptr searchListPtr; /* reserved for File Manager's use*/
+ UInt8 reserved1[8]; /* reserved*/
+};
+typedef struct IteratorControlBlock IteratorControlBlock;
+typedef IteratorControlBlock * IteratorControlBlockPtr;
+/*
+ * HFS Component Interface records
+ */
+typedef CALLBACK_API( OSErr , Lg2PhysProcPtr )(void *fsdGlobalPtr, VCBPtr volCtrlBlockPtr, FCBRecPtr fileCtrlBlockPtr, short fileRefNum, unsigned long filePosition, unsigned long reqCount, unsigned long *volOffset, unsigned long *contiguousBytes);
+typedef STACK_UPP_TYPE(Lg2PhysProcPtr) Lg2PhysUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(Lg2PhysUPP)
+ NewLg2PhysUPP (Lg2PhysProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeLg2PhysUPP (Lg2PhysUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeLg2PhysUPP (void * fsdGlobalPtr,
+ VCBPtr volCtrlBlockPtr,
+ FCBRecPtr fileCtrlBlockPtr,
+ short fileRefNum,
+ unsigned long filePosition,
+ unsigned long reqCount,
+ unsigned long * volOffset,
+ unsigned long * contiguousBytes,
+ Lg2PhysUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppLg2PhysProcInfo = 0x003FEFE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewLg2PhysUPP(userRoutine) (Lg2PhysUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppLg2PhysProcInfo, GetCurrentArchitecture())
+ #define DisposeLg2PhysUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeLg2PhysUPP(fsdGlobalPtr, volCtrlBlockPtr, fileCtrlBlockPtr, fileRefNum, filePosition, reqCount, volOffset, contiguousBytes, userUPP) (OSErr)CALL_EIGHT_PARAMETER_UPP((userUPP), uppLg2PhysProcInfo, (fsdGlobalPtr), (volCtrlBlockPtr), (fileCtrlBlockPtr), (fileRefNum), (filePosition), (reqCount), (volOffset), (contiguousBytes))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewLg2PhysProc(userRoutine) NewLg2PhysUPP(userRoutine)
+#define CallLg2PhysProc(userRoutine, fsdGlobalPtr, volCtrlBlockPtr, fileCtrlBlockPtr, fileRefNum, filePosition, reqCount, volOffset, contiguousBytes) InvokeLg2PhysUPP(fsdGlobalPtr, volCtrlBlockPtr, fileCtrlBlockPtr, fileRefNum, filePosition, reqCount, volOffset, contiguousBytes, userRoutine)
+typedef CALLBACK_API( OSErr , HFSCIProcPtr )(VCBPtr theVCB, short selectCode, void *paramBlock, void *fsdGlobalPtr, short fsid);
+typedef STACK_UPP_TYPE(HFSCIProcPtr) HFSCIUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(HFSCIUPP)
+ NewHFSCIUPP (HFSCIProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeHFSCIUPP (HFSCIUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeHFSCIUPP (VCBPtr theVCB,
+ short selectCode,
+ void * paramBlock,
+ void * fsdGlobalPtr,
+ short fsid,
+ HFSCIUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppHFSCIProcInfo = 0x0000BEE0 }; /* pascal 2_bytes Func(4_bytes, 2_bytes, 4_bytes, 4_bytes, 2_bytes) */
+ #define NewHFSCIUPP(userRoutine) (HFSCIUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppHFSCIProcInfo, GetCurrentArchitecture())
+ #define DisposeHFSCIUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeHFSCIUPP(theVCB, selectCode, paramBlock, fsdGlobalPtr, fsid, userUPP) (OSErr)CALL_FIVE_PARAMETER_UPP((userUPP), uppHFSCIProcInfo, (theVCB), (selectCode), (paramBlock), (fsdGlobalPtr), (fsid))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewHFSCIProc(userRoutine) NewHFSCIUPP(userRoutine)
+#define CallHFSCIProc(userRoutine, theVCB, selectCode, paramBlock, fsdGlobalPtr, fsid) InvokeHFSCIUPP(theVCB, selectCode, paramBlock, fsdGlobalPtr, fsid, userRoutine)
+
+struct HFSCIRec {
+ long compInterfMask; /* component flags */
+ HFSCIUPP compInterfProc; /* pointer to file system call processing code */
+ Lg2PhysUPP log2PhyProc; /* pointer to Lg2PhysProc() code */
+ Ptr stackTop; /* file system stack top */
+ long stackSize; /* file system stack size */
+ Ptr stackPtr; /* current file system stack pointer */
+ long reserved3; /* --reserved, must be zero-- */
+ long idSector; /* Sector you need to ID a local volume. For networked volumes, this must be -1 */
+ long reserved2; /* --reserved, must be zero-- */
+ long reserved1; /* --reserved, must be zero-- */
+};
+typedef struct HFSCIRec HFSCIRec;
+typedef HFSCIRec * HFSCIRecPtr;
+/*
+ * Disk Initialization Component Interface records
+ */
+typedef CALLBACK_API( OSErr , DICIProcPtr )(short whatFunction, void *paramBlock, void *fsdGlobalPtr);
+typedef STACK_UPP_TYPE(DICIProcPtr) DICIUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(DICIUPP)
+ NewDICIUPP (DICIProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeDICIUPP (DICIUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeDICIUPP (short whatFunction,
+ void * paramBlock,
+ void * fsdGlobalPtr,
+ DICIUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppDICIProcInfo = 0x00000FA0 }; /* pascal 2_bytes Func(2_bytes, 4_bytes, 4_bytes) */
+ #define NewDICIUPP(userRoutine) (DICIUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDICIProcInfo, GetCurrentArchitecture())
+ #define DisposeDICIUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeDICIUPP(whatFunction, paramBlock, fsdGlobalPtr, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppDICIProcInfo, (whatFunction), (paramBlock), (fsdGlobalPtr))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewDICIProc(userRoutine) NewDICIUPP(userRoutine)
+#define CallDICIProc(userRoutine, whatFunction, paramBlock, fsdGlobalPtr) InvokeDICIUPP(whatFunction, paramBlock, fsdGlobalPtr, userRoutine)
+
+struct DICIRec {
+ long compInterfMask; /* component flags */
+ DICIUPP compInterfProc; /* pointer to call processing code */
+ short maxVolNameLength; /* maximum length of your volume name */
+ unsigned short blockSize; /* your file system's block size */
+ long reserved3; /* --reserved, must be zero-- */
+ long reserved2; /* --reserved, must be zero-- */
+ long reserved1; /* --reserved, must be zero-- */
+};
+typedef struct DICIRec DICIRec;
+typedef DICIRec * DICIRecPtr;
+/*
+ * FormatListRec as returned by the .Sony disk driver's
+ * Return Format List status call (csCode = 6).
+ * If the status call to get this list for a drive is not
+ * implemented by the driver, then a list with one entry
+ * is contructed from the drive queue element for the drive.
+ */
+
+struct FormatListRec {
+ unsigned long volSize; /* disk capacity in SECTORs */
+ SignedByte formatFlags; /* flags */
+ SignedByte sectorsPerTrack; /* sectors per track side */
+ unsigned short tracks; /* number of tracks */
+};
+typedef struct FormatListRec FormatListRec;
+typedef FormatListRec * FormatListRecPtr;
+/*
+ * SizeListRec built from FormatListRecs as described above.
+ */
+
+struct SizeListRec {
+ short sizeListFlags; /* flags as set by external file system */
+ FormatListRec sizeEntry; /* disk driver format list record */
+};
+typedef struct SizeListRec SizeListRec;
+typedef SizeListRec * SizeListRecPtr;
+/*
+ * paramBlock for the diCIEvaluateSize call
+ */
+
+struct DICIEvaluateSizeRec {
+ short defaultSizeIndex; /* default size for this FS */
+ short numSizeEntries; /* number of size entries */
+ short driveNumber; /* drive number */
+ SizeListRecPtr sizeListPtr; /* ptr to size entry table */
+ unsigned short sectorSize; /* bytes per sector */
+};
+typedef struct DICIEvaluateSizeRec DICIEvaluateSizeRec;
+typedef DICIEvaluateSizeRec * DICIEvaluateSizeRecPtr;
+/*
+ * paramBlock for the diCIExtendedZero call
+ */
+
+struct DICIExtendedZeroRec {
+ short driveNumber; /* drive number */
+ StringPtr volNamePtr; /* ptr to volume name string */
+ short fsid; /* file system ID */
+ short volTypeSelector; /* volume type selector, if supports more than 1 type */
+ unsigned short numDefectBlocks; /* number of bad logical blocks */
+ unsigned short defectListSize; /* size of the defect list buffer in bytes */
+ Ptr defectListPtr; /* pointer to defect list buffer */
+ unsigned long volSize; /* size of volume in SECTORs */
+ unsigned short sectorSize; /* bytes per sector */
+ Ptr extendedInfoPtr; /* ptr to extended info */
+};
+typedef struct DICIExtendedZeroRec DICIExtendedZeroRec;
+typedef DICIExtendedZeroRec * DICIExtendedZeroRecPtr;
+/*
+ * paramBlock for the diCIValidateVolName call
+ */
+
+struct DICIValidateVolNameRec {
+ char theChar; /* the character to validate */
+ Boolean hasMessageBuffer; /* false if no message */
+ short charOffset; /* position of the current character (first char = 1) */
+ StringPtr messageBufferPtr; /* pointer to message buffer or nil */
+ short charByteType; /* theChar's byte type (smSingleByte, smFirstByte, or smLastByte) */
+};
+typedef struct DICIValidateVolNameRec DICIValidateVolNameRec;
+typedef DICIValidateVolNameRec * DICIValidateVolNameRecPtr;
+/*
+ * paramBlock for the diCIGetVolTypeInfo call
+ */
+
+struct DICIGetVolTypeInfoRec {
+ unsigned long volSize; /* size of volume in SECTORs */
+ unsigned short sectorSize; /* bytes per sector */
+ short numVolTypes; /* number of volume types supported */
+ Str31 volTypesBuffer[4]; /* 4 string buffers */
+};
+typedef struct DICIGetVolTypeInfoRec DICIGetVolTypeInfoRec;
+typedef DICIGetVolTypeInfoRec * DICIGetVolTypeInfoRecPtr;
+/*
+ * paramBlock for the diCIGetFormatString call
+ */
+
+struct DICIGetFormatStringRec {
+ unsigned long volSize; /* volume size in SECTORs */
+ unsigned short sectorSize; /* sector size */
+ short volTypeSelector; /* volume type selector */
+ short stringKind; /* sub-function = type of string */
+ Str255 stringBuffer; /* string buffer */
+};
+typedef struct DICIGetFormatStringRec DICIGetFormatStringRec;
+typedef DICIGetFormatStringRec * DICIGetFormatStringRecPtr;
+/*
+ * paramBlock for the diCIGetExtendedFormatParams call
+ */
+
+struct DICIGetExtendedFormatRec {
+ short driveNumber; /* drive number */
+ short volTypeSelector; /* volume type selector or 0 */
+ unsigned long volSize; /* size of volume in SECTORs */
+ unsigned short sectorSize; /* bytes per sector */
+ FSSpecPtr fileSystemSpecPtr; /* pointer to the foreign file system's FSSpec */
+ Ptr extendedInfoPtr; /* pointer to extended parameter structure */
+};
+typedef struct DICIGetExtendedFormatRec DICIGetExtendedFormatRec;
+typedef DICIGetExtendedFormatRec * DICIGetExtendedFormatRecPtr;
+/*
+ * File System Manager records
+ */
+
+typedef CALLBACK_API( OSErr , FSDCommProcPtr )(short message, void *paramBlock, void *globalsPtr);
+typedef STACK_UPP_TYPE(FSDCommProcPtr) FSDCommUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(FSDCommUPP)
+ NewFSDCommUPP (FSDCommProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeFSDCommUPP (FSDCommUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeFSDCommUPP (short message,
+ void * paramBlock,
+ void * globalsPtr,
+ FSDCommUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppFSDCommProcInfo = 0x00000FA0 }; /* pascal 2_bytes Func(2_bytes, 4_bytes, 4_bytes) */
+ #define NewFSDCommUPP(userRoutine) (FSDCommUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppFSDCommProcInfo, GetCurrentArchitecture())
+ #define DisposeFSDCommUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeFSDCommUPP(message, paramBlock, globalsPtr, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppFSDCommProcInfo, (message), (paramBlock), (globalsPtr))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewFSDCommProc(userRoutine) NewFSDCommUPP(userRoutine)
+#define CallFSDCommProc(userRoutine, message, paramBlock, globalsPtr) InvokeFSDCommUPP(message, paramBlock, globalsPtr, userRoutine)
+typedef struct FSDRec FSDRec;
+
+struct FSDRec {
+ struct FSDRec * fsdLink; /* ptr to next */
+ short fsdLength; /* length of this FSD in BYTES */
+ short fsdVersion; /* version number */
+ short fileSystemFSID; /* file system id */
+ Str31 fileSystemName; /* file system name */
+ FSSpec fileSystemSpec; /* foreign file system's FSSpec */
+ Ptr fileSystemGlobalsPtr; /* ptr to file system globals */
+ FSDCommUPP fileSystemCommProc; /* communication proc with the FFS */
+ long reserved3; /* --reserved, must be zero-- */
+ long reserved2; /* --reserved, must be zero-- */
+ long reserved1; /* --reserved, must be zero-- */
+ HFSCIRec fsdHFSCI; /* HFS component interface */
+ DICIRec fsdDICI; /* Disk Initialization component interface */
+};
+
+
+typedef FSDRec * FSDRecPtr;
+
+struct FSMGetIconInfoRec {
+ long theIcon[32]; /* The ICN# structure */
+ long theMask[32]; /* The mask for the icon above */
+ Str255 whereStr;
+};
+typedef struct FSMGetIconInfoRec FSMGetIconInfoRec;
+typedef FSMGetIconInfoRec * FSMGetIconInfoRecPtr;
+/*
+ * paramBlock for ffsGetIconMessage and fsmGetFSIconMessage
+ */
+
+struct FSMGetIconRec {
+ short refNum; /* target drive num or volume refnum */
+ FSMGetIconInfoRecPtr iconBufferPtr; /* pointer to icon buffer */
+ long requestSize; /* requested size of the icon buffer */
+ long actualSize; /* actual size of the icon data returned */
+ SInt8 iconType; /* kind of icon */
+ Boolean isEjectable; /* true if the device is ejectable */
+ DrvQElPtr driveQElemPtr; /* pointer to DQE */
+ FSSpecPtr fileSystemSpecPtr; /* pointer to foreign file system's FSSpec */
+ long reserved1; /* --reserved, must be zero-- */
+};
+typedef struct FSMGetIconRec FSMGetIconRec;
+typedef FSMGetIconRec * FSMGetIconRecPtr;
+#if CALL_NOT_IN_CARBON
+/*
+ * HFS Utility routine prototypes
+ */
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+UTAllocateFCB (short * fileRefNum,
+ FCBRecPtr * fileCtrlBlockPtr) TWOWORDINLINE(0x7000, 0xA824);
+
+EXTERN_API( OSErr )
+UTReleaseFCB (short fileRefNum) TWOWORDINLINE(0x7001, 0xA824);
+
+EXTERN_API( OSErr )
+UTLocateFCB (VCBPtr volCtrlBlockPtr,
+ unsigned long fileNum,
+ StringPtr namePtr,
+ short * fileRefNum,
+ FCBRecPtr * fileCtrlBlockPtr) TWOWORDINLINE(0x7002, 0xA824);
+
+EXTERN_API( OSErr )
+UTLocateNextFCB (VCBPtr volCtrlBlockPtr,
+ unsigned long fileNum,
+ StringPtr namePtr,
+ short * fileRefNum,
+ FCBRecPtr * fileCtrlBlockPtr) TWOWORDINLINE(0x7003, 0xA824);
+
+EXTERN_API( OSErr )
+UTIndexFCB (VCBPtr volCtrlBlockPtr,
+ short * fileRefNum,
+ FCBRecPtr * fileCtrlBlockPtr) TWOWORDINLINE(0x7004, 0xA824);
+
+EXTERN_API( OSErr )
+UTResolveFCB (short fileRefNum,
+ FCBRecPtr * fileCtrlBlockPtr) TWOWORDINLINE(0x7005, 0xA824);
+
+EXTERN_API( OSErr )
+UTAllocateVCB (unsigned short * sysVCBLength,
+ VCBPtr * volCtrlBlockPtr,
+ unsigned short addSize) TWOWORDINLINE(0x7006, 0xA824);
+
+EXTERN_API( OSErr )
+UTAddNewVCB (short driveNum,
+ short * vRefNum,
+ VCBPtr volCtrlBlockPtr) TWOWORDINLINE(0x7007, 0xA824);
+
+EXTERN_API( OSErr )
+UTDisposeVCB (VCBPtr volCtrlBlockPtr) TWOWORDINLINE(0x7008, 0xA824);
+
+EXTERN_API( OSErr )
+UTLocateVCBByRefNum (short refNum,
+ short * vRefNum,
+ VCBPtr * volCtrlBlockPtr) TWOWORDINLINE(0x7009, 0xA824);
+
+EXTERN_API( OSErr )
+UTLocateVCBByName (StringPtr namePtr,
+ short * moreMatches,
+ short * vRefNum,
+ VCBPtr * volCtrlBlockPtr) TWOWORDINLINE(0x700A, 0xA824);
+
+EXTERN_API( OSErr )
+UTLocateNextVCB (StringPtr namePtr,
+ short * moreMatches,
+ short * vRefNum,
+ VCBPtr * volCtrlBlockPtr) TWOWORDINLINE(0x700B, 0xA824);
+
+EXTERN_API( OSErr )
+UTAllocateWDCB (WDPBPtr paramBlock) TWOWORDINLINE(0x700C, 0xA824);
+
+EXTERN_API( OSErr )
+UTReleaseWDCB (short wdRefNum) TWOWORDINLINE(0x700D, 0xA824);
+
+EXTERN_API( OSErr )
+UTResolveWDCB (long procID,
+ short wdIndex,
+ short wdRefNum,
+ WDCBRecPtr * wdCtrlBlockPtr) TWOWORDINLINE(0x700E, 0xA824);
+
+EXTERN_API( OSErr )
+UTFindDrive (short driveNum,
+ DrvQElPtr * driveQElementPtr) TWOWORDINLINE(0x700F, 0xA824);
+
+EXTERN_API( OSErr )
+UTAdjustEOF (short fileRefNum) TWOWORDINLINE(0x7010, 0xA824);
+
+EXTERN_API( OSErr )
+UTSetDefaultVol (long nodeHint,
+ unsigned long dirID,
+ short refNum) TWOWORDINLINE(0x7011, 0xA824);
+
+EXTERN_API( OSErr )
+UTGetDefaultVol (WDPBPtr paramBlock) TWOWORDINLINE(0x7012, 0xA824);
+
+EXTERN_API( OSErr )
+UTEjectVol (VCBPtr volCtrlBlockPtr) TWOWORDINLINE(0x702B, 0xA824);
+
+EXTERN_API( OSErr )
+UTCheckWDRefNum (short wdRefNum) TWOWORDINLINE(0x7013, 0xA824);
+
+EXTERN_API( OSErr )
+UTCheckFileRefNum (short fileRefNum) TWOWORDINLINE(0x7014, 0xA824);
+
+EXTERN_API( OSErr )
+UTCheckVolRefNum (short vRefNum) TWOWORDINLINE(0x7015, 0xA824);
+
+EXTERN_API( OSErr )
+UTCheckPermission (VCBPtr volCtrlBlockPtr,
+ short * modByte,
+ unsigned long fileNum,
+ ParmBlkPtr paramBlock) TWOWORDINLINE(0x7016, 0xA824);
+
+EXTERN_API( OSErr )
+UTCheckVolOffline (short vRefNum) TWOWORDINLINE(0x7017, 0xA824);
+
+EXTERN_API( OSErr )
+UTCheckVolModifiable (short vRefNum) TWOWORDINLINE(0x7018, 0xA824);
+
+EXTERN_API( OSErr )
+UTCheckFileModifiable (short fileRefNum) TWOWORDINLINE(0x7019, 0xA824);
+
+EXTERN_API( OSErr )
+UTCheckDirBusy (VCBPtr volCtrlBlockPtr,
+ unsigned long dirID) TWOWORDINLINE(0x701A, 0xA824);
+
+EXTERN_API( OSErr )
+UTParsePathname (short * volNamelength,
+ StringPtr namePtr) TWOWORDINLINE(0x701B, 0xA824);
+
+EXTERN_API( OSErr )
+UTGetPathComponentName (ParsePathRecPtr parseRec) TWOWORDINLINE(0x701C, 0xA824);
+
+EXTERN_API( OSErr )
+UTDetermineVol (ParmBlkPtr paramBlock,
+ short * status,
+ short * moreMatches,
+ short * vRefNum,
+ VCBPtr * volCtrlBlockPtr) TWOWORDINLINE(0x701D, 0xA824);
+
+EXTERN_API( OSErr )
+UTGetBlock (short refNum,
+ void * log2PhyProc,
+ unsigned long blockNum,
+ short gbOption,
+ Ptr * buffer) TWOWORDINLINE(0x701F, 0xA824);
+
+EXTERN_API( OSErr )
+UTReleaseBlock (Ptr buffer,
+ short rbOption) TWOWORDINLINE(0x7020, 0xA824);
+
+EXTERN_API( OSErr )
+UTFlushCache (short refNum,
+ short fcOption) TWOWORDINLINE(0x7021, 0xA824);
+
+EXTERN_API( OSErr )
+UTMarkDirty (Ptr buffer) TWOWORDINLINE(0x7023, 0xA824);
+
+EXTERN_API( OSErr )
+UTTrashVolBlocks (VCBPtr volCtrlBlockPtr) TWOWORDINLINE(0x7024, 0xA824);
+
+EXTERN_API( OSErr )
+UTTrashFileBlocks (VCBPtr volCtrlBlockPtr,
+ unsigned long fileNum) TWOWORDINLINE(0x7025, 0xA824);
+
+EXTERN_API( OSErr )
+UTTrashBlocks (unsigned long beginPosition,
+ unsigned long byteCount,
+ VCBPtr volCtrlBlockPtr,
+ short fileRefNum,
+ short tbOption) TWOWORDINLINE(0x7026, 0xA824);
+
+EXTERN_API( OSErr )
+UTCacheReadIP (void * log2PhyProc,
+ unsigned long filePosition,
+ Ptr ioBuffer,
+ short fileRefNum,
+ unsigned long reqCount,
+ unsigned long * actCount,
+ short cacheOption) TWOWORDINLINE(0x7027, 0xA824);
+
+EXTERN_API( OSErr )
+UTCacheWriteIP (void * log2PhyProc,
+ unsigned long filePosition,
+ Ptr ioBuffer,
+ short fileRefNum,
+ unsigned long reqCount,
+ unsigned long * actCount,
+ short cacheOption) TWOWORDINLINE(0x7028, 0xA824);
+
+EXTERN_API( OSErr )
+UTBlockInFQHashP (short vRefNum,
+ unsigned long diskBlock) TWOWORDINLINE(0x702C, 0xA824);
+
+EXTERN_API( OSErr )
+UTVolCacheReadIP (VCBPtr volCtrlBlockPtr,
+ unsigned long blockPosition,
+ Ptr ioBuffer,
+ unsigned long reqCount,
+ unsigned long * actCount,
+ short cacheOption) TWOWORDINLINE(0x7034, 0xA824);
+
+EXTERN_API( OSErr )
+UTVolCacheWriteIP (VCBPtr volCtrlBlockPtr,
+ unsigned long blockPosition,
+ Ptr ioBuffer,
+ unsigned long reqCount,
+ unsigned long * actCount,
+ short cacheOption) TWOWORDINLINE(0x7035, 0xA824);
+
+EXTERN_API( OSErr )
+UTResolveFileRefNum (FCBRecPtr fileCtrlBlockPtr,
+ short * fileRefNum) TWOWORDINLINE(0x7036, 0xA824);
+
+EXTERN_API( OSErr )
+UTCheckFCB (FCBRecPtr fileCtrlBlockPtr) TWOWORDINLINE(0x7037, 0xA824);
+
+EXTERN_API( OSErr )
+UTCheckForkPermissions (VCBPtr volCtrlBlockPtr,
+ UInt32 fileNum,
+ UInt32 forkID,
+ Boolean fileLocked,
+ SInt8 permissions,
+ Boolean useSearchList,
+ SInt8 * fcbFlags,
+ SInt16 * openForkRefNum) TWOWORDINLINE(0x7038, 0xA824);
+
+EXTERN_API( OSErr )
+UTAddFCBToSearchList (FCBRecPtr fileCtrlBlockPtr) TWOWORDINLINE(0x7039, 0xA824);
+
+EXTERN_API( OSErr )
+UTRemoveFCBFromSearchList (FCBRecPtr fileCtrlBlockPtr) TWOWORDINLINE(0x703A, 0xA824);
+
+EXTERN_API( OSErr )
+UTLocateFCBInSearchList (VCBPtr volCtrlBlockPtr,
+ unsigned long fileNum,
+ short * fileRefNum,
+ FCBRecPtr * fileCtrlBlockPtr) TWOWORDINLINE(0x703B, 0xA824);
+
+EXTERN_API( OSErr )
+UTGetForkControlBlockSize (UInt32 * fcbSize) TWOWORDINLINE(0x703C, 0xA824);
+
+
+/*
+ * File System Manager call prototypes
+ */
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 InstallFS(__A0)
+ #endif
+EXTERN_API( OSErr )
+InstallFS (FSDRecPtr fsdPtr) TWOWORDINLINE(0x7000, 0xA0AC);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 RemoveFS(__A0)
+ #endif
+EXTERN_API( OSErr )
+RemoveFS (short fsid) TWOWORDINLINE(0x7001, 0xA0AC);
+
+EXTERN_API( OSErr )
+SetFSInfo (short fsid,
+ short bufSize,
+ FSDRecPtr fsdPtr);
+
+EXTERN_API( OSErr )
+GetFSInfo (short selector,
+ short key,
+ short * bufSize,
+ FSDRecPtr fsdPtr);
+
+EXTERN_API( OSErr )
+InformFSM (short theMessage,
+ void * paramBlock);
+
+EXTERN_API( OSErr )
+InformFFS (short fsid,
+ void * paramBlock);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __FSM__ */
+
diff --git a/include/qt/FileSigning.h b/include/qt/FileSigning.h
new file mode 100644
index 000000000..c3af4cbeb
--- /dev/null
+++ b/include/qt/FileSigning.h
@@ -0,0 +1,222 @@
+/*
+ File: FileSigning.h
+
+ Contains: Apple File Signing Interfaces.
+
+ Version: Technology: 1.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1999-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __FILESIGNING__
+#define __FILESIGNING__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+#ifndef __KEYCHAIN__
+#include "Keychain.h"
+#endif
+
+#ifndef __CRYPTOMESSAGESYNTAX__
+#include "CryptoMessageSyntax.h"
+#endif
+
+
+/* Data structures and types */
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ kSecOptionProgress = 1 << 0,
+ kSecOptionShowVerifyUI = 1 << 1,
+ kSecOptionNeverShowUI = 1 << 2,
+ kCertUsageReserved = 0x7FFFFF00 /* Last 3 bytes reserved for SecOptions flags */
+};
+
+typedef UInt32 SecOptions;
+enum {
+ kSecSignatureTypeRawPKCS7 = 0,
+ kSecSignatureTypeCMS = 1,
+ kSecSignatureTypePGP = 2 /* reserved but not implemented */
+};
+
+typedef UInt32 SecSignatureType;
+enum {
+ kSecTrustPolicyCodeSigning = 0,
+ kSecTrustPolicyPersonalFileSigning = 1
+};
+
+typedef UInt32 SecTrustPolicy;
+
+struct SecProgressCallbackInfo {
+ UInt32 version;
+ UInt32 bytesProcessed;
+ UInt32 totalBytes;
+ UInt32 itemsRemainingToSign;
+ UInt32 totalItemsToSign;
+ UInt32 secondsRemaining;
+ UInt32 secondsElapsed;
+ UInt32 microSecondsPerByte;
+ Str255 fileName;
+};
+typedef struct SecProgressCallbackInfo SecProgressCallbackInfo;
+typedef CALLBACK_API( OSStatus , SecProgressCallbackProcPtr )(SecProgressCallbackInfo *callbackInfo, void *userContext);
+typedef STACK_UPP_TYPE(SecProgressCallbackProcPtr) SecProgressCallbackUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(SecProgressCallbackUPP)
+ NewSecProgressCallbackUPP (SecProgressCallbackProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeSecProgressCallbackUPP (SecProgressCallbackUPP userUPP);
+
+ EXTERN_API(OSStatus)
+ InvokeSecProgressCallbackUPP (SecProgressCallbackInfo * callbackInfo,
+ void * userContext,
+ SecProgressCallbackUPP userUPP);
+
+#else
+ enum { uppSecProgressCallbackProcInfo = 0x000003F0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes) */
+ #define NewSecProgressCallbackUPP(userRoutine) (SecProgressCallbackUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSecProgressCallbackProcInfo, GetCurrentArchitecture())
+ #define DisposeSecProgressCallbackUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeSecProgressCallbackUPP(callbackInfo, userContext, userUPP) (OSStatus)CALL_TWO_PARAMETER_UPP((userUPP), uppSecProgressCallbackProcInfo, (callbackInfo), (userContext))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewSecProgressCallbackProc(userRoutine) NewSecProgressCallbackUPP(userRoutine)
+#define CallSecProgressCallbackProc(userRoutine, callbackInfo, userContext) InvokeSecProgressCallbackUPP(callbackInfo, userContext, userRoutine)
+EXTERN_API( OSStatus )
+SecSetProgressCallback (SecProgressCallbackUPP callbackProc,
+ void * userContext);
+
+EXTERN_API( OSStatus )
+SecRemoveProgressCallback (SecProgressCallbackUPP callbackProc);
+
+EXTERN_API( OSStatus )
+DefaultSecProgressCallbackProc (SecProgressCallbackInfo * info,
+ void * userContext);
+
+enum {
+ kSecDefaultSignatureResID = 1
+};
+
+EXTERN_API( OSStatus )
+SecMacSignFile (FSSpec * theFile,
+ KCItemRef signingCertificate,
+ Handle sigH,
+ SecOptions options,
+ SecProgressCallbackUPP progressProc,
+ void * userContext);
+
+EXTERN_API( OSStatus )
+SecMacSignFileSimple (FSSpec * theFile,
+ KCItemRef signingCertificate,
+ SecOptions options);
+
+EXTERN_API( OSStatus )
+SecMacLoadSigPound (FSSpec * theFile,
+ Handle * resHandle);
+
+EXTERN_API( OSStatus )
+SecMacRemoveSignature (FSSpec * theFile,
+ SecSignatureType signatureType,
+ SInt16 signatureToRemove);
+
+EXTERN_API( OSStatus )
+SecMacRemoveAllSignatures (FSSpec * theFile,
+ SecSignatureType signatureType);
+
+
+EXTERN_API( OSStatus )
+SecMacVerifyFile (FSSpec * theFile,
+ SecOptions options,
+ SecProgressCallbackUPP progressProc,
+ void * userContext,
+ SInt16 signatureToVerify,
+ CFArrayRef policyOIDs,
+ KCVerifyStopOn stopOn,
+ SecSignerRef * signer);
+
+EXTERN_API( OSStatus )
+SecMacVerifyFileSimple (FSSpec * theFile,
+ SecOptions options,
+ SecTrustPolicy trustPolicy,
+ SecSignerRef * signer);
+
+EXTERN_API( Boolean )
+SecMacHasSignature (FSSpec * theFile,
+ SecSignatureType signatureType);
+
+EXTERN_API( OSStatus )
+SecMacFindSignatureToVerify (FSSpec * theFile,
+ SecSignatureType signatureType,
+ SInt16 * signatureToVerify);
+
+EXTERN_API( CFArrayRef )
+SecMacGetDefaultPolicyOIDs (SecTrustPolicy trustPolicy);
+
+
+EXTERN_API( OSStatus )
+SecMacDisplaySigner (OSStatus inputErr,
+ SecSignerRef signer,
+ Boolean alwaysShowUI,
+ FSSpec * theFile);
+
+/* Errors Codes */
+enum {
+ errSecTooManySigners = -13839,
+ errSecSigningFailed = -13838,
+ errSecCorruptSigPound = -13837,
+ errSecNoSignatureFound = -13836
+};
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __FILESIGNING__ */
+
diff --git a/include/qt/FileTransferTools.h b/include/qt/FileTransferTools.h
new file mode 100644
index 000000000..7593c10c0
--- /dev/null
+++ b/include/qt/FileTransferTools.h
@@ -0,0 +1,144 @@
+/*
+ File: FileTransferTools.h
+
+ Contains: CommToolbox File Transfer Tools Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1988-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __FILETRANSFERTOOLS__
+#define __FILETRANSFERTOOLS__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __DIALOGS__
+#include "Dialogs.h"
+#endif
+
+#ifndef __FILETRANSFERS__
+#include "FileTransfers.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if CALL_NOT_IN_CARBON
+enum {
+ /* DEFs */
+ fdefType = FOUR_CHAR_CODE('fdef'),
+ fsetType = FOUR_CHAR_CODE('fset'),
+ fvalType = FOUR_CHAR_CODE('fval'),
+ flocType = FOUR_CHAR_CODE('floc'),
+ fscrType = FOUR_CHAR_CODE('fscr'),
+ fbndType = FOUR_CHAR_CODE('fbnd'),
+ fverType = FOUR_CHAR_CODE('vers')
+};
+
+enum {
+ /* control */
+ ftInitMsg = 0,
+ ftDisposeMsg = 1,
+ ftSuspendMsg = 2,
+ ftResumeMsg = 3,
+ ftMenuMsg = 4,
+ ftEventMsg = 5,
+ ftActivateMsg = 6,
+ ftDeactivateMsg = 7,
+ ftGetErrorStringMsg = 8,
+ ftAbortMsg = 52,
+ ftStartMsg = 100,
+ ftExecMsg = 102,
+ ftSendMsg = 103,
+ ftReceiveMsg = 104
+};
+
+enum {
+ /* setup */
+ ftSpreflightMsg = 0,
+ ftSsetupMsg = 1,
+ ftSitemMsg = 2,
+ ftSfilterMsg = 3,
+ ftScleanupMsg = 4
+};
+
+enum {
+ /* validate */
+ ftValidateMsg = 0,
+ ftDefaultMsg = 1
+};
+
+enum {
+ /* scripting */
+ ftMgetMsg = 0,
+ ftMsetMsg = 1
+};
+
+enum {
+ /* localization */
+ ftL2English = 0,
+ ftL2Intl = 1
+};
+
+
+struct FTSetupStruct {
+ DialogPtr theDialog; /* the dialog form the application */
+ short count; /* first appended item */
+ Ptr theConfig; /* the config record to setup */
+ short procID; /* procID of the tool */
+};
+typedef struct FTSetupStruct FTSetupStruct;
+
+typedef FTSetupStruct * FTSetupPtr;
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __FILETRANSFERTOOLS__ */
+
diff --git a/include/qt/FileTransfers.h b/include/qt/FileTransfers.h
new file mode 100644
index 000000000..21fda5bb4
--- /dev/null
+++ b/include/qt/FileTransfers.h
@@ -0,0 +1,551 @@
+/*
+ File: FileTransfers.h
+
+ Contains: CommToolbox File Transfer Manager Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1988-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __FILETRANSFERS__
+#define __FILETRANSFERS__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __STANDARDFILE__
+#include "StandardFile.h"
+#endif
+
+#ifndef __CTBUTILITIES__
+#include "CTBUtilities.h"
+#endif
+
+#ifndef __CONNECTIONS__
+#include "Connections.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+#ifndef __TERMINALS__
+#include "Terminals.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if CALL_NOT_IN_CARBON
+enum {
+ curFTVersion = 2 /* current file transfer manager version*/
+};
+
+enum {
+ /* FTErr */
+ ftGenericError = -1,
+ ftNoErr = 0,
+ ftRejected = 1,
+ ftFailed = 2,
+ ftTimeOut = 3,
+ ftTooManyRetry = 4,
+ ftNotEnoughDSpace = 5,
+ ftRemoteCancel = 6,
+ ftWrongFormat = 7,
+ ftNoTools = 8,
+ ftUserCancel = 9,
+ ftNotSupported = 10
+};
+
+typedef OSErr FTErr;
+enum {
+ ftIsFTMode = 1 << 0,
+ ftNoMenus = 1 << 1,
+ ftQuiet = 1 << 2,
+ ftConfigChanged = 1 << 4,
+ ftSucc = 1 << 7
+};
+
+typedef unsigned long FTFlags;
+enum {
+ ftSameCircuit = 1 << 0,
+ ftSendDisable = 1 << 1,
+ ftReceiveDisable = 1 << 2,
+ ftTextOnly = 1 << 3,
+ ftNoStdFile = 1 << 4,
+ ftMultipleFileSend = 1 << 5
+};
+
+typedef unsigned short FTAttributes;
+enum {
+ ftReceiving = 0,
+ ftTransmitting = 1,
+ ftFullDuplex = 2 /* (16) added ftFullDuplex bit.*/
+};
+
+typedef unsigned short FTDirection;
+typedef CALLBACK_API( long , FileTransferDefProcPtr )(TermHandle hTerm, short msg, long p1, long p2, long p3);
+/* application routines type definitions */
+typedef struct FTRecord FTRecord;
+typedef FTRecord * FTPtr;
+typedef FTPtr * FTHandle;
+typedef CALLBACK_API( OSErr , FileTransferReadProcPtr )(unsigned long *count, Ptr pData, long refCon, short fileMsg);
+typedef CALLBACK_API( OSErr , FileTransferWriteProcPtr )(unsigned long *count, Ptr pData, long refCon, short fileMsg);
+typedef CALLBACK_API( Size , FileTransferSendProcPtr )(Ptr thePtr, long theSize, long refCon, CMChannel channel, CMFlags flag);
+typedef CALLBACK_API( Size , FileTransferReceiveProcPtr )(Ptr thePtr, long theSize, long refCon, CMChannel channel, CMFlags *flag);
+typedef CALLBACK_API( OSErr , FileTransferEnvironsProcPtr )(long refCon, ConnEnvironRec *theEnvirons);
+typedef CALLBACK_API( void , FileTransferNotificationProcPtr )(FTHandle hFT, const FSSpec *pFSSpec);
+typedef CALLBACK_API( void , FileTransferChooseIdleProcPtr )(void );
+typedef STACK_UPP_TYPE(FileTransferDefProcPtr) FileTransferDefUPP;
+typedef STACK_UPP_TYPE(FileTransferReadProcPtr) FileTransferReadUPP;
+typedef STACK_UPP_TYPE(FileTransferWriteProcPtr) FileTransferWriteUPP;
+typedef STACK_UPP_TYPE(FileTransferSendProcPtr) FileTransferSendUPP;
+typedef STACK_UPP_TYPE(FileTransferReceiveProcPtr) FileTransferReceiveUPP;
+typedef STACK_UPP_TYPE(FileTransferEnvironsProcPtr) FileTransferEnvironsUPP;
+typedef STACK_UPP_TYPE(FileTransferNotificationProcPtr) FileTransferNotificationUPP;
+typedef STACK_UPP_TYPE(FileTransferChooseIdleProcPtr) FileTransferChooseIdleUPP;
+
+struct FTRecord {
+ short procID;
+ FTFlags flags;
+ FTErr errCode;
+ long refCon;
+ long userData;
+ FileTransferDefUPP defProc;
+ Ptr config;
+ Ptr oldConfig;
+ FileTransferEnvironsUPP environsProc;
+ long reserved1;
+ long reserved2;
+ Ptr ftPrivate;
+ FileTransferSendUPP sendProc;
+ FileTransferReceiveUPP recvProc;
+ FileTransferWriteUPP writeProc;
+ FileTransferReadUPP readProc;
+ WindowPtr owner;
+ FTDirection direction;
+ SFReply theReply;
+ long writePtr;
+ long readPtr;
+ Ptr theBuf;
+ long bufSize;
+ Str255 autoRec;
+ FTAttributes attributes;
+};
+
+typedef unsigned short FTCompletionKind;
+enum {
+ /* FTReadProc messages */
+ ftReadOpenFile = 0, /* count = forkFlags, buffer = pblock from PBGetFInfo */
+ ftReadDataFork = 1,
+ ftReadRsrcFork = 2,
+ ftReadAbort = 3,
+ ftReadComplete = 4,
+ ftReadSetFPos = 6, /* count = forkFlags, buffer = pBlock same as PBSetFPos */
+ ftReadGetFPos = 7 /* count = forkFlags, buffer = pBlock same as PBGetFPos */
+};
+
+enum {
+ /* FTWriteProc messages */
+ ftWriteOpenFile = 0, /* count = forkFlags, buffer = pblock from PBGetFInfo */
+ ftWriteDataFork = 1,
+ ftWriteRsrcFork = 2,
+ ftWriteAbort = 3,
+ ftWriteComplete = 4,
+ ftWriteFileInfo = 5,
+ ftWriteSetFPos = 6, /* count = forkFlags, buffer = pBlock same as PBSetFPos */
+ ftWriteGetFPos = 7 /* count = forkFlags, buffer = pBlock same as PBGetFPos */
+};
+
+enum {
+ /* fork flags */
+ ftOpenDataFork = 1,
+ ftOpenRsrcFork = 2
+};
+
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(FileTransferDefUPP)
+ NewFileTransferDefUPP (FileTransferDefProcPtr userRoutine);
+
+ EXTERN_API(FileTransferReadUPP)
+ NewFileTransferReadUPP (FileTransferReadProcPtr userRoutine);
+
+ EXTERN_API(FileTransferWriteUPP)
+ NewFileTransferWriteUPP (FileTransferWriteProcPtr userRoutine);
+
+ EXTERN_API(FileTransferSendUPP)
+ NewFileTransferSendUPP (FileTransferSendProcPtr userRoutine);
+
+ EXTERN_API(FileTransferReceiveUPP)
+ NewFileTransferReceiveUPP (FileTransferReceiveProcPtr userRoutine);
+
+ EXTERN_API(FileTransferEnvironsUPP)
+ NewFileTransferEnvironsUPP (FileTransferEnvironsProcPtr userRoutine);
+
+ EXTERN_API(FileTransferNotificationUPP)
+ NewFileTransferNotificationUPP (FileTransferNotificationProcPtr userRoutine);
+
+ EXTERN_API(FileTransferChooseIdleUPP)
+ NewFileTransferChooseIdleUPP (FileTransferChooseIdleProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeFileTransferDefUPP (FileTransferDefUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeFileTransferReadUPP (FileTransferReadUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeFileTransferWriteUPP (FileTransferWriteUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeFileTransferSendUPP (FileTransferSendUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeFileTransferReceiveUPP (FileTransferReceiveUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeFileTransferEnvironsUPP (FileTransferEnvironsUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeFileTransferNotificationUPP (FileTransferNotificationUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeFileTransferChooseIdleUPP (FileTransferChooseIdleUPP userUPP);
+
+ EXTERN_API(long)
+ InvokeFileTransferDefUPP (TermHandle hTerm,
+ short msg,
+ long p1,
+ long p2,
+ long p3,
+ FileTransferDefUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeFileTransferReadUPP (unsigned long * count,
+ Ptr pData,
+ long refCon,
+ short fileMsg,
+ FileTransferReadUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeFileTransferWriteUPP (unsigned long * count,
+ Ptr pData,
+ long refCon,
+ short fileMsg,
+ FileTransferWriteUPP userUPP);
+
+ EXTERN_API(Size)
+ InvokeFileTransferSendUPP (Ptr thePtr,
+ long theSize,
+ long refCon,
+ CMChannel channel,
+ CMFlags flag,
+ FileTransferSendUPP userUPP);
+
+ EXTERN_API(Size)
+ InvokeFileTransferReceiveUPP (Ptr thePtr,
+ long theSize,
+ long refCon,
+ CMChannel channel,
+ CMFlags * flag,
+ FileTransferReceiveUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeFileTransferEnvironsUPP (long refCon,
+ ConnEnvironRec * theEnvirons,
+ FileTransferEnvironsUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeFileTransferNotificationUPP (FTHandle hFT,
+ const FSSpec * pFSSpec,
+ FileTransferNotificationUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeFileTransferChooseIdleUPP (FileTransferChooseIdleUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppFileTransferDefProcInfo = 0x0000FEF0 }; /* pascal 4_bytes Func(4_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppFileTransferReadProcInfo = 0x00002FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 2_bytes) */
+ enum { uppFileTransferWriteProcInfo = 0x00002FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 2_bytes) */
+ enum { uppFileTransferSendProcInfo = 0x0000AFF0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes, 4_bytes, 2_bytes, 2_bytes) */
+ enum { uppFileTransferReceiveProcInfo = 0x0000EFF0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes, 4_bytes, 2_bytes, 4_bytes) */
+ enum { uppFileTransferEnvironsProcInfo = 0x000003E0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes) */
+ enum { uppFileTransferNotificationProcInfo = 0x000003C0 }; /* pascal no_return_value Func(4_bytes, 4_bytes) */
+ enum { uppFileTransferChooseIdleProcInfo = 0x00000000 }; /* pascal no_return_value Func() */
+ #define NewFileTransferDefUPP(userRoutine) (FileTransferDefUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppFileTransferDefProcInfo, GetCurrentArchitecture())
+ #define NewFileTransferReadUPP(userRoutine) (FileTransferReadUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppFileTransferReadProcInfo, GetCurrentArchitecture())
+ #define NewFileTransferWriteUPP(userRoutine) (FileTransferWriteUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppFileTransferWriteProcInfo, GetCurrentArchitecture())
+ #define NewFileTransferSendUPP(userRoutine) (FileTransferSendUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppFileTransferSendProcInfo, GetCurrentArchitecture())
+ #define NewFileTransferReceiveUPP(userRoutine) (FileTransferReceiveUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppFileTransferReceiveProcInfo, GetCurrentArchitecture())
+ #define NewFileTransferEnvironsUPP(userRoutine) (FileTransferEnvironsUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppFileTransferEnvironsProcInfo, GetCurrentArchitecture())
+ #define NewFileTransferNotificationUPP(userRoutine) (FileTransferNotificationUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppFileTransferNotificationProcInfo, GetCurrentArchitecture())
+ #define NewFileTransferChooseIdleUPP(userRoutine) (FileTransferChooseIdleUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppFileTransferChooseIdleProcInfo, GetCurrentArchitecture())
+ #define DisposeFileTransferDefUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeFileTransferReadUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeFileTransferWriteUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeFileTransferSendUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeFileTransferReceiveUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeFileTransferEnvironsUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeFileTransferNotificationUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeFileTransferChooseIdleUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeFileTransferDefUPP(hTerm, msg, p1, p2, p3, userUPP) (long)CALL_FIVE_PARAMETER_UPP((userUPP), uppFileTransferDefProcInfo, (hTerm), (msg), (p1), (p2), (p3))
+ #define InvokeFileTransferReadUPP(count, pData, refCon, fileMsg, userUPP) (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppFileTransferReadProcInfo, (count), (pData), (refCon), (fileMsg))
+ #define InvokeFileTransferWriteUPP(count, pData, refCon, fileMsg, userUPP) (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppFileTransferWriteProcInfo, (count), (pData), (refCon), (fileMsg))
+ #define InvokeFileTransferSendUPP(thePtr, theSize, refCon, channel, flag, userUPP) (Size)CALL_FIVE_PARAMETER_UPP((userUPP), uppFileTransferSendProcInfo, (thePtr), (theSize), (refCon), (channel), (flag))
+ #define InvokeFileTransferReceiveUPP(thePtr, theSize, refCon, channel, flag, userUPP) (Size)CALL_FIVE_PARAMETER_UPP((userUPP), uppFileTransferReceiveProcInfo, (thePtr), (theSize), (refCon), (channel), (flag))
+ #define InvokeFileTransferEnvironsUPP(refCon, theEnvirons, userUPP) (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppFileTransferEnvironsProcInfo, (refCon), (theEnvirons))
+ #define InvokeFileTransferNotificationUPP(hFT, pFSSpec, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppFileTransferNotificationProcInfo, (hFT), (pFSSpec))
+ #define InvokeFileTransferChooseIdleUPP(userUPP) CALL_ZERO_PARAMETER_UPP((userUPP), uppFileTransferChooseIdleProcInfo)
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewFileTransferDefProc(userRoutine) NewFileTransferDefUPP(userRoutine)
+#define NewFileTransferReadProc(userRoutine) NewFileTransferReadUPP(userRoutine)
+#define NewFileTransferWriteProc(userRoutine) NewFileTransferWriteUPP(userRoutine)
+#define NewFileTransferSendProc(userRoutine) NewFileTransferSendUPP(userRoutine)
+#define NewFileTransferReceiveProc(userRoutine) NewFileTransferReceiveUPP(userRoutine)
+#define NewFileTransferEnvironsProc(userRoutine) NewFileTransferEnvironsUPP(userRoutine)
+#define NewFileTransferNotificationProc(userRoutine) NewFileTransferNotificationUPP(userRoutine)
+#define NewFileTransferChooseIdleProc(userRoutine) NewFileTransferChooseIdleUPP(userRoutine)
+#define CallFileTransferDefProc(userRoutine, hTerm, msg, p1, p2, p3) InvokeFileTransferDefUPP(hTerm, msg, p1, p2, p3, userRoutine)
+#define CallFileTransferReadProc(userRoutine, count, pData, refCon, fileMsg) InvokeFileTransferReadUPP(count, pData, refCon, fileMsg, userRoutine)
+#define CallFileTransferWriteProc(userRoutine, count, pData, refCon, fileMsg) InvokeFileTransferWriteUPP(count, pData, refCon, fileMsg, userRoutine)
+#define CallFileTransferSendProc(userRoutine, thePtr, theSize, refCon, channel, flag) InvokeFileTransferSendUPP(thePtr, theSize, refCon, channel, flag, userRoutine)
+#define CallFileTransferReceiveProc(userRoutine, thePtr, theSize, refCon, channel, flag) InvokeFileTransferReceiveUPP(thePtr, theSize, refCon, channel, flag, userRoutine)
+#define CallFileTransferEnvironsProc(userRoutine, refCon, theEnvirons) InvokeFileTransferEnvironsUPP(refCon, theEnvirons, userRoutine)
+#define CallFileTransferNotificationProc(userRoutine, hFT, pFSSpec) InvokeFileTransferNotificationUPP(hFT, pFSSpec, userRoutine)
+#define CallFileTransferChooseIdleProc(userRoutine) InvokeFileTransferChooseIdleUPP(userRoutine)
+#if CALL_NOT_IN_CARBON
+EXTERN_API( FTErr )
+InitFT (void);
+
+EXTERN_API( Handle )
+FTGetVersion (FTHandle hFT);
+
+EXTERN_API( short )
+FTGetFTVersion (void);
+
+EXTERN_API( FTHandle )
+FTNew (short procID,
+ FTFlags flags,
+ FileTransferSendUPP sendProc,
+ FileTransferReceiveUPP recvProc,
+ FileTransferReadUPP readProc,
+ FileTransferWriteUPP writeProc,
+ FileTransferEnvironsUPP environsProc,
+ WindowPtr owner,
+ long refCon,
+ long userData);
+
+EXTERN_API( void )
+FTDispose (FTHandle hFT);
+
+EXTERN_API( FTErr )
+FTStart (FTHandle hFT,
+ FTDirection direction,
+ const SFReply * fileInfo);
+
+EXTERN_API( FTErr )
+FTAbort (FTHandle hFT);
+
+EXTERN_API( FTErr )
+FTSend (FTHandle hFT,
+ short numFiles,
+ FSSpecArrayPtr pFSSpec,
+ FileTransferNotificationUPP notifyProc);
+
+EXTERN_API( FTErr )
+FTReceive (FTHandle hFT,
+ FSSpecPtr pFSSpec,
+ FileTransferNotificationUPP notifyProc);
+
+EXTERN_API( void )
+FTExec (FTHandle hFT);
+
+EXTERN_API( void )
+FTActivate (FTHandle hFT,
+ Boolean activate);
+
+EXTERN_API( void )
+FTResume (FTHandle hFT,
+ Boolean resume);
+
+EXTERN_API( Boolean )
+FTMenu (FTHandle hFT,
+ short menuID,
+ short item);
+
+EXTERN_API( short )
+FTChoose (FTHandle * hFT,
+ Point where,
+ FileTransferChooseIdleUPP idleProc);
+
+EXTERN_API( void )
+FTEvent (FTHandle hFT,
+ const EventRecord * theEvent);
+
+EXTERN_API( Boolean )
+FTValidate (FTHandle hFT);
+
+EXTERN_API( void )
+FTDefault (Ptr * theConfig,
+ short procID,
+ Boolean allocate);
+
+EXTERN_API( Handle )
+FTSetupPreflight (short procID,
+ long * magicCookie);
+
+EXTERN_API( void )
+FTSetupSetup (short procID,
+ const void * theConfig,
+ short count,
+ DialogPtr theDialog,
+ long * magicCookie);
+
+EXTERN_API( Boolean )
+FTSetupFilter (short procID,
+ const void * theConfig,
+ short count,
+ DialogPtr theDialog,
+ EventRecord * theEvent,
+ short * theItem,
+ long * magicCookie);
+
+EXTERN_API( void )
+FTSetupItem (short procID,
+ const void * theConfig,
+ short count,
+ DialogPtr theDialog,
+ short * theItem,
+ long * magicCookie);
+
+EXTERN_API( void )
+FTSetupXCleanup (short procID,
+ const void * theConfig,
+ short count,
+ DialogPtr theDialog,
+ Boolean OKed,
+ long * magicCookie);
+
+EXTERN_API( void )
+FTSetupPostflight (short procID);
+
+EXTERN_API( Ptr )
+FTGetConfig (FTHandle hFT);
+
+EXTERN_API( short )
+FTSetConfig (FTHandle hFT,
+ const void * thePtr);
+
+EXTERN_API( FTErr )
+FTIntlToEnglish (FTHandle hFT,
+ const void * inputPtr,
+ Ptr * outputPtr,
+ short language);
+
+EXTERN_API( FTErr )
+FTEnglishToIntl (FTHandle hFT,
+ const void * inputPtr,
+ Ptr * outputPtr,
+ short language);
+
+EXTERN_API( void )
+FTGetToolName (short procID,
+ Str255 name);
+
+EXTERN_API( short )
+FTGetProcID (ConstStr255Param name);
+
+EXTERN_API( void )
+FTSetRefCon (FTHandle hFT,
+ long refCon);
+
+EXTERN_API( long )
+FTGetRefCon (FTHandle hFT);
+
+EXTERN_API( void )
+FTSetUserData (FTHandle hFT,
+ long userData);
+
+EXTERN_API( long )
+FTGetUserData (FTHandle hFT);
+
+EXTERN_API( void )
+FTGetErrorString (FTHandle hFT,
+ short id,
+ Str255 errMsg);
+
+/*
+ These Async routines were added to InterfaceLib in System 7.5
+*/
+EXTERN_API( FTErr )
+FTSendAsync (FTHandle hFT,
+ short numFiles,
+ FSSpecArrayPtr pFSSpec,
+ FileTransferNotificationUPP notifyProc);
+
+EXTERN_API( FTErr )
+FTReceiveAsync (FTHandle hFT,
+ FSSpecPtr pFSSpec,
+ FileTransferNotificationUPP notifyProc);
+
+EXTERN_API( FTErr )
+FTCompletionAsync (FTHandle hFT,
+ FTCompletionKind completionCall);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __FILETRANSFERS__ */
+
diff --git a/include/qt/FileTypesAndCreators.h b/include/qt/FileTypesAndCreators.h
new file mode 100644
index 000000000..3362ec7de
--- /dev/null
+++ b/include/qt/FileTypesAndCreators.h
@@ -0,0 +1,684 @@
+/*
+ File: FileTypesAndCreators.h
+
+ Contains: Symbolic constants for FileTypes and signatures of popular documents.
+
+ Version: Technology: Macintosh Easy Open 1.1
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1992-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __FILETYPESANDCREATORS__
+#define __FILETYPESANDCREATORS__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*
+
+Motivation for FileTypesAndCreators.h
+
+ The TranslationMgr (Macintosh Easy Open) uses "FileTypes" to express and manage
+ translation capabilities. This works well for most Macintosh applications. It
+ simply uses the file type stored in the catalog info by HFS. But, the TranslationMgr
+ needs to work with non-Macintosh files. These do not have file types (or creators).
+ Another problem is some Macintosh applications keep the same file type for a file
+ after changing the file format from one version to the next. Thus, the HFS file type
+ cannot be used to distinguish between formats.
+
+ This file is an effort to define FileTypes and creator codes for non-Macintosh file
+ formats and define FileTypes that distinguish between formats.
+
+
+There are two main categories of constants defined in FileTypesAndCreators.h. One is
+creator signatures of applications the other is file types. To make this easier to use,
+some style guidelines are provided.
+
+Creators:
+
+ The symbolic constant for all creator codes begin with "sig". Following "sig" is the
+ application name. Example:
+
+ sigSurfWriter = 'SURF'
+
+ If the application name is localized for different markets, the name of the U.S.
+ version is always used. It is optional to make symbolic constants for localized names.
+ If a U.S. is not available, another Roman name is used (this is for ease of editing
+ in MPW.) Example:
+
+ sigSurfWriter = 'SURF',
+ sigSkiWriter = 'SURF' // optional definition of Canadian name of app
+
+ If multiple versions of an application exist, and the creator codes are different,
+ then the version number is added to the end of the symbolic name, for the first version
+ in which the signature changed. Example:
+
+ sigDirtWriter = 'DIRT', // version 1 and 2 used same signature
+ sigDirtWriter3 = 'DRT3'
+
+ If a developer has the same application on another platform as is on the Mac, then the
+ creator for a file from the other platform should be the same as the creator of the
+ Macintosh application. Example:
+
+ sigMicrosoftWord = 'MSWD' // used for Mac and Windows documents
+
+ If there is no similar Macintosh product, then the signature of the platform is used.
+ Example:
+
+ sigPCDOS = 'mdos', // for DOS and Windows
+ sigAppleProDos = 'pdos'
+
+
+FileTypes:
+
+ The symbolic constant for all file types begin with "ft". Following "ft" is the ideal
+ kind for that document. Example:
+
+ ftSurfWriterDocument = 'SRFD'
+
+ If the application name is localized for different markets, the kind string of the U.S.
+ version is always used. It is optional to make symbolic constants for localized kind
+ strings. If a U.S. is not available, another Roman kind string is used (this is for
+ ease of editing in MPW.) Example:
+
+ ftSurfWriterDocument = 'SRFD,
+ ftSkiWriterDocument = 'SRFD' // optional Canadian name
+
+ If multiple versions of an application exist, and the document for files created by each
+ are different (meaning one version of the app can not read the documents of a newer
+ version), then the version number is added to the end of the symbolic name, for the
+ first version in which the format changed. Example:
+
+ // version 1 and 2 docs have same format, version 3 has a different format
+ ftDirtWriterDocument = 'DDRT',
+ ftDirtWriter3Document = '3DRT'
+
+ If multiple versions of an application exist, and the document for files created by each
+ are different, but the catInfo file type has always been the same, then constants are
+ made for each unique format and one is made for the catInfo type actually used.
+
+ ftWordDocument = 'WDBN',
+ ftWord3Document = 'WDB3',
+ ftWord4Document = 'WDB4',
+ ftWord5Document = 'WDB5'
+
+ If a developer has the same application on another platform as is on the Mac and the file
+ formats are the same (binary interchangeable), then the file type for a file from the other
+ platform should be the same as the file type of the Macintosh document. Example:
+
+ ftPageMakerPublication = 'ALB4' // used for Mac and PC documents
+
+ If there is no similar Macintosh document format, then a file type is made up. If the
+ program is used on two different non-Mac platforms and their file formats are not the
+ same, the platform name is added to the name. Typically after the program name and before
+ document. Example:
+
+ ftXyWriteIIIDocument = 'XyWr' // XyWriteIII only has a PC format
+ ftSurfWindowsDocument = 'SRFW' // Surf Windows file format
+ ftSurfPCDocument = 'SRFP' // Surf PC file format
+*/
+
+/************** Macintosh applications and FileTypes **************/
+
+enum {
+ /* Mac word processors */
+ sigWord = FOUR_CHAR_CODE('MSWD'),
+ ftWord3Document = FOUR_CHAR_CODE('MSW3'),
+ ftWord4Document = FOUR_CHAR_CODE('MSW4'),
+ ftWord5Document = FOUR_CHAR_CODE('MSW5'),
+ ftWordDocument = FOUR_CHAR_CODE('WDBN'),
+ ftWordDocumentPC = FOUR_CHAR_CODE('MWPC'), /* not registered */
+ ftWord1DocumentWindows = FOUR_CHAR_CODE('WW1 '), /* not registered */
+ ftWord2DocumentWindows = FOUR_CHAR_CODE('WW2 '), /* not registered */
+ ftRTFDocument = FOUR_CHAR_CODE('RTF '), /* not registered */
+ sigWordPerfect = FOUR_CHAR_CODE('SSIW'),
+ ftWordPerfectDocument = FOUR_CHAR_CODE('WPD0'),
+ sigWordPerfect2 = FOUR_CHAR_CODE('WPC2'),
+ ftWordPerfect2Document = FOUR_CHAR_CODE('WPD1'),
+ ftWordPerfect21Document = FOUR_CHAR_CODE('WPD2'),
+ ftWordPerfect42DocumentPC = FOUR_CHAR_CODE('.WP4'), /* not registered */
+ ftWordPerfect50DocumentPC = FOUR_CHAR_CODE('.WP5'), /* not registered */
+ ftWordPerfect51DocumentPC = FOUR_CHAR_CODE('WP51'), /* not registered */
+ ftWordPerfectGraphicsPC = FOUR_CHAR_CODE('WPGf'), /* not registered */
+ sigMacWriteII = FOUR_CHAR_CODE('MWII'),
+ ftMacWriteIIDocument = FOUR_CHAR_CODE('MW2D'),
+ sigWriteNow = FOUR_CHAR_CODE('nX^n'),
+ ftWriteNow2Document = FOUR_CHAR_CODE('nX^d'),
+ ftWriteNow3Document = FOUR_CHAR_CODE('nX^2'),
+ sigMacWrite = FOUR_CHAR_CODE('MACA'),
+ ftMacWrite5Document = FOUR_CHAR_CODE('WORD'),
+ sigFrameMaker = FOUR_CHAR_CODE('Fram'),
+ ftFrameMakerDocument = FOUR_CHAR_CODE('FASL'),
+ ftFrameMakerMIFDocument = FOUR_CHAR_CODE('MIF '),
+ ftFrameMakerMIF2Document = FOUR_CHAR_CODE('MIF2'),
+ ftFrameMakerMIF3Document = FOUR_CHAR_CODE('MIF3'),
+ sigMSWrite = FOUR_CHAR_CODE('MSWT'),
+ sigActa = FOUR_CHAR_CODE('ACTA'),
+ sigTHINKPascal = FOUR_CHAR_CODE('PJMM'),
+ sigTHINKC = FOUR_CHAR_CODE('KAHL'),
+ sigFullWrite = FOUR_CHAR_CODE('FWRT'),
+ sigTeachText = FOUR_CHAR_CODE('ttxt'),
+ ftTeachTextDocument = FOUR_CHAR_CODE('ttro'),
+ sigSimpleText = FOUR_CHAR_CODE('ttxt'),
+ ftSimpleTextDocument = FOUR_CHAR_CODE('ttro'),
+ sigMPWShell = FOUR_CHAR_CODE('MPS '),
+ sigQuarkXPress = FOUR_CHAR_CODE('XPR3'),
+ sigNisus = FOUR_CHAR_CODE('NISI'),
+ sigOmniPage = FOUR_CHAR_CODE('PRTC'),
+ sigPersonalPress = FOUR_CHAR_CODE('SCPG'),
+ sigPublishItEZ = FOUR_CHAR_CODE('2CTY'),
+ sigReadySetGo = FOUR_CHAR_CODE('MEMR'),
+ sigRagTime = FOUR_CHAR_CODE('R#+A'),
+ sigLetraStudio = FOUR_CHAR_CODE('LSTP'),
+ sigLetterPerfect = FOUR_CHAR_CODE('WPCI'),
+ sigTheWritingCenter = 0x0A1A5750, /* this 'unprintable unprintable WP' One of the unprintables is a line feed. */
+ sigInstantUpdate = FOUR_CHAR_CODE('IUA0')
+};
+
+enum {
+ /* databases */
+ sig4thDimension = FOUR_CHAR_CODE('4D03'),
+ ft4thDimensionDB = FOUR_CHAR_CODE('BAS3'),
+ sigFileMakerPro = FOUR_CHAR_CODE('FMPR'),
+ ftFileMakerProDatabase = FOUR_CHAR_CODE('FMPR'),
+ sigHyperCard = FOUR_CHAR_CODE('WILD'),
+ ftHyperCard = FOUR_CHAR_CODE('STAK'),
+ sigSmartFormAsst = FOUR_CHAR_CODE('KCFM'),
+ ftSmartFormAsst = FOUR_CHAR_CODE('STCK'),
+ sigSmartFormDesign = FOUR_CHAR_CODE('KCFD'),
+ ftSmartFormDesign = FOUR_CHAR_CODE('CFRM'),
+ sigFileForce = FOUR_CHAR_CODE('4D93'),
+ ftFileForceDatabase = FOUR_CHAR_CODE('FIL3'),
+ sigFileMaker2 = FOUR_CHAR_CODE('FMK4'),
+ ftFileMaker2Database = FOUR_CHAR_CODE('FMK$'),
+ sigSuperCard = FOUR_CHAR_CODE('RUNT'),
+ sigDoubleHelix = FOUR_CHAR_CODE('HELX'),
+ sigGeoQuery = FOUR_CHAR_CODE('RGgq'),
+ sigFoxBASE = FOUR_CHAR_CODE('FOX+'),
+ sigINSPIRATION = FOUR_CHAR_CODE('CER3'),
+ sigPanorama = FOUR_CHAR_CODE('KAS1'),
+ sigSilverrunLDM = FOUR_CHAR_CODE('CDML'),
+ sigSilverrunDFD = FOUR_CHAR_CODE('CDDF'), /* finance */
+ sigQuicken = FOUR_CHAR_CODE('INTU'),
+ sigMacInTax91 = FOUR_CHAR_CODE('MIT1'),
+ ftMacInTax91 = FOUR_CHAR_CODE('MITF'),
+ sigAccountantInc = FOUR_CHAR_CODE('APRO'),
+ sigAtOnce = FOUR_CHAR_CODE('KISS'),
+ sigCAT3 = FOUR_CHAR_CODE('tCat'),
+ sigDollarsNSense = FOUR_CHAR_CODE('EAGP'),
+ sigInsightExpert = FOUR_CHAR_CODE('LSGL'),
+ sigMYOB = FOUR_CHAR_CODE('MYOB'),
+ sigMacMoney = FOUR_CHAR_CODE('SSLA'),
+ sigManagingYourMoney = FOUR_CHAR_CODE('MYMC'),
+ sigPlainsAndSimple = FOUR_CHAR_CODE('PEGG'), /* scheduling */
+ sigMacProject2 = FOUR_CHAR_CODE('MPRX'),
+ ftMacProject = FOUR_CHAR_CODE('MPRD'),
+ sigMSProject = FOUR_CHAR_CODE('MSPJ'),
+ sigMacProjectPro = FOUR_CHAR_CODE('MPRP'), /* utilities */
+ sigStuffIt = FOUR_CHAR_CODE('SIT!'),
+ ftStuffItArchive = FOUR_CHAR_CODE('SIT!'),
+ sigCompactPro = FOUR_CHAR_CODE('CPCT'),
+ ftCompactProArchive = FOUR_CHAR_CODE('PACT'),
+ sigFontographer = FOUR_CHAR_CODE('aCa2'),
+ sigMetamorphosis = FOUR_CHAR_CODE('MEtP'),
+ sigCorrectGrammar = FOUR_CHAR_CODE('LsCG'),
+ sigDynodex = FOUR_CHAR_CODE('DYNO'),
+ sigMariah = FOUR_CHAR_CODE('MarH'),
+ sigAddressBook = FOUR_CHAR_CODE('AdBk'),
+ sigThePrintShop = FOUR_CHAR_CODE('PSHP'),
+ sigQuicKeys2 = FOUR_CHAR_CODE('Qky2'),
+ sigReadStar2Plus = FOUR_CHAR_CODE('INOV'),
+ sigSoftPC = FOUR_CHAR_CODE('PCXT'),
+ sigMacMenlo = FOUR_CHAR_CODE('MNLO'),
+ sigDisinfectant = FOUR_CHAR_CODE('D2CT'), /* communications */
+ sigSmartcom2 = FOUR_CHAR_CODE('SCOM'),
+ sigVersaTermPRO = FOUR_CHAR_CODE('VPRO'),
+ sigVersaTerm = FOUR_CHAR_CODE('VATM'),
+ sigWhiteKnight = FOUR_CHAR_CODE('WK11'),
+ sigNCSATelnet = FOUR_CHAR_CODE('NCSA'),
+ sigDynaComm = FOUR_CHAR_CODE('PAR2'),
+ sigQMForms = FOUR_CHAR_CODE('MLTM'), /* math and statistics */
+ sigMathematica = FOUR_CHAR_CODE('OMEG'),
+ sigMathCAD = FOUR_CHAR_CODE('MCAD'),
+ sigStatView2 = FOUR_CHAR_CODE('STAT'),
+ sigDataDesk = FOUR_CHAR_CODE('DDSK'),
+ sigPowerMath2 = FOUR_CHAR_CODE('MATH'),
+ sigSuperANOVA = FOUR_CHAR_CODE('SupA'),
+ sigSystat = FOUR_CHAR_CODE('SYT1'),
+ sigTheorist = FOUR_CHAR_CODE('Theo')
+};
+
+enum {
+ /* spreadsheets */
+ sigExcel = FOUR_CHAR_CODE('XCEL'),
+ ftExcel2Spreadsheet = FOUR_CHAR_CODE('XLS '),
+ ftExcel2Macro = FOUR_CHAR_CODE('XLM '),
+ ftExcel2Chart = FOUR_CHAR_CODE('XLC '),
+ ftExcel3Spreadsheet = FOUR_CHAR_CODE('XLS3'),
+ ftExcel3Macro = FOUR_CHAR_CODE('XLM3'),
+ ftExcel3Chart = FOUR_CHAR_CODE('XLC3'),
+ ftExcel4Spreadsheet = FOUR_CHAR_CODE('XLS4'),
+ ftExcel4Macro = FOUR_CHAR_CODE('XLM4'),
+ ftSYLKSpreadsheet = FOUR_CHAR_CODE('SYLK'),
+ sigLotus123 = FOUR_CHAR_CODE('L123'),
+ ft123Spreadsheet = FOUR_CHAR_CODE('LWKS'),
+ sigWingz = FOUR_CHAR_CODE('WNGZ'),
+ ftWingzSpreadsheet = FOUR_CHAR_CODE('WZSS'),
+ ftWingzScript = FOUR_CHAR_CODE('WZSC'),
+ sigResolve = FOUR_CHAR_CODE('Rslv'),
+ ftResolve = FOUR_CHAR_CODE('RsWs'),
+ ftResolveScript = FOUR_CHAR_CODE('RsWc'),
+ sigFullImpact2 = FOUR_CHAR_CODE('Flv2')
+};
+
+enum {
+ /* graphics */
+ sigIllustrator = FOUR_CHAR_CODE('ART3'),
+ ftPostScriptMac = FOUR_CHAR_CODE('EPSF'),
+ sigMacPaint = FOUR_CHAR_CODE('MPNT'),
+ ftMacPaintGraphic = FOUR_CHAR_CODE('PNTG'),
+ sigSuperPaint = FOUR_CHAR_CODE('SPNT'),
+ ftSuperPaintGraphic = FOUR_CHAR_CODE('SPTG'),
+ sigCanvas = FOUR_CHAR_CODE('DAD2'),
+ ftCanvasGraphic = FOUR_CHAR_CODE('drw2'),
+ sigUltraPaint = FOUR_CHAR_CODE('ULTR'),
+ ftUltraPaint = FOUR_CHAR_CODE('UPNT'),
+ sigPhotoshop = FOUR_CHAR_CODE('8BIM'),
+ ftPhotoshopGraphic = FOUR_CHAR_CODE('8BIM'),
+ sigMacDrawPro = FOUR_CHAR_CODE('dPro'),
+ ftMacDrawProDrawing = FOUR_CHAR_CODE('dDoc'),
+ sigPageMaker = FOUR_CHAR_CODE('ALD4'),
+ ftPageMakerPublication = FOUR_CHAR_CODE('ALB4'),
+ sigFreeHand = FOUR_CHAR_CODE('FHA3'),
+ ftFreeHandDrawing = FOUR_CHAR_CODE('FHD3'),
+ sigClarisCAD = FOUR_CHAR_CODE('CCAD'),
+ ftClarisCAD = FOUR_CHAR_CODE('CAD2'),
+ sigMacDrawII = FOUR_CHAR_CODE('MDPL'),
+ ftMacDrawIIDrawing = FOUR_CHAR_CODE('DRWG'),
+ sigMacroMindDirector = FOUR_CHAR_CODE('MMDR'),
+ ftMMDirectorMovie = FOUR_CHAR_CODE('VWMD'),
+ ftMMDirectorSound = FOUR_CHAR_CODE('MMSD'),
+ sigOptix = FOUR_CHAR_CODE('PIXL'), /* was previously PixelPerfect */
+ sigPixelPaint = FOUR_CHAR_CODE('PIXR'),
+ ftPixelPaint = FOUR_CHAR_CODE('PX01'),
+ sigAldusSuper3D = FOUR_CHAR_CODE('SP3D'),
+ ftSuper3DDrawing = FOUR_CHAR_CODE('3DBX'),
+ sigSwivel3D = FOUR_CHAR_CODE('SWVL'),
+ ftSwivel3DDrawing = FOUR_CHAR_CODE('SMDL'),
+ sigCricketDraw = FOUR_CHAR_CODE('CRDW'),
+ ftCricketDrawing = FOUR_CHAR_CODE('CKDT'),
+ sigCricketGraph = FOUR_CHAR_CODE('CGRF'),
+ ftCricketChart = FOUR_CHAR_CODE('CGPC'),
+ sigDesignCAD = FOUR_CHAR_CODE('ASBC'),
+ ftDesignCADDrawing = FOUR_CHAR_CODE('DCAD'),
+ sigImageStudio = FOUR_CHAR_CODE('FSPE'),
+ ftImageStudioGraphic = FOUR_CHAR_CODE('RIFF'),
+ sigVersaCad = FOUR_CHAR_CODE('VCAD'),
+ ftVersaCADDrawing = FOUR_CHAR_CODE('2D '),
+ sigAdobePremier = FOUR_CHAR_CODE('PrMr'),
+ ftAdobePremierMovie = FOUR_CHAR_CODE('MooV'),
+ sigAfterDark = FOUR_CHAR_CODE('ADrk'),
+ ftAfterDarkModule = FOUR_CHAR_CODE('ADgm'),
+ sigClip3D = FOUR_CHAR_CODE('EZ3E'),
+ ftClip3Dgraphic = FOUR_CHAR_CODE('EZ3D'),
+ sigKaleidaGraph = FOUR_CHAR_CODE('QKPT'),
+ ftKaleidaGraphGraphic = FOUR_CHAR_CODE('QPCT'),
+ sigMacFlow = FOUR_CHAR_CODE('MCFL'),
+ ftMacFlowChart = FOUR_CHAR_CODE('FLCH'),
+ sigMoviePlayer = FOUR_CHAR_CODE('TVOD'),
+ ftMoviePlayerMovie = FOUR_CHAR_CODE('MooV'),
+ sigMacSpin = FOUR_CHAR_CODE('D2SP'),
+ ftMacSpinDataSet = FOUR_CHAR_CODE('D2BN'),
+ sigAutoCAD = FOUR_CHAR_CODE('ACAD'),
+ sigLabVIEW = FOUR_CHAR_CODE('LBVW'),
+ sigColorMacCheese = FOUR_CHAR_CODE('CMCÆ'),
+ sigMiniCad = FOUR_CHAR_CODE('CDP3'),
+ sigDreams = FOUR_CHAR_CODE('PHNX'),
+ sigOmnis5 = FOUR_CHAR_CODE('Q2$$'),
+ sigPhotoMac = FOUR_CHAR_CODE('PMAC'),
+ sigGraphMaster = FOUR_CHAR_CODE('GRAM'),
+ sigInfiniD = FOUR_CHAR_CODE('SI°D'),
+ sigOfoto = FOUR_CHAR_CODE('APLS'),
+ sigMacDraw = FOUR_CHAR_CODE('MDRW'),
+ sigDeltagraphPro = FOUR_CHAR_CODE('DGRH'),
+ sigDesign2 = FOUR_CHAR_CODE('DESG'),
+ sigDesignStudio = FOUR_CHAR_CODE('MRJN'),
+ sigDynaperspective = FOUR_CHAR_CODE('PERS'),
+ sigGenericCADD = FOUR_CHAR_CODE('CAD3'),
+ sigMacDraft = FOUR_CHAR_CODE('MD20'),
+ sigModelShop = FOUR_CHAR_CODE('MDSP'),
+ sigOasis = FOUR_CHAR_CODE('TAOA'),
+ sigOBJECTMASTER = FOUR_CHAR_CODE('BROW'),
+ sigMovieRecorder = FOUR_CHAR_CODE('mrcr'),
+ sigPictureCompressor = FOUR_CHAR_CODE('ppxi'),
+ sigPICTViewer = FOUR_CHAR_CODE('MDTS'),
+ sigSmoothie = FOUR_CHAR_CODE('Smoo'),
+ sigScreenPlay = FOUR_CHAR_CODE('SPLY'),
+ sigStudio1 = FOUR_CHAR_CODE('ST/1'),
+ sigStudio32 = FOUR_CHAR_CODE('ST32'),
+ sigStudio8 = FOUR_CHAR_CODE('ST/8'),
+ sigKidPix = FOUR_CHAR_CODE('Kid2'),
+ sigDigDarkroom = FOUR_CHAR_CODE('DIDR')
+};
+
+enum {
+ /* presentations */
+ sigMore = FOUR_CHAR_CODE('MOR2'),
+ ftMore3Document = FOUR_CHAR_CODE('MOR3'),
+ ftMore2Document = FOUR_CHAR_CODE('MOR2'),
+ sigPersuasion = FOUR_CHAR_CODE('PLP2'),
+ ftPersuasion1Presentation = FOUR_CHAR_CODE('PRS1'),
+ ftPersuasion2Presentation = FOUR_CHAR_CODE('PRS2'),
+ sigPowerPoint = FOUR_CHAR_CODE('PPNT'),
+ ftPowerPointPresentation = FOUR_CHAR_CODE('SLDS'),
+ sigCricketPresents = FOUR_CHAR_CODE('CRPR'),
+ ftCricketPresentation = FOUR_CHAR_CODE('PRDF'), /* works */
+ sigMSWorks = FOUR_CHAR_CODE('PSI2'),
+ sigMSWorks3 = FOUR_CHAR_CODE('MSWK'),
+ ftMSWorksWordProcessor = FOUR_CHAR_CODE('AWWP'),
+ ftMSWorksSpreadsheet = FOUR_CHAR_CODE('AWSS'),
+ ftMSWorksDataBase = FOUR_CHAR_CODE('AWDB'),
+ ftMSWorksComm = FOUR_CHAR_CODE('AWDC'),
+ ftMSWorksMacros = FOUR_CHAR_CODE('AWMC'),
+ ftMSWorks1WordProcessor = FOUR_CHAR_CODE('AWW1'), /* not registered */
+ ftMSWorks1Spreadsheet = FOUR_CHAR_CODE('AWS1'), /* not registered */
+ ftMSWorks1DataBase = FOUR_CHAR_CODE('AWD1'), /* not registered */
+ ftMSWorks2WordProcessor = FOUR_CHAR_CODE('AWW2'), /* not registered */
+ ftMSWorks2Spreadsheet = FOUR_CHAR_CODE('AWS2'), /* not registered */
+ ftMSWorks2DataBase = FOUR_CHAR_CODE('AWD2'), /* not registered */
+ ftMSWorks3WordProcessor = FOUR_CHAR_CODE('AWW3'), /* not registered */
+ ftMSWorks3Spreadsheet = FOUR_CHAR_CODE('AWS3'), /* not registered */
+ ftMSWorks3DataBase = FOUR_CHAR_CODE('AWD3'), /* not registered */
+ ftMSWorks3Comm = FOUR_CHAR_CODE('AWC3'), /* not registered */
+ ftMSWorks3Macro = FOUR_CHAR_CODE('AWM3'), /* not registered */
+ ftMSWorks3Draw = FOUR_CHAR_CODE('AWR3'), /* not registered */
+ ftMSWorks2WordProcessorPC = FOUR_CHAR_CODE('PWW2'), /* not registered */
+ ftMSWorks2DatabasePC = FOUR_CHAR_CODE('PWDB'), /* not registered */
+ sigGreatWorks = FOUR_CHAR_CODE('ZEBR'),
+ ftGreatWorksWordProcessor = FOUR_CHAR_CODE('ZWRT'),
+ ftGreatWorksSpreadsheet = FOUR_CHAR_CODE('ZCAL'),
+ ftGreatWorksPaint = FOUR_CHAR_CODE('ZPNT'),
+ sigClarisWorks = FOUR_CHAR_CODE('BOBO'),
+ ftClarisWorksWordProcessor = FOUR_CHAR_CODE('CWWP'),
+ ftClarisWorksSpreadsheet = FOUR_CHAR_CODE('CWSS'),
+ ftClarisWorksGraphics = FOUR_CHAR_CODE('CWGR'),
+ sigBeagleWorks = FOUR_CHAR_CODE('BWks'),
+ ftBeagleWorksWordProcessor = FOUR_CHAR_CODE('BWwp'),
+ ftBeagleWorksDatabase = FOUR_CHAR_CODE('BWdb'),
+ ftBeagleWorksSpreadsheet = FOUR_CHAR_CODE('BWss'),
+ ftBeagleWorksComm = FOUR_CHAR_CODE('BWcm'),
+ ftBeagleWorksDrawing = FOUR_CHAR_CODE('BWdr'),
+ ftBeagleWorksGraphic = FOUR_CHAR_CODE('BWpt'),
+ ftPICTFile = FOUR_CHAR_CODE('PICT')
+};
+
+enum {
+ /* entertainment */
+ sigPGATourGolf = FOUR_CHAR_CODE('gOLF'),
+ sigSimCity = FOUR_CHAR_CODE('MCRP'),
+ sigHellCats = FOUR_CHAR_CODE('HELL'), /* education */
+ sigReaderRabbit3 = FOUR_CHAR_CODE('RDR3'), /* Translation applications */
+ sigDataVizDesktop = FOUR_CHAR_CODE('DVDT'),
+ sigSotwareBridge = FOUR_CHAR_CODE('mdos'),
+ sigWordForWord = FOUR_CHAR_CODE('MSTR'),
+ sigAppleFileExchange = FOUR_CHAR_CODE('PSPT'), /* Apple software */
+ sigAppleLink = FOUR_CHAR_CODE('GEOL'),
+ ftAppleLinkAddressBook = FOUR_CHAR_CODE('ADRS'),
+ ftAppleLinkImageFile = FOUR_CHAR_CODE('SIMA'),
+ ftAppleLinkPackage = FOUR_CHAR_CODE('HBSF'),
+ ftAppleLinkConnFile = FOUR_CHAR_CODE('PETE'),
+ ftAppleLinkHelp = FOUR_CHAR_CODE('HLPF'),
+ sigInstaller = FOUR_CHAR_CODE('bjbc'),
+ ftInstallerScript = FOUR_CHAR_CODE('bjbc'),
+ sigDiskCopy = FOUR_CHAR_CODE('dCpy'),
+ ftDiskCopyImage = FOUR_CHAR_CODE('dImg'),
+ sigResEdit = FOUR_CHAR_CODE('RSED'),
+ ftResEditResourceFile = FOUR_CHAR_CODE('rsrc'),
+ sigAardvark = FOUR_CHAR_CODE('AARD'),
+ sigCompatibilityChkr = FOUR_CHAR_CODE('wkrp'),
+ sigMacTerminal = FOUR_CHAR_CODE('Term'),
+ sigSADE = FOUR_CHAR_CODE('sade'),
+ sigCurare = FOUR_CHAR_CODE('Cura'),
+ sigPCXChange = FOUR_CHAR_CODE('dosa'),
+ sigAtEase = FOUR_CHAR_CODE('mfdr'),
+ sigStockItToMe = FOUR_CHAR_CODE('SITM'),
+ sigAppleSearch = FOUR_CHAR_CODE('asis'),
+ sigAppleSearchToo = FOUR_CHAR_CODE('hobs'), /* the following are files types for system files */
+ ftScriptSystemResourceCollection = FOUR_CHAR_CODE('ifil'),
+ ftSoundFile = FOUR_CHAR_CODE('sfil'),
+ ftFontFile = FOUR_CHAR_CODE('ffil'),
+ ftTrueTypeFontFile = FOUR_CHAR_CODE('tfil'),
+ ftKeyboardLayout = FOUR_CHAR_CODE('kfil'),
+ ftFontSuitcase = FOUR_CHAR_CODE('FFIL'),
+ ftDASuitcase = FOUR_CHAR_CODE('DFIL'),
+ ftSystemExtension = FOUR_CHAR_CODE('INIT'),
+ ftDAMQueryDocument = FOUR_CHAR_CODE('qery')
+};
+
+
+
+/************** Special FileTypes and creators **************/
+enum {
+ ftApplicationName = FOUR_CHAR_CODE('apnm'), /* this is the type used to define the application name in a kind resource */
+ sigIndustryStandard = FOUR_CHAR_CODE('istd'), /* this is the creator used to define a kind string in a kind resource for a FileType that has many creators */
+ ftXTND13TextImport = FOUR_CHAR_CODE('xt13') /* this is a pseduo-format used by "XTND for Apps". The taDstIsAppTranslation bit is set */
+};
+
+
+/************** Apple][ applications and FileTypes **************/
+enum {
+ sigAppleProDOS = FOUR_CHAR_CODE('pdos'), /* not registered */
+ ftAppleWorksWordProcessor = FOUR_CHAR_CODE('1A '), /* not registered */
+ ftAppleWorks1WordProcessor = FOUR_CHAR_CODE('1A1 '), /* not registered */
+ ftAppleWorks2WordProcessor = FOUR_CHAR_CODE('1A2 '), /* not registered */
+ ftAppleWorks3WordProcessor = FOUR_CHAR_CODE('1A3 '), /* not registered */
+ ftAppleWorksDataBase = FOUR_CHAR_CODE('19 '), /* not registered */
+ ftAppleWorks1DataBase = FOUR_CHAR_CODE('191 '), /* not registered */
+ ftAppleWorks2DataBase = FOUR_CHAR_CODE('192 '), /* not registered */
+ ftAppleWorks3DataBase = FOUR_CHAR_CODE('193 '), /* not registered */
+ ftAppleWorksSpreadsheet = FOUR_CHAR_CODE('1B '), /* not registered */
+ ftAppleWorks1Spreadsheet = FOUR_CHAR_CODE('1B1 '), /* not registered */
+ ftAppleWorks2Spreadsheet = FOUR_CHAR_CODE('1B2 '), /* not registered */
+ ftAppleWorks3Spreadsheet = FOUR_CHAR_CODE('1B3 '), /* not registered */
+ ftAppleWorksWordProcessorGS = FOUR_CHAR_CODE('50 '), /* not registered */
+ ftApple2GS_SuperHiRes = FOUR_CHAR_CODE('A2SU'), /* not registered */
+ ftApple2GS_SuperHiResPacked = FOUR_CHAR_CODE('A2SP'), /* not registered */
+ ftApple2GS_PaintWorks = FOUR_CHAR_CODE('A2PW'), /* not registered */
+ ftApple2_DoubleHiRes = FOUR_CHAR_CODE('A2DU'), /* not registered */
+ ftApple2_DoubleHiResPacked = FOUR_CHAR_CODE('A2DP'), /* not registered */
+ ftApple2_DoubleHiRes16colors = FOUR_CHAR_CODE('A2DC'), /* not registered */
+ ftApple2_SingleHiRes = FOUR_CHAR_CODE('A2HU'), /* not registered */
+ ftApple2_SingleHiResPacked = FOUR_CHAR_CODE('A2HP'), /* not registered */
+ ftApple2_SingleHiRes8colors = FOUR_CHAR_CODE('A2HC') /* not registered */
+};
+
+
+/************** PC-DOS applications and FileTypes **************/
+enum {
+ sigPCDOS = FOUR_CHAR_CODE('mdos'), /* not registered */
+ ftGenericDocumentPC = FOUR_CHAR_CODE('TEXT'), /* word processor formats */
+ ftWordStarDocumentPC = FOUR_CHAR_CODE('WStr'), /* not registered */
+ ftWordStar4DocumentPC = FOUR_CHAR_CODE('WSt4'), /* not registered */
+ ftWordStar5DocumentPC = FOUR_CHAR_CODE('WSt5'), /* not registered */
+ ftWordStar55DocumentPC = FOUR_CHAR_CODE('WS55'), /* not registered */
+ ftWordStar6DocumentPC = FOUR_CHAR_CODE('WSt6'), /* not registered */
+ ftWordStar2000DocumentPC = FOUR_CHAR_CODE('WS20'), /* not registered */
+ ftXyWriteIIIDocumentPC = FOUR_CHAR_CODE('XyWr'), /* registered??? */
+ ftDecDXDocumentPC = FOUR_CHAR_CODE('DX '), /* registered??? */
+ ftDecWPSPlusDocumentPC = FOUR_CHAR_CODE('WPS+'), /* registered??? */
+ ftDisplayWrite3DocumentPC = FOUR_CHAR_CODE('DW3 '), /* registered??? */
+ ftDisplayWrite4DocumentPC = FOUR_CHAR_CODE('DW4 '), /* registered??? */
+ ftDisplayWrite5DocumentPC = FOUR_CHAR_CODE('DW5 '), /* registered??? */
+ ftIBMWritingAsstDocumentPC = FOUR_CHAR_CODE('ASST'), /* registered??? */
+ ftManuscript1DocumentPC = FOUR_CHAR_CODE('MAN1'), /* registered??? */
+ ftManuscript2DocumentPC = FOUR_CHAR_CODE('MAN2'), /* registered??? */
+ ftMass11PCDocumentPC = FOUR_CHAR_CODE('M11P'), /* registered??? */
+ ftMass11VaxDocumentPC = FOUR_CHAR_CODE('M11V'), /* registered??? */
+ ftMultiMateDocumentPC = FOUR_CHAR_CODE('MMAT'), /* registered??? */
+ ftMultiMate36DocumentPC = FOUR_CHAR_CODE('MM36'), /* registered??? */
+ ftMultiMate40DocumentPC = FOUR_CHAR_CODE('MM40'), /* registered??? */
+ ftMultiMateAdvDocumentPC = FOUR_CHAR_CODE('MMAD'), /* registered??? */
+ ftMultiMateNoteDocumentPC = FOUR_CHAR_CODE('MMNT'), /* registered??? */
+ ftOfficeWriterDocumentPC = FOUR_CHAR_CODE('OFFW'), /* registered??? */
+ ftPCFileLetterDocumentPC = FOUR_CHAR_CODE('PCFL'), /* registered??? */
+ ftPFSWriteADocumentPC = FOUR_CHAR_CODE('PFSA'), /* registered??? */
+ ftPFSWriteBDocumentPC = FOUR_CHAR_CODE('PFSB'), /* registered??? */
+ ftPFSPlanDocumentPC = FOUR_CHAR_CODE('PFSP'), /* registered??? */
+ ftProWrite1DocumentPC = FOUR_CHAR_CODE('PW1 '), /* registered??? */
+ ftProWrite2DocumentPC = FOUR_CHAR_CODE('PW2 '), /* registered??? */
+ ftProWritePlusDocumentPC = FOUR_CHAR_CODE('PW+ '), /* registered??? */
+ ftFirstChoiceDocumentPC = FOUR_CHAR_CODE('FCH '), /* registered??? */
+ ftFirstChoice3DocumentPC = FOUR_CHAR_CODE('FCH3'), /* registered??? */
+ ftDCARFTDocumentPC = FOUR_CHAR_CODE('RFT '), /* registered??? */
+ ftSamnaDocumentPC = FOUR_CHAR_CODE('SAMN'), /* registered??? */
+ ftSmartDocumentPC = FOUR_CHAR_CODE('SMRT'), /* registered??? */
+ ftSprintDocumentPC = FOUR_CHAR_CODE('SPRT'), /* registered??? */
+ ftTotalWordDocumentPC = FOUR_CHAR_CODE('TOTL'), /* registered??? */
+ ftVolksWriterDocumentPC = FOUR_CHAR_CODE('VOLK'), /* registered??? */
+ ftWangWPSDocumentPC = FOUR_CHAR_CODE('WPS '), /* registered??? */
+ ftWordMarcDocumentPC = FOUR_CHAR_CODE('MARC'), /* registered??? */
+ ftAmiDocumentPC = FOUR_CHAR_CODE('AMI '), /* registered??? */
+ ftAmiProDocumentPC = FOUR_CHAR_CODE('APRO'), /* registered??? */
+ ftAmiPro2DocumentPC = FOUR_CHAR_CODE('APR2'), /* registered??? */
+ ftEnableDocumentPC = FOUR_CHAR_CODE('ENWP'), /* registered??? */
+ /* data base formats */
+ ftdBaseDatabasePC = FOUR_CHAR_CODE('DBF '), /* registered??? */
+ ftdBase3DatabasePC = FOUR_CHAR_CODE('DB3 '), /* registered??? */
+ ftdBase4DatabasePC = FOUR_CHAR_CODE('DB4 '), /* registered??? */
+ ftDataEaseDatabasePC = FOUR_CHAR_CODE('DTEZ'), /* registered??? */
+ ftFrameWorkIIIDatabasePC = FOUR_CHAR_CODE('FWK3'), /* registered??? */
+ ftRBaseVDatabasePC = FOUR_CHAR_CODE('RBsV'), /* registered??? */
+ ftRBase5000DatabasePC = FOUR_CHAR_CODE('RB50'), /* registered??? */
+ ftRBaseFile1DatabasePC = FOUR_CHAR_CODE('RBs1'), /* registered??? */
+ ftRBaseFile3DatabasePC = FOUR_CHAR_CODE('RBs3'), /* registered??? */
+ ftReflexDatabasePC = FOUR_CHAR_CODE('RFLX'), /* registered??? */
+ ftQAWriteDatabasePC = FOUR_CHAR_CODE('QAWT'), /* registered??? */
+ ftQADBaseDatabasePC = FOUR_CHAR_CODE('QADB'), /* registered??? */
+ ftSmartDataBasePC = FOUR_CHAR_CODE('SMTD'), /* registered??? */
+ ftFirstChoiceDataBasePC = FOUR_CHAR_CODE('FCDB') /* registered??? */
+};
+
+enum {
+ /* spread sheet formats */
+ ftDIFSpreadsheetPC = FOUR_CHAR_CODE('DIF '), /* registered??? */
+ ftEnableSpreadsheetPC = FOUR_CHAR_CODE('ENAB'), /* registered??? */
+ ft123R1SpreadsheetPC = FOUR_CHAR_CODE('WKS1'), /* registered??? */
+ ft123R2SpreadsheetPC = FOUR_CHAR_CODE('WKS2'), /* registered??? */
+ ft123R3SpreadsheetPC = FOUR_CHAR_CODE('WKS3'), /* registered??? */
+ ftParadox3SpreadsheetPC = FOUR_CHAR_CODE('PDX3'), /* registered??? */
+ ftParadox35SpreadsheetPC = FOUR_CHAR_CODE('PD35'), /* registered??? */
+ ftQuattroSpreadsheetPC = FOUR_CHAR_CODE('QTRO'), /* registered??? */
+ ftQuattroProSpreadsheetPC = FOUR_CHAR_CODE('QTR5'), /* registered??? */
+ ftSuperCalc5SpreadsheetPC = FOUR_CHAR_CODE('SPC5'), /* registered??? */
+ ftSymphony1SpreadsheetPC = FOUR_CHAR_CODE('SYM1'), /* registered??? */
+ ftTwinSpreadsheetPC = FOUR_CHAR_CODE('TWIN'), /* registered??? */
+ ftVPPlannerSpreadsheetPC = FOUR_CHAR_CODE('VPPL'), /* registered??? */
+ ftSmartSpeadsheetPC = FOUR_CHAR_CODE('SMSH'), /* registered??? */
+ ftFirstChoiceSpeadsheetPC = FOUR_CHAR_CODE('FCSS'), /* registered??? */
+ /* graphics formats */
+ ftPCPaintBrushGraphicPC = FOUR_CHAR_CODE('PCX '), /* not registered */
+ ftLotusPICGraphicPC = FOUR_CHAR_CODE('.PIC'), /* not registered */
+ ftCGMGraphicPC = FOUR_CHAR_CODE('.CGM'), /* not registered */
+ ftGEMGraphicPC = FOUR_CHAR_CODE('.GEM'), /* not registered */
+ ftIMGGraphicPC = FOUR_CHAR_CODE('.IMG'), /* not registered */
+ ftDXFGraphicPC = FOUR_CHAR_CODE('.DXF'), /* not registered */
+ ftBitmapWindows = FOUR_CHAR_CODE('.BMP'), /* not registered */
+ ftMetaFileWindows = FOUR_CHAR_CODE('.WMF'), /* not registered */
+ ftTIFFGraphic = FOUR_CHAR_CODE('TIFF'), /* not registered */
+ ftPostScriptPC = FOUR_CHAR_CODE('EPSP'),
+ ftPostScriptWindows = FOUR_CHAR_CODE('EPSW'), /* not registered */
+ ftDigitalFX_TitleMan = FOUR_CHAR_CODE('TDIM'), /* registered??? */
+ ftDigitalFX_VideoFX = FOUR_CHAR_CODE('GRAF'), /* registered??? */
+ ftAutodeskFLIandFLC = FOUR_CHAR_CODE('FLIC'), /* registered??? */
+ ftGIF = FOUR_CHAR_CODE('GIFf'), /* registered??? */
+ ftIFF = FOUR_CHAR_CODE('ILBM'), /* registered??? */
+ ftMicrosoftPaint = FOUR_CHAR_CODE('.MSP'), /* registered??? */
+ ftPixar = FOUR_CHAR_CODE('PXAR'), /* registered??? */
+ ftQDV = FOUR_CHAR_CODE('.QDV'), /* registered??? */
+ ftRLE_Compuserve = FOUR_CHAR_CODE('RLEC'), /* registered??? */
+ /* Generic vector formats */
+ ftIGESGraphicPC = FOUR_CHAR_CODE('IGES'), /* not registered */
+ ftDDES2GraphicPC = FOUR_CHAR_CODE('DDES'), /* not registered */
+ ft3DGFGraphicPC = FOUR_CHAR_CODE('3DGF'), /* not registered */
+ /* Plotter formats */
+ ftHPGLGraphicPC = FOUR_CHAR_CODE('HPGL'), /* not registered */
+ ftDMPLGraphicPC = FOUR_CHAR_CODE('DMPL'), /* not registered */
+ ftCalComp906GraphicPC = FOUR_CHAR_CODE('C906'), /* not registered */
+ ftCalComp907GraphicPC = FOUR_CHAR_CODE('C907'), /* not registered */
+ /* Vendor-specific formats */
+ ftStereoLithographyGraphicPC = FOUR_CHAR_CODE('STL '), /* 3D Systems - not registered */
+ ftZoomGraphicPC = FOUR_CHAR_CODE('ZOOM'), /* Abvent - not registered */
+ ftFocusGraphicPC = FOUR_CHAR_CODE('FOCS'), /* Abvent - not registered */
+ ftWaveFrontGraphicPC = FOUR_CHAR_CODE('WOBJ'), /* WaveFront - not registered */
+ ftSculpt4DGraphicPC = FOUR_CHAR_CODE('Scn2'), /* Byte By Byte - not registered */
+ ftMiniPascal3GraphicPC = FOUR_CHAR_CODE('MPT3'), /* Graphsoft - not registered */
+ ftMiniPascal4GraphicPC = FOUR_CHAR_CODE('MPT4'), /* Graphsoft - not registered */
+ ftWalkThroughGraphicPC = FOUR_CHAR_CODE('VWLK'), /* Virtus - not registered */
+ ftSiliconGraphics = FOUR_CHAR_CODE('.SGI'), /* registered??? */
+ ftSunRaster = FOUR_CHAR_CODE('.SUN'), /* registered??? */
+ ftTarga = FOUR_CHAR_CODE('TPIC'), /* registered??? */
+ /* misc DOS */
+ ftDOSComPC = FOUR_CHAR_CODE('.COM'), /* registered??? */
+ ftDOSExecutablePC = FOUR_CHAR_CODE('.EXE'), /* registered??? */
+ ftDOSArcPC = FOUR_CHAR_CODE('.ARC'), /* registered??? */
+ ftAbekas = FOUR_CHAR_CODE('ABEK'), /* registered??? */
+ ftDrHaloCUT = FOUR_CHAR_CODE('.CUT'), /* registered??? */
+ /* misc Atari */
+ ftDegas = FOUR_CHAR_CODE('DEGA'), /* not registered */
+ ftNEO = FOUR_CHAR_CODE('.NEO') /* not registered */
+};
+
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __FILETYPESANDCREATORS__ */
+
diff --git a/include/qt/Files.h b/include/qt/Files.h
new file mode 100644
index 000000000..9a2571b80
--- /dev/null
+++ b/include/qt/Files.h
@@ -0,0 +1,4399 @@
+/*
+ File: Files.h
+
+ Contains: File Manager (MFS, HFS, and HFS+) Interfaces.
+
+ Version: Technology: Mac OS 8.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __FILES__
+#define __FILES__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+#ifndef __OSUTILS__
+#include "OSUtils.h"
+#endif
+
+#ifndef __TEXTCOMMON__
+#include "TextCommon.h"
+#endif
+
+#ifndef __UTCUTILS__
+#include "UTCUtils.h"
+#endif
+
+
+/* Finder constants were moved to Finder.* */
+#ifndef __FINDER__
+#include "Finder.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* HFSUniStr255 is the Unicode equivalent of Str255 */
+
+struct HFSUniStr255 {
+ UInt16 length; /* number of unicode characters */
+ UniChar unicode[255]; /* unicode characters */
+};
+typedef struct HFSUniStr255 HFSUniStr255;
+
+typedef const HFSUniStr255 * ConstHFSUniStr255Param;
+enum {
+ fsCurPerm = 0x00, /* open access permissions in ioPermssn */
+ fsRdPerm = 0x01,
+ fsWrPerm = 0x02,
+ fsRdWrPerm = 0x03,
+ fsRdWrShPerm = 0x04,
+ fsRdDenyPerm = 0x10, /* for use with OpenDeny and OpenRFDeny */
+ fsWrDenyPerm = 0x20 /* for use with OpenDeny and OpenRFDeny */
+};
+
+enum {
+ fsRtParID = 1,
+ fsRtDirID = 2
+};
+
+enum {
+ fsAtMark = 0, /* positioning modes in ioPosMode */
+ fsFromStart = 1,
+ fsFromLEOF = 2,
+ fsFromMark = 3
+};
+
+enum {
+ /* ioPosMode flags */
+ pleaseCacheBit = 4, /* please cache this request */
+ pleaseCacheMask = 0x0010,
+ noCacheBit = 5, /* please don't cache this request */
+ noCacheMask = 0x0020,
+ rdVerifyBit = 6, /* read verify mode */
+ rdVerifyMask = 0x0040,
+ rdVerify = 64, /* old name of rdVerifyMask */
+ forceReadBit = 6,
+ forceReadMask = 0x0040,
+ newLineBit = 7, /* newline mode */
+ newLineMask = 0x0080,
+ newLineCharMask = 0xFF00 /* newline character */
+};
+
+
+enum {
+ /* CatSearch Search bitmask Constants */
+ fsSBPartialName = 1,
+ fsSBFullName = 2,
+ fsSBFlAttrib = 4,
+ fsSBFlFndrInfo = 8,
+ fsSBFlLgLen = 32,
+ fsSBFlPyLen = 64,
+ fsSBFlRLgLen = 128,
+ fsSBFlRPyLen = 256,
+ fsSBFlCrDat = 512,
+ fsSBFlMdDat = 1024,
+ fsSBFlBkDat = 2048,
+ fsSBFlXFndrInfo = 4096,
+ fsSBFlParID = 8192,
+ fsSBNegate = 16384,
+ fsSBDrUsrWds = 8,
+ fsSBDrNmFls = 16,
+ fsSBDrCrDat = 512,
+ fsSBDrMdDat = 1024,
+ fsSBDrBkDat = 2048,
+ fsSBDrFndrInfo = 4096,
+ fsSBDrParID = 8192
+};
+
+enum {
+ /* CatSearch Search bit value Constants */
+ fsSBPartialNameBit = 0, /*ioFileName points to a substring*/
+ fsSBFullNameBit = 1, /*ioFileName points to a match string*/
+ fsSBFlAttribBit = 2, /*search includes file attributes*/
+ fsSBFlFndrInfoBit = 3, /*search includes finder info*/
+ fsSBFlLgLenBit = 5, /*search includes data logical length*/
+ fsSBFlPyLenBit = 6, /*search includes data physical length*/
+ fsSBFlRLgLenBit = 7, /*search includes resource logical length*/
+ fsSBFlRPyLenBit = 8, /*search includes resource physical length*/
+ fsSBFlCrDatBit = 9, /*search includes create date*/
+ fsSBFlMdDatBit = 10, /*search includes modification date*/
+ fsSBFlBkDatBit = 11, /*search includes backup date*/
+ fsSBFlXFndrInfoBit = 12, /*search includes extended finder info*/
+ fsSBFlParIDBit = 13, /*search includes file's parent ID*/
+ fsSBNegateBit = 14, /*return all non-matches*/
+ fsSBDrUsrWdsBit = 3, /*search includes directory finder info*/
+ fsSBDrNmFlsBit = 4, /*search includes directory valence*/
+ fsSBDrCrDatBit = 9, /*directory-named version of fsSBFlCrDatBit*/
+ fsSBDrMdDatBit = 10, /*directory-named version of fsSBFlMdDatBit*/
+ fsSBDrBkDatBit = 11, /*directory-named version of fsSBFlBkDatBit*/
+ fsSBDrFndrInfoBit = 12, /*directory-named version of fsSBFlXFndrInfoBit*/
+ fsSBDrParIDBit = 13 /*directory-named version of fsSBFlParIDBit*/
+};
+
+enum {
+ /* vMAttrib (GetVolParms) bit position constants */
+ bLimitFCBs = 31,
+ bLocalWList = 30,
+ bNoMiniFndr = 29,
+ bNoVNEdit = 28,
+ bNoLclSync = 27,
+ bTrshOffLine = 26,
+ bNoSwitchTo = 25,
+ bNoDeskItems = 20,
+ bNoBootBlks = 19,
+ bAccessCntl = 18,
+ bNoSysDir = 17,
+ bHasExtFSVol = 16,
+ bHasOpenDeny = 15,
+ bHasCopyFile = 14,
+ bHasMoveRename = 13,
+ bHasDesktopMgr = 12,
+ bHasShortName = 11,
+ bHasFolderLock = 10,
+ bHasPersonalAccessPrivileges = 9,
+ bHasUserGroupList = 8,
+ bHasCatSearch = 7,
+ bHasFileIDs = 6,
+ bHasBTreeMgr = 5,
+ bHasBlankAccessPrivileges = 4,
+ bSupportsAsyncRequests = 3, /* asynchronous requests to this volume are handled correctly at any time*/
+ bSupportsTrashVolumeCache = 2
+};
+
+enum {
+ /* vMExtendedAttributes (GetVolParms) bit position constants */
+ bIsEjectable = 0, /* volume is in an ejectable disk drive */
+ bSupportsHFSPlusAPIs = 1, /* volume supports HFS Plus APIs directly (not through compatibility layer) */
+ bSupportsFSCatalogSearch = 2, /* volume supports FSCatalogSearch */
+ bSupportsFSExchangeObjects = 3, /* volume supports FSExchangeObjects */
+ bSupports2TBFiles = 4, /* volume supports supports 2 terabyte files */
+ bSupportsLongNames = 5, /* volume supports file/directory/volume names longer than 31 characters */
+ bSupportsMultiScriptNames = 6, /* volume supports file/directory/volume names with characters from multiple script systems */
+ bSupportsNamedForks = 7, /* volume supports forks beyond the data and resource forks */
+ bSupportsSubtreeIterators = 8, /* volume supports recursive iterators not at the volume root */
+ bL2PCanMapFileBlocks = 9, /* volume supports Lg2Phys SPI correctly */
+ bAllowCDiDataHandler = 17 /* allow QuickTime's CDi data handler to examine this volume */
+};
+
+enum {
+ /* Desktop Database icon Constants */
+ kLargeIcon = 1,
+ kLarge4BitIcon = 2,
+ kLarge8BitIcon = 3,
+ kSmallIcon = 4,
+ kSmall4BitIcon = 5,
+ kSmall8BitIcon = 6
+};
+
+enum {
+ kLargeIconSize = 256,
+ kLarge4BitIconSize = 512,
+ kLarge8BitIconSize = 1024,
+ kSmallIconSize = 64,
+ kSmall4BitIconSize = 128,
+ kSmall8BitIconSize = 256
+};
+
+enum {
+ /* Large Volume Constants */
+ kWidePosOffsetBit = 8,
+ kUseWidePositioning = (1 << kWidePosOffsetBit),
+ kMaximumBlocksIn4GB = 0x007FFFFF
+};
+
+enum {
+ /* Foreign Privilege Model Identifiers */
+ fsUnixPriv = 1
+};
+
+enum {
+ /* Authentication Constants */
+ kNoUserAuthentication = 1,
+ kPassword = 2,
+ kEncryptPassword = 3,
+ kTwoWayEncryptPassword = 6
+};
+
+
+/* mapping codes (ioObjType) for MapName & MapID */
+enum {
+ kOwnerID2Name = 1,
+ kGroupID2Name = 2,
+ kOwnerName2ID = 3,
+ kGroupName2ID = 4, /* types of oj object to be returned (ioObjType) for _GetUGEntry */
+ kReturnNextUser = 1,
+ kReturnNextGroup = 2,
+ kReturnNextUG = 3
+};
+
+/* vcbFlags bits */
+enum {
+ kVCBFlagsIdleFlushBit = 3, /* Set if volume should be flushed at idle time */
+ kVCBFlagsIdleFlushMask = 0x0008,
+ kVCBFlagsHFSPlusAPIsBit = 4, /* Set if volume implements HFS Plus APIs itself (not via emulation) */
+ kVCBFlagsHFSPlusAPIsMask = 0x0010,
+ kVCBFlagsHardwareGoneBit = 5, /* Set if disk driver returned a hardwareGoneErr to Read or Write */
+ kVCBFlagsHardwareGoneMask = 0x0020,
+ kVCBFlagsVolumeDirtyBit = 15, /* Set if volume information has changed since the last FlushVol */
+ kVCBFlagsVolumeDirtyMask = 0x8000
+};
+
+/* ioFlAttrib bits returned by PBGetCatInfo */
+enum {
+ /* file and directory attributes in ioFlAttrib */
+ kioFlAttribLockedBit = 0, /* Set if file or directory is locked */
+ kioFlAttribLockedMask = 0x01,
+ kioFlAttribResOpenBit = 2, /* Set if resource fork is open */
+ kioFlAttribResOpenMask = 0x04,
+ kioFlAttribDataOpenBit = 3, /* Set if data fork is open */
+ kioFlAttribDataOpenMask = 0x08,
+ kioFlAttribDirBit = 4, /* Set if this is a directory */
+ kioFlAttribDirMask = 0x10,
+ ioDirFlg = 4, /* Set if this is a directory (old name) */
+ ioDirMask = 0x10,
+ kioFlAttribCopyProtBit = 6, /* Set if AppleShare server "copy-protects" the file */
+ kioFlAttribCopyProtMask = 0x40,
+ kioFlAttribFileOpenBit = 7, /* Set if file (either fork) is open */
+ kioFlAttribFileOpenMask = 0x80, /* ioFlAttrib for directories only */
+ kioFlAttribInSharedBit = 2, /* Set if the directory is within a shared area of the directory hierarchy */
+ kioFlAttribInSharedMask = 0x04,
+ kioFlAttribMountedBit = 3, /* Set if the directory is a share point that is mounted by some user */
+ kioFlAttribMountedMask = 0x08,
+ kioFlAttribSharePointBit = 5, /* Set if the directory is a share point */
+ kioFlAttribSharePointMask = 0x20
+};
+
+/* ioFCBFlags bits returned by PBGetFCBInfo */
+enum {
+ kioFCBWriteBit = 8, /* Data can be written to this file */
+ kioFCBWriteMask = 0x0100,
+ kioFCBResourceBit = 9, /* This file is a resource fork */
+ kioFCBResourceMask = 0x0200,
+ kioFCBWriteLockedBit = 10, /* File has a locked byte range */
+ kioFCBWriteLockedMask = 0x0400,
+ kioFCBLargeFileBit = 11, /* File may grow beyond 2GB; cache uses file blocks, not bytes */
+ kioFCBLargeFileMask = 0x0800,
+ kioFCBSharedWriteBit = 12, /* File is open for shared write access */
+ kioFCBSharedWriteMask = 0x1000,
+ kioFCBFileLockedBit = 13, /* File is locked (write-protected) */
+ kioFCBFileLockedMask = 0x2000,
+ kioFCBOwnClumpBit = 14, /* File has clump size specified in FCB */
+ kioFCBOwnClumpMask = 0x4000,
+ kioFCBModifiedBit = 15, /* File has changed since it was last flushed */
+ kioFCBModifiedMask = 0x8000
+};
+
+/* ioACUser bits returned by PBGetCatInfo */
+/* Note: you must clear ioACUser before calling PBGetCatInfo because some file systems do not use this field */
+enum {
+ kioACUserNoSeeFolderBit = 0, /* Set if user does not have See Folder privileges */
+ kioACUserNoSeeFolderMask = 0x01,
+ kioACUserNoSeeFilesBit = 1, /* Set if user does not have See Files privileges */
+ kioACUserNoSeeFilesMask = 0x02,
+ kioACUserNoMakeChangesBit = 2, /* Set if user does not have Make Changes privileges */
+ kioACUserNoMakeChangesMask = 0x04,
+ kioACUserNotOwnerBit = 7, /* Set if user is not owner of the directory */
+ kioACUserNotOwnerMask = 0x80
+};
+
+/* Folder and File values of access privileges in ioACAccess */
+enum {
+ kioACAccessOwnerBit = 31, /* User is owner of directory */
+ kioACAccessOwnerMask = (long)0x80000000,
+ kioACAccessBlankAccessBit = 28, /* Directory has blank access privileges */
+ kioACAccessBlankAccessMask = 0x10000000,
+ kioACAccessUserWriteBit = 26, /* User has write privileges */
+ kioACAccessUserWriteMask = 0x04000000,
+ kioACAccessUserReadBit = 25, /* User has read privileges */
+ kioACAccessUserReadMask = 0x02000000,
+ kioACAccessUserSearchBit = 24, /* User has search privileges */
+ kioACAccessUserSearchMask = 0x01000000,
+ kioACAccessEveryoneWriteBit = 18, /* Everyone has write privileges */
+ kioACAccessEveryoneWriteMask = 0x00040000,
+ kioACAccessEveryoneReadBit = 17, /* Everyone has read privileges */
+ kioACAccessEveryoneReadMask = 0x00020000,
+ kioACAccessEveryoneSearchBit = 16, /* Everyone has search privileges */
+ kioACAccessEveryoneSearchMask = 0x00010000,
+ kioACAccessGroupWriteBit = 10, /* Group has write privileges */
+ kioACAccessGroupWriteMask = 0x00000400,
+ kioACAccessGroupReadBit = 9, /* Group has read privileges */
+ kioACAccessGroupReadMask = 0x00000200,
+ kioACAccessGroupSearchBit = 8, /* Group has search privileges */
+ kioACAccessGroupSearchMask = 0x00000100,
+ kioACAccessOwnerWriteBit = 2, /* Owner has write privileges */
+ kioACAccessOwnerWriteMask = 0x00000004,
+ kioACAccessOwnerReadBit = 1, /* Owner has read privileges */
+ kioACAccessOwnerReadMask = 0x00000002,
+ kioACAccessOwnerSearchBit = 0, /* Owner has search privileges */
+ kioACAccessOwnerSearchMask = 0x00000001,
+ kfullPrivileges = 0x00070007, /* all privileges for everybody and owner*/
+ kownerPrivileges = 0x00000007 /* all privileges for owner only*/
+};
+
+/* values of user IDs and group IDs */
+enum {
+ knoUser = 0,
+ kadministratorUser = 1
+};
+
+enum {
+ knoGroup = 0
+};
+
+
+
+struct GetVolParmsInfoBuffer {
+ short vMVersion; /*version number*/
+ long vMAttrib; /*bit vector of attributes (see vMAttrib constants)*/
+ Handle vMLocalHand; /*handle to private data*/
+ long vMServerAdr; /*AppleTalk server address or zero*/
+ /* vMVersion 1 GetVolParmsInfoBuffer ends here */
+ long vMVolumeGrade; /*approx. speed rating or zero if unrated*/
+ short vMForeignPrivID; /*foreign privilege model supported or zero if none*/
+ /* vMVersion 2 GetVolParmsInfoBuffer ends here */
+ long vMExtendedAttributes; /*extended attribute bits (see vMExtendedAttributes constants)*/
+ /* vMVersion 3 GetVolParmsInfoBuffer ends here */
+};
+typedef struct GetVolParmsInfoBuffer GetVolParmsInfoBuffer;
+typedef union ParamBlockRec ParamBlockRec;
+
+typedef ParamBlockRec * ParmBlkPtr;
+typedef CALLBACK_API( void , IOCompletionProcPtr )(ParmBlkPtr paramBlock);
+/*
+ WARNING: IOCompletionProcPtr uses register based parameters under classic 68k
+ and cannot be written in a high-level language without
+ the help of mixed mode or assembly glue.
+*/
+typedef REGISTER_UPP_TYPE(IOCompletionProcPtr) IOCompletionUPP;
+
+struct IOParam {
+ QElemPtr qLink; /*queue link in header*/
+ short qType; /*type byte for safety check*/
+ short ioTrap; /*FS: the Trap*/
+ Ptr ioCmdAddr; /*FS: address to dispatch to*/
+ IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
+ volatile OSErr ioResult; /*result code*/
+ StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
+ short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
+ short ioRefNum; /*refNum for I/O operation*/
+ SInt8 ioVersNum; /*version number*/
+ SInt8 ioPermssn; /*Open: permissions (byte)*/
+ Ptr ioMisc; /*Rename: new name (GetEOF,SetEOF: logical end of file) (Open: optional ptr to buffer) (SetFileType: new type)*/
+ Ptr ioBuffer; /*data buffer Ptr*/
+ long ioReqCount; /*requested byte count; also = ioNewDirID*/
+ long ioActCount; /*actual byte count completed*/
+ short ioPosMode; /*initial file positioning*/
+ long ioPosOffset; /*file position offset*/
+};
+typedef struct IOParam IOParam;
+typedef IOParam * IOParamPtr;
+
+struct FileParam {
+ QElemPtr qLink; /*queue link in header*/
+ short qType; /*type byte for safety check*/
+ short ioTrap; /*FS: the Trap*/
+ Ptr ioCmdAddr; /*FS: address to dispatch to*/
+ IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
+ volatile OSErr ioResult; /*result code*/
+ StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
+ short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
+ short ioFRefNum; /*reference number*/
+ SInt8 ioFVersNum; /*version number*/
+ SInt8 filler1;
+ short ioFDirIndex; /*GetFInfo directory index*/
+ SInt8 ioFlAttrib; /*GetFInfo: in-use bit=7, lock bit=0*/
+ SInt8 ioFlVersNum; /*file version number*/
+ FInfo ioFlFndrInfo; /*user info*/
+ unsigned long ioFlNum; /*GetFInfo: file number; TF- ioDirID*/
+ unsigned short ioFlStBlk; /*start file block (0 if none)*/
+ long ioFlLgLen; /*logical length (EOF)*/
+ long ioFlPyLen; /*physical length*/
+ unsigned short ioFlRStBlk; /*start block rsrc fork*/
+ long ioFlRLgLen; /*file logical length rsrc fork*/
+ long ioFlRPyLen; /*file physical length rsrc fork*/
+ unsigned long ioFlCrDat; /*file creation date& time (32 bits in secs)*/
+ unsigned long ioFlMdDat; /*last modified date and time*/
+};
+typedef struct FileParam FileParam;
+typedef FileParam * FileParamPtr;
+
+struct VolumeParam {
+ QElemPtr qLink; /*queue link in header*/
+ short qType; /*type byte for safety check*/
+ short ioTrap; /*FS: the Trap*/
+ Ptr ioCmdAddr; /*FS: address to dispatch to*/
+ IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
+ volatile OSErr ioResult; /*result code*/
+ StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
+ short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
+ long filler2;
+ short ioVolIndex; /*volume index number*/
+ unsigned long ioVCrDate; /*creation date and time*/
+ unsigned long ioVLsBkUp; /*last backup date and time*/
+ unsigned short ioVAtrb; /*volume attrib*/
+ unsigned short ioVNmFls; /*number of files in directory*/
+ unsigned short ioVDirSt; /*start block of file directory*/
+ short ioVBlLn; /*GetVolInfo: length of dir in blocks*/
+ unsigned short ioVNmAlBlks; /*for compatibilty ioVNmAlBlks * ioVAlBlkSiz <= 2 GB*/
+ unsigned long ioVAlBlkSiz; /*for compatibilty ioVAlBlkSiz is <= $0000FE00 (65,024)*/
+ unsigned long ioVClpSiz; /*GetVolInfo: bytes to allocate at a time*/
+ unsigned short ioAlBlSt; /*starting disk(512-byte) block in block map*/
+ unsigned long ioVNxtFNum; /*GetVolInfo: next free file number*/
+ unsigned short ioVFrBlk; /*GetVolInfo: # free alloc blks for this vol*/
+};
+typedef struct VolumeParam VolumeParam;
+typedef VolumeParam * VolumeParamPtr;
+
+struct CntrlParam {
+ QElemPtr qLink; /*queue link in header*/
+ short qType; /*type byte for safety check*/
+ short ioTrap; /*FS: the Trap*/
+ Ptr ioCmdAddr; /*FS: address to dispatch to*/
+ IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
+ volatile OSErr ioResult; /*result code*/
+ StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
+ short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
+ short ioCRefNum; /*refNum for I/O operation*/
+ short csCode; /*word for control status code*/
+ short csParam[11]; /*operation-defined parameters*/
+};
+typedef struct CntrlParam CntrlParam;
+typedef CntrlParam * CntrlParamPtr;
+
+struct SlotDevParam {
+ QElemPtr qLink; /*queue link in header*/
+ short qType; /*type byte for safety check*/
+ short ioTrap; /*FS: the Trap*/
+ Ptr ioCmdAddr; /*FS: address to dispatch to*/
+ IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
+ volatile OSErr ioResult; /*result code*/
+ StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
+ short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
+ short ioSRefNum;
+ SInt8 ioSVersNum;
+ SInt8 ioSPermssn;
+ Ptr ioSMix;
+ short ioSFlags;
+ SInt8 ioSlot;
+ SInt8 ioID;
+};
+typedef struct SlotDevParam SlotDevParam;
+typedef SlotDevParam * SlotDevParamPtr;
+
+struct MultiDevParam {
+ QElemPtr qLink; /*queue link in header*/
+ short qType; /*type byte for safety check*/
+ short ioTrap; /*FS: the Trap*/
+ Ptr ioCmdAddr; /*FS: address to dispatch to*/
+ IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
+ volatile OSErr ioResult; /*result code*/
+ StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
+ short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
+ short ioMRefNum;
+ SInt8 ioMVersNum;
+ SInt8 ioMPermssn;
+ Ptr ioMMix;
+ short ioMFlags;
+ Ptr ioSEBlkPtr;
+};
+typedef struct MultiDevParam MultiDevParam;
+typedef MultiDevParam * MultiDevParamPtr;
+
+union ParamBlockRec {
+ IOParam ioParam;
+ FileParam fileParam;
+ VolumeParam volumeParam;
+ CntrlParam cntrlParam;
+ SlotDevParam slotDevParam;
+ MultiDevParam multiDevParam;
+};
+
+
+struct HFileInfo {
+ QElemPtr qLink; /*queue link in header*/
+ short qType; /*type byte for safety check*/
+ short ioTrap; /*FS: the Trap*/
+ Ptr ioCmdAddr; /*FS: address to dispatch to*/
+ IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
+ volatile OSErr ioResult; /*result code*/
+ StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
+ short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
+ short ioFRefNum;
+ SInt8 ioFVersNum;
+ SInt8 filler1;
+ short ioFDirIndex;
+ SInt8 ioFlAttrib;
+ SInt8 ioACUser;
+ FInfo ioFlFndrInfo;
+ long ioDirID;
+ unsigned short ioFlStBlk;
+ long ioFlLgLen;
+ long ioFlPyLen;
+ unsigned short ioFlRStBlk;
+ long ioFlRLgLen;
+ long ioFlRPyLen;
+ unsigned long ioFlCrDat;
+ unsigned long ioFlMdDat;
+ unsigned long ioFlBkDat;
+ FXInfo ioFlXFndrInfo;
+ long ioFlParID;
+ long ioFlClpSiz;
+};
+typedef struct HFileInfo HFileInfo;
+
+struct DirInfo {
+ QElemPtr qLink; /*queue link in header*/
+ short qType; /*type byte for safety check*/
+ short ioTrap; /*FS: the Trap*/
+ Ptr ioCmdAddr; /*FS: address to dispatch to*/
+ IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
+ volatile OSErr ioResult; /*result code*/
+ StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
+ short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
+ short ioFRefNum;
+ SInt8 ioFVersNum;
+ SInt8 filler1;
+ short ioFDirIndex;
+ SInt8 ioFlAttrib;
+ SInt8 ioACUser;
+ DInfo ioDrUsrWds;
+ long ioDrDirID;
+ unsigned short ioDrNmFls;
+ short filler3[9];
+ unsigned long ioDrCrDat;
+ unsigned long ioDrMdDat;
+ unsigned long ioDrBkDat;
+ DXInfo ioDrFndrInfo;
+ long ioDrParID;
+};
+typedef struct DirInfo DirInfo;
+
+union CInfoPBRec {
+ HFileInfo hFileInfo;
+ DirInfo dirInfo;
+};
+typedef union CInfoPBRec CInfoPBRec;
+
+typedef CInfoPBRec * CInfoPBPtr;
+
+struct XCInfoPBRec {
+ QElemPtr qLink;
+ short qType;
+ short ioTrap;
+ Ptr ioCmdAddr;
+ ProcPtr ioCompletion; /* --> A pointer to a completion routine */
+ volatile OSErr ioResult; /* --> The result code of the function */
+ StringPtr ioNamePtr; /* --> Pointer to pathname to object */
+ short ioVRefNum; /* --> A volume specification */
+ long filler1;
+ StringPtr ioShortNamePtr; /* <-> A pointer to the short name string buffer - required! */
+ short filler2;
+ short ioPDType; /* <-- The ProDOS file type */
+ long ioPDAuxType; /* <-- The ProDOS aux type */
+ long filler3[2];
+ long ioDirID; /* --> A directory ID */
+};
+typedef struct XCInfoPBRec XCInfoPBRec;
+
+typedef XCInfoPBRec * XCInfoPBPtr;
+/* Catalog position record */
+
+struct CatPositionRec {
+ long initialize;
+ short priv[6];
+};
+typedef struct CatPositionRec CatPositionRec;
+
+struct FSSpec {
+ short vRefNum;
+ long parID;
+ StrFileName name; /* a Str63 on MacOS*/
+};
+typedef struct FSSpec FSSpec;
+typedef FSSpec * FSSpecPtr;
+typedef FSSpecPtr * FSSpecHandle;
+/* pointer to array of FSSpecs */
+typedef FSSpecPtr FSSpecArrayPtr;
+/*
+ The only difference between "const FSSpec*" and "ConstFSSpecPtr" is
+ that as a parameter, ConstFSSpecPtr is allowed to be NULL
+*/
+
+typedef const FSSpec * ConstFSSpecPtr;
+/*
+ The following are structures to be filled out with the _PBGetVolMountInfo call
+ and passed back into the _PBVolumeMount call for external file system mounts.
+*/
+/* the "signature" of the file system */
+typedef OSType VolumeType;
+enum {
+ /* the signature for AppleShare */
+ AppleShareMediaType = FOUR_CHAR_CODE('afpm')
+};
+
+/*
+ VolMount stuff was once in FSM.*
+*/
+
+struct VolMountInfoHeader {
+ short length; /* length of location data (including self) */
+ VolumeType media; /* type of media. Variable length data follows */
+};
+typedef struct VolMountInfoHeader VolMountInfoHeader;
+
+typedef VolMountInfoHeader * VolMountInfoPtr;
+/* The new volume mount info record. The old one is included for compatibility.
+ the new record allows access by foriegn filesystems writers to the flags
+ portion of the record. This portion is now public.
+*/
+
+struct VolumeMountInfoHeader {
+ short length; /* length of location data (including self) */
+ VolumeType media; /* type of media (must be registered with Apple) */
+ short flags; /* volume mount flags. Variable length data follows */
+};
+typedef struct VolumeMountInfoHeader VolumeMountInfoHeader;
+typedef VolumeMountInfoHeader * VolumeMountInfoHeaderPtr;
+/* volume mount flags */
+enum {
+ volMountNoLoginMsgFlagBit = 0, /* Input to VolumeMount: If set, the file system */
+ volMountNoLoginMsgFlagMask = 0x0001, /* should suppresss any log-in message/greeting dialog */
+ volMountExtendedFlagsBit = 7, /* Input to VolumeMount: If set, the mount info is a */
+ volMountExtendedFlagsMask = 0x0080, /* AFPXVolMountInfo record for 3.7 AppleShare Client */
+ volMountInteractBit = 15, /* Input to VolumeMount: If set, it's OK for the file system */
+ volMountInteractMask = 0x8000, /* to perform user interaction to mount the volume */
+ volMountChangedBit = 14, /* Output from VoumeMount: If set, the volume was mounted, but */
+ volMountChangedMask = 0x4000, /* the volume mounting information record needs to be updated. */
+ volMountFSReservedMask = 0x00FF, /* bits 0-7 are defined by each file system for its own use */
+ volMountSysReservedMask = 0xFF00 /* bits 8-15 are reserved for Apple system use */
+};
+
+
+
+
+struct AFPVolMountInfo {
+ short length; /* length of location data (including self) */
+ VolumeType media; /* type of media */
+ short flags; /* bits for no messages, no reconnect */
+ SInt8 nbpInterval; /* NBP Interval parameter (IM2, p.322) */
+ SInt8 nbpCount; /* NBP Interval parameter (IM2, p.322) */
+ short uamType; /* User Authentication Method */
+ short zoneNameOffset; /* short positive offset from start of struct to Zone Name */
+ short serverNameOffset; /* offset to pascal Server Name string */
+ short volNameOffset; /* offset to pascal Volume Name string */
+ short userNameOffset; /* offset to pascal User Name string */
+ short userPasswordOffset; /* offset to pascal User Password string */
+ short volPasswordOffset; /* offset to pascal Volume Password string */
+ char AFPData[144]; /* variable length data may follow */
+};
+typedef struct AFPVolMountInfo AFPVolMountInfo;
+typedef AFPVolMountInfo * AFPVolMountInfoPtr;
+
+
+/* AFPXVolMountInfo is the new AFP volume mount info record, requires the 3.7 AppleShare Client */
+
+struct AFPXVolMountInfo {
+ short length; /* length of location data (including self) */
+ VolumeType media; /* type of media */
+ short flags; /* bits for no messages, no reconnect */
+ SInt8 nbpInterval; /* NBP Interval parameter (IM2, p.322) */
+ SInt8 nbpCount; /* NBP Interval parameter (IM2, p.322) */
+ short uamType; /* User Authentication Method type */
+ short zoneNameOffset; /* short positive offset from start of struct to Zone Name */
+ short serverNameOffset; /* offset to pascal Server Name string */
+ short volNameOffset; /* offset to pascal Volume Name string */
+ short userNameOffset; /* offset to pascal User Name string */
+ short userPasswordOffset; /* offset to pascal User Password string */
+ short volPasswordOffset; /* offset to pascal Volume Password string */
+ short extendedFlags; /* extended flags word */
+ short uamNameOffset; /* offset to a pascal UAM name string */
+ short alternateAddressOffset; /* offset to Alternate Addresses in tagged format */
+ char AFPData[176]; /* variable length data may follow */
+};
+typedef struct AFPXVolMountInfo AFPXVolMountInfo;
+typedef AFPXVolMountInfo * AFPXVolMountInfoPtr;
+enum {
+ kAFPExtendedFlagsAlternateAddressMask = 1 /* bit in AFPXVolMountInfo.extendedFlags that means alternateAddressOffset is used*/
+};
+
+
+enum {
+ /* constants for use in AFPTagData.fType field*/
+ kAFPTagTypeIP = 0x01, /* 4 byte IP address (MSB first) */
+ kAFPTagTypeIPPort = 0x02, /* 4 byte IP address, 2 byte port (MSB first) */
+ kAFPTagTypeDDP = 0x03, /* Net,Node,Socket Sent by the server, currently unused by the client */
+ kAFPTagTypeDNS = 0x04 /* DNS name in address:port format (total length variable up to 254 chars of dns name) */
+};
+
+
+enum {
+ /* constants for use in AFPTagData.fLength field*/
+ kAFPTagLengthIP = 0x06,
+ kAFPTagLengthIPPort = 0x08,
+ kAFPTagLengthDDP = 0x06
+};
+
+
+struct AFPTagData {
+ UInt8 fLength; /* length of this data tag including the fLength field */
+ UInt8 fType;
+ UInt8 fData[1]; /* variable length data */
+};
+typedef struct AFPTagData AFPTagData;
+
+struct AFPAlternateAddress {
+ /* ooo.NOTE: fVersion was missing in 3.2 Universal Interfaces*/
+ UInt8 fVersion; /* version of the structure (currently 0x00)*/
+ UInt8 fAddressCount;
+ UInt8 fAddressList[1]; /* actually variable length packed set of AFPTagData */
+};
+typedef struct AFPAlternateAddress AFPAlternateAddress;
+
+struct DTPBRec {
+ QElemPtr qLink; /*queue link in header*/
+ short qType; /*type byte for safety check*/
+ short ioTrap; /*FS: the Trap*/
+ Ptr ioCmdAddr; /*FS: address to dispatch to*/
+ IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
+ volatile OSErr ioResult; /*result code*/
+ StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
+ short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
+ short ioDTRefNum; /* desktop refnum */
+ short ioIndex;
+ long ioTagInfo;
+ Ptr ioDTBuffer;
+ long ioDTReqCount;
+ long ioDTActCount;
+ SInt8 ioFiller1;
+ SInt8 ioIconType;
+ short ioFiller2;
+ long ioDirID;
+ OSType ioFileCreator;
+ OSType ioFileType;
+ long ioFiller3;
+ long ioDTLgLen;
+ long ioDTPyLen;
+ short ioFiller4[14];
+ long ioAPPLParID;
+};
+typedef struct DTPBRec DTPBRec;
+
+typedef DTPBRec * DTPBPtr;
+
+
+struct HIOParam {
+ QElemPtr qLink; /*queue link in header*/
+ short qType; /*type byte for safety check*/
+ short ioTrap; /*FS: the Trap*/
+ Ptr ioCmdAddr; /*FS: address to dispatch to*/
+ IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
+ volatile OSErr ioResult; /*result code*/
+ StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
+ short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
+ short ioRefNum;
+ SInt8 ioVersNum;
+ SInt8 ioPermssn;
+ Ptr ioMisc;
+ Ptr ioBuffer;
+ long ioReqCount;
+ long ioActCount;
+ short ioPosMode;
+ long ioPosOffset;
+};
+typedef struct HIOParam HIOParam;
+typedef HIOParam * HIOParamPtr;
+
+struct HFileParam {
+ QElemPtr qLink; /*queue link in header*/
+ short qType; /*type byte for safety check*/
+ short ioTrap; /*FS: the Trap*/
+ Ptr ioCmdAddr; /*FS: address to dispatch to*/
+ IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
+ volatile OSErr ioResult; /*result code*/
+ StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
+ short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
+ short ioFRefNum;
+ SInt8 ioFVersNum;
+ SInt8 filler1;
+ short ioFDirIndex;
+ SInt8 ioFlAttrib;
+ SInt8 ioFlVersNum;
+ FInfo ioFlFndrInfo;
+ long ioDirID;
+ unsigned short ioFlStBlk;
+ long ioFlLgLen;
+ long ioFlPyLen;
+ unsigned short ioFlRStBlk;
+ long ioFlRLgLen;
+ long ioFlRPyLen;
+ unsigned long ioFlCrDat;
+ unsigned long ioFlMdDat;
+};
+typedef struct HFileParam HFileParam;
+typedef HFileParam * HFileParamPtr;
+
+struct HVolumeParam {
+ QElemPtr qLink; /*queue link in header*/
+ short qType; /*type byte for safety check*/
+ short ioTrap; /*FS: the Trap*/
+ Ptr ioCmdAddr; /*FS: address to dispatch to*/
+ IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
+ volatile OSErr ioResult; /*result code*/
+ StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
+ short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
+ long filler2;
+ short ioVolIndex;
+ unsigned long ioVCrDate;
+ unsigned long ioVLsMod;
+ short ioVAtrb;
+ unsigned short ioVNmFls;
+ unsigned short ioVBitMap;
+ unsigned short ioAllocPtr;
+ unsigned short ioVNmAlBlks;
+ unsigned long ioVAlBlkSiz;
+ unsigned long ioVClpSiz;
+ unsigned short ioAlBlSt;
+ unsigned long ioVNxtCNID;
+ unsigned short ioVFrBlk;
+ unsigned short ioVSigWord;
+ short ioVDrvInfo;
+ short ioVDRefNum;
+ short ioVFSID;
+ unsigned long ioVBkUp;
+ short ioVSeqNum;
+ unsigned long ioVWrCnt;
+ unsigned long ioVFilCnt;
+ unsigned long ioVDirCnt;
+ long ioVFndrInfo[8];
+};
+typedef struct HVolumeParam HVolumeParam;
+typedef HVolumeParam * HVolumeParamPtr;
+
+struct XIOParam {
+ QElemPtr qLink;
+ short qType;
+ short ioTrap;
+ Ptr ioCmdAddr;
+ IOCompletionUPP ioCompletion;
+ volatile OSErr ioResult;
+ StringPtr ioNamePtr;
+ short ioVRefNum;
+ short ioRefNum;
+ SInt8 ioVersNum;
+ SInt8 ioPermssn;
+ Ptr ioMisc;
+ Ptr ioBuffer;
+ long ioReqCount;
+ long ioActCount;
+ short ioPosMode; /* must have kUseWidePositioning bit set */
+ wide ioWPosOffset; /* wide positioning offset */
+};
+typedef struct XIOParam XIOParam;
+typedef XIOParam * XIOParamPtr;
+
+struct XVolumeParam {
+ QElemPtr qLink;
+ short qType;
+ short ioTrap;
+ Ptr ioCmdAddr;
+ IOCompletionUPP ioCompletion;
+ volatile OSErr ioResult;
+ StringPtr ioNamePtr;
+ short ioVRefNum;
+ unsigned long ioXVersion; /* this XVolumeParam version (0) */
+ short ioVolIndex;
+ unsigned long ioVCrDate;
+ unsigned long ioVLsMod;
+ short ioVAtrb;
+ unsigned short ioVNmFls;
+ unsigned short ioVBitMap;
+ unsigned short ioAllocPtr;
+ unsigned short ioVNmAlBlks;
+ unsigned long ioVAlBlkSiz;
+ unsigned long ioVClpSiz;
+ unsigned short ioAlBlSt;
+ unsigned long ioVNxtCNID;
+ unsigned short ioVFrBlk;
+ unsigned short ioVSigWord;
+ short ioVDrvInfo;
+ short ioVDRefNum;
+ short ioVFSID;
+ unsigned long ioVBkUp;
+ short ioVSeqNum;
+ unsigned long ioVWrCnt;
+ unsigned long ioVFilCnt;
+ unsigned long ioVDirCnt;
+ long ioVFndrInfo[8];
+ UInt64 ioVTotalBytes; /* total number of bytes on volume */
+ UInt64 ioVFreeBytes; /* number of free bytes on volume */
+};
+typedef struct XVolumeParam XVolumeParam;
+typedef XVolumeParam * XVolumeParamPtr;
+
+struct AccessParam {
+ QElemPtr qLink; /*queue link in header*/
+ short qType; /*type byte for safety check*/
+ short ioTrap; /*FS: the Trap*/
+ Ptr ioCmdAddr; /*FS: address to dispatch to*/
+ IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
+ volatile OSErr ioResult; /*result code*/
+ StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
+ short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
+ short filler3;
+ short ioDenyModes; /*access rights data*/
+ short filler4;
+ SInt8 filler5;
+ SInt8 ioACUser; /*access rights for directory only*/
+ long filler6;
+ long ioACOwnerID; /*owner ID*/
+ long ioACGroupID; /*group ID*/
+ long ioACAccess; /*access rights*/
+ long ioDirID;
+};
+typedef struct AccessParam AccessParam;
+typedef AccessParam * AccessParamPtr;
+
+struct ObjParam {
+ QElemPtr qLink; /*queue link in header*/
+ short qType; /*type byte for safety check*/
+ short ioTrap; /*FS: the Trap*/
+ Ptr ioCmdAddr; /*FS: address to dispatch to*/
+ IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
+ volatile OSErr ioResult; /*result code*/
+ StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
+ short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
+ short filler7;
+ short ioObjType; /*function code*/
+ StringPtr ioObjNamePtr; /*ptr to returned creator/group name*/
+ long ioObjID; /*creator/group ID*/
+};
+typedef struct ObjParam ObjParam;
+typedef ObjParam * ObjParamPtr;
+
+struct CopyParam {
+ QElemPtr qLink; /*queue link in header*/
+ short qType; /*type byte for safety check*/
+ short ioTrap; /*FS: the Trap*/
+ Ptr ioCmdAddr; /*FS: address to dispatch to*/
+ IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
+ volatile OSErr ioResult; /*result code*/
+ StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
+ short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
+ short ioDstVRefNum; /*destination vol identifier*/
+ short filler8;
+ StringPtr ioNewName; /*ptr to destination pathname*/
+ StringPtr ioCopyName; /*ptr to optional name*/
+ long ioNewDirID; /*destination directory ID*/
+ long filler14;
+ long filler15;
+ long ioDirID;
+};
+typedef struct CopyParam CopyParam;
+typedef CopyParam * CopyParamPtr;
+
+struct WDParam {
+ QElemPtr qLink; /*queue link in header*/
+ short qType; /*type byte for safety check*/
+ short ioTrap; /*FS: the Trap*/
+ Ptr ioCmdAddr; /*FS: address to dispatch to*/
+ IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
+ volatile OSErr ioResult; /*result code*/
+ StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
+ short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
+ short filler9;
+ short ioWDIndex;
+ long ioWDProcID;
+ short ioWDVRefNum;
+ short filler10;
+ long filler11;
+ long filler12;
+ long filler13;
+ long ioWDDirID;
+};
+typedef struct WDParam WDParam;
+typedef WDParam * WDParamPtr;
+
+struct FIDParam {
+ QElemPtr qLink; /*queue link in header*/
+ short qType; /*type byte for safety check*/
+ short ioTrap; /*FS: the Trap*/
+ Ptr ioCmdAddr; /*FS: address to dispatch to*/
+ IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
+ volatile OSErr ioResult; /*result code*/
+ StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
+ short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
+ long filler14;
+ StringPtr ioDestNamePtr; /* dest file name */
+ long filler15;
+ long ioDestDirID; /* dest file's directory id */
+ long filler16;
+ long filler17;
+ long ioSrcDirID; /* source file's directory id */
+ short filler18;
+ long ioFileID; /* file ID */
+};
+typedef struct FIDParam FIDParam;
+typedef FIDParam * FIDParamPtr;
+
+struct ForeignPrivParam {
+ QElemPtr qLink; /*queue link in header*/
+ short qType; /*type byte for safety check*/
+ short ioTrap; /*FS: the Trap*/
+ Ptr ioCmdAddr; /*FS: address to dispatch to*/
+ IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
+ volatile OSErr ioResult; /*result code*/
+ StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
+ short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
+ long ioFiller21;
+ long ioFiller22;
+ Ptr ioForeignPrivBuffer;
+ long ioForeignPrivActCount;
+ long ioForeignPrivReqCount;
+ long ioFiller23;
+ long ioForeignPrivDirID;
+ long ioForeignPrivInfo1;
+ long ioForeignPrivInfo2;
+ long ioForeignPrivInfo3;
+ long ioForeignPrivInfo4;
+};
+typedef struct ForeignPrivParam ForeignPrivParam;
+typedef ForeignPrivParam * ForeignPrivParamPtr;
+
+struct CSParam {
+ QElemPtr qLink; /*queue link in header*/
+ short qType; /*type byte for safety check*/
+ short ioTrap; /*FS: the Trap*/
+ Ptr ioCmdAddr; /*FS: address to dispatch to*/
+ IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
+ volatile OSErr ioResult; /*result code*/
+ StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
+ short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
+ FSSpecPtr ioMatchPtr; /* match array */
+ long ioReqMatchCount; /* maximum allowable matches */
+ long ioActMatchCount; /* actual match count */
+ long ioSearchBits; /* search criteria selector */
+ CInfoPBPtr ioSearchInfo1; /* search values and range lower bounds */
+ CInfoPBPtr ioSearchInfo2; /* search values and range upper bounds */
+ long ioSearchTime; /* length of time to run search */
+ CatPositionRec ioCatPosition; /* current position in the catalog */
+ Ptr ioOptBuffer; /* optional performance enhancement buffer */
+ long ioOptBufSize; /* size of buffer pointed to by ioOptBuffer */
+};
+typedef struct CSParam CSParam;
+typedef CSParam * CSParamPtr;
+
+union HParamBlockRec {
+ HIOParam ioParam;
+ HFileParam fileParam;
+ HVolumeParam volumeParam;
+ AccessParam accessParam;
+ ObjParam objParam;
+ CopyParam copyParam;
+ WDParam wdParam;
+ FIDParam fidParam;
+ CSParam csParam;
+ ForeignPrivParam foreignPrivParam;
+};
+typedef union HParamBlockRec HParamBlockRec;
+
+
+
+typedef HParamBlockRec * HParmBlkPtr;
+
+
+struct CMovePBRec {
+ QElemPtr qLink;
+ short qType;
+ short ioTrap;
+ Ptr ioCmdAddr;
+ IOCompletionUPP ioCompletion;
+ volatile OSErr ioResult;
+ StringPtr ioNamePtr;
+ short ioVRefNum;
+ long filler1;
+ StringPtr ioNewName;
+ long filler2;
+ long ioNewDirID;
+ long filler3[2];
+ long ioDirID;
+};
+typedef struct CMovePBRec CMovePBRec;
+
+typedef CMovePBRec * CMovePBPtr;
+
+struct WDPBRec {
+ QElemPtr qLink;
+ short qType;
+ short ioTrap;
+ Ptr ioCmdAddr;
+ IOCompletionUPP ioCompletion;
+ volatile OSErr ioResult;
+ StringPtr ioNamePtr;
+ short ioVRefNum;
+ short filler1;
+ short ioWDIndex;
+ long ioWDProcID;
+ short ioWDVRefNum;
+ short filler2[7];
+ long ioWDDirID;
+};
+typedef struct WDPBRec WDPBRec;
+
+typedef WDPBRec * WDPBPtr;
+
+struct FCBPBRec {
+ QElemPtr qLink;
+ short qType;
+ short ioTrap;
+ Ptr ioCmdAddr;
+ IOCompletionUPP ioCompletion;
+ volatile OSErr ioResult;
+ StringPtr ioNamePtr;
+ short ioVRefNum;
+ short ioRefNum;
+ short filler;
+ short ioFCBIndx;
+ short filler1;
+ long ioFCBFlNm;
+ short ioFCBFlags;
+ unsigned short ioFCBStBlk;
+ long ioFCBEOF;
+ long ioFCBPLen;
+ long ioFCBCrPs;
+ short ioFCBVRefNum;
+ long ioFCBClpSiz;
+ long ioFCBParID;
+};
+typedef struct FCBPBRec FCBPBRec;
+
+typedef FCBPBRec * FCBPBPtr;
+
+struct VCB {
+ QElemPtr qLink;
+ short qType;
+ short vcbFlags;
+ unsigned short vcbSigWord;
+ unsigned long vcbCrDate;
+ unsigned long vcbLsMod;
+ short vcbAtrb;
+ unsigned short vcbNmFls;
+ short vcbVBMSt;
+ short vcbAllocPtr;
+ unsigned short vcbNmAlBlks;
+ long vcbAlBlkSiz;
+ long vcbClpSiz;
+ short vcbAlBlSt;
+ long vcbNxtCNID;
+ unsigned short vcbFreeBks;
+ Str27 vcbVN;
+ short vcbDrvNum;
+ short vcbDRefNum;
+ short vcbFSID;
+ short vcbVRefNum;
+ Ptr vcbMAdr;
+ Ptr vcbBufAdr;
+ short vcbMLen;
+ short vcbDirIndex;
+ short vcbDirBlk;
+ unsigned long vcbVolBkUp;
+ unsigned short vcbVSeqNum;
+ long vcbWrCnt;
+ long vcbXTClpSiz;
+ long vcbCTClpSiz;
+ unsigned short vcbNmRtDirs;
+ long vcbFilCnt;
+ long vcbDirCnt;
+ long vcbFndrInfo[8];
+ unsigned short vcbVCSize;
+ unsigned short vcbVBMCSiz;
+ unsigned short vcbCtlCSiz;
+ unsigned short vcbXTAlBlks;
+ unsigned short vcbCTAlBlks;
+ short vcbXTRef;
+ short vcbCTRef;
+ Ptr vcbCtlBuf;
+ long vcbDirIDM;
+ short vcbOffsM;
+};
+typedef struct VCB VCB;
+typedef VCB * VCBPtr;
+
+struct DrvQEl {
+ QElemPtr qLink;
+ short qType;
+ short dQDrive;
+ short dQRefNum;
+ short dQFSID;
+ unsigned short dQDrvSz;
+ unsigned short dQDrvSz2;
+};
+typedef struct DrvQEl DrvQEl;
+typedef DrvQEl * DrvQElPtr;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(IOCompletionUPP)
+ NewIOCompletionUPP (IOCompletionProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeIOCompletionUPP (IOCompletionUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeIOCompletionUPP (ParmBlkPtr paramBlock,
+ IOCompletionUPP userUPP);
+
+#else
+ enum { uppIOCompletionProcInfo = 0x00009802 }; /* register no_return_value Func(4_bytes:A0) */
+ #define NewIOCompletionUPP(userRoutine) (IOCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppIOCompletionProcInfo, GetCurrentArchitecture())
+ #define DisposeIOCompletionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter InvokeIOCompletionUPP(__A0, __A1)
+ void InvokeIOCompletionUPP(ParmBlkPtr paramBlock, IOCompletionUPP userUPP) = 0x4E91;
+ #else
+ #define InvokeIOCompletionUPP(paramBlock, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppIOCompletionProcInfo, (paramBlock))
+ #endif
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewIOCompletionProc(userRoutine) NewIOCompletionUPP(userRoutine)
+#define CallIOCompletionProc(userRoutine, paramBlock) InvokeIOCompletionUPP(paramBlock, userRoutine)
+
+/*
+ PBOpenSync(), PBOpenAsync(), PBOpenImmed() were moved to Devices.h
+ PBCloseSync(), PBCloseAsync(), PBCloseImmed() were moved to Devices.h
+ PBReadSync(), PBReadAsync(), PBReadImmed() were moved to Devices.h
+ PBWriteSync(), PBWriteAsync(), PBWriteImmed() were moved to Devices.h
+*/
+
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBGetVInfoSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBGetVInfoSync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA007);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBGetVInfoAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBGetVInfoAsync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA407);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBXGetVolInfoSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBXGetVolInfoSync(XVolumeParamPtr paramBlock) TWOWORDINLINE(0x7012, 0xA060);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBXGetVolInfoAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBXGetVolInfoAsync(XVolumeParamPtr paramBlock) TWOWORDINLINE(0x7012, 0xA460);
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBGetVolSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBGetVolSync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA014);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBGetVolAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBGetVolAsync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA414);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBSetVolSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBSetVolSync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA015);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBSetVolAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBSetVolAsync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA415);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBFlushVolSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBFlushVolSync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA013);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBFlushVolAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBFlushVolAsync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA413);
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHTrashVolumeCachesSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHTrashVolumeCachesSync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA213);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBCreateSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBCreateSync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA008);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBCreateAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBCreateAsync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA408);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDeleteSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDeleteSync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA009);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDeleteAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDeleteAsync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA409);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBOpenDFSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBOpenDFSync(ParmBlkPtr paramBlock) TWOWORDINLINE(0x701A, 0xA060);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBOpenDFAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBOpenDFAsync(ParmBlkPtr paramBlock) TWOWORDINLINE(0x701A, 0xA460);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBOpenRFSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBOpenRFSync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA00A);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBOpenRFAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBOpenRFAsync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA40A);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBRenameSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBRenameSync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA00B);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBRenameAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBRenameAsync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA40B);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBGetFInfoSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBGetFInfoSync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA00C);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBGetFInfoAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBGetFInfoAsync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA40C);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBSetFInfoSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBSetFInfoSync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA00D);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBSetFInfoAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBSetFInfoAsync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA40D);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBSetFLockSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBSetFLockSync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA041);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBSetFLockAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBSetFLockAsync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA441);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBRstFLockSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBRstFLockSync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA042);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBRstFLockAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBRstFLockAsync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA442);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBSetFVersSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBSetFVersSync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA043);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBSetFVersAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBSetFVersAsync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA443);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBAllocateSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBAllocateSync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA010);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBAllocateAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBAllocateAsync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA410);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBGetEOFSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBGetEOFSync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA011);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBGetEOFAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBGetEOFAsync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA411);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBSetEOFSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBSetEOFSync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA012);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBSetEOFAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBSetEOFAsync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA412);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBGetFPosSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBGetFPosSync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA018);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBGetFPosAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBGetFPosAsync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA418);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBSetFPosSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBSetFPosSync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA044);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBSetFPosAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBSetFPosAsync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA444);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBFlushFileSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBFlushFileSync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA045);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBFlushFileAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBFlushFileAsync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA445);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBMountVol(__A0)
+ #endif
+EXTERN_API( OSErr ) PBMountVol(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA00F);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBUnmountVol(__A0)
+ #endif
+EXTERN_API( OSErr ) PBUnmountVol(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA00E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBUnmountVolImmed(__A0)
+ #endif
+EXTERN_API( OSErr ) PBUnmountVolImmed(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA20E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBEject(__A0)
+ #endif
+EXTERN_API( OSErr ) PBEject(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA017);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBOffLine(__A0)
+ #endif
+EXTERN_API( OSErr ) PBOffLine(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA035);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBCatSearchSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBCatSearchSync(CSParamPtr paramBlock) TWOWORDINLINE(0x7018, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBCatSearchAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBCatSearchAsync(CSParamPtr paramBlock) TWOWORDINLINE(0x7018, 0xA660);
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+SetVol (ConstStr63Param volName, /* can be NULL */
+ short vRefNum);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( OSErr )
+UnmountVol (ConstStr63Param volName, /* can be NULL */
+ short vRefNum);
+
+EXTERN_API( OSErr )
+Eject (ConstStr63Param volName, /* can be NULL */
+ short vRefNum);
+
+EXTERN_API( OSErr )
+FlushVol (ConstStr63Param volName, /* can be NULL */
+ short vRefNum);
+
+EXTERN_API( OSErr )
+HSetVol (ConstStr63Param volName, /* can be NULL */
+ short vRefNum,
+ long dirID);
+
+/* AddDrive() was moved to Devices.h*/
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+FSOpen (ConstStr255Param fileName,
+ short vRefNum,
+ short * refNum);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+OpenDF (ConstStr255Param fileName,
+ short vRefNum,
+ short * refNum);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( OSErr )
+FSClose (short refNum);
+
+EXTERN_API( OSErr )
+FSRead (short refNum,
+ long * count,
+ void * buffPtr);
+
+EXTERN_API( OSErr )
+FSWrite (short refNum,
+ long * count,
+ const void * buffPtr);
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+GetVInfo (short drvNum,
+ StringPtr volName,
+ short * vRefNum,
+ long * freeBytes);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+GetFInfo (ConstStr255Param fileName,
+ short vRefNum,
+ FInfo * fndrInfo);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+GetVol (StringPtr volName,
+ short * vRefNum);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+Create (ConstStr255Param fileName,
+ short vRefNum,
+ OSType creator,
+ OSType fileType);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+FSDelete (ConstStr255Param fileName,
+ short vRefNum);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+OpenRF (ConstStr255Param fileName,
+ short vRefNum,
+ short * refNum);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+Rename (ConstStr255Param oldName,
+ short vRefNum,
+ ConstStr255Param newName);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+SetFInfo (ConstStr255Param fileName,
+ short vRefNum,
+ const FInfo * fndrInfo);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+SetFLock (ConstStr255Param fileName,
+ short vRefNum);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+RstFLock (ConstStr255Param fileName,
+ short vRefNum);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( OSErr )
+Allocate (short refNum,
+ long * count);
+
+EXTERN_API( OSErr )
+GetEOF (short refNum,
+ long * logEOF);
+
+EXTERN_API( OSErr )
+SetEOF (short refNum,
+ long logEOF);
+
+EXTERN_API( OSErr )
+GetFPos (short refNum,
+ long * filePos);
+
+EXTERN_API( OSErr )
+SetFPos (short refNum,
+ short posMode,
+ long posOff);
+
+EXTERN_API( OSErr )
+GetVRefNum (short fileRefNum,
+ short * vRefNum);
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSErr )
+fsopen (const char * fileName,
+ short vRefNum,
+ short * refNum);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSErr )
+getvinfo (short drvNum,
+ char * volName,
+ short * vRefNum,
+ long * freeBytes);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSErr )
+getfinfo (const char * fileName,
+ short vRefNum,
+ FInfo * fndrInfo);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSErr )
+getvol (char * volName,
+ short * vRefNum);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSErr )
+setvol (const char * volName,
+ short vRefNum);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSErr )
+unmountvol (const char * volName,
+ short vRefNum);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSErr )
+eject (const char * volName,
+ short vRefNum);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSErr )
+flushvol (const char * volName,
+ short vRefNum);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSErr )
+create (const char * fileName,
+ short vRefNum,
+ OSType creator,
+ OSType fileType);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSErr )
+fsdelete (const char * fileName,
+ short vRefNum);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSErr )
+openrf (const char * fileName,
+ short vRefNum,
+ short * refNum);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSErr )
+fsrename (const char * oldName,
+ short vRefNum,
+ const char * newName);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSErr )
+setfinfo (const char * fileName,
+ short vRefNum,
+ const FInfo * fndrInfo);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSErr )
+setflock (const char * fileName,
+ short vRefNum);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSErr )
+rstflock (const char * fileName,
+ short vRefNum);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBOpenWDSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBOpenWDSync(WDPBPtr paramBlock) TWOWORDINLINE(0x7001, 0xA260);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBOpenWDAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBOpenWDAsync(WDPBPtr paramBlock) TWOWORDINLINE(0x7001, 0xA660);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBCloseWDSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBCloseWDSync(WDPBPtr paramBlock) TWOWORDINLINE(0x7002, 0xA260);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBCloseWDAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBCloseWDAsync(WDPBPtr paramBlock) TWOWORDINLINE(0x7002, 0xA660);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHSetVolSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHSetVolSync(WDPBPtr paramBlock) ONEWORDINLINE(0xA215);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHSetVolAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHSetVolAsync(WDPBPtr paramBlock) ONEWORDINLINE(0xA615);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHGetVolSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHGetVolSync(WDPBPtr paramBlock) ONEWORDINLINE(0xA214);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHGetVolAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHGetVolAsync(WDPBPtr paramBlock) ONEWORDINLINE(0xA614);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBCatMoveSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBCatMoveSync(CMovePBPtr paramBlock) TWOWORDINLINE(0x7005, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBCatMoveAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBCatMoveAsync(CMovePBPtr paramBlock) TWOWORDINLINE(0x7005, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDirCreateSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDirCreateSync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7006, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDirCreateAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDirCreateAsync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7006, 0xA660);
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBGetWDInfoSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBGetWDInfoSync(WDPBPtr paramBlock) TWOWORDINLINE(0x7007, 0xA260);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBGetWDInfoAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBGetWDInfoAsync(WDPBPtr paramBlock) TWOWORDINLINE(0x7007, 0xA660);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBGetFCBInfoSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBGetFCBInfoSync(FCBPBPtr paramBlock) TWOWORDINLINE(0x7008, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBGetFCBInfoAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBGetFCBInfoAsync(FCBPBPtr paramBlock) TWOWORDINLINE(0x7008, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBGetCatInfoSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBGetCatInfoSync(CInfoPBPtr paramBlock) TWOWORDINLINE(0x7009, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBGetCatInfoAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBGetCatInfoAsync(CInfoPBPtr paramBlock) TWOWORDINLINE(0x7009, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBSetCatInfoSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBSetCatInfoSync(CInfoPBPtr paramBlock) TWOWORDINLINE(0x700A, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBSetCatInfoAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBSetCatInfoAsync(CInfoPBPtr paramBlock) TWOWORDINLINE(0x700A, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBAllocContigSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBAllocContigSync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA210);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBAllocContigAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBAllocContigAsync(ParmBlkPtr paramBlock) ONEWORDINLINE(0xA610);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBLockRangeSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBLockRangeSync(ParmBlkPtr paramBlock) TWOWORDINLINE(0x7010, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBLockRangeAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBLockRangeAsync(ParmBlkPtr paramBlock) TWOWORDINLINE(0x7010, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBUnlockRangeSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBUnlockRangeSync(ParmBlkPtr paramBlock) TWOWORDINLINE(0x7011, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBUnlockRangeAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBUnlockRangeAsync(ParmBlkPtr paramBlock) TWOWORDINLINE(0x7011, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBSetVInfoSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBSetVInfoSync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x700B, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBSetVInfoAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBSetVInfoAsync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x700B, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHGetVInfoSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHGetVInfoSync(HParmBlkPtr paramBlock) ONEWORDINLINE(0xA207);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHGetVInfoAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHGetVInfoAsync(HParmBlkPtr paramBlock) ONEWORDINLINE(0xA607);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHOpenSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHOpenSync(HParmBlkPtr paramBlock) ONEWORDINLINE(0xA200);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHOpenAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHOpenAsync(HParmBlkPtr paramBlock) ONEWORDINLINE(0xA600);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHOpenRFSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHOpenRFSync(HParmBlkPtr paramBlock) ONEWORDINLINE(0xA20A);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHOpenRFAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHOpenRFAsync(HParmBlkPtr paramBlock) ONEWORDINLINE(0xA60A);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHOpenDFSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHOpenDFSync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x701A, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHOpenDFAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHOpenDFAsync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x701A, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHCreateSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHCreateSync(HParmBlkPtr paramBlock) ONEWORDINLINE(0xA208);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHCreateAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHCreateAsync(HParmBlkPtr paramBlock) ONEWORDINLINE(0xA608);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHDeleteSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHDeleteSync(HParmBlkPtr paramBlock) ONEWORDINLINE(0xA209);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHDeleteAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHDeleteAsync(HParmBlkPtr paramBlock) ONEWORDINLINE(0xA609);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHRenameSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHRenameSync(HParmBlkPtr paramBlock) ONEWORDINLINE(0xA20B);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHRenameAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHRenameAsync(HParmBlkPtr paramBlock) ONEWORDINLINE(0xA60B);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHRstFLockSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHRstFLockSync(HParmBlkPtr paramBlock) ONEWORDINLINE(0xA242);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHRstFLockAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHRstFLockAsync(HParmBlkPtr paramBlock) ONEWORDINLINE(0xA642);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHSetFLockSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHSetFLockSync(HParmBlkPtr paramBlock) ONEWORDINLINE(0xA241);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHSetFLockAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHSetFLockAsync(HParmBlkPtr paramBlock) ONEWORDINLINE(0xA641);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHGetFInfoSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHGetFInfoSync(HParmBlkPtr paramBlock) ONEWORDINLINE(0xA20C);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHGetFInfoAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHGetFInfoAsync(HParmBlkPtr paramBlock) ONEWORDINLINE(0xA60C);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHSetFInfoSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHSetFInfoSync(HParmBlkPtr paramBlock) ONEWORDINLINE(0xA20D);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHSetFInfoAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHSetFInfoAsync(HParmBlkPtr paramBlock) ONEWORDINLINE(0xA60D);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBMakeFSSpecSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBMakeFSSpecSync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x701B, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBMakeFSSpecAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBMakeFSSpecAsync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x701B, 0xA660);
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void ) FInitQueue(void ) ONEWORDINLINE(0xA016);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( QHdrPtr )
+GetFSQHdr (void) THREEWORDINLINE(0x2EBC, 0x0000, 0x0360);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( QHdrPtr )
+GetVCBQHdr (void) THREEWORDINLINE(0x2EBC, 0x0000, 0x0356);
+
+/* GetDrvQHdr was moved to Devices.h*/
+
+EXTERN_API( OSErr )
+HGetVol (StringPtr volName,
+ short * vRefNum,
+ long * dirID);
+
+EXTERN_API( OSErr )
+HOpen (short vRefNum,
+ long dirID,
+ ConstStr255Param fileName,
+ SInt8 permission,
+ short * refNum);
+
+EXTERN_API( OSErr )
+HOpenDF (short vRefNum,
+ long dirID,
+ ConstStr255Param fileName,
+ SInt8 permission,
+ short * refNum);
+
+EXTERN_API( OSErr )
+HOpenRF (short vRefNum,
+ long dirID,
+ ConstStr255Param fileName,
+ SInt8 permission,
+ short * refNum);
+
+EXTERN_API( OSErr )
+AllocContig (short refNum,
+ long * count);
+
+EXTERN_API( OSErr )
+HCreate (short vRefNum,
+ long dirID,
+ ConstStr255Param fileName,
+ OSType creator,
+ OSType fileType);
+
+EXTERN_API( OSErr )
+DirCreate (short vRefNum,
+ long parentDirID,
+ ConstStr255Param directoryName,
+ long * createdDirID);
+
+EXTERN_API( OSErr )
+HDelete (short vRefNum,
+ long dirID,
+ ConstStr255Param fileName);
+
+EXTERN_API( OSErr )
+HGetFInfo (short vRefNum,
+ long dirID,
+ ConstStr255Param fileName,
+ FInfo * fndrInfo);
+
+EXTERN_API( OSErr )
+HSetFInfo (short vRefNum,
+ long dirID,
+ ConstStr255Param fileName,
+ const FInfo * fndrInfo);
+
+EXTERN_API( OSErr )
+HSetFLock (short vRefNum,
+ long dirID,
+ ConstStr255Param fileName);
+
+EXTERN_API( OSErr )
+HRstFLock (short vRefNum,
+ long dirID,
+ ConstStr255Param fileName);
+
+EXTERN_API( OSErr )
+HRename (short vRefNum,
+ long dirID,
+ ConstStr255Param oldName,
+ ConstStr255Param newName);
+
+EXTERN_API( OSErr )
+CatMove (short vRefNum,
+ long dirID,
+ ConstStr255Param oldName,
+ long newDirID,
+ ConstStr255Param newName);
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+OpenWD (short vRefNum,
+ long dirID,
+ long procID,
+ short * wdRefNum);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+CloseWD (short wdRefNum);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+GetWDInfo (short wdRefNum,
+ short * vRefNum,
+ long * dirID,
+ long * procID);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+/* shared environment */
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHGetVolParmsSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHGetVolParmsSync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7030, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHGetVolParmsAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHGetVolParmsAsync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7030, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHGetLogInInfoSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHGetLogInInfoSync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7031, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHGetLogInInfoAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHGetLogInInfoAsync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7031, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHGetDirAccessSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHGetDirAccessSync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7032, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHGetDirAccessAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHGetDirAccessAsync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7032, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHSetDirAccessSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHSetDirAccessSync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7033, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHSetDirAccessAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHSetDirAccessAsync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7033, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHMapIDSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHMapIDSync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7034, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHMapIDAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHMapIDAsync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7034, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHMapNameSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHMapNameSync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7035, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHMapNameAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHMapNameAsync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7035, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHCopyFileSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHCopyFileSync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7036, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHCopyFileAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHCopyFileAsync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7036, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHMoveRenameSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHMoveRenameSync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7037, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHMoveRenameAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHMoveRenameAsync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7037, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHOpenDenySync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHOpenDenySync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7038, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHOpenDenyAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHOpenDenyAsync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7038, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHOpenRFDenySync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHOpenRFDenySync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7039, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBHOpenRFDenyAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBHOpenRFDenyAsync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7039, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBGetXCatInfoSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBGetXCatInfoSync(XCInfoPBPtr paramBlock) TWOWORDINLINE(0x703A, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBGetXCatInfoAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBGetXCatInfoAsync(XCInfoPBPtr paramBlock) TWOWORDINLINE(0x703A, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBExchangeFilesSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBExchangeFilesSync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7017, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBExchangeFilesAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBExchangeFilesAsync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7017, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBCreateFileIDRefSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBCreateFileIDRefSync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7014, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBCreateFileIDRefAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBCreateFileIDRefAsync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7014, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBResolveFileIDRefSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBResolveFileIDRefSync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7016, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBResolveFileIDRefAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBResolveFileIDRefAsync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7016, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDeleteFileIDRefSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDeleteFileIDRefSync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7015, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDeleteFileIDRefAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDeleteFileIDRefAsync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7015, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBGetForeignPrivsSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBGetForeignPrivsSync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7060, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBGetForeignPrivsAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBGetForeignPrivsAsync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7060, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBSetForeignPrivsSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBSetForeignPrivsSync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7061, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBSetForeignPrivsAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBSetForeignPrivsAsync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7061, 0xA660);
+
+/* Desktop Manager */
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDTGetPath(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDTGetPath(DTPBPtr paramBlock) TWOWORDINLINE(0x7020, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDTCloseDown(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDTCloseDown(DTPBPtr paramBlock) TWOWORDINLINE(0x7021, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDTAddIconSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDTAddIconSync(DTPBPtr paramBlock) TWOWORDINLINE(0x7022, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDTAddIconAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDTAddIconAsync(DTPBPtr paramBlock) TWOWORDINLINE(0x7022, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDTGetIconSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDTGetIconSync(DTPBPtr paramBlock) TWOWORDINLINE(0x7023, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDTGetIconAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDTGetIconAsync(DTPBPtr paramBlock) TWOWORDINLINE(0x7023, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDTGetIconInfoSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDTGetIconInfoSync(DTPBPtr paramBlock) TWOWORDINLINE(0x7024, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDTGetIconInfoAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDTGetIconInfoAsync(DTPBPtr paramBlock) TWOWORDINLINE(0x7024, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDTAddAPPLSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDTAddAPPLSync(DTPBPtr paramBlock) TWOWORDINLINE(0x7025, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDTAddAPPLAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDTAddAPPLAsync(DTPBPtr paramBlock) TWOWORDINLINE(0x7025, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDTRemoveAPPLSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDTRemoveAPPLSync(DTPBPtr paramBlock) TWOWORDINLINE(0x7026, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDTRemoveAPPLAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDTRemoveAPPLAsync(DTPBPtr paramBlock) TWOWORDINLINE(0x7026, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDTGetAPPLSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDTGetAPPLSync(DTPBPtr paramBlock) TWOWORDINLINE(0x7027, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDTGetAPPLAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDTGetAPPLAsync(DTPBPtr paramBlock) TWOWORDINLINE(0x7027, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDTSetCommentSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDTSetCommentSync(DTPBPtr paramBlock) TWOWORDINLINE(0x7028, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDTSetCommentAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDTSetCommentAsync(DTPBPtr paramBlock) TWOWORDINLINE(0x7028, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDTRemoveCommentSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDTRemoveCommentSync(DTPBPtr paramBlock) TWOWORDINLINE(0x7029, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDTRemoveCommentAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDTRemoveCommentAsync(DTPBPtr paramBlock) TWOWORDINLINE(0x7029, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDTGetCommentSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDTGetCommentSync(DTPBPtr paramBlock) TWOWORDINLINE(0x702A, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDTGetCommentAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDTGetCommentAsync(DTPBPtr paramBlock) TWOWORDINLINE(0x702A, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDTFlushSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDTFlushSync(DTPBPtr paramBlock) TWOWORDINLINE(0x702B, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDTFlushAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDTFlushAsync(DTPBPtr paramBlock) TWOWORDINLINE(0x702B, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDTResetSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDTResetSync(DTPBPtr paramBlock) TWOWORDINLINE(0x702C, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDTResetAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDTResetAsync(DTPBPtr paramBlock) TWOWORDINLINE(0x702C, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDTGetInfoSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDTGetInfoSync(DTPBPtr paramBlock) TWOWORDINLINE(0x702D, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDTGetInfoAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDTGetInfoAsync(DTPBPtr paramBlock) TWOWORDINLINE(0x702D, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDTOpenInform(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDTOpenInform(DTPBPtr paramBlock) TWOWORDINLINE(0x702E, 0xA060);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDTDeleteSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDTDeleteSync(DTPBPtr paramBlock) TWOWORDINLINE(0x702F, 0xA060);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDTDeleteAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBDTDeleteAsync(DTPBPtr paramBlock) TWOWORDINLINE(0x702F, 0xA460);
+
+/* VolumeMount traps */
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBGetVolMountInfoSize(__A0)
+ #endif
+EXTERN_API( OSErr ) PBGetVolMountInfoSize(ParmBlkPtr paramBlock) TWOWORDINLINE(0x703F, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBGetVolMountInfo(__A0)
+ #endif
+EXTERN_API( OSErr ) PBGetVolMountInfo(ParmBlkPtr paramBlock) TWOWORDINLINE(0x7040, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBVolumeMount(__A0)
+ #endif
+EXTERN_API( OSErr ) PBVolumeMount(ParmBlkPtr paramBlock) TWOWORDINLINE(0x7041, 0xA260);
+
+/* FSp traps */
+EXTERN_API( OSErr )
+FSMakeFSSpec (short vRefNum,
+ long dirID,
+ ConstStr255Param fileName,
+ FSSpec * spec) TWOWORDINLINE(0x7001, 0xAA52);
+
+EXTERN_API( OSErr )
+FSpOpenDF (const FSSpec * spec,
+ SInt8 permission,
+ short * refNum) TWOWORDINLINE(0x7002, 0xAA52);
+
+EXTERN_API( OSErr )
+FSpOpenRF (const FSSpec * spec,
+ SInt8 permission,
+ short * refNum) TWOWORDINLINE(0x7003, 0xAA52);
+
+EXTERN_API( OSErr )
+FSpCreate (const FSSpec * spec,
+ OSType creator,
+ OSType fileType,
+ ScriptCode scriptTag) TWOWORDINLINE(0x7004, 0xAA52);
+
+EXTERN_API( OSErr )
+FSpDirCreate (const FSSpec * spec,
+ ScriptCode scriptTag,
+ long * createdDirID) TWOWORDINLINE(0x7005, 0xAA52);
+
+EXTERN_API( OSErr )
+FSpDelete (const FSSpec * spec) TWOWORDINLINE(0x7006, 0xAA52);
+
+EXTERN_API( OSErr )
+FSpGetFInfo (const FSSpec * spec,
+ FInfo * fndrInfo) TWOWORDINLINE(0x7007, 0xAA52);
+
+EXTERN_API( OSErr )
+FSpSetFInfo (const FSSpec * spec,
+ const FInfo * fndrInfo) TWOWORDINLINE(0x7008, 0xAA52);
+
+EXTERN_API( OSErr )
+FSpSetFLock (const FSSpec * spec) TWOWORDINLINE(0x7009, 0xAA52);
+
+EXTERN_API( OSErr )
+FSpRstFLock (const FSSpec * spec) TWOWORDINLINE(0x700A, 0xAA52);
+
+EXTERN_API( OSErr )
+FSpRename (const FSSpec * spec,
+ ConstStr255Param newName) TWOWORDINLINE(0x700B, 0xAA52);
+
+EXTERN_API( OSErr )
+FSpCatMove (const FSSpec * source,
+ const FSSpec * dest) TWOWORDINLINE(0x700C, 0xAA52);
+
+EXTERN_API( OSErr )
+FSpExchangeFiles (const FSSpec * source,
+ const FSSpec * dest) TWOWORDINLINE(0x700F, 0xAA52);
+
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBShareSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBShareSync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7042, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBShareAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBShareAsync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7042, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBUnshareSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBUnshareSync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7043, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBUnshareAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBUnshareAsync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7043, 0xA660);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBGetUGEntrySync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBGetUGEntrySync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7044, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBGetUGEntryAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBGetUGEntryAsync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7044, 0xA660);
+
+
+
+
+#if TARGET_CPU_68K
+/*
+ PBGetAltAccess and PBSetAltAccess are obsolete and will not be supported
+ on PowerPC. Equivalent functionality is provided by the routines
+ PBGetForeignPrivs and PBSetForeignPrivs.
+*/
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBGetAltAccessSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBGetAltAccessSync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7060, 0xA060);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBGetAltAccessAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBGetAltAccessAsync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7060, 0xA460);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBSetAltAccessSync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBSetAltAccessSync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7061, 0xA060);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBSetAltAccessAsync(__A0)
+ #endif
+EXTERN_API( OSErr ) PBSetAltAccessAsync(HParmBlkPtr paramBlock) TWOWORDINLINE(0x7061, 0xA460);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#define PBSetAltAccess(pb, async) ((async) ? PBSetAltAccessAsync(pb) : PBSetAltAccessSync(pb))
+#define PBGetAltAccess(pb, async) ((async) ? PBGetAltAccessAsync(pb) : PBGetAltAccessSync(pb))
+#endif /* TARGET_CPU_68K */
+
+
+/*
+ The PBxxx() routines are obsolete.
+
+ Use the PBxxxSync() or PBxxxAsync() version instead.
+*/
+#define PBGetVInfo(pb, async) ((async) ? PBGetVInfoAsync(pb) : PBGetVInfoSync(pb))
+#define PBXGetVolInfo(pb, async) ((async) ? PBXGetVolInfoAsync(pb) : PBXGetVolInfoSync(pb))
+#define PBGetVol(pb, async) ((async) ? PBGetVolAsync(pb) : PBGetVolSync(pb))
+#define PBSetVol(pb, async) ((async) ? PBSetVolAsync(pb) : PBSetVolSync(pb))
+#define PBFlushVol(pb, async) ((async) ? PBFlushVolAsync(pb) : PBFlushVolSync(pb))
+#define PBCreate(pb, async) ((async) ? PBCreateAsync(pb) : PBCreateSync(pb))
+#define PBDelete(pb, async) ((async) ? PBDeleteAsync(pb) : PBDeleteSync(pb))
+#define PBOpenDF(pb, async) ((async) ? PBOpenDFAsync(pb) : PBOpenDFSync(pb))
+#define PBOpenRF(pb, async) ((async) ? PBOpenRFAsync(pb) : PBOpenRFSync(pb))
+#define PBRename(pb, async) ((async) ? PBRenameAsync(pb) : PBRenameSync(pb))
+#define PBGetFInfo(pb, async) ((async) ? PBGetFInfoAsync(pb) : PBGetFInfoSync(pb))
+#define PBSetFInfo(pb, async) ((async) ? PBSetFInfoAsync(pb) : PBSetFInfoSync(pb))
+#define PBSetFLock(pb, async) ((async) ? PBSetFLockAsync(pb) : PBSetFLockSync(pb))
+#define PBRstFLock(pb, async) ((async) ? PBRstFLockAsync(pb) : PBRstFLockSync(pb))
+#define PBSetFVers(pb, async) ((async) ? PBSetFVersAsync(pb) : PBSetFVersSync(pb))
+#define PBAllocate(pb, async) ((async) ? PBAllocateAsync(pb) : PBAllocateSync(pb))
+#define PBGetEOF(pb, async) ((async) ? PBGetEOFAsync(pb) : PBGetEOFSync(pb))
+#define PBSetEOF(pb, async) ((async) ? PBSetEOFAsync(pb) : PBSetEOFSync(pb))
+#define PBGetFPos(pb, async) ((async) ? PBGetFPosAsync(pb) : PBGetFPosSync(pb))
+#define PBSetFPos(pb, async) ((async) ? PBSetFPosAsync(pb) : PBSetFPosSync(pb))
+#define PBFlushFile(pb, async) ((async) ? PBFlushFileAsync(pb) : PBFlushFileSync(pb))
+#define PBCatSearch(pb, async) ((async) ? PBCatSearchAsync(pb) : PBCatSearchSync(pb))
+#define PBOpenWD(pb, async) ((async) ? PBOpenWDAsync(pb) : PBOpenWDSync(pb))
+#define PBCloseWD(pb, async) ((async) ? PBCloseWDAsync(pb) : PBCloseWDSync(pb))
+#define PBHSetVol(pb, async) ((async) ? PBHSetVolAsync(pb) : PBHSetVolSync(pb))
+#define PBHGetVol(pb, async) ((async) ? PBHGetVolAsync(pb) : PBHGetVolSync(pb))
+#define PBCatMove(pb, async) ((async) ? PBCatMoveAsync(pb) : PBCatMoveSync(pb))
+#define PBDirCreate(pb, async) ((async) ? PBDirCreateAsync(pb) : PBDirCreateSync(pb))
+#define PBGetWDInfo(pb, async) ((async) ? PBGetWDInfoAsync(pb) : PBGetWDInfoSync(pb))
+#define PBGetFCBInfo(pb, async) ((async) ? PBGetFCBInfoAsync(pb) : PBGetFCBInfoSync(pb))
+#define PBGetCatInfo(pb, async) ((async) ? PBGetCatInfoAsync(pb) : PBGetCatInfoSync(pb))
+#define PBSetCatInfo(pb, async) ((async) ? PBSetCatInfoAsync(pb) : PBSetCatInfoSync(pb))
+#define PBAllocContig(pb, async) ((async) ? PBAllocContigAsync(pb) : PBAllocContigSync(pb))
+#define PBLockRange(pb, async) ((async) ? PBLockRangeAsync(pb) : PBLockRangeSync(pb))
+#define PBUnlockRange(pb, async) ((async) ? PBUnlockRangeAsync(pb) : PBUnlockRangeSync(pb))
+#define PBSetVInfo(pb, async) ((async) ? PBSetVInfoAsync(pb) : PBSetVInfoSync(pb))
+#define PBHGetVInfo(pb, async) ((async) ? PBHGetVInfoAsync(pb) : PBHGetVInfoSync(pb))
+#define PBHOpen(pb, async) ((async) ? PBHOpenAsync(pb) : PBHOpenSync(pb))
+#define PBHOpenRF(pb, async) ((async) ? PBHOpenRFAsync(pb) : PBHOpenRFSync(pb))
+#define PBHOpenDF(pb, async) ((async) ? PBHOpenDFAsync(pb) : PBHOpenDFSync(pb))
+#define PBHCreate(pb, async) ((async) ? PBHCreateAsync(pb) : PBHCreateSync(pb))
+#define PBHDelete(pb, async) ((async) ? PBHDeleteAsync(pb) : PBHDeleteSync(pb))
+#define PBHRename(pb, async) ((async) ? PBHRenameAsync(pb) : PBHRenameSync(pb))
+#define PBHRstFLock(pb, async) ((async) ? PBHRstFLockAsync(pb) : PBHRstFLockSync(pb))
+#define PBHSetFLock(pb, async) ((async) ? PBHSetFLockAsync(pb) : PBHSetFLockSync(pb))
+#define PBHGetFInfo(pb, async) ((async) ? PBHGetFInfoAsync(pb) : PBHGetFInfoSync(pb))
+#define PBHSetFInfo(pb, async) ((async) ? PBHSetFInfoAsync(pb) : PBHSetFInfoSync(pb))
+#define PBMakeFSSpec(pb, async) ((async) ? PBMakeFSSpecAsync(pb) : PBMakeFSSpecSync(pb))
+#define PBHGetVolParms(pb, async) ((async) ? PBHGetVolParmsAsync(pb) : PBHGetVolParmsSync(pb))
+#define PBHGetLogInInfo(pb, async) ((async) ? PBHGetLogInInfoAsync(pb) : PBHGetLogInInfoSync(pb))
+#define PBHGetDirAccess(pb, async) ((async) ? PBHGetDirAccessAsync(pb) : PBHGetDirAccessSync(pb))
+#define PBHSetDirAccess(pb, async) ((async) ? PBHSetDirAccessAsync(pb) : PBHSetDirAccessSync(pb))
+#define PBHMapID(pb, async) ((async) ? PBHMapIDAsync(pb) : PBHMapIDSync(pb))
+#define PBHMapName(pb, async) ((async) ? PBHMapNameAsync(pb) : PBHMapNameSync(pb))
+#define PBHCopyFile(pb, async) ((async) ? PBHCopyFileAsync(pb) : PBHCopyFileSync(pb))
+#define PBHMoveRename(pb, async) ((async) ? PBHMoveRenameAsync(pb) : PBHMoveRenameSync(pb))
+#define PBHOpenDeny(pb, async) ((async) ? PBHOpenDenyAsync(pb) : PBHOpenDenySync(pb))
+#define PBHOpenRFDeny(pb, async) ((async) ? PBHOpenRFDenyAsync(pb) : PBHOpenRFDenySync(pb))
+#define PBExchangeFiles(pb, async) ((async) ? PBExchangeFilesAsync(pb) : PBExchangeFilesSync(pb))
+#define PBCreateFileIDRef(pb, async) ((async) ? PBCreateFileIDRefAsync(pb) : PBCreateFileIDRefSync(pb))
+#define PBResolveFileIDRef(pb, async) ((async) ? PBResolveFileIDRefAsync(pb) : PBResolveFileIDRefSync(pb))
+#define PBDeleteFileIDRef(pb, async) ((async) ? PBDeleteFileIDRefAsync(pb) : PBDeleteFileIDRefSync(pb))
+#define PBGetForeignPrivs(pb, async) ((async) ? PBGetForeignPrivsAsync(pb) : PBGetForeignPrivsSync(pb))
+#define PBSetForeignPrivs(pb, async) ((async) ? PBSetForeignPrivsAsync(pb) : PBSetForeignPrivsSync(pb))
+#define PBDTAddIcon(pb, async) ((async) ? PBDTAddIconAsync(pb) : PBDTAddIconSync(pb))
+#define PBDTGetIcon(pb, async) ((async) ? PBDTGetIconAsync(pb) : PBDTGetIconSync(pb))
+#define PBDTGetIconInfo(pb, async) ((async) ? PBDTGetIconInfoAsync(pb) : PBDTGetIconInfoSync(pb))
+#define PBDTAddAPPL(pb, async) ((async) ? PBDTAddAPPLAsync(pb) : PBDTAddAPPLSync(pb))
+#define PBDTRemoveAPPL(pb, async) ((async) ? PBDTRemoveAPPLAsync(pb) : PBDTRemoveAPPLSync(pb))
+#define PBDTGetAPPL(pb, async) ((async) ? PBDTGetAPPLAsync(pb) : PBDTGetAPPLSync(pb))
+#define PBDTSetComment(pb, async) ((async) ? PBDTSetCommentAsync(pb) : PBDTSetCommentSync(pb))
+#define PBDTRemoveComment(pb, async) ((async) ? PBDTRemoveCommentAsync(pb) : PBDTRemoveCommentSync(pb))
+#define PBDTGetComment(pb, async) ((async) ? PBDTGetCommentAsync(pb) : PBDTGetCommentSync(pb))
+#define PBDTFlush(pb, async) ((async) ? PBDTFlushAsync(pb) : PBDTFlushSync(pb))
+#define PBDTReset(pb, async) ((async) ? PBDTResetAsync(pb) : PBDTResetSync(pb))
+#define PBDTGetInfo(pb, async) ((async) ? PBDTGetInfoAsync(pb) : PBDTGetInfoSync(pb))
+#define PBDTDelete(pb, async) ((async) ? PBDTDeleteAsync(pb) : PBDTDeleteSync(pb))
+
+
+typedef SInt16 FSVolumeRefNum;
+enum {
+ kFSInvalidVolumeRefNum = 0
+};
+
+#if TARGET_OS_WIN32
+
+struct FSRef {
+ UInt8 hidden[600]; /* private to File Manager; oo need symbolic constant */
+};
+typedef struct FSRef FSRef;
+#else
+
+struct FSRef {
+ UInt8 hidden[80]; /* private to File Manager; oo need symbolic constant */
+};
+typedef struct FSRef FSRef;
+#endif /* TARGET_OS_WIN32 */
+
+typedef FSRef * FSRefPtr;
+/* CatalogInfoBitmap describes which fields of the CatalogInfo you wish to get or set.*/
+
+typedef UInt32 FSCatalogInfoBitmap;
+enum {
+ kFSCatInfoNone = 0x00000000,
+ kFSCatInfoTextEncoding = 0x00000001,
+ kFSCatInfoNodeFlags = 0x00000002, /* Locked (bit 0) and directory (bit 4) only */
+ kFSCatInfoVolume = 0x00000004,
+ kFSCatInfoParentDirID = 0x00000008,
+ kFSCatInfoNodeID = 0x00000010,
+ kFSCatInfoCreateDate = 0x00000020,
+ kFSCatInfoContentMod = 0x00000040,
+ kFSCatInfoAttrMod = 0x00000080,
+ kFSCatInfoAccessDate = 0x00000100,
+ kFSCatInfoBackupDate = 0x00000200,
+ kFSCatInfoPermissions = 0x00000400, /* Should this be finer granularity? */
+ kFSCatInfoFinderInfo = 0x00000800,
+ kFSCatInfoFinderXInfo = 0x00001000,
+ kFSCatInfoValence = 0x00002000, /* Folders only, zero for files */
+ kFSCatInfoDataSizes = 0x00004000, /* Data fork logical and physical size */
+ kFSCatInfoRsrcSizes = 0x00008000, /* Resource fork logical and physical size */
+ kFSCatInfoSharingFlags = 0x00010000, /* sharingFlags: kioFlAttribMountedBit, kioFlAttribSharePointBit */
+ kFSCatInfoUserPrivs = 0x00020000, /* userPrivileges */
+ kFSCatInfoAllDates = 0x000003E0,
+ kFSCatInfoGettableInfo = 0x0003FFFF,
+ kFSCatInfoSettableInfo = 0x00001FE3, /* flags, dates, permissions, Finder info, text encoding */
+ kFSCatInfoReserved = (long)0xFFFC0000 /* bits that are currently reserved */
+};
+
+/* Constants for nodeFlags field of FSCatalogInfo*/
+enum {
+ kFSNodeLockedBit = 0,
+ kFSNodeLockedMask = 0x0001,
+ kFSNodeIsDirectoryBit = 4,
+ kFSNodeIsDirectoryMask = 0x0010
+};
+
+
+struct FSCatalogInfo {
+ UInt16 nodeFlags; /* node flags */
+ FSVolumeRefNum volume; /* object's volume ref */
+ UInt32 parentDirID; /* parent directory's ID */
+ UInt32 nodeID; /* file/directory ID */
+ UInt8 sharingFlags; /* kioFlAttribMountedBit and kioFlAttribSharePointBit */
+ UInt8 userPrivileges; /* user's effective AFP privileges (same as ioACUser) */
+ UInt8 reserved1;
+ UInt8 reserved2;
+ UTCDateTime createDate; /* date and time of creation */
+ UTCDateTime contentModDate; /* date and time of last fork modification */
+ UTCDateTime attributeModDate; /* date and time of last attribute modification */
+ UTCDateTime accessDate; /* date and time of last access (for Mac OS X) */
+ UTCDateTime backupDate; /* date and time of last backup */
+
+ UInt32 permissions[4]; /* permissions (for Mac OS X) */
+
+ UInt8 finderInfo[16]; /* Finder information part 1 */
+ UInt8 extFinderInfo[16]; /* Finder information part 2 */
+
+ UInt64 dataLogicalSize; /* files only */
+ UInt64 dataPhysicalSize; /* files only */
+ UInt64 rsrcLogicalSize; /* files only */
+ UInt64 rsrcPhysicalSize; /* files only */
+
+ UInt32 valence; /* folders only */
+ TextEncoding textEncodingHint;
+};
+typedef struct FSCatalogInfo FSCatalogInfo;
+typedef FSCatalogInfo * FSCatalogInfoPtr;
+
+struct FSRefParam {
+ QElemPtr qLink; /*queue link in header*/
+ short qType; /*type byte for safety check*/
+ short ioTrap; /*FS: the Trap*/
+ Ptr ioCmdAddr; /*FS: address to dispatch to*/
+ IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
+ volatile OSErr ioResult; /*result code*/
+ ConstStringPtr ioNamePtr; /*ptr to Vol:FileName string*/
+ short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
+
+ SInt16 reserved1; /* was ioRefNum */
+ UInt8 reserved2; /* was ioVersNum */
+ UInt8 reserved3; /* was ioPermssn */
+
+ const FSRef * ref; /* Input ref; the target of the call */
+ FSCatalogInfoBitmap whichInfo;
+ FSCatalogInfo * catInfo;
+ UniCharCount nameLength; /* input name length for create/rename */
+ const UniChar * name; /* input name for create/rename */
+ long ioDirID;
+ FSSpec * spec;
+ FSRef * parentRef; /* ref of directory to move another ref to */
+ FSRef * newRef; /* Output ref */
+ TextEncoding textEncodingHint; /* for Rename, MakeFSRefUnicode */
+ HFSUniStr255 * outName; /* Output name for GetCatalogInfo */
+};
+typedef struct FSRefParam FSRefParam;
+typedef FSRefParam * FSRefParamPtr;
+typedef struct OpaqueFSIterator* FSIterator;
+enum {
+ kFSIterateFlat = 0, /* Immediate children of container only */
+ kFSIterateSubtree = 1, /* Entire subtree rooted at container */
+ kFSIterateReserved = (long)0xFFFFFFFE
+};
+
+
+typedef OptionBits FSIteratorFlags;
+enum {
+ /* CatalogSearch constants */
+ fsSBNodeID = 0x00008000, /* search by range of nodeID */
+ fsSBAttributeModDate = 0x00010000, /* search by range of attributeModDate */
+ fsSBAccessDate = 0x00020000, /* search by range of accessDate */
+ fsSBPermissions = 0x00040000, /* search by value/mask of permissions */
+ fsSBNodeIDBit = 15,
+ fsSBAttributeModDateBit = 16,
+ fsSBAccessDateBit = 17,
+ fsSBPermissionsBit = 18
+};
+
+
+struct FSSearchParams {
+ Duration searchTime; /* a Time Manager duration */
+ OptionBits searchBits; /* which fields to search on */
+ UniCharCount searchNameLength;
+ const UniChar * searchName;
+ FSCatalogInfo * searchInfo1; /* values and lower bounds */
+ FSCatalogInfo * searchInfo2; /* masks and upper bounds */
+};
+typedef struct FSSearchParams FSSearchParams;
+typedef FSSearchParams * FSSearchParamsPtr;
+
+struct FSCatalogBulkParam {
+ QElemPtr qLink; /*queue link in header*/
+ short qType; /*type byte for safety check*/
+ short ioTrap; /*FS: the Trap*/
+ Ptr ioCmdAddr; /*FS: address to dispatch to*/
+ IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
+ volatile OSErr ioResult; /*result code*/
+ Boolean containerChanged; /* true if container changed since last iteration */
+ UInt8 reserved; /* make following fields 4-byte aligned */
+
+ FSIteratorFlags iteratorFlags;
+ FSIterator iterator;
+ const FSRef * container; /* directory/volume to iterate */
+ ItemCount maximumItems;
+ ItemCount actualItems;
+ FSCatalogInfoBitmap whichInfo;
+ FSCatalogInfo * catalogInfo; /* returns an array */
+ FSRef * refs; /* returns an array */
+ FSSpec * specs; /* returns an array */
+ HFSUniStr255 * names; /* returns an array */
+ const FSSearchParams * searchParams;
+};
+typedef struct FSCatalogBulkParam FSCatalogBulkParam;
+typedef FSCatalogBulkParam * FSCatalogBulkParamPtr;
+
+typedef UInt16 FSAllocationFlags;
+enum {
+ kFSAllocDefaultFlags = 0x0000, /* as much as possible, not contiguous */
+ kFSAllocAllOrNothingMask = 0x0001, /* allocate all of the space, or nothing */
+ kFSAllocContiguousMask = 0x0002, /* new space must be one contiguous piece */
+ kFSAllocNoRoundUpMask = 0x0004, /* don't round up allocation to clump size */
+ kFSAllocReservedMask = 0xFFF8 /* these bits are reserved and must not be set */
+};
+
+
+struct FSForkIOParam {
+ QElemPtr qLink; /*queue link in header*/
+ short qType; /*type byte for safety check*/
+ short ioTrap; /*FS: the Trap*/
+ Ptr ioCmdAddr; /*FS: address to dispatch to*/
+ IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
+ volatile OSErr ioResult; /*result code*/
+ void * reserved1; /* was ioNamePtr */
+ SInt16 reserved2; /* was ioVRefNum */
+ SInt16 forkRefNum; /* same as ioRefNum */
+ UInt8 reserved3; /* was ioVersNum */
+ SInt8 permissions; /* desired access to the fork */
+ const FSRef * ref; /* which object to open */
+
+
+ Ptr buffer; /*data buffer Ptr*/
+ UInt32 requestCount; /*requested byte count*/
+ UInt32 actualCount; /*actual byte count completed*/
+ UInt16 positionMode; /*initial file positioning*/
+ SInt64 positionOffset; /*file position offset*/
+
+ FSAllocationFlags allocationFlags;
+ UInt64 allocationAmount;
+
+ UniCharCount forkNameLength; /* input; length of fork name */
+ const UniChar * forkName; /* input; name of fork */
+
+ CatPositionRec forkIterator;
+ HFSUniStr255 * outForkName; /* output; name of fork */
+};
+typedef struct FSForkIOParam FSForkIOParam;
+typedef FSForkIOParam * FSForkIOParamPtr;
+
+struct FSForkInfo {
+ SInt8 flags; /* copy of FCB flags */
+ SInt8 permissions;
+ FSVolumeRefNum volume;
+ UInt32 reserved2;
+ UInt32 nodeID; /* file or directory ID */
+ UInt32 forkID; /* fork ID */
+ UInt64 currentPosition;
+ UInt64 logicalEOF;
+ UInt64 physicalEOF;
+ UInt64 process; /* should be ProcessSerialNumber */
+};
+typedef struct FSForkInfo FSForkInfo;
+typedef FSForkInfo * FSForkInfoPtr;
+
+struct FSForkCBInfoParam {
+ QElemPtr qLink; /*queue link in header*/
+ short qType; /*type byte for safety check*/
+ short ioTrap; /*FS: the Trap*/
+ Ptr ioCmdAddr; /*FS: address to dispatch to*/
+ IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
+ volatile OSErr ioResult; /*result code*/
+ SInt16 desiredRefNum; /* 0 to iterate, non-0 for specific refnum */
+ SInt16 volumeRefNum; /* volume to match, or 0 for all volumes */
+ SInt16 iterator; /* 0 to start iteration */
+ SInt16 actualRefNum; /* actual refnum found */
+
+ FSRef * ref;
+ FSForkInfo * forkInfo;
+ HFSUniStr255 * forkName;
+};
+typedef struct FSForkCBInfoParam FSForkCBInfoParam;
+typedef FSForkCBInfoParam * FSForkCBInfoParamPtr;
+
+typedef UInt32 FSVolumeInfoBitmap;
+enum {
+ kFSVolInfoNone = 0x0000,
+ kFSVolInfoCreateDate = 0x0001,
+ kFSVolInfoModDate = 0x0002,
+ kFSVolInfoBackupDate = 0x0004,
+ kFSVolInfoCheckedDate = 0x0008,
+ kFSVolInfoFileCount = 0x0010,
+ kFSVolInfoDirCount = 0x0020,
+ kFSVolInfoSizes = 0x0040, /* totalBytes and freeBytes */
+ kFSVolInfoBlocks = 0x0080, /* blockSize, totalBlocks, freeBlocks */
+ kFSVolInfoNextAlloc = 0x0100,
+ kFSVolInfoRsrcClump = 0x0200,
+ kFSVolInfoDataClump = 0x0400,
+ kFSVolInfoNextID = 0x0800,
+ kFSVolInfoFinderInfo = 0x1000,
+ kFSVolInfoFlags = 0x2000,
+ kFSVolInfoFSInfo = 0x4000, /* filesystemID, signature */
+ kFSVolInfoDriveInfo = 0x8000, /* driveNumber, driverRefNum */
+ kFSVolInfoGettableInfo = 0xFFFF, /* This seems like it is here just for completeness */
+ kFSVolInfoSettableInfo = 0x3004 /* backup date, Finder info, flags */
+};
+
+
+
+struct FSVolumeInfo {
+ /* Dates -- zero means "never" or "unknown" */
+ UTCDateTime createDate;
+ UTCDateTime modifyDate;
+ UTCDateTime backupDate;
+ UTCDateTime checkedDate;
+
+ /* File/Folder counts -- return zero if unknown */
+ UInt32 fileCount; /* total files on volume */
+ UInt32 folderCount; /* total folders on volume */
+ /* Note: no root directory counts */
+
+ UInt64 totalBytes; /* total number of bytes on volume */
+ UInt64 freeBytes; /* number of free bytes on volume */
+
+ /* HFS and HFS Plus specific. Set fields to zero if not appropriate */
+ UInt32 blockSize; /* size (in bytes) of allocation blocks */
+ UInt32 totalBlocks; /* number of allocation blocks in volume */
+ UInt32 freeBlocks; /* number of unused allocation blocks */
+ UInt32 nextAllocation; /* start of next allocation search */
+ UInt32 rsrcClumpSize; /* default resource fork clump size */
+ UInt32 dataClumpSize; /* default data fork clump size */
+ UInt32 nextCatalogID; /* next unused catalog node ID ooo OYG ooo need to make HFSVolumes.h work Should be HFSCatalogNodeID*/
+ UInt8 finderInfo[32]; /* information used by Finder */
+
+ /* Identifying information */
+ UInt16 flags; /* ioVAtrb */
+ UInt16 filesystemID; /* ioVFSID */
+ UInt16 signature; /* ioVSigWord, unique within an FSID */
+ UInt16 driveNumber; /* ioVDrvInfo */
+ short driverRefNum; /* ioVDRefNum */
+};
+typedef struct FSVolumeInfo FSVolumeInfo;
+typedef FSVolumeInfo * FSVolumeInfoPtr;
+
+struct FSVolumeInfoParam {
+ QElemPtr qLink; /*queue link in header*/
+ short qType; /*type byte for safety check*/
+ short ioTrap; /*FS: the Trap*/
+ Ptr ioCmdAddr; /*FS: address to dispatch to*/
+ IOCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
+ volatile OSErr ioResult; /*result code*/
+ StringPtr ioNamePtr; /* unused */
+ FSVolumeRefNum ioVRefNum; /* volume refnum */
+
+ UInt32 volumeIndex; /* index, or 0 to use ioVRefNum */
+ FSVolumeInfoBitmap whichInfo; /* which volumeInfo fields to get/set */
+ FSVolumeInfo * volumeInfo; /* information about the volume */
+ HFSUniStr255 * volumeName; /* output; pointer to volume name */
+ FSRef * ref; /* volume's FSRef */
+};
+typedef struct FSVolumeInfoParam FSVolumeInfoParam;
+typedef FSVolumeInfoParam * FSVolumeInfoParamPtr;
+/*
+ MakeFSRef
+ Create an FSRef for an existing object specified by a combination
+ of volume refnum, parent directory, and pathname.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> ioNamePtr A pointer to a pathname
+ -> ioVRefNum A volume specification
+ -> ioDirID A directory ID
+ <- newRef A pointer to an FSRef
+*/
+EXTERN_API( OSErr )
+FSpMakeFSRef (const FSSpec * source,
+ FSRef * newRef) THREEWORDINLINE(0x303C, 0x041A, 0xAA52);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBMakeFSRefSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBMakeFSRefSync (FSRefParam * paramBlock) TWOWORDINLINE(0x706E, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PBMakeFSRefAsync(__A0)
+ #endif
+EXTERN_API( void )
+PBMakeFSRefAsync (FSRefParam * paramBlock) TWOWORDINLINE(0x706E, 0xA660);
+
+
+/*
+ MakeFSRefUnicode
+ Create an FSRef for an existing object specified by
+ Parent FSRef and Unicode name.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> ref A pointer to the parent directory FSRef
+ -> name A pointer to Unicde name
+ -> nameLength The length of the Unicode Name
+ -> textEncodingHint A suggested text encoding to use for the name
+ <- newRef A pointer to an FSRef
+*/
+EXTERN_API( OSErr )
+FSMakeFSRefUnicode (const FSRef * parentRef,
+ UniCharCount nameLength,
+ const UniChar * name,
+ TextEncoding textEncodingHint,
+ FSRef * newRef) THREEWORDINLINE(0x303C, 0x0A1B, 0xAA52);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBMakeFSRefUnicodeSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBMakeFSRefUnicodeSync (FSRefParam * paramBlock) TWOWORDINLINE(0x707A, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PBMakeFSRefUnicodeAsync(__A0)
+ #endif
+EXTERN_API( void )
+PBMakeFSRefUnicodeAsync (FSRefParam * paramBlock) TWOWORDINLINE(0x707A, 0xA660);
+
+
+/*
+ CompareFSRefs
+ Test whether two FSRefs refer to the same file or directory.
+ If they do, noErr is returned. Otherwise, an appropriate error
+ (such as errFSRefsDifferent) is returned.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> ref A pointer to the first FSRef
+ -> parentRef A pointer to the second FSRef
+*/
+EXTERN_API( OSErr )
+FSCompareFSRefs (const FSRef * ref1,
+ const FSRef * ref2) THREEWORDINLINE(0x303C, 0x0435, 0xAA52);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBCompareFSRefsSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBCompareFSRefsSync (FSRefParam * paramBlock) TWOWORDINLINE(0x707C, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PBCompareFSRefsAsync(__A0)
+ #endif
+EXTERN_API( void )
+PBCompareFSRefsAsync (FSRefParam * paramBlock) TWOWORDINLINE(0x707C, 0xA660);
+
+
+/*
+ CreateFileUnicode
+ Creates a new file. The input filename is in Unicode.
+ You can optionally set catalog info for the file.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> ref The directory where the file is to be created
+ -> whichInfo Which catalog info fields to set
+ -> catInfo The values for catalog info fields to set; may be NULL
+ -> nameLength Number of Unicode characters in the file's name
+ -> name A pointer to the Unicode name
+ <- spec A pointer to the FSSpec for the new directory; may be NULL
+ <- newRef A pointer to the FSRef for the new file; may be NULL
+*/
+EXTERN_API( OSErr )
+FSCreateFileUnicode (const FSRef * parentRef,
+ UniCharCount nameLength,
+ const UniChar * name,
+ FSCatalogInfoBitmap whichInfo,
+ const FSCatalogInfo * catalogInfo, /* can be NULL */
+ FSRef * newRef, /* can be NULL */
+ FSSpec * newSpec) /* can be NULL */ THREEWORDINLINE(0x303C, 0x0E1C, 0xAA52);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBCreateFileUnicodeSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBCreateFileUnicodeSync (FSRefParam * paramBlock) TWOWORDINLINE(0x7070, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PBCreateFileUnicodeAsync(__A0)
+ #endif
+EXTERN_API( void )
+PBCreateFileUnicodeAsync (FSRefParam * paramBlock) TWOWORDINLINE(0x7070, 0xA660);
+
+
+/*
+ CreateDirectoryUnicode
+ Creates a new directory. The input directory name is in Unicode.
+ You can optionally set catalog info for the directory.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> ref The parent directory where the directory is to be created
+ -> whichInfo Which catalog info fields to set
+ -> catInfo The values for catalog info fields to set; may be NULL
+ -> nameLength Number of Unicode characters in the directory's name
+ -> name A pointer to the Unicode name
+ <- ioDirID The DirID of the new directory
+ <- spec A pointer to the FSSpec for the new directory; may be NULL
+ <- newRef A pointer to the FSRef for the new directory; may be NULL
+*/
+EXTERN_API( OSErr )
+FSCreateDirectoryUnicode (const FSRef * parentRef,
+ UniCharCount nameLength,
+ const UniChar * name,
+ FSCatalogInfoBitmap whichInfo,
+ const FSCatalogInfo * catalogInfo, /* can be NULL */
+ FSRef * newRef, /* can be NULL */
+ FSSpec * newSpec, /* can be NULL */
+ UInt32 * newDirID) /* can be NULL */ THREEWORDINLINE(0x303C, 0x101D, 0xAA52);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBCreateDirectoryUnicodeSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBCreateDirectoryUnicodeSync (FSRefParam * paramBlock) TWOWORDINLINE(0x7071, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PBCreateDirectoryUnicodeAsync(__A0)
+ #endif
+EXTERN_API( void )
+PBCreateDirectoryUnicodeAsync (FSRefParam * paramBlock) TWOWORDINLINE(0x7071, 0xA660);
+
+
+/*
+ DeleteObject
+ Deletes an existing file or directory.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> ref The file or directory to be deleted
+*/
+EXTERN_API( OSErr )
+FSDeleteObject (const FSRef * ref) THREEWORDINLINE(0x303C, 0x021E, 0xAA52);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDeleteObjectSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBDeleteObjectSync (FSRefParam * paramBlock) TWOWORDINLINE(0x7072, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PBDeleteObjectAsync(__A0)
+ #endif
+EXTERN_API( void )
+PBDeleteObjectAsync (FSRefParam * paramBlock) TWOWORDINLINE(0x7072, 0xA660);
+
+
+/*
+ MoveObject
+ Move an existing file or directory into a different directory.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> ref The file or directory to be moved
+ -> parentRef The file or directory will be moved into this directory
+ <- newRef A new FSRef for the file or directory in its new location;
+ optional, may be NULL
+ NOTE: Moving an object may change its FSRef. If you want to continue to
+ refer to the object, you should pass a non-NULL pointer in newRef and use
+ that returned FSRef to access the object after the move. The FSRef passed
+ in "ref" may or may not be usable to access the object after it is moved.
+ "newRef" may point to the same storage as "parentRef" or "ref".
+*/
+EXTERN_API( OSErr )
+FSMoveObject (const FSRef * ref,
+ const FSRef * destDirectory,
+ FSRef * newRef) /* can be NULL */ THREEWORDINLINE(0x303C, 0x061F, 0xAA52);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBMoveObjectSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBMoveObjectSync (FSRefParam * paramBlock) TWOWORDINLINE(0x7073, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PBMoveObjectAsync(__A0)
+ #endif
+EXTERN_API( void )
+PBMoveObjectAsync (FSRefParam * paramBlock) TWOWORDINLINE(0x7073, 0xA660);
+
+
+/*
+ ExchangeObjects
+ swap the contents of two files.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> ref The first file
+ -> parentRef The second file
+*/
+EXTERN_API( OSErr )
+FSExchangeObjects (const FSRef * ref,
+ const FSRef * destRef) THREEWORDINLINE(0x303C, 0x0421, 0xAA52);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBExchangeObjectsSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBExchangeObjectsSync (FSRefParam * paramBlock) TWOWORDINLINE(0x7075, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PBExchangeObjectsAsync(__A0)
+ #endif
+EXTERN_API( void )
+PBExchangeObjectsAsync (FSRefParam * paramBlock) TWOWORDINLINE(0x7075, 0xA660);
+
+
+/*
+ RenameUnicode
+ Change the name of an existing file or directory. The new name is in
+ Unicode.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> ref The file or directory to be moved
+ -> nameLength Number of Unicode characters in the new name
+ -> name A pointer to the new Unicode name
+ -> textEncodingHint A suggested text encoding to use for the name
+ <- newRef A new FSRef for the file or directory; may be NULL
+ NOTE: Renaming an object may change its FSRef. If you want to continue to
+ refer to the object, you should pass a non-NULL pointer in newRef and use
+ that returned FSRef to access the object after the rename. The FSRef passed
+ in "ref" may or may not be usable to access the object after it is renamed.
+ "newRef" may point to the same storage as "ref".
+*/
+EXTERN_API( OSErr )
+FSRenameUnicode (const FSRef * ref,
+ UniCharCount nameLength,
+ const UniChar * name,
+ TextEncoding textEncodingHint,
+ FSRef * newRef) /* can be NULL */ THREEWORDINLINE(0x303C, 0x0A20, 0xAA52);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBRenameUnicodeSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBRenameUnicodeSync (FSRefParam * paramBlock) TWOWORDINLINE(0x7074, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PBRenameUnicodeAsync(__A0)
+ #endif
+EXTERN_API( void )
+PBRenameUnicodeAsync (FSRefParam * paramBlock) TWOWORDINLINE(0x7074, 0xA660);
+
+
+/*
+ GetCatalogInfo
+ Returns various information about a given file or directory.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> ref The file or directory whose information is to be returned
+ -> whichInfo Which catalog info fields to get
+ <- catInfo The returned values of catalog info fields; may be NULL
+ <- spec A pointer to the FSSpec for the object; may be NULL
+ <- parentRef A pointer to the FSRef for the object's parent directory; may be NULL
+ <- outName The Unicode name is returned here. This pointer may be NULL.
+ Note: All of the outputs are optional; if you don't want that particular output, just
+ set its pointer to NULL. This is the call to use to map from an FSRef to an FSSpec.
+*/
+EXTERN_API( OSErr )
+FSGetCatalogInfo (const FSRef * ref,
+ FSCatalogInfoBitmap whichInfo,
+ FSCatalogInfo * catalogInfo, /* can be NULL */
+ HFSUniStr255 * outName, /* can be NULL */
+ FSSpec * fsSpec, /* can be NULL */
+ FSRef * parentRef) /* can be NULL */ THREEWORDINLINE(0x303C, 0x0C22, 0xAA52);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBGetCatalogInfoSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBGetCatalogInfoSync (FSRefParam * paramBlock) TWOWORDINLINE(0x7076, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PBGetCatalogInfoAsync(__A0)
+ #endif
+EXTERN_API( void )
+PBGetCatalogInfoAsync (FSRefParam * paramBlock) TWOWORDINLINE(0x7076, 0xA660);
+
+
+/*
+ SetCatalogInfo
+ Set catalog information about a given file or directory.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> ref The file or directory whose information is to be changed
+ -> whichInfo Which catalog info fields to set
+ -> catInfo The new values of catalog info fields
+ Note: Only some of the catalog info fields may be set. The settable fields
+ are given by the constant kFSCatInfoSettableInfo; no other bits may be set in
+ whichInfo.
+*/
+EXTERN_API( OSErr )
+FSSetCatalogInfo (const FSRef * ref,
+ FSCatalogInfoBitmap whichInfo,
+ const FSCatalogInfo * catalogInfo) THREEWORDINLINE(0x303C, 0x0623, 0xAA52);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBSetCatalogInfoSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBSetCatalogInfoSync (FSRefParam * paramBlock) TWOWORDINLINE(0x7077, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PBSetCatalogInfoAsync(__A0)
+ #endif
+EXTERN_API( void )
+PBSetCatalogInfoAsync (FSRefParam * paramBlock) TWOWORDINLINE(0x7077, 0xA660);
+
+
+/*
+ OpenIterator
+ Creates an FSIterator to iterate over a directory or subtree. The
+ iterator can then be passed to GetCatalogInfoBulk or CatalogSearch.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ <- iterator The returned FSIterator
+ -> iteratorFlags Controls whether the iterator iterates over subtrees
+ or just the immediate children of the container.
+ -> container An FSRef for the directory to iterate (or root of
+ the subtree to iterate).
+*/
+EXTERN_API( OSErr )
+FSOpenIterator (const FSRef * container,
+ FSIteratorFlags iteratorFlags,
+ FSIterator * iterator) THREEWORDINLINE(0x303C, 0x0624, 0xAA52);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBOpenIteratorSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBOpenIteratorSync (FSCatalogBulkParam * paramBlock) TWOWORDINLINE(0x7078, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PBOpenIteratorAsync(__A0)
+ #endif
+EXTERN_API( void )
+PBOpenIteratorAsync (FSCatalogBulkParam * paramBlock) TWOWORDINLINE(0x7078, 0xA660);
+
+
+/*
+ CloseIterator
+ Invalidates and disposes an FSIterator.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> iterator The returned FSIterator
+*/
+EXTERN_API( OSErr )
+FSCloseIterator (FSIterator iterator) THREEWORDINLINE(0x303C, 0x0225, 0xAA52);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBCloseIteratorSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBCloseIteratorSync (FSCatalogBulkParam * paramBlock) TWOWORDINLINE(0x705B, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PBCloseIteratorAsync(__A0)
+ #endif
+EXTERN_API( void )
+PBCloseIteratorAsync (FSCatalogBulkParam * paramBlock) TWOWORDINLINE(0x705B, 0xA660);
+
+
+/*
+ GetCatalogInfoBulk
+ Iterates over catalog objects and returns information about them.
+ For now, iterator must have been created with kFSIterateFlat option.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> iterator The iterator
+ -> maximumItems The maximum number of items to return
+ <- actualItems The actual number of items returned
+ <- containerChanged Set to true if the container's contents changed
+ -> whichInfo The catalog information fields to return for each item
+ <- catalogInfo An array of catalog information; one for each returned item
+ <- refs An array of FSRefs; one for each returned item
+ <- specs An array of FSSpecs; one for each returned item
+ <- names An array of filenames; one for each returned item
+ Note: The catalogInfo, refs, specs, names, and containerChanged are all optional outputs;
+ if you don't want that particular output, set its pointer to NULL.
+*/
+EXTERN_API( OSErr )
+FSGetCatalogInfoBulk (FSIterator iterator,
+ ItemCount maximumObjects,
+ ItemCount * actualObjects,
+ Boolean * containerChanged, /* can be NULL */
+ FSCatalogInfoBitmap whichInfo,
+ FSCatalogInfo * catalogInfos, /* can be NULL */
+ FSRef * refs, /* can be NULL */
+ FSSpec * specs, /* can be NULL */
+ HFSUniStr255 * names) /* can be NULL */ THREEWORDINLINE(0x303C, 0x1226, 0xAA52);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBGetCatalogInfoBulkSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBGetCatalogInfoBulkSync (FSCatalogBulkParam * paramBlock) TWOWORDINLINE(0x705C, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PBGetCatalogInfoBulkAsync(__A0)
+ #endif
+EXTERN_API( void )
+PBGetCatalogInfoBulkAsync (FSCatalogBulkParam * paramBlock) TWOWORDINLINE(0x705C, 0xA660);
+
+/*
+ CatalogSearch
+ Iterates over catalog objects, searching for objects that match given
+ search criteria. Returns various information about matching objects.
+ For now, iterator must have been created with kFSIterateSubtree option
+ and the container must have been the root directory of a volume.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> iterator The iterator
+ -> maximumItems The maximum number of items to return
+ <- actualItems The actual number of items returned
+ <- containerChanged Set to true if the container's contents changed
+ -> whichInfo The catalog information fields to return for each item
+ <- catalogInfo An array of catalog information; one for each returned item
+ <- refs An array of FSRefs; one for each returned item
+ <- specs An array of FSSpecs; one for each returned item
+ <- names An array of filenames; one for each returned item
+ -> searchParams The criteria that controls the matching, including timeout, a bitmap
+ controlling the fields to compare, and the (Unicode) name to compare.
+ Note: The catalogInfo, refs, specs, and names are all optional outputs; if you don't want
+ that particular output, set its pointer to NULL.
+*/
+EXTERN_API( OSErr )
+FSCatalogSearch (FSIterator iterator,
+ const FSSearchParams * searchCriteria,
+ ItemCount maximumObjects,
+ ItemCount * actualObjects,
+ Boolean * containerChanged, /* can be NULL */
+ FSCatalogInfoBitmap whichInfo,
+ FSCatalogInfo * catalogInfos, /* can be NULL */
+ FSRef * refs, /* can be NULL */
+ FSSpec * specs, /* can be NULL */
+ HFSUniStr255 * names) /* can be NULL */ THREEWORDINLINE(0x303C, 0x1427, 0xAA52);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBCatalogSearchSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBCatalogSearchSync (FSCatalogBulkParam * paramBlock) TWOWORDINLINE(0x705D, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PBCatalogSearchAsync(__A0)
+ #endif
+EXTERN_API( void )
+PBCatalogSearchAsync (FSCatalogBulkParam * paramBlock) TWOWORDINLINE(0x705D, 0xA660);
+
+
+/*
+ CreateFork
+ Create a named fork for a file or directory.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> ref The file or directory
+ -> forkNameLength The length of the fork name (in Unicode characters)
+ -> forkName The name of the fork to open (in Unicode)
+*/
+EXTERN_API( OSErr )
+FSCreateFork (const FSRef * ref,
+ UniCharCount forkNameLength,
+ const UniChar * forkName) /* can be NULL */ THREEWORDINLINE(0x303C, 0x0636, 0xAA52);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBCreateForkSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBCreateForkSync (FSForkIOParam * paramBlock) TWOWORDINLINE(0x707D, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PBCreateForkAsync(__A0)
+ #endif
+EXTERN_API( void )
+PBCreateForkAsync (FSForkIOParam * paramBlock) TWOWORDINLINE(0x707D, 0xA660);
+
+
+/*
+ DeleteFork
+ Delete a named fork of a file or directory.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> ref The file or directory
+ -> forkNameLength The length of the fork name (in Unicode characters)
+ -> forkName The name of the fork to open (in Unicode)
+*/
+EXTERN_API( OSErr )
+FSDeleteFork (const FSRef * ref,
+ UniCharCount forkNameLength,
+ const UniChar * forkName) /* can be NULL */ THREEWORDINLINE(0x303C, 0x0637, 0xAA52);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBDeleteForkSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBDeleteForkSync (FSForkIOParam * paramBlock) TWOWORDINLINE(0x707E, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PBDeleteForkAsync(__A0)
+ #endif
+EXTERN_API( void )
+PBDeleteForkAsync (FSForkIOParam * paramBlock) TWOWORDINLINE(0x707E, 0xA660);
+
+
+/*
+ IterateForks
+ Return the names and sizes of the forks of a file or directory.
+ One fork is returned per call.
+ -> ioCompletion A pointer to a completion routine.
+ <- ioResult The result code of the function.
+ -> ref The file or directory containing the forks.
+ <- positionOffset The length of the fork, in bytes.
+ <- allocationAmount The space allocated to the fork (physical length).
+ <- outForkName The name of the fork in Unicode.
+ <> forkIterator Maintains state between calls for a given FSRef.
+ Before the first call, set the initialize field to zero.
+*/
+EXTERN_API( OSErr )
+FSIterateForks (const FSRef * ref,
+ CatPositionRec * forkIterator,
+ HFSUniStr255 * forkName, /* can be NULL */
+ SInt64 * forkSize, /* can be NULL */
+ UInt64 * forkPhysicalSize) /* can be NULL */ THREEWORDINLINE(0x303C, 0x0A38, 0xAA52);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBIterateForksSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBIterateForksSync (FSForkIOParam * paramBlock) TWOWORDINLINE(0x707F, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PBIterateForksAsync(__A0)
+ #endif
+EXTERN_API( void )
+PBIterateForksAsync (FSForkIOParam * paramBlock) TWOWORDINLINE(0x707F, 0xA660);
+
+
+/*
+ OpenFork
+ Open a fork for reading and/or writing. Allows the opened fork
+ to grow beyond 2GB in size. All volumes should support data and
+ resource forks. Other named forks may be supported by some
+ volumes.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> ref The file or directory containing the fork to open
+ -> forkNameLength The length of the fork name (in Unicode characters)
+ -> forkName The name of the fork to open (in Unicode)
+ -> permissions The access (read and/or write) you want
+ <- forkRefNum The reference number for accessing the open fork
+*/
+EXTERN_API( OSErr )
+FSOpenFork (const FSRef * ref,
+ UniCharCount forkNameLength,
+ const UniChar * forkName, /* can be NULL */
+ SInt8 permissions,
+ SInt16 * forkRefNum) THREEWORDINLINE(0x303C, 0x0928, 0xAA52);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBOpenForkSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBOpenForkSync (FSForkIOParam * paramBlock) TWOWORDINLINE(0x7079, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PBOpenForkAsync(__A0)
+ #endif
+EXTERN_API( void )
+PBOpenForkAsync (FSForkIOParam * paramBlock) TWOWORDINLINE(0x7079, 0xA660);
+
+
+/*
+ ReadFork
+ Read data from a fork opened via OpenFork. The first byte to read is
+ indicated by a combination of positionMode and positionOffset.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> forkRefNum The reference number of the fork to read from
+ <- buffer Pointer to buffer where data will be returned
+ -> requestCount The number of bytes to read
+ <- actualCount The number of bytes actually read
+ -> positionMode The base location for start of read
+ -> positionOffset The offset from base location for start of read
+*/
+EXTERN_API( OSErr )
+FSReadFork (SInt16 forkRefNum,
+ UInt16 positionMode,
+ SInt64 positionOffset,
+ ByteCount requestCount,
+ void * buffer,
+ ByteCount * actualCount) /* can be NULL */ THREEWORDINLINE(0x303C, 0x0A29, 0xAA52);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBReadForkSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBReadForkSync (FSForkIOParam * paramBlock) TWOWORDINLINE(0x7051, 0xA2A8);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PBReadForkAsync(__A0)
+ #endif
+EXTERN_API( void )
+PBReadForkAsync (FSForkIOParam * paramBlock) TWOWORDINLINE(0x7051, 0xA6A8);
+
+
+/*
+ WriteFork
+ Write data to a fork opened via OpenFork. The first byte to write is
+ indicated by a combination of positionMode and positionOffset.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> forkRefNum The reference number of the fork to write to
+ -> buffer Pointer to data to write
+ -> requestCount The number of bytes to write
+ <- actualCount The number of bytes actually written
+ -> positionMode The base location for start of write
+ -> positionOffset The offset from base location for start of write
+*/
+EXTERN_API( OSErr )
+FSWriteFork (SInt16 forkRefNum,
+ UInt16 positionMode,
+ SInt64 positionOffset,
+ ByteCount requestCount,
+ void * buffer,
+ ByteCount * actualCount) /* can be NULL */ THREEWORDINLINE(0x303C, 0x0A2A, 0xAA52);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBWriteForkSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBWriteForkSync (FSForkIOParam * paramBlock) TWOWORDINLINE(0x7052, 0xA2A8);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PBWriteForkAsync(__A0)
+ #endif
+EXTERN_API( void )
+PBWriteForkAsync (FSForkIOParam * paramBlock) TWOWORDINLINE(0x7052, 0xA6A8);
+
+
+/*
+ GetForkPosition
+ Get the current (default) position of a fork that was
+ opened via OpenFork.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> forkRefNum The reference number of the fork
+ <- positionOffset The current position of the fork
+*/
+EXTERN_API( OSErr )
+FSGetForkPosition (SInt16 forkRefNum,
+ SInt64 * position) THREEWORDINLINE(0x303C, 0x032B, 0xAA52);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBGetForkPositionSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBGetForkPositionSync (FSForkIOParam * paramBlock) TWOWORDINLINE(0x7053, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PBGetForkPositionAsync(__A0)
+ #endif
+EXTERN_API( void )
+PBGetForkPositionAsync (FSForkIOParam * paramBlock) TWOWORDINLINE(0x7053, 0xA660);
+
+
+/*
+ SetForkPosition
+ Set the current (default) position of a fork that was
+ opened via OpenFork.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> forkRefNum The reference number of the fork
+ -> positionMode The base location for the new position
+ -> positionOffset The offset of the new position from the base
+*/
+EXTERN_API( OSErr )
+FSSetForkPosition (SInt16 forkRefNum,
+ UInt16 positionMode,
+ SInt64 positionOffset) THREEWORDINLINE(0x303C, 0x042C, 0xAA52);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBSetForkPositionSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBSetForkPositionSync (FSForkIOParam * paramBlock) TWOWORDINLINE(0x7054, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PBSetForkPositionAsync(__A0)
+ #endif
+EXTERN_API( void )
+PBSetForkPositionAsync (FSForkIOParam * paramBlock) TWOWORDINLINE(0x7054, 0xA660);
+
+
+/*
+ GetForkSize
+ Get the current logical size (end-of-file) of an open fork.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> forkRefNum The reference number of the fork
+ <- positionOffset The logical size of the fork, in bytes
+*/
+EXTERN_API( OSErr )
+FSGetForkSize (SInt16 forkRefNum,
+ SInt64 * forkSize) THREEWORDINLINE(0x303C, 0x032D, 0xAA52);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBGetForkSizeSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBGetForkSizeSync (FSForkIOParam * paramBlock) TWOWORDINLINE(0x7055, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PBGetForkSizeAsync(__A0)
+ #endif
+EXTERN_API( void )
+PBGetForkSizeAsync (FSForkIOParam * paramBlock) TWOWORDINLINE(0x7055, 0xA660);
+
+
+/*
+ SetForkSize
+ Set the logical size (end-of-file) of an open fork. This
+ may cause space to be allocated or deallocated.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> forkRefNum The reference number of the fork
+ -> positionMode The base location for the new size
+ -> positionOffset The offset of the new size from the base
+*/
+EXTERN_API( OSErr )
+FSSetForkSize (SInt16 forkRefNum,
+ UInt16 positionMode,
+ SInt64 positionOffset) THREEWORDINLINE(0x303C, 0x042E, 0xAA52);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBSetForkSizeSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBSetForkSizeSync (FSForkIOParam * paramBlock) TWOWORDINLINE(0x7056, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PBSetForkSizeAsync(__A0)
+ #endif
+EXTERN_API( void )
+PBSetForkSizeAsync (FSForkIOParam * paramBlock) TWOWORDINLINE(0x7056, 0xA660);
+
+
+/*
+ AllocateFork
+ Allocate space to an open fork. Typically, the space to be
+ allocated is beyond the current size of the fork, to reserve
+ space so the file will be able to grow later. Some volume
+ formats are unable to allocate space beyond the logical size
+ of the fork.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> forkRefNum The reference number of the fork
+ -> positionMode The base location for start of allocation
+ -> positionOffset The offset of the start of allocation
+ -> allocationFlags Zero or more of the following flags:
+ kFSAllocContiguousMask
+ Any newly allocated space must be one contiguous piece.
+ kFSAllocAllOrNothingMask
+ All of the request space must be available, or the call
+ will fail. (If not set, the call may succeed even though
+ some of the requested space wasn't allocated.)
+ kFSAllocNoRoundUpMask
+ Do not allocate additional space. (If not set, a volume
+ may allocate additional space in order to reduce fragmentation.)
+ <> allocationAmount The number of bytes to allocate
+ On output, the number of bytes actually added
+*/
+EXTERN_API( OSErr )
+FSAllocateFork (SInt16 forkRefNum,
+ FSAllocationFlags flags,
+ UInt16 positionMode,
+ SInt64 positionOffset,
+ UInt64 requestCount,
+ UInt64 * actualCount) /* can be NULL */ THREEWORDINLINE(0x303C, 0x092F, 0xAA52);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBAllocateForkSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBAllocateForkSync (FSForkIOParam * paramBlock) TWOWORDINLINE(0x7057, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PBAllocateForkAsync(__A0)
+ #endif
+EXTERN_API( void )
+PBAllocateForkAsync (FSForkIOParam * paramBlock) TWOWORDINLINE(0x7057, 0xA660);
+
+
+/*
+ FlushFork
+ Flush a fork. Any data written to this fork refnum is flushed to the device.
+ The volume's control structures are also flushed to the device.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> forkRefNum The reference number of the fork to flush
+*/
+EXTERN_API( OSErr )
+FSFlushFork (SInt16 forkRefNum) THREEWORDINLINE(0x303C, 0x0130, 0xAA52);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBFlushForkSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBFlushForkSync (FSForkIOParam * paramBlock) TWOWORDINLINE(0x7058, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PBFlushForkAsync(__A0)
+ #endif
+EXTERN_API( void )
+PBFlushForkAsync (FSForkIOParam * paramBlock) TWOWORDINLINE(0x7058, 0xA660);
+
+
+/*
+ CloseFork
+ Flush and close a fork. Any data written to this fork refnum is flushed
+ to the device. The volume's control structures are also flushed to the device.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> forkRefNum The reference number of the fork to close
+*/
+EXTERN_API( OSErr )
+FSCloseFork (SInt16 forkRefNum) THREEWORDINLINE(0x303C, 0x0131, 0xAA52);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBCloseForkSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBCloseForkSync (FSForkIOParam * paramBlock) TWOWORDINLINE(0x7059, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PBCloseForkAsync(__A0)
+ #endif
+EXTERN_API( void )
+PBCloseForkAsync (FSForkIOParam * paramBlock) TWOWORDINLINE(0x7059, 0xA660);
+
+
+/*
+ GetForkCBInfo
+ Return information about an open fork.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ <> desiredRefNum If non-zero on input, then get information for this refnum;
+ unchanged on output. If zero on input, iterate over all open
+ forks (possibly limited to a single volume); on output, contains
+ the fork's refnum.
+ -> volumeRefNum Used when desiredRefNum is zero on input. Set to 0 to iterate over all
+ volumes, or set to a FSVolumeRefNum to limit iteration to that volume.
+ <> iterator Used when desiredRefNum is zero on input. Set to 0 before iterating.
+ Pass the iterator returned by the previous call to continue iterating.
+ <- actualRefNum The refnum of the open fork.
+ <- ref The FSRef for the file or directory that contains the fork.
+ <- forkInfo Various information about the open fork.
+ <- outForkName The name of the fork
+ Note: the foundRefNum, ref, forkInfo, and fork name outputs are all optional; if you don't want
+ a particular output, then set its pointer to NULL. If forkName is NULL, then forkNameLength
+ will be undefined.
+ Note: Returning the forkInfo generally does not require a disk access. Returning the
+ ref or forkName may cause disk access for some volume formats.
+*/
+EXTERN_API( OSErr )
+FSGetForkCBInfo (SInt16 desiredRefNum,
+ FSVolumeRefNum volume,
+ SInt16 * iterator, /* can be NULL */
+ SInt16 * actualRefNum, /* can be NULL */
+ FSForkInfo * forkInfo, /* can be NULL */
+ FSRef * ref, /* can be NULL */
+ HFSUniStr255 * outForkName) /* can be NULL */ THREEWORDINLINE(0x303C, 0x0C32, 0xAA52);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBGetForkCBInfoSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBGetForkCBInfoSync (FSForkCBInfoParam * paramBlock) TWOWORDINLINE(0x705A, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PBGetForkCBInfoAsync(__A0)
+ #endif
+EXTERN_API( void )
+PBGetForkCBInfoAsync (FSForkCBInfoParam * paramBlock) TWOWORDINLINE(0x705A, 0xA660);
+
+
+/*
+ GetVolumeInfo
+ Returns various information about a given volume, or indexing over all volumes.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ <> ioVRefNum On input, the volume reference number or drive number whose
+ information is to be returned (if volumeIndex is 0); same
+ as "volume" input to FSGetVolumeInfo.
+ On output, the actual volume reference number; same as
+ "actualVolume" output of FSGetVolumeInfo.
+ -> volumeIndex The index of the desired volume, or 0 to use ioVRefNum
+ -> whichInfo Which volInfo info fields to get
+ <- volumeInfo The returned values of Volume info fields; may be NULL
+ <- name The Unicode name is returned here. This pointer may be NULL.
+ Note: All of the outputs are optional; if you don't want that particular output, just
+ set it's pointer to NULL.
+*/
+EXTERN_API( OSErr )
+FSGetVolumeInfo (FSVolumeRefNum volume,
+ ItemCount volumeIndex,
+ FSVolumeRefNum * actualVolume, /* can be NULL */
+ FSVolumeInfoBitmap whichInfo,
+ FSVolumeInfo * info, /* can be NULL */
+ HFSUniStr255 * volumeName, /* can be NULL */
+ FSRef * rootDirectory) /* can be NULL */ THREEWORDINLINE(0x303C, 0x0D33, 0xAA52);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBGetVolumeInfoSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBGetVolumeInfoSync (FSVolumeInfoParam * paramBlock) TWOWORDINLINE(0x701D, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PBGetVolumeInfoAsync(__A0)
+ #endif
+EXTERN_API( void )
+PBGetVolumeInfoAsync (FSVolumeInfoParam * paramBlock) TWOWORDINLINE(0x701D, 0xA660);
+
+
+/*
+ SetVolumeInfo
+ Set information about a given volume.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> ioVRefNum The volume whose information is to be changed
+ -> whichInfo Which catalog info fields to set
+ -> volumeInfo The new values of volume info fields
+ Note: Only some of the volume info fields may be set. The settable fields
+ are given by the constant kFSVolInfoSettableInfo; no other bits may be set in
+ whichInfo.
+*/
+EXTERN_API( OSErr )
+FSSetVolumeInfo (FSVolumeRefNum volume,
+ FSVolumeInfoBitmap whichInfo,
+ const FSVolumeInfo * info) THREEWORDINLINE(0x303C, 0x0534, 0xAA52);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PBSetVolumeInfoSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PBSetVolumeInfoSync (FSVolumeInfoParam * paramBlock) TWOWORDINLINE(0x701E, 0xA260);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PBSetVolumeInfoAsync(__A0)
+ #endif
+EXTERN_API( void )
+PBSetVolumeInfoAsync (FSVolumeInfoParam * paramBlock) TWOWORDINLINE(0x701E, 0xA660);
+
+/*
+ FSGetDataForkName
+ Returns the constant for the name of the data fork (the empty string)
+*/
+EXTERN_API( OSErr )
+FSGetDataForkName (HFSUniStr255 * dataForkName) THREEWORDINLINE(0x303C, 0x0218, 0xAA52);
+
+/*
+ FSGetResourceForkName
+ Returns the constant for the name of the resource fork
+ (currently "RESOURCE_FORK").
+*/
+EXTERN_API( OSErr )
+FSGetResourceForkName (HFSUniStr255 * resourceForkName) THREEWORDINLINE(0x303C, 0x0219, 0xAA52);
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __FILES__ */
+
diff --git a/include/qt/FindByContent.h b/include/qt/FindByContent.h
new file mode 100644
index 000000000..6da20b564
--- /dev/null
+++ b/include/qt/FindByContent.h
@@ -0,0 +1,309 @@
+/*
+ File: FindByContent.h
+
+ Contains: Public search interface for the Find by Content shared library
+
+ Version: Technology: 2.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1997-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __FINDBYCONTENT__
+#define __FINDBYCONTENT__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*
+ ***************************************************************************
+ Phase values
+ These values are passed to the client's callback function to indicate what
+ the FBC code is doing.
+ ***************************************************************************
+*/
+enum {
+ /* indexing phases*/
+ kFBCphIndexing = 0,
+ kFBCphFlushing = 1,
+ kFBCphMerging = 2,
+ kFBCphMakingIndexAccessor = 3,
+ kFBCphCompacting = 4,
+ kFBCphIndexWaiting = 5, /* access phases*/
+ kFBCphSearching = 6,
+ kFBCphMakingAccessAccessor = 7,
+ kFBCphAccessWaiting = 8, /* summarization*/
+ kFBCphSummarizing = 9, /* indexing or access*/
+ kFBCphIdle = 10,
+ kFBCphCanceling = 11
+};
+
+
+
+/*
+ ***************************************************************************
+ Pointer types
+ These point to memory allocated by the FBC shared library, and must be deallocated
+ by calls that are defined below.
+ ***************************************************************************
+*/
+
+/* A collection of state information for searching*/
+typedef struct OpaqueFBCSearchSession* FBCSearchSession;
+/* An ordinary C string (used for hit/doc terms)*/
+typedef char * FBCWordItem;
+/* An array of WordItems*/
+typedef FBCWordItem * FBCWordList;
+/*
+ ***************************************************************************
+ Callback function type for progress reporting and cancelation during
+ searching and indexing. The client's callback function should call
+ WaitNextEvent; a "sleep" value of 1 is suggested. If the callback function
+ wants to cancel the current operation (indexing, search, or doc-terms
+ retrieval) it should return true.
+ ***************************************************************************
+*/
+
+typedef CALLBACK_API_C( Boolean , FBCCallbackProcPtr )(UInt16 phase, float percentDone, void *data);
+/*
+ ***************************************************************************
+ Set the callback function for progress reporting and cancelation during
+ searching and indexing, and set the amount of heap space to reserve for
+ the client's use when FBC allocates memory.
+ ***************************************************************************
+*/
+EXTERN_API_C( void )
+FBCSetCallback (FBCCallbackProcPtr fn,
+ void * data);
+
+EXTERN_API_C( void )
+FBCSetHeapReservation (UInt32 bytes);
+
+/*
+ ***************************************************************************
+ Find out whether a volume is indexed, the date & time of its last
+ completed update, and its physical size.
+ ***************************************************************************
+*/
+
+EXTERN_API_C( Boolean )
+FBCVolumeIsIndexed (SInt16 theVRefNum);
+
+EXTERN_API_C( Boolean )
+FBCVolumeIsRemote (SInt16 theVRefNum);
+
+EXTERN_API_C( OSErr )
+FBCVolumeIndexTimeStamp (SInt16 theVRefNum,
+ UInt32 * timeStamp);
+
+EXTERN_API_C( OSErr )
+FBCVolumeIndexPhysicalSize (SInt16 theVRefNum,
+ UInt32 * size);
+
+/*
+ ***************************************************************************
+ Create & configure a search session
+ ***************************************************************************
+*/
+
+EXTERN_API_C( OSErr )
+FBCCreateSearchSession (FBCSearchSession * searchSession);
+
+EXTERN_API_C( OSErr )
+FBCAddAllVolumesToSession (FBCSearchSession theSession,
+ Boolean includeRemote);
+
+EXTERN_API_C( OSErr )
+FBCSetSessionVolumes (FBCSearchSession theSession,
+ const SInt16 vRefNums[],
+ UInt16 numVolumes);
+
+EXTERN_API_C( OSErr )
+FBCAddVolumeToSession (FBCSearchSession theSession,
+ SInt16 vRefNum);
+
+EXTERN_API_C( OSErr )
+FBCRemoveVolumeFromSession (FBCSearchSession theSession,
+ SInt16 vRefNum);
+
+EXTERN_API_C( OSErr )
+FBCGetSessionVolumeCount (FBCSearchSession theSession,
+ UInt16 * count);
+
+EXTERN_API_C( OSErr )
+FBCGetSessionVolumes (FBCSearchSession theSession,
+ SInt16 vRefNums[],
+ UInt16 * numVolumes);
+
+EXTERN_API_C( OSErr )
+FBCCloneSearchSession (FBCSearchSession original,
+ FBCSearchSession * clone);
+
+/*
+ ***************************************************************************
+ Execute a search
+ ***************************************************************************
+*/
+
+EXTERN_API_C( OSErr )
+FBCDoQuerySearch (FBCSearchSession theSession,
+ char * queryText,
+ const FSSpec targetDirs[],
+ UInt32 numTargets,
+ UInt32 maxHits,
+ UInt32 maxHitWords);
+
+EXTERN_API_C( OSErr )
+FBCDoExampleSearch (FBCSearchSession theSession,
+ const UInt32 * exampleHitNums,
+ UInt32 numExamples,
+ const FSSpec targetDirs[],
+ UInt32 numTargets,
+ UInt32 maxHits,
+ UInt32 maxHitWords);
+
+EXTERN_API_C( OSErr )
+FBCBlindExampleSearch (FSSpec examples[],
+ UInt32 numExamples,
+ const FSSpec targetDirs[],
+ UInt32 numTargets,
+ UInt32 maxHits,
+ UInt32 maxHitWords,
+ Boolean allIndexes,
+ Boolean includeRemote,
+ FBCSearchSession * theSession);
+
+
+/*
+ ***************************************************************************
+ Get information about hits [wrapper for THitItem C++ API]
+ ***************************************************************************
+*/
+
+EXTERN_API_C( OSErr )
+FBCGetHitCount (FBCSearchSession theSession,
+ UInt32 * count);
+
+EXTERN_API_C( OSErr )
+FBCGetHitDocument (FBCSearchSession theSession,
+ UInt32 hitNumber,
+ FSSpec * theDocument);
+
+EXTERN_API_C( OSErr )
+FBCGetHitScore (FBCSearchSession theSession,
+ UInt32 hitNumber,
+ float * score);
+
+EXTERN_API_C( OSErr )
+FBCGetMatchedWords (FBCSearchSession theSession,
+ UInt32 hitNumber,
+ UInt32 * wordCount,
+ FBCWordList * list);
+
+EXTERN_API_C( OSErr )
+FBCGetTopicWords (FBCSearchSession theSession,
+ UInt32 hitNumber,
+ UInt32 * wordCount,
+ FBCWordList * list);
+
+
+/*
+ ***************************************************************************
+ Summarize a buffer of text
+ ***************************************************************************
+*/
+
+EXTERN_API_C( OSErr )
+FBCSummarize (void * inBuf,
+ UInt32 inLength,
+ void * outBuf,
+ UInt32 * outLength,
+ UInt32 * numSentences);
+
+/*
+ ***************************************************************************
+ Deallocate hit lists, word arrays, and search sessions
+ ***************************************************************************
+*/
+
+EXTERN_API_C( OSErr )
+FBCReleaseSessionHits (FBCSearchSession theSession);
+
+EXTERN_API_C( OSErr )
+FBCDestroyWordList (FBCWordList theList,
+ UInt32 wordCount);
+
+EXTERN_API_C( OSErr )
+FBCDestroySearchSession (FBCSearchSession theSession);
+
+/*
+ ***************************************************************************
+ Index one or more files and/or folders
+ ***************************************************************************
+*/
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSErr )
+FBCIndexItems (FSSpecArrayPtr theItems,
+ UInt32 itemCount);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __FINDBYCONTENT__ */
+
diff --git a/include/qt/Finder.h b/include/qt/Finder.h
new file mode 100644
index 000000000..ba3f717ea
--- /dev/null
+++ b/include/qt/Finder.h
@@ -0,0 +1,385 @@
+/*
+ File: Finder.h
+
+ Contains: Finder flags and container types.
+
+ Version: Technology: Mac OS 8.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1990-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __FINDER__
+#define __FINDER__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* Creator and type of clipping files */
+enum {
+ kClippingCreator = FOUR_CHAR_CODE('drag'),
+ kClippingPictureType = FOUR_CHAR_CODE('clpp'),
+ kClippingTextType = FOUR_CHAR_CODE('clpt'),
+ kClippingSoundType = FOUR_CHAR_CODE('clps'),
+ kClippingUnknownType = FOUR_CHAR_CODE('clpu')
+};
+
+
+/* Creator and type of Internet Location files */
+enum {
+ kInternetLocationCreator = FOUR_CHAR_CODE('drag'),
+ kInternetLocationHTTP = FOUR_CHAR_CODE('ilht'),
+ kInternetLocationFTP = FOUR_CHAR_CODE('ilft'),
+ kInternetLocationFile = FOUR_CHAR_CODE('ilfi'),
+ kInternetLocationMail = FOUR_CHAR_CODE('ilma'),
+ kInternetLocationNNTP = FOUR_CHAR_CODE('ilnw'),
+ kInternetLocationAFP = FOUR_CHAR_CODE('ilaf'),
+ kInternetLocationAppleTalk = FOUR_CHAR_CODE('ilat'),
+ kInternetLocationNSL = FOUR_CHAR_CODE('ilns'),
+ kInternetLocationGeneric = FOUR_CHAR_CODE('ilge')
+};
+
+
+
+enum {
+ kCustomIconResource = -16455 /* Custom icon family resource ID */
+};
+
+/* In order to specify any of the information described in the */
+/* CustomBadgeResource data structure you must clear the kExtendedFlagsAreInvalid */
+/* and set kExtendedFlagHasCustomBadge of the FXInfo.fdXFlags or DXInfo.frXFlags field, */
+/* and add a resource of type kCustomBadgeResourceType and ID kCustomBadgeResourceID to */
+/* the file or to the "Icon/n" file for a folder */
+enum {
+ kCustomBadgeResourceType = FOUR_CHAR_CODE('badg'),
+ kCustomBadgeResourceID = kCustomIconResource,
+ kCustomBadgeResourceVersion = 0
+};
+
+
+struct CustomBadgeResource {
+ SInt16 version; /* This is version kCustomBadgeResourceVersion*/
+ SInt16 customBadgeResourceID; /* If not 0, the ID of a resource to use on top*/
+ /* of the icon for this file or folder*/
+ OSType customBadgeType; /* If not 0, the type and creator of an icon*/
+ OSType customBadgeCreator; /* to use on top of the icon*/
+ OSType windowBadgeType; /* If not 0, the type and creator of an icon*/
+ OSType windowBadgeCreator; /* to display in the header of the window for this */
+ /* file or folder*/
+ OSType overrideType; /* If not 0, the type and creator of an icon to*/
+ OSType overrideCreator; /* use INSTEAD of the icon for this file or folder*/
+};
+typedef struct CustomBadgeResource CustomBadgeResource;
+typedef CustomBadgeResource * CustomBadgeResourcePtr;
+typedef CustomBadgeResourcePtr * CustomBadgeResourceHandle;
+/* You can specify routing information for a file by including a 'rout' 0
+ resource in it and setting the kExtendedFlagHasRoutingInfo bit in the extended
+ Finder flags.
+ The 'rout' resource is an array of RoutingResourceEntry. Each entry is considered
+ in turn. The first matching entry is used.
+ If the creator and fileType match the file being dropped and targetFolder match
+ the folder ID of the folder being dropped onto, then the file is rerouted
+ into the specified destination folder.
+ The only target folder currently supported is the system folder,
+ kSystemFolderType = 'macs'.
+*/
+enum {
+ kRoutingResourceType = FOUR_CHAR_CODE('rout'),
+ kRoutingResourceID = 0
+};
+
+
+struct RoutingResourceEntry {
+ OSType creator; /* Use '****' or 0 to match any creator */
+ OSType fileType; /* Use '****' or 0 to match any file type */
+ OSType targetFolder; /* Folder ID of the folder this file was dropped onto */
+ OSType destinationFolder; /* Folder that the source will be routed to */
+ OSType reservedField; /* Set to 0 */
+};
+typedef struct RoutingResourceEntry RoutingResourceEntry;
+
+typedef RoutingResourceEntry * RoutingResourcePtr;
+typedef RoutingResourcePtr * RoutingResourceHandle;
+
+/* Types for special container aliases */
+enum {
+ kContainerFolderAliasType = FOUR_CHAR_CODE('fdrp'), /* type for folder aliases */
+ kContainerTrashAliasType = FOUR_CHAR_CODE('trsh'), /* type for trash folder aliases */
+ kContainerHardDiskAliasType = FOUR_CHAR_CODE('hdsk'), /* type for hard disk aliases */
+ kContainerFloppyAliasType = FOUR_CHAR_CODE('flpy'), /* type for floppy aliases */
+ kContainerServerAliasType = FOUR_CHAR_CODE('srvr'), /* type for server aliases */
+ kApplicationAliasType = FOUR_CHAR_CODE('adrp'), /* type for application aliases */
+ kContainerAliasType = FOUR_CHAR_CODE('drop'), /* type for all other containers */
+ kDesktopPrinterAliasType = FOUR_CHAR_CODE('dtpa'), /* type for Desktop Printer alias */
+ kContainerCDROMAliasType = FOUR_CHAR_CODE('cddr'), /* type for CD-ROM alias */
+ kApplicationCPAliasType = FOUR_CHAR_CODE('acdp'), /* type for application control panel alias */
+ kApplicationDAAliasType = FOUR_CHAR_CODE('addp'), /* type for application DA alias */
+ kPackageAliasType = FOUR_CHAR_CODE('fpka'), /* type for plain package alias */
+ kAppPackageAliasType = FOUR_CHAR_CODE('fapa') /* type for application package alias */
+};
+
+/* Types for Special folder aliases */
+enum {
+ kSystemFolderAliasType = FOUR_CHAR_CODE('fasy'),
+ kAppleMenuFolderAliasType = FOUR_CHAR_CODE('faam'),
+ kStartupFolderAliasType = FOUR_CHAR_CODE('fast'),
+ kPrintMonitorDocsFolderAliasType = FOUR_CHAR_CODE('fapn'),
+ kPreferencesFolderAliasType = FOUR_CHAR_CODE('fapf'),
+ kControlPanelFolderAliasType = FOUR_CHAR_CODE('fact'),
+ kExtensionFolderAliasType = FOUR_CHAR_CODE('faex')
+};
+
+/* Types for AppleShare folder aliases */
+enum {
+ kExportedFolderAliasType = FOUR_CHAR_CODE('faet'),
+ kDropFolderAliasType = FOUR_CHAR_CODE('fadr'),
+ kSharedFolderAliasType = FOUR_CHAR_CODE('fash'),
+ kMountedFolderAliasType = FOUR_CHAR_CODE('famn')
+};
+
+/* Finder flags (finderFlags, fdFlags and frFlags) */
+/* Any flag reserved or not specified should be set to 0. */
+/* If a flag applies to a file, but not to a folder, make sure to check */
+/* that the item is not a folder by checking ((ParamBlockRec.ioFlAttrib & ioDirMask) == 0) */
+enum {
+ kIsOnDesk = 0x0001, /* Files and folders (System 6) */
+ kColor = 0x000E, /* Files and folders */
+ /* bit 0x0020 was kRequireSwitchLaunch, but is now reserved for future use*/
+ kIsShared = 0x0040, /* Files only (Applications only) */
+ /* If clear, the application needs to write to */
+ /* its resource fork, and therefore cannot be */
+ /* shared on a server */
+ kHasNoINITs = 0x0080, /* Files only (Extensions/Control Panels only) */
+ /* This file contains no INIT resource */
+ kHasBeenInited = 0x0100, /* Files only */
+ /* Clear if the file contains desktop database */
+ /* resources ('BNDL', 'FREF', 'open', 'kind'...) */
+ /* that have not been added yet. Set only by the Finder */
+ /* Reserved for folders - make sure this bit is cleared for folders */
+ /* bit 0x0200 was the letter bit for AOCE, but is now reserved for future use */
+ kHasCustomIcon = 0x0400, /* Files and folders */
+ kIsStationery = 0x0800, /* Files only */
+ kNameLocked = 0x1000, /* Files and folders */
+ kHasBundle = 0x2000, /* Files only */
+ kIsInvisible = 0x4000, /* Files and folders */
+ kIsAlias = 0x8000 /* Files only */
+};
+
+/* Obsolete. Use names defined above. */
+enum {
+ fOnDesk = kIsOnDesk,
+ fHasBundle = kHasBundle,
+ fInvisible = kIsInvisible
+};
+
+/* Obsolete */
+enum {
+ fTrash = -3,
+ fDesktop = -2,
+ fDisk = 0
+};
+
+#if OLDROUTINENAMES
+enum {
+ kIsStationary = kIsStationery
+};
+
+#endif /* OLDROUTINENAMES */
+
+/* Extended flags (extendedFinderFlags, fdXFlags and frXFlags) */
+/* Any flag not specified should be set to 0. */
+enum {
+ kExtendedFlagsAreInvalid = 0x8000, /* If set the other extended flags are ignored */
+ kExtendedFlagHasCustomBadge = 0x0100, /* Set if the file or folder has a badge resource */
+ kExtendedFlagHasRoutingInfo = 0x0004 /* Set if the file contains routing info resource */
+};
+
+
+
+/* Use a filetype in this range to indicate that a file is temporarily busy */
+/* (while it is being downloaded or installed, for example). This prevents */
+/* Finder 8.5 and later from trying to change the item's attributes before it */
+/* is fully created. -- If you provide a series of 'BNDL' icons for your creator */
+/* and some of these filetypes, you can achieve limited icon animation while */
+/* the file creation progresses. */
+enum {
+ kFirstMagicBusyFiletype = FOUR_CHAR_CODE('bzy '),
+ kLastMagicBusyFiletype = FOUR_CHAR_CODE('bzy?')
+};
+
+/* Use this date as a file's or folder's creation date to indicate that it is */
+/* temporarily busy (while it is being downloaded or installed, for example). */
+/* This prevents Finder from trying to change the item's attributes before it */
+/* is fully created (Finder 8.5 and 8.6 check file creation dates; later Finders */
+/* may check folder creation dates as well). */
+enum {
+ kMagicBusyCreationDate = 0x4F3AFDB0
+};
+
+
+/*------------------------------------------------------------------------*/
+/*
+ The following data structures are binary compatible with FInfo, DInfo,
+ FXInfo and DXInfo but represent the Mac OS 8 semantic of the fields.
+ Use these data structures preferably to FInfo, etc...
+*/
+/*------------------------------------------------------------------------*/
+
+
+struct FileInfo {
+ OSType fileType; /* The type of the file */
+ OSType fileCreator; /* The file's creator */
+ UInt16 finderFlags; /* ex: kHasBundle, kIsInvisible... */
+ Point location; /* File's location in the folder */
+ /* If set to {0, 0}, the Finder will place the item automatically */
+ UInt16 reservedField; /* (set to 0) */
+};
+typedef struct FileInfo FileInfo;
+
+struct FolderInfo {
+ Rect windowBounds; /* The position and dimension of the folder's window */
+ UInt16 finderFlags; /* ex. kIsInvisible, kNameLocked, etc.*/
+ Point location; /* Folder's location in the parent folder */
+ /* If set to {0, 0}, the Finder will place the item automatically */
+ UInt16 reservedField; /* (set to 0) */
+};
+typedef struct FolderInfo FolderInfo;
+
+struct ExtendedFileInfo {
+ SInt16 reserved1[4]; /* Reserved (set to 0) */
+ UInt16 extendedFinderFlags; /* Extended flags (custom badge, routing info...) */
+ SInt16 reserved2; /* Reserved (set to 0). Comment ID if high-bit is clear */
+ SInt32 putAwayFolderID; /* Put away folder ID */
+};
+typedef struct ExtendedFileInfo ExtendedFileInfo;
+
+struct ExtendedFolderInfo {
+ Point scrollPosition; /* Scroll position (for icon views) */
+ SInt32 reserved1; /* Reserved (set to 0) */
+ UInt16 extendedFinderFlags; /* Extended flags (custom badge, routing info...) */
+ SInt16 reserved2; /* Reserved (set to 0). Comment ID if high-bit is clear */
+ SInt32 putAwayFolderID; /* Put away folder ID */
+};
+typedef struct ExtendedFolderInfo ExtendedFolderInfo;
+/*------------------------------------------------------------------------*/
+/*
+ The following data structures are here for compatibility.
+ Use the new data structures replacing them if possible (i.e. FileInfo
+ instead of FInfo, etc...)
+*/
+/*------------------------------------------------------------------------*/
+/* File info */
+/*
+ IMPORTANT:
+ In MacOS 8, the fdFldr field has become reserved for the Finder.
+*/
+
+struct FInfo {
+ OSType fdType; /* The type of the file */
+ OSType fdCreator; /* The file's creator */
+ UInt16 fdFlags; /* Flags ex. kHasBundle, kIsInvisible, etc. */
+ Point fdLocation; /* File's location in folder. */
+ /* If set to {0, 0}, the Finder will place the item automatically */
+ SInt16 fdFldr; /* Reserved (set to 0) */
+};
+typedef struct FInfo FInfo;
+/* Extended file info */
+/*
+ IMPORTANT:
+ In MacOS 8, the fdIconID and fdComment fields were changed
+ to become reserved fields for the Finder.
+ The fdScript has become an extended flag.
+*/
+
+struct FXInfo {
+ SInt16 fdIconID; /* Reserved (set to 0) */
+ SInt16 fdReserved[3]; /* Reserved (set to 0) */
+ SInt8 fdScript; /* Extended flags. Script code if high-bit is set */
+ SInt8 fdXFlags; /* Extended flags */
+ SInt16 fdComment; /* Reserved (set to 0). Comment ID if high-bit is clear */
+ SInt32 fdPutAway; /* Put away folder ID */
+};
+typedef struct FXInfo FXInfo;
+/* Folder info */
+/*
+ IMPORTANT:
+ In MacOS 8, the frView field was changed to become reserved
+ field for the Finder.
+*/
+
+struct DInfo {
+ Rect frRect; /* Folder's window bounds */
+ UInt16 frFlags; /* Flags ex. kIsInvisible, kNameLocked, etc.*/
+ Point frLocation; /* Folder's location in parent folder */
+ /* If set to {0, 0}, the Finder will place the item automatically */
+ SInt16 frView; /* Reserved (set to 0) */
+};
+typedef struct DInfo DInfo;
+/* Extended folder info */
+/*
+ IMPORTANT:
+ In MacOS 8, the frOpenChain and frComment fields were changed
+ to become reserved fields for the Finder.
+ The frScript has become an extended flag.
+*/
+
+struct DXInfo {
+ Point frScroll; /* Scroll position */
+ SInt32 frOpenChain; /* Reserved (set to 0) */
+ SInt8 frScript; /* Extended flags. Script code if high-bit is set */
+ SInt8 frXFlags; /* Extended flags */
+ SInt16 frComment; /* Reserved (set to 0). Comment ID if high-bit is clear */
+ SInt32 frPutAway; /* Put away folder ID */
+};
+typedef struct DXInfo DXInfo;
+/* ControlPanelDefProcPtr and cdev constants have all been moved to Processes.i*/
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __FINDER__ */
+
diff --git a/include/qt/FinderRegistry.h b/include/qt/FinderRegistry.h
new file mode 100644
index 000000000..193b195c9
--- /dev/null
+++ b/include/qt/FinderRegistry.h
@@ -0,0 +1,759 @@
+/*
+ File: FinderRegistry.h
+
+ Contains: Data types for Finder AppleEvents
+
+ Version: Technology: Mac OS 8
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __FINDERREGISTRY__
+#define __FINDERREGISTRY__
+
+#ifndef __AEREGISTRY__
+#include "AERegistry.h"
+#endif
+
+#ifndef __OSA__
+#include "OSA.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+
+/*
+ //////////////////////////////////////
+ Finder Suite
+ //////////////////////////////////////
+*/
+
+/*
+ The old Finder Event suite was 'FNDR'
+ The new suite is 'fndr'
+*/
+enum {
+ kAEFinderSuite = FOUR_CHAR_CODE('fndr')
+};
+
+/*
+ //////////////////////////////////////
+ Finder Events
+ //////////////////////////////////////
+*/
+enum {
+ kAECleanUp = FOUR_CHAR_CODE('fclu'),
+ kAEEject = FOUR_CHAR_CODE('ejct'),
+ kAEEmpty = FOUR_CHAR_CODE('empt'),
+ kAEErase = FOUR_CHAR_CODE('fera'),
+ kAEGestalt = FOUR_CHAR_CODE('gstl'),
+ kAEPutAway = FOUR_CHAR_CODE('ptwy'),
+ kAERebuildDesktopDB = FOUR_CHAR_CODE('rddb'),
+ kAESync = FOUR_CHAR_CODE('fupd'),
+ kAEInterceptOpen = FOUR_CHAR_CODE('fopn')
+};
+
+/* "Sort" from the database suite:*/
+enum {
+ kAEDatabaseSuite = FOUR_CHAR_CODE('DATA'),
+ kAESort = FOUR_CHAR_CODE('SORT')
+};
+
+/*
+ ////////////////////////////////////////////////////////////////////////
+ Classes
+ Note: all classes are defined up front so that the property definitions
+ can reference classes.
+ ////////////////////////////////////////////////////////////////////////
+*/
+
+enum {
+ cInternalFinderObject = FOUR_CHAR_CODE('obj ') /* cReference - used to distinguish objects used inside the Finder only*/
+};
+
+/*
+ Main Finder class definitions
+ Indentation implies object model hierarchy
+*/
+enum {
+ /* We do not use class cItem from AERegistry.r. Instead our class Item is a cObject*/
+ /* cItem = 'citm', // defined in AERegistry.r*/
+ /* cFile = 'file', // defined in AERegistry.r*/
+ cAliasFile = FOUR_CHAR_CODE('alia'),
+ cApplicationFile = FOUR_CHAR_CODE('appf'),
+ cControlPanelFile = FOUR_CHAR_CODE('ccdv'),
+ cDeskAccessoryFile = FOUR_CHAR_CODE('dafi'),
+ cDocumentFile = FOUR_CHAR_CODE('docf'),
+ cFontFile = FOUR_CHAR_CODE('fntf'),
+ cSoundFile = FOUR_CHAR_CODE('sndf'),
+ cClippingFile = FOUR_CHAR_CODE('clpf'),
+ cContainer = FOUR_CHAR_CODE('ctnr'),
+ cDesktop = FOUR_CHAR_CODE('cdsk'),
+ cSharableContainer = FOUR_CHAR_CODE('sctr'),
+ cDisk = FOUR_CHAR_CODE('cdis'),
+ cFolder = FOUR_CHAR_CODE('cfol'),
+ cSuitcase = FOUR_CHAR_CODE('stcs'),
+ cAccessorySuitcase = FOUR_CHAR_CODE('dsut'),
+ cFontSuitcase = FOUR_CHAR_CODE('fsut'),
+ cTrash = FOUR_CHAR_CODE('ctrs'),
+ cDesktopPrinter = FOUR_CHAR_CODE('dskp'),
+ cPackage = FOUR_CHAR_CODE('pack'),
+ cContentSpace = FOUR_CHAR_CODE('dwnd'), /* cWindow = 'cwin', // defined in AERegistry.r*/
+ cContainerWindow = FOUR_CHAR_CODE('cwnd'),
+ cInfoWindow = FOUR_CHAR_CODE('iwnd'),
+ cSharingWindow = FOUR_CHAR_CODE('swnd'),
+ cStatusWindow = FOUR_CHAR_CODE('qwnd'),
+ cClippingWindow = FOUR_CHAR_CODE('lwnd'),
+ cPreferencesWindow = FOUR_CHAR_CODE('pwnd'),
+ cDTPWindow = FOUR_CHAR_CODE('dtpw'),
+ cProcess = FOUR_CHAR_CODE('prcs'),
+ cAccessoryProcess = FOUR_CHAR_CODE('pcda'),
+ cApplicationProcess = FOUR_CHAR_CODE('pcap'),
+ cGroup = FOUR_CHAR_CODE('sgrp'),
+ cUser = FOUR_CHAR_CODE('cuse'), /* cApplication = 'capp', // defined in AERegistry.r*/
+ cSharingPrivileges = FOUR_CHAR_CODE('priv'),
+ cPreferences = FOUR_CHAR_CODE('cprf'),
+ cLabel = FOUR_CHAR_CODE('clbl'),
+ cSound = FOUR_CHAR_CODE('snd '),
+ cAliasList = FOUR_CHAR_CODE('alst'),
+ cSpecialFolders = FOUR_CHAR_CODE('spfl'), /* For use by viewer search engines:*/
+ cOnlineDisk = FOUR_CHAR_CODE('cods'),
+ cOnlineLocalDisk = FOUR_CHAR_CODE('clds'),
+ cOnlineRemoteDisk = FOUR_CHAR_CODE('crds'), /* Miscellaneous class definitions*/
+ cEntireContents = FOUR_CHAR_CODE('ects'),
+ cIconFamily = FOUR_CHAR_CODE('ifam')
+};
+
+
+/*
+ //////////////////////////////////////
+ Properties
+ //////////////////////////////////////
+*/
+
+/* Properties of class cItem (really cObject)*/
+enum {
+ /* pBounds = 'pbnd', // defined in AERegistry.r*/
+ pComment = FOUR_CHAR_CODE('comt'),
+ pContainer = cContainer,
+ pContentSpace = cContentSpace,
+ pCreationDateOld = FOUR_CHAR_CODE('crtd'), /* to support pre-Finder 8 scripts*/
+ pCreationDate = FOUR_CHAR_CODE('ascd'), /* from File Commands OSAX*/
+ pDescription = FOUR_CHAR_CODE('dscr'),
+ pDisk = cDisk,
+ pFolderOld = cFolder, /* to support pre-Finder 8 scripts*/
+ pFolder = FOUR_CHAR_CODE('asdr'), /* from File Commands OSAX*/
+ pIconBitmap = FOUR_CHAR_CODE('iimg'), /* pID = 'ID ', // defined in AERegistry.r*/
+ pInfoWindow = cInfoWindow,
+ pKind = FOUR_CHAR_CODE('kind'),
+ pLabelIndex = FOUR_CHAR_CODE('labi'),
+ pModificationDateOld = FOUR_CHAR_CODE('modd'), /* to support pre-Finder 8 scripts*/
+ pModificationDate = FOUR_CHAR_CODE('asmo'), /* from File Commands OSAX*/
+ /* pName = 'pnam', // defined in AERegistry.r*/
+ pPhysicalSize = FOUR_CHAR_CODE('phys'),
+ pPosition = FOUR_CHAR_CODE('posn'),
+ pIsSelected = FOUR_CHAR_CODE('issl'),
+ pSize = pPointSize, /* pPointSize defined in AERegistry.r*/
+ pWindow = cWindow,
+ pPreferencesWindow = cPreferencesWindow
+};
+
+
+/* Properties of class cFile (subclass of cItem)*/
+enum {
+ pFileCreator = FOUR_CHAR_CODE('fcrt'),
+ pFileType = FOUR_CHAR_CODE('asty'), /* from File Commands OSAX*/
+ pFileTypeOld = FOUR_CHAR_CODE('fitp'), /* to support pre-Finder 8 scripts*/
+ pIsLocked = FOUR_CHAR_CODE('aslk'), /* from File Commands OSAX*/
+ pIsLockedOld = FOUR_CHAR_CODE('islk'), /* to support pre-Finder 8 scripts*/
+ /* pIsStationeryPad = 'pspd', // defined in AERegistry.r */
+ /* pVersion = 'vers', // defined in AERegistry.r*/
+ pProductVersion = FOUR_CHAR_CODE('ver2')
+};
+
+
+/* Properties of class cAliasFile (subclass of cFile)*/
+enum {
+ pOriginalItem = FOUR_CHAR_CODE('orig')
+};
+
+/* Properties of class cApplicationFile (subclass of cFile)*/
+enum {
+ pMinAppPartition = FOUR_CHAR_CODE('mprt'),
+ pAppPartition = FOUR_CHAR_CODE('appt'),
+ pSuggestedAppPartition = FOUR_CHAR_CODE('sprt'),
+ pIsScriptable = FOUR_CHAR_CODE('isab')
+};
+
+/* Properties of class cURLFile (subclass of cFile)*/
+enum {
+ pInternetLocation = FOUR_CHAR_CODE('iloc')
+};
+
+/* Properties of class cSoundFile (subclass of cFile)*/
+enum {
+ pSound = FOUR_CHAR_CODE('snd ')
+};
+
+
+/*
+ Properties of class cControlPanel (Views CP only) (subclass of cFile)
+ Note: the other view-like preference settings are not available in the Views
+ control panel. These properties are only offered here for backward compatability.
+ To set the full range of Finder Preferences, use the Preferences object.
+*/
+enum {
+ pShowFolderSize = FOUR_CHAR_CODE('sfsz'), /* Moved to a per-folder basis in Finder 8.0 HIS*/
+ pShowComment = FOUR_CHAR_CODE('scom'), /* Moved to a per-folder basis in Finder 8.0 HIS*/
+ pShowDate = FOUR_CHAR_CODE('sdat'), /* Moved to a per-folder basis in Finder 8.0 HIS*/
+ pShowCreationDate = FOUR_CHAR_CODE('scda'), /* Moved to a per-folder basis in Finder 8.0 HIS*/
+ pShowKind = FOUR_CHAR_CODE('sknd'), /* Moved to a per-folder basis in Finder 8.0 HIS*/
+ pShowLabel = FOUR_CHAR_CODE('slbl'), /* Moved to a per-folder basis in Finder 8.0 HIS*/
+ pShowSize = FOUR_CHAR_CODE('ssiz'), /* Moved to a per-folder basis in Finder 8.0 HIS*/
+ pShowVersion = FOUR_CHAR_CODE('svrs'), /* Moved to a per-folder basis in Finder 8.0 HIS*/
+ pSortDirection = FOUR_CHAR_CODE('sord'),
+ pShowDiskInfo = FOUR_CHAR_CODE('sdin'), /* Always on in Finder 8.0 HIS*/
+ pListViewIconSize = FOUR_CHAR_CODE('lvis'), /* Moved to a per-folder basis in Finder 8.0 HIS*/
+ pGridIcons = FOUR_CHAR_CODE('fgrd'), /* Moved to a per-folder basis in Finder 8.0 HIS*/
+ pStaggerIcons = FOUR_CHAR_CODE('fstg'), /* No longer part of the Finder 8.0 HIS*/
+ pViewFont = FOUR_CHAR_CODE('vfnt'),
+ pViewFontSize = FOUR_CHAR_CODE('vfsz')
+};
+
+/* Properties of class cContainer (subclass of cItem)*/
+enum {
+ pCompletelyExpanded = FOUR_CHAR_CODE('pexc'),
+ pContainerWindow = cContainerWindow,
+ pEntireContents = cEntireContents,
+ pExpandable = FOUR_CHAR_CODE('pexa'),
+ pExpanded = FOUR_CHAR_CODE('pexp'),
+ pPreviousView = FOUR_CHAR_CODE('svew'), /* pSelection = 'sele', // defined in AERegistry.r*/
+ pView = FOUR_CHAR_CODE('pvew'),
+ pIconSize = pListViewIconSize, /* defined above*/
+ pKeepArranged = FOUR_CHAR_CODE('arrg'), /* OBSOLETE in Finder 9 or later*/
+ pKeepArrangedBy = FOUR_CHAR_CODE('arby') /* OBSOLETE in Finder 9 or later*/
+};
+
+/* Properties of class cDesktop (subclass of cContainer)*/
+enum {
+ pStartupDisk = FOUR_CHAR_CODE('sdsk'),
+ pTrash = FOUR_CHAR_CODE('trsh')
+};
+
+/* Properties of class cSharableContainer (subclass of cContainer)*/
+enum {
+ pOwner = FOUR_CHAR_CODE('sown'),
+ pOwnerPrivileges = FOUR_CHAR_CODE('ownr'),
+ pGroup = cGroup,
+ pGroupPrivileges = FOUR_CHAR_CODE('gppr'),
+ pGuestPrivileges = FOUR_CHAR_CODE('gstp'),
+ pArePrivilegesInherited = FOUR_CHAR_CODE('iprv'),
+ pExported = FOUR_CHAR_CODE('sexp'),
+ pMounted = FOUR_CHAR_CODE('smou'),
+ pSharingProtection = FOUR_CHAR_CODE('spro'),
+ pSharing = FOUR_CHAR_CODE('shar'),
+ pSharingWindow = cSharingWindow
+};
+
+/* Properties of class cDisk (subclass of cSharableContainer)*/
+enum {
+ pCapacity = FOUR_CHAR_CODE('capa'),
+ pEjectable = FOUR_CHAR_CODE('isej'),
+ pFreeSpace = FOUR_CHAR_CODE('frsp'),
+ pLocal = FOUR_CHAR_CODE('isrv'),
+ pIsStartup = FOUR_CHAR_CODE('istd')
+};
+
+/* Properties of class cTrash (subclass of cSharableContainer)*/
+enum {
+ pWarnOnEmpty = FOUR_CHAR_CODE('warn')
+};
+
+/* Properties of class cWindow (subclass of cContentSpace)*/
+enum {
+ /* pBounds = 'pbnd', // defined in AERegistry.r*/
+ /* pHasCloseBox = 'hclb', // defined in AERegistry.r*/
+ /* pIsFloating = 'isfl', // defined in AERegistry.r*/
+ /* pIndex = 'pidx', // defined in AERegistry.r*/
+ /* pIsModal = 'pmod', // defined in AERegistry.r*/
+ /* pPosition = 'posn', // defined above*/
+ /* pIsResizable = 'prsz', // defined in AERegistry.r*/
+ /* pHasTitleBar = 'ptit', // defined in AERegistry.r*/
+ /* pVisible = 'pvis', // defined in AERegistry.r*/
+ /* pIsZoomable = 'iszm', // defined in AERegistry.r*/
+ /* pIsZoomed = 'pzum', // defined in AERegistry.r*/
+ pIsZoomedFull = FOUR_CHAR_CODE('zumf'),
+ pIsPopup = FOUR_CHAR_CODE('drwr'),
+ pIsPulledOpen = FOUR_CHAR_CODE('pull'), /* only applies to popup windows*/
+ pIsCollapsed = FOUR_CHAR_CODE('wshd') /* only applies to normal windows*/
+};
+
+/* Properties of class cContainerWindow (subclass of cWindow)*/
+enum {
+ pObject = cObject
+};
+
+/* Properties of class cSharingWindow (subclass of cWindow)*/
+enum {
+ pSharableContainer = cSharableContainer
+};
+
+/* Properties of class cInfoWindow (subclass of cWindow)*/
+enum {
+ pInfoPanel = FOUR_CHAR_CODE('panl')
+};
+
+
+/* Properties of networking support*/
+enum {
+ pFileShareOn = FOUR_CHAR_CODE('fshr'),
+ pFileShareStartingUp = FOUR_CHAR_CODE('fsup'),
+ pProgramLinkingOn = FOUR_CHAR_CODE('iac ')
+};
+
+/* Properties of class cPreferencesWindow (subclass of cWindow)*/
+enum {
+ /* pShowFolderSize = 'sfsz', // defined above for Views CP*/
+ /* pShowComment = 'scom', // defined above for Views CP*/
+ pShowModificationDate = pShowDate, /* pShowDate defined above for Views CP*/
+ /* pShowKind = 'sknd', // defined above for Views CP*/
+ /* pShowLabel = 'slbl', // defined above for Views CP*/
+ /* pShowSize = 'ssiz', // defined above for Views CP*/
+ /* pShowVersion = 'svrs', // defined above for Views CP*/
+ /* pShowCreationDate = 'scda', // Removed from Finder 8.0 HIS*/
+ /* pShowFileType = 'sfty', // Removed from Finder 8.0 HIS*/
+ /* pShowFileCreator = 'sfcr', // Removed from Finder 8.0 HIS*/
+ /* pListViewIconSize = 'lvis', // defined above for Views CP*/
+ /* pGridIcons = 'fgrd', // defined above for Views CP*/
+ /* pStaggerIcons = 'fstg', // defined above for Views CP*/
+ /* pViewFont = 'vfnt', // defined above for Views CP*/
+ /* pViewFontSize = 'vfsz', // defined above for Views CP*/
+ pUseRelativeDate = FOUR_CHAR_CODE('urdt'), /* Moved to a per-folder basis in Finder 8.0 HIS*/
+ pDelayBeforeSpringing = FOUR_CHAR_CODE('dela'),
+ pSpringOpenFolders = FOUR_CHAR_CODE('sprg'),
+ pUseShortMenus = FOUR_CHAR_CODE('usme'),
+ pUseWideGrid = FOUR_CHAR_CODE('uswg'),
+ pLabel1 = FOUR_CHAR_CODE('lbl1'),
+ pLabel2 = FOUR_CHAR_CODE('lbl2'),
+ pLabel3 = FOUR_CHAR_CODE('lbl3'),
+ pLabel4 = FOUR_CHAR_CODE('lbl4'),
+ pLabel5 = FOUR_CHAR_CODE('lbl5'),
+ pLabel6 = FOUR_CHAR_CODE('lbl6'),
+ pLabel7 = FOUR_CHAR_CODE('lbl7'),
+ pDefaultIconViewIconSize = FOUR_CHAR_CODE('iisz'),
+ pDefaultButtonViewIconSize = FOUR_CHAR_CODE('bisz'),
+ pDefaultListViewIconSize = FOUR_CHAR_CODE('lisz'), /* old use of this name is now pIconSize*/
+ pIconViewArrangement = FOUR_CHAR_CODE('iarr'),
+ pButtonViewArrangement = FOUR_CHAR_CODE('barr')
+};
+
+/*
+ The next bunch are the various arrangements that make up
+ enumArrangement
+*/
+enum {
+ pNoArrangement = FOUR_CHAR_CODE('narr'),
+ pSnapToGridArrangement = FOUR_CHAR_CODE('grda'),
+ pByNameArrangement = FOUR_CHAR_CODE('nama'),
+ pByModificationDateArrangement = FOUR_CHAR_CODE('mdta'),
+ pByCreationDateArrangement = FOUR_CHAR_CODE('cdta'),
+ pBySizeArrangement = FOUR_CHAR_CODE('siza'),
+ pByKindArrangement = FOUR_CHAR_CODE('kina'),
+ pByLabelArrangement = FOUR_CHAR_CODE('laba')
+};
+
+/* #define pObject cObject // defined above*/
+
+/* Properties of class cProcess (subclass of cObject)*/
+enum {
+ /* pName = 'pnam', // defined in AERegistry.r*/
+ pFile = cFile, /* pCreatorType = 'fcrt', // defined above*/
+ /* pFileType = 'asty', // defined above*/
+ /* pIsFrontProcess = 'pisf', // defined in AERegistry.r*/
+ /* pAppPartition = 'appt', // defined above*/
+ pPartitionSpaceUsed = FOUR_CHAR_CODE('pusd'), /* pIsScriptable = 'isab', // defined in AERegistry.r*/
+ /* pVisible = 'pvis' // defined in AERegistry.r*/
+ pLocalAndRemoteEvents = FOUR_CHAR_CODE('revt'),
+ pHasScriptingTerminology = FOUR_CHAR_CODE('hscr')
+};
+
+/* Properties of class cAccessoryProcess (subclass of cProcess)*/
+enum {
+ pDeskAccessoryFile = cDeskAccessoryFile
+};
+
+/* Properties of class cApplicationProcess (subclass of cProcess)*/
+enum {
+ pApplicationFile = cApplicationFile
+};
+
+/*
+ Properties of class cGroup (subclass of cObject)
+ enum {
+ pBounds
+ pIconBitmap
+ pLabelIndex
+ pName
+ pPosition
+ pWindow = cWindow // defined above
+ };
+*/
+
+/* Properties of class cUser (subclass of cObject)*/
+enum {
+ /* pBounds*/
+ /* pIconBitmap*/
+ /* pLabelIndex*/
+ /* pName*/
+ /* pPosition*/
+ /* pWindow = cWindow, // defined above*/
+ pCanConnect = FOUR_CHAR_CODE('ccon'),
+ pCanChangePassword = FOUR_CHAR_CODE('ccpw'),
+ pCanDoProgramLinking = FOUR_CHAR_CODE('ciac'),
+ pIsOwner = FOUR_CHAR_CODE('isow'),
+ pARADialIn = FOUR_CHAR_CODE('arad'),
+ pShouldCallBack = FOUR_CHAR_CODE('calb'),
+ pCallBackNumber = FOUR_CHAR_CODE('cbnm')
+};
+
+/*
+ Properties of class cApplication (subclass of cObject)
+ NOTE: properties for the special folders must match their respective kXXXFolderType constants
+*/
+enum {
+ pAboutMacintosh = FOUR_CHAR_CODE('abbx'),
+ pAppleMenuItemsFolder = FOUR_CHAR_CODE('amnu'), /* kAppleMenuFolderType*/
+ /* pClipboard = 'pcli', // defined in AERegistry.r*/
+ pControlPanelsFolder = FOUR_CHAR_CODE('ctrl'), /* kControlPanelFolderType*/
+ pDesktop = FOUR_CHAR_CODE('desk'), /* kDesktopFolderType*/
+ pExtensionsFolder = FOUR_CHAR_CODE('extn'), /* kExtensionFolderType*/
+ /* pFileShareOn = 'fshr', // defined above*/
+ pFinderPreferences = FOUR_CHAR_CODE('pfrp'),
+ pFontsFolder = FOUR_CHAR_CODE('font'),
+ pFontsFolderPreAllegro = FOUR_CHAR_CODE('ffnt'), /* DO NOT USE THIS - FOR BACKWARDS COMPAT ONLY*/
+ /* pIsFrontProcess = 'pisf', // defined in AERegistry.r*/
+ /* pInsertionLoc = 'pins', // defined in AERegistry.r*/
+ pLargestFreeBlock = FOUR_CHAR_CODE('mfre'),
+ pPreferencesFolder = FOUR_CHAR_CODE('pref'), /* kPreferencesFolderType*/
+ /* pProductVersion = 'ver2', // defined above*/
+ /* pUserSelection = 'pusl', // defined in AERegistry.r*/
+ /* pFileShareStartingUp = 'fsup', // defined above*/
+ pShortCuts = FOUR_CHAR_CODE('scut'),
+ pShutdownFolder = FOUR_CHAR_CODE('shdf'),
+ pStartupItemsFolder = FOUR_CHAR_CODE('strt'), /* kStartupFolderType*/
+ pSystemFolder = FOUR_CHAR_CODE('macs'), /* kSystemFolderType*/
+ pTemporaryFolder = FOUR_CHAR_CODE('temp'), /* kTemporaryFolderType*/
+ /* pVersion = 'vers', // defined in AERegistry.r*/
+ pViewPreferences = FOUR_CHAR_CODE('pvwp'), /* pVisible = 'pvis', // defined in AERegistry.r*/
+ pStartingUp = FOUR_CHAR_CODE('awak') /* private property to tell whether the Finder is fully up and running*/
+};
+
+/* Properties of class cSharingPrivileges (subclass of cObject)*/
+enum {
+ pSeeFiles = FOUR_CHAR_CODE('prvr'),
+ pSeeFolders = FOUR_CHAR_CODE('prvs'),
+ pMakeChanges = FOUR_CHAR_CODE('prvw')
+};
+
+/*
+ Properties of class cPreferences (subclass of cObject)
+ enum {
+ pShowFolderSize = 'sfsz', // defined above for Views CP
+ pShowComment = 'scom', // defined above for Views CP
+ pShowModificationDate = pShowDate, // pShowDate defined above for Views CP
+ pShowKind = 'sknd', // defined above for Views CP
+ pShowLabel = 'slbl', // defined above for Views CP
+ pShowSize = 'ssiz', // defined above for Views CP
+ pShowVersion = 'svrs', // defined above for Views CP
+ pShowCreationDate = 'scda', // defined in cPreferencesWindow
+ pShowFileType = 'sfty', // defined in cPreferencesWindow
+ pShowFileCreator = 'sfcr', // defined in cPreferencesWindow
+ pListViewIconSize = 'lvis', // defined above for Views CP
+ pGridIcons = 'fgrd', // defined above for Views CP
+ pStaggerIcons = 'fstg', // defined above for Views CP
+ pViewFont = 'vfnt', // defined above for Views CP
+ pViewFontSize = 'vfsz', // defined above for Views CP
+ pUseRelativeDate = 'urdt', // defined in cPreferencesWindow
+ pDelayBeforeSpringing = 'dela', // defined in cPreferencesWindow
+ pShowMacOSFolder = 'sosf', // defined in cPreferencesWindow
+ pUseShortMenus = 'usme', // defined in cPreferencesWindow
+ pUseCustomNewMenu = 'ucnm', // defined in cPreferencesWindow
+ pShowDesktopInBackground = 'sdtb', // defined in cPreferencesWindow
+ pActivateDesktopOnClick = 'adtc', // defined in cPreferencesWindow
+ pLabel1 = 'lbl1', // defined in cPreferencesWindow
+ pLabel2 = 'lbl2', // defined in cPreferencesWindow
+ pLabel3 = 'lbl3', // defined in cPreferencesWindow
+ pLabel4 = 'lbl4', // defined in cPreferencesWindow
+ pLabel5 = 'lbl5', // defined in cPreferencesWindow
+ pLabel6 = 'lbl6', // defined in cPreferencesWindow
+ pLabel7 = 'lbl7', // defined in cPreferencesWindow
+ pWindow = cWindow // defined above
+ };
+*/
+
+/*
+ Properties of class cLabel (subclass of cObject)
+ enum {
+ pName = 'pnam', // defined in AERegistry.r
+ pColor = 'colr', // defined in AERegistry.r
+ };
+*/
+
+/* Misc Properties*/
+enum {
+ pSmallIcon = FOUR_CHAR_CODE('smic'),
+ pSmallButton = FOUR_CHAR_CODE('smbu'),
+ pLargeButton = FOUR_CHAR_CODE('lgbu'),
+ pGrid = FOUR_CHAR_CODE('grid')
+};
+
+/*
+ //////////////////////////////////////
+ Enumerations defined by the Finder
+ //////////////////////////////////////
+*/
+
+enum {
+ enumViewBy = FOUR_CHAR_CODE('vwby'),
+ enumGestalt = FOUR_CHAR_CODE('gsen'),
+ enumConflicts = FOUR_CHAR_CODE('cflc'),
+ enumExistingItems = FOUR_CHAR_CODE('exsi'),
+ enumOlderItems = FOUR_CHAR_CODE('oldr')
+};
+
+enum {
+ enumDate = FOUR_CHAR_CODE('enda'),
+ enumAnyDate = FOUR_CHAR_CODE('anyd'),
+ enumToday = FOUR_CHAR_CODE('tday'),
+ enumYesterday = FOUR_CHAR_CODE('yday'),
+ enumThisWeek = FOUR_CHAR_CODE('twek'),
+ enumLastWeek = FOUR_CHAR_CODE('lwek'),
+ enumThisMonth = FOUR_CHAR_CODE('tmon'),
+ enumLastMonth = FOUR_CHAR_CODE('lmon'),
+ enumThisYear = FOUR_CHAR_CODE('tyer'),
+ enumLastYear = FOUR_CHAR_CODE('lyer'),
+ enumBeforeDate = FOUR_CHAR_CODE('bfdt'),
+ enumAfterDate = FOUR_CHAR_CODE('afdt'),
+ enumBetweenDate = FOUR_CHAR_CODE('btdt'),
+ enumOnDate = FOUR_CHAR_CODE('ondt')
+};
+
+enum {
+ enumAllDocuments = FOUR_CHAR_CODE('alld'),
+ enumFolders = FOUR_CHAR_CODE('fold'),
+ enumAliases = FOUR_CHAR_CODE('alia'),
+ enumStationery = FOUR_CHAR_CODE('stat')
+};
+
+enum {
+ enumWhere = FOUR_CHAR_CODE('wher'),
+ enumAllLocalDisks = FOUR_CHAR_CODE('aldk'),
+ enumAllRemoteDisks = FOUR_CHAR_CODE('ardk'),
+ enumAllDisks = FOUR_CHAR_CODE('alld'),
+ enumAllOpenFolders = FOUR_CHAR_CODE('aofo')
+};
+
+
+enum {
+ enumIconSize = FOUR_CHAR_CODE('isiz'),
+ enumSmallIconSize = pSmallIcon,
+ enumMiniIconSize = FOUR_CHAR_CODE('miic'),
+ enumLargeIconSize = FOUR_CHAR_CODE('lgic')
+};
+
+enum {
+ enumSortDirection = FOUR_CHAR_CODE('sodr'),
+ enumSortDirectionNormal = FOUR_CHAR_CODE('snrm'),
+ enumSortDirectionReverse = FOUR_CHAR_CODE('srvs')
+};
+
+enum {
+ enumArrangement = FOUR_CHAR_CODE('earr')
+};
+
+/* Get Info Window panel enumeration*/
+enum {
+ enumInfoWindowPanel = FOUR_CHAR_CODE('ipnl'),
+ enumGeneralPanel = FOUR_CHAR_CODE('gpnl'),
+ enumSharingPanel = FOUR_CHAR_CODE('spnl'),
+ enumStatusNConfigPanel = FOUR_CHAR_CODE('scnl'),
+ enumFontsPanel = FOUR_CHAR_CODE('fpnl'),
+ enumMemoryPanel = FOUR_CHAR_CODE('mpnl')
+};
+
+
+/* Preferences panel enumeration*/
+enum {
+ enumPrefsWindowPanel = FOUR_CHAR_CODE('pple'),
+ enumPrefsGeneralPanel = FOUR_CHAR_CODE('pgnp'),
+ enumPrefsLabelPanel = FOUR_CHAR_CODE('plbp'),
+ enumPrefsIconViewPanel = FOUR_CHAR_CODE('pivp'),
+ enumPrefsButtonViewPanel = FOUR_CHAR_CODE('pbvp'),
+ enumPrefsListViewPanel = FOUR_CHAR_CODE('plvp')
+};
+
+/*
+ //////////////////////////////////////
+ Types defined by the Finder
+ //////////////////////////////////////
+*/
+
+enum {
+ typeIconFamily = cIconFamily, /* An AEList of typeIconAndMask, type8BitIcon, & c.*/
+ typeIconAndMask = FOUR_CHAR_CODE('ICN#'),
+ type8BitMask = FOUR_CHAR_CODE('l8mk'),
+ type32BitIcon = FOUR_CHAR_CODE('il32'),
+ type8BitIcon = FOUR_CHAR_CODE('icl8'),
+ type4BitIcon = FOUR_CHAR_CODE('icl4'),
+ typeSmallIconAndMask = FOUR_CHAR_CODE('ics#'),
+ typeSmall8BitMask = FOUR_CHAR_CODE('s8mk'),
+ typeSmall32BitIcon = FOUR_CHAR_CODE('is32'),
+ typeSmall8BitIcon = FOUR_CHAR_CODE('ics8'),
+ typeSmall4BitIcon = FOUR_CHAR_CODE('ics4'),
+ typeRelativeTime = FOUR_CHAR_CODE('rtim'),
+ typeConceptualTime = FOUR_CHAR_CODE('timc')
+};
+
+/*
+ //////////////////////////////////////
+ Keywords defined by the Finder
+ //////////////////////////////////////
+*/
+
+enum {
+ keyIconAndMask = FOUR_CHAR_CODE('ICN#'),
+ key32BitIcon = FOUR_CHAR_CODE('il32'),
+ key8BitIcon = FOUR_CHAR_CODE('icl8'),
+ key4BitIcon = FOUR_CHAR_CODE('icl4'),
+ key8BitMask = FOUR_CHAR_CODE('l8mk'),
+ keySmallIconAndMask = FOUR_CHAR_CODE('ics#'),
+ keySmall8BitIcon = FOUR_CHAR_CODE('ics8'),
+ keySmall4BitIcon = FOUR_CHAR_CODE('ics4'),
+ keySmall32BitIcon = FOUR_CHAR_CODE('is32'),
+ keySmall8BitMask = FOUR_CHAR_CODE('s8mk'),
+ keyMini1BitMask = FOUR_CHAR_CODE('icm#'),
+ keyMini4BitIcon = FOUR_CHAR_CODE('icm4'),
+ keyMini8BitIcon = FOUR_CHAR_CODE('icm8'),
+ keyAEUsing = FOUR_CHAR_CODE('usin'),
+ keyAEReplacing = FOUR_CHAR_CODE('alrp'),
+ keyAENoAutoRouting = FOUR_CHAR_CODE('rout'),
+ keyLocalPositionList = FOUR_CHAR_CODE('mvpl'),
+ keyGlobalPositionList = FOUR_CHAR_CODE('mvpg'),
+ keyRedirectedDocumentList = FOUR_CHAR_CODE('fpdl')
+};
+
+/*
+ //////////////////////////////////////
+ New prepositions used by the Finder
+ //////////////////////////////////////
+*/
+
+enum {
+ keyASPrepositionHas = FOUR_CHAR_CODE('has '),
+ keyAll = FOUR_CHAR_CODE('kyal'),
+ keyOldFinderItems = FOUR_CHAR_CODE('fsel')
+};
+
+/*
+ //////////////////////////////////////
+ New key forms used by the Finder
+ //////////////////////////////////////
+*/
+
+enum {
+ formAlias = typeAlias,
+ formCreator = pFileCreator
+};
+
+
+/*
+ //////////////////////////////////////
+ Finder error codes
+ //////////////////////////////////////
+*/
+
+enum {
+ errFinderIsBusy = -15260,
+ errFinderWindowNotOpen = -15261,
+ errFinderCannotPutAway = -15262,
+ errFinderWindowMustBeIconView = -15263, /* RequireWindowInIconView*/
+ errFinderWindowMustBeListView = -15264, /* RequireWindowInListView*/
+ errFinderCantMoveToDestination = -15265,
+ errFinderCantMoveSource = -15266,
+ errFinderCantOverwrite = -15267,
+ errFinderIncestuousMove = -15268, /* Could just use errFinderCantMoveSource*/
+ errFinderCantMoveToAncestor = -15269, /* Could also use errFinderCantMoveSource*/
+ errFinderCantUseTrashedItems = -15270,
+ errFinderItemAlreadyInDest = -15271, /* Move from folder A to folder A*/
+ errFinderUnknownUser = -15272, /* Includes unknown group*/
+ errFinderSharePointsCantInherit = -15273,
+ errFinderWindowWrongType = -15274,
+ errFinderPropertyNowWindowBased = -15275,
+ errFinderAppFolderProtected = -15276, /* used by General controls when folder protection is on*/
+ errFinderSysFolderProtected = -15277, /* used by General controls when folder protection is on*/
+ errFinderBoundsWrong = -15278,
+ errAEValueOutOfRange = -15279,
+ errFinderPropertyDoesNotApply = -15280,
+ errFinderFileSharingMustBeOn = -15281,
+ errFinderMustBeActive = -15282,
+ errFinderVolumeNotFound = -15283, /* more descriptive than what we get with nsvErr*/
+ errFinderLockedItemsInTrash = -15284, /* there are some locked items in the trash*/
+ errFinderOnlyLockedItemsInTrash = -15285, /* all the items (except folders) in the trash are locked*/
+ errFinderProgramLinkingMustBeOn = -15286,
+ errFinderWindowMustBeButtonView = -15287,
+ errFinderBadPackageContents = -15288, /* something is wrong within the package */
+ errFinderUnsupportedInsidePackages = -15289, /* operation cannot be used on items within a package */
+ errFinderCorruptOpenFolderList = -15290, /* was -15276 in Finder 8.6 and earlier, but that conflicted with General Controls*/
+ errFinderNoInvisibleFiles = -15291, /* was -15277 in Finder 8.6 and earlier, but that conflicted with General Controls*/
+ errFinderCantDeleteImmediately = -15292, /* cannot delete immediately via scripting*/
+ errFinderLastReserved = -15379
+};
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __FINDERREGISTRY__ */
+
diff --git a/include/qt/FixMath.h b/include/qt/FixMath.h
new file mode 100644
index 000000000..03ff1297b
--- /dev/null
+++ b/include/qt/FixMath.h
@@ -0,0 +1,230 @@
+/*
+ File: FixMath.h
+
+ Contains: Fixed Math Interfaces.
+
+ Version: Technology: Mac OS 8
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __FIXMATH__
+#define __FIXMATH__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+
+#define fixed1 ((Fixed) 0x00010000L)
+#define fract1 ((Fract) 0x40000000L)
+#define positiveInfinity ((long) 0x7FFFFFFFL)
+#define negativeInfinity ((long) 0x80000000L)
+/*
+ FixRatio, FixMul, and FixRound were previously in ToolUtils.h
+*/
+EXTERN_API( Fixed )
+FixRatio (short numer,
+ short denom) ONEWORDINLINE(0xA869);
+
+EXTERN_API( Fixed )
+FixMul (Fixed a,
+ Fixed b) ONEWORDINLINE(0xA868);
+
+EXTERN_API( short )
+FixRound (Fixed x) ONEWORDINLINE(0xA86C);
+
+EXTERN_API( Fract )
+Fix2Frac (Fixed x) ONEWORDINLINE(0xA841);
+
+EXTERN_API( long )
+Fix2Long (Fixed x) ONEWORDINLINE(0xA840);
+
+EXTERN_API( Fixed )
+Long2Fix (long x) ONEWORDINLINE(0xA83F);
+
+EXTERN_API( Fixed )
+Frac2Fix (Fract x) ONEWORDINLINE(0xA842);
+
+EXTERN_API( Fract )
+FracMul (Fract x,
+ Fract y) ONEWORDINLINE(0xA84A);
+
+EXTERN_API( Fixed )
+FixDiv (Fixed x,
+ Fixed y) ONEWORDINLINE(0xA84D);
+
+EXTERN_API( Fract )
+FracDiv (Fract x,
+ Fract y) ONEWORDINLINE(0xA84B);
+
+EXTERN_API( Fract )
+FracSqrt (Fract x) ONEWORDINLINE(0xA849);
+
+EXTERN_API( Fract )
+FracSin (Fixed x) ONEWORDINLINE(0xA848);
+
+EXTERN_API( Fract )
+FracCos (Fixed x) ONEWORDINLINE(0xA847);
+
+EXTERN_API( Fixed )
+FixATan2 (long x,
+ long y) ONEWORDINLINE(0xA818);
+
+/*
+ Frac2X, Fix2X, X2Fix, and X2Frac translate to and from
+ the floating point type "extended" (that's what the X is for).
+ On the original Mac this was 80-bits and the functions could be
+ accessed via A-Traps. When the 68881 co-processor was added,
+ it used 96-bit floating point types, so the A-Traps could not
+ be used. When PowerPC was added, it used 64-bit floating point
+ types, so yet another prototype was added.
+*/
+#if TARGET_CPU_68K
+#if TARGET_RT_MAC_68881
+#if CALL_NOT_IN_CARBON
+EXTERN_API( long double )
+Frac2X (Fract x);
+
+EXTERN_API( long double )
+Fix2X (Fixed x);
+
+EXTERN_API( Fixed )
+X2Fix (long double x);
+
+EXTERN_API( Fract )
+X2Frac (long double x);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+#if CALL_NOT_IN_CARBON
+EXTERN_API( long double )
+Frac2X (Fract x) ONEWORDINLINE(0xA845);
+
+EXTERN_API( long double )
+Fix2X (Fixed x) ONEWORDINLINE(0xA843);
+
+EXTERN_API( Fixed )
+X2Fix (long double x) ONEWORDINLINE(0xA844);
+
+EXTERN_API( Fract )
+X2Frac (long double x) ONEWORDINLINE(0xA846);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_RT_MAC_68881 */
+
+#else
+EXTERN_API( double )
+Frac2X (Fract x);
+
+EXTERN_API( double )
+Fix2X (Fixed x);
+
+EXTERN_API( Fixed )
+X2Fix (double x);
+
+EXTERN_API( Fract )
+X2Frac (double x);
+
+#endif /* TARGET_CPU_68K */
+
+/* QuickTime 3.0 makes these Wide routines available on other platforms*/
+#if TARGET_CPU_PPC || !TARGET_OS_MAC || TARGET_CPU_X86
+EXTERN_API_C( short )
+WideCompare (const wide * target,
+ const wide * source);
+
+EXTERN_API_C( wide *)
+WideAdd (wide * target,
+ const wide * source);
+
+EXTERN_API_C( wide *)
+WideSubtract (wide * target,
+ const wide * source);
+
+EXTERN_API_C( wide *)
+WideNegate (wide * target);
+
+EXTERN_API_C( wide *)
+WideShift (wide * target,
+ long shift);
+
+EXTERN_API_C( unsigned long )
+WideSquareRoot (const wide * source);
+
+EXTERN_API_C( wide *)
+WideMultiply (long multiplicand,
+ long multiplier,
+ wide * target);
+
+/* returns the quotient */
+EXTERN_API_C( long )
+WideDivide (const wide * dividend,
+ long divisor,
+ long * remainder);
+
+/* quotient replaces dividend */
+EXTERN_API_C( wide *)
+WideWideDivide (wide * dividend,
+ long divisor,
+ long * remainder);
+
+EXTERN_API_C( wide *)
+WideBitShift (wide * src,
+ long shift);
+
+#endif /* TARGET_CPU_PPC || !TARGET_OS_MAC || TARGET_CPU_X86 */
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __FIXMATH__ */
+
diff --git a/include/qt/Folders.h b/include/qt/Folders.h
new file mode 100644
index 000000000..7fc106023
--- /dev/null
+++ b/include/qt/Folders.h
@@ -0,0 +1,533 @@
+/*
+ File: Folders.h
+
+ Contains: Folder Manager Interfaces.
+
+ Version: Technology: Mac OS 8
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __FOLDERS__
+#define __FOLDERS__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ kOnSystemDisk = -32768L, /* previously was 0x8000 but that is an unsigned value whereas vRefNum is signed*/
+ kOnAppropriateDisk = -32767 /* Generally, the same as kOnSystemDisk, but it's clearer that this isn't always the 'boot' disk.*/
+};
+
+enum {
+ kCreateFolder = true,
+ kDontCreateFolder = false
+};
+
+enum {
+ kSystemFolderType = FOUR_CHAR_CODE('macs'), /* the system folder */
+ kDesktopFolderType = FOUR_CHAR_CODE('desk'), /* the desktop folder; objects in this folder show on the desk top. */
+ kSystemDesktopFolderType = FOUR_CHAR_CODE('sdsk'), /* the desktop folder at the root of the hard drive, never the redirected user desktop folder */
+ kTrashFolderType = FOUR_CHAR_CODE('trsh'), /* the trash folder; objects in this folder show up in the trash */
+ kSystemTrashFolderType = FOUR_CHAR_CODE('strs'), /* the trash folder at the root of the drive, never the redirected user trash folder */
+ kWhereToEmptyTrashFolderType = FOUR_CHAR_CODE('empt'), /* the "empty trash" folder; Finder starts empty from here down */
+ kPrintMonitorDocsFolderType = FOUR_CHAR_CODE('prnt'), /* Print Monitor documents */
+ kStartupFolderType = FOUR_CHAR_CODE('strt'), /* Finder objects (applications, documents, DAs, aliases, to...) to open at startup go here */
+ kShutdownFolderType = FOUR_CHAR_CODE('shdf'), /* Finder objects (applications, documents, DAs, aliases, to...) to open at shutdown go here */
+ kAppleMenuFolderType = FOUR_CHAR_CODE('amnu'), /* Finder objects to put into the Apple menu go here */
+ kControlPanelFolderType = FOUR_CHAR_CODE('ctrl'), /* Control Panels go here (may contain INITs) */
+ kSystemControlPanelFolderType = FOUR_CHAR_CODE('sctl'), /* System control panels folder - never the redirected one, always "Control Panels" inside the System Folder */
+ kExtensionFolderType = FOUR_CHAR_CODE('extn'), /* System extensions go here */
+ kFontsFolderType = FOUR_CHAR_CODE('font'), /* Fonts go here */
+ kPreferencesFolderType = FOUR_CHAR_CODE('pref'), /* preferences for applications go here */
+ kSystemPreferencesFolderType = FOUR_CHAR_CODE('sprf'), /* System-type Preferences go here - this is always the system's preferences folder, never a logged in user's */
+ kTemporaryFolderType = FOUR_CHAR_CODE('temp') /* temporary files go here (deleted periodically, but don't rely on it.) */
+};
+
+EXTERN_API( OSErr )
+FindFolder (short vRefNum,
+ OSType folderType,
+ Boolean createFolder,
+ short * foundVRefNum,
+ long * foundDirID) TWOWORDINLINE(0x7000, 0xA823);
+
+EXTERN_API( OSErr )
+FindFolderExtended (short vol,
+ OSType foldType,
+ Boolean createFolder,
+ UInt32 flags,
+ void * data,
+ short * vRefNum,
+ long * dirID) THREEWORDINLINE(0x303C, 0x0B2C, 0xA823);
+
+EXTERN_API( OSErr )
+ReleaseFolder (short vRefNum,
+ OSType folderType) TWOWORDINLINE(0x700B, 0xA823);
+
+
+#if !TARGET_OS_MAC
+/* Since non-mac targets don't know about VRef's or DirID's, the Ex version returns
+ the found folder path.
+ */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSErr )
+FindFolderEx (short vRefNum,
+ OSType folderType,
+ Boolean createFolder,
+ short * foundVRefNum,
+ long * foundDirID,
+ char * foundFolder);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* !TARGET_OS_MAC */
+
+/******************************************/
+/* Extensible Folder Manager declarations */
+/******************************************/
+
+/****************************/
+/* Folder Manager constants */
+/****************************/
+
+enum {
+ kExtensionDisabledFolderType = FOUR_CHAR_CODE('extD'),
+ kControlPanelDisabledFolderType = FOUR_CHAR_CODE('ctrD'),
+ kSystemExtensionDisabledFolderType = FOUR_CHAR_CODE('macD'),
+ kStartupItemsDisabledFolderType = FOUR_CHAR_CODE('strD'),
+ kShutdownItemsDisabledFolderType = FOUR_CHAR_CODE('shdD'),
+ kApplicationsFolderType = FOUR_CHAR_CODE('apps'),
+ kDocumentsFolderType = FOUR_CHAR_CODE('docs')
+};
+
+enum {
+ /* new constants */
+ kVolumeRootFolderType = FOUR_CHAR_CODE('root'), /* root folder of a volume */
+ kChewableItemsFolderType = FOUR_CHAR_CODE('flnt'), /* items deleted at boot */
+ kApplicationSupportFolderType = FOUR_CHAR_CODE('asup'), /* third-party items and folders */
+ kTextEncodingsFolderType = FOUR_CHAR_CODE('Ätex'), /* encoding tables */
+ kStationeryFolderType = FOUR_CHAR_CODE('odst'), /* stationery */
+ kOpenDocFolderType = FOUR_CHAR_CODE('odod'), /* OpenDoc root */
+ kOpenDocShellPlugInsFolderType = FOUR_CHAR_CODE('odsp'), /* OpenDoc Shell Plug-Ins in OpenDoc folder */
+ kEditorsFolderType = FOUR_CHAR_CODE('oded'), /* OpenDoc editors in MacOS Folder */
+ kOpenDocEditorsFolderType = FOUR_CHAR_CODE('Äodf'), /* OpenDoc subfolder of Editors folder */
+ kOpenDocLibrariesFolderType = FOUR_CHAR_CODE('odlb'), /* OpenDoc libraries folder */
+ kGenEditorsFolderType = FOUR_CHAR_CODE('Äedi'), /* CKH general editors folder at root level of Sys folder */
+ kHelpFolderType = FOUR_CHAR_CODE('Ählp'), /* CKH help folder currently at root of system folder */
+ kInternetPlugInFolderType = FOUR_CHAR_CODE('Änet'), /* CKH internet plug ins for browsers and stuff */
+ kModemScriptsFolderType = FOUR_CHAR_CODE('Ämod'), /* CKH modem scripts, get 'em OUT of the Extensions folder */
+ kPrinterDescriptionFolderType = FOUR_CHAR_CODE('ppdf'), /* CKH new folder at root of System folder for printer descs. */
+ kPrinterDriverFolderType = FOUR_CHAR_CODE('Äprd'), /* CKH new folder at root of System folder for printer drivers */
+ kScriptingAdditionsFolderType = FOUR_CHAR_CODE('Äscr'), /* CKH at root of system folder */
+ kSharedLibrariesFolderType = FOUR_CHAR_CODE('Älib'), /* CKH for general shared libs. */
+ kVoicesFolderType = FOUR_CHAR_CODE('fvoc'), /* CKH macintalk can live here */
+ kControlStripModulesFolderType = FOUR_CHAR_CODE('sdev'), /* CKH for control strip modules */
+ kAssistantsFolderType = FOUR_CHAR_CODE('astÄ'), /* SJF for Assistants (MacOS Setup Assistant, etc) */
+ kUtilitiesFolderType = FOUR_CHAR_CODE('utiÄ'), /* SJF for Utilities folder */
+ kAppleExtrasFolderType = FOUR_CHAR_CODE('aexÄ'), /* SJF for Apple Extras folder */
+ kContextualMenuItemsFolderType = FOUR_CHAR_CODE('cmnu'), /* SJF for Contextual Menu items */
+ kMacOSReadMesFolderType = FOUR_CHAR_CODE('morÄ'), /* SJF for MacOS ReadMes folder */
+ kALMModulesFolderType = FOUR_CHAR_CODE('walk'), /* EAS for Location Manager Module files except type 'thng' (within kExtensionFolderType) */
+ kALMPreferencesFolderType = FOUR_CHAR_CODE('trip'), /* EAS for Location Manager Preferences (within kPreferencesFolderType; contains kALMLocationsFolderType) */
+ kALMLocationsFolderType = FOUR_CHAR_CODE('fall'), /* EAS for Location Manager Locations (within kALMPreferencesFolderType) */
+ kColorSyncProfilesFolderType = FOUR_CHAR_CODE('prof'), /* for ColorSync(tm) Profiles */
+ kThemesFolderType = FOUR_CHAR_CODE('thme'), /* for Theme data files */
+ kFavoritesFolderType = FOUR_CHAR_CODE('favs'), /* Favorties folder for Navigation Services */
+ kInternetFolderType = FOUR_CHAR_CODE('intÄ'), /* Internet folder (root level of startup volume) */
+ kAppearanceFolderType = FOUR_CHAR_CODE('appr'), /* Appearance folder (root of system folder) */
+ kSoundSetsFolderType = FOUR_CHAR_CODE('snds'), /* Sound Sets folder (in Appearance folder) */
+ kDesktopPicturesFolderType = FOUR_CHAR_CODE('dtpÄ'), /* Desktop Pictures folder (in Appearance folder) */
+ kInternetSearchSitesFolderType = FOUR_CHAR_CODE('issf'), /* Internet Search Sites folder */
+ kFindSupportFolderType = FOUR_CHAR_CODE('fnds'), /* Find support folder */
+ kFindByContentFolderType = FOUR_CHAR_CODE('fbcf'), /* Find by content folder */
+ kInstallerLogsFolderType = FOUR_CHAR_CODE('ilgf'), /* Installer Logs folder */
+ kScriptsFolderType = FOUR_CHAR_CODE('scrÄ'), /* Scripts folder */
+ kFolderActionsFolderType = FOUR_CHAR_CODE('fasf'), /* Folder Actions Scripts folder */
+ kLauncherItemsFolderType = FOUR_CHAR_CODE('laun'), /* Launcher Items folder */
+ kRecentApplicationsFolderType = FOUR_CHAR_CODE('rapp'), /* Recent Applications folder */
+ kRecentDocumentsFolderType = FOUR_CHAR_CODE('rdoc'), /* Recent Documents folder */
+ kRecentServersFolderType = FOUR_CHAR_CODE('rsvr'), /* Recent Servers folder */
+ kSpeakableItemsFolderType = FOUR_CHAR_CODE('spki'), /* Speakable Items folder */
+ kKeychainFolderType = FOUR_CHAR_CODE('kchn'), /* Keychain folder */
+ kQuickTimeExtensionsFolderType = FOUR_CHAR_CODE('qtex'), /* QuickTime Extensions Folder (in Extensions folder) */
+ kDisplayExtensionsFolderType = FOUR_CHAR_CODE('dspl'), /* Display Extensions Folder (in Extensions folder) */
+ kMultiprocessingFolderType = FOUR_CHAR_CODE('mpxf'), /* Multiprocessing Folder (in Extensions folder) */
+ kPrintingPlugInsFolderType = FOUR_CHAR_CODE('pplg') /* Printing Plug-Ins Folder (in Extensions folder) */
+};
+
+enum {
+ kLocalesFolderType = FOUR_CHAR_CODE('Äloc'), /* PKE for Locales folder */
+ kFindByContentPluginsFolderType = FOUR_CHAR_CODE('fbcp') /* Find By Content Plug-ins */
+};
+
+enum {
+ kUsersFolderType = FOUR_CHAR_CODE('usrs'), /* "Users" folder, contains one folder for each user. */
+ kCurrentUserFolderType = FOUR_CHAR_CODE('cusr'), /* The folder for the currently logged on user. */
+ kCurrentUserRemoteFolderLocation = FOUR_CHAR_CODE('rusf'), /* The remote folder for the currently logged on user */
+ kCurrentUserRemoteFolderType = FOUR_CHAR_CODE('rusr'), /* The remote folder location for the currently logged on user */
+ kSharedUserDataFolderType = FOUR_CHAR_CODE('sdat'), /* A Shared "Documents" folder, readable & writeable by all users */
+ kVolumeSettingsFolderType = FOUR_CHAR_CODE('vsfd') /* Volume specific user information goes here */
+};
+
+/* FolderDescFlags values */
+enum {
+ kCreateFolderAtBoot = 0x00000002,
+ kFolderCreatedInvisible = 0x00000004,
+ kFolderCreatedNameLocked = 0x00000008,
+ kFolderCreatedAdminPrivs = 0x00000010
+};
+
+enum {
+ kFolderInUserFolder = 0x00000020,
+ kFolderTrackedByAlias = 0x00000040,
+ kFolderInRemoteUserFolderIfAvailable = 0x00000080,
+ kFolderNeverMatchedInIdentifyFolder = 0x00000100,
+ kFolderMustStayOnSameVolume = 0x00000200,
+ kFolderInLocalOrRemoteUserFolder = kFolderInUserFolder | kFolderInRemoteUserFolderIfAvailable
+};
+
+typedef UInt32 FolderDescFlags;
+/* FolderClass values */
+enum {
+ kRelativeFolder = FOUR_CHAR_CODE('relf'),
+ kSpecialFolder = FOUR_CHAR_CODE('spcf')
+};
+
+typedef OSType FolderClass;
+/* special folder locations */
+enum {
+ kBlessedFolder = FOUR_CHAR_CODE('blsf'),
+ kRootFolder = FOUR_CHAR_CODE('rotf')
+};
+
+enum {
+ kCurrentUserFolderLocation = FOUR_CHAR_CODE('cusf') /* the magic 'Current User' folder location*/
+};
+
+typedef OSType FolderType;
+typedef OSType FolderLocation;
+
+
+struct FolderDesc {
+ Size descSize;
+ FolderType foldType;
+ FolderDescFlags flags;
+ FolderClass foldClass;
+ FolderType foldLocation;
+ OSType badgeSignature;
+ OSType badgeType;
+ UInt32 reserved;
+ StrFileName name; /* Str63 on MacOS*/
+};
+typedef struct FolderDesc FolderDesc;
+typedef FolderDesc * FolderDescPtr;
+
+
+typedef UInt32 RoutingFlags;
+
+struct FolderRouting {
+ Size descSize;
+ OSType fileType;
+ FolderType routeFromFolder;
+ FolderType routeToFolder;
+ RoutingFlags flags;
+};
+typedef struct FolderRouting FolderRouting;
+typedef FolderRouting * FolderRoutingPtr;
+/* routing constants */
+/* These are bits in the .flags field of the FindFolderUserRedirectionGlobals struct*/
+enum {
+ /* Set this bit to 1 in the .flags field of a FindFolderUserRedirectionGlobals*/
+ /* structure if the userName in the struct should be used as the current*/
+ /* "User" name*/
+ kFindFolderRedirectionFlagUseDistinctUserFoldersBit = 0, /* Set this bit to 1 and the currentUserFolderVRefNum and currentUserFolderDirID*/
+ /* fields of the user record will get used instead of finding the user folder*/
+ /* with the userName field.*/
+ kFindFolderRedirectionFlagUseGivenVRefAndDirIDAsUserFolderBit = 1, /* Set this bit to 1 and the remoteUserFolderVRefNum and remoteUserFolderDirID*/
+ /* fields of the user record will get used instead of finding the user folder*/
+ /* with the userName field.*/
+ kFindFolderRedirectionFlagsUseGivenVRefNumAndDirIDAsRemoteUserFolderBit = 2
+};
+
+
+struct FindFolderUserRedirectionGlobals {
+ UInt32 version;
+ UInt32 flags;
+
+ Str31 userName;
+ short userNameScript;
+
+ short currentUserFolderVRefNum;
+ long currentUserFolderDirID;
+
+ short remoteUserFolderVRefNum;
+ long remoteUserFolderDirID;
+};
+typedef struct FindFolderUserRedirectionGlobals FindFolderUserRedirectionGlobals;
+typedef FindFolderUserRedirectionGlobals * FindFolderUserRedirectionGlobalsPtr;
+enum {
+ kFolderManagerUserRedirectionGlobalsCurrentVersion = 1
+};
+
+/*
+ These are passed into FindFolderExtended(), FindFolderInternalExtended(), and
+ FindFolderNewInstallerEntryExtended() in the flags field.
+*/
+enum {
+ kFindFolderExtendedFlagsDoNotFollowAliasesBit = 0,
+ kFindFolderExtendedFlagsDoNotUseUserFolderBit = 1,
+ kFindFolderExtendedFlagsUseOtherUserRecord = 0x01000000
+};
+
+typedef CALLBACK_API( OSStatus , FolderManagerNotificationProcPtr )(OSType message, void *arg, void *userRefCon);
+typedef STACK_UPP_TYPE(FolderManagerNotificationProcPtr) FolderManagerNotificationUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(FolderManagerNotificationUPP)
+ NewFolderManagerNotificationUPP (FolderManagerNotificationProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeFolderManagerNotificationUPP (FolderManagerNotificationUPP userUPP);
+
+ EXTERN_API(OSStatus)
+ InvokeFolderManagerNotificationUPP (OSType message,
+ void * arg,
+ void * userRefCon,
+ FolderManagerNotificationUPP userUPP);
+
+#else
+ enum { uppFolderManagerNotificationProcInfo = 0x00000FF0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ #define NewFolderManagerNotificationUPP(userRoutine) (FolderManagerNotificationUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppFolderManagerNotificationProcInfo, GetCurrentArchitecture())
+ #define DisposeFolderManagerNotificationUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeFolderManagerNotificationUPP(message, arg, userRefCon, userUPP) (OSStatus)CALL_THREE_PARAMETER_UPP((userUPP), uppFolderManagerNotificationProcInfo, (message), (arg), (userRefCon))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewFolderManagerNotificationProc(userRoutine) NewFolderManagerNotificationUPP(userRoutine)
+#define CallFolderManagerNotificationProc(userRoutine, message, arg, userRefCon) InvokeFolderManagerNotificationUPP(message, arg, userRefCon, userRoutine)
+enum {
+ kFolderManagerNotificationMessageUserLogIn = FOUR_CHAR_CODE('log+'), /* Sent by system & third party software after a user logs in. arg should point to a valid FindFolderUserRedirectionGlobals structure or nil for the owner*/
+ kFolderManagerNotificationMessagePreUserLogIn = FOUR_CHAR_CODE('logj'), /* Sent by system & third party software before a user logs in. arg should point to a valid FindFolderUserRedirectionGlobals structure or nil for the owner*/
+ kFolderManagerNotificationMessageUserLogOut = FOUR_CHAR_CODE('log-'), /* Sent by system & third party software before a user logs out. arg should point to a valid FindFolderUserRedirectionGlobals structure or nil for the owner*/
+ kFolderManagerNotificationMessagePostUserLogOut = FOUR_CHAR_CODE('logp'), /* Sent by system & third party software after a user logs out. arg should point to a valid FindFolderUserRedirectionGlobals structure or nil for the owner*/
+ kFolderManagerNotificationDiscardCachedData = FOUR_CHAR_CODE('dche') /* Sent by third party software when the entire Folder Manager cache should be flushed*/
+};
+
+
+/* These get used in the options parameter of FolderManagerRegisterNotificationProc()*/
+enum {
+ kDoNotRemoveWhenCurrentApplicationQuitsBit = 0,
+ kDoNotRemoveWheCurrentApplicationQuitsBit = kDoNotRemoveWhenCurrentApplicationQuitsBit /* Going away soon, use kDoNotRemoveWheCurrentApplicationQuitsBit*/
+};
+
+/* These get used in the options parameter of FolderManagerCallNotificationProcs()*/
+enum {
+ kStopIfAnyNotificationProcReturnsErrorBit = 31
+};
+
+/***************************/
+/* Folder Manager routines */
+/***************************/
+/* Folder Manager administration routines */
+EXTERN_API( OSErr )
+AddFolderDescriptor (FolderType foldType,
+ FolderDescFlags flags,
+ FolderClass foldClass,
+ FolderLocation foldLocation,
+ OSType badgeSignature,
+ OSType badgeType,
+ ConstStrFileNameParam name,
+ Boolean replaceFlag) TWOWORDINLINE(0x7020, 0xA823);
+
+EXTERN_API( OSErr )
+GetFolderDescriptor (FolderType foldType,
+ Size descSize,
+ FolderDesc * foldDesc) TWOWORDINLINE(0x7023, 0xA823);
+
+EXTERN_API( OSErr )
+GetFolderTypes (UInt32 requestedTypeCount,
+ UInt32 * totalTypeCount,
+ FolderType * theTypes) TWOWORDINLINE(0x7024, 0xA823);
+
+EXTERN_API( OSErr )
+RemoveFolderDescriptor (FolderType foldType) TWOWORDINLINE(0x7021, 0xA823);
+
+/* legacy routines */
+EXTERN_API( OSErr )
+GetFolderName (short vRefNum,
+ OSType foldType,
+ short * foundVRefNum,
+ StrFileName name) TWOWORDINLINE(0x700E, 0xA823);
+
+/* routing routines */
+EXTERN_API( OSErr )
+AddFolderRouting (OSType fileType,
+ FolderType routeFromFolder,
+ FolderType routeToFolder,
+ RoutingFlags flags,
+ Boolean replaceFlag) THREEWORDINLINE(0x303C, 0x0926, 0xA823);
+
+EXTERN_API( OSErr )
+RemoveFolderRouting (OSType fileType,
+ FolderType routeFromFolder) THREEWORDINLINE(0x303C, 0x0427, 0xA823);
+
+EXTERN_API( OSErr )
+FindFolderRouting (OSType fileType,
+ FolderType routeFromFolder,
+ FolderType * routeToFolder,
+ RoutingFlags * flags) THREEWORDINLINE(0x303C, 0x0822, 0xA823);
+
+EXTERN_API( OSErr )
+GetFolderRoutings (UInt32 requestedRoutingCount,
+ UInt32 * totalRoutingCount,
+ Size routingSize,
+ FolderRouting * theRoutings) THREEWORDINLINE(0x303C, 0x081E, 0xA823);
+
+EXTERN_API( OSErr )
+InvalidateFolderDescriptorCache (short vRefNum,
+ long dirID) THREEWORDINLINE(0x303C, 0x0325, 0xA823);
+
+EXTERN_API( OSErr )
+IdentifyFolder (short vRefNum,
+ long dirID,
+ FolderType * foldType) THREEWORDINLINE(0x303C, 0x051F, 0xA823);
+
+
+EXTERN_API( OSErr )
+FolderManagerRegisterNotificationProc (FolderManagerNotificationUPP notificationProc,
+ void * refCon,
+ UInt32 options) THREEWORDINLINE(0x303C, 0x062F, 0xA823);
+
+EXTERN_API( OSErr )
+FolderManagerUnregisterNotificationProc (FolderManagerNotificationUPP notificationProc,
+ void * refCon) THREEWORDINLINE(0x303C, 0x0430, 0xA823);
+
+EXTERN_API( OSStatus )
+FolderManagerRegisterCallNotificationProcs (OSType message,
+ void * arg,
+ UInt32 options) THREEWORDINLINE(0x303C, 0x0631, 0xA823);
+
+/*******************************/
+/* MultiUser (At Ease) globals */
+/*******************************/
+/*
+ This structure has been through some evolution since the early days of At Ease 1.0. The structure
+ has been expanded (and developers should assume that it will continue this way into the future). Older
+ fields have been obsoleted as the features have changed in newer versions of the code.
+*/
+
+/* Some fields in here are really only valid for the network version of Macintosh Manager*/
+
+
+struct MultiUserGestalt {
+ /* Version 1 fields.*/
+ short giVersion; /* structure version: 0 = invalid, 6 = OS 9*/
+ short giReserved0; /* [OBSOLETE with v3] giIsActive: if true then At Ease is currently running*/
+ short giReserved1; /* [OBSOLETE] if true then auto create alias*/
+ short giReserved2; /* [OBSOLETE with v6] if true then request floppy on new saves*/
+ short giReserved3; /* [OBSOLETE] if true then hypercard stacks are shown on Applications panel*/
+ FSSpec giReserved4; /* [OBSOLETE with v6] location of At Ease Items folder*/
+
+ /* Version 2 fields.*/
+ short giDocsVRefNum; /* vrefnum of user's documents location (only valid if not on floppy)*/
+ long giDocsDirID; /* directory id of user's documents folder (only valid if not on floppy)*/
+ short giForceSaves; /* true if user is forced to save to their documents folder*/
+ short giForceOpens; /* true if user is forced to open from their documents folder*/
+ Str31 giSetupName; /* name of current setup*/
+ Str31 giUserName; /* name of current user*/
+ Str31 giFrontAppName; /* name of the frontmost application*/
+ short giReserved5; /* [OBSOLETE with v6] true if user has Go To Finder menu item*/
+ short giIsOn; /* true if Multiple Users/Macintosh Manager is on right now*/
+
+ /* Version 3 fields.*/
+ /* There were no additional fields for version 3.x*/
+
+ /* Version 4 fields.*/
+ short giUserLoggedInType; /* 0 = normal user, 1 = workgroup admin, 2 = global admin*/
+ char giUserEncryptPwd[16]; /* encrypted user password (our digest form)*/
+ short giUserEnvironment; /* 0 = panels, 1 = normal Finder, 2 = limited/restricted Finder*/
+ long giReserved6; /* [OBSOLETE]*/
+ long giReserved7; /* [OBSOLETE]*/
+ Boolean giDisableScrnShots; /* true if screen shots are not allowed*/
+
+ /* Version 5 fields.*/
+ Boolean giSupportsAsyncFSCalls; /* Finder uses this to tell if our patches support async trap patches*/
+ short giPrefsVRefNum; /* vrefnum of preferences*/
+ long giPrefsDirID; /* dirID of the At Ease Items folder on preferences volume*/
+ unsigned long giUserLogInTime; /* time in seconds we've been logged in (0 or 1 mean not logged in)*/
+ Boolean giUsingPrintQuotas; /* true if logged in user is using printer quotas*/
+ Boolean giUsingDiskQuotas; /* true if logged in user has disk quotas active*/
+
+ /* Version 6 fields - As of Mac OS 9's "Multiple Users 1.0"*/
+ Boolean giInSystemAccess; /* true if system is in System Access (i.e., owner logged in)*/
+ Boolean giUserFolderEnabled; /* true if FindFolder is redirecting folders (uses giUserName for user)*/
+ short giReserved8;
+ long giReserved9;
+ Boolean giInLoginScreen; /* true if no user has logged in (including owner)*/
+
+
+ /* May have more fields added in future, so never check for sizeof(GestaltRec)*/
+
+};
+typedef struct MultiUserGestalt MultiUserGestalt;
+typedef MultiUserGestalt * MultiUserGestaltPtr;
+typedef MultiUserGestaltPtr * MultiUserGestaltHandle;
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __FOLDERS__ */
+
diff --git a/include/qt/FontSync.h b/include/qt/FontSync.h
new file mode 100644
index 000000000..d2629680b
--- /dev/null
+++ b/include/qt/FontSync.h
@@ -0,0 +1,298 @@
+/*
+ File: FontSync.h
+
+ Contains: Public interface for FontSync
+
+ Version: Technology: Mac OS 9
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1999-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __FONTSYNC__
+#define __FONTSYNC__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+#ifndef __FONTS__
+#include "Fonts.h"
+#endif
+
+#ifndef __SFNTTYPES__
+#include "SFNTTypes.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+
+/* Matching Options */
+
+typedef UInt32 FNSMatchOptions;
+enum {
+ kFNSMatchNames = 0x00000001, /* font names must match */
+ kFNSMatchTechnology = 0x00000002, /* scaler technology must match */
+ kFNSMatchGlyphs = 0x00000004, /* glyph data must match */
+ kFNSMatchEncodings = 0x00000008, /* cmaps must match */
+ kFNSMatchQDMetrics = 0x00000010, /* QuickDraw Text metrics must match */
+ kFNSMatchATSUMetrics = 0x00000020, /* ATSUI metrics (incl. vertical) must match */
+ kFNSMatchKerning = 0x00000040, /* kerning data must match */
+ kFNSMatchWSLayout = 0x00000080, /* WorldScript layout tables must match */
+ kFNSMatchAATLayout = 0x00000100, /* AAT (incl. OpenType) layout tables must match */
+ kFNSMatchPrintEncoding = 0x00000200, /* PostScript font and glyph names and re-encoding vector must match */
+ kFNSMissingDataNoMatch = (unsigned long)0x80000000, /* treat missing data as mismatch */
+ kFNSMatchAll = (unsigned long)0xFFFFFFFF, /* everything must match */
+ kFNSMatchDefaults = 0 /* use global default match options */
+};
+
+EXTERN_API_C( FNSMatchOptions )
+FNSMatchDefaultsGet (void);
+
+
+/* Version control */
+
+typedef UInt32 FNSObjectVersion;
+enum {
+ kFNSVersionDontCare = 0,
+ kFNSCurSysInfoVersion = 1
+};
+
+/* No features defined yet.*/
+typedef UInt32 FNSFeatureFlags;
+/*
+ The FontSync library version number is binary-coded decimal:
+ 8 bits of major version, 4 minor version and 4 bits revision.
+*/
+
+struct FNSSysInfo {
+ FNSObjectVersion iSysInfoVersion; /* fill this in before calling FNSSysInfoGet*/
+ FNSFeatureFlags oFeatures;
+ FNSObjectVersion oCurRefVersion;
+ FNSObjectVersion oMinRefVersion;
+ FNSObjectVersion oCurProfileVersion;
+ FNSObjectVersion oMinProfileVersion;
+ UInt16 oFontSyncVersion;
+};
+typedef struct FNSSysInfo FNSSysInfo;
+EXTERN_API_C( void )
+FNSSysInfoGet (FNSSysInfo * ioInfo);
+
+
+/* FontSync References */
+typedef struct OpaqueFNSFontReference* FNSFontReference;
+EXTERN_API_C( OSStatus )
+FNSReferenceGetVersion (FNSFontReference iReference,
+ FNSObjectVersion * oVersion);
+
+EXTERN_API_C( OSStatus )
+FNSReferenceDispose (FNSFontReference iReference);
+
+EXTERN_API_C( OSStatus )
+FNSReferenceMatch (FNSFontReference iReference1,
+ FNSFontReference iReference2,
+ FNSMatchOptions iOptions,
+ FNSMatchOptions * oFailedMatchOptions) /* can be NULL */;
+
+EXTERN_API_C( OSStatus )
+FNSReferenceFlattenedSize (FNSFontReference iReference,
+ ByteCount * oFlattenedSize);
+
+EXTERN_API_C( OSStatus )
+FNSReferenceFlatten (FNSFontReference iReference,
+ void * oFlatReference, /* can be NULL */
+ ByteCount * oFlattenedSize) /* can be NULL */;
+
+EXTERN_API_C( OSStatus )
+FNSReferenceUnflatten (const void * iFlatReference,
+ ByteCount iFlattenedSize,
+ FNSFontReference * oReference);
+
+
+/* FontSync Profiles */
+enum {
+ kFNSCreatorDefault = 0,
+ kFNSProfileFileType = FOUR_CHAR_CODE('fnsp')
+};
+
+typedef struct OpaqueFNSFontProfile* FNSFontProfile;
+EXTERN_API_C( OSStatus )
+FNSProfileCreate (const FSSpec * iFile,
+ FourCharCode iCreator,
+ ItemCount iEstNumRefs,
+ FNSObjectVersion iDesiredVersion,
+ FNSFontProfile * oProfile);
+
+EXTERN_API_C( OSStatus )
+FNSProfileOpen (const FSSpec * iFile,
+ Boolean iOpenForWrite,
+ FNSFontProfile * oProfile);
+
+EXTERN_API_C( OSStatus )
+FNSProfileGetVersion (FNSFontProfile iProfile,
+ FNSObjectVersion * oVersion);
+
+EXTERN_API_C( OSStatus )
+FNSProfileCompact (FNSFontProfile iProfile);
+
+EXTERN_API_C( OSStatus )
+FNSProfileClose (FNSFontProfile iProfile);
+
+EXTERN_API_C( OSStatus )
+FNSProfileAddReference (FNSFontProfile iProfile,
+ FNSFontReference iReference);
+
+EXTERN_API_C( OSStatus )
+FNSProfileRemoveReference (FNSFontProfile iProfile,
+ FNSFontReference iReference);
+
+EXTERN_API_C( OSStatus )
+FNSProfileRemoveIndReference (FNSFontProfile iProfile,
+ UInt32 iIndex);
+
+EXTERN_API_C( OSStatus )
+FNSProfileClear (FNSFontProfile iProfile);
+
+EXTERN_API_C( OSStatus )
+FNSProfileCountReferences (FNSFontProfile iProfile,
+ ItemCount * oCount);
+
+EXTERN_API_C( OSStatus )
+FNSProfileGetIndReference (FNSFontProfile iProfile,
+ UInt32 iWhichReference,
+ FNSFontReference * oReference);
+
+EXTERN_API_C( OSStatus )
+FNSProfileMatchReference (FNSFontProfile iProfile,
+ FNSFontReference iReference,
+ FNSMatchOptions iMatchOptions,
+ ItemCount iOutputSize,
+ UInt32 oIndices[], /* can be NULL */
+ ItemCount * oNumMatches) /* can be NULL */;
+
+
+/* Mapping to and from Font Objects */
+EXTERN_API_C( OSStatus )
+FNSReferenceCreate (FMFont iFont,
+ FNSObjectVersion iDesiredVersion,
+ FNSFontReference * oReference);
+
+EXTERN_API_C( OSStatus )
+FNSReferenceMatchFonts (FNSFontReference iReference,
+ FNSMatchOptions iMatchOptions,
+ ItemCount iOutputSize,
+ FMFont oFonts[], /* can be NULL */
+ ItemCount * oNumMatches) /* can be NULL */;
+
+
+/* Mapping to and from Font Families */
+EXTERN_API_C( OSStatus )
+FNSReferenceCreateFromFamily (FMFontFamily iFamily,
+ FMFontStyle iStyle,
+ FNSObjectVersion iDesiredVersion,
+ FNSFontReference * oReference, /* can be NULL */
+ FMFontStyle * oActualStyle) /* can be NULL */;
+
+EXTERN_API_C( OSStatus )
+FNSReferenceMatchFamilies (FNSFontReference iReference,
+ FNSMatchOptions iMatchOptions,
+ ItemCount iOutputSize,
+ FMFontFamilyInstance oFonts[], /* can be NULL */
+ ItemCount * oNumMatches) /* can be NULL */;
+
+
+/* UI Support */
+EXTERN_API_C( OSStatus )
+FNSReferenceGetFamilyInfo (FNSFontReference iReference,
+ Str255 oFamilyName, /* can be NULL */
+ ScriptCode * oFamilyNameScript, /* can be NULL */
+ FMFontStyle * oActualStyle) /* can be NULL */;
+
+EXTERN_API_C( OSStatus )
+FNSReferenceCountNames (FNSFontReference iReference,
+ ItemCount * oNameCount);
+
+EXTERN_API_C( OSStatus )
+FNSReferenceGetIndName (FNSFontReference iReference,
+ ItemCount iFontNameIndex,
+ ByteCount iMaximumNameLength,
+ Ptr oName, /* can be NULL */
+ ByteCount * oActualNameLength, /* can be NULL */
+ FontNameCode * oFontNameCode, /* can be NULL */
+ FontPlatformCode * oFontNamePlatform, /* can be NULL */
+ FontScriptCode * oFontNameScript, /* can be NULL */
+ FontLanguageCode * oFontNameLanguage) /* can be NULL */;
+
+EXTERN_API_C( OSStatus )
+FNSReferenceFindName (FNSFontReference iReference,
+ FontNameCode iFontNameCode,
+ FontPlatformCode iFontNamePlatform,
+ FontScriptCode iFontNameScript,
+ FontLanguageCode iFontNameLanguage,
+ ByteCount iMaximumNameLength,
+ Ptr oName, /* can be NULL */
+ ByteCount * oActualNameLength, /* can be NULL */
+ ItemCount * oFontNameIndex) /* can be NULL */;
+
+/* Miscellany */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( Boolean )
+FNSEnabled (void);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __FONTSYNC__ */
+
diff --git a/include/qt/Fonts.h b/include/qt/Fonts.h
new file mode 100644
index 000000000..16b479048
--- /dev/null
+++ b/include/qt/Fonts.h
@@ -0,0 +1,685 @@
+/*
+ File: Fonts.h
+
+ Contains: Public interface to the Font Manager.
+
+ Version: Technology: Mac OS 9
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __FONTS__
+#define __FONTS__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#ifndef __TEXTCOMMON__
+#include "TextCommon.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ systemFont = 0,
+ applFont = 1
+};
+
+/* kPlatformDefaultGuiFontID is used in QuickTime 3.0. */
+#if TARGET_OS_MAC
+enum {
+ kPlatformDefaultGuiFontID = applFont
+};
+
+#else
+enum {
+ kPlatformDefaultGuiFontID = -1
+};
+
+#endif /* TARGET_OS_MAC */
+
+/* The following font constants are deprecated; use GetFNum() to look up the font ID by name. */
+enum {
+ kFontIDNewYork = 2,
+ kFontIDGeneva = 3,
+ kFontIDMonaco = 4,
+ kFontIDVenice = 5,
+ kFontIDLondon = 6,
+ kFontIDAthens = 7,
+ kFontIDSanFrancisco = 8,
+ kFontIDToronto = 9,
+ kFontIDCairo = 11,
+ kFontIDLosAngeles = 12,
+ kFontIDTimes = 20,
+ kFontIDHelvetica = 21,
+ kFontIDCourier = 22,
+ kFontIDSymbol = 23,
+ kFontIDMobile = 24
+};
+
+enum {
+ commandMark = 17,
+ checkMark = 18,
+ diamondMark = 19,
+ appleMark = 20
+};
+
+enum {
+ propFont = 36864L,
+ prpFntH = 36865L,
+ prpFntW = 36866L,
+ prpFntHW = 36867L,
+ fixedFont = 45056L,
+ fxdFntH = 45057L,
+ fxdFntW = 45058L,
+ fxdFntHW = 45059L,
+ fontWid = 44208L
+};
+
+
+struct FMInput {
+ short family;
+ short size;
+ Style face;
+ Boolean needBits;
+ short device;
+ Point numer;
+ Point denom;
+};
+typedef struct FMInput FMInput;
+
+struct FMOutput {
+ short errNum;
+ Handle fontHandle;
+ UInt8 boldPixels;
+ UInt8 italicPixels;
+ UInt8 ulOffset;
+ UInt8 ulShadow;
+ UInt8 ulThick;
+ UInt8 shadowPixels;
+ SInt8 extra;
+ UInt8 ascent;
+ UInt8 descent;
+ UInt8 widMax;
+ SInt8 leading;
+ SInt8 curStyle;
+ Point numer;
+ Point denom;
+};
+typedef struct FMOutput FMOutput;
+typedef FMOutput * FMOutputPtr;
+
+typedef FMOutputPtr FMOutPtr;
+
+struct FontRec {
+ short fontType; /*font type*/
+ short firstChar; /*ASCII code of first character*/
+ short lastChar; /*ASCII code of last character*/
+ short widMax; /*maximum character width*/
+ short kernMax; /*negative of maximum character kern*/
+ short nDescent; /*negative of descent*/
+ short fRectWidth; /*width of font rectangle*/
+ short fRectHeight; /*height of font rectangle*/
+ unsigned short owTLoc; /*offset to offset/width table*/
+ short ascent; /*ascent*/
+ short descent; /*descent*/
+ short leading; /*leading*/
+ short rowWords; /*row width of bit image / 2 */
+};
+typedef struct FontRec FontRec;
+typedef FontRec * FontRecPtr;
+typedef FontRecPtr * FontRecHdl;
+
+struct FMetricRec {
+ Fixed ascent; /*base line to top*/
+ Fixed descent; /*base line to bottom*/
+ Fixed leading; /*leading between lines*/
+ Fixed widMax; /*maximum character width*/
+ Handle wTabHandle; /*handle to font width table*/
+};
+typedef struct FMetricRec FMetricRec;
+typedef FMetricRec * FMetricRecPtr;
+typedef FMetricRecPtr * FMetricRecHandle;
+
+struct WidEntry {
+ short widStyle; /*style entry applies to*/
+};
+typedef struct WidEntry WidEntry;
+
+struct WidTable {
+ short numWidths; /*number of entries - 1*/
+};
+typedef struct WidTable WidTable;
+
+struct AsscEntry {
+ short fontSize;
+ short fontStyle;
+ short fontID; /*font resource ID*/
+};
+typedef struct AsscEntry AsscEntry;
+
+struct FontAssoc {
+ short numAssoc; /*number of entries - 1*/
+};
+typedef struct FontAssoc FontAssoc;
+
+struct StyleTable {
+ short fontClass;
+ long offset;
+ long reserved;
+ char indexes[48];
+};
+typedef struct StyleTable StyleTable;
+
+struct NameTable {
+ short stringCount;
+ Str255 baseFontName;
+};
+typedef struct NameTable NameTable;
+
+struct KernPair {
+ char kernFirst; /*1st character of kerned pair*/
+ char kernSecond; /*2nd character of kerned pair*/
+ short kernWidth; /*kerning in 1pt fixed format*/
+};
+typedef struct KernPair KernPair;
+
+struct KernEntry {
+ short kernStyle; /*style the entry applies to*/
+ short kernLength; /*length of this entry*/
+};
+typedef struct KernEntry KernEntry;
+
+struct KernTable {
+ short numKerns; /*number of kerning entries*/
+};
+typedef struct KernTable KernTable;
+
+struct WidthTable {
+ Fixed tabData[256]; /*character widths*/
+ Handle tabFont; /*font record used to build table*/
+ long sExtra; /*space extra used for table*/
+ long style; /*extra due to style*/
+ short fID; /*font family ID*/
+ short fSize; /*font size request*/
+ short face; /*style (face) request*/
+ short device; /*device requested*/
+ Point inNumer; /*scale factors requested*/
+ Point inDenom; /*scale factors requested*/
+ short aFID; /*actual font family ID for table*/
+ Handle fHand; /*family record used to build up table*/
+ Boolean usedFam; /*used fixed point family widths*/
+ UInt8 aFace; /*actual face produced*/
+ short vOutput; /*vertical scale output value*/
+ short hOutput; /*horizontal scale output value*/
+ short vFactor; /*vertical scale output value*/
+ short hFactor; /*horizontal scale output value*/
+ short aSize; /*actual size of actual font used*/
+ short tabSize; /*total size of table*/
+};
+typedef struct WidthTable WidthTable;
+typedef WidthTable * WidthTablePtr;
+typedef WidthTablePtr * WidthTableHdl;
+
+struct FamRec {
+ short ffFlags; /*flags for family*/
+ short ffFamID; /*family ID number*/
+ short ffFirstChar; /*ASCII code of 1st character*/
+ short ffLastChar; /*ASCII code of last character*/
+ short ffAscent; /*maximum ascent for 1pt font*/
+ short ffDescent; /*maximum descent for 1pt font*/
+ short ffLeading; /*maximum leading for 1pt font*/
+ short ffWidMax; /*maximum widMax for 1pt font*/
+ long ffWTabOff; /*offset to width table*/
+ long ffKernOff; /*offset to kerning table*/
+ long ffStylOff; /*offset to style mapping table*/
+ short ffProperty[9]; /*style property info*/
+ short ffIntl[2]; /*for international use*/
+ short ffVersion; /*version number*/
+};
+typedef struct FamRec FamRec;
+
+typedef SInt16 FontPointSize;
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+InitFonts (void) ONEWORDINLINE(0xA8FE);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( void )
+GetFontName (short familyID,
+ Str255 name) ONEWORDINLINE(0xA8FF);
+
+EXTERN_API( void )
+GetFNum (ConstStr255Param name,
+ short * familyID) ONEWORDINLINE(0xA900);
+
+EXTERN_API( Boolean )
+RealFont (short fontNum,
+ short size) ONEWORDINLINE(0xA902);
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+SetFontLock (Boolean lockFlag) ONEWORDINLINE(0xA903);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( FMOutPtr )
+FMSwapFont (const FMInput * inRec) ONEWORDINLINE(0xA901);
+
+EXTERN_API( void )
+SetFScaleDisable (Boolean fscaleDisable) ONEWORDINLINE(0xA834);
+
+EXTERN_API( void )
+FontMetrics (FMetricRecPtr theMetrics) ONEWORDINLINE(0xA835);
+
+EXTERN_API( void )
+SetFractEnable (Boolean fractEnable) ONEWORDINLINE(0xA814);
+
+EXTERN_API( short )
+GetDefFontSize (void) FIVEWORDINLINE(0x3EB8, 0x0BA8, 0x6604, 0x3EBC, 0x000C);
+
+EXTERN_API( Boolean )
+IsOutline (Point numer,
+ Point denom) TWOWORDINLINE(0x7000, 0xA854);
+
+EXTERN_API( void )
+SetOutlinePreferred (Boolean outlinePreferred) TWOWORDINLINE(0x7001, 0xA854);
+
+EXTERN_API( Boolean )
+GetOutlinePreferred (void) TWOWORDINLINE(0x7009, 0xA854);
+
+EXTERN_API( OSErr )
+OutlineMetrics (short byteCount,
+ const void * textPtr,
+ Point numer,
+ Point denom,
+ short * yMax,
+ short * yMin,
+ FixedPtr awArray,
+ FixedPtr lsbArray,
+ RectPtr boundsArray) TWOWORDINLINE(0x7008, 0xA854);
+
+EXTERN_API( void )
+SetPreserveGlyph (Boolean preserveGlyph) TWOWORDINLINE(0x700A, 0xA854);
+
+EXTERN_API( Boolean )
+GetPreserveGlyph (void) TWOWORDINLINE(0x700B, 0xA854);
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+FlushFonts (void) TWOWORDINLINE(0x700C, 0xA854);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API_C( void )
+getfnum (const char * theName,
+ short * familyID);
+
+EXTERN_API_C( void )
+getfontname (short familyID,
+ char * theName);
+
+EXTERN_API( short )
+GetSysFont (void) TWOWORDINLINE(0x3EB8, 0x0BA6);
+
+EXTERN_API( short )
+GetAppFont (void) TWOWORDINLINE(0x3EB8, 0x0984);
+
+/*--------------------------------------------------------------------------------------*/
+/* Extended font data functions (available only with Mac OS 8.5 or later) */
+/*--------------------------------------------------------------------------------------*/
+EXTERN_API( OSStatus )
+SetAntiAliasedTextEnabled (Boolean iEnable,
+ SInt16 iMinFontSize) TWOWORDINLINE(0x7011, 0xA854);
+
+EXTERN_API( Boolean )
+IsAntiAliasedTextEnabled (SInt16 * oMinFontSize) TWOWORDINLINE(0x7012, 0xA854);
+
+EXTERN_API( void )
+QDTextBounds (short byteCount,
+ const void * textAddr,
+ Rect * bounds) TWOWORDINLINE(0x7013, 0xA854);
+
+EXTERN_API( OSErr )
+FetchFontInfo (SInt16 fontID,
+ SInt16 fontSize,
+ SInt16 fontStyle,
+ FontInfo * info) TWOWORDINLINE(0x7014, 0xA854);
+
+/*--------------------------------------------------------------------------------------*/
+/* Font access and data management functions (available only with Mac OS 9.0 or later) */
+/*--------------------------------------------------------------------------------------*/
+typedef UInt32 FMGeneration;
+/* The FMFontFamily reference represents a collection of fonts with the same design */
+/* characteristics. It replaces the standard QuickDraw font identifer and may be used */
+/* with all QuickDraw functions including GetFontName and TextFont. It cannot be used */
+/* with the Resource Manager to access information from a FOND resource handle. A font */
+/* reference does not imply a particular script system, nor is the character encoding */
+/* of a font family determined by an arithmetic mapping of its value. */
+typedef SInt16 FMFontFamily;
+typedef SInt16 FMFontStyle;
+typedef SInt16 FMFontSize;
+/* The font family is a collection of fonts, each of which is identified by an FMFont */
+/* reference that maps to a single object registered with the font database. The font */
+/* references associated with the font family consist of individual outline and */
+/* bitmapped fonts that may be used with the font access routines of the Font Manager */
+/* and ATS Unicode. */
+typedef UInt32 FMFont;
+
+struct FMFontFamilyInstance {
+ FMFontFamily fontFamily;
+ FMFontStyle fontStyle;
+};
+typedef struct FMFontFamilyInstance FMFontFamilyInstance;
+
+struct FMFontFamilyIterator {
+ UInt32 reserved[16];
+};
+typedef struct FMFontFamilyIterator FMFontFamilyIterator;
+
+struct FMFontIterator {
+ UInt32 reserved[16];
+};
+typedef struct FMFontIterator FMFontIterator;
+
+struct FMFontFamilyInstanceIterator {
+ UInt32 reserved[16];
+};
+typedef struct FMFontFamilyInstanceIterator FMFontFamilyInstanceIterator;
+enum {
+ kInvalidGeneration = 0L,
+ kInvalidFontFamily = -1,
+ kInvalidFont = 0L,
+ kFMCurrentFilterFormat = 0L,
+ kFMDefaultOptions = kNilOptions,
+ kFMUseGlobalScopeOption = 0x00000001
+};
+
+
+typedef UInt32 FMFilterSelector;
+enum {
+ kFMInvalidFilterSelector = 0L,
+ kFMFontTechnologyFilterSelector = 1L,
+ kFMFontContainerFilterSelector = 2L,
+ kFMGenerationFilterSelector = 3L,
+ kFMFontFamilyCallbackFilterSelector = 4L,
+ kFMFontCallbackFilterSelector = 5L
+};
+
+enum {
+ kFMTrueTypeFontTechnology = FOUR_CHAR_CODE('true'),
+ kFMPostScriptFontTechnology = FOUR_CHAR_CODE('typ1')
+};
+
+typedef CALLBACK_API( OSStatus , FMFontFamilyCallbackFilterProcPtr )(FMFontFamily iFontFamily, void *iRefCon);
+typedef CALLBACK_API( OSStatus , FMFontCallbackFilterProcPtr )(FMFont iFont, void *iRefCon);
+typedef STACK_UPP_TYPE(FMFontFamilyCallbackFilterProcPtr) FMFontFamilyCallbackFilterUPP;
+typedef STACK_UPP_TYPE(FMFontCallbackFilterProcPtr) FMFontCallbackFilterUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(FMFontFamilyCallbackFilterUPP)
+ NewFMFontFamilyCallbackFilterUPP (FMFontFamilyCallbackFilterProcPtr userRoutine);
+
+ EXTERN_API(FMFontCallbackFilterUPP)
+ NewFMFontCallbackFilterUPP (FMFontCallbackFilterProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeFMFontFamilyCallbackFilterUPP (FMFontFamilyCallbackFilterUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeFMFontCallbackFilterUPP (FMFontCallbackFilterUPP userUPP);
+
+ EXTERN_API(OSStatus)
+ InvokeFMFontFamilyCallbackFilterUPP (FMFontFamily iFontFamily,
+ void * iRefCon,
+ FMFontFamilyCallbackFilterUPP userUPP);
+
+ EXTERN_API(OSStatus)
+ InvokeFMFontCallbackFilterUPP (FMFont iFont,
+ void * iRefCon,
+ FMFontCallbackFilterUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppFMFontFamilyCallbackFilterProcInfo = 0x000003B0 }; /* pascal 4_bytes Func(2_bytes, 4_bytes) */
+ enum { uppFMFontCallbackFilterProcInfo = 0x000003F0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes) */
+ #define NewFMFontFamilyCallbackFilterUPP(userRoutine) (FMFontFamilyCallbackFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppFMFontFamilyCallbackFilterProcInfo, GetCurrentArchitecture())
+ #define NewFMFontCallbackFilterUPP(userRoutine) (FMFontCallbackFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppFMFontCallbackFilterProcInfo, GetCurrentArchitecture())
+ #define DisposeFMFontFamilyCallbackFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeFMFontCallbackFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeFMFontFamilyCallbackFilterUPP(iFontFamily, iRefCon, userUPP) (OSStatus)CALL_TWO_PARAMETER_UPP((userUPP), uppFMFontFamilyCallbackFilterProcInfo, (iFontFamily), (iRefCon))
+ #define InvokeFMFontCallbackFilterUPP(iFont, iRefCon, userUPP) (OSStatus)CALL_TWO_PARAMETER_UPP((userUPP), uppFMFontCallbackFilterProcInfo, (iFont), (iRefCon))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewFMFontFamilyCallbackFilterProc(userRoutine) NewFMFontFamilyCallbackFilterUPP(userRoutine)
+#define NewFMFontCallbackFilterProc(userRoutine) NewFMFontCallbackFilterUPP(userRoutine)
+#define CallFMFontFamilyCallbackFilterProc(userRoutine, iFontFamily, iRefCon) InvokeFMFontFamilyCallbackFilterUPP(iFontFamily, iRefCon, userRoutine)
+#define CallFMFontCallbackFilterProc(userRoutine, iFont, iRefCon) InvokeFMFontCallbackFilterUPP(iFont, iRefCon, userRoutine)
+
+struct FMFilter {
+ UInt32 format;
+ FMFilterSelector selector;
+ union {
+ FourCharCode fontTechnologyFilter;
+ FSSpec fontContainerFilter;
+ FMGeneration generationFilter;
+ FMFontFamilyCallbackFilterUPP fontFamilyCallbackFilter;
+ FMFontCallbackFilterUPP fontCallbackFilter;
+ } filter;
+};
+typedef struct FMFilter FMFilter;
+/* Enumeration */
+EXTERN_API_C( OSStatus )
+FMCreateFontFamilyIterator (const FMFilter * iFilter, /* can be NULL */
+ void * iRefCon,
+ OptionBits iOptions,
+ FMFontFamilyIterator * ioIterator);
+
+EXTERN_API_C( OSStatus )
+FMDisposeFontFamilyIterator (FMFontFamilyIterator * ioIterator);
+
+EXTERN_API_C( OSStatus )
+FMResetFontFamilyIterator (const FMFilter * iFilter, /* can be NULL */
+ void * iRefCon,
+ OptionBits iOptions,
+ FMFontFamilyIterator * ioIterator);
+
+EXTERN_API_C( OSStatus )
+FMGetNextFontFamily (FMFontFamilyIterator * ioIterator,
+ FMFontFamily * oFontFamily);
+
+EXTERN_API_C( OSStatus )
+FMCreateFontIterator (const FMFilter * iFilter, /* can be NULL */
+ void * iRefCon,
+ OptionBits iOptions,
+ FMFontIterator * ioIterator);
+
+EXTERN_API_C( OSStatus )
+FMDisposeFontIterator (FMFontIterator * ioIterator);
+
+EXTERN_API_C( OSStatus )
+FMResetFontIterator (const FMFilter * iFilter, /* can be NULL */
+ void * iRefCon,
+ OptionBits iOptions,
+ FMFontIterator * ioIterator);
+
+EXTERN_API_C( OSStatus )
+FMGetNextFont (FMFontIterator * ioIterator,
+ FMFont * oFont);
+
+/* Font families */
+EXTERN_API_C( OSStatus )
+FMCreateFontFamilyInstanceIterator (FMFontFamily iFontFamily,
+ FMFontFamilyInstanceIterator * ioIterator);
+
+EXTERN_API_C( OSStatus )
+FMDisposeFontFamilyInstanceIterator (FMFontFamilyInstanceIterator * ioIterator);
+
+EXTERN_API_C( OSStatus )
+FMResetFontFamilyInstanceIterator (FMFontFamily iFontFamily,
+ FMFontFamilyInstanceIterator * ioIterator);
+
+EXTERN_API_C( OSStatus )
+FMGetNextFontFamilyInstance (FMFontFamilyInstanceIterator * ioIterator,
+ FMFont * oFont,
+ FMFontStyle * oStyle, /* can be NULL */
+ FMFontSize * oSize) /* can be NULL */;
+
+EXTERN_API_C( FMFontFamily )
+FMGetFontFamilyFromName (ConstStr255Param iName);
+
+EXTERN_API_C( OSStatus )
+FMGetFontFamilyName (FMFontFamily iFontFamily,
+ Str255 oName);
+
+EXTERN_API_C( OSStatus )
+FMGetFontFamilyTextEncoding (FMFontFamily iFontFamily,
+ TextEncoding * oTextEncoding);
+
+EXTERN_API_C( OSStatus )
+FMGetFontFamilyGeneration (FMFontFamily iFontFamily,
+ FMGeneration * oGeneration);
+
+/* Fonts */
+EXTERN_API_C( OSStatus )
+FMGetFontFormat (FMFont iFont,
+ FourCharCode * oFormat);
+
+EXTERN_API_C( OSStatus )
+FMGetFontTableDirectory (FMFont iFont,
+ ByteCount iLength,
+ void * iBuffer,
+ ByteCount * oActualLength) /* can be NULL */;
+
+EXTERN_API_C( OSStatus )
+FMGetFontTable (FMFont iFont,
+ FourCharCode iTag,
+ ByteOffset iOffset,
+ ByteCount iLength,
+ void * iBuffer,
+ ByteCount * oActualLength) /* can be NULL */;
+
+EXTERN_API_C( OSStatus )
+FMGetFontGeneration (FMFont iFont,
+ FMGeneration * oGeneration);
+
+EXTERN_API_C( OSStatus )
+FMGetFontContainer (FMFont iFont,
+ FSSpec * oFontContainer);
+
+/* Conversion */
+EXTERN_API_C( OSStatus )
+FMGetFontFromFontFamilyInstance (FMFontFamily iFontFamily,
+ FMFontStyle iStyle,
+ FMFont * oFont,
+ FMFontStyle * oIntrinsicStyle) /* can be NULL */;
+
+EXTERN_API_C( OSStatus )
+FMGetFontFamilyInstanceFromFont (FMFont iFont,
+ FMFontFamily * oFontFamily,
+ FMFontStyle * oStyle);
+
+/* Activation */
+EXTERN_API_C( OSStatus )
+FMActivateFonts (const FSSpec * iFontContainer,
+ const FMFilter * iFilter, /* can be NULL */
+ void * iRefCon,
+ OptionBits iOptions);
+
+EXTERN_API_C( OSStatus )
+FMDeactivateFonts (const FSSpec * iFontContainer,
+ const FMFilter * iFilter, /* can be NULL */
+ void * iRefCon,
+ OptionBits iOptions);
+
+EXTERN_API_C( FMGeneration )
+FMGetGeneration (void);
+
+
+typedef FMFontFamily FontFamilyID;
+/*--------------------------------------------------------------------------------------*/
+#if OLDROUTINENAMES
+enum {
+ newYork = kFontIDNewYork,
+ geneva = kFontIDGeneva,
+ monaco = kFontIDMonaco,
+ venice = kFontIDVenice,
+ london = kFontIDLondon,
+ athens = kFontIDAthens,
+ sanFran = kFontIDSanFrancisco,
+ toronto = kFontIDToronto,
+ cairo = kFontIDCairo,
+ losAngeles = kFontIDLosAngeles,
+ times = kFontIDTimes,
+ helvetica = kFontIDHelvetica,
+ courier = kFontIDCourier,
+ symbol = kFontIDSymbol,
+ mobile = kFontIDMobile
+};
+
+#endif /* OLDROUTINENAMES */
+
+/*--------------------------------------------------------------------------------------*/
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __FONTS__ */
+
diff --git a/include/qt/GXEnvironment.h b/include/qt/GXEnvironment.h
new file mode 100644
index 000000000..bcfe750e4
--- /dev/null
+++ b/include/qt/GXEnvironment.h
@@ -0,0 +1,348 @@
+/*
+ File: GXEnvironment.h
+
+ Contains: QuickDraw GX environment constants and interfaces
+
+ Version: Technology: Quickdraw GX 1.1
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __GXENVIRONMENT__
+#define __GXENVIRONMENT__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#ifndef __GXTYPES__
+#include "GXTypes.h"
+#endif
+
+#ifndef __CMAPPLICATION__
+#include "CMApplication.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if defined(__MWERKS__) && TARGET_CPU_68K
+ #pragma push
+ #pragma pointers_in_D0
+#endif
+
+/* old header = graphics macintosh */
+
+enum {
+ defaultPollingHandlerFlags = 0x00,
+ okToSwitchDuringPollFlag = 0x00,
+ dontSwitchDuringPollFlag = 0x01
+};
+
+typedef long gxPollingHandlerFlags;
+typedef CALLBACK_API_C( void , gxPollingHandlerProcPtr )(long reference, gxPollingHandlerFlags flags);
+typedef STACK_UPP_TYPE(gxPollingHandlerProcPtr) gxPollingHandlerUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(gxPollingHandlerUPP)
+ NewgxPollingHandlerUPP (gxPollingHandlerProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposegxPollingHandlerUPP (gxPollingHandlerUPP userUPP);
+
+ EXTERN_API(void)
+ InvokegxPollingHandlerUPP (long reference,
+ gxPollingHandlerFlags flags,
+ gxPollingHandlerUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppgxPollingHandlerProcInfo = 0x000003C1 }; /* no_return_value Func(4_bytes, 4_bytes) */
+ #define NewgxPollingHandlerUPP(userRoutine) (gxPollingHandlerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppgxPollingHandlerProcInfo, GetCurrentArchitecture())
+ #define DisposegxPollingHandlerUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokegxPollingHandlerUPP(reference, flags, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppgxPollingHandlerProcInfo, (reference), (flags))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewgxPollingHandlerProc(userRoutine) NewgxPollingHandlerUPP(userRoutine)
+#define CallgxPollingHandlerProc(userRoutine, reference, flags) InvokegxPollingHandlerUPP(reference, flags, userRoutine)
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( gxPollingHandlerUPP )
+GXGetGraphicsPollingHandler (long * reference) THREEWORDINLINE(0x303C, 0x0245, 0xA832);
+
+EXTERN_API_C( void )
+GXSetGraphicsPollingHandler (gxPollingHandlerUPP handler,
+ long reference) THREEWORDINLINE(0x303C, 0x0246, 0xA832);
+
+/* old header = graphics toolbox */
+
+
+/* QD to QD GX Translator typedefs */
+#endif /* CALL_NOT_IN_CARBON */
+
+enum {
+ gxDefaultOptionsTranslation = 0x0000,
+ gxOptimizedTranslation = 0x0001,
+ gxReplaceLineWidthTranslation = 0x0002,
+ gxSimpleScalingTranslation = 0x0004,
+ gxSimpleGeometryTranslation = 0x0008, /* implies simple scaling */
+ gxSimpleLinesTranslation = 0x000C, /* implies simple geometry & scaling */
+ gxLayoutTextTranslation = 0x0010, /* turn on gxLine layout (normally off) */
+ gxRasterTargetTranslation = 0x0020,
+ gxPostScriptTargetTranslation = 0x0040,
+ gxVectorTargetTranslation = 0x0080,
+ gxPDDTargetTranslation = 0x0100,
+ gxDontConvertPatternsTranslation = 0x1000,
+ gxDontSplitBitmapsTranslation = 0x2000
+};
+
+typedef long gxTranslationOption;
+enum {
+ gxContainsFormsBegin = 0x0001,
+ gxContainsFormsEnd = 0x0002,
+ gxContainsPostScript = 0x0004,
+ gxContainsEmptyPostScript = 0x0008
+};
+
+typedef long gxTranslationStatistic;
+enum {
+ gxQuickDrawPictTag = FOUR_CHAR_CODE('pict')
+};
+
+
+struct gxQuickDrawPict {
+ /* translator inputs */
+ gxTranslationOption options;
+ Rect srcRect;
+ Point styleStretch;
+
+ /* size of quickdraw picture data */
+ unsigned long dataLength;
+
+ /* file alias */
+ gxBitmapDataSourceAlias alias;
+};
+typedef struct gxQuickDrawPict gxQuickDrawPict;
+/* WindowRecord utilities */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( gxViewPort )
+GXNewWindowViewPort (WindowPtr qdWindow) THREEWORDINLINE(0x303C, 0x0236, 0xA832);
+
+EXTERN_API_C( gxViewPort )
+GXGetWindowViewPort (WindowPtr qdWindow) THREEWORDINLINE(0x303C, 0x0237, 0xA832);
+
+EXTERN_API_C( WindowPtr )
+GXGetViewPortWindow (gxViewPort portOrder) THREEWORDINLINE(0x303C, 0x0238, 0xA832);
+
+/* GDevice utilities */
+EXTERN_API_C( GDHandle )
+GXGetViewDeviceGDevice (gxViewDevice theDevice) THREEWORDINLINE(0x303C, 0x0239, 0xA832);
+
+EXTERN_API_C( gxViewDevice )
+GXGetGDeviceViewDevice (GDHandle qdGDevice) THREEWORDINLINE(0x303C, 0x023A, 0xA832);
+
+/* gxPoint utilities */
+EXTERN_API_C( void )
+GXConvertQDPoint (const Point * shortPt,
+ gxViewPort portOrder,
+ gxPoint * fixedPt) THREEWORDINLINE(0x303C, 0x023B, 0xA832);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API_C( OSErr , gxShapeSpoolProcPtr )(gxShape toSpool, long refCon);
+/* printing utilities typedef */
+typedef CALLBACK_API_C( void , gxUserViewPortFilterProcPtr )(gxShape toFilter, gxViewPort portOrder, long refCon);
+typedef CALLBACK_API_C( long , gxConvertQDFontProcPtr )(gxStyle dst, long txFont, long txFace);
+typedef STACK_UPP_TYPE(gxShapeSpoolProcPtr) gxShapeSpoolUPP;
+typedef STACK_UPP_TYPE(gxUserViewPortFilterProcPtr) gxUserViewPortFilterUPP;
+typedef STACK_UPP_TYPE(gxConvertQDFontProcPtr) gxConvertQDFontUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(gxShapeSpoolUPP)
+ NewgxShapeSpoolUPP (gxShapeSpoolProcPtr userRoutine);
+
+ EXTERN_API(gxUserViewPortFilterUPP)
+ NewgxUserViewPortFilterUPP (gxUserViewPortFilterProcPtr userRoutine);
+
+ EXTERN_API(gxConvertQDFontUPP)
+ NewgxConvertQDFontUPP (gxConvertQDFontProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposegxShapeSpoolUPP (gxShapeSpoolUPP userUPP);
+
+ EXTERN_API(void)
+ DisposegxUserViewPortFilterUPP (gxUserViewPortFilterUPP userUPP);
+
+ EXTERN_API(void)
+ DisposegxConvertQDFontUPP (gxConvertQDFontUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokegxShapeSpoolUPP (gxShape toSpool,
+ long refCon,
+ gxShapeSpoolUPP userUPP);
+
+ EXTERN_API(void)
+ InvokegxUserViewPortFilterUPP (gxShape toFilter,
+ gxViewPort portOrder,
+ long refCon,
+ gxUserViewPortFilterUPP userUPP);
+
+ EXTERN_API(long)
+ InvokegxConvertQDFontUPP (gxStyle dst,
+ long txFont,
+ long txFace,
+ gxConvertQDFontUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppgxShapeSpoolProcInfo = 0x000003E1 }; /* 2_bytes Func(4_bytes, 4_bytes) */
+ enum { uppgxUserViewPortFilterProcInfo = 0x00000FC1 }; /* no_return_value Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppgxConvertQDFontProcInfo = 0x00000FF1 }; /* 4_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ #define NewgxShapeSpoolUPP(userRoutine) (gxShapeSpoolUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppgxShapeSpoolProcInfo, GetCurrentArchitecture())
+ #define NewgxUserViewPortFilterUPP(userRoutine) (gxUserViewPortFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppgxUserViewPortFilterProcInfo, GetCurrentArchitecture())
+ #define NewgxConvertQDFontUPP(userRoutine) (gxConvertQDFontUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppgxConvertQDFontProcInfo, GetCurrentArchitecture())
+ #define DisposegxShapeSpoolUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposegxUserViewPortFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposegxConvertQDFontUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokegxShapeSpoolUPP(toSpool, refCon, userUPP) (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppgxShapeSpoolProcInfo, (toSpool), (refCon))
+ #define InvokegxUserViewPortFilterUPP(toFilter, portOrder, refCon, userUPP) CALL_THREE_PARAMETER_UPP((userUPP), uppgxUserViewPortFilterProcInfo, (toFilter), (portOrder), (refCon))
+ #define InvokegxConvertQDFontUPP(dst, txFont, txFace, userUPP) (long)CALL_THREE_PARAMETER_UPP((userUPP), uppgxConvertQDFontProcInfo, (dst), (txFont), (txFace))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewgxShapeSpoolProc(userRoutine) NewgxShapeSpoolUPP(userRoutine)
+#define NewgxUserViewPortFilterProc(userRoutine) NewgxUserViewPortFilterUPP(userRoutine)
+#define NewgxConvertQDFontProc(userRoutine) NewgxConvertQDFontUPP(userRoutine)
+#define CallgxShapeSpoolProc(userRoutine, toSpool, refCon) InvokegxShapeSpoolUPP(toSpool, refCon, userRoutine)
+#define CallgxUserViewPortFilterProc(userRoutine, toFilter, portOrder, refCon) InvokegxUserViewPortFilterUPP(toFilter, portOrder, refCon, userRoutine)
+#define CallgxConvertQDFontProc(userRoutine, dst, txFont, txFace) InvokegxConvertQDFontUPP(dst, txFont, txFace, userRoutine)
+
+typedef gxShapeSpoolProcPtr gxShapeSpoolFunction;
+typedef gxUserViewPortFilterProcPtr gxUserViewPortFilter;
+typedef gxConvertQDFontProcPtr gxConvertQDFontFunction;
+/* mouse utilities */
+/* return mouse location in fixed-gxPoint global space */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( void )
+GXGetGlobalMouse (gxPoint * globalPt) THREEWORDINLINE(0x303C, 0x023C, 0xA832);
+
+/* return fixed-gxPoint local mouse (gxViewPort == 0 --> default) */
+EXTERN_API_C( void )
+GXGetViewPortMouse (gxViewPort portOrder,
+ gxPoint * localPt) THREEWORDINLINE(0x303C, 0x023D, 0xA832);
+
+/* printing utilities */
+EXTERN_API_C( gxUserViewPortFilterUPP )
+GXGetViewPortFilter (gxViewPort portOrder,
+ long * refCon) THREEWORDINLINE(0x303C, 0x025E, 0xA832);
+
+EXTERN_API_C( void )
+GXSetViewPortFilter (gxViewPort portOrder,
+ gxUserViewPortFilterUPP filter,
+ long refCon) THREEWORDINLINE(0x303C, 0x023E, 0xA832);
+
+/* QD to QD GX Translator functions */
+EXTERN_API_C( void )
+GXInstallQDTranslator (GrafPtr port,
+ gxTranslationOption options,
+ const Rect * srcRect,
+ const Rect * dstRect,
+ Point styleStrech,
+ gxShapeSpoolUPP userFunction,
+ void * reference) THREEWORDINLINE(0x303C, 0x023F, 0xA832);
+
+EXTERN_API_C( gxTranslationStatistic )
+GXRemoveQDTranslator (GrafPtr port,
+ gxTranslationStatistic * statistic) THREEWORDINLINE(0x303C, 0x0240, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXConvertPICTToShape (PicHandle pict,
+ gxTranslationOption options,
+ const Rect * srcRect,
+ const Rect * dstRect,
+ Point styleStretch,
+ gxShape destination,
+ gxTranslationStatistic * stats) THREEWORDINLINE(0x303C, 0x0241, 0xA832);
+
+/* Find the best GX style given a QD font and face. Called by the QD->GX translator */
+EXTERN_API_C( long )
+GXConvertQDFont (gxStyle theStyle,
+ long txFont,
+ long txFace) THREEWORDINLINE(0x303C, 0x0242, 0xA832);
+
+EXTERN_API_C( gxConvertQDFontUPP )
+GXGetConvertQDFont (void) THREEWORDINLINE(0x303C, 0x0243, 0xA832);
+
+EXTERN_API_C( void )
+GXSetConvertQDFont (gxConvertQDFontUPP userFunction) THREEWORDINLINE(0x303C, 0x0244, 0xA832);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef unsigned long gxProfilePoolAttributes;
+
+struct gxFlatProfileListItem {
+ gxProfilePoolAttributes attributes; /* information about this particular profile's source*/
+ CMProfileRef profileRef; /* reference to profile, only valid before shape is disposed*/
+ CMProfileIdentifier identifier; /* information on how to find the profile upon unflattening*/
+};
+typedef struct gxFlatProfileListItem gxFlatProfileListItem;
+
+
+#if defined(__MWERKS__) && TARGET_CPU_68K
+ #pragma pop
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __GXENVIRONMENT__ */
+
diff --git a/include/qt/GXErrors.h b/include/qt/GXErrors.h
new file mode 100644
index 000000000..dbc7eecfa
--- /dev/null
+++ b/include/qt/GXErrors.h
@@ -0,0 +1,766 @@
+/*
+ File: GXErrors.h
+
+ Contains: QuickDraw GX error constants and debugging routines
+
+ Version: Technology: Quickdraw GX 1.1
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __GXERRORS__
+#define __GXERRORS__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+#ifndef __GXTYPES__
+#include "GXTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if defined(__MWERKS__) && TARGET_CPU_68K
+ #pragma push
+ #pragma pointers_in_D0
+#endif
+
+enum {
+ gxFirstSystemError = -27999, /* 0xffff92a1 */
+ gxFirstFatalError = -27999,
+ gxLastFatalError = -27951,
+ gxFirstNonfatalError = -27950,
+ gxFirstFontScalerError = -27900,
+ gxLastFontScalerError = -27851,
+ gxFirstParameterError = -27850,
+ gxFirstImplementationLimitError = -27800,
+ gxFirstSystemDebuggingError = -27700,
+ gxLastSystemError = -27000, /* 0xffff9688 */
+ gxFirstLibraryError = 1048576L, /* 0x00100000 */
+ gxLastLibraryError = 2097151L, /* 0x001fffff */
+ gxFirstAppError = 2097152L, /* 0x00200000 */
+ gxLastAppError = 4194303L, /* 0x003fffff */
+ gxFirstSystemWarning = -26999, /* 0xffff9689 */
+ gxFirstResultOutOfRangeWarning = -26950,
+ gxFirstParameterOutOfRangeWarning = -26900,
+ gxFirstFontScalerWarning = -26850,
+ gxFirstSystemDebuggingWarning = -26700,
+ gxLastSystemWarning = -26000, /* 0xffff9a70 */
+ gxFirstLibraryWarning = 4194304L, /* 0x00400000 */
+ gxLastLibraryWarning = 5242879L, /* 0x004fffff */
+ gxFirstAppWarning = 5242880L, /* 0x00500000 */
+ gxLastAppWarning = 7340031L, /* 0x006fffff */
+ gxFirstSystemNotice = -25999, /* 0xffff9a71 */
+ gxLastSystemNotice = -25500, /* 0xffff9c64 */
+ gxFirstLibraryNotice = 7340032L, /* 0x00700000 */
+ gxLastLibraryNotice = 7602175L, /* 0x0073ffff */
+ gxFirstAppNotice = 7602176L, /* 0x00740000 */
+ gxLastAppNotice = 8388607L /* 0x007fffff */
+};
+
+enum {
+ /* truly fatal errors */
+ out_of_memory = gxFirstFatalError,
+ internal_fatal_error = gxFirstFatalError + 1,
+ no_outline_font_found = gxFirstFatalError + 2,
+ not_enough_memory_for_graphics_client_heap = gxFirstFatalError + 3,
+ could_not_create_backing_store = gxFirstFatalError + 4, /* internal errors */
+ internal_error = gxFirstNonfatalError,
+ internal_font_error = gxFirstNonfatalError + 1,
+ internal_layout_error = gxFirstNonfatalError + 2, /* recoverable errors */
+ could_not_dispose_backing_store = internal_layout_error + 2,
+ unflattening_interrupted_by_client = internal_layout_error + 3, /* font manager errors */
+ font_cannot_be_changed = internal_layout_error + 4,
+ illegal_font_parameter = internal_layout_error + 5, /* gxFont scaler errors */
+ null_font_scaler_context = gxFirstFontScalerError,
+ null_font_scaler_input = gxFirstFontScalerError + 1,
+ invalid_font_scaler_context = gxFirstFontScalerError + 2,
+ invalid_font_scaler_input = gxFirstFontScalerError + 3,
+ invalid_font_scaler_font_data = gxFirstFontScalerError + 4,
+ font_scaler_newblock_failed = gxFirstFontScalerError + 5,
+ font_scaler_getfonttable_failed = gxFirstFontScalerError + 6,
+ font_scaler_bitmap_allocation_failed = gxFirstFontScalerError + 7,
+ font_scaler_outline_allocation_failed = gxFirstFontScalerError + 8,
+ required_font_scaler_table_missing = gxFirstFontScalerError + 9,
+ unsupported_font_scaler_outline_format = gxFirstFontScalerError + 10,
+ unsupported_font_scaler_stream_format = gxFirstFontScalerError + 11,
+ unsupported_font_scaler_font_format = gxFirstFontScalerError + 12,
+ font_scaler_hinting_error = gxFirstFontScalerError + 13,
+ font_scaler_rasterizer_error = gxFirstFontScalerError + 14,
+ font_scaler_internal_error = gxFirstFontScalerError + 15,
+ font_scaler_invalid_matrix = gxFirstFontScalerError + 16,
+ font_scaler_fixed_overflow = gxFirstFontScalerError + 17,
+ font_scaler_api_version_mismatch = gxFirstFontScalerError + 18,
+ font_scaler_streaming_aborted = gxFirstFontScalerError + 19,
+ unknown_font_scaler_error = gxFirstFontScalerError + 20, /* bad parameters */
+ parameter_is_nil = gxFirstParameterError,
+ shape_is_nil = gxFirstParameterError + 1,
+ style_is_nil = gxFirstParameterError + 2,
+ transform_is_nil = gxFirstParameterError + 3,
+ ink_is_nil = gxFirstParameterError + 4,
+ transferMode_is_nil = gxFirstParameterError + 5,
+ color_is_nil = gxFirstParameterError + 6,
+ colorProfile_is_nil = gxFirstParameterError + 7,
+ colorSet_is_nil = gxFirstParameterError + 8,
+ spoolProcedure_is_nil = gxFirstParameterError + 9,
+ tag_is_nil = gxFirstParameterError + 10,
+ type_is_nil = gxFirstParameterError + 11,
+ mapping_is_nil = gxFirstParameterError + 12,
+ invalid_viewDevice_reference = gxFirstParameterError + 13,
+ invalid_viewGroup_reference = gxFirstParameterError + 14,
+ invalid_viewPort_reference = gxFirstParameterError + 15, /* implementation limits, these should be right before the debugging errors */
+ number_of_contours_exceeds_implementation_limit = gxFirstImplementationLimitError,
+ number_of_points_exceeds_implementation_limit = gxFirstImplementationLimitError + 1,
+ size_of_polygon_exceeds_implementation_limit = gxFirstImplementationLimitError + 2,
+ size_of_path_exceeds_implementation_limit = gxFirstImplementationLimitError + 3,
+ size_of_text_exceeds_implementation_limit = gxFirstImplementationLimitError + 4,
+ size_of_bitmap_exceeds_implementation_limit = gxFirstImplementationLimitError + 5,
+ number_of_colors_exceeds_implementation_limit = gxFirstImplementationLimitError + 6,
+ procedure_not_reentrant = gxFirstImplementationLimitError + 7
+};
+
+
+
+enum {
+ /* internal debugging errors */
+ functionality_unimplemented = gxFirstSystemDebuggingError,
+ clip_to_frame_shape_unimplemented = gxFirstSystemDebuggingError + 1, /* font parameter debugging errors */
+ illegal_font_storage_type = gxFirstSystemDebuggingError + 2,
+ illegal_font_storage_reference = gxFirstSystemDebuggingError + 3,
+ illegal_font_attributes = gxFirstSystemDebuggingError + 4, /* parameter debugging errors */
+ parameter_out_of_range = gxFirstSystemDebuggingError + 5,
+ inconsistent_parameters = gxFirstSystemDebuggingError + 6,
+ index_is_less_than_zero = gxFirstSystemDebuggingError + 7,
+ index_is_less_than_one = gxFirstSystemDebuggingError + 8,
+ count_is_less_than_zero = gxFirstSystemDebuggingError + 9,
+ count_is_less_than_one = gxFirstSystemDebuggingError + 10,
+ contour_is_less_than_zero = gxFirstSystemDebuggingError + 11,
+ length_is_less_than_zero = gxFirstSystemDebuggingError + 12,
+ invalid_client_reference = gxFirstSystemDebuggingError + 13,
+ invalid_graphics_heap_start_pointer = gxFirstSystemDebuggingError + 14,
+ invalid_nongraphic_globals_pointer = gxFirstSystemDebuggingError + 15,
+ colorSpace_out_of_range = gxFirstSystemDebuggingError + 16,
+ pattern_lattice_out_of_range = gxFirstSystemDebuggingError + 17,
+ frequency_parameter_out_of_range = gxFirstSystemDebuggingError + 18,
+ tinting_parameter_out_of_range = gxFirstSystemDebuggingError + 19,
+ method_parameter_out_of_range = gxFirstSystemDebuggingError + 20,
+ space_may_not_be_indexed = gxFirstSystemDebuggingError + 21,
+ glyph_index_too_small = gxFirstSystemDebuggingError + 22,
+ no_glyphs_added_to_font = gxFirstSystemDebuggingError + 23,
+ glyph_not_added_to_font = gxFirstSystemDebuggingError + 24,
+ point_does_not_intersect_bitmap = gxFirstSystemDebuggingError + 25,
+ required_font_table_not_present = gxFirstSystemDebuggingError + 26,
+ unknown_font_table_format = gxFirstSystemDebuggingError + 27, /* the styles encoding is not present in the font */
+ shapeFill_not_allowed = gxFirstSystemDebuggingError + 28,
+ inverseFill_face_must_set_clipLayer_flag = gxFirstSystemDebuggingError + 29,
+ invalid_transferMode_colorSpace = gxFirstSystemDebuggingError + 30,
+ colorProfile_must_be_nil = gxFirstSystemDebuggingError + 31,
+ bitmap_pixel_size_must_be_1 = gxFirstSystemDebuggingError + 32,
+ empty_shape_not_allowed = gxFirstSystemDebuggingError + 33,
+ ignorePlatformShape_not_allowed = gxFirstSystemDebuggingError + 34,
+ nil_style_in_glyph_not_allowed = gxFirstSystemDebuggingError + 35,
+ complex_glyph_style_not_allowed = gxFirstSystemDebuggingError + 36,
+ invalid_mapping = gxFirstSystemDebuggingError + 37,
+ cannot_set_item_shapes_to_nil = gxFirstSystemDebuggingError + 38,
+ cannot_use_original_item_shapes_when_growing_picture = gxFirstSystemDebuggingError + 39,
+ cannot_add_unspecified_new_glyphs = gxFirstSystemDebuggingError + 40,
+ cannot_dispose_locked_tag = gxFirstSystemDebuggingError + 41,
+ cannot_dispose_locked_shape = gxFirstSystemDebuggingError + 42, /* restricted access */
+ shape_access_not_allowed = gxFirstSystemDebuggingError + 43,
+ colorSet_access_restricted = gxFirstSystemDebuggingError + 44,
+ colorProfile_access_restricted = gxFirstSystemDebuggingError + 45,
+ tag_access_restricted = gxFirstSystemDebuggingError + 46,
+ viewDevice_access_restricted = gxFirstSystemDebuggingError + 47,
+ graphic_type_does_not_have_a_structure = gxFirstSystemDebuggingError + 48,
+ style_run_array_does_not_match_number_of_characters = gxFirstSystemDebuggingError + 49,
+ rectangles_cannot_be_inserted_into = gxFirstSystemDebuggingError + 50,
+ unknown_graphics_heap = gxFirstSystemDebuggingError + 51,
+ graphics_routine_selector_is_obsolete = gxFirstSystemDebuggingError + 52,
+ cannot_set_graphics_client_memory_without_setting_size = gxFirstSystemDebuggingError + 53,
+ graphics_client_memory_too_small = gxFirstSystemDebuggingError + 54,
+ graphics_client_memory_is_already_allocated = gxFirstSystemDebuggingError + 55,
+ viewPort_is_a_window = gxFirstSystemDebuggingError + 56, /* wrong type/bad reference */
+ illegal_type_for_shape = gxFirstSystemDebuggingError + 57,
+ shape_does_not_contain_a_bitmap = gxFirstSystemDebuggingError + 58,
+ shape_does_not_contain_text = gxFirstSystemDebuggingError + 59,
+ picture_expected = gxFirstSystemDebuggingError + 60,
+ bitmap_is_not_resizable = gxFirstSystemDebuggingError + 61,
+ shape_may_not_be_a_bitmap = gxFirstSystemDebuggingError + 62,
+ shape_may_not_be_a_picture = gxFirstSystemDebuggingError + 63,
+ graphic_type_does_not_contain_points = gxFirstSystemDebuggingError + 64,
+ graphic_type_does_not_have_multiple_contours = gxFirstSystemDebuggingError + 65,
+ graphic_type_cannot_be_mapped = gxFirstSystemDebuggingError + 66,
+ graphic_type_cannot_be_moved = gxFirstSystemDebuggingError + 67,
+ graphic_type_cannot_be_scaled = gxFirstSystemDebuggingError + 68,
+ graphic_type_cannot_be_rotated = gxFirstSystemDebuggingError + 69,
+ graphic_type_cannot_be_skewed = gxFirstSystemDebuggingError + 70,
+ graphic_type_cannot_be_reset = gxFirstSystemDebuggingError + 71,
+ graphic_type_cannot_be_dashed = gxFirstSystemDebuggingError + 72,
+ graphic_type_cannot_be_reduced = gxFirstSystemDebuggingError + 73,
+ graphic_type_cannot_be_inset = gxFirstSystemDebuggingError + 74,
+ shape_cannot_be_inverted = gxFirstSystemDebuggingError + 75,
+ shape_does_not_have_area = gxFirstSystemDebuggingError + 76,
+ shape_does_not_have_length = gxFirstSystemDebuggingError + 77,
+ first_glyph_advance_must_be_absolute = gxFirstSystemDebuggingError + 78,
+ picture_cannot_contain_itself = gxFirstSystemDebuggingError + 79,
+ viewPort_cannot_contain_itself = gxFirstSystemDebuggingError + 80,
+ cannot_set_unique_items_attribute_when_picture_contains_items = gxFirstSystemDebuggingError + 81,
+ layer_style_cannot_contain_a_face = gxFirstSystemDebuggingError + 82,
+ layer_glyph_shape_cannot_contain_nil_styles = gxFirstSystemDebuggingError + 83, /* validation errors */
+ object_wrong_type = gxFirstSystemDebuggingError + 84,
+ shape_wrong_type = gxFirstSystemDebuggingError + 85,
+ style_wrong_type = gxFirstSystemDebuggingError + 86,
+ ink_wrong_type = gxFirstSystemDebuggingError + 87,
+ transform_wrong_type = gxFirstSystemDebuggingError + 88,
+ device_wrong_type = gxFirstSystemDebuggingError + 89,
+ port_wrong_type = gxFirstSystemDebuggingError + 90, /* validation cache errors */
+ shape_cache_wrong_type = gxFirstSystemDebuggingError + 91,
+ style_cache_wrong_type = gxFirstSystemDebuggingError + 92,
+ ink_cache_wrong_type = gxFirstSystemDebuggingError + 93,
+ transform_cache_wrong_type = gxFirstSystemDebuggingError + 94,
+ port_cache_wrong_type = gxFirstSystemDebuggingError + 95,
+ shape_cache_parent_mismatch = gxFirstSystemDebuggingError + 96,
+ style_cache_parent_mismatch = gxFirstSystemDebuggingError + 97,
+ ink_cache_parent_mismatch = gxFirstSystemDebuggingError + 98,
+ transform_cache_parent_mismatch = gxFirstSystemDebuggingError + 99,
+ port_cache_parent_mismatch = gxFirstSystemDebuggingError + 100,
+ invalid_shape_cache_port = gxFirstSystemDebuggingError + 101,
+ invalid_shape_cache_device = gxFirstSystemDebuggingError + 102,
+ invalid_ink_cache_port = gxFirstSystemDebuggingError + 103,
+ invalid_ink_cache_device = gxFirstSystemDebuggingError + 104,
+ invalid_style_cache_port = gxFirstSystemDebuggingError + 105,
+ invalid_style_cache_device = gxFirstSystemDebuggingError + 106,
+ invalid_transform_cache_port = gxFirstSystemDebuggingError + 107,
+ invalid_transform_cache_device = gxFirstSystemDebuggingError + 108,
+ recursive_caches = gxFirstSystemDebuggingError + 109, /* validation shape cache errors */
+ invalid_fillShape_ownerCount = gxFirstSystemDebuggingError + 110,
+ recursive_fillShapes = gxFirstSystemDebuggingError + 111, /* validation memory block errors */
+ indirect_memory_block_too_small = gxFirstSystemDebuggingError + 112,
+ indirect_memory_block_too_large = gxFirstSystemDebuggingError + 113,
+ unexpected_nil_pointer = gxFirstSystemDebuggingError + 114,
+ bad_address = gxFirstSystemDebuggingError + 115, /* validation object errors */
+ no_owners = gxFirstSystemDebuggingError + 116,
+ invalid_pointer = gxFirstSystemDebuggingError + 117,
+ invalid_seed = gxFirstSystemDebuggingError + 118,
+ invalid_frame_seed = gxFirstSystemDebuggingError + 119,
+ invalid_text_seed = gxFirstSystemDebuggingError + 120,
+ invalid_draw_seed = gxFirstSystemDebuggingError + 121,
+ bad_private_flags = gxFirstSystemDebuggingError + 122, /* validation path and polygon errors */
+ invalid_vector_count = gxFirstSystemDebuggingError + 123,
+ invalid_contour_count = gxFirstSystemDebuggingError + 124, /* validation bitmap errors */
+ bitmap_ptr_too_small = gxFirstSystemDebuggingError + 125,
+ bitmap_ptr_not_aligned = gxFirstSystemDebuggingError + 126,
+ bitmap_rowBytes_negative = gxFirstSystemDebuggingError + 127,
+ bitmap_width_negative = gxFirstSystemDebuggingError + 128,
+ bitmap_height_negative = gxFirstSystemDebuggingError + 129,
+ invalid_pixelSize = gxFirstSystemDebuggingError + 130,
+ bitmap_rowBytes_too_small = gxFirstSystemDebuggingError + 131,
+ bitmap_rowBytes_not_aligned = gxFirstSystemDebuggingError + 132,
+ bitmap_rowBytes_must_be_specified_for_user_image_buffer = gxFirstSystemDebuggingError + 133, /* validation bitmap image errors */
+ invalid_bitImage_fileOffset = gxFirstSystemDebuggingError + 134,
+ invalid_bitImage_owners = gxFirstSystemDebuggingError + 135,
+ invalid_bitImage_rowBytes = gxFirstSystemDebuggingError + 136,
+ invalid_bitImage_internal_flag = gxFirstSystemDebuggingError + 137, /* validation text errors */
+ text_bounds_cache_wrong_size = gxFirstSystemDebuggingError + 138,
+ text_metrics_cache_wrong_size = gxFirstSystemDebuggingError + 139,
+ text_index_cache_wrong_size = gxFirstSystemDebuggingError + 140, /* validation glyph errors */
+ glyph_run_count_negative = gxFirstSystemDebuggingError + 141,
+ glyph_run_count_zero = gxFirstSystemDebuggingError + 142,
+ glyph_run_counts_do_not_sum_to_character_count = gxFirstSystemDebuggingError + 143,
+ glyph_first_advance_bit_set_not_allowed = gxFirstSystemDebuggingError + 144,
+ glyph_tangent_vectors_both_zero = gxFirstSystemDebuggingError + 145, /* validation layout errors */
+ layout_run_length_negative = gxFirstSystemDebuggingError + 146,
+ layout_run_length_zero = gxFirstSystemDebuggingError + 147,
+ layout_run_level_negative = gxFirstSystemDebuggingError + 148,
+ layout_run_lengths_do_not_sum_to_text_length = gxFirstSystemDebuggingError + 149, /* validation picture errors */
+ bad_shape_in_picture = gxFirstSystemDebuggingError + 150,
+ bad_style_in_picture = gxFirstSystemDebuggingError + 151,
+ bad_ink_in_picture = gxFirstSystemDebuggingError + 152,
+ bad_transform_in_picture = gxFirstSystemDebuggingError + 153,
+ bad_shape_cache_in_picture = gxFirstSystemDebuggingError + 154,
+ bad_seed_in_picture = gxFirstSystemDebuggingError + 155,
+ invalid_picture_count = gxFirstSystemDebuggingError + 156, /* validation text face errors */
+ bad_textLayer_count = gxFirstSystemDebuggingError + 157,
+ bad_fillType_in_textFace = gxFirstSystemDebuggingError + 158,
+ bad_style_in_textFace = gxFirstSystemDebuggingError + 159,
+ bad_transform_in_textFace = gxFirstSystemDebuggingError + 160, /* validation transform errors */
+ invalid_matrix_flag = gxFirstSystemDebuggingError + 161,
+ transform_clip_missing = gxFirstSystemDebuggingError + 162, /* validation font cache errors */
+ metrics_wrong_type = gxFirstSystemDebuggingError + 163,
+ metrics_point_size_probably_bad = gxFirstSystemDebuggingError + 164,
+ scalar_block_wrong_type = gxFirstSystemDebuggingError + 165,
+ scalar_block_parent_mismatch = gxFirstSystemDebuggingError + 166,
+ scalar_block_too_small = gxFirstSystemDebuggingError + 167,
+ scalar_block_too_large = gxFirstSystemDebuggingError + 168,
+ invalid_metrics_range = gxFirstSystemDebuggingError + 169,
+ invalid_metrics_flags = gxFirstSystemDebuggingError + 170,
+ metrics_maxWidth_probably_bad = gxFirstSystemDebuggingError + 171,
+ font_wrong_type = gxFirstSystemDebuggingError + 172,
+ font_wrong_size = gxFirstSystemDebuggingError + 173,
+ invalid_font_platform = gxFirstSystemDebuggingError + 174,
+ invalid_lookup_range = gxFirstSystemDebuggingError + 175,
+ invalid_lookup_platform = gxFirstSystemDebuggingError + 176,
+ font_not_in_font_list = gxFirstSystemDebuggingError + 177,
+ metrics_not_in_metrics_list = gxFirstSystemDebuggingError + 178, /* validation view device errors */
+ bad_device_private_flags = gxFirstSystemDebuggingError + 179,
+ bad_device_attributes = gxFirstSystemDebuggingError + 180,
+ invalid_device_number = gxFirstSystemDebuggingError + 181,
+ invalid_device_viewGroup = gxFirstSystemDebuggingError + 182,
+ invalid_device_bounds = gxFirstSystemDebuggingError + 183,
+ invalid_bitmap_in_device = gxFirstSystemDebuggingError + 184, /* validation color set errors */
+ colorSet_wrong_type = gxFirstSystemDebuggingError + 185,
+ invalid_colorSet_viewDevice_owners = gxFirstSystemDebuggingError + 186,
+ invalid_colorSet_colorSpace = gxFirstSystemDebuggingError + 187,
+ invalid_colorSet_count = gxFirstSystemDebuggingError + 188, /* validation color profile errors */
+ colorProfile_wrong_type = gxFirstSystemDebuggingError + 189,
+ invalid_colorProfile_flags = gxFirstSystemDebuggingError + 190,
+ invalid_colorProfile_response_count = gxFirstSystemDebuggingError + 191, /* validation internal backing store errors */
+ backing_free_parent_mismatch = gxFirstSystemDebuggingError + 192,
+ backing_store_parent_mismatch = gxFirstSystemDebuggingError + 193
+};
+
+
+enum {
+ /* warnings about warnings */
+ warning_stack_underflow = gxFirstSystemWarning,
+ warning_stack_overflow = gxFirstSystemWarning + 1,
+ notice_stack_underflow = gxFirstSystemWarning + 2,
+ notice_stack_overflow = gxFirstSystemWarning + 3,
+ about_to_grow_heap = gxFirstSystemWarning + 4,
+ about_to_unload_objects = gxFirstSystemWarning + 5, /* result went out of range */
+ map_shape_out_of_range = gxFirstResultOutOfRangeWarning,
+ move_shape_out_of_range = gxFirstResultOutOfRangeWarning + 1,
+ scale_shape_out_of_range = gxFirstResultOutOfRangeWarning + 2,
+ rotate_shape_out_of_range = gxFirstResultOutOfRangeWarning + 3,
+ skew_shape_out_of_range = gxFirstResultOutOfRangeWarning + 4,
+ map_transform_out_of_range = gxFirstResultOutOfRangeWarning + 5,
+ move_transform_out_of_range = gxFirstResultOutOfRangeWarning + 6,
+ scale_transform_out_of_range = gxFirstResultOutOfRangeWarning + 7,
+ rotate_transform_out_of_range = gxFirstResultOutOfRangeWarning + 8,
+ skew_transform_out_of_range = gxFirstResultOutOfRangeWarning + 9,
+ map_points_out_of_range = gxFirstResultOutOfRangeWarning + 10, /* gave a parameter out of range */
+ contour_out_of_range = gxFirstParameterOutOfRangeWarning,
+ index_out_of_range_in_contour = gxFirstParameterOutOfRangeWarning + 1,
+ picture_index_out_of_range = gxFirstParameterOutOfRangeWarning + 2,
+ color_index_requested_not_found = gxFirstParameterOutOfRangeWarning + 3,
+ colorSet_index_out_of_range = gxFirstParameterOutOfRangeWarning + 4,
+ index_out_of_range = gxFirstParameterOutOfRangeWarning + 5,
+ count_out_of_range = gxFirstParameterOutOfRangeWarning + 6,
+ length_out_of_range = gxFirstParameterOutOfRangeWarning + 7,
+ font_table_index_out_of_range = gxFirstParameterOutOfRangeWarning + 8,
+ font_glyph_index_out_of_range = gxFirstParameterOutOfRangeWarning + 9,
+ point_out_of_range = gxFirstParameterOutOfRangeWarning + 10,
+ profile_response_out_of_range = gxFirstParameterOutOfRangeWarning + 11, /* gxFont scaler warnings */
+ font_scaler_no_output = gxFirstFontScalerWarning,
+ font_scaler_fake_metrics = gxFirstFontScalerWarning + 1,
+ font_scaler_fake_linespacing = gxFirstFontScalerWarning + 2,
+ font_scaler_glyph_substitution = gxFirstFontScalerWarning + 3,
+ font_scaler_no_kerning_applied = gxFirstFontScalerWarning + 4, /* might not be what you expected */
+ character_substitution_took_place = gxFirstFontScalerWarning + 5,
+ unable_to_get_bounds_on_multiple_devices = gxFirstFontScalerWarning + 6,
+ font_language_not_found = gxFirstFontScalerWarning + 7,
+ font_not_found_during_unflattening = gxFirstFontScalerWarning + 8, /*storage */
+ unrecognized_stream_version = gxFirstFontScalerWarning + 9,
+ bad_data_in_stream = gxFirstFontScalerWarning + 10
+};
+
+
+enum {
+ /* nonsense data */
+ new_shape_contains_invalid_data = gxFirstSystemDebuggingWarning,
+ new_tag_contains_invalid_data = gxFirstSystemDebuggingWarning + 1,
+ extra_data_passed_was_ignored = gxFirstSystemDebuggingWarning + 2,
+ font_table_not_found = gxFirstSystemDebuggingWarning + 3,
+ font_name_not_found = gxFirstSystemDebuggingWarning + 4, /* doesn't make sense to do */
+ unable_to_traverse_open_contour_that_starts_or_ends_off_the_curve = gxFirstSystemDebuggingWarning + 5,
+ unable_to_draw_open_contour_that_starts_or_ends_off_the_curve = gxFirstSystemDebuggingWarning + 6,
+ cannot_dispose_default_shape = gxFirstSystemDebuggingWarning + 7,
+ cannot_dispose_default_style = gxFirstSystemDebuggingWarning + 8,
+ cannot_dispose_default_ink = gxFirstSystemDebuggingWarning + 9,
+ cannot_dispose_default_transform = gxFirstSystemDebuggingWarning + 10,
+ cannot_dispose_default_colorProfile = gxFirstSystemDebuggingWarning + 11,
+ cannot_dispose_default_colorSet = gxFirstSystemDebuggingWarning + 12,
+ shape_direct_attribute_not_set = gxFirstSystemDebuggingWarning + 13, /* couldn't find what you were looking for */
+ point_does_not_intersect_port = gxFirstSystemDebuggingWarning + 14,
+ cannot_dispose_non_font = gxFirstSystemDebuggingWarning + 15,
+ face_override_style_font_must_match_style = gxFirstSystemDebuggingWarning + 16,
+ union_of_area_and_length_returns_area_only = gxFirstSystemDebuggingWarning + 17,
+ insufficient_coordinate_space_for_new_device = gxFirstSystemDebuggingWarning + 18, /* other */
+ shape_passed_has_no_bounds = gxFirstSystemDebuggingWarning + 19,
+ tags_of_type_flst_removed = gxFirstSystemDebuggingWarning + 20,
+ translator_not_installed_on_this_grafport = gxFirstSystemDebuggingWarning + 21
+};
+
+enum {
+ parameters_have_no_effect = gxFirstSystemNotice,
+ attributes_already_set = gxFirstSystemNotice + 1,
+ caps_already_set = gxFirstSystemNotice + 2,
+ clip_already_set = gxFirstSystemNotice + 3,
+ color_already_set = gxFirstSystemNotice + 4,
+ curve_error_already_set = gxFirstSystemNotice + 5,
+ dash_already_set = gxFirstSystemNotice + 6,
+ default_colorProfile_already_set = gxFirstSystemNotice + 7,
+ default_ink_already_set = gxFirstSystemNotice + 8,
+ default_transform_already_set = gxFirstSystemNotice + 9,
+ default_shape_already_set = gxFirstSystemNotice + 10,
+ default_style_already_set = gxFirstSystemNotice + 11,
+ dither_already_set = gxFirstSystemNotice + 12,
+ encoding_already_set = gxFirstSystemNotice + 13,
+ face_already_set = gxFirstSystemNotice + 14,
+ fill_already_set = gxFirstSystemNotice + 15,
+ font_already_set = gxFirstSystemNotice + 16,
+ font_variations_already_set = gxFirstSystemNotice + 17,
+ glyph_positions_are_already_set = gxFirstSystemNotice + 18,
+ glyph_tangents_are_already_set = gxFirstSystemNotice + 19,
+ halftone_already_set = gxFirstSystemNotice + 20,
+ hit_test_already_set = gxFirstSystemNotice + 21,
+ ink_already_set = gxFirstSystemNotice + 22,
+ join_already_set = gxFirstSystemNotice + 23,
+ justification_already_set = gxFirstSystemNotice + 24,
+ mapping_already_set = gxFirstSystemNotice + 25,
+ pattern_already_set = gxFirstSystemNotice + 26,
+ pen_already_set = gxFirstSystemNotice + 27,
+ style_already_set = gxFirstSystemNotice + 28,
+ tag_already_set = gxFirstSystemNotice + 29,
+ text_attributes_already_set = gxFirstSystemNotice + 30,
+ text_size_already_set = gxFirstSystemNotice + 31,
+ transfer_already_set = gxFirstSystemNotice + 32,
+ translator_already_installed_on_this_grafport = gxFirstSystemNotice + 33,
+ transform_already_set = gxFirstSystemNotice + 34,
+ type_already_set = gxFirstSystemNotice + 35,
+ validation_level_already_set = gxFirstSystemNotice + 36,
+ viewPorts_already_set = gxFirstSystemNotice + 37,
+ viewPort_already_in_viewGroup = gxFirstSystemNotice + 38,
+ viewDevice_already_in_viewGroup = gxFirstSystemNotice + 39,
+ geometry_unaffected = gxFirstSystemNotice + 40,
+ mapping_unaffected = gxFirstSystemNotice + 41,
+ tags_in_shape_ignored = gxFirstSystemNotice + 42,
+ shape_already_in_primitive_form = gxFirstSystemNotice + 43,
+ shape_already_in_simple_form = gxFirstSystemNotice + 44,
+ shape_already_broken = gxFirstSystemNotice + 45,
+ shape_already_joined = gxFirstSystemNotice + 46,
+ cache_already_cleared = gxFirstSystemNotice + 47,
+ shape_not_disposed = gxFirstSystemNotice + 48,
+ style_not_disposed = gxFirstSystemNotice + 49,
+ ink_not_disposed = gxFirstSystemNotice + 50,
+ transform_not_disposed = gxFirstSystemNotice + 51,
+ colorSet_not_disposed = gxFirstSystemNotice + 52,
+ colorProfile_not_disposed = gxFirstSystemNotice + 53,
+ font_not_disposed = gxFirstSystemNotice + 54,
+ glyph_tangents_have_no_effect = gxFirstSystemNotice + 55,
+ glyph_positions_determined_by_advance = gxFirstSystemNotice + 56,
+ transform_viewPorts_already_set = gxFirstSystemNotice + 57,
+ directShape_attribute_set_as_side_effect = gxFirstSystemNotice + 58,
+ lockShape_called_as_side_effect = gxFirstSystemNotice + 59,
+ lockTag_called_as_side_effect = gxFirstSystemNotice + 60,
+ shapes_unlocked_as_side_effect = gxFirstSystemNotice + 61,
+ shape_not_locked = gxFirstSystemNotice + 62,
+ tag_not_locked = gxFirstSystemNotice + 63,
+ profile_not_locked = tag_not_locked,
+ lockProfile_called_as_side_effect = lockTag_called_as_side_effect,
+ disposed_dead_caches = gxFirstSystemNotice + 64,
+ disposed_live_caches = gxFirstSystemNotice + 65,
+ low_on_memory = gxFirstSystemNotice + 66,
+ very_low_on_memory = gxFirstSystemNotice + 67,
+ transform_references_disposed_viewPort = gxFirstSystemNotice + 68
+};
+
+
+typedef long gxGraphicsError;
+typedef long gxGraphicsWarning;
+typedef long gxGraphicsNotice;
+typedef CALLBACK_API_C( void , gxUserErrorProcPtr )(gxGraphicsError status, long refcon);
+typedef CALLBACK_API_C( void , gxUserWarningProcPtr )(gxGraphicsWarning status, long refcon);
+typedef CALLBACK_API_C( void , gxUserNoticeProcPtr )(gxGraphicsNotice status, long refcon);
+typedef STACK_UPP_TYPE(gxUserErrorProcPtr) gxUserErrorUPP;
+typedef STACK_UPP_TYPE(gxUserWarningProcPtr) gxUserWarningUPP;
+typedef STACK_UPP_TYPE(gxUserNoticeProcPtr) gxUserNoticeUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(gxUserErrorUPP)
+ NewgxUserErrorUPP (gxUserErrorProcPtr userRoutine);
+
+ EXTERN_API(gxUserWarningUPP)
+ NewgxUserWarningUPP (gxUserWarningProcPtr userRoutine);
+
+ EXTERN_API(gxUserNoticeUPP)
+ NewgxUserNoticeUPP (gxUserNoticeProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposegxUserErrorUPP (gxUserErrorUPP userUPP);
+
+ EXTERN_API(void)
+ DisposegxUserWarningUPP (gxUserWarningUPP userUPP);
+
+ EXTERN_API(void)
+ DisposegxUserNoticeUPP (gxUserNoticeUPP userUPP);
+
+ EXTERN_API(void)
+ InvokegxUserErrorUPP (gxGraphicsError status,
+ long refcon,
+ gxUserErrorUPP userUPP);
+
+ EXTERN_API(void)
+ InvokegxUserWarningUPP (gxGraphicsWarning status,
+ long refcon,
+ gxUserWarningUPP userUPP);
+
+ EXTERN_API(void)
+ InvokegxUserNoticeUPP (gxGraphicsNotice status,
+ long refcon,
+ gxUserNoticeUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppgxUserErrorProcInfo = 0x000003C1 }; /* no_return_value Func(4_bytes, 4_bytes) */
+ enum { uppgxUserWarningProcInfo = 0x000003C1 }; /* no_return_value Func(4_bytes, 4_bytes) */
+ enum { uppgxUserNoticeProcInfo = 0x000003C1 }; /* no_return_value Func(4_bytes, 4_bytes) */
+ #define NewgxUserErrorUPP(userRoutine) (gxUserErrorUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppgxUserErrorProcInfo, GetCurrentArchitecture())
+ #define NewgxUserWarningUPP(userRoutine) (gxUserWarningUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppgxUserWarningProcInfo, GetCurrentArchitecture())
+ #define NewgxUserNoticeUPP(userRoutine) (gxUserNoticeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppgxUserNoticeProcInfo, GetCurrentArchitecture())
+ #define DisposegxUserErrorUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposegxUserWarningUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposegxUserNoticeUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokegxUserErrorUPP(status, refcon, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppgxUserErrorProcInfo, (status), (refcon))
+ #define InvokegxUserWarningUPP(status, refcon, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppgxUserWarningProcInfo, (status), (refcon))
+ #define InvokegxUserNoticeUPP(status, refcon, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppgxUserNoticeProcInfo, (status), (refcon))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewgxUserErrorProc(userRoutine) NewgxUserErrorUPP(userRoutine)
+#define NewgxUserWarningProc(userRoutine) NewgxUserWarningUPP(userRoutine)
+#define NewgxUserNoticeProc(userRoutine) NewgxUserNoticeUPP(userRoutine)
+#define CallgxUserErrorProc(userRoutine, status, refcon) InvokegxUserErrorUPP(status, refcon, userRoutine)
+#define CallgxUserWarningProc(userRoutine, status, refcon) InvokegxUserWarningUPP(status, refcon, userRoutine)
+#define CallgxUserNoticeProc(userRoutine, status, refcon) InvokegxUserNoticeUPP(status, refcon, userRoutine)
+typedef gxUserErrorProcPtr gxUserErrorFunction;
+typedef gxUserWarningProcPtr gxUserWarningFunction;
+typedef gxUserNoticeProcPtr gxUserNoticeFunction;
+
+enum {
+ common_colors_not_initialized = gxFirstLibraryError,
+ no_open_picture = gxFirstLibraryError + 1,
+ picture_already_open = gxFirstLibraryError + 2,
+ no_open_poly = gxFirstLibraryError + 3,
+ poly_already_open = gxFirstLibraryError + 4,
+ no_open_region = gxFirstLibraryError + 5,
+ region_already_open = gxFirstLibraryError + 6,
+ no_active_picture = gxFirstLibraryError + 7
+};
+
+enum {
+ no_picture_drawn = gxFirstLibraryWarning,
+ polygons_have_different_size_contours = gxFirstLibraryWarning + 1,
+ graphic_type_cannot_be_specifed_by_four_values = gxFirstLibraryWarning + 2,
+ graphic_type_cannot_be_specifed_by_six_values = gxFirstLibraryWarning + 3,
+ point_expected = gxFirstLibraryWarning + 4,
+ line_or_rectangle_expected = gxFirstLibraryWarning + 5,
+ curve_expected = gxFirstLibraryWarning + 6,
+ graphic_type_does_not_contain_control_bits = gxFirstLibraryWarning + 7,
+ request_exceeds_available_data = gxFirstLibraryWarning + 8,
+ extra_data_unread = gxFirstLibraryWarning + 9,
+ no_variable_length_user_data_saved = gxFirstLibraryWarning + 10
+};
+
+enum {
+ zero_length_string_passed = gxFirstLibraryNotice
+};
+
+enum {
+ /* These levels tell how to validate routines. Choose one. */
+ gxNoValidation = 0x00, /* no validation */
+ gxPublicValidation = 0x01, /* check parameters to public routines */
+ gxInternalValidation = 0x02, /* check parameters to internal routines */
+ /* These levels tell how to validate types. Choose one. */
+ gxTypeValidation = 0x00, /* check types of objects */
+ gxStructureValidation = 0x10, /* check fields of private structures */
+ gxAllObjectValidation = 0x20, /* check every object over every call */
+ /* These levels tell how to validate memory manager blocks. Choose any combination. */
+ gxNoMemoryManagerValidation = 0x0000,
+ gxApBlockValidation = 0x0100, /* check the relevant block structures after each memory mgr. call */
+ gxFontBlockValidation = 0x0200, /* check the system gxHeap as well */
+ gxApHeapValidation = 0x0400, /* check the memory manager's gxHeap after every mem. call */
+ gxFontHeapValidation = 0x0800, /* check the system gxHeap as well */
+ gxCheckApHeapValidation = 0x1000, /* check the memory manager's gxHeap if checking routine parameters */
+ gxCheckFontHeapValidation = 0x2000 /* check the system gxHeap as well */
+};
+
+typedef long gxValidationLevel;
+enum {
+ no_draw_error = 0, /* gxShape type errors */
+ shape_emptyType = 1,
+ shape_inverse_fullType = 2,
+ rectangle_zero_width = 3,
+ rectangle_zero_height = 4,
+ polygon_empty = 5,
+ path_empty = 6,
+ bitmap_zero_width = 7,
+ bitmap_zero_height = 8,
+ text_empty = 9,
+ glyph_empty = 10,
+ layout_empty = 11,
+ picture_empty = 12, /* general gxShape errors */
+ shape_no_fill = 13,
+ shape_no_enclosed_area = 14,
+ shape_no_enclosed_pixels = 15,
+ shape_very_small = 16,
+ shape_very_large = 17,
+ shape_contours_cancel = 18, /* gxStyle errors */
+ pen_too_small = 19,
+ text_size_too_small = 20,
+ dash_empty = 21,
+ start_cap_empty = 22,
+ pattern_empty = 23,
+ textFace_empty = 24,
+ shape_primitive_empty = 25,
+ shape_primitive_very_small = 26, /* gxInk errors */
+ transfer_equals_noMode = 27,
+ transfer_matrix_ignores_source = 28,
+ transfer_matrix_ignores_device = 29,
+ transfer_source_reject = 30,
+ transfer_mode_ineffective = 31,
+ colorSet_no_entries = 32,
+ bitmap_colorSet_one_entry = 33, /* gxTransform errors */
+ transform_scale_too_small = 34,
+ transform_map_too_large = 35,
+ transform_move_too_large = 36,
+ transform_scale_too_large = 37,
+ transform_rotate_too_large = 38,
+ transform_perspective_too_large = 39,
+ transform_skew_too_large = 40,
+ transform_clip_no_intersection = 41,
+ transform_clip_empty = 42,
+ transform_no_viewPorts = 43, /* gxViewPort errors */
+ viewPort_disposed = 44,
+ viewPort_clip_empty = 45,
+ viewPort_clip_no_intersection = 46,
+ viewPort_scale_too_small = 47,
+ viewPort_map_too_large = 48,
+ viewPort_move_too_large = 49,
+ viewPort_scale_too_large = 50,
+ viewPort_rotate_too_large = 51,
+ viewPort_perspective_too_large = 52,
+ viewPort_skew_too_large = 53,
+ viewPort_viewGroup_offscreen = 54, /* gxViewDevice errors */
+ viewDevice_clip_no_intersection = 55,
+ viewDevice_scale_too_small = 56,
+ viewDevice_map_too_large = 57,
+ viewDevice_move_too_large = 58,
+ viewDevice_scale_too_large = 59,
+ viewDevice_rotate_too_large = 60,
+ viewDevice_perspective_too_large = 61,
+ viewDevice_skew_too_large = 62
+};
+
+typedef long gxDrawError;
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( gxDrawError )
+GXGetShapeDrawError (gxShape source) THREEWORDINLINE(0x303C, 0x01EE, 0xA832);
+
+EXTERN_API_C( void )
+GXValidateAll (void) THREEWORDINLINE(0x303C, 0x01EF, 0xA832);
+
+EXTERN_API_C( void )
+GXValidateColorSet (gxColorSet target) THREEWORDINLINE(0x303C, 0x01F0, 0xA832);
+
+EXTERN_API_C( void )
+GXValidateColorProfile (gxColorProfile target) THREEWORDINLINE(0x303C, 0x01F1, 0xA832);
+
+EXTERN_API_C( void )
+GXValidateGraphicsClient (gxGraphicsClient target) THREEWORDINLINE(0x303C, 0x01F2, 0xA832);
+
+EXTERN_API_C( void )
+GXValidateInk (gxInk target) THREEWORDINLINE(0x303C, 0x01F3, 0xA832);
+
+EXTERN_API_C( void )
+GXValidateShape (gxShape target) THREEWORDINLINE(0x303C, 0x01F4, 0xA832);
+
+EXTERN_API_C( void )
+GXValidateStyle (gxStyle target) THREEWORDINLINE(0x303C, 0x01F5, 0xA832);
+
+EXTERN_API_C( void )
+GXValidateTag (gxTag target) THREEWORDINLINE(0x303C, 0x01F6, 0xA832);
+
+EXTERN_API_C( void )
+GXValidateTransform (gxTransform target) THREEWORDINLINE(0x303C, 0x01F7, 0xA832);
+
+EXTERN_API_C( void )
+GXValidateViewDevice (gxViewDevice target) THREEWORDINLINE(0x303C, 0x01F8, 0xA832);
+
+EXTERN_API_C( void )
+GXValidateViewPort (gxViewPort target) THREEWORDINLINE(0x303C, 0x01F9, 0xA832);
+
+EXTERN_API_C( void )
+GXValidateViewGroup (gxViewGroup target) THREEWORDINLINE(0x303C, 0x01FA, 0xA832);
+
+EXTERN_API_C( gxValidationLevel )
+GXGetValidation (void) THREEWORDINLINE(0x303C, 0x01FB, 0xA832);
+
+EXTERN_API_C( void )
+GXSetValidation (gxValidationLevel level) THREEWORDINLINE(0x303C, 0x01FC, 0xA832);
+
+EXTERN_API_C( long )
+GXGetValidationError (char * procedureName,
+ void ** argument,
+ long * argumentNumber) THREEWORDINLINE(0x303C, 0x01FD, 0xA832);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if defined(__MWERKS__) && TARGET_CPU_68K
+ #pragma pop
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __GXERRORS__ */
+
diff --git a/include/qt/GXFonts.h b/include/qt/GXFonts.h
new file mode 100644
index 000000000..2f45946a6
--- /dev/null
+++ b/include/qt/GXFonts.h
@@ -0,0 +1,350 @@
+/*
+ File: GXFonts.h
+
+ Contains: QuickDraw GX font routine interfaces.
+
+ Version: Technology: Quickdraw GX 1.1
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __GXFONTS__
+#define __GXFONTS__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __GXMATH__
+#include "GXMath.h"
+#endif
+
+#ifndef __GXTYPES__
+#include "GXTypes.h"
+#endif
+
+#ifndef __SCALERSTREAMTYPES__
+#include "ScalerStreamTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if defined(__MWERKS__) && TARGET_CPU_68K
+ #pragma push
+ #pragma pointers_in_D0
+#endif
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( gxFont )
+GXNewFont (gxFontStorageTag storage,
+ gxFontStorageReference reference,
+ gxFontAttribute attributes) THREEWORDINLINE(0x303C, 0x0201, 0xA832);
+
+EXTERN_API_C( gxFontStorageTag )
+GXGetFont (gxFont fontID,
+ gxFontStorageReference * reference,
+ gxFontAttribute * attributes) THREEWORDINLINE(0x303C, 0x0202, 0xA832);
+
+EXTERN_API_C( gxFont )
+GXFindFont (gxFontStorageTag storage,
+ gxFontStorageReference reference,
+ gxFontAttribute * attributes) THREEWORDINLINE(0x303C, 0x0203, 0xA832);
+
+EXTERN_API_C( void )
+GXSetFont (gxFont fontID,
+ gxFontStorageTag storage,
+ gxFontStorageReference reference,
+ gxFontAttribute attributes) THREEWORDINLINE(0x303C, 0x0204, 0xA832);
+
+EXTERN_API_C( void )
+GXDisposeFont (gxFont fontID) THREEWORDINLINE(0x303C, 0x0205, 0xA832);
+
+EXTERN_API_C( void )
+GXChangedFont (gxFont fontID) THREEWORDINLINE(0x303C, 0x0206, 0xA832);
+
+EXTERN_API_C( gxFontFormatTag )
+GXGetFontFormat (gxFont fontID) THREEWORDINLINE(0x303C, 0x0207, 0xA832);
+
+EXTERN_API_C( gxFont )
+GXGetDefaultFont (void) THREEWORDINLINE(0x303C, 0x0208, 0xA832);
+
+EXTERN_API_C( gxFont )
+GXSetDefaultFont (gxFont fontID) THREEWORDINLINE(0x303C, 0x0209, 0xA832);
+
+EXTERN_API_C( long )
+GXFindFonts (gxFont familyID,
+ gxFontName name,
+ gxFontPlatform platform,
+ gxFontScript script,
+ gxFontLanguage language,
+ long length,
+ const unsigned char text[],
+ long index,
+ long count,
+ gxFont fonts[]) THREEWORDINLINE(0x303C, 0x020A, 0xA832);
+
+EXTERN_API_C( long )
+GXCountFontGlyphs (gxFont fontID) THREEWORDINLINE(0x303C, 0x020B, 0xA832);
+
+EXTERN_API_C( long )
+GXCountFontTables (gxFont fontID) THREEWORDINLINE(0x303C, 0x020C, 0xA832);
+
+EXTERN_API_C( long )
+GXGetFontTable (gxFont fontID,
+ long index,
+ void * tableData,
+ gxFontTableTag * tableTag) THREEWORDINLINE(0x303C, 0x020D, 0xA832);
+
+EXTERN_API_C( long )
+GXFindFontTable (gxFont fontID,
+ gxFontTableTag tableTag,
+ void * tableData,
+ long * index) THREEWORDINLINE(0x303C, 0x020E, 0xA832);
+
+EXTERN_API_C( long )
+GXGetFontTableParts (gxFont fontID,
+ long index,
+ long offset,
+ long length,
+ void * tableData,
+ gxFontTableTag * tableTag) THREEWORDINLINE(0x303C, 0x020F, 0xA832);
+
+EXTERN_API_C( long )
+GXFindFontTableParts (gxFont fontID,
+ gxFontTableTag tableTag,
+ long offset,
+ long length,
+ void * tableData,
+ long * index) THREEWORDINLINE(0x303C, 0x0210, 0xA832);
+
+EXTERN_API_C( long )
+GXSetFontTable (gxFont fontID,
+ long index,
+ gxFontTableTag tableTag,
+ long length,
+ const void * tableData) THREEWORDINLINE(0x303C, 0x0211, 0xA832);
+
+EXTERN_API_C( long )
+GXSetFontTableParts (gxFont fontID,
+ long index,
+ gxFontTableTag tableTag,
+ long offset,
+ long oldLength,
+ long newLength,
+ const void * tableData) THREEWORDINLINE(0x303C, 0x0212, 0xA832);
+
+EXTERN_API_C( long )
+GXDeleteFontTable (gxFont fontID,
+ long index,
+ gxFontTableTag tableTag) THREEWORDINLINE(0x303C, 0x0213, 0xA832);
+
+EXTERN_API_C( long )
+GXCountFontNames (gxFont fontID) THREEWORDINLINE(0x303C, 0x0214, 0xA832);
+
+EXTERN_API_C( long )
+GXGetFontName (gxFont fontID,
+ long index,
+ gxFontName * name,
+ gxFontPlatform * platform,
+ gxFontScript * script,
+ gxFontLanguage * language,
+ unsigned char text[]) THREEWORDINLINE(0x303C, 0x0215, 0xA832);
+
+EXTERN_API_C( long )
+GXFindFontName (gxFont fontID,
+ gxFontName name,
+ gxFontPlatform platform,
+ gxFontScript script,
+ gxFontLanguage language,
+ unsigned char text[],
+ long * index) THREEWORDINLINE(0x303C, 0x0216, 0xA832);
+
+EXTERN_API_C( long )
+GXSetFontName (gxFont fontID,
+ gxFontName name,
+ gxFontPlatform platform,
+ gxFontScript script,
+ gxFontLanguage language,
+ long length,
+ const unsigned char text[]) THREEWORDINLINE(0x303C, 0x0217, 0xA832);
+
+EXTERN_API_C( long )
+GXDeleteFontName (gxFont fontID,
+ long index,
+ gxFontName name,
+ gxFontPlatform platform,
+ gxFontScript script,
+ gxFontLanguage language) THREEWORDINLINE(0x303C, 0x0218, 0xA832);
+
+EXTERN_API_C( gxFontName )
+GXNewFontNameID (gxFont fontID) THREEWORDINLINE(0x303C, 0x0219, 0xA832);
+
+EXTERN_API_C( long )
+GXCountFontEncodings (gxFont fontID) THREEWORDINLINE(0x303C, 0x021A, 0xA832);
+
+EXTERN_API_C( gxFontPlatform )
+GXGetFontEncoding (gxFont fontID,
+ long index,
+ gxFontScript * script,
+ gxFontLanguage * language) THREEWORDINLINE(0x303C, 0x021B, 0xA832);
+
+EXTERN_API_C( long )
+GXFindFontEncoding (gxFont fontID,
+ gxFontPlatform platform,
+ gxFontScript script,
+ gxFontLanguage language) THREEWORDINLINE(0x303C, 0x021C, 0xA832);
+
+EXTERN_API_C( long )
+GXApplyFontEncoding (gxFont fontID,
+ long index,
+ long * length,
+ const unsigned char text[],
+ long count,
+ unsigned short glyphs[],
+ char was16Bit[]) THREEWORDINLINE(0x303C, 0x021D, 0xA832);
+
+EXTERN_API_C( long )
+GXCountFontVariations (gxFont fontID) THREEWORDINLINE(0x303C, 0x021E, 0xA832);
+
+EXTERN_API_C( long )
+GXFindFontVariation (gxFont fontID,
+ gxFontVariationTag variationTag,
+ Fixed * minValue,
+ Fixed * defaultValue,
+ Fixed * maxValue,
+ gxFontName * name) THREEWORDINLINE(0x303C, 0x021F, 0xA832);
+
+EXTERN_API_C( gxFontVariationTag )
+GXGetFontVariation (gxFont fontID,
+ long index,
+ Fixed * minValue,
+ Fixed * defaultValue,
+ Fixed * maxValue,
+ gxFontName * name) THREEWORDINLINE(0x303C, 0x0220, 0xA832);
+
+EXTERN_API_C( long )
+GXCountFontInstances (gxFont fontID) THREEWORDINLINE(0x303C, 0x0221, 0xA832);
+
+EXTERN_API_C( gxFontName )
+GXGetFontInstance (gxFont fontID,
+ long index,
+ gxFontVariation variation[]) THREEWORDINLINE(0x303C, 0x0222, 0xA832);
+
+EXTERN_API_C( long )
+GXSetFontInstance (gxFont fontID,
+ long index,
+ gxFontName name,
+ const gxFontVariation variation[]) THREEWORDINLINE(0x303C, 0x0223, 0xA832);
+
+EXTERN_API_C( long )
+GXDeleteFontInstance (gxFont fontID,
+ long index,
+ gxFontName name) THREEWORDINLINE(0x303C, 0x0224, 0xA832);
+
+EXTERN_API_C( long )
+GXCountFontDescriptors (gxFont fontID) THREEWORDINLINE(0x303C, 0x0225, 0xA832);
+
+EXTERN_API_C( gxFontDescriptorTag )
+GXGetFontDescriptor (gxFont fontID,
+ long index,
+ Fixed * descriptorValue) THREEWORDINLINE(0x303C, 0x0226, 0xA832);
+
+EXTERN_API_C( long )
+GXFindFontDescriptor (gxFont fontID,
+ gxFontDescriptorTag descriptorTag,
+ Fixed * descriptorValue) THREEWORDINLINE(0x303C, 0x0227, 0xA832);
+
+EXTERN_API_C( long )
+GXSetFontDescriptor (gxFont fontID,
+ long index,
+ gxFontDescriptorTag descriptorTag,
+ Fixed descriptorValue) THREEWORDINLINE(0x303C, 0x0228, 0xA832);
+
+EXTERN_API_C( long )
+GXDeleteFontDescriptor (gxFont fontID,
+ long index,
+ gxFontDescriptorTag descriptorTag) THREEWORDINLINE(0x303C, 0x0229, 0xA832);
+
+EXTERN_API_C( long )
+GXCountFontFeatures (gxFont fontID) THREEWORDINLINE(0x303C, 0x022A, 0xA832);
+
+EXTERN_API_C( gxFontName )
+GXGetFontFeature (gxFont fontID,
+ long index,
+ gxFontFeatureFlag * flags,
+ long * settingCount,
+ gxFontFeatureSetting settings[],
+ gxFontFeature * feature) THREEWORDINLINE(0x303C, 0x022B, 0xA832);
+
+EXTERN_API_C( gxFontName )
+GXFindFontFeature (gxFont fontID,
+ gxFontFeature feature,
+ gxFontFeatureFlag * flags,
+ long * settingCount,
+ gxFontFeatureSetting settings[],
+ long * index) THREEWORDINLINE(0x303C, 0x022C, 0xA832);
+
+EXTERN_API_C( long )
+GXGetFontDefaultFeatures (gxFont fontID,
+ gxRunFeature features[]) THREEWORDINLINE(0x303C, 0x0274, 0xA832);
+
+EXTERN_API_C( void )
+GXFlattenFont (gxFont source,
+ scalerStream * stream,
+ gxSpoolBlock * block) THREEWORDINLINE(0x303C, 0x022D, 0xA832);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if defined(__MWERKS__) && TARGET_CPU_68K
+ #pragma pop
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __GXFONTS__ */
+
diff --git a/include/qt/GXGraphics.h b/include/qt/GXGraphics.h
new file mode 100644
index 000000000..f803ab3a0
--- /dev/null
+++ b/include/qt/GXGraphics.h
@@ -0,0 +1,1881 @@
+/*
+ File: GXGraphics.h
+
+ Contains: QuickDraw GX graphic routine interfaces.
+
+ Version: Technology: Quickdraw GX 1.1
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __GXGRAPHICS__
+#define __GXGRAPHICS__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __FONTS__
+#include "Fonts.h"
+#endif
+
+#ifndef __GXERRORS__
+#include "GXErrors.h"
+#endif
+
+#ifndef __GXTYPES__
+#include "GXTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if defined(__MWERKS__) && TARGET_CPU_68K
+ #pragma push
+ #pragma pointers_in_D0
+#endif
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( gxGraphicsClient )
+GXNewGraphicsClient (void * memoryStart,
+ long memoryLength,
+ gxClientAttribute attributes) THREEWORDINLINE(0x303C, 0x0059, 0xA832);
+
+EXTERN_API_C( gxGraphicsClient )
+GXGetGraphicsClient (void) THREEWORDINLINE(0x303C, 0x005A, 0xA832);
+
+EXTERN_API_C( void )
+GXSetGraphicsClient (gxGraphicsClient client) THREEWORDINLINE(0x303C, 0x005B, 0xA832);
+
+EXTERN_API_C( void )
+GXDisposeGraphicsClient (gxGraphicsClient client) THREEWORDINLINE(0x303C, 0x005C, 0xA832);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+/*returns the count */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( long )
+GXGetGraphicsClients (long index,
+ long count,
+ gxGraphicsClient clients[]) THREEWORDINLINE(0x303C, 0x005E, 0xA832);
+
+EXTERN_API_C( void )
+GXEnterGraphics (void) THREEWORDINLINE(0x303C, 0x005F, 0xA832);
+
+EXTERN_API_C( void )
+GXExitGraphics (void) THREEWORDINLINE(0x303C, 0x0060, 0xA832);
+
+EXTERN_API_C( gxGraphicsError )
+GXGetGraphicsError (gxGraphicsError * stickyError) THREEWORDINLINE(0x303C, 0x0061, 0xA832);
+
+EXTERN_API_C( gxGraphicsNotice )
+GXGetGraphicsNotice (gxGraphicsNotice * stickyNotice) THREEWORDINLINE(0x303C, 0x0062, 0xA832);
+
+EXTERN_API_C( gxGraphicsWarning )
+GXGetGraphicsWarning (gxGraphicsWarning * stickyWarning) THREEWORDINLINE(0x303C, 0x0063, 0xA832);
+
+EXTERN_API_C( void )
+GXPostGraphicsError (gxGraphicsError error) THREEWORDINLINE(0x303C, 0x0064, 0xA832);
+
+EXTERN_API_C( void )
+GXPostGraphicsWarning (gxGraphicsWarning warning) THREEWORDINLINE(0x303C, 0x0066, 0xA832);
+
+EXTERN_API_C( gxUserErrorUPP )
+GXGetUserGraphicsError (long * reference) THREEWORDINLINE(0x303C, 0x0067, 0xA832);
+
+EXTERN_API_C( gxUserNoticeUPP )
+GXGetUserGraphicsNotice (long * reference) THREEWORDINLINE(0x303C, 0x0068, 0xA832);
+
+EXTERN_API_C( gxUserWarningUPP )
+GXGetUserGraphicsWarning (long * reference) THREEWORDINLINE(0x303C, 0x0069, 0xA832);
+
+EXTERN_API_C( void )
+GXSetUserGraphicsError (gxUserErrorUPP userFunction,
+ long reference) THREEWORDINLINE(0x303C, 0x006A, 0xA832);
+
+EXTERN_API_C( void )
+GXSetUserGraphicsNotice (gxUserNoticeUPP userFunction,
+ long reference) THREEWORDINLINE(0x303C, 0x006B, 0xA832);
+
+EXTERN_API_C( void )
+GXSetUserGraphicsWarning (gxUserWarningUPP userFunction,
+ long reference) THREEWORDINLINE(0x303C, 0x006C, 0xA832);
+
+EXTERN_API_C( void )
+GXIgnoreGraphicsWarning (gxGraphicsWarning warning) THREEWORDINLINE(0x303C, 0x006F, 0xA832);
+
+EXTERN_API_C( void )
+GXPopGraphicsWarning (void) THREEWORDINLINE(0x303C, 0x0070, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXNewShapeVector (gxShapeType aType,
+ const Fixed vector[]) THREEWORDINLINE(0x303C, 0x0071, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeVector (gxShape target,
+ const Fixed vector[]) THREEWORDINLINE(0x303C, 0x0072, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXNewBitmap (const gxBitmap * data,
+ const gxPoint * position) THREEWORDINLINE(0x303C, 0x0073, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXNewCurve (const gxCurve * data) THREEWORDINLINE(0x303C, 0x0074, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXNewGlyphs (long charCount,
+ const unsigned char text[],
+ const gxPoint positions[],
+ const long advance[],
+ const gxPoint tangents[],
+ const short styleRuns[],
+ const gxStyle glyphStyles[]) THREEWORDINLINE(0x303C, 0x0075, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXNewLine (const gxLine * data) THREEWORDINLINE(0x303C, 0x0076, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXNewPaths (const gxPaths * data) THREEWORDINLINE(0x303C, 0x0077, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXNewPicture (long count,
+ const gxShape shapes[],
+ const gxStyle styles[],
+ const gxInk inks[],
+ const gxTransform transforms[]) THREEWORDINLINE(0x303C, 0x0078, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXNewPoint (const gxPoint * data) THREEWORDINLINE(0x303C, 0x0079, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXNewPolygons (const gxPolygons * data) THREEWORDINLINE(0x303C, 0x007A, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXNewRectangle (const gxRectangle * data) THREEWORDINLINE(0x303C, 0x007B, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXNewText (long charCount,
+ const unsigned char text[],
+ const gxPoint * position) THREEWORDINLINE(0x303C, 0x007C, 0xA832);
+
+EXTERN_API_C( gxBitmap *)
+GXGetBitmap (gxShape source,
+ gxBitmap * data,
+ gxPoint * position) THREEWORDINLINE(0x303C, 0x007D, 0xA832);
+
+EXTERN_API_C( gxCurve *)
+GXGetCurve (gxShape source,
+ gxCurve * data) THREEWORDINLINE(0x303C, 0x007E, 0xA832);
+
+/* returns byte length of glyphs */
+EXTERN_API_C( long )
+GXGetGlyphs (gxShape source,
+ long * charCount,
+ unsigned char text[],
+ gxPoint positions[],
+ long advance[],
+ gxPoint tangents[],
+ long * runCount,
+ short styleRuns[],
+ gxStyle glyphStyles[]) THREEWORDINLINE(0x303C, 0x007F, 0xA832);
+
+EXTERN_API_C( gxLine *)
+GXGetLine (gxShape source,
+ gxLine * data) THREEWORDINLINE(0x303C, 0x0080, 0xA832);
+
+/* returns byte length */
+EXTERN_API_C( long )
+GXGetPaths (gxShape source,
+ gxPaths * data) THREEWORDINLINE(0x303C, 0x0081, 0xA832);
+
+/* returns count */
+EXTERN_API_C( long )
+GXGetPicture (gxShape source,
+ gxShape shapes[],
+ gxStyle styles[],
+ gxInk inks[],
+ gxTransform transforms[]) THREEWORDINLINE(0x303C, 0x0082, 0xA832);
+
+EXTERN_API_C( gxPoint *)
+GXGetPoint (gxShape source,
+ gxPoint * data) THREEWORDINLINE(0x303C, 0x0083, 0xA832);
+
+/* returns byte length */
+EXTERN_API_C( long )
+GXGetPolygons (gxShape source,
+ gxPolygons * data) THREEWORDINLINE(0x303C, 0x0084, 0xA832);
+
+EXTERN_API_C( gxRectangle *)
+GXGetRectangle (gxShape source,
+ gxRectangle * data) THREEWORDINLINE(0x303C, 0x0085, 0xA832);
+
+/* returns byte length */
+EXTERN_API_C( long )
+GXGetText (gxShape source,
+ long * charCount,
+ unsigned char text[],
+ gxPoint * position) THREEWORDINLINE(0x303C, 0x0086, 0xA832);
+
+EXTERN_API_C( void )
+GXSetBitmap (gxShape target,
+ const gxBitmap * data,
+ const gxPoint * position) THREEWORDINLINE(0x303C, 0x0087, 0xA832);
+
+EXTERN_API_C( void )
+GXSetCurve (gxShape target,
+ const gxCurve * data) THREEWORDINLINE(0x303C, 0x0088, 0xA832);
+
+EXTERN_API_C( void )
+GXSetGlyphs (gxShape target,
+ long charCount,
+ const unsigned char text[],
+ const gxPoint positions[],
+ const long advance[],
+ const gxPoint tangents[],
+ const short styleRuns[],
+ const gxStyle glyphStyles[]) THREEWORDINLINE(0x303C, 0x0089, 0xA832);
+
+EXTERN_API_C( void )
+GXSetLine (gxShape target,
+ const gxLine * data) THREEWORDINLINE(0x303C, 0x008A, 0xA832);
+
+EXTERN_API_C( void )
+GXSetPaths (gxShape target,
+ const gxPaths * data) THREEWORDINLINE(0x303C, 0x008B, 0xA832);
+
+EXTERN_API_C( void )
+GXSetPicture (gxShape target,
+ long count,
+ const gxShape shapes[],
+ const gxStyle styles[],
+ const gxInk inks[],
+ const gxTransform transforms[]) THREEWORDINLINE(0x303C, 0x008C, 0xA832);
+
+EXTERN_API_C( void )
+GXSetPoint (gxShape target,
+ const gxPoint * data) THREEWORDINLINE(0x303C, 0x008D, 0xA832);
+
+EXTERN_API_C( void )
+GXSetPolygons (gxShape target,
+ const gxPolygons * data) THREEWORDINLINE(0x303C, 0x008E, 0xA832);
+
+EXTERN_API_C( void )
+GXSetRectangle (gxShape target,
+ const gxRectangle * data) THREEWORDINLINE(0x303C, 0x008F, 0xA832);
+
+EXTERN_API_C( void )
+GXSetText (gxShape target,
+ long charCount,
+ const unsigned char text[],
+ const gxPoint * position) THREEWORDINLINE(0x303C, 0x0090, 0xA832);
+
+EXTERN_API_C( void )
+GXDrawBitmap (const gxBitmap * data,
+ const gxPoint * position) THREEWORDINLINE(0x303C, 0x0091, 0xA832);
+
+EXTERN_API_C( void )
+GXDrawCurve (const gxCurve * data) THREEWORDINLINE(0x303C, 0x0092, 0xA832);
+
+EXTERN_API_C( void )
+GXDrawGlyphs (long charCount,
+ const unsigned char text[],
+ const gxPoint positions[],
+ const long advance[],
+ const gxPoint tangents[],
+ const short styleRuns[],
+ const gxStyle glyphStyles[]) THREEWORDINLINE(0x303C, 0x0093, 0xA832);
+
+EXTERN_API_C( void )
+GXDrawLine (const gxLine * data) THREEWORDINLINE(0x303C, 0x0094, 0xA832);
+
+EXTERN_API_C( void )
+GXDrawPaths (const gxPaths * data,
+ gxShapeFill fill) THREEWORDINLINE(0x303C, 0x0095, 0xA832);
+
+EXTERN_API_C( void )
+GXDrawPicture (long count,
+ const gxShape shapes[],
+ const gxStyle styles[],
+ const gxInk inks[],
+ const gxTransform transforms[]) THREEWORDINLINE(0x303C, 0x0096, 0xA832);
+
+EXTERN_API_C( void )
+GXDrawPoint (const gxPoint * data) THREEWORDINLINE(0x303C, 0x0097, 0xA832);
+
+EXTERN_API_C( void )
+GXDrawPolygons (const gxPolygons * data,
+ gxShapeFill fill) THREEWORDINLINE(0x303C, 0x0098, 0xA832);
+
+EXTERN_API_C( void )
+GXDrawRectangle (const gxRectangle * data,
+ gxShapeFill fill) THREEWORDINLINE(0x303C, 0x0099, 0xA832);
+
+EXTERN_API_C( void )
+GXDrawText (long charCount,
+ const unsigned char text[],
+ const gxPoint * position) THREEWORDINLINE(0x303C, 0x009A, 0xA832);
+
+EXTERN_API_C( gxColorProfile )
+GXNewColorProfile (long size,
+ void * colorProfileData) THREEWORDINLINE(0x303C, 0x009B, 0xA832);
+
+EXTERN_API_C( gxColorSet )
+GXNewColorSet (gxColorSpace space,
+ long count,
+ const gxSetColor colors[]) THREEWORDINLINE(0x303C, 0x009C, 0xA832);
+
+EXTERN_API_C( gxInk )
+GXNewInk (void) THREEWORDINLINE(0x303C, 0x009D, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXNewShape (gxShapeType aType) THREEWORDINLINE(0x303C, 0x009E, 0xA832);
+
+EXTERN_API_C( gxStyle )
+GXNewStyle (void) THREEWORDINLINE(0x303C, 0x009F, 0xA832);
+
+EXTERN_API_C( gxTag )
+GXNewTag (long tagType,
+ long length,
+ const void * data) THREEWORDINLINE(0x303C, 0x00A0, 0xA832);
+
+EXTERN_API_C( gxTransform )
+GXNewTransform (void) THREEWORDINLINE(0x303C, 0x00A1, 0xA832);
+
+EXTERN_API_C( gxViewDevice )
+GXNewViewDevice (gxViewGroup group,
+ gxShape bitmapShape) THREEWORDINLINE(0x303C, 0x00A2, 0xA832);
+
+EXTERN_API_C( gxViewGroup )
+GXNewViewGroup (void) THREEWORDINLINE(0x303C, 0x00A3, 0xA832);
+
+EXTERN_API_C( gxViewPort )
+GXNewViewPort (gxViewGroup group) THREEWORDINLINE(0x303C, 0x00A4, 0xA832);
+
+EXTERN_API_C( void )
+GXDisposeColorProfile (gxColorProfile target) THREEWORDINLINE(0x303C, 0x00A5, 0xA832);
+
+EXTERN_API_C( void )
+GXDisposeColorSet (gxColorSet target) THREEWORDINLINE(0x303C, 0x00A6, 0xA832);
+
+EXTERN_API_C( void )
+GXDisposeInk (gxInk target) THREEWORDINLINE(0x303C, 0x00A7, 0xA832);
+
+EXTERN_API_C( void )
+GXDisposeShape (gxShape target) THREEWORDINLINE(0x303C, 0x00A8, 0xA832);
+
+EXTERN_API_C( void )
+GXDisposeStyle (gxStyle target) THREEWORDINLINE(0x303C, 0x00A9, 0xA832);
+
+EXTERN_API_C( void )
+GXDisposeTag (gxTag target) THREEWORDINLINE(0x303C, 0x00AA, 0xA832);
+
+EXTERN_API_C( void )
+GXDisposeTransform (gxTransform target) THREEWORDINLINE(0x303C, 0x00AB, 0xA832);
+
+EXTERN_API_C( void )
+GXDisposeViewDevice (gxViewDevice target) THREEWORDINLINE(0x303C, 0x00AC, 0xA832);
+
+EXTERN_API_C( void )
+GXDisposeViewGroup (gxViewGroup target) THREEWORDINLINE(0x303C, 0x00AD, 0xA832);
+
+EXTERN_API_C( void )
+GXDisposeViewPort (gxViewPort target) THREEWORDINLINE(0x303C, 0x00AE, 0xA832);
+
+EXTERN_API_C( gxColorProfile )
+GXCloneColorProfile (gxColorProfile source) THREEWORDINLINE(0x303C, 0x00AF, 0xA832);
+
+EXTERN_API_C( gxColorSet )
+GXCloneColorSet (gxColorSet source) THREEWORDINLINE(0x303C, 0x00B0, 0xA832);
+
+EXTERN_API_C( gxInk )
+GXCloneInk (gxInk source) THREEWORDINLINE(0x303C, 0x00B1, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXCloneShape (gxShape source) THREEWORDINLINE(0x303C, 0x00B2, 0xA832);
+
+EXTERN_API_C( gxStyle )
+GXCloneStyle (gxStyle source) THREEWORDINLINE(0x303C, 0x00B3, 0xA832);
+
+EXTERN_API_C( gxTag )
+GXCloneTag (gxTag source) THREEWORDINLINE(0x303C, 0x00B4, 0xA832);
+
+EXTERN_API_C( gxTransform )
+GXCloneTransform (gxTransform source) THREEWORDINLINE(0x303C, 0x00B5, 0xA832);
+
+EXTERN_API_C( gxColorProfile )
+GXCopyToColorProfile (gxColorProfile target,
+ gxColorProfile source) THREEWORDINLINE(0x303C, 0x00B6, 0xA832);
+
+EXTERN_API_C( gxColorSet )
+GXCopyToColorSet (gxColorSet target,
+ gxColorSet source) THREEWORDINLINE(0x303C, 0x00B7, 0xA832);
+
+EXTERN_API_C( gxInk )
+GXCopyToInk (gxInk target,
+ gxInk source) THREEWORDINLINE(0x303C, 0x00B8, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXCopyToShape (gxShape target,
+ gxShape source) THREEWORDINLINE(0x303C, 0x00B9, 0xA832);
+
+EXTERN_API_C( gxStyle )
+GXCopyToStyle (gxStyle target,
+ gxStyle source) THREEWORDINLINE(0x303C, 0x00BA, 0xA832);
+
+EXTERN_API_C( gxTag )
+GXCopyToTag (gxTag target,
+ gxTag source) THREEWORDINLINE(0x303C, 0x00BB, 0xA832);
+
+EXTERN_API_C( gxTransform )
+GXCopyToTransform (gxTransform target,
+ gxTransform source) THREEWORDINLINE(0x303C, 0x00BC, 0xA832);
+
+EXTERN_API_C( gxViewDevice )
+GXCopyToViewDevice (gxViewDevice target,
+ gxViewDevice source) THREEWORDINLINE(0x303C, 0x00BD, 0xA832);
+
+EXTERN_API_C( gxViewPort )
+GXCopyToViewPort (gxViewPort target,
+ gxViewPort source) THREEWORDINLINE(0x303C, 0x00BE, 0xA832);
+
+EXTERN_API_C( Boolean )
+GXEqualColorProfile (gxColorProfile one,
+ gxColorProfile two) THREEWORDINLINE(0x303C, 0x00BF, 0xA832);
+
+EXTERN_API_C( Boolean )
+GXEqualColorSet (gxColorSet one,
+ gxColorSet two) THREEWORDINLINE(0x303C, 0x00C0, 0xA832);
+
+EXTERN_API_C( Boolean )
+GXEqualInk (gxInk one,
+ gxInk two) THREEWORDINLINE(0x303C, 0x00C1, 0xA832);
+
+EXTERN_API_C( Boolean )
+GXEqualShape (gxShape one,
+ gxShape two) THREEWORDINLINE(0x303C, 0x00C2, 0xA832);
+
+EXTERN_API_C( Boolean )
+GXEqualStyle (gxStyle one,
+ gxStyle two) THREEWORDINLINE(0x303C, 0x00C3, 0xA832);
+
+EXTERN_API_C( Boolean )
+GXEqualTag (gxTag one,
+ gxTag two) THREEWORDINLINE(0x303C, 0x00C4, 0xA832);
+
+EXTERN_API_C( Boolean )
+GXEqualTransform (gxTransform one,
+ gxTransform two) THREEWORDINLINE(0x303C, 0x00C5, 0xA832);
+
+EXTERN_API_C( Boolean )
+GXEqualViewDevice (gxViewDevice one,
+ gxViewDevice two) THREEWORDINLINE(0x303C, 0x00C6, 0xA832);
+
+EXTERN_API_C( Boolean )
+GXEqualViewPort (gxViewPort one,
+ gxViewPort two) THREEWORDINLINE(0x303C, 0x00C7, 0xA832);
+
+EXTERN_API_C( void )
+GXResetInk (gxInk target) THREEWORDINLINE(0x303C, 0x00C8, 0xA832);
+
+EXTERN_API_C( void )
+GXResetShape (gxShape target) THREEWORDINLINE(0x303C, 0x00C9, 0xA832);
+
+EXTERN_API_C( void )
+GXResetStyle (gxStyle target) THREEWORDINLINE(0x303C, 0x00CA, 0xA832);
+
+EXTERN_API_C( void )
+GXResetTransform (gxTransform target) THREEWORDINLINE(0x303C, 0x00CB, 0xA832);
+
+EXTERN_API_C( void )
+GXLoadColorProfile (gxColorProfile target) THREEWORDINLINE(0x303C, 0x00CC, 0xA832);
+
+EXTERN_API_C( void )
+GXLoadColorSet (gxColorSet target) THREEWORDINLINE(0x303C, 0x00CD, 0xA832);
+
+EXTERN_API_C( void )
+GXLoadInk (gxInk target) THREEWORDINLINE(0x303C, 0x00CE, 0xA832);
+
+EXTERN_API_C( void )
+GXLoadShape (gxShape target) THREEWORDINLINE(0x303C, 0x00CF, 0xA832);
+
+EXTERN_API_C( void )
+GXLoadStyle (gxStyle target) THREEWORDINLINE(0x303C, 0x00D0, 0xA832);
+
+EXTERN_API_C( void )
+GXLoadTag (gxTag target) THREEWORDINLINE(0x303C, 0x00D1, 0xA832);
+
+EXTERN_API_C( void )
+GXLoadTransform (gxTransform target) THREEWORDINLINE(0x303C, 0x00D2, 0xA832);
+
+EXTERN_API_C( void )
+GXUnloadColorProfile (gxColorProfile target) THREEWORDINLINE(0x303C, 0x00D3, 0xA832);
+
+EXTERN_API_C( void )
+GXUnloadColorSet (gxColorSet target) THREEWORDINLINE(0x303C, 0x00D4, 0xA832);
+
+EXTERN_API_C( void )
+GXUnloadInk (gxInk target) THREEWORDINLINE(0x303C, 0x00D5, 0xA832);
+
+EXTERN_API_C( void )
+GXUnloadShape (gxShape target) THREEWORDINLINE(0x303C, 0x00D6, 0xA832);
+
+EXTERN_API_C( void )
+GXUnloadStyle (gxStyle target) THREEWORDINLINE(0x303C, 0x00D7, 0xA832);
+
+EXTERN_API_C( void )
+GXUnloadTag (gxTag target) THREEWORDINLINE(0x303C, 0x00D8, 0xA832);
+
+EXTERN_API_C( void )
+GXUnloadTransform (gxTransform target) THREEWORDINLINE(0x303C, 0x00D9, 0xA832);
+
+EXTERN_API_C( void )
+GXCacheShape (gxShape source) THREEWORDINLINE(0x303C, 0x00DA, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXCopyDeepToShape (gxShape target,
+ gxShape source) THREEWORDINLINE(0x303C, 0x00DB, 0xA832);
+
+EXTERN_API_C( void )
+GXDrawShape (gxShape source) THREEWORDINLINE(0x303C, 0x00DC, 0xA832);
+
+EXTERN_API_C( void )
+GXDisposeShapeCache (gxShape target) THREEWORDINLINE(0x303C, 0x00DD, 0xA832);
+
+EXTERN_API_C( gxColorProfile )
+GXGetDefaultColorProfile (void) THREEWORDINLINE(0x303C, 0x00DE, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXGetDefaultShape (gxShapeType aType) THREEWORDINLINE(0x303C, 0x00DF, 0xA832);
+
+EXTERN_API_C( gxColorSet )
+GXGetDefaultColorSet (long pixelDepth) THREEWORDINLINE(0x303C, 0x00E0, 0xA832);
+
+
+EXTERN_API_C( void )
+GXSetDefaultShape (gxShape target) THREEWORDINLINE(0x303C, 0x00E1, 0xA832);
+
+EXTERN_API_C( void )
+GXSetDefaultColorSet (gxColorSet target,
+ long pixelDepth) THREEWORDINLINE(0x303C, 0x00E2, 0xA832);
+
+EXTERN_API_C( long )
+GXGetTag (gxTag source,
+ long * tagType,
+ void * data) THREEWORDINLINE(0x303C, 0x00E3, 0xA832);
+
+EXTERN_API_C( void )
+GXSetTag (gxTag target,
+ long tagType,
+ long length,
+ const void * data) THREEWORDINLINE(0x303C, 0x00E4, 0xA832);
+
+EXTERN_API_C( gxRectangle *)
+GXGetShapeBounds (gxShape source,
+ long index,
+ gxRectangle * bounds) THREEWORDINLINE(0x303C, 0x00E5, 0xA832);
+
+EXTERN_API_C( gxShapeFill )
+GXGetShapeFill (gxShape source) THREEWORDINLINE(0x303C, 0x00E6, 0xA832);
+
+EXTERN_API_C( gxInk )
+GXGetShapeInk (gxShape source) THREEWORDINLINE(0x303C, 0x00E7, 0xA832);
+
+EXTERN_API_C( long )
+GXGetShapePixel (gxShape source,
+ long x,
+ long y,
+ gxColor * data,
+ long * index) THREEWORDINLINE(0x303C, 0x00E8, 0xA832);
+
+EXTERN_API_C( gxStyle )
+GXGetShapeStyle (gxShape source) THREEWORDINLINE(0x303C, 0x00E9, 0xA832);
+
+EXTERN_API_C( gxTransform )
+GXGetShapeTransform (gxShape source) THREEWORDINLINE(0x303C, 0x00EA, 0xA832);
+
+EXTERN_API_C( gxShapeType )
+GXGetShapeType (gxShape source) THREEWORDINLINE(0x303C, 0x00EB, 0xA832);
+
+EXTERN_API_C( gxRectangle *)
+GXGetShapeTypographicBounds (gxShape source,
+ gxRectangle * bounds) THREEWORDINLINE(0x303C, 0x00EC, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXGetBitmapParts (gxShape source,
+ const gxLongRectangle * bounds) THREEWORDINLINE(0x303C, 0x00ED, 0xA832);
+
+EXTERN_API_C( void )
+GXGetStyleFontMetrics (gxStyle sourceStyle,
+ gxPoint * before,
+ gxPoint * after,
+ gxPoint * caretAngle,
+ gxPoint * caretOffset) THREEWORDINLINE(0x303C, 0x00EE, 0xA832);
+
+EXTERN_API_C( void )
+GXGetShapeFontMetrics (gxShape source,
+ gxPoint * before,
+ gxPoint * after,
+ gxPoint * caretAngle,
+ gxPoint * caretOffset) THREEWORDINLINE(0x303C, 0x00EF, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeBounds (gxShape target,
+ const gxRectangle * newBounds) THREEWORDINLINE(0x303C, 0x00F0, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeFill (gxShape target,
+ gxShapeFill newFill) THREEWORDINLINE(0x303C, 0x00F1, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeInk (gxShape target,
+ gxInk newInk) THREEWORDINLINE(0x303C, 0x00F2, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapePixel (gxShape target,
+ long x,
+ long y,
+ const gxColor * newColor,
+ long newIndex) THREEWORDINLINE(0x303C, 0x00F3, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeStyle (gxShape target,
+ gxStyle newStyle) THREEWORDINLINE(0x303C, 0x00F4, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeTransform (gxShape target,
+ gxTransform newTransform) THREEWORDINLINE(0x303C, 0x00F5, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeType (gxShape target,
+ gxShapeType newType) THREEWORDINLINE(0x303C, 0x00F6, 0xA832);
+
+EXTERN_API_C( void )
+GXSetBitmapParts (gxShape target,
+ const gxLongRectangle * bounds,
+ gxShape bitmapShape) THREEWORDINLINE(0x303C, 0x00F7, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeGeometry (gxShape target,
+ gxShape geometry) THREEWORDINLINE(0x303C, 0x00F8, 0xA832);
+
+EXTERN_API_C( Fixed )
+GXGetShapeCurveError (gxShape source) THREEWORDINLINE(0x303C, 0x00F9, 0xA832);
+
+EXTERN_API_C( gxDashRecord *)
+GXGetShapeDash (gxShape source,
+ gxDashRecord * dash) THREEWORDINLINE(0x303C, 0x00FA, 0xA832);
+
+EXTERN_API_C( gxCapRecord *)
+GXGetShapeCap (gxShape source,
+ gxCapRecord * cap) THREEWORDINLINE(0x303C, 0x00FB, 0xA832);
+
+/* returns the number of layers */
+EXTERN_API_C( long )
+GXGetShapeFace (gxShape source,
+ gxTextFace * face) THREEWORDINLINE(0x303C, 0x00FC, 0xA832);
+
+EXTERN_API_C( gxFont )
+GXGetShapeFont (gxShape source) THREEWORDINLINE(0x303C, 0x00FD, 0xA832);
+
+EXTERN_API_C( gxJoinRecord *)
+GXGetShapeJoin (gxShape source,
+ gxJoinRecord * join) THREEWORDINLINE(0x303C, 0x00FE, 0xA832);
+
+EXTERN_API_C( Fract )
+GXGetShapeJustification (gxShape source) THREEWORDINLINE(0x303C, 0x00FF, 0xA832);
+
+EXTERN_API_C( gxPatternRecord *)
+GXGetShapePattern (gxShape source,
+ gxPatternRecord * pattern) THREEWORDINLINE(0x303C, 0x0100, 0xA832);
+
+EXTERN_API_C( Fixed )
+GXGetShapePen (gxShape source) THREEWORDINLINE(0x303C, 0x0101, 0xA832);
+
+EXTERN_API_C( gxFontPlatform )
+GXGetShapeEncoding (gxShape source,
+ gxFontScript * script,
+ gxFontLanguage * language) THREEWORDINLINE(0x303C, 0x0102, 0xA832);
+
+EXTERN_API_C( Fixed )
+GXGetShapeTextSize (gxShape source) THREEWORDINLINE(0x303C, 0x0103, 0xA832);
+
+EXTERN_API_C( long )
+GXGetShapeFontVariations (gxShape source,
+ gxFontVariation variations[]) THREEWORDINLINE(0x303C, 0x0104, 0xA832);
+
+EXTERN_API_C( long )
+GXGetShapeFontVariationSuite (gxShape source,
+ gxFontVariation variations[]) THREEWORDINLINE(0x303C, 0x0105, 0xA832);
+
+EXTERN_API_C( Fixed )
+GXGetStyleCurveError (gxStyle source) THREEWORDINLINE(0x303C, 0x0106, 0xA832);
+
+EXTERN_API_C( gxDashRecord *)
+GXGetStyleDash (gxStyle source,
+ gxDashRecord * dash) THREEWORDINLINE(0x303C, 0x0107, 0xA832);
+
+EXTERN_API_C( gxCapRecord *)
+GXGetStyleCap (gxStyle source,
+ gxCapRecord * cap) THREEWORDINLINE(0x303C, 0x0108, 0xA832);
+
+/* returns the number of layers */
+EXTERN_API_C( long )
+GXGetStyleFace (gxStyle source,
+ gxTextFace * face) THREEWORDINLINE(0x303C, 0x0109, 0xA832);
+
+EXTERN_API_C( gxFont )
+GXGetStyleFont (gxStyle source) THREEWORDINLINE(0x303C, 0x010A, 0xA832);
+
+EXTERN_API_C( gxJoinRecord *)
+GXGetStyleJoin (gxStyle source,
+ gxJoinRecord * join) THREEWORDINLINE(0x303C, 0x010B, 0xA832);
+
+EXTERN_API_C( Fract )
+GXGetStyleJustification (gxStyle source) THREEWORDINLINE(0x303C, 0x010C, 0xA832);
+
+EXTERN_API_C( gxPatternRecord *)
+GXGetStylePattern (gxStyle source,
+ gxPatternRecord * pattern) THREEWORDINLINE(0x303C, 0x010D, 0xA832);
+
+EXTERN_API_C( Fixed )
+GXGetStylePen (gxStyle source) THREEWORDINLINE(0x303C, 0x010E, 0xA832);
+
+EXTERN_API_C( gxFontPlatform )
+GXGetStyleEncoding (gxStyle source,
+ gxFontScript * script,
+ gxFontLanguage * language) THREEWORDINLINE(0x303C, 0x010F, 0xA832);
+
+EXTERN_API_C( Fixed )
+GXGetStyleTextSize (gxStyle source) THREEWORDINLINE(0x303C, 0x0110, 0xA832);
+
+EXTERN_API_C( long )
+GXGetStyleFontVariations (gxStyle source,
+ gxFontVariation variations[]) THREEWORDINLINE(0x303C, 0x0111, 0xA832);
+
+EXTERN_API_C( long )
+GXGetStyleFontVariationSuite (gxStyle source,
+ gxFontVariation variations[]) THREEWORDINLINE(0x303C, 0x0112, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeCurveError (gxShape target,
+ Fixed error) THREEWORDINLINE(0x303C, 0x0113, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeDash (gxShape target,
+ const gxDashRecord * dash) THREEWORDINLINE(0x303C, 0x0114, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeCap (gxShape target,
+ const gxCapRecord * cap) THREEWORDINLINE(0x303C, 0x0115, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeFace (gxShape target,
+ const gxTextFace * face) THREEWORDINLINE(0x303C, 0x0116, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeFont (gxShape target,
+ gxFont aFont) THREEWORDINLINE(0x303C, 0x0117, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeJoin (gxShape target,
+ const gxJoinRecord * join) THREEWORDINLINE(0x303C, 0x0118, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeJustification (gxShape target,
+ Fract justify) THREEWORDINLINE(0x303C, 0x0119, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapePattern (gxShape target,
+ const gxPatternRecord * pattern) THREEWORDINLINE(0x303C, 0x011A, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapePen (gxShape target,
+ Fixed pen) THREEWORDINLINE(0x303C, 0x011B, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeEncoding (gxShape target,
+ gxFontPlatform platform,
+ gxFontScript script,
+ gxFontLanguage language) THREEWORDINLINE(0x303C, 0x011C, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeTextSize (gxShape target,
+ Fixed size) THREEWORDINLINE(0x303C, 0x011D, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeFontVariations (gxShape target,
+ long count,
+ const gxFontVariation variations[]) THREEWORDINLINE(0x303C, 0x011E, 0xA832);
+
+EXTERN_API_C( void )
+GXSetStyleCurveError (gxStyle target,
+ Fixed error) THREEWORDINLINE(0x303C, 0x011F, 0xA832);
+
+EXTERN_API_C( void )
+GXSetStyleDash (gxStyle target,
+ const gxDashRecord * dash) THREEWORDINLINE(0x303C, 0x0120, 0xA832);
+
+EXTERN_API_C( void )
+GXSetStyleCap (gxStyle target,
+ const gxCapRecord * cap) THREEWORDINLINE(0x303C, 0x0121, 0xA832);
+
+EXTERN_API_C( void )
+GXSetStyleFace (gxStyle target,
+ const gxTextFace * face) THREEWORDINLINE(0x303C, 0x0122, 0xA832);
+
+EXTERN_API_C( void )
+GXSetStyleFont (gxStyle target,
+ gxFont aFont) THREEWORDINLINE(0x303C, 0x0123, 0xA832);
+
+EXTERN_API_C( void )
+GXSetStyleJoin (gxStyle target,
+ const gxJoinRecord * join) THREEWORDINLINE(0x303C, 0x0124, 0xA832);
+
+EXTERN_API_C( void )
+GXSetStyleJustification (gxStyle target,
+ Fract justify) THREEWORDINLINE(0x303C, 0x0125, 0xA832);
+
+EXTERN_API_C( void )
+GXSetStylePattern (gxStyle target,
+ const gxPatternRecord * pattern) THREEWORDINLINE(0x303C, 0x0126, 0xA832);
+
+EXTERN_API_C( void )
+GXSetStylePen (gxStyle target,
+ Fixed pen) THREEWORDINLINE(0x303C, 0x0127, 0xA832);
+
+EXTERN_API_C( void )
+GXSetStyleEncoding (gxStyle target,
+ gxFontPlatform platform,
+ gxFontScript script,
+ gxFontLanguage language) THREEWORDINLINE(0x303C, 0x0128, 0xA832);
+
+EXTERN_API_C( void )
+GXSetStyleTextSize (gxStyle target,
+ Fixed size) THREEWORDINLINE(0x303C, 0x0129, 0xA832);
+
+EXTERN_API_C( void )
+GXSetStyleFontVariations (gxStyle target,
+ long count,
+ const gxFontVariation variations[]) THREEWORDINLINE(0x303C, 0x012A, 0xA832);
+
+EXTERN_API_C( gxColor *)
+GXGetShapeColor (gxShape source,
+ gxColor * data) THREEWORDINLINE(0x303C, 0x012B, 0xA832);
+
+EXTERN_API_C( gxTransferMode *)
+GXGetShapeTransfer (gxShape source,
+ gxTransferMode * data) THREEWORDINLINE(0x303C, 0x012C, 0xA832);
+
+EXTERN_API_C( gxColor *)
+GXGetInkColor (gxInk source,
+ gxColor * data) THREEWORDINLINE(0x303C, 0x012D, 0xA832);
+
+EXTERN_API_C( gxTransferMode *)
+GXGetInkTransfer (gxInk source,
+ gxTransferMode * data) THREEWORDINLINE(0x303C, 0x012E, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeColor (gxShape target,
+ const gxColor * data) THREEWORDINLINE(0x303C, 0x012F, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeTransfer (gxShape target,
+ const gxTransferMode * data) THREEWORDINLINE(0x303C, 0x0130, 0xA832);
+
+EXTERN_API_C( void )
+GXSetInkColor (gxInk target,
+ const gxColor * data) THREEWORDINLINE(0x303C, 0x0131, 0xA832);
+
+EXTERN_API_C( void )
+GXSetInkTransfer (gxInk target,
+ const gxTransferMode * data) THREEWORDINLINE(0x303C, 0x0132, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXGetShapeClip (gxShape source) THREEWORDINLINE(0x303C, 0x0133, 0xA832);
+
+EXTERN_API_C( gxShapeType )
+GXGetShapeClipType (gxShape source) THREEWORDINLINE(0x303C, 0x0276, 0xA832);
+
+EXTERN_API_C( gxMapping *)
+GXGetShapeMapping (gxShape source,
+ gxMapping * map) THREEWORDINLINE(0x303C, 0x0134, 0xA832);
+
+EXTERN_API_C( gxShapePart )
+GXGetShapeHitTest (gxShape source,
+ Fixed * tolerance) THREEWORDINLINE(0x303C, 0x0135, 0xA832);
+
+EXTERN_API_C( long )
+GXGetShapeViewPorts (gxShape source,
+ gxViewPort list[]) THREEWORDINLINE(0x303C, 0x0136, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXGetTransformClip (gxTransform source) THREEWORDINLINE(0x303C, 0x0137, 0xA832);
+
+EXTERN_API_C( gxShapeType )
+GXGetTransformClipType (gxTransform source) THREEWORDINLINE(0x303C, 0x0277, 0xA832);
+
+EXTERN_API_C( gxMapping *)
+GXGetTransformMapping (gxTransform source,
+ gxMapping * map) THREEWORDINLINE(0x303C, 0x0138, 0xA832);
+
+EXTERN_API_C( gxShapePart )
+GXGetTransformHitTest (gxTransform source,
+ Fixed * tolerance) THREEWORDINLINE(0x303C, 0x0139, 0xA832);
+
+EXTERN_API_C( long )
+GXGetTransformViewPorts (gxTransform source,
+ gxViewPort list[]) THREEWORDINLINE(0x303C, 0x013A, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeClip (gxShape target,
+ gxShape clip) THREEWORDINLINE(0x303C, 0x013B, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeMapping (gxShape target,
+ const gxMapping * map) THREEWORDINLINE(0x303C, 0x013C, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeHitTest (gxShape target,
+ gxShapePart mask,
+ Fixed tolerance) THREEWORDINLINE(0x303C, 0x013D, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeViewPorts (gxShape target,
+ long count,
+ const gxViewPort list[]) THREEWORDINLINE(0x303C, 0x013E, 0xA832);
+
+EXTERN_API_C( void )
+GXSetTransformClip (gxTransform target,
+ gxShape clip) THREEWORDINLINE(0x303C, 0x013F, 0xA832);
+
+EXTERN_API_C( void )
+GXSetTransformMapping (gxTransform target,
+ const gxMapping * map) THREEWORDINLINE(0x303C, 0x0140, 0xA832);
+
+EXTERN_API_C( void )
+GXSetTransformHitTest (gxTransform target,
+ gxShapePart mask,
+ Fixed tolerance) THREEWORDINLINE(0x303C, 0x0141, 0xA832);
+
+EXTERN_API_C( void )
+GXSetTransformViewPorts (gxTransform target,
+ long count,
+ const gxViewPort list[]) THREEWORDINLINE(0x303C, 0x0142, 0xA832);
+
+EXTERN_API_C( long )
+GXGetColorSet (gxColorSet source,
+ gxColorSpace * space,
+ gxSetColor colors[]) THREEWORDINLINE(0x303C, 0x0143, 0xA832);
+
+EXTERN_API_C( long )
+GXGetColorProfile (gxColorProfile source,
+ void * colorProfileData) THREEWORDINLINE(0x303C, 0x0144, 0xA832);
+
+EXTERN_API_C( void )
+GXSetColorSet (gxColorSet target,
+ gxColorSpace space,
+ long count,
+ const gxSetColor colors[]) THREEWORDINLINE(0x303C, 0x0145, 0xA832);
+
+EXTERN_API_C( void )
+GXSetColorProfile (gxColorProfile target,
+ long size,
+ void * colorProfileData) THREEWORDINLINE(0x303C, 0x0146, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXGetViewDeviceBitmap (gxViewDevice source) THREEWORDINLINE(0x303C, 0x0147, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXGetViewDeviceClip (gxViewDevice source) THREEWORDINLINE(0x303C, 0x0148, 0xA832);
+
+EXTERN_API_C( gxMapping *)
+GXGetViewDeviceMapping (gxViewDevice source,
+ gxMapping * map) THREEWORDINLINE(0x303C, 0x0149, 0xA832);
+
+EXTERN_API_C( gxViewGroup )
+GXGetViewDeviceViewGroup (gxViewDevice source) THREEWORDINLINE(0x303C, 0x014A, 0xA832);
+
+EXTERN_API_C( void )
+GXSetViewDeviceBitmap (gxViewDevice target,
+ gxShape bitmapShape) THREEWORDINLINE(0x303C, 0x014B, 0xA832);
+
+EXTERN_API_C( void )
+GXSetViewDeviceClip (gxViewDevice target,
+ gxShape clip) THREEWORDINLINE(0x303C, 0x014C, 0xA832);
+
+EXTERN_API_C( void )
+GXSetViewDeviceMapping (gxViewDevice target,
+ const gxMapping * map) THREEWORDINLINE(0x303C, 0x014D, 0xA832);
+
+EXTERN_API_C( void )
+GXSetViewDeviceViewGroup (gxViewDevice target,
+ gxViewGroup group) THREEWORDINLINE(0x303C, 0x014E, 0xA832);
+
+EXTERN_API_C( long )
+GXGetViewPortChildren (gxViewPort source,
+ gxViewPort list[]) THREEWORDINLINE(0x303C, 0x014F, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXGetViewPortClip (gxViewPort source) THREEWORDINLINE(0x303C, 0x0150, 0xA832);
+
+EXTERN_API_C( long )
+GXGetViewPortDither (gxViewPort source) THREEWORDINLINE(0x303C, 0x0151, 0xA832);
+
+EXTERN_API_C( Boolean )
+GXGetViewPortHalftone (gxViewPort source,
+ gxHalftone * data) THREEWORDINLINE(0x303C, 0x0152, 0xA832);
+
+EXTERN_API_C( gxMapping *)
+GXGetViewPortMapping (gxViewPort source,
+ gxMapping * map) THREEWORDINLINE(0x303C, 0x0153, 0xA832);
+
+EXTERN_API_C( gxViewPort )
+GXGetViewPortParent (gxViewPort source) THREEWORDINLINE(0x303C, 0x0154, 0xA832);
+
+EXTERN_API_C( gxViewGroup )
+GXGetViewPortViewGroup (gxViewPort source) THREEWORDINLINE(0x303C, 0x0155, 0xA832);
+
+EXTERN_API_C( long )
+GXGetViewPortHalftoneMatrix (gxViewPort source,
+ gxViewDevice sourceDevice,
+ gxHalftoneMatrix * theMatrix) THREEWORDINLINE(0x303C, 0x0273, 0xA832);
+
+EXTERN_API_C( void )
+GXSetViewPortChildren (gxViewPort target,
+ long count,
+ const gxViewPort list[]) THREEWORDINLINE(0x303C, 0x0156, 0xA832);
+
+EXTERN_API_C( void )
+GXSetViewPortClip (gxViewPort target,
+ gxShape clip) THREEWORDINLINE(0x303C, 0x0157, 0xA832);
+
+EXTERN_API_C( void )
+GXSetViewPortDither (gxViewPort target,
+ long level) THREEWORDINLINE(0x303C, 0x0158, 0xA832);
+
+EXTERN_API_C( void )
+GXSetViewPortHalftone (gxViewPort target,
+ const gxHalftone * data) THREEWORDINLINE(0x303C, 0x0159, 0xA832);
+
+EXTERN_API_C( void )
+GXSetViewPortMapping (gxViewPort target,
+ const gxMapping * map) THREEWORDINLINE(0x303C, 0x015A, 0xA832);
+
+EXTERN_API_C( void )
+GXSetViewPortParent (gxViewPort target,
+ gxViewPort parent) THREEWORDINLINE(0x303C, 0x015B, 0xA832);
+
+EXTERN_API_C( void )
+GXSetViewPortViewGroup (gxViewPort target,
+ gxViewGroup group) THREEWORDINLINE(0x303C, 0x015C, 0xA832);
+
+EXTERN_API_C( long )
+GXGetColorProfileTags (gxColorProfile source,
+ long tagType,
+ long index,
+ long count,
+ gxTag items[]) THREEWORDINLINE(0x303C, 0x015D, 0xA832);
+
+EXTERN_API_C( long )
+GXGetColorSetTags (gxColorSet source,
+ long tagType,
+ long index,
+ long count,
+ gxTag items[]) THREEWORDINLINE(0x303C, 0x015E, 0xA832);
+
+EXTERN_API_C( long )
+GXGetInkTags (gxInk source,
+ long tagType,
+ long index,
+ long count,
+ gxTag items[]) THREEWORDINLINE(0x303C, 0x015F, 0xA832);
+
+EXTERN_API_C( long )
+GXGetShapeTags (gxShape source,
+ long tagType,
+ long index,
+ long count,
+ gxTag items[]) THREEWORDINLINE(0x303C, 0x0160, 0xA832);
+
+EXTERN_API_C( long )
+GXGetStyleTags (gxStyle source,
+ long tagType,
+ long index,
+ long count,
+ gxTag items[]) THREEWORDINLINE(0x303C, 0x0161, 0xA832);
+
+EXTERN_API_C( long )
+GXGetTransformTags (gxTransform source,
+ long tagType,
+ long index,
+ long count,
+ gxTag items[]) THREEWORDINLINE(0x303C, 0x0162, 0xA832);
+
+EXTERN_API_C( long )
+GXGetViewDeviceTags (gxViewDevice source,
+ long tagType,
+ long index,
+ long count,
+ gxTag items[]) THREEWORDINLINE(0x303C, 0x0163, 0xA832);
+
+EXTERN_API_C( long )
+GXGetViewPortTags (gxViewPort source,
+ long tagType,
+ long index,
+ long count,
+ gxTag items[]) THREEWORDINLINE(0x303C, 0x0164, 0xA832);
+
+EXTERN_API_C( void )
+GXSetColorProfileTags (gxColorProfile target,
+ long tagType,
+ long index,
+ long oldCount,
+ long newCount,
+ const gxTag items[]) THREEWORDINLINE(0x303C, 0x0165, 0xA832);
+
+EXTERN_API_C( void )
+GXSetColorSetTags (gxColorSet target,
+ long tagType,
+ long index,
+ long oldCount,
+ long newCount,
+ const gxTag items[]) THREEWORDINLINE(0x303C, 0x0166, 0xA832);
+
+EXTERN_API_C( void )
+GXSetInkTags (gxInk target,
+ long tagType,
+ long index,
+ long oldCount,
+ long newCount,
+ const gxTag items[]) THREEWORDINLINE(0x303C, 0x0167, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeTags (gxShape target,
+ long tagType,
+ long index,
+ long oldCount,
+ long newCount,
+ const gxTag items[]) THREEWORDINLINE(0x303C, 0x0168, 0xA832);
+
+EXTERN_API_C( void )
+GXSetStyleTags (gxStyle target,
+ long tagType,
+ long index,
+ long oldCount,
+ long newCount,
+ const gxTag items[]) THREEWORDINLINE(0x303C, 0x0169, 0xA832);
+
+EXTERN_API_C( void )
+GXSetTransformTags (gxTransform target,
+ long tagType,
+ long index,
+ long oldCount,
+ long newCount,
+ const gxTag items[]) THREEWORDINLINE(0x303C, 0x016A, 0xA832);
+
+EXTERN_API_C( void )
+GXSetViewDeviceTags (gxViewDevice target,
+ long tagType,
+ long index,
+ long oldCount,
+ long newCount,
+ const gxTag items[]) THREEWORDINLINE(0x303C, 0x016B, 0xA832);
+
+EXTERN_API_C( void )
+GXSetViewPortTags (gxViewPort target,
+ long tagType,
+ long index,
+ long oldCount,
+ long newCount,
+ const gxTag items[]) THREEWORDINLINE(0x303C, 0x016C, 0xA832);
+
+EXTERN_API_C( gxInkAttribute )
+GXGetInkAttributes (gxInk source) THREEWORDINLINE(0x303C, 0x016D, 0xA832);
+
+EXTERN_API_C( gxShapeAttribute )
+GXGetShapeAttributes (gxShape source) THREEWORDINLINE(0x303C, 0x016E, 0xA832);
+
+EXTERN_API_C( gxInkAttribute )
+GXGetShapeInkAttributes (gxShape source) THREEWORDINLINE(0x303C, 0x016F, 0xA832);
+
+EXTERN_API_C( gxStyleAttribute )
+GXGetShapeStyleAttributes (gxShape source) THREEWORDINLINE(0x303C, 0x0170, 0xA832);
+
+EXTERN_API_C( gxStyleAttribute )
+GXGetStyleAttributes (gxStyle source) THREEWORDINLINE(0x303C, 0x0171, 0xA832);
+
+EXTERN_API_C( gxTextAttribute )
+GXGetShapeTextAttributes (gxShape source) THREEWORDINLINE(0x303C, 0x0172, 0xA832);
+
+EXTERN_API_C( gxTextAttribute )
+GXGetStyleTextAttributes (gxStyle source) THREEWORDINLINE(0x303C, 0x0173, 0xA832);
+
+EXTERN_API_C( gxDeviceAttribute )
+GXGetViewDeviceAttributes (gxViewDevice source) THREEWORDINLINE(0x303C, 0x0174, 0xA832);
+
+EXTERN_API_C( gxPortAttribute )
+GXGetViewPortAttributes (gxViewPort source) THREEWORDINLINE(0x303C, 0x0175, 0xA832);
+
+EXTERN_API_C( void )
+GXSetInkAttributes (gxInk target,
+ gxInkAttribute attributes) THREEWORDINLINE(0x303C, 0x0176, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeAttributes (gxShape target,
+ gxShapeAttribute attributes) THREEWORDINLINE(0x303C, 0x0177, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeInkAttributes (gxShape target,
+ gxInkAttribute attributes) THREEWORDINLINE(0x303C, 0x0178, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeStyleAttributes (gxShape target,
+ gxStyleAttribute attributes) THREEWORDINLINE(0x303C, 0x0179, 0xA832);
+
+EXTERN_API_C( void )
+GXSetStyleAttributes (gxStyle target,
+ gxStyleAttribute attributes) THREEWORDINLINE(0x303C, 0x017A, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeTextAttributes (gxShape target,
+ gxTextAttribute attributes) THREEWORDINLINE(0x303C, 0x017B, 0xA832);
+
+EXTERN_API_C( void )
+GXSetStyleTextAttributes (gxStyle target,
+ gxTextAttribute attributes) THREEWORDINLINE(0x303C, 0x017C, 0xA832);
+
+EXTERN_API_C( void )
+GXSetViewDeviceAttributes (gxViewDevice target,
+ gxDeviceAttribute attributes) THREEWORDINLINE(0x303C, 0x017D, 0xA832);
+
+EXTERN_API_C( void )
+GXSetViewPortAttributes (gxViewPort target,
+ gxPortAttribute attributes) THREEWORDINLINE(0x303C, 0x017E, 0xA832);
+
+EXTERN_API_C( long )
+GXGetColorProfileOwners (gxColorProfile source) THREEWORDINLINE(0x303C, 0x017F, 0xA832);
+
+EXTERN_API_C( long )
+GXGetColorSetOwners (gxColorSet source) THREEWORDINLINE(0x303C, 0x0180, 0xA832);
+
+EXTERN_API_C( long )
+GXGetInkOwners (gxInk source) THREEWORDINLINE(0x303C, 0x0181, 0xA832);
+
+EXTERN_API_C( long )
+GXGetShapeOwners (gxShape source) THREEWORDINLINE(0x303C, 0x0182, 0xA832);
+
+EXTERN_API_C( long )
+GXGetStyleOwners (gxStyle source) THREEWORDINLINE(0x303C, 0x0183, 0xA832);
+
+EXTERN_API_C( long )
+GXGetTagOwners (gxTag source) THREEWORDINLINE(0x303C, 0x0184, 0xA832);
+
+EXTERN_API_C( long )
+GXGetTransformOwners (gxTransform source) THREEWORDINLINE(0x303C, 0x0185, 0xA832);
+
+EXTERN_API_C( void )
+GXLockShape (gxShape target) THREEWORDINLINE(0x303C, 0x0186, 0xA832);
+
+EXTERN_API_C( void )
+GXLockTag (gxTag target) THREEWORDINLINE(0x303C, 0x0187, 0xA832);
+
+EXTERN_API_C( void )
+GXUnlockShape (gxShape target) THREEWORDINLINE(0x303C, 0x0188, 0xA832);
+
+EXTERN_API_C( void )
+GXUnlockTag (gxTag target) THREEWORDINLINE(0x303C, 0x0189, 0xA832);
+
+EXTERN_API_C( void *)
+GXGetShapeStructure (gxShape source,
+ long * length) THREEWORDINLINE(0x303C, 0x018A, 0xA832);
+
+EXTERN_API_C( void *)
+GXGetTagStructure (gxTag source,
+ long * length) THREEWORDINLINE(0x303C, 0x018B, 0xA832);
+
+EXTERN_API_C( Fixed )
+GXGetColorDistance (const gxColor * target,
+ const gxColor * source) THREEWORDINLINE(0x303C, 0x018C, 0xA832);
+
+EXTERN_API_C( gxPoint *)
+GXShapeLengthToPoint (gxShape target,
+ long index,
+ Fixed length,
+ gxPoint * location,
+ gxPoint * tangent) THREEWORDINLINE(0x303C, 0x018D, 0xA832);
+
+EXTERN_API_C( wide *)
+GXGetShapeArea (gxShape source,
+ long index,
+ wide * area) THREEWORDINLINE(0x303C, 0x018E, 0xA832);
+
+EXTERN_API_C( long )
+GXGetShapeCacheSize (gxShape source) THREEWORDINLINE(0x303C, 0x018F, 0xA832);
+
+EXTERN_API_C( gxPoint *)
+GXGetShapeCenter (gxShape source,
+ long index,
+ gxPoint * center) THREEWORDINLINE(0x303C, 0x0190, 0xA832);
+
+EXTERN_API_C( gxContourDirection )
+GXGetShapeDirection (gxShape source,
+ long contour) THREEWORDINLINE(0x303C, 0x0191, 0xA832);
+
+EXTERN_API_C( long )
+GXGetShapeIndex (gxShape source,
+ long contour,
+ long vector) THREEWORDINLINE(0x303C, 0x0192, 0xA832);
+
+EXTERN_API_C( wide *)
+GXGetShapeLength (gxShape source,
+ long index,
+ wide * length) THREEWORDINLINE(0x303C, 0x0193, 0xA832);
+
+EXTERN_API_C( long )
+GXGetShapeSize (gxShape source) THREEWORDINLINE(0x303C, 0x0194, 0xA832);
+
+EXTERN_API_C( long )
+GXCountShapeContours (gxShape source) THREEWORDINLINE(0x303C, 0x0195, 0xA832);
+
+EXTERN_API_C( long )
+GXCountShapePoints (gxShape source,
+ long contour) THREEWORDINLINE(0x303C, 0x0196, 0xA832);
+
+/* returns the number of positions */
+EXTERN_API_C( long )
+GXGetShapeDashPositions (gxShape source,
+ gxMapping dashMappings[]) THREEWORDINLINE(0x303C, 0x0197, 0xA832);
+
+EXTERN_API_C( long )
+GXGetShapeDeviceArea (gxShape source,
+ gxViewPort port,
+ gxViewDevice device) THREEWORDINLINE(0x303C, 0x0198, 0xA832);
+
+EXTERN_API_C( Boolean )
+GXGetShapeDeviceBounds (gxShape source,
+ gxViewPort port,
+ gxViewDevice device,
+ gxRectangle * bounds) THREEWORDINLINE(0x303C, 0x0199, 0xA832);
+
+EXTERN_API_C( gxColorSet )
+GXGetShapeDeviceColors (gxShape source,
+ gxViewPort port,
+ gxViewDevice device,
+ long * width) THREEWORDINLINE(0x303C, 0x019A, 0xA832);
+
+EXTERN_API_C( Boolean )
+GXGetShapeGlobalBounds (gxShape source,
+ gxViewPort port,
+ gxViewGroup group,
+ gxRectangle * bounds) THREEWORDINLINE(0x303C, 0x019B, 0xA832);
+
+EXTERN_API_C( long )
+GXGetShapeGlobalViewDevices (gxShape source,
+ gxViewPort port,
+ gxViewDevice list[]) THREEWORDINLINE(0x303C, 0x019C, 0xA832);
+
+EXTERN_API_C( long )
+GXGetShapeGlobalViewPorts (gxShape source,
+ gxViewPort list[]) THREEWORDINLINE(0x303C, 0x019D, 0xA832);
+
+EXTERN_API_C( gxRectangle *)
+GXGetShapeLocalBounds (gxShape source,
+ gxRectangle * bounds) THREEWORDINLINE(0x303C, 0x019E, 0xA832);
+
+/* returns the number of positions */
+EXTERN_API_C( long )
+GXGetShapePatternPositions (gxShape source,
+ gxPoint positions[]) THREEWORDINLINE(0x303C, 0x019F, 0xA832);
+
+EXTERN_API_C( void )
+GXGetShapeLocalFontMetrics (gxShape sourceShape,
+ gxPoint * before,
+ gxPoint * after,
+ gxPoint * caretAngle,
+ gxPoint * caretOffset) THREEWORDINLINE(0x303C, 0x01A0, 0xA832);
+
+EXTERN_API_C( void )
+GXGetShapeDeviceFontMetrics (gxShape sourceShape,
+ gxViewPort port,
+ gxViewDevice device,
+ gxPoint * before,
+ gxPoint * after,
+ gxPoint * caretAngle,
+ gxPoint * caretOffset) THREEWORDINLINE(0x303C, 0x01A1, 0xA832);
+
+EXTERN_API_C( long )
+GXGetViewGroupViewDevices (gxViewGroup source,
+ gxViewDevice list[]) THREEWORDINLINE(0x303C, 0x01A2, 0xA832);
+
+EXTERN_API_C( long )
+GXGetViewGroupViewPorts (gxViewGroup source,
+ gxViewPort list[]) THREEWORDINLINE(0x303C, 0x01A3, 0xA832);
+
+EXTERN_API_C( gxMapping *)
+GXGetViewPortGlobalMapping (gxViewPort source,
+ gxMapping * map) THREEWORDINLINE(0x303C, 0x01A4, 0xA832);
+
+EXTERN_API_C( long )
+GXGetViewPortViewDevices (gxViewPort source,
+ gxViewDevice list[]) THREEWORDINLINE(0x303C, 0x01A5, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXHitTestPicture (gxShape target,
+ const gxPoint * test,
+ gxHitTestInfo * result,
+ long level,
+ long depth) THREEWORDINLINE(0x303C, 0x01A6, 0xA832);
+
+EXTERN_API_C( Boolean )
+GXIntersectRectangle (gxRectangle * target,
+ const gxRectangle * source,
+ const gxRectangle * operand) THREEWORDINLINE(0x303C, 0x01A7, 0xA832);
+
+EXTERN_API_C( gxRectangle *)
+GXUnionRectangle (gxRectangle * target,
+ const gxRectangle * source,
+ const gxRectangle * operand) THREEWORDINLINE(0x303C, 0x01A8, 0xA832);
+
+EXTERN_API_C( Boolean )
+GXTouchesRectanglePoint (const gxRectangle * target,
+ const gxPoint * test) THREEWORDINLINE(0x303C, 0x01A9, 0xA832);
+
+EXTERN_API_C( Boolean )
+GXTouchesShape (gxShape target,
+ gxShape test) THREEWORDINLINE(0x303C, 0x01AA, 0xA832);
+
+EXTERN_API_C( Boolean )
+GXTouchesBoundsShape (const gxRectangle * target,
+ gxShape test) THREEWORDINLINE(0x303C, 0x01AB, 0xA832);
+
+EXTERN_API_C( Boolean )
+GXContainsRectangle (const gxRectangle * container,
+ const gxRectangle * test) THREEWORDINLINE(0x303C, 0x01AC, 0xA832);
+
+EXTERN_API_C( Boolean )
+GXContainsShape (gxShape container,
+ gxShape test) THREEWORDINLINE(0x303C, 0x01AD, 0xA832);
+
+EXTERN_API_C( Boolean )
+GXContainsBoundsShape (const gxRectangle * container,
+ gxShape test,
+ long index) THREEWORDINLINE(0x303C, 0x01AE, 0xA832);
+
+EXTERN_API_C( gxColor *)
+GXConvertColor (gxColor * target,
+ gxColorSpace space,
+ gxColorSet aSet,
+ gxColorProfile profile) THREEWORDINLINE(0x303C, 0x01AF, 0xA832);
+
+EXTERN_API_C( gxColor *)
+GXCombineColor (gxColor * target,
+ gxInk operand) THREEWORDINLINE(0x303C, 0x01B0, 0xA832);
+
+EXTERN_API_C( Boolean )
+GXCheckColor (const gxColor * source,
+ gxColorSpace space,
+ gxColorSet aSet,
+ gxColorProfile profile) THREEWORDINLINE(0x303C, 0x01B1, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXCheckBitmapColor (gxShape source,
+ const gxLongRectangle * area,
+ gxColorSpace space,
+ gxColorSet aSet,
+ gxColorProfile profile) THREEWORDINLINE(0x303C, 0x01B2, 0xA832);
+
+EXTERN_API_C( Fixed )
+GXGetHalftoneDeviceAngle (gxViewDevice source,
+ const gxHalftone * data) THREEWORDINLINE(0x303C, 0x01B3, 0xA832);
+
+EXTERN_API_C( long )
+GXGetColorSetParts (gxColorSet source,
+ long index,
+ long count,
+ gxColorSpace * space,
+ gxSetColor data[]) THREEWORDINLINE(0x303C, 0x01B4, 0xA832);
+
+/* returns the glyph count */
+EXTERN_API_C( long )
+GXGetGlyphParts (gxShape source,
+ long index,
+ long charCount,
+ long * byteLength,
+ unsigned char text[],
+ gxPoint positions[],
+ long advanceBits[],
+ gxPoint tangents[],
+ long * runCount,
+ short styleRuns[],
+ gxStyle styles[]) THREEWORDINLINE(0x303C, 0x01B5, 0xA832);
+
+EXTERN_API_C( long )
+GXGetPathParts (gxShape source,
+ long index,
+ long count,
+ gxPaths * data) THREEWORDINLINE(0x303C, 0x01B6, 0xA832);
+
+EXTERN_API_C( long )
+GXGetPictureParts (gxShape source,
+ long index,
+ long count,
+ gxShape shapes[],
+ gxStyle styles[],
+ gxInk inks[],
+ gxTransform transforms[]) THREEWORDINLINE(0x303C, 0x01B7, 0xA832);
+
+EXTERN_API_C( long )
+GXGetPolygonParts (gxShape source,
+ long index,
+ long count,
+ gxPolygons * data) THREEWORDINLINE(0x303C, 0x01B8, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXGetShapeParts (gxShape source,
+ long index,
+ long count,
+ gxShape destination) THREEWORDINLINE(0x303C, 0x01B9, 0xA832);
+
+EXTERN_API_C( long )
+GXGetTextParts (gxShape source,
+ long index,
+ long charCount,
+ unsigned char text[]) THREEWORDINLINE(0x303C, 0x01BA, 0xA832);
+
+EXTERN_API_C( void )
+GXSetColorSetParts (gxColorSet target,
+ long index,
+ long oldCount,
+ long newCount,
+ const gxSetColor data[]) THREEWORDINLINE(0x303C, 0x01BB, 0xA832);
+
+EXTERN_API_C( void )
+GXSetGlyphParts (gxShape source,
+ long index,
+ long oldCharCount,
+ long newCharCount,
+ const unsigned char text[],
+ const gxPoint positions[],
+ const long advanceBits[],
+ const gxPoint tangents[],
+ const short styleRuns[],
+ const gxStyle styles[]) THREEWORDINLINE(0x303C, 0x01BC, 0xA832);
+
+EXTERN_API_C( void )
+GXSetPathParts (gxShape target,
+ long index,
+ long count,
+ const gxPaths * data,
+ gxEditShapeFlag flags) THREEWORDINLINE(0x303C, 0x01BD, 0xA832);
+
+EXTERN_API_C( void )
+GXSetPictureParts (gxShape target,
+ long index,
+ long oldCount,
+ long newCount,
+ const gxShape shapes[],
+ const gxStyle styles[],
+ const gxInk inks[],
+ const gxTransform transforms[]) THREEWORDINLINE(0x303C, 0x01BE, 0xA832);
+
+EXTERN_API_C( void )
+GXSetPolygonParts (gxShape target,
+ long index,
+ long count,
+ const gxPolygons * data,
+ gxEditShapeFlag flags) THREEWORDINLINE(0x303C, 0x01BF, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeParts (gxShape target,
+ long index,
+ long count,
+ gxShape insert,
+ gxEditShapeFlag flags) THREEWORDINLINE(0x303C, 0x01C0, 0xA832);
+
+EXTERN_API_C( void )
+GXSetTextParts (gxShape target,
+ long index,
+ long oldCharCount,
+ long newCharCount,
+ const unsigned char text[]) THREEWORDINLINE(0x303C, 0x01C1, 0xA832);
+
+EXTERN_API_C( long )
+GXGetShapePoints (gxShape source,
+ long index,
+ long count,
+ gxPoint data[]) THREEWORDINLINE(0x303C, 0x01C2, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapePoints (gxShape target,
+ long index,
+ long count,
+ const gxPoint data[]) THREEWORDINLINE(0x303C, 0x01C3, 0xA832);
+
+EXTERN_API_C( long )
+GXGetGlyphPositions (gxShape source,
+ long index,
+ long charCount,
+ long advance[],
+ gxPoint positions[]) THREEWORDINLINE(0x303C, 0x01C4, 0xA832);
+
+EXTERN_API_C( long )
+GXGetGlyphTangents (gxShape source,
+ long index,
+ long charCount,
+ gxPoint tangents[]) THREEWORDINLINE(0x303C, 0x01C5, 0xA832);
+
+EXTERN_API_C( void )
+GXSetGlyphPositions (gxShape target,
+ long index,
+ long charCount,
+ const long advance[],
+ const gxPoint positions[]) THREEWORDINLINE(0x303C, 0x01C6, 0xA832);
+
+EXTERN_API_C( void )
+GXSetGlyphTangents (gxShape target,
+ long index,
+ long charCount,
+ const gxPoint tangents[]) THREEWORDINLINE(0x303C, 0x01C7, 0xA832);
+
+EXTERN_API_C( long )
+GXGetGlyphMetrics (gxShape source,
+ gxPoint glyphOrigins[],
+ gxRectangle boundingBoxes[],
+ gxPoint sideBearings[]) THREEWORDINLINE(0x303C, 0x01C8, 0xA832);
+
+EXTERN_API_C( void )
+GXDifferenceShape (gxShape target,
+ gxShape operand) THREEWORDINLINE(0x303C, 0x01C9, 0xA832);
+
+EXTERN_API_C( void )
+GXExcludeShape (gxShape target,
+ gxShape operand) THREEWORDINLINE(0x303C, 0x01CA, 0xA832);
+
+EXTERN_API_C( void )
+GXIntersectShape (gxShape target,
+ gxShape operand) THREEWORDINLINE(0x303C, 0x01CB, 0xA832);
+
+EXTERN_API_C( void )
+GXMapShape (gxShape target,
+ const gxMapping * map) THREEWORDINLINE(0x303C, 0x01CC, 0xA832);
+
+EXTERN_API_C( void )
+GXMoveShape (gxShape target,
+ Fixed deltaX,
+ Fixed deltaY) THREEWORDINLINE(0x303C, 0x01CD, 0xA832);
+
+EXTERN_API_C( void )
+GXMoveShapeTo (gxShape target,
+ Fixed x,
+ Fixed y) THREEWORDINLINE(0x303C, 0x01CE, 0xA832);
+
+EXTERN_API_C( void )
+GXReverseDifferenceShape (gxShape target,
+ gxShape operand) THREEWORDINLINE(0x303C, 0x01CF, 0xA832);
+
+EXTERN_API_C( void )
+GXRotateShape (gxShape target,
+ Fixed degrees,
+ Fixed xOffset,
+ Fixed yOffset) THREEWORDINLINE(0x303C, 0x01D0, 0xA832);
+
+EXTERN_API_C( void )
+GXScaleShape (gxShape target,
+ Fixed hScale,
+ Fixed vScale,
+ Fixed xOffset,
+ Fixed yOffset) THREEWORDINLINE(0x303C, 0x01D1, 0xA832);
+
+EXTERN_API_C( void )
+GXSkewShape (gxShape target,
+ Fixed xSkew,
+ Fixed ySkew,
+ Fixed xOffset,
+ Fixed yOffset) THREEWORDINLINE(0x303C, 0x01D2, 0xA832);
+
+EXTERN_API_C( void )
+GXUnionShape (gxShape target,
+ gxShape operand) THREEWORDINLINE(0x303C, 0x01D3, 0xA832);
+
+EXTERN_API_C( void )
+GXDifferenceTransform (gxTransform target,
+ gxShape operand) THREEWORDINLINE(0x303C, 0x01D4, 0xA832);
+
+EXTERN_API_C( void )
+GXExcludeTransform (gxTransform target,
+ gxShape operand) THREEWORDINLINE(0x303C, 0x01D5, 0xA832);
+
+EXTERN_API_C( void )
+GXIntersectTransform (gxTransform target,
+ gxShape operand) THREEWORDINLINE(0x303C, 0x01D6, 0xA832);
+
+EXTERN_API_C( void )
+GXMapTransform (gxTransform target,
+ const gxMapping * map) THREEWORDINLINE(0x303C, 0x01D7, 0xA832);
+
+EXTERN_API_C( void )
+GXMoveTransform (gxTransform target,
+ Fixed deltaX,
+ Fixed deltaY) THREEWORDINLINE(0x303C, 0x01D8, 0xA832);
+
+EXTERN_API_C( void )
+GXMoveTransformTo (gxTransform target,
+ Fixed x,
+ Fixed y) THREEWORDINLINE(0x303C, 0x01D9, 0xA832);
+
+EXTERN_API_C( void )
+GXReverseDifferenceTransform (gxTransform target,
+ gxShape operand) THREEWORDINLINE(0x303C, 0x01DA, 0xA832);
+
+EXTERN_API_C( void )
+GXRotateTransform (gxTransform target,
+ Fixed degrees,
+ Fixed xOffset,
+ Fixed yOffset) THREEWORDINLINE(0x303C, 0x01DB, 0xA832);
+
+EXTERN_API_C( void )
+GXScaleTransform (gxTransform target,
+ Fixed hScale,
+ Fixed vScale,
+ Fixed xOffset,
+ Fixed yOffset) THREEWORDINLINE(0x303C, 0x01DC, 0xA832);
+
+EXTERN_API_C( void )
+GXSkewTransform (gxTransform target,
+ Fixed xSkew,
+ Fixed ySkew,
+ Fixed xOffset,
+ Fixed yOffset) THREEWORDINLINE(0x303C, 0x01DD, 0xA832);
+
+EXTERN_API_C( void )
+GXUnionTransform (gxTransform target,
+ gxShape operand) THREEWORDINLINE(0x303C, 0x01DE, 0xA832);
+
+EXTERN_API_C( void )
+GXBreakShape (gxShape target,
+ long index) THREEWORDINLINE(0x303C, 0x01DF, 0xA832);
+
+EXTERN_API_C( void )
+GXChangedShape (gxShape target) THREEWORDINLINE(0x303C, 0x01E0, 0xA832);
+
+EXTERN_API_C( gxShapePart )
+GXHitTestShape (gxShape target,
+ const gxPoint * test,
+ gxHitTestInfo * result) THREEWORDINLINE(0x303C, 0x01E1, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXHitTestDevice (gxShape target,
+ gxViewPort port,
+ gxViewDevice device,
+ const gxPoint * test,
+ const gxPoint * tolerance) THREEWORDINLINE(0x303C, 0x01E2, 0xA832);
+
+EXTERN_API_C( void )
+GXInsetShape (gxShape target,
+ Fixed inset) THREEWORDINLINE(0x303C, 0x01E3, 0xA832);
+
+EXTERN_API_C( void )
+GXInvertShape (gxShape target) THREEWORDINLINE(0x303C, 0x01E4, 0xA832);
+
+EXTERN_API_C( void )
+GXPrimitiveShape (gxShape target) THREEWORDINLINE(0x303C, 0x01E5, 0xA832);
+
+EXTERN_API_C( void )
+GXReduceShape (gxShape target,
+ long contour) THREEWORDINLINE(0x303C, 0x01E6, 0xA832);
+
+EXTERN_API_C( void )
+GXReverseShape (gxShape target,
+ long contour) THREEWORDINLINE(0x303C, 0x01E7, 0xA832);
+
+EXTERN_API_C( void )
+GXSimplifyShape (gxShape target) THREEWORDINLINE(0x303C, 0x01E8, 0xA832);
+
+EXTERN_API_C( void )
+GXLockColorProfile (gxColorProfile source) THREEWORDINLINE(0x303C, 0x01E9, 0xA832);
+
+EXTERN_API_C( void )
+GXUnlockColorProfile (gxColorProfile source) THREEWORDINLINE(0x303C, 0x01EA, 0xA832);
+
+EXTERN_API_C( void *)
+GXGetColorProfileStructure (gxColorProfile source,
+ long * length) THREEWORDINLINE(0x303C, 0x01EB, 0xA832);
+
+EXTERN_API_C( void )
+GXFlattenShape (gxShape source,
+ gxFlattenFlag flags,
+ gxSpoolBlock * block) THREEWORDINLINE(0x303C, 0x01EC, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXUnflattenShape (gxSpoolBlock * block,
+ long count,
+ const gxViewPort portList[]) THREEWORDINLINE(0x303C, 0x01ED, 0xA832);
+
+EXTERN_API_C( void )
+GXPostGraphicsNotice (gxGraphicsNotice notice) THREEWORDINLINE(0x303C, 0x0065, 0xA832);
+
+EXTERN_API_C( void )
+GXIgnoreGraphicsNotice (gxGraphicsNotice notice) THREEWORDINLINE(0x303C, 0x006D, 0xA832);
+
+EXTERN_API_C( void )
+GXPopGraphicsNotice (void) THREEWORDINLINE(0x303C, 0x006E, 0xA832);
+
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if defined(__MWERKS__) && TARGET_CPU_68K
+ #pragma pop
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __GXGRAPHICS__ */
+
diff --git a/include/qt/GXLayout.h b/include/qt/GXLayout.h
new file mode 100644
index 000000000..824679bcd
--- /dev/null
+++ b/include/qt/GXLayout.h
@@ -0,0 +1,404 @@
+/*
+ File: GXLayout.h
+
+ Contains: QuickDraw GX layout routine interfaces.
+
+ Version: Technology: Quickdraw GX 1.1
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __GXLAYOUT__
+#define __GXLAYOUT__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __GXTYPES__
+#include "GXTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if defined(__MWERKS__) && TARGET_CPU_68K
+ #pragma push
+ #pragma pointers_in_D0
+#endif
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( gxShape )
+GXNewLayout (long textRunCount,
+ const short textRunLengths[],
+ const void * text[],
+ long styleRunCount,
+ const short styleRunLengths[],
+ const gxStyle styles[],
+ long levelRunCount,
+ const short levelRunLengths[],
+ const short levels[],
+ const gxLayoutOptions * layoutOptions,
+ const gxPoint * position) THREEWORDINLINE(0x303C, 0x0000, 0xA832);
+
+EXTERN_API_C( long )
+GXGetLayout (gxShape layout,
+ void * text,
+ long * styleRunCount,
+ short styleRunLengths[],
+ gxStyle styles[],
+ long * levelRunCount,
+ short levelRunLengths[],
+ short levels[],
+ gxLayoutOptions * layoutOptions,
+ gxPoint * position) THREEWORDINLINE(0x303C, 0x0001, 0xA832);
+
+EXTERN_API_C( void )
+GXSetLayout (gxShape layout,
+ long textRunCount,
+ const short textRunLengths[],
+ const void * text[],
+ long styleRunCount,
+ const short styleRunLengths[],
+ const gxStyle styles[],
+ long levelRunCount,
+ const short levelRunLengths[],
+ const short levels[],
+ const gxLayoutOptions * layoutOptions,
+ const gxPoint * position) THREEWORDINLINE(0x303C, 0x0002, 0xA832);
+
+EXTERN_API_C( void )
+GXDrawLayout (long textRunCount,
+ const short textRunLengths[],
+ const void * text[],
+ long styleRunCount,
+ const short styleRunLengths[],
+ const gxStyle styles[],
+ long levelRunCount,
+ const short levelRunLengths[],
+ const short levels[],
+ const gxLayoutOptions * layoutOptions,
+ const gxPoint * position) THREEWORDINLINE(0x303C, 0x0003, 0xA832);
+
+EXTERN_API_C( void )
+GXSetLayoutParts (gxShape layout,
+ gxByteOffset oldStartOffset,
+ gxByteOffset oldEndOffset,
+ long newTextRunCount,
+ const short newTextRunLengths[],
+ const void * newText[],
+ long newStyleRunCount,
+ const short newStyleRunLengths[],
+ const gxStyle newStyles[],
+ long newLevelRunCount,
+ const short newLevelRunLengths[],
+ const short newLevels[]) THREEWORDINLINE(0x303C, 0x0004, 0xA832);
+
+EXTERN_API_C( void )
+GXSetLayoutShapeParts (gxShape layout,
+ gxByteOffset startOffset,
+ gxByteOffset endOffset,
+ gxShape insert) THREEWORDINLINE(0x303C, 0x0005, 0xA832);
+
+EXTERN_API_C( long )
+GXGetLayoutParts (gxShape layout,
+ gxByteOffset startOffset,
+ gxByteOffset endOffset,
+ void * text,
+ long * styleRunCount,
+ short styleRunLengths[],
+ gxStyle styles[],
+ long * levelRunCount,
+ short levelRunLengths[],
+ short levels[]) THREEWORDINLINE(0x303C, 0x0006, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXGetLayoutShapeParts (gxShape layout,
+ gxByteOffset startOffset,
+ gxByteOffset endOffset,
+ gxShape dest) THREEWORDINLINE(0x303C, 0x0007, 0xA832);
+
+EXTERN_API_C( long )
+GXGetLayoutGlyphs (gxShape layout,
+ gxGlyphcode * glyphs,
+ gxPoint positions[],
+ long advance[],
+ gxPoint tangents[],
+ long * runCount,
+ short styleRuns[],
+ gxStyle glyphStyles[]) THREEWORDINLINE(0x303C, 0x0008, 0xA832);
+
+EXTERN_API_C( gxByteOffset )
+GXHitTestLayout (gxShape layout,
+ const gxPoint * hitDown,
+ gxHighlightType highlightType,
+ gxLayoutHitInfo * hitInfo,
+ gxShape hitTrackingArea) THREEWORDINLINE(0x303C, 0x0009, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXGetLayoutHighlight (gxShape layout,
+ gxByteOffset startOffset,
+ gxByteOffset endOffset,
+ gxHighlightType highlightType,
+ gxShape highlight) THREEWORDINLINE(0x303C, 0x000A, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXGetLayoutVisualHighlight (gxShape layout,
+ gxByteOffset startOffset,
+ long startLeadingEdge,
+ gxByteOffset endOffset,
+ long endLeadingEdge,
+ gxHighlightType highlightType,
+ gxShape highlight) THREEWORDINLINE(0x303C, 0x000B, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXGetLayoutCaret (gxShape layout,
+ gxByteOffset offset,
+ gxHighlightType highlightType,
+ gxCaretType caretType,
+ gxShape caret) THREEWORDINLINE(0x303C, 0x000C, 0xA832);
+
+EXTERN_API_C( gxByteOffset )
+GXGetLayoutBreakOffset (gxShape layout,
+ gxByteOffset startOffset,
+ Fixed lineWidth,
+ long hyphenationCount,
+ const gxByteOffset hyphenationPoints[],
+ Boolean * startIsStaked,
+ gxByteOffset * priorStake,
+ gxByteOffset * nextStake) THREEWORDINLINE(0x303C, 0x000D, 0xA832);
+
+EXTERN_API_C( Fixed )
+GXGetLayoutRangeWidth (gxShape layout,
+ gxByteOffset startOffset,
+ gxByteOffset endOffset,
+ gxShape supplementaryText) THREEWORDINLINE(0x303C, 0x000E, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXNewLayoutFromRange (gxShape layout,
+ gxByteOffset startOffset,
+ gxByteOffset endOffset,
+ const gxLayoutOptions * layoutOptions,
+ gxShape supplementaryText) THREEWORDINLINE(0x303C, 0x000F, 0xA832);
+
+EXTERN_API_C( gxShape )
+GXGetCaretAngleArea (gxShape layout,
+ const gxPoint * hitPoint,
+ gxHighlightType highlightType,
+ gxShape caretArea,
+ short * returnedRise,
+ short * returnedRun) THREEWORDINLINE(0x303C, 0x0010, 0xA832);
+
+EXTERN_API_C( void )
+GXGetStyleBaselineDeltas (gxStyle baseStyle,
+ gxBaselineType baseType,
+ gxBaselineDeltas returnedDeltas) THREEWORDINLINE(0x303C, 0x0011, 0xA832);
+
+EXTERN_API_C( gxByteOffset )
+GXGetRightVisualOffset (gxShape layout,
+ gxByteOffset currentOffset) THREEWORDINLINE(0x303C, 0x0012, 0xA832);
+
+EXTERN_API_C( gxByteOffset )
+GXGetLeftVisualOffset (gxShape layout,
+ gxByteOffset currentOffset) THREEWORDINLINE(0x303C, 0x0013, 0xA832);
+
+EXTERN_API_C( void )
+GXGetCompoundCharacterLimits (gxShape layout,
+ gxByteOffset trial,
+ gxByteOffset * minOffset,
+ gxByteOffset * maxOffset,
+ Boolean * onBoundary) THREEWORDINLINE(0x303C, 0x0014, 0xA832);
+
+EXTERN_API_C( void )
+GXGetOffsetGlyphs (gxShape layout,
+ gxByteOffset trial,
+ long leadingEdge,
+ gxLayoutOffsetState * offsetState,
+ unsigned short * firstGlyph,
+ unsigned short * secondGlyph) THREEWORDINLINE(0x303C, 0x0015, 0xA832);
+
+EXTERN_API_C( void )
+GXGetGlyphOffset (gxShape layout,
+ long trial,
+ long onLeftTop,
+ gxByteOffset * offset,
+ Boolean * leadingEdge,
+ Boolean * wasRealCharacter) THREEWORDINLINE(0x303C, 0x0016, 0xA832);
+
+EXTERN_API_C( void )
+GXGetLayoutSpan (gxShape layout,
+ Fixed * lineAscent,
+ Fixed * lineDescent) THREEWORDINLINE(0x303C, 0x0017, 0xA832);
+
+EXTERN_API_C( void )
+GXSetLayoutSpan (gxShape layout,
+ Fixed lineAscent,
+ Fixed lineDescent) THREEWORDINLINE(0x303C, 0x0018, 0xA832);
+
+EXTERN_API_C( Fixed )
+GXGetLayoutJustificationGap (gxShape layout) THREEWORDINLINE(0x303C, 0x0279, 0xA832);
+
+EXTERN_API_C( void )
+GXGetLayoutJustificationFactors (gxShape layout,
+ Fixed constrainedFactors[],
+ Fixed unconstrainedFactors[]) THREEWORDINLINE(0x303C, 0x027A, 0xA832);
+
+EXTERN_API_C( void )
+GXSetStyleRunControls (gxStyle target,
+ const gxRunControls * runControls) THREEWORDINLINE(0x303C, 0x0019, 0xA832);
+
+EXTERN_API_C( void )
+GXSetStyleRunPriorityJustOverride (gxStyle target,
+ const gxPriorityJustificationOverride * priorityJustificationOverride) THREEWORDINLINE(0x303C, 0x001A, 0xA832);
+
+EXTERN_API_C( void )
+GXSetStyleRunGlyphJustOverrides (gxStyle target,
+ long count,
+ const gxGlyphJustificationOverride glyphJustificationOverrides[]) THREEWORDINLINE(0x303C, 0x001B, 0xA832);
+
+EXTERN_API_C( void )
+GXSetStyleRunGlyphSubstitutions (gxStyle target,
+ long count,
+ const gxGlyphSubstitution glyphSubstitutions[]) THREEWORDINLINE(0x303C, 0x001C, 0xA832);
+
+EXTERN_API_C( void )
+GXSetStyleRunFeatures (gxStyle target,
+ long count,
+ const gxRunFeature runFeatures[]) THREEWORDINLINE(0x303C, 0x001D, 0xA832);
+
+EXTERN_API_C( void )
+GXSetStyleRunKerningAdjustments (gxStyle target,
+ long count,
+ const gxKerningAdjustment kerningAdjustments[]) THREEWORDINLINE(0x303C, 0x001E, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeRunControls (gxShape target,
+ const gxRunControls * runControls) THREEWORDINLINE(0x303C, 0x001F, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeRunPriorityJustOverride (gxShape target,
+ const gxPriorityJustificationOverride * priorityJustificationOverride) THREEWORDINLINE(0x303C, 0x0020, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeRunGlyphJustOverrides (gxShape target,
+ long count,
+ const gxGlyphJustificationOverride glyphJustificationOverrides[]) THREEWORDINLINE(0x303C, 0x0021, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeRunGlyphSubstitutions (gxShape target,
+ long count,
+ const gxGlyphSubstitution glyphSubstitutions[]) THREEWORDINLINE(0x303C, 0x0022, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeRunFeatures (gxShape target,
+ long count,
+ const gxRunFeature runFeatures[]) THREEWORDINLINE(0x303C, 0x0023, 0xA832);
+
+EXTERN_API_C( void )
+GXSetShapeRunKerningAdjustments (gxShape target,
+ long count,
+ const gxKerningAdjustment kerningAdjustments[]) THREEWORDINLINE(0x303C, 0x0024, 0xA832);
+
+EXTERN_API_C( long )
+GXGetStyleRunControls (gxStyle source,
+ gxRunControls * runControls) THREEWORDINLINE(0x303C, 0x0025, 0xA832);
+
+EXTERN_API_C( long )
+GXGetStyleRunPriorityJustOverride (gxStyle source,
+ gxPriorityJustificationOverride * priorityJustificationOverride) THREEWORDINLINE(0x303C, 0x0026, 0xA832);
+
+EXTERN_API_C( long )
+GXGetStyleRunGlyphJustOverrides (gxStyle source,
+ gxGlyphJustificationOverride glyphJustificationOverrides[]) THREEWORDINLINE(0x303C, 0x0027, 0xA832);
+
+EXTERN_API_C( long )
+GXGetStyleRunGlyphSubstitutions (gxStyle source,
+ gxGlyphSubstitution glyphSubstitutions[]) THREEWORDINLINE(0x303C, 0x0028, 0xA832);
+
+EXTERN_API_C( long )
+GXGetStyleRunFeatures (gxStyle source,
+ gxRunFeature runFeatures[]) THREEWORDINLINE(0x303C, 0x0029, 0xA832);
+
+EXTERN_API_C( long )
+GXGetStyleRunKerningAdjustments (gxStyle source,
+ gxKerningAdjustment kerningAdjustments[]) THREEWORDINLINE(0x303C, 0x002A, 0xA832);
+
+EXTERN_API_C( long )
+GXGetShapeRunControls (gxShape source,
+ gxRunControls * runControls) THREEWORDINLINE(0x303C, 0x002B, 0xA832);
+
+EXTERN_API_C( long )
+GXGetShapeRunPriorityJustOverride (gxShape source,
+ gxPriorityJustificationOverride * priorityJustificationOverride) THREEWORDINLINE(0x303C, 0x002C, 0xA832);
+
+EXTERN_API_C( long )
+GXGetShapeRunGlyphJustOverrides (gxShape source,
+ gxGlyphJustificationOverride glyphJustificationOverrides[]) THREEWORDINLINE(0x303C, 0x002D, 0xA832);
+
+EXTERN_API_C( long )
+GXGetShapeRunGlyphSubstitutions (gxShape source,
+ gxGlyphSubstitution glyphSubstitutions[]) THREEWORDINLINE(0x303C, 0x002E, 0xA832);
+
+EXTERN_API_C( long )
+GXGetShapeRunFeatures (gxShape source,
+ gxRunFeature runFeatures[]) THREEWORDINLINE(0x303C, 0x002F, 0xA832);
+
+EXTERN_API_C( long )
+GXGetShapeRunKerningAdjustments (gxShape source,
+ gxKerningAdjustment kerningAdjustments[]) THREEWORDINLINE(0x303C, 0x0030, 0xA832);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if defined(__MWERKS__) && TARGET_CPU_68K
+ #pragma pop
+#endif
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __GXLAYOUT__ */
+
diff --git a/include/qt/GXMath.h b/include/qt/GXMath.h
new file mode 100644
index 000000000..c5f7b0136
--- /dev/null
+++ b/include/qt/GXMath.h
@@ -0,0 +1,324 @@
+/*
+ File: GXMath.h
+
+ Contains: QuickDraw GX math routine interfaces.
+
+ Version: Technology: Quickdraw GX 1.1
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __GXMATH__
+#define __GXMATH__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __FIXMATH__
+#include "FixMath.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if defined(__MWERKS__) && TARGET_CPU_68K
+ #pragma push
+ #pragma pointers_in_D0
+#endif
+
+
+
+struct gxPoint {
+ Fixed x;
+ Fixed y;
+};
+typedef struct gxPoint gxPoint;
+
+typedef unsigned short gxColorValue;
+
+struct gxPolar {
+ Fixed radius;
+ Fixed angle;
+};
+typedef struct gxPolar gxPolar;
+
+struct gxMapping {
+ Fixed map[3][3];
+};
+typedef struct gxMapping gxMapping;
+#define gxColorValue1 ((gxColorValue) 0x0000FFFF)
+#define gxPositiveInfinity ((long) 0x7FFFFFFFL)
+#define gxNegativeInfinity ((long) 0x80000000L)
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( gxMapping *)
+CopyToMapping (gxMapping * target,
+ const gxMapping * source) THREEWORDINLINE(0x303C, 0x0031, 0xA832);
+
+EXTERN_API_C( gxMapping *)
+InvertMapping (gxMapping * target,
+ const gxMapping * source) THREEWORDINLINE(0x303C, 0x0032, 0xA832);
+
+EXTERN_API_C( gxMapping *)
+MapMapping (gxMapping * target,
+ const gxMapping * source) THREEWORDINLINE(0x303C, 0x0033, 0xA832);
+
+EXTERN_API_C( gxMapping *)
+MoveMapping (gxMapping * target,
+ Fixed hOffset,
+ Fixed vOffset) THREEWORDINLINE(0x303C, 0x0034, 0xA832);
+
+EXTERN_API_C( gxMapping *)
+MoveMappingTo (gxMapping * target,
+ Fixed hPosition,
+ Fixed vPosition) THREEWORDINLINE(0x303C, 0x0035, 0xA832);
+
+EXTERN_API_C( gxMapping *)
+NormalizeMapping (gxMapping * target) THREEWORDINLINE(0x303C, 0x0036, 0xA832);
+
+EXTERN_API_C( gxMapping *)
+RotateMapping (gxMapping * target,
+ Fixed angle,
+ Fixed xCenter,
+ Fixed yCenter) THREEWORDINLINE(0x303C, 0x0037, 0xA832);
+
+EXTERN_API_C( gxMapping *)
+ScaleMapping (gxMapping * target,
+ Fixed hFactor,
+ Fixed vFactor,
+ Fixed xCenter,
+ Fixed yCenter) THREEWORDINLINE(0x303C, 0x0038, 0xA832);
+
+EXTERN_API_C( gxMapping *)
+ResetMapping (gxMapping * target) THREEWORDINLINE(0x303C, 0x0039, 0xA832);
+
+EXTERN_API_C( gxMapping *)
+SkewMapping (gxMapping * target,
+ Fixed skewX,
+ Fixed skewY,
+ Fixed xCenter,
+ Fixed yCenter) THREEWORDINLINE(0x303C, 0x003A, 0xA832);
+
+EXTERN_API_C( void )
+MapPoints (const gxMapping * source,
+ long count,
+ gxPoint theVector[]) THREEWORDINLINE(0x303C, 0x003B, 0xA832);
+
+EXTERN_API_C( short )
+FirstBit (unsigned long x) THREEWORDINLINE(0x303C, 0x003C, 0xA832);
+
+EXTERN_API_C( short )
+WideScale (const wide * source) THREEWORDINLINE(0x303C, 0x003D, 0xA832);
+
+EXTERN_API_C( short )
+LinearRoot (Fixed first,
+ Fixed last,
+ Fract t[]) THREEWORDINLINE(0x303C, 0x003E, 0xA832);
+
+EXTERN_API_C( short )
+QuadraticRoot (Fixed first,
+ Fixed control,
+ Fixed last,
+ Fract t[]) THREEWORDINLINE(0x303C, 0x003F, 0xA832);
+
+EXTERN_API_C( gxPoint *)
+PolarToPoint (const gxPolar * ra,
+ gxPoint * xy) THREEWORDINLINE(0x303C, 0x0040, 0xA832);
+
+EXTERN_API_C( gxPolar *)
+PointToPolar (const gxPoint * xy,
+ gxPolar * ra) THREEWORDINLINE(0x303C, 0x0041, 0xA832);
+
+EXTERN_API_C( Fract )
+FractCubeRoot (Fract source) THREEWORDINLINE(0x303C, 0x0042, 0xA832);
+
+EXTERN_API_C( Fract )
+FractDivide (Fract dividend,
+ Fract divisor) THREEWORDINLINE(0x303C, 0x0043, 0xA832);
+
+EXTERN_API_C( Fract )
+FractMultiply (Fract multiplicand,
+ Fract multiplier) THREEWORDINLINE(0x303C, 0x0044, 0xA832);
+
+EXTERN_API_C( Fract )
+FractSineCosine (Fixed degrees,
+ Fract * cosine) THREEWORDINLINE(0x303C, 0x0045, 0xA832);
+
+EXTERN_API_C( Fract )
+FractSquareRoot (Fract source) THREEWORDINLINE(0x303C, 0x0046, 0xA832);
+
+EXTERN_API_C( Fixed )
+FixedDivide (Fixed dividend,
+ Fixed divisor) THREEWORDINLINE(0x303C, 0x0047, 0xA832);
+
+EXTERN_API_C( Fixed )
+FixedMultiply (Fixed multiplicand,
+ Fixed multiplier) THREEWORDINLINE(0x303C, 0x0048, 0xA832);
+
+/* This next call is (source * multiplier / divisor) -- it avoids underflow, overflow by using wides */
+EXTERN_API_C( long )
+MultiplyDivide (long source,
+ long multiplier,
+ long divisor) THREEWORDINLINE(0x303C, 0x0049, 0xA832);
+
+EXTERN_API_C( unsigned long )
+Magnitude (long deltaX,
+ long deltaY) THREEWORDINLINE(0x303C, 0x004A, 0xA832);
+
+EXTERN_API_C( long )
+VectorMultiplyDivide (long count,
+ const long * vector1,
+ long step1,
+ const long * vector2,
+ long step2,
+ long divisor) THREEWORDINLINE(0x303C, 0x004B, 0xA832);
+
+
+
+
+/* wide operations are defined within FixMath.h for PowerPC */
+#endif /* CALL_NOT_IN_CARBON */
+
+#if TARGET_OS_MAC && TARGET_CPU_68K
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( wide *)
+WideAdd (wide * target,
+ const wide * source) THREEWORDINLINE(0x303C, 0x004C, 0xA832);
+
+EXTERN_API_C( short )
+WideCompare (const wide * target,
+ const wide * source) THREEWORDINLINE(0x303C, 0x004D, 0xA832);
+
+EXTERN_API_C( wide *)
+WideNegate (wide * target) THREEWORDINLINE(0x303C, 0x004E, 0xA832);
+
+EXTERN_API_C( wide *)
+WideShift (wide * target,
+ long shift) THREEWORDINLINE(0x303C, 0x004F, 0xA832);
+
+EXTERN_API_C( unsigned long )
+WideSquareRoot (const wide * source) THREEWORDINLINE(0x303C, 0x0050, 0xA832);
+
+EXTERN_API_C( wide *)
+WideSubtract (wide * target,
+ const wide * source) THREEWORDINLINE(0x303C, 0x0051, 0xA832);
+
+EXTERN_API_C( wide *)
+WideMultiply (long multiplicand,
+ long multiplier,
+ wide * target) THREEWORDINLINE(0x303C, 0x0052, 0xA832);
+
+/* returns the quotient */
+EXTERN_API_C( long )
+WideDivide (const wide * dividend,
+ long divisor,
+ long * remainder) THREEWORDINLINE(0x303C, 0x0053, 0xA832);
+
+/* quotient replaces dividend */
+EXTERN_API_C( wide *)
+WideWideDivide (wide * dividend,
+ long divisor,
+ long * remainder) THREEWORDINLINE(0x303C, 0x0055, 0xA832);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_OS_MAC && TARGET_CPU_68K */
+
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( wide *)
+VectorMultiply (long count,
+ const long * vector1,
+ long step1,
+ const long * vector2,
+ long step2,
+ wide * dot) THREEWORDINLINE(0x303C, 0x0054, 0xA832);
+
+EXTERN_API_C( unsigned long )
+RandomBits (long count,
+ long focus) THREEWORDINLINE(0x303C, 0x0056, 0xA832);
+
+EXTERN_API_C( void )
+SetRandomSeed (const wide * seed) THREEWORDINLINE(0x303C, 0x0057, 0xA832);
+
+EXTERN_API_C( wide *)
+GetRandomSeed (wide * seed) THREEWORDINLINE(0x303C, 0x0058, 0xA832);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#define FixedRound(a) ((short)((Fixed)(a) + fixed1/2 >> 16))
+#define FixedSquareRoot(a) ((Fixed)FractSquareRoot(a) + 64 >> 7)
+#define FixedTruncate(a) ((short)((Fixed)(a) >> 16))
+#define FixedToFract(a) ((Fract)(a) << 14)
+#define FractToFixed(a) ((Fixed)(a) + 8192L >> 14)
+#define FixedToInt(a) ((short)((Fixed)(a) + fixed1/2 >> 16))
+#define IntToFixed(a) ((Fixed)(a) << 16)
+#define FixedToFloat(a) ((float)(a) / fixed1)
+#define FloatToFixed(a) ((Fixed)((float)(a) * fixed1))
+#define FractToFloat(a) ((float)(a) / fract1)
+#define FloatToFract(a) ((Fract)((float)(a) * fract1))
+#define ColorToFract(a) (((Fract) (a) << 14) + ((Fract)(a) + 2 >> 2))
+#define FractToColor(a) ((gxColorValue) ((a) - ((a) >> 16) + 8191 >> 14))
+#ifndef ff /* ff is already defined on some platforms */
+#define ff(a) IntToFixed(a)
+#define fl(a) FloatToFixed(a)
+#endif
+
+
+#if defined(__MWERKS__) && TARGET_CPU_68K
+ #pragma pop
+#endif
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __GXMATH__ */
+
diff --git a/include/qt/GXMessages.h b/include/qt/GXMessages.h
new file mode 100644
index 000000000..ebf71f24a
--- /dev/null
+++ b/include/qt/GXMessages.h
@@ -0,0 +1,261 @@
+/*
+ File: GXMessages.h
+
+ Contains: This file contains all of the public data structures,
+
+ Version: Technology: Quickdraw GX 1.1
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __GXMESSAGES__
+#define __GXMESSAGES__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if defined(__MWERKS__) && TARGET_CPU_68K
+ #pragma push
+ #pragma pointers_in_D0
+#endif
+
+
+/*
+
+ >>>>>> CONSTANTS <<<<<<
+
+*/
+/* Message Manager Trap */
+enum {
+ messageManagerTrap = 0xABFB
+};
+
+
+/* Message Manager Error Result Codes */
+enum {
+ messageStopLoopingErr = -5775,
+ cantDeleteRunningHandlerErr = -5776,
+ noMessageTableErr = -5777,
+ dupSignatureErr = -5778,
+ messageNotReceivedErr = -5799
+};
+
+
+/*
+ DATA TYPES
+*/
+typedef CALLBACK_API_C( OSErr , MessageHandlerOverrideProcPtr )(long arg1, long arg2, long arg3, long arg4, long arg5, long arg6);
+typedef STACK_UPP_TYPE(MessageHandlerOverrideProcPtr) MessageHandlerOverrideUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(MessageHandlerOverrideUPP)
+ NewMessageHandlerOverrideUPP (MessageHandlerOverrideProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeMessageHandlerOverrideUPP (MessageHandlerOverrideUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeMessageHandlerOverrideUPP (long arg1,
+ long arg2,
+ long arg3,
+ long arg4,
+ long arg5,
+ long arg6,
+ MessageHandlerOverrideUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppMessageHandlerOverrideProcInfo = 0x0003FFE1 }; /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewMessageHandlerOverrideUPP(userRoutine) (MessageHandlerOverrideUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMessageHandlerOverrideProcInfo, GetCurrentArchitecture())
+ #define DisposeMessageHandlerOverrideUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeMessageHandlerOverrideUPP(arg1, arg2, arg3, arg4, arg5, arg6, userUPP) (OSErr)CALL_SIX_PARAMETER_UPP((userUPP), uppMessageHandlerOverrideProcInfo, (arg1), (arg2), (arg3), (arg4), (arg5), (arg6))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewMessageHandlerOverrideProc(userRoutine) NewMessageHandlerOverrideUPP(userRoutine)
+#define CallMessageHandlerOverrideProc(userRoutine, arg1, arg2, arg3, arg4, arg5, arg6) InvokeMessageHandlerOverrideUPP(arg1, arg2, arg3, arg4, arg5, arg6, userRoutine)
+typedef CALLBACK_API_C( void , MessageGlobalsInitProcPtr )(void *messageGlobals);
+typedef STACK_UPP_TYPE(MessageGlobalsInitProcPtr) MessageGlobalsInitUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(MessageGlobalsInitUPP)
+ NewMessageGlobalsInitUPP (MessageGlobalsInitProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeMessageGlobalsInitUPP (MessageGlobalsInitUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeMessageGlobalsInitUPP (void * messageGlobals,
+ MessageGlobalsInitUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppMessageGlobalsInitProcInfo = 0x000000C1 }; /* no_return_value Func(4_bytes) */
+ #define NewMessageGlobalsInitUPP(userRoutine) (MessageGlobalsInitUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMessageGlobalsInitProcInfo, GetCurrentArchitecture())
+ #define DisposeMessageGlobalsInitUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeMessageGlobalsInitUPP(messageGlobals, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppMessageGlobalsInitProcInfo, (messageGlobals))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewMessageGlobalsInitProc(userRoutine) NewMessageGlobalsInitUPP(userRoutine)
+#define CallMessageGlobalsInitProc(userRoutine, messageGlobals) InvokeMessageGlobalsInitUPP(messageGlobals, userRoutine)
+#if OLDROUTINENAMES
+typedef MessageHandlerOverrideProcPtr MessageHandlerOverrideProc;
+typedef MessageGlobalsInitProcPtr MessageGlobalsInitProc;
+#endif /* OLDROUTINENAMES */
+
+typedef struct OpaqueMessageHandler* MessageHandler;
+typedef struct OpaqueMessageObject* MessageObject;
+/*
+
+ PUBLIC INTERFACES
+
+ Message Handler API Routines
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( long )
+CountMessageHandlerInstances (void) TWOWORDINLINE(0x7028, 0xABFB);
+
+EXTERN_API_C( void *)
+GetMessageHandlerClassContext (void) TWOWORDINLINE(0x7029, 0xABFB);
+
+EXTERN_API_C( void *)
+SetMessageHandlerClassContext (void * anyValue) TWOWORDINLINE(0x702A, 0xABFB);
+
+EXTERN_API_C( void *)
+GetMessageHandlerInstanceContext (void) TWOWORDINLINE(0x702B, 0xABFB);
+
+EXTERN_API_C( void *)
+SetMessageHandlerInstanceContext (void * anyValue) TWOWORDINLINE(0x702C, 0xABFB);
+
+EXTERN_API_C( OSErr )
+NewMessageGlobals (long messageGlobalsSize,
+ MessageGlobalsInitUPP initProc) TWOWORDINLINE(0x702D, 0xABFB);
+
+EXTERN_API_C( void )
+DisposeMessageGlobals (void) TWOWORDINLINE(0x702E, 0xABFB);
+
+
+/*
+ Message Sending API Routines
+*/
+#ifndef BUILDING_GXMESSAGES
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSErr )
+SendObjectMessage (MessageObject msgObject,
+ long messageSelector,
+ ...) FIVEWORDINLINE(0x205F, 0x221F, 0x702F, 0xABFB, 0x518F);
+
+EXTERN_API_C( OSErr )
+SendObjectMessageTo (MessageObject msgObject,
+ long messageSelector,
+ MessageHandler msgHandler,
+ ...) SEVENWORDINLINE(0x205F, 0x221F, 0x241F, 0x7030, 0xABFB, 0x9EFC, 0x000C);
+
+EXTERN_API_C( OSErr )
+SendObjectMessageFor (MessageObject msgObject,
+ long messageSelector,
+ MessageHandler msgHandler,
+ ...) SEVENWORDINLINE(0x205F, 0x221F, 0x241F, 0x7037, 0xABFB, 0x9EFC, 0x000C);
+
+EXTERN_API_C( OSErr )
+StartObjectMessageAt (MessageObject msgObject,
+ long messageSelector,
+ MessageHandler msgHandler,
+ ...) SEVENWORDINLINE(0x205F, 0x221F, 0x241F, 0x7031, 0xABFB, 0x9EFC, 0x000C);
+
+#if TARGET_OS_MAC
+ #define MacSendMessage SendMessage
+#endif
+EXTERN_API_C( OSErr )
+MacSendMessage (long messageSelector,
+ ...) FOURWORDINLINE(0x221F, 0x7032, 0xABFB, 0x598F);
+
+EXTERN_API_C( OSErr )
+SendMessageTo (long messageSelector,
+ MessageHandler msgHandler,
+ ...) FIVEWORDINLINE(0x221F, 0x241F, 0x7033, 0xABFB, 0x518F);
+
+EXTERN_API_C( OSErr )
+StartMessageAt (long messageSelector,
+ MessageHandler msgHandler,
+ ...) FIVEWORDINLINE(0x221F, 0x241F, 0x7034, 0xABFB, 0x518F);
+
+EXTERN_API_C( OSErr )
+ForwardMessage (long messageSelector,
+ ...) FOURWORDINLINE(0x221F, 0x7035, 0xABFB, 0x598F);
+
+EXTERN_API_C( OSErr )
+ForwardThisMessage (void * parameter1,
+ ...) TWOWORDINLINE(0x7036, 0xABFB);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* BUILDING_GXMESSAGES */
+
+
+#if defined(__MWERKS__) && TARGET_CPU_68K
+ #pragma pop
+#endif
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __GXMESSAGES__ */
+
diff --git a/include/qt/GXPrinterDrivers.h b/include/qt/GXPrinterDrivers.h
new file mode 100644
index 000000000..e83b4f2b3
--- /dev/null
+++ b/include/qt/GXPrinterDrivers.h
@@ -0,0 +1,1098 @@
+/*
+ File: GXPrinterDrivers.h
+
+ Contains: This file defines data types and API functions for printer driver development.
+
+ Version: Technology: Quickdraw GX 1.1
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __GXPRINTERDRIVERS__
+#define __GXPRINTERDRIVERS__
+
+#ifndef __SCALERSTREAMTYPES__
+#include "ScalerStreamTypes.h"
+#endif
+
+#ifndef __GXMESSAGES__
+#include "GXMessages.h"
+#endif
+
+#ifndef __PRINTING__
+#include "Printing.h"
+#endif
+
+#ifndef __GXPRINTING__
+#include "GXPrinting.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* ------------------------------------------------------------------------------
+
+ Desktop Printer Constants and Types
+
+-------------------------------------------------------------------------------- */
+/* Manual feed alert preferences structure for gxManualFeedAlertPrefsType desktop printer resource */
+
+struct gxManualFeedAlertPrefs {
+ long alertFlags; /* Flags--first word is for driver's private use, the rest is predefined. */
+};
+typedef struct gxManualFeedAlertPrefs gxManualFeedAlertPrefs;
+typedef gxManualFeedAlertPrefs * gxManualFeedAlertPrefsPtr;
+typedef gxManualFeedAlertPrefsPtr * gxManualFeedAlertPrefsHdl;
+/* Constants for the alertFlags field of gxManualFeedAlertPrefs.*/
+enum {
+ gxShowAlerts = 0x00000001, /* Show alerts for this desktop printer. */
+ gxAlertOnPaperChange = 0x00000002 /* ...only if the papertype changes. */
+};
+
+enum {
+ gxDefaultMFeedAlertSettings = (gxShowAlerts | gxAlertOnPaperChange)
+};
+
+
+/* Driver output settings structure for desktop printer gxDriverOutputType resource */
+
+struct gxDriverOutputSettings {
+ long driverflags; /* Flags -- for use by driver. */
+ long outputSettings; /* Flags -- predefined. */
+};
+typedef struct gxDriverOutputSettings gxDriverOutputSettings;
+typedef gxDriverOutputSettings * gxDriverOutputSettingsPtr;
+typedef gxDriverOutputSettingsPtr * gxDriverOutputSettingsHdl;
+/* Constants for the outputSettings field of gxDriverOutputSettings. */
+enum {
+ gxCanConfigureTrays = 0x00000001 /* Desktop printer represents a device with a paper feed. */
+};
+
+/* ------------------------------------------------------------------------------
+
+ Printing Driver Constants and Types
+
+-------------------------------------------------------------------------------- */
+enum {
+ gxInputTraysMenuItem = -1 /* Menu item number for "Input Trays..." */
+};
+
+
+/* Buffering and IO preferences-- this structure mirrors the 'iobm' resource */
+
+struct gxIOPrefsRec {
+ unsigned long communicationsOptions; /* Standard or nonstandard I/O? */
+ unsigned long numBuffers; /* Requested number of buffers for QDGX to create */
+ unsigned long bufferSize; /* The size of each buffer */
+ unsigned long numReqBlocks; /* The number of async I/O request blocks which will be needed */
+ unsigned long openCloseTimeout; /* The open/close timeout (in ticks) */
+ unsigned long readWriteTimeout; /* The read/write timeout (in ticks) */
+};
+typedef struct gxIOPrefsRec gxIOPrefsRec;
+
+typedef gxIOPrefsRec * gxIOPrefsPtr;
+typedef gxIOPrefsPtr * gxIOPrefsHdl;
+/* Constants for the communicationsOptions field of IOPrefsRec. */
+enum {
+ gxUseCustomIO = 0x00000001 /* Driver uses a non-standard IO mechanism */
+};
+
+
+/* Information about writing to a file */
+
+struct gxPrintDestinationRec {
+ Boolean printToFile; /* True if output is to go to a file */
+ char padByte;
+ FSSpec fSpec; /* If going to a file, the FSSpec for the file */
+ char includeFonts; /* True if fonts are to be included */
+ char pad2;
+ Str31 fileFormat; /* Format to write file */
+};
+typedef struct gxPrintDestinationRec gxPrintDestinationRec;
+
+typedef gxPrintDestinationRec * gxPrintDestinationPtr;
+typedef gxPrintDestinationPtr * gxPrintDestinationHdl;
+/* This structure is the content of each cell in the standard PACK LDEF */
+
+struct gxPortListRec {
+ char firstMarker; /* Markers to indicate icon or non-icon version */
+ char secondMarker; /* if these are * and *, then the cell is an icon cell. */
+ /* Otherwise, it is assumed to be a standard text LDEF */
+ /* cell */
+
+ Handle iconSuiteHandle; /* The icon suite to draw for this cell */
+ Handle outputDriverName; /* Handle to the output driver name (for serial) */
+ Handle inputDriverName; /* Handle to the input driver name (for serial) */
+ Str255 iconName; /* Name to draw under the icon */
+};
+typedef struct gxPortListRec gxPortListRec;
+
+typedef gxPortListRec * gxPortListPtr;
+/* ------------------------------------------------------------------------------
+
+ Printing Driver Constants for resources in the desktop printer
+
+-------------------------------------------------------------------------------- */
+enum {
+ gxDeviceCommunicationsID = 0
+};
+
+
+/* ----------------------------------o 'prod' o---------------------------------- */
+/*
+ For PostScript devices, the device and version names of the device.
+ (0) product name is of type PString
+ (1) version is of type PString
+ (2) revision is of type PString
+ (3) vm available is of type long
+ (4) font stream type is of type scalerStreamTypeFlag
+ (5) language level is of type long
+*/
+
+enum {
+ gxPostscriptProductInfoType = FOUR_CHAR_CODE('prod'),
+ gxPostscriptProductNameID = 0,
+ gxPostscriptVersionID = 1,
+ gxPostscriptRevisionID = 2,
+ gxPostscriptVMAvailableID = 3,
+ gxPostscriptFontStreamTypeID = 4,
+ gxPostscriptLanguageLevelID = 5
+};
+
+
+/* PPD support definitions*/
+enum {
+ gxPPDInformationTag = FOUR_CHAR_CODE('ppda'), /* tag used for job collection*/
+ gxPPDInformationTagID = gxPrintingTagID /* ID for job collection tag*/
+};
+
+enum {
+ gxPPDInformationType = gxPPDInformationTag, /* rsource type as stored in desktop printer*/
+ gxPPDInformationResID = gxPrintingDriverBaseID /* ID of rsource stored in desktop printer*/
+};
+
+
+struct gxPPDFileInfoRec {
+ unsigned long dataOffset; /* byte offset to beginning of ppd data*/
+ unsigned long dataLength; /* length of ppd data*/
+ unsigned long reserved; /* reserved*/
+ unsigned long aliasRecordSize; /* size of alias record below*/
+ unsigned char ppdAlias[1]; /* the actual alias record data*/
+};
+typedef struct gxPPDFileInfoRec gxPPDFileInfoRec;
+
+typedef gxPPDFileInfoRec * gxPPDFileInfoPtr;
+typedef gxPPDFileInfoPtr * gxPPDFileInfoHdl;
+/* ------------------------------------------------------------------------------
+
+ Printing Driver Constants for status alerts
+
+-------------------------------------------------------------------------------- */
+
+/* Structure passed in statusBuffer of StatusRecord for manual feed alert */
+
+struct gxManualFeedRecord {
+ Boolean canAutoFeed; /* True if driver can switch to auto feed */
+ char pad1;
+ Str31 paperTypeName; /* Name of paperType to feed manually */
+};
+typedef struct gxManualFeedRecord gxManualFeedRecord;
+
+/* Structure passed in statusBuffer of StatusRecord for out of paper alert */
+
+struct gxOutOfPaperRecord {
+ Str31 paperTypeName; /* Name of printing document */
+};
+typedef struct gxOutOfPaperRecord gxOutOfPaperRecord;
+
+/* The DITL id for the auto feed button in the manual feed alert */
+enum {
+ gxAutoFeedButtonId = 3
+};
+
+
+/* Status resource id for the alerts */
+enum {
+ gxUnivAlertStatusResourceId = -28508
+};
+
+
+/* Status resource indices for alerts */
+enum {
+ gxUnivSetTrayIndex = 0,
+ gxUnivManualFeedIndex = 2,
+ gxUnivFailToPrintIndex = 3,
+ gxUnivPaperJamIndex = 4,
+ gxUnivOutOfPaperIndex = 5,
+ gxUnivNoPaperTrayIndex = 6,
+ gxUnivPrinterReadyIndex = 7,
+ gxUnivAlertBeforeIndex = 9,
+ gxUnivAlertAfterIndex = 10
+};
+
+
+/* Allocation sizes for status buffers needed for automatic alerts */
+enum {
+ gxDefaultStatusBufferSize = 10,
+ gxManualFeedStatusBufferSize = 34,
+ gxOutOfPaperStatusBufferSize = 42
+};
+
+
+/* ------------------------------------------------------------------------------
+
+ Old Application Support
+
+-------------------------------------------------------------------------------- */
+/* The format of a 'cust' resource */
+
+struct gxCustomizationRec {
+ short horizontalResolution; /* Horizontal res (integral part) */
+ short verticalResolution; /* Vertical res (integral part) */
+ short upDriverType; /* "upDriver" emulation type */
+ Point patternStretch; /* Pattern stretch factor */
+ short translatorSettings; /* Translator settings to use */
+};
+typedef struct gxCustomizationRec gxCustomizationRec;
+
+typedef gxCustomizationRec * gxCustomizationPtr;
+typedef gxCustomizationPtr * gxCustomizationHdl;
+/* The format of a 'resl' resource */
+
+struct gxResolutionRec {
+ short rangeType; /* Always 1 */
+ short xMinimumResolution; /* Min X resolution available */
+ short xMaximumResolution; /* Max X resolution available */
+ short yMinimumResolution; /* Min Y resolution available */
+ short yMaximumResolution; /* Max Y resolution available */
+ short resolutionCount; /* Number of resolutions */
+ Point resolutions[1]; /* Array of resolutions */
+};
+typedef struct gxResolutionRec gxResolutionRec;
+
+typedef gxResolutionRec * gxResolutionPtr;
+typedef gxResolutionPtr * gxResolutionHdl;
+/*
+
+ Constants for the "universal" print record.
+
+*/
+/* Constant for version number in universal print record */
+enum {
+ gxPrintRecordVersion = 8
+};
+
+/* Constants for feed field in universal print record */
+enum {
+ gxAutoFeed = 0,
+ gxManualFeed = 1
+};
+
+/* Constants for options field in universal print record */
+enum {
+ gxPreciseBitmap = 0x0001, /* Tall adjusted (IW), precise bitmap (LW, SC) */
+ gxBiggerPages = 0x0002, /* No gaps (IW), larger print area (LW) */
+ gxGraphicSmoothing = 0x0004, /* Graphic smoothing (LW) */
+ gxTextSmoothing = 0x0008, /* Text smoothing (SC) */
+ gxFontSubstitution = 0x0010, /* Font substitution */
+ gxInvertPage = 0x0020, /* B/W invert image */
+ gxFlipPageHoriz = 0x0040, /* Flip horizontal */
+ gxFlipPageVert = 0x0080, /* Flip vertical */
+ gxColorMode = 0x0100, /* Color printing */
+ gxBidirectional = 0x0200, /* Bidirectional printing */
+ gxUserFlag0 = 0x0400, /* User flag 0 */
+ gxUserFlag1 = 0x0800, /* User flag 1 */
+ gxUserFlag2 = 0x1000, /* User flag 2 */
+ gxReservedFlag0 = 0x2000, /* Reserved flag 0 */
+ gxReservedFlag1 = 0x4000, /* Reserved flag 1 */
+ gxReservedFlag2 = 0x8000 /* Reserved flag 2 */
+};
+
+/* Constants for orientation field in universal print record */
+enum {
+ gxPortraitOrientation = 0,
+ gxLandscapeOrientation = 1,
+ gxAltPortraitOrientation = 2,
+ gxAltLandscapeOrientation = 3
+};
+
+/* Constants for qualityMode field in universal print record */
+enum {
+ gxBestQuality = 0,
+ gxFasterQuality = 1,
+ gxDraftQuality = 2
+};
+
+/* Constants for firstTray and remainingTray fields in universal print record */
+enum {
+ gxFirstTray = 0,
+ gxSecondTray = 1,
+ gxThirdTray = 2
+};
+
+/* Constants for coverPage field in universal print record */
+enum {
+ gxNoCoverPage = 0,
+ gxFirstPageCover = 1,
+ gxLastPageCover = 2
+};
+
+/* Constants for headMotion field in universal print record */
+enum {
+ gxUnidirectionalMotion = 0,
+ gxBidirectionalMotion = 1
+};
+
+/* Constants for saveFile field in universal print record */
+enum {
+ gxNoFile = 0,
+ gxPostScriptFile = 1
+};
+
+
+/* The format of the "universal" print record */
+
+struct gxUniversalPrintRecord {
+ short printRecordVersion; /* Print record version */
+ /* prInfo subrecord */
+ short appDev; /* Device kind, always 0 */
+ short appVRes; /* Application vertical resolution */
+ short appHRes; /* Application horizontal resolution */
+ Rect appPage; /* Page size, in application resolution */
+ Rect appPaper; /* Paper rectangle [offset from rPage] */
+ /* prStl subrecord */
+ short devType; /* Device type, always 0xA900 (was wDev) */
+ short pageV; /* Page height in 120ths of an inch */
+ short pageH; /* Page width in 120ths of an inch */
+ char fillByte; /* Page calculation mode */
+ char feed; /* Feed mode */
+ /* prInfoPT subrecord */
+ short devKind; /* Device kind, always 0 */
+ short devVRes; /* Device vertical resolution */
+ short devHRes; /* Device horizontal resolution */
+ Rect devPage; /* Device page size */
+ /* prXInfo subrecord */
+ short actualCopies; /* Actual number of copies for this job */
+ short options; /* Options for this device */
+ short reduction; /* Reduce/enlarge factor */
+ char orientation; /* Orientation of paper ( 0=portrait, 1=landscape ) */
+ /* Clusters and PopUps */
+ char qualityMode; /* Quality mode */
+ char coverPage; /* Cover page */
+ char firstTray; /* First feed tray */
+ char remainingTray; /* Remaining feed tray */
+ char headMotion; /* Head motion */
+ char saveFile; /* Save file */
+ char userCluster1; /* Three clusters left over */
+ char userCluster2;
+ char userCluster3;
+ /* prJob subrecord */
+ short firstPage; /* First page */
+ short lastPage; /* Last page */
+ short copies; /* Number of copies, always 1 */
+ char reserved1; /* Always true, unused */
+ char reserved2; /* Always true, unused */
+ PrIdleUPP pIdleProc; /* Idle proc */
+ Ptr pFileName; /* Spool file name pointer */
+ short fileVol; /* Spool file vRefNum */
+ char fileVers; /* File version, must be 0 */
+ char reserved3; /* Always 0 */
+ short printX[19]; /* Internal use */
+};
+typedef struct gxUniversalPrintRecord gxUniversalPrintRecord;
+typedef gxUniversalPrintRecord * gxUniversalPrintRecordPtr;
+typedef gxUniversalPrintRecordPtr * gxUniversalPrintRecordHdl;
+
+/* ------------------------------------------------------------------------------
+
+ Compatibility Printing Messages
+
+-------------------------------------------------------------------------------- */
+#define Forward_GXPrOpenDoc(hPrint, pPort) \
+ ForwardThisMessage((void *) (hPrint), (void *) (pPort))
+
+#define Forward_GXPrCloseDoc(pPort) \
+ ForwardThisMessage((void *) (pPort))
+
+#define Forward_GXPrOpenPage(pPort, pRect, resolution) \
+ ForwardThisMessage((void *) (pPort), (void *) (pRect), (void *) (resolution))
+
+#define Forward_GXPrClosePage(pPort) \
+ ForwardThisMessage((void *) (pPort))
+
+#define Forward_GXPrintDefault(hPrint) \
+ ForwardThisMessage((void *) (hPrint))
+
+#define Forward_GXPrStlDialog(hPrint, confirmed) \
+ ForwardThisMessage((void *) (hPrint), (void *) (confirmed))
+
+#define Forward_GXPrJobDialog(hPrint, confirmed) \
+ ForwardThisMessage((void *) (hPrint), (void *) (confirmed))
+
+#define Forward_GXPrStlInit(hPrint, pDlg) \
+ ForwardThisMessage((void *) (hPrint), (void *) (pDlg))
+
+#define Forward_GXPrJobInit(hPrint, pDlg) \
+ ForwardThisMessage((void *) (hPrint), (void *) (pDlg))
+
+#define Forward_GXPrDlgMain(hPrint, initProc, confirmed) \
+ ForwardThisMessage((void *) (hPrint), (void *) (initProc), (void *) (confirmed))
+
+#define Forward_GXPrValidate(hPrint, changedPrintRecord) \
+ ForwardThisMessage((void *) (hPrint), (void *) (changedPrintRecord))
+
+#define Forward_GXPrJobMerge(srcPrint, destPrint) \
+ ForwardThisMessage((void *) (srcPrint), (void *) (destPrint))
+
+#define Forward_GXPrGeneral(dataPtr) \
+ ForwardThisMessage((void *) (dataPtr))
+
+#define Forward_GXConvertPrintRecordTo(hPrint) \
+ ForwardThisMessage((void *) (hPrint))
+
+#define Forward_GXConvertPrintRecordFrom(hPrint) \
+ ForwardThisMessage((void *) (hPrint))
+
+#define Forward_GXPrintRecordToJob(hPrint, aJob) \
+ ForwardThisMessage((void *) (hPrint), (void *) (aJob))
+
+/* ------------------------------------------------------------------------------
+
+ Raster Driver Contants and Types
+
+-------------------------------------------------------------------------------- */
+
+typedef long gxRasterPlaneOptions;
+/* Input structure for setting up the offscreen */
+
+struct gxPlaneSetupRec {
+ gxRasterPlaneOptions planeOptions; /* Options for the offscreen package */
+ gxHalftone planeHalftone; /* OPTIONAL: halftone structure for this plane */
+ gxColorSpace planeSpace; /* OPTIONAL: noSpace will get the graphics default */
+ gxColorSet planeSet; /* OPTIONAL: NIL gets the default */
+ gxColorProfile planeProfile; /* OPTIONAL: NIL gets no matching */
+};
+typedef struct gxPlaneSetupRec gxPlaneSetupRec;
+/* Constants for planeOptions field in gxPlaneSetupRec */
+enum {
+ gxDefaultOffscreen = 0x00000000, /* Default value - bits are allocated for the client, halftoning takes place */
+ gxDontSetHalftone = 0x00000001, /* Don't call SetViewPortHalftone */
+ gxDotTypeIsDitherLevel = 0x00000002 /* Call SetViewPortDither using the dotType as the level */
+};
+
+
+
+struct gxOffscreenSetupRec {
+ short width; /* Width in pixels */
+ short minHeight; /* Minimum height in pixels - actual height returned here */
+ short maxHeight; /* Maximum height in pixels */
+ Fixed ramPercentage; /* Maximum percentage of RAM to take */
+ long ramSlop; /* Amount of RAM to be sure to leave */
+ short depth; /* Depths in bits of each plane */
+ gxMapping vpMapping; /* Mapping to assign to offscreen viewPorts */
+ gxMapping vdMapping; /* Mapping to assign to offscreen viewDevices */
+ short planes; /* Number of planes to allocate of depth bits each (can be more than 4) */
+ gxPlaneSetupRec planeSetup[4]; /* Parameters for each plane, 4 is provided because it is most handy for writers of devices */
+};
+typedef struct gxOffscreenSetupRec gxOffscreenSetupRec;
+
+/* The format of one plane in the offscreen planar area */
+
+struct gxOffscreenPlaneRec {
+ gxViewPort theViewPort; /* viewPort for the offscreen */
+ gxViewDevice theDevice; /* viewDevice for the offscreen */
+ gxViewGroup theViewGroup; /* The viewGroup that they share */
+ gxShape theBitmap; /* The offscreen bitmap shape */
+ gxBitmap theBits; /* The bits of the offscreen */
+};
+typedef struct gxOffscreenPlaneRec gxOffscreenPlaneRec;
+
+/* The format of an entire offscreen area */
+
+struct gxOffscreenRec {
+ short numberOfPlanes; /* Number of planes we have */
+ Handle offscreenStorage; /* Handle containing the bitmaps image data */
+ gxOffscreenPlaneRec thePlanes[1]; /* Planes to draw in */
+};
+typedef struct gxOffscreenRec gxOffscreenRec;
+
+typedef gxOffscreenRec * gxOffscreenPtr;
+typedef gxOffscreenPtr * gxOffscreenHdl;
+typedef long gxRasterRenderOptions;
+/* Structure that mirrors 'rdip' resource. */
+
+struct gxRasterPrefsRec {
+ gxRasterRenderOptions renderOptions; /* Options for the raster imaging system */
+ Fixed hImageRes; /* Horizontal resolution to image at */
+ Fixed vImageRes; /* Vertical resolution to image at */
+ short minBandSize; /* Minimum band size to use (in pixels) */
+ short maxBandSize; /* Maximum band size to use (in pixels), 0 == entire page */
+ Fixed ramPercentage; /* Maximum percentage of RAM to take */
+ long ramSlop; /* Amount of RAM to be sure to leave */
+ short depth; /* Depth in pixels (PER PLANE!) */
+ short numPlanes; /* Number of planes to render */
+ gxPlaneSetupRec planeSetup[1]; /* One for each plane */
+};
+typedef struct gxRasterPrefsRec gxRasterPrefsRec;
+/* Constants for renderOptions field in gxRasterPrefsRec. */
+enum {
+ gxDefaultRaster = 0x00000000, /* Default raster options */
+ gxDontResolveTransferModes = 0x00000001, /* 0=Resolve, 1=Don't Resolve */
+ gxRenderInReverse = 0x00000002, /* Traverse image in reverse order */
+ gxOnePlaneAtATime = 0x00000004, /* Render each plane separately */
+ gxSendAllBands = 0x00000008 /* Send even empty bands */
+};
+
+
+typedef gxRasterPrefsRec * gxRasterPrefsPtr;
+typedef gxRasterPrefsPtr * gxRasterPrefsHdl;
+typedef long gxRasterPackageOptions;
+/* Structure that mirrors 'rpck' resource. */
+
+struct gxRasterPackageRec {
+ Ptr bufferSize; /* Buffer size for packaging (>= maximum head pass size) */
+ short colorPasses; /* 1 (b/w) or 4 (CMYK) is typical */
+ short headHeight; /* Printhead height in pixels */
+ short numberPasses; /* Number of head passes it takes to == iHeadHeight */
+ short passOffset; /* Offset between passes, in pixels */
+ gxRasterPackageOptions packageOptions; /* Packaging options */
+};
+typedef struct gxRasterPackageRec gxRasterPackageRec;
+
+typedef gxRasterPackageRec * gxRasterPackagePtr;
+typedef gxRasterPackagePtr * gxRasterPackageHdl;
+/* Constants for packageOptions field in gxRasterPackageRec. */
+enum {
+ gxSendAllColors = 0x00000001, /* Send even clean bands through */
+ gxInterlaceColor = 0x00000002, /* Ribbon contamination is a concern */
+ gxOverlayColor = 0x00000004, /* Color printer without a ribbon problem */
+ gxUseColor = (gxInterlaceColor | gxOverlayColor) /* This is a color printer */
+};
+
+
+/* Structure for RasterPackageBitmap message */
+
+struct gxRasterPackageBitmapRec {
+ gxBitmap * bitmapToPackage; /* Bitmap containing the data to package */
+ unsigned short startRaster; /* Raster to begin the packaging from */
+ unsigned short colorBand; /* For which color pass this is a packaging request */
+ Boolean isBandDirty; /* Whether there are any dirty bits in this band */
+ char padByte;
+ Rect dirtyRect; /* Which bits are dirty */
+};
+typedef struct gxRasterPackageBitmapRec gxRasterPackageBitmapRec;
+
+/* Structure of number record in gxRasterPackageControlsRec */
+
+struct gxStandardNumberRec {
+ short numberType; /* Type of numberic output desired */
+ short minWidth; /* Minimum output width of the number */
+ char padChar; /* Pad character for numbers shorter than the minWidth */
+ char padChar2;
+ Str31 startString; /* Prefix string */
+ Str31 endString; /* Postfix string */
+};
+typedef struct gxStandardNumberRec gxStandardNumberRec;
+
+typedef gxStandardNumberRec * gxStandardNumberPtr;
+/* Structure that mirrors 'ropt' resource */
+
+struct gxRasterPackageControlsRec {
+ short startPageStringID; /* 'wstr' to send to the device at start of page */
+ short formFeedStringID; /* 'wstr' to send to the device to cause a form feed */
+ short forwardMax; /* Line feed strings */
+ gxStandardNumberRec forwardLineFeed; /* Number record for forward line feed */
+ short reverseMax; /* Max number of reverse line feeds device can do */
+ gxStandardNumberRec reverseLineFeed; /* Number record for forward line feed */
+};
+typedef struct gxRasterPackageControlsRec gxRasterPackageControlsRec;
+
+typedef gxRasterPackageControlsRec * gxRasterPackageControlsPtr;
+typedef gxRasterPackageControlsPtr * gxRasterPackageControlsHdl;
+/* Raster imaging system imageData structure */
+
+struct gxRasterImageDataRec {
+ gxRasterRenderOptions renderOptions; /* Options for the raster imaging system */
+ Fixed hImageRes; /* horizontal resolution to image at */
+ Fixed vImageRes; /* vertical resolution to image at */
+ short minBandSize; /* smallest band that makes sense for this device */
+ short maxBandSize; /* biggest band that makes sense, or 0 for "full page" */
+ gxRectangle pageSize; /* size of page for device */
+
+ /* Values used within the RasterDataIn message */
+
+ short currentYPos; /* Current position moving down the page */
+ gxRasterPackageRec packagingInfo; /* Raster packaging record */
+
+ /* Values used within the remaining messages */
+
+ Boolean optionsValid; /* Were options specified by the driver? */
+ char padByte;
+ gxRasterPackageControlsRec packageControls; /* Options for the packaging messages */
+ gxOffscreenSetupRec theSetup; /* setup for the offscreen code, variable length componant */
+};
+typedef struct gxRasterImageDataRec gxRasterImageDataRec;
+
+typedef gxRasterImageDataRec * gxRasterImageDataPtr;
+typedef gxRasterImageDataPtr * gxRasterImageDataHdl;
+/* ------------------------------------------------------------------------------
+
+ Raster Driver Imaging Messages
+
+-------------------------------------------------------------------------------- */
+#define Send_GXRasterDataIn(offScreen, bandRectangle, dirtyRectangle) \
+ MacSendMessage(0x00010000, offScreen, bandRectangle, dirtyRectangle)
+
+#define Forward_GXRasterDataIn(offScreen, bandRectangle, dirtyRectangle) \
+ ForwardThisMessage((void *) (offScreen), (void *) (bandRectangle), (void *) (dirtyRectangle))
+
+#define Send_GXRasterLineFeed(lineFeedSize, buffer, bufferPos, imageDataHdl) \
+ MacSendMessage(0x00010001, lineFeedSize, buffer, bufferPos, imageDataHdl)
+
+#define Forward_GXRasterLineFeed(lineFeedSize, buffer, bufferPos, imageDataHdl) \
+ ForwardThisMessage((void *) (lineFeedSize), (void *) (buffer), (void *) (bufferPos), (void *) (imageDataHdl))
+
+#define Send_GXRasterPackageBitmap(whatToPackage, buffer, bufferPos, imageDataHdl) \
+ MacSendMessage(0x00010002, whatToPackage, buffer, bufferPos, imageDataHdl)
+
+#define Forward_GXRasterPackageBitmap(whatToPackage, buffer, bufferPos, imageDataHdl) \
+ ForwardThisMessage((void *) (whatToPackage), (void *) (buffer), (void *) (bufferPos), (void *) (imageDataHdl))
+
+/* ------------------------------------------------------------------------------
+
+ Vector Driver Contants and Types
+
+-------------------------------------------------------------------------------- */
+/* Vector device halftone component record */
+
+struct gxVHalftoneCompRec {
+ Fixed angle; /* Angle to halftone at. Must be 0, 90, 45 or 135 */
+ long penIndex; /* index of the pen to draw this component with */
+};
+typedef struct gxVHalftoneCompRec gxVHalftoneCompRec;
+
+/* Vector device halftone record */
+
+struct gxVHalftoneRec {
+ gxColorSpace halftoneSpace;
+ gxVHalftoneCompRec halftoneComps[4]; /* Info for each color component */
+ long penIndexForBW; /* Pen index to draw one bit deep or black and white bitmap with */
+};
+typedef struct gxVHalftoneRec gxVHalftoneRec;
+
+/* Vector shape rendering information */
+
+typedef long gxVectorShapeOptions;
+
+struct gxVectorShapeDataRec {
+ gxVectorShapeOptions shapeOptions; /* Options to control shape handling */
+ long maxPolyPoints; /* Maximum number of polygon points that device can support */
+ Fixed shapeError; /* Defines allowed deviation from the original shape */
+ Fixed textSize; /* Text above this size is filled; text below this size is outlined */
+ Fixed frameSize; /* Frame's smaller than this -> shape stroked; frame's larger -> shape is filled */
+};
+typedef struct gxVectorShapeDataRec gxVectorShapeDataRec;
+
+/* Constants for shapeOptions field in gxVectorShapeDataRec. */
+enum {
+ gxUnidirectionalFill = 0x00000001, /* Generate scanlines in one direction only. Useful for transparencies */
+ gxAlsoOutlineFilledShape = 0x00000002 /* Turn on this bit to also outline solid filled shapes */
+};
+
+
+/* Vector device rendering information */
+
+typedef long gxVectorRenderOptions;
+/* Vector imaging system imageData structure */
+
+struct gxVectorImageDataRec {
+ gxVectorRenderOptions renderOptions; /* Options to control rendering: color sort, clipping, etc. */
+ Fixed devRes; /* Device resolution */
+ gxTransform devTransform; /* Mapping, clip and halftoning information for colored bitmaps */
+ gxColorSet clrSet; /* Entire set of colors; usually indexed color space for pen plotters */
+ gxColor bgColor; /* The background color in the color space specified by the clrSpace field */
+ gxVHalftoneRec halftoneInfo; /* Defines halftone information for color bitmaps */
+ gxPenTableHdl hPenTable; /* Complete list of pens along with their pen positions and thickness */
+ gxRectangle pageRect; /* Page dimensions */
+ gxVectorShapeDataRec shapeData; /* Information on how to render a shape */
+};
+typedef struct gxVectorImageDataRec gxVectorImageDataRec;
+
+typedef gxVectorImageDataRec * gxVectorImageDataPtr;
+typedef gxVectorImageDataPtr * gxVectorImageDataHdl;
+/* Constants for renderOptions field in gxVectorImageDataRec. */
+enum {
+ gxColorSort = 0x00000001, /* Set for pen plotters */
+ gxATransferMode = 0x00000002, /* Set if transfer modes need to be resolved */
+ gxNoOverlap = 0x00000004, /* Set if non-overlapping output is desired*/
+ gxAColorBitmap = 0x00000008, /* Set if color bitmap output is desired */
+ gxSortbyPenPos = 0x00000010, /* Set if shapes are to be drawn in the order of the pen index */
+ /* in the pen table. NOTE: this is not the pen position in the carousel */
+ gxPenLessPlotter = 0x00000020, /* Indicates raster printer/plotter */
+ gxCutterPlotter = 0x00000040, /* Indicates cutter */
+ gxNoBackGround = 0x00000080 /* Set if shapes that map to the background color should not be sent to driver */
+};
+
+
+/* ------------------------------------------------------------------------------
+
+ Vector Driver Imaging Messages
+
+-------------------------------------------------------------------------------- */
+#define Send_GXVectorPackageShape(theShape, penIndex) \
+ MacSendMessage(0x00010000, theShape, penIndex)
+
+#define Forward_GXVectorPackageShape(theShape, penIndex) \
+ ForwardThisMessage((void *) (theShape), (void *) (penIndex))
+
+#define Send_GXVectorLoadPens(penTable, shapeCounts, penTableChanged) \
+ MacSendMessage(0x00010001, penTable, shapeCounts, penTableChanged)
+
+#define Forward_GXVectorLoadPens(penTable, shapeCounts, penTableChanged) \
+ ForwardThisMessage((void *) (penTable), (void *) (shapeCounts), (void *) (penTableChanged))
+
+#define Send_GXVectorVectorizeShape(theShape, penIndex, vectorData) \
+ MacSendMessage(0x00010002, theShape, penIndex, vectorData)
+
+#define Forward_GXVectorVectorizeShape(theShape, penIndex, vectorData) \
+ ForwardThisMessage((void *) (theShape), (void *) (penIndex), (void *) (vectorData))
+
+/* ------------------------------------------------------------------------------
+
+ PostScript Driver Contants and Types
+
+-------------------------------------------------------------------------------- */
+enum {
+ gxPostSynonym = FOUR_CHAR_CODE('post')
+};
+
+/* PostScript glyphs record */
+
+struct gxPrinterGlyphsRec {
+
+ gxFont theFont; /* ---> Font reference */
+ long nGlyphs; /* ---> Number of glyphs in the font */
+ gxFontPlatform platform; /* <--- How printer font is encoded */
+ gxFontScript script; /* <--- Script if platform != glyphPlatform */
+ gxFontLanguage language; /* <--- Language if platform != glyphPlatform */
+ long vmUsage; /* <--- How much PostScript VM font uses */
+
+ /* Size of this array is long-alligned(nGlyphs) */
+ unsigned long glyphBits[1]; /* <--- Bit array of which system glyphs are in printer */
+
+};
+typedef struct gxPrinterGlyphsRec gxPrinterGlyphsRec;
+
+/* PostScript device rendering information */
+
+typedef long gxPostScriptRenderOptions;
+
+struct gxPostScriptImageDataRec {
+ short languageLevel; /* PostScript language level */
+ gxColorSpace devCSpace; /* The printer's color space */
+ gxColorProfile devCProfile; /* The printer's color profile for matching */
+ gxPostScriptRenderOptions renderOptions; /* Options for the imaging system */
+ long pathLimit; /* Maximum path size */
+ short gsaveLimit; /* Maximum number of gsaves allowed */
+ short opStackLimit; /* Operand stack limit */
+ scalerStreamTypeFlag fontType; /* These are the font types that the printer supports */
+ long printerVM; /* How much memory is in the printer */
+ long reserved0;
+};
+typedef struct gxPostScriptImageDataRec gxPostScriptImageDataRec;
+
+typedef gxPostScriptImageDataRec * gxPostScriptImageDataPtr;
+typedef gxPostScriptImageDataPtr * gxPostScriptImageDataHdl;
+/* Constants for renderOptions field in gxPostScriptImageDataRec. */
+enum {
+ gxNeedsHexOption = 0x00000001, /* Convert all binary data to hex */
+ gxNeedsCommentsOption = 0x00000002, /* Issue PostScript comments */
+ gxBoundingBoxesOption = 0x00000004, /* Calculate the values for */
+ gxPortablePostScriptOption = 0x00000008, /* Generate portable PostScript */
+ gxTextClipsToPathOption = 0x00000010, /* Convert all clips that are composed of text to path shapes */
+ gxFlattenClipPathOption = 0x00000020, /* Convert all clips that are path shapes to polygons (helps better control point limit) */
+ gxUseCharpath1Option = 0x00000040, /* (ignored if text clips are converted to paths) When the clip is text, */
+ /* Do it one glyph at a time, redrawing the main shape each time */
+ gxUseLevel2ColorOption = 0x00000080, /* When printing to level-2 use level-2 device independent color */
+ gxNoEPSIllegalOperators = 0x00000100, /* Don't use any operators prohibited by the Encapsulated PostScript File Format V3.0 */
+ gxEPSTargetOption = gxNoEPSIllegalOperators + gxNeedsCommentsOption + gxBoundingBoxesOption, /* PostScript intended for EPS Use. */
+ gxPageIndependentPostScript = 0x00000200 /* Don't generate PostScript with page interdependencies */
+};
+
+
+/* Structure for gxPostScriptGetProcSetList / gxPostScriptDownLoadProcSetList */
+
+struct gxProcSetListRec {
+ gxOwnerSignature clientid;
+ OSType controlType; /* The driver will call FetchTaggedData on each of these resources */
+ short controlid;
+ OSType dataType;
+ long reserved0;
+};
+typedef struct gxProcSetListRec gxProcSetListRec;
+
+typedef gxProcSetListRec * gxProcSetListPtr;
+typedef gxProcSetListPtr * gxProcSetListHdl;
+/* Possible results of querying printer (returned by gxPostScriptQueryPrinter message) */
+enum {
+ gxPrinterOK = 0,
+ gxIntializePrinter = 1,
+ gxFilePrinting = 2,
+ gxResetPrinter = 128
+};
+
+
+/* ------------------------------------------------------------------------------
+
+ PostScript Driver Imaging Messages
+
+-------------------------------------------------------------------------------- */
+/* Device control messages */
+#define Send_GXPostScriptQueryPrinter(queryData) \
+ MacSendMessage(0x00010000, queryData)
+
+#define Forward_GXPostScriptQueryPrinter(queryData) \
+ ForwardThisMessage((void *) (queryData))
+
+
+#define Send_GXPostScriptInitializePrinter() \
+ MacSendMessage(0x00010001)
+
+#define Forward_GXPostScriptInitializePrinter() \
+ ForwardThisMessage((void *) (0))
+
+
+#define Send_GXPostScriptResetPrinter() \
+ MacSendMessage(0x00010002)
+
+#define Forward_GXPostScriptResetPrinter() \
+ ForwardThisMessage((void *) (0))
+
+
+#define Send_GXPostScriptExitServer() \
+ MacSendMessage(0x00010003)
+
+#define Forward_GXPostScriptExitServer() \
+ ForwardThisMessage((void *) (0))
+
+/* Device communication messages */
+#define Send_GXPostScriptGetStatusText(textHdl) \
+ MacSendMessage(0x00010004, textHdl)
+
+#define Forward_GXPostScriptGetStatusText(textHdl) \
+ ForwardThisMessage((void *) (textHdl))
+
+
+#define Send_GXPostScriptGetPrinterText(textHdl) \
+ MacSendMessage(0x00010005, textHdl)
+
+#define Forward_GXPostScriptGetPrinterText(textHdl) \
+ ForwardThisMessage((void *) (textHdl))
+
+
+#define Send_GXPostScriptScanStatusText(textHdl) \
+ MacSendMessage(0x00010006, textHdl)
+
+#define Forward_GXPostScriptScanStatusText(textHdl) \
+ ForwardThisMessage((void *) (textHdl))
+
+
+#define Send_GXPostScriptScanPrinterText(textHdl) \
+ MacSendMessage(0x00010007, textHdl)
+
+#define Forward_GXPostScriptScanPrinterText(textHdl) \
+ ForwardThisMessage((void *) (textHdl))
+/* Proc set management messages */
+#define Send_GXPostScriptGetDocumentProcSetList(procSet, imageDataHdl) \
+ MacSendMessage(0x00010008, procSet, imageDataHdl)
+
+#define Forward_GXPostScriptGetDocumentProcSetList(procSet, imageDataHdl) \
+ ForwardThisMessage((void *) (procSet), (void *) (imageDataHdl))
+
+#define Send_GXPostScriptDownloadProcSetList(procSet, imageDataHdl) \
+ MacSendMessage(0x00010009, procSet, imageDataHdl)
+
+#define Forward_GXPostScriptDownloadProcSetList(procSet, imageDataHdl) \
+ ForwardThisMessage((void *) (procSet), (void *) (imageDataHdl))
+/* Font management messages */
+#define Send_GXPostScriptGetPrinterGlyphsInformation(glyphsInfo) \
+ MacSendMessage(0x0001000A, glyphsInfo)
+
+#define Forward_GXPostScriptGetPrinterGlyphsInformation(glyphsInfo) \
+ ForwardThisMessage((void *) (glyphsInfo))
+
+
+#define Send_GXPostScriptStreamFont(fontref, streamPtr) \
+ MacSendMessage(0x0001000B, fontref, streamPtr)
+
+#define Forward_GXPostScriptStreamFont(fontref, streamPtr) \
+ ForwardThisMessage((void *) (fontref), (void *) (streamPtr))
+/* Document structuring and formatting messages */
+#define Send_GXPostScriptDoDocumentHeader(imageDataHdl) \
+ MacSendMessage(0x0001000C, imageDataHdl)
+
+#define Forward_GXPostScriptDoDocumentHeader(imageDataHdl) \
+ ForwardThisMessage((void *) (imageDataHdl))
+
+#define Send_GXPostScriptDoDocumentSetup(imageDataHdl) \
+ MacSendMessage(0x0001000D, imageDataHdl)
+
+#define Forward_GXPostScriptDoDocumentSetup(imageDataHdl) \
+ ForwardThisMessage((void *) (imageDataHdl))
+
+#define Send_GXPostScriptDoDocumentTrailer(imageDataHdl) \
+ MacSendMessage(0x0001000E, imageDataHdl)
+
+#define Forward_GXPostScriptDoDocumentTrailer(imageDataHdl) \
+ ForwardThisMessage((void *) (imageDataHdl))
+/* Page structuring and formatting messages */
+#define Send_GXPostScriptDoPageSetup(pageFormat, thePage, imageDataHdl) \
+ MacSendMessage(0x0001000F, pageFormat, thePage, imageDataHdl)
+
+#define Forward_GXPostScriptDoPageSetup(pageFormat, thePage, imageDataHdl) \
+ ForwardThisMessage((void *) (pageFormat), (void *) (thePage), (void *) (imageDataHdl))
+
+#define Send_GXPostScriptSelectPaperType(thePapertype, thePage, imageDataHdl) \
+ MacSendMessage(0x00010010, thePapertype, thePage, imageDataHdl)
+
+#define Forward_GXPostScriptSelectPaperType(thePapertype, thePage, imageDataHdl) \
+ ForwardThisMessage((void *) (thePapertype), (void *) (thePage), (void *) (imageDataHdl))
+
+#define Send_GXPostScriptDoPageTrailer(imageDataHdl) \
+ MacSendMessage(0x00010011, imageDataHdl)
+
+#define Forward_GXPostScriptDoPageTrailer(imageDataHdl) \
+ ForwardThisMessage((void *) (imageDataHdl))
+
+#define Send_GXPostScriptEjectPage(thePapertype, pagenumber, copiescount, erasepage, imageDataHdl) \
+ MacSendMessage(0x00010012, thePapertype, pagenumber, copiescount, erasepage, imageDataHdl)
+
+#define Forward_GXPostScriptEjectPage(thePapertype, pagenumber, copiescount, erasepage, imageDataHdl) \
+ ForwardThisMessage((void *) (thePapertype), (void *) (pagenumber), (void *) (copiescount), \
+ (void *) (erasepage), (void *) (imageDataHdl))
+
+#define Send_GXPostScriptEjectPendingPage(pageWasEjected) \
+ MacSendMessage(0x00010014, pageWasEjected)
+
+#define Forward_GXPostScriptEjectPendingPage(pageWasEjected) \
+ ForwardThisMessage((void *) (pageWasEjected))
+/* Shape imaging messages */
+#define Send_GXPostScriptProcessShape(page, trcount, trlist) \
+ MacSendMessage(0x00010013, page, trcount, trlist)
+
+#define Forward_GXPostScriptProcessShape(page, trcount, trlist) \
+ ForwardThisMessage((void *) (page), (void *) (trcount), (void *) (trlist))
+/* ------------------------------------------------------------------------------
+
+ Driver API Functions
+
+-------------------------------------------------------------------------------- */
+/* Constants for printer gxViewDevice bitmaps. */
+enum {
+ gxMissingImagePointer = -4
+};
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSErr )
+GXAddPrinterViewDevice (gxPrinter thePrinter,
+ gxViewDevice theViewDevice) FOURWORDINLINE(0x203C, 0x0002, 0x0000, 0xABFE);
+
+EXTERN_API_C( OSErr )
+GXGetAvailableJobFormatModes (gxJobFormatModeTableHdl * theFormatModes) FOURWORDINLINE(0x203C, 0x0002, 0x0001, 0xABFE);
+
+EXTERN_API_C( OSErr )
+GXSetPreferredJobFormatMode (gxJobFormatMode theFormatMode,
+ Boolean directOnly) FOURWORDINLINE(0x203C, 0x0002, 0x0002, 0xABFE);
+
+EXTERN_API_C( OSErr )
+GXPrintingAlert (long iconId,
+ long txtSize,
+ long defaultTitleNum,
+ long cancelTitleNum,
+ long textLength,
+ Ptr pAlertMsg,
+ StringPtr actionTitle,
+ StringPtr title2,
+ StringPtr title3,
+ StringPtr msgFont,
+ ModalFilterUPP filterProc,
+ short * itemHit,
+ StringPtr alertTitle) FOURWORDINLINE(0x203C, 0x0002, 0x0003, 0xABFE);
+
+EXTERN_API_C( OSErr )
+GXGetPrintingAlert (long alertResId,
+ ModalFilterUPP filterProc,
+ short * itemHit) FOURWORDINLINE(0x203C, 0x0002, 0x0004, 0xABFE);
+
+
+EXTERN_API_C( OSErr )
+GXFetchDTPData (Str31 dtpName,
+ OSType theType,
+ long theID,
+ Handle * theData) FOURWORDINLINE(0x203C, 0x0002, 0x0005, 0xABFE);
+
+EXTERN_API_C( OSErr )
+GXWriteDTPData (Str31 dtpName,
+ OSType theType,
+ long theID,
+ Handle theData) FOURWORDINLINE(0x203C, 0x0002, 0x0006, 0xABFE);
+
+EXTERN_API_C( OSErr )
+GXHandleChooserMessage (gxJob * aJob,
+ Str31 driverName,
+ long message,
+ long caller,
+ StringPtr objName,
+ StringPtr zoneName,
+ ListHandle theList,
+ long p2) FOURWORDINLINE(0x203C, 0x0002, 0x0007, 0xABFE);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __GXPRINTERDRIVERS__ */
+
diff --git a/include/qt/GXPrinting.h b/include/qt/GXPrinting.h
new file mode 100644
index 000000000..ada1709ab
--- /dev/null
+++ b/include/qt/GXPrinting.h
@@ -0,0 +1,4457 @@
+/*
+ File: GXPrinting.h
+
+ Contains: This file contains all printing APIs except for driver/extension specific ones.
+
+ Version: Technology: Quickdraw GX 1.1
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __GXPRINTING__
+#define __GXPRINTING__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __COLLECTIONS__
+#include "Collections.h"
+#endif
+
+#ifndef __DIALOGS__
+#include "Dialogs.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+#ifndef __GXFONTS__
+#include "GXFonts.h"
+#endif
+
+#ifndef __GXMATH__
+#include "GXMath.h"
+#endif
+
+#ifndef __GXTYPES__
+#include "GXTypes.h"
+#endif
+
+#ifndef __LISTS__
+#include "Lists.h"
+#endif
+
+#ifndef __MENUS__
+#include "Menus.h"
+#endif
+
+#ifndef __GXMESSAGES__
+#include "GXMessages.h"
+#endif
+
+#ifndef __PRINTING__
+#include "Printing.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/********************************************************************
+ Start of old "GXPrintingManager.h/a/p" interface file.
+ *********************************************************************/
+/* ------------------------------------------------------------------------------
+
+ Printing Manager API Contants and Types
+
+-------------------------------------------------------------------------------- */
+
+typedef unsigned long gxOwnerSignature;
+#if OLDROUTINENAMES
+typedef unsigned long Signature;
+#endif /* OLDROUTINENAMES */
+
+/*
+
+ ABSTRACT DATA TYPES
+
+*/
+/*
+ typedef struct gxPrivatePrinterRecord *gxPrinter;
+ typedef struct gxPrivateJobRecord *gxJob;
+ typedef struct gxPrivateFormatRecord *gxFormat;
+ typedef struct gxPrivatePaperTypeRecord *gxPaperType;
+ typedef struct gxPrivatePrintFileRecord *gxPrintFile;
+*/
+
+typedef struct OpaquegxPrinter* gxPrinter;
+typedef struct OpaquegxJob* gxJob;
+typedef struct OpaquegxFormat* gxFormat;
+typedef struct OpaquegxPaperType* gxPaperType;
+typedef struct OpaquegxPrintFile* gxPrintFile;
+/* Possible values for LoopStatus */
+typedef Boolean gxLoopStatus;
+enum {
+ gxStopLooping = false,
+ gxKeepLooping = true
+};
+
+typedef CALLBACK_API( gxLoopStatus , GXViewDeviceProcPtr )(gxViewDevice aViewDevice, void *refCon);
+typedef STACK_UPP_TYPE(GXViewDeviceProcPtr) GXViewDeviceUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXViewDeviceUPP)
+ NewGXViewDeviceUPP (GXViewDeviceProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXViewDeviceUPP (GXViewDeviceUPP userUPP);
+
+ EXTERN_API(gxLoopStatus)
+ InvokeGXViewDeviceUPP (gxViewDevice aViewDevice,
+ void * refCon,
+ GXViewDeviceUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXViewDeviceProcInfo = 0x000003D0 }; /* pascal 1_byte Func(4_bytes, 4_bytes) */
+ #define NewGXViewDeviceUPP(userRoutine) (GXViewDeviceUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXViewDeviceProcInfo, GetCurrentArchitecture())
+ #define DisposeGXViewDeviceUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXViewDeviceUPP(aViewDevice, refCon, userUPP) (gxLoopStatus)CALL_TWO_PARAMETER_UPP((userUPP), uppGXViewDeviceProcInfo, (aViewDevice), (refCon))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXViewDeviceProc(userRoutine) NewGXViewDeviceUPP(userRoutine)
+#define CallGXViewDeviceProc(userRoutine, aViewDevice, refCon) InvokeGXViewDeviceUPP(aViewDevice, refCon, userRoutine)
+typedef CALLBACK_API( gxLoopStatus , GXFormatProcPtr )(gxFormat aFormat, void *refCon);
+typedef STACK_UPP_TYPE(GXFormatProcPtr) GXFormatUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXFormatUPP)
+ NewGXFormatUPP (GXFormatProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXFormatUPP (GXFormatUPP userUPP);
+
+ EXTERN_API(gxLoopStatus)
+ InvokeGXFormatUPP (gxFormat aFormat,
+ void * refCon,
+ GXFormatUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXFormatProcInfo = 0x000003D0 }; /* pascal 1_byte Func(4_bytes, 4_bytes) */
+ #define NewGXFormatUPP(userRoutine) (GXFormatUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFormatProcInfo, GetCurrentArchitecture())
+ #define DisposeGXFormatUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXFormatUPP(aFormat, refCon, userUPP) (gxLoopStatus)CALL_TWO_PARAMETER_UPP((userUPP), uppGXFormatProcInfo, (aFormat), (refCon))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXFormatProc(userRoutine) NewGXFormatUPP(userRoutine)
+#define CallGXFormatProc(userRoutine, aFormat, refCon) InvokeGXFormatUPP(aFormat, refCon, userRoutine)
+typedef CALLBACK_API( gxLoopStatus , GXPaperTypeProcPtr )(gxPaperType aPapertype, void *refCon);
+typedef STACK_UPP_TYPE(GXPaperTypeProcPtr) GXPaperTypeUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXPaperTypeUPP)
+ NewGXPaperTypeUPP (GXPaperTypeProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXPaperTypeUPP (GXPaperTypeUPP userUPP);
+
+ EXTERN_API(gxLoopStatus)
+ InvokeGXPaperTypeUPP (gxPaperType aPapertype,
+ void * refCon,
+ GXPaperTypeUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXPaperTypeProcInfo = 0x000003D0 }; /* pascal 1_byte Func(4_bytes, 4_bytes) */
+ #define NewGXPaperTypeUPP(userRoutine) (GXPaperTypeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXPaperTypeProcInfo, GetCurrentArchitecture())
+ #define DisposeGXPaperTypeUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXPaperTypeUPP(aPapertype, refCon, userUPP) (gxLoopStatus)CALL_TWO_PARAMETER_UPP((userUPP), uppGXPaperTypeProcInfo, (aPapertype), (refCon))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXPaperTypeProc(userRoutine) NewGXPaperTypeUPP(userRoutine)
+#define CallGXPaperTypeProc(userRoutine, aPapertype, refCon) InvokeGXPaperTypeUPP(aPapertype, refCon, userRoutine)
+typedef CALLBACK_API( OSErr , GXPrintingFlattenProcPtr )(long size, void *data, void *refCon);
+typedef STACK_UPP_TYPE(GXPrintingFlattenProcPtr) GXPrintingFlattenUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXPrintingFlattenUPP)
+ NewGXPrintingFlattenUPP (GXPrintingFlattenProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXPrintingFlattenUPP (GXPrintingFlattenUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXPrintingFlattenUPP (long size,
+ void * data,
+ void * refCon,
+ GXPrintingFlattenUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXPrintingFlattenProcInfo = 0x00000FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ #define NewGXPrintingFlattenUPP(userRoutine) (GXPrintingFlattenUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXPrintingFlattenProcInfo, GetCurrentArchitecture())
+ #define DisposeGXPrintingFlattenUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXPrintingFlattenUPP(size, data, refCon, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGXPrintingFlattenProcInfo, (size), (data), (refCon))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXPrintingFlattenProc(userRoutine) NewGXPrintingFlattenUPP(userRoutine)
+#define CallGXPrintingFlattenProc(userRoutine, size, data, refCon) InvokeGXPrintingFlattenUPP(size, data, refCon, userRoutine)
+#if OLDROUTINENAMES
+typedef GXViewDeviceProcPtr gxViewDeviceProc;
+typedef GXFormatProcPtr gxFormatProc;
+typedef GXPaperTypeProcPtr gxPaperTypeProc;
+typedef GXPrintingFlattenProcPtr gxPrintingFlattenProc;
+#endif /* OLDROUTINENAMES */
+
+/*
+ The following constants are used to set collection item flags in printing
+ collections. The Printing Manager purges certain items whenever a driver
+ switch occurs. If the formatting driver changes, all items marked as
+ gxVolatileFormattingDriverCategory will be purged. If the output driver
+ changes, all items marked as gxVolatileOutputDriverCategory will be purged.
+ Note that to prevent items from being flattened when GXFlattenJob is called,
+ you should unset the collectionPersistenceBit (defined in Collections.h),
+ which is on by default.
+*/
+/* Structure stored in collection items' user attribute bits */
+typedef short gxCollectionCategory;
+enum {
+ gxNoCollectionCategory = 0x0000,
+ gxOutputDriverCategory = 0x0001,
+ gxFormattingDriverCategory = 0x0002,
+ gxDriverVolatileCategory = 0x0004,
+ gxVolatileOutputDriverCategory = gxOutputDriverCategory + gxDriverVolatileCategory,
+ gxVolatileFormattingDriverCategory = gxFormattingDriverCategory + gxDriverVolatileCategory
+};
+
+
+/*
+
+ >>>>>> JOB COLLECTION ITEMS <<<<<<
+
+*/
+
+/* gxJobInfo COLLECTION ITEM */
+enum {
+ gxJobTag = FOUR_CHAR_CODE('job ')
+};
+
+
+struct gxJobInfo {
+ long numPages; /* Number of pages in the document */
+ long priority; /* Priority of this job plus "is it on hold?" */
+ unsigned long timeToPrint; /* When to print job, if scheduled */
+ long jobTimeout; /* Timeout value, in ticks */
+ long firstPageToPrint; /* Start printing from this page */
+ short jobAlert; /* How to alert user when printing */
+ Str31 appName; /* Which application printed the document */
+ Str31 documentName; /* The name of the document being printed */
+ Str31 userName; /* The owner name of the machine that printed the document */
+};
+typedef struct gxJobInfo gxJobInfo;
+/* gxPDDDefaultSettingTag COLLECTION ITEM */
+enum {
+ gxPDDDefaultSettingTag = FOUR_CHAR_CODE('pdds')
+};
+
+
+struct gxPDDDefaultSettingInfo {
+ Boolean useDefaultSetting; /* true if PDD default setting should be used */
+ SInt8 pad;
+};
+typedef struct gxPDDDefaultSettingInfo gxPDDDefaultSettingInfo;
+/* priority field constants */
+enum {
+ gxPrintJobHoldingBit = 0x00001000 /* This bit is set if the job is on hold. */
+};
+
+enum {
+ gxPrintJobUrgent = 0x00000001,
+ gxPrintJobAtTime = 0x00000002,
+ gxPrintJobASAP = 0x00000003,
+ gxPrintJobHolding = (gxPrintJobHoldingBit + gxPrintJobASAP),
+ gxPrintJobHoldingAtTime = (gxPrintJobHoldingBit + gxPrintJobAtTime),
+ gxPrintJobHoldingUrgent = (gxPrintJobHoldingBit + gxPrintJobUrgent)
+};
+
+/* jobAlert field constants */
+enum {
+ gxNoPrintTimeAlert = 0, /* Don't alert user when we print */
+ gxAlertBefore = 1, /* Alert user before we print */
+ gxAlertAfter = 2, /* Alert user after we print */
+ gxAlertBothTimes = 3 /* Alert before and after we print */
+};
+
+/* jobTimeout field constants */
+enum {
+ gxThirtySeconds = 1800, /* 30 seconds in ticks */
+ gxTwoMinutes = 7200 /* 2 minutes in ticks */
+};
+
+
+/* gxCollationTag COLLECTION ITEM */
+enum {
+ gxCollationTag = FOUR_CHAR_CODE('sort')
+};
+
+
+struct gxCollationInfo {
+ Boolean collation; /* True if copies are to be collated */
+ char padByte;
+};
+typedef struct gxCollationInfo gxCollationInfo;
+
+/* gxCopiesTag COLLECTION ITEM */
+enum {
+ gxCopiesTag = FOUR_CHAR_CODE('copy')
+};
+
+
+struct gxCopiesInfo {
+ long copies; /* Number of copies of the document to print */
+};
+typedef struct gxCopiesInfo gxCopiesInfo;
+
+/* gxPageRangeTag COLLECTION ITEM */
+enum {
+ gxPageRangeTag = FOUR_CHAR_CODE('rang')
+};
+
+
+struct gxSimplePageRangeInfo {
+ char optionChosen; /* From options listed below */
+ Boolean printAll; /* True if user wants to print all pages */
+ long fromPage; /* For gxDefaultPageRange, current value */
+ long toPage; /* For gxDefaultPageRange, current value */
+};
+typedef struct gxSimplePageRangeInfo gxSimplePageRangeInfo;
+
+struct gxPageRangeInfo {
+ gxSimplePageRangeInfo simpleRange; /* Info which will be returned for GetJobPageRange */
+ Str31 fromString; /* For gxCustomizePageRange, current value */
+ Str31 toString; /* For gxCustomizePageRange, current value */
+ long minFromPage; /* For gxDefaultPageRange, we parse with this, ignored if nil */
+ long maxToPage; /* For gxDefaultPageRange, we parse with this, ignored if nil */
+ char replaceString[1]; /* For gxReplacePageRange, string to display */
+};
+typedef struct gxPageRangeInfo gxPageRangeInfo;
+
+/* optionChosen field constants for SimplePageRangeInfo */
+enum {
+ gxDefaultPageRange = 0,
+ gxReplacePageRange = 1,
+ gxCustomizePageRange = 2
+};
+
+
+/* gxQualityTag COLLECTION ITEM */
+enum {
+ gxQualityTag = FOUR_CHAR_CODE('qual')
+};
+
+
+struct gxQualityInfo {
+ Boolean disableQuality; /* True to disable standard quality controls */
+ char padByte;
+ short defaultQuality; /* The default quality value */
+ short currentQuality; /* The current quality value */
+ short qualityCount; /* The number of quality menu items in popup menu */
+ char qualityNames[1]; /* An array of packed pascal strings for popup menu titles */
+};
+typedef struct gxQualityInfo gxQualityInfo;
+
+/* gxFileDestinationTag COLLECTION ITEM */
+enum {
+ gxFileDestinationTag = FOUR_CHAR_CODE('dest')
+};
+
+
+struct gxFileDestinationInfo {
+ Boolean toFile; /* True if destination is a file */
+ char padByte;
+};
+typedef struct gxFileDestinationInfo gxFileDestinationInfo;
+
+/* gxFileLocationTag COLLECTION ITEM */
+enum {
+ gxFileLocationTag = FOUR_CHAR_CODE('floc')
+};
+
+
+struct gxFileLocationInfo {
+ FSSpec fileSpec; /* Location to put file, if destination is file */
+};
+typedef struct gxFileLocationInfo gxFileLocationInfo;
+
+/* gxFileFormatTag COLLECTION ITEM */
+enum {
+ gxFileFormatTag = FOUR_CHAR_CODE('ffmt')
+};
+
+
+struct gxFileFormatInfo {
+ Str31 fileFormatName; /* Name of file format (e.g. "PostScript") if destination is file */
+};
+typedef struct gxFileFormatInfo gxFileFormatInfo;
+
+/* gxFileFontsTag COLLECTION ITEM */
+enum {
+ gxFileFontsTag = FOUR_CHAR_CODE('incf')
+};
+
+
+struct gxFileFontsInfo {
+ char includeFonts; /* Which fonts to include, if destination is file */
+ char padByte;
+};
+typedef struct gxFileFontsInfo gxFileFontsInfo;
+/* includeFonts field constants */
+enum {
+ gxIncludeNoFonts = 1, /* Include no fonts */
+ gxIncludeAllFonts = 2, /* Include all fonts */
+ gxIncludeNonStandardFonts = 3 /* Include only fonts that aren't in the standard LW set */
+};
+
+
+/* gxPaperFeedTag COLLECTION ITEM */
+enum {
+ gxPaperFeedTag = FOUR_CHAR_CODE('feed')
+};
+
+
+struct gxPaperFeedInfo {
+ Boolean autoFeed; /* True if automatic feed, false if manual */
+ char padByte;
+};
+typedef struct gxPaperFeedInfo gxPaperFeedInfo;
+
+/* gxTrayFeedTag COLLECTION ITEM */
+enum {
+ gxTrayFeedTag = FOUR_CHAR_CODE('tray')
+};
+
+
+typedef long gxTrayIndex;
+
+struct gxTrayFeedInfo {
+ gxTrayIndex feedTrayIndex; /* Tray to feed paper from */
+ Boolean manualFeedThisPage; /* Signals manual feeding for the page */
+ char padByte;
+};
+typedef struct gxTrayFeedInfo gxTrayFeedInfo;
+
+/* gxManualFeedTag COLLECTION ITEM */
+enum {
+ gxManualFeedTag = FOUR_CHAR_CODE('manf')
+};
+
+
+struct gxManualFeedInfo {
+ long numPaperTypeNames; /* Number of paperTypes to manually feed */
+ Str31 paperTypeNames[1]; /* Array of names of paperTypes to manually feed */
+};
+typedef struct gxManualFeedInfo gxManualFeedInfo;
+
+/* gxNormalMappingTag COLLECTION ITEM */
+enum {
+ gxNormalMappingTag = FOUR_CHAR_CODE('nmap')
+};
+
+
+struct gxNormalMappingInfo {
+ Boolean normalPaperMapping; /* True if not overriding normal paper mapping */
+ char padByte;
+};
+typedef struct gxNormalMappingInfo gxNormalMappingInfo;
+
+/* gxSpecialMappingTag COLLECTION ITEM */
+enum {
+ gxSpecialMappingTag = FOUR_CHAR_CODE('smap')
+};
+
+
+struct gxSpecialMappingInfo {
+ char specialMapping; /* Enumerated redirect, scale or tile setting */
+ char padByte;
+};
+typedef struct gxSpecialMappingInfo gxSpecialMappingInfo;
+/* specialMapping field constants */
+enum {
+ gxRedirectPages = 1, /* Redirect pages to a papertype and clip if necessary */
+ gxScalePages = 2, /* Scale pages if necessary */
+ gxTilePages = 3 /* Tile pages if necessary */
+};
+
+
+/* gxTrayMappingTag COLLECTION ITEM */
+enum {
+ gxTrayMappingTag = FOUR_CHAR_CODE('tmap')
+};
+
+
+struct gxTrayMappingInfo {
+ gxTrayIndex mapPaperToTray; /* Tray to map all paper to */
+};
+typedef struct gxTrayMappingInfo gxTrayMappingInfo;
+
+/* gxPaperMappingTag COLLECTION ITEM */
+/* This collection item contains a flattened paper type resource */
+enum {
+ gxPaperMappingTag = FOUR_CHAR_CODE('pmap')
+};
+
+
+/* gxPrintPanelTag COLLECTION ITEM */
+enum {
+ gxPrintPanelTag = FOUR_CHAR_CODE('ppan')
+};
+
+
+struct gxPrintPanelInfo {
+ Str31 startPanelName; /* Name of starting panel in Print dialog */
+};
+typedef struct gxPrintPanelInfo gxPrintPanelInfo;
+
+/* gxFormatPanelTag COLLECTION ITEM */
+enum {
+ gxFormatPanelTag = FOUR_CHAR_CODE('fpan')
+};
+
+
+struct gxFormatPanelInfo {
+ Str31 startPanelName; /* Name of starting panel in Format dialog */
+};
+typedef struct gxFormatPanelInfo gxFormatPanelInfo;
+
+/* gxTranslatedDocumentTag COLLECTION ITEM */
+enum {
+ gxTranslatedDocumentTag = FOUR_CHAR_CODE('trns')
+};
+
+
+struct gxTranslatedDocumentInfo {
+ long translatorInfo; /* Information from the translation process */
+};
+typedef struct gxTranslatedDocumentInfo gxTranslatedDocumentInfo;
+
+/* gxCoverPageTag COLLECTION ITEM */
+enum {
+ gxCoverPageTag = FOUR_CHAR_CODE('cvpg')
+};
+
+
+
+struct gxCoverPageInfo {
+ long coverPage; /* Use same enum values as for PrintRecord field in GXPrinterDrivers.h */
+};
+typedef struct gxCoverPageInfo gxCoverPageInfo;
+/*
+
+ >>>>>> FORMAT COLLECTION ITEMS <<<<<<
+
+*/
+/* gxPaperTypeLockTag COLLECTION ITEM */
+enum {
+ gxPaperTypeLockTag = FOUR_CHAR_CODE('ptlk')
+};
+
+
+struct gxPaperTypeLockInfo {
+ Boolean paperTypeLocked; /* True if format's paperType is locked */
+ char padByte;
+};
+typedef struct gxPaperTypeLockInfo gxPaperTypeLockInfo;
+
+/* gxOrientationTag COLLECTION ITEM */
+enum {
+ gxOrientationTag = FOUR_CHAR_CODE('layo')
+};
+
+
+struct gxOrientationInfo {
+ char orientation; /* An enumerated orientation value */
+ char padByte;
+};
+typedef struct gxOrientationInfo gxOrientationInfo;
+/* orientation field constants */
+enum {
+ gxPortraitLayout = 0, /* Portrait */
+ gxLandscapeLayout = 1, /* Landscape */
+ gxRotatedPortraitLayout = 2, /* Portrait, rotated 180. */
+ gxRotatedLandscapeLayout = 3 /* Landscape, rotated 180. */
+};
+
+
+/* gxScalingTag COLLECTION ITEM */
+enum {
+ gxScalingTag = FOUR_CHAR_CODE('scal')
+};
+
+
+struct gxScalingInfo {
+ Fixed horizontalScaleFactor; /* Current horizontal scaling factor */
+ Fixed verticalScaleFactor; /* Current vertical scaling factor */
+ short minScaling; /* Minimum scaling allowed */
+ short maxScaling; /* Maximum scaling allowed */
+};
+typedef struct gxScalingInfo gxScalingInfo;
+
+/* gxDirectModeTag COLLECTION ITEM */
+enum {
+ gxDirectModeTag = FOUR_CHAR_CODE('dirm')
+};
+
+
+struct gxDirectModeInfo {
+ Boolean directModeOn; /* True if a direct mode is enabled */
+ char padByte;
+};
+typedef struct gxDirectModeInfo gxDirectModeInfo;
+
+/* gxFormatHalftoneTag COLLECTION ITEM */
+enum {
+ gxFormatHalftoneTag = FOUR_CHAR_CODE('half')
+};
+
+
+struct gxFormatHalftoneInfo {
+ long numHalftones; /* Number of halftone records */
+ gxHalftone halftones[1]; /* The halftone records */
+};
+typedef struct gxFormatHalftoneInfo gxFormatHalftoneInfo;
+
+/* gxInvertPageTag COLLECTION ITEM */
+enum {
+ gxInvertPageTag = FOUR_CHAR_CODE('invp')
+};
+
+
+struct gxInvertPageInfo {
+ char padByte;
+ Boolean invert; /* If true, invert page */
+};
+typedef struct gxInvertPageInfo gxInvertPageInfo;
+
+/* gxFlipPageHorizontalTag COLLECTION ITEM */
+enum {
+ gxFlipPageHorizontalTag = FOUR_CHAR_CODE('flph')
+};
+
+
+struct gxFlipPageHorizontalInfo {
+ char padByte;
+ Boolean flipHorizontal; /* If true, flip x coordinates on page */
+};
+typedef struct gxFlipPageHorizontalInfo gxFlipPageHorizontalInfo;
+
+/* gxFlipPageVerticalTag COLLECTION ITEM */
+enum {
+ gxFlipPageVerticalTag = FOUR_CHAR_CODE('flpv')
+};
+
+
+struct gxFlipPageVerticalInfo {
+ char padByte;
+ Boolean flipVertical; /* If true, flip y coordinates on page */
+};
+typedef struct gxFlipPageVerticalInfo gxFlipPageVerticalInfo;
+
+/* gxPreciseBitmapsTag COLLECTION ITEM */
+enum {
+ gxPreciseBitmapsTag = FOUR_CHAR_CODE('pbmp')
+};
+
+
+struct gxPreciseBitmapInfo {
+ Boolean preciseBitmaps; /* If true, scale page by 96% */
+ char padByte;
+};
+typedef struct gxPreciseBitmapInfo gxPreciseBitmapInfo;
+
+/*
+
+ >>>>>> PAPERTYPE COLLECTION ITEMS <<<<<<
+
+*/
+/* gxBaseTag COLLECTION ITEM */
+enum {
+ gxBaseTag = FOUR_CHAR_CODE('base')
+};
+
+
+struct gxBaseInfo {
+ long baseType; /* PaperType's base type */
+};
+typedef struct gxBaseInfo gxBaseInfo;
+/* baseType field constants */
+enum {
+ gxUnknownBase = 0, /* Base paper type from which this paper type is */
+ gxUSLetterBase = 1, /* derived. This is not a complete set. */
+ gxUSLegalBase = 2,
+ gxA4LetterBase = 3,
+ gxB5LetterBase = 4,
+ gxTabloidBase = 5
+};
+
+
+/* gxCreatorTag COLLECTION ITEM */
+enum {
+ gxCreatorTag = FOUR_CHAR_CODE('crea')
+};
+
+
+struct gxCreatorInfo {
+ OSType creator; /* PaperType's creator */
+};
+typedef struct gxCreatorInfo gxCreatorInfo;
+/* gxUnitsTag COLLECTION ITEM */
+enum {
+ gxUnitsTag = FOUR_CHAR_CODE('unit')
+};
+
+
+struct gxUnitsInfo {
+ char units; /* PaperType's units (used by PaperType Editor). */
+ char padByte;
+};
+typedef struct gxUnitsInfo gxUnitsInfo;
+/* units field constants */
+enum {
+ gxPicas = 0, /* Pica measurement */
+ gxMMs = 1, /* Millimeter measurement */
+ gxInches = 2 /* Inches measurement */
+};
+
+
+/* gxFlagsTag COLLECTION ITEM */
+enum {
+ gxFlagsTag = FOUR_CHAR_CODE('flag')
+};
+
+
+struct gxFlagsInfo {
+ long flags; /* PaperType's flags */
+};
+typedef struct gxFlagsInfo gxFlagsInfo;
+/* flags field constants */
+enum {
+ gxOldPaperTypeFlag = 0x00800000, /* Indicates a paper type for compatibility printing */
+ gxNewPaperTypeFlag = 0x00400000, /* Indicates a paper type for QuickDraw GX-aware printing */
+ gxOldAndNewFlag = 0x00C00000, /* Indicates a paper type that's both old and new */
+ gxDefaultPaperTypeFlag = 0x00100000 /* Indicates the default paper type in the group */
+};
+
+
+/* gxCommentTag COLLECTION ITEM */
+enum {
+ gxCommentTag = FOUR_CHAR_CODE('cmnt')
+};
+
+
+struct gxCommentInfo {
+ Str255 comment; /* PaperType's comment */
+};
+typedef struct gxCommentInfo gxCommentInfo;
+
+/*
+
+ >>>>>> PRINTER VIEWDEVICE TAGS <<<<<<
+
+*/
+/* gxPenTableTag COLLECTION ITEM */
+enum {
+ gxPenTableTag = FOUR_CHAR_CODE('pent')
+};
+
+
+struct gxPenTableEntry {
+ Str31 penName; /* Name of the pen */
+ gxColor penColor; /* Color to use from the color set */
+ Fixed penThickness; /* Size of the pen */
+ short penUnits; /* Specifies units in which pen thickness is defined */
+ short penPosition; /* Pen position in the carousel, -1 (kPenNotLoaded) if not loaded */
+};
+typedef struct gxPenTableEntry gxPenTableEntry;
+
+struct gxPenTable {
+ long numPens; /* Number of pen entries in the following array */
+ gxPenTableEntry pens[1]; /* Array of pen entries */
+};
+typedef struct gxPenTable gxPenTable;
+typedef gxPenTable * gxPenTablePtr;
+typedef gxPenTablePtr * gxPenTableHdl;
+/* penUnits field constants */
+enum {
+ gxDeviceUnits = 0,
+ gxMMUnits = 1,
+ gxInchesUnits = 2
+};
+
+/* penPosition field constants */
+enum {
+ gxPenNotLoaded = -1
+};
+
+
+/*
+
+ >>>>>> DIALOG-RELATED CONSTANTS AND TYPES <<<<<<
+
+*/
+
+typedef long gxDialogResult;
+enum {
+ gxCancelSelected = 0L,
+ gxOKSelected = 1L,
+ gxRevertSelected = 2L
+};
+
+
+
+struct gxEditMenuRecord {
+ short editMenuID;
+ short cutItem;
+ short copyItem;
+ short pasteItem;
+ short clearItem;
+ short undoItem;
+};
+typedef struct gxEditMenuRecord gxEditMenuRecord;
+
+/*
+
+ >>>>>> JOB FORMAT MODE CONSTANTS AND TYPES <<<<<<
+
+*/
+
+typedef OSType gxJobFormatMode;
+
+struct gxJobFormatModeTable {
+ long numModes; /* Number of job format modes to choose from */
+ gxJobFormatMode modes[1]; /* The job format modes */
+};
+typedef struct gxJobFormatModeTable gxJobFormatModeTable;
+typedef gxJobFormatModeTable * gxJobFormatModeTablePtr;
+typedef gxJobFormatModeTablePtr * gxJobFormatModeTableHdl;
+enum {
+ gxGraphicsJobFormatMode = FOUR_CHAR_CODE('grph'),
+ gxTextJobFormatMode = FOUR_CHAR_CODE('text'),
+ gxPostScriptJobFormatMode = FOUR_CHAR_CODE('post')
+};
+
+
+typedef long gxQueryType;
+enum {
+ gxGetJobFormatLineConstraintQuery = 0L,
+ gxGetJobFormatFontsQuery = 1L,
+ gxGetJobFormatFontCommonStylesQuery = 2L,
+ gxGetJobFormatFontConstraintQuery = 3L,
+ gxSetStyleJobFormatCommonStyleQuery = 4L
+};
+
+
+/* Structures used for Text mode field constants */
+
+struct gxPositionConstraintTable {
+ gxPoint phase; /* Position phase */
+ gxPoint offset; /* Position offset */
+ long numSizes; /* Number of available font sizes */
+ Fixed sizes[1]; /* The available font sizes */
+};
+typedef struct gxPositionConstraintTable gxPositionConstraintTable;
+typedef gxPositionConstraintTable * gxPositionConstraintTablePtr;
+typedef gxPositionConstraintTablePtr * gxPositionConstraintTableHdl;
+/* numSizes field constants */
+enum {
+ gxConstraintRange = -1
+};
+
+
+struct gxStyleNameTable {
+ long numStyleNames; /* Number of style names */
+ Str255 styleNames[1]; /* The style names */
+};
+typedef struct gxStyleNameTable gxStyleNameTable;
+typedef gxStyleNameTable * gxStyleNameTablePtr;
+typedef gxStyleNameTablePtr * gxStyleNameTableHdl;
+
+struct gxFontTable {
+ long numFonts; /* Number of font references */
+ gxFont fonts[1]; /* The font references */
+};
+typedef struct gxFontTable gxFontTable;
+typedef gxFontTable * gxFontTablePtr;
+typedef gxFontTablePtr * gxFontTableHdl;
+/* ------------------------------------------------------------------------------
+
+ Printing Manager API Functions
+
+-------------------------------------------------------------------------------- */
+/*
+ Global Routines
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+GXInitPrinting (void) FOURWORDINLINE(0x203C, 0x0000, 0x0000, 0xABFE);
+
+EXTERN_API( OSErr )
+GXExitPrinting (void) FOURWORDINLINE(0x203C, 0x0000, 0x0001, 0xABFE);
+
+
+/*
+ Error-Handling Routines
+*/
+EXTERN_API( OSErr )
+GXGetJobError (gxJob aJob) FOURWORDINLINE(0x203C, 0x0000, 0x000E, 0xABFE);
+
+EXTERN_API( void )
+GXSetJobError (gxJob aJob,
+ OSErr anErr) FOURWORDINLINE(0x203C, 0x0000, 0x000F, 0xABFE);
+
+
+/*
+ Job Routines
+*/
+EXTERN_API( OSErr )
+GXNewJob (gxJob * aJob) FOURWORDINLINE(0x203C, 0x0000, 0x0002, 0xABFE);
+
+EXTERN_API( OSErr )
+GXDisposeJob (gxJob aJob) FOURWORDINLINE(0x203C, 0x0000, 0x0003, 0xABFE);
+
+EXTERN_API( void )
+GXFlattenJob (gxJob aJob,
+ GXPrintingFlattenUPP flattenProc,
+ void * aVoid) FOURWORDINLINE(0x203C, 0x0000, 0x0004, 0xABFE);
+
+EXTERN_API( gxJob )
+GXUnflattenJob (gxJob aJob,
+ GXPrintingFlattenUPP flattenProc,
+ void * aVoid) FOURWORDINLINE(0x203C, 0x0000, 0x0005, 0xABFE);
+
+EXTERN_API( Handle )
+GXFlattenJobToHdl (gxJob aJob,
+ Handle aHdl) FOURWORDINLINE(0x203C, 0x0000, 0x0006, 0xABFE);
+
+EXTERN_API( gxJob )
+GXUnflattenJobFromHdl (gxJob aJob,
+ Handle aHdl) FOURWORDINLINE(0x203C, 0x0000, 0x0007, 0xABFE);
+
+EXTERN_API( void )
+GXInstallApplicationOverride (gxJob aJob,
+ short messageID,
+ void * override) FOURWORDINLINE(0x203C, 0x0000, 0x0008, 0xABFE);
+
+EXTERN_API( Collection )
+GXGetJobCollection (gxJob aJob) FOURWORDINLINE(0x203C, 0x0000, 0x001D, 0xABFE);
+
+EXTERN_API( void *)
+GXGetJobRefCon (gxJob aJob) FOURWORDINLINE(0x203C, 0x0000, 0x001E, 0xABFE);
+
+EXTERN_API( void )
+GXSetJobRefCon (gxJob aJob,
+ void * refCon) FOURWORDINLINE(0x203C, 0x0000, 0x001F, 0xABFE);
+
+EXTERN_API( gxJob )
+GXCopyJob (gxJob srcJob,
+ gxJob dstJob) FOURWORDINLINE(0x203C, 0x0000, 0x0020, 0xABFE);
+
+EXTERN_API( void )
+GXSelectJobFormattingPrinter (gxJob aJob,
+ Str31 printerName) FOURWORDINLINE(0x203C, 0x0000, 0x0021, 0xABFE);
+
+EXTERN_API( void )
+GXSelectJobOutputPrinter (gxJob aJob,
+ Str31 printerName) FOURWORDINLINE(0x203C, 0x0000, 0x0022, 0xABFE);
+
+EXTERN_API( void )
+GXForEachJobFormatDo (gxJob aJob,
+ GXFormatUPP formatProc,
+ void * refCon) FOURWORDINLINE(0x203C, 0x0000, 0x0023, 0xABFE);
+
+EXTERN_API( long )
+GXCountJobFormats (gxJob aJob) FOURWORDINLINE(0x203C, 0x0000, 0x0024, 0xABFE);
+
+EXTERN_API( Boolean )
+GXUpdateJob (gxJob aJob) FOURWORDINLINE(0x203C, 0x0000, 0x0025, 0xABFE);
+
+EXTERN_API( void )
+GXConvertPrintRecord (gxJob aJob,
+ THPrint hPrint) FOURWORDINLINE(0x203C, 0x0000, 0x0026, 0xABFE);
+
+EXTERN_API( void )
+GXIdleJob (gxJob aJob) FOURWORDINLINE(0x203C, 0x0000, 0x0057, 0xABFE);
+
+
+/*
+ Job Format Modes Routines
+*/
+EXTERN_API( void )
+GXSetAvailableJobFormatModes (gxJob aJob,
+ gxJobFormatModeTableHdl formatModeTable) FOURWORDINLINE(0x203C, 0x0000, 0x003B, 0xABFE);
+
+EXTERN_API( gxJobFormatMode )
+GXGetPreferredJobFormatMode (gxJob aJob,
+ Boolean * directOnly) FOURWORDINLINE(0x203C, 0x0000, 0x003C, 0xABFE);
+
+EXTERN_API( gxJobFormatMode )
+GXGetJobFormatMode (gxJob aJob) FOURWORDINLINE(0x203C, 0x0000, 0x003D, 0xABFE);
+
+EXTERN_API( void )
+GXSetJobFormatMode (gxJob aJob,
+ gxJobFormatMode formatMode) FOURWORDINLINE(0x203C, 0x0000, 0x003E, 0xABFE);
+
+EXTERN_API( void )
+GXJobFormatModeQuery (gxJob aJob,
+ gxQueryType aQueryType,
+ void * srcData,
+ void * dstData) FOURWORDINLINE(0x203C, 0x0000, 0x003F, 0xABFE);
+
+
+/*
+ Format Routines
+*/
+EXTERN_API( gxFormat )
+GXNewFormat (gxJob aJob) FOURWORDINLINE(0x203C, 0x0000, 0x0009, 0xABFE);
+
+EXTERN_API( void )
+GXDisposeFormat (gxFormat aFormat) FOURWORDINLINE(0x203C, 0x0000, 0x000A, 0xABFE);
+
+EXTERN_API( gxFormat )
+GXGetJobFormat (gxJob aJob,
+ long whichFormat) FOURWORDINLINE(0x203C, 0x0000, 0x0013, 0xABFE);
+
+EXTERN_API( gxJob )
+GXGetFormatJob (gxFormat aFormat) FOURWORDINLINE(0x203C, 0x0000, 0x0014, 0xABFE);
+
+EXTERN_API( gxPaperType )
+GXGetFormatPaperType (gxFormat aFormat) FOURWORDINLINE(0x203C, 0x0000, 0x0015, 0xABFE);
+
+EXTERN_API( void )
+GXGetFormatDimensions (gxFormat aFormat,
+ gxRectangle * pageSize,
+ gxRectangle * paperSize) FOURWORDINLINE(0x203C, 0x0000, 0x0016, 0xABFE);
+
+EXTERN_API( Collection )
+GXGetFormatCollection (gxFormat aFormat) FOURWORDINLINE(0x203C, 0x0000, 0x0033, 0xABFE);
+
+EXTERN_API( void )
+GXChangedFormat (gxFormat aFormat) FOURWORDINLINE(0x203C, 0x0000, 0x0034, 0xABFE);
+
+EXTERN_API( gxFormat )
+GXCopyFormat (gxFormat srcFormat,
+ gxFormat dstFormat) FOURWORDINLINE(0x203C, 0x0000, 0x0035, 0xABFE);
+
+EXTERN_API( gxFormat )
+GXCloneFormat (gxFormat aFormat) FOURWORDINLINE(0x203C, 0x0000, 0x0036, 0xABFE);
+
+EXTERN_API( long )
+GXCountFormatOwners (gxFormat aFormat) FOURWORDINLINE(0x203C, 0x0000, 0x0037, 0xABFE);
+
+EXTERN_API( void )
+GXGetFormatMapping (gxFormat aFormat,
+ gxMapping * fmtMapping) FOURWORDINLINE(0x203C, 0x0000, 0x0038, 0xABFE);
+
+EXTERN_API( gxShape )
+GXGetFormatForm (gxFormat aFormat,
+ gxShape * mask) FOURWORDINLINE(0x203C, 0x0000, 0x0039, 0xABFE);
+
+EXTERN_API( void )
+GXSetFormatForm (gxFormat aFormat,
+ gxShape form,
+ gxShape mask) FOURWORDINLINE(0x203C, 0x0000, 0x003A, 0xABFE);
+
+
+/*
+ PaperType Routines
+*/
+EXTERN_API( gxPaperType )
+GXNewPaperType (gxJob aJob,
+ Str31 name,
+ gxRectangle * pageSize,
+ gxRectangle * paperSize) FOURWORDINLINE(0x203C, 0x0000, 0x000B, 0xABFE);
+
+EXTERN_API( void )
+GXDisposePaperType (gxPaperType aPaperType) FOURWORDINLINE(0x203C, 0x0000, 0x000C, 0xABFE);
+
+EXTERN_API( gxPaperType )
+GXGetNewPaperType (gxJob aJob,
+ short resID) FOURWORDINLINE(0x203C, 0x0000, 0x000D, 0xABFE);
+
+EXTERN_API( long )
+GXCountJobPaperTypes (gxJob aJob,
+ Boolean forFormatDevice) FOURWORDINLINE(0x203C, 0x0000, 0x0042, 0xABFE);
+
+EXTERN_API( gxPaperType )
+GXGetJobPaperType (gxJob aJob,
+ long whichPaperType,
+ Boolean forFormatDevice,
+ gxPaperType aPaperType) FOURWORDINLINE(0x203C, 0x0000, 0x0043, 0xABFE);
+
+EXTERN_API( void )
+GXForEachJobPaperTypeDo (gxJob aJob,
+ GXPaperTypeUPP aProc,
+ void * refCon,
+ Boolean forFormattingPrinter) FOURWORDINLINE(0x203C, 0x0000, 0x0044, 0xABFE);
+
+EXTERN_API( gxPaperType )
+GXCopyPaperType (gxPaperType srcPaperType,
+ gxPaperType dstPaperType) FOURWORDINLINE(0x203C, 0x0000, 0x0045, 0xABFE);
+
+EXTERN_API( void )
+GXGetPaperTypeName (gxPaperType aPaperType,
+ Str31 papertypeName) FOURWORDINLINE(0x203C, 0x0000, 0x0046, 0xABFE);
+
+EXTERN_API( void )
+GXGetPaperTypeDimensions (gxPaperType aPaperType,
+ gxRectangle * pageSize,
+ gxRectangle * paperSize) FOURWORDINLINE(0x203C, 0x0000, 0x0047, 0xABFE);
+
+EXTERN_API( gxJob )
+GXGetPaperTypeJob (gxPaperType aPaperType) FOURWORDINLINE(0x203C, 0x0000, 0x0048, 0xABFE);
+
+EXTERN_API( Collection )
+GXGetPaperTypeCollection (gxPaperType aPaperType) FOURWORDINLINE(0x203C, 0x0000, 0x0049, 0xABFE);
+
+
+/*
+ Printer Routines
+*/
+EXTERN_API( gxPrinter )
+GXGetJobFormattingPrinter (gxJob aJob) FOURWORDINLINE(0x203C, 0x0000, 0x0027, 0xABFE);
+
+EXTERN_API( gxPrinter )
+GXGetJobOutputPrinter (gxJob aJob) FOURWORDINLINE(0x203C, 0x0000, 0x0028, 0xABFE);
+
+EXTERN_API( gxPrinter )
+GXGetJobPrinter (gxJob aJob) FOURWORDINLINE(0x203C, 0x0000, 0x0029, 0xABFE);
+
+EXTERN_API( gxJob )
+GXGetPrinterJob (gxPrinter aPrinter) FOURWORDINLINE(0x203C, 0x0000, 0x002A, 0xABFE);
+
+EXTERN_API( void )
+GXForEachPrinterViewDeviceDo (gxPrinter aPrinter,
+ GXViewDeviceUPP aProc,
+ void * refCon) FOURWORDINLINE(0x203C, 0x0000, 0x002B, 0xABFE);
+
+EXTERN_API( long )
+GXCountPrinterViewDevices (gxPrinter aPrinter) FOURWORDINLINE(0x203C, 0x0000, 0x002C, 0xABFE);
+
+EXTERN_API( gxViewDevice )
+GXGetPrinterViewDevice (gxPrinter aPrinter,
+ long whichViewDevice) FOURWORDINLINE(0x203C, 0x0000, 0x002D, 0xABFE);
+
+EXTERN_API( void )
+GXSelectPrinterViewDevice (gxPrinter aPrinter,
+ long whichViewDevice) FOURWORDINLINE(0x203C, 0x0000, 0x002E, 0xABFE);
+
+EXTERN_API( void )
+GXGetPrinterName (gxPrinter aPrinter,
+ Str31 printerName) FOURWORDINLINE(0x203C, 0x0000, 0x002F, 0xABFE);
+
+EXTERN_API( OSType )
+GXGetPrinterType (gxPrinter aPrinter) FOURWORDINLINE(0x203C, 0x0000, 0x0030, 0xABFE);
+
+EXTERN_API( void )
+GXGetPrinterDriverName (gxPrinter aPrinter,
+ Str31 driverName) FOURWORDINLINE(0x203C, 0x0000, 0x0031, 0xABFE);
+
+EXTERN_API( OSType )
+GXGetPrinterDriverType (gxPrinter aPrinter) FOURWORDINLINE(0x203C, 0x0000, 0x0032, 0xABFE);
+
+
+/*
+ Dialog Routines
+*/
+EXTERN_API( gxDialogResult )
+GXJobDefaultFormatDialog (gxJob aJob,
+ gxEditMenuRecord * anEditMenuRec) FOURWORDINLINE(0x203C, 0x0000, 0x0010, 0xABFE);
+
+EXTERN_API( gxDialogResult )
+GXJobPrintDialog (gxJob aJob,
+ gxEditMenuRecord * anEditMenuRec) FOURWORDINLINE(0x203C, 0x0000, 0x0011, 0xABFE);
+
+EXTERN_API( gxDialogResult )
+GXFormatDialog (gxFormat aFormat,
+ gxEditMenuRecord * anEditMenuRec,
+ StringPtr title) FOURWORDINLINE(0x203C, 0x0000, 0x0012, 0xABFE);
+
+EXTERN_API( void )
+GXEnableJobScalingPanel (gxJob aJob,
+ Boolean enabled) FOURWORDINLINE(0x203C, 0x0000, 0x0040, 0xABFE);
+
+EXTERN_API( void )
+GXGetJobPanelDimensions (gxJob aJob,
+ Rect * panelArea) FOURWORDINLINE(0x203C, 0x0000, 0x0041, 0xABFE);
+
+
+/*
+ Spooling Routines
+*/
+EXTERN_API( void )
+GXGetJobPageRange (gxJob theJob,
+ long * firstPage,
+ long * lastPage) FOURWORDINLINE(0x203C, 0x0000, 0x0017, 0xABFE);
+
+EXTERN_API( void )
+GXStartJob (gxJob theJob,
+ StringPtr docName,
+ long pageCount) FOURWORDINLINE(0x203C, 0x0000, 0x0018, 0xABFE);
+
+EXTERN_API( void )
+GXPrintPage (gxJob theJob,
+ long pageNumber,
+ gxFormat theFormat,
+ gxShape thePage) FOURWORDINLINE(0x203C, 0x0000, 0x0019, 0xABFE);
+
+EXTERN_API( Boolean )
+GXStartPage (gxJob theJob,
+ long pageNumber,
+ gxFormat theFormat,
+ long numViewPorts,
+ gxViewPort * viewPortList) FOURWORDINLINE(0x203C, 0x0000, 0x001A, 0xABFE);
+
+EXTERN_API( void )
+GXFinishPage (gxJob theJob) FOURWORDINLINE(0x203C, 0x0000, 0x001B, 0xABFE);
+
+EXTERN_API( void )
+GXFinishJob (gxJob theJob) FOURWORDINLINE(0x203C, 0x0000, 0x001C, 0xABFE);
+
+
+/*
+ PrintFile Routines
+*/
+EXTERN_API( gxPrintFile )
+GXOpenPrintFile (gxJob theJob,
+ FSSpecPtr anFSSpec,
+ char permission) FOURWORDINLINE(0x203C, 0x0000, 0x004A, 0xABFE);
+
+EXTERN_API( void )
+GXClosePrintFile (gxPrintFile aPrintFile) FOURWORDINLINE(0x203C, 0x0000, 0x004B, 0xABFE);
+
+EXTERN_API( gxJob )
+GXGetPrintFileJob (gxPrintFile aPrintFile) FOURWORDINLINE(0x203C, 0x0000, 0x004C, 0xABFE);
+
+EXTERN_API( long )
+GXCountPrintFilePages (gxPrintFile aPrintFile) FOURWORDINLINE(0x203C, 0x0000, 0x004D, 0xABFE);
+
+EXTERN_API( void )
+GXReadPrintFilePage (gxPrintFile aPrintFile,
+ long pageNumber,
+ long numViewPorts,
+ gxViewPort * viewPortList,
+ gxFormat * pgFormat,
+ gxShape * pgShape) FOURWORDINLINE(0x203C, 0x0000, 0x004E, 0xABFE);
+
+EXTERN_API( void )
+GXReplacePrintFilePage (gxPrintFile aPrintFile,
+ long pageNumber,
+ gxFormat aFormat,
+ gxShape aShape) FOURWORDINLINE(0x203C, 0x0000, 0x004F, 0xABFE);
+
+EXTERN_API( void )
+GXInsertPrintFilePage (gxPrintFile aPrintFile,
+ long atPageNumber,
+ gxFormat pgFormat,
+ gxShape pgShape) FOURWORDINLINE(0x203C, 0x0000, 0x0050, 0xABFE);
+
+EXTERN_API( void )
+GXDeletePrintFilePageRange (gxPrintFile aPrintFile,
+ long fromPageNumber,
+ long toPageNumber) FOURWORDINLINE(0x203C, 0x0000, 0x0051, 0xABFE);
+
+EXTERN_API( void )
+GXSavePrintFile (gxPrintFile aPrintFile,
+ FSSpec * anFSSpec) FOURWORDINLINE(0x203C, 0x0000, 0x0052, 0xABFE);
+
+
+/*
+ ColorSync Routines
+*/
+EXTERN_API( long )
+GXFindPrinterProfile (gxPrinter aPrinter,
+ void * searchData,
+ long index,
+ gxColorProfile * returnedProfile) FOURWORDINLINE(0x203C, 0x0000, 0x0053, 0xABFE);
+
+EXTERN_API( long )
+GXFindFormatProfile (gxFormat aFormat,
+ void * searchData,
+ long index,
+ gxColorProfile * returnedProfile) FOURWORDINLINE(0x203C, 0x0000, 0x0054, 0xABFE);
+
+EXTERN_API( void )
+GXSetPrinterProfile (gxPrinter aPrinter,
+ gxColorProfile oldProfile,
+ gxColorProfile newProfile) FOURWORDINLINE(0x203C, 0x0000, 0x0055, 0xABFE);
+
+EXTERN_API( void )
+GXSetFormatProfile (gxFormat aFormat,
+ gxColorProfile oldProfile,
+ gxColorProfile newProfile) FOURWORDINLINE(0x203C, 0x0000, 0x0056, 0xABFE);
+
+
+/************************************************************************
+ Start of old "GXPrintingResEquates.h/a/p" interface file.
+ *************************************************************************/
+/* ------------------------------------
+ Basic client types
+ ------------------------------------ */
+#endif /* CALL_NOT_IN_CARBON */
+
+enum {
+ gxPrintingManagerType = FOUR_CHAR_CODE('pmgr'),
+ gxImagingSystemType = FOUR_CHAR_CODE('gxis'),
+ gxPrinterDriverType = FOUR_CHAR_CODE('pdvr'),
+ gxPrintingExtensionType = FOUR_CHAR_CODE('pext'),
+ gxUnknownPrinterType = FOUR_CHAR_CODE('none'),
+ gxAnyPrinterType = FOUR_CHAR_CODE('univ'),
+ gxQuickdrawPrinterType = FOUR_CHAR_CODE('qdrw'),
+ gxPortableDocPrinterType = FOUR_CHAR_CODE('gxpd'),
+ gxRasterPrinterType = FOUR_CHAR_CODE('rast'),
+ gxPostscriptPrinterType = FOUR_CHAR_CODE('post'),
+ gxVectorPrinterType = FOUR_CHAR_CODE('vect')
+};
+
+/* All pre-defined printing collection items have this ID */
+enum {
+ gxPrintingTagID = -28672
+};
+
+
+/* ----------------------------------------------------------------------
+
+ Resource types and IDs used by both extension and driver writers
+
+ ---------------------------------------------------------------------- */
+/* Resources in a printer driver or extension must be based off of these IDs */
+enum {
+ gxPrintingDriverBaseID = -27648,
+ gxPrintingExtensionBaseID = -27136
+};
+
+/* Override resources tell the system what messages a driver or extension
+ is overriding. A driver may have a series of these resources. */
+/* Override resource type for 68k resource-based code:*/
+
+enum {
+ gxOverrideType = FOUR_CHAR_CODE('over')
+};
+
+
+/* Override resource type for PowerPC datafork-based code:*/
+
+enum {
+ gxNativeOverrideType = FOUR_CHAR_CODE('povr')
+};
+
+
+/* --------------------------------------------------------------
+
+ Message ID definitions by both extension and driver writers
+
+ --------------------------------------------------------------- */
+/* Identifiers for universal message overrides. */
+enum {
+ gxInitializeMsg = 0,
+ gxShutDownMsg = 1,
+ gxJobIdleMsg = 2,
+ gxJobStatusMsg = 3,
+ gxPrintingEventMsg = 4,
+ gxJobDefaultFormatDialogMsg = 5,
+ gxFormatDialogMsg = 6,
+ gxJobPrintDialogMsg = 7,
+ gxFilterPanelEventMsg = 8,
+ gxHandlePanelEventMsg = 9,
+ gxParsePageRangeMsg = 10,
+ gxDefaultJobMsg = 11,
+ gxDefaultFormatMsg = 12,
+ gxDefaultPaperTypeMsg = 13,
+ gxDefaultPrinterMsg = 14,
+ gxCreateSpoolFileMsg = 15,
+ gxSpoolPageMsg = 16,
+ gxSpoolDataMsg = 17,
+ gxSpoolResourceMsg = 18,
+ gxCompleteSpoolFileMsg = 19,
+ gxCountPagesMsg = 20,
+ gxDespoolPageMsg = 21,
+ gxDespoolDataMsg = 22,
+ gxDespoolResourceMsg = 23,
+ gxCloseSpoolFileMsg = 24,
+ gxStartJobMsg = 25,
+ gxFinishJobMsg = 26,
+ gxStartPageMsg = 27,
+ gxFinishPageMsg = 28,
+ gxPrintPageMsg = 29,
+ gxSetupImageDataMsg = 30,
+ gxImageJobMsg = 31,
+ gxImageDocumentMsg = 32,
+ gxImagePageMsg = 33,
+ gxRenderPageMsg = 34,
+ gxCreateImageFileMsg = 35,
+ gxOpenConnectionMsg = 36,
+ gxCloseConnectionMsg = 37,
+ gxStartSendPageMsg = 38,
+ gxFinishSendPageMsg = 39,
+ gxWriteDataMsg = 40,
+ gxBufferDataMsg = 41,
+ gxDumpBufferMsg = 42,
+ gxFreeBufferMsg = 43,
+ gxCheckStatusMsg = 44,
+ gxGetDeviceStatusMsg = 45,
+ gxFetchTaggedDataMsg = 46,
+ gxGetDTPMenuListMsg = 47,
+ gxDTPMenuSelectMsg = 48,
+ gxHandleAlertFilterMsg = 49,
+ gxJobFormatModeQueryMsg = 50,
+ gxWriteStatusToDTPWindowMsg = 51,
+ gxInitializeStatusAlertMsg = 52,
+ gxHandleAlertStatusMsg = 53,
+ gxHandleAlertEventMsg = 54,
+ gxCleanupStartJobMsg = 55,
+ gxCleanupStartPageMsg = 56,
+ gxCleanupOpenConnectionMsg = 57,
+ gxCleanupStartSendPageMsg = 58,
+ gxDefaultDesktopPrinterMsg = 59,
+ gxCaptureOutputDeviceMsg = 60,
+ gxOpenConnectionRetryMsg = 61,
+ gxExamineSpoolFileMsg = 62,
+ gxFinishSendPlaneMsg = 63,
+ gxDoesPaperFitMsg = 64,
+ gxChooserMessageMsg = 65,
+ gxFindPrinterProfileMsg = 66,
+ gxFindFormatProfileMsg = 67,
+ gxSetPrinterProfileMsg = 68,
+ gxSetFormatProfileMsg = 69,
+ gxHandleAltDestinationMsg = 70,
+ gxSetupPageImageDataMsg = 71
+};
+
+
+/* Identifiers for Quickdraw message overrides. */
+enum {
+ gxPrOpenDocMsg = 0,
+ gxPrCloseDocMsg = 1,
+ gxPrOpenPageMsg = 2,
+ gxPrClosePageMsg = 3,
+ gxPrintDefaultMsg = 4,
+ gxPrStlDialogMsg = 5,
+ gxPrJobDialogMsg = 6,
+ gxPrStlInitMsg = 7,
+ gxPrJobInitMsg = 8,
+ gxPrDlgMainMsg = 9,
+ gxPrValidateMsg = 10,
+ gxPrJobMergeMsg = 11,
+ gxPrGeneralMsg = 12,
+ gxConvertPrintRecordToMsg = 13,
+ gxConvertPrintRecordFromMsg = 14,
+ gxPrintRecordToJobMsg = 15
+};
+
+
+/* Identifiers for raster imaging message overrides. */
+enum {
+ gxRasterDataInMsg = 0,
+ gxRasterLineFeedMsg = 1,
+ gxRasterPackageBitmapMsg = 2
+};
+
+
+/* Identifiers for PostScript imaging message overrides. */
+enum {
+ gxPostscriptQueryPrinterMsg = 0,
+ gxPostscriptInitializePrinterMsg = 1,
+ gxPostscriptResetPrinterMsg = 2,
+ gxPostscriptExitServerMsg = 3,
+ gxPostscriptGetStatusTextMsg = 4,
+ gxPostscriptGetPrinterTextMsg = 5,
+ gxPostscriptScanStatusTextMsg = 6,
+ gxPostscriptScanPrinterTextMsg = 7,
+ gxPostscriptGetDocumentProcSetListMsg = 8,
+ gxPostscriptDownloadProcSetListMsg = 9,
+ gxPostscriptGetPrinterGlyphsInformationMsg = 10,
+ gxPostscriptStreamFontMsg = 11,
+ gxPostscriptDoDocumentHeaderMsg = 12,
+ gxPostscriptDoDocumentSetUpMsg = 13,
+ gxPostscriptDoDocumentTrailerMsg = 14,
+ gxPostscriptDoPageSetUpMsg = 15,
+ gxPostscriptSelectPaperTypeMsg = 16,
+ gxPostscriptDoPageTrailerMsg = 17,
+ gxPostscriptEjectPageMsg = 18,
+ gxPostscriptProcessShapeMsg = 19,
+ gxPostScriptEjectPendingPageMsg = 20
+};
+
+
+/* Identifiers for Vector imaging message overrides. */
+enum {
+ gxVectorPackageDataMsg = 0,
+ gxVectorLoadPensMsg = 1,
+ gxVectorVectorizeShapeMsg = 2
+};
+
+
+/* Dialog related resource types */
+enum {
+ gxPrintingAlertType = FOUR_CHAR_CODE('plrt'),
+ gxStatusType = FOUR_CHAR_CODE('stat'),
+ gxExtendedDITLType = FOUR_CHAR_CODE('xdtl'),
+ gxPrintPanelType = FOUR_CHAR_CODE('ppnl'),
+ gxCollectionType = FOUR_CHAR_CODE('cltn')
+};
+
+
+/* Communication resource types */
+/*
+ The looker resource is used by the Chooser PACK to determine what kind
+ of communications this driver supports. (In order to generate/handle the
+ pop-up menu for "Connect via:".
+
+ The looker resource is also used by PrinterShare to determine the AppleTalk NBP Type
+ for servers created for this driver.
+*/
+enum {
+ gxLookerType = FOUR_CHAR_CODE('look'),
+ gxLookerID = -4096
+};
+
+
+/* The communications method and private data used to connect to the printer */
+enum {
+ gxDeviceCommunicationsType = FOUR_CHAR_CODE('comm')
+};
+
+/* -------------------------------------------------
+
+ Resource types and IDs used by extension writers
+
+ ------------------------------------------------- */
+enum {
+ gxExtensionUniversalOverrideID = gxPrintingExtensionBaseID
+};
+
+enum {
+ gxExtensionImagingOverrideSelectorID = gxPrintingExtensionBaseID
+};
+
+enum {
+ gxExtensionScopeType = FOUR_CHAR_CODE('scop'),
+ gxDriverScopeID = gxPrintingExtensionBaseID,
+ gxPrinterScopeID = gxPrintingExtensionBaseID + 1,
+ gxPrinterExceptionScopeID = gxPrintingExtensionBaseID + 2
+};
+
+enum {
+ gxExtensionLoadType = FOUR_CHAR_CODE('load'),
+ gxExtensionLoadID = gxPrintingExtensionBaseID
+};
+
+enum {
+ gxExtensionLoadFirst = 0x00000100,
+ gxExtensionLoadAnywhere = 0x7FFFFFFF,
+ gxExtensionLoadLast = (long)0xFFFFFF00
+};
+
+enum {
+ gxExtensionOptimizationType = FOUR_CHAR_CODE('eopt'),
+ gxExtensionOptimizationID = gxPrintingExtensionBaseID
+};
+
+
+/* -----------------------------------------------
+
+ Resource types and IDs used by driver writers
+
+ ----------------------------------------------- */
+enum {
+ gxDriverUniversalOverrideID = gxPrintingDriverBaseID,
+ gxDriverImagingOverrideID = gxPrintingDriverBaseID + 1,
+ gxDriverCompatibilityOverrideID = gxPrintingDriverBaseID + 2
+};
+
+enum {
+ gxDriverFileFormatType = FOUR_CHAR_CODE('pfil'),
+ gxDriverFileFormatID = gxPrintingDriverBaseID
+};
+
+
+enum {
+ gxDestinationAdditionType = FOUR_CHAR_CODE('dsta'),
+ gxDestinationAdditionID = gxPrintingDriverBaseID
+};
+
+
+/* IMAGING RESOURCES */
+/* The imaging system resource specifies which imaging system a printer
+ driver wishes to use. */
+
+enum {
+ gxImagingSystemSelectorType = FOUR_CHAR_CODE('isys'),
+ gxImagingSystemSelectorID = gxPrintingDriverBaseID
+};
+
+
+/* 'exft' resource ID -- exclude font list */
+enum {
+ kExcludeFontListType = FOUR_CHAR_CODE('exft'),
+ kExcludeFontListID = gxPrintingDriverBaseID
+};
+
+/* Resource for type for color matching */
+enum {
+ gxColorMatchingDataType = FOUR_CHAR_CODE('prof'),
+ gxColorMatchingDataID = gxPrintingDriverBaseID
+};
+
+
+/* Resource type and id for the tray count */
+enum {
+ gxTrayCountDataType = FOUR_CHAR_CODE('tray'),
+ gxTrayCountDataID = gxPrintingDriverBaseID
+};
+
+
+/* Resource type for the tray names */
+enum {
+ gxTrayNameDataType = FOUR_CHAR_CODE('tryn')
+};
+
+
+/* Resource type for manual feed preferences, stored in DTP. */
+enum {
+ gxManualFeedAlertPrefsType = FOUR_CHAR_CODE('mfpr'),
+ gxManualFeedAlertPrefsID = gxPrintingDriverBaseID
+};
+
+/* Resource type for desktop printer output characteristics, stored in DTP. */
+enum {
+ gxDriverOutputType = FOUR_CHAR_CODE('outp'),
+ gxDriverOutputTypeID = 1
+};
+
+
+/* IO Resources */
+/* Resource type and ID for default IO and buffering resources */
+enum {
+ gxUniversalIOPrefsType = FOUR_CHAR_CODE('iobm'),
+ gxUniversalIOPrefsID = gxPrintingDriverBaseID
+};
+
+
+/* Resource types and IDs for default implementation of CaptureOutputDevice.
+ The default implementation of CaptureOutputDevice only handles PAP devices */
+enum {
+ gxCaptureType = FOUR_CHAR_CODE('cpts'),
+ gxCaptureStringID = gxPrintingDriverBaseID,
+ gxReleaseStringID = gxPrintingDriverBaseID + 1,
+ gxUncapturedAppleTalkType = gxPrintingDriverBaseID + 2,
+ gxCapturedAppleTalkType = gxPrintingDriverBaseID + 3
+};
+
+
+/* Resource type and ID for custom halftone matrix */
+enum {
+ gxCustomMatrixType = FOUR_CHAR_CODE('dmat'),
+ gxCustomMatrixID = gxPrintingDriverBaseID
+};
+
+/* Resource type and ID for raster driver rendering preferences */
+enum {
+ gxRasterPrefsType = FOUR_CHAR_CODE('rdip'),
+ gxRasterPrefsID = gxPrintingDriverBaseID
+};
+
+
+/* Resource type for specifiying a colorset */
+enum {
+ gxColorSetResType = FOUR_CHAR_CODE('crst')
+};
+
+
+/* Resource type and ID for raster driver packaging preferences */
+enum {
+ gxRasterPackType = FOUR_CHAR_CODE('rpck'),
+ gxRasterPackID = gxPrintingDriverBaseID
+};
+
+
+/* Resource type and ID for raster driver packaging options */
+
+enum {
+ gxRasterNumNone = 0, /* Number isn't output at all */
+ gxRasterNumDirect = 1, /* Lowest minWidth bytes as data */
+ gxRasterNumToASCII = 2 /* minWidth ASCII characters */
+};
+
+
+enum {
+ gxRasterPackOptionsType = FOUR_CHAR_CODE('ropt'),
+ gxRasterPackOptionsID = gxPrintingDriverBaseID
+};
+
+
+/* Resource type for the PostScript imaging system procedure set control resource */
+enum {
+ gxPostscriptProcSetControlType = FOUR_CHAR_CODE('prec')
+};
+
+
+/* Resource type for the PostScript imaging system printer font resource */
+enum {
+ gxPostscriptPrinterFontType = FOUR_CHAR_CODE('pfnt')
+};
+
+
+/* Resource type and ID for the PostScript imaging system imaging preferences */
+enum {
+ gxPostscriptPrefsType = FOUR_CHAR_CODE('pdip'),
+ gxPostscriptPrefsID = gxPrintingDriverBaseID
+};
+
+/* Resource type and ID for the PostScript imaging system default scanning code */
+enum {
+ gxPostscriptScanningType = FOUR_CHAR_CODE('scan'),
+ gxPostscriptScanningID = gxPrintingDriverBaseID
+};
+
+
+/* Old Application Support Resources */
+enum {
+ gxCustType = FOUR_CHAR_CODE('cust'),
+ gxCustID = -8192
+};
+
+
+enum {
+ gxReslType = FOUR_CHAR_CODE('resl'),
+ gxReslID = -8192
+};
+
+
+enum {
+ gxDiscreteResolution = 0
+};
+
+
+enum {
+ gxStlDialogResID = -8192
+};
+
+
+enum {
+ gxJobDialogResID = -8191
+};
+
+
+enum {
+ gxScaleTableType = FOUR_CHAR_CODE('stab'),
+ gxDITLControlType = FOUR_CHAR_CODE('dctl')
+};
+
+/* The default implementation of gxPrintDefault loads and
+ PrValidates a print record stored in the following driver resource. */
+enum {
+ gxPrintRecordType = FOUR_CHAR_CODE('PREC'),
+ gxDefaultPrintRecordID = 0
+};
+
+
+/*
+ -----------------------------------------------
+
+ Resource types and IDs used in papertype files
+
+ -----------------------------------------------
+*/
+/* Resource type and ID for driver papertypes placed in individual files */
+enum {
+ gxSignatureType = FOUR_CHAR_CODE('sig '),
+ gxPapertypeSignatureID = 0
+};
+
+
+/* Papertype creator types */
+enum {
+ gxDrvrPaperType = FOUR_CHAR_CODE('drpt'),
+ gxSysPaperType = FOUR_CHAR_CODE('sypt'), /* System paper type creator */
+ gxUserPaperType = FOUR_CHAR_CODE('uspt'), /* User paper type creator */
+ /* Driver creator types == driver file's creator value */
+ gxPaperTypeType = FOUR_CHAR_CODE('ptyp')
+};
+
+
+/*********************************************************************
+ Start of old "GXPrintingMessages.h/a/p" interface file.
+ **********************************************************************/
+/* ------------------------------------------------------------------------------
+
+ Constants and Types
+
+-------------------------------------------------------------------------------- */
+/*
+
+ ABSTRACT DATA TYPES
+
+*/
+typedef struct OpaquegxSpoolFile* gxSpoolFile;
+/*
+
+ DIALOG PANEL CONSTANTS AND TYPES
+
+*/
+
+typedef long gxPanelEvent;
+/* Dialog panel event equates */
+enum {
+ gxPanelNoEvt = 0L,
+ gxPanelOpenEvt = 1L, /* Initialize and draw */
+ gxPanelCloseEvt = 2L, /* Your panel is going away (panel switchL, confirm or cancel) */
+ gxPanelHitEvt = 3L, /* There's a hit in your panel */
+ gxPanelActivateEvt = 4L, /* The dialog window has just been activated */
+ gxPanelDeactivateEvt = 5L, /* The dialog window is about to be deactivated */
+ gxPanelIconFocusEvt = 6L, /* The focus changes from the panel to the icon list */
+ gxPanelPanelFocusEvt = 7L, /* The focus changes from the icon list to the panel */
+ gxPanelFilterEvt = 8L, /* Every event is filtered */
+ gxPanelCancelEvt = 9L, /* The user has cancelled the dialog */
+ gxPanelConfirmEvt = 10L, /* The user has confirmed the dialog */
+ gxPanelDialogEvt = 11L, /* Event to be handle by dialoghandler */
+ gxPanelOtherEvt = 12L, /* osEvts, etc. */
+ gxPanelUserWillConfirmEvt = 13L /* User has selected confirm, time to parse panel interdependencies */
+};
+
+
+/* Constants for panel responses to dialog handler calls */
+typedef long gxPanelResult;
+enum {
+ gxPanelNoResult = 0,
+ gxPanelCancelConfirmation = 1 /* Only valid from panelUserWillConfirmEvt - used to keep the dialog from going away */
+};
+
+
+/* Panel event info record for FilterPanelEvent and HandlePanelEvent messages */
+
+struct gxPanelInfoRecord {
+ gxPanelEvent panelEvt; /* Why we were called */
+ short panelResId; /* 'ppnl' resource ID of current panel */
+ DialogPtr pDlg; /* Pointer to dialog */
+ EventRecord * theEvent; /* Pointer to event */
+ short itemHit; /* Actual item number as Dialog Mgr thinks */
+ short itemCount; /* Number of items before your items */
+ short evtAction; /* Once this event is processed, the action that will result */
+ /* (evtAction is only meaningful during filtering) */
+ short errorStringId; /* STR ID of string to put in error alert (0 means no string) */
+ gxFormat theFormat; /* The current format (only meaningful in a format dialog) */
+ void * refCon; /* refCon passed in PanelSetupRecord */
+};
+typedef struct gxPanelInfoRecord gxPanelInfoRecord;
+/* Constants for the evtAction field in PanelInfoRecord */
+enum {
+ gxOtherAction = 0, /* Current item will not change */
+ gxClosePanelAction = 1, /* Panel will be closed */
+ gxCancelDialogAction = 2, /* Dialog will be cancelled */
+ gxConfirmDialogAction = 3 /* Dialog will be confirmed */
+};
+
+
+/* Constants for the panelKind field in gxPanelSetupRecord */
+
+typedef long gxPrintingPanelKind;
+/* The gxPanelSetupInfo structure is passed to GXSetupDialogPanel */
+
+struct gxPanelSetupRecord {
+ gxPrintingPanelKind panelKind;
+ short panelResId;
+ short resourceRefNum;
+ void * refCon;
+};
+typedef struct gxPanelSetupRecord gxPanelSetupRecord;
+enum {
+ gxApplicationPanel = 0L,
+ gxExtensionPanel = 1L,
+ gxDriverPanel = 2L
+};
+
+
+/* Constants returned by gxParsePageRange message */
+
+typedef long gxParsePageRangeResult;
+enum {
+ gxRangeNotParsed = 0L, /* Default initial value */
+ gxRangeParsed = 1L, /* Range has been parsed */
+ gxRangeBadFromValue = 2L, /* From value is bad */
+ gxRangeBadToValue = 3L /* To value is bad */
+};
+
+/*
+
+ STATUS-RELATED CONSTANTS AND TYPES
+
+*/
+
+/* Structure for status messages */
+
+struct gxStatusRecord {
+ unsigned short statusType; /* One of the ids listed above (nonFatalError, etc. ) */
+ unsigned short statusId; /* Specific status (out of paper, etc.) */
+ unsigned short statusAlertId; /* Printing alert ID (if any) for status */
+ gxOwnerSignature statusOwner; /* Creator type of status owner */
+ short statResId; /* ID for 'stat' resource */
+ short statResIndex; /* Index into 'stat' resource for this status */
+ short dialogResult; /* ID of button string selected on dismissal of printing alert */
+ unsigned short bufferLen; /* Number of bytes in status buffer - total record size must be <= 512 */
+ char statusBuffer[1]; /* User response from alert */
+};
+typedef struct gxStatusRecord gxStatusRecord;
+
+/* Constants for statusType field of gxStatusRecord */
+enum {
+ gxNonFatalError = 1, /* An error occurred, but the job can continue */
+ gxFatalError = 2, /* A fatal error occurred-- halt job */
+ gxPrinterReady = 3, /* Tells QDGX to leave alert mode */
+ gxUserAttention = 4, /* Signals initiation of a modal alert */
+ gxUserAlert = 5, /* Signals initiation of a moveable modal alert */
+ gxPageTransmission = 6, /* Signals page sent to printer, increments page count in strings to user */
+ gxOpenConnectionStatus = 7, /* Signals QDGX to begin animation on printer icon */
+ gxInformationalStatus = 8, /* Default status type, no side effects */
+ gxSpoolingPageStatus = 9, /* Signals page spooled, increments page count in spooling dialog */
+ gxEndStatus = 10, /* Signals end of spooling */
+ gxPercentageStatus = 11 /* Signals QDGX as to the amount of the job which is currently complete */
+};
+
+
+/* Structure for gxWriteStatusToDTPWindow message */
+
+struct gxDisplayRecord {
+ Boolean useText; /* Use text as opposed to a picture */
+ char padByte;
+ Handle hPicture; /* if !useText, the picture handle */
+ Str255 theText; /* if useText, the text */
+};
+typedef struct gxDisplayRecord gxDisplayRecord;
+
+/*-----------------------------------------------*/
+/* paper mapping-related constants and types... */
+/*-----------------------------------------------*/
+
+
+typedef long gxTrayMapping;
+enum {
+ gxDefaultTrayMapping = 0L,
+ gxConfiguredTrayMapping = 1L
+};
+
+
+
+/* ------------------------------------------------------------------------------
+
+ API Functions callable only from within message overrides
+
+-------------------------------------------------------------------------------- */
+#define GXPRINTINGDISPATCH(segID, selector) {0x203C, 0x0001, 0, 0x223C, (segID & 0x0FFF), selector << 2, 0xABFE}
+
+/*
+ Message Sending API Routines
+*/
+#if TARGET_CPU_68K
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSErr )
+GXPrintingDispatch (long selector,
+ ...) SIXWORDINLINE(0x221F, 0x203C, 0x0001, 0x0000, 0xABFE, 0x598F);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_CPU_68K */
+
+/*
+
+ How to use the GXPRINTINGDISPATCH macro...
+
+ If your driver or extension is large, you may want to segment it
+ across smaller boundaries than is permitted by the messaging system.
+ Without using the Printing Manager's segmentation manager directly,
+ the smallest segment you can create consists of the code to override
+ a single message. If you are overriding workhorse messages such as
+ RenderPage, you may want to divide up the work among many functions
+ distributed across several segments. Here's how...
+
+ The Printing Manager segment scheme involves the construction of a
+ single 32-bit dispatch selector, which contains all the information
+ necessary for the dispatcher to find a single routine. It contains the
+ segment's resource ID, and the offset within the segment which contains
+ the start of the routine. The GXPRINTINGDISPATCH macro will construct the
+ dispatch selector for you, as well as the code to do the dispatch.
+
+ Usually, it is convenient to start your segment with a long aligned jump table,
+ beginning after the 4 byte header required by the Printing Manager. The
+ macro assumes this is the case and takes a 1-based routine selector from
+ which it conmstructs the offset.
+
+ For example, if your code is in resource 'pdvr' (print driver), ID=2
+ at offset=12 (third routine in segment), you would declare your
+ routine as follows:
+
+ OSErr MyRenderingRoutine (long param1, Ptr param2)
+ = GXPRINTINGDISPATCH(2, 3);
+
+ Remember, ALL segment dispatches must return OSErr. If your routine
+ does not generate errors, you must still declare it to return OSErr
+ and have the routine itself return noErr.
+
+ An alternative way to call across segments is to call the GXPrintingDispatch
+ function directly. You must construct the 32-bit selector yourself and pass
+ it as the first parameter. This is usually not preferable since you don't get
+ type-checking unless you declare a prototype as shown above, and your code
+ isn't as easy to read.
+
+ So given the above prototype, there are two ways to call the function:
+
+ anErr = MyRenderingRoutine(p1, p2); // Free type checking!
+
+ or:
+
+ #define kMyRenderRoutineSelector 0x0002000C
+ anErr = GXPrintingDispatch(kMyRenderRoutineSelector, p1, p2); // No type-checking!
+
+
+ Both have the same effect.
+
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( gxJob )
+GXGetJob (void) FOURWORDINLINE(0x203C, 0x0001, 0x0001, 0xABFE);
+
+EXTERN_API_C( short )
+GXGetMessageHandlerResFile (void) FOURWORDINLINE(0x203C, 0x0001, 0x0002, 0xABFE);
+
+EXTERN_API_C( Boolean )
+GXSpoolingAborted (void) FOURWORDINLINE(0x203C, 0x0001, 0x0003, 0xABFE);
+
+EXTERN_API_C( OSErr )
+GXJobIdle (void) FOURWORDINLINE(0x203C, 0x0001, 0x0004, 0xABFE);
+
+EXTERN_API_C( OSErr )
+GXReportStatus (long statusID,
+ unsigned long statusIndex) FOURWORDINLINE(0x203C, 0x0001, 0x0005, 0xABFE);
+
+EXTERN_API_C( OSErr )
+GXAlertTheUser (gxStatusRecord * statusRec) FOURWORDINLINE(0x203C, 0x0001, 0x0006, 0xABFE);
+
+EXTERN_API_C( OSErr )
+GXSetupDialogPanel (gxPanelSetupRecord * panelRec) FOURWORDINLINE(0x203C, 0x0001, 0x0007, 0xABFE);
+
+EXTERN_API_C( OSErr )
+GXCountTrays (gxTrayIndex * numTrays) FOURWORDINLINE(0x203C, 0x0001, 0x0008, 0xABFE);
+
+EXTERN_API_C( OSErr )
+GXGetTrayName (gxTrayIndex trayNumber,
+ Str31 trayName) FOURWORDINLINE(0x203C, 0x0001, 0x0009, 0xABFE);
+
+EXTERN_API_C( OSErr )
+GXSetTrayPaperType (gxTrayIndex whichTray,
+ gxPaperType aPapertype) FOURWORDINLINE(0x203C, 0x0001, 0x000A, 0xABFE);
+
+EXTERN_API_C( OSErr )
+GXGetTrayPaperType (gxTrayIndex whichTray,
+ gxPaperType aPapertype) FOURWORDINLINE(0x203C, 0x0001, 0x000B, 0xABFE);
+
+EXTERN_API_C( OSErr )
+GXGetTrayMapping (gxTrayMapping * trayMapping) FOURWORDINLINE(0x203C, 0x0001, 0x000C, 0xABFE);
+
+EXTERN_API_C( void )
+GXCleanupStartJob (void) FOURWORDINLINE(0x203C, 0x0001, 0x000D, 0xABFE);
+
+EXTERN_API_C( void )
+GXCleanupStartPage (void) FOURWORDINLINE(0x203C, 0x0001, 0x000E, 0xABFE);
+
+EXTERN_API_C( void )
+GXCleanupOpenConnection (void) FOURWORDINLINE(0x203C, 0x0001, 0x000F, 0xABFE);
+
+EXTERN_API_C( void )
+GXCleanupStartSendPage (void) FOURWORDINLINE(0x203C, 0x0001, 0x0010, 0xABFE);
+
+
+/* ------------------------------------------------------------------------------
+
+ Constants and types for Universal Printing Messages
+
+-------------------------------------------------------------------------------- */
+
+/* Options for gxCreateSpoolFile message */
+#endif /* CALL_NOT_IN_CARBON */
+
+enum {
+ gxNoCreateOptions = 0x00000000, /* Just create the file */
+ gxInhibitAlias = 0x00000001, /* Do not create an alias in the PMD folder */
+ gxInhibitUniqueName = 0x00000002, /* Do not append to the filename to make it unique */
+ gxResolveBitmapAlias = 0x00000004 /* Resolve bitmap aliases and duplicate data in file */
+};
+
+
+/* Options for gxCloseSpoolFile message */
+enum {
+ gxNoCloseOptions = 0x00000000, /* Just close the file */
+ gxDeleteOnClose = 0x00000001, /* Delete the file rather than closing it */
+ gxUpdateJobData = 0x00000002, /* Write current job information into file prior to closing */
+ gxMakeRemoteFile = 0x00000004 /* Mark job as a remote file */
+};
+
+
+/* Options for gxCreateImageFile message */
+enum {
+ gxNoImageFile = 0x00000000, /* Don't create image file */
+ gxMakeImageFile = 0x00000001, /* Create an image file */
+ gxEachPlane = 0x00000002, /* Only save up planes before rewinding */
+ gxEachPage = 0x00000004, /* Save up entire pages before rewinding */
+ gxEntireFile = gxEachPlane + gxEachPage /* Save up the entire file before rewinding */
+};
+
+
+/* Options for gxBufferData message */
+enum {
+ gxNoBufferOptions = 0x00000000,
+ gxMakeBufferHex = 0x00000001,
+ gxDontSplitBuffer = 0x00000002
+};
+
+
+/* Structure for gxDumpBuffer and gxFreeBuffer messages */
+
+struct gxPrintingBuffer {
+ long size; /* Size of buffer in bytes */
+ long userData; /* Client assigned id for the buffer */
+ char data[1]; /* Array of size bytes */
+};
+typedef struct gxPrintingBuffer gxPrintingBuffer;
+
+/* Structure for gxRenderPage message */
+
+struct gxPageInfoRecord {
+ long docPageNum; /* Number of page being printed */
+ long copyNum; /* Copy number being printed */
+ Boolean formatChanged; /* True if format changed from last page */
+ Boolean pageChanged; /* True if page contents changed from last page */
+ long internalUse; /* Private */
+};
+typedef struct gxPageInfoRecord gxPageInfoRecord;
+/* ------------------------------------------------------------------------------
+
+ Universal Printing Messages
+
+ -------------------------------------------------------------------------------- */
+typedef CALLBACK_API_C( OSErr , GXJobIdleProcPtr )(void );
+typedef STACK_UPP_TYPE(GXJobIdleProcPtr) GXJobIdleUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXJobIdleUPP)
+ NewGXJobIdleUPP (GXJobIdleProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXJobIdleUPP (GXJobIdleUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXJobIdleUPP (GXJobIdleUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXJobIdleProcInfo = 0x00000021 }; /* 2_bytes Func() */
+ #define NewGXJobIdleUPP(userRoutine) (GXJobIdleUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXJobIdleProcInfo, GetCurrentArchitecture())
+ #define DisposeGXJobIdleUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXJobIdleUPP(userUPP) (OSErr)CALL_ZERO_PARAMETER_UPP((userUPP), uppGXJobIdleProcInfo)
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXJobIdleProc(userRoutine) NewGXJobIdleUPP(userRoutine)
+#define CallGXJobIdleProc(userRoutine) InvokeGXJobIdleUPP(userRoutine)
+#define Send_GXJobIdle() MacSendMessage(0x00000002)
+#define Forward_GXJobIdle() ForwardThisMessage((void *) (0))
+
+typedef CALLBACK_API_C( OSErr , GXJobStatusProcPtr )(gxStatusRecord *pStatus);
+typedef STACK_UPP_TYPE(GXJobStatusProcPtr) GXJobStatusUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXJobStatusUPP)
+ NewGXJobStatusUPP (GXJobStatusProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXJobStatusUPP (GXJobStatusUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXJobStatusUPP (gxStatusRecord * pStatus,
+ GXJobStatusUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXJobStatusProcInfo = 0x000000E1 }; /* 2_bytes Func(4_bytes) */
+ #define NewGXJobStatusUPP(userRoutine) (GXJobStatusUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXJobStatusProcInfo, GetCurrentArchitecture())
+ #define DisposeGXJobStatusUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXJobStatusUPP(pStatus, userUPP) (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXJobStatusProcInfo, (pStatus))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXJobStatusProc(userRoutine) NewGXJobStatusUPP(userRoutine)
+#define CallGXJobStatusProc(userRoutine, pStatus) InvokeGXJobStatusUPP(pStatus, userRoutine)
+#define Send_GXJobStatus(pStatus) \
+ MacSendMessage(0x00000003, pStatus)
+
+#define Forward_GXJobStatus(pStatus) \
+ ForwardThisMessage((void *) (pStatus))
+
+typedef CALLBACK_API_C( OSErr , GXPrintingEventProcPtr )(EventRecord *evtRecord, Boolean filterEvent);
+typedef STACK_UPP_TYPE(GXPrintingEventProcPtr) GXPrintingEventUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXPrintingEventUPP)
+ NewGXPrintingEventUPP (GXPrintingEventProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXPrintingEventUPP (GXPrintingEventUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXPrintingEventUPP (EventRecord * evtRecord,
+ Boolean filterEvent,
+ GXPrintingEventUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXPrintingEventProcInfo = 0x000001E1 }; /* 2_bytes Func(4_bytes, 1_byte) */
+ #define NewGXPrintingEventUPP(userRoutine) (GXPrintingEventUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXPrintingEventProcInfo, GetCurrentArchitecture())
+ #define DisposeGXPrintingEventUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXPrintingEventUPP(evtRecord, filterEvent, userUPP) (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppGXPrintingEventProcInfo, (evtRecord), (filterEvent))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXPrintingEventProc(userRoutine) NewGXPrintingEventUPP(userRoutine)
+#define CallGXPrintingEventProc(userRoutine, evtRecord, filterEvent) InvokeGXPrintingEventUPP(evtRecord, filterEvent, userRoutine)
+#define Send_GXPrintingEvent(evtRecord, filterEvent) \
+ MacSendMessage(0x00000004, evtRecord, filterEvent)
+
+#define Forward_GXPrintingEvent(evtRecord, filterEvent) \
+ ForwardThisMessage((void *) (evtRecord), (void *) (filterEvent))
+
+typedef CALLBACK_API_C( OSErr , GXJobDefaultFormatDialogProcPtr )(gxDialogResult *dlgResult);
+typedef STACK_UPP_TYPE(GXJobDefaultFormatDialogProcPtr) GXJobDefaultFormatDialogUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXJobDefaultFormatDialogUPP)
+ NewGXJobDefaultFormatDialogUPP (GXJobDefaultFormatDialogProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXJobDefaultFormatDialogUPP (GXJobDefaultFormatDialogUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXJobDefaultFormatDialogUPP (gxDialogResult * dlgResult,
+ GXJobDefaultFormatDialogUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXJobDefaultFormatDialogProcInfo = 0x000000E1 }; /* 2_bytes Func(4_bytes) */
+ #define NewGXJobDefaultFormatDialogUPP(userRoutine) (GXJobDefaultFormatDialogUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXJobDefaultFormatDialogProcInfo, GetCurrentArchitecture())
+ #define DisposeGXJobDefaultFormatDialogUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXJobDefaultFormatDialogUPP(dlgResult, userUPP) (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXJobDefaultFormatDialogProcInfo, (dlgResult))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXJobDefaultFormatDialogProc(userRoutine) NewGXJobDefaultFormatDialogUPP(userRoutine)
+#define CallGXJobDefaultFormatDialogProc(userRoutine, dlgResult) InvokeGXJobDefaultFormatDialogUPP(dlgResult, userRoutine)
+#define Send_GXJobDefaultFormatDialog(dlgResult) \
+ MacSendMessage(0x00000005, dlgResult)
+
+#define Forward_GXJobDefaultFormatDialog(dlgResult) \
+ ForwardThisMessage((void *) (dlgResult))
+
+typedef CALLBACK_API_C( OSErr , GXFormatDialogProcPtr )(gxFormat theFormat, StringPtr title, gxDialogResult *dlgResult);
+typedef STACK_UPP_TYPE(GXFormatDialogProcPtr) GXFormatDialogUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXFormatDialogUPP)
+ NewGXFormatDialogUPP (GXFormatDialogProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXFormatDialogUPP (GXFormatDialogUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXFormatDialogUPP (gxFormat theFormat,
+ StringPtr title,
+ gxDialogResult * dlgResult,
+ GXFormatDialogUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXFormatDialogProcInfo = 0x00000FE1 }; /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ #define NewGXFormatDialogUPP(userRoutine) (GXFormatDialogUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFormatDialogProcInfo, GetCurrentArchitecture())
+ #define DisposeGXFormatDialogUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXFormatDialogUPP(theFormat, title, dlgResult, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGXFormatDialogProcInfo, (theFormat), (title), (dlgResult))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXFormatDialogProc(userRoutine) NewGXFormatDialogUPP(userRoutine)
+#define CallGXFormatDialogProc(userRoutine, theFormat, title, dlgResult) InvokeGXFormatDialogUPP(theFormat, title, dlgResult, userRoutine)
+#define Send_GXFormatDialog(theFormat, title, dlgResult) \
+ MacSendMessage(0x00000006, theFormat, title, dlgResult)
+
+#define Forward_GXFormatDialog(theFormat, title, dlgResult) \
+ ForwardThisMessage((void *) (theFormat),(void *) (title),(void *) (dlgResult))
+
+typedef CALLBACK_API_C( OSErr , GXJobPrintDialogProcPtr )(gxDialogResult *dlgResult);
+typedef STACK_UPP_TYPE(GXJobPrintDialogProcPtr) GXJobPrintDialogUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXJobPrintDialogUPP)
+ NewGXJobPrintDialogUPP (GXJobPrintDialogProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXJobPrintDialogUPP (GXJobPrintDialogUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXJobPrintDialogUPP (gxDialogResult * dlgResult,
+ GXJobPrintDialogUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXJobPrintDialogProcInfo = 0x000000E1 }; /* 2_bytes Func(4_bytes) */
+ #define NewGXJobPrintDialogUPP(userRoutine) (GXJobPrintDialogUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXJobPrintDialogProcInfo, GetCurrentArchitecture())
+ #define DisposeGXJobPrintDialogUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXJobPrintDialogUPP(dlgResult, userUPP) (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXJobPrintDialogProcInfo, (dlgResult))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXJobPrintDialogProc(userRoutine) NewGXJobPrintDialogUPP(userRoutine)
+#define CallGXJobPrintDialogProc(userRoutine, dlgResult) InvokeGXJobPrintDialogUPP(dlgResult, userRoutine)
+#define Send_GXJobPrintDialog(dlgResult) \
+ MacSendMessage(0x00000007, dlgResult)
+
+#define Forward_GXJobPrintDialog(dlgResult) \
+ ForwardThisMessage((void *) (dlgResult))
+
+typedef CALLBACK_API_C( OSErr , GXFilterPanelEventProcPtr )(gxPanelInfoRecord *pHitInfo, Boolean *returnImmed);
+typedef STACK_UPP_TYPE(GXFilterPanelEventProcPtr) GXFilterPanelEventUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXFilterPanelEventUPP)
+ NewGXFilterPanelEventUPP (GXFilterPanelEventProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXFilterPanelEventUPP (GXFilterPanelEventUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXFilterPanelEventUPP (gxPanelInfoRecord * pHitInfo,
+ Boolean * returnImmed,
+ GXFilterPanelEventUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXFilterPanelEventProcInfo = 0x000003E1 }; /* 2_bytes Func(4_bytes, 4_bytes) */
+ #define NewGXFilterPanelEventUPP(userRoutine) (GXFilterPanelEventUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFilterPanelEventProcInfo, GetCurrentArchitecture())
+ #define DisposeGXFilterPanelEventUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXFilterPanelEventUPP(pHitInfo, returnImmed, userUPP) (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppGXFilterPanelEventProcInfo, (pHitInfo), (returnImmed))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXFilterPanelEventProc(userRoutine) NewGXFilterPanelEventUPP(userRoutine)
+#define CallGXFilterPanelEventProc(userRoutine, pHitInfo, returnImmed) InvokeGXFilterPanelEventUPP(pHitInfo, returnImmed, userRoutine)
+#define Send_GXFilterPanelEvent(pHitInfo, returnImmed) \
+ MacSendMessage(0x00000008, pHitInfo, returnImmed)
+
+typedef CALLBACK_API_C( OSErr , GXHandlePanelEventProcPtr )(gxPanelInfoRecord *pHitInfo, gxPanelResult *panelResponse);
+typedef STACK_UPP_TYPE(GXHandlePanelEventProcPtr) GXHandlePanelEventUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXHandlePanelEventUPP)
+ NewGXHandlePanelEventUPP (GXHandlePanelEventProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXHandlePanelEventUPP (GXHandlePanelEventUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXHandlePanelEventUPP (gxPanelInfoRecord * pHitInfo,
+ gxPanelResult * panelResponse,
+ GXHandlePanelEventUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXHandlePanelEventProcInfo = 0x000003E1 }; /* 2_bytes Func(4_bytes, 4_bytes) */
+ #define NewGXHandlePanelEventUPP(userRoutine) (GXHandlePanelEventUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXHandlePanelEventProcInfo, GetCurrentArchitecture())
+ #define DisposeGXHandlePanelEventUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXHandlePanelEventUPP(pHitInfo, panelResponse, userUPP) (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppGXHandlePanelEventProcInfo, (pHitInfo), (panelResponse))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXHandlePanelEventProc(userRoutine) NewGXHandlePanelEventUPP(userRoutine)
+#define CallGXHandlePanelEventProc(userRoutine, pHitInfo, panelResponse) InvokeGXHandlePanelEventUPP(pHitInfo, panelResponse, userRoutine)
+#define Send_GXHandlePanelEvent(pHitInfo, panelResponse) \
+ MacSendMessage(0x00000009, pHitInfo, panelResponse)
+
+typedef CALLBACK_API_C( OSErr , GXParsePageRangeProcPtr )(StringPtr fromString, StringPtr toString, gxParsePageRangeResult *result);
+typedef STACK_UPP_TYPE(GXParsePageRangeProcPtr) GXParsePageRangeUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXParsePageRangeUPP)
+ NewGXParsePageRangeUPP (GXParsePageRangeProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXParsePageRangeUPP (GXParsePageRangeUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXParsePageRangeUPP (StringPtr fromString,
+ StringPtr toString,
+ gxParsePageRangeResult * result,
+ GXParsePageRangeUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXParsePageRangeProcInfo = 0x00000FE1 }; /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ #define NewGXParsePageRangeUPP(userRoutine) (GXParsePageRangeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXParsePageRangeProcInfo, GetCurrentArchitecture())
+ #define DisposeGXParsePageRangeUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXParsePageRangeUPP(fromString, toString, result, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGXParsePageRangeProcInfo, (fromString), (toString), (result))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXParsePageRangeProc(userRoutine) NewGXParsePageRangeUPP(userRoutine)
+#define CallGXParsePageRangeProc(userRoutine, fromString, toString, result) InvokeGXParsePageRangeUPP(fromString, toString, result, userRoutine)
+#define Send_GXParsePageRange(fromString, toString, result) \
+ MacSendMessage(0x0000000A, fromString, toString, result)
+
+#define Forward_GXParsePageRange(fromString, toString, result) \
+ ForwardThisMessage((void *) (fromString), (void *) (toString), (void *) (result))
+
+typedef CALLBACK_API_C( OSErr , GXDefaultJobProcPtr )(void );
+typedef STACK_UPP_TYPE(GXDefaultJobProcPtr) GXDefaultJobUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXDefaultJobUPP)
+ NewGXDefaultJobUPP (GXDefaultJobProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXDefaultJobUPP (GXDefaultJobUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXDefaultJobUPP (GXDefaultJobUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXDefaultJobProcInfo = 0x00000021 }; /* 2_bytes Func() */
+ #define NewGXDefaultJobUPP(userRoutine) (GXDefaultJobUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDefaultJobProcInfo, GetCurrentArchitecture())
+ #define DisposeGXDefaultJobUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXDefaultJobUPP(userUPP) (OSErr)CALL_ZERO_PARAMETER_UPP((userUPP), uppGXDefaultJobProcInfo)
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXDefaultJobProc(userRoutine) NewGXDefaultJobUPP(userRoutine)
+#define CallGXDefaultJobProc(userRoutine) InvokeGXDefaultJobUPP(userRoutine)
+#define Send_GXDefaultJob() MacSendMessage(0x0000000B)
+#define Forward_GXDefaultJob() ForwardThisMessage((void *) (0))
+
+typedef CALLBACK_API_C( OSErr , GXDefaultFormatProcPtr )(gxFormat theFormat);
+typedef STACK_UPP_TYPE(GXDefaultFormatProcPtr) GXDefaultFormatUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXDefaultFormatUPP)
+ NewGXDefaultFormatUPP (GXDefaultFormatProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXDefaultFormatUPP (GXDefaultFormatUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXDefaultFormatUPP (gxFormat theFormat,
+ GXDefaultFormatUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXDefaultFormatProcInfo = 0x000000E1 }; /* 2_bytes Func(4_bytes) */
+ #define NewGXDefaultFormatUPP(userRoutine) (GXDefaultFormatUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDefaultFormatProcInfo, GetCurrentArchitecture())
+ #define DisposeGXDefaultFormatUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXDefaultFormatUPP(theFormat, userUPP) (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXDefaultFormatProcInfo, (theFormat))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXDefaultFormatProc(userRoutine) NewGXDefaultFormatUPP(userRoutine)
+#define CallGXDefaultFormatProc(userRoutine, theFormat) InvokeGXDefaultFormatUPP(theFormat, userRoutine)
+#define Send_GXDefaultFormat(theFormat) \
+ MacSendMessage(0x0000000C, theFormat)
+
+#define Forward_GXDefaultFormat(theFormat) \
+ ForwardThisMessage((void *) (theFormat))
+
+typedef CALLBACK_API_C( OSErr , GXDefaultPaperTypeProcPtr )(gxPaperType thePaperType);
+typedef STACK_UPP_TYPE(GXDefaultPaperTypeProcPtr) GXDefaultPaperTypeUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXDefaultPaperTypeUPP)
+ NewGXDefaultPaperTypeUPP (GXDefaultPaperTypeProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXDefaultPaperTypeUPP (GXDefaultPaperTypeUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXDefaultPaperTypeUPP (gxPaperType thePaperType,
+ GXDefaultPaperTypeUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXDefaultPaperTypeProcInfo = 0x000000E1 }; /* 2_bytes Func(4_bytes) */
+ #define NewGXDefaultPaperTypeUPP(userRoutine) (GXDefaultPaperTypeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDefaultPaperTypeProcInfo, GetCurrentArchitecture())
+ #define DisposeGXDefaultPaperTypeUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXDefaultPaperTypeUPP(thePaperType, userUPP) (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXDefaultPaperTypeProcInfo, (thePaperType))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXDefaultPaperTypeProc(userRoutine) NewGXDefaultPaperTypeUPP(userRoutine)
+#define CallGXDefaultPaperTypeProc(userRoutine, thePaperType) InvokeGXDefaultPaperTypeUPP(thePaperType, userRoutine)
+#define Send_GXDefaultPaperType(thePaperType) \
+ MacSendMessage(0x0000000D, thePaperType)
+
+#define Forward_GXDefaultPaperType(thePaperType) \
+ ForwardThisMessage((void *) thePaperType)
+
+typedef CALLBACK_API_C( OSErr , GXDefaultPrinterProcPtr )(gxPrinter thePrinter);
+typedef STACK_UPP_TYPE(GXDefaultPrinterProcPtr) GXDefaultPrinterUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXDefaultPrinterUPP)
+ NewGXDefaultPrinterUPP (GXDefaultPrinterProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXDefaultPrinterUPP (GXDefaultPrinterUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXDefaultPrinterUPP (gxPrinter thePrinter,
+ GXDefaultPrinterUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXDefaultPrinterProcInfo = 0x000000E1 }; /* 2_bytes Func(4_bytes) */
+ #define NewGXDefaultPrinterUPP(userRoutine) (GXDefaultPrinterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDefaultPrinterProcInfo, GetCurrentArchitecture())
+ #define DisposeGXDefaultPrinterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXDefaultPrinterUPP(thePrinter, userUPP) (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXDefaultPrinterProcInfo, (thePrinter))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXDefaultPrinterProc(userRoutine) NewGXDefaultPrinterUPP(userRoutine)
+#define CallGXDefaultPrinterProc(userRoutine, thePrinter) InvokeGXDefaultPrinterUPP(thePrinter, userRoutine)
+#define Send_GXDefaultPrinter(thePrinter) \
+ MacSendMessage(0x0000000E, thePrinter)
+
+#define Forward_GXDefaultPrinter(thePrinter) \
+ ForwardThisMessage((void *) thePrinter)
+
+typedef CALLBACK_API_C( OSErr , GXCreateSpoolFileProcPtr )(FSSpecPtr pFileSpec, long createOptions, gxSpoolFile *theSpoolFile);
+typedef STACK_UPP_TYPE(GXCreateSpoolFileProcPtr) GXCreateSpoolFileUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXCreateSpoolFileUPP)
+ NewGXCreateSpoolFileUPP (GXCreateSpoolFileProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXCreateSpoolFileUPP (GXCreateSpoolFileUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXCreateSpoolFileUPP (FSSpecPtr pFileSpec,
+ long createOptions,
+ gxSpoolFile * theSpoolFile,
+ GXCreateSpoolFileUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXCreateSpoolFileProcInfo = 0x00000FE1 }; /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ #define NewGXCreateSpoolFileUPP(userRoutine) (GXCreateSpoolFileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCreateSpoolFileProcInfo, GetCurrentArchitecture())
+ #define DisposeGXCreateSpoolFileUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXCreateSpoolFileUPP(pFileSpec, createOptions, theSpoolFile, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGXCreateSpoolFileProcInfo, (pFileSpec), (createOptions), (theSpoolFile))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXCreateSpoolFileProc(userRoutine) NewGXCreateSpoolFileUPP(userRoutine)
+#define CallGXCreateSpoolFileProc(userRoutine, pFileSpec, createOptions, theSpoolFile) InvokeGXCreateSpoolFileUPP(pFileSpec, createOptions, theSpoolFile, userRoutine)
+#define Send_GXCreateSpoolFile(pFileSpec, createOptions, theSpoolFile) \
+ MacSendMessage(0x0000000F, pFileSpec, createOptions, \
+ theSpoolFile)
+
+#define Forward_GXCreateSpoolFile(pFileSpec, createOptions, theSpoolFile) \
+ ForwardThisMessage((void *) pFileSpec, (void *) (createOptions), (void *) theSpoolFile)
+
+typedef CALLBACK_API_C( OSErr , GXSpoolPageProcPtr )(gxSpoolFile theSpoolFile, gxFormat theFormat, gxShape thePage);
+typedef STACK_UPP_TYPE(GXSpoolPageProcPtr) GXSpoolPageUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXSpoolPageUPP)
+ NewGXSpoolPageUPP (GXSpoolPageProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXSpoolPageUPP (GXSpoolPageUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXSpoolPageUPP (gxSpoolFile theSpoolFile,
+ gxFormat theFormat,
+ gxShape thePage,
+ GXSpoolPageUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXSpoolPageProcInfo = 0x00000FE1 }; /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ #define NewGXSpoolPageUPP(userRoutine) (GXSpoolPageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXSpoolPageProcInfo, GetCurrentArchitecture())
+ #define DisposeGXSpoolPageUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXSpoolPageUPP(theSpoolFile, theFormat, thePage, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGXSpoolPageProcInfo, (theSpoolFile), (theFormat), (thePage))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXSpoolPageProc(userRoutine) NewGXSpoolPageUPP(userRoutine)
+#define CallGXSpoolPageProc(userRoutine, theSpoolFile, theFormat, thePage) InvokeGXSpoolPageUPP(theSpoolFile, theFormat, thePage, userRoutine)
+#define Send_GXSpoolPage(theSpoolFile, theFormat, thePage) \
+ MacSendMessage(0x00000010, theSpoolFile, theFormat, thePage)
+
+#define Forward_GXSpoolPage(theSpoolFile, theFormat, thePage) \
+ ForwardThisMessage((void *) theSpoolFile, (void *) theFormat, (void *) thePage)
+
+typedef CALLBACK_API_C( OSErr , GXSpoolDataProcPtr )(gxSpoolFile theSpoolFile, Ptr data, long *length);
+typedef STACK_UPP_TYPE(GXSpoolDataProcPtr) GXSpoolDataUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXSpoolDataUPP)
+ NewGXSpoolDataUPP (GXSpoolDataProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXSpoolDataUPP (GXSpoolDataUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXSpoolDataUPP (gxSpoolFile theSpoolFile,
+ Ptr data,
+ long * length,
+ GXSpoolDataUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXSpoolDataProcInfo = 0x00000FE1 }; /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ #define NewGXSpoolDataUPP(userRoutine) (GXSpoolDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXSpoolDataProcInfo, GetCurrentArchitecture())
+ #define DisposeGXSpoolDataUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXSpoolDataUPP(theSpoolFile, data, length, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGXSpoolDataProcInfo, (theSpoolFile), (data), (length))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXSpoolDataProc(userRoutine) NewGXSpoolDataUPP(userRoutine)
+#define CallGXSpoolDataProc(userRoutine, theSpoolFile, data, length) InvokeGXSpoolDataUPP(theSpoolFile, data, length, userRoutine)
+#define Send_GXSpoolData(theSpoolFile, data, length) \
+ MacSendMessage(0x00000011, theSpoolFile, data, length)
+
+#define Forward_GXSpoolData(theSpoolFile, data, length) \
+ ForwardThisMessage((void *) theSpoolFile, (void *) data, (void *) length)
+
+typedef CALLBACK_API_C( OSErr , GXSpoolResourceProcPtr )(gxSpoolFile theSpoolFile, Handle theResource, ResType theType, long id);
+typedef STACK_UPP_TYPE(GXSpoolResourceProcPtr) GXSpoolResourceUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXSpoolResourceUPP)
+ NewGXSpoolResourceUPP (GXSpoolResourceProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXSpoolResourceUPP (GXSpoolResourceUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXSpoolResourceUPP (gxSpoolFile theSpoolFile,
+ Handle theResource,
+ ResType theType,
+ long id,
+ GXSpoolResourceUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXSpoolResourceProcInfo = 0x00003FE1 }; /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewGXSpoolResourceUPP(userRoutine) (GXSpoolResourceUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXSpoolResourceProcInfo, GetCurrentArchitecture())
+ #define DisposeGXSpoolResourceUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXSpoolResourceUPP(theSpoolFile, theResource, theType, id, userUPP) (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppGXSpoolResourceProcInfo, (theSpoolFile), (theResource), (theType), (id))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXSpoolResourceProc(userRoutine) NewGXSpoolResourceUPP(userRoutine)
+#define CallGXSpoolResourceProc(userRoutine, theSpoolFile, theResource, theType, id) InvokeGXSpoolResourceUPP(theSpoolFile, theResource, theType, id, userRoutine)
+#define Send_GXSpoolResource(theSpoolFile, theResource, theType, id) \
+ MacSendMessage(0x00000012, theSpoolFile, theResource, \
+ theType, id)
+
+#define Forward_GXSpoolResource(theSpoolFile, theResource, theType, id) \
+ ForwardThisMessage((void *) theSpoolFile, (void *) theResource, \
+ (void *) theType, (void *) (id))
+
+typedef CALLBACK_API_C( OSErr , GXCompleteSpoolFileProcPtr )(gxSpoolFile theSpoolFile);
+typedef STACK_UPP_TYPE(GXCompleteSpoolFileProcPtr) GXCompleteSpoolFileUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXCompleteSpoolFileUPP)
+ NewGXCompleteSpoolFileUPP (GXCompleteSpoolFileProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXCompleteSpoolFileUPP (GXCompleteSpoolFileUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXCompleteSpoolFileUPP (gxSpoolFile theSpoolFile,
+ GXCompleteSpoolFileUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXCompleteSpoolFileProcInfo = 0x000000E1 }; /* 2_bytes Func(4_bytes) */
+ #define NewGXCompleteSpoolFileUPP(userRoutine) (GXCompleteSpoolFileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCompleteSpoolFileProcInfo, GetCurrentArchitecture())
+ #define DisposeGXCompleteSpoolFileUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXCompleteSpoolFileUPP(theSpoolFile, userUPP) (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXCompleteSpoolFileProcInfo, (theSpoolFile))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXCompleteSpoolFileProc(userRoutine) NewGXCompleteSpoolFileUPP(userRoutine)
+#define CallGXCompleteSpoolFileProc(userRoutine, theSpoolFile) InvokeGXCompleteSpoolFileUPP(theSpoolFile, userRoutine)
+#define Send_GXCompleteSpoolFile(theSpoolFile) \
+ MacSendMessage(0x00000013, theSpoolFile)
+
+#define Forward_GXCompleteSpoolFile(theSpoolFile) \
+ ForwardThisMessage((void *) (theSpoolFile))
+
+typedef CALLBACK_API_C( OSErr , GXCountPagesProcPtr )(gxSpoolFile theSpoolFile, long *numPages);
+typedef STACK_UPP_TYPE(GXCountPagesProcPtr) GXCountPagesUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXCountPagesUPP)
+ NewGXCountPagesUPP (GXCountPagesProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXCountPagesUPP (GXCountPagesUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXCountPagesUPP (gxSpoolFile theSpoolFile,
+ long * numPages,
+ GXCountPagesUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXCountPagesProcInfo = 0x000003E1 }; /* 2_bytes Func(4_bytes, 4_bytes) */
+ #define NewGXCountPagesUPP(userRoutine) (GXCountPagesUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCountPagesProcInfo, GetCurrentArchitecture())
+ #define DisposeGXCountPagesUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXCountPagesUPP(theSpoolFile, numPages, userUPP) (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppGXCountPagesProcInfo, (theSpoolFile), (numPages))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXCountPagesProc(userRoutine) NewGXCountPagesUPP(userRoutine)
+#define CallGXCountPagesProc(userRoutine, theSpoolFile, numPages) InvokeGXCountPagesUPP(theSpoolFile, numPages, userRoutine)
+#define Send_GXCountPages(theSpoolFile, numPages) \
+ MacSendMessage(0x00000014, theSpoolFile, numPages)
+
+#define Forward_GXCountPages(theSpoolFile, numPages) \
+ ForwardThisMessage((void *) (theSpoolFile), (void *) (numPages))
+
+typedef CALLBACK_API_C( OSErr , GXDespoolPageProcPtr )(gxSpoolFile theSpoolFile, long numPages, gxFormat theFormat, gxShape *thePage, Boolean *formatChanged);
+typedef STACK_UPP_TYPE(GXDespoolPageProcPtr) GXDespoolPageUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXDespoolPageUPP)
+ NewGXDespoolPageUPP (GXDespoolPageProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXDespoolPageUPP (GXDespoolPageUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXDespoolPageUPP (gxSpoolFile theSpoolFile,
+ long numPages,
+ gxFormat theFormat,
+ gxShape * thePage,
+ Boolean * formatChanged,
+ GXDespoolPageUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXDespoolPageProcInfo = 0x0000FFE1 }; /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewGXDespoolPageUPP(userRoutine) (GXDespoolPageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDespoolPageProcInfo, GetCurrentArchitecture())
+ #define DisposeGXDespoolPageUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXDespoolPageUPP(theSpoolFile, numPages, theFormat, thePage, formatChanged, userUPP) (OSErr)CALL_FIVE_PARAMETER_UPP((userUPP), uppGXDespoolPageProcInfo, (theSpoolFile), (numPages), (theFormat), (thePage), (formatChanged))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXDespoolPageProc(userRoutine) NewGXDespoolPageUPP(userRoutine)
+#define CallGXDespoolPageProc(userRoutine, theSpoolFile, numPages, theFormat, thePage, formatChanged) InvokeGXDespoolPageUPP(theSpoolFile, numPages, theFormat, thePage, formatChanged, userRoutine)
+#define Send_GXDespoolPage(theSpoolFile, numPages, theFormat, thePage, formatChanged) \
+ MacSendMessage(0x00000015, theSpoolFile, numPages, \
+ theFormat, thePage, formatChanged)
+
+#define Forward_GXDespoolPage(theSpoolFile, numPages, theFormat, thePage, formatChanged) \
+ ForwardThisMessage((void *) (theSpoolFile), (void *) (numPages), (void *) (theFormat), \
+ (void *) (thePage), (void *) (formatChanged))
+
+typedef CALLBACK_API_C( OSErr , GXDespoolDataProcPtr )(gxSpoolFile theSpoolFile, Ptr data, long *length);
+typedef STACK_UPP_TYPE(GXDespoolDataProcPtr) GXDespoolDataUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXDespoolDataUPP)
+ NewGXDespoolDataUPP (GXDespoolDataProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXDespoolDataUPP (GXDespoolDataUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXDespoolDataUPP (gxSpoolFile theSpoolFile,
+ Ptr data,
+ long * length,
+ GXDespoolDataUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXDespoolDataProcInfo = 0x00000FE1 }; /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ #define NewGXDespoolDataUPP(userRoutine) (GXDespoolDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDespoolDataProcInfo, GetCurrentArchitecture())
+ #define DisposeGXDespoolDataUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXDespoolDataUPP(theSpoolFile, data, length, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGXDespoolDataProcInfo, (theSpoolFile), (data), (length))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXDespoolDataProc(userRoutine) NewGXDespoolDataUPP(userRoutine)
+#define CallGXDespoolDataProc(userRoutine, theSpoolFile, data, length) InvokeGXDespoolDataUPP(theSpoolFile, data, length, userRoutine)
+#define Send_GXDespoolData(theSpoolFile, data, length) \
+ MacSendMessage(0x00000016, theSpoolFile, data, length)
+
+#define Forward_GXDespoolData(theSpoolFile, data, length) \
+ ForwardThisMessage((void *) (theSpoolFile), (void *) (data), (void *) (length))
+
+typedef CALLBACK_API_C( OSErr , GXDespoolResourceProcPtr )(gxSpoolFile theSpoolFile, ResType theType, long id, Handle *theResource);
+typedef STACK_UPP_TYPE(GXDespoolResourceProcPtr) GXDespoolResourceUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXDespoolResourceUPP)
+ NewGXDespoolResourceUPP (GXDespoolResourceProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXDespoolResourceUPP (GXDespoolResourceUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXDespoolResourceUPP (gxSpoolFile theSpoolFile,
+ ResType theType,
+ long id,
+ Handle * theResource,
+ GXDespoolResourceUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXDespoolResourceProcInfo = 0x00003FE1 }; /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewGXDespoolResourceUPP(userRoutine) (GXDespoolResourceUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDespoolResourceProcInfo, GetCurrentArchitecture())
+ #define DisposeGXDespoolResourceUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXDespoolResourceUPP(theSpoolFile, theType, id, theResource, userUPP) (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppGXDespoolResourceProcInfo, (theSpoolFile), (theType), (id), (theResource))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXDespoolResourceProc(userRoutine) NewGXDespoolResourceUPP(userRoutine)
+#define CallGXDespoolResourceProc(userRoutine, theSpoolFile, theType, id, theResource) InvokeGXDespoolResourceUPP(theSpoolFile, theType, id, theResource, userRoutine)
+#define Send_GXDespoolResource(theSpoolFile, theType, id, theResource) \
+ MacSendMessage(0x00000017, theSpoolFile, theType, \
+ id, theResource)
+
+#define Forward_GXDespoolResource(theSpoolFile, theType, id, theResource) \
+ ForwardThisMessage((void *) (theSpoolFile), (void *) (theType), (void *) (id), \
+ (void *) (theResource))
+
+typedef CALLBACK_API_C( OSErr , GXCloseSpoolFileProcPtr )(gxSpoolFile theSpoolFile, long closeOptions);
+typedef STACK_UPP_TYPE(GXCloseSpoolFileProcPtr) GXCloseSpoolFileUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXCloseSpoolFileUPP)
+ NewGXCloseSpoolFileUPP (GXCloseSpoolFileProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXCloseSpoolFileUPP (GXCloseSpoolFileUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXCloseSpoolFileUPP (gxSpoolFile theSpoolFile,
+ long closeOptions,
+ GXCloseSpoolFileUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXCloseSpoolFileProcInfo = 0x000003E1 }; /* 2_bytes Func(4_bytes, 4_bytes) */
+ #define NewGXCloseSpoolFileUPP(userRoutine) (GXCloseSpoolFileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCloseSpoolFileProcInfo, GetCurrentArchitecture())
+ #define DisposeGXCloseSpoolFileUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXCloseSpoolFileUPP(theSpoolFile, closeOptions, userUPP) (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppGXCloseSpoolFileProcInfo, (theSpoolFile), (closeOptions))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXCloseSpoolFileProc(userRoutine) NewGXCloseSpoolFileUPP(userRoutine)
+#define CallGXCloseSpoolFileProc(userRoutine, theSpoolFile, closeOptions) InvokeGXCloseSpoolFileUPP(theSpoolFile, closeOptions, userRoutine)
+#define Send_GXCloseSpoolFile(theSpoolFile, closeOptions) \
+ MacSendMessage(0x00000018, theSpoolFile, closeOptions)
+
+#define Forward_GXCloseSpoolFile(theSpoolFile, closeOptions) \
+ ForwardThisMessage((void *) (theSpoolFile), (void *) (closeOptions))
+
+typedef CALLBACK_API_C( OSErr , GXStartJobProcPtr )(StringPtr docName, long pageCount);
+typedef STACK_UPP_TYPE(GXStartJobProcPtr) GXStartJobUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXStartJobUPP)
+ NewGXStartJobUPP (GXStartJobProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXStartJobUPP (GXStartJobUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXStartJobUPP (StringPtr docName,
+ long pageCount,
+ GXStartJobUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXStartJobProcInfo = 0x000003E1 }; /* 2_bytes Func(4_bytes, 4_bytes) */
+ #define NewGXStartJobUPP(userRoutine) (GXStartJobUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXStartJobProcInfo, GetCurrentArchitecture())
+ #define DisposeGXStartJobUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXStartJobUPP(docName, pageCount, userUPP) (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppGXStartJobProcInfo, (docName), (pageCount))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXStartJobProc(userRoutine) NewGXStartJobUPP(userRoutine)
+#define CallGXStartJobProc(userRoutine, docName, pageCount) InvokeGXStartJobUPP(docName, pageCount, userRoutine)
+#define Send_GXStartJob(docName, pageCount) \
+ MacSendMessage(0x00000019, docName, pageCount)
+
+#define Forward_GXStartJob(docName, pageCount) \
+ ForwardThisMessage((void *) (docName), (void *) (pageCount))
+
+typedef CALLBACK_API_C( OSErr , GXFinishJobProcPtr )(void );
+typedef STACK_UPP_TYPE(GXFinishJobProcPtr) GXFinishJobUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXFinishJobUPP)
+ NewGXFinishJobUPP (GXFinishJobProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXFinishJobUPP (GXFinishJobUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXFinishJobUPP (GXFinishJobUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXFinishJobProcInfo = 0x00000021 }; /* 2_bytes Func() */
+ #define NewGXFinishJobUPP(userRoutine) (GXFinishJobUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFinishJobProcInfo, GetCurrentArchitecture())
+ #define DisposeGXFinishJobUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXFinishJobUPP(userUPP) (OSErr)CALL_ZERO_PARAMETER_UPP((userUPP), uppGXFinishJobProcInfo)
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXFinishJobProc(userRoutine) NewGXFinishJobUPP(userRoutine)
+#define CallGXFinishJobProc(userRoutine) InvokeGXFinishJobUPP(userRoutine)
+#define Send_GXFinishJob() MacSendMessage(0x0000001A)
+#define Forward_GXFinishJob() ForwardThisMessage((void *) (0))
+
+typedef CALLBACK_API_C( OSErr , GXStartPageProcPtr )(gxFormat theFormat, long numViewPorts, gxViewPort *viewPortList);
+typedef STACK_UPP_TYPE(GXStartPageProcPtr) GXStartPageUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXStartPageUPP)
+ NewGXStartPageUPP (GXStartPageProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXStartPageUPP (GXStartPageUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXStartPageUPP (gxFormat theFormat,
+ long numViewPorts,
+ gxViewPort * viewPortList,
+ GXStartPageUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXStartPageProcInfo = 0x00000FE1 }; /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ #define NewGXStartPageUPP(userRoutine) (GXStartPageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXStartPageProcInfo, GetCurrentArchitecture())
+ #define DisposeGXStartPageUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXStartPageUPP(theFormat, numViewPorts, viewPortList, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGXStartPageProcInfo, (theFormat), (numViewPorts), (viewPortList))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXStartPageProc(userRoutine) NewGXStartPageUPP(userRoutine)
+#define CallGXStartPageProc(userRoutine, theFormat, numViewPorts, viewPortList) InvokeGXStartPageUPP(theFormat, numViewPorts, viewPortList, userRoutine)
+#define Send_GXStartPage(theFormat, numViewPorts, viewPortList) \
+ MacSendMessage(0x0000001B, theFormat, numViewPorts, viewPortList)
+
+#define Forward_GXStartPage(theFormat, numViewPorts, viewPortList) \
+ ForwardThisMessage((void *) (theFormat), (void *) (numViewPorts), (void *) (viewPortList))
+
+typedef CALLBACK_API_C( OSErr , GXFinishPageProcPtr )(void );
+typedef STACK_UPP_TYPE(GXFinishPageProcPtr) GXFinishPageUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXFinishPageUPP)
+ NewGXFinishPageUPP (GXFinishPageProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXFinishPageUPP (GXFinishPageUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXFinishPageUPP (GXFinishPageUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXFinishPageProcInfo = 0x00000021 }; /* 2_bytes Func() */
+ #define NewGXFinishPageUPP(userRoutine) (GXFinishPageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFinishPageProcInfo, GetCurrentArchitecture())
+ #define DisposeGXFinishPageUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXFinishPageUPP(userUPP) (OSErr)CALL_ZERO_PARAMETER_UPP((userUPP), uppGXFinishPageProcInfo)
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXFinishPageProc(userRoutine) NewGXFinishPageUPP(userRoutine)
+#define CallGXFinishPageProc(userRoutine) InvokeGXFinishPageUPP(userRoutine)
+#define Send_GXFinishPage() MacSendMessage(0x0000001C)
+#define Forward_GXFinishPage() ForwardThisMessage((void *) (0))
+
+typedef CALLBACK_API_C( OSErr , GXPrintPageProcPtr )(gxFormat theFormat, gxShape thePage);
+typedef STACK_UPP_TYPE(GXPrintPageProcPtr) GXPrintPageUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXPrintPageUPP)
+ NewGXPrintPageUPP (GXPrintPageProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXPrintPageUPP (GXPrintPageUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXPrintPageUPP (gxFormat theFormat,
+ gxShape thePage,
+ GXPrintPageUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXPrintPageProcInfo = 0x000003E1 }; /* 2_bytes Func(4_bytes, 4_bytes) */
+ #define NewGXPrintPageUPP(userRoutine) (GXPrintPageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXPrintPageProcInfo, GetCurrentArchitecture())
+ #define DisposeGXPrintPageUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXPrintPageUPP(theFormat, thePage, userUPP) (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppGXPrintPageProcInfo, (theFormat), (thePage))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXPrintPageProc(userRoutine) NewGXPrintPageUPP(userRoutine)
+#define CallGXPrintPageProc(userRoutine, theFormat, thePage) InvokeGXPrintPageUPP(theFormat, thePage, userRoutine)
+#define Send_GXPrintPage(theFormat, thePage) \
+ MacSendMessage(0x0000001D, theFormat, thePage)
+
+#define Forward_GXPrintPage(theFormat, thePage) \
+ ForwardThisMessage((void *) (theFormat), (void *) (thePage))
+
+typedef CALLBACK_API_C( OSErr , GXSetupImageDataProcPtr )(void *imageData);
+typedef STACK_UPP_TYPE(GXSetupImageDataProcPtr) GXSetupImageDataUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXSetupImageDataUPP)
+ NewGXSetupImageDataUPP (GXSetupImageDataProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXSetupImageDataUPP (GXSetupImageDataUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXSetupImageDataUPP (void * imageData,
+ GXSetupImageDataUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXSetupImageDataProcInfo = 0x000000E1 }; /* 2_bytes Func(4_bytes) */
+ #define NewGXSetupImageDataUPP(userRoutine) (GXSetupImageDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXSetupImageDataProcInfo, GetCurrentArchitecture())
+ #define DisposeGXSetupImageDataUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXSetupImageDataUPP(imageData, userUPP) (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXSetupImageDataProcInfo, (imageData))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXSetupImageDataProc(userRoutine) NewGXSetupImageDataUPP(userRoutine)
+#define CallGXSetupImageDataProc(userRoutine, imageData) InvokeGXSetupImageDataUPP(imageData, userRoutine)
+#define Send_GXSetupImageData(imageData) \
+ MacSendMessage(0x0000001E, imageData)
+
+#define Forward_GXSetupImageData(imageData) \
+ ForwardThisMessage((void *) (imageData))
+
+typedef CALLBACK_API_C( OSErr , GXImageJobProcPtr )(gxSpoolFile theSpoolFile, long *closeOptions);
+typedef STACK_UPP_TYPE(GXImageJobProcPtr) GXImageJobUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXImageJobUPP)
+ NewGXImageJobUPP (GXImageJobProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXImageJobUPP (GXImageJobUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXImageJobUPP (gxSpoolFile theSpoolFile,
+ long * closeOptions,
+ GXImageJobUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXImageJobProcInfo = 0x000003E1 }; /* 2_bytes Func(4_bytes, 4_bytes) */
+ #define NewGXImageJobUPP(userRoutine) (GXImageJobUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXImageJobProcInfo, GetCurrentArchitecture())
+ #define DisposeGXImageJobUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXImageJobUPP(theSpoolFile, closeOptions, userUPP) (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppGXImageJobProcInfo, (theSpoolFile), (closeOptions))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXImageJobProc(userRoutine) NewGXImageJobUPP(userRoutine)
+#define CallGXImageJobProc(userRoutine, theSpoolFile, closeOptions) InvokeGXImageJobUPP(theSpoolFile, closeOptions, userRoutine)
+#define Send_GXImageJob(theSpoolFile, closeOptions) \
+ MacSendMessage(0x0000001F, theSpoolFile, closeOptions)
+
+#define Forward_GXImageJob(theSpoolFile, closeOptions) \
+ ForwardThisMessage((void *) (theSpoolFile), (void *) (closeOptions))
+
+typedef CALLBACK_API_C( OSErr , GXImageDocumentProcPtr )(gxSpoolFile theSpoolFile, void *imageData);
+typedef STACK_UPP_TYPE(GXImageDocumentProcPtr) GXImageDocumentUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXImageDocumentUPP)
+ NewGXImageDocumentUPP (GXImageDocumentProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXImageDocumentUPP (GXImageDocumentUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXImageDocumentUPP (gxSpoolFile theSpoolFile,
+ void * imageData,
+ GXImageDocumentUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXImageDocumentProcInfo = 0x000003E1 }; /* 2_bytes Func(4_bytes, 4_bytes) */
+ #define NewGXImageDocumentUPP(userRoutine) (GXImageDocumentUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXImageDocumentProcInfo, GetCurrentArchitecture())
+ #define DisposeGXImageDocumentUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXImageDocumentUPP(theSpoolFile, imageData, userUPP) (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppGXImageDocumentProcInfo, (theSpoolFile), (imageData))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXImageDocumentProc(userRoutine) NewGXImageDocumentUPP(userRoutine)
+#define CallGXImageDocumentProc(userRoutine, theSpoolFile, imageData) InvokeGXImageDocumentUPP(theSpoolFile, imageData, userRoutine)
+#define Send_GXImageDocument(theSpoolFile, imageData) \
+ MacSendMessage(0x00000020, theSpoolFile, imageData)
+
+#define Forward_GXImageDocument(theSpoolFile, imageData) \
+ ForwardThisMessage((void *) (theSpoolFile), (void *) (imageData))
+
+typedef CALLBACK_API_C( OSErr , GXImagePageProcPtr )(gxSpoolFile theSpoolFile, long pageNumber, gxFormat theFormat, void *imageData);
+typedef STACK_UPP_TYPE(GXImagePageProcPtr) GXImagePageUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXImagePageUPP)
+ NewGXImagePageUPP (GXImagePageProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXImagePageUPP (GXImagePageUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXImagePageUPP (gxSpoolFile theSpoolFile,
+ long pageNumber,
+ gxFormat theFormat,
+ void * imageData,
+ GXImagePageUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXImagePageProcInfo = 0x00003FE1 }; /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewGXImagePageUPP(userRoutine) (GXImagePageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXImagePageProcInfo, GetCurrentArchitecture())
+ #define DisposeGXImagePageUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXImagePageUPP(theSpoolFile, pageNumber, theFormat, imageData, userUPP) (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppGXImagePageProcInfo, (theSpoolFile), (pageNumber), (theFormat), (imageData))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXImagePageProc(userRoutine) NewGXImagePageUPP(userRoutine)
+#define CallGXImagePageProc(userRoutine, theSpoolFile, pageNumber, theFormat, imageData) InvokeGXImagePageUPP(theSpoolFile, pageNumber, theFormat, imageData, userRoutine)
+#define Send_GXImagePage(theSpoolFile, pageNumber, theFormat, imageData) \
+ MacSendMessage(0x00000021, theSpoolFile, pageNumber, theFormat, imageData)
+
+#define Forward_GXImagePage(theSpoolFile, pageNumber, theFormat, imageData) \
+ ForwardThisMessage((void *) (theSpoolFile), (void *) (pageNumber), (void *) (theFormat), \
+ (void *) (imageData))
+
+typedef CALLBACK_API_C( OSErr , GXRenderPageProcPtr )(gxFormat theFormat, gxShape thePage, gxPageInfoRecord *pageInfo, void *imageData);
+typedef STACK_UPP_TYPE(GXRenderPageProcPtr) GXRenderPageUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXRenderPageUPP)
+ NewGXRenderPageUPP (GXRenderPageProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXRenderPageUPP (GXRenderPageUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXRenderPageUPP (gxFormat theFormat,
+ gxShape thePage,
+ gxPageInfoRecord * pageInfo,
+ void * imageData,
+ GXRenderPageUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXRenderPageProcInfo = 0x00003FE1 }; /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewGXRenderPageUPP(userRoutine) (GXRenderPageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXRenderPageProcInfo, GetCurrentArchitecture())
+ #define DisposeGXRenderPageUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXRenderPageUPP(theFormat, thePage, pageInfo, imageData, userUPP) (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppGXRenderPageProcInfo, (theFormat), (thePage), (pageInfo), (imageData))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXRenderPageProc(userRoutine) NewGXRenderPageUPP(userRoutine)
+#define CallGXRenderPageProc(userRoutine, theFormat, thePage, pageInfo, imageData) InvokeGXRenderPageUPP(theFormat, thePage, pageInfo, imageData, userRoutine)
+#define Send_GXRenderPage(theFormat, thePage, pageInfo, imageData) \
+ MacSendMessage(0x00000022, theFormat, thePage, pageInfo, imageData)
+
+#define Forward_GXRenderPage(theFormat, thePage, pageInfo, imageData) \
+ ForwardThisMessage((void *) (theFormat), (void *) (thePage), (void *) (pageInfo), (void *) (imageData))
+
+typedef CALLBACK_API_C( OSErr , GXCreateImageFileProcPtr )(FSSpecPtr pFileSpec, long imageFileOptions, long *theImageFile);
+typedef STACK_UPP_TYPE(GXCreateImageFileProcPtr) GXCreateImageFileUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXCreateImageFileUPP)
+ NewGXCreateImageFileUPP (GXCreateImageFileProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXCreateImageFileUPP (GXCreateImageFileUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXCreateImageFileUPP (FSSpecPtr pFileSpec,
+ long imageFileOptions,
+ long * theImageFile,
+ GXCreateImageFileUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXCreateImageFileProcInfo = 0x00000FE1 }; /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ #define NewGXCreateImageFileUPP(userRoutine) (GXCreateImageFileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCreateImageFileProcInfo, GetCurrentArchitecture())
+ #define DisposeGXCreateImageFileUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXCreateImageFileUPP(pFileSpec, imageFileOptions, theImageFile, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGXCreateImageFileProcInfo, (pFileSpec), (imageFileOptions), (theImageFile))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXCreateImageFileProc(userRoutine) NewGXCreateImageFileUPP(userRoutine)
+#define CallGXCreateImageFileProc(userRoutine, pFileSpec, imageFileOptions, theImageFile) InvokeGXCreateImageFileUPP(pFileSpec, imageFileOptions, theImageFile, userRoutine)
+#define Send_GXCreateImageFile(pFileSpec, imageFileOptions, theImageFile) \
+ MacSendMessage(0x00000023, pFileSpec, imageFileOptions, theImageFile)
+
+#define Forward_GXCreateImageFile(pFileSpec, imageFileOptions, theImageFile) \
+ ForwardThisMessage((void *) (pFileSpec), (void *) (imageFileOptions), (void *) (theImageFile))
+
+typedef CALLBACK_API_C( OSErr , GXOpenConnectionProcPtr )(void );
+typedef STACK_UPP_TYPE(GXOpenConnectionProcPtr) GXOpenConnectionUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXOpenConnectionUPP)
+ NewGXOpenConnectionUPP (GXOpenConnectionProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXOpenConnectionUPP (GXOpenConnectionUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXOpenConnectionUPP (GXOpenConnectionUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXOpenConnectionProcInfo = 0x00000021 }; /* 2_bytes Func() */
+ #define NewGXOpenConnectionUPP(userRoutine) (GXOpenConnectionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXOpenConnectionProcInfo, GetCurrentArchitecture())
+ #define DisposeGXOpenConnectionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXOpenConnectionUPP(userUPP) (OSErr)CALL_ZERO_PARAMETER_UPP((userUPP), uppGXOpenConnectionProcInfo)
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXOpenConnectionProc(userRoutine) NewGXOpenConnectionUPP(userRoutine)
+#define CallGXOpenConnectionProc(userRoutine) InvokeGXOpenConnectionUPP(userRoutine)
+#define Send_GXOpenConnection() MacSendMessage(0x00000024)
+#define Forward_GXOpenConnection() ForwardThisMessage((void *) (0))
+
+typedef CALLBACK_API_C( OSErr , GXCloseConnectionProcPtr )(void );
+typedef STACK_UPP_TYPE(GXCloseConnectionProcPtr) GXCloseConnectionUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXCloseConnectionUPP)
+ NewGXCloseConnectionUPP (GXCloseConnectionProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXCloseConnectionUPP (GXCloseConnectionUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXCloseConnectionUPP (GXCloseConnectionUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXCloseConnectionProcInfo = 0x00000021 }; /* 2_bytes Func() */
+ #define NewGXCloseConnectionUPP(userRoutine) (GXCloseConnectionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCloseConnectionProcInfo, GetCurrentArchitecture())
+ #define DisposeGXCloseConnectionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXCloseConnectionUPP(userUPP) (OSErr)CALL_ZERO_PARAMETER_UPP((userUPP), uppGXCloseConnectionProcInfo)
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXCloseConnectionProc(userRoutine) NewGXCloseConnectionUPP(userRoutine)
+#define CallGXCloseConnectionProc(userRoutine) InvokeGXCloseConnectionUPP(userRoutine)
+#define Send_GXCloseConnection() MacSendMessage(0x00000025)
+#define Forward_GXCloseConnection() ForwardThisMessage((void *) (0))
+
+typedef CALLBACK_API_C( OSErr , GXStartSendPageProcPtr )(gxFormat theFormat);
+typedef STACK_UPP_TYPE(GXStartSendPageProcPtr) GXStartSendPageUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXStartSendPageUPP)
+ NewGXStartSendPageUPP (GXStartSendPageProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXStartSendPageUPP (GXStartSendPageUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXStartSendPageUPP (gxFormat theFormat,
+ GXStartSendPageUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXStartSendPageProcInfo = 0x000000E1 }; /* 2_bytes Func(4_bytes) */
+ #define NewGXStartSendPageUPP(userRoutine) (GXStartSendPageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXStartSendPageProcInfo, GetCurrentArchitecture())
+ #define DisposeGXStartSendPageUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXStartSendPageUPP(theFormat, userUPP) (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXStartSendPageProcInfo, (theFormat))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXStartSendPageProc(userRoutine) NewGXStartSendPageUPP(userRoutine)
+#define CallGXStartSendPageProc(userRoutine, theFormat) InvokeGXStartSendPageUPP(theFormat, userRoutine)
+#define Send_GXStartSendPage(theFormat) MacSendMessage(0x00000026, theFormat)
+#define Forward_GXStartSendPage(theFormat) ForwardThisMessage((void *) (theFormat))
+
+typedef CALLBACK_API_C( OSErr , GXFinishSendPageProcPtr )(void );
+typedef STACK_UPP_TYPE(GXFinishSendPageProcPtr) GXFinishSendPageUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXFinishSendPageUPP)
+ NewGXFinishSendPageUPP (GXFinishSendPageProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXFinishSendPageUPP (GXFinishSendPageUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXFinishSendPageUPP (GXFinishSendPageUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXFinishSendPageProcInfo = 0x00000021 }; /* 2_bytes Func() */
+ #define NewGXFinishSendPageUPP(userRoutine) (GXFinishSendPageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFinishSendPageProcInfo, GetCurrentArchitecture())
+ #define DisposeGXFinishSendPageUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXFinishSendPageUPP(userUPP) (OSErr)CALL_ZERO_PARAMETER_UPP((userUPP), uppGXFinishSendPageProcInfo)
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXFinishSendPageProc(userRoutine) NewGXFinishSendPageUPP(userRoutine)
+#define CallGXFinishSendPageProc(userRoutine) InvokeGXFinishSendPageUPP(userRoutine)
+#define Send_GXFinishSendPage() MacSendMessage(0x00000027)
+#define Forward_GXFinishSendPage() ForwardThisMessage((void *) (0))
+
+typedef CALLBACK_API_C( OSErr , GXWriteDataProcPtr )(Ptr data, long length);
+typedef STACK_UPP_TYPE(GXWriteDataProcPtr) GXWriteDataUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXWriteDataUPP)
+ NewGXWriteDataUPP (GXWriteDataProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXWriteDataUPP (GXWriteDataUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXWriteDataUPP (Ptr data,
+ long length,
+ GXWriteDataUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXWriteDataProcInfo = 0x000003E1 }; /* 2_bytes Func(4_bytes, 4_bytes) */
+ #define NewGXWriteDataUPP(userRoutine) (GXWriteDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXWriteDataProcInfo, GetCurrentArchitecture())
+ #define DisposeGXWriteDataUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXWriteDataUPP(data, length, userUPP) (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppGXWriteDataProcInfo, (data), (length))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXWriteDataProc(userRoutine) NewGXWriteDataUPP(userRoutine)
+#define CallGXWriteDataProc(userRoutine, data, length) InvokeGXWriteDataUPP(data, length, userRoutine)
+#define Send_GXWriteData(data, length) MacSendMessage(0x00000028, data, length)
+#define Forward_GXWriteData(data, length) ForwardThisMessage((void *) (data), (void *) (length))
+
+typedef CALLBACK_API_C( OSErr , GXBufferDataProcPtr )(Ptr data, long length, long bufferOptions);
+typedef STACK_UPP_TYPE(GXBufferDataProcPtr) GXBufferDataUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXBufferDataUPP)
+ NewGXBufferDataUPP (GXBufferDataProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXBufferDataUPP (GXBufferDataUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXBufferDataUPP (Ptr data,
+ long length,
+ long bufferOptions,
+ GXBufferDataUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXBufferDataProcInfo = 0x00000FE1 }; /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ #define NewGXBufferDataUPP(userRoutine) (GXBufferDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXBufferDataProcInfo, GetCurrentArchitecture())
+ #define DisposeGXBufferDataUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXBufferDataUPP(data, length, bufferOptions, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGXBufferDataProcInfo, (data), (length), (bufferOptions))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXBufferDataProc(userRoutine) NewGXBufferDataUPP(userRoutine)
+#define CallGXBufferDataProc(userRoutine, data, length, bufferOptions) InvokeGXBufferDataUPP(data, length, bufferOptions, userRoutine)
+#define Send_GXBufferData(data, length, bufferOptions) \
+ MacSendMessage(0x00000029, data, length, bufferOptions)
+
+#define Forward_GXBufferData(data, length, bufferOptions) \
+ ForwardThisMessage((void *) (data), (void *) (length), (void *) (bufferOptions))
+
+typedef CALLBACK_API_C( OSErr , GXDumpBufferProcPtr )(gxPrintingBuffer *theBuffer);
+typedef STACK_UPP_TYPE(GXDumpBufferProcPtr) GXDumpBufferUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXDumpBufferUPP)
+ NewGXDumpBufferUPP (GXDumpBufferProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXDumpBufferUPP (GXDumpBufferUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXDumpBufferUPP (gxPrintingBuffer * theBuffer,
+ GXDumpBufferUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXDumpBufferProcInfo = 0x000000E1 }; /* 2_bytes Func(4_bytes) */
+ #define NewGXDumpBufferUPP(userRoutine) (GXDumpBufferUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDumpBufferProcInfo, GetCurrentArchitecture())
+ #define DisposeGXDumpBufferUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXDumpBufferUPP(theBuffer, userUPP) (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXDumpBufferProcInfo, (theBuffer))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXDumpBufferProc(userRoutine) NewGXDumpBufferUPP(userRoutine)
+#define CallGXDumpBufferProc(userRoutine, theBuffer) InvokeGXDumpBufferUPP(theBuffer, userRoutine)
+#define Send_GXDumpBuffer(theBuffer) MacSendMessage(0x0000002A, theBuffer)
+#define Forward_GXDumpBuffer(theBuffer) ForwardThisMessage((void *) (theBuffer))
+
+typedef CALLBACK_API_C( OSErr , GXFreeBufferProcPtr )(gxPrintingBuffer *theBuffer);
+typedef STACK_UPP_TYPE(GXFreeBufferProcPtr) GXFreeBufferUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXFreeBufferUPP)
+ NewGXFreeBufferUPP (GXFreeBufferProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXFreeBufferUPP (GXFreeBufferUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXFreeBufferUPP (gxPrintingBuffer * theBuffer,
+ GXFreeBufferUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXFreeBufferProcInfo = 0x000000E1 }; /* 2_bytes Func(4_bytes) */
+ #define NewGXFreeBufferUPP(userRoutine) (GXFreeBufferUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFreeBufferProcInfo, GetCurrentArchitecture())
+ #define DisposeGXFreeBufferUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXFreeBufferUPP(theBuffer, userUPP) (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXFreeBufferProcInfo, (theBuffer))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXFreeBufferProc(userRoutine) NewGXFreeBufferUPP(userRoutine)
+#define CallGXFreeBufferProc(userRoutine, theBuffer) InvokeGXFreeBufferUPP(theBuffer, userRoutine)
+#define Send_GXFreeBuffer(theBuffer) MacSendMessage(0x0000002B, theBuffer)
+#define Forward_GXFreeBuffer(theBuffer) ForwardThisMessage((void *) (theBuffer))
+
+typedef CALLBACK_API_C( OSErr , GXCheckStatusProcPtr )(Ptr data, long length, long statusType, gxOwnerSignature owner);
+typedef STACK_UPP_TYPE(GXCheckStatusProcPtr) GXCheckStatusUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXCheckStatusUPP)
+ NewGXCheckStatusUPP (GXCheckStatusProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXCheckStatusUPP (GXCheckStatusUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXCheckStatusUPP (Ptr data,
+ long length,
+ long statusType,
+ gxOwnerSignature owner,
+ GXCheckStatusUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXCheckStatusProcInfo = 0x00003FE1 }; /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewGXCheckStatusUPP(userRoutine) (GXCheckStatusUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCheckStatusProcInfo, GetCurrentArchitecture())
+ #define DisposeGXCheckStatusUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXCheckStatusUPP(data, length, statusType, owner, userUPP) (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppGXCheckStatusProcInfo, (data), (length), (statusType), (owner))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXCheckStatusProc(userRoutine) NewGXCheckStatusUPP(userRoutine)
+#define CallGXCheckStatusProc(userRoutine, data, length, statusType, owner) InvokeGXCheckStatusUPP(data, length, statusType, owner, userRoutine)
+#define Send_GXCheckStatus(data, length, statusType, owner) \
+ MacSendMessage(0x0000002C, data, length, statusType, owner)
+
+#define Forward_GXCheckStatus(data, length, statusType, owner) \
+ ForwardThisMessage((void *) (data), (void *) (length), (void *) (statusType), (void *) (owner))
+
+typedef CALLBACK_API_C( OSErr , GXGetDeviceStatusProcPtr )(Ptr cmdData, long cmdSize, Ptr responseData, long *responseSize, Str255 termination);
+typedef STACK_UPP_TYPE(GXGetDeviceStatusProcPtr) GXGetDeviceStatusUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXGetDeviceStatusUPP)
+ NewGXGetDeviceStatusUPP (GXGetDeviceStatusProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXGetDeviceStatusUPP (GXGetDeviceStatusUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXGetDeviceStatusUPP (Ptr cmdData,
+ long cmdSize,
+ Ptr responseData,
+ long * responseSize,
+ Str255 termination,
+ GXGetDeviceStatusUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXGetDeviceStatusProcInfo = 0x0000FFE1 }; /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewGXGetDeviceStatusUPP(userRoutine) (GXGetDeviceStatusUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXGetDeviceStatusProcInfo, GetCurrentArchitecture())
+ #define DisposeGXGetDeviceStatusUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXGetDeviceStatusUPP(cmdData, cmdSize, responseData, responseSize, termination, userUPP) (OSErr)CALL_FIVE_PARAMETER_UPP((userUPP), uppGXGetDeviceStatusProcInfo, (cmdData), (cmdSize), (responseData), (responseSize), (termination))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXGetDeviceStatusProc(userRoutine) NewGXGetDeviceStatusUPP(userRoutine)
+#define CallGXGetDeviceStatusProc(userRoutine, cmdData, cmdSize, responseData, responseSize, termination) InvokeGXGetDeviceStatusUPP(cmdData, cmdSize, responseData, responseSize, termination, userRoutine)
+#define Send_GXGetDeviceStatus(cmdData, cmdSize, responseData, responseSize, termination) \
+ MacSendMessage(0x0000002D, cmdData, cmdSize, responseData, responseSize, termination)
+
+#define Forward_GXGetDeviceStatus(cmdData, cmdSize, responseData, responseSize, termination) \
+ ForwardThisMessage((void *) (cmdData), (void *) (cmdSize), (void *) (responseData), \
+ (void *) (responseSize), (void *) (termination))
+
+typedef CALLBACK_API_C( OSErr , GXFetchTaggedDataProcPtr )(ResType theType, long id, Handle *dataHdl, gxOwnerSignature owner);
+typedef STACK_UPP_TYPE(GXFetchTaggedDataProcPtr) GXFetchTaggedDataUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXFetchTaggedDataUPP)
+ NewGXFetchTaggedDataUPP (GXFetchTaggedDataProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXFetchTaggedDataUPP (GXFetchTaggedDataUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXFetchTaggedDataUPP (ResType theType,
+ long id,
+ Handle * dataHdl,
+ gxOwnerSignature owner,
+ GXFetchTaggedDataUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXFetchTaggedDataProcInfo = 0x00003FE1 }; /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewGXFetchTaggedDataUPP(userRoutine) (GXFetchTaggedDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFetchTaggedDataProcInfo, GetCurrentArchitecture())
+ #define DisposeGXFetchTaggedDataUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXFetchTaggedDataUPP(theType, id, dataHdl, owner, userUPP) (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppGXFetchTaggedDataProcInfo, (theType), (id), (dataHdl), (owner))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXFetchTaggedDataProc(userRoutine) NewGXFetchTaggedDataUPP(userRoutine)
+#define CallGXFetchTaggedDataProc(userRoutine, theType, id, dataHdl, owner) InvokeGXFetchTaggedDataUPP(theType, id, dataHdl, owner, userRoutine)
+#define Send_GXFetchTaggedDriverData(tag, id, pHandle) Send_GXFetchTaggedData(tag, id, pHandle, 'drvr')
+#define Forward_GXFetchTaggedDriverData(tag, id, pHandle) Forward_GXFetchTaggedData(tag, id, pHandle, 'drvr')
+#define Send_GXFetchTaggedData(theType, id, dataHdl, owner) \
+ MacSendMessage(0x0000002E, theType, id, dataHdl, owner)
+
+#define Forward_GXFetchTaggedData(theType, id, dataHdl, owner) \
+ ForwardThisMessage((void *) (theType), (void *) (id), (void *) (dataHdl), (void *) (owner))
+
+typedef CALLBACK_API_C( OSErr , GXGetDTPMenuListProcPtr )(MenuHandle menuHdl);
+typedef STACK_UPP_TYPE(GXGetDTPMenuListProcPtr) GXGetDTPMenuListUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXGetDTPMenuListUPP)
+ NewGXGetDTPMenuListUPP (GXGetDTPMenuListProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXGetDTPMenuListUPP (GXGetDTPMenuListUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXGetDTPMenuListUPP (MenuHandle menuHdl,
+ GXGetDTPMenuListUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXGetDTPMenuListProcInfo = 0x000000E1 }; /* 2_bytes Func(4_bytes) */
+ #define NewGXGetDTPMenuListUPP(userRoutine) (GXGetDTPMenuListUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXGetDTPMenuListProcInfo, GetCurrentArchitecture())
+ #define DisposeGXGetDTPMenuListUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXGetDTPMenuListUPP(menuHdl, userUPP) (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXGetDTPMenuListProcInfo, (menuHdl))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXGetDTPMenuListProc(userRoutine) NewGXGetDTPMenuListUPP(userRoutine)
+#define CallGXGetDTPMenuListProc(userRoutine, menuHdl) InvokeGXGetDTPMenuListUPP(menuHdl, userRoutine)
+#define Send_GXGetDTPMenuList(menuHdl) \
+ MacSendMessage(0x0000002F, menuHdl)
+
+#define Forward_GXGetDTPMenuList(menuHdl) \
+ ForwardThisMessage((void *) (menuHdl))
+
+typedef CALLBACK_API_C( OSErr , GXDTPMenuSelectProcPtr )(long id);
+typedef STACK_UPP_TYPE(GXDTPMenuSelectProcPtr) GXDTPMenuSelectUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXDTPMenuSelectUPP)
+ NewGXDTPMenuSelectUPP (GXDTPMenuSelectProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXDTPMenuSelectUPP (GXDTPMenuSelectUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXDTPMenuSelectUPP (long id,
+ GXDTPMenuSelectUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXDTPMenuSelectProcInfo = 0x000000E1 }; /* 2_bytes Func(4_bytes) */
+ #define NewGXDTPMenuSelectUPP(userRoutine) (GXDTPMenuSelectUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDTPMenuSelectProcInfo, GetCurrentArchitecture())
+ #define DisposeGXDTPMenuSelectUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXDTPMenuSelectUPP(id, userUPP) (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXDTPMenuSelectProcInfo, (id))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXDTPMenuSelectProc(userRoutine) NewGXDTPMenuSelectUPP(userRoutine)
+#define CallGXDTPMenuSelectProc(userRoutine, id) InvokeGXDTPMenuSelectUPP(id, userRoutine)
+#define Send_GXDTPMenuSelect(id) \
+ MacSendMessage(0x00000030, id)
+
+#define Forward_GXDTPMenuSelect(id) \
+ ForwardThisMessage((void *) (id))
+
+typedef CALLBACK_API_C( OSErr , GXHandleAlertFilterProcPtr )(gxJob theJob, gxStatusRecord *pStatusRec, DialogPtr pDialog, EventRecord *theEvent, short *itemHit, Boolean *returnImmed);
+typedef STACK_UPP_TYPE(GXHandleAlertFilterProcPtr) GXHandleAlertFilterUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXHandleAlertFilterUPP)
+ NewGXHandleAlertFilterUPP (GXHandleAlertFilterProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXHandleAlertFilterUPP (GXHandleAlertFilterUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXHandleAlertFilterUPP (gxJob theJob,
+ gxStatusRecord * pStatusRec,
+ DialogPtr pDialog,
+ EventRecord * theEvent,
+ short * itemHit,
+ Boolean * returnImmed,
+ GXHandleAlertFilterUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXHandleAlertFilterProcInfo = 0x0003FFE1 }; /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewGXHandleAlertFilterUPP(userRoutine) (GXHandleAlertFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXHandleAlertFilterProcInfo, GetCurrentArchitecture())
+ #define DisposeGXHandleAlertFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXHandleAlertFilterUPP(theJob, pStatusRec, pDialog, theEvent, itemHit, returnImmed, userUPP) (OSErr)CALL_SIX_PARAMETER_UPP((userUPP), uppGXHandleAlertFilterProcInfo, (theJob), (pStatusRec), (pDialog), (theEvent), (itemHit), (returnImmed))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXHandleAlertFilterProc(userRoutine) NewGXHandleAlertFilterUPP(userRoutine)
+#define CallGXHandleAlertFilterProc(userRoutine, theJob, pStatusRec, pDialog, theEvent, itemHit, returnImmed) InvokeGXHandleAlertFilterUPP(theJob, pStatusRec, pDialog, theEvent, itemHit, returnImmed, userRoutine)
+#define Send_GXHandleAlertFilter(theJob, pStatusRec, pDialog, theEvent, itemHit, returnImmed) \
+ MacSendMessage(0x00000031, theJob, pStatusRec, pDialog, theEvent, itemHit, returnImmed)
+
+#define Forward_GXHandleAlertFilter(theJob, pStatusRec, pDialog, theEvent, itemHit, returnImmed) \
+ ForwardThisMessage((void *) (theJob), (void *) (pStatusRec), (void *) (pDialog), (void *) (theEvent), \
+ (void *) (itemHit), (void *) (returnImmed))
+
+typedef CALLBACK_API_C( OSErr , GXJobFormatModeQueryProcPtr )(gxQueryType theQuery, void *srcData, void *dstData);
+typedef STACK_UPP_TYPE(GXJobFormatModeQueryProcPtr) GXJobFormatModeQueryUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXJobFormatModeQueryUPP)
+ NewGXJobFormatModeQueryUPP (GXJobFormatModeQueryProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXJobFormatModeQueryUPP (GXJobFormatModeQueryUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXJobFormatModeQueryUPP (gxQueryType theQuery,
+ void * srcData,
+ void * dstData,
+ GXJobFormatModeQueryUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXJobFormatModeQueryProcInfo = 0x00000FE1 }; /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ #define NewGXJobFormatModeQueryUPP(userRoutine) (GXJobFormatModeQueryUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXJobFormatModeQueryProcInfo, GetCurrentArchitecture())
+ #define DisposeGXJobFormatModeQueryUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXJobFormatModeQueryUPP(theQuery, srcData, dstData, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGXJobFormatModeQueryProcInfo, (theQuery), (srcData), (dstData))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXJobFormatModeQueryProc(userRoutine) NewGXJobFormatModeQueryUPP(userRoutine)
+#define CallGXJobFormatModeQueryProc(userRoutine, theQuery, srcData, dstData) InvokeGXJobFormatModeQueryUPP(theQuery, srcData, dstData, userRoutine)
+#define Send_GXJobFormatModeQuery(theQuery, srcData, dstData) \
+ MacSendMessage(0x00000032, theQuery, srcData, dstData)
+
+#define Forward_GXJobFormatModeQuery(theQuery, srcData, dstData) \
+ ForwardThisMessage((void *) (theQuery), (void *) (srcData), (void *) (dstData))
+
+typedef CALLBACK_API_C( OSErr , GXWriteStatusToDTPWindowProcPtr )(gxStatusRecord *pStatusRec, gxDisplayRecord *pDisplay);
+typedef STACK_UPP_TYPE(GXWriteStatusToDTPWindowProcPtr) GXWriteStatusToDTPWindowUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXWriteStatusToDTPWindowUPP)
+ NewGXWriteStatusToDTPWindowUPP (GXWriteStatusToDTPWindowProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXWriteStatusToDTPWindowUPP (GXWriteStatusToDTPWindowUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXWriteStatusToDTPWindowUPP (gxStatusRecord * pStatusRec,
+ gxDisplayRecord * pDisplay,
+ GXWriteStatusToDTPWindowUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXWriteStatusToDTPWindowProcInfo = 0x000003E1 }; /* 2_bytes Func(4_bytes, 4_bytes) */
+ #define NewGXWriteStatusToDTPWindowUPP(userRoutine) (GXWriteStatusToDTPWindowUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXWriteStatusToDTPWindowProcInfo, GetCurrentArchitecture())
+ #define DisposeGXWriteStatusToDTPWindowUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXWriteStatusToDTPWindowUPP(pStatusRec, pDisplay, userUPP) (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppGXWriteStatusToDTPWindowProcInfo, (pStatusRec), (pDisplay))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXWriteStatusToDTPWindowProc(userRoutine) NewGXWriteStatusToDTPWindowUPP(userRoutine)
+#define CallGXWriteStatusToDTPWindowProc(userRoutine, pStatusRec, pDisplay) InvokeGXWriteStatusToDTPWindowUPP(pStatusRec, pDisplay, userRoutine)
+#define Send_GXWriteStatusToDTPWindow(pStatusRec, pDisplay) \
+ MacSendMessage(0x00000033, pStatusRec, pDisplay)
+
+#define Forward_GXWriteStatusToDTPWindow(pStatusRec, pDisplay) \
+ ForwardThisMessage((void *) (pStatusRec), (void *) (pDisplay))
+
+typedef CALLBACK_API_C( OSErr , GXInitializeStatusAlertProcPtr )(gxStatusRecord *pStatusRec, DialogPtr *pDialog);
+typedef STACK_UPP_TYPE(GXInitializeStatusAlertProcPtr) GXInitializeStatusAlertUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXInitializeStatusAlertUPP)
+ NewGXInitializeStatusAlertUPP (GXInitializeStatusAlertProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXInitializeStatusAlertUPP (GXInitializeStatusAlertUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXInitializeStatusAlertUPP (gxStatusRecord * pStatusRec,
+ DialogPtr * pDialog,
+ GXInitializeStatusAlertUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXInitializeStatusAlertProcInfo = 0x000003E1 }; /* 2_bytes Func(4_bytes, 4_bytes) */
+ #define NewGXInitializeStatusAlertUPP(userRoutine) (GXInitializeStatusAlertUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXInitializeStatusAlertProcInfo, GetCurrentArchitecture())
+ #define DisposeGXInitializeStatusAlertUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXInitializeStatusAlertUPP(pStatusRec, pDialog, userUPP) (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppGXInitializeStatusAlertProcInfo, (pStatusRec), (pDialog))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXInitializeStatusAlertProc(userRoutine) NewGXInitializeStatusAlertUPP(userRoutine)
+#define CallGXInitializeStatusAlertProc(userRoutine, pStatusRec, pDialog) InvokeGXInitializeStatusAlertUPP(pStatusRec, pDialog, userRoutine)
+#define Send_GXInitializeStatusAlert(pStatusRec, pDialog) \
+ MacSendMessage(0x00000034, pStatusRec, pDialog)
+
+#define Forward_GXInitializeStatusAlert(pStatusRec, pDialog) \
+ ForwardThisMessage((void *) (pStatusRec), (void *) (pDialog))
+
+typedef CALLBACK_API_C( OSErr , GXHandleAlertStatusProcPtr )(gxStatusRecord *pStatusRec);
+typedef STACK_UPP_TYPE(GXHandleAlertStatusProcPtr) GXHandleAlertStatusUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXHandleAlertStatusUPP)
+ NewGXHandleAlertStatusUPP (GXHandleAlertStatusProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXHandleAlertStatusUPP (GXHandleAlertStatusUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXHandleAlertStatusUPP (gxStatusRecord * pStatusRec,
+ GXHandleAlertStatusUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXHandleAlertStatusProcInfo = 0x000000E1 }; /* 2_bytes Func(4_bytes) */
+ #define NewGXHandleAlertStatusUPP(userRoutine) (GXHandleAlertStatusUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXHandleAlertStatusProcInfo, GetCurrentArchitecture())
+ #define DisposeGXHandleAlertStatusUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXHandleAlertStatusUPP(pStatusRec, userUPP) (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXHandleAlertStatusProcInfo, (pStatusRec))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXHandleAlertStatusProc(userRoutine) NewGXHandleAlertStatusUPP(userRoutine)
+#define CallGXHandleAlertStatusProc(userRoutine, pStatusRec) InvokeGXHandleAlertStatusUPP(pStatusRec, userRoutine)
+#define Send_GXHandleAlertStatus(pStatusRec) \
+ MacSendMessage(0x00000035, pStatusRec)
+
+#define Forward_GXHandleAlertStatus(pStatusRec) \
+ ForwardThisMessage((void *) (pStatusRec))
+
+typedef CALLBACK_API_C( OSErr , GXHandleAlertEventProcPtr )(gxStatusRecord *pStatusRec, DialogPtr pDialog, EventRecord *theEvent, short *response);
+typedef STACK_UPP_TYPE(GXHandleAlertEventProcPtr) GXHandleAlertEventUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXHandleAlertEventUPP)
+ NewGXHandleAlertEventUPP (GXHandleAlertEventProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXHandleAlertEventUPP (GXHandleAlertEventUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXHandleAlertEventUPP (gxStatusRecord * pStatusRec,
+ DialogPtr pDialog,
+ EventRecord * theEvent,
+ short * response,
+ GXHandleAlertEventUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXHandleAlertEventProcInfo = 0x00003FE1 }; /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewGXHandleAlertEventUPP(userRoutine) (GXHandleAlertEventUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXHandleAlertEventProcInfo, GetCurrentArchitecture())
+ #define DisposeGXHandleAlertEventUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXHandleAlertEventUPP(pStatusRec, pDialog, theEvent, response, userUPP) (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppGXHandleAlertEventProcInfo, (pStatusRec), (pDialog), (theEvent), (response))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXHandleAlertEventProc(userRoutine) NewGXHandleAlertEventUPP(userRoutine)
+#define CallGXHandleAlertEventProc(userRoutine, pStatusRec, pDialog, theEvent, response) InvokeGXHandleAlertEventUPP(pStatusRec, pDialog, theEvent, response, userRoutine)
+#define Send_GXHandleAlertEvent(pStatusRec, pDialog, theEvent, response) \
+ MacSendMessage(0x00000036, pStatusRec, pDialog, theEvent, response)
+
+#define Forward_GXHandleAlertEvent(pStatusRec, pDialog, theEvent, response) \
+ ForwardThisMessage((void *) (pStatusRec), (void *) (pDialog), \
+ (void *) (theEvent), (void *) (response))
+
+typedef CALLBACK_API_C( void , GXCleanupStartJobProcPtr )(void );
+typedef STACK_UPP_TYPE(GXCleanupStartJobProcPtr) GXCleanupStartJobUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXCleanupStartJobUPP)
+ NewGXCleanupStartJobUPP (GXCleanupStartJobProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXCleanupStartJobUPP (GXCleanupStartJobUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeGXCleanupStartJobUPP (GXCleanupStartJobUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXCleanupStartJobProcInfo = 0x00000001 }; /* no_return_value Func() */
+ #define NewGXCleanupStartJobUPP(userRoutine) (GXCleanupStartJobUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCleanupStartJobProcInfo, GetCurrentArchitecture())
+ #define DisposeGXCleanupStartJobUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXCleanupStartJobUPP(userUPP) CALL_ZERO_PARAMETER_UPP((userUPP), uppGXCleanupStartJobProcInfo)
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXCleanupStartJobProc(userRoutine) NewGXCleanupStartJobUPP(userRoutine)
+#define CallGXCleanupStartJobProc(userRoutine) InvokeGXCleanupStartJobUPP(userRoutine)
+#define Send_GXCleanupStartJob() ((void) MacSendMessage(0x00000037))
+#define Forward_GXCleanupStartJob() ((void) ForwardThisMessage((void *) (0)))
+
+typedef CALLBACK_API_C( void , GXCleanupStartPageProcPtr )(void );
+typedef STACK_UPP_TYPE(GXCleanupStartPageProcPtr) GXCleanupStartPageUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXCleanupStartPageUPP)
+ NewGXCleanupStartPageUPP (GXCleanupStartPageProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXCleanupStartPageUPP (GXCleanupStartPageUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeGXCleanupStartPageUPP (GXCleanupStartPageUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXCleanupStartPageProcInfo = 0x00000001 }; /* no_return_value Func() */
+ #define NewGXCleanupStartPageUPP(userRoutine) (GXCleanupStartPageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCleanupStartPageProcInfo, GetCurrentArchitecture())
+ #define DisposeGXCleanupStartPageUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXCleanupStartPageUPP(userUPP) CALL_ZERO_PARAMETER_UPP((userUPP), uppGXCleanupStartPageProcInfo)
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXCleanupStartPageProc(userRoutine) NewGXCleanupStartPageUPP(userRoutine)
+#define CallGXCleanupStartPageProc(userRoutine) InvokeGXCleanupStartPageUPP(userRoutine)
+#define Send_GXCleanupStartPage() ((void) MacSendMessage(0x00000038))
+#define Forward_GXCleanupStartPage() ((void) ForwardThisMessage((void *) (0)))
+
+typedef CALLBACK_API_C( void , GXCleanupOpenConnectionProcPtr )(void );
+typedef STACK_UPP_TYPE(GXCleanupOpenConnectionProcPtr) GXCleanupOpenConnectionUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXCleanupOpenConnectionUPP)
+ NewGXCleanupOpenConnectionUPP (GXCleanupOpenConnectionProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXCleanupOpenConnectionUPP (GXCleanupOpenConnectionUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeGXCleanupOpenConnectionUPP (GXCleanupOpenConnectionUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXCleanupOpenConnectionProcInfo = 0x00000001 }; /* no_return_value Func() */
+ #define NewGXCleanupOpenConnectionUPP(userRoutine) (GXCleanupOpenConnectionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCleanupOpenConnectionProcInfo, GetCurrentArchitecture())
+ #define DisposeGXCleanupOpenConnectionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXCleanupOpenConnectionUPP(userUPP) CALL_ZERO_PARAMETER_UPP((userUPP), uppGXCleanupOpenConnectionProcInfo)
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXCleanupOpenConnectionProc(userRoutine) NewGXCleanupOpenConnectionUPP(userRoutine)
+#define CallGXCleanupOpenConnectionProc(userRoutine) InvokeGXCleanupOpenConnectionUPP(userRoutine)
+#define Send_GXCleanupOpenConnection() ((void) MacSendMessage(0x00000039))
+#define Forward_GXCleanupOpenConnection() ((void) ForwardThisMessage((void *) (0)))
+
+typedef CALLBACK_API_C( void , GXCleanupStartSendPageProcPtr )(void );
+typedef STACK_UPP_TYPE(GXCleanupStartSendPageProcPtr) GXCleanupStartSendPageUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXCleanupStartSendPageUPP)
+ NewGXCleanupStartSendPageUPP (GXCleanupStartSendPageProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXCleanupStartSendPageUPP (GXCleanupStartSendPageUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeGXCleanupStartSendPageUPP (GXCleanupStartSendPageUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXCleanupStartSendPageProcInfo = 0x00000001 }; /* no_return_value Func() */
+ #define NewGXCleanupStartSendPageUPP(userRoutine) (GXCleanupStartSendPageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCleanupStartSendPageProcInfo, GetCurrentArchitecture())
+ #define DisposeGXCleanupStartSendPageUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXCleanupStartSendPageUPP(userUPP) CALL_ZERO_PARAMETER_UPP((userUPP), uppGXCleanupStartSendPageProcInfo)
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXCleanupStartSendPageProc(userRoutine) NewGXCleanupStartSendPageUPP(userRoutine)
+#define CallGXCleanupStartSendPageProc(userRoutine) InvokeGXCleanupStartSendPageUPP(userRoutine)
+#define Send_GXCleanupStartSendPage() ((void) MacSendMessage(0x0000003A))
+#define Forward_GXCleanupStartSendPage() ((void) ForwardThisMessage((void *) (0)))
+
+typedef CALLBACK_API_C( OSErr , GXDefaultDesktopPrinterProcPtr )(Str31 dtpName);
+typedef STACK_UPP_TYPE(GXDefaultDesktopPrinterProcPtr) GXDefaultDesktopPrinterUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXDefaultDesktopPrinterUPP)
+ NewGXDefaultDesktopPrinterUPP (GXDefaultDesktopPrinterProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXDefaultDesktopPrinterUPP (GXDefaultDesktopPrinterUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXDefaultDesktopPrinterUPP (Str31 dtpName,
+ GXDefaultDesktopPrinterUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXDefaultDesktopPrinterProcInfo = 0x000000E1 }; /* 2_bytes Func(4_bytes) */
+ #define NewGXDefaultDesktopPrinterUPP(userRoutine) (GXDefaultDesktopPrinterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDefaultDesktopPrinterProcInfo, GetCurrentArchitecture())
+ #define DisposeGXDefaultDesktopPrinterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXDefaultDesktopPrinterUPP(dtpName, userUPP) (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXDefaultDesktopPrinterProcInfo, (dtpName))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXDefaultDesktopPrinterProc(userRoutine) NewGXDefaultDesktopPrinterUPP(userRoutine)
+#define CallGXDefaultDesktopPrinterProc(userRoutine, dtpName) InvokeGXDefaultDesktopPrinterUPP(dtpName, userRoutine)
+#define Send_GXDefaultDesktopPrinter(dtpName) MacSendMessage(0x0000003B, dtpName)
+#define Forward_GXDefaultDesktopPrinter(dtpName) ForwardThisMessage((void *) (dtpName))
+
+typedef CALLBACK_API_C( OSErr , GXCaptureOutputDeviceProcPtr )(Boolean capture);
+typedef STACK_UPP_TYPE(GXCaptureOutputDeviceProcPtr) GXCaptureOutputDeviceUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXCaptureOutputDeviceUPP)
+ NewGXCaptureOutputDeviceUPP (GXCaptureOutputDeviceProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXCaptureOutputDeviceUPP (GXCaptureOutputDeviceUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXCaptureOutputDeviceUPP (Boolean capture,
+ GXCaptureOutputDeviceUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXCaptureOutputDeviceProcInfo = 0x00000061 }; /* 2_bytes Func(1_byte) */
+ #define NewGXCaptureOutputDeviceUPP(userRoutine) (GXCaptureOutputDeviceUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCaptureOutputDeviceProcInfo, GetCurrentArchitecture())
+ #define DisposeGXCaptureOutputDeviceUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXCaptureOutputDeviceUPP(capture, userUPP) (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXCaptureOutputDeviceProcInfo, (capture))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXCaptureOutputDeviceProc(userRoutine) NewGXCaptureOutputDeviceUPP(userRoutine)
+#define CallGXCaptureOutputDeviceProc(userRoutine, capture) InvokeGXCaptureOutputDeviceUPP(capture, userRoutine)
+#define Send_GXCaptureOutputDevice(capture) MacSendMessage(0x0000003C, capture)
+#define Forward_GXCaptureOutputDevice(capture) ForwardThisMessage((void *) (capture))
+
+typedef CALLBACK_API_C( OSErr , GXOpenConnectionRetryProcPtr )(ResType theType, void *aVoid, Boolean *retryopenPtr, OSErr anErr);
+typedef STACK_UPP_TYPE(GXOpenConnectionRetryProcPtr) GXOpenConnectionRetryUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXOpenConnectionRetryUPP)
+ NewGXOpenConnectionRetryUPP (GXOpenConnectionRetryProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXOpenConnectionRetryUPP (GXOpenConnectionRetryUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXOpenConnectionRetryUPP (ResType theType,
+ void * aVoid,
+ Boolean * retryopenPtr,
+ OSErr anErr,
+ GXOpenConnectionRetryUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXOpenConnectionRetryProcInfo = 0x00002FE1 }; /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 2_bytes) */
+ #define NewGXOpenConnectionRetryUPP(userRoutine) (GXOpenConnectionRetryUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXOpenConnectionRetryProcInfo, GetCurrentArchitecture())
+ #define DisposeGXOpenConnectionRetryUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXOpenConnectionRetryUPP(theType, aVoid, retryopenPtr, anErr, userUPP) (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppGXOpenConnectionRetryProcInfo, (theType), (aVoid), (retryopenPtr), (anErr))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXOpenConnectionRetryProc(userRoutine) NewGXOpenConnectionRetryUPP(userRoutine)
+#define CallGXOpenConnectionRetryProc(userRoutine, theType, aVoid, retryopenPtr, anErr) InvokeGXOpenConnectionRetryUPP(theType, aVoid, retryopenPtr, anErr, userRoutine)
+#define Send_GXOpenConnectionRetry(theType, aVoid, retryopenPtr, anErr) \
+ MacSendMessage(0x0000003D, theType, aVoid, retryopenPtr, anErr)
+
+#define Forward_GXOpenConnectionRetry(theType, aVoid, retryopenPtr, anErr) \
+ ForwardThisMessage((void *) (theType), (void *) (aVoid), (void *) (retryopenPtr), (void *) (anErr))
+
+typedef CALLBACK_API_C( OSErr , GXExamineSpoolFileProcPtr )(gxSpoolFile theSpoolFile);
+typedef STACK_UPP_TYPE(GXExamineSpoolFileProcPtr) GXExamineSpoolFileUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXExamineSpoolFileUPP)
+ NewGXExamineSpoolFileUPP (GXExamineSpoolFileProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXExamineSpoolFileUPP (GXExamineSpoolFileUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXExamineSpoolFileUPP (gxSpoolFile theSpoolFile,
+ GXExamineSpoolFileUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXExamineSpoolFileProcInfo = 0x000000E1 }; /* 2_bytes Func(4_bytes) */
+ #define NewGXExamineSpoolFileUPP(userRoutine) (GXExamineSpoolFileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXExamineSpoolFileProcInfo, GetCurrentArchitecture())
+ #define DisposeGXExamineSpoolFileUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXExamineSpoolFileUPP(theSpoolFile, userUPP) (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXExamineSpoolFileProcInfo, (theSpoolFile))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXExamineSpoolFileProc(userRoutine) NewGXExamineSpoolFileUPP(userRoutine)
+#define CallGXExamineSpoolFileProc(userRoutine, theSpoolFile) InvokeGXExamineSpoolFileUPP(theSpoolFile, userRoutine)
+#define Send_GXExamineSpoolFile(theSpoolFile) MacSendMessage(0x0000003E, theSpoolFile)
+#define Forward_GXExamineSpoolFile(theSpoolFile) ForwardThisMessage((void *) (theSpoolFile))
+
+typedef CALLBACK_API_C( OSErr , GXFinishSendPlaneProcPtr )(void );
+typedef STACK_UPP_TYPE(GXFinishSendPlaneProcPtr) GXFinishSendPlaneUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXFinishSendPlaneUPP)
+ NewGXFinishSendPlaneUPP (GXFinishSendPlaneProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXFinishSendPlaneUPP (GXFinishSendPlaneUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXFinishSendPlaneUPP (GXFinishSendPlaneUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXFinishSendPlaneProcInfo = 0x00000021 }; /* 2_bytes Func() */
+ #define NewGXFinishSendPlaneUPP(userRoutine) (GXFinishSendPlaneUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFinishSendPlaneProcInfo, GetCurrentArchitecture())
+ #define DisposeGXFinishSendPlaneUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXFinishSendPlaneUPP(userUPP) (OSErr)CALL_ZERO_PARAMETER_UPP((userUPP), uppGXFinishSendPlaneProcInfo)
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXFinishSendPlaneProc(userRoutine) NewGXFinishSendPlaneUPP(userRoutine)
+#define CallGXFinishSendPlaneProc(userRoutine) InvokeGXFinishSendPlaneUPP(userRoutine)
+#define Send_GXFinishSendPlane() MacSendMessage(0x0000003F)
+#define Forward_GXFinishSendPlane() ForwardThisMessage((void *) (0))
+
+typedef CALLBACK_API_C( OSErr , GXDoesPaperFitProcPtr )(gxTrayIndex whichTray, gxPaperType paper, Boolean *fits);
+typedef STACK_UPP_TYPE(GXDoesPaperFitProcPtr) GXDoesPaperFitUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXDoesPaperFitUPP)
+ NewGXDoesPaperFitUPP (GXDoesPaperFitProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXDoesPaperFitUPP (GXDoesPaperFitUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXDoesPaperFitUPP (gxTrayIndex whichTray,
+ gxPaperType paper,
+ Boolean * fits,
+ GXDoesPaperFitUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXDoesPaperFitProcInfo = 0x00000FE1 }; /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ #define NewGXDoesPaperFitUPP(userRoutine) (GXDoesPaperFitUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDoesPaperFitProcInfo, GetCurrentArchitecture())
+ #define DisposeGXDoesPaperFitUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXDoesPaperFitUPP(whichTray, paper, fits, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGXDoesPaperFitProcInfo, (whichTray), (paper), (fits))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXDoesPaperFitProc(userRoutine) NewGXDoesPaperFitUPP(userRoutine)
+#define CallGXDoesPaperFitProc(userRoutine, whichTray, paper, fits) InvokeGXDoesPaperFitUPP(whichTray, paper, fits, userRoutine)
+#define Send_GXDoesPaperFit(whichTray, paper, fits) \
+ MacSendMessage(0x00000040, whichTray, paper, fits)
+
+#define Forward_GXDoesPaperFit(whichTray, paper, fits) \
+ ForwardThisMessage((void *) (whichTray), (void *) (paper), (void *) (fits))
+
+typedef CALLBACK_API_C( OSErr , GXChooserMessageProcPtr )(long message, long caller, StringPtr objName, StringPtr zoneName, ListHandle theList, long p2);
+typedef STACK_UPP_TYPE(GXChooserMessageProcPtr) GXChooserMessageUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXChooserMessageUPP)
+ NewGXChooserMessageUPP (GXChooserMessageProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXChooserMessageUPP (GXChooserMessageUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXChooserMessageUPP (long message,
+ long caller,
+ StringPtr objName,
+ StringPtr zoneName,
+ ListHandle theList,
+ long p2,
+ GXChooserMessageUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXChooserMessageProcInfo = 0x0003FFE1 }; /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewGXChooserMessageUPP(userRoutine) (GXChooserMessageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXChooserMessageProcInfo, GetCurrentArchitecture())
+ #define DisposeGXChooserMessageUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXChooserMessageUPP(message, caller, objName, zoneName, theList, p2, userUPP) (OSErr)CALL_SIX_PARAMETER_UPP((userUPP), uppGXChooserMessageProcInfo, (message), (caller), (objName), (zoneName), (theList), (p2))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXChooserMessageProc(userRoutine) NewGXChooserMessageUPP(userRoutine)
+#define CallGXChooserMessageProc(userRoutine, message, caller, objName, zoneName, theList, p2) InvokeGXChooserMessageUPP(message, caller, objName, zoneName, theList, p2, userRoutine)
+#define Send_GXChooserMessage(message, caller, objName, zoneName, theList, p2) \
+ MacSendMessage(0x00000041, message, caller, objName, zoneName, theList, p2)
+
+#define Forward_GXChooserMessage(message, caller, objName, zoneName, theList, p2) \
+ ForwardThisMessage((void *) (message), (void *) (caller), (void *) (objName), \
+ (void *) (zoneName), (void *) (theList), (void *) (p2))
+
+typedef CALLBACK_API_C( OSErr , GXFindPrinterProfileProcPtr )(gxPrinter thePrinter, void *searchData, long index, gxColorProfile *returnedProfile, long *numProfiles);
+typedef STACK_UPP_TYPE(GXFindPrinterProfileProcPtr) GXFindPrinterProfileUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXFindPrinterProfileUPP)
+ NewGXFindPrinterProfileUPP (GXFindPrinterProfileProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXFindPrinterProfileUPP (GXFindPrinterProfileUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXFindPrinterProfileUPP (gxPrinter thePrinter,
+ void * searchData,
+ long index,
+ gxColorProfile * returnedProfile,
+ long * numProfiles,
+ GXFindPrinterProfileUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXFindPrinterProfileProcInfo = 0x0000FFE1 }; /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewGXFindPrinterProfileUPP(userRoutine) (GXFindPrinterProfileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFindPrinterProfileProcInfo, GetCurrentArchitecture())
+ #define DisposeGXFindPrinterProfileUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXFindPrinterProfileUPP(thePrinter, searchData, index, returnedProfile, numProfiles, userUPP) (OSErr)CALL_FIVE_PARAMETER_UPP((userUPP), uppGXFindPrinterProfileProcInfo, (thePrinter), (searchData), (index), (returnedProfile), (numProfiles))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXFindPrinterProfileProc(userRoutine) NewGXFindPrinterProfileUPP(userRoutine)
+#define CallGXFindPrinterProfileProc(userRoutine, thePrinter, searchData, index, returnedProfile, numProfiles) InvokeGXFindPrinterProfileUPP(thePrinter, searchData, index, returnedProfile, numProfiles, userRoutine)
+#define Send_GXFindPrinterProfile(thePrinter, searchData, index, returnedProfile, numProfiles) \
+ MacSendMessage(0x00000042, thePrinter, searchData, index, returnedProfile, numProfiles)
+
+#define Forward_GXFindPrinterProfile(thePrinter, searchData, index, returnedProfile, numProfiles) \
+ ForwardThisMessage((void *) (thePrinter), (void *) (searchData), (void *) (index), (void *) (returnedProfile), (void *) (numProfiles))
+
+typedef CALLBACK_API_C( OSErr , GXFindFormatProfileProcPtr )(gxFormat theFormat, void *searchData, long index, gxColorProfile *returnedProfile, long *numProfiles);
+typedef STACK_UPP_TYPE(GXFindFormatProfileProcPtr) GXFindFormatProfileUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXFindFormatProfileUPP)
+ NewGXFindFormatProfileUPP (GXFindFormatProfileProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXFindFormatProfileUPP (GXFindFormatProfileUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXFindFormatProfileUPP (gxFormat theFormat,
+ void * searchData,
+ long index,
+ gxColorProfile * returnedProfile,
+ long * numProfiles,
+ GXFindFormatProfileUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXFindFormatProfileProcInfo = 0x0000FFE1 }; /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewGXFindFormatProfileUPP(userRoutine) (GXFindFormatProfileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFindFormatProfileProcInfo, GetCurrentArchitecture())
+ #define DisposeGXFindFormatProfileUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXFindFormatProfileUPP(theFormat, searchData, index, returnedProfile, numProfiles, userUPP) (OSErr)CALL_FIVE_PARAMETER_UPP((userUPP), uppGXFindFormatProfileProcInfo, (theFormat), (searchData), (index), (returnedProfile), (numProfiles))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXFindFormatProfileProc(userRoutine) NewGXFindFormatProfileUPP(userRoutine)
+#define CallGXFindFormatProfileProc(userRoutine, theFormat, searchData, index, returnedProfile, numProfiles) InvokeGXFindFormatProfileUPP(theFormat, searchData, index, returnedProfile, numProfiles, userRoutine)
+#define Send_GXFindFormatProfile(theFormat, searchData, index, returnedProfile, numProfiles) \
+ MacSendMessage(0x00000043, theFormat, searchData, index, returnedProfile, numProfiles)
+
+#define Forward_GXFindFormatProfile(theFormat, searchData, index, returnedProfile, numProfiles) \
+ ForwardThisMessage((void *) (theFormat), (void *) (searchData), (void *) (index), (void *) (returnedProfile), \
+ (void *) (numProfiles))
+
+typedef CALLBACK_API_C( OSErr , GXSetPrinterProfileProcPtr )(gxPrinter thePrinter, gxColorProfile oldProfile, gxColorProfile newProfile);
+typedef STACK_UPP_TYPE(GXSetPrinterProfileProcPtr) GXSetPrinterProfileUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXSetPrinterProfileUPP)
+ NewGXSetPrinterProfileUPP (GXSetPrinterProfileProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXSetPrinterProfileUPP (GXSetPrinterProfileUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXSetPrinterProfileUPP (gxPrinter thePrinter,
+ gxColorProfile oldProfile,
+ gxColorProfile newProfile,
+ GXSetPrinterProfileUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXSetPrinterProfileProcInfo = 0x00000FE1 }; /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ #define NewGXSetPrinterProfileUPP(userRoutine) (GXSetPrinterProfileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXSetPrinterProfileProcInfo, GetCurrentArchitecture())
+ #define DisposeGXSetPrinterProfileUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXSetPrinterProfileUPP(thePrinter, oldProfile, newProfile, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGXSetPrinterProfileProcInfo, (thePrinter), (oldProfile), (newProfile))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXSetPrinterProfileProc(userRoutine) NewGXSetPrinterProfileUPP(userRoutine)
+#define CallGXSetPrinterProfileProc(userRoutine, thePrinter, oldProfile, newProfile) InvokeGXSetPrinterProfileUPP(thePrinter, oldProfile, newProfile, userRoutine)
+#define Send_GXSetPrinterProfile(thePrinter, oldProfile, newProfile) \
+ MacSendMessage(0x00000044, thePrinter, oldProfile, newProfile)
+
+#define Forward_GXSetPrinterProfile(thePrinter, oldProfile, newProfile) \
+ ForwardThisMessage((void *) (thePrinter), (void *) (oldProfile), (void *) (newProfile))
+
+typedef CALLBACK_API_C( OSErr , GXSetFormatProfileProcPtr )(gxFormat theFormat, gxColorProfile oldProfile, gxColorProfile newProfile);
+typedef STACK_UPP_TYPE(GXSetFormatProfileProcPtr) GXSetFormatProfileUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXSetFormatProfileUPP)
+ NewGXSetFormatProfileUPP (GXSetFormatProfileProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXSetFormatProfileUPP (GXSetFormatProfileUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXSetFormatProfileUPP (gxFormat theFormat,
+ gxColorProfile oldProfile,
+ gxColorProfile newProfile,
+ GXSetFormatProfileUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXSetFormatProfileProcInfo = 0x00000FE1 }; /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ #define NewGXSetFormatProfileUPP(userRoutine) (GXSetFormatProfileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXSetFormatProfileProcInfo, GetCurrentArchitecture())
+ #define DisposeGXSetFormatProfileUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXSetFormatProfileUPP(theFormat, oldProfile, newProfile, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGXSetFormatProfileProcInfo, (theFormat), (oldProfile), (newProfile))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXSetFormatProfileProc(userRoutine) NewGXSetFormatProfileUPP(userRoutine)
+#define CallGXSetFormatProfileProc(userRoutine, theFormat, oldProfile, newProfile) InvokeGXSetFormatProfileUPP(theFormat, oldProfile, newProfile, userRoutine)
+#define Send_GXSetFormatProfile(theFormat, oldProfile, newProfile) \
+ MacSendMessage(0x00000045, theFormat, oldProfile, newProfile)
+
+#define Forward_GXSetFormatProfile(theFormat, oldProfile, newProfile) \
+ ForwardThisMessage((void *) (theFormat), (void *) (oldProfile), (void *) (newProfile))
+
+typedef CALLBACK_API_C( OSErr , GXHandleAltDestinationProcPtr )(Boolean *userCancels);
+typedef STACK_UPP_TYPE(GXHandleAltDestinationProcPtr) GXHandleAltDestinationUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXHandleAltDestinationUPP)
+ NewGXHandleAltDestinationUPP (GXHandleAltDestinationProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXHandleAltDestinationUPP (GXHandleAltDestinationUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXHandleAltDestinationUPP (Boolean * userCancels,
+ GXHandleAltDestinationUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXHandleAltDestinationProcInfo = 0x000000E1 }; /* 2_bytes Func(4_bytes) */
+ #define NewGXHandleAltDestinationUPP(userRoutine) (GXHandleAltDestinationUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXHandleAltDestinationProcInfo, GetCurrentArchitecture())
+ #define DisposeGXHandleAltDestinationUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXHandleAltDestinationUPP(userCancels, userUPP) (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXHandleAltDestinationProcInfo, (userCancels))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXHandleAltDestinationProc(userRoutine) NewGXHandleAltDestinationUPP(userRoutine)
+#define CallGXHandleAltDestinationProc(userRoutine, userCancels) InvokeGXHandleAltDestinationUPP(userCancels, userRoutine)
+#define Send_GXHandleAltDestination(userCancels) MacSendMessage(0x00000046, userCancels)
+#define Forward_GXHandleAltDestination(userCancels) ForwardThisMessage((void *) (userCancels))
+
+typedef CALLBACK_API_C( OSErr , GXSetupPageImageDataProcPtr )(gxFormat theFormat, gxShape thePage, void *imageData);
+typedef STACK_UPP_TYPE(GXSetupPageImageDataProcPtr) GXSetupPageImageDataUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GXSetupPageImageDataUPP)
+ NewGXSetupPageImageDataUPP (GXSetupPageImageDataProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGXSetupPageImageDataUPP (GXSetupPageImageDataUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGXSetupPageImageDataUPP (gxFormat theFormat,
+ gxShape thePage,
+ void * imageData,
+ GXSetupPageImageDataUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGXSetupPageImageDataProcInfo = 0x00000FE1 }; /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ #define NewGXSetupPageImageDataUPP(userRoutine) (GXSetupPageImageDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXSetupPageImageDataProcInfo, GetCurrentArchitecture())
+ #define DisposeGXSetupPageImageDataUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGXSetupPageImageDataUPP(theFormat, thePage, imageData, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGXSetupPageImageDataProcInfo, (theFormat), (thePage), (imageData))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGXSetupPageImageDataProc(userRoutine) NewGXSetupPageImageDataUPP(userRoutine)
+#define CallGXSetupPageImageDataProc(userRoutine, theFormat, thePage, imageData) InvokeGXSetupPageImageDataUPP(theFormat, thePage, imageData, userRoutine)
+#define Send_GXSetupPageImageData(theFormat, thePage, imageData) \
+ MacSendMessage(0x00000047, theFormat, thePage, imageData)
+
+#define Forward_GXSetupPageImageData(theFormat, thePage, imageData) \
+ ForwardThisMessage((void *) (theFormat), (void *) (thePage), (void *) (imageData))
+/*******************************************************************
+ Start of old "GXPrintingErrors.h/a/p" interface file.
+ ********************************************************************/
+enum {
+ gxPrintingResultBase = -510 /*First QuickDraw GX printing error code.*/
+};
+
+/*RESULT CODES FOR QUICKDRAW GX PRINTING OPERATIONS*/
+enum {
+ gxAioTimeout = (gxPrintingResultBase), /*-510 : Timeout condition occurred during operation*/
+ gxAioBadRqstState = (gxPrintingResultBase - 1), /*-511 : Async I/O request in invalid state for operation*/
+ gxAioBadConn = (gxPrintingResultBase - 2), /*-512 : Invalid Async I/O connection refnum*/
+ gxAioInvalidXfer = (gxPrintingResultBase - 3), /*-513 : Read data transfer structure contained bad values*/
+ gxAioNoRqstBlks = (gxPrintingResultBase - 4), /*-514 : No available request blocks to process request*/
+ gxAioNoDataXfer = (gxPrintingResultBase - 5), /*-515 : Data transfer structure pointer not specified*/
+ gxAioTooManyAutos = (gxPrintingResultBase - 6), /*-516 : Auto status request already active*/
+ gxAioNoAutoStat = (gxPrintingResultBase - 7), /*-517 : Connection not configured for auto status*/
+ gxAioBadRqstID = (gxPrintingResultBase - 8), /*-518 : Invalid I/O request identifier*/
+ gxAioCantKill = (gxPrintingResultBase - 9), /*-519 : Comm. protocol doesn't support I/O term*/
+ gxAioAlreadyExists = (gxPrintingResultBase - 10), /*-520 : Protocol spec. data already specified*/
+ gxAioCantFind = (gxPrintingResultBase - 11), /*-521 : Protocol spec. data does not exist*/
+ gxAioDeviceDisconn = (gxPrintingResultBase - 12), /*-522 : Machine disconnected from printer*/
+ gxAioNotImplemented = (gxPrintingResultBase - 13), /*-523 : Function not implemented*/
+ gxAioOpenPending = (gxPrintingResultBase - 14), /*-524 : Opening a connection for protocol, but another open pending*/
+ gxAioNoProtocolData = (gxPrintingResultBase - 15), /*-525 : No protocol specific data specified in request*/
+ gxAioRqstKilled = (gxPrintingResultBase - 16), /*-526 : I/O request was terminated*/
+ gxBadBaudRate = (gxPrintingResultBase - 17), /*-527 : Invalid baud rate specified*/
+ gxBadParity = (gxPrintingResultBase - 18), /*-528 : Invalid parity specified*/
+ gxBadStopBits = (gxPrintingResultBase - 19), /*-529 : Invalid stop bits specified*/
+ gxBadDataBits = (gxPrintingResultBase - 20), /*-530 : Invalid data bits specified*/
+ gxBadPrinterName = (gxPrintingResultBase - 21), /*-531 : Bad printer name specified*/
+ gxAioBadMsgType = (gxPrintingResultBase - 22), /*-532 : Bad masType field in transfer info structure*/
+ gxAioCantFindDevice = (gxPrintingResultBase - 23), /*-533 : Cannot locate target device*/
+ gxAioOutOfSeq = (gxPrintingResultBase - 24), /*-534 : Non-atomic SCSI requests submitted out of sequence*/
+ gxPrIOAbortErr = (gxPrintingResultBase - 25), /*-535 : I/O operation aborted*/
+ gxPrUserAbortErr = (gxPrintingResultBase - 26), /*-536 : User aborted*/
+ gxCantAddPanelsNowErr = (gxPrintingResultBase - 27), /*-537 : Can only add panels during driver switch or dialog setup*/
+ gxBadxdtlKeyErr = (gxPrintingResultBase - 28), /*-538 : Unknown key for xdtl - must be radiobutton, etc*/
+ gxXdtlItemOutOfRangeErr = (gxPrintingResultBase - 29), /*-539 : Referenced item does not belong to panel*/
+ gxNoActionButtonErr = (gxPrintingResultBase - 30), /*-540 : Action button is nil*/
+ gxTitlesTooLongErr = (gxPrintingResultBase - 31), /*-541 : Length of buttons exceeds alert maximum width*/
+ gxUnknownAlertVersionErr = (gxPrintingResultBase - 32), /*-542 : Bad version for printing alerts*/
+ gxGBBufferTooSmallErr = (gxPrintingResultBase - 33), /*-543 : Buffer too small.*/
+ gxInvalidPenTable = (gxPrintingResultBase - 34), /*-544 : Invalid vector driver pen table.*/
+ gxIncompletePrintFileErr = (gxPrintingResultBase - 35), /*-545 : Print file was not completely spooled*/
+ gxCrashedPrintFileErr = (gxPrintingResultBase - 36), /*-546 : Print file is corrupted*/
+ gxInvalidPrintFileVersion = (gxPrintingResultBase - 37), /*-547 : Print file is incompatible with current QuickDraw GX version*/
+ gxSegmentLoadFailedErr = (gxPrintingResultBase - 38), /*-548 : Segment loader error*/
+ gxExtensionNotFoundErr = (gxPrintingResultBase - 39), /*-549 : Requested printing extension could not be found*/
+ gxDriverVersionErr = (gxPrintingResultBase - 40), /*-550 : Driver too new for current version of QuickDraw GX*/
+ gxImagingSystemVersionErr = (gxPrintingResultBase - 41), /*-551 : Imaging system too new for current version of QuickDraw GX*/
+ gxFlattenVersionTooNew = (gxPrintingResultBase - 42), /*-552 : Flattened object format too new for current version of QDGX*/
+ gxPaperTypeNotFound = (gxPrintingResultBase - 43), /*-553 : Requested papertype could not be found*/
+ gxNoSuchPTGroup = (gxPrintingResultBase - 44), /*-554 : Requested papertype group could not be found*/
+ gxNotEnoughPrinterMemory = (gxPrintingResultBase - 45), /*-555 : Printer does not have enough memory for fonts in document*/
+ gxDuplicatePanelNameErr = (gxPrintingResultBase - 46), /*-556 : Attempt to add more than 10 panels with the same name*/
+ gxExtensionVersionErr = (gxPrintingResultBase - 47) /*-557 : Extension too new for current version of QuickDraw GX*/
+};
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __GXPRINTING__ */
+
diff --git a/include/qt/GXTypes.h b/include/qt/GXTypes.h
new file mode 100644
index 000000000..c96005e97
--- /dev/null
+++ b/include/qt/GXTypes.h
@@ -0,0 +1,1890 @@
+/*
+ File: GXTypes.h
+
+ Contains: QuickDraw GX object and constant definitions
+
+ Version: Technology: Quickdraw GX 1.1
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __GXTYPES__
+#define __GXTYPES__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+#ifndef __FIXMATH__
+#include "FixMath.h"
+#endif
+
+#ifndef __GXMATH__
+#include "GXMath.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+
+
+typedef struct OpaquegxShape* gxShape;
+typedef struct OpaquegxStyle* gxStyle;
+typedef struct OpaquegxInk* gxInk;
+typedef struct OpaquegxTransform* gxTransform;
+typedef struct OpaquegxTag* gxTag;
+typedef struct OpaquegxColorSet* gxColorSet;
+typedef struct OpaquegxColorProfile* gxColorProfile;
+typedef struct OpaquegxGraphicsClient* gxGraphicsClient;
+typedef struct OpaquegxViewGroup* gxViewGroup;
+typedef struct OpaquegxViewPort* gxViewPort;
+typedef struct OpaquegxViewDevice* gxViewDevice;
+
+typedef long gxColorSpace;
+/* gxShape enumerations */
+enum {
+ gxEmptyType = 1,
+ gxPointType = 2,
+ gxLineType = 3,
+ gxCurveType = 4,
+ gxRectangleType = 5,
+ gxPolygonType = 6,
+ gxPathType = 7,
+ gxBitmapType = 8,
+ gxTextType = 9,
+ gxGlyphType = 10,
+ gxLayoutType = 11,
+ gxFullType = 12,
+ gxPictureType = 13
+};
+
+typedef long gxShapeType;
+enum {
+ gxNoFill = 0,
+ gxOpenFrameFill = 1,
+ gxFrameFill = gxOpenFrameFill,
+ gxClosedFrameFill = 2,
+ gxHollowFill = gxClosedFrameFill,
+ gxEvenOddFill = 3,
+ gxSolidFill = gxEvenOddFill,
+ gxWindingFill = 4,
+ gxInverseEvenOddFill = 5,
+ gxInverseSolidFill = gxInverseEvenOddFill,
+ gxInverseFill = gxInverseEvenOddFill,
+ gxInverseWindingFill = 6
+};
+
+typedef long gxShapeFill;
+enum {
+ gxNoAttributes = 0,
+ gxDirectShape = 0x0001,
+ gxRemoteShape = 0x0002,
+ gxCachedShape = 0x0004,
+ gxLockedShape = 0x0008,
+ gxGroupShape = 0x0010,
+ gxMapTransformShape = 0x0020,
+ gxUniqueItemsShape = 0x0040,
+ gxIgnorePlatformShape = 0x0080,
+ gxNoMetricsGridShape = 0x0100,
+ gxDiskShape = 0x0200,
+ gxMemoryShape = 0x0400
+};
+
+typedef long gxShapeAttribute;
+/* gxShape editing enumerations */
+enum {
+ gxBreakNeitherEdit = 0,
+ gxBreakLeftEdit = 0x0001,
+ gxBreakRightEdit = 0x0002,
+ gxRemoveDuplicatePointsEdit = 0x0004
+};
+
+/* if the new first (or last) point exactly matches the point before it in */
+/* the same contour, then remove it) */
+typedef long gxEditShapeFlag;
+enum {
+ gxSelectToEnd = -1
+};
+
+#define gxSetToNil (void *)(-1)
+#define gxAnyNumber 1
+enum {
+ gxCounterclockwiseDirection = 0,
+ gxClockwiseDirection = 1
+};
+
+typedef long gxContourDirection;
+/* gxShape structures */
+/* The type 'gxPoint' is defined in "GXMath.h" */
+
+struct gxLine {
+ gxPoint first;
+ gxPoint last;
+};
+typedef struct gxLine gxLine;
+
+struct gxCurve {
+ gxPoint first;
+ gxPoint control;
+ gxPoint last;
+};
+typedef struct gxCurve gxCurve;
+
+struct gxRectangle {
+ Fixed left;
+ Fixed top;
+ Fixed right;
+ Fixed bottom;
+};
+typedef struct gxRectangle gxRectangle;
+
+struct gxPolygon {
+ long vectors;
+ gxPoint vector[1];
+};
+typedef struct gxPolygon gxPolygon;
+
+struct gxPolygons {
+ long contours;
+ gxPolygon contour[1];
+};
+typedef struct gxPolygons gxPolygons;
+
+struct gxPath {
+ long vectors;
+ long controlBits[1];
+ gxPoint vector[1];
+};
+typedef struct gxPath gxPath;
+
+struct gxPaths {
+ long contours;
+ gxPath contour[1];
+};
+typedef struct gxPaths gxPaths;
+struct gxBitmap {
+ char *image; /* pointer to pixels */
+ long width; /* width in pixels */
+ long height; /* height in pixels */
+ long rowBytes; /* width in bytes */
+ long pixelSize; /* physical bits per pixel */
+ gxColorSpace space;
+ gxColorSet set;
+ gxColorProfile profile;
+};
+typedef struct gxBitmap gxBitmap;
+
+struct gxLongRectangle {
+ long left;
+ long top;
+ long right;
+ long bottom;
+};
+typedef struct gxLongRectangle gxLongRectangle;
+/* gxStyle enumerations */
+enum {
+ gxCenterFrameStyle = 0,
+ gxSourceGridStyle = 0x0001,
+ gxDeviceGridStyle = 0x0002,
+ gxInsideFrameStyle = 0x0004,
+ gxOutsideFrameStyle = 0x0008,
+ gxAutoInsetStyle = 0x0010
+};
+
+
+typedef long gxStyleAttribute;
+enum {
+ gxBendDash = 0x0001,
+ gxBreakDash = 0x0002,
+ gxClipDash = 0x0004,
+ gxLevelDash = 0x0008,
+ gxAutoAdvanceDash = 0x0010
+};
+
+typedef long gxDashAttribute;
+enum {
+ gxPortAlignPattern = 0x0001,
+ gxPortMapPattern = 0x0002
+};
+
+typedef long gxPatternAttribute;
+enum {
+ gxSharpJoin = 0x0000,
+ gxCurveJoin = 0x0001,
+ gxLevelJoin = 0x0002,
+ gxSnapJoin = 0x0004
+};
+
+typedef long gxJoinAttribute;
+enum {
+ gxLevelStartCap = 0x0001,
+ gxLevelEndCap = 0x0002
+};
+
+typedef long gxCapAttribute;
+enum {
+ gxAutoAdvanceText = 0x0001,
+ gxNoContourGridText = 0x0002,
+ gxNoMetricsGridText = 0x0004,
+ gxAnchorPointsText = 0x0008,
+ gxVerticalText = 0x0010,
+ gxNoOpticalScaleText = 0x0020
+};
+
+typedef long gxTextAttribute;
+enum {
+ gxLeftJustify = 0,
+ gxCenterJustify = fract1 / 2,
+ gxRightJustify = fract1,
+ gxFillJustify = -1
+};
+
+enum {
+ gxUnderlineAdvanceLayer = 0x0001, /* a gxLine is drawn through the advances */
+ gxSkipWhiteSpaceLayer = 0x0002, /* except characters describing white space */
+ gxUnderlineIntervalLayer = 0x0004, /* (+ gxStringLayer) a gxLine is drawn through the gaps between advances */
+ gxUnderlineContinuationLayer = 0x0008, /* (+ gxStringLayer) join this underline with another face */
+ gxWhiteLayer = 0x0010, /* the layer draws to white instead of black */
+ gxClipLayer = 0x0020, /* the characters define a clip */
+ gxStringLayer = 0x0040 /* all characters in run are combined */
+};
+
+typedef long gxLayerFlag;
+/* gxStyle structures */
+
+struct gxFaceLayer {
+ gxShapeFill outlineFill; /* outline framed or filled */
+ gxLayerFlag flags; /* various additional effects */
+ gxStyle outlineStyle; /* outline */
+ gxTransform outlineTransform; /* italic, condense, extend */
+ gxPoint boldOutset; /* bold */
+};
+typedef struct gxFaceLayer gxFaceLayer;
+
+struct gxTextFace {
+ long faceLayers; /* layer to implement shadow */
+ gxMapping advanceMapping; /* algorithmic change to advance width */
+ gxFaceLayer faceLayer[1]; /* zero or more face layers describing the face */
+};
+typedef struct gxTextFace gxTextFace;
+
+struct gxJoinRecord {
+ gxJoinAttribute attributes;
+ gxShape join;
+ Fixed miter;
+};
+typedef struct gxJoinRecord gxJoinRecord;
+
+struct gxDashRecord {
+ gxDashAttribute attributes;
+ gxShape dash; /* similar to pattern, except rotated to gxLine slope */
+ Fixed advance; /* specifies repeating frequency of dash */
+ Fract phase; /* specifies offset into the gxPath to start dashing */
+ Fixed scale; /* specifies height of dash to be mapped to penWidth */
+};
+typedef struct gxDashRecord gxDashRecord;
+
+struct gxPatternRecord {
+ gxPatternAttribute attributes;
+ gxShape pattern;
+ gxPoint u;
+ gxPoint v;
+};
+typedef struct gxPatternRecord gxPatternRecord;
+
+struct gxCapRecord {
+ gxCapAttribute attributes;
+ gxShape startCap;
+ gxShape endCap;
+};
+typedef struct gxCapRecord gxCapRecord;
+
+/* gxInk enumerations */
+enum {
+ gxPortAlignDitherInk = 0x0001,
+ gxForceDitherInk = 0x0002,
+ gxSuppressDitherInk = 0x0004,
+ gxSuppressHalftoneInk = 0x0008
+};
+
+
+typedef long gxInkAttribute;
+enum {
+ gxNoMode = 0,
+ gxCopyMode = 1,
+ gxAddMode = 2,
+ gxBlendMode = 3,
+ gxMigrateMode = 4,
+ gxMinimumMode = 5,
+ gxMaximumMode = 6,
+ gxHighlightMode = 7,
+ gxAndMode = 8,
+ gxOrMode = 9,
+ gxXorMode = 10,
+ gxRampAndMode = 11,
+ gxRampOrMode = 12,
+ gxRampXorMode = 13,
+ gxOverMode = 14, /* Alpha channel modes */
+ gxAtopMode = 15, /* Note: In England = Beta channel modes */
+ gxExcludeMode = 16,
+ gxFadeMode = 17
+};
+
+typedef unsigned char gxComponentMode;
+enum {
+ gxRejectSourceTransfer = 0x0001, /* at least one component must be out of range */
+ gxRejectDeviceTransfer = 0x0002, /* at least one component must be out of range */
+ gxSingleComponentTransfer = 0x0004 /* duplicate gxTransferComponent[0] for all components in transfer */
+};
+
+typedef long gxTransferFlag;
+enum {
+ gxOverResultComponent = 0x01, /* & result gxColor with 0xFFFF before clamping */
+ gxReverseComponent = 0x02 /* reverse source and device before moding */
+};
+
+typedef unsigned char gxComponentFlag;
+/* gxInk structures */
+
+struct gxTransferComponent {
+ gxComponentMode mode; /* how the component is operated upon */
+ gxComponentFlag flags; /* flags for each component */
+ gxColorValue sourceMinimum;
+ gxColorValue sourceMaximum; /* input filter range */
+ gxColorValue deviceMinimum;
+ gxColorValue deviceMaximum; /* output filter range */
+ gxColorValue clampMinimum;
+ gxColorValue clampMaximum; /* output clamping range */
+ gxColorValue operand; /* ratio for blend, step for migrate, gxColor for highlight */
+};
+typedef struct gxTransferComponent gxTransferComponent;
+struct gxTransferMode {
+ gxColorSpace space; /* the gxColor-space the transfer mode is to operate in */
+ gxColorSet set;
+ gxColorProfile profile;
+ Fixed sourceMatrix[5][4];
+ Fixed deviceMatrix[5][4];
+ Fixed resultMatrix[5][4];
+ gxTransferFlag flags;
+ gxTransferComponent component[4]; /* how each component is operated upon */
+};
+typedef struct gxTransferMode gxTransferMode;
+
+/* gxColor space enumerations */
+enum {
+ gxNoColorPacking = 0x0000, /* 16 bits per channel */
+ gxAlphaSpace = 0x0080, /* space includes alpha channel */
+ gxWord5ColorPacking = 0x0500, /* 5 bits per channel, right-justified */
+ gxLong8ColorPacking = 0x0800, /* 8 bits per channel, right-justified */
+ gxLong10ColorPacking = 0x0A00, /* 10 bits per channel, right-justified */
+ gxAlphaFirstPacking = 0x1000 /* alpha channel is the first field in the packed space */
+};
+
+enum {
+ gxNoSpace = 0,
+ gxRGBSpace = 1,
+ gxCMYKSpace = 2,
+ gxHSVSpace = 3,
+ gxHLSSpace = 4,
+ gxYXYSpace = 5,
+ gxXYZSpace = 6,
+ gxLUVSpace = 7,
+ gxLABSpace = 8,
+ gxYIQSpace = 9,
+ gxNTSCSpace = gxYIQSpace,
+ gxPALSpace = gxYIQSpace,
+ gxGraySpace = 10,
+ gxIndexedSpace = 11,
+ gxRGBASpace = gxRGBSpace + gxAlphaSpace,
+ gxGrayASpace = gxGraySpace + gxAlphaSpace,
+ gxRGB16Space = gxWord5ColorPacking + gxRGBSpace,
+ gxRGB32Space = gxLong8ColorPacking + gxRGBSpace,
+ gxARGB32Space = gxLong8ColorPacking + gxAlphaFirstPacking + gxRGBASpace,
+ gxCMYK32Space = gxLong8ColorPacking + gxCMYKSpace,
+ gxHSV32Space = gxLong10ColorPacking + gxHSVSpace,
+ gxHLS32Space = gxLong10ColorPacking + gxHLSSpace,
+ gxYXY32Space = gxLong10ColorPacking + gxYXYSpace,
+ gxXYZ32Space = gxLong10ColorPacking + gxXYZSpace,
+ gxLUV32Space = gxLong10ColorPacking + gxLUVSpace,
+ gxLAB32Space = gxLong10ColorPacking + gxLABSpace,
+ gxYIQ32Space = gxLong10ColorPacking + gxYIQSpace,
+ gxNTSC32Space = gxYIQ32Space,
+ gxPAL32Space = gxYIQ32Space
+};
+
+/* gxColor space structures */
+
+struct gxRGBColor {
+ gxColorValue red;
+ gxColorValue green;
+ gxColorValue blue;
+};
+typedef struct gxRGBColor gxRGBColor;
+
+struct gxRGBAColor {
+ gxColorValue red;
+ gxColorValue green;
+ gxColorValue blue;
+ gxColorValue alpha;
+};
+typedef struct gxRGBAColor gxRGBAColor;
+
+struct gxHSVColor {
+ gxColorValue hue;
+ gxColorValue saturation;
+ gxColorValue value;
+};
+typedef struct gxHSVColor gxHSVColor;
+
+struct gxHLSColor {
+ gxColorValue hue;
+ gxColorValue lightness;
+ gxColorValue saturation;
+};
+typedef struct gxHLSColor gxHLSColor;
+
+struct gxCMYKColor {
+ gxColorValue cyan;
+ gxColorValue magenta;
+ gxColorValue yellow;
+ gxColorValue black;
+};
+typedef struct gxCMYKColor gxCMYKColor;
+
+struct gxXYZColor {
+ gxColorValue x;
+ gxColorValue y;
+ gxColorValue z;
+};
+typedef struct gxXYZColor gxXYZColor;
+
+struct gxYXYColor {
+ gxColorValue capY;
+ gxColorValue x;
+ gxColorValue y;
+};
+typedef struct gxYXYColor gxYXYColor;
+
+struct gxLUVColor {
+ gxColorValue l;
+ gxColorValue u;
+ gxColorValue v;
+};
+typedef struct gxLUVColor gxLUVColor;
+
+struct gxLABColor {
+ gxColorValue l;
+ gxColorValue a;
+ gxColorValue b;
+};
+typedef struct gxLABColor gxLABColor;
+
+struct gxYIQColor {
+ gxColorValue y;
+ gxColorValue i;
+ gxColorValue q;
+};
+typedef struct gxYIQColor gxYIQColor;
+
+struct gxGrayAColor {
+ gxColorValue gray;
+ gxColorValue alpha;
+};
+typedef struct gxGrayAColor gxGrayAColor;
+
+typedef long gxColorIndex;
+struct gxIndexedColor {
+ gxColorIndex index;
+ gxColorSet set;
+};
+typedef struct gxIndexedColor gxIndexedColor;
+
+struct gxColor {
+ gxColorSpace space;
+ gxColorProfile profile;
+ union {
+ gxCMYKColor cmyk;
+ gxRGBColor rgb;
+ gxRGBAColor rgba;
+ gxHSVColor hsv;
+ gxHLSColor hls;
+ gxXYZColor xyz;
+ gxYXYColor yxy;
+ gxLUVColor luv;
+ gxLABColor lab;
+ gxYIQColor yiq;
+ gxColorValue gray;
+ gxGrayAColor graya;
+ unsigned short pixel16;
+ unsigned long pixel32;
+ gxIndexedColor indexed;
+ gxColorValue component[4];
+ } element;
+};
+typedef struct gxColor gxColor;
+
+/* gxColorSet structures */
+
+union gxSetColor {
+ gxCMYKColor cmyk;
+ gxRGBColor rgb;
+ gxRGBAColor rgba;
+ gxHSVColor hsv;
+ gxHLSColor hls;
+ gxXYZColor xyz;
+ gxYXYColor yxy;
+ gxLUVColor luv;
+ gxLABColor lab;
+ gxYIQColor yiq;
+ gxColorValue gray;
+ gxGrayAColor graya;
+ unsigned short pixel16;
+ unsigned long pixel32;
+ gxColorValue component[4];
+};
+typedef union gxSetColor gxSetColor;
+/* gxTransform enumerations */
+/* parts of a gxShape considered in hit testing: */
+enum {
+ gxNoPart = 0, /* (in order of evaluation) */
+ gxBoundsPart = 0x0001,
+ gxGeometryPart = 0x0002,
+ gxPenPart = 0x0004,
+ gxCornerPointPart = 0x0008,
+ gxControlPointPart = 0x0010,
+ gxEdgePart = 0x0020,
+ gxJoinPart = 0x0040,
+ gxStartCapPart = 0x0080,
+ gxEndCapPart = 0x0100,
+ gxDashPart = 0x0200,
+ gxPatternPart = 0x0400,
+ gxGlyphBoundsPart = gxJoinPart,
+ gxGlyphFirstPart = gxStartCapPart,
+ gxGlyphLastPart = gxEndCapPart,
+ gxSideBearingPart = gxDashPart,
+ gxAnyPart = gxBoundsPart | gxGeometryPart | gxPenPart | gxCornerPointPart | gxControlPointPart | gxEdgePart | gxJoinPart | gxStartCapPart | gxEndCapPart | gxDashPart | gxPatternPart
+};
+
+
+typedef long gxShapePart;
+/* gxTransform structures */
+
+struct gxHitTestInfo {
+ gxShapePart what; /* which part of gxShape */
+ long index; /* control gxPoint index */
+ Fixed distance; /* how far from gxPoint or outside of area click was */
+
+ /* these fields are only set by GXHitTestPicture */
+ gxShape which;
+ gxShape containerPicture; /* picture which contains gxShape hit */
+ long containerIndex; /* the index within that picture */
+ long totalIndex; /* the total index within the root picture */
+};
+typedef struct gxHitTestInfo gxHitTestInfo;
+/* gxViewPort enumerations */
+enum {
+ gxGrayPort = 0x0001,
+ gxAlwaysGridPort = 0x0002,
+ gxEnableMatchPort = 0x0004
+};
+
+
+typedef long gxPortAttribute;
+/* gxViewDevice enumerations */
+enum {
+ gxDirectDevice = 0x01, /* for the device gxBitmap baseAddr pointer */
+ gxRemoteDevice = 0x02,
+ gxInactiveDevice = 0x04
+};
+
+typedef long gxDeviceAttribute;
+enum {
+ gxRoundDot = 1,
+ gxSpiralDot = 2,
+ gxSquareDot = 3,
+ gxLineDot = 4,
+ gxEllipticDot = 5,
+ gxTriangleDot = 6,
+ gxDispersedDot = 7,
+ gxCustomDot = 8
+};
+
+typedef long gxDotType;
+/* gxViewPort structures */
+enum {
+ gxNoTint = 0,
+ gxLuminanceTint = 1, /* use the luminance of the gxColor */
+ gxAverageTint = 2, /* add all the components and divide by the number of components */
+ gxMixtureTint = 3, /* find the closest gxColor on the axis between the foreground and background */
+ gxComponent1Tint = 4, /* use the value of the first component of the gxColor */
+ gxComponent2Tint = 5, /* ... etc. */
+ gxComponent3Tint = 6,
+ gxComponent4Tint = 7
+};
+
+typedef long gxTintType;
+
+struct gxHalftone {
+ Fixed angle;
+ Fixed frequency;
+ gxDotType method;
+ gxTintType tinting;
+ gxColor dotColor;
+ gxColor backgroundColor;
+ gxColorSpace tintSpace;
+};
+typedef struct gxHalftone gxHalftone;
+
+struct gxHalftoneMatrix {
+ Fixed dpiX; /* intended resolution */
+ Fixed dpiY;
+ long width; /* width of matrix (in device pixels) */
+ long height; /* height of matrix (in device pixels) */
+ long tileShift; /* shift amount (in samples) for rectangular tiling */
+ unsigned short samples[1]; /* samples from 0..MAX(halftone tintSpace) */
+};
+typedef struct gxHalftoneMatrix gxHalftoneMatrix;
+/* gxViewGroup enumerations */
+#define gxAllViewDevices ((gxViewGroup) 0)
+#define gxScreenViewDevices ((gxViewGroup) 1)
+/* graphics stream constants and structures */
+enum {
+ gxOpenReadSpool = 1,
+ gxOpenWriteSpool = 2,
+ gxReadSpool = 3,
+ gxWriteSpool = 4,
+ gxCloseSpool = 5
+};
+
+
+typedef long gxSpoolCommand;
+typedef unsigned char gxGraphicsOpcode;
+typedef struct gxSpoolBlock gxSpoolBlock;
+typedef CALLBACK_API_C( long , gxSpoolProcPtr )(gxSpoolCommand command, gxSpoolBlock *block);
+typedef STACK_UPP_TYPE(gxSpoolProcPtr) gxSpoolUPP;
+
+struct gxSpoolBlock {
+ gxSpoolUPP spoolProcedure; /* these fields are read only */
+ void * buffer; /* source/destination pointer to data */
+ long bufferSize; /* how many bytes for the system to read (flatten) / write (unflatten) */
+ /* these fields are written to (but are not read from) */
+ long count; /* how many bytes for the caller to read (unflatten) /write (flatten) */
+ long operationSize; /* operation size (including operand byte) */
+ long operationOffset; /* the data offset, if any, within the current operation */
+ gxGraphicsOpcode lastTypeOpcode; /* type of last created object */
+ gxGraphicsOpcode currentOperation; /* operation emitted by flatten, or intrepreted by last unflatten */
+ gxGraphicsOpcode currentOperand; /* e.g., gxTransformTypeOpcode, gxInkTagOpcode */
+ unsigned char compressed; /* one of: gxTwoBitCompressionValues */
+};
+
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(gxSpoolUPP)
+ NewgxSpoolUPP (gxSpoolProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposegxSpoolUPP (gxSpoolUPP userUPP);
+
+ EXTERN_API(long)
+ InvokegxSpoolUPP (gxSpoolCommand command,
+ gxSpoolBlock * block,
+ gxSpoolUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppgxSpoolProcInfo = 0x000003F1 }; /* 4_bytes Func(4_bytes, 4_bytes) */
+ #define NewgxSpoolUPP(userRoutine) (gxSpoolUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppgxSpoolProcInfo, GetCurrentArchitecture())
+ #define DisposegxSpoolUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokegxSpoolUPP(command, block, userUPP) (long)CALL_TWO_PARAMETER_UPP((userUPP), uppgxSpoolProcInfo, (command), (block))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewgxSpoolProc(userRoutine) NewgxSpoolUPP(userRoutine)
+#define CallgxSpoolProc(userRoutine, command, block) InvokegxSpoolUPP(command, block, userRoutine)
+
+enum {
+ gxFontListFlatten = 0x01, /* if set, generate a gxTag containing list of each gxFont referenced */
+ gxFontGlyphsFlatten = 0x02, /* if set, generate a gxTag containing the list of glyphs referenced inside the gxFont */
+ gxFontVariationsFlatten = 0x04, /* if set, append the gxTag with separate [variation] coordinates */
+ gxBitmapAliasFlatten = 0x08 /* if set, open bitmap alias files and flatten out their image data */
+};
+
+
+typedef long gxFlattenFlag;
+/* gxGraphicsClient constants */
+#define gxGraphicsSystemClient (gxGraphicsClient)(-1)
+enum {
+ gxStaticHeapClient = 0x0001
+};
+
+typedef long gxClientAttribute;
+/* graphics patching constants */
+enum {
+ gxOriginalGraphicsFunction = -1,
+ gxOriginalGraphicsIdentifier = FOUR_CHAR_CODE('grfx')
+};
+
+
+struct gxBitmapDataSourceAlias {
+ unsigned long fileOffset; /* file offset (in bytes) of top-left pixel */
+ unsigned long aliasRecordSize; /* size of alias record below */
+ unsigned char aliasRecord[1]; /* the actual alias record data */
+};
+typedef struct gxBitmapDataSourceAlias gxBitmapDataSourceAlias;
+enum {
+ gxBitmapFileAliasTagType = FOUR_CHAR_CODE('bfil'),
+ gxPICTFileAliasTagType = FOUR_CHAR_CODE('pict'),
+ gxBitmapFileAliasImageValue = 1L
+};
+
+typedef struct OpaquegxFont* gxFont;
+enum {
+ gxNoPlatform = 0,
+ gxNoScript = 0,
+ gxNoLanguage = 0,
+ gxNoFontName = 0,
+ gxGlyphPlatform = -1
+};
+
+enum {
+ gxUnicodePlatform = 1,
+ gxMacintoshPlatform = 2,
+ gxReservedPlatform = 3,
+ gxMicrosoftPlatform = 4,
+ gxCustomPlatform = 5
+};
+
+
+typedef long gxFontPlatform;
+enum {
+ gxUnicodeDefaultSemantics = 1,
+ gxUnicodeV1_1Semantics = 2,
+ gxISO10646_1993Semantics = 3
+};
+
+enum {
+ gxRomanScript = 1,
+ gxJapaneseScript = 2,
+ gxTraditionalChineseScript = 3,
+ gxChineseScript = gxTraditionalChineseScript,
+ gxKoreanScript = 4,
+ gxArabicScript = 5,
+ gxHebrewScript = 6,
+ gxGreekScript = 7,
+ gxCyrillicScript = 8,
+ gxRussian = gxCyrillicScript,
+ gxRSymbolScript = 9,
+ gxDevanagariScript = 10,
+ gxGurmukhiScript = 11,
+ gxGujaratiScript = 12,
+ gxOriyaScript = 13,
+ gxBengaliScript = 14,
+ gxTamilScript = 15,
+ gxTeluguScript = 16,
+ gxKannadaScript = 17,
+ gxMalayalamScript = 18,
+ gxSinhaleseScript = 19,
+ gxBurmeseScript = 20,
+ gxKhmerScript = 21,
+ gxThaiScript = 22,
+ gxLaotianScript = 23,
+ gxGeorgianScript = 24,
+ gxArmenianScript = 25,
+ gxSimpleChineseScript = 26,
+ gxTibetanScript = 27,
+ gxMongolianScript = 28,
+ gxGeezScript = 29,
+ gxEthiopicScript = gxGeezScript,
+ gxAmharicScript = gxGeezScript,
+ gxSlavicScript = 30,
+ gxEastEuropeanRomanScript = gxSlavicScript,
+ gxVietnameseScript = 31,
+ gxExtendedArabicScript = 32,
+ gxSindhiScript = gxExtendedArabicScript,
+ gxUninterpretedScript = 33
+};
+
+enum {
+ gxMicrosoftSymbolScript = 1,
+ gxMicrosoftStandardScript = 2
+};
+
+enum {
+ gxCustom8BitScript = 1,
+ gxCustom816BitScript = 2,
+ gxCustom16BitScript = 3
+};
+
+typedef long gxFontScript;
+enum {
+ gxEnglishLanguage = 1,
+ gxFrenchLanguage = 2,
+ gxGermanLanguage = 3,
+ gxItalianLanguage = 4,
+ gxDutchLanguage = 5,
+ gxSwedishLanguage = 6,
+ gxSpanishLanguage = 7,
+ gxDanishLanguage = 8,
+ gxPortugueseLanguage = 9,
+ gxNorwegianLanguage = 10,
+ gxHebrewLanguage = 11,
+ gxJapaneseLanguage = 12,
+ gxArabicLanguage = 13,
+ gxFinnishLanguage = 14,
+ gxGreekLanguage = 15,
+ gxIcelandicLanguage = 16,
+ gxMalteseLanguage = 17,
+ gxTurkishLanguage = 18,
+ gxCroatianLanguage = 19,
+ gxTradChineseLanguage = 20,
+ gxUrduLanguage = 21,
+ gxHindiLanguage = 22,
+ gxThaiLanguage = 23,
+ gxKoreanLanguage = 24,
+ gxLithuanianLanguage = 25,
+ gxPolishLanguage = 26,
+ gxHungarianLanguage = 27,
+ gxEstonianLanguage = 28,
+ gxLettishLanguage = 29,
+ gxLatvianLanguage = gxLettishLanguage,
+ gxSaamiskLanguage = 30,
+ gxLappishLanguage = gxSaamiskLanguage,
+ gxFaeroeseLanguage = 31,
+ gxFarsiLanguage = 32,
+ gxPersianLanguage = gxFarsiLanguage,
+ gxRussianLanguage = 33,
+ gxSimpChineseLanguage = 34,
+ gxFlemishLanguage = 35,
+ gxIrishLanguage = 36,
+ gxAlbanianLanguage = 37,
+ gxRomanianLanguage = 38,
+ gxCzechLanguage = 39,
+ gxSlovakLanguage = 40,
+ gxSlovenianLanguage = 41,
+ gxYiddishLanguage = 42,
+ gxSerbianLanguage = 43,
+ gxMacedonianLanguage = 44,
+ gxBulgarianLanguage = 45,
+ gxUkrainianLanguage = 46,
+ gxByelorussianLanguage = 47,
+ gxUzbekLanguage = 48,
+ gxKazakhLanguage = 49,
+ gxAzerbaijaniLanguage = 50,
+ gxAzerbaijanArLanguage = 51,
+ gxArmenianLanguage = 52,
+ gxGeorgianLanguage = 53,
+ gxMoldavianLanguage = 54,
+ gxKirghizLanguage = 55,
+ gxTajikiLanguage = 56,
+ gxTurkmenLanguage = 57,
+ gxMongolianLanguage = 58,
+ gxMongolianCyrLanguage = 59,
+ gxPashtoLanguage = 60,
+ gxKurdishLanguage = 61,
+ gxKashmiriLanguage = 62,
+ gxSindhiLanguage = 63,
+ gxTibetanLanguage = 64,
+ gxNepaliLanguage = 65,
+ gxSanskritLanguage = 66,
+ gxMarathiLanguage = 67,
+ gxBengaliLanguage = 68,
+ gxAssameseLanguage = 69,
+ gxGujaratiLanguage = 70,
+ gxPunjabiLanguage = 71,
+ gxOriyaLanguage = 72,
+ gxMalayalamLanguage = 73,
+ gxKannadaLanguage = 74,
+ gxTamilLanguage = 75,
+ gxTeluguLanguage = 76,
+ gxSinhaleseLanguage = 77,
+ gxBurmeseLanguage = 78,
+ gxKhmerLanguage = 79,
+ gxLaoLanguage = 80,
+ gxVietnameseLanguage = 81,
+ gxIndonesianLanguage = 82,
+ gxTagalogLanguage = 83,
+ gxMalayRomanLanguage = 84,
+ gxMalayArabicLanguage = 85,
+ gxAmharicLanguage = 86,
+ gxTigrinyaLanguage = 87,
+ gxGallaLanguage = 88,
+ gxOromoLanguage = gxGallaLanguage,
+ gxSomaliLanguage = 89,
+ gxSwahiliLanguage = 90,
+ gxRuandaLanguage = 91,
+ gxRundiLanguage = 92,
+ gxChewaLanguage = 93,
+ gxMalagasyLanguage = 94,
+ gxEsperantoLanguage = 95,
+ gxWelshLanguage = 129,
+ gxBasqueLanguage = 130,
+ gxCatalanLanguage = 131,
+ gxLatinLanguage = 132,
+ gxQuechuaLanguage = 133,
+ gxGuaraniLanguage = 134,
+ gxAymaraLanguage = 135,
+ gxTatarLanguage = 136,
+ gxUighurLanguage = 137,
+ gxDzongkhaLanguage = 138,
+ gxJavaneseRomLanguage = 139,
+ gxSundaneseRomLanguage = 140
+};
+
+typedef long gxFontLanguage;
+enum {
+ gxCopyrightFontName = 1,
+ gxFamilyFontName = 2,
+ gxStyleFontName = 3,
+ gxUniqueFontName = 4,
+ gxFullFontName = 5,
+ gxVersionFontName = 6,
+ gxPostscriptFontName = 7,
+ gxTrademarkFontName = 8,
+ gxManufacturerFontName = 9,
+ gxLastReservedFontName = 256
+};
+
+typedef long gxFontName;
+typedef long gxFontTableTag;
+typedef long gxFontVariationTag;
+typedef long gxFontFormatTag;
+typedef long gxFontStorageTag;
+typedef gxFontVariationTag gxFontDescriptorTag;
+
+struct gxFontVariation {
+ gxFontVariationTag name;
+ Fixed value;
+};
+typedef struct gxFontVariation gxFontVariation;
+
+typedef gxFontVariation gxFontDescriptor;
+
+struct gxFontFeatureSetting {
+ unsigned short setting;
+ unsigned short nameID;
+};
+typedef struct gxFontFeatureSetting gxFontFeatureSetting;
+enum {
+ gxSystemFontAttribute = 0x0001,
+ gxReadOnlyFontAttribute = 0x0002
+};
+
+
+typedef long gxFontAttribute;
+enum {
+ gxMutuallyExclusiveFeature = 0x00008000
+};
+
+typedef long gxFontFeatureFlag;
+typedef long gxFontFeature;
+enum {
+ gxResourceFontStorage = FOUR_CHAR_CODE('rsrc'),
+ gxHandleFontStorage = FOUR_CHAR_CODE('hndl'),
+ gxFileFontStorage = FOUR_CHAR_CODE('bass'),
+ gxNfntFontStorage = FOUR_CHAR_CODE('nfnt')
+};
+
+typedef void * gxFontStorageReference;
+typedef unsigned short gxGlyphcode;
+/* single glyph in a font */
+/* byte offset within backing store */
+typedef long gxByteOffset;
+/* The actual constants for feature types and selectors have been moved to a library. */
+typedef unsigned short gxRunFeatureType;
+typedef unsigned short gxRunFeatureSelector;
+/* If tracking is not desired, specify the following value in the track field in the
+ gxRunControls record (note that a track of 0 does *not* mean to turn tracking off;
+ rather, it means to use normal tracking). */
+enum {
+ gxNoTracking = gxNegativeInfinity
+};
+
+/* The special "gxNoStake" value is returned by the GXGetLayoutBreakOffset call to
+ indicate the absence of a character offset that is stable with respect to
+ metamorphosis and contextual kerning. */
+enum {
+ gxNoStake = -1
+};
+
+/* A glyph's behavior with respect to other glyphs on its line is defined in part by its
+ gxBaselineType. These types allow correct alignment of the baselines of all glyphs on
+ the line. */
+enum {
+ gxRomanBaseline = 0,
+ gxIdeographicCenterBaseline = 1,
+ gxIdeographicLowBaseline = 2,
+ gxHangingBaseline = 3,
+ gxMathBaseline = 4,
+ gxLastBaseline = 31,
+ gxNumberOfBaselineTypes = gxLastBaseline + 1,
+ gxNoOverrideBaseline = 255
+};
+
+typedef unsigned long gxBaselineType;
+typedef Fixed gxBaselineDeltas[32];
+/* gxJustificationPriority defines the point during the justification process at which a
+ glyph will begin to receive deltas before and after itself. */
+enum {
+ gxKashidaPriority = 0,
+ gxWhiteSpacePriority = 1,
+ gxInterCharPriority = 2,
+ gxNullJustificationPriority = 3,
+ gxNumberOfJustificationPriorities = 4
+};
+
+typedef unsigned char gxJustificationPriority;
+/* gxJustificationFlags are used to control which fields of a gxWidthDeltaRecord are to
+ be overridden and which are not if a gxPriorityJustificationOverride or
+ gxGlyphJustificationOverride (qq.v.) is specified. */
+enum {
+ gxOverridePriority = 0x8000, /* use priority value from override */
+ gxOverrideLimits = 0x4000, /* use limits values from override */
+ gxOverrideUnlimited = 0x2000, /* use unlimited flag from override */
+ gxUnlimitedGapAbsorption = 0x1000, /* glyph can take unlimited gap */
+ gxJustificationPriorityMask = 0x000F, /* justification priority */
+ gxAllJustificationFlags = (gxOverridePriority | gxOverrideLimits | gxOverrideUnlimited | gxUnlimitedGapAbsorption | gxJustificationPriorityMask)
+};
+
+typedef unsigned short gxJustificationFlags;
+/* The directional behavior of a glyph can be overridden using a gxDirectionOverride. */
+enum {
+ gxNoDirectionOverride = 0,
+ gxImposeLeftToRight = 1,
+ gxImposeRightToLeft = 2,
+ gxImposeArabic = 3
+};
+
+typedef unsigned short gxDirectionOverride;
+/* gxRunControlFlags describe the nonparametric layout options contained in a gxStyle. */
+enum {
+ gxNoCaretAngle = 0x40000000,
+ gxImposeWidth = 0x20000000,
+ gxNoCrossKerning = 0x10000000,
+ gxNoOpticalAlignment = 0x08000000,
+ gxForceHanging = 0x04000000,
+ gxNoSpecialJustification = 0x02000000,
+ gxDirectionOverrideMask = 0x00000003,
+ gxNoLigatureSplits = (long)0x80000000
+};
+
+enum {
+ gxAllRunControlFlags = (gxNoLigatureSplits | gxNoCaretAngle | gxImposeWidth | gxNoCrossKerning | gxNoOpticalAlignment | gxForceHanging | gxNoSpecialJustification | gxDirectionOverrideMask)
+};
+
+typedef unsigned long gxRunControlFlags;
+/* gxHighlightType is used to distinguish various highlighting methods, both in terms of
+ character offset based vs. visual based, and in terms of angled sides vs. non-angled
+ sides. */
+enum {
+ gxHighlightStraight = 0, /* straight-edged simple highlighting */
+ gxHighlightAverageAngle = 1 /* takes average of two edge angles */
+};
+
+typedef unsigned long gxHighlightType;
+/* gxCaretType is used to control whether the caret that is returned from GXGetLayoutCaret
+ is a split caret or a (keyboard-syncronized) single caret. */
+enum {
+ gxSplitCaretType = 0, /* returns Mac-style split caret (default) */
+ gxLeftRightKeyboardCaret = 1, /* single caret in left-right position */
+ gxRightLeftKeyboardCaret = 2 /* single caret in right-left position */
+};
+
+typedef unsigned long gxCaretType;
+/* gxLayoutOffsetState describes the characteristics of a given gxByteOffset in some
+ layout. It is returned by the GXGetOffsetGlyphs call. Note that the
+ gxOffsetInsideLigature value is returned in addition to the 8/16 (or invalid)
+ indication. */
+enum {
+ gxOffset8_8 = 0,
+ gxOffset8_16 = 1,
+ gxOffset16_8 = 2,
+ gxOffset16_16 = 3,
+ gxOffsetInvalid = 4
+};
+
+enum {
+ gxOffsetInsideLigature = 0x8000
+};
+
+typedef unsigned short gxLayoutOffsetState;
+/* gxLayoutOptionsFlags are single-bit flags contained in a gxLayoutOptions record. We
+ also define here some utility constants that are useful in setting various fields in
+ the gxLayoutOptions record. */
+enum {
+ gxNoLayoutOptions = 0,
+ gxLineIsDisplayOnly = 0x00000001,
+ gxKeepSpacesInMargin = 0x00000002,
+ gxLimitReorderingToTwoLevels = 0x00000004,
+ gxLineLeftEdgeNotAtMargin = 0x00000008,
+ gxLineRightEdgeNotAtMargin = 0x00000010,
+ gxAllLayoutOptionsFlags = gxLineIsDisplayOnly | gxKeepSpacesInMargin | gxLimitReorderingToTwoLevels | gxLineLeftEdgeNotAtMargin | gxLineRightEdgeNotAtMargin,
+ gxMaxRunLevel = 15,
+ gxFlushLeft = 0,
+ gxFlushCenter = fract1 / 2,
+ gxFlushRight = fract1,
+ gxNoJustification = 0,
+ gxFullJustification = fract1
+};
+
+typedef unsigned long gxLayoutOptionsFlags;
+/* A gxRunFeature describes a feature and a level for that feature. */
+
+struct gxRunFeature {
+ gxRunFeatureType featureType;
+ gxRunFeatureSelector featureSelector;
+};
+typedef struct gxRunFeature gxRunFeature;
+/* A gxWidthDeltaRecord contains all of the information needed to describe the behavior of one
+ class of glyphs during the justification process. */
+
+struct gxWidthDeltaRecord {
+ Fixed beforeGrowLimit; /* ems AW can grow by at most on LT */
+ Fixed beforeShrinkLimit; /* ems AW can shrink by at most on LT */
+ Fixed afterGrowLimit; /* ems AW can grow by at most on RB */
+ Fixed afterShrinkLimit; /* ems AW can shrink by at most on RB */
+ gxJustificationFlags growFlags; /* flags controlling grow case */
+ gxJustificationFlags shrinkFlags; /* flags controlling shrink case */
+};
+typedef struct gxWidthDeltaRecord gxWidthDeltaRecord;
+/* A gxPriorityJustificationOverride contains an array of WidthDeltaRecords, one for each
+ gxJustificationPriority. */
+
+struct gxPriorityJustificationOverride {
+ gxWidthDeltaRecord deltas[4]; /* overrides for each of the priorities */
+};
+typedef struct gxPriorityJustificationOverride gxPriorityJustificationOverride;
+/* A gxGlyphJustificationOverride contains a gxWidthDeltaRecord that is to be used for a
+ specific glyph in a specific run (this limitation is because glyphcodes vary by font). */
+
+struct gxGlyphJustificationOverride {
+ gxGlyphcode glyph;
+ gxWidthDeltaRecord override;
+};
+typedef struct gxGlyphJustificationOverride gxGlyphJustificationOverride;
+
+/* gxRunControls contains flags, shifts, imposed widths and overrides for a run. */
+/* NOTE: a value of "gxNoTracking" (see above) in track disables tracking */
+
+struct gxRunControls {
+ gxRunControlFlags flags;
+ Fixed beforeWithStreamShift;
+ Fixed afterWithStreamShift;
+ Fixed crossStreamShift;
+ Fixed imposedWidth;
+ Fixed track;
+ Fract hangingInhibitFactor;
+ Fract kerningInhibitFactor;
+ Fixed decompositionAdjustmentFactor;
+ gxBaselineType baselineType;
+};
+typedef struct gxRunControls gxRunControls;
+/* A gxGlyphSubstitution describes one client-provided substitution that occurs after all
+ other automatic glyph changes have happened. */
+
+struct gxGlyphSubstitution {
+ gxGlyphcode originalGlyph; /* Whenever you see this glyph... */
+ gxGlyphcode substituteGlyph; /* ...change it to this one. */
+};
+typedef struct gxGlyphSubstitution gxGlyphSubstitution;
+/* gxKerningAdjustmentFactors specify an adjustment to automatic kerning. The adjustment
+ is ax + b where x is the automatic kerning value, a is scaleFactor, and b is
+ adjustmentPointSizeFactor times the run's point size. */
+
+struct gxKerningAdjustmentFactors {
+ Fract scaleFactor;
+ Fixed adjustmentPointSizeFactor;
+};
+typedef struct gxKerningAdjustmentFactors gxKerningAdjustmentFactors;
+/* A gxKerningAdjustment identifies with- and cross-stream kerning adjustments
+ for specific glyph pairs. */
+
+struct gxKerningAdjustment {
+ gxGlyphcode firstGlyph;
+ gxGlyphcode secondGlyph;
+ gxKerningAdjustmentFactors withStreamFactors;
+ gxKerningAdjustmentFactors crossStreamFactors;
+};
+typedef struct gxKerningAdjustment gxKerningAdjustment;
+/* A value of gxResetCrossStreamFactor in crossStreamFactors.adjustmentPointSizeFactor
+ will reset the cross-stream kerning to the baseline. */
+enum {
+ gxResetCrossStreamFactor = gxNegativeInfinity
+};
+
+/* gxLayoutHitInfo contains the output from the GXHitTestLayout call. */
+
+struct gxLayoutHitInfo {
+ Fixed firstPartialDist;
+ Fixed lastPartialDist;
+ gxByteOffset hitSideOffset;
+ gxByteOffset nonHitSideOffset;
+ Boolean leadingEdge;
+ Boolean inLoose;
+};
+typedef struct gxLayoutHitInfo gxLayoutHitInfo;
+/* A gxLineBaselineRecord contains the deltas from 0 to all the different baselines for
+ the layout. It can be filled via a call to GetBaselineDeltas (q.v.). */
+
+struct gxLineBaselineRecord {
+ gxBaselineDeltas deltas;
+};
+typedef struct gxLineBaselineRecord gxLineBaselineRecord;
+/* The gxLayoutOptions type contains information about the layout characteristics of the
+ whole line. */
+
+struct gxLayoutOptions {
+ Fixed width;
+ Fract flush;
+ Fract just;
+ gxLayoutOptionsFlags flags;
+ gxLineBaselineRecord * baselineRec;
+};
+typedef struct gxLayoutOptions gxLayoutOptions;
+enum {
+ gxNewObjectOpcode = 0x00, /* create new object */
+ gxSetDataOpcode = 0x40, /* add reference to current object */
+ gxSetDefaultOpcode = 0x80, /* replace current default with this object */
+ gxReservedOpcode = 0xC0, /* (may be used in future expansion) */
+ gxNextOpcode = 0xFF /* used by currentOperand field to say opcode is coming */
+};
+
+/* new object types (new object opcode) */
+enum {
+ gxHeaderTypeOpcode = 0x00, /* byte following new object uses bottom 6 bits for type */
+ /* gxShape types use values 1 (gxEmptyType) through 13 (gxPictureType) */
+ gxStyleTypeOpcode = 0x28,
+ gxInkTypeOpcode = 0x29,
+ gxTransformTypeOpcode = 0x2A,
+ gxColorProfileTypeOpcode = 0x2B,
+ gxColorSetTypeOpcode = 0x2C,
+ gxTagTypeOpcode = 0x2D,
+ gxBitImageOpcode = 0x2E,
+ gxFontNameTypeOpcode = 0x2F,
+ gxTrailerTypeOpcode = 0x3F
+};
+
+/* fields of objects (set data opcodes) */
+enum {
+ gxShapeAttributesOpcode = 0,
+ gxShapeTagOpcode = 1,
+ gxShapeFillOpcode = 2
+};
+
+enum {
+ gxOmitPathPositionXMask = 0xC0,
+ gxOmitPathPositionYMask = 0x30,
+ gxOmitPathDeltaXMask = 0x0C,
+ gxOmitPathDeltaYMask = 0x03
+};
+
+enum {
+ gxOmitPathPositionXShift = 6,
+ gxOmitPathPositionYShift = 4,
+ gxOmitPathDeltaXShift = 2,
+ gxOmitPathDeltaYShift = 0
+};
+
+enum {
+ gxOmitBitmapImageMask = 0xC0,
+ gxOmitBitmapWidthMask = 0x30,
+ gxOmitBitmapHeightMask = 0x0C,
+ gxOmitBitmapRowBytesMask = 0x03
+};
+
+enum {
+ gxOmitBitmapImageShift = 6,
+ gxOmitBitmapWidthShift = 4,
+ gxOmitBitmapHeightShift = 2,
+ gxOmitBitmapRowBytesShift = 0
+};
+
+enum {
+ gxOmitBitmapPixelSizeMask = 0xC0,
+ gxOmitBitmapSpaceMask = 0x30,
+ gxOmitBitmapSetMask = 0x0C,
+ gxOmitBitmapProfileMask = 0x03
+};
+
+enum {
+ gxOmitBitmapPixelSizeShift = 6,
+ gxOmitBitmapSpaceShift = 4,
+ gxOmitBitmapSetShift = 2,
+ gxOmitBitmapProfileShift = 0
+};
+
+enum {
+ gxOmitBitmapPositionXMask = 0xC0,
+ gxOmitBitmapPositionYMask = 0x30
+};
+
+enum {
+ gxOmitBitmapPositionXShift = 6,
+ gxOmitBitmapPositionYShift = 4
+};
+
+enum {
+ gxOmitBitImageRowBytesMask = 0xC0,
+ gxOmitBitImageHeightMask = 0x30,
+ gxOmitBitImageDataMask = 0x08
+};
+
+enum {
+ gxOmitBitImageRowBytesShift = 6,
+ gxOmitBitImageHeightShift = 4,
+ gxOmitBitImageDataShift = 3
+};
+
+enum {
+ gxCopyBitImageBytesOpcode = 0x00,
+ gxRepeatBitImageBytesOpcode = 0x40,
+ gxLookupBitImageBytesOpcode = 0x80,
+ gxRepeatBitImageScanOpcode = 0xC0
+};
+
+enum {
+ gxOmitTextCharactersMask = 0xC0,
+ gxOmitTextPositionXMask = 0x30,
+ gxOmitTextPositionYMask = 0x0C,
+ gxOmitTextDataMask = 0x02
+};
+
+enum {
+ gxOmitTextCharactersShift = 6,
+ gxOmitTextPositionXShift = 4,
+ gxOmitTextPositionYShift = 2,
+ gxOmitTextDataShift = 1
+};
+
+enum {
+ gxOmitGlyphCharactersMask = 0xC0,
+ gxOmitGlyphLengthMask = 0x30,
+ gxOmitGlyphRunNumberMask = 0x0C,
+ gxOmitGlyphOnePositionMask = 0x02,
+ gxOmitGlyphDataMask = 0x01
+};
+
+enum {
+ gxOmitGlyphCharactersShift = 6,
+ gxOmitGlyphLengthShift = 4,
+ gxOmitGlyphRunNumberShift = 2,
+ gxOmitGlyphOnePositionShift = 1,
+ gxOmitGlyphDataShift = 0
+};
+
+enum {
+ gxOmitGlyphPositionsMask = 0xC0,
+ gxOmitGlyphAdvancesMask = 0x20,
+ gxOmitGlyphTangentsMask = 0x18,
+ gxOmitGlyphRunsMask = 0x04,
+ gxOmitGlyphStylesMask = 0x03
+};
+
+enum {
+ gxOmitGlyphPositionsShift = 6,
+ gxOmitGlyphAdvancesShift = 5,
+ gxOmitGlyphTangentsShift = 3,
+ gxOmitGlyphRunsShift = 2,
+ gxOmitGlyphStylesShift = 0
+};
+
+enum {
+ gxOmitLayoutLengthMask = 0xC0,
+ gxOmitLayoutPositionXMask = 0x30,
+ gxOmitLayoutPositionYMask = 0x0C,
+ gxOmitLayoutDataMask = 0x02
+};
+
+enum {
+ gxOmitLayoutLengthShift = 6,
+ gxOmitLayoutPositionXShift = 4,
+ gxOmitLayoutPositionYShift = 2,
+ gxOmitLayoutDataShift = 1
+};
+
+enum {
+ gxOmitLayoutWidthMask = 0xC0,
+ gxOmitLayoutFlushMask = 0x30,
+ gxOmitLayoutJustMask = 0x0C,
+ gxOmitLayoutOptionsMask = 0x03
+};
+
+enum {
+ gxOmitLayoutWidthShift = 6,
+ gxOmitLayoutFlushShift = 4,
+ gxOmitLayoutJustShift = 2,
+ gxOmitLayoutOptionsShift = 0
+};
+
+enum {
+ gxOmitLayoutStyleRunNumberMask = 0xC0,
+ gxOmitLayoutLevelRunNumberMask = 0x30,
+ gxOmitLayoutHasBaselineMask = 0x08,
+ gxOmitLayoutStyleRunsMask = 0x04,
+ gxOmitLayoutStylesMask = 0x03
+};
+
+enum {
+ gxOmitLayoutStyleRunNumberShift = 6,
+ gxOmitLayoutLevelRunNumberShift = 4,
+ gxOmitLayoutHasBaselineShift = 3,
+ gxOmitLayoutStyleRunsShift = 2,
+ gxOmitLayoutStylesShift = 0
+};
+
+enum {
+ gxOmitLayoutLevelRunsMask = 0x80,
+ gxOmitLayoutLevelsMask = 0x40
+};
+
+enum {
+ gxOmitLayoutLevelRunsShift = 7,
+ gxOmitLayoutLevelsShift = 6
+};
+
+enum {
+ gxInkAttributesOpcode = 0,
+ gxInkTagOpcode = 1,
+ gxInkColorOpcode = 2,
+ gxInkTransferModeOpcode = 3
+};
+
+enum {
+ gxOmitColorsSpaceMask = 0xC0,
+ gxOmitColorsProfileMask = 0x30,
+ gxOmitColorsComponentsMask = 0x0F,
+ gxOmitColorsIndexMask = 0x0C,
+ gxOmitColorsIndexSetMask = 0x03
+};
+
+enum {
+ gxOmitColorsSpaceShift = 6,
+ gxOmitColorsProfileShift = 4,
+ gxOmitColorsComponentsShift = 0,
+ gxOmitColorsIndexShift = 2,
+ gxOmitColorsIndexSetShift = 0
+};
+
+enum {
+ gxOmitTransferSpaceMask = 0xC0,
+ gxOmitTransferSetMask = 0x30,
+ gxOmitTransferProfileMask = 0x0C
+};
+
+enum {
+ gxOmitTransferSpaceShift = 6,
+ gxOmitTransferSetShift = 4,
+ gxOmitTransferProfileShift = 2
+};
+
+enum {
+ gxOmitTransferSourceMatrixMask = 0xC0,
+ gxOmitTransferDeviceMatrixMask = 0x30,
+ gxOmitTransferResultMatrixMask = 0x0C,
+ gxOmitTransferFlagsMask = 0x03
+};
+
+enum {
+ gxOmitTransferSourceMatrixShift = 6,
+ gxOmitTransferDeviceMatrixShift = 4,
+ gxOmitTransferResultMatrixShift = 2,
+ gxOmitTransferFlagsShift = 0
+};
+
+enum {
+ gxOmitTransferComponentModeMask = 0x80,
+ gxOmitTransferComponentFlagsMask = 0x40,
+ gxOmitTransferComponentSourceMinimumMask = 0x30,
+ gxOmitTransferComponentSourceMaximumMask = 0x0C,
+ gxOmitTransferComponentDeviceMinimumMask = 0x03
+};
+
+enum {
+ gxOmitTransferComponentModeShift = 7,
+ gxOmitTransferComponentFlagsShift = 6,
+ gxOmitTransferComponentSourceMinimumShift = 4,
+ gxOmitTransferComponentSourceMaximumShift = 2,
+ gxOmitTransferComponentDeviceMinimumShift = 0
+};
+
+enum {
+ gxOmitTransferComponentDeviceMaximumMask = 0xC0,
+ gxOmitTransferComponentClampMinimumMask = 0x30,
+ gxOmitTransferComponentClampMaximumMask = 0x0C,
+ gxOmitTransferComponentOperandMask = 0x03
+};
+
+enum {
+ gxOmitTransferComponentDeviceMaximumShift = 6,
+ gxOmitTransferComponentClampMinimumShift = 4,
+ gxOmitTransferComponentClampMaximumShift = 2,
+ gxOmitTransferComponentOperandShift = 0
+};
+
+enum {
+ gxStyleAttributesOpcode = 0,
+ gxStyleTagOpcode = 1,
+ gxStyleCurveErrorOpcode = 2,
+ gxStylePenOpcode = 3,
+ gxStyleJoinOpcode = 4,
+ gxStyleDashOpcode = 5,
+ gxStyleCapsOpcode = 6,
+ gxStylePatternOpcode = 7,
+ gxStyleTextAttributesOpcode = 8,
+ gxStyleTextSizeOpcode = 9,
+ gxStyleFontOpcode = 10,
+ gxStyleTextFaceOpcode = 11,
+ gxStylePlatformOpcode = 12,
+ gxStyleFontVariationsOpcode = 13,
+ gxStyleRunControlsOpcode = 14,
+ gxStyleRunPriorityJustOverrideOpcode = 15,
+ gxStyleRunGlyphJustOverridesOpcode = 16,
+ gxStyleRunGlyphSubstitutionsOpcode = 17,
+ gxStyleRunFeaturesOpcode = 18,
+ gxStyleRunKerningAdjustmentsOpcode = 19,
+ gxStyleJustificationOpcode = 20
+};
+
+enum {
+ gxOmitDashAttributesMask = 0xC0,
+ gxOmitDashShapeMask = 0x30,
+ gxOmitDashAdvanceMask = 0x0C,
+ gxOmitDashPhaseMask = 0x03
+};
+
+enum {
+ gxOmitDashAttributesShift = 6,
+ gxOmitDashShapeShift = 4,
+ gxOmitDashAdvanceShift = 2,
+ gxOmitDashPhaseShift = 0
+};
+
+enum {
+ gxOmitDashScaleMask = 0xC0
+};
+
+enum {
+ gxOmitDashScaleShift = 6
+};
+
+enum {
+ gxOmitPatternAttributesMask = 0xC0,
+ gxOmitPatternShapeMask = 0x30,
+ gxOmitPatternUXMask = 0x0C,
+ gxOmitPatternUYMask = 0x03
+};
+
+enum {
+ gxOmitPatternAttributesShift = 6,
+ gxOmitPatternShapeShift = 4,
+ gxOmitPatternUXShift = 2,
+ gxOmitPatternUYShift = 0
+};
+
+enum {
+ gxOmitPatternVXMask = 0xC0,
+ gxOmitPatternVYMask = 0x30
+};
+
+enum {
+ gxOmitPatternVXShift = 6,
+ gxOmitPatternVYShift = 4
+};
+
+enum {
+ gxOmitJoinAttributesMask = 0xC0,
+ gxOmitJoinShapeMask = 0x30,
+ gxOmitJoinMiterMask = 0x0C
+};
+
+enum {
+ gxOmitJoinAttributesShift = 6,
+ gxOmitJoinShapeShift = 4,
+ gxOmitJoinMiterShift = 2
+};
+
+enum {
+ gxOmitCapAttributesMask = 0xC0,
+ gxOmitCapStartShapeMask = 0x30,
+ gxOmitCapEndShapeMask = 0x0C
+};
+
+enum {
+ gxOmitCapAttributesShift = 6,
+ gxOmitCapStartShapeShift = 4,
+ gxOmitCapEndShapeShift = 2
+};
+
+enum {
+ gxOmitFaceLayersMask = 0xC0,
+ gxOmitFaceMappingMask = 0x30
+};
+
+enum {
+ gxOmitFaceLayersShift = 6,
+ gxOmitFaceMappingShift = 4
+};
+
+enum {
+ gxOmitFaceLayerFillMask = 0xC0,
+ gxOmitFaceLayerFlagsMask = 0x30,
+ gxOmitFaceLayerStyleMask = 0x0C,
+ gxOmitFaceLayerTransformMask = 0x03
+};
+
+enum {
+ gxOmitFaceLayerFillShift = 6,
+ gxOmitFaceLayerFlagsShift = 4,
+ gxOmitFaceLayerStyleShift = 2,
+ gxOmitFaceLayerTransformShift = 0
+};
+
+enum {
+ gxOmitFaceLayerBoldXMask = 0xC0,
+ gxOmitFaceLayerBoldYMask = 0x30
+};
+
+enum {
+ gxOmitFaceLayerBoldXShift = 6,
+ gxOmitFaceLayerBoldYShift = 4
+};
+
+enum {
+ gxColorSetReservedOpcode = 0,
+ gxColorSetTagOpcode = 1
+};
+
+enum {
+ gxColorProfileReservedOpcode = 0,
+ gxColorProfileTagOpcode = 1
+};
+
+enum {
+ gxTransformReservedOpcode = 0,
+ gxTransformTagOpcode = 1,
+ gxTransformClipOpcode = 2,
+ gxTransformMappingOpcode = 3,
+ gxTransformPartMaskOpcode = 4,
+ gxTransformToleranceOpcode = 5
+};
+
+enum {
+ gxTypeOpcode = 0,
+ gxSizeOpcode = 1
+};
+
+/* used by currentOperand when currentOperation is gxNextOpcode */
+/* format of top byte:
+xx yyyyyy xx == 0x00, 0x40, 0x80, 0xC0: defines graphics operation (see gxGraphicsOperationOpcode)
+ yyyyyy == size of operation in bytes
+ if (yyyyyy == 0), byte size follows. If byte following == 0, word size follows; if == 0, long follows
+ word and long, if present, are specified in high-endian order (first byte is largest magnitude)
+
+format of byte following size specifiers, if any:
+xx yyyyyy xx == 0x00, 0x40, 0x80, 0xC0: defines compression level (0 == none, 0xC0 == most)
+ exact method of compression is defined by type of data
+ yyyyyy == data type selector (0 to 63): see gxGraphicsNewOpcode, __DataOpcode
+*/
+enum {
+ gxOpcodeShift = 6,
+ gxObjectSizeMask = 0x3F,
+ gxCompressionShift = 6,
+ gxObjectTypeMask = 0x3F,
+ gxBitImageOpcodeMask = 0xC0,
+ gxBitImageCountMask = 0x3F,
+ gxBitImageOpcodeShift = 6
+};
+
+enum {
+ gxNoCompression = 0,
+ gxWordCompression = 1,
+ gxByteCompression = 2,
+ gxOmitCompression = 3,
+ gxCompressionMask = 0x03
+};
+
+/* the following structures define how primitives without a public geometry
+ are stored (their format mirrors that of the New call to create them) */
+
+struct gxFlatFontName {
+ unsigned char name; /* gxFontName */
+ unsigned char platform; /* gxFontPlatform */
+ unsigned char script; /* gxFontScript */
+ unsigned char language; /* gxFontLanguage */
+ short length; /* byte length */
+};
+typedef struct gxFlatFontName gxFlatFontName;
+enum {
+ gxFlatFontListItemTag = FOUR_CHAR_CODE('flst')
+};
+
+
+struct gxFlatFontListItem {
+ gxFont fontID; /*** if we get rid of this, remove #include "font types.h", above */
+ unsigned char name; /* gxFontName */
+ unsigned char platform; /* gxFontPlatform */
+ unsigned char script; /* gxFontScript */
+ unsigned char language; /* gxFontLanguage */
+ short length; /* byte length of the name that follows */
+ unsigned short glyphCount; /* CountFontGlyphs or 0 if gxFontGlyphsFlatten is false */
+ unsigned short axisCount; /* CountFontVariations or 0 if gxFontVariationsFlatten is false */
+ unsigned short variationCount; /* number of bitsVariationPairs that follow the (optional) glyphBits */
+};
+typedef struct gxFlatFontListItem gxFlatFontListItem;
+
+struct gxFlatFontList {
+ long count;
+ gxFlatFontListItem items[1];
+};
+typedef struct gxFlatFontList gxFlatFontList;
+
+struct gxFlattenHeader {
+ Fixed version;
+ unsigned char flatFlags;
+ SInt8 padding;
+};
+typedef struct gxFlattenHeader gxFlattenHeader;
+enum {
+ gxOmitPictureShapeMask = 0xC0,
+ gxOmitOverrideStyleMask = 0x30,
+ gxOmitOverrideInkMask = 0x0C,
+ gxOmitOverrideTransformMask = 0x03
+};
+
+enum {
+ gxOmitPictureShapeShift = 0x06,
+ gxOmitOverrideStyleShift = 0x04,
+ gxOmitOverrideInkShift = 0x02,
+ gxOmitOverrideTransformShift = 0x00
+};
+
+enum {
+ gxPostScriptTag = FOUR_CHAR_CODE('post'),
+ gxPostControlTag = FOUR_CHAR_CODE('psct')
+};
+
+enum {
+ gxNoSave = 1, /* don't do save-restore around PS data */
+ gxPSContinueNext = 2 /* next shape is continuation of this shape's PS -- only obeyed if gxNoSave is true */
+};
+
+
+struct gxPostControl {
+ long flags; /* PostScript state flags */
+};
+typedef struct gxPostControl gxPostControl;
+enum {
+ gxDashSynonymTag = FOUR_CHAR_CODE('sdsh')
+};
+
+
+struct gxDashSynonym {
+ long size; /* number of elements in array */
+ Fixed dashLength[1]; /* Array of dash lengths */
+};
+typedef struct gxDashSynonym gxDashSynonym;
+enum {
+ gxLineCapSynonymTag = FOUR_CHAR_CODE('lcap')
+};
+
+enum {
+ gxButtCap = 0,
+ gxRoundCap = 1,
+ gxSquareCap = 2,
+ gxTriangleCap = 3
+};
+
+/* gxLine cap type */
+
+typedef long gxLineCapSynonym;
+enum {
+ gxCubicSynonymTag = FOUR_CHAR_CODE('cubx')
+};
+
+enum {
+ gxIgnoreFlag = 0x0000, /* Ignore this word, get next one */
+ gxLineToFlag = 0x0001, /* Draw a gxLine to gxPoint following this flag */
+ gxCurveToFlag = 0x0002, /* Draw a gxCurve through the 3 points following this flag */
+ gxMoveToFlag = 0x0003, /* Start a new contour at the gxPoint following this flag */
+ gxClosePathFlag = 0x0004 /* Close the contour */
+};
+
+typedef long gxCubicSynonym;
+enum {
+ gxCubicInstructionMask = 0x000F /* low four bits are gxPoint instructions */
+};
+
+/* Low four bits are instruction (moveto, lineto, curveto, closepath) */
+typedef short gxCubicSynonymFlags;
+enum {
+ gxPatternSynonymTag = FOUR_CHAR_CODE('ptrn')
+};
+
+enum {
+ gxHatch = 0,
+ gxCrossHatch = 1
+};
+
+
+struct gxPatternSynonym {
+ long patternType; /* one of the gxPatterns: gxHatch or gxCrossHatch */
+ Fixed angle; /* angle at which pattern is drawn */
+ Fixed spacing; /* distance between two parallel pattern lines */
+ Fixed thickness; /* thickness of the pattern */
+ gxPoint anchorPoint; /* gxPoint with with respect to which pattern position is calculated */
+};
+typedef struct gxPatternSynonym gxPatternSynonym;
+enum {
+ gxURLTag = FOUR_CHAR_CODE('urlt')
+};
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __GXTYPES__ */
+
diff --git a/include/qt/Gestalt.h b/include/qt/Gestalt.h
new file mode 100644
index 000000000..ed2c7dac2
--- /dev/null
+++ b/include/qt/Gestalt.h
@@ -0,0 +1,1804 @@
+/*
+ File: Gestalt.h
+
+ Contains: Gestalt Interfaces.
+
+ Version: Technology: Mac OS 8.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1988-2001 by Apple Computer, Inc. All rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __GESTALT__
+#define __GESTALT__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+
+
+typedef CALLBACK_API( OSErr , SelectorFunctionProcPtr )(OSType selector, long *response);
+typedef STACK_UPP_TYPE(SelectorFunctionProcPtr) SelectorFunctionUPP;
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 Gestalt(__D0, __A1)
+ #endif
+EXTERN_API( OSErr )
+Gestalt (OSType selector,
+ long * response) TWOWORDINLINE(0xA1AD, 0x2288);
+
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 ReplaceGestalt(__D0, __A0, __A1)
+ #endif
+EXTERN_API( OSErr )
+ReplaceGestalt (OSType selector,
+ SelectorFunctionUPP gestaltFunction,
+ SelectorFunctionUPP * oldGestaltFunction) FOURWORDINLINE(0x2F09, 0xA5AD, 0x225F, 0x2288);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 NewGestalt(__D0, __A0)
+ #endif
+EXTERN_API( OSErr )
+NewGestalt (OSType selector,
+ SelectorFunctionUPP gestaltFunction) ONEWORDINLINE(0xA3AD);
+
+/* The GestaltValue functions are available in System 7.5 and later*/
+
+EXTERN_API( OSErr )
+NewGestaltValue (OSType selector,
+ long newValue) THREEWORDINLINE(0x303C, 0x0401, 0xABF1);
+
+EXTERN_API( OSErr )
+ReplaceGestaltValue (OSType selector,
+ long replacementValue) THREEWORDINLINE(0x303C, 0x0402, 0xABF1);
+
+EXTERN_API( OSErr )
+SetGestaltValue (OSType selector,
+ long newValue) THREEWORDINLINE(0x303C, 0x0404, 0xABF1);
+
+EXTERN_API( OSErr )
+DeleteGestaltValue (OSType selector) THREEWORDINLINE(0x303C, 0x0203, 0xABF1);
+
+
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(SelectorFunctionUPP)
+ NewSelectorFunctionUPP (SelectorFunctionProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeSelectorFunctionUPP (SelectorFunctionUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeSelectorFunctionUPP (OSType selector,
+ long * response,
+ SelectorFunctionUPP userUPP);
+
+#else
+ enum { uppSelectorFunctionProcInfo = 0x000003E0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes) */
+ #define NewSelectorFunctionUPP(userRoutine) (SelectorFunctionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSelectorFunctionProcInfo, GetCurrentArchitecture())
+ #define DisposeSelectorFunctionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeSelectorFunctionUPP(selector, response, userUPP) (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppSelectorFunctionProcInfo, (selector), (response))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewSelectorFunctionProc(userRoutine) NewSelectorFunctionUPP(userRoutine)
+#define CallSelectorFunctionProc(userRoutine, selector, response) InvokeSelectorFunctionUPP(selector, response, userRoutine)
+
+/* Environment Selectors */
+enum {
+ gestaltAddressingModeAttr = FOUR_CHAR_CODE('addr'), /* addressing mode attributes */
+ gestalt32BitAddressing = 0, /* using 32-bit addressing mode */
+ gestalt32BitSysZone = 1, /* 32-bit compatible system zone */
+ gestalt32BitCapable = 2 /* Machine is 32-bit capable */
+};
+
+enum {
+ gestaltAFPClient = FOUR_CHAR_CODE('afps'),
+ gestaltAFPClientVersionMask = 0x0000FFFF, /* low word of long is the */
+ /* client version 0x0001 -> 0x0007*/
+ gestaltAFPClient3_5 = 0x0001,
+ gestaltAFPClient3_6 = 0x0002,
+ gestaltAFPClient3_6_1 = 0x0003,
+ gestaltAFPClient3_6_2 = 0x0004,
+ gestaltAFPClient3_6_3 = 0x0005, /* including 3.6.4, 3.6.5*/
+ gestaltAFPClient3_7 = 0x0006, /* including 3.7.1*/
+ gestaltAFPClient3_7_2 = 0x0007, /* including 3.7.3, 3.7.4*/
+ gestaltAFPClient3_8 = 0x0008,
+ gestaltAFPClient3_8_1 = 0x0009, /* including 3.8.2 */
+ gestaltAFPClient3_8_3 = 0x000A,
+ gestaltAFPClient3_8_4 = 0x000B, /* including 3.8.5, 3.8.6 */
+ gestaltAFPClientAttributeMask = (long)0xFFFF0000, /* high word of long is a */
+ /* set of attribute bits*/
+ gestaltAFPClientCfgRsrc = 16, /* Client uses config resources*/
+ gestaltAFPClientSupportsIP = 29, /* Client supports AFP over TCP/IP*/
+ gestaltAFPClientVMUI = 30, /* Client can put up UI from the PBVolMount trap*/
+ gestaltAFPClientMultiReq = 31 /* Client supports multiple outstanding requests*/
+};
+
+
+enum {
+ gestaltAliasMgrAttr = FOUR_CHAR_CODE('alis'), /* Alias Mgr Attributes */
+ gestaltAliasMgrPresent = 0, /* True if the Alias Mgr is present */
+ gestaltAliasMgrSupportsRemoteAppletalk = 1, /* True if the Alias Mgr knows about Remote Appletalk */
+ gestaltAliasMgrSupportsAOCEKeychain = 2, /* True if the Alias Mgr knows about the AOCE Keychain */
+ gestaltAliasMgrResolveAliasFileWithMountOptions = 3 /* True if the Alias Mgr implements gestaltAliasMgrResolveAliasFileWithMountOptions() and IsAliasFile() */
+};
+
+/* Gestalt selector and values for the Appearance Manager */
+enum {
+ gestaltAppearanceAttr = FOUR_CHAR_CODE('appr'),
+ gestaltAppearanceExists = 0,
+ gestaltAppearanceCompatMode = 1
+};
+
+/* Gestalt selector for determining Appearance Manager version */
+/* If this selector does not exist, but gestaltAppearanceAttr */
+/* does, it indicates that the 1.0 version is installed. This */
+/* gestalt returns a BCD number representing the version of the */
+/* Appearance Manager that is currently running, e.g. 0x0101 for */
+/* version 1.0.1. */
+enum {
+ gestaltAppearanceVersion = FOUR_CHAR_CODE('apvr')
+};
+
+enum {
+ gestaltArbitorAttr = FOUR_CHAR_CODE('arb '),
+ gestaltSerialArbitrationExists = 0 /* this bit if the serial port arbitrator exists*/
+};
+
+enum {
+ gestaltAppleScriptVersion = FOUR_CHAR_CODE('ascv') /* AppleScript version*/
+};
+
+enum {
+ gestaltAppleScriptAttr = FOUR_CHAR_CODE('ascr'), /* AppleScript attributes*/
+ gestaltAppleScriptPresent = 0,
+ gestaltAppleScriptPowerPCSupport = 1
+};
+
+enum {
+ gestaltATAAttr = FOUR_CHAR_CODE('ata '), /* ATA is the driver to support IDE hard disks */
+ gestaltATAPresent = 0 /* if set, ATA Manager is present */
+};
+
+enum {
+ gestaltATalkVersion = FOUR_CHAR_CODE('atkv') /* Detailed AppleTalk version; see comment above for format */
+};
+
+enum {
+ gestaltAppleTalkVersion = FOUR_CHAR_CODE('atlk') /* appletalk version */
+};
+
+/*
+ FORMAT OF gestaltATalkVersion RESPONSE
+ --------------------------------------
+ The version is stored in the high three bytes of the response value. Let us number
+ the bytes in the response value from 0 to 3, where 0 is the least-significant byte.
+
+ Byte#: 3 2 1 0
+ Value: 0xMMNNRR00
+
+ Byte 3 (MM) contains the major revision number, byte 2 (NN) contains the minor
+ revision number, and byte 1 (RR) contains a constant that represents the release
+ stage. Byte 0 always contains 0x00. The constants for the release stages are:
+
+ development = 0x20
+ alpha = 0x40
+ beta = 0x60
+ final = 0x80
+ release = 0x80
+
+ For example, if you call Gestalt with the 'atkv' selector when AppleTalk version 57
+ is loaded, you receive the long integer response value 0x39008000.
+*/
+enum {
+ gestaltAUXVersion = FOUR_CHAR_CODE('a/ux') /* a/ux version, if present */
+};
+
+enum {
+ gestaltBusClkSpeed = FOUR_CHAR_CODE('bclk') /* main I/O bus clock speed in hertz */
+};
+
+enum {
+ gestaltCloseViewAttr = FOUR_CHAR_CODE('BSDa'), /* CloseView attributes */
+ gestaltCloseViewEnabled = 0, /* Closeview enabled (dynamic bit - returns current state) */
+ gestaltCloseViewDisplayMgrFriendly = 1 /* Closeview compatible with Display Manager (FUTURE) */
+};
+
+enum {
+ gestaltCarbonVersion = FOUR_CHAR_CODE('cbon') /* version of Carbon API present in system */
+};
+
+enum {
+ gestaltCFMAttr = FOUR_CHAR_CODE('cfrg'), /* Selector for information about the Code Fragment Manager */
+ gestaltCFMPresent = 0, /* True if the Code Fragment Manager is present */
+ gestaltCFMPresentMask = 0x0001,
+ gestaltCFM99Present = 2, /* True if the CFM-99 features are present. */
+ gestaltCFM99PresentMask = 0x0004
+};
+
+enum {
+ gestaltCollectionMgrVersion = FOUR_CHAR_CODE('cltn') /* Collection Manager version */
+};
+
+enum {
+ gestaltColorMatchingAttr = FOUR_CHAR_CODE('cmta'), /* ColorSync attributes */
+ gestaltHighLevelMatching = 0,
+ gestaltColorMatchingLibLoaded = 1
+};
+
+enum {
+ gestaltColorMatchingVersion = FOUR_CHAR_CODE('cmtc'),
+ gestaltColorSync10 = 0x0100, /* 0x0100 & 0x0110 _Gestalt versions for 1.0-1.0.3 product */
+ gestaltColorSync11 = 0x0110, /* 0x0100 == low-level matching only */
+ gestaltColorSync104 = 0x0104, /* Real version, by popular demand */
+ gestaltColorSync105 = 0x0105,
+ gestaltColorSync20 = 0x0200, /* ColorSync 2.0 */
+ gestaltColorSync21 = 0x0210,
+ gestaltColorSync211 = 0x0211,
+ gestaltColorSync212 = 0x0212,
+ gestaltColorSync213 = 0x0213,
+ gestaltColorSync25 = 0x0250,
+ gestaltColorSync26 = 0x0260,
+ gestaltColorSync261 = 0x0261,
+ gestaltColorSync30 = 0x0300
+};
+
+enum {
+ gestaltControlMgrAttr = FOUR_CHAR_CODE('cntl'), /* Control Mgr*/
+ gestaltControlMgrPresent = (1L << 0)
+};
+
+enum {
+ gestaltConnMgrAttr = FOUR_CHAR_CODE('conn'), /* connection mgr attributes */
+ gestaltConnMgrPresent = 0,
+ gestaltConnMgrCMSearchFix = 1, /* Fix to CMAddSearch? */
+ gestaltConnMgrErrorString = 2, /* has CMGetErrorString() */
+ gestaltConnMgrMultiAsyncIO = 3 /* CMNewIOPB, CMDisposeIOPB, CMPBRead, CMPBWrite, CMPBIOKill */
+};
+
+enum {
+ gestaltColorPickerVersion = FOUR_CHAR_CODE('cpkr'), /* returns version of ColorPicker */
+ gestaltColorPicker = FOUR_CHAR_CODE('cpkr') /* gestaltColorPicker is old name for gestaltColorPickerVersion */
+};
+
+enum {
+ gestaltComponentMgr = FOUR_CHAR_CODE('cpnt') /* Component Mgr version */
+};
+
+/*
+ The gestaltNativeCPUtype ('cput') selector can be used to determine the
+ native CPU type for all Macs running System 7.5 or later.
+
+ The 'cput' selector is not available when running System 7.0 (or earlier)
+ on most 68K machines. If 'cput' is not available, then the 'proc' selector
+ should be used to determine the processor type.
+
+ An application should always try the 'cput' selector first. This is because,
+ on PowerPC machines, the 'proc' selector will reflect the CPU type of the
+ emulator's "virtual processor" rather than the native CPU type.
+
+ The values specified below are accurate. Prior versions of the Gestalt
+ interface file contained values that were off by one.
+
+ The Quadra 840AV and the Quadra 660AV contain a bug in the ROM code that
+ causes the 'cput' selector to respond with the value 5. This behavior
+ occurs only when running System 7.1. System 7.5 fixes the bug by replacing
+ the faulty 'cput' selector function with the correct one.
+
+ The gestaltNativeCPUfamily ('cpuf') selector can be used to determine the
+ general family the native CPU is in. This can be helpful for determing how
+ blitters and things should be written. In general, it is smarter to use this
+ selector (when available) than gestaltNativeCPUtype since newer processors
+ in the same family can be handled without revising your code.
+
+ gestaltNativeCPUfamily uses the same results as gestaltNativeCPUtype, but
+ will only return certain CPU values.
+*/
+enum {
+ gestaltNativeCPUtype = FOUR_CHAR_CODE('cput'), /* Native CPU type */
+ gestaltNativeCPUfamily = FOUR_CHAR_CODE('cpuf'), /* Native CPU family */
+ gestaltCPU68000 = 0, /* Various 68k CPUs... */
+ gestaltCPU68010 = 1,
+ gestaltCPU68020 = 2,
+ gestaltCPU68030 = 3,
+ gestaltCPU68040 = 4,
+ gestaltCPU601 = 0x0101, /* IBM 601 */
+ gestaltCPU603 = 0x0103,
+ gestaltCPU604 = 0x0104,
+ gestaltCPU603e = 0x0106,
+ gestaltCPU603ev = 0x0107,
+ gestaltCPU750 = 0x0108, /* Also 740 - "G3" */
+ gestaltCPU604e = 0x0109,
+ gestaltCPU604ev = 0x010A /* Mach 5, 250Mhz and up */
+};
+
+#if TARGET_OS_WIN32
+enum {
+ /* x86 CPUs all start with 'i' in the high nybble */
+ gestaltCPU486 = FOUR_CHAR_CODE('i486'),
+ gestaltCPUPentium = FOUR_CHAR_CODE('i586'),
+ gestaltCPUPentiumPro = FOUR_CHAR_CODE('i5pr'),
+ gestaltCPUPentiumII = FOUR_CHAR_CODE('i5ii'),
+ gestaltCPUPentiumIII = FOUR_CHAR_CODE('i5_3'),
+ gestaltCPUPentium4 = FOUR_CHAR_CODE('i5_4'),
+ gestaltCPUX86 = FOUR_CHAR_CODE('ixxx')
+};
+
+#endif /* TARGET_OS_WIN32 */
+
+enum {
+ gestaltCRMAttr = FOUR_CHAR_CODE('crm '), /* comm resource mgr attributes */
+ gestaltCRMPresent = 0,
+ gestaltCRMPersistentFix = 1, /* fix for persistent tools */
+ gestaltCRMToolRsrcCalls = 2 /* has CRMGetToolResource/ReleaseToolResource */
+};
+
+enum {
+ gestaltControlStripVersion = FOUR_CHAR_CODE('csvr') /* Control Strip version (was 'sdvr') */
+};
+
+enum {
+ gestaltCTBVersion = FOUR_CHAR_CODE('ctbv') /* CommToolbox version */
+};
+
+enum {
+ gestaltDBAccessMgrAttr = FOUR_CHAR_CODE('dbac'), /* Database Access Mgr attributes */
+ gestaltDBAccessMgrPresent = 0 /* True if Database Access Mgr present */
+};
+
+enum {
+ gestaltSDPFindVersion = FOUR_CHAR_CODE('dfnd') /* OCE Standard Directory Panel*/
+};
+
+enum {
+ gestaltDictionaryMgrAttr = FOUR_CHAR_CODE('dict'), /* Dictionary Manager attributes */
+ gestaltDictionaryMgrPresent = 0 /* Dictionary Manager attributes */
+};
+
+enum {
+ gestaltDITLExtAttr = FOUR_CHAR_CODE('ditl'), /* AppenDITL, etc. calls from CTB */
+ gestaltDITLExtPresent = 0, /* True if calls are present */
+ gestaltDITLExtSupportsIctb = 1 /* True if AppendDITL, ShortenDITL support 'ictb's */
+};
+
+enum {
+ gestaltDialogMgrAttr = FOUR_CHAR_CODE('dlog'), /* Dialog Mgr*/
+ gestaltDialogMgrPresent = (1L << 0)
+};
+
+enum {
+ gestaltDesktopPicturesAttr = FOUR_CHAR_CODE('dkpx'), /* Desktop Pictures attributes */
+ gestaltDesktopPicturesInstalled = 0, /* True if control panel is installed */
+ gestaltDesktopPicturesDisplayed = 1 /* True if a picture is currently displayed */
+};
+
+enum {
+ gestaltDisplayMgrVers = FOUR_CHAR_CODE('dplv') /* Display Manager version */
+};
+
+enum {
+ gestaltDisplayMgrAttr = FOUR_CHAR_CODE('dply'), /* Display Manager attributes */
+ gestaltDisplayMgrPresent = 0, /* True if Display Mgr is present */
+ gestaltDisplayMgrCanSwitchMirrored = 2, /* True if Display Mgr can switch modes on mirrored displays */
+ gestaltDisplayMgrSetDepthNotifies = 3, /* True SetDepth generates displays mgr notification */
+ gestaltDisplayMgrCanConfirm = 4, /* True Display Manager supports DMConfirmConfiguration */
+ gestaltDisplayMgrColorSyncAware = 5, /* True if Display Manager supports profiles for displays */
+ gestaltDisplayMgrGeneratesProfiles = 6 /* True if Display Manager will automatically generate profiles for displays */
+};
+
+enum {
+ gestaltDragMgrAttr = FOUR_CHAR_CODE('drag'), /* Drag Manager attributes */
+ gestaltDragMgrPresent = 0, /* Drag Manager is present */
+ gestaltDragMgrFloatingWind = 1, /* Drag Manager supports floating windows */
+ gestaltPPCDragLibPresent = 2, /* Drag Manager PPC DragLib is present */
+ gestaltDragMgrHasImageSupport = 3, /* Drag Manager allows SetDragImage call */
+ gestaltCanStartDragInFloatWindow = 4 /* Drag Manager supports starting a drag in a floating window */
+};
+
+enum {
+ gestaltDigitalSignatureVersion = FOUR_CHAR_CODE('dsig') /* returns Digital Signature Toolbox version in low-order word*/
+};
+
+/*
+ Desktop Printing Feature Gestalt
+ Use this gestalt to check if third-party printer driver support is available
+*/
+enum {
+ gestaltDTPFeatures = FOUR_CHAR_CODE('dtpf'),
+ kDTPThirdPartySupported = 0x00000004 /* mask for checking if third-party drivers are supported*/
+};
+
+
+/*
+ Desktop Printer Info Gestalt
+ Use this gestalt to get a hold of information for all of the active desktop printers
+*/
+enum {
+ gestaltDTPInfo = FOUR_CHAR_CODE('dtpx') /* returns GestaltDTPInfoHdle*/
+};
+
+enum {
+ gestaltEasyAccessAttr = FOUR_CHAR_CODE('easy'), /* Easy Access attributes */
+ gestaltEasyAccessOff = 0, /* if Easy Access present, but off (no icon) */
+ gestaltEasyAccessOn = 1, /* if Easy Access "On" */
+ gestaltEasyAccessSticky = 2, /* if Easy Access "Sticky" */
+ gestaltEasyAccessLocked = 3 /* if Easy Access "Locked" */
+};
+
+enum {
+ gestaltEditionMgrAttr = FOUR_CHAR_CODE('edtn'), /* Edition Mgr attributes */
+ gestaltEditionMgrPresent = 0, /* True if Edition Mgr present */
+ gestaltEditionMgrTranslationAware = 1 /* True if edition manager is translation manager aware */
+};
+
+enum {
+ gestaltAppleEventsAttr = FOUR_CHAR_CODE('evnt'), /* Apple Events attributes */
+ gestaltAppleEventsPresent = 0, /* True if Apple Events present */
+ gestaltScriptingSupport = 1,
+ gestaltOSLInSystem = 2 /* OSL is in system so don't use the one linked in to app */
+};
+
+enum {
+ gestaltExtensionTableVersion = FOUR_CHAR_CODE('etbl') /* ExtensionTable version */
+};
+
+
+enum {
+ gestaltFBCIndexingState = FOUR_CHAR_CODE('fbci'), /* Find By Content indexing state*/
+ gestaltFBCindexingSafe = 0, /* any search will result in synchronous wait*/
+ gestaltFBCindexingCritical = 1 /* any search will execute immediately*/
+};
+
+enum {
+ gestaltFBCVersion = FOUR_CHAR_CODE('fbcv'), /* Find By Content version*/
+ gestaltFBCCurrentVersion = 0x0011 /* First release */
+};
+
+
+enum {
+ gestaltFloppyAttr = FOUR_CHAR_CODE('flpy'), /* Floppy disk drive/driver attributes */
+ gestaltFloppyIsMFMOnly = 0, /* Floppy driver only supports MFM disk formats */
+ gestaltFloppyIsManualEject = 1, /* Floppy drive, driver, and file system are in manual-eject mode */
+ gestaltFloppyUsesDiskInPlace = 2 /* Floppy drive must have special DISK-IN-PLACE output; standard DISK-CHANGED not used */
+};
+
+enum {
+ gestaltFinderAttr = FOUR_CHAR_CODE('fndr'), /* Finder attributes */
+ gestaltFinderDropEvent = 0, /* Finder recognizes drop event */
+ gestaltFinderMagicPlacement = 1, /* Finder supports magic icon placement */
+ gestaltFinderCallsAEProcess = 2, /* Finder calls AEProcessAppleEvent */
+ gestaltOSLCompliantFinder = 3, /* Finder is scriptable and recordable */
+ gestaltFinderSupports4GBVolumes = 4, /* Finder correctly handles 4GB volumes */
+ gestaltFinderHasClippings = 6, /* Finder supports Drag Manager clipping files */
+ gestaltFinderFullDragManagerSupport = 7, /* Finder accepts 'hfs ' flavors properly */
+ gestaltFinderFloppyRootComments = 8, /* in MacOS 8 and later, will be set if Finder ever supports comments on Floppy icons */
+ gestaltFinderLargeAndNotSavedFlavorsOK = 9, /* in MacOS 8 and later, this bit is set if drags with >1024-byte flavors and flavorNotSaved flavors work reliably */
+ gestaltFinderUsesExtensibleFolderManager = 10 /* Finder uses Extensible Folder Manager (for example, for Magic Routing) */
+};
+
+enum {
+ gestaltFindFolderAttr = FOUR_CHAR_CODE('fold'), /* Folder Mgr attributes */
+ gestaltFindFolderPresent = 0 /* True if Folder Mgr present */
+};
+
+
+enum {
+ gestaltFolderDescSupport = 1, /* True if Folder Mgr has FolderDesc calls */
+ gestaltFolderMgrFollowsAliasesWhenResolving = 2, /* True if Folder Mgr follows folder aliases */
+ gestaltFolderMgrSupportsExtendedCalls = 3 /* True if Folder Mgr supports the Extended calls */
+};
+
+enum {
+ gestaltFindFolderRedirectionAttr = FOUR_CHAR_CODE('fole')
+};
+
+enum {
+ gestaltFontMgrAttr = FOUR_CHAR_CODE('font'), /* Font Mgr attributes */
+ gestaltOutlineFonts = 0 /* True if Outline Fonts supported */
+};
+
+enum {
+ gestaltFPUType = FOUR_CHAR_CODE('fpu '), /* fpu type */
+ gestaltNoFPU = 0, /* no FPU */
+ gestalt68881 = 1, /* 68881 FPU */
+ gestalt68882 = 2, /* 68882 FPU */
+ gestalt68040FPU = 3 /* 68040 built-in FPU */
+};
+
+enum {
+ gestaltFSAttr = FOUR_CHAR_CODE('fs '), /* file system attributes */
+ gestaltFullExtFSDispatching = 0, /* has really cool new HFSDispatch dispatcher */
+ gestaltHasFSSpecCalls = 1, /* has FSSpec calls */
+ gestaltHasFileSystemManager = 2, /* has a file system manager */
+ gestaltFSMDoesDynamicLoad = 3, /* file system manager supports dynamic loading */
+ gestaltFSSupports4GBVols = 4, /* file system supports 4 gigabyte volumes */
+ gestaltFSSupports2TBVols = 5, /* file system supports 2 terabyte volumes */
+ gestaltHasExtendedDiskInit = 6, /* has extended Disk Initialization calls */
+ gestaltDTMgrSupportsFSM = 7, /* Desktop Manager support FSM-based foreign file systems */
+ gestaltFSNoMFSVols = 8, /* file system doesn't supports MFS volumes */
+ gestaltFSSupportsHFSPlusVols = 9, /* file system supports HFS Plus volumes */
+ gestaltFSIncompatibleDFA82 = 10 /* VCB and FCB structures changed; DFA 8.2 is incompatible */
+};
+
+enum {
+ gestaltHasHFSPlusAPIs = 12, /* file system supports HFS Plus APIs */
+ gestaltMustUseFCBAccessors = 13 /* FCBSPtr and FSFCBLen are invalid - must use FSM FCB accessor functions*/
+};
+
+enum {
+ gestaltAdminFeaturesFlagsAttr = FOUR_CHAR_CODE('fred'), /* a set of admin flags, mostly useful internally. */
+ gestaltFinderUsesSpecialOpenFoldersFile = 0 /* the Finder uses a special file to store the list of open folders */
+};
+
+enum {
+ gestaltFSMVersion = FOUR_CHAR_CODE('fsm ') /* returns version of HFS External File Systems Manager (FSM) */
+};
+
+enum {
+ gestaltFXfrMgrAttr = FOUR_CHAR_CODE('fxfr'), /* file transfer manager attributes */
+ gestaltFXfrMgrPresent = 0,
+ gestaltFXfrMgrMultiFile = 1, /* supports FTSend and FTReceive */
+ gestaltFXfrMgrErrorString = 2, /* supports FTGetErrorString */
+ gestaltFXfrMgrAsync = 3 /*supports FTSendAsync, FTReceiveAsync, FTCompletionAsync*/
+};
+
+enum {
+ gestaltGraphicsAttr = FOUR_CHAR_CODE('gfxa'), /* Quickdraw GX attributes selector */
+ gestaltGraphicsIsDebugging = 0x00000001,
+ gestaltGraphicsIsLoaded = 0x00000002,
+ gestaltGraphicsIsPowerPC = 0x00000004
+};
+
+enum {
+ gestaltGraphicsVersion = FOUR_CHAR_CODE('grfx'), /* Quickdraw GX version selector */
+ gestaltCurrentGraphicsVersion = 0x00010200 /* the version described in this set of headers */
+};
+
+enum {
+ gestaltHardwareAttr = FOUR_CHAR_CODE('hdwr'), /* hardware attributes */
+ gestaltHasVIA1 = 0, /* VIA1 exists */
+ gestaltHasVIA2 = 1, /* VIA2 exists */
+ gestaltHasASC = 3, /* Apple Sound Chip exists */
+ gestaltHasSCC = 4, /* SCC exists */
+ gestaltHasSCSI = 7, /* SCSI exists */
+ gestaltHasSoftPowerOff = 19, /* Capable of software power off */
+ gestaltHasSCSI961 = 21, /* 53C96 SCSI controller on internal bus */
+ gestaltHasSCSI962 = 22, /* 53C96 SCSI controller on external bus */
+ gestaltHasUniversalROM = 24, /* Do we have a Universal ROM? */
+ gestaltHasEnhancedLtalk = 30 /* Do we have Enhanced LocalTalk? */
+};
+
+enum {
+ gestaltHelpMgrAttr = FOUR_CHAR_CODE('help'), /* Help Mgr Attributes */
+ gestaltHelpMgrPresent = 0, /* true if help mgr is present */
+ gestaltHelpMgrExtensions = 1, /* true if help mgr extensions are installed */
+ gestaltAppleGuideIsDebug = 30,
+ gestaltAppleGuidePresent = 31 /* true if AppleGuide is installed */
+};
+
+enum {
+ gestaltHardwareVendorCode = FOUR_CHAR_CODE('hrad'), /* Returns hardware vendor information */
+ gestaltHardwareVendorApple = FOUR_CHAR_CODE('Appl') /* Hardware built by Apple */
+};
+
+enum {
+ gestaltCompressionMgr = FOUR_CHAR_CODE('icmp') /* returns version of the Image Compression Manager */
+};
+
+enum {
+ gestaltIconUtilitiesAttr = FOUR_CHAR_CODE('icon'), /* Icon Utilities attributes (Note: available in System 7.0, despite gestalt) */
+ gestaltIconUtilitiesPresent = 0, /* true if icon utilities are present */
+ gestaltIconUtilitiesHas48PixelIcons = 1, /* true if 48x48 icons are supported by IconUtilities */
+ gestaltIconUtilitiesHas32BitIcons = 2, /* true if 32-bit deep icons are supported */
+ gestaltIconUtilitiesHas8BitDeepMasks = 3, /* true if 8-bit deep masks are supported */
+ gestaltIconUtilitiesHasIconServices = 4 /* true if IconServices is present */
+};
+
+enum {
+ gestaltInternalDisplay = FOUR_CHAR_CODE('idsp') /* slot number of internal display location */
+};
+
+/*
+ To obtain information about the connected keyboard(s), one should
+ use the ADB Manager API. See Technical Note OV16 for details.
+*/
+enum {
+ gestaltKeyboardType = FOUR_CHAR_CODE('kbd '), /* keyboard type */
+ gestaltMacKbd = 1,
+ gestaltMacAndPad = 2,
+ gestaltMacPlusKbd = 3,
+ gestaltExtADBKbd = 4,
+ gestaltStdADBKbd = 5,
+ gestaltPrtblADBKbd = 6,
+ gestaltPrtblISOKbd = 7,
+ gestaltStdISOADBKbd = 8,
+ gestaltExtISOADBKbd = 9,
+ gestaltADBKbdII = 10,
+ gestaltADBISOKbdII = 11,
+ gestaltPwrBookADBKbd = 12,
+ gestaltPwrBookISOADBKbd = 13,
+ gestaltAppleAdjustKeypad = 14,
+ gestaltAppleAdjustADBKbd = 15,
+ gestaltAppleAdjustISOKbd = 16,
+ gestaltJapanAdjustADBKbd = 17, /* Japan Adjustable Keyboard */
+ gestaltPwrBkExtISOKbd = 20, /* PowerBook Extended International Keyboard with function keys */
+ gestaltPwrBkExtJISKbd = 21, /* PowerBook Extended Japanese Keyboard with function keys */
+ gestaltPwrBkExtADBKbd = 24, /* PowerBook Extended Domestic Keyboard with function keys */
+ gestaltPS2Keyboard = 27, /* PS2 keyboard */
+ gestaltPwrBkSubDomKbd = 28, /* PowerBook Subnote Domestic Keyboard with function keys w/ inverted T */
+ gestaltPwrBkSubISOKbd = 29, /* PowerBook Subnote International Keyboard with function keys w/ inverted T */
+ gestaltPwrBkSubJISKbd = 30, /* PowerBook Subnote Japanese Keyboard with function keys w/ inverted T */
+ gestaltPwrBkEKDomKbd = 195, /* (0xC3) PowerBook Domestic Keyboard with Embedded Keypad, function keys & inverted T */
+ gestaltPwrBkEKISOKbd = 196, /* (0xC4) PowerBook International Keyboard with Embedded Keypad, function keys & inverted T */
+ gestaltPwrBkEKJISKbd = 197, /* (0xC5) PowerBook Japanese Keyboard with Embedded Keypad, function keys & inverted T */
+ gestaltUSBCosmoANSIKbd = 198, /* (0xC6) Cosmo USB Domestic (ANSI) Keyboard */
+ gestaltUSBCosmoISOKbd = 199, /* (0xC7) Cosmo USB International (ISO) Keyboard */
+ gestaltUSBCosmoJISKbd = 200, /* (0xC8) Cosmo USB Japanese (JIS) Keyboard */
+ gestaltPwrBk99JISKbd = 201 /* (0xC9) '99 PowerBook JIS Keyboard with Embedded Keypad, function keys & inverted T */
+};
+
+enum {
+ gestaltLowMemorySize = FOUR_CHAR_CODE('lmem') /* size of low memory area */
+};
+
+enum {
+ gestaltLogicalRAMSize = FOUR_CHAR_CODE('lram') /* logical ram size */
+};
+
+/*
+ MACHINE TYPE CONSTANTS NAMING CONVENTION
+
+ All future machine type constant names take the following form:
+
+ gestalt<lineName><modelNumber>
+
+ Line Names
+
+ The following table contains the lines currently produced by Apple and the
+ lineName substrings associated with them:
+
+ Line lineName
+ ------------------------- ------------
+ Macintosh LC "MacLC"
+ Macintosh Performa "Performa"
+ Macintosh PowerBook "PowerBook"
+ Macintosh PowerBook Duo "PowerBookDuo"
+ Power Macintosh "PowerMac"
+ Apple Workgroup Server "AWS"
+
+ The following table contains lineNames for some discontinued lines:
+
+ Line lineName
+ ------------------------- ------------
+ Macintosh Quadra "MacQuadra" (preferred)
+ "Quadra" (also used, but not preferred)
+ Macintosh Centris "MacCentris"
+
+ Model Numbers
+
+ The modelNumber is a string representing the specific model of the machine
+ within its particular line. For example, for the Power Macintosh 8100/80,
+ the modelNumber is "8100".
+
+ Some Performa & LC model numbers contain variations in the rightmost 1 or 2
+ digits to indicate different RAM and Hard Disk configurations. A single
+ machine type is assigned for all variations of a specific model number. In
+ this case, the modelNumber string consists of the constant leftmost part
+ of the model number with 0s for the variant digits. For example, the
+ Performa 6115 and Performa 6116 are both return the same machine type
+ constant: gestaltPerforma6100.
+
+
+ OLD NAMING CONVENTIONS
+
+ The "Underscore Speed" suffix
+
+ In the past, Apple differentiated between machines that had the same model
+ number but different speeds. For example, the Power Macintosh 8100/80 and
+ Power Macintosh 8100/100 return different machine type constants. This is
+ why some existing machine type constant names take the form:
+
+ gestalt<lineName><modelNumber>_<speed>
+
+ e.g.
+
+ gestaltPowerMac8100_110
+ gestaltPowerMac7100_80
+ gestaltPowerMac7100_66
+
+ It is no longer necessary to use the "underscore speed" suffix. Starting with
+ the Power Surge machines (Power Macintosh 7200, 7500, 8500 and 9500), speed is
+ no longer used to differentiate between machine types. This is why a Power
+ Macintosh 7200/75 and a Power Macintosh 7200/90 return the same machine type
+ constant: gestaltPowerMac7200.
+
+ The "Screen Type" suffix
+
+ All PowerBook models prior to the PowerBook 190, and all PowerBook Duo models
+ before the PowerBook Duo 2300 take the form:
+
+ gestalt<lineName><modelNumber><screenType>
+
+ Where <screenType> is "c" or the empty string.
+
+ e.g.
+
+ gestaltPowerBook100
+ gestaltPowerBookDuo280
+ gestaltPowerBookDuo280c
+ gestaltPowerBook180
+ gestaltPowerBook180c
+
+ Starting with the PowerBook 190 series and the PowerBook Duo 2300 series, machine
+ types are no longer differentiated based on screen type. This is why a PowerBook
+ 5300cs/100 and a PowerBook 5300c/100 both return the same machine type constant:
+ gestaltPowerBook5300.
+
+ Macintosh LC 630 gestaltMacLC630
+ Macintosh Performa 6200 gestaltPerforma6200
+ Macintosh Quadra 700 gestaltQuadra700
+ Macintosh PowerBook 5300 gestaltPowerBook5300
+ Macintosh PowerBook Duo 2300 gestaltPowerBookDuo2300
+ Power Macintosh 8500 gestaltPowerMac8500
+*/
+
+enum {
+ gestaltMachineType = FOUR_CHAR_CODE('mach'), /* machine type */
+ gestaltClassic = 1,
+ gestaltMacXL = 2,
+ gestaltMac512KE = 3,
+ gestaltMacPlus = 4,
+ gestaltMacSE = 5,
+ gestaltMacII = 6,
+ gestaltMacIIx = 7,
+ gestaltMacIIcx = 8,
+ gestaltMacSE030 = 9,
+ gestaltPortable = 10,
+ gestaltMacIIci = 11,
+ gestaltPowerMac8100_120 = 12,
+ gestaltMacIIfx = 13,
+ gestaltMacClassic = 17,
+ gestaltMacIIsi = 18,
+ gestaltMacLC = 19,
+ gestaltMacQuadra900 = 20,
+ gestaltPowerBook170 = 21,
+ gestaltMacQuadra700 = 22,
+ gestaltClassicII = 23,
+ gestaltPowerBook100 = 24,
+ gestaltPowerBook140 = 25,
+ gestaltMacQuadra950 = 26,
+ gestaltMacLCIII = 27,
+ gestaltPerforma450 = gestaltMacLCIII,
+ gestaltPowerBookDuo210 = 29,
+ gestaltMacCentris650 = 30,
+ gestaltPowerBookDuo230 = 32,
+ gestaltPowerBook180 = 33,
+ gestaltPowerBook160 = 34,
+ gestaltMacQuadra800 = 35,
+ gestaltMacQuadra650 = 36,
+ gestaltMacLCII = 37,
+ gestaltPowerBookDuo250 = 38,
+ gestaltAWS9150_80 = 39,
+ gestaltPowerMac8100_110 = 40,
+ gestaltAWS8150_110 = gestaltPowerMac8100_110,
+ gestaltPowerMac5200 = 41,
+ gestaltPowerMac5260 = gestaltPowerMac5200,
+ gestaltPerforma5300 = gestaltPowerMac5200,
+ gestaltPowerMac6200 = 42,
+ gestaltPerforma6300 = gestaltPowerMac6200,
+ gestaltMacIIvi = 44,
+ gestaltMacIIvm = 45,
+ gestaltPerforma600 = gestaltMacIIvm,
+ gestaltPowerMac7100_80 = 47,
+ gestaltMacIIvx = 48,
+ gestaltMacColorClassic = 49,
+ gestaltPerforma250 = gestaltMacColorClassic,
+ gestaltPowerBook165c = 50,
+ gestaltMacCentris610 = 52,
+ gestaltMacQuadra610 = 53,
+ gestaltPowerBook145 = 54,
+ gestaltPowerMac8100_100 = 55,
+ gestaltMacLC520 = 56,
+ gestaltAWS9150_120 = 57,
+ gestaltPowerMac6400 = 58,
+ gestaltPerforma6400 = gestaltPowerMac6400,
+ gestaltPerforma6360 = gestaltPerforma6400,
+ gestaltMacCentris660AV = 60,
+ gestaltMacQuadra660AV = gestaltMacCentris660AV,
+ gestaltPerforma46x = 62,
+ gestaltPowerMac8100_80 = 65,
+ gestaltAWS8150_80 = gestaltPowerMac8100_80,
+ gestaltPowerMac9500 = 67,
+ gestaltPowerMac9600 = gestaltPowerMac9500,
+ gestaltPowerMac7500 = 68,
+ gestaltPowerMac7600 = gestaltPowerMac7500,
+ gestaltPowerMac8500 = 69,
+ gestaltPowerMac8600 = gestaltPowerMac8500,
+ gestaltAWS8550 = gestaltPowerMac7500,
+ gestaltPowerBook180c = 71,
+ gestaltPowerBook520 = 72,
+ gestaltPowerBook520c = gestaltPowerBook520,
+ gestaltPowerBook540 = gestaltPowerBook520,
+ gestaltPowerBook540c = gestaltPowerBook520,
+ gestaltPowerMac5400 = 74,
+ gestaltPowerMac6100_60 = 75,
+ gestaltAWS6150_60 = gestaltPowerMac6100_60,
+ gestaltPowerBookDuo270c = 77,
+ gestaltMacQuadra840AV = 78,
+ gestaltPerforma550 = 80,
+ gestaltPowerBook165 = 84,
+ gestaltPowerBook190 = 85,
+ gestaltMacTV = 88,
+ gestaltMacLC475 = 89,
+ gestaltPerforma47x = gestaltMacLC475,
+ gestaltMacLC575 = 92,
+ gestaltMacQuadra605 = 94,
+ gestaltMacQuadra630 = 98,
+ gestaltMacLC580 = 99,
+ gestaltPerforma580 = gestaltMacLC580,
+ gestaltPowerMac6100_66 = 100,
+ gestaltAWS6150_66 = gestaltPowerMac6100_66,
+ gestaltPowerBookDuo280 = 102,
+ gestaltPowerBookDuo280c = 103,
+ gestaltPowerMacLC475 = 104, /* Mac LC 475 & PPC Processor Upgrade Card*/
+ gestaltPowerMacPerforma47x = gestaltPowerMacLC475,
+ gestaltPowerMacLC575 = 105, /* Mac LC 575 & PPC Processor Upgrade Card */
+ gestaltPowerMacPerforma57x = gestaltPowerMacLC575,
+ gestaltPowerMacQuadra630 = 106, /* Quadra 630 & PPC Processor Upgrade Card*/
+ gestaltPowerMacLC630 = gestaltPowerMacQuadra630, /* Mac LC 630 & PPC Processor Upgrade Card*/
+ gestaltPowerMacPerforma63x = gestaltPowerMacQuadra630, /* Performa 63x & PPC Processor Upgrade Card*/
+ gestaltPowerMac7200 = 108,
+ gestaltPowerMac7300 = 109,
+ gestaltPowerMac7100_66 = 112,
+ gestaltPowerBook150 = 115,
+ gestaltPowerMacQuadra700 = 116, /* Quadra 700 & Power PC Upgrade Card*/
+ gestaltPowerMacQuadra900 = 117, /* Quadra 900 & Power PC Upgrade Card */
+ gestaltPowerMacQuadra950 = 118, /* Quadra 950 & Power PC Upgrade Card */
+ gestaltPowerMacCentris610 = 119, /* Centris 610 & Power PC Upgrade Card */
+ gestaltPowerMacCentris650 = 120, /* Centris 650 & Power PC Upgrade Card */
+ gestaltPowerMacQuadra610 = 121, /* Quadra 610 & Power PC Upgrade Card */
+ gestaltPowerMacQuadra650 = 122, /* Quadra 650 & Power PC Upgrade Card */
+ gestaltPowerMacQuadra800 = 123, /* Quadra 800 & Power PC Upgrade Card */
+ gestaltPowerBookDuo2300 = 124,
+ gestaltPowerBook500PPCUpgrade = 126,
+ gestaltPowerBook5300 = 128,
+ gestaltPowerBook1400 = 310,
+ gestaltPowerBook3400 = 306,
+ gestaltPowerBook2400 = 307,
+ gestaltPowerBookG3Series = 312,
+ gestaltPowerBookG3 = 313,
+ gestaltPowerBookG3Series2 = 314,
+ gestaltPowerMacNewWorld = 406, /* All NewWorld architecture Macs (iMac, blue G3, etc.)*/
+ gestaltPowerMacG3 = 510,
+ gestaltPowerMac5500 = 512,
+ gestalt20thAnniversary = gestaltPowerMac5500,
+ gestaltPowerMac6500 = 513,
+ gestaltPowerMac4400_160 = 514, /* slower machine has different machine ID*/
+ gestaltPowerMac4400 = 515
+};
+
+
+enum {
+ gestaltQuadra605 = gestaltMacQuadra605,
+ gestaltQuadra610 = gestaltMacQuadra610,
+ gestaltQuadra630 = gestaltMacQuadra630,
+ gestaltQuadra650 = gestaltMacQuadra650,
+ gestaltQuadra660AV = gestaltMacQuadra660AV,
+ gestaltQuadra700 = gestaltMacQuadra700,
+ gestaltQuadra800 = gestaltMacQuadra800,
+ gestaltQuadra840AV = gestaltMacQuadra840AV,
+ gestaltQuadra900 = gestaltMacQuadra900,
+ gestaltQuadra950 = gestaltMacQuadra950
+};
+
+enum {
+ kMachineNameStrID = -16395
+};
+
+enum {
+ gestaltSMPMailerVersion = FOUR_CHAR_CODE('malr') /* OCE StandardMail*/
+};
+
+enum {
+ gestaltMediaBay = FOUR_CHAR_CODE('mbeh'), /* media bay driver type */
+ gestaltMBLegacy = 0, /* media bay support in PCCard 2.0 */
+ gestaltMBSingleBay = 1, /* single bay media bay driver */
+ gestaltMBMultipleBays = 2 /* multi-bay media bay driver */
+};
+
+enum {
+ gestaltMessageMgrVersion = FOUR_CHAR_CODE('mess') /* GX Printing Message Manager Gestalt Selector */
+};
+
+
+/* Menu Manager Geslalt (Mac OS 8.5 and later)*/
+enum {
+ gestaltMenuMgrAttr = FOUR_CHAR_CODE('menu'), /* If this Gestalt exists, the Mac OS 8.5 Menu Manager is installed */
+ gestaltMenuMgrPresent = (1L << 0), /* NOTE: this is a bit mask, where all other Gestalt constants of this nature */
+ /* are bit index values. 3.2 interfaces slipped out with this mistake unnoticed. */
+ /* Sincere apologies for any inconvenience. */
+ gestaltMenuMgrPresentMask = (1L << 0), /* bit mask */
+ gestaltMenuMgrPresentBit = 0 /* bit number */
+};
+
+
+enum {
+ gestaltMultipleUsersState = FOUR_CHAR_CODE('mfdr') /* Gestalt selector returns MultiUserGestaltHandle (in Folders.h)*/
+};
+
+
+enum {
+ gestaltMachineIcon = FOUR_CHAR_CODE('micn') /* machine icon */
+};
+
+enum {
+ gestaltMiscAttr = FOUR_CHAR_CODE('misc'), /* miscellaneous attributes */
+ gestaltScrollingThrottle = 0, /* true if scrolling throttle on */
+ gestaltSquareMenuBar = 2 /* true if menu bar is square */
+};
+
+
+/*
+ The name gestaltMixedModeVersion for the 'mixd' selector is semantically incorrect.
+ The same selector has been renamed gestaltMixedModeAttr to properly reflect the
+ Inside Mac: PowerPC System Software documentation. The gestaltMixedModeVersion
+ symbol has been preserved only for backwards compatibility.
+
+ Developers are forewarned that gestaltMixedModeVersion has a limited lifespan and
+ will be removed in a future release of the Interfaces.
+
+ For the first version of Mixed Mode, both meanings of the 'mixd' selector are
+ functionally identical. They both return 0x00000001. In subsequent versions
+ of Mixed Mode, however, the 'mixd' selector will not respond with an increasing
+ version number, but rather, with 32 attribute bits with various meanings.
+*/
+enum {
+ gestaltMixedModeVersion = FOUR_CHAR_CODE('mixd') /* returns version of Mixed Mode */
+};
+
+enum {
+ gestaltMixedModeAttr = FOUR_CHAR_CODE('mixd'), /* returns Mixed Mode attributes */
+ gestaltMixedModePowerPC = 0, /* true if Mixed Mode supports PowerPC ABI calling conventions */
+ gestaltPowerPCAware = 0, /* old name for gestaltMixedModePowerPC */
+ gestaltMixedModeCFM68K = 1, /* true if Mixed Mode supports CFM-68K calling conventions */
+ gestaltMixedModeCFM68KHasTrap = 2, /* true if CFM-68K Mixed Mode implements _MixedModeDispatch (versions 1.0.1 and prior did not) */
+ gestaltMixedModeCFM68KHasState = 3 /* true if CFM-68K Mixed Mode exports Save/RestoreMixedModeState */
+};
+
+enum {
+ gestaltQuickTimeConferencing = FOUR_CHAR_CODE('mtlk') /* returns QuickTime Conferencing version */
+};
+
+enum {
+ gestaltMemoryMapAttr = FOUR_CHAR_CODE('mmap'), /* Memory map type */
+ gestaltMemoryMapSparse = 0 /* Sparse memory is on */
+};
+
+enum {
+ gestaltMMUType = FOUR_CHAR_CODE('mmu '), /* mmu type */
+ gestaltNoMMU = 0, /* no MMU */
+ gestaltAMU = 1, /* address management unit */
+ gestalt68851 = 2, /* 68851 PMMU */
+ gestalt68030MMU = 3, /* 68030 built-in MMU */
+ gestalt68040MMU = 4, /* 68040 built-in MMU */
+ gestaltEMMU1 = 5 /* Emulated MMU type 1 */
+};
+
+enum {
+ gestaltUserVisibleMachineName = FOUR_CHAR_CODE('mnam') /* Coerce response into a StringPtr to get a user visible machine name */
+};
+
+enum {
+ gestaltMPCallableAPIsAttr = FOUR_CHAR_CODE('mpsc'), /* Bitmap of toolbox/OS managers that can be called from MPLibrary MPTasks */
+ gestaltMPFileManager = 0, /* True if File Manager calls can be made from MPTasks */
+ gestaltMPDeviceManager = 1 /* True if synchronous Device Manager calls can be made from MPTasks */
+};
+
+enum {
+ gestaltStdNBPAttr = FOUR_CHAR_CODE('nlup'), /* standard nbp attributes */
+ gestaltStdNBPPresent = 0,
+ gestaltStdNBPSupportsAutoPosition = 1 /* StandardNBP takes (-1,-1) to mean alert position main screen */
+};
+
+enum {
+ gestaltNotificationMgrAttr = FOUR_CHAR_CODE('nmgr'), /* notification manager attributes */
+ gestaltNotificationPresent = 0 /* notification manager exists */
+};
+
+enum {
+ gestaltNameRegistryVersion = FOUR_CHAR_CODE('nreg') /* NameRegistryLib version number, for System 7.5.2+ usage */
+};
+
+enum {
+ gestaltNuBusSlotCount = FOUR_CHAR_CODE('nubs') /* count of logical NuBus slots present */
+};
+
+enum {
+ gestaltOCEToolboxVersion = FOUR_CHAR_CODE('ocet'), /* OCE Toolbox version */
+ gestaltOCETB = 0x0102, /* OCE Toolbox version 1.02 */
+ gestaltSFServer = 0x0100 /* S&F Server version 1.0 */
+};
+
+enum {
+ gestaltOCEToolboxAttr = FOUR_CHAR_CODE('oceu'), /* OCE Toolbox attributes */
+ gestaltOCETBPresent = 0x01, /* OCE toolbox is present, not running */
+ gestaltOCETBAvailable = 0x02, /* OCE toolbox is running and available */
+ gestaltOCESFServerAvailable = 0x04, /* S&F Server is running and available */
+ gestaltOCETBNativeGlueAvailable = 0x10 /* Native PowerPC Glue routines are availible */
+};
+
+enum {
+ gestaltOpenFirmwareInfo = FOUR_CHAR_CODE('opfw') /* Open Firmware info */
+};
+
+enum {
+ gestaltOSAttr = FOUR_CHAR_CODE('os '), /* o/s attributes */
+ gestaltSysZoneGrowable = 0, /* system heap is growable */
+ gestaltLaunchCanReturn = 1, /* can return from launch */
+ gestaltLaunchFullFileSpec = 2, /* can launch from full file spec */
+ gestaltLaunchControl = 3, /* launch control support available */
+ gestaltTempMemSupport = 4, /* temp memory support */
+ gestaltRealTempMemory = 5, /* temp memory handles are real */
+ gestaltTempMemTracked = 6, /* temporary memory handles are tracked */
+ gestaltIPCSupport = 7, /* IPC support is present */
+ gestaltSysDebuggerSupport = 8 /* system debugger support is present */
+};
+
+enum {
+ gestaltOSTable = FOUR_CHAR_CODE('ostt') /* OS trap table base */
+};
+
+/* ***** Open Transport Gestalt ******/
+
+
+enum {
+ gestaltOpenTptVersions = FOUR_CHAR_CODE('otvr') /* Defined by OT 1.1 and higher, response is NumVersion.*/
+};
+
+enum {
+ gestaltOpenTpt = FOUR_CHAR_CODE('otan'), /* Defined by all versions, response is defined below.*/
+ gestaltOpenTptPresentMask = 0x00000001,
+ gestaltOpenTptLoadedMask = 0x00000002,
+ gestaltOpenTptAppleTalkPresentMask = 0x00000004,
+ gestaltOpenTptAppleTalkLoadedMask = 0x00000008,
+ gestaltOpenTptTCPPresentMask = 0x00000010,
+ gestaltOpenTptTCPLoadedMask = 0x00000020,
+ gestaltOpenTptIPXSPXPresentMask = 0x00000040,
+ gestaltOpenTptIPXSPXLoadedMask = 0x00000080,
+ gestaltOpenTptPresentBit = 0,
+ gestaltOpenTptLoadedBit = 1,
+ gestaltOpenTptAppleTalkPresentBit = 2,
+ gestaltOpenTptAppleTalkLoadedBit = 3,
+ gestaltOpenTptTCPPresentBit = 4,
+ gestaltOpenTptTCPLoadedBit = 5,
+ gestaltOpenTptIPXSPXPresentBit = 6,
+ gestaltOpenTptIPXSPXLoadedBit = 7
+};
+
+
+enum {
+ gestaltPCCard = FOUR_CHAR_CODE('pccd'), /* PC Card attributes*/
+ gestaltCardServicesPresent = 0, /* PC Card 2.0 (68K) API is present*/
+ gestaltPCCardFamilyPresent = 1, /* PC Card 3.x (PowerPC) API is present*/
+ gestaltPCCardHasPowerControl = 2, /* PCCardSetPowerLevel is supported*/
+ gestaltPCCardSupportsCardBus = 3 /* CardBus is supported*/
+};
+
+enum {
+ gestaltProcClkSpeed = FOUR_CHAR_CODE('pclk') /* processor clock speed in hertz */
+};
+
+enum {
+ gestaltPCXAttr = FOUR_CHAR_CODE('pcxg'), /* PC Exchange attributes */
+ gestaltPCXHas8and16BitFAT = 0, /* PC Exchange supports both 8 and 16 bit FATs */
+ gestaltPCXHasProDOS = 1, /* PC Exchange supports ProDOS */
+ gestaltPCXNewUI = 2,
+ gestaltPCXUseICMapping = 3 /* PC Exchange uses InternetConfig for file mappings */
+};
+
+enum {
+ gestaltLogicalPageSize = FOUR_CHAR_CODE('pgsz') /* logical page size */
+};
+
+/* System 7.6 and later. If gestaltScreenCaptureMain is not implemented,
+ PictWhap proceeds with screen capture in the usual way.
+
+ The high word of gestaltScreenCaptureMain is reserved (use 0).
+
+ To disable screen capture to disk, put zero in the low word. To
+ specify a folder for captured pictures, put the vRefNum in the
+ low word of gestaltScreenCaptureMain, and put the directory ID in
+ gestaltScreenCaptureDir.
+*/
+enum {
+ gestaltScreenCaptureMain = FOUR_CHAR_CODE('pic1'), /* Zero, or vRefNum of disk to hold picture */
+ gestaltScreenCaptureDir = FOUR_CHAR_CODE('pic2') /* Directory ID of folder to hold picture */
+};
+
+enum {
+ gestaltGXPrintingMgrVersion = FOUR_CHAR_CODE('pmgr') /* QuickDraw GX Printing Manager Version*/
+};
+
+enum {
+ gestaltPopupAttr = FOUR_CHAR_CODE('pop!'), /* popup cdef attributes */
+ gestaltPopupPresent = 0
+};
+
+enum {
+ gestaltPowerMgrAttr = FOUR_CHAR_CODE('powr'), /* power manager attributes */
+ gestaltPMgrExists = 0,
+ gestaltPMgrCPUIdle = 1,
+ gestaltPMgrSCC = 2,
+ gestaltPMgrSound = 3,
+ gestaltPMgrDispatchExists = 4,
+ gestaltPMgrSupportsAVPowerStateAtSleepWake = 5
+};
+
+enum {
+ gestaltPowerMgrVers = FOUR_CHAR_CODE('pwrv') /* power manager version */
+};
+
+/*
+ * PPC will return the combination of following bit fields.
+ * e.g. gestaltPPCSupportsRealTime +gestaltPPCSupportsIncoming + gestaltPPCSupportsOutGoing
+ * indicates PPC is cuurently is only supports real time delivery
+ * and both incoming and outgoing network sessions are allowed.
+ * By default local real time delivery is supported as long as PPCInit has been called.*/
+enum {
+ gestaltPPCToolboxAttr = FOUR_CHAR_CODE('ppc '), /* PPC toolbox attributes */
+ gestaltPPCToolboxPresent = 0x0000, /* PPC Toolbox is present Requires PPCInit to be called */
+ gestaltPPCSupportsRealTime = 0x1000, /* PPC Supports real-time delivery */
+ gestaltPPCSupportsIncoming = 0x0001, /* PPC will allow incoming network requests */
+ gestaltPPCSupportsOutGoing = 0x0002, /* PPC will allow outgoing network requests */
+ gestaltPPCSupportsTCP_IP = 0x0004, /* PPC supports TCP/IP transport */
+ gestaltPPCSupportsIncomingAppleTalk = 0x0010,
+ gestaltPPCSupportsIncomingTCP_IP = 0x0020,
+ gestaltPPCSupportsOutgoingAppleTalk = 0x0100,
+ gestaltPPCSupportsOutgoingTCP_IP = 0x0200
+};
+
+enum {
+ gestaltPowerPCProcessorFeatures = FOUR_CHAR_CODE('ppcf'), /* Optional PowerPC processor features */
+ gestaltPowerPCHasGraphicsInstructions = 0, /* has fres, frsqrte, and fsel instructions */
+ gestaltPowerPCHasSTFIWXInstruction = 1, /* has stfiwx instruction */
+ gestaltPowerPCHasSquareRootInstructions = 2, /* has fsqrt and fsqrts instructions */
+ gestaltPowerPCHasDCBAInstruction = 3, /* has dcba instruction */
+ gestaltPowerPCHasVectorInstructions = 4, /* has vector instructions */
+ gestaltPowerPCHasDataStreams = 5 /* has dst, dstt, dstst, dss, and dssall instructions */
+};
+
+enum {
+ gestaltProcessorType = FOUR_CHAR_CODE('proc'), /* processor type */
+ gestalt68000 = 1,
+ gestalt68010 = 2,
+ gestalt68020 = 3,
+ gestalt68030 = 4,
+ gestalt68040 = 5
+};
+
+enum {
+ gestaltSDPPromptVersion = FOUR_CHAR_CODE('prpv') /* OCE Standard Directory Panel*/
+};
+
+enum {
+ gestaltParityAttr = FOUR_CHAR_CODE('prty'), /* parity attributes */
+ gestaltHasParityCapability = 0, /* has ability to check parity */
+ gestaltParityEnabled = 1 /* parity checking enabled */
+};
+
+enum {
+ gestaltQD3DVersion = FOUR_CHAR_CODE('q3v ') /* Quickdraw 3D version in pack BCD*/
+};
+
+enum {
+ gestaltQD3DViewer = FOUR_CHAR_CODE('q3vc'), /* Quickdraw 3D viewer attributes*/
+ gestaltQD3DViewerPresent = 0 /* bit 0 set if QD3D Viewer is available*/
+};
+
+#if OLDROUTINENAMES
+enum {
+ gestaltQD3DViewerNotPresent = (0 << gestaltQD3DViewerPresent),
+ gestaltQD3DViewerAvailable = (1 << gestaltQD3DViewerPresent)
+};
+
+#endif /* OLDROUTINENAMES */
+
+enum {
+ gestaltQuickdrawVersion = FOUR_CHAR_CODE('qd '), /* quickdraw version */
+ gestaltOriginalQD = 0x0000, /* original 1-bit QD */
+ gestalt8BitQD = 0x0100, /* 8-bit color QD */
+ gestalt32BitQD = 0x0200, /* 32-bit color QD */
+ gestalt32BitQD11 = 0x0201, /* 32-bit color QDv1.1 */
+ gestalt32BitQD12 = 0x0220, /* 32-bit color QDv1.2 */
+ gestalt32BitQD13 = 0x0230, /* 32-bit color QDv1.3 */
+ gestaltAllegroQD = 0x0250 /* Allegro QD OS 8.5 */
+};
+
+enum {
+ gestaltQD3D = FOUR_CHAR_CODE('qd3d'), /* Quickdraw 3D attributes*/
+ gestaltQD3DPresent = 0 /* bit 0 set if QD3D available*/
+};
+
+#if OLDROUTINENAMES
+enum {
+ gestaltQD3DNotPresent = (0 << gestaltQD3DPresent),
+ gestaltQD3DAvailable = (1 << gestaltQD3DPresent)
+};
+
+#endif /* OLDROUTINENAMES */
+
+enum {
+ gestaltGXVersion = FOUR_CHAR_CODE('qdgx') /* Overall QuickDraw GX Version*/
+};
+
+enum {
+ gestaltQuickdrawFeatures = FOUR_CHAR_CODE('qdrw'), /* quickdraw features */
+ gestaltHasColor = 0, /* color quickdraw present */
+ gestaltHasDeepGWorlds = 1, /* GWorlds can be deeper than 1-bit */
+ gestaltHasDirectPixMaps = 2, /* PixMaps can be direct (16 or 32 bit) */
+ gestaltHasGrayishTextOr = 3, /* supports text mode grayishTextOr */
+ gestaltSupportsMirroring = 4, /* Supports video mirroring via the Display Manager. */
+ gestaltQDHasLongRowBytes = 5 /* Long rowBytes supported in GWorlds */
+};
+
+enum {
+ gestaltQDTextVersion = FOUR_CHAR_CODE('qdtx'), /* QuickdrawText version */
+ gestaltOriginalQDText = 0x0000, /* up to and including 8.1 */
+ gestaltAllegroQDText = 0x0100 /* starting with 8.2 (?) */
+};
+
+enum {
+ gestaltQDTextFeatures = FOUR_CHAR_CODE('qdtf'), /* QuickdrawText features */
+ gestaltWSIISupport = 0, /* bit 0: WSII support included */
+ gestaltSbitFontSupport = 1, /* sbit-only fonts supported */
+ gestaltAntiAliasedTextAvailable = 2, /* capable of antialiased text */
+ gestaltOFA2available = 3, /* OFA2 available */
+ gestaltCreatesAliasFontRsrc = 4, /* "real" datafork font support */
+ gestaltNativeType1FontSupport = 5 /* we have scaler for Type1 fonts */
+};
+
+
+enum {
+ gestaltQuickTimeConferencingInfo = FOUR_CHAR_CODE('qtci') /* returns pointer to QuickTime Conferencing information */
+};
+
+enum {
+ gestaltQuickTimeVersion = FOUR_CHAR_CODE('qtim'), /* returns version of QuickTime */
+ gestaltQuickTime = FOUR_CHAR_CODE('qtim') /* gestaltQuickTime is old name for gestaltQuickTimeVersion */
+};
+
+enum {
+ gestaltQuickTimeFeatures = FOUR_CHAR_CODE('qtrs'),
+ gestaltPPCQuickTimeLibPresent = 0 /* PowerPC QuickTime glue library is present */
+};
+
+enum {
+ gestaltQuickTimeStreamingFeatures = FOUR_CHAR_CODE('qtsf')
+};
+
+enum {
+ gestaltQuickTimeStreamingVersion = FOUR_CHAR_CODE('qtst')
+};
+
+enum {
+ gestaltQTVRMgrAttr = FOUR_CHAR_CODE('qtvr'), /* QuickTime VR attributes */
+ gestaltQTVRMgrPresent = 0, /* QTVR API is present */
+ gestaltQTVRObjMoviesPresent = 1, /* QTVR runtime knows about object movies */
+ gestaltQTVRCylinderPanosPresent = 2, /* QTVR runtime knows about cylindrical panoramic movies */
+ gestaltQTVRCubicPanosPresent = 3 /* QTVR runtime knows about cubic panoramic movies */
+};
+
+enum {
+ gestaltQTVRMgrVers = FOUR_CHAR_CODE('qtvv') /* QuickTime VR version */
+};
+
+enum {
+ gestaltPhysicalRAMSize = FOUR_CHAR_CODE('ram ') /* physical RAM size */
+};
+
+enum {
+ gestaltRBVAddr = FOUR_CHAR_CODE('rbv ') /* RBV base address */
+};
+
+enum {
+ gestaltROMSize = FOUR_CHAR_CODE('rom ') /* rom size */
+};
+
+enum {
+ gestaltROMVersion = FOUR_CHAR_CODE('romv') /* rom version */
+};
+
+enum {
+ gestaltResourceMgrAttr = FOUR_CHAR_CODE('rsrc'), /* Resource Mgr attributes */
+ gestaltPartialRsrcs = 0, /* True if partial resources exist */
+ gestaltHasResourceOverrides = 1 /* Appears in the ROM; so put it here. */
+};
+
+enum {
+ gestaltResourceMgrBugFixesAttrs = FOUR_CHAR_CODE('rmbg'), /* Resource Mgr bug fixes */
+ gestaltRMForceSysHeapRolledIn = 0,
+ gestaltRMFakeAppleMenuItemsRolledIn = 1,
+ gestaltSanityCheckResourceFiles = 2, /* Resource manager does sanity checking on resource files before opening them */
+ gestaltSupportsFSpResourceFileAlreadyOpenBit = 3, /* The resource manager supports GetResFileRefNum and FSpGetResFileRefNum and FSpResourceFileAlreadyOpen */
+ gestaltRMTypeIndexOrderingReverse = 8 /* GetIndType() calls return resource types in opposite order to original 68k resource manager */
+};
+
+
+enum {
+ gestaltRealtimeMgrAttr = FOUR_CHAR_CODE('rtmr'), /* Realtime manager attributes */
+ gestaltRealtimeMgrPresent = 0 /* true if the Realtime manager is present */
+};
+
+enum {
+ gestaltSafeOFAttr = FOUR_CHAR_CODE('safe'),
+ gestaltVMZerosPagesBit = 0,
+ gestaltInitHeapZerosOutHeapsBit = 1,
+ gestaltNewHandleReturnsZeroedMemoryBit = 2,
+ gestaltNewPtrReturnsZeroedMemoryBit = 3,
+ gestaltFileAllocationZeroedBlocksBit = 4
+};
+
+enum {
+ gestaltSCCReadAddr = FOUR_CHAR_CODE('sccr') /* scc read base address */
+};
+
+enum {
+ gestaltSCCWriteAddr = FOUR_CHAR_CODE('sccw') /* scc read base address */
+};
+
+enum {
+ gestaltScrapMgrAttr = FOUR_CHAR_CODE('scra'), /* Scrap Manager attributes */
+ gestaltScrapMgrTranslationAware = 0 /* True if scrap manager is translation aware */
+};
+
+enum {
+ gestaltScriptMgrVersion = FOUR_CHAR_CODE('scri') /* Script Manager version number */
+};
+
+enum {
+ gestaltScriptCount = FOUR_CHAR_CODE('scr#') /* number of active script systems */
+};
+
+enum {
+ gestaltSCSI = FOUR_CHAR_CODE('scsi'), /* SCSI Manager attributes */
+ gestaltAsyncSCSI = 0, /* Supports Asynchronous SCSI */
+ gestaltAsyncSCSIINROM = 1, /* Async scsi is in ROM (available for booting) */
+ gestaltSCSISlotBoot = 2, /* ROM supports Slot-style PRAM for SCSI boots (PDM and later) */
+ gestaltSCSIPollSIH = 3 /* SCSI Manager will poll for interrupts if Secondary Interrupts are busy. */
+};
+
+enum {
+ gestaltControlStripAttr = FOUR_CHAR_CODE('sdev'), /* Control Strip attributes */
+ gestaltControlStripExists = 0, /* Control Strip is installed */
+ gestaltControlStripVersionFixed = 1, /* Control Strip version Gestalt selector was fixed */
+ gestaltControlStripUserFont = 2, /* supports user-selectable font/size */
+ gestaltControlStripUserHotKey = 3 /* support user-selectable hot key to show/hide the window */
+};
+
+enum {
+ gestaltSDPStandardDirectoryVersion = FOUR_CHAR_CODE('sdvr') /* OCE Standard Directory Panel*/
+};
+
+enum {
+ gestaltSerialAttr = FOUR_CHAR_CODE('ser '), /* Serial attributes */
+ gestaltHasGPIaToDCDa = 0, /* GPIa connected to DCDa*/
+ gestaltHasGPIaToRTxCa = 1, /* GPIa connected to RTxCa clock input*/
+ gestaltHasGPIbToDCDb = 2, /* GPIb connected to DCDb */
+ gestaltHidePortA = 3, /* Modem port (A) should be hidden from users */
+ gestaltHidePortB = 4 /* Printer port (B) should be hidden from users */
+};
+
+enum {
+ gestaltShutdownAttributes = FOUR_CHAR_CODE('shut'), /* ShutDown Manager Attributes */
+ gestaltShutdownHassdOnBootVolUnmount = 0 /* True if ShutDown Manager unmounts boot & VM volume at shutdown time. */
+};
+
+enum {
+ gestaltNuBusConnectors = FOUR_CHAR_CODE('sltc') /* bitmap of NuBus connectors*/
+};
+
+enum {
+ gestaltSlotAttr = FOUR_CHAR_CODE('slot'), /* slot attributes */
+ gestaltSlotMgrExists = 0, /* true is slot mgr exists */
+ gestaltNuBusPresent = 1, /* NuBus slots are present */
+ gestaltSESlotPresent = 2, /* SE PDS slot present */
+ gestaltSE30SlotPresent = 3, /* SE/30 slot present */
+ gestaltPortableSlotPresent = 4 /* Portable's slot present */
+};
+
+enum {
+ gestaltFirstSlotNumber = FOUR_CHAR_CODE('slt1') /* returns first physical slot */
+};
+
+enum {
+ gestaltSoundAttr = FOUR_CHAR_CODE('snd '), /* sound attributes */
+ gestaltStereoCapability = 0, /* sound hardware has stereo capability */
+ gestaltStereoMixing = 1, /* stereo mixing on external speaker */
+ gestaltSoundIOMgrPresent = 3, /* The Sound I/O Manager is present */
+ gestaltBuiltInSoundInput = 4, /* built-in Sound Input hardware is present */
+ gestaltHasSoundInputDevice = 5, /* Sound Input device available */
+ gestaltPlayAndRecord = 6, /* built-in hardware can play and record simultaneously */
+ gestalt16BitSoundIO = 7, /* sound hardware can play and record 16-bit samples */
+ gestaltStereoInput = 8, /* sound hardware can record stereo */
+ gestaltLineLevelInput = 9, /* sound input port requires line level */
+ /* the following bits are not defined prior to Sound Mgr 3.0 */
+ gestaltSndPlayDoubleBuffer = 10, /* SndPlayDoubleBuffer available, set by Sound Mgr 3.0 and later */
+ gestaltMultiChannels = 11, /* multiple channel support, set by Sound Mgr 3.0 and later */
+ gestalt16BitAudioSupport = 12 /* 16 bit audio data supported, set by Sound Mgr 3.0 and later */
+};
+
+enum {
+ gestaltSplitOSAttr = FOUR_CHAR_CODE('spos'),
+ gestaltSplitOSBootDriveIsNetworkVolume = 0, /* the boot disk is a network 'disk', from the .LANDisk drive. */
+ gestaltSplitOSAware = 1, /* the system includes the code to deal with a split os situation. */
+ gestaltSplitOSEnablerVolumeIsDifferentFromBootVolume = 2, /* the active enabler is on a different volume than the system file. */
+ gestaltSplitOSMachineNameSetToNetworkNameTemp = 3 /* The machine name was set to the value given us from the BootP server */
+};
+
+enum {
+ gestaltSMPSPSendLetterVersion = FOUR_CHAR_CODE('spsl') /* OCE StandardMail*/
+};
+
+enum {
+ gestaltSpeechRecognitionAttr = FOUR_CHAR_CODE('srta'), /* speech recognition attributes */
+ gestaltDesktopSpeechRecognition = 1, /* recognition thru the desktop microphone is available */
+ gestaltTelephoneSpeechRecognition = 2 /* recognition thru the telephone is available */
+};
+
+enum {
+ gestaltSpeechRecognitionVersion = FOUR_CHAR_CODE('srtb') /* speech recognition version (0x0150 is the first version that fully supports the API) */
+};
+
+enum {
+ gestaltSoftwareVendorCode = FOUR_CHAR_CODE('srad'), /* Returns system software vendor information */
+ gestaltSoftwareVendorApple = FOUR_CHAR_CODE('Appl'), /* System software sold by Apple */
+ gestaltSoftwareVendorLicensee = FOUR_CHAR_CODE('Lcns') /* System software sold by licensee */
+};
+
+enum {
+ gestaltStandardFileAttr = FOUR_CHAR_CODE('stdf'), /* Standard File attributes */
+ gestaltStandardFile58 = 0, /* True if selectors 5-8 (StandardPutFile-CustomGetFile) are supported */
+ gestaltStandardFileTranslationAware = 1, /* True if standard file is translation manager aware */
+ gestaltStandardFileHasColorIcons = 2, /* True if standard file has 16x16 color icons */
+ gestaltStandardFileUseGenericIcons = 3, /* Standard file LDEF to use only the system generic icons if true */
+ gestaltStandardFileHasDynamicVolumeAllocation = 4 /* True if standard file supports more than 20 volumes */
+};
+
+enum {
+ gestaltSysArchitecture = FOUR_CHAR_CODE('sysa'), /* Native System Architecture */
+ gestalt68k = 1, /* Motorola MC68k architecture */
+ gestaltPowerPC = 2 /* IBM PowerPC architecture */
+};
+
+enum {
+ gestaltSystemUpdateVersion = FOUR_CHAR_CODE('sysu') /* System Update version */
+};
+
+enum {
+ gestaltSystemVersion = FOUR_CHAR_CODE('sysv') /* system version*/
+};
+
+enum {
+ gestaltToolboxTable = FOUR_CHAR_CODE('tbtt') /* OS trap table base */
+};
+
+enum {
+ gestaltTextEditVersion = FOUR_CHAR_CODE('te '), /* TextEdit version number */
+ gestaltTE1 = 1, /* TextEdit in MacIIci ROM */
+ gestaltTE2 = 2, /* TextEdit with 6.0.4 Script Systems on MacIIci (Script bug fixes for MacIIci) */
+ gestaltTE3 = 3, /* TextEdit with 6.0.4 Script Systems all but MacIIci */
+ gestaltTE4 = 4, /* TextEdit in System 7.0 */
+ gestaltTE5 = 5 /* TextWidthHook available in TextEdit */
+};
+
+enum {
+ gestaltTEAttr = FOUR_CHAR_CODE('teat'), /* TextEdit attributes */
+ gestaltTEHasGetHiliteRgn = 0, /* TextEdit has TEGetHiliteRgn */
+ gestaltTESupportsInlineInput = 1, /* TextEdit does Inline Input */
+ gestaltTESupportsTextObjects = 2, /* TextEdit does Text Objects */
+ gestaltTEHasWhiteBackground = 3 /* TextEdit supports overriding the TERec's background to white */
+};
+
+enum {
+ gestaltTeleMgrAttr = FOUR_CHAR_CODE('tele'), /* Telephone manager attributes */
+ gestaltTeleMgrPresent = 0,
+ gestaltTeleMgrPowerPCSupport = 1,
+ gestaltTeleMgrSoundStreams = 2,
+ gestaltTeleMgrAutoAnswer = 3,
+ gestaltTeleMgrIndHandset = 4,
+ gestaltTeleMgrSilenceDetect = 5,
+ gestaltTeleMgrNewTELNewSupport = 6
+};
+
+enum {
+ gestaltTermMgrAttr = FOUR_CHAR_CODE('term'), /* terminal mgr attributes */
+ gestaltTermMgrPresent = 0,
+ gestaltTermMgrErrorString = 2
+};
+
+enum {
+ gestaltThreadMgrAttr = FOUR_CHAR_CODE('thds'), /* Thread Manager attributes */
+ gestaltThreadMgrPresent = 0, /* bit true if Thread Mgr is present */
+ gestaltSpecificMatchSupport = 1, /* bit true if Thread Mgr supports exact match creation option */
+ gestaltThreadsLibraryPresent = 2 /* bit true if Thread Mgr shared library is present */
+};
+
+enum {
+ gestaltTimeMgrVersion = FOUR_CHAR_CODE('tmgr'), /* time mgr version */
+ gestaltStandardTimeMgr = 1, /* standard time mgr is present */
+ gestaltRevisedTimeMgr = 2, /* revised time mgr is present */
+ gestaltExtendedTimeMgr = 3 /* extended time mgr is present */
+};
+
+enum {
+ gestaltTSMTEVersion = FOUR_CHAR_CODE('tmTV'),
+ gestaltTSMTE1 = 0x0100, /* Original version of TSMTE */
+ gestaltTSMTE15 = 0x0150, /* System 8.0 */
+ gestaltTSMTE152 = 0x0152 /* System 8.2 */
+};
+
+enum {
+ gestaltTSMTEAttr = FOUR_CHAR_CODE('tmTE'),
+ gestaltTSMTEPresent = 0,
+ gestaltTSMTE = 0 /* gestaltTSMTE is old name for gestaltTSMTEPresent */
+};
+
+enum {
+ gestaltAVLTreeAttr = FOUR_CHAR_CODE('tree'), /* AVLTree utility routines attributes. */
+ gestaltAVLTreePresentBit = 0 /* if set, then the AVL Tree routines are available. */
+};
+
+enum {
+ gestaltALMAttr = FOUR_CHAR_CODE('trip'), /* Settings Manager attributes (see also gestaltALMVers) */
+ gestaltALMPresent = 0, /* bit true if ALM is available */
+ gestaltALMHasSFGroup = 1, /* bit true if Put/Get/Merge Group calls are implmented */
+ gestaltALMHasCFMSupport = 2, /* bit true if CFM-based modules are supported */
+ gestaltALMHasRescanNotifiers = 3 /* bit true if Rescan notifications/events will be sent to clients */
+};
+
+enum {
+ gestaltALMHasSFLocation = gestaltALMHasSFGroup
+};
+
+enum {
+ gestaltTSMgrVersion = FOUR_CHAR_CODE('tsmv'), /* Text Services Mgr version, if present */
+ gestaltTSMgr15 = 0x0150,
+ gestaltTSMgr20 = 0x0200
+};
+
+enum {
+ gestaltTSMgrAttr = FOUR_CHAR_CODE('tsma'), /* Text Services Mgr attributes, if present */
+ gestaltTSMDisplayMgrAwareBit = 0, /* TSM knows about display manager */
+ gestaltTSMdoesTSMTEBit = 1 /* TSM has integrated TSMTE */
+};
+
+enum {
+ gestaltSpeechAttr = FOUR_CHAR_CODE('ttsc'), /* Speech Manager attributes */
+ gestaltSpeechMgrPresent = 0, /* bit set indicates that Speech Manager exists */
+ gestaltSpeechHasPPCGlue = 1 /* bit set indicates that native PPC glue for Speech Manager API exists */
+};
+
+enum {
+ gestaltTVAttr = FOUR_CHAR_CODE('tv '), /* TV version */
+ gestaltHasTVTuner = 0, /* supports Philips FL1236F video tuner */
+ gestaltHasSoundFader = 1, /* supports Philips TEA6330 Sound Fader chip */
+ gestaltHasHWClosedCaptioning = 2, /* supports Philips SAA5252 Closed Captioning */
+ gestaltHasIRRemote = 3, /* supports CyclopsII Infra Red Remote control */
+ gestaltHasVidDecoderScaler = 4, /* supports Philips SAA7194 Video Decoder/Scaler */
+ gestaltHasStereoDecoder = 5, /* supports Sony SBX1637A-01 stereo decoder */
+ gestaltHasSerialFader = 6, /* has fader audio in serial with system audio */
+ gestaltHasFMTuner = 7, /* has FM Tuner from donnybrook card */
+ gestaltHasSystemIRFunction = 8, /* Infra Red button function is set up by system and not by Video Startup */
+ gestaltIRDisabled = 9, /* Infra Red remote is not disabled. */
+ gestaltINeedIRPowerOffConfirm = 10, /* Need IR power off confirm dialog. */
+ gestaltHasZoomedVideo = 11 /* Has Zoomed Video PC Card video input. */
+};
+
+
+enum {
+ gestaltATSUVersion = FOUR_CHAR_CODE('uisv'),
+ gestaltOriginalATSUVersion = (1 << 16), /* ATSUI version 1.0*/
+ gestaltATSUUpdate1 = (2 << 16), /* ATSUI version 1.1*/
+ gestaltATSUUpdate2 = (3 << 16), /* ATSUI version 1.2*/
+ gestaltATSUUpdate3 = (4 << 16) /* ATSUI version 2.0*/
+};
+
+enum {
+ gestaltATSUFeatures = FOUR_CHAR_CODE('uisf'),
+ gestaltATSUTrackingFeature = 0x00000001, /* feature introduced in ATSUI version 1.1*/
+ gestaltATSUMemoryFeature = 0x00000001, /* feature introduced in ATSUI version 1.1*/
+ gestaltATSUFallbacksFeature = 0x00000001, /* feature introduced in ATSUI version 1.1*/
+ gestaltATSUGlyphBoundsFeature = 0x00000001, /* feature introduced in ATSUI version 1.1*/
+ gestaltATSULineControlFeature = 0x00000001, /* feature introduced in ATSUI version 1.1*/
+ gestaltATSULayoutCreateAndCopyFeature = 0x00000001, /* feature introduced in ATSUI version 1.1*/
+ gestaltATSULayoutCacheClearFeature = 0x00000001, /* feature introduced in ATSUI version 1.1*/
+ gestaltATSUTextLocatorUsageFeature = 0x00000002, /* feature introduced in ATSUI version 1.2*/
+ gestaltATSULowLevelOrigFeatures = 0x00000004 /* first low-level features introduced in ATSUI version 2.0*/
+};
+
+enum {
+ gestaltUSBAttr = FOUR_CHAR_CODE('usb '), /* USB Attributes */
+ gestaltUSBPresent = 0, /* USB Support available */
+ gestaltUSBHasIsoch = 1 /* USB Isochronous features available */
+};
+
+enum {
+ gestaltUSBVersion = FOUR_CHAR_CODE('usbv') /* USB version */
+};
+
+enum {
+ gestaltVersion = FOUR_CHAR_CODE('vers'), /* gestalt version */
+ gestaltValueImplementedVers = 5 /* version of gestalt where gestaltValue is implemented. */
+};
+
+enum {
+ gestaltVIA1Addr = FOUR_CHAR_CODE('via1') /* via 1 base address */
+};
+
+enum {
+ gestaltVIA2Addr = FOUR_CHAR_CODE('via2') /* via 2 base address */
+};
+
+enum {
+ gestaltVMAttr = FOUR_CHAR_CODE('vm '), /* virtual memory attributes */
+ gestaltVMPresent = 0, /* true if virtual memory is present */
+ gestaltVMHasLockMemoryForOutput = 1, /* true if LockMemoryForOutput is available */
+ gestaltVMFilemappingOn = 3, /* true if filemapping is available */
+ gestaltVMHasPagingControl = 4 /* true if MakeMemoryResident, MakeMemoryNonResident, FlushMemory, and ReleaseMemoryData are available */
+};
+
+enum {
+ gestaltVMInfoType = FOUR_CHAR_CODE('vmin'), /* Indicates how the Finder should display information about VM in */
+ /* the Finder about box. */
+ gestaltVMInfoSizeStorageType = 0, /* Display VM on/off, backing store size and name */
+ gestaltVMInfoSizeType = 1, /* Display whether VM is on or off and the size of the backing store */
+ gestaltVMInfoSimpleType = 2, /* Display whether VM is on or off */
+ gestaltVMInfoNoneType = 3 /* Display no VM information */
+};
+
+enum {
+ gestaltVMBackingStoreFileRefNum = FOUR_CHAR_CODE('vmbs') /* file refNum of virtual memory's main backing store file (returned in low word of result) */
+};
+
+
+
+enum {
+ gestaltALMVers = FOUR_CHAR_CODE('walk') /* Settings Manager version (see also gestaltALMAttr) */
+};
+
+enum {
+ gestaltWindowMgrAttr = FOUR_CHAR_CODE('wind'), /* If this Gestalt exists, the Mac OS 8.5 Window Manager is installed*/
+ gestaltWindowMgrPresent = (1L << 0), /* NOTE: this is a bit mask, where all other Gestalt constants of*/
+ /* this type are bit index values. Universal Interfaces 3.2 slipped*/
+ /* out the door with this mistake.*/
+ gestaltWindowMgrPresentBit = 0, /* bit number*/
+ gestaltExtendedWindowAttributes = 1, /* Has ChangeWindowAttributes; GetWindowAttributes works for all windows*/
+ gestaltExtendedWindowAttributesBit = 1, /* Has ChangeWindowAttributes; GetWindowAttributes works for all windows*/
+ gestaltHasFloatingWindows = 2, /* Floating window APIs work*/
+ gestaltHasFloatingWindowsBit = 2, /* Floating window APIs work*/
+ gestaltHasWindowBuffering = 3, /* This system has buffering available*/
+ gestaltHasWindowBufferingBit = 3, /* This system has buffering available*/
+ /* masks for above bits*/
+ gestaltWindowMgrPresentMask = (1L << gestaltWindowMgrPresentBit),
+ gestaltExtendedWindowAttributesMask = (1L << gestaltExtendedWindowAttributesBit),
+ gestaltHasFloatingWindowsMask = (1L << gestaltHasFloatingWindowsBit),
+ gestaltHasWindowBufferingMask = (1L << gestaltHasWindowBufferingBit)
+};
+
+
+
+/*#if TARGET_OS_WIN32 - These are needed by the i386 compiler for X*/
+#if TARGET_CPU_X86
+enum {
+ gestaltX86Features = FOUR_CHAR_CODE('x86f'),
+ gestaltX86HasFPU = 0, /* has an FPU that supports the 387 instructions*/
+ gestaltX86HasVME = 1, /* supports Virtual-8086 Mode Extensions*/
+ gestaltX86HasDE = 2, /* supports I/O breakpoints (Debug Extensions)*/
+ gestaltX86HasPSE = 3, /* supports 4-Mbyte pages (Page Size Extension)*/
+ gestaltX86HasTSC = 4, /* supports RTDSC instruction (Time Stamp Counter)*/
+ gestaltX86HasMSR = 5, /* supports Model Specific Registers*/
+ gestaltX86HasPAE = 6, /* supports physical addresses > 32 bits (Physical Address Extension)*/
+ gestaltX86HasMCE = 7, /* supports Machine Check Exception*/
+ gestaltX86HasCX8 = 8, /* supports CMPXCHG8 instructions (Compare Exchange 8 bytes)*/
+ gestaltX86HasAPIC = 9, /* contains local APIC*/
+ gestaltX86Reserved10 = 10, /* do not count on this bit value*/
+ gestaltX86HasSEP = 11, /* supports fast system call (SysEnter Present)*/
+ gestaltX86HasMTRR = 12, /* supports Memory Type Range Registers*/
+ gestaltX86HasPGE = 13, /* supports Page Global Enable*/
+ gestaltX86HasMCA = 14, /* supports Machine Check Architecture*/
+ gestaltX86HasCMOV = 15, /* supports CMOVcc instruction (Conditional Move).*/
+ /* If FPU bit is also set, supports FCMOVcc and FCOMI, too*/
+ gestaltX86HasPAT = 16, /* supports Page Attribute Table*/
+ gestaltX86HasPSE36 = 17, /* supports 36-bit Page Size Extension*/
+ gestaltX86HasPSN = 18, /* supports PSN, PSN_DISABLE MSR*/
+ gestaltX86HasCLFL = 19, /* supports CLFLUSH instruction*/
+ gestaltX86HasDTES = 21, /* supports Debug Trace and EMON Store MSRs*/
+ gestaltX86HasACPI = 22, /* supports IA32_THERM_* MSRs, xAPIC thermal LVT entry*/
+ gestaltX86HasMMX = 23, /* supports MMX instructions*/
+ gestaltX86HasFXSR = 24, /* Supports FXSAVE and FXRSTOR instructions (fast FP save/restore)*/
+ gestaltX86HasSSE = 25, /* supports Streaming SIMD Extensions (aka. Katmai New Instructions; aka. Floating point vector instructions)*/
+ gestaltX86HasSSE2 = 26, /* supports even more Streaming SIMD Extensions*/
+ gestaltX86HasSS = 27, /* supports "selfsnoop"*/
+ gestaltX86HasHTT = 28, /* supports Hyper-Threading Technology*/
+ gestaltX86HasTM = 29, /* supports IA32_THERM_* MSRs, xAPIC thermal LVT entry*/
+ gestaltX86HasIA64 = 30 /* supports IA-64, JMPE Jv, JMPE Ev*/
+};
+
+#endif /* TARGET_CPU_X86 */
+
+enum {
+ gestaltTranslationAttr = FOUR_CHAR_CODE('xlat'), /* Translation Manager attributes */
+ gestaltTranslationMgrExists = 0, /* True if translation manager exists */
+ gestaltTranslationMgrHintOrder = 1, /* True if hint order reversal in effect */
+ gestaltTranslationPPCAvail = 2,
+ gestaltTranslationGetPathAPIAvail = 3
+};
+
+enum {
+ gestaltExtToolboxTable = FOUR_CHAR_CODE('xttt') /* Extended Toolbox trap table base */
+};
+
+
+/*WorldScript settings;*/
+enum {
+ gestaltWorldScriptIIVersion = FOUR_CHAR_CODE('doub'),
+ gestaltWorldScriptIIAttr = FOUR_CHAR_CODE('wsat'),
+ gestaltWSIICanPrintWithoutPrGeneralBit = 0 /* bit 0 is on if WS II knows about PrinterStatus callback */
+};
+
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __GESTALT__ */
+
diff --git a/include/qt/HFSVolumes.h b/include/qt/HFSVolumes.h
new file mode 100644
index 000000000..3d50859ad
--- /dev/null
+++ b/include/qt/HFSVolumes.h
@@ -0,0 +1,534 @@
+/*
+ File: HFSVolumes.h
+
+ Contains: On-disk data structures for HFS and HFS Plus volumes.
+
+ Version: Technology: Mac OS 8.1
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1984-2001 by Apple Computer, Inc. All rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __HFSVOLUMES__
+#define __HFSVOLUMES__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+#ifndef __FINDER__
+#include "Finder.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* Signatures used to differentiate between HFS and HFS Plus volumes */
+enum {
+ kHFSSigWord = 0x4244, /* 'BD' in ASCII */
+ kHFSPlusSigWord = 0x482B, /* 'H+' in ASCII */
+ kHFSPlusVersion = 0x0004, /* will change as format changes (version 4 shipped with Mac OS 8.1) */
+ kHFSPlusMountVersion = FOUR_CHAR_CODE('8.10') /* will change as implementations change ('8.10' in Mac OS 8.1) */
+};
+
+
+/* CatalogNodeID is used to track catalog objects */
+typedef UInt32 HFSCatalogNodeID;
+enum {
+ kHFSMaxVolumeNameChars = 27,
+ kHFSMaxFileNameChars = 31,
+ kHFSPlusMaxFileNameChars = 255
+};
+
+
+/* Extent overflow file data structures */
+/* HFS Extent key */
+
+struct HFSExtentKey {
+ UInt8 keyLength; /* length of key, excluding this field */
+ UInt8 forkType; /* 0 = data fork, FF = resource fork */
+ HFSCatalogNodeID fileID; /* file ID */
+ UInt16 startBlock; /* first file allocation block number in this extent */
+};
+typedef struct HFSExtentKey HFSExtentKey;
+/* HFS Plus Extent key */
+
+struct HFSPlusExtentKey {
+ UInt16 keyLength; /* length of key, excluding this field */
+ UInt8 forkType; /* 0 = data fork, FF = resource fork */
+ UInt8 pad; /* make the other fields align on 32-bit boundary */
+ HFSCatalogNodeID fileID; /* file ID */
+ UInt32 startBlock; /* first file allocation block number in this extent */
+};
+typedef struct HFSPlusExtentKey HFSPlusExtentKey;
+/* Number of extent descriptors per extent record */
+enum {
+ kHFSExtentDensity = 3,
+ kHFSPlusExtentDensity = 8
+};
+
+/* HFS extent descriptor */
+
+struct HFSExtentDescriptor {
+ UInt16 startBlock; /* first allocation block */
+ UInt16 blockCount; /* number of allocation blocks */
+};
+typedef struct HFSExtentDescriptor HFSExtentDescriptor;
+/* HFS Plus extent descriptor */
+
+struct HFSPlusExtentDescriptor {
+ UInt32 startBlock; /* first allocation block */
+ UInt32 blockCount; /* number of allocation blocks */
+};
+typedef struct HFSPlusExtentDescriptor HFSPlusExtentDescriptor;
+/* HFS extent record */
+
+typedef HFSExtentDescriptor HFSExtentRecord[3];
+/* HFS Plus extent record */
+typedef HFSPlusExtentDescriptor HFSPlusExtentRecord[8];
+
+/* Fork data info (HFS Plus only) - 80 bytes */
+
+struct HFSPlusForkData {
+ UInt64 logicalSize; /* fork's logical size in bytes */
+ UInt32 clumpSize; /* fork's clump size in bytes */
+ UInt32 totalBlocks; /* total blocks used by this fork */
+ HFSPlusExtentRecord extents; /* initial set of extents */
+};
+typedef struct HFSPlusForkData HFSPlusForkData;
+/* Permissions info (HFS Plus only) - 16 bytes */
+
+struct HFSPlusPermissions {
+ UInt32 ownerID; /* user or group ID of file/folder owner */
+ UInt32 groupID; /* additional user of group ID */
+ UInt32 permissions; /* permissions (bytes: unused, owner, group, everyone) */
+ UInt32 specialDevice; /* UNIX: device for character or block special file */
+};
+typedef struct HFSPlusPermissions HFSPlusPermissions;
+/* Catalog file data structures */
+enum {
+ kHFSRootParentID = 1, /* Parent ID of the root folder */
+ kHFSRootFolderID = 2, /* Folder ID of the root folder */
+ kHFSExtentsFileID = 3, /* File ID of the extents file */
+ kHFSCatalogFileID = 4, /* File ID of the catalog file */
+ kHFSBadBlockFileID = 5, /* File ID of the bad allocation block file */
+ kHFSAllocationFileID = 6, /* File ID of the allocation file (HFS Plus only) */
+ kHFSStartupFileID = 7, /* File ID of the startup file (HFS Plus only) */
+ kHFSAttributesFileID = 8, /* File ID of the attribute file (HFS Plus only) */
+ kHFSBogusExtentFileID = 15, /* Used for exchanging extents in extents file */
+ kHFSFirstUserCatalogNodeID = 16
+};
+
+
+/* HFS catalog key */
+
+struct HFSCatalogKey {
+ UInt8 keyLength; /* key length (in bytes) */
+ UInt8 reserved; /* reserved (set to zero) */
+ HFSCatalogNodeID parentID; /* parent folder ID */
+ Str31 nodeName; /* catalog node name */
+};
+typedef struct HFSCatalogKey HFSCatalogKey;
+/* HFS Plus catalog key */
+
+struct HFSPlusCatalogKey {
+ UInt16 keyLength; /* key length (in bytes) */
+ HFSCatalogNodeID parentID; /* parent folder ID */
+ HFSUniStr255 nodeName; /* catalog node name */
+};
+typedef struct HFSPlusCatalogKey HFSPlusCatalogKey;
+
+/* Catalog record types */
+enum {
+ /* HFS Catalog Records */
+ kHFSFolderRecord = 0x0100, /* Folder record */
+ kHFSFileRecord = 0x0200, /* File record */
+ kHFSFolderThreadRecord = 0x0300, /* Folder thread record */
+ kHFSFileThreadRecord = 0x0400, /* File thread record */
+ /* HFS Plus Catalog Records */
+ kHFSPlusFolderRecord = 1, /* Folder record */
+ kHFSPlusFileRecord = 2, /* File record */
+ kHFSPlusFolderThreadRecord = 3, /* Folder thread record */
+ kHFSPlusFileThreadRecord = 4 /* File thread record */
+};
+
+
+/* Catalog file record flags */
+enum {
+ kHFSFileLockedBit = 0x0000, /* file is locked and cannot be written to */
+ kHFSFileLockedMask = 0x0001,
+ kHFSThreadExistsBit = 0x0001, /* a file thread record exists for this file */
+ kHFSThreadExistsMask = 0x0002
+};
+
+
+/* HFS catalog folder record - 70 bytes */
+
+struct HFSCatalogFolder {
+ SInt16 recordType; /* record type */
+ UInt16 flags; /* folder flags */
+ UInt16 valence; /* folder valence */
+ HFSCatalogNodeID folderID; /* folder ID */
+ UInt32 createDate; /* date and time of creation */
+ UInt32 modifyDate; /* date and time of last modification */
+ UInt32 backupDate; /* date and time of last backup */
+ DInfo userInfo; /* Finder information */
+ DXInfo finderInfo; /* additional Finder information */
+ UInt32 reserved[4]; /* reserved - set to zero */
+};
+typedef struct HFSCatalogFolder HFSCatalogFolder;
+/* HFS Plus catalog folder record - 88 bytes */
+
+struct HFSPlusCatalogFolder {
+ SInt16 recordType; /* record type = HFS Plus folder record */
+ UInt16 flags; /* file flags */
+ UInt32 valence; /* folder's valence (limited to 2^16 in Mac OS) */
+ HFSCatalogNodeID folderID; /* folder ID */
+ UInt32 createDate; /* date and time of creation */
+ UInt32 contentModDate; /* date and time of last content modification */
+ UInt32 attributeModDate; /* date and time of last attribute modification */
+ UInt32 accessDate; /* date and time of last access (Rhapsody only) */
+ UInt32 backupDate; /* date and time of last backup */
+ HFSPlusPermissions permissions; /* permissions (for Rhapsody) */
+ DInfo userInfo; /* Finder information */
+ DXInfo finderInfo; /* additional Finder information */
+ UInt32 textEncoding; /* hint for name conversions */
+ UInt32 reserved; /* reserved - set to zero */
+};
+typedef struct HFSPlusCatalogFolder HFSPlusCatalogFolder;
+/* HFS catalog file record - 102 bytes */
+
+struct HFSCatalogFile {
+ SInt16 recordType; /* record type */
+ UInt8 flags; /* file flags */
+ SInt8 fileType; /* file type (unused ?) */
+ FInfo userInfo; /* Finder information */
+ HFSCatalogNodeID fileID; /* file ID */
+ UInt16 dataStartBlock; /* not used - set to zero */
+ SInt32 dataLogicalSize; /* logical EOF of data fork */
+ SInt32 dataPhysicalSize; /* physical EOF of data fork */
+ UInt16 rsrcStartBlock; /* not used - set to zero */
+ SInt32 rsrcLogicalSize; /* logical EOF of resource fork */
+ SInt32 rsrcPhysicalSize; /* physical EOF of resource fork */
+ UInt32 createDate; /* date and time of creation */
+ UInt32 modifyDate; /* date and time of last modification */
+ UInt32 backupDate; /* date and time of last backup */
+ FXInfo finderInfo; /* additional Finder information */
+ UInt16 clumpSize; /* file clump size (not used) */
+ HFSExtentRecord dataExtents; /* first data fork extent record */
+ HFSExtentRecord rsrcExtents; /* first resource fork extent record */
+ UInt32 reserved; /* reserved - set to zero */
+};
+typedef struct HFSCatalogFile HFSCatalogFile;
+/* HFS Plus catalog file record - 248 bytes */
+
+struct HFSPlusCatalogFile {
+ SInt16 recordType; /* record type = HFS Plus file record */
+ UInt16 flags; /* file flags */
+ UInt32 reserved1; /* reserved - set to zero */
+ HFSCatalogNodeID fileID; /* file ID */
+ UInt32 createDate; /* date and time of creation */
+ UInt32 contentModDate; /* date and time of last content modification */
+ UInt32 attributeModDate; /* date and time of last attribute modification */
+ UInt32 accessDate; /* date and time of last access (Rhapsody only) */
+ UInt32 backupDate; /* date and time of last backup */
+ HFSPlusPermissions permissions; /* permissions (for Rhapsody) */
+ FInfo userInfo; /* Finder information */
+ FXInfo finderInfo; /* additional Finder information */
+ UInt32 textEncoding; /* hint for name conversions */
+ UInt32 reserved2; /* reserved - set to zero */
+
+ /* start on double long (64 bit) boundry */
+ HFSPlusForkData dataFork; /* size and block data for data fork */
+ HFSPlusForkData resourceFork; /* size and block data for resource fork */
+};
+typedef struct HFSPlusCatalogFile HFSPlusCatalogFile;
+/* HFS catalog thread record - 46 bytes */
+
+struct HFSCatalogThread {
+ SInt16 recordType; /* record type */
+ SInt32 reserved[2]; /* reserved - set to zero */
+ HFSCatalogNodeID parentID; /* parent ID for this catalog node */
+ Str31 nodeName; /* name of this catalog node */
+};
+typedef struct HFSCatalogThread HFSCatalogThread;
+/* HFS Plus catalog thread record -- 264 bytes */
+
+struct HFSPlusCatalogThread {
+ SInt16 recordType; /* record type */
+ SInt16 reserved; /* reserved - set to zero */
+ HFSCatalogNodeID parentID; /* parent ID for this catalog node */
+ HFSUniStr255 nodeName; /* name of this catalog node (variable length) */
+};
+typedef struct HFSPlusCatalogThread HFSPlusCatalogThread;
+
+/*
+ These are the types of records in the attribute B-tree. The values were chosen
+ so that they wouldn't conflict with the catalog record types.
+*/
+enum {
+ kHFSPlusAttrInlineData = 0x10, /* if size < kAttrOverflowSize */
+ kHFSPlusAttrForkData = 0x20, /* if size >= kAttrOverflowSize */
+ kHFSPlusAttrExtents = 0x30 /* overflow extents for large attributes */
+};
+
+
+/*
+ HFSPlusAttrInlineData
+ For small attributes, whose entire value is stored within this one
+ B-tree record.
+ There would not be any other records for this attribute.
+*/
+
+struct HFSPlusAttrInlineData {
+ UInt32 recordType; /* = kHFSPlusAttrInlineData*/
+ UInt32 reserved;
+ UInt32 logicalSize; /* size in bytes of userData*/
+ UInt8 userData[2]; /* variable length; space allocated is a multiple of 2 bytes*/
+};
+typedef struct HFSPlusAttrInlineData HFSPlusAttrInlineData;
+/*
+ HFSPlusAttrForkData
+ For larger attributes, whose value is stored in allocation blocks.
+ If the attribute has more than 8 extents, there will be additonal
+ records (of type HFSPlusAttrExtents) for this attribute.
+*/
+
+struct HFSPlusAttrForkData {
+ UInt32 recordType; /* = kHFSPlusAttrForkData*/
+ UInt32 reserved;
+ HFSPlusForkData theFork; /* size and first extents of value*/
+};
+typedef struct HFSPlusAttrForkData HFSPlusAttrForkData;
+/*
+ HFSPlusAttrExtents
+ This record contains information about overflow extents for large,
+ fragmented attributes.
+*/
+
+struct HFSPlusAttrExtents {
+ UInt32 recordType; /* = kHFSPlusAttrExtents*/
+ UInt32 reserved;
+ HFSPlusExtentRecord extents; /* additional extents*/
+};
+typedef struct HFSPlusAttrExtents HFSPlusAttrExtents;
+/* A generic Attribute Record*/
+
+union HFSPlusAttrRecord {
+ UInt32 recordType;
+ HFSPlusAttrInlineData inlineData;
+ HFSPlusAttrForkData forkData;
+ HFSPlusAttrExtents overflowExtents;
+};
+typedef union HFSPlusAttrRecord HFSPlusAttrRecord;
+/* Key and node lengths */
+enum {
+ kHFSPlusExtentKeyMaximumLength = sizeof(HFSPlusExtentKey) - sizeof(UInt16),
+ kHFSExtentKeyMaximumLength = sizeof(HFSExtentKey) - sizeof(UInt8),
+ kHFSPlusCatalogKeyMaximumLength = sizeof(HFSPlusCatalogKey) - sizeof(UInt16),
+ kHFSPlusCatalogKeyMinimumLength = kHFSPlusCatalogKeyMaximumLength - sizeof(HFSUniStr255) + sizeof(UInt16),
+ kHFSCatalogKeyMaximumLength = sizeof(HFSCatalogKey) - sizeof(UInt8),
+ kHFSCatalogKeyMinimumLength = kHFSCatalogKeyMaximumLength - sizeof(Str31) + sizeof(UInt8),
+ kHFSPlusCatalogMinNodeSize = 4096,
+ kHFSPlusExtentMinNodeSize = 512,
+ kHFSPlusAttrMinNodeSize = 4096
+};
+
+
+/* HFS and HFS Plus volume attribute bits */
+enum {
+ /* Bits 0-6 are reserved (always cleared by MountVol call) */
+ kHFSVolumeHardwareLockBit = 7, /* volume is locked by hardware */
+ kHFSVolumeUnmountedBit = 8, /* volume was successfully unmounted */
+ kHFSVolumeSparedBlocksBit = 9, /* volume has bad blocks spared */
+ kHFSVolumeNoCacheRequiredBit = 10, /* don't cache volume blocks (i.e. RAM or ROM disk) */
+ kHFSBootVolumeInconsistentBit = 11, /* boot volume is inconsistent (System 7.6 and later) */
+ /* Bits 12-14 are reserved for future use */
+ kHFSVolumeSoftwareLockBit = 15, /* volume is locked by software */
+ kHFSVolumeHardwareLockMask = 1 << kHFSVolumeHardwareLockBit,
+ kHFSVolumeUnmountedMask = 1 << kHFSVolumeUnmountedBit,
+ kHFSVolumeSparedBlocksMask = 1 << kHFSVolumeSparedBlocksBit,
+ kHFSVolumeNoCacheRequiredMask = 1 << kHFSVolumeNoCacheRequiredBit,
+ kHFSBootVolumeInconsistentMask = 1 << kHFSBootVolumeInconsistentBit,
+ kHFSVolumeSoftwareLockMask = 1 << kHFSVolumeSoftwareLockBit,
+ kHFSMDBAttributesMask = 0x8380
+};
+
+
+/* Master Directory Block (HFS only) - 162 bytes */
+/* Stored at sector #2 (3rd sector) */
+
+struct HFSMasterDirectoryBlock {
+
+ /* These first fields are also used by MFS */
+
+ UInt16 drSigWord; /* volume signature */
+ UInt32 drCrDate; /* date and time of volume creation */
+ UInt32 drLsMod; /* date and time of last modification */
+ UInt16 drAtrb; /* volume attributes */
+ UInt16 drNmFls; /* number of files in root folder */
+ UInt16 drVBMSt; /* first block of volume bitmap */
+ UInt16 drAllocPtr; /* start of next allocation search */
+ UInt16 drNmAlBlks; /* number of allocation blocks in volume */
+ UInt32 drAlBlkSiz; /* size (in bytes) of allocation blocks */
+ UInt32 drClpSiz; /* default clump size */
+ UInt16 drAlBlSt; /* first allocation block in volume */
+ UInt32 drNxtCNID; /* next unused catalog node ID */
+ UInt16 drFreeBks; /* number of unused allocation blocks */
+ Str27 drVN; /* volume name */
+
+ /* Master Directory Block extensions for HFS */
+
+ UInt32 drVolBkUp; /* date and time of last backup */
+ UInt16 drVSeqNum; /* volume backup sequence number */
+ UInt32 drWrCnt; /* volume write count */
+ UInt32 drXTClpSiz; /* clump size for extents overflow file */
+ UInt32 drCTClpSiz; /* clump size for catalog file */
+ UInt16 drNmRtDirs; /* number of directories in root folder */
+ UInt32 drFilCnt; /* number of files in volume */
+ UInt32 drDirCnt; /* number of directories in volume */
+ SInt32 drFndrInfo[8]; /* information used by the Finder */
+ UInt16 drEmbedSigWord; /* embedded volume signature (formerly drVCSize) */
+ HFSExtentDescriptor drEmbedExtent; /* embedded volume location and size (formerly drVBMCSize and drCtlCSize) */
+ UInt32 drXTFlSize; /* size of extents overflow file */
+ HFSExtentRecord drXTExtRec; /* extent record for extents overflow file */
+ UInt32 drCTFlSize; /* size of catalog file */
+ HFSExtentRecord drCTExtRec; /* extent record for catalog file */
+};
+typedef struct HFSMasterDirectoryBlock HFSMasterDirectoryBlock;
+/* HFSPlusVolumeHeader (HFS Plus only) - 512 bytes */
+/* Stored at sector #2 (3rd sector) and second-to-last sector. */
+
+struct HFSPlusVolumeHeader {
+ UInt16 signature; /* volume signature == 'H+' */
+ UInt16 version; /* current version is kHFSPlusVersion */
+ UInt32 attributes; /* volume attributes */
+ UInt32 lastMountedVersion; /* implementation version which last mounted volume */
+ UInt32 reserved; /* reserved - set to zero */
+
+ UInt32 createDate; /* date and time of volume creation */
+ UInt32 modifyDate; /* date and time of last modification */
+ UInt32 backupDate; /* date and time of last backup */
+ UInt32 checkedDate; /* date and time of last disk check */
+
+ UInt32 fileCount; /* number of files in volume */
+ UInt32 folderCount; /* number of directories in volume */
+
+ UInt32 blockSize; /* size (in bytes) of allocation blocks */
+ UInt32 totalBlocks; /* number of allocation blocks in volume (includes this header and VBM*/
+ UInt32 freeBlocks; /* number of unused allocation blocks */
+
+ UInt32 nextAllocation; /* start of next allocation search */
+ UInt32 rsrcClumpSize; /* default resource fork clump size */
+ UInt32 dataClumpSize; /* default data fork clump size */
+ HFSCatalogNodeID nextCatalogID; /* next unused catalog node ID */
+
+ UInt32 writeCount; /* volume write count */
+ UInt64 encodingsBitmap; /* which encodings have been use on this volume */
+
+ UInt8 finderInfo[32]; /* information used by the Finder */
+
+ HFSPlusForkData allocationFile; /* allocation bitmap file */
+ HFSPlusForkData extentsFile; /* extents B-tree file */
+ HFSPlusForkData catalogFile; /* catalog B-tree file */
+ HFSPlusForkData attributesFile; /* extended attributes B-tree file */
+ HFSPlusForkData startupFile; /* boot file */
+};
+typedef struct HFSPlusVolumeHeader HFSPlusVolumeHeader;
+/* ---------- HFS and HFS Plus B-tree structures ---------- */
+/* BTNodeDescriptor -- Every B-tree node starts with these fields. */
+
+struct BTNodeDescriptor {
+ UInt32 fLink; /* next node at this level*/
+ UInt32 bLink; /* previous node at this level*/
+ SInt8 kind; /* kind of node (leaf, index, header, map)*/
+ UInt8 height; /* zero for header, map; child is one more than parent*/
+ UInt16 numRecords; /* number of records in this node*/
+ UInt16 reserved; /* reserved; set to zero*/
+};
+typedef struct BTNodeDescriptor BTNodeDescriptor;
+/* Constants for BTNodeDescriptor kind */
+enum {
+ kBTLeafNode = -1,
+ kBTIndexNode = 0,
+ kBTHeaderNode = 1,
+ kBTMapNode = 2
+};
+
+/* BTHeaderRec -- The first record of a B-tree header node */
+
+struct BTHeaderRec {
+ UInt16 treeDepth; /* maximum height (usually leaf nodes)*/
+ UInt32 rootNode; /* node number of root node*/
+ UInt32 leafRecords; /* number of leaf records in all leaf nodes*/
+ UInt32 firstLeafNode; /* node number of first leaf node*/
+ UInt32 lastLeafNode; /* node number of last leaf node*/
+ UInt16 nodeSize; /* size of a node, in bytes*/
+ UInt16 maxKeyLength; /* reserved*/
+ UInt32 totalNodes; /* total number of nodes in tree*/
+ UInt32 freeNodes; /* number of unused (free) nodes in tree*/
+ UInt16 reserved1; /* unused*/
+ UInt32 clumpSize; /* reserved*/
+ UInt8 btreeType; /* reserved*/
+ UInt8 reserved2; /* reserved*/
+ UInt32 attributes; /* persistent attributes about the tree*/
+ UInt32 reserved3[16]; /* reserved*/
+};
+typedef struct BTHeaderRec BTHeaderRec;
+/* Constants for BTHeaderRec attributes */
+enum {
+ kBTBadCloseMask = 0x00000001, /* reserved*/
+ kBTBigKeysMask = 0x00000002, /* key length field is 16 bits*/
+ kBTVariableIndexKeysMask = 0x00000004 /* keys in index nodes are variable length*/
+};
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __HFSVOLUMES__ */
+
diff --git a/include/qt/HID.h b/include/qt/HID.h
new file mode 100644
index 000000000..b5b54d5fb
--- /dev/null
+++ b/include/qt/HID.h
@@ -0,0 +1,1483 @@
+/*
+ File: HID.h
+
+ Contains: Definition of the interfaces to the HIDLib shared library and
+
+ Version: Technology: HID 1.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1999-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __HID__
+#define __HID__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*
+
+ Interfaces for HIDLib
+*/
+
+/* types of HID reports (input, output, feature)*/
+enum {
+ kHIDInputReport = 1,
+ kHIDOutputReport = 2,
+ kHIDFeatureReport = 3,
+ kHIDUnknownReport = 255
+};
+
+/* flags passed to HIDOpenReportDescriptor*/
+enum {
+ kHIDFlag_StrictErrorChecking = 0x00000001
+};
+
+typedef UInt32 HIDReportType;
+typedef UInt32 HIDUsage;
+typedef struct OpaqueHIDPreparsedDataRef* HIDPreparsedDataRef;
+
+struct HIDUsageAndPage {
+ HIDUsage usage;
+ HIDUsage usagePage;
+};
+typedef struct HIDUsageAndPage HIDUsageAndPage;
+typedef HIDUsageAndPage * HIDUsageAndPagePtr;
+
+struct HIDCaps {
+ HIDUsage usage;
+ HIDUsage usagePage;
+ ByteCount inputReportByteLength;
+ ByteCount outputReportByteLength;
+ ByteCount featureReportByteLength;
+ UInt32 numberCollectionNodes;
+ UInt32 numberInputButtonCaps;
+ UInt32 numberInputValueCaps;
+ UInt32 numberOutputButtonCaps;
+ UInt32 numberOutputValueCaps;
+ UInt32 numberFeatureButtonCaps;
+ UInt32 numberFeatureValueCaps;
+};
+typedef struct HIDCaps HIDCaps;
+typedef HIDCaps * HIDCapsPtr;
+
+struct HIDCollectionNode {
+ HIDUsage collectionUsage;
+ HIDUsage collectionUsagePage;
+ UInt32 parent;
+ UInt32 numberOfChildren;
+ UInt32 nextSibling;
+ UInt32 firstChild;
+};
+typedef struct HIDCollectionNode HIDCollectionNode;
+typedef HIDCollectionNode * HIDCollectionNodePtr;
+
+struct HIDButtonCaps {
+ HIDUsage usagePage;
+ UInt32 reportID;
+ UInt32 bitField;
+ UInt32 collection;
+ HIDUsage collectionUsage;
+ HIDUsage collectionUsagePage;
+ Boolean isRange;
+ Boolean isStringRange;
+ Boolean isDesignatorRange;
+ Boolean isAbsolute;
+
+ union {
+ struct {
+ HIDUsage usageMin;
+ HIDUsage usageMax;
+ UInt32 stringMin;
+ UInt32 stringMax;
+ UInt32 designatorMin;
+ UInt32 designatorMax;
+ } range;
+ struct {
+ HIDUsage usage;
+ HIDUsage reserved1;
+ UInt32 stringIndex;
+ UInt32 reserved2;
+ UInt32 designatorIndex;
+ UInt32 reserved3;
+ } notRange;
+ } u;
+};
+typedef struct HIDButtonCaps HIDButtonCaps;
+typedef HIDButtonCaps * HIDButtonCapsPtr;
+
+struct HIDValueCaps {
+ HIDUsage usagePage;
+ UInt32 reportID;
+ UInt32 bitField;
+ UInt32 collection;
+ HIDUsage collectionUsage;
+ HIDUsage collectionUsagePage;
+
+ Boolean isRange;
+ Boolean isStringRange;
+ Boolean isDesignatorRange;
+ Boolean isAbsolute;
+
+ UInt32 bitSize;
+ UInt32 reportCount;
+
+ SInt32 logicalMin;
+ SInt32 logicalMax;
+ SInt32 physicalMin;
+ SInt32 physicalMax;
+
+ union {
+ struct {
+ HIDUsage usageMin;
+ HIDUsage usageMax;
+ UInt32 stringMin;
+ UInt32 stringMax;
+ UInt32 designatorMin;
+ UInt32 designatorMax;
+ } range;
+ struct {
+ HIDUsage usage;
+ HIDUsage reserved1;
+ UInt32 stringIndex;
+ UInt32 reserved2;
+ UInt32 designatorIndex;
+ UInt32 reserved3;
+ } notRange;
+ } u;
+};
+typedef struct HIDValueCaps HIDValueCaps;
+typedef HIDValueCaps * HIDValueCapsPtr;
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+HIDOpenReportDescriptor (void * hidReportDescriptor,
+ ByteCount descriptorLength,
+ HIDPreparsedDataRef * preparsedDataRef,
+ UInt32 flags);
+
+EXTERN_API_C( OSStatus )
+HIDCloseReportDescriptor (HIDPreparsedDataRef preparsedDataRef);
+
+
+EXTERN_API_C( OSStatus )
+HIDGetCaps (HIDPreparsedDataRef preparsedDataRef,
+ HIDCapsPtr capabilities);
+
+EXTERN_API_C( OSStatus )
+HIDGetCollectionNodes (HIDCollectionNodePtr collectionNodes,
+ UInt32 * collectionNodesSize,
+ HIDPreparsedDataRef preparsedDataRef);
+
+EXTERN_API_C( OSStatus )
+HIDGetButtonCaps (HIDReportType reportType,
+ HIDButtonCapsPtr buttonCaps,
+ UInt32 * buttonCapsSize,
+ HIDPreparsedDataRef preparsedDataRef);
+
+EXTERN_API_C( OSStatus )
+HIDGetValueCaps (HIDReportType reportType,
+ HIDValueCapsPtr valueCaps,
+ UInt32 * valueCapsSize,
+ HIDPreparsedDataRef preparsedDataRef);
+
+EXTERN_API_C( OSStatus )
+HIDGetSpecificButtonCaps (HIDReportType reportType,
+ HIDUsage usagePage,
+ UInt32 collection,
+ HIDUsage usage,
+ HIDButtonCapsPtr buttonCaps,
+ UInt32 * buttonCapsSize,
+ HIDPreparsedDataRef preparsedDataRef);
+
+EXTERN_API_C( OSStatus )
+HIDGetSpecificValueCaps (HIDReportType reportType,
+ HIDUsage usagePage,
+ UInt32 collection,
+ HIDUsage usage,
+ HIDValueCapsPtr valueCaps,
+ UInt32 * valueCapsSize,
+ HIDPreparsedDataRef preparsedDataRef);
+
+EXTERN_API_C( UInt32 )
+HIDMaxUsageListLength (HIDReportType reportType,
+ HIDUsage usagePage,
+ HIDPreparsedDataRef preparsedDataRef);
+
+EXTERN_API_C( OSStatus )
+HIDGetReportLength (HIDReportType reportType,
+ UInt8 reportID,
+ ByteCount * reportLength,
+ HIDPreparsedDataRef preparsedDataRef);
+
+EXTERN_API_C( OSStatus )
+HIDInitReport (HIDReportType reportType,
+ UInt8 reportID,
+ HIDPreparsedDataRef preparsedDataRef,
+ void * report,
+ ByteCount reportLength);
+
+
+EXTERN_API_C( OSStatus )
+HIDGetButtons (HIDReportType reportType,
+ UInt32 collection,
+ HIDUsageAndPagePtr usageList,
+ UInt32 * usageListSize,
+ HIDPreparsedDataRef preparsedDataRef,
+ void * report,
+ ByteCount reportLength);
+
+EXTERN_API_C( OSStatus )
+HIDGetButtonsOnPage (HIDReportType reportType,
+ HIDUsage usagePage,
+ UInt32 collection,
+ HIDUsage * usageList,
+ UInt32 * usageListSize,
+ HIDPreparsedDataRef preparsedDataRef,
+ void * report,
+ ByteCount reportLength);
+
+EXTERN_API_C( OSStatus )
+HIDGetScaledUsageValue (HIDReportType reportType,
+ HIDUsage usagePage,
+ UInt32 collection,
+ HIDUsage usage,
+ SInt32 * usageValue,
+ HIDPreparsedDataRef preparsedDataRef,
+ void * report,
+ ByteCount reportLength);
+
+EXTERN_API_C( OSStatus )
+HIDGetUsageValue (HIDReportType reportType,
+ HIDUsage usagePage,
+ UInt32 collection,
+ HIDUsage usage,
+ SInt32 * usageValue,
+ HIDPreparsedDataRef preparsedDataRef,
+ void * report,
+ ByteCount reportLength);
+
+EXTERN_API_C( OSStatus )
+HIDGetUsageValueArray (HIDReportType reportType,
+ HIDUsage usagePage,
+ UInt32 collection,
+ HIDUsage usage,
+ Byte * usageValueBuffer,
+ ByteCount usageValueBufferSize,
+ HIDPreparsedDataRef preparsedDataRef,
+ void * report,
+ ByteCount reportLength);
+
+
+EXTERN_API_C( OSStatus )
+HIDSetButton (HIDReportType reportType,
+ HIDUsage usagePage,
+ UInt32 collection,
+ HIDUsage usage,
+ HIDPreparsedDataRef preparsedDataRef,
+ void * report,
+ ByteCount reportLength);
+
+EXTERN_API_C( OSStatus )
+HIDSetButtons (HIDReportType reportType,
+ HIDUsage usagePage,
+ UInt32 collection,
+ HIDUsage * usageList,
+ UInt32 * usageListSize,
+ HIDPreparsedDataRef preparsedDataRef,
+ void * report,
+ ByteCount reportLength);
+
+EXTERN_API_C( OSStatus )
+HIDSetScaledUsageValue (HIDReportType reportType,
+ HIDUsage usagePage,
+ UInt32 collection,
+ HIDUsage usage,
+ SInt32 usageValue,
+ HIDPreparsedDataRef preparsedDataRef,
+ void * report,
+ ByteCount reportLength);
+
+EXTERN_API_C( OSStatus )
+HIDSetUsageValue (HIDReportType reportType,
+ HIDUsage usagePage,
+ UInt32 collection,
+ HIDUsage usage,
+ SInt32 usageValue,
+ HIDPreparsedDataRef preparsedDataRef,
+ void * report,
+ ByteCount reportLength);
+
+EXTERN_API_C( OSStatus )
+HIDSetUsageValueArray (HIDReportType reportType,
+ HIDUsage usagePage,
+ UInt32 collection,
+ HIDUsage usage,
+ Byte * usageValueBuffer,
+ ByteCount usageValueBufferLength,
+ HIDPreparsedDataRef preparsedDataRef,
+ void * report,
+ ByteCount reportLength);
+
+EXTERN_API_C( OSStatus )
+HIDUsageListDifference (HIDUsage * previousUsageList,
+ HIDUsage * currentUsageList,
+ HIDUsage * breakUsageList,
+ HIDUsage * makeUsageList,
+ UInt32 usageListsSize);
+
+/*
+
+ Interfaces for a HID device driver
+*/
+
+/* these are the constants to be passed to HIDGetDeviceInfo*/
+#endif /* CALL_NOT_IN_CARBON */
+
+enum {
+ kHIDGetInfo_VendorID = 1,
+ kHIDGetInfo_ProductID = 2,
+ kHIDGetInfo_VersionNumber = 3,
+ kHIDGetInfo_MaxReportSize = 0x10,
+ kHIDGetInfo_GetManufacturerString = 0x0100,
+ kHIDGetInfo_GetProductString = 0x0101,
+ kHIDGetInfo_GetSerialNumberString = 0x0102,
+ kHIDGetInfo_GetIndexedString = 0x0103,
+ kHIDGetInfo_VendorSpecificStart = 0x00010000
+};
+
+/* these are the valid permissions to pass to HIDOpenDevice*/
+enum {
+ kHIDPerm_ReadOnly = 0x0001,
+ kHIDPerm_ReadWriteShared = 0x0003,
+ kHIDPerm_ReadWriteExclusive = 0x0013
+};
+
+/* these are flags used in HIDInstallReportHandler*/
+enum {
+ kHIDFlag_CallbackIsResident = 0x0001
+};
+
+
+/* these are the constants to be passed to HIDControlDevice*/
+enum {
+ kHIDVendorSpecificControlStart = 0x00010000
+};
+
+/* these constant versions are used in the HIDDeviceDispatchTable structure*/
+enum {
+ kHIDCurrentDispatchTableVersion = 2,
+ kHIDOldestCompatableDispatchTableVersion = 1,
+ kHIDDispatchTableVersion1 = 1,
+ kHIDDispatchTableVersion1OldestCompatible = 1
+};
+
+typedef struct OpaqueHIDDeviceConnectionRef* HIDDeviceConnectionRef;
+/* HIDGetDeviceInfo is used to get specific information about a HID Device*/
+typedef CALLBACK_API_C( OSStatus , HIDGetDeviceInfoProcPtr )(UInt32 inInfoSelector, void *outInfo, ByteCount *ioSize);
+/* HIDGetHIDDescriptor is used to get a specific HID descriptor from a HID device (such as a report descriptor)*/
+typedef CALLBACK_API_C( OSStatus , HIDGetHIDDescriptorProcPtr )(UInt32 inDescriptorType, UInt32 inDescriptorIndex, void *outDescriptor, UInt32 *ioBufferSize);
+/* You must first 'open' a device before using it*/
+typedef CALLBACK_API_C( OSStatus , HIDOpenDeviceProcPtr )(HIDDeviceConnectionRef *outConnectionRef, UInt32 permissions, UInt32 reserved);
+/* When finished, 'close' a device*/
+typedef CALLBACK_API_C( OSStatus , HIDCloseDeviceProcPtr )(HIDDeviceConnectionRef inConnectionRef);
+/* User provided ProcPtr to be called when HID report is received*/
+typedef CALLBACK_API_C( void , HIDReportHandlerProcPtr )(void *inHIDReport, UInt32 inHIDReportLength, UInt32 inRefcon);
+/*
+ When installed, a report handler is called at defered task time (unless kHIDFlag_CallbackIsResident is passed)
+ whenever an interrupt packet is recieved on the first interrupt in pipe. The supplied refcon is also passed thru.
+*/
+typedef CALLBACK_API_C( OSStatus , HIDInstallReportHandlerProcPtr )(HIDDeviceConnectionRef inConnectionRef, UInt32 flags, HIDReportHandlerProcPtr inReportHandlerProc, UInt32 inRefcon);
+/* When finished, remove the report handler.*/
+typedef CALLBACK_API_C( OSStatus , HIDRemoveReportHandlerProcPtr )(HIDDeviceConnectionRef inConnectionRef);
+/* If there was a HIDReportHandler installed previous to the one from this connection, pass that one this report*/
+typedef CALLBACK_API_C( OSStatus , HIDCallPreviousReportHandlerProcPtr )(HIDDeviceConnectionRef inConnectionRef, void *inHIDReport, UInt32 inHIDReportLength);
+/*
+ HIDGetReport is used to get a report (of type input, output, or feature) directly from a HID device
+ the HIDReportHandler will be called with the report when it is received.
+*/
+typedef CALLBACK_API_C( OSStatus , HIDGetReportProcPtr )(HIDDeviceConnectionRef inConnectionRef, UInt32 inReportType, UInt32 inReportID, HIDReportHandlerProcPtr inReportHandlerProc, UInt32 inRefcon);
+/* HIDSetReport is used to send a report (of type input, output, or feature) directly to a HID device*/
+typedef CALLBACK_API_C( OSStatus , HIDSetReportProcPtr )(HIDDeviceConnectionRef inConnectionRef, UInt32 inReportType, UInt32 inReportID, void *inInfo, ByteCount inSize);
+/* HIDControlDevice is used to send misc control messages to a device*/
+typedef CALLBACK_API_C( OSStatus , HIDControlDeviceProcPtr )(HIDDeviceConnectionRef inConnectionRef, UInt32 inControlSelector, void *ioControlData);
+/*
+ dispatchTableCurrentVersion is kHIDCurrentDispatchTableVersion
+ dispatchTableOldestVersion is kHIDOldestCompatableDispatchTableVersion
+ (the oldest built client using this API that this HID device driver will work with)
+ vendorID is who wrote this HID device driver (hi word of 0 and USB vendorID is valid)
+*/
+
+struct HIDDeviceDispatchTable {
+ UInt32 dispatchTableCurrentVersion;
+ UInt32 dispatchTableOldestVersion;
+ UInt32 vendorID;
+ UInt32 vendorSpecific;
+ UInt32 reserved;
+
+ HIDGetDeviceInfoProcPtr pHIDGetDeviceInfo;
+ HIDGetHIDDescriptorProcPtr pHIDGetHIDDescriptor;
+ HIDOpenDeviceProcPtr pHIDOpenDevice;
+ HIDCloseDeviceProcPtr pHIDCloseDevice;
+ HIDInstallReportHandlerProcPtr pHIDInstallReportHandler;
+ HIDRemoveReportHandlerProcPtr pHIDRemoveReportHandler;
+ HIDCallPreviousReportHandlerProcPtr pHIDCallPreviousReportHandler;
+ HIDGetReportProcPtr pHIDGetReport; /* new for vers 2, was reserved in version 1*/
+ HIDSetReportProcPtr pHIDSetReport; /* new for vers 2, was reserved in version 1*/
+ HIDControlDeviceProcPtr pHIDControlDevice;
+};
+typedef struct HIDDeviceDispatchTable HIDDeviceDispatchTable;
+typedef HIDDeviceDispatchTable * HIDDeviceDispatchTablePtr;
+/* A USB HIDDevice driver should export a HIDDeviceDispatchTable symbol */
+/* in it's PEF container, with the name "\pTheHIDDeviceDispatchTable" */
+
+
+/* ****************************************************************************************** */
+/* HID Usage Tables */
+/* */
+/* The following constants are from the USB 'HID Usage Tables' specification, revision 1.1rc3 */
+/* ****************************************************************************************** */
+
+/* Usage Pages */
+enum {
+ kHIDPage_Undefined = 0x00,
+ kHIDPage_GenericDesktop = 0x01,
+ kHIDPage_Simulation = 0x02,
+ kHIDPage_VR = 0x03,
+ kHIDPage_Sport = 0x04,
+ kHIDPage_Game = 0x05, /* Reserved 0x06 */
+ kHIDPage_KeyboardOrKeypad = 0x07, /* USB Device Class Definition for Human Interface Devices (HID). Note: the usage type for all key codes is Selector (Sel). */
+ kHIDPage_LEDs = 0x08,
+ kHIDPage_Button = 0x09,
+ kHIDPage_Ordinal = 0x0A,
+ kHIDPage_Telephony = 0x0B,
+ kHIDPage_Consumer = 0x0C,
+ kHIDPage_Digitizer = 0x0D, /* Reserved 0x0E */
+ kHIDPage_PID = 0x0F, /* USB Physical Interface Device definitions for force feedback and related devices. */
+ kHIDPage_Unicode = 0x10, /* Reserved 0x11 - 0x13 */
+ kHIDPage_AlphanumericDisplay = 0x14, /* Reserved 0x15 - 0x7F */
+ /* Monitor 0x80 - 0x83 USB Device Class Definition for Monitor Devices */
+ /* Power 0x84 - 0x87 USB Device Class Definition for Power Devices */
+ /* Reserved 0x88 - 0x8B */
+ kHIDPage_BarCodeScanner = 0x8C, /* (Point of Sale) USB Device Class Definition for Bar Code Scanner Devices */
+ kHIDPage_Scale = 0x8D, /* (Point of Sale) USB Device Class Definition for Scale Devices */
+ /* ReservedPointofSalepages 0x8E - 0x8F */
+ kHIDPage_CameraControl = 0x90, /* USB Device Class Definition for Image Class Devices */
+ kHIDPage_Arcade = 0x91, /* OAAF Definitions for arcade and coinop related Devices */
+ /* Reserved 0x92 - 0xFEFF */
+ /* VendorDefined 0xFF00 - 0xFFFF */
+ kHIDPage_VendorDefinedStart = 0xFF00
+};
+
+/* Undefined Usage for all usage pages */
+enum {
+ kHIDUsage_Undefined = 0x00
+};
+
+/* GenericDesktop Page (0x01) */
+enum {
+ kHIDUsage_GD_Pointer = 0x01, /* Physical Collection */
+ kHIDUsage_GD_Mouse = 0x02, /* Application Collection */
+ /* 0x03 Reserved */
+ kHIDUsage_GD_Joystick = 0x04, /* Application Collection */
+ kHIDUsage_GD_GamePad = 0x05, /* Application Collection */
+ kHIDUsage_GD_Keyboard = 0x06, /* Application Collection */
+ kHIDUsage_GD_Keypad = 0x07, /* Application Collection */
+ kHIDUsage_GD_MultiAxisController = 0x08, /* Application Collection */
+ /* 0x09 - 0x2F Reserved */
+ kHIDUsage_GD_X = 0x30, /* Dynamic Value */
+ kHIDUsage_GD_Y = 0x31, /* Dynamic Value */
+ kHIDUsage_GD_Z = 0x32, /* Dynamic Value */
+ kHIDUsage_GD_Rx = 0x33, /* Dynamic Value */
+ kHIDUsage_GD_Ry = 0x34, /* Dynamic Value */
+ kHIDUsage_GD_Rz = 0x35, /* Dynamic Value */
+ kHIDUsage_GD_Slider = 0x36, /* Dynamic Value */
+ kHIDUsage_GD_Dial = 0x37, /* Dynamic Value */
+ kHIDUsage_GD_Wheel = 0x38, /* Dynamic Value */
+ kHIDUsage_GD_Hatswitch = 0x39, /* Dynamic Value */
+ kHIDUsage_GD_CountedBuffer = 0x3A, /* Logical Collection */
+ kHIDUsage_GD_ByteCount = 0x3B, /* Dynamic Value */
+ kHIDUsage_GD_MotionWakeup = 0x3C, /* One-Shot Control */
+ kHIDUsage_GD_Start = 0x3D, /* On/Off Control */
+ kHIDUsage_GD_Select = 0x3E, /* On/Off Control */
+ /* 0x3F Reserved */
+ kHIDUsage_GD_Vx = 0x40, /* Dynamic Value */
+ kHIDUsage_GD_Vy = 0x41, /* Dynamic Value */
+ kHIDUsage_GD_Vz = 0x42, /* Dynamic Value */
+ kHIDUsage_GD_Vbrx = 0x43, /* Dynamic Value */
+ kHIDUsage_GD_Vbry = 0x44, /* Dynamic Value */
+ kHIDUsage_GD_Vbrz = 0x45, /* Dynamic Value */
+ kHIDUsage_GD_Vno = 0x46, /* Dynamic Value */
+ /* 0x47 - 0x7F Reserved */
+ kHIDUsage_GD_SystemControl = 0x80, /* Application Collection */
+ kHIDUsage_GD_SystemPowerDown = 0x81, /* One-Shot Control */
+ kHIDUsage_GD_SystemSleep = 0x82, /* One-Shot Control */
+ kHIDUsage_GD_SystemWakeUp = 0x83, /* One-Shot Control */
+ kHIDUsage_GD_SystemContextMenu = 0x84, /* One-Shot Control */
+ kHIDUsage_GD_SystemMainMenu = 0x85, /* One-Shot Control */
+ kHIDUsage_GD_SystemAppMenu = 0x86, /* One-Shot Control */
+ kHIDUsage_GD_SystemMenuHelp = 0x87, /* One-Shot Control */
+ kHIDUsage_GD_SystemMenuExit = 0x88, /* One-Shot Control */
+ kHIDUsage_GD_SystemMenu = 0x89, /* Selector */
+ kHIDUsage_GD_SystemMenuRight = 0x8A, /* Re-Trigger Control */
+ kHIDUsage_GD_SystemMenuLeft = 0x8B, /* Re-Trigger Control */
+ kHIDUsage_GD_SystemMenuUp = 0x8C, /* Re-Trigger Control */
+ kHIDUsage_GD_SystemMenuDown = 0x8D, /* Re-Trigger Control */
+ /* 0x8E - 0x8F Reserved */
+ kHIDUsage_GD_DPadUp = 0x90, /* On/Off Control */
+ kHIDUsage_GD_DPadDown = 0x91, /* On/Off Control */
+ kHIDUsage_GD_DPadRight = 0x92, /* On/Off Control */
+ kHIDUsage_GD_DPadLeft = 0x93, /* On/Off Control */
+ /* 0x94 - 0xFFFF Reserved */
+ kHIDUsage_GD_Reserved = 0xFFFF
+};
+
+/* Simulation Page (0x02) */
+/* This section provides detailed descriptions of the usages employed by simulation devices. */
+enum {
+ kHIDUsage_Sim_FlightSimulationDevice = 0x01, /* Application Collection */
+ kHIDUsage_Sim_AutomobileSimulationDevice = 0x02, /* Application Collection */
+ kHIDUsage_Sim_TankSimulationDevice = 0x03, /* Application Collection */
+ kHIDUsage_Sim_SpaceshipSimulationDevice = 0x04, /* Application Collection */
+ kHIDUsage_Sim_SubmarineSimulationDevice = 0x05, /* Application Collection */
+ kHIDUsage_Sim_SailingSimulationDevice = 0x06, /* Application Collection */
+ kHIDUsage_Sim_MotorcycleSimulationDevice = 0x07, /* Application Collection */
+ kHIDUsage_Sim_SportsSimulationDevice = 0x08, /* Application Collection */
+ kHIDUsage_Sim_AirplaneSimulationDevice = 0x09, /* Application Collection */
+ kHIDUsage_Sim_HelicopterSimulationDevice = 0x0A, /* Application Collection */
+ kHIDUsage_Sim_MagicCarpetSimulationDevice = 0x0B, /* Application Collection */
+ kHIDUsage_Sim_BicycleSimulationDevice = 0x0C, /* Application Collection */
+ /* 0x0D - 0x1F Reserved */
+ kHIDUsage_Sim_FlightControlStick = 0x20, /* Application Collection */
+ kHIDUsage_Sim_FlightStick = 0x21, /* Application Collection */
+ kHIDUsage_Sim_CyclicControl = 0x22, /* Physical Collection */
+ kHIDUsage_Sim_CyclicTrim = 0x23, /* Physical Collection */
+ kHIDUsage_Sim_FlightYoke = 0x24, /* Application Collection */
+ kHIDUsage_Sim_TrackControl = 0x25, /* Physical Collection */
+ /* 0x26 - 0xAF Reserved */
+ kHIDUsage_Sim_Aileron = 0xB0, /* Dynamic Value */
+ kHIDUsage_Sim_AileronTrim = 0xB1, /* Dynamic Value */
+ kHIDUsage_Sim_AntiTorqueControl = 0xB2, /* Dynamic Value */
+ kHIDUsage_Sim_AutopilotEnable = 0xB3, /* On/Off Control */
+ kHIDUsage_Sim_ChaffRelease = 0xB4, /* One-Shot Control */
+ kHIDUsage_Sim_CollectiveControl = 0xB5, /* Dynamic Value */
+ kHIDUsage_Sim_DiveBrake = 0xB6, /* Dynamic Value */
+ kHIDUsage_Sim_ElectronicCountermeasures = 0xB7, /* On/Off Control */
+ kHIDUsage_Sim_Elevator = 0xB8, /* Dynamic Value */
+ kHIDUsage_Sim_ElevatorTrim = 0xB9, /* Dynamic Value */
+ kHIDUsage_Sim_Rudder = 0xBA, /* Dynamic Value */
+ kHIDUsage_Sim_Throttle = 0xBB, /* Dynamic Value */
+ kHIDUsage_Sim_FlightCommunications = 0xBC, /* On/Off Control */
+ kHIDUsage_Sim_FlareRelease = 0xBD, /* One-Shot Control */
+ kHIDUsage_Sim_LandingGear = 0xBE, /* On/Off Control */
+ kHIDUsage_Sim_ToeBrake = 0xBF, /* Dynamic Value */
+ kHIDUsage_Sim_Trigger = 0xC0, /* Momentary Control */
+ kHIDUsage_Sim_WeaponsArm = 0xC1, /* On/Off Control */
+ kHIDUsage_Sim_Weapons = 0xC2, /* Selector */
+ kHIDUsage_Sim_WingFlaps = 0xC3, /* Dynamic Value */
+ kHIDUsage_Sim_Accelerator = 0xC4, /* Dynamic Value */
+ kHIDUsage_Sim_Brake = 0xC5, /* Dynamic Value */
+ kHIDUsage_Sim_Clutch = 0xC6, /* Dynamic Value */
+ kHIDUsage_Sim_Shifter = 0xC7, /* Dynamic Value */
+ kHIDUsage_Sim_Steering = 0xC8, /* Dynamic Value */
+ kHIDUsage_Sim_TurretDirection = 0xC9, /* Dynamic Value */
+ kHIDUsage_Sim_BarrelElevation = 0xCA, /* Dynamic Value */
+ kHIDUsage_Sim_DivePlane = 0xCB, /* Dynamic Value */
+ kHIDUsage_Sim_Ballast = 0xCC, /* Dynamic Value */
+ kHIDUsage_Sim_BicycleCrank = 0xCD, /* Dynamic Value */
+ kHIDUsage_Sim_HandleBars = 0xCE, /* Dynamic Value */
+ kHIDUsage_Sim_FrontBrake = 0xCF, /* Dynamic Value */
+ kHIDUsage_Sim_RearBrake = 0xD0, /* Dynamic Value */
+ /* 0xD1 - 0xFFFF Reserved */
+ kHIDUsage_Sim_Reserved = 0xFFFF
+};
+
+/* VR Page (0x03) */
+/* Virtual Reality controls depend on designators to identify the individual controls. Most of the following are */
+/* usages are applied to the collections of entities that comprise the actual device. */
+enum {
+ kHIDUsage_VR_Belt = 0x01, /* Application Collection */
+ kHIDUsage_VR_BodySuit = 0x02, /* Application Collection */
+ kHIDUsage_VR_Flexor = 0x03, /* Physical Collection */
+ kHIDUsage_VR_Glove = 0x04, /* Application Collection */
+ kHIDUsage_VR_HeadTracker = 0x05, /* Physical Collection */
+ kHIDUsage_VR_HeadMountedDisplay = 0x06, /* Application Collection */
+ kHIDUsage_VR_HandTracker = 0x07, /* Application Collection */
+ kHIDUsage_VR_Oculometer = 0x08, /* Application Collection */
+ kHIDUsage_VR_Vest = 0x09, /* Application Collection */
+ kHIDUsage_VR_AnimatronicDevice = 0x0A, /* Application Collection */
+ /* 0x0B - 0x1F Reserved */
+ kHIDUsage_VR_StereoEnable = 0x20, /* On/Off Control */
+ kHIDUsage_VR_DisplayEnable = 0x21, /* On/Off Control */
+ /* 0x22 - 0xFFFF Reserved */
+ kHIDUsage_VR_Reserved = 0xFFFF
+};
+
+/* Sport Page (0x04) */
+enum {
+ kHIDUsage_Sprt_BaseballBat = 0x01, /* Application Collection */
+ kHIDUsage_Sprt_GolfClub = 0x02, /* Application Collection */
+ kHIDUsage_Sprt_RowingMachine = 0x03, /* Application Collection */
+ kHIDUsage_Sprt_Treadmill = 0x04, /* Application Collection */
+ /* 0x05 - 0x2F Reserved */
+ kHIDUsage_Sprt_Oar = 0x30, /* Dynamic Value */
+ kHIDUsage_Sprt_Slope = 0x31, /* Dynamic Value */
+ kHIDUsage_Sprt_Rate = 0x32, /* Dynamic Value */
+ kHIDUsage_Sprt_StickSpeed = 0x33, /* Dynamic Value */
+ kHIDUsage_Sprt_StickFaceAngle = 0x34, /* Dynamic Value */
+ kHIDUsage_Sprt_StickHeelOrToe = 0x35, /* Dynamic Value */
+ kHIDUsage_Sprt_StickFollowThrough = 0x36, /* Dynamic Value */
+ kHIDUsage_Sprt_StickTempo = 0x37, /* Dynamic Value */
+ kHIDUsage_Sprt_StickType = 0x38, /* Named Array */
+ kHIDUsage_Sprt_StickHeight = 0x39, /* Dynamic Value */
+ /* 0x3A - 0x4F Reserved */
+ kHIDUsage_Sprt_Putter = 0x50, /* Selector */
+ kHIDUsage_Sprt_1Iron = 0x51, /* Selector */
+ kHIDUsage_Sprt_2Iron = 0x52, /* Selector */
+ kHIDUsage_Sprt_3Iron = 0x53, /* Selector */
+ kHIDUsage_Sprt_4Iron = 0x54, /* Selector */
+ kHIDUsage_Sprt_5Iron = 0x55, /* Selector */
+ kHIDUsage_Sprt_6Iron = 0x56, /* Selector */
+ kHIDUsage_Sprt_7Iron = 0x57, /* Selector */
+ kHIDUsage_Sprt_8Iron = 0x58, /* Selector */
+ kHIDUsage_Sprt_9Iron = 0x59, /* Selector */
+ kHIDUsage_Sprt_10Iron = 0x5A, /* Selector */
+ kHIDUsage_Sprt_11Iron = 0x5B, /* Selector */
+ kHIDUsage_Sprt_SandWedge = 0x5C, /* Selector */
+ kHIDUsage_Sprt_LoftWedge = 0x5D, /* Selector */
+ kHIDUsage_Sprt_PowerWedge = 0x5E, /* Selector */
+ kHIDUsage_Sprt_1Wood = 0x5F, /* Selector */
+ kHIDUsage_Sprt_3Wood = 0x60, /* Selector */
+ kHIDUsage_Sprt_5Wood = 0x61, /* Selector */
+ kHIDUsage_Sprt_7Wood = 0x62, /* Selector */
+ kHIDUsage_Sprt_9Wood = 0x63, /* Selector */
+ /* 0x64 - 0xFFFF Reserved */
+ kHIDUsage_Sprt_Reserved = 0xFFFF
+};
+
+/* Game Page (0x05) */
+enum {
+ kHIDUsage_Game_3DGameController = 0x01, /* Application Collection */
+ kHIDUsage_Game_PinballDevice = 0x02, /* Application Collection */
+ kHIDUsage_Game_GunDevice = 0x03, /* Application Collection */
+ /* 0x04 - 0x1F Reserved */
+ kHIDUsage_Game_PointofView = 0x20, /* Physical Collection */
+ kHIDUsage_Game_TurnRightOrLeft = 0x21, /* Dynamic Value */
+ kHIDUsage_Game_PitchUpOrDown = 0x22, /* Dynamic Value */
+ kHIDUsage_Game_RollRightOrLeft = 0x23, /* Dynamic Value */
+ kHIDUsage_Game_MoveRightOrLeft = 0x24, /* Dynamic Value */
+ kHIDUsage_Game_MoveForwardOrBackward = 0x25, /* Dynamic Value */
+ kHIDUsage_Game_MoveUpOrDown = 0x26, /* Dynamic Value */
+ kHIDUsage_Game_LeanRightOrLeft = 0x27, /* Dynamic Value */
+ kHIDUsage_Game_LeanForwardOrBackward = 0x28, /* Dynamic Value */
+ kHIDUsage_Game_HeightOfPOV = 0x29, /* Dynamic Value */
+ kHIDUsage_Game_Flipper = 0x2A, /* Momentary Control */
+ kHIDUsage_Game_SecondaryFlipper = 0x2B, /* Momentary Control */
+ kHIDUsage_Game_Bump = 0x2C, /* Momentary Control */
+ kHIDUsage_Game_NewGame = 0x2D, /* One-Shot Control */
+ kHIDUsage_Game_ShootBall = 0x2E, /* One-Shot Control */
+ kHIDUsage_Game_Player = 0x2F, /* One-Shot Control */
+ kHIDUsage_Game_GunBolt = 0x30, /* On/Off Control */
+ kHIDUsage_Game_GunClip = 0x31, /* On/Off Control */
+ kHIDUsage_Game_Gun = 0x32, /* Selector */
+ kHIDUsage_Game_GunSingleShot = 0x33, /* Selector */
+ kHIDUsage_Game_GunBurst = 0x34, /* Selector */
+ kHIDUsage_Game_GunAutomatic = 0x35, /* Selector */
+ kHIDUsage_Game_GunSafety = 0x36, /* On/Off Control */
+ kHIDUsage_Game_GamepadFireOrJump = 0x37, /* Logical Collection */
+ kHIDUsage_Game_GamepadTrigger = 0x39, /* Logical Collection */
+ /* 0x3A - 0xFFFF Reserved */
+ kHIDUsage_Game_Reserved = 0xFFFF
+};
+
+/* KeyboardOrKeypad Page (0x07) */
+/* This section is the Usage Page for key codes to be used in implementing a USB keyboard. */
+/* A Boot Keyboard (84-, 101- or 104-key) should at a minimum support all associated usage codes as */
+/* indicated in the "Boot" column below. */
+/* The usage type of all key codes is Selectors (Sel), except for the modifier keys Keyboard Left Control (0x224) */
+/* to Keyboard Right GUI (0x231) which are Dynamic Flags (DV). */
+/* Note: A general note on Usages and languages: */
+/* Due to the variation of keyboards from language to language, it is not feasible to specify exact key mappings */
+/* for every language. Where this list is not specific for a key function in a language, the closest equivalent key */
+/* position should be used, so that a keyboard may be modified for a different language by simply printing different */
+/* keycaps. One example is the Y key on a North American keyboard. In Germany this is typically Z. Rather than changing */
+/* the keyboard firmware to put the Z Usage into that place in the descriptor list, the vendor should use the Y Usage on */
+/* both the North American and German keyboards. This continues to be the existing practice in the industry, in order to */
+/* minimize the number of changes to the electronics to accommodate otherlanguages. */
+enum {
+ kHIDUsage_KeyboardErrorRollOver = 0x01, /* ErrorRollOver */
+ kHIDUsage_KeyboardPOSTFail = 0x02, /* POSTFail */
+ kHIDUsage_KeyboardErrorUndefined = 0x03, /* ErrorUndefined */
+ kHIDUsage_KeyboardA = 0x04, /* a or A */
+ kHIDUsage_KeyboardB = 0x05, /* b or B */
+ kHIDUsage_KeyboardC = 0x06, /* c or C */
+ kHIDUsage_KeyboardD = 0x07, /* d or D */
+ kHIDUsage_KeyboardE = 0x08, /* e or E */
+ kHIDUsage_KeyboardF = 0x09, /* f or F */
+ kHIDUsage_KeyboardG = 0x0A, /* g or G */
+ kHIDUsage_KeyboardH = 0x0B, /* h or H */
+ kHIDUsage_KeyboardI = 0x0C, /* i or I */
+ kHIDUsage_KeyboardJ = 0x0D, /* j or J */
+ kHIDUsage_KeyboardK = 0x0E, /* k or K */
+ kHIDUsage_KeyboardL = 0x0F, /* l or L */
+ kHIDUsage_KeyboardM = 0x10, /* m or M */
+ kHIDUsage_KeyboardN = 0x11, /* n or N */
+ kHIDUsage_KeyboardO = 0x12, /* o or O */
+ kHIDUsage_KeyboardP = 0x13, /* p or P */
+ kHIDUsage_KeyboardQ = 0x14, /* q or Q */
+ kHIDUsage_KeyboardR = 0x15, /* r or R */
+ kHIDUsage_KeyboardS = 0x16, /* s or S */
+ kHIDUsage_KeyboardT = 0x17, /* t or T */
+ kHIDUsage_KeyboardU = 0x18, /* u or U */
+ kHIDUsage_KeyboardV = 0x19, /* v or V */
+ kHIDUsage_KeyboardW = 0x1A, /* w or W */
+ kHIDUsage_KeyboardX = 0x1B, /* x or X */
+ kHIDUsage_KeyboardY = 0x1C, /* y or Y */
+ kHIDUsage_KeyboardZ = 0x1D, /* z or Z */
+ kHIDUsage_Keyboard1 = 0x1E, /* 1 or ! */
+ kHIDUsage_Keyboard2 = 0x1F, /* 2 or @ */
+ kHIDUsage_Keyboard3 = 0x20, /* 3 or # */
+ kHIDUsage_Keyboard4 = 0x21, /* 4 or $ */
+ kHIDUsage_Keyboard5 = 0x22, /* 5 or % */
+ kHIDUsage_Keyboard6 = 0x23, /* 6 or ^ */
+ kHIDUsage_Keyboard7 = 0x24, /* 7 or & */
+ kHIDUsage_Keyboard8 = 0x25, /* 8 or * */
+ kHIDUsage_Keyboard9 = 0x26, /* 9 or ( */
+ kHIDUsage_Keyboard0 = 0x27, /* 0 or ) */
+ kHIDUsage_KeyboardReturnOrEnter = 0x28, /* Return (Enter) */
+ kHIDUsage_KeyboardEscape = 0x29, /* Escape */
+ kHIDUsage_KeyboardDeleteOrBackspace = 0x2A, /* Delete (Backspace) */
+ kHIDUsage_KeyboardTab = 0x2B, /* Tab */
+ kHIDUsage_KeyboardSpacebar = 0x2C, /* Spacebar */
+ kHIDUsage_KeyboardHyphen = 0x2D, /* - or _ */
+ kHIDUsage_KeyboardEqualSign = 0x2E, /* = or + */
+ kHIDUsage_KeyboardOpenBracket = 0x2F, /* [ or { */
+ kHIDUsage_KeyboardCloseBracket = 0x30, /* ] or } */
+ kHIDUsage_KeyboardBackslash = 0x31, /* \ or | */
+ kHIDUsage_KeyboardNonUSPound = 0x32, /* Non-US # or _ */
+ kHIDUsage_KeyboardSemicolon = 0x33, /* ; or : */
+ kHIDUsage_KeyboardQuote = 0x34, /* ' or " */
+ kHIDUsage_KeyboardGraveAccentAndTilde = 0x35, /* Grave Accent and Tilde */
+ kHIDUsage_KeyboardComma = 0x36, /* , or < */
+ kHIDUsage_KeyboardPeriod = 0x37, /* . or > */
+ kHIDUsage_KeyboardSlash = 0x38, /* / or ? */
+ kHIDUsage_KeyboardCapsLock = 0x39, /* Caps Lock */
+ kHIDUsage_KeyboardF1 = 0x3A, /* F1 */
+ kHIDUsage_KeyboardF2 = 0x3B, /* F2 */
+ kHIDUsage_KeyboardF3 = 0x3C, /* F3 */
+ kHIDUsage_KeyboardF4 = 0x3D, /* F4 */
+ kHIDUsage_KeyboardF5 = 0x3E, /* F5 */
+ kHIDUsage_KeyboardF6 = 0x3F, /* F6 */
+ kHIDUsage_KeyboardF7 = 0x40, /* F7 */
+ kHIDUsage_KeyboardF8 = 0x41, /* F8 */
+ kHIDUsage_KeyboardF9 = 0x42, /* F9 */
+ kHIDUsage_KeyboardF10 = 0x43, /* F10 */
+ kHIDUsage_KeyboardF11 = 0x44, /* F11 */
+ kHIDUsage_KeyboardF12 = 0x45, /* F12 */
+ kHIDUsage_KeyboardPrintScreen = 0x46, /* Print Screen */
+ kHIDUsage_KeyboardScrollLock = 0x47, /* Scroll Lock */
+ kHIDUsage_KeyboardPause = 0x48, /* Pause */
+ kHIDUsage_KeyboardInsert = 0x49, /* Insert */
+ kHIDUsage_KeyboardHome = 0x4A, /* Home */
+ kHIDUsage_KeyboardPageUp = 0x4B, /* Page Up */
+ kHIDUsage_KeyboardDeleteForward = 0x4C, /* Delete Forward */
+ kHIDUsage_KeyboardEnd = 0x4D, /* End */
+ kHIDUsage_KeyboardPageDown = 0x4E, /* Page Down */
+ kHIDUsage_KeyboardRightArrow = 0x4F, /* Right Arrow */
+ kHIDUsage_KeyboardLeftArrow = 0x50, /* Left Arrow */
+ kHIDUsage_KeyboardDownArrow = 0x51, /* Down Arrow */
+ kHIDUsage_KeyboardUpArrow = 0x52, /* Up Arrow */
+ kHIDUsage_KeypadNumLock = 0x53, /* Keypad NumLock or Clear */
+ kHIDUsage_KeypadSlash = 0x54, /* Keypad / */
+ kHIDUsage_KeypadAsterisk = 0x55, /* Keypad * */
+ kHIDUsage_KeypadHyphen = 0x56, /* Keypad - */
+ kHIDUsage_KeypadPlus = 0x57, /* Keypad + */
+ kHIDUsage_KeypadEnter = 0x58, /* Keypad Enter */
+ kHIDUsage_Keypad1 = 0x59, /* Keypad 1 or End */
+ kHIDUsage_Keypad2 = 0x5A, /* Keypad 2 or Down Arrow */
+ kHIDUsage_Keypad3 = 0x5B, /* Keypad 3 or Page Down */
+ kHIDUsage_Keypad4 = 0x5C, /* Keypad 4 or Left Arrow */
+ kHIDUsage_Keypad5 = 0x5D, /* Keypad 5 */
+ kHIDUsage_Keypad6 = 0x5E, /* Keypad 6 or Right Arrow */
+ kHIDUsage_Keypad7 = 0x5F, /* Keypad 7 or Home */
+ kHIDUsage_Keypad8 = 0x60, /* Keypad 8 or Up Arrow */
+ kHIDUsage_Keypad9 = 0x61, /* Keypad 9 or Page Up */
+ kHIDUsage_Keypad0 = 0x62, /* Keypad 0 or Insert */
+ kHIDUsage_KeypadPeriod = 0x63, /* Keypad . or Delete */
+ kHIDUsage_KeyboardNonUSBackslash = 0x64, /* Non-US \ or | */
+ kHIDUsage_KeyboardApplication = 0x65, /* Application */
+ kHIDUsage_KeyboardPower = 0x66, /* Power */
+ kHIDUsage_KeypadEqualSign = 0x67, /* Keypad = */
+ kHIDUsage_KeyboardF13 = 0x68, /* F13 */
+ kHIDUsage_KeyboardF14 = 0x69, /* F14 */
+ kHIDUsage_KeyboardF15 = 0x6A, /* F15 */
+ kHIDUsage_KeyboardF16 = 0x6B, /* F16 */
+ kHIDUsage_KeyboardF17 = 0x6C, /* F17 */
+ kHIDUsage_KeyboardF18 = 0x6D, /* F18 */
+ kHIDUsage_KeyboardF19 = 0x6E, /* F19 */
+ kHIDUsage_KeyboardF20 = 0x6F, /* F20 */
+ kHIDUsage_KeyboardF21 = 0x70, /* F21 */
+ kHIDUsage_KeyboardF22 = 0x71, /* F22 */
+ kHIDUsage_KeyboardF23 = 0x72, /* F23 */
+ kHIDUsage_KeyboardF24 = 0x73, /* F24 */
+ kHIDUsage_KeyboardExecute = 0x74, /* Execute */
+ kHIDUsage_KeyboardHelp = 0x75, /* Help */
+ kHIDUsage_KeyboardMenu = 0x76, /* Menu */
+ kHIDUsage_KeyboardSelect = 0x77, /* Select */
+ kHIDUsage_KeyboardStop = 0x78, /* Stop */
+ kHIDUsage_KeyboardAgain = 0x79, /* Again */
+ kHIDUsage_KeyboardUndo = 0x7A, /* Undo */
+ kHIDUsage_KeyboardCut = 0x7B, /* Cut */
+ kHIDUsage_KeyboardCopy = 0x7C, /* Copy */
+ kHIDUsage_KeyboardPaste = 0x7D, /* Paste */
+ kHIDUsage_KeyboardFind = 0x7E, /* Find */
+ kHIDUsage_KeyboardMute = 0x7F, /* Mute */
+ kHIDUsage_KeyboardVolumeUp = 0x80, /* Volume Up */
+ kHIDUsage_KeyboardVolumeDown = 0x81, /* Volume Down */
+ kHIDUsage_KeyboardLockingCapsLock = 0x82, /* Locking Caps Lock */
+ kHIDUsage_KeyboardLockingNumLock = 0x83, /* Locking Num Lock */
+ kHIDUsage_KeyboardLockingScrollLock = 0x84, /* Locking Scroll Lock */
+ kHIDUsage_KeypadComma = 0x85, /* Keypad Comma */
+ kHIDUsage_KeypadEqualSignAS400 = 0x86, /* Keypad Equal Sign for AS/400 */
+ kHIDUsage_KeyboardInternational1 = 0x87, /* International1 */
+ kHIDUsage_KeyboardInternational2 = 0x88, /* International2 */
+ kHIDUsage_KeyboardInternational3 = 0x89, /* International3 */
+ kHIDUsage_KeyboardInternational4 = 0x8A, /* International4 */
+ kHIDUsage_KeyboardInternational5 = 0x8B, /* International5 */
+ kHIDUsage_KeyboardInternational6 = 0x8C, /* International6 */
+ kHIDUsage_KeyboardInternational7 = 0x8D, /* International7 */
+ kHIDUsage_KeyboardInternational8 = 0x8E, /* International8 */
+ kHIDUsage_KeyboardInternational9 = 0x8F, /* International9 */
+ kHIDUsage_KeyboardLANG1 = 0x90, /* LANG1 */
+ kHIDUsage_KeyboardLANG2 = 0x91, /* LANG2 */
+ kHIDUsage_KeyboardLANG3 = 0x92, /* LANG3 */
+ kHIDUsage_KeyboardLANG4 = 0x93, /* LANG4 */
+ kHIDUsage_KeyboardLANG5 = 0x94, /* LANG5 */
+ kHIDUsage_KeyboardLANG6 = 0x95, /* LANG6 */
+ kHIDUsage_KeyboardLANG7 = 0x96, /* LANG7 */
+ kHIDUsage_KeyboardLANG8 = 0x97, /* LANG8 */
+ kHIDUsage_KeyboardLANG9 = 0x98, /* LANG9 */
+ kHIDUsage_KeyboardAlternateErase = 0x99, /* AlternateErase */
+ kHIDUsage_KeyboardSysReqOrAttention = 0x9A, /* SysReq/Attention */
+ kHIDUsage_KeyboardCancel = 0x9B, /* Cancel */
+ kHIDUsage_KeyboardClear = 0x9C, /* Clear */
+ kHIDUsage_KeyboardPrior = 0x9D, /* Prior */
+ kHIDUsage_KeyboardReturn = 0x9E, /* Return */
+ kHIDUsage_KeyboardSeparator = 0x9F, /* Separator */
+ kHIDUsage_KeyboardOut = 0xA0, /* Out */
+ kHIDUsage_KeyboardOper = 0xA1, /* Oper */
+ kHIDUsage_KeyboardClearOrAgain = 0xA2, /* Clear/Again */
+ kHIDUsage_KeyboardCrSelOrProps = 0xA3, /* CrSel/Props */
+ kHIDUsage_KeyboardExSel = 0xA4, /* ExSel */
+ /* 0xA5-0xDF Reserved */
+ kHIDUsage_KeyboardLeftControl = 0xE0, /* Left Control */
+ kHIDUsage_KeyboardLeftShift = 0xE1, /* Left Shift */
+ kHIDUsage_KeyboardLeftAlt = 0xE2, /* Left Alt */
+ kHIDUsage_KeyboardLeftGUI = 0xE3, /* Left GUI */
+ kHIDUsage_KeyboardRightControl = 0xE4, /* Right Control */
+ kHIDUsage_KeyboardRightShift = 0xE5, /* Right Shift */
+ kHIDUsage_KeyboardRightAlt = 0xE6, /* Right Alt */
+ kHIDUsage_KeyboardRightGUI = 0xE7, /* Right GUI */
+ /* 0xE8-0xFFFF Reserved */
+ kHIDUsage_Keyboard_Reserved = 0xFFFF
+};
+
+/* LEDs Page (0x08) */
+/* An LED or indicator is implemented as an On/Off Control (OOF) using the "Single button toggle" mode,
+|* where a value of 1 will turn on the indicator, and a value of 0 will turn it off. The exceptions are described below. */
+enum {
+ kHIDUsage_LED_NumLock = 0x01, /* On/Off Control */
+ kHIDUsage_LED_CapsLock = 0x02, /* On/Off Control */
+ kHIDUsage_LED_ScrollLock = 0x03, /* On/Off Control */
+ kHIDUsage_LED_Compose = 0x04, /* On/Off Control */
+ kHIDUsage_LED_Kana = 0x05, /* On/Off Control */
+ kHIDUsage_LED_Power = 0x06, /* On/Off Control */
+ kHIDUsage_LED_Shift = 0x07, /* On/Off Control */
+ kHIDUsage_LED_DoNotDisturb = 0x08, /* On/Off Control */
+ kHIDUsage_LED_Mute = 0x09, /* On/Off Control */
+ kHIDUsage_LED_ToneEnable = 0x0A, /* On/Off Control */
+ kHIDUsage_LED_HighCutFilter = 0x0B, /* On/Off Control */
+ kHIDUsage_LED_LowCutFilter = 0x0C, /* On/Off Control */
+ kHIDUsage_LED_EqualizerEnable = 0x0D, /* On/Off Control */
+ kHIDUsage_LED_SoundFieldOn = 0x0E, /* On/Off Control */
+ kHIDUsage_LED_SurroundOn = 0x0F, /* On/Off Control */
+ kHIDUsage_LED_Repeat = 0x10, /* On/Off Control */
+ kHIDUsage_LED_Stereo = 0x11, /* On/Off Control */
+ kHIDUsage_LED_SamplingRateDetect = 0x12, /* On/Off Control */
+ kHIDUsage_LED_Spinning = 0x13, /* On/Off Control */
+ kHIDUsage_LED_CAV = 0x14, /* On/Off Control */
+ kHIDUsage_LED_CLV = 0x15, /* On/Off Control */
+ kHIDUsage_LED_RecordingFormatDetect = 0x16, /* On/Off Control */
+ kHIDUsage_LED_OffHook = 0x17, /* On/Off Control */
+ kHIDUsage_LED_Ring = 0x18, /* On/Off Control */
+ kHIDUsage_LED_MessageWaiting = 0x19, /* On/Off Control */
+ kHIDUsage_LED_DataMode = 0x1A, /* On/Off Control */
+ kHIDUsage_LED_BatteryOperation = 0x1B, /* On/Off Control */
+ kHIDUsage_LED_BatteryOK = 0x1C, /* On/Off Control */
+ kHIDUsage_LED_BatteryLow = 0x1D, /* On/Off Control */
+ kHIDUsage_LED_Speaker = 0x1E, /* On/Off Control */
+ kHIDUsage_LED_HeadSet = 0x1F, /* On/Off Control */
+ kHIDUsage_LED_Hold = 0x20, /* On/Off Control */
+ kHIDUsage_LED_Microphone = 0x21, /* On/Off Control */
+ kHIDUsage_LED_Coverage = 0x22, /* On/Off Control */
+ kHIDUsage_LED_NightMode = 0x23, /* On/Off Control */
+ kHIDUsage_LED_SendCalls = 0x24, /* On/Off Control */
+ kHIDUsage_LED_CallPickup = 0x25, /* On/Off Control */
+ kHIDUsage_LED_Conference = 0x26, /* On/Off Control */
+ kHIDUsage_LED_StandBy = 0x27, /* On/Off Control */
+ kHIDUsage_LED_CameraOn = 0x28, /* On/Off Control */
+ kHIDUsage_LED_CameraOff = 0x29, /* On/Off Control */
+ kHIDUsage_LED_OnLine = 0x2A, /* On/Off Control */
+ kHIDUsage_LED_OffLine = 0x2B, /* On/Off Control */
+ kHIDUsage_LED_Busy = 0x2C, /* On/Off Control */
+ kHIDUsage_LED_Ready = 0x2D, /* On/Off Control */
+ kHIDUsage_LED_PaperOut = 0x2E, /* On/Off Control */
+ kHIDUsage_LED_PaperJam = 0x2F, /* On/Off Control */
+ kHIDUsage_LED_Remote = 0x30, /* On/Off Control */
+ kHIDUsage_LED_Forward = 0x31, /* On/Off Control */
+ kHIDUsage_LED_Reverse = 0x32, /* On/Off Control */
+ kHIDUsage_LED_Stop = 0x33, /* On/Off Control */
+ kHIDUsage_LED_Rewind = 0x34, /* On/Off Control */
+ kHIDUsage_LED_FastForward = 0x35, /* On/Off Control */
+ kHIDUsage_LED_Play = 0x36, /* On/Off Control */
+ kHIDUsage_LED_Pause = 0x37, /* On/Off Control */
+ kHIDUsage_LED_Record = 0x38, /* On/Off Control */
+ kHIDUsage_LED_Error = 0x39, /* On/Off Control */
+ kHIDUsage_LED_Usage = 0x3A, /* Selector */
+ kHIDUsage_LED_UsageInUseIndicator = 0x3B, /* Usage Switch */
+ kHIDUsage_LED_UsageMultiModeIndicator = 0x3C, /* Usage Modifier */
+ kHIDUsage_LED_IndicatorOn = 0x3D, /* Selector */
+ kHIDUsage_LED_IndicatorFlash = 0x3E, /* Selector */
+ kHIDUsage_LED_IndicatorSlowBlink = 0x3F, /* Selector */
+ kHIDUsage_LED_IndicatorFastBlink = 0x40, /* Selector */
+ kHIDUsage_LED_IndicatorOff = 0x41, /* Selector */
+ kHIDUsage_LED_FlashOnTime = 0x42, /* Dynamic Value */
+ kHIDUsage_LED_SlowBlinkOnTime = 0x43, /* Dynamic Value */
+ kHIDUsage_LED_SlowBlinkOffTime = 0x44, /* Dynamic Value */
+ kHIDUsage_LED_FastBlinkOnTime = 0x45, /* Dynamic Value */
+ kHIDUsage_LED_FastBlinkOffTime = 0x46, /* Dynamic Value */
+ kHIDUsage_LED_UsageIndicatorColor = 0x47, /* Usage Modifier */
+ kHIDUsage_LED_IndicatorRed = 0x48, /* Selector */
+ kHIDUsage_LED_IndicatorGreen = 0x49, /* Selector */
+ kHIDUsage_LED_IndicatorAmber = 0x4A, /* Selector */
+ kHIDUsage_LED_GenericIndicator = 0x4B, /* On/Off Control */
+ kHIDUsage_LED_SystemSuspend = 0x4C, /* On/Off Control */
+ kHIDUsage_LED_ExternalPowerConnected = 0x4D, /* On/Off Control */
+ /* 0x4E - 0xFFFF Reserved */
+ kHIDUsage_LED_Reserved = 0xFFFF
+};
+
+/* Button Page (0x09) */
+/* The Button page is the first place an application should look for user selection controls. System graphical user */
+/* interfaces typically employ a pointer and a set of hierarchical selectors to select, move and otherwise manipulate */
+/* their environment. For these purposes the following assignment of significance can be applied to the Button usages: */
+/* o Button 1, Primary Button. Used for object selecting, dragging, and double click activation. On MacOS, this is the
+|* only button. Microsoft operating systems call this a logical left button, because it */
+/* is not necessarily physically located on the left of the pointing device. */
+/* o Button 2, Secondary Button. Used by newer graphical user interfaces to browse object properties. Exposed by systems */
+/* to applications that typically assign application-specific functionality. */
+/* o Button 3, Tertiary Button. Optional control. Exposed to applications, but seldom assigned functionality due to prevalence */
+/* of two- and one-button devices. */
+/* o Buttons 4 -55. As the button number increases, its significance as a selector decreases. */
+/* In many ways the assignment of button numbers is similar to the assignment of Effort in Physical descriptors. */
+/* Button 1 would be used to define the button a finger rests on when the hand is in the "at rest" position, that is, virtually */
+/* no effort is required by the user to activate the button. Button values increment as the finger has to stretch to reach a */
+/* control. See Section 6.2.3, "Physical Descriptors," in the HID Specification for methods of further qualifying buttons. */
+enum {
+ kHIDUsage_Button_1 = 0x01, /* (primary/trigger) */
+ kHIDUsage_Button_2 = 0x02, /* (secondary) */
+ kHIDUsage_Button_3 = 0x03, /* (tertiary) */
+ kHIDUsage_Button_4 = 0x04, /* 4th button */
+ /* ... */
+ kHIDUsage_Button_65535 = 0xFFFF
+};
+
+/* Ordinal Page (0x0A) */
+/* The Ordinal page allows multiple instances of a control or sets of controls to be declared without requiring individual */
+/* enumeration in the native usage page. For example, it is not necessary to declare usages of Pointer 1, Pointer 2, and so */
+/* forth on the Generic Desktop page. When parsed, the ordinal instance number is, in essence, concatenated to the usages */
+/* attached to the encompassing collection to create Pointer 1, Pointer 2, and so forth. */
+/* For an example, see Section A.5, "Multiple Instances of a Control," in Appendix A, "Usage Examples." By convention, */
+/* an Ordinal collection is placed inside the collection for which it is declaring multiple instances. */
+/* Instances do not have to be identical. */
+enum {
+ /* 0x00 Reserved */
+ kHIDUsage_Ord_Instance1 = 0x01, /* Usage Modifier */
+ kHIDUsage_Ord_Instance2 = 0x02, /* Usage Modifier */
+ kHIDUsage_Ord_Instance3 = 0x03, /* Usage Modifier */
+ kHIDUsage_Ord_Instance4 = 0x04, /* Usage Modifier */
+ kHIDUsage_Ord_Instance65535 = 0xFFFF /* Usage Modifier */
+};
+
+/* Telephony Page (0x0B) */
+/* This usage page defines the keytop and control usages for telephony devices. */
+/* Indicators on a phone are handled by wrapping them in LED: Usage In Use Indicator and LED: Usage Selected Indicator */
+/* usages. For example, a message-indicator LED would be identified by a Telephony: Message usage declared as a Feature */
+/* or Output in a LED: Usage In Use Indicator collection. */
+/* See Section 14, "Consumer Page (0x0C)," for audio volume and tone controls. */
+enum {
+ kHIDUsage_Tfon_Phone = 0x01, /* Application Collection */
+ kHIDUsage_Tfon_AnsweringMachine = 0x02, /* Application Collection */
+ kHIDUsage_Tfon_MessageControls = 0x03, /* Logical Collection */
+ kHIDUsage_Tfon_Handset = 0x04, /* Logical Collection */
+ kHIDUsage_Tfon_Headset = 0x05, /* Logical Collection */
+ kHIDUsage_Tfon_TelephonyKeyPad = 0x06, /* Named Array */
+ kHIDUsage_Tfon_ProgrammableButton = 0x07, /* Named Array */
+ /* 0x08 - 0x1F Reserved */
+ kHIDUsage_Tfon_HookSwitch = 0x20, /* On/Off Control */
+ kHIDUsage_Tfon_Flash = 0x21, /* Momentary Control */
+ kHIDUsage_Tfon_Feature = 0x22, /* One-Shot Control */
+ kHIDUsage_Tfon_Hold = 0x23, /* On/Off Control */
+ kHIDUsage_Tfon_Redial = 0x24, /* One-Shot Control */
+ kHIDUsage_Tfon_Transfer = 0x25, /* One-Shot Control */
+ kHIDUsage_Tfon_Drop = 0x26, /* One-Shot Control */
+ kHIDUsage_Tfon_Park = 0x27, /* On/Off Control */
+ kHIDUsage_Tfon_ForwardCalls = 0x28, /* On/Off Control */
+ kHIDUsage_Tfon_AlternateFunction = 0x29, /* Momentary Control */
+ kHIDUsage_Tfon_Line = 0x2A, /* One-Shot Control */
+ kHIDUsage_Tfon_SpeakerPhone = 0x2B, /* On/Off Control */
+ kHIDUsage_Tfon_Conference = 0x2C, /* On/Off Control */
+ kHIDUsage_Tfon_RingEnable = 0x2D, /* On/Off Control */
+ kHIDUsage_Tfon_Ring = 0x2E, /* Selector */
+ kHIDUsage_Tfon_PhoneMute = 0x2F, /* On/Off Control */
+ kHIDUsage_Tfon_CallerID = 0x30, /* Momentary Control */
+ /* 0x31 - 0x4F Reserved */
+ kHIDUsage_Tfon_SpeedDial = 0x50, /* One-Shot Control */
+ kHIDUsage_Tfon_StoreNumber = 0x51, /* One-Shot Control */
+ kHIDUsage_Tfon_RecallNumber = 0x52, /* One-Shot Control */
+ kHIDUsage_Tfon_PhoneDirectory = 0x53, /* On/Off Control */
+ /* 0x54 - 0x6F Reserved */
+ kHIDUsage_Tfon_VoiceMail = 0x70, /* On/Off Control */
+ kHIDUsage_Tfon_ScreenCalls = 0x71, /* On/Off Control */
+ kHIDUsage_Tfon_DoNotDisturb = 0x72, /* On/Off Control */
+ kHIDUsage_Tfon_Message = 0x73, /* One-Shot Control */
+ kHIDUsage_Tfon_AnswerOnOrOff = 0x74, /* On/Off Control */
+ /* 0x75 - 0x8F Reserved */
+ kHIDUsage_Tfon_InsideDialTone = 0x90, /* Momentary Control */
+ kHIDUsage_Tfon_OutsideDialTone = 0x91, /* Momentary Control */
+ kHIDUsage_Tfon_InsideRingTone = 0x92, /* Momentary Control */
+ kHIDUsage_Tfon_OutsideRingTone = 0x93, /* Momentary Control */
+ kHIDUsage_Tfon_PriorityRingTone = 0x94, /* Momentary Control */
+ kHIDUsage_Tfon_InsideRingback = 0x95, /* Momentary Control */
+ kHIDUsage_Tfon_PriorityRingback = 0x96, /* Momentary Control */
+ kHIDUsage_Tfon_LineBusyTone = 0x97, /* Momentary Control */
+ kHIDUsage_Tfon_ReorderTone = 0x98, /* Momentary Control */
+ kHIDUsage_Tfon_CallWaitingTone = 0x99, /* Momentary Control */
+ kHIDUsage_Tfon_ConfirmationTone1 = 0x9A, /* Momentary Control */
+ kHIDUsage_Tfon_ConfirmationTone2 = 0x9B, /* Momentary Control */
+ kHIDUsage_Tfon_TonesOff = 0x9C, /* On/Off Control */
+ kHIDUsage_Tfon_OutsideRingback = 0x9D, /* Momentary Control */
+ /* 0x9E - 0xAF Reserved */
+ kHIDUsage_Tfon_PhoneKey0 = 0xB0, /* Selector/One-Shot Control */
+ kHIDUsage_Tfon_PhoneKey1 = 0xB1, /* Selector/One-Shot Control */
+ kHIDUsage_Tfon_PhoneKey2 = 0xB2, /* Selector/One-Shot Control */
+ kHIDUsage_Tfon_PhoneKey3 = 0xB3, /* Selector/One-Shot Control */
+ kHIDUsage_Tfon_PhoneKey4 = 0xB4, /* Selector/One-Shot Control */
+ kHIDUsage_Tfon_PhoneKey5 = 0xB5, /* Selector/One-Shot Control */
+ kHIDUsage_Tfon_PhoneKey6 = 0xB6, /* Selector/One-Shot Control */
+ kHIDUsage_Tfon_PhoneKey7 = 0xB7, /* Selector/One-Shot Control */
+ kHIDUsage_Tfon_PhoneKey8 = 0xB8, /* Selector/One-Shot Control */
+ kHIDUsage_Tfon_PhoneKey9 = 0xB9, /* Selector/One-Shot Control */
+ kHIDUsage_Tfon_PhoneKeyStar = 0xBA, /* Selector/One-Shot Control */
+ kHIDUsage_Tfon_PhoneKeyPound = 0xBB, /* Selector/One-Shot Control */
+ kHIDUsage_Tfon_PhoneKeyA = 0xBC, /* Selector/One-Shot Control */
+ kHIDUsage_Tfon_PhoneKeyB = 0xBD, /* Selector/One-Shot Control */
+ kHIDUsage_Tfon_PhoneKeyC = 0xBE, /* Selector/One-Shot Control */
+ kHIDUsage_Tfon_PhoneKeyD = 0xBF, /* Selector/One-Shot Control */
+ /* 0xC0 - 0xFFFF Reserved */
+ kHIDUsage_TFon_Reserved = 0xFFFF
+};
+
+/* Consumer Page (0x0C) */
+/* All controls on the Consumer page are application-specific. That is, they affect a specific device, not the system as a whole. */
+enum {
+ kHIDUsage_Csmr_ConsumerControl = 0x01, /* Application Collection */
+ kHIDUsage_Csmr_NumericKeyPad = 0x02, /* Named Array */
+ kHIDUsage_Csmr_ProgrammableButtons = 0x03, /* Named Array */
+ /* 0x03 - 0x1F Reserved */
+ kHIDUsage_Csmr_Plus10 = 0x20, /* One-Shot Control */
+ kHIDUsage_Csmr_Plus100 = 0x21, /* One-Shot Control */
+ kHIDUsage_Csmr_AMOrPM = 0x22, /* One-Shot Control */
+ /* 0x23 - 0x3F Reserved */
+ kHIDUsage_Csmr_Power = 0x30, /* On/Off Control */
+ kHIDUsage_Csmr_Reset = 0x31, /* One-Shot Control */
+ kHIDUsage_Csmr_Sleep = 0x32, /* One-Shot Control */
+ kHIDUsage_Csmr_SleepAfter = 0x33, /* One-Shot Control */
+ kHIDUsage_Csmr_SleepMode = 0x34, /* Re-Trigger Control */
+ kHIDUsage_Csmr_Illumination = 0x35, /* On/Off Control */
+ kHIDUsage_Csmr_FunctionButtons = 0x36, /* Named Array */
+ /* 0x37 - 0x3F Reserved */
+ kHIDUsage_Csmr_Menu = 0x40, /* On/Off Control */
+ kHIDUsage_Csmr_MenuPick = 0x41, /* One-Shot Control */
+ kHIDUsage_Csmr_MenuUp = 0x42, /* One-Shot Control */
+ kHIDUsage_Csmr_MenuDown = 0x43, /* One-Shot Control */
+ kHIDUsage_Csmr_MenuLeft = 0x44, /* One-Shot Control */
+ kHIDUsage_Csmr_MenuRight = 0x45, /* One-Shot Control */
+ kHIDUsage_Csmr_MenuEscape = 0x46, /* One-Shot Control */
+ kHIDUsage_Csmr_MenuValueIncrease = 0x47, /* One-Shot Control */
+ kHIDUsage_Csmr_MenuValueDecrease = 0x48, /* One-Shot Control */
+ /* 0x49 - 0x5F Reserved */
+ kHIDUsage_Csmr_DataOnScreen = 0x60, /* On/Off Control */
+ kHIDUsage_Csmr_ClosedCaption = 0x61, /* On/Off Control */
+ kHIDUsage_Csmr_ClosedCaptionSelect = 0x62, /* Selector */
+ kHIDUsage_Csmr_VCROrTV = 0x63, /* On/Off Control */
+ kHIDUsage_Csmr_BroadcastMode = 0x64, /* One-Shot Control */
+ kHIDUsage_Csmr_Snapshot = 0x65, /* One-Shot Control */
+ kHIDUsage_Csmr_Still = 0x66, /* One-Shot Control */
+ /* 0x67 - 0x7F Reserved */
+ kHIDUsage_Csmr_Selection = 0x80, /* Named Array */
+ kHIDUsage_Csmr_Assign = 0x81, /* Selector */
+ kHIDUsage_Csmr_ModeStep = 0x82, /* One-Shot Control */
+ kHIDUsage_Csmr_RecallLast = 0x83, /* One-Shot Control */
+ kHIDUsage_Csmr_EnterChannel = 0x84, /* One-Shot Control */
+ kHIDUsage_Csmr_OrderMovie = 0x85, /* One-Shot Control */
+ kHIDUsage_Csmr_Channel = 0x86, /* Linear Control */
+ kHIDUsage_Csmr_MediaSelection = 0x87, /* Selector */
+ kHIDUsage_Csmr_MediaSelectComputer = 0x88, /* Selector */
+ kHIDUsage_Csmr_MediaSelectTV = 0x89, /* Selector */
+ kHIDUsage_Csmr_MediaSelectWWW = 0x8A, /* Selector */
+ kHIDUsage_Csmr_MediaSelectDVD = 0x8B, /* Selector */
+ kHIDUsage_Csmr_MediaSelectTelephone = 0x8C, /* Selector */
+ kHIDUsage_Csmr_MediaSelectProgramGuide = 0x8D, /* Selector */
+ kHIDUsage_Csmr_MediaSelectVideoPhone = 0x8E, /* Selector */
+ kHIDUsage_Csmr_MediaSelectGames = 0x8F, /* Selector */
+ kHIDUsage_Csmr_MediaSelectMessages = 0x90, /* Selector */
+ kHIDUsage_Csmr_MediaSelectCD = 0x91, /* Selector */
+ kHIDUsage_Csmr_MediaSelectVCR = 0x92, /* Selector */
+ kHIDUsage_Csmr_MediaSelectTuner = 0x93, /* Selector */
+ kHIDUsage_Csmr_Quit = 0x94, /* One-Shot Control */
+ kHIDUsage_Csmr_Help = 0x95, /* On/Off Control */
+ kHIDUsage_Csmr_MediaSelectTape = 0x96, /* Selector */
+ kHIDUsage_Csmr_MediaSelectCable = 0x97, /* Selector */
+ kHIDUsage_Csmr_MediaSelectSatellite = 0x98, /* Selector */
+ kHIDUsage_Csmr_MediaSelectSecurity = 0x99, /* Selector */
+ kHIDUsage_Csmr_MediaSelectHome = 0x9A, /* Selector */
+ kHIDUsage_Csmr_MediaSelectCall = 0x9B, /* Selector */
+ kHIDUsage_Csmr_ChannelIncrement = 0x9C, /* One-Shot Control */
+ kHIDUsage_Csmr_ChannelDecrement = 0x9D, /* One-Shot Control */
+ kHIDUsage_Csmr_Media = 0x9E, /* Selector */
+ /* 0x9F Reserved */
+ kHIDUsage_Csmr_VCRPlus = 0xA0, /* One-Shot Control */
+ kHIDUsage_Csmr_Once = 0xA1, /* One-Shot Control */
+ kHIDUsage_Csmr_Daily = 0xA2, /* One-Shot Control */
+ kHIDUsage_Csmr_Weekly = 0xA3, /* One-Shot Control */
+ kHIDUsage_Csmr_Monthly = 0xA4, /* One-Shot Control */
+ /* 0xA5 - 0xAF Reserved */
+ kHIDUsage_Csmr_Play = 0xB0, /* On/Off Control */
+ kHIDUsage_Csmr_Pause = 0xB1, /* On/Off Control */
+ kHIDUsage_Csmr_Record = 0xB2, /* On/Off Control */
+ kHIDUsage_Csmr_FastForward = 0xB3, /* On/Off Control */
+ kHIDUsage_Csmr_Rewind = 0xB4, /* On/Off Control */
+ kHIDUsage_Csmr_ScanNextTrack = 0xB5, /* One-Shot Control */
+ kHIDUsage_Csmr_ScanPreviousTrack = 0xB6, /* One-Shot Control */
+ kHIDUsage_Csmr_Stop = 0xB7, /* One-Shot Control */
+ kHIDUsage_Csmr_Eject = 0xB8, /* One-Shot Control */
+ kHIDUsage_Csmr_RandomPlay = 0xB9, /* On/Off Control */
+ kHIDUsage_Csmr_SelectDisc = 0xBA, /* Named Array */
+ kHIDUsage_Csmr_EnterDisc = 0xBB, /* Momentary Control */
+ kHIDUsage_Csmr_Repeat = 0xBC, /* One-Shot Control */
+ kHIDUsage_Csmr_Tracking = 0xBD, /* Linear Control */
+ kHIDUsage_Csmr_TrackNormal = 0xBE, /* One-Shot Control */
+ kHIDUsage_Csmr_SlowTracking = 0xBF, /* Linear Control */
+ kHIDUsage_Csmr_FrameForward = 0xC0, /* Re-Trigger Control */
+ kHIDUsage_Csmr_FrameBack = 0xC1, /* Re-Trigger Control */
+ kHIDUsage_Csmr_Mark = 0xC2, /* One-Shot Control */
+ kHIDUsage_Csmr_ClearMark = 0xC3, /* One-Shot Control */
+ kHIDUsage_Csmr_RepeatFromMark = 0xC4, /* On/Off Control */
+ kHIDUsage_Csmr_ReturnToMark = 0xC5, /* One-Shot Control */
+ kHIDUsage_Csmr_SearchMarkForward = 0xC6, /* One-Shot Control */
+ kHIDUsage_Csmr_SearchMarkBackwards = 0xC7, /* One-Shot Control */
+ kHIDUsage_Csmr_CounterReset = 0xC8, /* One-Shot Control */
+ kHIDUsage_Csmr_ShowCounter = 0xC9, /* One-Shot Control */
+ kHIDUsage_Csmr_TrackingIncrement = 0xCA, /* Re-Trigger Control */
+ kHIDUsage_Csmr_TrackingDecrement = 0xCB, /* Re-Trigger Control */
+ kHIDUsage_Csmr_StopOrEject = 0xCC, /* One-Shot Control */
+ kHIDUsage_Csmr_PlayOrPause = 0xCD, /* One-Shot Control */
+ kHIDUsage_Csmr_PlayOrSkip = 0xCE, /* One-Shot Control */
+ /* 0xCF - 0xDF Reserved */
+ kHIDUsage_Csmr_Volume = 0xE0, /* Linear Control */
+ kHIDUsage_Csmr_Balance = 0xE1, /* Linear Control */
+ kHIDUsage_Csmr_Mute = 0xE2, /* On/Off Control */
+ kHIDUsage_Csmr_Bass = 0xE3, /* Linear Control */
+ kHIDUsage_Csmr_Treble = 0xE4, /* Linear Control */
+ kHIDUsage_Csmr_BassBoost = 0xE5, /* On/Off Control */
+ kHIDUsage_Csmr_SurroundMode = 0xE6, /* One-Shot Control */
+ kHIDUsage_Csmr_Loudness = 0xE7, /* On/Off Control */
+ kHIDUsage_Csmr_MPX = 0xE8, /* On/Off Control */
+ kHIDUsage_Csmr_VolumeIncrement = 0xE9, /* Re-Trigger Control */
+ kHIDUsage_Csmr_VolumeDecrement = 0xEA, /* Re-Trigger Control */
+ /* 0xEB - 0xEF Reserved */
+ kHIDUsage_Csmr_Speed = 0xF0, /* Selector */
+ kHIDUsage_Csmr_PlaybackSpeed = 0xF1, /* Named Array */
+ kHIDUsage_Csmr_StandardPlay = 0xF2, /* Selector */
+ kHIDUsage_Csmr_LongPlay = 0xF3, /* Selector */
+ kHIDUsage_Csmr_ExtendedPlay = 0xF4, /* Selector */
+ kHIDUsage_Csmr_Slow = 0xF5, /* One-Shot Control */
+ /* 0xF6 - 0xFF Reserved */
+ kHIDUsage_Csmr_FanEnable = 0x0100, /* On/Off Control */
+ kHIDUsage_Csmr_FanSpeed = 0x0101, /* Linear Control */
+ kHIDUsage_Csmr_LightEnable = 0x0102, /* On/Off Control */
+ kHIDUsage_Csmr_LightIlluminationLevel = 0x0103, /* Linear Control */
+ kHIDUsage_Csmr_ClimateControlEnable = 0x0104, /* On/Off Control */
+ kHIDUsage_Csmr_RoomTemperature = 0x0105, /* Linear Control */
+ kHIDUsage_Csmr_SecurityEnable = 0x0106, /* On/Off Control */
+ kHIDUsage_Csmr_FireAlarm = 0x0107, /* One-Shot Control */
+ kHIDUsage_Csmr_PoliceAlarm = 0x0108, /* One-Shot Control */
+ /* 0x109 - 0x14F Reserved */
+ kHIDUsage_Csmr_BalanceRight = 0x0150, /* Re-Trigger Control */
+ kHIDUsage_Csmr_BalanceLeft = 0x0151, /* Re-Trigger Control */
+ kHIDUsage_Csmr_BassIncrement = 0x0152, /* Re-Trigger Control */
+ kHIDUsage_Csmr_BassDecrement = 0x0153, /* Re-Trigger Control */
+ kHIDUsage_Csmr_TrebleIncrement = 0x0154, /* Re-Trigger Control */
+ kHIDUsage_Csmr_TrebleDecrement = 0x0155, /* Re-Trigger Control */
+ /* 0x156 - 0x15F Reserved */
+ kHIDUsage_Csmr_SpeakerSystem = 0x0160, /* Logical Collection */
+ kHIDUsage_Csmr_ChannelLeft = 0x0161, /* Logical Collection */
+ kHIDUsage_Csmr_ChannelRight = 0x0162, /* Logical Collection */
+ kHIDUsage_Csmr_ChannelCenter = 0x0163, /* Logical Collection */
+ kHIDUsage_Csmr_ChannelFront = 0x0164, /* Logical Collection */
+ kHIDUsage_Csmr_ChannelCenterFront = 0x0165, /* Logical Collection */
+ kHIDUsage_Csmr_ChannelSide = 0x0166, /* Logical Collection */
+ kHIDUsage_Csmr_ChannelSurround = 0x0167, /* Logical Collection */
+ kHIDUsage_Csmr_ChannelLowFrequencyEnhancement = 0x0168, /* Logical Collection */
+ kHIDUsage_Csmr_ChannelTop = 0x0169, /* Logical Collection */
+ kHIDUsage_Csmr_ChannelUnknown = 0x016A, /* Logical Collection */
+ /* 0x16B - 0x16F Reserved */
+ kHIDUsage_Csmr_SubChannel = 0x0170, /* Linear Control */
+ kHIDUsage_Csmr_SubChannelIncrement = 0x0171, /* One-Shot Control */
+ kHIDUsage_Csmr_SubChannelDecrement = 0x0172, /* One-Shot Control */
+ kHIDUsage_Csmr_AlternateAudioIncrement = 0x0173, /* One-Shot Control */
+ kHIDUsage_Csmr_AlternateAudioDecrement = 0x0174, /* One-Shot Control */
+ /* 0x175 - 0x17F Reserved */
+ kHIDUsage_Csmr_ApplicationLaunchButtons = 0x0180, /* Named Array */
+ kHIDUsage_Csmr_ALLaunchButtonConfigurationTool = 0x0181, /* Selector */
+ kHIDUsage_Csmr_ALProgrammableButtonConfiguration = 0x0182, /* Selector */
+ kHIDUsage_Csmr_ALConsumerControlConfiguration = 0x0183, /* Selector */
+ kHIDUsage_Csmr_ALWordProcessor = 0x0184, /* Selector */
+ kHIDUsage_Csmr_ALTextEditor = 0x0185, /* Selector */
+ kHIDUsage_Csmr_ALSpreadsheet = 0x0186, /* Selector */
+ kHIDUsage_Csmr_ALGraphicsEditor = 0x0187, /* Selector */
+ kHIDUsage_Csmr_ALPresentationApp = 0x0188, /* Selector */
+ kHIDUsage_Csmr_ALDatabaseApp = 0x0189, /* Selector */
+ kHIDUsage_Csmr_ALEmailReader = 0x018A, /* Selector */
+ kHIDUsage_Csmr_ALNewsreader = 0x018B, /* Selector */
+ kHIDUsage_Csmr_ALVoicemail = 0x018C, /* Selector */
+ kHIDUsage_Csmr_ALContactsOrAddressBook = 0x018D, /* Selector */
+ kHIDUsage_Csmr_ALCalendarOrSchedule = 0x018E, /* Selector */
+ kHIDUsage_Csmr_ALTaskOrProjectManager = 0x018F, /* Selector */
+ kHIDUsage_Csmr_ALLogOrJournalOrTimecard = 0x0190, /* Selector */
+ kHIDUsage_Csmr_ALCheckbookOrFinance = 0x0191, /* Selector */
+ kHIDUsage_Csmr_ALCalculator = 0x0192, /* Selector */
+ kHIDUsage_Csmr_ALAOrVCaptureOrPlayback = 0x0193, /* Selector */
+ kHIDUsage_Csmr_ALLocalMachineBrowser = 0x0194, /* Selector */
+ kHIDUsage_Csmr_ALLANOrWANBrowser = 0x0195, /* Selector */
+ kHIDUsage_Csmr_ALInternetBrowser = 0x0196, /* Selector */
+ kHIDUsage_Csmr_ALRemoteNetworkingOrISPConnect = 0x0197, /* Selector */
+ kHIDUsage_Csmr_ALNetworkConference = 0x0198, /* Selector */
+ kHIDUsage_Csmr_ALNetworkChat = 0x0199, /* Selector */
+ kHIDUsage_Csmr_ALTelephonyOrDialer = 0x019A, /* Selector */
+ kHIDUsage_Csmr_ALLogon = 0x019B, /* Selector */
+ kHIDUsage_Csmr_ALLogoff = 0x019C, /* Selector */
+ kHIDUsage_Csmr_ALLogonOrLogoff = 0x019D, /* Selector */
+ kHIDUsage_Csmr_ALTerminalLockOrScreensaver = 0x019E, /* Selector */
+ kHIDUsage_Csmr_ALControlPanel = 0x019F, /* Selector */
+ kHIDUsage_Csmr_ALCommandLineProcessorOrRun = 0x01A0, /* Selector */
+ kHIDUsage_Csmr_ALProcessOrTaskManager = 0x01A1, /* Selector */
+ kHIDUsage_Csmr_AL = 0x01A2, /* Selector */
+ kHIDUsage_Csmr_ALNextTaskOrApplication = 0x0143, /* Selector */
+ kHIDUsage_Csmr_ALPreviousTaskOrApplication = 0x01A4, /* Selector */
+ kHIDUsage_Csmr_ALPreemptiveHaltTaskOrApplication = 0x01A5, /* Selector */
+ /* 0x1A6 - 0x1FF Reserved */
+ kHIDUsage_Csmr_GenericGUIApplicationControls = 0x0200, /* Named Array */
+ kHIDUsage_Csmr_ACNew = 0x0201, /* Selector */
+ kHIDUsage_Csmr_ACOpen = 0x0202, /* Selector */
+ kHIDUsage_Csmr_ACClose = 0x0203, /* Selector */
+ kHIDUsage_Csmr_ACExit = 0x0204, /* Selector */
+ kHIDUsage_Csmr_ACMaximize = 0x0205, /* Selector */
+ kHIDUsage_Csmr_ACMinimize = 0x0206, /* Selector */
+ kHIDUsage_Csmr_ACSave = 0x0207, /* Selector */
+ kHIDUsage_Csmr_ACPrint = 0x0208, /* Selector */
+ kHIDUsage_Csmr_ACProperties = 0x0209, /* Selector */
+ kHIDUsage_Csmr_ACUndo = 0x021A, /* Selector */
+ kHIDUsage_Csmr_ACCopy = 0x021B, /* Selector */
+ kHIDUsage_Csmr_ACCut = 0x021C, /* Selector */
+ kHIDUsage_Csmr_ACPaste = 0x021D, /* Selector */
+ kHIDUsage_Csmr_AC = 0x021E, /* Selector */
+ kHIDUsage_Csmr_ACFind = 0x021F, /* Selector */
+ kHIDUsage_Csmr_ACFindandReplace = 0x0220, /* Selector */
+ kHIDUsage_Csmr_ACSearch = 0x0221, /* Selector */
+ kHIDUsage_Csmr_ACGoTo = 0x0222, /* Selector */
+ kHIDUsage_Csmr_ACHome = 0x0223, /* Selector */
+ kHIDUsage_Csmr_ACBack = 0x0224, /* Selector */
+ kHIDUsage_Csmr_ACForward = 0x0225, /* Selector */
+ kHIDUsage_Csmr_ACStop = 0x0226, /* Selector */
+ kHIDUsage_Csmr_ACRefresh = 0x0227, /* Selector */
+ kHIDUsage_Csmr_ACPreviousLink = 0x0228, /* Selector */
+ kHIDUsage_Csmr_ACNextLink = 0x0229, /* Selector */
+ kHIDUsage_Csmr_ACBookmarks = 0x022A, /* Selector */
+ kHIDUsage_Csmr_ACHistory = 0x022B, /* Selector */
+ kHIDUsage_Csmr_ACSubscriptions = 0x022C, /* Selector */
+ kHIDUsage_Csmr_ACZoomIn = 0x022D, /* Selector */
+ kHIDUsage_Csmr_ACZoomOut = 0x022E, /* Selector */
+ kHIDUsage_Csmr_ACZoom = 0x022F, /* Selector */
+ kHIDUsage_Csmr_ACFullScreenView = 0x0230, /* Selector */
+ kHIDUsage_Csmr_ACNormalView = 0x0231, /* Selector */
+ kHIDUsage_Csmr_ACViewToggle = 0x0232, /* Selector */
+ kHIDUsage_Csmr_ACScrollUp = 0x0233, /* Selector */
+ kHIDUsage_Csmr_ACScrollDown = 0x0234, /* Selector */
+ kHIDUsage_Csmr_ACScroll = 0x0235, /* Selector */
+ kHIDUsage_Csmr_ACPanLeft = 0x0236, /* Selector */
+ kHIDUsage_Csmr_ACPanRight = 0x0237, /* Selector */
+ kHIDUsage_Csmr_ACPan = 0x0238, /* Selector */
+ kHIDUsage_Csmr_ACNewWindow = 0x0239, /* Selector */
+ kHIDUsage_Csmr_ACTileHorizontally = 0x023A, /* Selector */
+ kHIDUsage_Csmr_ACTileVertically = 0x023B, /* Selector */
+ kHIDUsage_Csmr_ACFormat = 0x023C, /* Selector */
+ /* 0x23D - 0xFFFF Reserved */
+ kHIDUsage_Csmr_Reserved = 0xFFFF
+};
+
+/* Digitizer Page (0x0D) */
+/* This section provides detailed descriptions of the usages employed by Digitizer Devices. */
+enum {
+ kHIDUsage_Dig_Digitizer = 0x01, /* Application Collection */
+ kHIDUsage_Dig_Pen = 0x02, /* Application Collection */
+ kHIDUsage_Dig_LightPen = 0x03, /* Application Collection */
+ kHIDUsage_Dig_TouchScreen = 0x04, /* Application Collection */
+ kHIDUsage_Dig_TouchPad = 0x05, /* Application Collection */
+ kHIDUsage_Dig_WhiteBoard = 0x06, /* Application Collection */
+ kHIDUsage_Dig_CoordinateMeasuringMachine = 0x07, /* Application Collection */
+ kHIDUsage_Dig_3DDigitizer = 0x08, /* Application Collection */
+ kHIDUsage_Dig_StereoPlotter = 0x09, /* Application Collection */
+ kHIDUsage_Dig_ArticulatedArm = 0x0A, /* Application Collection */
+ kHIDUsage_Dig_Armature = 0x0B, /* Application Collection */
+ kHIDUsage_Dig_MultiplePointDigitizer = 0x0C, /* Application Collection */
+ kHIDUsage_Dig_FreeSpaceWand = 0x0D, /* Application Collection */
+ /* 0x0E - 0x1F Reserved */
+ kHIDUsage_Dig_Stylus = 0x20, /* Logical Collection */
+ kHIDUsage_Dig_Puck = 0x21, /* Logical Collection */
+ kHIDUsage_Dig_Finger = 0x22, /* Logical Collection */
+ /* 0x23 - 0x2F Reserved */
+ kHIDUsage_Dig_TipPressure = 0x30, /* Dynamic Value */
+ kHIDUsage_Dig_BarrelPressure = 0x31, /* Dynamic Value */
+ kHIDUsage_Dig_InRange = 0x32, /* Momentary Control */
+ kHIDUsage_Dig_Touch = 0x33, /* Momentary Control */
+ kHIDUsage_Dig_Untouch = 0x34, /* One-Shot Control */
+ kHIDUsage_Dig_Tap = 0x35, /* One-Shot Control */
+ kHIDUsage_Dig_Quality = 0x36, /* Dynamic Value */
+ kHIDUsage_Dig_DataValid = 0x37, /* Momentary Control */
+ kHIDUsage_Dig_TransducerIndex = 0x38, /* Dynamic Value */
+ kHIDUsage_Dig_TabletFunctionKeys = 0x39, /* Logical Collection */
+ kHIDUsage_Dig_ProgramChangeKeys = 0x3A, /* Logical Collection */
+ kHIDUsage_Dig_BatteryStrength = 0x3B, /* Dynamic Value */
+ kHIDUsage_Dig_Invert = 0x3C, /* Momentary Control */
+ kHIDUsage_Dig_XTilt = 0x3D, /* Dynamic Value */
+ kHIDUsage_Dig_YTilt = 0x3E, /* Dynamic Value */
+ kHIDUsage_Dig_Azimuth = 0x3F, /* Dynamic Value */
+ kHIDUsage_Dig_Altitude = 0x40, /* Dynamic Value */
+ kHIDUsage_Dig_Twist = 0x41, /* Dynamic Value */
+ kHIDUsage_Dig_TipSwitch = 0x42, /* Momentary Control */
+ kHIDUsage_Dig_SecondaryTipSwitch = 0x43, /* Momentary Control */
+ kHIDUsage_Dig_BarrelSwitch = 0x44, /* Momentary Control */
+ kHIDUsage_Dig_Eraser = 0x45, /* Momentary Control */
+ kHIDUsage_Dig_TabletPick = 0x46, /* Momentary Control */
+ /* 0x47 - 0xFFFF Reserved */
+ kHIDUsage_Dig_Reserved = 0xFFFF
+};
+
+/* AlphanumericDisplay Page (0x14) */
+/* The Alphanumeric Display page is intended for use by simple alphanumeric displays that are used on consumer devices. */
+enum {
+ kHIDUsage_AD_AlphanumericDisplay = 0x01, /* Application Collection */
+ /* 0x02 - 0x1F Reserved */
+ kHIDUsage_AD_DisplayAttributesReport = 0x20, /* Logical Collection */
+ kHIDUsage_AD_ASCIICharacterSet = 0x21, /* Static Flag */
+ kHIDUsage_AD_DataReadBack = 0x22, /* Static Flag */
+ kHIDUsage_AD_FontReadBack = 0x23, /* Static Flag */
+ kHIDUsage_AD_DisplayControlReport = 0x24, /* Logical Collection */
+ kHIDUsage_AD_ClearDisplay = 0x25, /* Dynamic Flag */
+ kHIDUsage_AD_DisplayEnable = 0x26, /* Dynamic Flag */
+ kHIDUsage_AD_ScreenSaverDelay = 0x27, /* Static Value */
+ kHIDUsage_AD_ScreenSaverEnable = 0x28, /* Dynamic Flag */
+ kHIDUsage_AD_VerticalScroll = 0x29, /* Static Flag */
+ kHIDUsage_AD_HorizontalScroll = 0x2A, /* Static Flag */
+ kHIDUsage_AD_CharacterReport = 0x2B, /* Logical Collection */
+ kHIDUsage_AD_DisplayData = 0x2C, /* Dynamic Value */
+ kHIDUsage_AD_DisplayStatus = 0x2D, /* Logical Collection */
+ kHIDUsage_AD_StatNotReady = 0x2E, /* Selector */
+ kHIDUsage_AD_StatReady = 0x2F, /* Selector */
+ kHIDUsage_AD_ErrNotaloadablecharacter = 0x30, /* Selector */
+ kHIDUsage_AD_ErrFontdatacannotberead = 0x31, /* Selector */
+ kHIDUsage_AD_CursorPositionReport = 0x32, /* Logical Collection */
+ kHIDUsage_AD_Row = 0x33, /* Dynamic Value */
+ kHIDUsage_AD_Column = 0x34, /* Dynamic Value */
+ kHIDUsage_AD_Rows = 0x35, /* Static Value */
+ kHIDUsage_AD_Columns = 0x36, /* Static Value */
+ kHIDUsage_AD_CursorPixelPositioning = 0x37, /* Static Flag */
+ kHIDUsage_AD_CursorMode = 0x38, /* Dynamic Flag */
+ kHIDUsage_AD_CursorEnable = 0x39, /* Dynamic Flag */
+ kHIDUsage_AD_CursorBlink = 0x3A, /* Dynamic Flag */
+ kHIDUsage_AD_FontReport = 0x3B, /* Logical Collection */
+ kHIDUsage_AD_FontData = 0x3C, /* Buffered Byte */
+ kHIDUsage_AD_CharacterWidth = 0x3D, /* Static Value */
+ kHIDUsage_AD_CharacterHeight = 0x3E, /* Static Value */
+ kHIDUsage_AD_CharacterSpacingHorizontal = 0x3F, /* Static Value */
+ kHIDUsage_AD_CharacterSpacingVertical = 0x40, /* Static Value */
+ kHIDUsage_AD_UnicodeCharacterSet = 0x41, /* Static Flag */
+ /* 0x42 - 0xFFFF Reserved */
+ kHIDUsage_AD_Reserved = 0xFFFF
+};
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __HID__ */
+
diff --git a/include/qt/HTMLRendering.h b/include/qt/HTMLRendering.h
new file mode 100644
index 000000000..33d2d8a41
--- /dev/null
+++ b/include/qt/HTMLRendering.h
@@ -0,0 +1,407 @@
+/*
+ File: HTMLRendering.h
+
+ Contains: HTML Rendering Library Interfaces.
+
+ Version: Technology: 1.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1999-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __HTMLRENDERING__
+#define __HTMLRENDERING__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#ifndef __EVENTS__
+#include "Events.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+#ifndef __CODEFRAGMENTS__
+#include "CodeFragments.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+typedef struct OpaqueHRReference* HRReference;
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSStatus )
+HRGetHTMLRenderingLibVersion (NumVersion * returnVers);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if TARGET_RT_MAC_CFM
+#if CALL_NOT_IN_CARBON
+#ifdef __cplusplus
+ inline pascal Boolean HRHTMLRenderingLibAvailable() { return ((HRGetHTMLRenderingLibVersion != (void*)kUnresolvedCFragSymbolAddress) ); }
+#else
+ #define HRHTMLRenderingLibAvailable() ((HRGetHTMLRenderingLibVersion != (void*)kUnresolvedCFragSymbolAddress) )
+#endif
+#endif
+#elif TARGET_RT_MAC_MACHO
+/* HTML Rendering is currently not available on OS X */
+#if CALL_NOT_IN_CARBON
+#ifdef __cplusplus
+ inline pascal Boolean HRHTMLRenderingLibAvailable() { return false; }
+#else
+ #define HRHTMLRenderingLibAvailable() (false)
+#endif
+#endif
+#endif /* */
+
+enum {
+ kHRRendererHTML32Type = FOUR_CHAR_CODE('ht32') /* HTML 3.2 */
+};
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSStatus )
+HRNewReference (HRReference * hrRef,
+ OSType rendererType,
+ GrafPtr grafPtr);
+
+EXTERN_API( OSStatus )
+HRDisposeReference (HRReference hrRef);
+
+
+EXTERN_API( SInt32 )
+HRFreeMemory (Size inBytesNeeded);
+
+
+/* System level notifications */
+EXTERN_API( void )
+HRScreenConfigurationChanged (void);
+
+EXTERN_API( Boolean )
+HRIsHREvent (const EventRecord * eventRecord);
+
+
+/* Drawing */
+EXTERN_API( OSStatus )
+HRSetGrafPtr (HRReference hrRef,
+ GrafPtr grafPtr);
+
+EXTERN_API( OSStatus )
+HRActivate (HRReference hrRef);
+
+EXTERN_API( OSStatus )
+HRDeactivate (HRReference hrRef);
+
+EXTERN_API( OSStatus )
+HRDraw (HRReference hrRef,
+ RgnHandle updateRgnH);
+
+EXTERN_API( OSStatus )
+HRSetRenderingRect (HRReference hrRef,
+ const Rect * renderingRect);
+
+EXTERN_API( OSStatus )
+HRGetRenderedImageSize (HRReference hrRef,
+ Point * renderingSize);
+
+EXTERN_API( OSStatus )
+HRScrollToLocation (HRReference hrRef,
+ Point * location);
+
+EXTERN_API( OSStatus )
+HRForceQuickdraw (HRReference hrRef,
+ Boolean forceQuickdraw);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+typedef SInt16 HRScrollbarState;
+enum {
+ eHRScrollbarOn = 0,
+ eHRScrollbarOff = 1,
+ eHRScrollbarAuto = 2
+};
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSStatus )
+HRSetScrollbarState (HRReference hrRef,
+ HRScrollbarState hScrollbarState,
+ HRScrollbarState vScrollbarState);
+
+EXTERN_API( OSStatus )
+HRSetDrawBorder (HRReference hrRef,
+ Boolean drawBorder);
+
+EXTERN_API( OSStatus )
+HRSetGrowboxCutout (HRReference hrRef,
+ Boolean allowCutout);
+
+/* Navigation */
+EXTERN_API( OSStatus )
+HRGoToFile (HRReference hrRef,
+ const FSSpec * fsspec,
+ Boolean addToHistory,
+ Boolean forceRefresh);
+
+EXTERN_API( OSStatus )
+HRGoToURL (HRReference hrRef,
+ const char * url,
+ Boolean addToHistory,
+ Boolean forceRefresh);
+
+EXTERN_API( OSStatus )
+HRGoToAnchor (HRReference hrRef,
+ const char * anchorName);
+
+EXTERN_API( OSStatus )
+HRGoToPtr (HRReference hrRef,
+ char * buffer,
+ UInt32 bufferSize,
+ Boolean addToHistory,
+ Boolean forceRefresh);
+
+/* Accessors */
+/* either file url or url of <base> tag */
+EXTERN_API( OSStatus )
+HRGetRootURL (HRReference hrRef,
+ Handle rootURLH);
+
+/* url of <base> tag */
+EXTERN_API( OSStatus )
+HRGetBaseURL (HRReference hrRef,
+ Handle baseURLH);
+
+/* file url */
+EXTERN_API( OSStatus )
+HRGetHTMLURL (HRReference hrRef,
+ Handle HTMLURLH);
+
+EXTERN_API( OSStatus )
+HRGetTitle (HRReference hrRef,
+ StringPtr title);
+
+EXTERN_API( OSStatus )
+HRGetHTMLFile (HRReference hrRef,
+ FSSpec * fsspec);
+
+
+/* Utilities */
+EXTERN_API( OSStatus )
+HRUtilCreateFullURL (const char * rootURL,
+ const char * linkURL,
+ Handle fullURLH);
+
+EXTERN_API( OSStatus )
+HRUtilGetFSSpecFromURL (const char * rootURL,
+ const char * linkURL,
+ FSSpec * destSpec);
+
+/* urlHandle should be valid on input */
+EXTERN_API( OSStatus )
+HRUtilGetURLFromFSSpec (const FSSpec * fsspec,
+ Handle urlHandle);
+
+/*
+ Visited links
+
+ If you register a function here, it will be called to determine
+ whether or not the given URL has been visited. It should return
+ true if the URL has been visited.
+
+ In addition to the URLs that the application may add to the list
+ of visited links, it should also add URLs that the user clicks
+ on. These URLs can be caught by the "add URL to history" callback
+ below.
+ */
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API( Boolean , HRWasURLVisitedProcPtr )(const char *url, void *refCon);
+typedef STACK_UPP_TYPE(HRWasURLVisitedProcPtr) HRWasURLVisitedUPP;
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+HRRegisterWasURLVisitedUPP (HRWasURLVisitedUPP inWasURLVisitedUPP,
+ HRReference hrRef,
+ void * inRefCon);
+
+EXTERN_API( void )
+HRUnregisterWasURLVisitedUPP (HRReference hrRef);
+
+
+
+/*
+ New URL
+
+ If you register a function here, it will be called every time
+ the renderer is going to display a new URL. A few examples of how
+ you might use this include...
+
+ (a) maintaining a history of URLs
+ (b) maintainging a list of visited links
+ (c) setting a window title based on the new URL
+*/
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API( OSStatus , HRNewURLProcPtr )(const char *url, const char *targetFrame, Boolean addToHistory, void *refCon);
+typedef STACK_UPP_TYPE(HRNewURLProcPtr) HRNewURLUPP;
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+HRRegisterNewURLUPP (HRNewURLUPP inNewURLUPP,
+ HRReference hrRef,
+ void * inRefCon);
+
+EXTERN_API( void )
+HRUnregisterNewURLUPP (HRReference hrRef);
+
+
+
+
+/*
+ URL to FSSpec function
+
+ If you register a function here, it will be called every time
+ the renderer is going to locate a file. The function will be
+ passed an enum indicating the type of file being asked for.
+ */
+#endif /* CALL_NOT_IN_CARBON */
+
+
+typedef UInt16 URLSourceType;
+enum {
+ kHRLookingForHTMLSource = 1,
+ kHRLookingForImage = 2,
+ kHRLookingForEmbedded = 3,
+ kHRLookingForImageMap = 4,
+ kHRLookingForFrame = 5
+};
+
+typedef CALLBACK_API( OSStatus , HRURLToFSSpecProcPtr )(const char *rootURL, const char *linkURL, FSSpec *fsspec, URLSourceType urlSourceType, void *refCon);
+typedef STACK_UPP_TYPE(HRURLToFSSpecProcPtr) HRURLToFSSpecUPP;
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+HRRegisterURLToFSSpecUPP (HRURLToFSSpecUPP inURLToFSSpecUPP,
+ HRReference hrRef,
+ void * inRefCon);
+
+EXTERN_API( void )
+HRUnregisterURLToFSSpecUPP (HRReference hrRef);
+
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(HRWasURLVisitedUPP)
+ NewHRWasURLVisitedUPP (HRWasURLVisitedProcPtr userRoutine);
+
+ EXTERN_API(HRNewURLUPP)
+ NewHRNewURLUPP (HRNewURLProcPtr userRoutine);
+
+ EXTERN_API(HRURLToFSSpecUPP)
+ NewHRURLToFSSpecUPP (HRURLToFSSpecProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeHRWasURLVisitedUPP (HRWasURLVisitedUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeHRNewURLUPP (HRNewURLUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeHRURLToFSSpecUPP (HRURLToFSSpecUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeHRWasURLVisitedUPP (const char * url,
+ void * refCon,
+ HRWasURLVisitedUPP userUPP);
+
+ EXTERN_API(OSStatus)
+ InvokeHRNewURLUPP (const char * url,
+ const char * targetFrame,
+ Boolean addToHistory,
+ void * refCon,
+ HRNewURLUPP userUPP);
+
+ EXTERN_API(OSStatus)
+ InvokeHRURLToFSSpecUPP (const char * rootURL,
+ const char * linkURL,
+ FSSpec * fsspec,
+ URLSourceType urlSourceType,
+ void * refCon,
+ HRURLToFSSpecUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppHRWasURLVisitedProcInfo = 0x000003D0 }; /* pascal 1_byte Func(4_bytes, 4_bytes) */
+ enum { uppHRNewURLProcInfo = 0x000037F0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes, 1_byte, 4_bytes) */
+ enum { uppHRURLToFSSpecProcInfo = 0x0000EFF0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes, 4_bytes, 2_bytes, 4_bytes) */
+ #define NewHRWasURLVisitedUPP(userRoutine) (HRWasURLVisitedUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppHRWasURLVisitedProcInfo, GetCurrentArchitecture())
+ #define NewHRNewURLUPP(userRoutine) (HRNewURLUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppHRNewURLProcInfo, GetCurrentArchitecture())
+ #define NewHRURLToFSSpecUPP(userRoutine) (HRURLToFSSpecUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppHRURLToFSSpecProcInfo, GetCurrentArchitecture())
+ #define DisposeHRWasURLVisitedUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeHRNewURLUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeHRURLToFSSpecUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeHRWasURLVisitedUPP(url, refCon, userUPP) (Boolean)CALL_TWO_PARAMETER_UPP((userUPP), uppHRWasURLVisitedProcInfo, (url), (refCon))
+ #define InvokeHRNewURLUPP(url, targetFrame, addToHistory, refCon, userUPP) (OSStatus)CALL_FOUR_PARAMETER_UPP((userUPP), uppHRNewURLProcInfo, (url), (targetFrame), (addToHistory), (refCon))
+ #define InvokeHRURLToFSSpecUPP(rootURL, linkURL, fsspec, urlSourceType, refCon, userUPP) (OSStatus)CALL_FIVE_PARAMETER_UPP((userUPP), uppHRURLToFSSpecProcInfo, (rootURL), (linkURL), (fsspec), (urlSourceType), (refCon))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewHRWasURLVisitedProc(userRoutine) NewHRWasURLVisitedUPP(userRoutine)
+#define NewHRNewURLProc(userRoutine) NewHRNewURLUPP(userRoutine)
+#define NewHRURLToFSSpecProc(userRoutine) NewHRURLToFSSpecUPP(userRoutine)
+#define CallHRWasURLVisitedProc(userRoutine, url, refCon) InvokeHRWasURLVisitedUPP(url, refCon, userRoutine)
+#define CallHRNewURLProc(userRoutine, url, targetFrame, addToHistory, refCon) InvokeHRNewURLUPP(url, targetFrame, addToHistory, refCon, userRoutine)
+#define CallHRURLToFSSpecProc(userRoutine, rootURL, linkURL, fsspec, urlSourceType, refCon) InvokeHRURLToFSSpecUPP(rootURL, linkURL, fsspec, urlSourceType, refCon, userRoutine)
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __HTMLRENDERING__ */
+
diff --git a/include/qt/HyperXCmd.h b/include/qt/HyperXCmd.h
new file mode 100644
index 000000000..4d7955380
--- /dev/null
+++ b/include/qt/HyperXCmd.h
@@ -0,0 +1,634 @@
+/*
+ File: HyperXCmd.h
+
+ Contains: Interfaces for HyperCard XCMD's
+
+ Version: Technology: HyperCard 2.3
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1987-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __HYPERXCMD__
+#define __HYPERXCMD__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __FP__
+#include "fp.h"
+#endif
+
+#ifndef __EVENTS__
+#include "Events.h"
+#endif
+
+#ifndef __TEXTEDIT__
+#include "TextEdit.h"
+#endif
+
+#ifndef __MENUS__
+#include "Menus.h"
+#endif
+
+#ifndef __STANDARDFILE__
+#include "StandardFile.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* result codes */
+enum {
+ xresSucc = 0,
+ xresFail = 1,
+ xresNotImp = 2
+};
+
+/* XCMDBlock constants for event.what... */
+enum {
+ xOpenEvt = 1000, /* the first event after you are created */
+ xCloseEvt = 1001, /* your window is being forced close (Quit?) */
+ xGiveUpEditEvt = 1002, /* you are losing Edit... */
+ xGiveUpSoundEvt = 1003, /* you are losing the sound channel... */
+ xHidePalettesEvt = 1004, /* someone called HideHCPalettes */
+ xShowPalettesEvt = 1005, /* someone called ShowHCPalettes */
+ xEditUndo = 1100, /* Edit--Undo */
+ xEditCut = 1102, /* Edit--Cut */
+ xEditCopy = 1103, /* Edit--Copy */
+ xEditPaste = 1104, /* Edit--Paste */
+ xEditClear = 1105, /* Edit--Clear */
+ xSendEvt = 1200, /* script has sent you a message (text) */
+ xSetPropEvt = 1201, /* set a window property */
+ xGetPropEvt = 1202, /* get a window property */
+ xCursorWithin = 1300, /* cursor is within the window */
+ xMenuEvt = 1400, /* user has selected an item in your menu */
+ xMBarClickedEvt = 1401, /* a menu is about to be shown--update if needed */
+ xShowWatchInfoEvt = 1501, /* for variable and message watchers */
+ xScriptErrorEvt = 1502, /* place the insertion point */
+ xDebugErrorEvt = 1503, /* user clicked "Debug" at a complaint */
+ xDebugStepEvt = 1504, /* hilite the line */
+ xDebugTraceEvt = 1505, /* same as step but tracing */
+ xDebugFinishedEvt = 1506 /* script ended */
+};
+
+enum {
+ paletteProc = 2048, /* Windoid with grow box */
+ palNoGrowProc = 2052, /* standard Windoid defproc */
+ palZoomProc = 2056, /* Windoid with zoom and grow */
+ palZoomNoGrow = 2060 /* Windoid with zoom and no grow */
+};
+
+enum {
+ hasZoom = 8,
+ hasTallTBar = 2,
+ toggleHilite = 1
+};
+
+/* paramCount is set to these constants when first calling special XThings */
+enum {
+ xMessageWatcherID = -2,
+ xVariableWatcherID = -3,
+ xScriptEditorID = -4,
+ xDebuggerID = -5
+};
+
+/* XTalkObjectPtr->objectKind values */
+enum {
+ stackObj = 1,
+ bkgndObj = 2,
+ cardObj = 3,
+ fieldObj = 4,
+ buttonObj = 5
+};
+
+/* selectors for ShowHCAlert's dialogs (shown as buttonID:buttonText) */
+enum {
+ errorDlgID = 1, /* 1:OK (default) */
+ confirmDlgID = 2, /* 1:OK (default) and 2:Cancel */
+ confirmDelDlgID = 3, /* 1:Cancel (default) and 2:Delete */
+ yesNoCancelDlgID = 4 /* 1:Yes (default), 2:Cancel, and 3:No */
+};
+
+
+/* type definitions */
+
+struct XCmdBlock {
+ short paramCount; /* If = -1 then new use for XWindoids */
+ Handle params[16];
+ Handle returnValue;
+ Boolean passFlag;
+ SignedByte filler1;
+ UniversalProcPtr entryPoint; /* to call back to HyperCard */
+ short request;
+ short result;
+ long inArgs[8];
+ long outArgs[4];
+};
+typedef struct XCmdBlock XCmdBlock;
+
+typedef XCmdBlock * XCmdPtr;
+
+
+struct XWEventInfo {
+ EventRecord event;
+ WindowPtr eventWindow;
+ long eventParams[9];
+ Handle eventResult;
+};
+typedef struct XWEventInfo XWEventInfo;
+typedef XWEventInfo * XWEventInfoPtr;
+
+struct XTalkObject {
+ short objectKind; /* stack, bkgnd, card, field, or button */
+ long stackNum; /* reference number of the source stack */
+ long bkgndID;
+ long cardID;
+ long buttonID;
+ long fieldID;
+};
+typedef struct XTalkObject XTalkObject;
+typedef XTalkObject * XTalkObjectPtr;
+/* maximum number of checkpoints in a script */
+enum {
+ maxCachedChecks = 16
+};
+
+
+struct CheckPts {
+ short checks[16];
+};
+typedef struct CheckPts CheckPts;
+
+typedef CheckPts * CheckPtPtr;
+typedef CheckPtPtr * CheckPtHandle;
+/*
+ HyperTalk Utilities
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( Handle )
+EvalExpr (XCmdPtr paramPtr,
+ ConstStr255Param expr);
+
+EXTERN_API( void )
+SendCardMessage (XCmdPtr paramPtr,
+ ConstStr255Param msg);
+
+EXTERN_API( void )
+SendHCMessage (XCmdPtr paramPtr,
+ ConstStr255Param msg);
+
+EXTERN_API( void )
+RunHandler (XCmdPtr paramPtr,
+ Handle handler);
+
+
+/*
+ Memory Utilities
+*/
+EXTERN_API( Handle )
+GetGlobal (XCmdPtr paramPtr,
+ ConstStr255Param globName);
+
+EXTERN_API( void )
+SetGlobal (XCmdPtr paramPtr,
+ ConstStr255Param globName,
+ Handle globValue);
+
+EXTERN_API( void )
+ZeroBytes (XCmdPtr paramPtr,
+ void * dstPtr,
+ long longCount);
+
+
+/*
+ String Utilities
+*/
+EXTERN_API( void )
+ScanToReturn (XCmdPtr paramPtr,
+ Ptr * scanPtr);
+
+EXTERN_API( void )
+ScanToZero (XCmdPtr paramPtr,
+ Ptr * scanPtr);
+
+EXTERN_API( Boolean )
+StringEqual (XCmdPtr paramPtr,
+ ConstStr255Param str1,
+ ConstStr255Param str2);
+
+EXTERN_API( long )
+StringLength (XCmdPtr paramPtr,
+ void * strPtr);
+
+EXTERN_API( void *)
+StringMatch (XCmdPtr paramPtr,
+ ConstStr255Param pattern,
+ void * target);
+
+EXTERN_API( void )
+ZeroTermHandle (XCmdPtr paramPtr,
+ Handle hndl);
+
+
+/*
+ String Conversions
+*/
+EXTERN_API( void )
+BoolToStr (XCmdPtr paramPtr,
+ Boolean value,
+ Str255 str);
+
+EXTERN_API( void )
+Double_tToStr (XCmdPtr paramPtr,
+ double_t num,
+ Str255 str);
+
+EXTERN_API( void )
+LongToStr (XCmdPtr paramPtr,
+ long posNum,
+ Str255 str);
+
+EXTERN_API( void )
+NumToHex (XCmdPtr paramPtr,
+ long num,
+ short nDigits,
+ Str255 str);
+
+EXTERN_API( void )
+NumToStr (XCmdPtr paramPtr,
+ long num,
+ Str255 str);
+
+EXTERN_API( Handle )
+PasToZero (XCmdPtr paramPtr,
+ ConstStr255Param str);
+
+EXTERN_API( void )
+PointToStr (XCmdPtr paramPtr,
+ Point pt,
+ Str255 str);
+
+EXTERN_API( void )
+RectToStr (XCmdPtr paramPtr,
+ const Rect * rct,
+ Str255 str);
+
+EXTERN_API( void )
+ReturnToPas (XCmdPtr paramPtr,
+ void * zeroStr,
+ Str255 pasStr);
+
+EXTERN_API( Boolean )
+StrToBool (XCmdPtr paramPtr,
+ ConstStr255Param str);
+
+EXTERN_API( double_t )
+StrToDouble_t (XCmdPtr paramPtr,
+ ConstStr255Param str);
+
+EXTERN_API( long )
+StrToLong (XCmdPtr paramPtr,
+ ConstStr255Param str);
+
+EXTERN_API( long )
+StrToNum (XCmdPtr paramPtr,
+ ConstStr255Param str);
+
+EXTERN_API( void )
+StrToPoint (XCmdPtr paramPtr,
+ ConstStr255Param str,
+ Point * pt);
+
+EXTERN_API( void )
+StrToRect (XCmdPtr paramPtr,
+ ConstStr255Param str,
+ Rect * rct);
+
+EXTERN_API( void )
+ZeroToPas (XCmdPtr paramPtr,
+ void * zeroStr,
+ Str255 pasStr);
+
+
+/*
+ Field Utilities
+*/
+EXTERN_API( Handle )
+GetFieldByID (XCmdPtr paramPtr,
+ Boolean cardFieldFlag,
+ short fieldID);
+
+EXTERN_API( Handle )
+GetFieldByName (XCmdPtr paramPtr,
+ Boolean cardFieldFlag,
+ ConstStr255Param fieldName);
+
+EXTERN_API( Handle )
+GetFieldByNum (XCmdPtr paramPtr,
+ Boolean cardFieldFlag,
+ short fieldNum);
+
+EXTERN_API( void )
+SetFieldByID (XCmdPtr paramPtr,
+ Boolean cardFieldFlag,
+ short fieldID,
+ Handle fieldVal);
+
+EXTERN_API( void )
+SetFieldByName (XCmdPtr paramPtr,
+ Boolean cardFieldFlag,
+ ConstStr255Param fieldName,
+ Handle fieldVal);
+
+EXTERN_API( void )
+SetFieldByNum (XCmdPtr paramPtr,
+ Boolean cardFieldFlag,
+ short fieldNum,
+ Handle fieldVal);
+
+EXTERN_API( TEHandle )
+GetFieldTE (XCmdPtr paramPtr,
+ Boolean cardFieldFlag,
+ short fieldID,
+ short fieldNum,
+ ConstStr255Param fieldName);
+
+EXTERN_API( void )
+SetFieldTE (XCmdPtr paramPtr,
+ Boolean cardFieldFlag,
+ short fieldID,
+ short fieldNum,
+ ConstStr255Param fieldName,
+ TEHandle fieldTE);
+
+
+/*
+ Miscellaneous Utilities
+*/
+EXTERN_API( void )
+BeginXSound (XCmdPtr paramPtr,
+ WindowPtr window);
+
+EXTERN_API( void )
+EndXSound (XCmdPtr paramPtr);
+
+EXTERN_API( Boolean )
+GetFilePath (XCmdPtr paramPtr,
+ ConstStr255Param fileName,
+ short numTypes,
+ ConstSFTypeListPtr typeList,
+ Boolean askUser,
+ OSType * fileType,
+ Str255 fullName);
+
+EXTERN_API( void )
+GetXResInfo (XCmdPtr paramPtr,
+ short * resFile,
+ short * resID,
+ ResType * rType,
+ Str255 name);
+
+EXTERN_API( void )
+Notify (XCmdPtr paramPtr);
+
+EXTERN_API( void )
+SendHCEvent (XCmdPtr paramPtr,
+ const EventRecord * event);
+
+EXTERN_API( void )
+SendWindowMessage (XCmdPtr paramPtr,
+ WindowPtr windPtr,
+ ConstStr255Param windowName,
+ ConstStr255Param msg);
+
+EXTERN_API( WindowPtr )
+FrontDocWindow (XCmdPtr paramPtr);
+
+EXTERN_API( long )
+StackNameToNum (XCmdPtr paramPtr,
+ ConstStr255Param stackName);
+
+EXTERN_API( short )
+ShowHCAlert (XCmdPtr paramPtr,
+ short dlgID,
+ ConstStr255Param promptStr);
+
+EXTERN_API( Boolean )
+AbortInQueue (XCmdPtr paramPtr);
+
+EXTERN_API( void )
+FlushStackFile (XCmdPtr paramPtr);
+
+
+/*
+ Creating and Disposing XWindoids
+*/
+EXTERN_API( WindowPtr )
+NewXWindow (XCmdPtr paramPtr,
+ const Rect * boundsRect,
+ ConstStr255Param title,
+ Boolean visible,
+ short procID,
+ Boolean color,
+ Boolean floating);
+
+EXTERN_API( WindowPtr )
+GetNewXWindow (XCmdPtr paramPtr,
+ ResType templateType,
+ short templateID,
+ Boolean color,
+ Boolean floating);
+
+EXTERN_API( void )
+CloseXWindow (XCmdPtr paramPtr,
+ WindowPtr window);
+
+/*
+ XWindoid Utilities
+*/
+EXTERN_API( void )
+HideHCPalettes (XCmdPtr paramPtr);
+
+EXTERN_API( void )
+ShowHCPalettes (XCmdPtr paramPtr);
+
+EXTERN_API( void )
+RegisterXWMenu (XCmdPtr paramPtr,
+ WindowPtr window,
+ MenuHandle menu,
+ Boolean registering);
+
+EXTERN_API( void )
+SetXWIdleTime (XCmdPtr paramPtr,
+ WindowPtr window,
+ long interval);
+
+EXTERN_API( void )
+XWHasInterruptCode (XCmdPtr paramPtr,
+ WindowPtr window,
+ Boolean haveCode);
+
+EXTERN_API( void )
+XWAlwaysMoveHigh (XCmdPtr paramPtr,
+ WindowPtr window,
+ Boolean moveHigh);
+
+EXTERN_API( void )
+XWAllowReEntrancy (XCmdPtr paramPtr,
+ WindowPtr window,
+ Boolean allowSysEvts,
+ Boolean allowHCEvts);
+
+
+/*
+ Text Editing Utilities
+*/
+EXTERN_API( void )
+BeginXWEdit (XCmdPtr paramPtr,
+ WindowPtr window);
+
+EXTERN_API( void )
+EndXWEdit (XCmdPtr paramPtr,
+ WindowPtr window);
+
+EXTERN_API( WordBreakUPP )
+HCWordBreakProc (XCmdPtr paramPtr);
+
+EXTERN_API( void )
+PrintTEHandle (XCmdPtr paramPtr,
+ TEHandle hTE,
+ StringPtr header);
+
+
+/*
+ Script Editor support
+*/
+EXTERN_API( CheckPtHandle )
+GetCheckPoints (XCmdPtr paramPtr);
+
+EXTERN_API( void )
+SetCheckPoints (XCmdPtr paramPtr,
+ CheckPtHandle checkLines);
+
+EXTERN_API( void )
+FormatScript (XCmdPtr paramPtr,
+ Handle scriptHndl,
+ long * insertionPoint,
+ Boolean quickFormat);
+
+EXTERN_API( void )
+SaveXWScript (XCmdPtr paramPtr,
+ Handle scriptHndl);
+
+EXTERN_API( void )
+GetObjectName (XCmdPtr paramPtr,
+ XTalkObjectPtr xObjPtr,
+ Str255 objName);
+
+EXTERN_API( void )
+GetObjectScript (XCmdPtr paramPtr,
+ XTalkObjectPtr xObjPtr,
+ Handle * scriptHndl);
+
+EXTERN_API( void )
+SetObjectScript (XCmdPtr paramPtr,
+ XTalkObjectPtr xObjPtr,
+ Handle scriptHndl);
+
+
+/*
+ Debugging Tools support
+*/
+EXTERN_API( void )
+AbortScript (XCmdPtr paramPtr);
+
+EXTERN_API( void )
+GoScript (XCmdPtr paramPtr);
+
+EXTERN_API( void )
+StepScript (XCmdPtr paramPtr,
+ Boolean stepInto);
+
+EXTERN_API( void )
+CountHandlers (XCmdPtr paramPtr,
+ short * handlerCount);
+
+EXTERN_API( void )
+GetHandlerInfo (XCmdPtr paramPtr,
+ short handlerNum,
+ Str255 handlerName,
+ Str255 objectName,
+ short * varCount);
+
+EXTERN_API( void )
+GetVarInfo (XCmdPtr paramPtr,
+ short handlerNum,
+ short varNum,
+ Str255 varName,
+ Boolean * isGlobal,
+ Str255 varValue,
+ Handle varHndl);
+
+EXTERN_API( void )
+SetVarValue (XCmdPtr paramPtr,
+ short handlerNum,
+ short varNum,
+ Handle varHndl);
+
+EXTERN_API( Handle )
+GetStackCrawl (XCmdPtr paramPtr);
+
+EXTERN_API( void )
+TraceScript (XCmdPtr paramPtr,
+ Boolean traceInto);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __HYPERXCMD__ */
+
diff --git a/include/qt/IAExtractor.h b/include/qt/IAExtractor.h
new file mode 100644
index 000000000..83e5d15e9
--- /dev/null
+++ b/include/qt/IAExtractor.h
@@ -0,0 +1,412 @@
+/*
+ File: IAExtractor.h
+
+ Contains: Interfaces to Find by Content Plugins that scan files
+
+ Version: Technology: Mac OS 8.6
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1999-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __IAEXTRACTOR__
+#define __IAEXTRACTOR__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* modes for IASetDocAccessorReadPositionProc */
+enum {
+ kIAFromStartMode = 0,
+ kIAFromCurrMode = 1,
+ kIAFromEndMode = 2
+};
+
+/* versions for plug-ins */
+enum {
+ kIAExtractorVersion1 = 0x00010001,
+ kIAExtractorCurrentVersion = kIAExtractorVersion1
+};
+
+/* types */
+typedef OSStatus IAResult;
+typedef struct OpaqueIAPluginRef* IAPluginRef;
+typedef struct OpaqueIADocAccessorRef* IADocAccessorRef;
+typedef struct OpaqueIADocRef* IADocRef;
+/* IAPluginInitBlock functions */
+typedef CALLBACK_API_C( void *, IAAllocProcPtr )(UInt32 inSize);
+typedef CALLBACK_API_C( void , IAFreeProcPtr )(void *inObject);
+typedef CALLBACK_API_C( UInt8 , IAIdleProcPtr )(void);
+typedef STACK_UPP_TYPE(IAAllocProcPtr) IAAllocUPP;
+typedef STACK_UPP_TYPE(IAFreeProcPtr) IAFreeUPP;
+typedef STACK_UPP_TYPE(IAIdleProcPtr) IAIdleUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(IAAllocUPP)
+ NewIAAllocUPP (IAAllocProcPtr userRoutine);
+
+ EXTERN_API(IAFreeUPP)
+ NewIAFreeUPP (IAFreeProcPtr userRoutine);
+
+ EXTERN_API(IAIdleUPP)
+ NewIAIdleUPP (IAIdleProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeIAAllocUPP (IAAllocUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeIAFreeUPP (IAFreeUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeIAIdleUPP (IAIdleUPP userUPP);
+
+ EXTERN_API(void *)
+ InvokeIAAllocUPP (UInt32 inSize,
+ IAAllocUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeIAFreeUPP (void * inObject,
+ IAFreeUPP userUPP);
+
+ EXTERN_API(UInt8)
+ InvokeIAIdleUPP (IAIdleUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppIAAllocProcInfo = 0x000000F1 }; /* 4_bytes Func(4_bytes) */
+ enum { uppIAFreeProcInfo = 0x000000C1 }; /* no_return_value Func(4_bytes) */
+ enum { uppIAIdleProcInfo = 0x00000011 }; /* 1_byte Func() */
+ #define NewIAAllocUPP(userRoutine) (IAAllocUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppIAAllocProcInfo, GetCurrentArchitecture())
+ #define NewIAFreeUPP(userRoutine) (IAFreeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppIAFreeProcInfo, GetCurrentArchitecture())
+ #define NewIAIdleUPP(userRoutine) (IAIdleUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppIAIdleProcInfo, GetCurrentArchitecture())
+ #define DisposeIAAllocUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeIAFreeUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeIAIdleUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeIAAllocUPP(inSize, userUPP) (void *)CALL_ONE_PARAMETER_UPP((userUPP), uppIAAllocProcInfo, (inSize))
+ #define InvokeIAFreeUPP(inObject, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppIAFreeProcInfo, (inObject))
+ #define InvokeIAIdleUPP(userUPP) (UInt8)CALL_ZERO_PARAMETER_UPP((userUPP), uppIAIdleProcInfo)
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewIAAllocProc(userRoutine) NewIAAllocUPP(userRoutine)
+#define NewIAFreeProc(userRoutine) NewIAFreeUPP(userRoutine)
+#define NewIAIdleProc(userRoutine) NewIAIdleUPP(userRoutine)
+#define CallIAAllocProc(userRoutine, inSize) InvokeIAAllocUPP(inSize, userRoutine)
+#define CallIAFreeProc(userRoutine, inObject) InvokeIAFreeUPP(inObject, userRoutine)
+#define CallIAIdleProc(userRoutine) InvokeIAIdleUPP(userRoutine)
+
+struct IAPluginInitBlock {
+ IAAllocUPP Alloc;
+ IAFreeUPP Free;
+ IAIdleUPP Idle;
+};
+typedef struct IAPluginInitBlock IAPluginInitBlock;
+typedef IAPluginInitBlock * IAPluginInitBlockPtr;
+/* IADocAccessorRecord functions */
+typedef CALLBACK_API_C( OSStatus , IADocAccessorOpenProcPtr )(IADocAccessorRef inAccessor);
+typedef CALLBACK_API_C( OSStatus , IADocAccessorCloseProcPtr )(IADocAccessorRef inAccessor);
+typedef CALLBACK_API_C( OSStatus , IADocAccessorReadProcPtr )(IADocAccessorRef inAccessor, void *buffer, UInt32 *ioSize);
+typedef CALLBACK_API_C( OSStatus , IASetDocAccessorReadPositionProcPtr )(IADocAccessorRef inAccessor, SInt32 inMode, SInt32 inOffset);
+typedef CALLBACK_API_C( OSStatus , IAGetDocAccessorReadPositionProcPtr )(IADocAccessorRef inAccessor, SInt32 *outPostion);
+typedef CALLBACK_API_C( OSStatus , IAGetDocAccessorEOFProcPtr )(IADocAccessorRef inAccessor, SInt32 *outEOF);
+typedef STACK_UPP_TYPE(IADocAccessorOpenProcPtr) IADocAccessorOpenUPP;
+typedef STACK_UPP_TYPE(IADocAccessorCloseProcPtr) IADocAccessorCloseUPP;
+typedef STACK_UPP_TYPE(IADocAccessorReadProcPtr) IADocAccessorReadUPP;
+typedef STACK_UPP_TYPE(IASetDocAccessorReadPositionProcPtr) IASetDocAccessorReadPositionUPP;
+typedef STACK_UPP_TYPE(IAGetDocAccessorReadPositionProcPtr) IAGetDocAccessorReadPositionUPP;
+typedef STACK_UPP_TYPE(IAGetDocAccessorEOFProcPtr) IAGetDocAccessorEOFUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(IADocAccessorOpenUPP)
+ NewIADocAccessorOpenUPP (IADocAccessorOpenProcPtr userRoutine);
+
+ EXTERN_API(IADocAccessorCloseUPP)
+ NewIADocAccessorCloseUPP (IADocAccessorCloseProcPtr userRoutine);
+
+ EXTERN_API(IADocAccessorReadUPP)
+ NewIADocAccessorReadUPP (IADocAccessorReadProcPtr userRoutine);
+
+ EXTERN_API(IASetDocAccessorReadPositionUPP)
+ NewIASetDocAccessorReadPositionUPP (IASetDocAccessorReadPositionProcPtr userRoutine);
+
+ EXTERN_API(IAGetDocAccessorReadPositionUPP)
+ NewIAGetDocAccessorReadPositionUPP (IAGetDocAccessorReadPositionProcPtr userRoutine);
+
+ EXTERN_API(IAGetDocAccessorEOFUPP)
+ NewIAGetDocAccessorEOFUPP (IAGetDocAccessorEOFProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeIADocAccessorOpenUPP (IADocAccessorOpenUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeIADocAccessorCloseUPP (IADocAccessorCloseUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeIADocAccessorReadUPP (IADocAccessorReadUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeIASetDocAccessorReadPositionUPP (IASetDocAccessorReadPositionUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeIAGetDocAccessorReadPositionUPP (IAGetDocAccessorReadPositionUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeIAGetDocAccessorEOFUPP (IAGetDocAccessorEOFUPP userUPP);
+
+ EXTERN_API(OSStatus)
+ InvokeIADocAccessorOpenUPP (IADocAccessorRef inAccessor,
+ IADocAccessorOpenUPP userUPP);
+
+ EXTERN_API(OSStatus)
+ InvokeIADocAccessorCloseUPP (IADocAccessorRef inAccessor,
+ IADocAccessorCloseUPP userUPP);
+
+ EXTERN_API(OSStatus)
+ InvokeIADocAccessorReadUPP (IADocAccessorRef inAccessor,
+ void * buffer,
+ UInt32 * ioSize,
+ IADocAccessorReadUPP userUPP);
+
+ EXTERN_API(OSStatus)
+ InvokeIASetDocAccessorReadPositionUPP (IADocAccessorRef inAccessor,
+ SInt32 inMode,
+ SInt32 inOffset,
+ IASetDocAccessorReadPositionUPP userUPP);
+
+ EXTERN_API(OSStatus)
+ InvokeIAGetDocAccessorReadPositionUPP (IADocAccessorRef inAccessor,
+ SInt32 * outPostion,
+ IAGetDocAccessorReadPositionUPP userUPP);
+
+ EXTERN_API(OSStatus)
+ InvokeIAGetDocAccessorEOFUPP (IADocAccessorRef inAccessor,
+ SInt32 * outEOF,
+ IAGetDocAccessorEOFUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppIADocAccessorOpenProcInfo = 0x000000F1 }; /* 4_bytes Func(4_bytes) */
+ enum { uppIADocAccessorCloseProcInfo = 0x000000F1 }; /* 4_bytes Func(4_bytes) */
+ enum { uppIADocAccessorReadProcInfo = 0x00000FF1 }; /* 4_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppIASetDocAccessorReadPositionProcInfo = 0x00000FF1 }; /* 4_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppIAGetDocAccessorReadPositionProcInfo = 0x000003F1 }; /* 4_bytes Func(4_bytes, 4_bytes) */
+ enum { uppIAGetDocAccessorEOFProcInfo = 0x000003F1 }; /* 4_bytes Func(4_bytes, 4_bytes) */
+ #define NewIADocAccessorOpenUPP(userRoutine) (IADocAccessorOpenUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppIADocAccessorOpenProcInfo, GetCurrentArchitecture())
+ #define NewIADocAccessorCloseUPP(userRoutine) (IADocAccessorCloseUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppIADocAccessorCloseProcInfo, GetCurrentArchitecture())
+ #define NewIADocAccessorReadUPP(userRoutine) (IADocAccessorReadUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppIADocAccessorReadProcInfo, GetCurrentArchitecture())
+ #define NewIASetDocAccessorReadPositionUPP(userRoutine) (IASetDocAccessorReadPositionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppIASetDocAccessorReadPositionProcInfo, GetCurrentArchitecture())
+ #define NewIAGetDocAccessorReadPositionUPP(userRoutine) (IAGetDocAccessorReadPositionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppIAGetDocAccessorReadPositionProcInfo, GetCurrentArchitecture())
+ #define NewIAGetDocAccessorEOFUPP(userRoutine) (IAGetDocAccessorEOFUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppIAGetDocAccessorEOFProcInfo, GetCurrentArchitecture())
+ #define DisposeIADocAccessorOpenUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeIADocAccessorCloseUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeIADocAccessorReadUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeIASetDocAccessorReadPositionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeIAGetDocAccessorReadPositionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeIAGetDocAccessorEOFUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeIADocAccessorOpenUPP(inAccessor, userUPP) (OSStatus)CALL_ONE_PARAMETER_UPP((userUPP), uppIADocAccessorOpenProcInfo, (inAccessor))
+ #define InvokeIADocAccessorCloseUPP(inAccessor, userUPP) (OSStatus)CALL_ONE_PARAMETER_UPP((userUPP), uppIADocAccessorCloseProcInfo, (inAccessor))
+ #define InvokeIADocAccessorReadUPP(inAccessor, buffer, ioSize, userUPP) (OSStatus)CALL_THREE_PARAMETER_UPP((userUPP), uppIADocAccessorReadProcInfo, (inAccessor), (buffer), (ioSize))
+ #define InvokeIASetDocAccessorReadPositionUPP(inAccessor, inMode, inOffset, userUPP) (OSStatus)CALL_THREE_PARAMETER_UPP((userUPP), uppIASetDocAccessorReadPositionProcInfo, (inAccessor), (inMode), (inOffset))
+ #define InvokeIAGetDocAccessorReadPositionUPP(inAccessor, outPostion, userUPP) (OSStatus)CALL_TWO_PARAMETER_UPP((userUPP), uppIAGetDocAccessorReadPositionProcInfo, (inAccessor), (outPostion))
+ #define InvokeIAGetDocAccessorEOFUPP(inAccessor, outEOF, userUPP) (OSStatus)CALL_TWO_PARAMETER_UPP((userUPP), uppIAGetDocAccessorEOFProcInfo, (inAccessor), (outEOF))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewIADocAccessorOpenProc(userRoutine) NewIADocAccessorOpenUPP(userRoutine)
+#define NewIADocAccessorCloseProc(userRoutine) NewIADocAccessorCloseUPP(userRoutine)
+#define NewIADocAccessorReadProc(userRoutine) NewIADocAccessorReadUPP(userRoutine)
+#define NewIASetDocAccessorReadPositionProc(userRoutine) NewIASetDocAccessorReadPositionUPP(userRoutine)
+#define NewIAGetDocAccessorReadPositionProc(userRoutine) NewIAGetDocAccessorReadPositionUPP(userRoutine)
+#define NewIAGetDocAccessorEOFProc(userRoutine) NewIAGetDocAccessorEOFUPP(userRoutine)
+#define CallIADocAccessorOpenProc(userRoutine, inAccessor) InvokeIADocAccessorOpenUPP(inAccessor, userRoutine)
+#define CallIADocAccessorCloseProc(userRoutine, inAccessor) InvokeIADocAccessorCloseUPP(inAccessor, userRoutine)
+#define CallIADocAccessorReadProc(userRoutine, inAccessor, buffer, ioSize) InvokeIADocAccessorReadUPP(inAccessor, buffer, ioSize, userRoutine)
+#define CallIASetDocAccessorReadPositionProc(userRoutine, inAccessor, inMode, inOffset) InvokeIASetDocAccessorReadPositionUPP(inAccessor, inMode, inOffset, userRoutine)
+#define CallIAGetDocAccessorReadPositionProc(userRoutine, inAccessor, outPostion) InvokeIAGetDocAccessorReadPositionUPP(inAccessor, outPostion, userRoutine)
+#define CallIAGetDocAccessorEOFProc(userRoutine, inAccessor, outEOF) InvokeIAGetDocAccessorEOFUPP(inAccessor, outEOF, userRoutine)
+/* IADocAccessorRecord */
+
+struct IADocAccessorRecord {
+ IADocAccessorRef docAccessor;
+ IADocAccessorOpenUPP OpenDoc;
+ IADocAccessorCloseUPP CloseDoc;
+ IADocAccessorReadUPP ReadDoc;
+ IASetDocAccessorReadPositionUPP SetReadPosition;
+ IAGetDocAccessorReadPositionUPP GetReadPosition;
+ IAGetDocAccessorEOFUPP GetEOF;
+};
+typedef struct IADocAccessorRecord IADocAccessorRecord;
+
+typedef IADocAccessorRecord * IADocAccessorPtr;
+/*
+ If building a text extractor, define BUILDING_IAEXTRACTOR to 1 to export
+ the following functions. If building a client of text extractor plug-ins,
+ define BUILDING_IAEXTRACTOR to false so the following methods are not
+ exported.
+*/
+#ifndef BUILDING_IAEXTRACTOR
+#define BUILDING_IAEXTRACTOR 1
+#endif
+#if BUILDING_IAEXTRACTOR
+#if PRAGMA_IMPORT
+#pragma export on
+#endif
+#endif
+/*
+ A Sherlock Plugin is a CFM shared library that implements the following functions:
+*/
+
+/*
+ IAPluginInit - plug-in's method that is called when opened by a client. The
+ plug-in retuns an IAPluginRef which is an opaque type defined by the plug-in
+ and used for the current session.
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+IAPluginInit (IAPluginInitBlockPtr initBlock,
+ IAPluginRef * outPluginRef);
+
+/*
+ IAPluginTerm - plug-in's method that is called when closed by a client. The
+ client passes back the IAPluginRef that was returned from IAPluginInit. At
+ this time the plug-in can perform any needed cleanup.
+*/
+EXTERN_API_C( OSStatus )
+IAPluginTerm (IAPluginRef inPluginRef);
+
+/*
+ IAGetExtractorVersion - returns the version of the Text Extractor interface that the
+ plug-in was built with.
+*/
+EXTERN_API_C( OSStatus )
+IAGetExtractorVersion (IAPluginRef inPluginRef,
+ UInt32 * outPluginVersion);
+
+/*
+ IACountSupportedDocTypes - returns number of document types the plug-in supports
+*/
+EXTERN_API_C( OSStatus )
+IACountSupportedDocTypes (IAPluginRef inPluginRef,
+ UInt32 * outCount);
+
+/*
+ IAGetIndSupportedDocType - returns the nth document type the plug-in supports.
+ First item is one not zero. Returns the MIME type of supported document
+*/
+EXTERN_API_C( OSStatus )
+IAGetIndSupportedDocType (IAPluginRef inPluginRef,
+ UInt32 inIndex,
+ char ** outMIMEType);
+
+/*
+ IAOpenDocument - returns a reference to the text of a document. Client passes in an
+ IADocAccessorRecord* that the plug-in can use to to access a document. Plug-in
+ returns IADocRef which an opaque type defined by plug-in to reference the text of
+ a document.
+*/
+EXTERN_API_C( OSStatus )
+IAOpenDocument (IAPluginRef inPluginRef,
+ IADocAccessorRecord * inDoc,
+ IADocRef * outDoc);
+
+/*
+ IACloseDocument - perform any cleanup for IADocRef that was returned from IAOpenDocument.
+*/
+EXTERN_API_C( OSStatus )
+IACloseDocument (IADocRef inDoc);
+
+/*
+ IAGetNextTextRun - get next run of text. On input, ioSize is the length of buffer argument.
+ On output, ioSize contains the number of bytes written to buffer argument
+*/
+EXTERN_API_C( OSStatus )
+IAGetNextTextRun (IADocRef inDoc,
+ void * buffer,
+ UInt32 * ioSize);
+
+/*
+ IAGetTextRunInfo - get information about the text returned from the last call to IAGetNextTextRun.
+ Arguments outEncoding ane outLanguage are options an NULL can be passed in. If arguments are
+ non-null, plug-in will return pointer to internet encoding and language of last run of text.
+ If encoding or language are unknown, plug-in will set *outEncoding and/or *outLanguage to NULL.
+*/
+EXTERN_API_C( OSStatus )
+IAGetTextRunInfo (IADocRef inDoc,
+ char ** outEncoding,
+ char ** outLanguage);
+
+
+
+#if BUILDING_IAEXTRACTOR
+#if PRAGMA_IMPORT
+#pragma export off
+#endif
+#endif
+
+
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __IAEXTRACTOR__ */
+
diff --git a/include/qt/Icons.h b/include/qt/Icons.h
new file mode 100644
index 000000000..89bdf7719
--- /dev/null
+++ b/include/qt/Icons.h
@@ -0,0 +1,1484 @@
+/*
+ File: Icons.h
+
+ Contains: Icon Utilities and Icon Services Interfaces.
+
+ Version: Technology: Mac OS 8.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1990-2001 by Apple Computer, Inc. All rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __ICONS__
+#define __ICONS__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+#ifndef __CODEFRAGMENTS__
+#include "CodeFragments.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* The following are icons for which there are both icon suites and SICNs. */
+/* Avoid using icon resources if possible. Use IconServices instead. */
+enum {
+ kGenericDocumentIconResource = -4000,
+ kGenericStationeryIconResource = -3985,
+ kGenericEditionFileIconResource = -3989,
+ kGenericApplicationIconResource = -3996,
+ kGenericDeskAccessoryIconResource = -3991,
+ kGenericFolderIconResource = -3999,
+ kPrivateFolderIconResource = -3994,
+ kFloppyIconResource = -3998,
+ kTrashIconResource = -3993,
+ kGenericRAMDiskIconResource = -3988,
+ kGenericCDROMIconResource = -3987
+};
+
+/* The following are icons for which there are SICNs only. */
+/* Avoid using icon resources if possible. Use IconServices instead. */
+enum {
+ kDesktopIconResource = -3992,
+ kOpenFolderIconResource = -3997,
+ kGenericHardDiskIconResource = -3995,
+ kGenericFileServerIconResource = -3972,
+ kGenericSuitcaseIconResource = -3970,
+ kGenericMoverObjectIconResource = -3969
+};
+
+/* The following are icons for which there are icon suites only. */
+/* Avoid using icon resources if possible. Use IconServices instead. */
+enum {
+ kGenericPreferencesIconResource = -3971,
+ kGenericQueryDocumentIconResource = -16506,
+ kGenericExtensionIconResource = -16415,
+ kSystemFolderIconResource = -3983,
+ kHelpIconResource = -20271,
+ kAppleMenuFolderIconResource = -3982
+};
+
+/* Obsolete. Use named constants defined above. */
+enum {
+ genericDocumentIconResource = kGenericDocumentIconResource,
+ genericStationeryIconResource = kGenericStationeryIconResource,
+ genericEditionFileIconResource = kGenericEditionFileIconResource,
+ genericApplicationIconResource = kGenericApplicationIconResource,
+ genericDeskAccessoryIconResource = kGenericDeskAccessoryIconResource,
+ genericFolderIconResource = kGenericFolderIconResource,
+ privateFolderIconResource = kPrivateFolderIconResource,
+ floppyIconResource = kFloppyIconResource,
+ trashIconResource = kTrashIconResource,
+ genericRAMDiskIconResource = kGenericRAMDiskIconResource,
+ genericCDROMIconResource = kGenericCDROMIconResource,
+ desktopIconResource = kDesktopIconResource,
+ openFolderIconResource = kOpenFolderIconResource,
+ genericHardDiskIconResource = kGenericHardDiskIconResource,
+ genericFileServerIconResource = kGenericFileServerIconResource,
+ genericSuitcaseIconResource = kGenericSuitcaseIconResource,
+ genericMoverObjectIconResource = kGenericMoverObjectIconResource,
+ genericPreferencesIconResource = kGenericPreferencesIconResource,
+ genericQueryDocumentIconResource = kGenericQueryDocumentIconResource,
+ genericExtensionIconResource = kGenericExtensionIconResource,
+ systemFolderIconResource = kSystemFolderIconResource,
+ appleMenuFolderIconResource = kAppleMenuFolderIconResource
+};
+
+/* Avoid using icon resources if possible. Use IconServices instead. */
+enum {
+ kStartupFolderIconResource = -3981,
+ kOwnedFolderIconResource = -3980,
+ kDropFolderIconResource = -3979,
+ kSharedFolderIconResource = -3978,
+ kMountedFolderIconResource = -3977,
+ kControlPanelFolderIconResource = -3976,
+ kPrintMonitorFolderIconResource = -3975,
+ kPreferencesFolderIconResource = -3974,
+ kExtensionsFolderIconResource = -3973,
+ kFontsFolderIconResource = -3968,
+ kFullTrashIconResource = -3984
+};
+
+/* Obsolete. Use named constants defined above. */
+enum {
+ startupFolderIconResource = kStartupFolderIconResource,
+ ownedFolderIconResource = kOwnedFolderIconResource,
+ dropFolderIconResource = kDropFolderIconResource,
+ sharedFolderIconResource = kSharedFolderIconResource,
+ mountedFolderIconResource = kMountedFolderIconResource,
+ controlPanelFolderIconResource = kControlPanelFolderIconResource,
+ printMonitorFolderIconResource = kPrintMonitorFolderIconResource,
+ preferencesFolderIconResource = kPreferencesFolderIconResource,
+ extensionsFolderIconResource = kExtensionsFolderIconResource,
+ fontsFolderIconResource = kFontsFolderIconResource,
+ fullTrashIconResource = kFullTrashIconResource
+};
+
+/* The following icon types can only be used as an icon element */
+/* inside a 'icns' icon family */
+enum {
+ kThumbnail32BitData = FOUR_CHAR_CODE('it32'),
+ kThumbnail8BitMask = FOUR_CHAR_CODE('t8mk')
+};
+
+enum {
+ kHuge1BitMask = FOUR_CHAR_CODE('ich#'),
+ kHuge4BitData = FOUR_CHAR_CODE('ich4'),
+ kHuge8BitData = FOUR_CHAR_CODE('ich8'),
+ kHuge32BitData = FOUR_CHAR_CODE('ih32'),
+ kHuge8BitMask = FOUR_CHAR_CODE('h8mk')
+};
+
+/* The following icon types can be used as a resource type */
+/* or as an icon element type inside a 'icns' icon family */
+enum {
+ kLarge1BitMask = FOUR_CHAR_CODE('ICN#'),
+ kLarge4BitData = FOUR_CHAR_CODE('icl4'),
+ kLarge8BitData = FOUR_CHAR_CODE('icl8'),
+ kLarge32BitData = FOUR_CHAR_CODE('il32'),
+ kLarge8BitMask = FOUR_CHAR_CODE('l8mk'),
+ kSmall1BitMask = FOUR_CHAR_CODE('ics#'),
+ kSmall4BitData = FOUR_CHAR_CODE('ics4'),
+ kSmall8BitData = FOUR_CHAR_CODE('ics8'),
+ kSmall32BitData = FOUR_CHAR_CODE('is32'),
+ kSmall8BitMask = FOUR_CHAR_CODE('s8mk'),
+ kMini1BitMask = FOUR_CHAR_CODE('icm#'),
+ kMini4BitData = FOUR_CHAR_CODE('icm4'),
+ kMini8BitData = FOUR_CHAR_CODE('icm8')
+};
+
+/* Icon Variants */
+/* These can be used as an element of an 'icns' icon family */
+/* or as a parameter to GetIconRefVariant */
+enum {
+ kTileIconVariant = FOUR_CHAR_CODE('tile'),
+ kRolloverIconVariant = FOUR_CHAR_CODE('over'),
+ kDropIconVariant = FOUR_CHAR_CODE('drop'),
+ kOpenIconVariant = FOUR_CHAR_CODE('open'),
+ kOpenDropIconVariant = FOUR_CHAR_CODE('odrp')
+};
+
+/* Obsolete. Use names defined above. */
+enum {
+ large1BitMask = kLarge1BitMask,
+ large4BitData = kLarge4BitData,
+ large8BitData = kLarge8BitData,
+ small1BitMask = kSmall1BitMask,
+ small4BitData = kSmall4BitData,
+ small8BitData = kSmall8BitData,
+ mini1BitMask = kMini1BitMask,
+ mini4BitData = kMini4BitData,
+ mini8BitData = kMini8BitData
+};
+
+/* Alignment type values. */
+enum {
+ kAlignNone = 0x00,
+ kAlignVerticalCenter = 0x01,
+ kAlignTop = 0x02,
+ kAlignBottom = 0x03,
+ kAlignHorizontalCenter = 0x04,
+ kAlignAbsoluteCenter = kAlignVerticalCenter | kAlignHorizontalCenter,
+ kAlignCenterTop = kAlignTop | kAlignHorizontalCenter,
+ kAlignCenterBottom = kAlignBottom | kAlignHorizontalCenter,
+ kAlignLeft = 0x08,
+ kAlignCenterLeft = kAlignVerticalCenter | kAlignLeft,
+ kAlignTopLeft = kAlignTop | kAlignLeft,
+ kAlignBottomLeft = kAlignBottom | kAlignLeft,
+ kAlignRight = 0x0C,
+ kAlignCenterRight = kAlignVerticalCenter | kAlignRight,
+ kAlignTopRight = kAlignTop | kAlignRight,
+ kAlignBottomRight = kAlignBottom | kAlignRight
+};
+
+/* Obsolete. Use names defined above. */
+enum {
+ atNone = kAlignNone,
+ atVerticalCenter = kAlignVerticalCenter,
+ atTop = kAlignTop,
+ atBottom = kAlignBottom,
+ atHorizontalCenter = kAlignHorizontalCenter,
+ atAbsoluteCenter = kAlignAbsoluteCenter,
+ atCenterTop = kAlignCenterTop,
+ atCenterBottom = kAlignCenterBottom,
+ atLeft = kAlignLeft,
+ atCenterLeft = kAlignCenterLeft,
+ atTopLeft = kAlignTopLeft,
+ atBottomLeft = kAlignBottomLeft,
+ atRight = kAlignRight,
+ atCenterRight = kAlignCenterRight,
+ atTopRight = kAlignTopRight,
+ atBottomRight = kAlignBottomRight
+};
+
+typedef SInt16 IconAlignmentType;
+/* Transform type values. */
+enum {
+ kTransformNone = 0x00,
+ kTransformDisabled = 0x01,
+ kTransformOffline = 0x02,
+ kTransformOpen = 0x03,
+ kTransformLabel1 = 0x0100,
+ kTransformLabel2 = 0x0200,
+ kTransformLabel3 = 0x0300,
+ kTransformLabel4 = 0x0400,
+ kTransformLabel5 = 0x0500,
+ kTransformLabel6 = 0x0600,
+ kTransformLabel7 = 0x0700,
+ kTransformSelected = 0x4000,
+ kTransformSelectedDisabled = kTransformSelected | kTransformDisabled,
+ kTransformSelectedOffline = kTransformSelected | kTransformOffline,
+ kTransformSelectedOpen = kTransformSelected | kTransformOpen
+};
+
+/* Obsolete. Use names defined above. */
+enum {
+ ttNone = kTransformNone,
+ ttDisabled = kTransformDisabled,
+ ttOffline = kTransformOffline,
+ ttOpen = kTransformOpen,
+ ttLabel1 = kTransformLabel1,
+ ttLabel2 = kTransformLabel2,
+ ttLabel3 = kTransformLabel3,
+ ttLabel4 = kTransformLabel4,
+ ttLabel5 = kTransformLabel5,
+ ttLabel6 = kTransformLabel6,
+ ttLabel7 = kTransformLabel7,
+ ttSelected = kTransformSelected,
+ ttSelectedDisabled = kTransformSelectedDisabled,
+ ttSelectedOffline = kTransformSelectedOffline,
+ ttSelectedOpen = kTransformSelectedOpen
+};
+
+typedef SInt16 IconTransformType;
+/* Selector mask values. */
+enum {
+ kSelectorLarge1Bit = 0x00000001,
+ kSelectorLarge4Bit = 0x00000002,
+ kSelectorLarge8Bit = 0x00000004,
+ kSelectorLarge32Bit = 0x00000008,
+ kSelectorLarge8BitMask = 0x00000010,
+ kSelectorSmall1Bit = 0x00000100,
+ kSelectorSmall4Bit = 0x00000200,
+ kSelectorSmall8Bit = 0x00000400,
+ kSelectorSmall32Bit = 0x00000800,
+ kSelectorSmall8BitMask = 0x00001000,
+ kSelectorMini1Bit = 0x00010000,
+ kSelectorMini4Bit = 0x00020000,
+ kSelectorMini8Bit = 0x00040000,
+ kSelectorHuge1Bit = 0x01000000,
+ kSelectorHuge4Bit = 0x02000000,
+ kSelectorHuge8Bit = 0x04000000,
+ kSelectorHuge32Bit = 0x08000000,
+ kSelectorHuge8BitMask = 0x10000000,
+ kSelectorAllLargeData = 0x000000FF,
+ kSelectorAllSmallData = 0x0000FF00,
+ kSelectorAllMiniData = 0x00FF0000,
+ kSelectorAllHugeData = (long)0xFF000000,
+ kSelectorAll1BitData = kSelectorLarge1Bit | kSelectorSmall1Bit | kSelectorMini1Bit | kSelectorHuge1Bit,
+ kSelectorAll4BitData = kSelectorLarge4Bit | kSelectorSmall4Bit | kSelectorMini4Bit | kSelectorHuge4Bit,
+ kSelectorAll8BitData = kSelectorLarge8Bit | kSelectorSmall8Bit | kSelectorMini8Bit | kSelectorHuge8Bit,
+ kSelectorAll32BitData = kSelectorLarge32Bit | kSelectorSmall32Bit | kSelectorHuge32Bit,
+ kSelectorAllAvailableData = (long)0xFFFFFFFF
+};
+
+
+/* Obsolete. Use names defined above. */
+enum {
+ svLarge1Bit = kSelectorLarge1Bit,
+ svLarge4Bit = kSelectorLarge4Bit,
+ svLarge8Bit = kSelectorLarge8Bit,
+ svSmall1Bit = kSelectorSmall1Bit,
+ svSmall4Bit = kSelectorSmall4Bit,
+ svSmall8Bit = kSelectorSmall8Bit,
+ svMini1Bit = kSelectorMini1Bit,
+ svMini4Bit = kSelectorMini4Bit,
+ svMini8Bit = kSelectorMini8Bit,
+ svAllLargeData = kSelectorAllLargeData,
+ svAllSmallData = kSelectorAllSmallData,
+ svAllMiniData = kSelectorAllMiniData,
+ svAll1BitData = kSelectorAll1BitData,
+ svAll4BitData = kSelectorAll4BitData,
+ svAll8BitData = kSelectorAll8BitData,
+ svAllAvailableData = kSelectorAllAvailableData
+};
+
+typedef UInt32 IconSelectorValue;
+typedef CALLBACK_API( OSErr , IconActionProcPtr )(ResType theType, Handle *theIcon, void *yourDataPtr);
+typedef CALLBACK_API( Handle , IconGetterProcPtr )(ResType theType, void *yourDataPtr);
+typedef STACK_UPP_TYPE(IconActionProcPtr) IconActionUPP;
+typedef STACK_UPP_TYPE(IconGetterProcPtr) IconGetterUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(IconActionUPP)
+ NewIconActionUPP (IconActionProcPtr userRoutine);
+
+ EXTERN_API(IconGetterUPP)
+ NewIconGetterUPP (IconGetterProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeIconActionUPP (IconActionUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeIconGetterUPP (IconGetterUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeIconActionUPP (ResType theType,
+ Handle * theIcon,
+ void * yourDataPtr,
+ IconActionUPP userUPP);
+
+ EXTERN_API(Handle)
+ InvokeIconGetterUPP (ResType theType,
+ void * yourDataPtr,
+ IconGetterUPP userUPP);
+
+#else
+ enum { uppIconActionProcInfo = 0x00000FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppIconGetterProcInfo = 0x000003F0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes) */
+ #define NewIconActionUPP(userRoutine) (IconActionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppIconActionProcInfo, GetCurrentArchitecture())
+ #define NewIconGetterUPP(userRoutine) (IconGetterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppIconGetterProcInfo, GetCurrentArchitecture())
+ #define DisposeIconActionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeIconGetterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeIconActionUPP(theType, theIcon, yourDataPtr, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppIconActionProcInfo, (theType), (theIcon), (yourDataPtr))
+ #define InvokeIconGetterUPP(theType, yourDataPtr, userUPP) (Handle)CALL_TWO_PARAMETER_UPP((userUPP), uppIconGetterProcInfo, (theType), (yourDataPtr))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewIconActionProc(userRoutine) NewIconActionUPP(userRoutine)
+#define NewIconGetterProc(userRoutine) NewIconGetterUPP(userRoutine)
+#define CallIconActionProc(userRoutine, theType, theIcon, yourDataPtr) InvokeIconActionUPP(theType, theIcon, yourDataPtr, userRoutine)
+#define CallIconGetterProc(userRoutine, theType, yourDataPtr) InvokeIconGetterUPP(theType, yourDataPtr, userRoutine)
+typedef IconGetterProcPtr IconGetter;
+typedef IconActionProcPtr IconAction;
+/* CIconHandle, GetCIcon(), PlotCIcon(), and DisposeCIcon() moved here from Quickdraw.h*/
+
+struct CIcon {
+ PixMap iconPMap; /*the icon's pixMap*/
+ BitMap iconMask; /*the icon's mask*/
+ BitMap iconBMap; /*the icon's bitMap*/
+ Handle iconData; /*the icon's data*/
+ SInt16 iconMaskData[1]; /*icon's mask and BitMap data*/
+};
+typedef struct CIcon CIcon;
+typedef CIcon * CIconPtr;
+typedef CIconPtr * CIconHandle;
+EXTERN_API( CIconHandle )
+GetCIcon (SInt16 iconID) ONEWORDINLINE(0xAA1E);
+
+EXTERN_API( void )
+PlotCIcon (const Rect * theRect,
+ CIconHandle theIcon) ONEWORDINLINE(0xAA1F);
+
+EXTERN_API( void )
+DisposeCIcon (CIconHandle theIcon) ONEWORDINLINE(0xAA25);
+
+
+/* GetIcon and PlotIcon moved here from ToolUtils*/
+EXTERN_API( Handle )
+GetIcon (SInt16 iconID) ONEWORDINLINE(0xA9BB);
+
+EXTERN_API( void )
+PlotIcon (const Rect * theRect,
+ Handle theIcon) ONEWORDINLINE(0xA94B);
+
+
+
+/*
+ Note: IconSuiteRef and IconCacheRef should be an abstract types,
+ but too much source code already relies on them being of type Handle.
+*/
+
+typedef Handle IconSuiteRef;
+typedef Handle IconCacheRef;
+/* IconRefs are 32-bit values identifying cached icon data. IconRef 0 is invalid.*/
+typedef struct OpaqueIconRef* IconRef;
+EXTERN_API( OSErr )
+PlotIconID (const Rect * theRect,
+ IconAlignmentType align,
+ IconTransformType transform,
+ SInt16 theResID) THREEWORDINLINE(0x303C, 0x0500, 0xABC9);
+
+EXTERN_API( OSErr )
+NewIconSuite (IconSuiteRef * theIconSuite) THREEWORDINLINE(0x303C, 0x0207, 0xABC9);
+
+EXTERN_API( OSErr )
+AddIconToSuite (Handle theIconData,
+ IconSuiteRef theSuite,
+ ResType theType) THREEWORDINLINE(0x303C, 0x0608, 0xABC9);
+
+EXTERN_API( OSErr )
+GetIconFromSuite (Handle * theIconData,
+ IconSuiteRef theSuite,
+ ResType theType) THREEWORDINLINE(0x303C, 0x0609, 0xABC9);
+
+EXTERN_API( OSErr )
+ForEachIconDo (IconSuiteRef theSuite,
+ IconSelectorValue selector,
+ IconActionUPP action,
+ void * yourDataPtr) THREEWORDINLINE(0x303C, 0x080A, 0xABC9);
+
+EXTERN_API( OSErr )
+GetIconSuite (IconSuiteRef * theIconSuite,
+ SInt16 theResID,
+ IconSelectorValue selector) THREEWORDINLINE(0x303C, 0x0501, 0xABC9);
+
+EXTERN_API( OSErr )
+DisposeIconSuite (IconSuiteRef theIconSuite,
+ Boolean disposeData) THREEWORDINLINE(0x303C, 0x0302, 0xABC9);
+
+EXTERN_API( OSErr )
+PlotIconSuite (const Rect * theRect,
+ IconAlignmentType align,
+ IconTransformType transform,
+ IconSuiteRef theIconSuite) THREEWORDINLINE(0x303C, 0x0603, 0xABC9);
+
+EXTERN_API( OSErr )
+MakeIconCache (IconCacheRef * theCache,
+ IconGetterUPP makeIcon,
+ void * yourDataPtr) THREEWORDINLINE(0x303C, 0x0604, 0xABC9);
+
+EXTERN_API( OSErr )
+LoadIconCache (const Rect * theRect,
+ IconAlignmentType align,
+ IconTransformType transform,
+ IconCacheRef theIconCache) THREEWORDINLINE(0x303C, 0x0606, 0xABC9);
+
+EXTERN_API( OSErr )
+PlotIconMethod (const Rect * theRect,
+ IconAlignmentType align,
+ IconTransformType transform,
+ IconGetterUPP theMethod,
+ void * yourDataPtr) THREEWORDINLINE(0x303C, 0x0805, 0xABC9);
+
+EXTERN_API( OSErr )
+GetLabel (SInt16 labelNumber,
+ RGBColor * labelColor,
+ Str255 labelString) THREEWORDINLINE(0x303C, 0x050B, 0xABC9);
+
+EXTERN_API( Boolean )
+PtInIconID (Point testPt,
+ const Rect * iconRect,
+ IconAlignmentType align,
+ SInt16 iconID) THREEWORDINLINE(0x303C, 0x060D, 0xABC9);
+
+EXTERN_API( Boolean )
+PtInIconSuite (Point testPt,
+ const Rect * iconRect,
+ IconAlignmentType align,
+ IconSuiteRef theIconSuite) THREEWORDINLINE(0x303C, 0x070E, 0xABC9);
+
+EXTERN_API( Boolean )
+PtInIconMethod (Point testPt,
+ const Rect * iconRect,
+ IconAlignmentType align,
+ IconGetterUPP theMethod,
+ void * yourDataPtr) THREEWORDINLINE(0x303C, 0x090F, 0xABC9);
+
+EXTERN_API( Boolean )
+RectInIconID (const Rect * testRect,
+ const Rect * iconRect,
+ IconAlignmentType align,
+ SInt16 iconID) THREEWORDINLINE(0x303C, 0x0610, 0xABC9);
+
+EXTERN_API( Boolean )
+RectInIconSuite (const Rect * testRect,
+ const Rect * iconRect,
+ IconAlignmentType align,
+ IconSuiteRef theIconSuite) THREEWORDINLINE(0x303C, 0x0711, 0xABC9);
+
+EXTERN_API( Boolean )
+RectInIconMethod (const Rect * testRect,
+ const Rect * iconRect,
+ IconAlignmentType align,
+ IconGetterUPP theMethod,
+ void * yourDataPtr) THREEWORDINLINE(0x303C, 0x0912, 0xABC9);
+
+EXTERN_API( OSErr )
+IconIDToRgn (RgnHandle theRgn,
+ const Rect * iconRect,
+ IconAlignmentType align,
+ SInt16 iconID) THREEWORDINLINE(0x303C, 0x0613, 0xABC9);
+
+EXTERN_API( OSErr )
+IconSuiteToRgn (RgnHandle theRgn,
+ const Rect * iconRect,
+ IconAlignmentType align,
+ IconSuiteRef theIconSuite) THREEWORDINLINE(0x303C, 0x0714, 0xABC9);
+
+EXTERN_API( OSErr )
+IconMethodToRgn (RgnHandle theRgn,
+ const Rect * iconRect,
+ IconAlignmentType align,
+ IconGetterUPP theMethod,
+ void * yourDataPtr) THREEWORDINLINE(0x303C, 0x0915, 0xABC9);
+
+EXTERN_API( OSErr )
+SetSuiteLabel (IconSuiteRef theSuite,
+ SInt16 theLabel) THREEWORDINLINE(0x303C, 0x0316, 0xABC9);
+
+EXTERN_API( SInt16 )
+GetSuiteLabel (IconSuiteRef theSuite) THREEWORDINLINE(0x303C, 0x0217, 0xABC9);
+
+EXTERN_API( OSErr )
+GetIconCacheData (IconCacheRef theCache,
+ void ** theData) THREEWORDINLINE(0x303C, 0x0419, 0xABC9);
+
+EXTERN_API( OSErr )
+SetIconCacheData (IconCacheRef theCache,
+ void * theData) THREEWORDINLINE(0x303C, 0x041A, 0xABC9);
+
+EXTERN_API( OSErr )
+GetIconCacheProc (IconCacheRef theCache,
+ IconGetterUPP * theProc) THREEWORDINLINE(0x303C, 0x041B, 0xABC9);
+
+EXTERN_API( OSErr )
+SetIconCacheProc (IconCacheRef theCache,
+ IconGetterUPP theProc) THREEWORDINLINE(0x303C, 0x041C, 0xABC9);
+
+EXTERN_API( OSErr )
+PlotIconHandle (const Rect * theRect,
+ IconAlignmentType align,
+ IconTransformType transform,
+ Handle theIcon) THREEWORDINLINE(0x303C, 0x061D, 0xABC9);
+
+EXTERN_API( OSErr )
+PlotSICNHandle (const Rect * theRect,
+ IconAlignmentType align,
+ IconTransformType transform,
+ Handle theSICN) THREEWORDINLINE(0x303C, 0x061E, 0xABC9);
+
+EXTERN_API( OSErr )
+PlotCIconHandle (const Rect * theRect,
+ IconAlignmentType align,
+ IconTransformType transform,
+ CIconHandle theCIcon) THREEWORDINLINE(0x303C, 0x061F, 0xABC9);
+
+
+
+
+
+
+
+
+
+
+
+/*
+ IconServices is an efficient mechanism to share icon data amongst multiple
+ clients. It avoids duplication of data; it provides efficient caching,
+ releasing memory when the icon data is no longer needed; it can provide
+ the appropriate icon for any filesystem object; it can provide commonly
+ used icons (caution, note, help...); it is Appearance-savvy: the icons
+ are switched when appropriate.
+ IconServices refer to cached icon data using IconRef, a 32-bit opaque
+ value. IconRefs are reference counted. When there are no more "owners"
+ of an IconRef, the memory used by the icon bitmap is disposed of.
+ Two files of same type and creator with no custom icon will have the same IconRef.
+ Files with custom icons will have their own IconRef.
+*/
+
+/*
+ Use the special creator kSystemIconsCreator to get "standard" icons
+ that are not associated with a file, such as the help icon.
+ Note that all lowercase creators are reserved by Apple.
+*/
+enum {
+ kSystemIconsCreator = FOUR_CHAR_CODE('macs')
+};
+
+
+/*
+ Type of the predefined/generic icons. For example, the call:
+ err = GetIconRef(kOnSystemDisk, kSystemIconsCreator, kHelpIcon, &iconRef);
+ will retun in iconRef the IconRef for the standard help icon.
+*/
+
+/* Generic Finder icons */
+enum {
+ kClipboardIcon = FOUR_CHAR_CODE('CLIP'),
+ kClippingUnknownTypeIcon = FOUR_CHAR_CODE('clpu'),
+ kClippingPictureTypeIcon = FOUR_CHAR_CODE('clpp'),
+ kClippingTextTypeIcon = FOUR_CHAR_CODE('clpt'),
+ kClippingSoundTypeIcon = FOUR_CHAR_CODE('clps'),
+ kDesktopIcon = FOUR_CHAR_CODE('desk'),
+ kFinderIcon = FOUR_CHAR_CODE('FNDR'),
+ kFontSuitcaseIcon = FOUR_CHAR_CODE('FFIL'),
+ kFullTrashIcon = FOUR_CHAR_CODE('ftrh'),
+ kGenericApplicationIcon = FOUR_CHAR_CODE('APPL'),
+ kGenericCDROMIcon = FOUR_CHAR_CODE('cddr'),
+ kGenericControlPanelIcon = FOUR_CHAR_CODE('APPC'),
+ kGenericControlStripModuleIcon = FOUR_CHAR_CODE('sdev'),
+ kGenericComponentIcon = FOUR_CHAR_CODE('thng'),
+ kGenericDeskAccessoryIcon = FOUR_CHAR_CODE('APPD'),
+ kGenericDocumentIcon = FOUR_CHAR_CODE('docu'),
+ kGenericEditionFileIcon = FOUR_CHAR_CODE('edtf'),
+ kGenericExtensionIcon = FOUR_CHAR_CODE('INIT'),
+ kGenericFileServerIcon = FOUR_CHAR_CODE('srvr'),
+ kGenericFontIcon = FOUR_CHAR_CODE('ffil'),
+ kGenericFontScalerIcon = FOUR_CHAR_CODE('sclr'),
+ kGenericFloppyIcon = FOUR_CHAR_CODE('flpy'),
+ kGenericHardDiskIcon = FOUR_CHAR_CODE('hdsk'),
+ kGenericRemovableMediaIcon = FOUR_CHAR_CODE('rmov'),
+ kGenericMoverObjectIcon = FOUR_CHAR_CODE('movr'),
+ kGenericPCCardIcon = FOUR_CHAR_CODE('pcmc'),
+ kGenericPreferencesIcon = FOUR_CHAR_CODE('pref'),
+ kGenericQueryDocumentIcon = FOUR_CHAR_CODE('qery'),
+ kGenericRAMDiskIcon = FOUR_CHAR_CODE('ramd'),
+ kGenericSharedLibaryIcon = FOUR_CHAR_CODE('shlb'),
+ kGenericStationeryIcon = FOUR_CHAR_CODE('sdoc'),
+ kGenericSuitcaseIcon = FOUR_CHAR_CODE('suit'),
+ kGenericWORMIcon = FOUR_CHAR_CODE('worm'),
+ kInternationResourcesIcon = FOUR_CHAR_CODE('ifil'),
+ kKeyboardLayoutIcon = FOUR_CHAR_CODE('kfil'),
+ kSoundFileIcon = FOUR_CHAR_CODE('sfil'),
+ kSystemSuitcaseIcon = FOUR_CHAR_CODE('zsys'),
+ kTrashIcon = FOUR_CHAR_CODE('trsh'),
+ kTrueTypeFontIcon = FOUR_CHAR_CODE('tfil'),
+ kTrueTypeFlatFontIcon = FOUR_CHAR_CODE('sfnt'),
+ kTrueTypeMultiFlatFontIcon = FOUR_CHAR_CODE('ttcf')
+};
+
+/* Internet locations */
+enum {
+ kInternetLocationHTTPIcon = FOUR_CHAR_CODE('ilht'),
+ kInternetLocationFTPIcon = FOUR_CHAR_CODE('ilft'),
+ kInternetLocationAppleShareIcon = FOUR_CHAR_CODE('ilaf'),
+ kInternetLocationAppleTalkZoneIcon = FOUR_CHAR_CODE('ilat'),
+ kInternetLocationFileIcon = FOUR_CHAR_CODE('ilfi'),
+ kInternetLocationMailIcon = FOUR_CHAR_CODE('ilma'),
+ kInternetLocationNewsIcon = FOUR_CHAR_CODE('ilnw'),
+ kInternetLocationNSLNeighborhoodIcon = FOUR_CHAR_CODE('ilns'),
+ kInternetLocationGenericIcon = FOUR_CHAR_CODE('ilge')
+};
+
+/* Folders */
+enum {
+ kGenericFolderIcon = FOUR_CHAR_CODE('fldr'),
+ kDropFolderIcon = FOUR_CHAR_CODE('dbox'),
+ kMountedFolderIcon = FOUR_CHAR_CODE('mntd'),
+ kOpenFolderIcon = FOUR_CHAR_CODE('ofld'),
+ kOwnedFolderIcon = FOUR_CHAR_CODE('ownd'),
+ kPrivateFolderIcon = FOUR_CHAR_CODE('prvf'),
+ kSharedFolderIcon = FOUR_CHAR_CODE('shfl')
+};
+
+/* Sharing Privileges icons */
+enum {
+ kSharingPrivsNotApplicableIcon = FOUR_CHAR_CODE('shna'),
+ kSharingPrivsReadOnlyIcon = FOUR_CHAR_CODE('shro'),
+ kSharingPrivsReadWriteIcon = FOUR_CHAR_CODE('shrw'),
+ kSharingPrivsUnknownIcon = FOUR_CHAR_CODE('shuk'),
+ kSharingPrivsWritableIcon = FOUR_CHAR_CODE('writ')
+};
+
+
+/* Users and Groups icons */
+enum {
+ kUserFolderIcon = FOUR_CHAR_CODE('ufld'),
+ kWorkgroupFolderIcon = FOUR_CHAR_CODE('wfld'),
+ kGuestUserIcon = FOUR_CHAR_CODE('gusr'),
+ kUserIcon = FOUR_CHAR_CODE('user'),
+ kOwnerIcon = FOUR_CHAR_CODE('susr'),
+ kGroupIcon = FOUR_CHAR_CODE('grup')
+};
+
+/* Special folders */
+enum {
+ kAppleExtrasFolderIcon = FOUR_CHAR_CODE('aexÄ'),
+ kAppleMenuFolderIcon = FOUR_CHAR_CODE('amnu'),
+ kApplicationsFolderIcon = FOUR_CHAR_CODE('apps'),
+ kApplicationSupportFolderIcon = FOUR_CHAR_CODE('asup'),
+ kAssistantsFolderIcon = FOUR_CHAR_CODE('astÄ'),
+ kContextualMenuItemsFolderIcon = FOUR_CHAR_CODE('cmnu'),
+ kControlPanelDisabledFolderIcon = FOUR_CHAR_CODE('ctrD'),
+ kControlPanelFolderIcon = FOUR_CHAR_CODE('ctrl'),
+ kControlStripModulesFolderIcon = FOUR_CHAR_CODE('sdvÄ'),
+ kDocumentsFolderIcon = FOUR_CHAR_CODE('docs'),
+ kExtensionsDisabledFolderIcon = FOUR_CHAR_CODE('extD'),
+ kExtensionsFolderIcon = FOUR_CHAR_CODE('extn'),
+ kFavoritesFolderIcon = FOUR_CHAR_CODE('favs'),
+ kFontsFolderIcon = FOUR_CHAR_CODE('font'),
+ kHelpFolderIcon = FOUR_CHAR_CODE('Ählp'),
+ kInternetFolderIcon = FOUR_CHAR_CODE('intÄ'),
+ kInternetPlugInFolderIcon = FOUR_CHAR_CODE('Änet'),
+ kLocalesFolderIcon = FOUR_CHAR_CODE('Äloc'),
+ kMacOSReadMeFolderIcon = FOUR_CHAR_CODE('morÄ'),
+ kPreferencesFolderIcon = FOUR_CHAR_CODE('prfÄ'),
+ kPrinterDescriptionFolderIcon = FOUR_CHAR_CODE('ppdf'),
+ kPrinterDriverFolderIcon = FOUR_CHAR_CODE('Äprd'),
+ kPrintMonitorFolderIcon = FOUR_CHAR_CODE('prnt'),
+ kRecentApplicationsFolderIcon = FOUR_CHAR_CODE('rapp'),
+ kRecentDocumentsFolderIcon = FOUR_CHAR_CODE('rdoc'),
+ kRecentServersFolderIcon = FOUR_CHAR_CODE('rsrv'),
+ kScriptingAdditionsFolderIcon = FOUR_CHAR_CODE('Äscr'),
+ kSharedLibrariesFolderIcon = FOUR_CHAR_CODE('Älib'),
+ kScriptsFolderIcon = FOUR_CHAR_CODE('scrÄ'),
+ kShutdownItemsDisabledFolderIcon = FOUR_CHAR_CODE('shdD'),
+ kShutdownItemsFolderIcon = FOUR_CHAR_CODE('shdf'),
+ kSpeakableItemsFolder = FOUR_CHAR_CODE('spki'),
+ kStartupItemsDisabledFolderIcon = FOUR_CHAR_CODE('strD'),
+ kStartupItemsFolderIcon = FOUR_CHAR_CODE('strt'),
+ kSystemExtensionDisabledFolderIcon = FOUR_CHAR_CODE('macD'),
+ kSystemFolderIcon = FOUR_CHAR_CODE('macs'),
+ kTextEncodingsFolderIcon = FOUR_CHAR_CODE('Ätex'),
+ kAppearanceFolderIcon = FOUR_CHAR_CODE('appr'),
+ kUtilitiesFolderIcon = FOUR_CHAR_CODE('utiÄ'),
+ kVoicesFolderIcon = FOUR_CHAR_CODE('fvoc'),
+ kColorSyncFolderIcon = FOUR_CHAR_CODE('prof'),
+ kInternetSearchSitesFolderIcon = FOUR_CHAR_CODE('issf'),
+ kUsersFolderIcon = FOUR_CHAR_CODE('usrÄ')
+};
+
+/* Badges */
+enum {
+ kAppleScriptBadgeIcon = FOUR_CHAR_CODE('scrp'),
+ kLockedBadgeIcon = FOUR_CHAR_CODE('lbdg'),
+ kMountedBadgeIcon = FOUR_CHAR_CODE('mbdg'),
+ kSharedBadgeIcon = FOUR_CHAR_CODE('sbdg'),
+ kAliasBadgeIcon = FOUR_CHAR_CODE('abdg')
+};
+
+/* Alert icons */
+enum {
+ kAlertNoteIcon = FOUR_CHAR_CODE('note'),
+ kAlertCautionIcon = FOUR_CHAR_CODE('caut'),
+ kAlertStopIcon = FOUR_CHAR_CODE('stop')
+};
+
+/* Networking icons */
+enum {
+ kAppleTalkIcon = FOUR_CHAR_CODE('atlk'),
+ kAppleTalkZoneIcon = FOUR_CHAR_CODE('atzn'),
+ kAFPServerIcon = FOUR_CHAR_CODE('afps'),
+ kFTPServerIcon = FOUR_CHAR_CODE('ftps'),
+ kHTTPServerIcon = FOUR_CHAR_CODE('htps'),
+ kGenericNetworkIcon = FOUR_CHAR_CODE('gnet'),
+ kIPFileServerIcon = FOUR_CHAR_CODE('isrv')
+};
+
+/* Other icons */
+enum {
+ kAppleLogoIcon = FOUR_CHAR_CODE('capl'),
+ kAppleMenuIcon = FOUR_CHAR_CODE('sapl'),
+ kBackwardArrowIcon = FOUR_CHAR_CODE('baro'),
+ kFavoriteItemsIcon = FOUR_CHAR_CODE('favr'),
+ kForwardArrowIcon = FOUR_CHAR_CODE('faro'),
+ kGridIcon = FOUR_CHAR_CODE('grid'),
+ kHelpIcon = FOUR_CHAR_CODE('help'),
+ kKeepArrangedIcon = FOUR_CHAR_CODE('arng'),
+ kLockedIcon = FOUR_CHAR_CODE('lock'),
+ kNoFilesIcon = FOUR_CHAR_CODE('nfil'),
+ kNoFolderIcon = FOUR_CHAR_CODE('nfld'),
+ kNoWriteIcon = FOUR_CHAR_CODE('nwrt'),
+ kProtectedApplicationFolderIcon = FOUR_CHAR_CODE('papp'),
+ kProtectedSystemFolderIcon = FOUR_CHAR_CODE('psys'),
+ kRecentItemsIcon = FOUR_CHAR_CODE('rcnt'),
+ kShortcutIcon = FOUR_CHAR_CODE('shrt'),
+ kSortAscendingIcon = FOUR_CHAR_CODE('asnd'),
+ kSortDescendingIcon = FOUR_CHAR_CODE('dsnd'),
+ kUnlockedIcon = FOUR_CHAR_CODE('ulck'),
+ kConnectToIcon = FOUR_CHAR_CODE('cnct')
+};
+
+
+
+/* IconServicesUsageFlags */
+typedef UInt32 IconServicesUsageFlags;
+enum {
+ kIconServicesNormalUsageFlag = 0
+};
+
+
+/*
+ IconFamily 'icns' resources contain an entire IconFamily (all sizes and depths).
+ For custom icons, icns IconFamily resources of the custom icon resource ID are fetched first before
+ the classic custom icons (individual 'ics#, ICN#, etc) are fetched. If the fetch of the icns resource
+ succeeds then the icns is looked at exclusively for the icon data.
+ For custom icons, new icon features such as 32-bit deep icons are only fetched from the icns resource.
+ This is to avoid incompatibilities with cut & paste of new style icons with an older version of the
+ MacOS Finder.
+ DriverGestalt is called with code kdgMediaIconSuite by IconServices after calling FSM to determine a
+ driver icon for a particular device. The result of the kdgMediaIconSuite call to DriverGestalt should
+ be a pointer an an IconFamily. In this manner driver vendors can provide rich, detailed drive icons
+ instead of the 1-bit variety previously supported.
+*/
+enum {
+ kIconFamilyType = FOUR_CHAR_CODE('icns')
+};
+
+
+
+struct IconFamilyElement {
+ OSType elementType; /* 'ICN#', 'icl8', etc...*/
+ Size elementSize; /* Size of this element*/
+ unsigned char elementData[1];
+};
+typedef struct IconFamilyElement IconFamilyElement;
+
+struct IconFamilyResource {
+ OSType resourceType; /* Always 'icns'*/
+ Size resourceSize; /* Total size of this resource*/
+ IconFamilyElement elements[1];
+
+};
+typedef struct IconFamilyResource IconFamilyResource;
+
+typedef IconFamilyResource * IconFamilyPtr;
+typedef IconFamilyPtr * IconFamilyHandle;
+/*
+ ==============================================================================
+ Initialization and Termination
+ ==============================================================================
+*/
+
+/*
+ IconServicesInit
+
+ Call this routine once per classic 68K application initialization.
+ This routine does not need to be called at boot time.
+*/
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+IconServicesInit (CFragInitBlockPtr initBlockPtr) TWOWORDINLINE(0x7015, 0xAA75);
+
+
+/*
+ IconServicesTerminate:
+
+ Call this routine once from the termination of a classic 68K application.
+ This routine does not need to be called at boot time.
+*/
+
+EXTERN_API( void )
+IconServicesTerminate (void) TWOWORDINLINE(0x7016, 0xAA75);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+/*
+ ==============================================================================
+ Converting data structures
+ ==============================================================================
+*/
+
+
+/*
+ IconRefToIconFamily
+ This routines returns a new IconFamily that contains the data corresponding
+ to the specified IconRef.
+*/
+
+EXTERN_API( OSErr )
+IconRefToIconFamily (IconRef theIconRef,
+ IconSelectorValue whichIcons,
+ IconFamilyHandle * iconFamily) TWOWORDINLINE(0x7024, 0xAA75);
+
+
+/*
+ IconFamilyToIconSuite
+ This routine transfers the data from an icon family handle into an icon suite.
+*/
+
+EXTERN_API( OSErr )
+IconFamilyToIconSuite (IconFamilyHandle iconFamily,
+ IconSelectorValue whichIcons,
+ IconSuiteRef * iconSuite) TWOWORDINLINE(0x7025, 0xAA75);
+
+
+/*
+ IconSuiteToIconFamily
+ This routine transfers the data in an icon suite into an icon family.
+*/
+
+EXTERN_API( OSErr )
+IconSuiteToIconFamily (IconSuiteRef iconSuite,
+ IconSelectorValue whichIcons,
+ IconFamilyHandle * iconFamily) TWOWORDINLINE(0x7026, 0xAA75);
+
+
+/*
+ SetIconFamilyData
+ Change the data of an icon family. The data is copied.
+ The type can be one of the icon type, or 'PICT'.
+ The data will be compressed if needed.
+*/
+
+EXTERN_API( OSErr )
+SetIconFamilyData (IconFamilyHandle iconFamily,
+ OSType iconType,
+ Handle h) TWOWORDINLINE(0x7030, 0xAA75);
+
+
+/*
+ GetIconFamilyData
+ Return a copy of the data in the icon family.
+ The type can be one of the icon type, or 'PICT'
+ The data will be returned uncompressed.
+ The handle (h) will be resized as appropriate. If no data of the
+ requested type is present, the handle size will be set to 0.
+*/
+
+EXTERN_API( OSErr )
+GetIconFamilyData (IconFamilyHandle iconFamily,
+ OSType iconType,
+ Handle h) TWOWORDINLINE(0x7031, 0xAA75);
+
+
+/*
+ ==============================================================================
+ Reference counting
+ ==============================================================================
+*/
+
+
+/*
+ GetIconRefOwners
+
+ This routine returns the reference count for the IconRef, or number of owners.
+
+ A valid IconRef always has at least one owner.
+*/
+
+EXTERN_API( OSErr )
+GetIconRefOwners (IconRef theIconRef,
+ UInt16 * owners) TWOWORDINLINE(0x700B, 0xAA75);
+
+
+/*
+ AcquireIconRef
+ This routine increments the reference count for the IconRef
+*/
+
+EXTERN_API( OSErr )
+AcquireIconRef (IconRef theIconRef) TWOWORDINLINE(0x7027, 0xAA75);
+
+
+
+/*
+ ReleaseIconRef
+
+ This routine decrements the reference count for the IconRef.
+
+ When the reference count reaches 0, all memory allocated for the icon
+ is disposed. Any subsequent use of the IconRef is invalid.
+*/
+
+EXTERN_API( OSErr )
+ReleaseIconRef (IconRef theIconRef) TWOWORDINLINE(0x7028, 0xAA75);
+
+
+
+/*
+ ==============================================================================
+ Getting an IconRef
+ ==============================================================================
+*/
+
+
+/*
+ GetIconRefFromFile
+
+ This routine returns an icon ref for the specified file, folder or volume.
+ The label information is provided separately, since two files with the same icon
+ but a different label would share the same iconRef. The label can be used in
+ PlotIconRef() for example.
+
+ Use this routine if you have no information about the file system object. If
+ you have already done a GetCatInfo on the file and want to save some I/O,
+ call GetIconRefFromFolder() if you know it's a folder with no custom icon or
+ call GetIconRef() if it's a file with no custom icon.
+ This routine increments the reference count of the returned IconRef. Call
+ ReleaseIconRef() when you're done with it.
+*/
+
+EXTERN_API( OSErr )
+GetIconRefFromFile (const FSSpec * theFile,
+ IconRef * theIconRef,
+ SInt16 * theLabel) TWOWORDINLINE(0x7002, 0xAA75);
+
+
+
+/*
+ GetIconRef
+
+ This routine returns an icon ref for an icon in the desktop database or
+ for a registered icon.
+ The system registers a set of icon such as the help icon with the creator
+ code kSystemIconsCreator. See above for a list of the registered system types.
+ The vRefNum is used as a hint on where to look for the icon first. Use
+ kOnSystemDisk if you don't know what to pass.
+ This routine increments the reference count of the returned IconRef. Call
+ ReleaseIconRef() when you're done with it.
+*/
+
+EXTERN_API( OSErr )
+GetIconRef (SInt16 vRefNum,
+ OSType creator,
+ OSType iconType,
+ IconRef * theIconRef) TWOWORDINLINE(0x7021, 0xAA75);
+
+
+
+/*
+ GetIconRefFromFolder
+
+ This routine returns an icon ref for a folder with no custom icon.
+ Use the more generic, but slightly slower, GetIconRefFromFile() if
+ you don't already have the necessary info about the file.
+ Attributes should be CInfoPBRec.dirInfo.ioFlAttrib for this folder.
+ Access privileges should be CInfoPBRec.dirInfo.ioACUser for this folder.
+ This routine increments the reference count of the IconRef. Call ReleaseIconRef()
+ when you're done with it.
+*/
+
+EXTERN_API( OSErr )
+GetIconRefFromFolder (SInt16 vRefNum,
+ SInt32 parentFolderID,
+ SInt32 folderID,
+ SInt8 attributes,
+ SInt8 accessPrivileges,
+ IconRef * theIconRef) TWOWORDINLINE(0x7022, 0xAA75);
+
+
+
+/*
+ ==============================================================================
+ Adding and modifying IconRef
+ ==============================================================================
+*/
+
+
+/*
+ RegisterIconRefFromIconFamily
+ This routine adds a new entry to the IconRef registry. Other clients will be
+ able to access it using the (creator, iconType) pair specified here.
+ Lower-case creators are reserved for the system.
+ Consider using RegisterIconRefFromResource() if possible, since the data
+ registered using RegisterIconRefFromFamily() cannot be purged.
+ The iconFamily data is copied and the caller is reponsible for disposing of it.
+ This routine increments the reference count of the IconRef. Call ReleaseIconRef()
+ when you're done with it.
+*/
+
+EXTERN_API( OSErr )
+RegisterIconRefFromIconFamily (OSType creator,
+ OSType iconType,
+ IconFamilyHandle iconFamily,
+ IconRef * theIconRef) TWOWORDINLINE(0x701C, 0xAA75);
+
+
+/*
+ RegisterIconRefFromResource
+
+ Registers an IconRef from a resouce file.
+ Lower-case creators are reserved for the system.
+ The icon data to be fetched is either classic icon data or an icon family.
+ The 'icns' icon family is searched for before the classic icon data.
+ This routine increments the reference count of the IconRef. Call ReleaseIconRef()
+ when you're done with it.
+*/
+
+EXTERN_API( OSErr )
+RegisterIconRefFromResource (OSType creator,
+ OSType iconType,
+ const FSSpec * resourceFile,
+ SInt16 resourceID,
+ IconRef * theIconRef) TWOWORDINLINE(0x7023, 0xAA75);
+
+
+/*
+ UnregisterIconRef
+
+ Removes the specified icon from the icon cache (if there are no users of it).
+ If some clients are using this iconRef, then the IconRef will be removed when the
+ last user calls ReleaseIconRef.
+*/
+
+EXTERN_API( OSErr )
+UnregisterIconRef (OSType creator,
+ OSType iconType) TWOWORDINLINE(0x7008, 0xAA75);
+
+
+
+/*
+ UpdateIconRef
+
+ Call this routine to force an update of the data for iconRef.
+
+ For example after changing an icon in the desktop database or changing the custom
+ icon of a file. Note that after _adding_ a custom icon to file or folder, you
+ need to call GetIconRefFromFile() to get a new IconRef specific to this file.
+
+ This routine does nothing if the IconRef is a registered icon.
+*/
+
+EXTERN_API( OSErr )
+UpdateIconRef (IconRef theIconRef) TWOWORDINLINE(0x7009, 0xAA75);
+
+
+
+/*
+ OverrideIconRefFromResource
+
+ This routines replaces the bitmaps of the specified IconRef with the ones
+ in the specified resource file.
+*/
+
+EXTERN_API( OSErr )
+OverrideIconRefFromResource (IconRef theIconRef,
+ const FSSpec * resourceFile,
+ SInt16 resourceID) TWOWORDINLINE(0x702A, 0xAA75);
+
+
+
+/*
+ OverrideIconRef
+
+ This routines replaces the bitmaps of the specified IconRef with the ones
+ from the new IconRef.
+*/
+
+EXTERN_API( OSErr )
+OverrideIconRef (IconRef oldIconRef,
+ IconRef newIconRef) TWOWORDINLINE(0x702B, 0xAA75);
+
+
+/*
+ RemoveIconRefOverride
+ This routine remove an override if one was applied to the icon and
+ reverts back to the original bitmap data.
+*/
+
+EXTERN_API( OSErr )
+RemoveIconRefOverride (IconRef theIconRef) TWOWORDINLINE(0x701E, 0xAA75);
+
+
+
+/*
+ ==============================================================================
+ Creating composite IconRef
+ ==============================================================================
+*/
+
+
+/*
+ CompositeIconRef
+
+ Superimposes an IconRef on top of another one
+*/
+
+EXTERN_API( OSErr )
+CompositeIconRef (IconRef backgroundIconRef,
+ IconRef foregroundIconRef,
+ IconRef * compositeIconRef) TWOWORDINLINE(0x7014, 0xAA75);
+
+
+/*
+ IsIconRefComposite
+ Indicates if a given icon ref is a composite of two other icon refs (and which ones)
+ If it isn't a composite, backgroundIconRef and foreGroundIconRef will be 0.
+*/
+
+EXTERN_API( OSErr )
+IsIconRefComposite (IconRef compositeIconRef,
+ IconRef * backgroundIconRef,
+ IconRef * foregroundIconRef) TWOWORDINLINE(0x701A, 0xAA75);
+
+
+
+/*
+ ==============================================================================
+ Using IconRef
+ ==============================================================================
+*/
+
+/*
+ IsValidIconRef
+ Return true if the iconRef passed in is a valid icon ref
+*/
+
+EXTERN_API( Boolean )
+IsValidIconRef (IconRef theIconRef) TWOWORDINLINE(0x7032, 0xAA75);
+
+
+/*
+ PlotIconRef
+
+ This routine plots the IconRef. It mostly takes the same parameters as
+ PlotIconSuite. Pass kIconServicesNormalUsageFlag as a default value for
+ IconServicesUsageFlags.
+*/
+
+EXTERN_API( OSErr )
+PlotIconRef (const Rect * theRect,
+ IconAlignmentType align,
+ IconTransformType transform,
+ IconServicesUsageFlags theIconServicesUsageFlags,
+ IconRef theIconRef) TWOWORDINLINE(0x700E, 0xAA75);
+
+
+/*
+ PtInIconRef
+
+ This routine indicates if testPt would hit the icon designated by iconRef.
+ It mostly takes the same parameters as PtInIconSuite.
+ Pass kIconServicesNormalUsageFlag as a default value for IconServicesUsageFlags.
+*/
+
+
+EXTERN_API( Boolean )
+PtInIconRef (const Point * testPt,
+ const Rect * iconRect,
+ IconAlignmentType align,
+ IconServicesUsageFlags theIconServicesUsageFlags,
+ IconRef theIconRef) TWOWORDINLINE(0x700F, 0xAA75);
+
+
+/*
+ RectInIconRef
+
+ This routine indicates if testRect would intersect the icon designated by iconRef.
+ It mostly takes the same parameters as RectInIconSuite.
+ Pass kIconServicesNormalUsageFlag as a default value for IconServicesUsageFlags.
+*/
+
+
+EXTERN_API( Boolean )
+RectInIconRef (const Rect * testRect,
+ const Rect * iconRect,
+ IconAlignmentType align,
+ IconServicesUsageFlags iconServicesUsageFlags,
+ IconRef theIconRef) TWOWORDINLINE(0x7010, 0xAA75);
+
+
+/*
+ IconRefToRgn
+
+ This routine returns a region for the icon.
+ It mostly takes the same parameters as IconSuiteToRgn.
+ Pass kIconServicesNormalUsageFlag as a default value for IconServicesUsageFlags.
+*/
+
+EXTERN_API( OSErr )
+IconRefToRgn (RgnHandle theRgn,
+ const Rect * iconRect,
+ IconAlignmentType align,
+ IconServicesUsageFlags iconServicesUsageFlags,
+ IconRef theIconRef) TWOWORDINLINE(0x7011, 0xAA75);
+
+
+/*
+ GetIconSizesFromIconRef
+
+ This routine returns an IconSelectorValue indicating the depths and sizes of
+ icon data which are actually available. It takes an IconSelectorValue
+ indicating which sizes/depths the caller is interested and returns an
+ IconSelectorValue indicating which sizes/depths exist.
+
+ Caution:
+
+ This is potentially an extremely expensive call as IconServices may be forced
+ to attempt fetching the data for the IconRef's sizes/depths which may result
+ in hitting the local disk or even the network to obtain the data to determine
+ which sizes/depths actually exist.
+ Pass kIconServicesNormalUsageFlag as a default value for IconServicesUsageFlags.
+*/
+
+EXTERN_API( OSErr )
+GetIconSizesFromIconRef (IconSelectorValue iconSelectorInput,
+ IconSelectorValue * iconSelectorOutputPtr,
+ IconServicesUsageFlags iconServicesUsageFlags,
+ IconRef theIconRef) TWOWORDINLINE(0x7012, 0xAA75);
+
+
+
+/*
+ ==============================================================================
+ Flushing IconRef data
+ ==============================================================================
+*/
+
+
+/*
+ FlushIconRefs
+
+ Making this call will dispose of all the data for the specified icons if
+ the data can be reacquired, for example if the data is provided from a resource.
+ '****' is a wildcard for all types or all creators.
+*/
+
+EXTERN_API( OSErr )
+FlushIconRefs (OSType creator,
+ OSType iconType) TWOWORDINLINE(0x7029, 0xAA75);
+
+
+/*
+ FlushIconRefsByVolume
+
+ This routine disposes of the data for the icons related to the indicated volume
+ if this data can be reacquired, for example if the data is provided from a
+ resource.
+*/
+
+EXTERN_API( OSErr )
+FlushIconRefsByVolume (SInt16 vRefNum) TWOWORDINLINE(0x7018, 0xAA75);
+
+
+
+/*
+ ==============================================================================
+ Controling custom icons
+ ==============================================================================
+*/
+
+
+/*
+ SetCustomIconsEnabled
+
+ Enable or disable custom icons on the specified volume.
+*/
+
+EXTERN_API( OSErr )
+SetCustomIconsEnabled (SInt16 vRefNum,
+ Boolean enableCustomIcons) TWOWORDINLINE(0x701F, 0xAA75);
+
+
+/*
+ GetCustomIconsEnabled
+
+ Return true if custom icons are enabled on the specified volume, false otherwise.
+*/
+
+EXTERN_API( OSErr )
+GetCustomIconsEnabled (SInt16 vRefNum,
+ Boolean * customIconsEnabled) TWOWORDINLINE(0x7020, 0xAA75);
+
+
+/*
+ IsIconRefMaskEmpty
+ Returns true if the mask for this icon is blank
+*/
+
+EXTERN_API( Boolean )
+IsIconRefMaskEmpty (IconRef iconRef) TWOWORDINLINE(0x7033, 0xAA75);
+
+
+/*
+ GetIconRefVariant
+ Icon variants allows different images to be used with different icon state.
+ For example, the 'open' variant for a folder could be represented with
+ an open folder.
+ Given an icon ref and a desired variant, this routine returns an icon
+ ref (which may be the same as the input icon ref) and a transformation
+ which should be used with PlotIconRef() to render the icon appropriately.
+ The returned icon ref should be used to do hit-testing.
+*/
+EXTERN_API( IconRef )
+GetIconRefVariant (IconRef inIconRef,
+ OSType inVariant,
+ IconTransformType * outTransform) TWOWORDINLINE(0x7034, 0xAA75);
+
+
+
+/*
+ ==============================================================================
+ Icon files (.icns files)
+ ==============================================================================
+*/
+
+
+/*
+ RegisterIconRefFromIconFile
+ This routine adds a new entry to the IconRef registry. Other clients will be
+ able to access it using the (creator, iconType) pair specified here.
+ Lower-case creators are reserved for the system.
+ If the creator is kSystemIconsCreator and the iconType is 0, a new IconRef
+ is always returned. Otherwise, if the creator and type have already been
+ registered, the previously registered IconRef is returned.
+ This routine increments the reference count of the IconRef. Call ReleaseIconRef()
+ when you're done with it.
+*/
+
+EXTERN_API( OSErr )
+RegisterIconRefFromIconFile (OSType creator,
+ OSType iconType,
+ const FSSpec * iconFile,
+ IconRef * theIconRef) TWOWORDINLINE(0x7035, 0xAA75);
+
+
+/*
+ ReadIconFile
+ Read the specified icon file into the icon family handle.
+ The caller is responsible for disposing the iconFamily
+*/
+
+EXTERN_API( OSErr )
+ReadIconFile (const FSSpec * iconFile,
+ IconFamilyHandle * iconFamily) TWOWORDINLINE(0x7036, 0xAA75);
+
+
+/*
+ WriteIconFile
+ Write the iconFamily handle to the specified file
+*/
+
+EXTERN_API( OSErr )
+WriteIconFile (IconFamilyHandle iconFamily,
+ const FSSpec * iconFile) TWOWORDINLINE(0x7037, 0xAA75);
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __ICONS__ */
+
diff --git a/include/qt/ImageCodec.h b/include/qt/ImageCodec.h
new file mode 100644
index 000000000..f281457ed
--- /dev/null
+++ b/include/qt/ImageCodec.h
@@ -0,0 +1,2006 @@
+/*
+ File: ImageCodec.h
+
+ Contains: QuickTime Interfaces.
+
+ Version: Technology: QuickTime 6.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1990-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __IMAGECODEC__
+#define __IMAGECODEC__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#ifndef __IMAGECOMPRESSION__
+#include "ImageCompression.h"
+#endif
+
+#ifndef __COMPONENTS__
+#include "Components.h"
+#endif
+
+#ifndef __MOVIES__
+#include "Movies.h"
+#endif
+
+#ifndef __GXTYPES__
+#include "GXTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+
+/* codec capabilities flags */
+enum {
+ codecCanScale = 1L << 0,
+ codecCanMask = 1L << 1,
+ codecCanMatte = 1L << 2,
+ codecCanTransform = 1L << 3,
+ codecCanTransferMode = 1L << 4,
+ codecCanCopyPrev = 1L << 5,
+ codecCanSpool = 1L << 6,
+ codecCanClipVertical = 1L << 7,
+ codecCanClipRectangular = 1L << 8,
+ codecCanRemapColor = 1L << 9,
+ codecCanFastDither = 1L << 10,
+ codecCanSrcExtract = 1L << 11,
+ codecCanCopyPrevComp = 1L << 12,
+ codecCanAsync = 1L << 13,
+ codecCanMakeMask = 1L << 14,
+ codecCanShift = 1L << 15,
+ codecCanAsyncWhen = 1L << 16,
+ codecCanShieldCursor = 1L << 17,
+ codecCanManagePrevBuffer = 1L << 18,
+ codecHasVolatileBuffer = 1L << 19, /* codec requires redraw after window movement */
+ codecWantsRegionMask = 1L << 20,
+ codecImageBufferIsOnScreen = 1L << 21, /* old def of codec using overlay surface, = ( codecIsDirectToScreenOnly | codecUsesOverlaySurface | codecImageBufferIsOverlaySurface | codecSrcMustBeImageBuffer ) */
+ codecWantsDestinationPixels = 1L << 22,
+ codecWantsSpecialScaling = 1L << 23,
+ codecHandlesInputs = 1L << 24,
+ 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 */
+ codecImageBufferMemoryFlagsValid = 1L << 6, /* set by ImageCodecNewImageBufferMemory/NewImageGWorld to indicate that it set the AGP/PCI flags (supported in QuickTime 6.0 and later) */
+ codecDrawsHigherQualityScaled = 1L << 7 /* codec will draw higher-quality image if it performs scaling (eg, wipe effect with border) */
+};
+
+
+struct CodecCapabilities {
+ long flags;
+ short wantedPixelSize;
+ short extendWidth;
+ short extendHeight;
+ short bandMin;
+ short bandInc;
+ short pad;
+ unsigned long time;
+ long flags2; /* field new in QuickTime 4.0 */
+};
+typedef struct CodecCapabilities CodecCapabilities;
+/* codec condition flags */
+enum {
+ codecConditionFirstBand = 1L << 0,
+ codecConditionLastBand = 1L << 1,
+ codecConditionFirstFrame = 1L << 2,
+ codecConditionNewDepth = 1L << 3,
+ codecConditionNewTransform = 1L << 4,
+ codecConditionNewSrcRect = 1L << 5,
+ codecConditionNewMask = 1L << 6,
+ codecConditionNewMatte = 1L << 7,
+ codecConditionNewTransferMode = 1L << 8,
+ codecConditionNewClut = 1L << 9,
+ codecConditionNewAccuracy = 1L << 10,
+ codecConditionNewDestination = 1L << 11,
+ codecConditionFirstScreen = 1L << 12,
+ codecConditionDoCursor = 1L << 13,
+ codecConditionCatchUpDiff = 1L << 14,
+ codecConditionMaskMayBeChanged = 1L << 15,
+ codecConditionToBuffer = 1L << 16,
+ codecConditionCodecChangedMask = 1L << 31
+};
+
+
+enum {
+ codecInfoResourceType = FOUR_CHAR_CODE('cdci'), /* codec info resource type */
+ codecInterfaceVersion = 2 /* high word returned in component GetVersion */
+};
+
+
+struct CDSequenceDataSourceQueueEntry {
+ void * nextBusy;
+
+ long descSeed;
+ Handle dataDesc;
+ void * data;
+ long dataSize;
+
+ long useCount;
+
+ TimeValue frameTime;
+ TimeValue frameDuration;
+ TimeValue timeScale;
+};
+typedef struct CDSequenceDataSourceQueueEntry CDSequenceDataSourceQueueEntry;
+typedef CDSequenceDataSourceQueueEntry * CDSequenceDataSourceQueueEntryPtr;
+
+struct CDSequenceDataSource {
+ long recordSize;
+
+ void * next;
+
+ ImageSequence seqID;
+ ImageSequenceDataSource sourceID;
+ OSType sourceType;
+ long sourceInputNumber;
+ void * dataPtr;
+ Handle dataDescription;
+ long changeSeed;
+ ICMConvertDataFormatUPP transferProc;
+ void * transferRefcon;
+ long dataSize;
+
+ /* fields available in QT 3 and later */
+
+ QHdrPtr dataQueue; /* queue of CDSequenceDataSourceQueueEntry structures*/
+
+ void * originalDataPtr;
+ long originalDataSize;
+ Handle originalDataDescription;
+ long originalDataDescriptionSeed;
+};
+typedef struct CDSequenceDataSource CDSequenceDataSource;
+typedef CDSequenceDataSource * CDSequenceDataSourcePtr;
+
+struct ICMFrameTimeInfo {
+ wide startTime;
+ long scale;
+ long duration;
+};
+typedef struct ICMFrameTimeInfo ICMFrameTimeInfo;
+typedef ICMFrameTimeInfo * ICMFrameTimeInfoPtr;
+
+struct CodecCompressParams {
+ ImageSequence sequenceID; /* precompress,bandcompress */
+ ImageDescriptionHandle imageDescription; /* precompress,bandcompress */
+ Ptr data;
+ long bufferSize;
+ long frameNumber;
+ long startLine;
+ long stopLine;
+ long conditionFlags;
+ CodecFlags callerFlags;
+ CodecCapabilities * capabilities; /* precompress,bandcompress */
+ ICMProgressProcRecord progressProcRecord;
+ ICMCompletionProcRecord completionProcRecord;
+ ICMFlushProcRecord flushProcRecord;
+
+ PixMap srcPixMap; /* precompress,bandcompress */
+ PixMap prevPixMap;
+ CodecQ spatialQuality;
+ CodecQ temporalQuality;
+ Fixed similarity;
+ DataRateParamsPtr dataRateParams;
+ long reserved;
+
+ /* The following fields only exist for QuickTime 2.1 and greater */
+ UInt16 majorSourceChangeSeed;
+ UInt16 minorSourceChangeSeed;
+ CDSequenceDataSourcePtr sourceData;
+
+ /* The following fields only exist for QuickTime 2.5 and greater */
+ long preferredPacketSizeInBytes;
+
+ /* The following fields only exist for QuickTime 3.0 and greater */
+ long requestedBufferWidth; /* must set codecWantsSpecialScaling to indicate this field is valid*/
+ long requestedBufferHeight; /* must set codecWantsSpecialScaling to indicate this field is valid*/
+
+ /* The following fields only exist for QuickTime 4.0 and greater */
+ OSType wantedSourcePixelType;
+
+ /* The following fields only exist for QuickTime 5.0 and greater */
+ long compressedDataSize; /* if nonzero, this overrides (*imageDescription)->dataSize*/
+ UInt32 taskWeight; /* preferred weight for MP tasks implementing this operation*/
+ OSType taskName; /* preferred name (type) for MP tasks implementing this operation*/
+};
+typedef struct CodecCompressParams CodecCompressParams;
+
+struct CodecDecompressParams {
+ ImageSequence sequenceID; /* predecompress,banddecompress */
+ ImageDescriptionHandle imageDescription; /* predecompress,banddecompress */
+ Ptr data;
+ long bufferSize;
+ long frameNumber;
+ long startLine;
+ long stopLine;
+ long conditionFlags;
+ CodecFlags callerFlags;
+ 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 */
+ long 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 */
+
+ long screenFloodMethod;
+ long 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;
+
+ long unused;
+
+ CGrafPtr finalDestinationPort;
+
+ long requestedBufferWidth; /* must set codecWantsSpecialScaling to indicate this field is valid*/
+ long 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*/
+
+ /* The following fields only exist for QuickTime 6.0 and greater */
+ Boolean bidirectionalPredictionMode;
+ UInt8 destinationBufferMemoryPreference; /* a codec's PreDecompress/Preflight call can set this to express a preference about what kind of memory its destination buffer should go into. no guarantees.*/
+ UInt8 codecBufferMemoryPreference; /* may indicate preferred kind of memory that NewImageGWorld/NewImageBufferMemory should create its buffer in, if applicable.*/
+ Boolean onlyUseCodecIfItIsInUserPreferredCodecList; /* set to prevent this codec from being used unless it is in the userPreferredCodec list*/
+
+ QTMediaContextID mediaContextID;
+};
+typedef struct CodecDecompressParams CodecDecompressParams;
+enum {
+ matrixFlagScale2x = 1L << 7,
+ matrixFlagScale1x = 1L << 6,
+ matrixFlagScaleHalf = 1L << 5
+};
+
+enum {
+ kScreenFloodMethodNone = 0,
+ kScreenFloodMethodKeyColor = 1,
+ kScreenFloodMethodAlpha = 2
+};
+
+enum {
+ kFlushLastQueuedFrame = 0,
+ kFlushFirstQueuedFrame = 1
+};
+
+enum {
+ kNewImageGWorldErase = 1L << 0
+};
+
+/* values for destinationBufferMemoryPreference and codecBufferMemoryPreference */
+enum {
+ kICMImageBufferNoPreference = 0,
+ kICMImageBufferPreferMainMemory = 1,
+ kICMImageBufferPreferVideoMemory = 2
+};
+
+typedef CALLBACK_API( void , ImageCodecTimeTriggerProcPtr )(void *refcon);
+typedef CALLBACK_API( void , ImageCodecDrawBandCompleteProcPtr )(void *refcon, ComponentResult drawBandResult, UInt32 drawBandCompleteFlags);
+typedef STACK_UPP_TYPE(ImageCodecTimeTriggerProcPtr) ImageCodecTimeTriggerUPP;
+typedef STACK_UPP_TYPE(ImageCodecDrawBandCompleteProcPtr) ImageCodecDrawBandCompleteUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(ImageCodecTimeTriggerUPP)
+ NewImageCodecTimeTriggerUPP (ImageCodecTimeTriggerProcPtr userRoutine);
+
+ EXTERN_API(ImageCodecDrawBandCompleteUPP)
+ NewImageCodecDrawBandCompleteUPP (ImageCodecDrawBandCompleteProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeImageCodecTimeTriggerUPP (ImageCodecTimeTriggerUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeImageCodecDrawBandCompleteUPP (ImageCodecDrawBandCompleteUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeImageCodecTimeTriggerUPP (void * refcon,
+ ImageCodecTimeTriggerUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeImageCodecDrawBandCompleteUPP (void * refcon,
+ ComponentResult drawBandResult,
+ UInt32 drawBandCompleteFlags,
+ ImageCodecDrawBandCompleteUPP userUPP);
+
+#else
+ enum { uppImageCodecTimeTriggerProcInfo = 0x000000C0 }; /* pascal no_return_value Func(4_bytes) */
+ enum { uppImageCodecDrawBandCompleteProcInfo = 0x00000FC0 }; /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes) */
+ #define NewImageCodecTimeTriggerUPP(userRoutine) (ImageCodecTimeTriggerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppImageCodecTimeTriggerProcInfo, GetCurrentArchitecture())
+ #define NewImageCodecDrawBandCompleteUPP(userRoutine) (ImageCodecDrawBandCompleteUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppImageCodecDrawBandCompleteProcInfo, GetCurrentArchitecture())
+ #define DisposeImageCodecTimeTriggerUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeImageCodecDrawBandCompleteUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeImageCodecTimeTriggerUPP(refcon, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppImageCodecTimeTriggerProcInfo, (refcon))
+ #define InvokeImageCodecDrawBandCompleteUPP(refcon, drawBandResult, drawBandCompleteFlags, userUPP) CALL_THREE_PARAMETER_UPP((userUPP), uppImageCodecDrawBandCompleteProcInfo, (refcon), (drawBandResult), (drawBandCompleteFlags))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewImageCodecTimeTriggerProc(userRoutine) NewImageCodecTimeTriggerUPP(userRoutine)
+#define NewImageCodecDrawBandCompleteProc(userRoutine) NewImageCodecDrawBandCompleteUPP(userRoutine)
+#define CallImageCodecTimeTriggerProc(userRoutine, refcon) InvokeImageCodecTimeTriggerUPP(refcon, userRoutine)
+#define CallImageCodecDrawBandCompleteProc(userRoutine, refcon, drawBandResult, drawBandCompleteFlags) InvokeImageCodecDrawBandCompleteUPP(refcon, drawBandResult, drawBandCompleteFlags, userRoutine)
+
+struct ImageSubCodecDecompressCapabilities {
+ long recordSize; /* sizeof(ImageSubCodecDecompressCapabilities)*/
+ long decompressRecordSize; /* size of your codec's decompress record*/
+ Boolean canAsync; /* default true*/
+ UInt8 pad0;
+
+ /* The following fields only exist for QuickTime 4.0 and greater */
+ UInt16 suggestedQueueSize;
+ Boolean canProvideTrigger;
+
+ /* The following fields only exist for QuickTime 5.0 and greater */
+ Boolean subCodecFlushesScreen; /* only used on Mac OS X*/
+ Boolean subCodecCallsDrawBandComplete;
+ UInt8 pad2[1];
+
+ /* The following fields only exist for QuickTime 6.0 and greater */
+ Boolean isChildCodec; /* set by base codec before calling Initialize*/
+ UInt8 pad3[3];
+};
+typedef struct ImageSubCodecDecompressCapabilities ImageSubCodecDecompressCapabilities;
+enum {
+ kCodecFrameTypeUnknown = 0,
+ kCodecFrameTypeKey = 1,
+ kCodecFrameTypeDifference = 2,
+ kCodecFrameTypeDroppableDifference = 3
+};
+
+
+struct ImageSubCodecDecompressRecord {
+ Ptr baseAddr;
+ long rowBytes;
+ Ptr codecData;
+ ICMProgressProcRecord progressProcRecord;
+ ICMDataProcRecord dataProcRecord;
+ void * userDecompressRecord; /* pointer to codec-specific per-band data*/
+ UInt8 frameType;
+ Boolean inhibitMP; /* set this in BeginBand to tell the base decompressor not to call DrawBand from an MP task for this frame. (Only has any effect for MP-capable subcodecs. New in QuickTime 5.0.)*/
+ UInt8 pad[2];
+ long priv[2];
+
+ /* The following fields only exist for QuickTime 5.0 and greater */
+ ImageCodecDrawBandCompleteUPP drawBandCompleteUPP; /* only used if subcodec set subCodecCallsDrawBandComplete; if drawBandCompleteUPP is non-nil, codec must call it when a frame is finished, but may return from DrawBand before the frame is finished. */
+ void * drawBandCompleteRefCon; /* Note: do not call drawBandCompleteUPP directly from a hardware interrupt; instead, use DTInstall to run a function at deferred task time, and call drawBandCompleteUPP from that. */
+};
+typedef struct ImageSubCodecDecompressRecord ImageSubCodecDecompressRecord;
+/*
+ These data structures are used by code that wants to pass planar pixmap
+ information around.
+ The structure below gives the basic idea of what is being done.
+ Normal instances of code will use a fixed number of planes (eg YUV420 uses
+ three planes, Y, U and V). Each such code instance will define its own
+ version of the PlanarPixMapInfo struct counting the number of planes it
+ needs along with defining constants that specify the meanings of each
+ plane.
+*/
+
+struct PlanarComponentInfo {
+ SInt32 offset;
+ UInt32 rowBytes;
+};
+typedef struct PlanarComponentInfo PlanarComponentInfo;
+
+struct PlanarPixMapInfo {
+ PlanarComponentInfo componentInfo[1];
+};
+typedef struct PlanarPixMapInfo PlanarPixMapInfo;
+
+struct PlanarPixmapInfoSorensonYUV9 {
+ PlanarComponentInfo componentInfoY;
+ PlanarComponentInfo componentInfoU;
+ PlanarComponentInfo componentInfoV;
+};
+typedef struct PlanarPixmapInfoSorensonYUV9 PlanarPixmapInfoSorensonYUV9;
+
+struct PlanarPixmapInfoYUV420 {
+ PlanarComponentInfo componentInfoY;
+ PlanarComponentInfo componentInfoCb;
+ PlanarComponentInfo componentInfoCr;
+};
+typedef struct PlanarPixmapInfoYUV420 PlanarPixmapInfoYUV420;
+enum {
+ codecSuggestedBufferSentinel = FOUR_CHAR_CODE('sent') /* codec public resource containing suggested data pattern to put past end of data buffer */
+};
+
+
+/* name of parameters or effect -- placed in root container, required */
+enum {
+ kParameterTitleName = FOUR_CHAR_CODE('name'),
+ kParameterTitleID = 1
+};
+
+/* codec sub-type of parameters or effect -- placed in root container, required */
+enum {
+ kParameterWhatName = FOUR_CHAR_CODE('what'),
+ kParameterWhatID = 1
+};
+
+/* effect version -- placed in root container, optional, but recommended */
+enum {
+ kParameterVersionName = FOUR_CHAR_CODE('vers'),
+ kParameterVersionID = 1
+};
+
+/* is effect repeatable -- placed in root container, optional, default is TRUE*/
+enum {
+ kParameterRepeatableName = FOUR_CHAR_CODE('pete'),
+ kParameterRepeatableID = 1
+};
+
+enum {
+ kParameterRepeatableTrue = 1,
+ kParameterRepeatableFalse = 0
+};
+
+/* substitution codec in case effect is missing -- placed in root container, recommended */
+enum {
+ kParameterAlternateCodecName = FOUR_CHAR_CODE('subs'),
+ kParameterAlternateCodecID = 1
+};
+
+/* maximum number of sources -- placed in root container, required */
+enum {
+ kParameterSourceCountName = FOUR_CHAR_CODE('srcs'),
+ kParameterSourceCountID = 1
+};
+
+/* EFFECT CLASSES*/
+
+/*
+ The effect major class defines the major grouping of the effect.
+ Major classes are defined only by Apple and are not extendable by third
+ parties. Major classes are used for filtering of the effect list by
+ applications, but do not define what UI sub-group may or may not be
+ presented to the user. For example, the major class may be a transition,
+ but the minor class may be a wipe.
+*/
+
+/*
+ Effects that fail to include a
+ kEffectMajorClassType will be classified as kMiscMajorClass.
+*/
+enum {
+ kEffectMajorClassType = FOUR_CHAR_CODE('clsa'),
+ kEffectMajorClassID = 1
+};
+
+enum {
+ kGeneratorMajorClass = FOUR_CHAR_CODE('genr'), /* zero source effects*/
+ kFilterMajorClass = FOUR_CHAR_CODE('filt'), /* one source effects*/
+ kTransitionMajorClass = FOUR_CHAR_CODE('tran'), /* multisource morph effects */
+ kCompositorMajorClass = FOUR_CHAR_CODE('comp'), /* multisource layer effects*/
+ kMiscMajorClass = FOUR_CHAR_CODE('misc') /* all other effects*/
+};
+
+/*
+ The effect minor class defines the grouping of effects for the purposes
+ of UI. Apple defines a set of minor classes and will extend it over
+ time. Apple also provides strings within the UI for minor classes
+ that it defines. Third party developers may either classify
+ their effects as a type defined by Apple, or may define their own
+ minor class. Effects which define a minor class of their own
+ must also then supply a kEffectMinorClassNameType atom.
+*/
+
+/*
+ If a kEffectMinorClassNameType atom is present, but
+ the minor type is one defined by Apple, the Apple supplied
+ string will be used in the UI.
+*/
+
+/*
+ Effects that fail to supply a kEffectMinorClassType will be
+ classified as kMiscMinorClass.
+*/
+enum {
+ kEffectMinorClassType = FOUR_CHAR_CODE('clsi'),
+ kEffectMinorClassID = 1,
+ kEffectMinorClassNameType = FOUR_CHAR_CODE('clsn'),
+ kEffectMinorClassNameID = 1
+};
+
+enum {
+ kGeneratorMinorClass = FOUR_CHAR_CODE('genr'), /* "Generators"*/
+ kRenderMinorClass = FOUR_CHAR_CODE('rend'), /* "Render"*/
+ kFilterMinorClass = FOUR_CHAR_CODE('filt'), /* "Filters"*/
+ kArtisticMinorClass = FOUR_CHAR_CODE('arts'), /* "Artistic*/
+ kBlurMinorClass = FOUR_CHAR_CODE('blur'), /* "Blur"*/
+ kSharpenMinorClass = FOUR_CHAR_CODE('shrp'), /* "Sharpen"*/
+ kDistortMinorClass = FOUR_CHAR_CODE('dist'), /* "Distort"*/
+ kNoiseMinorClass = FOUR_CHAR_CODE('nois'), /* "Noise"*/
+ kAdjustmentMinorClass = FOUR_CHAR_CODE('adst'), /* "Adjustments"*/
+ kTransitionMinorClass = FOUR_CHAR_CODE('tran'), /* "Transitions"*/
+ kWipeMinorClass = FOUR_CHAR_CODE('wipe'), /* "Wipes"*/
+ k3DMinorClass = FOUR_CHAR_CODE('pzre'), /* "3D Transitions"*/
+ kCompositorMinorClass = FOUR_CHAR_CODE('comp'), /* "Compositors"*/
+ kEffectsMinorClass = FOUR_CHAR_CODE('fxfx'), /* "Special Effects"*/
+ kMiscMinorClass = FOUR_CHAR_CODE('misc') /* "Miscellaneous"*/
+};
+
+/*
+ Effects can define a number of "preset" values which will be presented to the user
+ in a simplified UI. Each preset is an atom within the parameter description list
+ and must have an atom ID from 1 going up sequentially. Inside of this atom are three other
+ atoms containing:
+ 1) the name of the preset as a Pascal string
+ 2) a preview picture for the preset, 86 x 64 pixels in size
+ 3) the ENTIRE set of parameter values needed to create a sample of this preset.
+*/
+enum {
+ kEffectPresetType = FOUR_CHAR_CODE('peff'),
+ kPresetNameType = FOUR_CHAR_CODE('pnam'),
+ kPresetNameID = 1,
+ kPresetPreviewPictureType = FOUR_CHAR_CODE('ppct'),
+ kPresetPreviewPictureID = 1,
+ kPresetSettingsType = FOUR_CHAR_CODE('psst'),
+ kPresetSettingsID = 1
+};
+
+enum {
+ kParameterDependencyName = FOUR_CHAR_CODE('deep'),
+ kParameterDependencyID = 1
+};
+
+enum {
+ kParameterListDependsUponColorProfiles = FOUR_CHAR_CODE('prof'),
+ kParameterListDependsUponFonts = FOUR_CHAR_CODE('font')
+};
+
+
+struct ParameterDependancyRecord {
+ long dependCount;
+ OSType depends[1];
+};
+typedef struct ParameterDependancyRecord ParameterDependancyRecord;
+/*
+ enumeration list in container -- placed in root container, optional unless used by a
+ parameter in the list
+*/
+enum {
+ kParameterEnumList = FOUR_CHAR_CODE('enum')
+};
+
+
+struct EnumValuePair {
+ long value;
+ Str255 name;
+};
+typedef struct EnumValuePair EnumValuePair;
+
+struct EnumListRecord {
+ long enumCount; /* number of enumeration items to follow*/
+ EnumValuePair values[1]; /* values and names for them, packed */
+};
+typedef struct EnumListRecord EnumListRecord;
+/* atom type of parameter*/
+enum {
+ kParameterAtomTypeAndID = FOUR_CHAR_CODE('type')
+};
+
+enum {
+ kNoAtom = FOUR_CHAR_CODE('none'), /* atom type for no data got/set*/
+ kAtomNoFlags = 0x00000000,
+ kAtomNotInterpolated = 0x00000001, /* atom can never be interpolated*/
+ kAtomInterpolateIsOptional = 0x00000002, /* atom can be interpolated, but it is an advanced user operation*/
+ kAtomMayBeIndexed = 0x00000004 /* more than one value of atom can exist with accending IDs (ie, lists of colors)*/
+};
+
+
+struct ParameterAtomTypeAndID {
+ QTAtomType atomType; /* type of atom this data comes from/goes into*/
+ QTAtomID atomID; /* ID of atom this data comes from/goes into*/
+ long atomFlags; /* options for this atom*/
+ Str255 atomName; /* name of this value type*/
+};
+typedef struct ParameterAtomTypeAndID ParameterAtomTypeAndID;
+/* data type of a parameter*/
+enum {
+ kParameterDataType = FOUR_CHAR_CODE('data')
+};
+
+enum {
+ kParameterTypeDataLong = kTweenTypeLong, /* integer value*/
+ kParameterTypeDataFixed = kTweenTypeFixed, /* fixed point value*/
+ kParameterTypeDataRGBValue = kTweenTypeRGBColor, /* RGBColor data*/
+ kParameterTypeDataDouble = kTweenTypeQTFloatDouble, /* IEEE 64 bit floating point value*/
+ kParameterTypeDataText = FOUR_CHAR_CODE('text'), /* editable text item*/
+ kParameterTypeDataEnum = FOUR_CHAR_CODE('enum'), /* enumerated lookup value*/
+ kParameterTypeDataBitField = FOUR_CHAR_CODE('bool'), /* bit field value (something that holds boolean(s))*/
+ kParameterTypeDataImage = FOUR_CHAR_CODE('imag') /* reference to an image via Picture data*/
+};
+
+
+struct ParameterDataType {
+ OSType dataType; /* type of data this item is stored as*/
+};
+typedef struct ParameterDataType ParameterDataType;
+/*
+ alternate (optional) data type -- main data type always required.
+ Must be modified or deleted when modifying main data type.
+ Main data type must be modified when alternate is modified.
+*/
+enum {
+ kParameterAlternateDataType = FOUR_CHAR_CODE('alt1'),
+ kParameterTypeDataColorValue = FOUR_CHAR_CODE('cmlr'), /* CMColor data (supported on machines with ColorSync)*/
+ kParameterTypeDataCubic = FOUR_CHAR_CODE('cubi'), /* cubic bezier(s) (no built-in support)*/
+ kParameterTypeDataNURB = FOUR_CHAR_CODE('nurb') /* nurb(s) (no built-in support)*/
+};
+
+
+struct ParameterAlternateDataEntry {
+ OSType dataType; /* type of data this item is stored as*/
+ QTAtomType alternateAtom; /* where to store*/
+};
+typedef struct ParameterAlternateDataEntry ParameterAlternateDataEntry;
+
+struct ParameterAlternateDataType {
+ long numEntries;
+ ParameterAlternateDataEntry entries[1];
+};
+typedef struct ParameterAlternateDataType ParameterAlternateDataType;
+/* legal values for the parameter*/
+enum {
+ kParameterDataRange = FOUR_CHAR_CODE('rang')
+};
+
+enum {
+ kNoMinimumLongFixed = 0x7FFFFFFF, /* ignore minimum/maxiumum values*/
+ kNoMaximumLongFixed = (long)0x80000000,
+ kNoScaleLongFixed = 0, /* don't perform any scaling of value*/
+ kNoPrecision = (-1) /* allow as many digits as format*/
+};
+
+/* 'text'*/
+
+struct StringRangeRecord {
+ long maxChars; /* maximum length of string*/
+ long maxLines; /* number of editing lines to use (1 typical, 0 to default)*/
+};
+typedef struct StringRangeRecord StringRangeRecord;
+/* 'long'*/
+
+struct LongRangeRecord {
+ long minValue; /* no less than this*/
+ long maxValue; /* no more than this*/
+ long scaleValue; /* muliply content by this going in, divide going out*/
+ long precisionDigits; /* # digits of precision when editing via typing*/
+};
+typedef struct LongRangeRecord LongRangeRecord;
+/* 'enum'*/
+
+struct EnumRangeRecord {
+ long enumID; /* 'enum' list in root container to search within*/
+};
+typedef struct EnumRangeRecord EnumRangeRecord;
+/* 'fixd'*/
+
+struct FixedRangeRecord {
+ Fixed minValue; /* no less than this*/
+ Fixed maxValue; /* no more than this*/
+ Fixed scaleValue; /* muliply content by this going in, divide going out*/
+ long precisionDigits; /* # digits of precision when editing via typing*/
+};
+typedef struct FixedRangeRecord FixedRangeRecord;
+/* 'doub'*/
+
+ #define kNoMinimumDouble (NAN) /* ignore minimum/maxiumum values */
+ #define kNoMaximumDouble (NAN)
+ #define kNoScaleDouble (0) /* don't perform any scaling of value */
+ struct DoubleRangeRecord
+ {
+ QTFloatDouble minValue; /* no less than this */
+ QTFloatDouble maxValue; /* no more than this */
+ QTFloatDouble scaleValue; /* muliply content by this going in, divide going out */
+ long precisionDigits; /* # digits of precision when editing via typing */
+ };
+ typedef struct DoubleRangeRecord DoubleRangeRecord;
+
+/* 'bool' */
+
+struct BooleanRangeRecord {
+ long maskValue; /* value to mask on/off to set/clear the boolean*/
+};
+typedef struct BooleanRangeRecord BooleanRangeRecord;
+/* 'rgb '*/
+
+struct RGBRangeRecord {
+ RGBColor minColor;
+ RGBColor maxColor;
+};
+typedef struct RGBRangeRecord RGBRangeRecord;
+/* 'imag'*/
+enum {
+ kParameterImageNoFlags = 0,
+ kParameterImageIsPreset = 1
+};
+
+enum {
+ kStandardPresetGroup = FOUR_CHAR_CODE('pset')
+};
+
+
+struct ImageRangeRecord {
+ long imageFlags;
+ OSType fileType; /* file type to contain the preset group (normally kStandardPresetGroup)*/
+ long replacedAtoms; /* # atoms at this level replaced by this preset group*/
+};
+typedef struct ImageRangeRecord ImageRangeRecord;
+/* union of all of the above*/
+
+ struct ParameterRangeRecord
+ {
+ union
+ {
+ LongRangeRecord longRange;
+ EnumRangeRecord enumRange;
+ FixedRangeRecord fixedRange;
+ DoubleRangeRecord doubleRange;
+ StringRangeRecord stringRange;
+ BooleanRangeRecord booleanRange;
+ RGBRangeRecord rgbRange;
+ ImageRangeRecord imageRange;
+ } u;
+ };
+ typedef struct ParameterRangeRecord ParameterRangeRecord;
+
+/* UI behavior of a parameter*/
+enum {
+ kParameterDataBehavior = FOUR_CHAR_CODE('ditl')
+};
+
+enum {
+ /* items edited via typing*/
+ kParameterItemEditText = FOUR_CHAR_CODE('edit'), /* edit text box*/
+ kParameterItemEditLong = FOUR_CHAR_CODE('long'), /* long number editing box*/
+ kParameterItemEditFixed = FOUR_CHAR_CODE('fixd'), /* fixed point number editing box*/
+ kParameterItemEditDouble = FOUR_CHAR_CODE('doub'), /* double number editing box*/
+ /* items edited via control(s)*/
+ kParameterItemPopUp = FOUR_CHAR_CODE('popu'), /* pop up value for enum types*/
+ kParameterItemRadioCluster = FOUR_CHAR_CODE('radi'), /* radio cluster for enum types*/
+ kParameterItemCheckBox = FOUR_CHAR_CODE('chex'), /* check box for booleans*/
+ kParameterItemControl = FOUR_CHAR_CODE('cntl'), /* item controlled via a standard control of some type*/
+ /* special user items*/
+ kParameterItemLine = FOUR_CHAR_CODE('line'), /* line*/
+ kParameterItemColorPicker = FOUR_CHAR_CODE('pick'), /* color swatch & picker*/
+ kParameterItemGroupDivider = FOUR_CHAR_CODE('divi'), /* start of a new group of items*/
+ kParameterItemStaticText = FOUR_CHAR_CODE('stat'), /* display "parameter name" as static text*/
+ kParameterItemDragImage = FOUR_CHAR_CODE('imag'), /* allow image display, along with drag and drop*/
+ /* flags valid for lines and groups*/
+ kGraphicsNoFlags = 0x00000000, /* no options for graphics*/
+ kGraphicsFlagsGray = 0x00000001, /* draw lines with gray*/
+ /* flags valid for groups*/
+ kGroupNoFlags = 0x00000000, /* no options for group -- may be combined with graphics options */
+ kGroupAlignText = 0x00010000, /* edit text items in group have the same size*/
+ kGroupSurroundBox = 0x00020000, /* group should be surrounded with a box*/
+ kGroupMatrix = 0x00040000, /* side-by-side arrangement of group is okay*/
+ kGroupNoName = 0x00080000, /* name of group should not be displayed above box*/
+ /* flags valid for popup/radiocluster/checkbox/control*/
+ kDisableControl = 0x00000001,
+ kDisableWhenNotEqual = (0x00000000 + kDisableControl),
+ kDisableWhenEqual = (0x00000010 + kDisableControl),
+ kDisableWhenLessThan = (0x00000020 + kDisableControl),
+ kDisableWhenGreaterThan = (0x00000030 + kDisableControl), /* flags valid for controls*/
+ kCustomControl = 0x00100000, /* flags valid for popups*/
+ kPopupStoreAsString = 0x00010000
+};
+
+
+struct ControlBehaviors {
+ QTAtomID groupID; /* group under control of this item*/
+ long controlValue; /* control value for comparison purposes*/
+ QTAtomType customType; /* custom type identifier, for kCustomControl*/
+ QTAtomID customID; /* custom type ID, for kCustomControl*/
+};
+typedef struct ControlBehaviors ControlBehaviors;
+
+struct ParameterDataBehavior {
+ OSType behaviorType;
+ long behaviorFlags;
+ union {
+ ControlBehaviors controls;
+ } u;
+};
+typedef struct ParameterDataBehavior ParameterDataBehavior;
+/* higher level purpose of a parameter or set of parameters*/
+enum {
+ kParameterDataUsage = FOUR_CHAR_CODE('use ')
+};
+
+enum {
+ kParameterUsagePixels = FOUR_CHAR_CODE('pixl'),
+ kParameterUsageRectangle = FOUR_CHAR_CODE('rect'),
+ kParameterUsagePoint = FOUR_CHAR_CODE('xy '),
+ kParameterUsage3DPoint = FOUR_CHAR_CODE('xyz '),
+ kParameterUsageDegrees = FOUR_CHAR_CODE('degr'),
+ kParameterUsageRadians = FOUR_CHAR_CODE('rads'),
+ kParameterUsagePercent = FOUR_CHAR_CODE('pcnt'),
+ kParameterUsageSeconds = FOUR_CHAR_CODE('secs'),
+ kParameterUsageMilliseconds = FOUR_CHAR_CODE('msec'),
+ kParameterUsageMicroseconds = FOUR_CHAR_CODE('µsec'),
+ kParameterUsage3by3Matrix = FOUR_CHAR_CODE('3by3'),
+ kParameterUsageCircularDegrees = FOUR_CHAR_CODE('degc'),
+ kParameterUsageCircularRadians = FOUR_CHAR_CODE('radc')
+};
+
+
+struct ParameterDataUsage {
+ OSType usageType; /* higher level purpose of the data or group*/
+};
+typedef struct ParameterDataUsage ParameterDataUsage;
+/* default value(s) for a parameter*/
+enum {
+ kParameterDataDefaultItem = FOUR_CHAR_CODE('dflt')
+};
+
+/* atoms that help to fill in data within the info window */
+enum {
+ kParameterInfoLongName = FOUR_CHAR_CODE('©nam'),
+ kParameterInfoCopyright = FOUR_CHAR_CODE('©cpy'),
+ kParameterInfoDescription = FOUR_CHAR_CODE('©inf'),
+ kParameterInfoWindowTitle = FOUR_CHAR_CODE('©wnt'),
+ kParameterInfoPicture = FOUR_CHAR_CODE('©pix'),
+ kParameterInfoManufacturer = FOUR_CHAR_CODE('©man'),
+ kParameterInfoIDs = 1
+};
+
+/* flags for ImageCodecValidateParameters */
+enum {
+ kParameterValidationNoFlags = 0x00000000,
+ kParameterValidationFinalValidation = 0x00000001
+};
+
+
+typedef long QTParameterValidationOptions;
+/* QTAtomTypes for atoms in image compressor settings containers*/
+enum {
+ kImageCodecSettingsFieldCount = FOUR_CHAR_CODE('fiel'), /* Number of fields (UInt8) */
+ kImageCodecSettingsFieldOrdering = FOUR_CHAR_CODE('fdom'), /* Ordering of fields (UInt8)*/
+ kImageCodecSettingsFieldOrderingF1F2 = 1,
+ kImageCodecSettingsFieldOrderingF2F1 = 2
+};
+
+
+/* Additional Image Description Extensions*/
+enum {
+ kColorInfoImageDescriptionExtension = FOUR_CHAR_CODE('colr'), /* image description extension describing the color properties */
+ kPixelAspectRatioImageDescriptionExtension = FOUR_CHAR_CODE('pasp'), /* image description extension describing the pixel aspect ratio*/
+ kCleanApertureImageDescriptionExtension = FOUR_CHAR_CODE('clap') /* image description extension describing the pixel aspect ratio*/
+};
+
+
+/* Color Info Image Description Extension types*/
+enum {
+ kVideoColorInfoImageDescriptionExtensionType = FOUR_CHAR_CODE('nclc'), /* For video color descriptions (defined below) */
+ kICCProfileColorInfoImageDescriptionExtensionType = FOUR_CHAR_CODE('prof') /* For ICC Profile color descriptions (not defined here)*/
+};
+
+
+/* Video Color Info Image Description Extensions*/
+
+struct NCLCColorInfoImageDescriptionExtension {
+ OSType colorParamType; /* Type of color parameter 'nclc' */
+ UInt16 primaries; /* CIE 1931 xy chromaticity coordinates */
+ UInt16 transferFunction; /* Nonlinear transfer function from RGB to ErEgEb */
+ UInt16 matrix; /* Matrix from ErEgEb to EyEcbEcr */
+};
+typedef struct NCLCColorInfoImageDescriptionExtension NCLCColorInfoImageDescriptionExtension;
+/* Primaries*/
+enum {
+ kQTPrimaries_ITU_R709_2 = 1, /* ITU-R BT.709-2, SMPTE 274M-1995, and SMPTE 296M-1997 */
+ kQTPrimaries_Unknown = 2, /* Unknown */
+ kQTPrimaries_EBU_3213 = 5, /* EBU Tech. 3213 (1981) */
+ kQTPrimaries_SMPTE_C = 6 /* SMPTE C Primaries from SMPTE RP 145-1993 */
+};
+
+/* Transfer Function*/
+enum {
+ kQTTransferFunction_ITU_R709_2 = 1, /* Recommendation ITU-R BT.709-2, SMPTE 274M-1995, SMPTE 296M-1997, SMPTE 293M-1996 and SMPTE 170M-1994 */
+ kQTTransferFunction_Unknown = 2, /* Unknown */
+ kQTTransferFunction_SMPTE_240M_1995 = 7 /* SMPTE 240M-1995 and interim color implementation of SMPTE 274M-1995 */
+};
+
+/* Matrix*/
+enum {
+ kQTMatrix_ITU_R_709_2 = 1, /* Recommendation ITU-R BT.709-2 (1125/60/2:1 only), SMPTE 274M-1995 and SMPTE 296M-1997 */
+ kQTMatrix_Unknown = 2, /* Unknown */
+ kQTMatrix_ITU_R_601_4 = 6, /* Recommendation ITU-R BT.601-4, Recommendation ITU-R BT.470-4 System B and G, SMPTE 170M-1994 and SMPTE 293M-1996 */
+ kQTMatrix_SMPTE_240M_1995 = 7 /* SMPTE 240M-1995 and interim color implementation of SMPTE 274M-1995 */
+};
+
+
+/* Field/Frame Info Image Description (this remaps to FieldInfoImageDescriptionExtension)*/
+
+struct FieldInfoImageDescriptionExtension2 {
+ UInt8 fields;
+ UInt8 detail;
+};
+typedef struct FieldInfoImageDescriptionExtension2 FieldInfoImageDescriptionExtension2;
+enum {
+ kQTFieldsProgressiveScan = 1,
+ kQTFieldsInterlaced = 2
+};
+
+enum {
+ kQTFieldDetailUnknown = 0,
+ kQTFieldDetailTemporalTopFirst = 1,
+ kQTFieldDetailTemporalBottomFirst = 6,
+ kQTFieldDetailSpatialFirstLineEarly = 9,
+ kQTFieldDetailSpatialFirstLineLate = 14
+};
+
+
+/* Pixel Aspect Ratio Image Description Extensions*/
+
+struct PixelAspectRatioImageDescriptionExtension {
+ UInt32 hSpacing; /* Horizontal Spacing */
+ UInt32 vSpacing; /* Vertical Spacing */
+};
+typedef struct PixelAspectRatioImageDescriptionExtension PixelAspectRatioImageDescriptionExtension;
+/* Clean Aperture Image Description Extensions*/
+
+struct CleanApertureImageDescriptionExtension {
+ UInt32 cleanApertureWidthN; /* width of clean aperture, numerator, denominator */
+ UInt32 cleanApertureWidthD;
+ UInt32 cleanApertureHeightN; /* height of clean aperture, numerator, denominator*/
+ UInt32 cleanApertureHeightD;
+ UInt32 horizOffN; /* horizontal offset of clean aperture center minus (width-1)/2, numerator, denominator */
+ UInt32 horizOffD;
+ UInt32 vertOffN; /* vertical offset of clean aperture center minus (height-1)/2, numerator, denominator */
+ UInt32 vertOffD;
+};
+typedef struct CleanApertureImageDescriptionExtension CleanApertureImageDescriptionExtension;
+typedef CALLBACK_API( ComponentResult , ImageCodecMPDrawBandProcPtr )(void *refcon, ImageSubCodecDecompressRecord *drp);
+typedef STACK_UPP_TYPE(ImageCodecMPDrawBandProcPtr) ImageCodecMPDrawBandUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(ImageCodecMPDrawBandUPP)
+ NewImageCodecMPDrawBandUPP (ImageCodecMPDrawBandProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeImageCodecMPDrawBandUPP (ImageCodecMPDrawBandUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokeImageCodecMPDrawBandUPP (void * refcon,
+ ImageSubCodecDecompressRecord * drp,
+ ImageCodecMPDrawBandUPP userUPP);
+
+#else
+ enum { uppImageCodecMPDrawBandProcInfo = 0x000003F0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes) */
+ #define NewImageCodecMPDrawBandUPP(userRoutine) (ImageCodecMPDrawBandUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppImageCodecMPDrawBandProcInfo, GetCurrentArchitecture())
+ #define DisposeImageCodecMPDrawBandUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeImageCodecMPDrawBandUPP(refcon, drp, userUPP) (ComponentResult)CALL_TWO_PARAMETER_UPP((userUPP), uppImageCodecMPDrawBandProcInfo, (refcon), (drp))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewImageCodecMPDrawBandProc(userRoutine) NewImageCodecMPDrawBandUPP(userRoutine)
+#define CallImageCodecMPDrawBandProc(userRoutine, refcon, drp) InvokeImageCodecMPDrawBandUPP(refcon, drp, userRoutine)
+/* codec selectors 0-127 are reserved by Apple */
+/* codec selectors 128-191 are subtype specific */
+/* codec selectors 192-255 are vendor specific */
+/* codec selectors 256-32767 are available for general use */
+/* negative selectors are reserved by the Component Manager */
+EXTERN_API( ComponentResult )
+ImageCodecGetCodecInfo (ComponentInstance ci,
+ CodecInfo * info) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0000, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecGetCompressionTime (ComponentInstance ci,
+ PixMapHandle src,
+ const Rect * srcRect,
+ short depth,
+ CodecQ * spatialQuality,
+ CodecQ * temporalQuality,
+ unsigned long * time) FIVEWORDINLINE(0x2F3C, 0x0016, 0x0001, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecGetMaxCompressionSize (ComponentInstance ci,
+ PixMapHandle src,
+ const Rect * srcRect,
+ short depth,
+ CodecQ quality,
+ long * size) FIVEWORDINLINE(0x2F3C, 0x0012, 0x0002, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecPreCompress (ComponentInstance ci,
+ CodecCompressParams * params) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0003, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecBandCompress (ComponentInstance ci,
+ CodecCompressParams * params) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0004, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecPreDecompress (ComponentInstance ci,
+ CodecDecompressParams * params) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0005, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecBandDecompress (ComponentInstance ci,
+ CodecDecompressParams * params) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0006, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecBusy (ComponentInstance ci,
+ ImageSequence seq) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0007, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecGetCompressedImageSize (ComponentInstance ci,
+ ImageDescriptionHandle desc,
+ Ptr data,
+ long bufferSize,
+ ICMDataProcRecordPtr dataProc,
+ long * dataSize) FIVEWORDINLINE(0x2F3C, 0x0014, 0x0008, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecGetSimilarity (ComponentInstance ci,
+ PixMapHandle src,
+ const Rect * srcRect,
+ ImageDescriptionHandle desc,
+ Ptr data,
+ Fixed * similarity) FIVEWORDINLINE(0x2F3C, 0x0014, 0x0009, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecTrimImage (ComponentInstance ci,
+ ImageDescriptionHandle Desc,
+ Ptr inData,
+ long inBufferSize,
+ ICMDataProcRecordPtr dataProc,
+ Ptr outData,
+ long outBufferSize,
+ ICMFlushProcRecordPtr flushProc,
+ Rect * trimRect,
+ ICMProgressProcRecordPtr progressProc) FIVEWORDINLINE(0x2F3C, 0x0024, 0x000A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecRequestSettings (ComponentInstance ci,
+ Handle settings,
+ Rect * rp,
+ ModalFilterUPP filterProc) FIVEWORDINLINE(0x2F3C, 0x000C, 0x000B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecGetSettings (ComponentInstance ci,
+ Handle settings) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecSetSettings (ComponentInstance ci,
+ Handle settings) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecFlush (ComponentInstance ci) FIVEWORDINLINE(0x2F3C, 0x0000, 0x000E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecSetTimeCode (ComponentInstance ci,
+ void * timeCodeFormat,
+ void * timeCodeTime) FIVEWORDINLINE(0x2F3C, 0x0008, 0x000F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecIsImageDescriptionEquivalent (ComponentInstance ci,
+ ImageDescriptionHandle newDesc,
+ Boolean * equivalent) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0010, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecNewMemory (ComponentInstance ci,
+ Ptr * data,
+ Size dataSize,
+ long dataUse,
+ ICMMemoryDisposedUPP memoryGoneProc,
+ void * refCon) FIVEWORDINLINE(0x2F3C, 0x0014, 0x0011, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecDisposeMemory (ComponentInstance ci,
+ Ptr data) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0012, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecHitTestData (ComponentInstance ci,
+ ImageDescriptionHandle desc,
+ void * data,
+ Size dataSize,
+ Point where,
+ Boolean * hit) FIVEWORDINLINE(0x2F3C, 0x0014, 0x0013, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecNewImageBufferMemory (ComponentInstance ci,
+ CodecDecompressParams * params,
+ long flags,
+ ICMMemoryDisposedUPP memoryGoneProc,
+ void * refCon) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0014, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecExtractAndCombineFields (ComponentInstance ci,
+ long fieldFlags,
+ void * data1,
+ long dataSize1,
+ ImageDescriptionHandle desc1,
+ void * data2,
+ long dataSize2,
+ ImageDescriptionHandle desc2,
+ void * outputData,
+ long * outDataSize,
+ ImageDescriptionHandle descOut) FIVEWORDINLINE(0x2F3C, 0x0028, 0x0015, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecGetMaxCompressionSizeWithSources (ComponentInstance ci,
+ PixMapHandle src,
+ const Rect * srcRect,
+ short depth,
+ CodecQ quality,
+ CDSequenceDataSourcePtr sourceData,
+ long * size) FIVEWORDINLINE(0x2F3C, 0x0016, 0x0016, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecSetTimeBase (ComponentInstance ci,
+ void * base) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0017, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecSourceChanged (ComponentInstance ci,
+ UInt32 majorSourceChangeSeed,
+ UInt32 minorSourceChangeSeed,
+ CDSequenceDataSourcePtr sourceData,
+ long * flagsOut) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0018, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecFlushFrame (ComponentInstance ci,
+ UInt32 flags) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0019, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecGetSettingsAsText (ComponentInstance ci,
+ Handle * text) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecGetParameterListHandle (ComponentInstance ci,
+ Handle * parameterDescriptionHandle) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecGetParameterList (ComponentInstance ci,
+ QTAtomContainer * parameterDescription) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecCreateStandardParameterDialog (ComponentInstance ci,
+ QTAtomContainer parameterDescription,
+ QTAtomContainer parameters,
+ QTParameterDialogOptions dialogOptions,
+ DialogPtr existingDialog,
+ short existingUserItem,
+ QTParameterDialog * createdDialog) FIVEWORDINLINE(0x2F3C, 0x0016, 0x001D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecIsStandardParameterDialogEvent (ComponentInstance ci,
+ EventRecord * pEvent,
+ QTParameterDialog createdDialog) FIVEWORDINLINE(0x2F3C, 0x0008, 0x001E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecDismissStandardParameterDialog (ComponentInstance ci,
+ QTParameterDialog createdDialog) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecStandardParameterDialogDoAction (ComponentInstance ci,
+ QTParameterDialog createdDialog,
+ long action,
+ void * params) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0020, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecNewImageGWorld (ComponentInstance ci,
+ CodecDecompressParams * params,
+ GWorldPtr * newGW,
+ long flags) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0021, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecDisposeImageGWorld (ComponentInstance ci,
+ GWorldPtr theGW) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0022, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecHitTestDataWithFlags (ComponentInstance ci,
+ ImageDescriptionHandle desc,
+ void * data,
+ Size dataSize,
+ Point where,
+ long * hit,
+ long hitFlags) FIVEWORDINLINE(0x2F3C, 0x0018, 0x0023, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecValidateParameters (ComponentInstance ci,
+ QTAtomContainer parameters,
+ QTParameterValidationOptions validationFlags,
+ StringPtr errorString) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0024, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecGetBaseMPWorkFunction (ComponentInstance ci,
+ ComponentMPWorkFunctionUPP * workFunction,
+ void ** refCon,
+ ImageCodecMPDrawBandUPP drawProc,
+ void * drawProcRefCon) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0025, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecRequestGammaLevel (ComponentInstance ci,
+ Fixed srcGammaLevel,
+ Fixed dstGammaLevel,
+ long * codecCanMatch) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0028, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecGetSourceDataGammaLevel (ComponentInstance ci,
+ Fixed * sourceDataGammaLevel) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0029, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecGetDecompressLatency (ComponentInstance ci,
+ TimeRecord * latency) FIVEWORDINLINE(0x2F3C, 0x0004, 0x002B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecMergeFloatingImageOntoWindow (ComponentInstance ci,
+ UInt32 flags) FIVEWORDINLINE(0x2F3C, 0x0004, 0x002C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecRemoveFloatingImage (ComponentInstance ci,
+ UInt32 flags) FIVEWORDINLINE(0x2F3C, 0x0004, 0x002D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecGetDITLForSize (ComponentInstance ci,
+ Handle * ditl,
+ Point * requestedSize) FIVEWORDINLINE(0x2F3C, 0x0008, 0x002E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecDITLInstall (ComponentInstance ci,
+ DialogRef d,
+ short itemOffset) FIVEWORDINLINE(0x2F3C, 0x0006, 0x002F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecDITLEvent (ComponentInstance ci,
+ DialogRef d,
+ short itemOffset,
+ const EventRecord * theEvent,
+ short * itemHit,
+ Boolean * handled) FIVEWORDINLINE(0x2F3C, 0x0012, 0x0030, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecDITLItem (ComponentInstance ci,
+ DialogRef d,
+ short itemOffset,
+ short itemNum) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0031, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecDITLRemove (ComponentInstance ci,
+ DialogRef d,
+ short itemOffset) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0032, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecDITLValidateInput (ComponentInstance ci,
+ Boolean * ok) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0033, 0x7000, 0xA82A);
+
+
+EXTERN_API( ComponentResult )
+ImageCodecPreflight (ComponentInstance ci,
+ CodecDecompressParams * params) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0200, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecInitialize (ComponentInstance ci,
+ ImageSubCodecDecompressCapabilities * cap) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0201, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecBeginBand (ComponentInstance ci,
+ CodecDecompressParams * params,
+ ImageSubCodecDecompressRecord * drp,
+ long flags) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0202, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecDrawBand (ComponentInstance ci,
+ ImageSubCodecDecompressRecord * drp) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0203, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecEndBand (ComponentInstance ci,
+ ImageSubCodecDecompressRecord * drp,
+ OSErr result,
+ long flags) FIVEWORDINLINE(0x2F3C, 0x000A, 0x0204, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecQueueStarting (ComponentInstance ci) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0205, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecQueueStopping (ComponentInstance ci) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0206, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecDroppingFrame (ComponentInstance ci,
+ const ImageSubCodecDecompressRecord * drp) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0207, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecScheduleFrame (ComponentInstance ci,
+ const ImageSubCodecDecompressRecord * drp,
+ ImageCodecTimeTriggerUPP triggerProc,
+ void * triggerProcRefCon) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0208, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecCancelTrigger (ComponentInstance ci) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0209, 0x7000, 0xA82A);
+
+
+
+
+
+
+/* selectors for component calls */
+enum {
+ kImageCodecGetCodecInfoSelect = 0x0000,
+ kImageCodecGetCompressionTimeSelect = 0x0001,
+ kImageCodecGetMaxCompressionSizeSelect = 0x0002,
+ kImageCodecPreCompressSelect = 0x0003,
+ kImageCodecBandCompressSelect = 0x0004,
+ kImageCodecPreDecompressSelect = 0x0005,
+ kImageCodecBandDecompressSelect = 0x0006,
+ kImageCodecBusySelect = 0x0007,
+ kImageCodecGetCompressedImageSizeSelect = 0x0008,
+ kImageCodecGetSimilaritySelect = 0x0009,
+ kImageCodecTrimImageSelect = 0x000A,
+ kImageCodecRequestSettingsSelect = 0x000B,
+ kImageCodecGetSettingsSelect = 0x000C,
+ kImageCodecSetSettingsSelect = 0x000D,
+ kImageCodecFlushSelect = 0x000E,
+ kImageCodecSetTimeCodeSelect = 0x000F,
+ kImageCodecIsImageDescriptionEquivalentSelect = 0x0010,
+ kImageCodecNewMemorySelect = 0x0011,
+ kImageCodecDisposeMemorySelect = 0x0012,
+ kImageCodecHitTestDataSelect = 0x0013,
+ kImageCodecNewImageBufferMemorySelect = 0x0014,
+ kImageCodecExtractAndCombineFieldsSelect = 0x0015,
+ kImageCodecGetMaxCompressionSizeWithSourcesSelect = 0x0016,
+ kImageCodecSetTimeBaseSelect = 0x0017,
+ kImageCodecSourceChangedSelect = 0x0018,
+ kImageCodecFlushFrameSelect = 0x0019,
+ kImageCodecGetSettingsAsTextSelect = 0x001A,
+ kImageCodecGetParameterListHandleSelect = 0x001B,
+ kImageCodecGetParameterListSelect = 0x001C,
+ kImageCodecCreateStandardParameterDialogSelect = 0x001D,
+ kImageCodecIsStandardParameterDialogEventSelect = 0x001E,
+ kImageCodecDismissStandardParameterDialogSelect = 0x001F,
+ kImageCodecStandardParameterDialogDoActionSelect = 0x0020,
+ kImageCodecNewImageGWorldSelect = 0x0021,
+ kImageCodecDisposeImageGWorldSelect = 0x0022,
+ kImageCodecHitTestDataWithFlagsSelect = 0x0023,
+ kImageCodecValidateParametersSelect = 0x0024,
+ kImageCodecGetBaseMPWorkFunctionSelect = 0x0025,
+ kImageCodecRequestGammaLevelSelect = 0x0028,
+ kImageCodecGetSourceDataGammaLevelSelect = 0x0029,
+ kImageCodecGetDecompressLatencySelect = 0x002B,
+ kImageCodecMergeFloatingImageOntoWindowSelect = 0x002C,
+ kImageCodecRemoveFloatingImageSelect = 0x002D,
+ kImageCodecGetDITLForSizeSelect = 0x002E,
+ kImageCodecDITLInstallSelect = 0x002F,
+ kImageCodecDITLEventSelect = 0x0030,
+ kImageCodecDITLItemSelect = 0x0031,
+ kImageCodecDITLRemoveSelect = 0x0032,
+ kImageCodecDITLValidateInputSelect = 0x0033,
+ kImageCodecPreflightSelect = 0x0200,
+ kImageCodecInitializeSelect = 0x0201,
+ kImageCodecBeginBandSelect = 0x0202,
+ kImageCodecDrawBandSelect = 0x0203,
+ kImageCodecEndBandSelect = 0x0204,
+ kImageCodecQueueStartingSelect = 0x0205,
+ kImageCodecQueueStoppingSelect = 0x0206,
+ kImageCodecDroppingFrameSelect = 0x0207,
+ kImageCodecScheduleFrameSelect = 0x0208,
+ kImageCodecCancelTriggerSelect = 0x0209
+};
+
+
+
+
+
+
+
+
+
+
+enum {
+ kMotionJPEGTag = FOUR_CHAR_CODE('mjpg'),
+ kJPEGQuantizationTablesImageDescriptionExtension = FOUR_CHAR_CODE('mjqt'),
+ kJPEGHuffmanTablesImageDescriptionExtension = FOUR_CHAR_CODE('mjht'),
+ kFieldInfoImageDescriptionExtension = FOUR_CHAR_CODE('fiel') /* image description extension describing the field count and field orderings*/
+};
+
+enum {
+ kFieldOrderUnknown = 0,
+ kFieldsStoredF1F2DisplayedF1F2 = 1,
+ kFieldsStoredF1F2DisplayedF2F1 = 2,
+ kFieldsStoredF2F1DisplayedF1F2 = 5,
+ kFieldsStoredF2F1DisplayedF2F1 = 6
+};
+
+
+struct MotionJPEGApp1Marker {
+ long unused;
+ long tag;
+ long fieldSize;
+ long paddedFieldSize;
+ long offsetToNextField;
+ long qTableOffset;
+ long huffmanTableOffset;
+ long sofOffset;
+ long sosOffset;
+ long soiOffset;
+};
+typedef struct MotionJPEGApp1Marker MotionJPEGApp1Marker;
+
+struct FieldInfoImageDescriptionExtension {
+ UInt8 fieldCount;
+ UInt8 fieldOrderings;
+};
+typedef struct FieldInfoImageDescriptionExtension FieldInfoImageDescriptionExtension;
+
+EXTERN_API( ComponentResult )
+QTPhotoSetSampling (ComponentInstance codec,
+ short yH,
+ short yV,
+ short cbH,
+ short cbV,
+ short crH,
+ short crV) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0100, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTPhotoSetRestartInterval (ComponentInstance codec,
+ unsigned short restartInterval) FIVEWORDINLINE(0x2F3C, 0x0002, 0x0101, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTPhotoDefineHuffmanTable (ComponentInstance codec,
+ short componentNumber,
+ Boolean isDC,
+ unsigned char * lengthCounts,
+ unsigned char * values) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0102, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTPhotoDefineQuantizationTable (ComponentInstance codec,
+ short componentNumber,
+ unsigned char * table) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0103, 0x7000, 0xA82A);
+
+
+/* selectors for component calls */
+enum {
+ kQTPhotoSetSamplingSelect = 0x0100,
+ kQTPhotoSetRestartIntervalSelect = 0x0101,
+ kQTPhotoDefineHuffmanTableSelect = 0x0102,
+ kQTPhotoDefineQuantizationTableSelect = 0x0103
+};
+
+
+
+
+/* source identifier -- placed in root container of description, one or more required */
+enum {
+ kEffectSourceName = FOUR_CHAR_CODE('src ')
+};
+
+
+/* source type -- placed in the input map to identify the source kind */
+enum {
+ kEffectDataSourceType = FOUR_CHAR_CODE('dtst')
+};
+
+/* default effect types */
+enum {
+ kEffectRawSource = 0, /* the source is raw image data*/
+ kEffectGenericType = FOUR_CHAR_CODE('geff') /* generic effect for combining others*/
+};
+
+typedef struct EffectSource EffectSource;
+
+typedef EffectSource * EffectSourcePtr;
+
+union SourceData {
+ CDSequenceDataSourcePtr image;
+ EffectSourcePtr effect;
+};
+typedef union SourceData SourceData;
+
+
+struct EffectSource {
+ long effectType; /* type of effect or kEffectRawSource if raw ICM data*/
+ Ptr data; /* track data for this effect*/
+ SourceData source; /* source/effect pointers*/
+ EffectSourcePtr next; /* the next source for the parent effect*/
+
+ /* fields added for QuickTime 4.0*/
+ TimeValue lastTranslatedFrameTime; /* start frame time of last converted frame, may be -1*/
+ TimeValue lastFrameDuration; /* duration of the last converted frame, may be zero*/
+ TimeValue lastFrameTimeScale; /* time scale of this source frame, only has meaning if above fields are valid*/
+};
+
+
+struct EffectsFrameParams {
+ ICMFrameTimeRecord frameTime; /* timing data*/
+ long effectDuration; /* the duration of a single effect frame*/
+ Boolean doAsync; /* set to true if the effect can go async*/
+ unsigned char pad[3];
+ EffectSourcePtr source; /* ptr to the source input tree*/
+ void * refCon; /* storage for the effect*/
+};
+typedef struct EffectsFrameParams EffectsFrameParams;
+typedef EffectsFrameParams * EffectsFrameParamsPtr;
+
+
+EXTERN_API( ComponentResult )
+ImageCodecEffectSetup (ComponentInstance effect,
+ CodecDecompressParams * p) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0300, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecEffectBegin (ComponentInstance effect,
+ CodecDecompressParams * p,
+ EffectsFrameParamsPtr ePtr) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0301, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecEffectRenderFrame (ComponentInstance effect,
+ EffectsFrameParamsPtr p) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0302, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecEffectConvertEffectSourceToFormat (ComponentInstance effect,
+ EffectSourcePtr sourceToConvert,
+ ImageDescriptionHandle requestedDesc) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0303, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecEffectCancel (ComponentInstance effect,
+ EffectsFrameParamsPtr p) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0304, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecEffectGetSpeed (ComponentInstance effect,
+ QTAtomContainer parameters,
+ Fixed * pFPS) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0305, 0x7000, 0xA82A);
+
+
+enum {
+ kSMPTENoFlag = 0,
+ kSMPTESmoothEdgeFlag = 0x01, /* smooth edges of the stroke*/
+ kSMPTEStrokeEdgeFlag = 0x02 /* stroke edge with color*/
+};
+
+
+typedef long SMPTEFlags;
+typedef long SMPTEFrameReference;
+enum {
+ kSlideHorizontalWipe = 1,
+ kSlideVerticalWipe = 2,
+ kTopLeftWipe = 3,
+ kTopRightWipe = 4,
+ kBottomRightWipe = 5,
+ kBottomLeftWipe = 6,
+ kFourCornerWipe = 7,
+ kFourBoxWipe = 8,
+ kBarnVerticalWipe = 21,
+ kBarnHorizontalWipe = 22,
+ kTopCenterWipe = 23,
+ kRightCenterWipe = 24,
+ kBottomCenterWipe = 25,
+ kLeftCenterWipe = 26,
+ kDiagonalLeftDownWipe = 41,
+ kDiagonalRightDownWipe = 42,
+ kTopBottomBowTieWipe = 43,
+ kLeftRightBowTieWipe = 44,
+ kDiagonalLeftOutWipe = 45,
+ kDiagonalRightOutWipe = 46,
+ kDiagonalCrossWipe = 47,
+ kDiagonalBoxWipe = 48,
+ kFilledVWipe = 61,
+ kFilledVRightWipe = 62,
+ kFilledVBottomWipe = 63,
+ kFilledVLeftWipe = 64,
+ kHollowVWipe = 65,
+ kHollowVRightWipe = 66,
+ kHollowVBottomWipe = 67,
+ kHollowVLeftWipe = 68,
+ kVerticalZigZagWipe = 71,
+ kHorizontalZigZagWipe = 72,
+ kVerticalBarnZigZagWipe = 73,
+ kHorizontalBarnZigZagWipe = 74
+};
+
+enum {
+ kRectangleWipe = 101,
+ kDiamondWipe = 102,
+ kTriangleWipe = 103,
+ kTriangleRightWipe = 104,
+ kTriangleUpsideDownWipe = 105,
+ kTriangleLeftWipe = 106,
+ kSpaceShipWipe = 107,
+ kSpaceShipRightWipe = 108,
+ kSpaceShipUpsideDownWipe = 109,
+ kSpaceShipLeftWipe = 110,
+ kPentagonWipe = 111,
+ kPentagonUpsideDownWipe = 112,
+ kHexagonWipe = 113,
+ kHexagonSideWipe = 114,
+ kCircleWipe = 119,
+ kOvalWipe = 120,
+ kOvalSideWipe = 121,
+ kCatEyeWipe = 122,
+ kCatEyeSideWipe = 123,
+ kRoundRectWipe = 124,
+ kRoundRectSideWipe = 125,
+ kFourPointStarWipe = 127,
+ kFivePointStarWipe = 128,
+ kStarOfDavidWipe = 129,
+ kHeartWipe = 130,
+ kKeyholeWipe = 131
+};
+
+enum {
+ kRotatingTopWipe = 201,
+ kRotatingRightWipe = 202,
+ kRotatingBottomWipe = 203,
+ kRotatingLeftWipe = 204,
+ kRotatingTopBottomWipe = 205,
+ kRotatingLeftRightWipe = 206,
+ kRotatingQuadrantWipe = 207,
+ kTopToBottom180Wipe = 211,
+ kRightToLeft180Wipe = 212,
+ kTopToBottom90Wipe = 213,
+ kRightToLeft90Wipe = 214,
+ kTop180Wipe = 221,
+ kRight180Wipe = 222,
+ kBottom180Wipe = 223,
+ kLeft180Wipe = 224,
+ kCounterRotatingTopBottomWipe = 225,
+ kCounterRotatingLeftRightWipe = 226,
+ kDoubleRotatingTopBottomWipe = 227,
+ kDoubleRotatingLeftRightWipe = 228,
+ kVOpenTopWipe = 231,
+ kVOpenRightWipe = 232,
+ kVOpenBottomWipe = 233,
+ kVOpenLeftWipe = 234,
+ kVOpenTopBottomWipe = 235,
+ kVOpenLeftRightWipe = 236,
+ kRotatingTopLeftWipe = 241,
+ kRotatingBottomLeftWipe = 242,
+ kRotatingBottomRightWipe = 243,
+ kRotatingTopRightWipe = 244,
+ kRotatingTopLeftBottomRightWipe = 245,
+ kRotatingBottomLeftTopRightWipe = 246,
+ kRotatingTopLeftRightWipe = 251,
+ kRotatingLeftTopBottomWipe = 252,
+ kRotatingBottomLeftRightWipe = 253,
+ kRotatingRightTopBottomWipe = 254,
+ kRotatingDoubleCenterRightWipe = 261,
+ kRotatingDoubleCenterTopWipe = 262,
+ kRotatingDoubleCenterTopBottomWipe = 263,
+ kRotatingDoubleCenterLeftRightWipe = 264
+};
+
+enum {
+ kHorizontalMatrixWipe = 301,
+ kVerticalMatrixWipe = 302,
+ kTopLeftDiagonalMatrixWipe = 303,
+ kTopRightDiagonalMatrixWipe = 304,
+ kBottomRightDiagonalMatrixWipe = 305,
+ kBottomLeftDiagonalMatrixWipe = 306,
+ kClockwiseTopLeftMatrixWipe = 310,
+ kClockwiseTopRightMatrixWipe = 311,
+ kClockwiseBottomRightMatrixWipe = 312,
+ kClockwiseBottomLeftMatrixWipe = 313,
+ kCounterClockwiseTopLeftMatrixWipe = 314,
+ kCounterClockwiseTopRightMatrixWipe = 315,
+ kCounterClockwiseBottomRightMatrixWipe = 316,
+ kCounterClockwiseBottomLeftMatrixWipe = 317,
+ kVerticalStartTopMatrixWipe = 320,
+ kVerticalStartBottomMatrixWipe = 321,
+ kVerticalStartTopOppositeMatrixWipe = 322,
+ kVerticalStartBottomOppositeMatrixWipe = 323,
+ kHorizontalStartLeftMatrixWipe = 324,
+ kHorizontalStartRightMatrixWipe = 325,
+ kHorizontalStartLeftOppositeMatrixWipe = 326,
+ kHorizontalStartRightOppositeMatrixWipe = 327,
+ kDoubleDiagonalTopRightMatrixWipe = 328,
+ kDoubleDiagonalBottomRightMatrixWipe = 329,
+ kDoubleSpiralTopMatixWipe = 340,
+ kDoubleSpiralBottomMatixWipe = 341,
+ kDoubleSpiralLeftMatixWipe = 342,
+ kDoubleSpiralRightMatixWipe = 343,
+ kQuadSpiralVerticalMatixWipe = 344,
+ kQuadSpiralHorizontalMatixWipe = 345,
+ kVerticalWaterfallLeftMatrixWipe = 350,
+ kVerticalWaterfallRightMatrixWipe = 351,
+ kHorizontalWaterfallLeftMatrixWipe = 352,
+ kHorizontalWaterfallRightMatrixWipe = 353,
+ kRandomWipe = 409, /* non-SMPTE standard numbers*/
+ kRandomWipeGroupWipe = 501,
+ kRandomIrisGroupWipe = 502,
+ kRandomRadialGroupWipe = 503,
+ kRandomMatrixGroupWipe = 504
+};
+
+typedef unsigned long SMPTEWipeType;
+EXTERN_API( ComponentResult )
+ImageCodecEffectPrepareSMPTEFrame (ComponentInstance effect,
+ PixMapPtr destPixMap,
+ SMPTEFrameReference * returnValue) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0100, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecEffectDisposeSMPTEFrame (ComponentInstance effect,
+ SMPTEFrameReference frameRef) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0101, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageCodecEffectRenderSMPTEFrame (ComponentInstance effect,
+ PixMapPtr destPixMap,
+ SMPTEFrameReference frameRef,
+ Fixed effectPercentageEven,
+ Fixed effectPercentageOdd,
+ Rect * pSourceRect,
+ MatrixRecord * pMatrix,
+ SMPTEWipeType effectNumber,
+ long xRepeat,
+ long yRepeat,
+ SMPTEFlags flags,
+ Fixed penWidth,
+ long strokeValue) FIVEWORDINLINE(0x2F3C, 0x0030, 0x0102, 0x7000, 0xA82A);
+
+
+/* selectors for component calls */
+enum {
+ kImageCodecEffectSetupSelect = 0x0300,
+ kImageCodecEffectBeginSelect = 0x0301,
+ kImageCodecEffectRenderFrameSelect = 0x0302,
+ kImageCodecEffectConvertEffectSourceToFormatSelect = 0x0303,
+ kImageCodecEffectCancelSelect = 0x0304,
+ kImageCodecEffectGetSpeedSelect = 0x0305,
+ kImageCodecEffectPrepareSMPTEFrameSelect = 0x0100,
+ kImageCodecEffectDisposeSMPTEFrameSelect = 0x0101,
+ kImageCodecEffectRenderSMPTEFrameSelect = 0x0102
+};
+
+
+/* curve atom types and data structures */
+enum {
+ kCurvePathAtom = FOUR_CHAR_CODE('path'),
+ kCurveEndAtom = FOUR_CHAR_CODE('zero'),
+ kCurveAntialiasControlAtom = FOUR_CHAR_CODE('anti'),
+ kCurveAntialiasOff = 0,
+ kCurveAntialiasOn = (long)0xFFFFFFFF,
+ kCurveFillTypeAtom = FOUR_CHAR_CODE('fill'),
+ kCurvePenThicknessAtom = FOUR_CHAR_CODE('pent'),
+ kCurveMiterLimitAtom = FOUR_CHAR_CODE('mitr'),
+ kCurveJoinAttributesAtom = FOUR_CHAR_CODE('join'),
+ kCurveMinimumDepthAtom = FOUR_CHAR_CODE('mind'),
+ kCurveDepthAlwaysOffscreenMask = (long)0x80000000,
+ kCurveTransferModeAtom = FOUR_CHAR_CODE('xfer'),
+ kCurveGradientAngleAtom = FOUR_CHAR_CODE('angl'),
+ kCurveGradientRadiusAtom = FOUR_CHAR_CODE('radi'),
+ kCurveGradientOffsetAtom = FOUR_CHAR_CODE('cent')
+};
+
+enum {
+ kCurveARGBColorAtom = FOUR_CHAR_CODE('argb')
+};
+
+
+struct ARGBColor {
+ unsigned short alpha;
+ unsigned short red;
+ unsigned short green;
+ unsigned short blue;
+};
+typedef struct ARGBColor ARGBColor;
+enum {
+ kCurveGradientRecordAtom = FOUR_CHAR_CODE('grad')
+};
+
+
+struct GradientColorRecord {
+ ARGBColor thisColor;
+ Fixed endingPercentage;
+};
+typedef struct GradientColorRecord GradientColorRecord;
+
+typedef GradientColorRecord * GradientColorPtr;
+enum {
+ kCurveGradientTypeAtom = FOUR_CHAR_CODE('grdt')
+};
+
+/* currently supported gradient types */
+enum {
+ kLinearGradient = 0,
+ kCircularGradient = 1
+};
+
+typedef long GradientType;
+EXTERN_API( ComponentResult )
+CurveGetLength (ComponentInstance effect,
+ gxPaths * target,
+ long index,
+ wide * wideLength) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0100, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CurveLengthToPoint (ComponentInstance effect,
+ gxPaths * target,
+ long index,
+ Fixed length,
+ FixedPoint * location,
+ FixedPoint * tangent) FIVEWORDINLINE(0x2F3C, 0x0014, 0x0101, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CurveNewPath (ComponentInstance effect,
+ Handle * pPath) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0102, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CurveCountPointsInPath (ComponentInstance effect,
+ gxPaths * aPath,
+ unsigned long contourIndex,
+ unsigned long * pCount) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0103, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CurveGetPathPoint (ComponentInstance effect,
+ gxPaths * aPath,
+ unsigned long contourIndex,
+ unsigned long pointIndex,
+ gxPoint * thePoint,
+ Boolean * ptIsOnPath) FIVEWORDINLINE(0x2F3C, 0x0014, 0x0104, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CurveInsertPointIntoPath (ComponentInstance effect,
+ gxPoint * aPoint,
+ Handle thePath,
+ unsigned long contourIndex,
+ unsigned long pointIndex,
+ Boolean ptIsOnPath) FIVEWORDINLINE(0x2F3C, 0x0012, 0x0105, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CurveSetPathPoint (ComponentInstance effect,
+ gxPaths * aPath,
+ unsigned long contourIndex,
+ unsigned long pointIndex,
+ gxPoint * thePoint,
+ Boolean ptIsOnPath) FIVEWORDINLINE(0x2F3C, 0x0012, 0x0106, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CurveGetNearestPathPoint (ComponentInstance effect,
+ gxPaths * aPath,
+ FixedPoint * thePoint,
+ unsigned long * contourIndex,
+ unsigned long * pointIndex,
+ Fixed * theDelta) FIVEWORDINLINE(0x2F3C, 0x0014, 0x0107, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CurvePathPointToLength (ComponentInstance ci,
+ gxPaths * aPath,
+ Fixed startDist,
+ Fixed endDist,
+ FixedPoint * thePoint,
+ Fixed * pLength) FIVEWORDINLINE(0x2F3C, 0x0014, 0x0108, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CurveCreateVectorStream (ComponentInstance effect,
+ Handle * pStream) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0109, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CurveAddAtomToVectorStream (ComponentInstance effect,
+ OSType atomType,
+ Size atomSize,
+ void * pAtomData,
+ Handle vectorStream) FIVEWORDINLINE(0x2F3C, 0x0010, 0x010A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CurveAddPathAtomToVectorStream (ComponentInstance effect,
+ Handle pathData,
+ Handle vectorStream) FIVEWORDINLINE(0x2F3C, 0x0008, 0x010B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CurveAddZeroAtomToVectorStream (ComponentInstance effect,
+ Handle vectorStream) FIVEWORDINLINE(0x2F3C, 0x0004, 0x010C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+CurveGetAtomDataFromVectorStream (ComponentInstance effect,
+ Handle vectorStream,
+ long atomType,
+ long * dataSize,
+ Ptr * dataPtr) FIVEWORDINLINE(0x2F3C, 0x0010, 0x010D, 0x7000, 0xA82A);
+
+
+
+/* selectors for component calls */
+enum {
+ kCurveGetLengthSelect = 0x0100,
+ kCurveLengthToPointSelect = 0x0101,
+ kCurveNewPathSelect = 0x0102,
+ kCurveCountPointsInPathSelect = 0x0103,
+ kCurveGetPathPointSelect = 0x0104,
+ kCurveInsertPointIntoPathSelect = 0x0105,
+ kCurveSetPathPointSelect = 0x0106,
+ kCurveGetNearestPathPointSelect = 0x0107,
+ kCurvePathPointToLengthSelect = 0x0108,
+ kCurveCreateVectorStreamSelect = 0x0109,
+ kCurveAddAtomToVectorStreamSelect = 0x010A,
+ kCurveAddPathAtomToVectorStreamSelect = 0x010B,
+ kCurveAddZeroAtomToVectorStreamSelect = 0x010C,
+ kCurveGetAtomDataFromVectorStreamSelect = 0x010D
+};
+/* UPP call backs */
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __IMAGECODEC__ */
+
diff --git a/include/qt/ImageCompression.h b/include/qt/ImageCompression.h
new file mode 100644
index 000000000..d9404da90
--- /dev/null
+++ b/include/qt/ImageCompression.h
@@ -0,0 +1,2898 @@
+/*
+ File: ImageCompression.h
+
+ Contains: QuickTime Interfaces.
+
+ Version: Technology: QuickTime 6.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1990-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __IMAGECOMPRESSION__
+#define __IMAGECOMPRESSION__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#ifndef __QDOFFSCREEN__
+#include "QDOffscreen.h"
+#endif
+
+#ifndef __COMPONENTS__
+#include "Components.h"
+#endif
+
+#ifndef __STANDARDFILE__
+#include "StandardFile.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+
+struct MatrixRecord {
+ Fixed matrix[3][3];
+};
+typedef struct MatrixRecord MatrixRecord;
+typedef MatrixRecord * MatrixRecordPtr;
+enum {
+ kRawCodecType = FOUR_CHAR_CODE('raw '),
+ kCinepakCodecType = FOUR_CHAR_CODE('cvid'),
+ kGraphicsCodecType = FOUR_CHAR_CODE('smc '),
+ kAnimationCodecType = FOUR_CHAR_CODE('rle '),
+ kVideoCodecType = FOUR_CHAR_CODE('rpza'),
+ kComponentVideoCodecType = FOUR_CHAR_CODE('yuv2'),
+ kJPEGCodecType = FOUR_CHAR_CODE('jpeg'),
+ kMotionJPEGACodecType = FOUR_CHAR_CODE('mjpa'),
+ kMotionJPEGBCodecType = FOUR_CHAR_CODE('mjpb'),
+ kSGICodecType = FOUR_CHAR_CODE('.SGI'),
+ kPlanarRGBCodecType = FOUR_CHAR_CODE('8BPS'),
+ kMacPaintCodecType = FOUR_CHAR_CODE('PNTG'),
+ kGIFCodecType = FOUR_CHAR_CODE('gif '),
+ kPhotoCDCodecType = FOUR_CHAR_CODE('kpcd'),
+ kQuickDrawGXCodecType = FOUR_CHAR_CODE('qdgx'),
+ kAVRJPEGCodecType = FOUR_CHAR_CODE('avr '),
+ kOpenDMLJPEGCodecType = FOUR_CHAR_CODE('dmb1'),
+ kBMPCodecType = FOUR_CHAR_CODE('WRLE'),
+ kWindowsRawCodecType = FOUR_CHAR_CODE('WRAW'),
+ kVectorCodecType = FOUR_CHAR_CODE('path'),
+ kQuickDrawCodecType = FOUR_CHAR_CODE('qdrw'),
+ kWaterRippleCodecType = FOUR_CHAR_CODE('ripl'),
+ kFireCodecType = FOUR_CHAR_CODE('fire'),
+ kCloudCodecType = FOUR_CHAR_CODE('clou'),
+ kH261CodecType = FOUR_CHAR_CODE('h261'),
+ kH263CodecType = FOUR_CHAR_CODE('h263'),
+ kDVCNTSCCodecType = FOUR_CHAR_CODE('dvc '), /* DV - NTSC and DVCPRO NTSC (available in QuickTime 6.0 or later)*/
+ /* NOTE: kDVCProNTSCCodecType is deprecated. */
+ /* Use kDVCNTSCCodecType instead -- as far as the codecs are concerned, */
+ /* the two data formats are identical.*/
+ kDVCPALCodecType = FOUR_CHAR_CODE('dvcp'),
+ kDVCProPALCodecType = FOUR_CHAR_CODE('dvpp'), /* available in QuickTime 6.0 or later*/
+ kBaseCodecType = FOUR_CHAR_CODE('base'),
+ kFLCCodecType = FOUR_CHAR_CODE('flic'),
+ kTargaCodecType = FOUR_CHAR_CODE('tga '),
+ kPNGCodecType = FOUR_CHAR_CODE('png '),
+ kTIFFCodecType = FOUR_CHAR_CODE('tiff'), /* NOTE: despite what might seem obvious from the two constants*/
+ /* below and their names, they really are correct. 'yuvu' really */
+ /* does mean signed, and 'yuvs' really does mean unsigned. Really. */
+ kComponentVideoSigned = FOUR_CHAR_CODE('yuvu'),
+ kComponentVideoUnsigned = FOUR_CHAR_CODE('yuvs'),
+ kCMYKCodecType = FOUR_CHAR_CODE('cmyk'),
+ kMicrosoftVideo1CodecType = FOUR_CHAR_CODE('msvc'),
+ kSorensonCodecType = FOUR_CHAR_CODE('SVQ1'),
+ kSorenson3CodecType = FOUR_CHAR_CODE('SVQ3'), /* available in QuickTime 5 and later*/
+ kIndeo4CodecType = FOUR_CHAR_CODE('IV41'),
+ kMPEG4VisualCodecType = FOUR_CHAR_CODE('mp4v'),
+ k64ARGBCodecType = FOUR_CHAR_CODE('b64a'),
+ k48RGBCodecType = FOUR_CHAR_CODE('b48r'),
+ k32AlphaGrayCodecType = FOUR_CHAR_CODE('b32a'),
+ k16GrayCodecType = FOUR_CHAR_CODE('b16g'),
+ kMpegYUV420CodecType = FOUR_CHAR_CODE('myuv'),
+ kYUV420CodecType = FOUR_CHAR_CODE('y420'),
+ kSorensonYUV9CodecType = FOUR_CHAR_CODE('syv9'),
+ k422YpCbCr8CodecType = FOUR_CHAR_CODE('2vuy'), /* Component Y'CbCr 8-bit 4:2:2 */
+ k444YpCbCr8CodecType = FOUR_CHAR_CODE('v308'), /* Component Y'CbCr 8-bit 4:4:4 */
+ k4444YpCbCrA8CodecType = FOUR_CHAR_CODE('v408'), /* Component Y'CbCrA 8-bit 4:4:4:4 */
+ k422YpCbCr16CodecType = FOUR_CHAR_CODE('v216'), /* Component Y'CbCr 10,12,14,16-bit 4:2:2*/
+ k422YpCbCr10CodecType = FOUR_CHAR_CODE('v210'), /* Component Y'CbCr 10-bit 4:2:2 */
+ k444YpCbCr10CodecType = FOUR_CHAR_CODE('v410'), /* Component Y'CbCr 10-bit 4:4:4 */
+ k4444YpCbCrA8RCodecType = FOUR_CHAR_CODE('r408') /* Component Y'CbCrA 8-bit 4:4:4:4, rendering format. full range alpha, zero biased yuv*/
+};
+
+
+/* one source effects */
+enum {
+ kBlurImageFilterType = FOUR_CHAR_CODE('blur'),
+ kSharpenImageFilterType = FOUR_CHAR_CODE('shrp'),
+ kEdgeDetectImageFilterType = FOUR_CHAR_CODE('edge'),
+ kEmbossImageFilterType = FOUR_CHAR_CODE('embs'),
+ kConvolveImageFilterType = FOUR_CHAR_CODE('genk'),
+ kAlphaGainImageFilterType = FOUR_CHAR_CODE('gain'),
+ kRGBColorBalanceImageFilterType = FOUR_CHAR_CODE('rgbb'),
+ kHSLColorBalanceImageFilterType = FOUR_CHAR_CODE('hslb'),
+ kColorSyncImageFilterType = FOUR_CHAR_CODE('sync'),
+ kFilmNoiseImageFilterType = FOUR_CHAR_CODE('fmns'),
+ kSolarizeImageFilterType = FOUR_CHAR_CODE('solr'),
+ kColorTintImageFilterType = FOUR_CHAR_CODE('tint'),
+ kLensFlareImageFilterType = FOUR_CHAR_CODE('lens'),
+ kBrightnessContrastImageFilterType = FOUR_CHAR_CODE('brco')
+};
+
+/* two source effects */
+enum {
+ kAlphaCompositorTransitionType = FOUR_CHAR_CODE('blnd'),
+ kCrossFadeTransitionType = FOUR_CHAR_CODE('dslv'),
+ kChannelCompositeEffectType = FOUR_CHAR_CODE('chan'),
+ kChromaKeyTransitionType = FOUR_CHAR_CODE('ckey'),
+ kImplodeTransitionType = FOUR_CHAR_CODE('mplo'),
+ kExplodeTransitionType = FOUR_CHAR_CODE('xplo'),
+ kGradientTransitionType = FOUR_CHAR_CODE('matt'),
+ kPushTransitionType = FOUR_CHAR_CODE('push'),
+ kSlideTransitionType = FOUR_CHAR_CODE('slid'),
+ kWipeTransitionType = FOUR_CHAR_CODE('smpt'),
+ kIrisTransitionType = FOUR_CHAR_CODE('smp2'),
+ kRadialTransitionType = FOUR_CHAR_CODE('smp3'),
+ kMatrixTransitionType = FOUR_CHAR_CODE('smp4'),
+ kZoomTransitionType = FOUR_CHAR_CODE('zoom')
+};
+
+/* three source effects */
+enum {
+ kTravellingMatteEffectType = FOUR_CHAR_CODE('trav')
+};
+
+
+/* Supported by QTNewGWorld in QuickTime 4.0 and later */
+enum {
+ kCMYKPixelFormat = FOUR_CHAR_CODE('cmyk'), /* CMYK, 8-bit */
+ k64ARGBPixelFormat = FOUR_CHAR_CODE('b64a'), /* ARGB, 16-bit big-endian samples */
+ k48RGBPixelFormat = FOUR_CHAR_CODE('b48r'), /* RGB, 16-bit big-endian samples */
+ k32AlphaGrayPixelFormat = FOUR_CHAR_CODE('b32a'), /* AlphaGray, 16-bit big-endian samples */
+ k16GrayPixelFormat = FOUR_CHAR_CODE('b16g'), /* Grayscale, 16-bit big-endian samples */
+ k422YpCbCr8PixelFormat = FOUR_CHAR_CODE('2vuy') /* Component Y'CbCr 8-bit 4:2:2, ordered Cb Y'0 Cr Y'1 */
+};
+
+/* Supported by QTNewGWorld in QuickTime 4.1.2 and later */
+enum {
+ k4444YpCbCrA8PixelFormat = FOUR_CHAR_CODE('v408'), /* Component Y'CbCrA 8-bit 4:4:4:4, ordered Cb Y' Cr A */
+ k4444YpCbCrA8RPixelFormat = FOUR_CHAR_CODE('r408') /* Component Y'CbCrA 8-bit 4:4:4:4, rendering format. full range alpha, zero biased yuv, ordered A Y' Cb Cr */
+};
+
+/* Supported by QTNewGWorld in QuickTime 6.0 and later */
+enum {
+ kYUV420PixelFormat = FOUR_CHAR_CODE('y420') /* Planar Component Y'CbCr 8-bit 4:2:0. PixMap baseAddr points to a big-endian PlanarPixmapInfoYUV420 struct; see ImageCodec.i. */
+};
+
+
+/* These are the bits that are set in the Component flags, and also in the codecInfo struct. */
+enum {
+ codecInfoDoes1 = (1L << 0), /* codec can work with 1-bit pixels */
+ codecInfoDoes2 = (1L << 1), /* codec can work with 2-bit pixels */
+ codecInfoDoes4 = (1L << 2), /* codec can work with 4-bit pixels */
+ codecInfoDoes8 = (1L << 3), /* codec can work with 8-bit pixels */
+ codecInfoDoes16 = (1L << 4), /* codec can work with 16-bit pixels */
+ codecInfoDoes32 = (1L << 5), /* codec can work with 32-bit pixels */
+ codecInfoDoesDither = (1L << 6), /* codec can do ditherMode */
+ codecInfoDoesStretch = (1L << 7), /* codec can stretch to arbitrary sizes */
+ codecInfoDoesShrink = (1L << 8), /* codec can shrink to arbitrary sizes */
+ codecInfoDoesMask = (1L << 9), /* codec can mask to clipping regions */
+ codecInfoDoesTemporal = (1L << 10), /* codec can handle temporal redundancy */
+ codecInfoDoesDouble = (1L << 11), /* codec can stretch to double size exactly */
+ codecInfoDoesQuad = (1L << 12), /* codec can stretch to quadruple size exactly */
+ codecInfoDoesHalf = (1L << 13), /* codec can shrink to half size */
+ codecInfoDoesQuarter = (1L << 14), /* codec can shrink to quarter size */
+ codecInfoDoesRotate = (1L << 15), /* codec can rotate on decompress */
+ codecInfoDoesHorizFlip = (1L << 16), /* codec can flip horizontally on decompress */
+ codecInfoDoesVertFlip = (1L << 17), /* codec can flip vertically on decompress */
+ codecInfoHasEffectParameterList = (1L << 18), /* codec implements get effects parameter list call, once was codecInfoDoesSkew */
+ codecInfoDoesBlend = (1L << 19), /* codec can blend on decompress */
+ codecInfoDoesWarp = (1L << 20), /* codec can warp arbitrarily on decompress */
+ codecInfoDoesRecompress = (1L << 21), /* codec can recompress image without accumulating errors */
+ codecInfoDoesSpool = (1L << 22), /* codec can spool image data */
+ codecInfoDoesRateConstrain = (1L << 23) /* codec can data rate constrain */
+};
+
+
+enum {
+ codecInfoDepth1 = (1L << 0), /* compressed data at 1 bpp depth available */
+ codecInfoDepth2 = (1L << 1), /* compressed data at 2 bpp depth available */
+ codecInfoDepth4 = (1L << 2), /* compressed data at 4 bpp depth available */
+ codecInfoDepth8 = (1L << 3), /* compressed data at 8 bpp depth available */
+ codecInfoDepth16 = (1L << 4), /* compressed data at 16 bpp depth available */
+ codecInfoDepth32 = (1L << 5), /* compressed data at 32 bpp depth available */
+ codecInfoDepth24 = (1L << 6), /* compressed data at 24 bpp depth available */
+ codecInfoDepth33 = (1L << 7), /* compressed data at 1 bpp monochrome depth available */
+ codecInfoDepth34 = (1L << 8), /* compressed data at 2 bpp grayscale depth available */
+ codecInfoDepth36 = (1L << 9), /* compressed data at 4 bpp grayscale depth available */
+ codecInfoDepth40 = (1L << 10), /* compressed data at 8 bpp grayscale depth available */
+ codecInfoStoresClut = (1L << 11), /* compressed data can have custom cluts */
+ codecInfoDoesLossless = (1L << 12), /* compressed data can be stored in lossless format */
+ codecInfoSequenceSensitive = (1L << 13) /* compressed data is sensitive to out of sequence decoding */
+};
+
+
+/* input sequence flags*/
+enum {
+ codecFlagUseImageBuffer = (1L << 0), /* decompress*/
+ codecFlagUseScreenBuffer = (1L << 1), /* decompress*/
+ codecFlagUpdatePrevious = (1L << 2), /* compress*/
+ codecFlagNoScreenUpdate = (1L << 3), /* decompress*/
+ codecFlagWasCompressed = (1L << 4), /* compress*/
+ codecFlagDontOffscreen = (1L << 5), /* decompress*/
+ codecFlagUpdatePreviousComp = (1L << 6), /* compress*/
+ codecFlagForceKeyFrame = (1L << 7), /* compress*/
+ codecFlagOnlyScreenUpdate = (1L << 8), /* decompress*/
+ codecFlagLiveGrab = (1L << 9), /* compress*/
+ codecFlagDiffFrame = (1L << 9), /* decompress*/
+ codecFlagDontUseNewImageBuffer = (1L << 10), /* decompress*/
+ codecFlagInterlaceUpdate = (1L << 11), /* decompress*/
+ codecFlagCatchUpDiff = (1L << 12), /* decompress*/
+ codecFlagSupportDisable = (1L << 13), /* decompress*/
+ codecFlagReenable = (1L << 14) /* decompress*/
+};
+
+
+/* output sequence flags*/
+enum {
+ codecFlagOutUpdateOnNextIdle = (1L << 9),
+ codecFlagOutUpdateOnDataSourceChange = (1L << 10),
+ codecFlagSequenceSensitive = (1L << 11),
+ codecFlagOutUpdateOnTimeChange = (1L << 12),
+ codecFlagImageBufferNotSourceImage = (1L << 13),
+ codecFlagUsedNewImageBuffer = (1L << 14),
+ codecFlagUsedImageBuffer = (1L << 15)
+};
+
+
+
+enum {
+ /* The minimum data size for spooling in or out data */
+ codecMinimumDataSize = 32768L
+};
+
+
+
+enum {
+ compressorComponentType = FOUR_CHAR_CODE('imco'), /* the type for "Components" which compress images */
+ decompressorComponentType = FOUR_CHAR_CODE('imdc') /* the type for "Components" which decompress images */
+};
+
+
+typedef Component CompressorComponent;
+typedef Component DecompressorComponent;
+typedef Component CodecComponent;
+#define anyCodec ((CodecComponent)0)
+#define bestSpeedCodec ((CodecComponent)-1)
+#define bestFidelityCodec ((CodecComponent)-2)
+#define bestCompressionCodec ((CodecComponent)-3)
+typedef OSType CodecType;
+typedef unsigned short CodecFlags;
+typedef unsigned long CodecQ;
+enum {
+ codecLosslessQuality = 0x00000400,
+ codecMaxQuality = 0x000003FF,
+ codecMinQuality = 0x00000000,
+ codecLowQuality = 0x00000100,
+ codecNormalQuality = 0x00000200,
+ codecHighQuality = 0x00000300
+};
+
+enum {
+ codecLockBitsShieldCursor = (1 << 0) /* shield cursor */
+};
+
+enum {
+ codecCompletionSource = (1 << 0), /* asynchronous codec is done with source data */
+ codecCompletionDest = (1 << 1), /* asynchronous codec is done with destination data */
+ codecCompletionDontUnshield = (1 << 2), /* on dest complete don't unshield cursor */
+ codecCompletionWentOffscreen = (1 << 3), /* codec used offscreen buffer */
+ codecCompletionUnlockBits = (1 << 4), /* on dest complete, call ICMSequenceUnlockBits */
+ codecCompletionForceChainFlush = (1 << 5), /* ICM needs to flush the whole chain */
+ codecCompletionDropped = (1 << 6) /* codec decided to drop this frame */
+};
+
+enum {
+ codecProgressOpen = 0,
+ codecProgressUpdatePercent = 1,
+ codecProgressClose = 2
+};
+
+typedef CALLBACK_API( OSErr , ICMDataProcPtr )(Ptr *dataP, long bytesNeeded, long refcon);
+typedef CALLBACK_API( OSErr , ICMFlushProcPtr )(Ptr data, long bytesAdded, long refcon);
+typedef CALLBACK_API( void , ICMCompletionProcPtr )(OSErr result, short flags, long refcon);
+typedef CALLBACK_API( OSErr , ICMProgressProcPtr )(short message, Fixed completeness, long refcon);
+typedef CALLBACK_API( void , StdPixProcPtr )(PixMap *src, Rect *srcRect, MatrixRecord *matrix, short mode, RgnHandle mask, PixMap *matte, Rect *matteRect, short flags);
+typedef CALLBACK_API( void , QDPixProcPtr )(PixMap *src, Rect *srcRect, MatrixRecord *matrix, short mode, RgnHandle mask, PixMap *matte, Rect *matteRect, short flags);
+typedef CALLBACK_API( void , ICMAlignmentProcPtr )(Rect *rp, long refcon);
+typedef CALLBACK_API( void , ICMCursorShieldedProcPtr )(const Rect *r, void *refcon, long flags);
+typedef CALLBACK_API( void , ICMMemoryDisposedProcPtr )(Ptr memoryBlock, void *refcon);
+typedef void * ICMCursorNotify;
+typedef CALLBACK_API( OSErr , ICMConvertDataFormatProcPtr )(void *refCon, long flags, Handle desiredFormat, Handle sourceDataFormat, void *srcData, long srcDataSize, void **dstData, long *dstDataSize);
+typedef STACK_UPP_TYPE(ICMDataProcPtr) ICMDataUPP;
+typedef STACK_UPP_TYPE(ICMFlushProcPtr) ICMFlushUPP;
+typedef STACK_UPP_TYPE(ICMCompletionProcPtr) ICMCompletionUPP;
+typedef STACK_UPP_TYPE(ICMProgressProcPtr) ICMProgressUPP;
+typedef STACK_UPP_TYPE(StdPixProcPtr) StdPixUPP;
+typedef STACK_UPP_TYPE(QDPixProcPtr) QDPixUPP;
+typedef STACK_UPP_TYPE(ICMAlignmentProcPtr) ICMAlignmentUPP;
+typedef STACK_UPP_TYPE(ICMCursorShieldedProcPtr) ICMCursorShieldedUPP;
+typedef STACK_UPP_TYPE(ICMMemoryDisposedProcPtr) ICMMemoryDisposedUPP;
+typedef STACK_UPP_TYPE(ICMConvertDataFormatProcPtr) ICMConvertDataFormatUPP;
+typedef long ImageSequence;
+typedef long ImageSequenceDataSource;
+typedef long ImageTranscodeSequence;
+typedef long ImageFieldSequence;
+
+struct ICMProgressProcRecord {
+ ICMProgressUPP progressProc;
+ long progressRefCon;
+};
+typedef struct ICMProgressProcRecord ICMProgressProcRecord;
+typedef ICMProgressProcRecord * ICMProgressProcRecordPtr;
+
+struct ICMCompletionProcRecord {
+ ICMCompletionUPP completionProc;
+ long completionRefCon;
+};
+typedef struct ICMCompletionProcRecord ICMCompletionProcRecord;
+typedef ICMCompletionProcRecord * ICMCompletionProcRecordPtr;
+
+struct ICMDataProcRecord {
+ ICMDataUPP dataProc;
+ long dataRefCon;
+};
+typedef struct ICMDataProcRecord ICMDataProcRecord;
+typedef ICMDataProcRecord * ICMDataProcRecordPtr;
+
+struct ICMFlushProcRecord {
+ ICMFlushUPP flushProc;
+ long flushRefCon;
+};
+typedef struct ICMFlushProcRecord ICMFlushProcRecord;
+typedef ICMFlushProcRecord * ICMFlushProcRecordPtr;
+
+struct ICMAlignmentProcRecord {
+ ICMAlignmentUPP alignmentProc;
+ long alignmentRefCon;
+};
+typedef struct ICMAlignmentProcRecord ICMAlignmentProcRecord;
+typedef ICMAlignmentProcRecord * ICMAlignmentProcRecordPtr;
+
+struct DataRateParams {
+ long dataRate;
+ long dataOverrun;
+ long frameDuration;
+ long keyFrameRate;
+ CodecQ minSpatialQuality;
+ CodecQ minTemporalQuality;
+};
+typedef struct DataRateParams DataRateParams;
+typedef DataRateParams * DataRateParamsPtr;
+
+struct ImageDescription {
+ long idSize; /* total size of ImageDescription including extra data ( CLUTs and other per sequence data ) */
+ CodecType cType; /* what kind of codec compressed this data */
+ long resvd1; /* reserved for Apple use */
+ short resvd2; /* reserved for Apple use */
+ short dataRefIndex; /* set to zero */
+ short version; /* which version is this data */
+ short revisionLevel; /* what version of that codec did this */
+ long vendor; /* whose codec compressed this data */
+ CodecQ temporalQuality; /* what was the temporal quality factor */
+ CodecQ spatialQuality; /* what was the spatial quality factor */
+ short width; /* how many pixels wide is this data */
+ short height; /* how many pixels high is this data */
+ Fixed hRes; /* horizontal resolution */
+ Fixed vRes; /* vertical resolution */
+ long dataSize; /* if known, the size of data for this image descriptor */
+ short frameCount; /* number of frames this description applies to */
+ Str31 name; /* name of codec ( in case not installed ) */
+ short depth; /* what depth is this data (1-32) or ( 33-40 grayscale ) */
+ short clutID; /* clut id or if 0 clut follows or -1 if no clut */
+};
+typedef struct ImageDescription ImageDescription;
+typedef ImageDescription * ImageDescriptionPtr;
+typedef ImageDescriptionPtr * ImageDescriptionHandle;
+
+struct CodecInfo {
+ Str31 typeName; /* name of the codec type i.e.: 'Apple Image Compression' */
+ short version; /* version of the codec data that this codec knows about */
+ short revisionLevel; /* revision level of this codec i.e: 0x00010001 (1.0.1) */
+ long vendor; /* Maker of this codec i.e: 'appl' */
+ long decompressFlags; /* codecInfo flags for decompression capabilities */
+ long compressFlags; /* codecInfo flags for compression capabilities */
+ long formatFlags; /* codecInfo flags for compression format details */
+ UInt8 compressionAccuracy; /* measure (1-255) of accuracy of this codec for compress (0 if unknown) */
+ UInt8 decompressionAccuracy; /* measure (1-255) of accuracy of this codec for decompress (0 if unknown) */
+ unsigned short compressionSpeed; /* ( millisecs for compressing 320x240 on base mac II) (0 if unknown) */
+ unsigned short decompressionSpeed; /* ( millisecs for decompressing 320x240 on mac II)(0 if unknown) */
+ UInt8 compressionLevel; /* measure (1-255) of compression level of this codec (0 if unknown) */
+ UInt8 resvd; /* pad */
+ short minimumHeight; /* minimum height of image (block size) */
+ short minimumWidth; /* minimum width of image (block size) */
+ short decompressPipelineLatency; /* in milliseconds ( for asynchronous codecs ) */
+ short compressPipelineLatency; /* in milliseconds ( for asynchronous codecs ) */
+ long privateData;
+};
+typedef struct CodecInfo CodecInfo;
+
+struct CodecNameSpec {
+ CodecComponent codec;
+ CodecType cType;
+ Str31 typeName;
+ Handle name;
+};
+typedef struct CodecNameSpec CodecNameSpec;
+
+struct CodecNameSpecList {
+ short count;
+ CodecNameSpec list[1];
+};
+typedef struct CodecNameSpecList CodecNameSpecList;
+typedef CodecNameSpecList * CodecNameSpecListPtr;
+enum {
+ defaultDither = 0,
+ forceDither = 1,
+ suppressDither = 2,
+ useColorMatching = 4
+};
+
+enum {
+ callStdBits = 1,
+ callOldBits = 2,
+ noDefaultOpcodes = 4
+};
+
+enum {
+ graphicsModeStraightAlpha = 256,
+ graphicsModePreWhiteAlpha = 257,
+ graphicsModePreBlackAlpha = 258,
+ graphicsModeComposition = 259,
+ graphicsModeStraightAlphaBlend = 260,
+ graphicsModePreMulColorAlpha = 261
+};
+
+enum {
+ evenField1ToEvenFieldOut = 1 << 0,
+ evenField1ToOddFieldOut = 1 << 1,
+ oddField1ToEvenFieldOut = 1 << 2,
+ oddField1ToOddFieldOut = 1 << 3,
+ evenField2ToEvenFieldOut = 1 << 4,
+ evenField2ToOddFieldOut = 1 << 5,
+ oddField2ToEvenFieldOut = 1 << 6,
+ oddField2ToOddFieldOut = 1 << 7
+};
+
+enum {
+ icmFrameTimeHasVirtualStartTimeAndDuration = 1 << 0
+};
+
+
+struct ICMFrameTimeRecord {
+ wide value; /* frame time*/
+ long scale; /* timescale of value/duration fields*/
+ void * base; /* timebase*/
+
+ long duration; /* duration frame is to be displayed (0 if unknown)*/
+ Fixed rate; /* rate of timebase relative to wall-time*/
+
+ long recordSize; /* total number of bytes in ICMFrameTimeRecord*/
+
+ long frameNumber; /* number of frame, zero if not known*/
+
+ long flags;
+
+ wide virtualStartTime; /* conceptual start time*/
+ long virtualDuration; /* conceptual duration*/
+};
+typedef struct ICMFrameTimeRecord ICMFrameTimeRecord;
+
+typedef ICMFrameTimeRecord * ICMFrameTimePtr;
+#ifndef __QTUUID__
+#define __QTUUID__ 1
+/* QuickTime flavor of universally unique identifier (uuid)*/
+
+struct QTUUID {
+ UInt32 data1;
+ UInt16 data2;
+ UInt16 data3;
+ UInt8 data4[8];
+};
+typedef struct QTUUID QTUUID;
+
+typedef QTUUID QTMediaContextID;
+#endif /* !defined(__QTUUID__) */
+
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(ICMDataUPP)
+ NewICMDataUPP (ICMDataProcPtr userRoutine);
+
+ EXTERN_API(ICMFlushUPP)
+ NewICMFlushUPP (ICMFlushProcPtr userRoutine);
+
+ EXTERN_API(ICMCompletionUPP)
+ NewICMCompletionUPP (ICMCompletionProcPtr userRoutine);
+
+ EXTERN_API(ICMProgressUPP)
+ NewICMProgressUPP (ICMProgressProcPtr userRoutine);
+
+ EXTERN_API(StdPixUPP)
+ NewStdPixUPP (StdPixProcPtr userRoutine);
+
+ EXTERN_API(QDPixUPP)
+ NewQDPixUPP (QDPixProcPtr userRoutine);
+
+ EXTERN_API(ICMAlignmentUPP)
+ NewICMAlignmentUPP (ICMAlignmentProcPtr userRoutine);
+
+ EXTERN_API(ICMCursorShieldedUPP)
+ NewICMCursorShieldedUPP (ICMCursorShieldedProcPtr userRoutine);
+
+ EXTERN_API(ICMMemoryDisposedUPP)
+ NewICMMemoryDisposedUPP (ICMMemoryDisposedProcPtr userRoutine);
+
+ EXTERN_API(ICMConvertDataFormatUPP)
+ NewICMConvertDataFormatUPP (ICMConvertDataFormatProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeICMDataUPP (ICMDataUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeICMFlushUPP (ICMFlushUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeICMCompletionUPP (ICMCompletionUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeICMProgressUPP (ICMProgressUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeStdPixUPP (StdPixUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeQDPixUPP (QDPixUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeICMAlignmentUPP (ICMAlignmentUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeICMCursorShieldedUPP (ICMCursorShieldedUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeICMMemoryDisposedUPP (ICMMemoryDisposedUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeICMConvertDataFormatUPP (ICMConvertDataFormatUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeICMDataUPP (Ptr * dataP,
+ long bytesNeeded,
+ long refcon,
+ ICMDataUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeICMFlushUPP (Ptr data,
+ long bytesAdded,
+ long refcon,
+ ICMFlushUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeICMCompletionUPP (OSErr result,
+ short flags,
+ long refcon,
+ ICMCompletionUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeICMProgressUPP (short message,
+ Fixed completeness,
+ long refcon,
+ ICMProgressUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeStdPixUPP (PixMap * src,
+ Rect * srcRect,
+ MatrixRecord * matrix,
+ short mode,
+ RgnHandle mask,
+ PixMap * matte,
+ Rect * matteRect,
+ short flags,
+ StdPixUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeQDPixUPP (PixMap * src,
+ Rect * srcRect,
+ MatrixRecord * matrix,
+ short mode,
+ RgnHandle mask,
+ PixMap * matte,
+ Rect * matteRect,
+ short flags,
+ QDPixUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeICMAlignmentUPP (Rect * rp,
+ long refcon,
+ ICMAlignmentUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeICMCursorShieldedUPP (const Rect * r,
+ void * refcon,
+ long flags,
+ ICMCursorShieldedUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeICMMemoryDisposedUPP (Ptr memoryBlock,
+ void * refcon,
+ ICMMemoryDisposedUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeICMConvertDataFormatUPP (void * refCon,
+ long flags,
+ Handle desiredFormat,
+ Handle sourceDataFormat,
+ void * srcData,
+ long srcDataSize,
+ void ** dstData,
+ long * dstDataSize,
+ ICMConvertDataFormatUPP userUPP);
+
+#else
+ enum { uppICMDataProcInfo = 0x00000FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppICMFlushProcInfo = 0x00000FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppICMCompletionProcInfo = 0x00000E80 }; /* pascal no_return_value Func(2_bytes, 2_bytes, 4_bytes) */
+ enum { uppICMProgressProcInfo = 0x00000FA0 }; /* pascal 2_bytes Func(2_bytes, 4_bytes, 4_bytes) */
+ enum { uppStdPixProcInfo = 0x002FEFC0 }; /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes, 2_bytes) */
+ enum { uppQDPixProcInfo = 0x002FEFC0 }; /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes, 2_bytes) */
+ enum { uppICMAlignmentProcInfo = 0x000003C0 }; /* pascal no_return_value Func(4_bytes, 4_bytes) */
+ enum { uppICMCursorShieldedProcInfo = 0x00000FC0 }; /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppICMMemoryDisposedProcInfo = 0x000003C0 }; /* pascal no_return_value Func(4_bytes, 4_bytes) */
+ enum { uppICMConvertDataFormatProcInfo = 0x003FFFE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewICMDataUPP(userRoutine) (ICMDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMDataProcInfo, GetCurrentArchitecture())
+ #define NewICMFlushUPP(userRoutine) (ICMFlushUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMFlushProcInfo, GetCurrentArchitecture())
+ #define NewICMCompletionUPP(userRoutine) (ICMCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMCompletionProcInfo, GetCurrentArchitecture())
+ #define NewICMProgressUPP(userRoutine) (ICMProgressUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMProgressProcInfo, GetCurrentArchitecture())
+ #define NewStdPixUPP(userRoutine) (StdPixUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppStdPixProcInfo, GetCurrentArchitecture())
+ #define NewQDPixUPP(userRoutine) (QDPixUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDPixProcInfo, GetCurrentArchitecture())
+ #define NewICMAlignmentUPP(userRoutine) (ICMAlignmentUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMAlignmentProcInfo, GetCurrentArchitecture())
+ #define NewICMCursorShieldedUPP(userRoutine) (ICMCursorShieldedUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMCursorShieldedProcInfo, GetCurrentArchitecture())
+ #define NewICMMemoryDisposedUPP(userRoutine) (ICMMemoryDisposedUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMMemoryDisposedProcInfo, GetCurrentArchitecture())
+ #define NewICMConvertDataFormatUPP(userRoutine) (ICMConvertDataFormatUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMConvertDataFormatProcInfo, GetCurrentArchitecture())
+ #define DisposeICMDataUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeICMFlushUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeICMCompletionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeICMProgressUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeStdPixUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeQDPixUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeICMAlignmentUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeICMCursorShieldedUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeICMMemoryDisposedUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeICMConvertDataFormatUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeICMDataUPP(dataP, bytesNeeded, refcon, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppICMDataProcInfo, (dataP), (bytesNeeded), (refcon))
+ #define InvokeICMFlushUPP(data, bytesAdded, refcon, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppICMFlushProcInfo, (data), (bytesAdded), (refcon))
+ #define InvokeICMCompletionUPP(result, flags, refcon, userUPP) CALL_THREE_PARAMETER_UPP((userUPP), uppICMCompletionProcInfo, (result), (flags), (refcon))
+ #define InvokeICMProgressUPP(message, completeness, refcon, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppICMProgressProcInfo, (message), (completeness), (refcon))
+ #define InvokeStdPixUPP(src, srcRect, matrix, mode, mask, matte, matteRect, flags, userUPP) CALL_EIGHT_PARAMETER_UPP((userUPP), uppStdPixProcInfo, (src), (srcRect), (matrix), (mode), (mask), (matte), (matteRect), (flags))
+ #define InvokeQDPixUPP(src, srcRect, matrix, mode, mask, matte, matteRect, flags, userUPP) CALL_EIGHT_PARAMETER_UPP((userUPP), uppQDPixProcInfo, (src), (srcRect), (matrix), (mode), (mask), (matte), (matteRect), (flags))
+ #define InvokeICMAlignmentUPP(rp, refcon, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppICMAlignmentProcInfo, (rp), (refcon))
+ #define InvokeICMCursorShieldedUPP(r, refcon, flags, userUPP) CALL_THREE_PARAMETER_UPP((userUPP), uppICMCursorShieldedProcInfo, (r), (refcon), (flags))
+ #define InvokeICMMemoryDisposedUPP(memoryBlock, refcon, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppICMMemoryDisposedProcInfo, (memoryBlock), (refcon))
+ #define InvokeICMConvertDataFormatUPP(refCon, flags, desiredFormat, sourceDataFormat, srcData, srcDataSize, dstData, dstDataSize, userUPP) (OSErr)CALL_EIGHT_PARAMETER_UPP((userUPP), uppICMConvertDataFormatProcInfo, (refCon), (flags), (desiredFormat), (sourceDataFormat), (srcData), (srcDataSize), (dstData), (dstDataSize))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewICMDataProc(userRoutine) NewICMDataUPP(userRoutine)
+#define NewICMFlushProc(userRoutine) NewICMFlushUPP(userRoutine)
+#define NewICMCompletionProc(userRoutine) NewICMCompletionUPP(userRoutine)
+#define NewICMProgressProc(userRoutine) NewICMProgressUPP(userRoutine)
+#define NewStdPixProc(userRoutine) NewStdPixUPP(userRoutine)
+#define NewQDPixProc(userRoutine) NewQDPixUPP(userRoutine)
+#define NewICMAlignmentProc(userRoutine) NewICMAlignmentUPP(userRoutine)
+#define NewICMCursorShieldedProc(userRoutine) NewICMCursorShieldedUPP(userRoutine)
+#define NewICMMemoryDisposedProc(userRoutine) NewICMMemoryDisposedUPP(userRoutine)
+#define NewICMConvertDataFormatProc(userRoutine) NewICMConvertDataFormatUPP(userRoutine)
+#define CallICMDataProc(userRoutine, dataP, bytesNeeded, refcon) InvokeICMDataUPP(dataP, bytesNeeded, refcon, userRoutine)
+#define CallICMFlushProc(userRoutine, data, bytesAdded, refcon) InvokeICMFlushUPP(data, bytesAdded, refcon, userRoutine)
+#define CallICMCompletionProc(userRoutine, result, flags, refcon) InvokeICMCompletionUPP(result, flags, refcon, userRoutine)
+#define CallICMProgressProc(userRoutine, message, completeness, refcon) InvokeICMProgressUPP(message, completeness, refcon, userRoutine)
+#define CallStdPixProc(userRoutine, src, srcRect, matrix, mode, mask, matte, matteRect, flags) InvokeStdPixUPP(src, srcRect, matrix, mode, mask, matte, matteRect, flags, userRoutine)
+#define CallQDPixProc(userRoutine, src, srcRect, matrix, mode, mask, matte, matteRect, flags) InvokeQDPixUPP(src, srcRect, matrix, mode, mask, matte, matteRect, flags, userRoutine)
+#define CallICMAlignmentProc(userRoutine, rp, refcon) InvokeICMAlignmentUPP(rp, refcon, userRoutine)
+#define CallICMCursorShieldedProc(userRoutine, r, refcon, flags) InvokeICMCursorShieldedUPP(r, refcon, flags, userRoutine)
+#define CallICMMemoryDisposedProc(userRoutine, memoryBlock, refcon) InvokeICMMemoryDisposedUPP(memoryBlock, refcon, userRoutine)
+#define CallICMConvertDataFormatProc(userRoutine, refCon, flags, desiredFormat, sourceDataFormat, srcData, srcDataSize, dstData, dstDataSize) InvokeICMConvertDataFormatUPP(refCon, flags, desiredFormat, sourceDataFormat, srcData, srcDataSize, dstData, dstDataSize, userRoutine)
+
+EXTERN_API( OSErr )
+CodecManagerVersion (long * version) TWOWORDINLINE(0x7000, 0xAAA3);
+
+EXTERN_API( OSErr )
+GetCodecNameList (CodecNameSpecListPtr * list,
+ short showAll) TWOWORDINLINE(0x7001, 0xAAA3);
+
+EXTERN_API( OSErr )
+DisposeCodecNameList (CodecNameSpecListPtr list) TWOWORDINLINE(0x700F, 0xAAA3);
+
+EXTERN_API( OSErr )
+GetCodecInfo (CodecInfo * info,
+ CodecType cType,
+ CodecComponent codec) TWOWORDINLINE(0x7003, 0xAAA3);
+
+EXTERN_API( OSErr )
+GetMaxCompressionSize (PixMapHandle src,
+ const Rect * srcRect,
+ short colorDepth,
+ CodecQ quality,
+ CodecType cType,
+ CompressorComponent codec,
+ long * size) TWOWORDINLINE(0x7004, 0xAAA3);
+
+EXTERN_API( OSErr )
+GetCSequenceMaxCompressionSize (ImageSequence seqID,
+ PixMapHandle src,
+ long * size) FOURWORDINLINE(0x203C, 0x000C, 0x0074, 0xAAA3);
+
+EXTERN_API( OSErr )
+GetCompressionTime (PixMapHandle src,
+ const Rect * srcRect,
+ short colorDepth,
+ CodecType cType,
+ CompressorComponent codec,
+ CodecQ * spatialQuality,
+ CodecQ * temporalQuality,
+ unsigned long * compressTime) TWOWORDINLINE(0x7005, 0xAAA3);
+
+EXTERN_API( OSErr )
+CompressImage (PixMapHandle src,
+ const Rect * srcRect,
+ CodecQ quality,
+ CodecType cType,
+ ImageDescriptionHandle desc,
+ Ptr data) TWOWORDINLINE(0x7006, 0xAAA3);
+
+EXTERN_API( OSErr )
+FCompressImage (PixMapHandle src,
+ const Rect * srcRect,
+ short colorDepth,
+ CodecQ quality,
+ CodecType cType,
+ CompressorComponent codec,
+ CTabHandle ctable,
+ CodecFlags flags,
+ long bufferSize,
+ ICMFlushProcRecordPtr flushProc,
+ ICMProgressProcRecordPtr progressProc,
+ ImageDescriptionHandle desc,
+ Ptr data) TWOWORDINLINE(0x7007, 0xAAA3);
+
+EXTERN_API( OSErr )
+DecompressImage (Ptr data,
+ ImageDescriptionHandle desc,
+ PixMapHandle dst,
+ const Rect * srcRect,
+ const Rect * dstRect,
+ short mode,
+ RgnHandle mask) TWOWORDINLINE(0x7008, 0xAAA3);
+
+EXTERN_API( OSErr )
+FDecompressImage (Ptr data,
+ ImageDescriptionHandle desc,
+ PixMapHandle dst,
+ const Rect * srcRect,
+ MatrixRecordPtr matrix,
+ short mode,
+ RgnHandle mask,
+ PixMapHandle matte,
+ const Rect * matteRect,
+ CodecQ accuracy,
+ DecompressorComponent codec,
+ long bufferSize,
+ ICMDataProcRecordPtr dataProc,
+ ICMProgressProcRecordPtr progressProc) TWOWORDINLINE(0x7009, 0xAAA3);
+
+EXTERN_API( OSErr )
+CompressSequenceBegin (ImageSequence * seqID,
+ PixMapHandle src,
+ PixMapHandle prev,
+ const Rect * srcRect,
+ const Rect * prevRect,
+ short colorDepth,
+ CodecType cType,
+ CompressorComponent codec,
+ CodecQ spatialQuality,
+ CodecQ temporalQuality,
+ long keyFrameRate,
+ CTabHandle ctable,
+ CodecFlags flags,
+ ImageDescriptionHandle desc) TWOWORDINLINE(0x700A, 0xAAA3);
+
+EXTERN_API( OSErr )
+CompressSequenceFrame (ImageSequence seqID,
+ PixMapHandle src,
+ const Rect * srcRect,
+ CodecFlags flags,
+ Ptr data,
+ long * dataSize,
+ UInt8 * similarity,
+ ICMCompletionProcRecordPtr asyncCompletionProc) TWOWORDINLINE(0x700B, 0xAAA3);
+
+EXTERN_API( OSErr )
+DecompressSequenceBegin (ImageSequence * seqID,
+ ImageDescriptionHandle desc,
+ CGrafPtr port,
+ GDHandle gdh,
+ const Rect * srcRect,
+ MatrixRecordPtr matrix,
+ short mode,
+ RgnHandle mask,
+ CodecFlags flags,
+ CodecQ accuracy,
+ DecompressorComponent codec) TWOWORDINLINE(0x700D, 0xAAA3);
+
+EXTERN_API( OSErr )
+DecompressSequenceBeginS (ImageSequence * seqID,
+ ImageDescriptionHandle desc,
+ Ptr data,
+ long dataSize,
+ CGrafPtr port,
+ GDHandle gdh,
+ const Rect * srcRect,
+ MatrixRecordPtr matrix,
+ short mode,
+ RgnHandle mask,
+ CodecFlags flags,
+ CodecQ accuracy,
+ DecompressorComponent codec) FOURWORDINLINE(0x203C, 0x0030, 0x005D, 0xAAA3);
+
+EXTERN_API( OSErr )
+DecompressSequenceFrame (ImageSequence seqID,
+ Ptr data,
+ CodecFlags inFlags,
+ CodecFlags * outFlags,
+ ICMCompletionProcRecordPtr asyncCompletionProc) TWOWORDINLINE(0x700E, 0xAAA3);
+
+EXTERN_API( OSErr )
+DecompressSequenceFrameS (ImageSequence seqID,
+ Ptr data,
+ long dataSize,
+ CodecFlags inFlags,
+ CodecFlags * outFlags,
+ ICMCompletionProcRecordPtr asyncCompletionProc) FOURWORDINLINE(0x203C, 0x0016, 0x0047, 0xAAA3);
+
+EXTERN_API( OSErr )
+DecompressSequenceFrameWhen (ImageSequence seqID,
+ Ptr data,
+ long dataSize,
+ CodecFlags inFlags,
+ CodecFlags * outFlags,
+ ICMCompletionProcRecordPtr asyncCompletionProc,
+ const ICMFrameTimeRecord * frameTime) FOURWORDINLINE(0x203C, 0x001A, 0x005E, 0xAAA3);
+
+EXTERN_API( OSErr )
+CDSequenceFlush (ImageSequence seqID) FOURWORDINLINE(0x203C, 0x0004, 0x005F, 0xAAA3);
+
+EXTERN_API( OSErr )
+SetDSequenceMatrix (ImageSequence seqID,
+ MatrixRecordPtr matrix) TWOWORDINLINE(0x7010, 0xAAA3);
+
+EXTERN_API( OSErr )
+GetDSequenceMatrix (ImageSequence seqID,
+ MatrixRecordPtr matrix) FOURWORDINLINE(0x203C, 0x0008, 0x0091, 0xAAA3);
+
+EXTERN_API( OSErr )
+SetDSequenceMatte (ImageSequence seqID,
+ PixMapHandle matte,
+ const Rect * matteRect) TWOWORDINLINE(0x7011, 0xAAA3);
+
+EXTERN_API( OSErr )
+SetDSequenceMask (ImageSequence seqID,
+ RgnHandle mask) TWOWORDINLINE(0x7012, 0xAAA3);
+
+EXTERN_API( OSErr )
+SetDSequenceTransferMode (ImageSequence seqID,
+ short mode,
+ const RGBColor * opColor) TWOWORDINLINE(0x7013, 0xAAA3);
+
+EXTERN_API( OSErr )
+SetDSequenceDataProc (ImageSequence seqID,
+ ICMDataProcRecordPtr dataProc,
+ long bufferSize) TWOWORDINLINE(0x7014, 0xAAA3);
+
+EXTERN_API( OSErr )
+SetDSequenceAccuracy (ImageSequence seqID,
+ CodecQ accuracy) TWOWORDINLINE(0x7034, 0xAAA3);
+
+EXTERN_API( OSErr )
+SetDSequenceSrcRect (ImageSequence seqID,
+ const Rect * srcRect) TWOWORDINLINE(0x7035, 0xAAA3);
+
+EXTERN_API( OSErr )
+SetDSequenceFlags (ImageSequence seqID,
+ long flags,
+ long flagsMask) FOURWORDINLINE(0x203C, 0x000C, 0x0057, 0xAAA3);
+
+enum {
+ codecDSequenceDisableOverlaySurface = (1L << 5),
+ codecDSequenceSingleField = (1L << 6),
+ codecDSequenceBidirectionalPrediction = (1L << 7),
+ codecDSequenceFlushInsteadOfDirtying = (1L << 8),
+ codecDSequenceEnableSubPixelPositioning = (1L << 9)
+};
+
+typedef CodecComponent * CodecComponentPtr;
+typedef CodecComponentPtr * CodecComponentHandle;
+/* selectors for ICMSequenceGet/SetInfo*/
+enum {
+ kICMSequenceTaskWeight = FOUR_CHAR_CODE('twei'), /* data is pointer to UInt32*/
+ kICMSequenceTaskName = FOUR_CHAR_CODE('tnam'), /* data is pointer to OSType*/
+ kICMSequenceUserPreferredCodecs = FOUR_CHAR_CODE('punt') /* data is pointer to CodecComponentHandle*/
+};
+
+
+EXTERN_API( OSErr )
+ICMSequenceGetInfo (ImageSequence seqID,
+ OSType which,
+ void * data) FOURWORDINLINE(0x203C, 0x000C, 0x0089, 0xAAA3);
+
+EXTERN_API( OSErr )
+ICMSequenceSetInfo (ImageSequence seqID,
+ OSType which,
+ void * data,
+ Size dataSize) FOURWORDINLINE(0x203C, 0x0010, 0x009D, 0xAAA3);
+
+EXTERN_API( OSErr )
+GetDSequenceImageBuffer (ImageSequence seqID,
+ GWorldPtr * gworld) TWOWORDINLINE(0x7015, 0xAAA3);
+
+EXTERN_API( OSErr )
+GetDSequenceScreenBuffer (ImageSequence seqID,
+ GWorldPtr * gworld) TWOWORDINLINE(0x7016, 0xAAA3);
+
+EXTERN_API( OSErr )
+SetCSequenceQuality (ImageSequence seqID,
+ CodecQ spatialQuality,
+ CodecQ temporalQuality) TWOWORDINLINE(0x7017, 0xAAA3);
+
+EXTERN_API( OSErr )
+SetCSequencePrev (ImageSequence seqID,
+ PixMapHandle prev,
+ const Rect * prevRect) TWOWORDINLINE(0x7018, 0xAAA3);
+
+EXTERN_API( OSErr )
+SetCSequenceFlushProc (ImageSequence seqID,
+ ICMFlushProcRecordPtr flushProc,
+ long bufferSize) TWOWORDINLINE(0x7033, 0xAAA3);
+
+EXTERN_API( OSErr )
+SetCSequenceKeyFrameRate (ImageSequence seqID,
+ long keyFrameRate) TWOWORDINLINE(0x7036, 0xAAA3);
+
+EXTERN_API( OSErr )
+GetCSequenceKeyFrameRate (ImageSequence seqID,
+ long * keyFrameRate) FOURWORDINLINE(0x203C, 0x0008, 0x004B, 0xAAA3);
+
+EXTERN_API( OSErr )
+GetCSequencePrevBuffer (ImageSequence seqID,
+ GWorldPtr * gworld) TWOWORDINLINE(0x7019, 0xAAA3);
+
+EXTERN_API( OSErr )
+CDSequenceBusy (ImageSequence seqID) TWOWORDINLINE(0x701A, 0xAAA3);
+
+EXTERN_API( OSErr )
+CDSequenceEnd (ImageSequence seqID) TWOWORDINLINE(0x701B, 0xAAA3);
+
+EXTERN_API( OSErr )
+CDSequenceEquivalentImageDescription (ImageSequence seqID,
+ ImageDescriptionHandle newDesc,
+ Boolean * equivalent) FOURWORDINLINE(0x203C, 0x000C, 0x0065, 0xAAA3);
+
+EXTERN_API( OSErr )
+CDSequenceEquivalentImageDescriptionS (ImageSequence seqID,
+ ImageDescriptionHandle newDesc,
+ Boolean * equivalent,
+ Boolean * canSwitch) FOURWORDINLINE(0x203C, 0x0010, 0x009F, 0xAAA3);
+
+EXTERN_API( OSErr )
+ReplaceDSequenceImageDescription (ImageSequence seqID,
+ ImageDescriptionHandle newDesc) FOURWORDINLINE(0x203C, 0x0008, 0x00A0, 0xAAA3);
+
+EXTERN_API( OSErr )
+GetCompressedImageSize (ImageDescriptionHandle desc,
+ Ptr data,
+ long bufferSize,
+ ICMDataProcRecordPtr dataProc,
+ long * dataSize) TWOWORDINLINE(0x701C, 0xAAA3);
+
+EXTERN_API( OSErr )
+GetSimilarity (PixMapHandle src,
+ const Rect * srcRect,
+ ImageDescriptionHandle desc,
+ Ptr data,
+ Fixed * similarity) TWOWORDINLINE(0x701D, 0xAAA3);
+
+enum {
+ kImageDescriptionSampleFormat = FOUR_CHAR_CODE('idfm'), /* image description extension describing sample format*/
+ kImageDescriptionClassicAtomFormat = FOUR_CHAR_CODE('atom'), /* sample contains classic atom structure (ie, GX codec and Curve codec)*/
+ kImageDescriptionQTAtomFormat = FOUR_CHAR_CODE('qtat'), /* sample contains QT atom structure*/
+ kImageDescriptionEffectDataFormat = FOUR_CHAR_CODE('fxat'), /* sample describes an effect (as QTAtoms)*/
+ kImageDescriptionPrivateDataFormat = FOUR_CHAR_CODE('priv'), /* sample is in a private codec specific format*/
+ kImageDescriptionAlternateCodec = FOUR_CHAR_CODE('subs'), /* image description extension containing the OSType of a substitute codec should the main codec not be available*/
+ kImageDescriptionColorSpace = FOUR_CHAR_CODE('cspc') /* image description extension containing an OSType naming the native pixel format of an image (only used for pixel formats not supported by classic Color QuickDraw)*/
+};
+
+EXTERN_API( OSErr )
+GetImageDescriptionCTable (ImageDescriptionHandle desc,
+ CTabHandle * ctable) TWOWORDINLINE(0x701E, 0xAAA3);
+
+EXTERN_API( OSErr )
+SetImageDescriptionCTable (ImageDescriptionHandle desc,
+ CTabHandle ctable) TWOWORDINLINE(0x701F, 0xAAA3);
+
+EXTERN_API( OSErr )
+GetImageDescriptionExtension (ImageDescriptionHandle desc,
+ Handle * extension,
+ long idType,
+ long index) TWOWORDINLINE(0x7020, 0xAAA3);
+
+EXTERN_API( OSErr )
+AddImageDescriptionExtension (ImageDescriptionHandle desc,
+ Handle extension,
+ long idType) TWOWORDINLINE(0x7021, 0xAAA3);
+
+EXTERN_API( OSErr )
+RemoveImageDescriptionExtension (ImageDescriptionHandle desc,
+ long idType,
+ long index) FOURWORDINLINE(0x203C, 0x000C, 0x003A, 0xAAA3);
+
+EXTERN_API( OSErr )
+CountImageDescriptionExtensionType (ImageDescriptionHandle desc,
+ long idType,
+ long * count) FOURWORDINLINE(0x203C, 0x000C, 0x003B, 0xAAA3);
+
+EXTERN_API( OSErr )
+GetNextImageDescriptionExtensionType (ImageDescriptionHandle desc,
+ long * idType) FOURWORDINLINE(0x203C, 0x0008, 0x003C, 0xAAA3);
+
+EXTERN_API( OSErr )
+FindCodec (CodecType cType,
+ CodecComponent specCodec,
+ CompressorComponent * compressor,
+ DecompressorComponent * decompressor) TWOWORDINLINE(0x7023, 0xAAA3);
+
+EXTERN_API( OSErr )
+CompressPicture (PicHandle srcPicture,
+ PicHandle dstPicture,
+ CodecQ quality,
+ CodecType cType) TWOWORDINLINE(0x7024, 0xAAA3);
+
+EXTERN_API( OSErr )
+FCompressPicture (PicHandle srcPicture,
+ PicHandle dstPicture,
+ short colorDepth,
+ CTabHandle ctable,
+ CodecQ quality,
+ short doDither,
+ short compressAgain,
+ ICMProgressProcRecordPtr progressProc,
+ CodecType cType,
+ CompressorComponent codec) TWOWORDINLINE(0x7025, 0xAAA3);
+
+EXTERN_API( OSErr )
+CompressPictureFile (short srcRefNum,
+ short dstRefNum,
+ CodecQ quality,
+ CodecType cType) TWOWORDINLINE(0x7026, 0xAAA3);
+
+EXTERN_API( OSErr )
+FCompressPictureFile (short srcRefNum,
+ short dstRefNum,
+ short colorDepth,
+ CTabHandle ctable,
+ CodecQ quality,
+ short doDither,
+ short compressAgain,
+ ICMProgressProcRecordPtr progressProc,
+ CodecType cType,
+ CompressorComponent codec) TWOWORDINLINE(0x7027, 0xAAA3);
+
+EXTERN_API( OSErr )
+GetPictureFileHeader (short refNum,
+ Rect * frame,
+ OpenCPicParams * header) TWOWORDINLINE(0x7028, 0xAAA3);
+
+EXTERN_API( OSErr )
+DrawPictureFile (short refNum,
+ const Rect * frame,
+ ICMProgressProcRecordPtr progressProc) TWOWORDINLINE(0x7029, 0xAAA3);
+
+EXTERN_API( OSErr )
+DrawTrimmedPicture (PicHandle srcPicture,
+ const Rect * frame,
+ RgnHandle trimMask,
+ short doDither,
+ ICMProgressProcRecordPtr progressProc) TWOWORDINLINE(0x702E, 0xAAA3);
+
+EXTERN_API( OSErr )
+DrawTrimmedPictureFile (short srcRefnum,
+ const Rect * frame,
+ RgnHandle trimMask,
+ short doDither,
+ ICMProgressProcRecordPtr progressProc) TWOWORDINLINE(0x702F, 0xAAA3);
+
+EXTERN_API( OSErr )
+MakeThumbnailFromPicture (PicHandle picture,
+ short colorDepth,
+ PicHandle thumbnail,
+ ICMProgressProcRecordPtr progressProc) TWOWORDINLINE(0x702A, 0xAAA3);
+
+EXTERN_API( OSErr )
+MakeThumbnailFromPictureFile (short refNum,
+ short colorDepth,
+ PicHandle thumbnail,
+ ICMProgressProcRecordPtr progressProc) TWOWORDINLINE(0x702B, 0xAAA3);
+
+EXTERN_API( OSErr )
+MakeThumbnailFromPixMap (PixMapHandle src,
+ const Rect * srcRect,
+ short colorDepth,
+ PicHandle thumbnail,
+ ICMProgressProcRecordPtr progressProc) TWOWORDINLINE(0x702C, 0xAAA3);
+
+EXTERN_API( OSErr )
+TrimImage (ImageDescriptionHandle desc,
+ Ptr inData,
+ long inBufferSize,
+ ICMDataProcRecordPtr dataProc,
+ Ptr outData,
+ long outBufferSize,
+ ICMFlushProcRecordPtr flushProc,
+ Rect * trimRect,
+ ICMProgressProcRecordPtr progressProc) TWOWORDINLINE(0x702D, 0xAAA3);
+
+EXTERN_API( OSErr )
+ConvertImage (ImageDescriptionHandle srcDD,
+ Ptr srcData,
+ short colorDepth,
+ CTabHandle ctable,
+ CodecQ accuracy,
+ CodecQ quality,
+ CodecType cType,
+ CodecComponent codec,
+ ImageDescriptionHandle dstDD,
+ Ptr dstData) TWOWORDINLINE(0x7030, 0xAAA3);
+
+EXTERN_API( OSErr )
+GetCompressedPixMapInfo (PixMapPtr pix,
+ ImageDescriptionHandle * desc,
+ Ptr * data,
+ long * bufferSize,
+ ICMDataProcRecord * dataProc,
+ ICMProgressProcRecord * progressProc) TWOWORDINLINE(0x7037, 0xAAA3);
+
+EXTERN_API( OSErr )
+SetCompressedPixMapInfo (PixMapPtr pix,
+ ImageDescriptionHandle desc,
+ Ptr data,
+ long bufferSize,
+ ICMDataProcRecordPtr dataProc,
+ ICMProgressProcRecordPtr progressProc) TWOWORDINLINE(0x7038, 0xAAA3);
+
+EXTERN_API( void )
+StdPix (PixMapPtr src,
+ const Rect * srcRect,
+ MatrixRecordPtr matrix,
+ short mode,
+ RgnHandle mask,
+ PixMapPtr matte,
+ const Rect * matteRect,
+ short flags) TWOWORDINLINE(0x700C, 0xAAA3);
+
+EXTERN_API( OSErr )
+TransformRgn (MatrixRecordPtr matrix,
+ RgnHandle rgn) TWOWORDINLINE(0x7039, 0xAAA3);
+
+/***********
+ preview stuff
+***********/
+EXTERN_API( void )
+SFGetFilePreview (Point where,
+ ConstStr255Param prompt,
+ FileFilterUPP fileFilter,
+ short numTypes,
+ ConstSFTypeListPtr typeList,
+ DlgHookUPP dlgHook,
+ SFReply * reply) TWOWORDINLINE(0x7041, 0xAAA3);
+
+EXTERN_API( void )
+SFPGetFilePreview (Point where,
+ ConstStr255Param prompt,
+ FileFilterUPP fileFilter,
+ short numTypes,
+ ConstSFTypeListPtr typeList,
+ DlgHookUPP dlgHook,
+ SFReply * reply,
+ short dlgID,
+ ModalFilterUPP filterProc) TWOWORDINLINE(0x7042, 0xAAA3);
+
+EXTERN_API( void )
+StandardGetFilePreview (FileFilterUPP fileFilter,
+ short numTypes,
+ ConstSFTypeListPtr typeList,
+ StandardFileReply * reply) TWOWORDINLINE(0x7043, 0xAAA3);
+
+EXTERN_API( void )
+CustomGetFilePreview (FileFilterYDUPP fileFilter,
+ short numTypes,
+ ConstSFTypeListPtr typeList,
+ StandardFileReply * reply,
+ short dlgID,
+ Point where,
+ DlgHookYDUPP dlgHook,
+ ModalFilterYDUPP filterProc,
+ ActivationOrderListPtr activeList,
+ ActivateYDUPP activateProc,
+ void * yourDataPtr) TWOWORDINLINE(0x7044, 0xAAA3);
+
+EXTERN_API( OSErr )
+MakeFilePreview (short resRefNum,
+ ICMProgressProcRecordPtr progress) TWOWORDINLINE(0x7045, 0xAAA3);
+
+EXTERN_API( OSErr )
+AddFilePreview (short resRefNum,
+ OSType previewType,
+ Handle previewData) TWOWORDINLINE(0x7046, 0xAAA3);
+
+enum {
+ sfpItemPreviewAreaUser = 11,
+ sfpItemPreviewStaticText = 12,
+ sfpItemPreviewDividerUser = 13,
+ sfpItemCreatePreviewButton = 14,
+ sfpItemShowPreviewButton = 15
+};
+
+
+struct PreviewResourceRecord {
+ unsigned long modDate;
+ short version;
+ OSType resType;
+ short resID;
+};
+typedef struct PreviewResourceRecord PreviewResourceRecord;
+
+typedef PreviewResourceRecord * PreviewResourcePtr;
+typedef PreviewResourcePtr * PreviewResource;
+EXTERN_API( void )
+AlignScreenRect (Rect * rp,
+ ICMAlignmentProcRecordPtr alignmentProc) FOURWORDINLINE(0x203C, 0x0008, 0x004C, 0xAAA3);
+
+EXTERN_API( void )
+AlignWindow (WindowRef wp,
+ Boolean front,
+ const Rect * alignmentRect,
+ ICMAlignmentProcRecordPtr alignmentProc) FOURWORDINLINE(0x203C, 0x000E, 0x004D, 0xAAA3);
+
+EXTERN_API( void )
+DragAlignedWindow (WindowRef wp,
+ Point startPt,
+ Rect * boundsRect,
+ Rect * alignmentRect,
+ ICMAlignmentProcRecordPtr alignmentProc) FOURWORDINLINE(0x203C, 0x0014, 0x004E, 0xAAA3);
+
+EXTERN_API( long )
+DragAlignedGrayRgn (RgnHandle theRgn,
+ Point startPt,
+ Rect * boundsRect,
+ Rect * slopRect,
+ short axis,
+ UniversalProcPtr actionProc,
+ Rect * alignmentRect,
+ ICMAlignmentProcRecordPtr alignmentProc) FOURWORDINLINE(0x203C, 0x001E, 0x004F, 0xAAA3);
+
+EXTERN_API( OSErr )
+SetCSequenceDataRateParams (ImageSequence seqID,
+ DataRateParamsPtr params) FOURWORDINLINE(0x203C, 0x0008, 0x0050, 0xAAA3);
+
+EXTERN_API( OSErr )
+SetCSequenceFrameNumber (ImageSequence seqID,
+ long frameNumber) FOURWORDINLINE(0x203C, 0x0008, 0x0051, 0xAAA3);
+
+EXTERN_API( OSErr )
+SetCSequencePreferredPacketSize (ImageSequence seqID,
+ long preferredPacketSizeInBytes) FOURWORDINLINE(0x203C, 0x0008, 0x0078, 0xAAA3);
+
+EXTERN_API( OSErr )
+NewImageGWorld (GWorldPtr * gworld,
+ ImageDescriptionHandle idh,
+ GWorldFlags flags) FOURWORDINLINE(0x203C, 0x000C, 0x0052, 0xAAA3);
+
+EXTERN_API( OSErr )
+GetCSequenceDataRateParams (ImageSequence seqID,
+ DataRateParamsPtr params) FOURWORDINLINE(0x203C, 0x0008, 0x0053, 0xAAA3);
+
+EXTERN_API( OSErr )
+GetCSequenceFrameNumber (ImageSequence seqID,
+ long * frameNumber) FOURWORDINLINE(0x203C, 0x0008, 0x0054, 0xAAA3);
+
+EXTERN_API( OSErr )
+GetBestDeviceRect (GDHandle * gdh,
+ Rect * rp) FOURWORDINLINE(0x203C, 0x0008, 0x0055, 0xAAA3);
+
+EXTERN_API( OSErr )
+SetSequenceProgressProc (ImageSequence seqID,
+ ICMProgressProcRecord * progressProc) FOURWORDINLINE(0x203C, 0x0008, 0x0056, 0xAAA3);
+
+EXTERN_API( OSErr )
+GDHasScale (GDHandle gdh,
+ short depth,
+ Fixed * scale) FOURWORDINLINE(0x203C, 0x000A, 0x005A, 0xAAA3);
+
+EXTERN_API( OSErr )
+GDGetScale (GDHandle gdh,
+ Fixed * scale,
+ short * flags) FOURWORDINLINE(0x203C, 0x000C, 0x005B, 0xAAA3);
+
+EXTERN_API( OSErr )
+GDSetScale (GDHandle gdh,
+ Fixed scale,
+ short flags) FOURWORDINLINE(0x203C, 0x000A, 0x005C, 0xAAA3);
+
+EXTERN_API( OSErr )
+ICMShieldSequenceCursor (ImageSequence seqID) FOURWORDINLINE(0x203C, 0x0004, 0x0062, 0xAAA3);
+
+EXTERN_API( void )
+ICMDecompressComplete (ImageSequence seqID,
+ OSErr err,
+ short flag,
+ ICMCompletionProcRecordPtr completionRtn) FOURWORDINLINE(0x203C, 0x000C, 0x0063, 0xAAA3);
+
+EXTERN_API( OSErr )
+ICMDecompressCompleteS (ImageSequence seqID,
+ OSErr err,
+ short flag,
+ ICMCompletionProcRecordPtr completionRtn) FOURWORDINLINE(0x203C, 0x000C, 0x0082, 0xAAA3);
+
+EXTERN_API( OSErr )
+ICMSequenceLockBits (ImageSequence seqID,
+ PixMapPtr dst,
+ long flags) FOURWORDINLINE(0x203C, 0x000C, 0x007C, 0xAAA3);
+
+EXTERN_API( OSErr )
+ICMSequenceUnlockBits (ImageSequence seqID,
+ long flags) FOURWORDINLINE(0x203C, 0x0008, 0x007D, 0xAAA3);
+
+enum {
+ kICMPixelFormatIsPlanarMask = 0x0F, /* these bits in formatFlags indicate how many planes there are; they're 0 if chunky*/
+ kICMPixelFormatIsIndexed = (1L << 4),
+ kICMPixelFormatIsSupportedByQD = (1L << 5),
+ kICMPixelFormatIsMonochrome = (1L << 6),
+ kICMPixelFormatHasAlphaChannel = (1L << 7)
+};
+
+
+struct ICMPixelFormatInfo {
+ long size; /* caller MUST fill this in with sizeof(ICMPixelFormatInfo) before calling ICMGet/SetPixelFormatInfo*/
+ unsigned long formatFlags;
+ short bitsPerPixel[14]; /* list each plane's bits per pixel separately if planar*/
+ /* new field for QuickTime 4.1*/
+ Fixed defaultGammaLevel;
+ /* new fields for QuickTime 6.0*/
+ short horizontalSubsampling[14]; /* per plane; use 1 if plane is not subsampled*/
+ short verticalSubsampling[14]; /* per plane; use 1 if plane is not subsampled*/
+};
+typedef struct ICMPixelFormatInfo ICMPixelFormatInfo;
+typedef ICMPixelFormatInfo * ICMPixelFormatInfoPtr;
+/* IMPORTANT: Fill in theInfo->size with sizeof(ICMPixelFormatInfo) before calling ICMGetPixelFormatInfo */
+EXTERN_API( OSErr )
+ICMGetPixelFormatInfo (OSType PixelFormat,
+ ICMPixelFormatInfoPtr theInfo) FOURWORDINLINE(0x203C, 0x0008, 0x0083, 0xAAA3);
+
+/* IMPORTANT: Fill in theInfo->size with sizeof(ICMPixelFormatInfo) before calling ICMSetPixelFormatInfo */
+EXTERN_API( OSErr )
+ICMSetPixelFormatInfo (OSType PixelFormat,
+ ICMPixelFormatInfoPtr theInfo) FOURWORDINLINE(0x203C, 0x0008, 0x008A, 0xAAA3);
+
+enum {
+ kICMGetChainUltimateParent = 0,
+ kICMGetChainParent = 1,
+ kICMGetChainChild = 2,
+ kICMGetChainUltimateChild = 3
+};
+
+EXTERN_API( OSErr )
+ICMSequenceGetChainMember (ImageSequence seqID,
+ ImageSequence * retSeqID,
+ long flags) FOURWORDINLINE(0x203C, 0x000C, 0x007E, 0xAAA3);
+
+EXTERN_API( OSErr )
+SetDSequenceTimeCode (ImageSequence seqID,
+ void * timeCodeFormat,
+ void * timeCodeTime) FOURWORDINLINE(0x203C, 0x000C, 0x0064, 0xAAA3);
+
+EXTERN_API( OSErr )
+CDSequenceNewMemory (ImageSequence seqID,
+ Ptr * data,
+ Size dataSize,
+ long dataUse,
+ ICMMemoryDisposedUPP memoryGoneProc,
+ void * refCon) FOURWORDINLINE(0x203C, 0x0018, 0x0066, 0xAAA3);
+
+EXTERN_API( OSErr )
+CDSequenceDisposeMemory (ImageSequence seqID,
+ Ptr data) FOURWORDINLINE(0x203C, 0x0008, 0x0067, 0xAAA3);
+
+EXTERN_API( OSErr )
+CDSequenceNewDataSource (ImageSequence seqID,
+ ImageSequenceDataSource * sourceID,
+ OSType sourceType,
+ long sourceInputNumber,
+ Handle dataDescription,
+ ICMConvertDataFormatUPP transferProc,
+ void * refCon) FOURWORDINLINE(0x203C, 0x001C, 0x0068, 0xAAA3);
+
+EXTERN_API( OSErr )
+CDSequenceDisposeDataSource (ImageSequenceDataSource sourceID) FOURWORDINLINE(0x203C, 0x0004, 0x0069, 0xAAA3);
+
+EXTERN_API( OSErr )
+CDSequenceSetSourceData (ImageSequenceDataSource sourceID,
+ void * data,
+ long dataSize) FOURWORDINLINE(0x203C, 0x000C, 0x006A, 0xAAA3);
+
+EXTERN_API( OSErr )
+CDSequenceChangedSourceData (ImageSequenceDataSource sourceID) FOURWORDINLINE(0x203C, 0x0004, 0x006B, 0xAAA3);
+
+EXTERN_API( OSErr )
+CDSequenceSetSourceDataQueue (ImageSequenceDataSource sourceID,
+ QHdrPtr dataQueue) FOURWORDINLINE(0x203C, 0x0008, 0x007B, 0xAAA3);
+
+EXTERN_API( OSErr )
+CDSequenceGetDataSource (ImageSequence seqID,
+ ImageSequenceDataSource * sourceID,
+ OSType sourceType,
+ long sourceInputNumber) FOURWORDINLINE(0x203C, 0x0010, 0x007F, 0xAAA3);
+
+EXTERN_API( OSErr )
+PtInDSequenceData (ImageSequence seqID,
+ void * data,
+ Size dataSize,
+ Point where,
+ Boolean * hit) FOURWORDINLINE(0x203C, 0x0014, 0x006C, 0xAAA3);
+
+EXTERN_API( OSErr )
+HitTestDSequenceData (ImageSequence seqID,
+ void * data,
+ Size dataSize,
+ Point where,
+ long * hit,
+ long hitFlags) FOURWORDINLINE(0x203C, 0x0018, 0x0087, 0xAAA3);
+
+EXTERN_API( OSErr )
+GetGraphicsImporterForFile (const FSSpec * theFile,
+ ComponentInstance * gi) FOURWORDINLINE(0x203C, 0x0008, 0x006E, 0xAAA3);
+
+EXTERN_API( OSErr )
+GetGraphicsImporterForDataRef (Handle dataRef,
+ OSType dataRefType,
+ ComponentInstance * gi) FOURWORDINLINE(0x203C, 0x000C, 0x0077, 0xAAA3);
+
+enum {
+ kDontUseValidateToFindGraphicsImporter = 1L << 0
+};
+
+EXTERN_API( OSErr )
+GetGraphicsImporterForFileWithFlags (const FSSpec * theFile,
+ ComponentInstance * gi,
+ long flags) FOURWORDINLINE(0x203C, 0x000C, 0x0084, 0xAAA3);
+
+EXTERN_API( OSErr )
+GetGraphicsImporterForDataRefWithFlags (Handle dataRef,
+ OSType dataRefType,
+ ComponentInstance * gi,
+ long flags) FOURWORDINLINE(0x203C, 0x0010, 0x0085, 0xAAA3);
+
+EXTERN_API( OSErr )
+QTGetFileNameExtension (ConstStrFileNameParam fileName,
+ OSType fileType,
+ OSType * extension) FOURWORDINLINE(0x203C, 0x000C, 0x0061, 0xAAA3);
+
+
+EXTERN_API( OSErr )
+ImageTranscodeSequenceBegin (ImageTranscodeSequence * its,
+ ImageDescriptionHandle srcDesc,
+ OSType destType,
+ ImageDescriptionHandle * dstDesc,
+ void * data,
+ long dataSize) FOURWORDINLINE(0x203C, 0x0018, 0x006F, 0xAAA3);
+
+EXTERN_API( OSErr )
+ImageTranscodeSequenceEnd (ImageTranscodeSequence its) FOURWORDINLINE(0x203C, 0x0004, 0x0070, 0xAAA3);
+
+EXTERN_API( OSErr )
+ImageTranscodeFrame (ImageTranscodeSequence its,
+ void * srcData,
+ long srcDataSize,
+ void ** dstData,
+ long * dstDataSize) FOURWORDINLINE(0x203C, 0x0014, 0x0071, 0xAAA3);
+
+EXTERN_API( OSErr )
+ImageTranscodeDisposeFrameData (ImageTranscodeSequence its,
+ void * dstData) FOURWORDINLINE(0x203C, 0x0008, 0x0072, 0xAAA3);
+
+EXTERN_API( OSErr )
+CDSequenceInvalidate (ImageSequence seqID,
+ RgnHandle invalRgn) FOURWORDINLINE(0x203C, 0x0008, 0x0073, 0xAAA3);
+
+EXTERN_API( OSErr )
+CDSequenceSetTimeBase (ImageSequence seqID,
+ void * base) FOURWORDINLINE(0x203C, 0x0008, 0x0079, 0xAAA3);
+
+EXTERN_API( OSErr )
+ImageFieldSequenceBegin (ImageFieldSequence * ifs,
+ ImageDescriptionHandle desc1,
+ ImageDescriptionHandle desc2,
+ ImageDescriptionHandle descOut) FOURWORDINLINE(0x203C, 0x0010, 0x006D, 0xAAA3);
+
+EXTERN_API( OSErr )
+ImageFieldSequenceExtractCombine (ImageFieldSequence ifs,
+ long fieldFlags,
+ void * data1,
+ long dataSize1,
+ void * data2,
+ long dataSize2,
+ void * outputData,
+ long * outDataSize) FOURWORDINLINE(0x203C, 0x0020, 0x0075, 0xAAA3);
+
+EXTERN_API( OSErr )
+ImageFieldSequenceEnd (ImageFieldSequence ifs) FOURWORDINLINE(0x203C, 0x0004, 0x0076, 0xAAA3);
+
+enum {
+ kICMTempThenAppMemory = 1L << 12,
+ kICMAppThenTempMemory = 1L << 13
+};
+
+EXTERN_API( OSErr )
+QTNewGWorld (GWorldPtr * offscreenGWorld,
+ OSType PixelFormat,
+ const Rect * boundsRect,
+ CTabHandle cTable,
+ GDHandle aGDevice,
+ GWorldFlags flags) FOURWORDINLINE(0x203C, 0x0018, 0x0080, 0xAAA3);
+
+EXTERN_API( OSErr )
+QTNewGWorldFromPtr (GWorldPtr * gw,
+ OSType pixelFormat,
+ const Rect * boundsRect,
+ CTabHandle cTable,
+ GDHandle aGDevice,
+ GWorldFlags flags,
+ void * baseAddr,
+ long rowBytes) FOURWORDINLINE(0x203C, 0x0020, 0x008B, 0xAAA3);
+
+EXTERN_API( GWorldFlags )
+QTUpdateGWorld (GWorldPtr * offscreenGWorld,
+ OSType PixelFormat,
+ const Rect * boundsRect,
+ CTabHandle cTable,
+ GDHandle aGDevice,
+ GWorldFlags flags) FOURWORDINLINE(0x203C, 0x0018, 0x0081, 0xAAA3);
+
+EXTERN_API( OSErr )
+MakeImageDescriptionForPixMap (PixMapHandle pixmap,
+ ImageDescriptionHandle * idh) FOURWORDINLINE(0x203C, 0x0008, 0x007A, 0xAAA3);
+
+EXTERN_API( OSErr )
+MakeImageDescriptionForEffect (OSType effectType,
+ ImageDescriptionHandle * idh) FOURWORDINLINE(0x203C, 0x0008, 0x0092, 0xAAA3);
+
+EXTERN_API( short )
+QTGetPixelSize (OSType PixelFormat) FOURWORDINLINE(0x203C, 0x0004, 0x0086, 0xAAA3);
+
+EXTERN_API( short )
+QTGetPixelFormatDepthForImageDescription (OSType pixelFormat) FOURWORDINLINE(0x203C, 0x0004, 0x00A3, 0xAAA3);
+
+EXTERN_API( long )
+QTGetPixMapPtrRowBytes (PixMapPtr pm) FOURWORDINLINE(0x203C, 0x0004, 0x008D, 0xAAA3);
+
+EXTERN_API( long )
+QTGetPixMapHandleRowBytes (PixMapHandle pm) FOURWORDINLINE(0x203C, 0x0004, 0x008E, 0xAAA3);
+
+EXTERN_API( OSErr )
+QTSetPixMapPtrRowBytes (PixMapPtr pm,
+ long rowBytes) FOURWORDINLINE(0x203C, 0x0008, 0x0090, 0xAAA3);
+
+EXTERN_API( OSErr )
+QTSetPixMapHandleRowBytes (PixMapHandle pm,
+ long rowBytes) FOURWORDINLINE(0x203C, 0x0008, 0x008F, 0xAAA3);
+
+enum {
+ kQTUsePlatformDefaultGammaLevel = 0, /* When decompressing into this PixMap, gamma-correct to the platform's standard gamma. */
+ kQTUseSourceGammaLevel = -1L, /* When decompressing into this PixMap, don't perform gamma-correction. */
+ kQTCCIR601VideoGammaLevel = 0x00023333 /* 2.2, standard television video gamma.*/
+};
+
+EXTERN_API( Fixed )
+QTGetPixMapPtrGammaLevel (PixMapPtr pm) FOURWORDINLINE(0x203C, 0x0004, 0x0093, 0xAAA3);
+
+EXTERN_API( OSErr )
+QTSetPixMapPtrGammaLevel (PixMapPtr pm,
+ Fixed gammaLevel) FOURWORDINLINE(0x203C, 0x0008, 0x0094, 0xAAA3);
+
+EXTERN_API( Fixed )
+QTGetPixMapHandleGammaLevel (PixMapHandle pm) FOURWORDINLINE(0x203C, 0x0004, 0x0096, 0xAAA3);
+
+EXTERN_API( OSErr )
+QTSetPixMapHandleGammaLevel (PixMapHandle pm,
+ Fixed gammaLevel) FOURWORDINLINE(0x203C, 0x0008, 0x0097, 0xAAA3);
+
+EXTERN_API( Fixed )
+QTGetPixMapPtrRequestedGammaLevel (PixMapPtr pm) FOURWORDINLINE(0x203C, 0x0004, 0x0098, 0xAAA3);
+
+EXTERN_API( OSErr )
+QTSetPixMapPtrRequestedGammaLevel (PixMapPtr pm,
+ Fixed requestedGammaLevel) FOURWORDINLINE(0x203C, 0x0008, 0x0099, 0xAAA3);
+
+EXTERN_API( Fixed )
+QTGetPixMapHandleRequestedGammaLevel (PixMapHandle pm) FOURWORDINLINE(0x203C, 0x0004, 0x009A, 0xAAA3);
+
+EXTERN_API( OSErr )
+QTSetPixMapHandleRequestedGammaLevel (PixMapHandle pm,
+ Fixed requestedGammaLevel) FOURWORDINLINE(0x203C, 0x0008, 0x009B, 0xAAA3);
+
+EXTERN_API( OSErr )
+QuadToQuadMatrix (const Fixed * source,
+ const Fixed * dest,
+ MatrixRecord * map) FOURWORDINLINE(0x203C, 0x000C, 0x0095, 0xAAA3);
+
+
+
+
+
+enum {
+ identityMatrixType = 0x00, /* result if matrix is identity */
+ translateMatrixType = 0x01, /* result if matrix translates */
+ scaleMatrixType = 0x02, /* result if matrix scales */
+ scaleTranslateMatrixType = 0x03, /* result if matrix scales and translates */
+ linearMatrixType = 0x04, /* result if matrix is general 2 x 2 */
+ linearTranslateMatrixType = 0x05, /* result if matrix is general 2 x 2 and translates */
+ perspectiveMatrixType = 0x06 /* result if matrix is general 3 x 3 */
+};
+
+
+typedef unsigned short MatrixFlags;
+EXTERN_API( short )
+GetMatrixType (const MatrixRecord * m) TWOWORDINLINE(0x7014, 0xABC2);
+
+EXTERN_API( void )
+CopyMatrix (const MatrixRecord * m1,
+ MatrixRecord * m2) TWOWORDINLINE(0x7020, 0xABC2);
+
+EXTERN_API( Boolean )
+EqualMatrix (const MatrixRecord * m1,
+ const MatrixRecord * m2) TWOWORDINLINE(0x7021, 0xABC2);
+
+EXTERN_API( void )
+SetIdentityMatrix (MatrixRecord * matrix) TWOWORDINLINE(0x7015, 0xABC2);
+
+EXTERN_API( void )
+TranslateMatrix (MatrixRecord * m,
+ Fixed deltaH,
+ Fixed deltaV) TWOWORDINLINE(0x7019, 0xABC2);
+
+EXTERN_API( void )
+RotateMatrix (MatrixRecord * m,
+ Fixed degrees,
+ Fixed aboutX,
+ Fixed aboutY) TWOWORDINLINE(0x7016, 0xABC2);
+
+EXTERN_API( void )
+ScaleMatrix (MatrixRecord * m,
+ Fixed scaleX,
+ Fixed scaleY,
+ Fixed aboutX,
+ Fixed aboutY) TWOWORDINLINE(0x7017, 0xABC2);
+
+EXTERN_API( void )
+SkewMatrix (MatrixRecord * m,
+ Fixed skewX,
+ Fixed skewY,
+ Fixed aboutX,
+ Fixed aboutY) TWOWORDINLINE(0x7018, 0xABC2);
+
+EXTERN_API( OSErr )
+TransformFixedPoints (const MatrixRecord * m,
+ FixedPoint * fpt,
+ long count) TWOWORDINLINE(0x7022, 0xABC2);
+
+EXTERN_API( OSErr )
+TransformPoints (const MatrixRecord * mp,
+ Point * pt1,
+ long count) TWOWORDINLINE(0x7023, 0xABC2);
+
+EXTERN_API( Boolean )
+TransformFixedRect (const MatrixRecord * m,
+ FixedRect * fr,
+ FixedPoint * fpp) TWOWORDINLINE(0x7024, 0xABC2);
+
+EXTERN_API( Boolean )
+TransformRect (const MatrixRecord * m,
+ Rect * r,
+ FixedPoint * fpp) TWOWORDINLINE(0x7025, 0xABC2);
+
+EXTERN_API( Boolean )
+InverseMatrix (const MatrixRecord * m,
+ MatrixRecord * im) TWOWORDINLINE(0x701C, 0xABC2);
+
+EXTERN_API( void )
+ConcatMatrix (const MatrixRecord * a,
+ MatrixRecord * b) TWOWORDINLINE(0x701B, 0xABC2);
+
+EXTERN_API( void )
+RectMatrix (MatrixRecord * matrix,
+ const Rect * srcRect,
+ const Rect * dstRect) TWOWORDINLINE(0x701E, 0xABC2);
+
+EXTERN_API( void )
+MapMatrix (MatrixRecord * matrix,
+ const Rect * fromRect,
+ const Rect * toRect) TWOWORDINLINE(0x701D, 0xABC2);
+
+
+
+
+
+
+
+EXTERN_API( void )
+CompAdd (wide * src,
+ wide * dst) TWOWORDINLINE(0x7001, 0xABC2);
+
+EXTERN_API( void )
+CompSub (wide * src,
+ wide * dst) TWOWORDINLINE(0x7002, 0xABC2);
+
+EXTERN_API( void )
+CompNeg (wide * dst) TWOWORDINLINE(0x7003, 0xABC2);
+
+EXTERN_API( void )
+CompShift (wide * src,
+ short shift) TWOWORDINLINE(0x7004, 0xABC2);
+
+EXTERN_API( void )
+CompMul (long src1,
+ long src2,
+ wide * dst) TWOWORDINLINE(0x7005, 0xABC2);
+
+EXTERN_API( long )
+CompDiv (wide * numerator,
+ long denominator,
+ long * remainder) TWOWORDINLINE(0x7006, 0xABC2);
+
+EXTERN_API( void )
+CompFixMul (wide * compSrc,
+ Fixed fixSrc,
+ wide * compDst) TWOWORDINLINE(0x7007, 0xABC2);
+
+EXTERN_API( void )
+CompMulDiv (wide * co,
+ long mul,
+ long divisor) TWOWORDINLINE(0x7008, 0xABC2);
+
+EXTERN_API( void )
+CompMulDivTrunc (wide * co,
+ long mul,
+ long divisor,
+ long * remainder) TWOWORDINLINE(0x700C, 0xABC2);
+
+EXTERN_API( long )
+CompCompare (const wide * a,
+ const wide * minusb) TWOWORDINLINE(0x7009, 0xABC2);
+
+EXTERN_API( unsigned long )
+CompSquareRoot (const wide * src) TWOWORDINLINE(0x7011, 0xABC2);
+
+EXTERN_API( Fixed )
+FixMulDiv (Fixed src,
+ Fixed mul,
+ Fixed divisor) TWOWORDINLINE(0x700A, 0xABC2);
+
+EXTERN_API( Fixed )
+UnsignedFixMulDiv (Fixed src,
+ Fixed mul,
+ Fixed divisor) TWOWORDINLINE(0x700D, 0xABC2);
+
+EXTERN_API( Fract )
+FracSinCos (Fixed degree,
+ Fract * cosOut) TWOWORDINLINE(0x700B, 0xABC2);
+
+EXTERN_API( Fixed )
+FixExp2 (Fixed src) TWOWORDINLINE(0x700E, 0xABC2);
+
+EXTERN_API( Fixed )
+FixLog2 (Fixed src) TWOWORDINLINE(0x700F, 0xABC2);
+
+EXTERN_API( Fixed )
+FixPow (Fixed base,
+ Fixed exp) TWOWORDINLINE(0x7010, 0xABC2);
+
+
+
+
+typedef ComponentInstance GraphicsImportComponent;
+enum {
+ GraphicsImporterComponentType = FOUR_CHAR_CODE('grip')
+};
+
+enum {
+ graphicsImporterUsesImageDecompressor = 1L << 23
+};
+
+enum {
+ quickTimeImageFileImageDescriptionAtom = FOUR_CHAR_CODE('idsc'),
+ quickTimeImageFileImageDataAtom = FOUR_CHAR_CODE('idat'),
+ quickTimeImageFileMetaDataAtom = FOUR_CHAR_CODE('meta'),
+ quickTimeImageFileColorSyncProfileAtom = FOUR_CHAR_CODE('iicc')
+};
+
+enum {
+ graphicsImporterDrawsAllPixels = 0,
+ graphicsImporterDoesntDrawAllPixels = 1,
+ graphicsImporterDontKnowIfDrawAllPixels = 2
+};
+
+/* Flags for GraphicsImportSetFlags */
+enum {
+ kGraphicsImporterDontDoGammaCorrection = 1L << 0,
+ kGraphicsImporterTrustResolutionFromFile = 1L << 1,
+ kGraphicsImporterEnableSubPixelPositioning = 1L << 2
+};
+
+enum {
+ kGraphicsExportGroup = FOUR_CHAR_CODE('expo'),
+ kGraphicsExportFileType = FOUR_CHAR_CODE('ftyp'),
+ kGraphicsExportMIMEType = FOUR_CHAR_CODE('mime'),
+ kGraphicsExportExtension = FOUR_CHAR_CODE('ext '),
+ kGraphicsExportDescription = FOUR_CHAR_CODE('desc')
+};
+
+/* User data types for layers of Photoshop files */
+enum {
+ kQTPhotoshopLayerMode = FOUR_CHAR_CODE('lmod'), /* OSType */
+ kQTPhotoshopLayerOpacity = FOUR_CHAR_CODE('lopa'), /* UInt8, 0 = transparent .. 255 = opaque */
+ kQTPhotoshopLayerClipping = FOUR_CHAR_CODE('lclp'), /* UInt8, 0 = base, 1 = non-base */
+ kQTPhotoshopLayerFlags = FOUR_CHAR_CODE('lflg'), /* UInt8 */
+ kQTPhotoshopLayerName = FOUR_CHAR_CODE('©lnm'), /* Text */
+ kQTPhotoshopLayerUnicodeName = FOUR_CHAR_CODE('luni') /* Unicode characters, not terminated */
+};
+
+/* User data returned by graphics importers to suggest intended use for indexed images */
+enum {
+ kQTIndexedImageType = FOUR_CHAR_CODE('nth?'), /* 1 or more OSTypes, such as the following values: */
+ kQTIndexedImageIsThumbnail = FOUR_CHAR_CODE('n=th'), /* The image at this index is a thumbnail. */
+ kQTIndexedImageIsLayer = FOUR_CHAR_CODE('n=ly'), /* The image at this index is a layer. */
+ kQTIndexedImageIsPage = FOUR_CHAR_CODE('n=pg'), /* The image at this index is a page. */
+ kQTIndexedImageIsMultiResolution = FOUR_CHAR_CODE('n=rs') /* The image at this index is one of several identical images at different resolutions. */
+};
+
+/* Other user data types returned by graphics importers */
+enum {
+ kQTTIFFUserDataPrefix = 0x74690000, /* Added to some tag values in TIFF IFDs to generate user data codes. (0x7469 is 'ti'.) */
+ /* For example, YCbCrPositioning is tag 0x0213, so its user data code is 0x74690213. */
+ kQTTIFFExifUserDataPrefix = 0x65780000, /* Added to tag values in Exif IFDs to generate user data codes. (0x6578 is 'ex'.) */
+ /* For example, DateTimeOriginal is tag 0x9003, so its user data code is 0x65789003. */
+ kQTTIFFExifGPSUserDataPrefix = 0x67700000, /* Added to tag values in Exif GPS IFDs to generate user data codes. (0x6770 is 'gp'.) */
+ /* For example, GPSAltitude is tag 0x0006, so its user data code is 0x6770006. */
+ kQTAlphaMode = FOUR_CHAR_CODE('almo'), /* UInt32; eg, graphicsModeStraightAlpha or graphicsModePreBlackAlpha */
+ kQTAlphaModePreMulColor = FOUR_CHAR_CODE('almp'), /* RGBColor; used if kQTAlphaMode is graphicsModePreMulColorAlpha */
+ kUserDataIPTC = FOUR_CHAR_CODE('iptc')
+};
+
+/* Found in TIFF and Exif JPEG files */
+enum {
+ kQTTIFFUserDataOrientation = 0x74690112, /* 1 SHORT */
+ kQTTIFFUserDataTransferFunction = 0x7469012D, /* n SHORTs */
+ kQTTIFFUserDataWhitePoint = 0x7469013E, /* 2 RATIONALs */
+ kQTTIFFUserDataPrimaryChromaticities = 0x7469013F, /* 6 RATIONALs */
+ kQTTIFFUserDataTransferRange = 0x74690156, /* 6 SHORTs */
+ kQTTIFFUserDataYCbCrPositioning = 0x74690213, /* 1 SHORT */
+ kQTTIFFUserDataReferenceBlackWhite = 0x74690214 /* n LONGs */
+};
+
+/* Found in GeoTIFF files; defined in the GeoTIFF 1.0 spec */
+enum {
+ kQTTIFFUserDataModelPixelScale = 0x7469830E, /* 3 DOUBLEs */
+ kQTTIFFUserDataModelTransformation = 0x746985D8, /* 16 DOUBLEs */
+ kQTTIFFUserDataModelTiepoint = 0x74698482, /* n DOUBLEs */
+ kQTTIFFUserDataGeoKeyDirectory = 0x746987AF, /* n SHORTs */
+ kQTTIFFUserDataGeoDoubleParams = 0x746987B0, /* n DOUBLEs */
+ kQTTIFFUserDataGeoAsciiParams = 0x746987B1, /* n ASCIIs */
+ kQTTIFFUserDataIntergraphMatrix = 0x74698480 /* 16 or 17 DOUBLEs */
+};
+
+/* Found in Exif TIFF and Exif JPEG files; defined in the Exif 2.1 spec */
+enum {
+ kQTExifUserDataExifVersion = 0x65789000, /* 4 bytes (import only) */
+ kQTExifUserDataFlashPixVersion = 0x6578A000, /* 4 bytes */
+ kQTExifUserDataColorSpace = 0x6578A001, /* 1 SHORT */
+ kQTExifUserDataComponentsConfiguration = 0x65789101, /* 4 bytes */
+ kQTExifUserDataCompressedBitsPerPixel = 0x65789102, /* 1 RATIONAL */
+ kQTExifUserDataPixelXDimension = 0x6578A002, /* 1 SHORT or LONG */
+ kQTExifUserDataPixelYDimension = 0x6578A003, /* 1 SHORT or LONG */
+ kQTExifUserDataMakerNote = 0x6578927C, /* n bytes */
+ kQTExifUserDataUserComment = 0x6578928C, /* n bytes */
+ kQTExifUserDataRelatedSoundFile = 0x6578A004, /* 13 ASCIIs*/
+ kQTExifUserDataDateTimeOriginal = 0x65789003, /* 20 ASCIIs */
+ kQTExifUserDataDateTimeDigitized = 0x65789004, /* 20 ASCIIs */
+ kQTExifUserDataSubSecTime = 0x65789290, /* n ASCIIs */
+ kQTExifUserDataSubSecTimeOriginal = 0x65789291, /* n ASCIIs */
+ kQTExifUserDataSubSecTimeDigitized = 0x65789292, /* n ASCIIs */
+ kQTExifUserDataExposureTime = 0x6578829A, /* 1 RATIONAL */
+ kQTExifUserDataFNumber = 0x6578829D, /* 1 RATIONAL */
+ kQTExifUserDataExposureProgram = 0x65788822, /* 1 SHORT */
+ kQTExifUserDataSpectralSensitivity = 0x65788824, /* n ASCIIs */
+ kQTExifUserDataISOSpeedRatings = 0x65788827, /* n SHORTs */
+ kQTExifUserDataShutterSpeedValue = 0x65789201, /* 1 SIGNED RATIONAL */
+ kQTExifUserDataApertureValue = 0x65789202, /* 1 RATIONAL */
+ kQTExifUserDataBrightnessValue = 0x65789203, /* 1 SIGNED RATIONAL */
+ kQTExifUserDataExposureBiasValue = 0x65789204, /* 1 SIGNED RATIONAL */
+ kQTExifUserDataMaxApertureValue = 0x65789205, /* 1 RATIONAL */
+ kQTExifUserDataSubjectDistance = 0x65789206, /* 1 RATIONAL */
+ kQTExifUserDataMeteringMode = 0x65789207, /* 1 SHORT */
+ kQTExifUserDataLightSource = 0x65789208, /* 1 SHORT */
+ kQTExifUserDataFlash = 0x65789209, /* 1 SHORT */
+ kQTExifUserDataFocalLength = 0x6578920A, /* 1 RATIONAL */
+ kQTExifUserDataFlashEnergy = 0x6578A20B, /* 1 RATIONAL */
+ kQTExifUserDataFocalPlaneXResolution = 0x6578A20E, /* 1 RATIONAL */
+ kQTExifUserDataFocalPlaneYResolution = 0x6578A20F, /* 1 RATIONAL */
+ kQTExifUserDataFocalPlaneResolutionUnit = 0x6578A210, /* 1 SHORT */
+ kQTExifUserDataSubjectLocation = 0x6578A214, /* 1 SHORT */
+ kQTExifUserDataExposureIndex = 0x6578A215, /* 1 RATIONAL */
+ kQTExifUserDataSensingMethod = 0x6578A217, /* 1 SHORT */
+ kQTExifUserDataFileSource = 0x6578A300, /* 1 UNDEFINED */
+ kQTExifUserDataSceneType = 0x6578A301 /* 1 UNDEFINED */
+};
+
+/* Found in some Exif TIFF and Exif JPEG files; defined in the Exif 2.1 spec */
+enum {
+ kQTExifUserDataGPSVersionID = 0x06770000, /* 4 BYTEs */
+ kQTExifUserDataGPSLatitudeRef = 0x06770001, /* 2 ASCIIs*/
+ kQTExifUserDataGPSLatitude = 0x06770002, /* 3 RATIONALs */
+ kQTExifUserDataGPSLongitudeRef = 0x06770003, /* 2 ASCIIs */
+ kQTExifUserDataGPSLongitude = 0x06770004, /* 3 RATIONALs */
+ kQTExifUserDataGPSAltitudeRef = 0x06770005, /* 1 BYTE */
+ kQTExifUserDataGPSAltitude = 0x06770006, /* 1 RATIONAL */
+ kQTExifUserDataGPSTimeStamp = 0x06770007, /* 3 RATIONALs */
+ kQTExifUserDataGPSSatellites = 0x06770008, /* n ASCIIs */
+ kQTExifUserDataGPSStatus = 0x06770009, /* 2 ASCIIs */
+ kQTExifUserDataGPSMeasureMode = 0x0677000A, /* 2 ASCIIs */
+ kQTExifUserDataGPSDOP = 0x0677000B, /* 1 RATIONAL */
+ kQTExifUserDataGPSSpeedRef = 0x0677000C, /* 2 ASCIIs */
+ kQTExifUserDataGPSSpeed = 0x0677000D, /* 1 RATIONAL */
+ kQTExifUserDataGPSTrackRef = 0x0677000E, /* 2 ASCIIs */
+ kQTExifUserDataGPSTrack = 0x0677000F, /* 1 RATIONAL */
+ kQTExifUserDataGPSImgDirectionRef = 0x06770010, /* 2 ASCIIs */
+ kQTExifUserDataGPSImgDirection = 0x06770011, /* 1 RATIONAL */
+ kQTExifUserDataGPSMapDatum = 0x06770012, /* n ASCII */
+ kQTExifUserDataGPSDestLatitudeRef = 0x06770013, /* 2 ASCIIs */
+ kQTExifUserDataGPSDestLatitude = 0x06770014, /* 3 RATIONALs */
+ kQTExifUserDataGPSDestLongitudeRef = 0x06770015, /* 2 ASCIIs */
+ kQTExifUserDataGPSDestLongitude = 0x06770016, /* 3 RATIONALs */
+ kQTExifUserDataGPSDestBearingRef = 0x06770017, /* 2 ASCIIs */
+ kQTExifUserDataGPSDestBearing = 0x06770018, /* 1 RATIONAL */
+ kQTExifUserDataGPSDestDistanceRef = 0x06770019, /* 2 ASCIIs */
+ kQTExifUserDataGPSDestDistance = 0x0677001A /* 1 RATIONAL */
+};
+
+
+/** These are GraphicsImport procedures **/
+EXTERN_API( ComponentResult )
+GraphicsImportSetDataReference (GraphicsImportComponent ci,
+ Handle dataRef,
+ OSType dataReType) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0001, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportGetDataReference (GraphicsImportComponent ci,
+ Handle * dataRef,
+ OSType * dataReType) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0002, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportSetDataFile (GraphicsImportComponent ci,
+ const FSSpec * theFile) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0003, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportGetDataFile (GraphicsImportComponent ci,
+ FSSpec * theFile) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0004, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportSetDataHandle (GraphicsImportComponent ci,
+ Handle h) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0005, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportGetDataHandle (GraphicsImportComponent ci,
+ Handle * h) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0006, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportGetImageDescription (GraphicsImportComponent ci,
+ ImageDescriptionHandle * desc) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0007, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportGetDataOffsetAndSize (GraphicsImportComponent ci,
+ unsigned long * offset,
+ unsigned long * size) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0008, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportReadData (GraphicsImportComponent ci,
+ void * dataPtr,
+ unsigned long dataOffset,
+ unsigned long dataSize) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0009, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportSetClip (GraphicsImportComponent ci,
+ RgnHandle clipRgn) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportGetClip (GraphicsImportComponent ci,
+ RgnHandle * clipRgn) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportSetSourceRect (GraphicsImportComponent ci,
+ const Rect * sourceRect) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportGetSourceRect (GraphicsImportComponent ci,
+ Rect * sourceRect) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportGetNaturalBounds (GraphicsImportComponent ci,
+ Rect * naturalBounds) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportDraw (GraphicsImportComponent ci) FIVEWORDINLINE(0x2F3C, 0x0000, 0x000F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportSetGWorld (GraphicsImportComponent ci,
+ CGrafPtr port,
+ GDHandle gd) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0010, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportGetGWorld (GraphicsImportComponent ci,
+ CGrafPtr * port,
+ GDHandle * gd) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0011, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportSetMatrix (GraphicsImportComponent ci,
+ const MatrixRecord * matrix) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0012, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportGetMatrix (GraphicsImportComponent ci,
+ MatrixRecord * matrix) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0013, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportSetBoundsRect (GraphicsImportComponent ci,
+ const Rect * bounds) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0014, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportGetBoundsRect (GraphicsImportComponent ci,
+ Rect * bounds) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0015, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportSaveAsPicture (GraphicsImportComponent ci,
+ const FSSpec * fss,
+ ScriptCode scriptTag) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0016, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportSetGraphicsMode (GraphicsImportComponent ci,
+ long graphicsMode,
+ const RGBColor * opColor) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0017, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportGetGraphicsMode (GraphicsImportComponent ci,
+ long * graphicsMode,
+ RGBColor * opColor) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0018, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportSetQuality (GraphicsImportComponent ci,
+ CodecQ quality) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0019, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportGetQuality (GraphicsImportComponent ci,
+ CodecQ * quality) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportSaveAsQuickTimeImageFile (GraphicsImportComponent ci,
+ const FSSpec * fss,
+ ScriptCode scriptTag) FIVEWORDINLINE(0x2F3C, 0x0006, 0x001B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportSetDataReferenceOffsetAndLimit (GraphicsImportComponent ci,
+ unsigned long offset,
+ unsigned long limit) FIVEWORDINLINE(0x2F3C, 0x0008, 0x001C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportGetDataReferenceOffsetAndLimit (GraphicsImportComponent ci,
+ unsigned long * offset,
+ unsigned long * limit) FIVEWORDINLINE(0x2F3C, 0x0008, 0x001D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportGetAliasedDataReference (GraphicsImportComponent ci,
+ Handle * dataRef,
+ OSType * dataRefType) FIVEWORDINLINE(0x2F3C, 0x0008, 0x001E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportValidate (GraphicsImportComponent ci,
+ Boolean * valid) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportGetMetaData (GraphicsImportComponent ci,
+ void * userData) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0020, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportGetMIMETypeList (GraphicsImportComponent ci,
+ void * qtAtomContainerPtr) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0021, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportDoesDrawAllPixels (GraphicsImportComponent ci,
+ short * drawsAllPixels) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0022, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportGetAsPicture (GraphicsImportComponent ci,
+ PicHandle * picture) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0023, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportExportImageFile (GraphicsImportComponent ci,
+ OSType fileType,
+ OSType fileCreator,
+ const FSSpec * fss,
+ ScriptCode scriptTag) FIVEWORDINLINE(0x2F3C, 0x000E, 0x0024, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportGetExportImageTypeList (GraphicsImportComponent ci,
+ void * qtAtomContainerPtr) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0025, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportDoExportImageFileDialog (GraphicsImportComponent ci,
+ const FSSpec * inDefaultSpec,
+ StringPtr prompt,
+ ModalFilterYDUPP filterProc,
+ OSType * outExportedType,
+ FSSpec * outExportedSpec,
+ ScriptCode * outScriptTag) FIVEWORDINLINE(0x2F3C, 0x0018, 0x0026, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportGetExportSettingsAsAtomContainer (GraphicsImportComponent ci,
+ void * qtAtomContainerPtr) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0027, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportSetExportSettingsFromAtomContainer (GraphicsImportComponent ci,
+ void * qtAtomContainer) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0028, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportSetProgressProc (GraphicsImportComponent ci,
+ ICMProgressProcRecordPtr progressProc) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0029, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportGetProgressProc (GraphicsImportComponent ci,
+ ICMProgressProcRecordPtr progressProc) FIVEWORDINLINE(0x2F3C, 0x0004, 0x002A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportGetImageCount (GraphicsImportComponent ci,
+ unsigned long * imageCount) FIVEWORDINLINE(0x2F3C, 0x0004, 0x002B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportSetImageIndex (GraphicsImportComponent ci,
+ unsigned long imageIndex) FIVEWORDINLINE(0x2F3C, 0x0004, 0x002C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportGetImageIndex (GraphicsImportComponent ci,
+ unsigned long * imageIndex) FIVEWORDINLINE(0x2F3C, 0x0004, 0x002D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportGetDataOffsetAndSize64 (GraphicsImportComponent ci,
+ wide * offset,
+ wide * size) FIVEWORDINLINE(0x2F3C, 0x0008, 0x002E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportReadData64 (GraphicsImportComponent ci,
+ void * dataPtr,
+ const wide * dataOffset,
+ unsigned long dataSize) FIVEWORDINLINE(0x2F3C, 0x000C, 0x002F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportSetDataReferenceOffsetAndLimit64 (GraphicsImportComponent ci,
+ const wide * offset,
+ const wide * limit) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0030, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportGetDataReferenceOffsetAndLimit64 (GraphicsImportComponent ci,
+ wide * offset,
+ wide * limit) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0031, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportGetDefaultMatrix (GraphicsImportComponent ci,
+ MatrixRecord * defaultMatrix) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0032, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportGetDefaultClip (GraphicsImportComponent ci,
+ RgnHandle * defaultRgn) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0033, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportGetDefaultGraphicsMode (GraphicsImportComponent ci,
+ long * defaultGraphicsMode,
+ RGBColor * defaultOpColor) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0034, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportGetDefaultSourceRect (GraphicsImportComponent ci,
+ Rect * defaultSourceRect) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0035, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportGetColorSyncProfile (GraphicsImportComponent ci,
+ Handle * profile) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0036, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportSetDestRect (GraphicsImportComponent ci,
+ const Rect * destRect) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0037, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportGetDestRect (GraphicsImportComponent ci,
+ Rect * destRect) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0038, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportSetFlags (GraphicsImportComponent ci,
+ long flags) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0039, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportGetFlags (GraphicsImportComponent ci,
+ long * flags) FIVEWORDINLINE(0x2F3C, 0x0004, 0x003A, 0x7000, 0xA82A);
+
+/* 2 private selectors */
+EXTERN_API( ComponentResult )
+GraphicsImportGetBaseDataOffsetAndSize64 (GraphicsImportComponent ci,
+ wide * offset,
+ wide * size) FIVEWORDINLINE(0x2F3C, 0x0008, 0x003D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImportSetImageIndexToThumbnail (GraphicsImportComponent ci) FIVEWORDINLINE(0x2F3C, 0x0000, 0x003E, 0x7000, 0xA82A);
+
+
+
+typedef ComponentInstance GraphicsExportComponent;
+enum {
+ GraphicsExporterComponentType = FOUR_CHAR_CODE('grex'),
+ kBaseGraphicsExporterSubType = FOUR_CHAR_CODE('base')
+};
+
+enum {
+ graphicsExporterIsBaseExporter = 1L << 0,
+ graphicsExporterCanTranscode = 1L << 1,
+ graphicsExporterUsesImageCompressor = 1L << 2
+};
+
+
+struct QTResolutionSettings {
+ Fixed horizontalResolution;
+ Fixed verticalResolution;
+};
+typedef struct QTResolutionSettings QTResolutionSettings;
+
+struct QTTargetDataSize {
+ unsigned long targetDataSize;
+};
+typedef struct QTTargetDataSize QTTargetDataSize;
+
+struct QTThumbnailSettings {
+ long enableThumbnail; /* a thoroughly padded Boolean*/
+ long maxThumbnailWidth; /* set to zero to let someone else decide*/
+ long maxThumbnailHeight; /* set to zero to let someone else decide*/
+};
+typedef struct QTThumbnailSettings QTThumbnailSettings;
+enum {
+ kQTResolutionSettings = FOUR_CHAR_CODE('reso'),
+ kQTTargetDataSize = FOUR_CHAR_CODE('dasz'),
+ kQTDontRecompress = FOUR_CHAR_CODE('dntr'),
+ kQTInterlaceStyle = FOUR_CHAR_CODE('ilac'),
+ kQTColorSyncProfile = FOUR_CHAR_CODE('iccp'),
+ kQTThumbnailSettings = FOUR_CHAR_CODE('thum'),
+ kQTEnableExif = FOUR_CHAR_CODE('exif'), /* UInt8 (boolean)*/
+ kQTMetaData = FOUR_CHAR_CODE('meta')
+};
+
+enum {
+ kQTTIFFCompressionMethod = FOUR_CHAR_CODE('tifc'), /* UInt32*/
+ kQTTIFFCompression_None = 1,
+ kQTTIFFCompression_PackBits = 32773L,
+ kQTTIFFLittleEndian = FOUR_CHAR_CODE('tife') /* UInt8 (boolean)*/
+};
+
+enum {
+ kQTPNGFilterPreference = FOUR_CHAR_CODE('pngf'), /* UInt32*/
+ kQTPNGFilterBestForColorType = FOUR_CHAR_CODE('bflt'),
+ kQTPNGFilterNone = 0,
+ kQTPNGFilterSub = 1,
+ kQTPNGFilterUp = 2,
+ kQTPNGFilterAverage = 3,
+ kQTPNGFilterPaeth = 4,
+ kQTPNGFilterAdaptivePerRow = FOUR_CHAR_CODE('aflt'),
+ kQTPNGInterlaceStyle = FOUR_CHAR_CODE('ilac'), /* UInt32*/
+ kQTPNGInterlaceNone = 0,
+ kQTPNGInterlaceAdam7 = 1
+};
+
+
+/** These are GraphicsExport procedures **/
+/* To use: set the input and output (and other settings as desired) and call GEDoExport. */
+EXTERN_API( ComponentResult )
+GraphicsExportDoExport (GraphicsExportComponent ci,
+ unsigned long * actualSizeWritten) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0001, 0x7000, 0xA82A);
+
+/* Used for internal communication between the base and format-specific graphics exporter: */
+EXTERN_API( ComponentResult )
+GraphicsExportCanTranscode (GraphicsExportComponent ci,
+ Boolean * canTranscode) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0002, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportDoTranscode (GraphicsExportComponent ci) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0003, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportCanUseCompressor (GraphicsExportComponent ci,
+ Boolean * canUseCompressor,
+ void * codecSettingsAtomContainerPtr) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0004, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportDoUseCompressor (GraphicsExportComponent ci,
+ void * codecSettingsAtomContainer,
+ ImageDescriptionHandle * outDesc) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0005, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportDoStandaloneExport (GraphicsExportComponent ci) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0006, 0x7000, 0xA82A);
+
+/* Queries applications can make of a format-specific graphics exporter: */
+EXTERN_API( ComponentResult )
+GraphicsExportGetDefaultFileTypeAndCreator (GraphicsExportComponent ci,
+ OSType * fileType,
+ OSType * fileCreator) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0007, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetDefaultFileNameExtension (GraphicsExportComponent ci,
+ OSType * fileNameExtension) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0008, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetMIMETypeList (GraphicsExportComponent ci,
+ void * qtAtomContainerPtr) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0009, 0x7000, 0xA82A);
+
+/* (1 unused selector) */
+/* Graphics exporter settings: */
+EXTERN_API( ComponentResult )
+GraphicsExportRequestSettings (GraphicsExportComponent ci,
+ ModalFilterYDUPP filterProc,
+ void * yourDataProc) FIVEWORDINLINE(0x2F3C, 0x0008, 0x000B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportSetSettingsFromAtomContainer (GraphicsExportComponent ci,
+ void * qtAtomContainer) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetSettingsAsAtomContainer (GraphicsExportComponent ci,
+ void * qtAtomContainerPtr) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetSettingsAsText (GraphicsExportComponent ci,
+ Handle * theText) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000E, 0x7000, 0xA82A);
+
+/* Graphics exporters may implement some or none of the following: */
+EXTERN_API( ComponentResult )
+GraphicsExportSetDontRecompress (GraphicsExportComponent ci,
+ Boolean dontRecompress) FIVEWORDINLINE(0x2F3C, 0x0002, 0x000F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetDontRecompress (GraphicsExportComponent ci,
+ Boolean * dontRecompress) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0010, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportSetInterlaceStyle (GraphicsExportComponent ci,
+ unsigned long interlaceStyle) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0011, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetInterlaceStyle (GraphicsExportComponent ci,
+ unsigned long * interlaceStyle) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0012, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportSetMetaData (GraphicsExportComponent ci,
+ void * userData) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0013, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetMetaData (GraphicsExportComponent ci,
+ void * userData) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0014, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportSetTargetDataSize (GraphicsExportComponent ci,
+ unsigned long targetDataSize) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0015, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetTargetDataSize (GraphicsExportComponent ci,
+ unsigned long * targetDataSize) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0016, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportSetCompressionMethod (GraphicsExportComponent ci,
+ long compressionMethod) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0017, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetCompressionMethod (GraphicsExportComponent ci,
+ long * compressionMethod) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0018, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportSetCompressionQuality (GraphicsExportComponent ci,
+ CodecQ spatialQuality) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0019, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetCompressionQuality (GraphicsExportComponent ci,
+ CodecQ * spatialQuality) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportSetResolution (GraphicsExportComponent ci,
+ Fixed horizontalResolution,
+ Fixed verticalResolution) FIVEWORDINLINE(0x2F3C, 0x0008, 0x001B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetResolution (GraphicsExportComponent ci,
+ Fixed * horizontalResolution,
+ Fixed * verticalResolution) FIVEWORDINLINE(0x2F3C, 0x0008, 0x001C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportSetDepth (GraphicsExportComponent ci,
+ long depth) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetDepth (GraphicsExportComponent ci,
+ long * depth) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001E, 0x7000, 0xA82A);
+
+/* (2 unused selectors) */
+EXTERN_API( ComponentResult )
+GraphicsExportSetColorSyncProfile (GraphicsExportComponent ci,
+ Handle colorSyncProfile) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0021, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetColorSyncProfile (GraphicsExportComponent ci,
+ Handle * colorSyncProfile) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0022, 0x7000, 0xA82A);
+
+/* Always implemented by the base graphics exporter: */
+EXTERN_API( ComponentResult )
+GraphicsExportSetProgressProc (GraphicsExportComponent ci,
+ ICMProgressProcRecordPtr progressProc) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0023, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetProgressProc (GraphicsExportComponent ci,
+ ICMProgressProcRecordPtr progressProc) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0024, 0x7000, 0xA82A);
+
+/* Sources for the input image: */
+EXTERN_API( ComponentResult )
+GraphicsExportSetInputDataReference (GraphicsExportComponent ci,
+ Handle dataRef,
+ OSType dataRefType,
+ ImageDescriptionHandle desc) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0025, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetInputDataReference (GraphicsExportComponent ci,
+ Handle * dataRef,
+ OSType * dataRefType) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0026, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportSetInputFile (GraphicsExportComponent ci,
+ const FSSpec * theFile,
+ ImageDescriptionHandle desc) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0027, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetInputFile (GraphicsExportComponent ci,
+ FSSpec * theFile) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0028, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportSetInputHandle (GraphicsExportComponent ci,
+ Handle h,
+ ImageDescriptionHandle desc) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0029, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetInputHandle (GraphicsExportComponent ci,
+ Handle * h) FIVEWORDINLINE(0x2F3C, 0x0004, 0x002A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportSetInputPtr (GraphicsExportComponent ci,
+ Ptr p,
+ unsigned long size,
+ ImageDescriptionHandle desc) FIVEWORDINLINE(0x2F3C, 0x000C, 0x002B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetInputPtr (GraphicsExportComponent ci,
+ Ptr * p,
+ unsigned long * size) FIVEWORDINLINE(0x2F3C, 0x0008, 0x002C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportSetInputGraphicsImporter (GraphicsExportComponent ci,
+ GraphicsImportComponent grip) FIVEWORDINLINE(0x2F3C, 0x0004, 0x002D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetInputGraphicsImporter (GraphicsExportComponent ci,
+ GraphicsImportComponent * grip) FIVEWORDINLINE(0x2F3C, 0x0004, 0x002E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportSetInputPicture (GraphicsExportComponent ci,
+ PicHandle picture) FIVEWORDINLINE(0x2F3C, 0x0004, 0x002F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetInputPicture (GraphicsExportComponent ci,
+ PicHandle * picture) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0030, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportSetInputGWorld (GraphicsExportComponent ci,
+ GWorldPtr gworld) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0031, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetInputGWorld (GraphicsExportComponent ci,
+ GWorldPtr * gworld) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0032, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportSetInputPixmap (GraphicsExportComponent ci,
+ PixMapHandle pixmap) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0033, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetInputPixmap (GraphicsExportComponent ci,
+ PixMapHandle * pixmap) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0034, 0x7000, 0xA82A);
+
+/* Only applicable when the input is a data reference, file, handle or ptr: */
+EXTERN_API( ComponentResult )
+GraphicsExportSetInputOffsetAndLimit (GraphicsExportComponent ci,
+ unsigned long offset,
+ unsigned long limit) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0035, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetInputOffsetAndLimit (GraphicsExportComponent ci,
+ unsigned long * offset,
+ unsigned long * limit) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0036, 0x7000, 0xA82A);
+
+/* Used by format-specific graphics exporters when transcoding: */
+EXTERN_API( ComponentResult )
+GraphicsExportMayExporterReadInputData (GraphicsExportComponent ci,
+ Boolean * mayReadInputData) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0037, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetInputDataSize (GraphicsExportComponent ci,
+ unsigned long * size) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0038, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportReadInputData (GraphicsExportComponent ci,
+ void * dataPtr,
+ unsigned long dataOffset,
+ unsigned long dataSize) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0039, 0x7000, 0xA82A);
+
+/* Used by format-specific graphics exporters, especially when doing standalone export: */
+EXTERN_API( ComponentResult )
+GraphicsExportGetInputImageDescription (GraphicsExportComponent ci,
+ ImageDescriptionHandle * desc) FIVEWORDINLINE(0x2F3C, 0x0004, 0x003A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetInputImageDimensions (GraphicsExportComponent ci,
+ Rect * dimensions) FIVEWORDINLINE(0x2F3C, 0x0004, 0x003B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetInputImageDepth (GraphicsExportComponent ci,
+ long * inputDepth) FIVEWORDINLINE(0x2F3C, 0x0004, 0x003C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportDrawInputImage (GraphicsExportComponent ci,
+ CGrafPtr gw,
+ GDHandle gd,
+ const Rect * srcRect,
+ const Rect * dstRect) FIVEWORDINLINE(0x2F3C, 0x0010, 0x003D, 0x7000, 0xA82A);
+
+/* Destinations for the output image: */
+EXTERN_API( ComponentResult )
+GraphicsExportSetOutputDataReference (GraphicsExportComponent ci,
+ Handle dataRef,
+ OSType dataRefType) FIVEWORDINLINE(0x2F3C, 0x0008, 0x003E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetOutputDataReference (GraphicsExportComponent ci,
+ Handle * dataRef,
+ OSType * dataRefType) FIVEWORDINLINE(0x2F3C, 0x0008, 0x003F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportSetOutputFile (GraphicsExportComponent ci,
+ const FSSpec * theFile) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0040, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetOutputFile (GraphicsExportComponent ci,
+ FSSpec * theFile) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0041, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportSetOutputHandle (GraphicsExportComponent ci,
+ Handle h) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0042, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetOutputHandle (GraphicsExportComponent ci,
+ Handle * h) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0043, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportSetOutputOffsetAndMaxSize (GraphicsExportComponent ci,
+ unsigned long offset,
+ unsigned long maxSize,
+ Boolean truncateFile) FIVEWORDINLINE(0x2F3C, 0x000A, 0x0044, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetOutputOffsetAndMaxSize (GraphicsExportComponent ci,
+ unsigned long * offset,
+ unsigned long * maxSize,
+ Boolean * truncateFile) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0045, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportSetOutputFileTypeAndCreator (GraphicsExportComponent ci,
+ OSType fileType,
+ OSType fileCreator) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0046, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetOutputFileTypeAndCreator (GraphicsExportComponent ci,
+ OSType * fileType,
+ OSType * fileCreator) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0047, 0x7000, 0xA82A);
+
+/* Used by format-specific graphics exporters: */
+EXTERN_API( ComponentResult )
+GraphicsExportWriteOutputData (GraphicsExportComponent ci,
+ const void * dataPtr,
+ unsigned long dataSize) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0048, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportSetOutputMark (GraphicsExportComponent ci,
+ unsigned long mark) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0049, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetOutputMark (GraphicsExportComponent ci,
+ unsigned long * mark) FIVEWORDINLINE(0x2F3C, 0x0004, 0x004A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportReadOutputData (GraphicsExportComponent ci,
+ void * dataPtr,
+ unsigned long dataOffset,
+ unsigned long dataSize) FIVEWORDINLINE(0x2F3C, 0x000C, 0x004B, 0x7000, 0xA82A);
+
+/* Allows embedded thumbnail creation, if supported. */
+EXTERN_API( ComponentResult )
+GraphicsExportSetThumbnailEnabled (GraphicsExportComponent ci,
+ Boolean enableThumbnail,
+ long maxThumbnailWidth,
+ long maxThumbnailHeight) FIVEWORDINLINE(0x2F3C, 0x000A, 0x004C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetThumbnailEnabled (GraphicsExportComponent ci,
+ Boolean * thumbnailEnabled,
+ long * maxThumbnailWidth,
+ long * maxThumbnailHeight) FIVEWORDINLINE(0x2F3C, 0x000C, 0x004D, 0x7000, 0xA82A);
+
+/* Allows export of Exif files, if supported. This disables Exif-incompatible settings such as grayscale JPEG and compressed TIFF, and enables export of Exif metadata. */
+EXTERN_API( ComponentResult )
+GraphicsExportSetExifEnabled (GraphicsExportComponent ci,
+ Boolean enableExif) FIVEWORDINLINE(0x2F3C, 0x0002, 0x004E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsExportGetExifEnabled (GraphicsExportComponent ci,
+ Boolean * exifEnabled) FIVEWORDINLINE(0x2F3C, 0x0004, 0x004F, 0x7000, 0xA82A);
+
+
+
+typedef ComponentInstance ImageTranscoderComponent;
+enum {
+ ImageTranscodererComponentType = FOUR_CHAR_CODE('imtc')
+};
+
+
+/** These are ImageTranscoder procedures **/
+EXTERN_API( ComponentResult )
+ImageTranscoderBeginSequence (ImageTranscoderComponent itc,
+ ImageDescriptionHandle srcDesc,
+ ImageDescriptionHandle * dstDesc,
+ void * data,
+ long dataSize) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0001, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageTranscoderConvert (ImageTranscoderComponent itc,
+ void * srcData,
+ long srcDataSize,
+ void ** dstData,
+ long * dstDataSize) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0002, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageTranscoderDisposeData (ImageTranscoderComponent itc,
+ void * dstData) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0003, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ImageTranscoderEndSequence (ImageTranscoderComponent itc) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0004, 0x7000, 0xA82A);
+
+/* UPP call backs */
+
+/* selectors for component calls */
+enum {
+ kGraphicsImportSetDataReferenceSelect = 0x0001,
+ kGraphicsImportGetDataReferenceSelect = 0x0002,
+ kGraphicsImportSetDataFileSelect = 0x0003,
+ kGraphicsImportGetDataFileSelect = 0x0004,
+ kGraphicsImportSetDataHandleSelect = 0x0005,
+ kGraphicsImportGetDataHandleSelect = 0x0006,
+ kGraphicsImportGetImageDescriptionSelect = 0x0007,
+ kGraphicsImportGetDataOffsetAndSizeSelect = 0x0008,
+ kGraphicsImportReadDataSelect = 0x0009,
+ kGraphicsImportSetClipSelect = 0x000A,
+ kGraphicsImportGetClipSelect = 0x000B,
+ kGraphicsImportSetSourceRectSelect = 0x000C,
+ kGraphicsImportGetSourceRectSelect = 0x000D,
+ kGraphicsImportGetNaturalBoundsSelect = 0x000E,
+ kGraphicsImportDrawSelect = 0x000F,
+ kGraphicsImportSetGWorldSelect = 0x0010,
+ kGraphicsImportGetGWorldSelect = 0x0011,
+ kGraphicsImportSetMatrixSelect = 0x0012,
+ kGraphicsImportGetMatrixSelect = 0x0013,
+ kGraphicsImportSetBoundsRectSelect = 0x0014,
+ kGraphicsImportGetBoundsRectSelect = 0x0015,
+ kGraphicsImportSaveAsPictureSelect = 0x0016,
+ kGraphicsImportSetGraphicsModeSelect = 0x0017,
+ kGraphicsImportGetGraphicsModeSelect = 0x0018,
+ kGraphicsImportSetQualitySelect = 0x0019,
+ kGraphicsImportGetQualitySelect = 0x001A,
+ kGraphicsImportSaveAsQuickTimeImageFileSelect = 0x001B,
+ kGraphicsImportSetDataReferenceOffsetAndLimitSelect = 0x001C,
+ kGraphicsImportGetDataReferenceOffsetAndLimitSelect = 0x001D,
+ kGraphicsImportGetAliasedDataReferenceSelect = 0x001E,
+ kGraphicsImportValidateSelect = 0x001F,
+ kGraphicsImportGetMetaDataSelect = 0x0020,
+ kGraphicsImportGetMIMETypeListSelect = 0x0021,
+ kGraphicsImportDoesDrawAllPixelsSelect = 0x0022,
+ kGraphicsImportGetAsPictureSelect = 0x0023,
+ kGraphicsImportExportImageFileSelect = 0x0024,
+ kGraphicsImportGetExportImageTypeListSelect = 0x0025,
+ kGraphicsImportDoExportImageFileDialogSelect = 0x0026,
+ kGraphicsImportGetExportSettingsAsAtomContainerSelect = 0x0027,
+ kGraphicsImportSetExportSettingsFromAtomContainerSelect = 0x0028,
+ kGraphicsImportSetProgressProcSelect = 0x0029,
+ kGraphicsImportGetProgressProcSelect = 0x002A,
+ kGraphicsImportGetImageCountSelect = 0x002B,
+ kGraphicsImportSetImageIndexSelect = 0x002C,
+ kGraphicsImportGetImageIndexSelect = 0x002D,
+ kGraphicsImportGetDataOffsetAndSize64Select = 0x002E,
+ kGraphicsImportReadData64Select = 0x002F,
+ kGraphicsImportSetDataReferenceOffsetAndLimit64Select = 0x0030,
+ kGraphicsImportGetDataReferenceOffsetAndLimit64Select = 0x0031,
+ kGraphicsImportGetDefaultMatrixSelect = 0x0032,
+ kGraphicsImportGetDefaultClipSelect = 0x0033,
+ kGraphicsImportGetDefaultGraphicsModeSelect = 0x0034,
+ kGraphicsImportGetDefaultSourceRectSelect = 0x0035,
+ kGraphicsImportGetColorSyncProfileSelect = 0x0036,
+ kGraphicsImportSetDestRectSelect = 0x0037,
+ kGraphicsImportGetDestRectSelect = 0x0038,
+ kGraphicsImportSetFlagsSelect = 0x0039,
+ kGraphicsImportGetFlagsSelect = 0x003A,
+ kGraphicsImportGetBaseDataOffsetAndSize64Select = 0x003D,
+ kGraphicsImportSetImageIndexToThumbnailSelect = 0x003E,
+ kGraphicsExportDoExportSelect = 0x0001,
+ kGraphicsExportCanTranscodeSelect = 0x0002,
+ kGraphicsExportDoTranscodeSelect = 0x0003,
+ kGraphicsExportCanUseCompressorSelect = 0x0004,
+ kGraphicsExportDoUseCompressorSelect = 0x0005,
+ kGraphicsExportDoStandaloneExportSelect = 0x0006,
+ kGraphicsExportGetDefaultFileTypeAndCreatorSelect = 0x0007,
+ kGraphicsExportGetDefaultFileNameExtensionSelect = 0x0008,
+ kGraphicsExportGetMIMETypeListSelect = 0x0009,
+ kGraphicsExportRequestSettingsSelect = 0x000B,
+ kGraphicsExportSetSettingsFromAtomContainerSelect = 0x000C,
+ kGraphicsExportGetSettingsAsAtomContainerSelect = 0x000D,
+ kGraphicsExportGetSettingsAsTextSelect = 0x000E,
+ kGraphicsExportSetDontRecompressSelect = 0x000F,
+ kGraphicsExportGetDontRecompressSelect = 0x0010,
+ kGraphicsExportSetInterlaceStyleSelect = 0x0011,
+ kGraphicsExportGetInterlaceStyleSelect = 0x0012,
+ kGraphicsExportSetMetaDataSelect = 0x0013,
+ kGraphicsExportGetMetaDataSelect = 0x0014,
+ kGraphicsExportSetTargetDataSizeSelect = 0x0015,
+ kGraphicsExportGetTargetDataSizeSelect = 0x0016,
+ kGraphicsExportSetCompressionMethodSelect = 0x0017,
+ kGraphicsExportGetCompressionMethodSelect = 0x0018,
+ kGraphicsExportSetCompressionQualitySelect = 0x0019,
+ kGraphicsExportGetCompressionQualitySelect = 0x001A,
+ kGraphicsExportSetResolutionSelect = 0x001B,
+ kGraphicsExportGetResolutionSelect = 0x001C,
+ kGraphicsExportSetDepthSelect = 0x001D,
+ kGraphicsExportGetDepthSelect = 0x001E,
+ kGraphicsExportSetColorSyncProfileSelect = 0x0021,
+ kGraphicsExportGetColorSyncProfileSelect = 0x0022,
+ kGraphicsExportSetProgressProcSelect = 0x0023,
+ kGraphicsExportGetProgressProcSelect = 0x0024,
+ kGraphicsExportSetInputDataReferenceSelect = 0x0025,
+ kGraphicsExportGetInputDataReferenceSelect = 0x0026,
+ kGraphicsExportSetInputFileSelect = 0x0027,
+ kGraphicsExportGetInputFileSelect = 0x0028,
+ kGraphicsExportSetInputHandleSelect = 0x0029,
+ kGraphicsExportGetInputHandleSelect = 0x002A,
+ kGraphicsExportSetInputPtrSelect = 0x002B,
+ kGraphicsExportGetInputPtrSelect = 0x002C,
+ kGraphicsExportSetInputGraphicsImporterSelect = 0x002D,
+ kGraphicsExportGetInputGraphicsImporterSelect = 0x002E,
+ kGraphicsExportSetInputPictureSelect = 0x002F,
+ kGraphicsExportGetInputPictureSelect = 0x0030,
+ kGraphicsExportSetInputGWorldSelect = 0x0031,
+ kGraphicsExportGetInputGWorldSelect = 0x0032,
+ kGraphicsExportSetInputPixmapSelect = 0x0033,
+ kGraphicsExportGetInputPixmapSelect = 0x0034,
+ kGraphicsExportSetInputOffsetAndLimitSelect = 0x0035,
+ kGraphicsExportGetInputOffsetAndLimitSelect = 0x0036,
+ kGraphicsExportMayExporterReadInputDataSelect = 0x0037,
+ kGraphicsExportGetInputDataSizeSelect = 0x0038,
+ kGraphicsExportReadInputDataSelect = 0x0039,
+ kGraphicsExportGetInputImageDescriptionSelect = 0x003A,
+ kGraphicsExportGetInputImageDimensionsSelect = 0x003B,
+ kGraphicsExportGetInputImageDepthSelect = 0x003C,
+ kGraphicsExportDrawInputImageSelect = 0x003D,
+ kGraphicsExportSetOutputDataReferenceSelect = 0x003E,
+ kGraphicsExportGetOutputDataReferenceSelect = 0x003F,
+ kGraphicsExportSetOutputFileSelect = 0x0040,
+ kGraphicsExportGetOutputFileSelect = 0x0041,
+ kGraphicsExportSetOutputHandleSelect = 0x0042,
+ kGraphicsExportGetOutputHandleSelect = 0x0043,
+ kGraphicsExportSetOutputOffsetAndMaxSizeSelect = 0x0044,
+ kGraphicsExportGetOutputOffsetAndMaxSizeSelect = 0x0045,
+ kGraphicsExportSetOutputFileTypeAndCreatorSelect = 0x0046,
+ kGraphicsExportGetOutputFileTypeAndCreatorSelect = 0x0047,
+ kGraphicsExportWriteOutputDataSelect = 0x0048,
+ kGraphicsExportSetOutputMarkSelect = 0x0049,
+ kGraphicsExportGetOutputMarkSelect = 0x004A,
+ kGraphicsExportReadOutputDataSelect = 0x004B,
+ kGraphicsExportSetThumbnailEnabledSelect = 0x004C,
+ kGraphicsExportGetThumbnailEnabledSelect = 0x004D,
+ kGraphicsExportSetExifEnabledSelect = 0x004E,
+ kGraphicsExportGetExifEnabledSelect = 0x004F,
+ kImageTranscoderBeginSequenceSelect = 0x0001,
+ kImageTranscoderConvertSelect = 0x0002,
+ kImageTranscoderDisposeDataSelect = 0x0003,
+ kImageTranscoderEndSequenceSelect = 0x0004
+};
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __IMAGECOMPRESSION__ */
+
diff --git a/include/qt/InputSprocket.h b/include/qt/InputSprocket.h
new file mode 100644
index 000000000..994af9013
--- /dev/null
+++ b/include/qt/InputSprocket.h
@@ -0,0 +1,1328 @@
+/*
+ File: InputSprocket.h
+
+ Contains: Games Sprockets: InputSprocket interfaaces
+
+ Version: Technology: InputSprocket 1.7
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1996-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __INPUTSPROCKET__
+#define __INPUTSPROCKET__
+
+#ifndef __DESKBUS__
+#include "DeskBus.h"
+#endif
+
+#ifndef __DIALOGS__
+#include "Dialogs.h"
+#endif
+
+#ifndef __EVENTS__
+#include "Events.h"
+#endif
+
+#ifndef __ICONS__
+#include "Icons.h"
+#endif
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#ifndef USE_OLD_INPUT_SPROCKET_LABELS
+#define USE_OLD_INPUT_SPROCKET_LABELS 0
+#endif /* !defined(USE_OLD_INPUT_SPROCKET_LABELS) */
+
+#ifndef USE_OLD_ISPNEED_STRUCT
+#define USE_OLD_ISPNEED_STRUCT 0
+#endif /* !defined(USE_OLD_ISPNEED_STRUCT) */
+
+/* ********************* data types ********************* */
+typedef struct OpaqueISpDeviceReference* ISpDeviceReference;
+typedef struct OpaqueISpElementReference* ISpElementReference;
+typedef struct OpaqueISpElementListReference* ISpElementListReference;
+/* ISpDeviceClass is a general classs of device, example: keyboard, mouse, joystick */
+typedef OSType ISpDeviceClass;
+/* ISpDeviceIdentifier is a specific device, example: standard 1-button mouse, 105key ext. kbd. */
+typedef OSType ISpDeviceIdentifier;
+typedef OSType ISpElementLabel;
+typedef OSType ISpElementKind;
+
+
+/* *************** resources **************** */
+enum {
+ kISpApplicationResourceType = FOUR_CHAR_CODE('isap'),
+ kISpSetListResourceType = FOUR_CHAR_CODE('setl'),
+ kISpSetDataResourceType = FOUR_CHAR_CODE('setd')
+};
+
+
+struct ISpApplicationResourceStruct {
+ UInt32 flags;
+ UInt32 reserved1;
+ UInt32 reserved2;
+ UInt32 reserved3;
+};
+typedef struct ISpApplicationResourceStruct ISpApplicationResourceStruct;
+enum {
+ kISpAppResFlag_UsesInputSprocket = 0x00000001, /* true if the application uses InputSprocket*/
+ kISpAppResFlag_UsesISpInit = 0x00000002 /* true if the calls ISpInit (ie, uses the high level interface, calls ISpConfigure, has a needs list, etc...)*/
+};
+
+/*
+ * ISpDeviceDefinition
+ *
+ * This structure provides all the available
+ * information for an input device within the system
+ *
+ */
+
+struct ISpDeviceDefinition {
+ Str63 deviceName; /* a human readable name of the device */
+ ISpDeviceClass theDeviceClass; /* general classs of device example : keyboard, mouse, joystick */
+ ISpDeviceIdentifier theDeviceIdentifier; /* every distinguishable device should have an OSType */
+ UInt32 permanentID; /* a cross reboot id unique within that deviceType, 0 if not possible */
+ UInt32 flags; /* status flags */
+ UInt32 permanentIDExtend; /* extension of permanentID, so 64 bits total are now significant */
+ UInt32 reserved2;
+ UInt32 reserved3;
+};
+typedef struct ISpDeviceDefinition ISpDeviceDefinition;
+enum {
+ kISpDeviceFlag_HandleOwnEmulation = 1
+};
+
+/*
+ * ISpElementEvent, ISpElementEventPtr
+ *
+ * This is the structure that event data is passed in.
+ *
+ */
+
+struct ISpElementEvent {
+ AbsoluteTime when; /* this is absolute time on PCI or later, otherwise it is */
+ /* 0 for the hi 32 bits and TickCount for the low 32 bits */
+ ISpElementReference element; /* a reference to the element that generated this event */
+ UInt32 refCon; /* for application usage, 0 on the global list */
+ UInt32 data; /* the data for this event */
+};
+typedef struct ISpElementEvent ISpElementEvent;
+typedef ISpElementEvent * ISpElementEventPtr;
+/*
+ * ISpElementInfo, ISpElementInfoPtr
+ *
+ * This is the generic definition of an element.
+ * Every element must contain this information.
+ *
+ */
+
+struct ISpElementInfo {
+ ISpElementLabel theLabel;
+ ISpElementKind theKind;
+ Str63 theString;
+ UInt32 reserved1;
+ UInt32 reserved2;
+};
+typedef struct ISpElementInfo ISpElementInfo;
+typedef ISpElementInfo * ISpElementInfoPtr;
+
+typedef UInt32 ISpNeedFlagBits;
+#if USE_OLD_ISPNEED_STRUCT
+
+struct ISpNeed {
+ Str63 name;
+ short iconSuiteResourceId; /* resource id of the icon suite */
+ short reserved;
+ ISpElementKind theKind;
+ ISpElementLabel theLabel;
+ ISpNeedFlagBits flags;
+ UInt32 reserved1;
+ UInt32 reserved2;
+ UInt32 reserved3;
+};
+typedef struct ISpNeed ISpNeed;
+#else
+
+struct ISpNeed {
+ Str63 name; /* human-readable string */
+ short iconSuiteResourceId; /* resource id of the icon suite */
+ UInt8 playerNum; /* used for multi-player support */
+ UInt8 group; /* used to group related needs (eg, look left and look right button needs) */
+ ISpElementKind theKind;
+ ISpElementLabel theLabel;
+ ISpNeedFlagBits flags;
+ UInt32 reserved1;
+ UInt32 reserved2;
+ UInt32 reserved3;
+};
+typedef struct ISpNeed ISpNeed;
+#endif /* USE_OLD_ISPNEED_STRUCT */
+
+enum {
+ kISpNeedFlag_NoMultiConfig = 0x00000001, /* once this need is autoconfigured to one device dont autoconfigure to anything else*/
+ kISpNeedFlag_Utility = 0x00000002, /* this need is a utility function (like show framerate) which would not typically be assigned to anything but the keyboard*/
+ kISpNeedFlag_PolledOnly = 0x00000004,
+ kISpNeedFlag_EventsOnly = 0x00000008,
+ kISpNeedFlag_NoAutoConfig = 0x00000010, /* this need can be set normally, but will not ever be auto configured*/
+ kISpNeedFlag_NoConfig = 0x00000020, /* this need can not be changed by the user*/
+ kISpNeedFlag_Invisible = 0x00000040, /* this need can not be seen by the user*/
+ /* *** kISpElementKind specific flags ****/
+ /* these are flags specific to kISpElementKind_Button*/
+ kISpNeedFlag_Button_AlreadyAxis = 0x10000000, /* there is a axis version of this button need*/
+ kISpNeedFlag_Button_ClickToggles = 0x20000000,
+ kISpNeedFlag_Button_ActiveWhenDown = 0x40000000,
+ kISpNeedFlag_Button_AlreadyDelta = (long)0x80000000, /* there is a delta version of this button need*/
+ /* these are flags specific to kISpElementKind_DPad*/
+ /* these are flags specific to kISpElementKind_Axis*/
+ kISpNeedFlag_Axis_AlreadyButton = 0x10000000, /* there is a button version of this axis need*/
+ kISpNeedFlag_Axis_Asymetric = 0x20000000, /* this axis need is asymetric */
+ kISpNeedFlag_Axis_AlreadyDelta = 0x40000000, /* there is a delta version of this axis need*/
+ /* these are flags specific to kISpElementKind_Delta*/
+ kISpNeedFlag_Delta_AlreadyAxis = 0x10000000, /* there is a axis version of this delta need*/
+ kISpNeedFlag_Delta_AlreadyButton = 0x20000000 /* there is a button version of this delta need*/
+};
+
+/*
+ *
+ * These are the current built values for ISpDeviceClass
+ *
+ */
+enum {
+ kISpDeviceClass_SpeechRecognition = FOUR_CHAR_CODE('talk'),
+ kISpDeviceClass_Mouse = FOUR_CHAR_CODE('mous'),
+ kISpDeviceClass_Keyboard = FOUR_CHAR_CODE('keyd'),
+ kISpDeviceClass_Joystick = FOUR_CHAR_CODE('joys'),
+ kISpDeviceClass_Gamepad = FOUR_CHAR_CODE('gmpd'),
+ kISpDeviceClass_Wheel = FOUR_CHAR_CODE('whel'),
+ kISpDeviceClass_Pedals = FOUR_CHAR_CODE('pedl'),
+ kISpDeviceClass_Levers = FOUR_CHAR_CODE('levr'),
+ kISpDeviceClass_Tickle = FOUR_CHAR_CODE('tckl'), /* a device of this class requires ISpTickle*/
+ kISpDeviceClass_Unknown = FOUR_CHAR_CODE('????')
+};
+
+/*
+ * These are the current built in ISpElementKind's
+ *
+ * These are all OSTypes.
+ *
+ */
+enum {
+ kISpElementKind_Button = FOUR_CHAR_CODE('butn'),
+ kISpElementKind_DPad = FOUR_CHAR_CODE('dpad'),
+ kISpElementKind_Axis = FOUR_CHAR_CODE('axis'),
+ kISpElementKind_Delta = FOUR_CHAR_CODE('dlta'),
+ kISpElementKind_Movement = FOUR_CHAR_CODE('move'),
+ kISpElementKind_Virtual = FOUR_CHAR_CODE('virt')
+};
+
+
+/*
+ *
+ * These are the current built in ISpElementLabel's
+ *
+ * These are all OSTypes.
+ *
+ */
+#if USE_OLD_INPUT_SPROCKET_LABELS
+enum {
+ /* axis */
+ kISpElementLabel_XAxis = FOUR_CHAR_CODE('xaxi'),
+ kISpElementLabel_YAxis = FOUR_CHAR_CODE('yaxi'),
+ kISpElementLabel_ZAxis = FOUR_CHAR_CODE('zaxi'),
+ kISpElementLabel_Rx = FOUR_CHAR_CODE('rxax'),
+ kISpElementLabel_Ry = FOUR_CHAR_CODE('ryax'),
+ kISpElementLabel_Rz = FOUR_CHAR_CODE('rzax'),
+ kISpElementLabel_Gas = FOUR_CHAR_CODE('gasp'),
+ kISpElementLabel_Brake = FOUR_CHAR_CODE('brak'),
+ kISpElementLabel_Clutch = FOUR_CHAR_CODE('cltc'),
+ kISpElementLabel_Throttle = FOUR_CHAR_CODE('thrt'),
+ kISpElementLabel_Trim = FOUR_CHAR_CODE('trim'), /* direction pad */
+ kISpElementLabel_POVHat = FOUR_CHAR_CODE('povh'),
+ kISpElementLabel_PadMove = FOUR_CHAR_CODE('move'), /* buttons */
+ kISpElementLabel_Fire = FOUR_CHAR_CODE('fire'),
+ kISpElementLabel_Start = FOUR_CHAR_CODE('strt'),
+ kISpElementLabel_Select = FOUR_CHAR_CODE('optn'), /* Pause/Resume was changed into 2 needs: Quit and start/pause */
+ kISpElementLabel_Btn_PauseResume = FOUR_CHAR_CODE('strt')
+};
+
+#endif /* USE_OLD_INPUT_SPROCKET_LABELS */
+
+enum {
+ /* generic */
+ kISpElementLabel_None = FOUR_CHAR_CODE('none'), /* axis */
+ kISpElementLabel_Axis_XAxis = FOUR_CHAR_CODE('xaxi'),
+ kISpElementLabel_Axis_YAxis = FOUR_CHAR_CODE('yaxi'),
+ kISpElementLabel_Axis_ZAxis = FOUR_CHAR_CODE('zaxi'),
+ kISpElementLabel_Axis_Rx = FOUR_CHAR_CODE('rxax'),
+ kISpElementLabel_Axis_Ry = FOUR_CHAR_CODE('ryax'),
+ kISpElementLabel_Axis_Rz = FOUR_CHAR_CODE('rzax'),
+ kISpElementLabel_Axis_Roll = kISpElementLabel_Axis_Rz,
+ kISpElementLabel_Axis_Pitch = kISpElementLabel_Axis_Rx,
+ kISpElementLabel_Axis_Yaw = kISpElementLabel_Axis_Ry,
+ kISpElementLabel_Axis_RollTrim = FOUR_CHAR_CODE('rxtm'),
+ kISpElementLabel_Axis_PitchTrim = FOUR_CHAR_CODE('trim'),
+ kISpElementLabel_Axis_YawTrim = FOUR_CHAR_CODE('rytm'),
+ kISpElementLabel_Axis_Gas = FOUR_CHAR_CODE('gasp'),
+ kISpElementLabel_Axis_Brake = FOUR_CHAR_CODE('brak'),
+ kISpElementLabel_Axis_Clutch = FOUR_CHAR_CODE('cltc'),
+ kISpElementLabel_Axis_Throttle = FOUR_CHAR_CODE('thrt'),
+ kISpElementLabel_Axis_Trim = kISpElementLabel_Axis_PitchTrim,
+ kISpElementLabel_Axis_Rudder = FOUR_CHAR_CODE('rudd'),
+ kISpElementLabel_Axis_ToeBrake = FOUR_CHAR_CODE('toeb'), /* delta */
+ kISpElementLabel_Delta_X = FOUR_CHAR_CODE('xdlt'),
+ kISpElementLabel_Delta_Y = FOUR_CHAR_CODE('ydlt'),
+ kISpElementLabel_Delta_Z = FOUR_CHAR_CODE('zdlt'),
+ kISpElementLabel_Delta_Rx = FOUR_CHAR_CODE('rxdl'),
+ kISpElementLabel_Delta_Ry = FOUR_CHAR_CODE('rydl'),
+ kISpElementLabel_Delta_Rz = FOUR_CHAR_CODE('rzdl'),
+ kISpElementLabel_Delta_Roll = kISpElementLabel_Delta_Rz,
+ kISpElementLabel_Delta_Pitch = kISpElementLabel_Delta_Rx,
+ kISpElementLabel_Delta_Yaw = kISpElementLabel_Delta_Ry,
+ kISpElementLabel_Delta_Cursor_X = FOUR_CHAR_CODE('curx'),
+ kISpElementLabel_Delta_Cursor_Y = FOUR_CHAR_CODE('cury'), /* direction pad */
+ kISpElementLabel_Pad_POV = FOUR_CHAR_CODE('povh'), /* up/down/left/right*/
+ kISpElementLabel_Pad_Move = FOUR_CHAR_CODE('move'), /* up/down/left/right*/
+ kISpElementLabel_Pad_POV_Horiz = FOUR_CHAR_CODE('hpov'), /* forward/back/left/right*/
+ kISpElementLabel_Pad_Move_Horiz = FOUR_CHAR_CODE('hmov'), /* forward/back/left/right*/
+ /* buttons */
+ kISpElementLabel_Btn_Fire = FOUR_CHAR_CODE('fire'),
+ kISpElementLabel_Btn_SecondaryFire = FOUR_CHAR_CODE('sfir'),
+ kISpElementLabel_Btn_Jump = FOUR_CHAR_CODE('jump'),
+ kISpElementLabel_Btn_Quit = FOUR_CHAR_CODE('strt'), /* kISpElementLabel_Btn_Quit automatically binds to escape */
+ kISpElementLabel_Btn_StartPause = FOUR_CHAR_CODE('paus'),
+ kISpElementLabel_Btn_Select = FOUR_CHAR_CODE('optn'),
+ kISpElementLabel_Btn_SlideLeft = FOUR_CHAR_CODE('blft'),
+ kISpElementLabel_Btn_SlideRight = FOUR_CHAR_CODE('brgt'),
+ kISpElementLabel_Btn_MoveForward = FOUR_CHAR_CODE('btmf'),
+ kISpElementLabel_Btn_MoveBackward = FOUR_CHAR_CODE('btmb'),
+ kISpElementLabel_Btn_TurnLeft = FOUR_CHAR_CODE('bttl'),
+ kISpElementLabel_Btn_TurnRight = FOUR_CHAR_CODE('bttr'),
+ kISpElementLabel_Btn_LookLeft = FOUR_CHAR_CODE('btll'),
+ kISpElementLabel_Btn_LookRight = FOUR_CHAR_CODE('btlr'),
+ kISpElementLabel_Btn_LookUp = FOUR_CHAR_CODE('btlu'),
+ kISpElementLabel_Btn_LookDown = FOUR_CHAR_CODE('btld'),
+ kISpElementLabel_Btn_Next = FOUR_CHAR_CODE('btnx'),
+ kISpElementLabel_Btn_Previous = FOUR_CHAR_CODE('btpv'),
+ kISpElementLabel_Btn_SideStep = FOUR_CHAR_CODE('side'),
+ kISpElementLabel_Btn_Run = FOUR_CHAR_CODE('quik'),
+ kISpElementLabel_Btn_Look = FOUR_CHAR_CODE('blok'),
+ kISpElementLabel_Btn_Minimum = FOUR_CHAR_CODE('min '),
+ kISpElementLabel_Btn_Decrement = FOUR_CHAR_CODE('decr'),
+ kISpElementLabel_Btn_Center = FOUR_CHAR_CODE('cent'),
+ kISpElementLabel_Btn_Increment = FOUR_CHAR_CODE('incr'),
+ kISpElementLabel_Btn_Maximum = FOUR_CHAR_CODE('max '),
+ kISpElementLabel_Btn_10Percent = FOUR_CHAR_CODE(' 10 '),
+ kISpElementLabel_Btn_20Percent = FOUR_CHAR_CODE(' 20 '),
+ kISpElementLabel_Btn_30Percent = FOUR_CHAR_CODE(' 30 '),
+ kISpElementLabel_Btn_40Percent = FOUR_CHAR_CODE(' 40 '),
+ kISpElementLabel_Btn_50Percent = FOUR_CHAR_CODE(' 50 '),
+ kISpElementLabel_Btn_60Percent = FOUR_CHAR_CODE(' 60 '),
+ kISpElementLabel_Btn_70Percent = FOUR_CHAR_CODE(' 70 '),
+ kISpElementLabel_Btn_80Percent = FOUR_CHAR_CODE(' 80 '),
+ kISpElementLabel_Btn_90Percent = FOUR_CHAR_CODE(' 90 '),
+ kISpElementLabel_Btn_MouseOne = FOUR_CHAR_CODE('mou1'),
+ kISpElementLabel_Btn_MouseTwo = FOUR_CHAR_CODE('mou2'),
+ kISpElementLabel_Btn_MouseThree = FOUR_CHAR_CODE('mou3')
+};
+
+/*
+ *
+ * direction pad data & configuration information
+ *
+ */
+
+typedef UInt32 ISpDPadData;
+enum {
+ kISpPadIdle = 0,
+ kISpPadLeft = 1,
+ kISpPadUpLeft = 2,
+ kISpPadUp = 3,
+ kISpPadUpRight = 4,
+ kISpPadRight = 5,
+ kISpPadDownRight = 6,
+ kISpPadDown = 7,
+ kISpPadDownLeft = 8
+};
+
+
+struct ISpDPadConfigurationInfo {
+ UInt32 id; /* ordering 1..n, 0 = no relavent ordering of direction pads */
+ Boolean fourWayPad; /* true if this pad can only produce idle + four directions */
+};
+typedef struct ISpDPadConfigurationInfo ISpDPadConfigurationInfo;
+/*
+ *
+ * button data & configuration information
+ *
+ */
+
+typedef UInt32 ISpButtonData;
+enum {
+ kISpButtonUp = 0,
+ kISpButtonDown = 1
+};
+
+
+struct ISpButtonConfigurationInfo {
+ UInt32 id; /* ordering 1..n, 0 = no relavent ordering of buttons */
+};
+typedef struct ISpButtonConfigurationInfo ISpButtonConfigurationInfo;
+/*
+ *
+ * axis data & configuration information
+ *
+ */
+
+typedef UInt32 ISpAxisData;
+
+#define kISpAxisMinimum 0x00000000U
+#define kISpAxisMiddle 0x7FFFFFFFU
+#define kISpAxisMaximum 0xFFFFFFFFU
+
+
+struct ISpAxisConfigurationInfo {
+ Boolean symetricAxis; /* axis is symetric, i.e. a joystick is symetric and a gas pedal is not */
+};
+typedef struct ISpAxisConfigurationInfo ISpAxisConfigurationInfo;
+
+typedef Fixed ISpDeltaData;
+
+struct ISpDeltaConfigurationInfo {
+ UInt32 reserved1;
+ UInt32 reserved2;
+};
+typedef struct ISpDeltaConfigurationInfo ISpDeltaConfigurationInfo;
+
+struct ISpMovementData {
+ ISpAxisData xAxis;
+ ISpAxisData yAxis;
+ ISpDPadData direction; /* ISpDPadData version of the movement */
+};
+typedef struct ISpMovementData ISpMovementData;
+
+struct ISpMovementConfigurationInfo {
+ UInt32 reserved1;
+ UInt32 reserved2;
+};
+typedef struct ISpMovementConfigurationInfo ISpMovementConfigurationInfo;
+enum {
+ kISpVirtualElementFlag_UseTempMem = 1
+};
+
+enum {
+ kISpElementListFlag_UseTempMem = 1
+};
+
+enum {
+ kISpFirstIconSuite = 30000,
+ kISpLastIconSuite = 30100,
+ kISpNoneIconSuite = 30000
+};
+
+
+/* ********************* user level functions ********************* */
+/*
+ *
+ * startup / shutdown
+ *
+ */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+ISpStartup (void);
+
+/* 1.1 or later*/
+EXTERN_API_C( OSStatus )
+ISpShutdown (void);
+
+/* 1.1 or later*/
+/*
+ *
+ * polling
+ *
+ */
+EXTERN_API_C( OSStatus )
+ISpTickle (void);
+
+/* 1.1 or later*/
+/********** user interface functions **********/
+
+EXTERN_API_C( NumVersion )
+ISpGetVersion (void);
+
+/*
+ *
+ * ISpElement_NewVirtual(ISpElementReference *outElement);
+ *
+ */
+EXTERN_API_C( OSStatus )
+ISpElement_NewVirtual (UInt32 dataSize,
+ ISpElementReference * outElement,
+ UInt32 flags);
+
+/*
+ *
+ * ISpElement_NewVirtualFromNeeds(UInt32 count, ISpNeeds *needs, ISpElementReference *outElements);
+ *
+ */
+EXTERN_API_C( OSStatus )
+ISpElement_NewVirtualFromNeeds (UInt32 count,
+ ISpNeed * needs,
+ ISpElementReference * outElements,
+ UInt32 flags);
+
+/*
+ *
+ * ISpElement_DisposeVirtual(inElement);
+ *
+ */
+EXTERN_API_C( OSStatus )
+ISpElement_DisposeVirtual (UInt32 count,
+ ISpElementReference * inElements);
+
+/*
+ * ISpInit
+ *
+ */
+EXTERN_API_C( OSStatus )
+ISpInit (UInt32 count,
+ ISpNeed * needs,
+ ISpElementReference * inReferences,
+ OSType appCreatorCode,
+ OSType subCreatorCode,
+ UInt32 flags,
+ short setListResourceId,
+ UInt32 reserved);
+
+
+/*
+ * ISpConfigure
+ *
+ */
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API_C( Boolean , ISpEventProcPtr )(EventRecord *inEvent);
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+ISpConfigure (ISpEventProcPtr inEventProcPtr);
+
+/*
+ *
+ * ISpStop
+ *
+ */
+EXTERN_API_C( OSStatus )
+ISpStop (void);
+
+/*
+ *
+ * ISpSuspend, ISpResume
+ *
+ * ISpSuspend turns all devices off and allocates memory so that the state may be later resumed.
+ * ISpResume resumes to the previous state of the system after a suspend call.
+ *
+ * Return Codes
+ * memFullErr
+ *
+ */
+EXTERN_API_C( OSStatus )
+ISpSuspend (void);
+
+EXTERN_API_C( OSStatus )
+ISpResume (void);
+
+/*
+ * ISpDevices_Extract, ISpDevices_ExtractByClass, ISpDevices_ExtractByIdentifier
+ *
+ * These will extract as many device references from the system wide list as will fit in your buffer.
+ *
+ * inBufferCount - the size of your buffer (in units of sizeof(ISpDeviceReference)) this may be zero
+ * buffer - a pointer to your buffer
+ * outCount - contains the number of devices in the system
+ *
+ * ISpDevices_ExtractByClass extracts and counts devices of the specified ISpDeviceClass
+ * ISpDevices_ExtractByIdentifier extracts and counts devices of the specified ISpDeviceIdentifier
+ *
+ * Return Codes
+ * paramErr
+ *
+ */
+EXTERN_API_C( OSStatus )
+ISpDevices_Extract (UInt32 inBufferCount,
+ UInt32 * outCount,
+ ISpDeviceReference * buffer);
+
+EXTERN_API_C( OSStatus )
+ISpDevices_ExtractByClass (ISpDeviceClass inClass,
+ UInt32 inBufferCount,
+ UInt32 * outCount,
+ ISpDeviceReference * buffer);
+
+EXTERN_API_C( OSStatus )
+ISpDevices_ExtractByIdentifier (ISpDeviceIdentifier inIdentifier,
+ UInt32 inBufferCount,
+ UInt32 * outCount,
+ ISpDeviceReference * buffer);
+
+
+/*
+ * ISpDevices_ActivateClass, ISpDevices_DeactivateClass, ISpDevices_Activate, ISpDevices_Deactivate, ISpDevice_IsActive
+ *
+ * ISpDevices_Activate, ISpDevices_Deactivate
+ *
+ * This will activate/deactivate a block of devices.
+ * inDeviceCount - the number of devices to activate / deactivate
+ * inDevicesToActivate/inDevicesToDeactivate - a pointer to a block of memory contains the devices references
+ *
+ * ISpDevices_ActivateClass, ISpDevices_DeactivateClass
+ * inClass - the class of devices to activate or deactivate
+ *
+ * ISpDevice_IsActive
+ * inDevice - the device reference that you wish to
+ * outIsActive - a boolean value that is true when the device is active
+ *
+ * Return Codes
+ * paramErr
+ *
+ */
+EXTERN_API_C( OSStatus )
+ISpDevices_ActivateClass (ISpDeviceClass inClass);
+
+/* 1.1 or later*/
+EXTERN_API_C( OSStatus )
+ISpDevices_DeactivateClass (ISpDeviceClass inClass);
+
+/* 1.1 or later*/
+EXTERN_API_C( OSStatus )
+ISpDevices_Activate (UInt32 inDeviceCount,
+ ISpDeviceReference * inDevicesToActivate);
+
+EXTERN_API_C( OSStatus )
+ISpDevices_Deactivate (UInt32 inDeviceCount,
+ ISpDeviceReference * inDevicesToDeactivate);
+
+EXTERN_API_C( OSStatus )
+ISpDevice_IsActive (ISpDeviceReference inDevice,
+ Boolean * outIsActive);
+
+/*
+ * ISpDevice_GetDefinition
+ *
+ *
+ * inDevice - the device you want to get the definition for
+ * inBuflen - the size of the structure (sizeof(ISpDeviceDefinition))
+ * outStruct - a pointer to where you want the structure copied
+ *
+ * Return Codes
+ * paramErr
+ *
+ */
+EXTERN_API_C( OSStatus )
+ISpDevice_GetDefinition (ISpDeviceReference inDevice,
+ UInt32 inBuflen,
+ ISpDeviceDefinition * outStruct);
+
+
+/*
+ *
+ * ISpDevice_GetElementList
+ *
+ * inDevice - the device whose element list you wish to get
+ * outElementList - a pointer to where you want a reference to that list stored
+ *
+ * Return Codes
+ * paramErr
+ *
+ */
+EXTERN_API_C( OSStatus )
+ISpDevice_GetElementList (ISpDeviceReference inDevice,
+ ISpElementListReference * outElementList);
+
+/*
+ *
+ * takes an ISpElementReference and returns the group that it is in or 0 if there is
+ * no group
+ *
+ * Return Codes
+ * paramErr
+ *
+ */
+EXTERN_API_C( OSStatus )
+ISpElement_GetGroup (ISpElementReference inElement,
+ UInt32 * outGroup);
+
+/*
+ *
+ * takes an ISpElementReference and returns the device that the element belongs
+ * to.
+ *
+ * Return Codes
+ * paramErr if inElement is 0 or outDevice is nil
+ *
+ */
+EXTERN_API_C( OSStatus )
+ISpElement_GetDevice (ISpElementReference inElement,
+ ISpDeviceReference * outDevice);
+
+/*
+ *
+ * takes an ISpElementReference and gives the ISpElementInfo for that Element. This is the
+ * the set of standard information. You get ISpElementKind specific information
+ * through ISpElement_GetConfigurationInfo.
+ *
+ * Return Codes
+ * paramErr if inElement is 0 or outInfo is nil
+ *
+ */
+EXTERN_API_C( OSStatus )
+ISpElement_GetInfo (ISpElementReference inElement,
+ ISpElementInfoPtr outInfo);
+
+/*
+ *
+ *
+ *
+ * takes an ISpElementReference and gives the ISpElementKind specific configuration information
+ *
+ * if buflen is not long enough to hold the information ISpElement_GetConfigurationInfo will
+ * copy buflen bytes of the data into the block of memory pointed to by configInfo and
+ * will return something error.
+ *
+ * Return Codes
+ * paramErr if inElement or configInfo is nil
+ *
+ */
+EXTERN_API_C( OSStatus )
+ISpElement_GetConfigurationInfo (ISpElementReference inElement,
+ UInt32 buflen,
+ void * configInfo);
+
+/*
+ *
+ * ISpElement_GetSimpleState
+ *
+ * Takes an ISpElementReference and returns the current state of that element. This is a
+ * specialized version of ISpElement_GetComplexState that is only appropriate for elements
+ * whose data fits in a signed 32 bit integer.
+ *
+ *
+ *
+ * Return Codes
+ * paramErr if inElement is 0 or state is nil
+ *
+ */
+EXTERN_API_C( OSStatus )
+ISpElement_GetSimpleState (ISpElementReference inElement,
+ UInt32 * state);
+
+/*
+ *
+ * ISpElement_GetComplexState
+ *
+ * Takes an ISpElementReference and returns the current state of that element.
+ * Will copy up to buflen bytes of the current state of the device into
+ * state.
+ *
+ *
+ * Return Codes
+ * paramErr if inElement is 0 or state is nil
+ *
+ */
+EXTERN_API_C( OSStatus )
+ISpElement_GetComplexState (ISpElementReference inElement,
+ UInt32 buflen,
+ void * state);
+
+
+/*
+ * ISpElement_GetNextEvent
+ *
+ * It takes in an element reference and the buffer size of the ISpElementEventPtr
+ * it will set wasEvent to true if there was an event and false otherwise. If there
+ * was not enough space to fill in the whole event structure that event will be
+ * dequed, as much of the event as will fit in the buffer will by copied and
+ * ISpElement_GetNextEvent will return an error.
+ *
+ * Return Codes
+ * paramErr
+ *
+ */
+EXTERN_API_C( OSStatus )
+ISpElement_GetNextEvent (ISpElementReference inElement,
+ UInt32 bufSize,
+ ISpElementEventPtr event,
+ Boolean * wasEvent);
+
+/*
+ *
+ * ISpElement_Flush
+ *
+ * It takes an ISpElementReference and flushes all the events on that element. All it guaruntees is
+ * that any events that made it to this layer before the time of the flush call will be flushed and
+ * it will not flush any events that make it to this layer after the time when the call has returned.
+ * What happens to events that occur during the flush is undefined.
+ *
+ *
+ * Return Codes
+ * paramErr
+ *
+ */
+EXTERN_API_C( OSStatus )
+ISpElement_Flush (ISpElementReference inElement);
+
+
+/*
+ * ISpElementList_New
+ *
+ * Creates a new element list and returns it in outElementList. In count specifies
+ * the number of element references in the list pointed to by inElements. If inCount
+ * is non zero the list is created with inCount elements in at as specified by the
+ * inElements parameter. Otherwise the list is created empty.
+ *
+ *
+ * Return Codes
+ * out of memory - If it failed to allocate the list because it was out of memory
+ it will also set outElementList to 0
+ * paramErr if outElementList was nil
+ *
+ *
+ * Special Concerns
+ *
+ * interrupt unsafe
+ *
+ */
+EXTERN_API_C( OSStatus )
+ISpElementList_New (UInt32 inCount,
+ ISpElementReference * inElements,
+ ISpElementListReference * outElementList,
+ UInt32 flags);
+
+/*
+ * ISpElementList_Dispose
+ *
+ * Deletes an already existing memory list.
+ *
+ *
+ * Return Codes
+ * paramErr if inElementList was 0
+ *
+ *
+ * Special Concerns
+ *
+ * interrupt unsafe
+ *
+ */
+EXTERN_API_C( OSStatus )
+ISpElementList_Dispose (ISpElementListReference inElementList);
+
+/*
+ * ISpGetGlobalElementList
+ *
+ * returns the global element list
+ *
+ * Return Codes
+ * paramErr if outElementList is nil
+ *
+ */
+EXTERN_API_C( OSStatus )
+ISpGetGlobalElementList (ISpElementListReference * outElementList);
+
+/*
+ * ISpElementList_AddElement
+ *
+ * adds an element to the element list
+ *
+ * Return Codes
+ * paramErr if inElementList is 0 or newElement is 0
+ * memory error if the system is unable to allocate enough memory
+ *
+ * Special Concerns
+ * interrupt Unsafe
+ *
+ */
+EXTERN_API_C( OSStatus )
+ISpElementList_AddElements (ISpElementListReference inElementList,
+ UInt32 refCon,
+ UInt32 count,
+ ISpElementReference * newElements);
+
+/*
+ * ISpElementList_RemoveElement
+ *
+ * removes the specified element from the element list
+ *
+ * Return Codes
+ * paramErr if inElementList is 0 or oldElement is 0
+ * memory error if the system is unable to allocate enough memory
+ *
+ * Special Concerns
+ * interrupt Unsafe
+ *
+ */
+EXTERN_API_C( OSStatus )
+ISpElementList_RemoveElements (ISpElementListReference inElementList,
+ UInt32 count,
+ ISpElementReference * oldElement);
+
+/*
+ * ISpElementList_Extract
+ *
+ * ISpElementList_Extract will extract as many of the elements from an element list as possible. You pass
+ * in an element list, a pointer to an array of element references and the number of elements in that array.
+ * It will return how many items are in the element list in the outCount parameter and copy the minimum of
+ * that number and the size of the array into the buffer.
+ *
+ * ByKind and ByLabel are the same except that they will only count and copy element references to elements
+ * that have the specified kind and label.
+ *
+ * Return Codes
+ * paramErr
+ *
+ */
+EXTERN_API_C( OSStatus )
+ISpElementList_Extract (ISpElementListReference inElementList,
+ UInt32 inBufferCount,
+ UInt32 * outCount,
+ ISpElementReference * buffer);
+
+EXTERN_API_C( OSStatus )
+ISpElementList_ExtractByKind (ISpElementListReference inElementList,
+ ISpElementKind inKind,
+ UInt32 inBufferCount,
+ UInt32 * outCount,
+ ISpElementReference * buffer);
+
+EXTERN_API_C( OSStatus )
+ISpElementList_ExtractByLabel (ISpElementListReference inElementList,
+ ISpElementLabel inLabel,
+ UInt32 inBufferCount,
+ UInt32 * outCount,
+ ISpElementReference * buffer);
+
+/*
+ * ISpElementList_GetNextEvent
+ *
+ * It takes in an element list reference and the buffer size of the ISpElementEventPtr
+ * it will set wasEvent to true if there was an event and false otherwise. If there
+ * was not enough space to fill in the whole event structure that event will be
+ * dequed, as much of the event as will fit in the buffer will by copied and
+ * ISpElementList_GetNextEvent will return an error.
+ *
+ * Return Codes
+ * paramErr
+ *
+ */
+EXTERN_API_C( OSStatus )
+ISpElementList_GetNextEvent (ISpElementListReference inElementList,
+ UInt32 bufSize,
+ ISpElementEventPtr event,
+ Boolean * wasEvent);
+
+/*
+ *
+ * ISpElementList_Flush
+ *
+ * It takes an ISpElementListReference and flushes all the events on that list. All it guaruntees is
+ * that any events that made it to this layer before the time of the flush call will be flushed and
+ * it will not flush any events that make it to this layer after the time when the call has returned.
+ * What happens to events that occur during the flush is undefined.
+ *
+ *
+ * Return Codes
+ * paramErr
+ *
+ */
+EXTERN_API_C( OSStatus )
+ISpElementList_Flush (ISpElementListReference inElementList);
+
+/*
+ *
+ * ISpTimeToMicroseconds
+ *
+ *
+ * This function takes time from an input sprocket event and converts it
+ * into microseconds. (Version 1.2 or later of InputSprocket.)
+ *
+ *
+ * Return Codes
+ * paramErr
+ *
+ */
+EXTERN_API_C( OSStatus )
+ISpTimeToMicroseconds (const AbsoluteTime * inTime,
+ UnsignedWide * outMicroseconds);
+
+/*
+ *
+ * ISpUptime
+ *
+ *
+ * This funtion returns the current machine dependant time, identical in form
+ * to that in an InputSprocket event. (Version 1.1 or later of InputSprocket).
+ *
+ *
+ */
+EXTERN_API_C( AbsoluteTime )
+ISpUptime (void);
+
+
+/****************************************************************************/
+/* Interfaces for InputSprocket Drivers */
+/* */
+/* These APIs should be called only from InputSprocket drivers */
+/* */
+/* (Moved from InputSprocketDriver.h, which is now obsolete. */
+/****************************************************************************/
+
+/*
+
+Resource File Concerns
+
+1. All resource ids of a driver should be in the range of 256 to 2048
+and the res file should only be open while the drivers panel is visable.
+
+*/
+#endif /* CALL_NOT_IN_CARBON */
+
+enum {
+ kOSType_ISpDriverFileType = FOUR_CHAR_CODE('shlb'),
+ kOSType_ISpDriverCreator = FOUR_CHAR_CODE('insp')
+};
+
+/*
+ *
+ * this function will plot an icon suite of the application (usually for a need)
+ *
+ */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSErr )
+ISpPlotAppIconSuite (const Rect * theRect,
+ IconAlignmentType align,
+ IconTransformType transform,
+ short iconSuiteResourceId);
+
+/* label2,5,6,7, disabled and offline are reserved*/
+
+#endif /* CALL_NOT_IN_CARBON */
+
+enum {
+ kISpIconTransform_Selected = kTransformSelected, /* choose one of these (optionally) (these all erase what is behind them to the dialog color)*/
+ kISpIconTransform_PlotIcon = kTransformLabel1,
+ kISpIconTransform_PlotPopupButton = kTransformLabel3,
+ kISpIconTransform_PlotButton = kTransformLabel4, /* use this is you want to plot the icon while the devices button is pressed*/
+ /* or the devices axis is activated and so on*/
+ kISpIconTransform_DeviceActive = kTransformOpen
+};
+
+
+typedef UInt32 ISpMetaHandlerSelector;
+enum {
+ kISpSelector_Init = 1,
+ kISpSelector_Stop = 2,
+ kISpSelector_GetSize = 3,
+ kISpSelector_HandleEvent = 4,
+ kISpSelector_Show = 5,
+ kISpSelector_Hide = 6,
+ kISpSelector_BeginConfiguration = 7,
+ kISpSelector_EndConfiguration = 8,
+ kISpSelector_GetIcon = 9,
+ kISpSelector_GetState = 10,
+ kISpSelector_SetState = 11,
+ kISpSelector_Dirty = 12,
+ kISpSelector_SetActive = 13,
+ kISpSelector_DialogItemHit = 14,
+ kISpSelector_Tickle = 15, /* 1.03 and later*/
+ kISpSelector_InterruptTickle = 16,
+ kISpSelector_Draw = 17,
+ kISpSelector_Click = 18,
+ kISpSelector_ADBReInit = 19, /* 1.2 and later*/
+ kISpSelector_GetCalibration = 20, /* 1.7 and later*/
+ kISpSelector_SetCalibration = 21,
+ kISpSelector_CalibrateDialog = 22
+};
+
+
+/*
+ *
+ * typedefs for the function pointers the metahandler may return
+ *
+ */
+/* a generic driver function pointer */
+typedef CALLBACK_API_C( OSStatus , ISpDriverFunctionPtr_Generic )(UInt32 refCon, ...);
+/* the meta handler pointer */
+typedef CALLBACK_API_C( ISpDriverFunctionPtr_Generic , ISpDriverFunctionPtr_MetaHandler )(UInt32 refCon, ISpMetaHandlerSelector metaHandlerSelector);
+/* the pointers you get through the meta handler */
+typedef CALLBACK_API_C( OSStatus , ISpDriverFunctionPtr_Init )(UInt32 refCon, UInt32 count, ISpNeed needs[], ISpElementReference virtualElements[], Boolean used[], OSType appCreatorCode, OSType subCreatorCode, UInt32 reserved, void *reserved2);
+typedef CALLBACK_API_C( OSStatus , ISpDriverFunctionPtr_Stop )(UInt32 refCon);
+typedef CALLBACK_API_C( OSStatus , ISpDriverFunctionPtr_GetSize )(UInt32 refCon, Point *minimum, Point *best);
+typedef CALLBACK_API_C( OSStatus , ISpDriverFunctionPtr_HandleEvent )(UInt32 refCon, EventRecord *theEvent, Boolean *handled);
+typedef CALLBACK_API_C( OSStatus , ISpDriverFunctionPtr_Show )(UInt32 refCon, DialogPtr theDialog, short dialogItemNumber, Rect *r);
+typedef CALLBACK_API_C( OSStatus , ISpDriverFunctionPtr_Hide )(UInt32 refCon);
+typedef CALLBACK_API_C( OSStatus , ISpDriverFunctionPtr_BeginConfiguration )(UInt32 refCon, UInt32 count, ISpNeed needs[]);
+typedef CALLBACK_API_C( OSStatus , ISpDriverFunctionPtr_EndConfiguration )(UInt32 refCon, Boolean accept);
+typedef CALLBACK_API_C( OSStatus , ISpDriverFunctionPtr_GetIcon )(UInt32 refCon, short *iconSuiteResourceId);
+typedef CALLBACK_API_C( OSStatus , ISpDriverFunctionPtr_GetState )(UInt32 refCon, UInt32 buflen, void *buffer, UInt32 *length);
+typedef CALLBACK_API_C( OSStatus , ISpDriverFunctionPtr_SetState )(UInt32 refCon, UInt32 length, void *buffer);
+typedef CALLBACK_API_C( OSStatus , ISpDriverFunctionPtr_Dirty )(UInt32 refCon, Boolean *dirty);
+typedef CALLBACK_API_C( OSStatus , ISpDriverFunctionPtr_SetActive )(UInt32 refCon, Boolean active);
+typedef CALLBACK_API_C( OSStatus , ISpDriverFunctionPtr_DialogItemHit )(UInt32 refCon, short itemHit);
+/* 1.03 and later*/
+typedef CALLBACK_API_C( OSStatus , ISpDriverFunctionPtr_Tickle )(UInt32 refCon);
+typedef CALLBACK_API_C( OSStatus , ISpDriverFunctionPtr_InterruptTickle )(UInt32 refCon);
+typedef CALLBACK_API_C( OSStatus , ISpDriverFunctionPtr_Draw )(UInt32 refCon);
+typedef CALLBACK_API_C( OSStatus , ISpDriverFunctionPtr_Click )(UInt32 refCon, const EventRecord *event);
+/* 1.2 and later*/
+typedef CALLBACK_API_C( OSStatus , ISpDriverFunctionPtr_ADBReInit )(UInt32 refCon, Boolean inPostProcess);
+/* 1.7 and later*/
+typedef CALLBACK_API_C( OSStatus , ISpDriverFunctionPtr_GetCalibration )(UInt32 refCon, void *calibration, Size *calibrationSize);
+typedef CALLBACK_API_C( OSStatus , ISpDriverFunctionPtr_SetCalibration )(UInt32 refCon, void *calibration, Size calibrationSize);
+typedef CALLBACK_API_C( OSStatus , ISpDriverFunctionPtr_CalibrateDialog )(UInt32 refCon, Boolean *changed);
+/* these functions are exported in the driver's pef container (1.7 or later)*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+ISpDriver_CheckConfiguration (Boolean * validConfiguration);
+
+EXTERN_API_C( OSStatus )
+ISpDriver_FindAndLoadDevices (Boolean * keepDriverLoaded);
+
+EXTERN_API_C( OSStatus )
+ISpDriver_DisposeDevices (void);
+
+EXTERN_API_C( void )
+ISpDriver_Tickle (void);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API_C( OSStatus , ISpDriver_CheckConfigurationPtr )(Boolean *validConfiguration);
+typedef CALLBACK_API_C( OSStatus , ISpDriver_FindAndLoadDevicesPtr )(Boolean *keepDriverLoaded);
+typedef CALLBACK_API_C( OSStatus , ISpDriver_DisposeDevicesPtr )(void );
+typedef CALLBACK_API_C( void , ISpDriver_TicklePtr )(void );
+/* ********************* driver level functions ********************* */
+
+/*
+ *
+ * ISpDevice_New
+ *
+ * This creates a new device from the device definition structure and returns
+ * the result into the device reference.
+ *
+ * Returns Codes
+ * paramErr
+ * out of memory
+ *
+ * Specical Considerations
+ * may not be done at interrupt time
+ */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+ISpDevice_New (const ISpDeviceDefinition * inStruct,
+ ISpDriverFunctionPtr_MetaHandler metaHandler,
+ UInt32 refCon,
+ ISpDeviceReference * outReference);
+
+/*
+ * ISpDevice_Dispose
+ *
+ * This disposes an existing device.
+ *
+ * Returns Codes
+ * paramErr
+ *
+ * Special Considerations
+ * May not be done at interrupt time
+ *
+ */
+EXTERN_API_C( OSStatus )
+ISpDevice_Dispose (ISpDeviceReference inReference);
+
+
+/*
+ *
+ * ISpElementDefinitionStruct
+ *
+ * This is the structure that defines everything static about this
+ * element. For each element on your device you will need to
+ * fill in one of these structures when your driver loads.
+ *
+ */
+#endif /* CALL_NOT_IN_CARBON */
+
+struct ISpElementDefinitionStruct
+{
+ ISpDeviceReference device; /* device this element belongs to */
+ UInt32 group; /* group this element belongs to or 0 */
+
+ Str63 theString; /* a string that is a human readable identifier for this element, internationalization ? */
+
+ ISpElementKind kind;
+ ISpElementLabel label;
+
+ void *configInfo; /* a pointer to the buffer containing the configuration information for this element */
+ UInt32 configInfoLength; /* length of that configuration info */
+
+ UInt32 dataSize; /* the size of the data, so we can generate an appropriate buffer */
+
+ UInt32 reserved1;
+ UInt32 reserved2;
+ UInt32 reserved3;
+};
+typedef struct ISpElementDefinitionStruct ISpElementDefinitionStruct;
+/*
+ *
+ * ISpElement_New
+ *
+ * ISpElement_New takes an element definition struct and gives you back a element reference.
+ * When you produce data you use that element reference to give the data to the system.
+ *
+ * Return Codes
+ * paramErr
+ * memory error
+ *
+ * Special Considerations
+ * The ISpElement_New function may move or purge memory. Your application should not call this function
+ * at interrupt time.
+ *
+ */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+ISpElement_New (const ISpElementDefinitionStruct * inStruct,
+ ISpElementReference * outElement);
+
+/*
+ *
+ * ISpElement_Dispose
+ *
+ * ISpElement_Dispose takes an element reference and deletes it.
+ * You should call this function when your driver unloads.
+ *
+ * Return Codes
+ * paramErr
+ * memory error
+ *
+ * Special Considerations
+ * The ISpElement_Dispose function may move or purge memory. Your application should not call this function
+ * at interrupt time.
+ *
+ */
+EXTERN_API_C( OSStatus )
+ISpElement_Dispose (ISpElementReference inElement);
+
+/*
+ *
+ * ISpElement_PushSimpleData
+ *
+ * ISpElement_PushSimpleData is the appropriate way to give the system data if your data fits exactly into
+ * a 32 bit signed number. You pass the element reference that goes with the data, the data and the
+ * AbsoluteTime that data was produced. If UpTime is not available you should fill time.lo with the
+ * TickCount time and time.hi with 0.
+ *
+ * Return Codes
+ * paramErr
+ *
+ */
+EXTERN_API_C( OSStatus )
+ISpElement_PushSimpleData (ISpElementReference inElement,
+ UInt32 data,
+ const AbsoluteTime * time);
+
+/*
+ *
+ * ISpElement_PushComplexData
+ *
+ * ISpElement_PushComplexData is exactly like ISpElement_PushSimpleData except that it is appropriate for times
+ * when your data does not fit into a signed 32 bit integer.
+ *
+ * Instead it takes the length of your data (which must match the datasize field of your ISpElementDefinitionStruct)
+ * and a ptr to the devices state.
+ *
+ * Return Codes
+ * paramErr
+ *
+ */
+EXTERN_API_C( OSStatus )
+ISpElement_PushComplexData (ISpElementReference inElement,
+ UInt32 buflen,
+ void * state,
+ const AbsoluteTime * time);
+
+/* *********************************************************************************** */
+#endif /* CALL_NOT_IN_CARBON */
+
+
+typedef UInt32 ISpADBDeferRef;
+typedef CALLBACK_API_C( void , ISpADBDeferCallbackProcPtr )(UInt8 adbCommand, void *adbBuffer, UInt32 refcon);
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSErr )
+ISpAllocateADBDeferBlock (ISpADBDeferRef * createBlock);
+
+EXTERN_API_C( OSErr )
+ISpDisposeADBDeferBlock (ISpADBDeferRef disposeBlock);
+
+EXTERN_API_C( OSErr )
+ISpInstallADBDefer (ISpADBDeferRef refBlock,
+ ADBAddress reqAddress,
+ ISpADBDeferCallbackProcPtr installProc,
+ UInt32 clientRefCon,
+ ADBServiceRoutineUPP * prevRoutine,
+ Ptr * prevDataArea);
+
+EXTERN_API_C( OSErr )
+ISpRemoveADBDefer (ISpADBDeferRef refBlock);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __INPUTSPROCKET__ */
+
diff --git a/include/qt/Interrupts.h b/include/qt/Interrupts.h
new file mode 100644
index 000000000..961d25f40
--- /dev/null
+++ b/include/qt/Interrupts.h
@@ -0,0 +1,30 @@
+/*
+ File: Interrupts.h
+
+ Contains: Public Interface to the Interrupt Manager.
+
+ Version: Technology: PowerSurge 1.0.2
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __INTERRUPTS__
+#define __INTERRUPTS__
+
+#ifndef __DRIVERSERVICES__
+#include "DriverServices.h"
+#endif
+
+
+/*
+ The contents of Interrupts.h has been merged into DriverServices.h
+*/
+
+#endif /* __INTERRUPTS__ */
+
diff --git a/include/qt/IntlResources.h b/include/qt/IntlResources.h
new file mode 100644
index 000000000..e2e1d95cc
--- /dev/null
+++ b/include/qt/IntlResources.h
@@ -0,0 +1,387 @@
+/*
+ File: IntlResources.h
+
+ Contains: International Resource definitions.
+
+ Version: Technology: System 7.5+
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1983-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __INTLRESOURCES__
+#define __INTLRESOURCES__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ /* Bits in the itlcFlags byte */
+ itlcShowIcon = 7, /*Show icon even if only one script*/
+ itlcDualCaret = 6, /*Use dual caret for mixed direction text*/
+ /* Bits in the itlcSysFlags word */
+ itlcSysDirection = 15 /*System direction - left to right/right to left*/
+};
+
+enum {
+ /* One more flag in the itlcFlags byte */
+ itlcDisableKeyScriptSync = 3 /*Disable font and keyboard script synchrinozation*/
+};
+
+enum {
+ /* We should define masks, too. */
+ itlcDisableKeyScriptSyncMask = 1 << itlcDisableKeyScriptSync /*Disable font and keyboard script synchrinozation mask*/
+};
+
+
+enum {
+ tokLeftQuote = 1, /* NumberParts.data[] enumerators */
+ tokRightQuote = 2, /* In general, these are NOT to be considered indices into the data[] array */
+ tokLeadPlacer = 3,
+ tokLeader = 4,
+ tokNonLeader = 5,
+ tokZeroLead = 6,
+ tokPercent = 7,
+ tokPlusSign = 8,
+ tokMinusSign = 9,
+ tokThousands = 10,
+ tokReserved = 11, /* 11 is reserved field */
+ tokSeparator = 12,
+ tokEscape = 13,
+ tokDecPoint = 14,
+ tokEPlus = 15,
+ tokEMinus = 16,
+ tokMaxSymbols = 31,
+ curNumberPartsVersion = 1 /*current version of NumberParts record*/
+};
+
+enum {
+ currSymLead = 16,
+ currNegSym = 32,
+ currTrailingZ = 64,
+ currLeadingZ = 128
+};
+
+enum {
+ mdy = 0,
+ dmy = 1,
+ ymd = 2,
+ myd = 3,
+ dym = 4,
+ ydm = 5
+};
+
+typedef SInt8 DateOrders;
+enum {
+ timeCycle24 = 0, /*time sequence 0:00 - 23:59*/
+ timeCycleZero = 1, /*time sequence 0:00-11:59, 0:00 - 11:59*/
+ timeCycle12 = 255, /*time sequence 12:00 - 11:59, 12:00 - 11:59*/
+ zeroCycle = 1, /*old name for timeCycleZero*/
+ longDay = 0, /*day of the month*/
+ longWeek = 1, /*day of the week*/
+ longMonth = 2, /*month of the year*/
+ longYear = 3, /*year*/
+ supDay = 1, /*suppress day of month*/
+ supWeek = 2, /*suppress day of week*/
+ supMonth = 4, /*suppress month*/
+ supYear = 8, /*suppress year*/
+ dayLdingZ = 32,
+ mntLdingZ = 64,
+ century = 128,
+ secLeadingZ = 32,
+ minLeadingZ = 64,
+ hrLeadingZ = 128
+};
+
+/* move OffsetTable to QuickdrawText */
+
+struct Intl0Rec {
+ char decimalPt; /*decimal point character*/
+ char thousSep; /*thousands separator character*/
+ char listSep; /*list separator character*/
+ char currSym1; /*currency symbol*/
+ char currSym2;
+ char currSym3;
+ UInt8 currFmt; /*currency format flags*/
+ UInt8 dateOrder; /*order of short date elements: mdy, dmy, etc.*/
+ UInt8 shrtDateFmt; /*format flags for each short date element*/
+ char dateSep; /*date separator character*/
+ UInt8 timeCycle; /*specifies time cycle: 0..23, 1..12, or 0..11*/
+ UInt8 timeFmt; /*format flags for each time element*/
+ char mornStr[4]; /*trailing string for AM if 12-hour cycle*/
+ char eveStr[4]; /*trailing string for PM if 12-hour cycle*/
+ char timeSep; /*time separator character*/
+ char time1Suff; /*trailing string for AM if 24-hour cycle*/
+ char time2Suff;
+ char time3Suff;
+ char time4Suff;
+ char time5Suff; /*trailing string for PM if 24-hour cycle*/
+ char time6Suff;
+ char time7Suff;
+ char time8Suff;
+ UInt8 metricSys; /*255 if metric, 0 if inches etc.*/
+ short intl0Vers; /*region code (hi byte) and version (lo byte)*/
+};
+typedef struct Intl0Rec Intl0Rec;
+
+typedef Intl0Rec * Intl0Ptr;
+typedef Intl0Ptr * Intl0Hndl;
+
+struct Intl1Rec {
+ Str15 days[7]; /*day names*/
+ Str15 months[12]; /*month names*/
+ UInt8 suppressDay; /*255 for no day, or flags to suppress any element*/
+ UInt8 lngDateFmt; /*order of long date elements*/
+ UInt8 dayLeading0; /*255 for leading 0 in day number*/
+ UInt8 abbrLen; /*length for abbreviating names*/
+ char st0[4]; /*separator strings for long date format*/
+ char st1[4];
+ char st2[4];
+ char st3[4];
+ char st4[4];
+ short intl1Vers; /*region code (hi byte) and version (lo byte)*/
+ short localRtn[1]; /*now a flag for opt extension*/
+};
+typedef struct Intl1Rec Intl1Rec;
+
+typedef Intl1Rec * Intl1Ptr;
+typedef Intl1Ptr * Intl1Hndl;
+/*fields for optional itl1 extension*/
+
+struct Itl1ExtRec {
+ Intl1Rec base; /*un-extended Intl1Rec*/
+ short version;
+ short format;
+ short calendarCode; /*calendar code for this itl1 resource*/
+ long extraDaysTableOffset; /*offset in itl1 to extra days table*/
+ long extraDaysTableLength; /*length of extra days table*/
+ long extraMonthsTableOffset; /*offset in itl1 to extra months table*/
+ long extraMonthsTableLength; /*length of extra months table*/
+ long abbrevDaysTableOffset; /*offset in itl1 to abbrev days table*/
+ long abbrevDaysTableLength; /*length of abbrev days table*/
+ long abbrevMonthsTableOffset; /*offset in itl1 to abbrev months table*/
+ long abbrevMonthsTableLength; /*length of abbrev months table*/
+ long extraSepsTableOffset; /*offset in itl1 to extra seps table*/
+ long extraSepsTableLength; /*length of extra seps table*/
+ short tables[1]; /*now a flag for opt extension*/
+};
+typedef struct Itl1ExtRec Itl1ExtRec;
+
+struct UntokenTable {
+ short len;
+ short lastToken;
+ short index[256]; /*index table; last = lastToken*/
+};
+typedef struct UntokenTable UntokenTable;
+typedef UntokenTable * UntokenTablePtr;
+typedef UntokenTablePtr * UntokenTableHandle;
+
+union WideChar {
+ char a[2]; /*0 is the high order character*/
+ short b;
+};
+typedef union WideChar WideChar;
+
+struct WideCharArr {
+ short size;
+ WideChar data[10];
+};
+typedef struct WideCharArr WideCharArr;
+
+struct NumberParts {
+ short version;
+ WideChar data[31]; /*index by [tokLeftQuote..tokMaxSymbols]*/
+ WideCharArr pePlus;
+ WideCharArr peMinus;
+ WideCharArr peMinusPlus;
+ WideCharArr altNumTable;
+ char reserved[20];
+};
+typedef struct NumberParts NumberParts;
+typedef NumberParts * NumberPartsPtr;
+
+
+struct Itl4Rec {
+ short flags; /*reserved*/
+ long resourceType; /*contains 'itl4'*/
+ short resourceNum; /*resource ID*/
+ short version; /*version number*/
+ long resHeader1; /*reserved*/
+ long resHeader2; /*reserved*/
+ short numTables; /*number of tables, one-based*/
+ long mapOffset; /*offset to table that maps byte to token*/
+ long strOffset; /*offset to routine that copies canonical string*/
+ long fetchOffset; /*offset to routine that gets next byte of character*/
+ long unTokenOffset; /*offset to table that maps token to canonical string*/
+ long defPartsOffset; /*offset to default number parts table*/
+ long resOffset6; /*reserved*/
+ long resOffset7; /*reserved*/
+ long resOffset8; /*reserved*/
+};
+typedef struct Itl4Rec Itl4Rec;
+
+typedef Itl4Rec * Itl4Ptr;
+typedef Itl4Ptr * Itl4Handle;
+/* New NItl4Rec for System 7.0: */
+
+struct NItl4Rec {
+ short flags; /*reserved*/
+ long resourceType; /*contains 'itl4'*/
+ short resourceNum; /*resource ID*/
+ short version; /*version number*/
+ short format; /*format code*/
+ short resHeader; /*reserved*/
+ long resHeader2; /*reserved*/
+ short numTables; /*number of tables, one-based*/
+ long mapOffset; /*offset to table that maps byte to token*/
+ long strOffset; /*offset to routine that copies canonical string*/
+ long fetchOffset; /*offset to routine that gets next byte of character*/
+ long unTokenOffset; /*offset to table that maps token to canonical string*/
+ long defPartsOffset; /*offset to default number parts table*/
+ long whtSpListOffset; /*offset to white space code list*/
+ long resOffset7; /*reserved*/
+ long resOffset8; /*reserved*/
+ short resLength1; /*reserved*/
+ short resLength2; /*reserved*/
+ short resLength3; /*reserved*/
+ short unTokenLength; /*length of untoken table*/
+ short defPartsLength; /*length of default number parts table*/
+ short whtSpListLength; /*length of white space code list*/
+ short resLength7; /*reserved*/
+ short resLength8; /*reserved*/
+};
+typedef struct NItl4Rec NItl4Rec;
+
+typedef NItl4Rec * NItl4Ptr;
+typedef NItl4Ptr * NItl4Handle;
+
+
+struct TableDirectoryRecord {
+ OSType tableSignature; /*4 byte long table name */
+ unsigned long reserved; /*Reserved for internal use */
+ unsigned long tableStartOffset; /*Table start offset in byte*/
+ unsigned long tableSize; /*Table size in byte*/
+};
+typedef struct TableDirectoryRecord TableDirectoryRecord;
+
+struct Itl5Record {
+ Fixed versionNumber; /*itl5 resource version number */
+ unsigned short numberOfTables; /*Number of tables it contains */
+ unsigned short reserved[3]; /*Reserved for internal use */
+ TableDirectoryRecord tableDirectory[1]; /*Table directory records */
+};
+typedef struct Itl5Record Itl5Record;
+
+struct RuleBasedTrslRecord {
+ short sourceType; /*Transliterate target type for the LHS of the rule */
+ short targetType; /*Transliterate target type for the RHS of the rule */
+ short formatNumber; /*Transliterate resource format number */
+ short propertyFlag; /*Transliterate property flags */
+ short numberOfRules; /*Number of rules following this field */
+};
+typedef struct RuleBasedTrslRecord RuleBasedTrslRecord;
+
+
+struct ItlcRecord {
+ short itlcSystem; /*default system script*/
+ short itlcReserved; /*reserved*/
+ SInt8 itlcFontForce; /*default font force flag*/
+ SInt8 itlcIntlForce; /*default intl force flag*/
+ SInt8 itlcOldKybd; /*MacPlus intl keybd flag*/
+ SInt8 itlcFlags; /*general flags*/
+ short itlcIconOffset; /*keyboard icon offset; not used in 7.0*/
+ SInt8 itlcIconSide; /*keyboard icon side; not used in 7.0*/
+ SInt8 itlcIconRsvd; /*rsvd for other icon info*/
+ short itlcRegionCode; /*preferred verXxx code*/
+ short itlcSysFlags; /*flags for setting system globals*/
+ SInt8 itlcReserved4[32]; /*for future use*/
+};
+typedef struct ItlcRecord ItlcRecord;
+
+struct ItlbRecord {
+ short itlbNumber; /*itl0 id number*/
+ short itlbDate; /*itl1 id number*/
+ short itlbSort; /*itl2 id number*/
+ short itlbFlags; /*Script flags*/
+ short itlbToken; /*itl4 id number*/
+ short itlbEncoding; /*itl5 ID # (optional; char encoding)*/
+ short itlbLang; /*current language for script */
+ SInt8 itlbNumRep; /*number representation code*/
+ SInt8 itlbDateRep; /*date representation code */
+ short itlbKeys; /*KCHR id number*/
+ short itlbIcon; /*ID # of SICN or kcs#/kcs4/kcs8 suite.*/
+};
+typedef struct ItlbRecord ItlbRecord;
+/* New ItlbExtRecord structure for System 7.0 */
+
+struct ItlbExtRecord {
+ ItlbRecord base; /*un-extended ItlbRecord*/
+ long itlbLocalSize; /*size of script's local record*/
+ short itlbMonoFond; /*default monospace FOND ID*/
+ short itlbMonoSize; /*default monospace font size*/
+ short itlbPrefFond; /*preferred FOND ID*/
+ short itlbPrefSize; /*preferred font size*/
+ short itlbSmallFond; /*default small FOND ID*/
+ short itlbSmallSize; /*default small font size*/
+ short itlbSysFond; /*default system FOND ID*/
+ short itlbSysSize; /*default system font size*/
+ short itlbAppFond; /*default application FOND ID*/
+ short itlbAppSize; /*default application font size*/
+ short itlbHelpFond; /*default Help Mgr FOND ID*/
+ short itlbHelpSize; /*default Help Mgr font size*/
+ Style itlbValidStyles; /*set of valid styles for script*/
+ Style itlbAliasStyle; /*style (set) to mark aliases*/
+};
+typedef struct ItlbExtRecord ItlbExtRecord;
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __INTLRESOURCES__ */
+
diff --git a/include/qt/IsochronousDataHandler.h b/include/qt/IsochronousDataHandler.h
new file mode 100644
index 000000000..7f0d8912b
--- /dev/null
+++ b/include/qt/IsochronousDataHandler.h
@@ -0,0 +1,450 @@
+/*
+ File: IsochronousDataHandler.h
+
+ Contains: The defines the client API to an Isochronous Data Handler, which is
+
+ Version: Technology: xxx put version here xxx
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1997-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+//
+// Check for Prior Inclusion of IsochronousDataHandler.r
+// If this header is trying to be included via a Rez path, make it act
+// as a NOP. This will allow both Rez & C files to get to use the
+// contants for the component type, subtype, and interface version.
+#ifndef __ISOCHRONOUSDATAHANDLER_R__
+
+
+#ifndef __ISOCHRONOUSDATAHANDLER__
+#define __ISOCHRONOUSDATAHANDLER__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MOVIESFORMAT__
+#include "MoviesFormat.h"
+#endif
+
+#ifndef __QUICKTIMECOMPONENTS__
+#include "QuickTimeComponents.h"
+#endif
+
+
+
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ kIDHComponentType = FOUR_CHAR_CODE('ihlr'), /* Component type*/
+ kIDHSubtypeDV = FOUR_CHAR_CODE('dv '), /* Subtype for DV (over FireWire)*/
+ kIDHSubtypeFireWireConference = FOUR_CHAR_CODE('fwc ') /* Subtype for FW Conference*/
+};
+
+
+/* Version of Isochronous Data Handler API*/
+enum {
+ kIDHInterfaceVersion1 = 0x0001 /* Initial relase (Summer '99)*/
+};
+
+
+/* atom types*/
+
+enum {
+ kIDHDeviceListAtomType = FOUR_CHAR_CODE('dlst'),
+ kIDHDeviceAtomType = FOUR_CHAR_CODE('devc'), /* to be defined elsewhere*/
+ kIDHIsochServiceAtomType = FOUR_CHAR_CODE('isoc'),
+ kIDHIsochModeAtomType = FOUR_CHAR_CODE('mode'),
+ kIDHDeviceIDType = FOUR_CHAR_CODE('dvid'),
+ kIDHDefaultIOType = FOUR_CHAR_CODE('dfio'),
+ kIDHIsochVersionAtomType = FOUR_CHAR_CODE('iver'),
+ kIDHUniqueIDType = FOUR_CHAR_CODE('unid'),
+ kIDHNameAtomType = FOUR_CHAR_CODE('name'),
+ kIDHUseCMPAtomType = FOUR_CHAR_CODE('ucmp'),
+ kIDHIsochMediaType = FOUR_CHAR_CODE('av '),
+ kIDHDataTypeAtomType = FOUR_CHAR_CODE('dtyp'),
+ kIDHDataSizeAtomType = FOUR_CHAR_CODE('dsiz'), /* ??? packet size vs. buffer size*/
+ kIDHDataBufferSizeAtomType = FOUR_CHAR_CODE('dbuf'), /* ??? packet size vs. buffer size*/
+ kIDHDataIntervalAtomType = FOUR_CHAR_CODE('intv'),
+ kIDHDataIODirectionAtomType = FOUR_CHAR_CODE('ddir'),
+ kIDHSoundMediaAtomType = FOUR_CHAR_CODE('soun'),
+ kIDHSoundTypeAtomType = FOUR_CHAR_CODE('type'),
+ kIDHSoundChannelCountAtomType = FOUR_CHAR_CODE('ccnt'),
+ kIDHSoundSampleSizeAtomType = FOUR_CHAR_CODE('ssiz'),
+ kIDHSoundSampleRateAtomType = FOUR_CHAR_CODE('srat'), /* same as video out... (what does this comment mean?)*/
+ kIDHVideoMediaAtomType = FOUR_CHAR_CODE('vide'),
+ kIDHVideoDimensionsAtomType = FOUR_CHAR_CODE('dimn'),
+ kIDHVideoResolutionAtomType = FOUR_CHAR_CODE('resl'),
+ kIDHVideoRefreshRateAtomType = FOUR_CHAR_CODE('refr'),
+ kIDHVideoPixelTypeAtomType = FOUR_CHAR_CODE('pixl'),
+ kIDHVideoDecompressorAtomType = FOUR_CHAR_CODE('deco'),
+ kIDHVideoDecompressorTypeAtomType = FOUR_CHAR_CODE('dety'),
+ kIDHVideoDecompressorContinuousAtomType = FOUR_CHAR_CODE('cont'),
+ kIDHVideoDecompressorComponentAtomType = FOUR_CHAR_CODE('cmpt')
+};
+
+/* I/O Flags */
+enum {
+ kIDHDataTypeIsInput = 1L << 0,
+ kIDHDataTypeIsOutput = 1L << 1,
+ kIDHDataTypeIsInputAndOutput = 1L << 2
+};
+
+
+/* Permission Flags */
+enum {
+ kIDHOpenForReadTransactions = 1L << 0,
+ kIDHOpenForWriteTransactions = 1L << 1,
+ kIDHOpenWithExclusiveAccess = 1L << 2,
+ kIDHOpenWithHeldBuffers = 1L << 3, /* IDH will hold buffer until ReleaseBuffer()*/
+ kIDHCloseForReadTransactions = 1L << 4,
+ kIDHCloseForWriteTransactions = 1L << 5
+};
+
+
+/*
+ Errors
+ These REALLY need to be moved into Errors.h
+ ooo.needs officially assigned numbers
+*/
+enum {
+ kIDHErrDeviceDisconnected = -14101,
+ kIDHErrInvalidDeviceID = -14102,
+ kIDHErrDeviceInUse = -14104,
+ kIDHErrDeviceNotOpened = -14105,
+ kIDHErrDeviceBusy = -14106,
+ kIDHErrDeviceReadError = -14107,
+ kIDHErrDeviceWriteError = -14108,
+ kIDHErrDeviceNotConfigured = -14109,
+ kIDHErrDeviceList = -14110,
+ kIDHErrCompletionPending = -14111,
+ kIDHErrDeviceTimeout = -14112,
+ kIDHErrInvalidIndex = -14113,
+ kIDHErrDeviceCantRead = -14114,
+ kIDHErrDeviceCantWrite = -14115,
+ kIDHErrCallNotSupported = -14116
+};
+
+
+
+
+/* Holds Device Identification...*/
+typedef UInt32 IDHDeviceID;
+enum {
+ kIDHInvalidDeviceID = 0,
+ kIDHDeviceIDEveryDevice = (long)0xFFFFFFFF
+};
+
+/* Values for 5 bit STYPE part of CIP header*/
+enum {
+ kIDHDV_SD = 0,
+ kIDHDV_SDL = 1,
+ kIDHDV_HD = 2,
+ kIDHDVCPro_25 = 0x1E
+};
+
+/* Isoch Interval Atom Data*/
+
+struct IDHIsochInterval {
+ SInt32 duration;
+ TimeScale scale;
+};
+typedef struct IDHIsochInterval IDHIsochInterval;
+/* Need to fix this. For now, cast this as a FWReferenceID*/
+typedef struct OpaquePsuedoID* PsuedoID;
+/*
+ Isoch Device Status
+ This is atom-like, but isn't an atom
+*/
+
+struct IDHDeviceStatus {
+ UInt32 version;
+ Boolean physicallyConnected;
+ Boolean readEnabled;
+ Boolean writeEnabled;
+ Boolean exclusiveAccess;
+ UInt32 currentBandwidth;
+ UInt32 currentChannel;
+ PsuedoID localNodeID; /*ooo.may go in atoms */
+ SInt16 inputStandard; /* One of the QT input standards*/
+ Boolean deviceActive;
+ UInt8 inputFormat; /* Expected STYPE of data from device, if version >= 0x200*/
+ UInt32 outputFormats; /* Bitmask for supported STYPE values, if version >= 0x200*/
+};
+typedef struct IDHDeviceStatus IDHDeviceStatus;
+/*
+ Isochronous Data Handler Events
+
+*/
+
+typedef UInt32 IDHEvent;
+enum {
+ kIDHEventInvalid = 0,
+ kIDHEventDeviceAdded = 1L << 0, /* A new device has been added to the bus*/
+ kIDHEventDeviceRemoved = 1L << 1, /* A device has been removed from the bus*/
+ kIDHEventDeviceChanged = 1L << 2, /* Some device has changed state on the bus*/
+ kIDHEventReadEnabled = 1L << 3, /* A client has enabled a device for read*/
+ kIDHEventReserved1 = 1L << 4, /* Reserved for future use*/
+ kIDHEventReadDisabled = 1L << 5, /* A client has disabled a device from read*/
+ kIDHEventWriteEnabled = 1L << 6, /* A client has enabled a device for write*/
+ kIDHEventReserved2 = 1L << 7, /* Reserved for future use*/
+ kIDHEventWriteDisabled = 1L << 8, /* A client has disabled a device for write*/
+ kIDHEventEveryEvent = (unsigned long)0xFFFFFFFF
+};
+
+
+typedef UInt32 IDHNotificationID;
+
+struct IDHEventHeader {
+ IDHDeviceID deviceID; /* Device which generated event*/
+ IDHNotificationID notificationID;
+ IDHEvent event; /* What the event is*/
+};
+typedef struct IDHEventHeader IDHEventHeader;
+
+
+
+/*
+ IDHGenericEvent
+ An IDH will often have to post events from at interrupt time. Since memory
+ allocation cannot occur from the interrupt handler, the IDH can preallocate
+ storage needed for handling the event by creating some IDHGenericEvent items.
+ Subsequently, when an event is generated, the type of event (specified in the
+ IDHEventHeader) will dictate how the IDHGenericEvent should be interpretted.
+
+ IMPORTANT NOTE : This means that a specific event structure can NEVER be greater
+ than the size of the generic one.
+
+*/
+
+struct IDHGenericEvent {
+ IDHEventHeader eventHeader;
+ UInt32 pad[4];
+};
+typedef struct IDHGenericEvent IDHGenericEvent;
+/*
+ IDHDeviceConnectionEvent
+ For kIDHEventDeviceAdded or kIDHEventDeviceRemoved events.
+*/
+
+struct IDHDeviceConnectionEvent {
+ IDHEventHeader eventHeader;
+};
+typedef struct IDHDeviceConnectionEvent IDHDeviceConnectionEvent;
+/*
+ IDHDeviceIOEnableEvent
+ For kIDHEventReadEnabled, kIDHEventReadDisabled, kIDHEventWriteEnabled, or
+ kIDHEventWriteDisabled.
+*/
+
+struct IDHDeviceIOEnableEvent {
+ IDHEventHeader eventHeader;
+};
+typedef struct IDHDeviceIOEnableEvent IDHDeviceIOEnableEvent;
+typedef CALLBACK_API_C( OSStatus , IDHNotificationProcPtr )(IDHGenericEvent *event, void *userData);
+
+typedef IDHNotificationProcPtr IDHNotificationProc;
+typedef TVECTOR_UPP_TYPE(IDHNotificationProcPtr) IDHNotificationUPP;
+
+struct IDHParameterBlock {
+ UInt32 reserved1;
+ UInt16 reserved2;
+ void * buffer;
+ ByteCount requestedCount;
+ ByteCount actualCount;
+ IDHNotificationUPP completionProc;
+ void * refCon;
+ OSErr result;
+};
+typedef struct IDHParameterBlock IDHParameterBlock;
+
+struct IDHResolution {
+ UInt32 x;
+ UInt32 y;
+};
+typedef struct IDHResolution IDHResolution;
+
+struct IDHDimension {
+ Fixed x;
+ Fixed y;
+};
+typedef struct IDHDimension IDHDimension;
+
+EXTERN_API( ComponentResult )
+IDHGetDeviceList (ComponentInstance idh,
+ QTAtomContainer * deviceList) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0001, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+IDHGetDeviceConfiguration (ComponentInstance idh,
+ QTAtomSpec * configurationID) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0002, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+IDHSetDeviceConfiguration (ComponentInstance idh,
+ const QTAtomSpec * configurationID) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0003, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+IDHGetDeviceStatus (ComponentInstance idh,
+ const QTAtomSpec * configurationID,
+ IDHDeviceStatus * status) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0004, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+IDHGetDeviceClock (ComponentInstance idh,
+ Component * clock) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0005, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+IDHOpenDevice (ComponentInstance idh,
+ UInt32 permissions) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0006, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+IDHCloseDevice (ComponentInstance idh) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0007, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+IDHRead (ComponentInstance idh,
+ IDHParameterBlock * pb) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0008, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+IDHWrite (ComponentInstance idh,
+ IDHParameterBlock * pb) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0009, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+IDHNewNotification (ComponentInstance idh,
+ IDHDeviceID deviceID,
+ IDHNotificationUPP notificationProc,
+ void * userData,
+ IDHNotificationID * notificationID) FIVEWORDINLINE(0x2F3C, 0x0010, 0x000A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+IDHNotifyMeWhen (ComponentInstance idh,
+ IDHNotificationID notificationID,
+ IDHEvent events) FIVEWORDINLINE(0x2F3C, 0x0008, 0x000B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+IDHCancelNotification (ComponentInstance idh,
+ IDHNotificationID notificationID) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+IDHDisposeNotification (ComponentInstance idh,
+ IDHNotificationID notificationID) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+IDHReleaseBuffer (ComponentInstance idh,
+ IDHParameterBlock * pb) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+IDHCancelPendingIO (ComponentInstance idh,
+ IDHParameterBlock * pb) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+IDHGetDeviceControl (ComponentInstance idh,
+ ComponentInstance * deviceControl) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0010, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+IDHUpdateDeviceList (ComponentInstance idh,
+ QTAtomContainer * deviceList) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0011, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+IDHGetDeviceTime (ComponentInstance idh,
+ TimeRecord * deviceTime) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0012, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+IDHSetFormat (ComponentInstance idh,
+ UInt32 format) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0013, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+IDHGetFormat (ComponentInstance idh,
+ UInt32 * format) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0014, 0x7000, 0xA82A);
+
+
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(IDHNotificationUPP)
+ NewIDHNotificationUPP (IDHNotificationProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeIDHNotificationUPP (IDHNotificationUPP userUPP);
+
+ EXTERN_API(OSStatus)
+ InvokeIDHNotificationUPP (IDHGenericEvent * event,
+ void * userData,
+ IDHNotificationUPP userUPP);
+
+#else
+ #define NewIDHNotificationUPP(userRoutine) (userRoutine)
+ #define DisposeIDHNotificationUPP(userUPP)
+ #define InvokeIDHNotificationUPP(event, userData, userUPP) (*userUPP)(event, userData)
+#endif
+
+/* selectors for component calls */
+enum {
+ kIDHGetDeviceListSelect = 0x0001,
+ kIDHGetDeviceConfigurationSelect = 0x0002,
+ kIDHSetDeviceConfigurationSelect = 0x0003,
+ kIDHGetDeviceStatusSelect = 0x0004,
+ kIDHGetDeviceClockSelect = 0x0005,
+ kIDHOpenDeviceSelect = 0x0006,
+ kIDHCloseDeviceSelect = 0x0007,
+ kIDHReadSelect = 0x0008,
+ kIDHWriteSelect = 0x0009,
+ kIDHNewNotificationSelect = 0x000A,
+ kIDHNotifyMeWhenSelect = 0x000B,
+ kIDHCancelNotificationSelect = 0x000C,
+ kIDHDisposeNotificationSelect = 0x000D,
+ kIDHReleaseBufferSelect = 0x000E,
+ kIDHCancelPendingIOSelect = 0x000F,
+ kIDHGetDeviceControlSelect = 0x0010,
+ kIDHUpdateDeviceListSelect = 0x0011,
+ kIDHGetDeviceTimeSelect = 0x0012,
+ kIDHSetFormatSelect = 0x0013,
+ kIDHGetFormatSelect = 0x0014
+};
+
+
+#endif /* ifndef __ISOCHRONOUSDATAHANDLER_R__ */
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __ISOCHRONOUSDATAHANDLER__ */
+
diff --git a/include/qt/JManager.h b/include/qt/JManager.h
new file mode 100644
index 000000000..94a6e1485
--- /dev/null
+++ b/include/qt/JManager.h
@@ -0,0 +1,1312 @@
+/*
+ File: JManager.h
+
+ Contains: Routines that can be used to invoke the Java Virtual Machine in MRJ
+
+ Version: Technology: MRJ 2.1
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1996-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __JMANAGER__
+#define __JMANAGER__
+
+/*
+ * Note: If you want to use any JManger routines which use JNI or JRI functionality,
+ * you must #include "jni.h" or <jri.h> before this file.
+ *
+ */
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+#ifndef __DRAG__
+#include "Drag.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#ifndef __MENUS__
+#include "Menus.h"
+#endif
+
+#ifndef __TEXTCOMMON__
+#include "TextCommon.h"
+#endif
+
+#ifndef __CODEFRAGMENTS__
+#include "CodeFragments.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __JMANAGER__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __JMANAGER__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+enum {
+ kJMVersion = 0x11800007, /* using Sun's 1.1.8 APIs, our rev 7 APIs. */
+ kDefaultJMTime = 0x00000400 /* how much time to give the JM library on "empty" events, in milliseconds. */
+};
+
+enum {
+ kJMVersionError = -60000L,
+ kJMExceptionOccurred = -60001L,
+ kJMBadClassPathError = -60002L
+};
+
+/*
+ * Special codes for JMFrameKey, JMFrameKeyRelease:
+ *
+ * When your app notices that a modifiers is pressed (must be done by polling,
+ * unless Mac OS changes to support sending modifiers as events)
+ * you should notify the runtime using JMFrameKey, JMFrameKeyRelease, using
+ * these constants for asciiChar and keyCode. This will allow the AWT to
+ * synthesize the appropriate events
+ */
+enum {
+ kModifierAsciiChar = 0,
+ kModifierKeyCode = 0
+};
+
+/*
+ * Private data structures
+ *
+ * JMClientData - enough bits to reliably store a pointer to arbitrary, client-specific data.
+ * JMSessionRef - references the entire java runtime
+ * JMTextRef - a Text string, length, and encoding
+ * JMTextEncoding - which encoding to use when converting in and out of Java strings.
+ * JMFrameRef - a java frame
+ * JMAWTContextRef - a context for the AWT to request frames, process events
+ * JMAppletLocatorRef - a device for locating, fetching, and parsing URLs that may contain applets
+ * JMAppletViewerRef - an object that displays applets in a Frame
+ * JMAppletPageRef - a way to group JMAWTContextRef's so they share the same class loader
+ */
+typedef void * JMClientData;
+typedef struct OpaqueJMSessionRef* JMSessionRef;
+typedef struct OpaqueJMFrameRef* JMFrameRef;
+typedef struct OpaqueJMTextRef* JMTextRef;
+typedef struct OpaqueJMAWTContextRef* JMAWTContextRef;
+typedef struct OpaqueJMAppletLocatorRef* JMAppletLocatorRef;
+typedef struct OpaqueJMAppletViewerRef* JMAppletViewerRef;
+typedef struct OpaqueJMAppletPageRef* JMAppletPageRef;
+typedef TextEncoding JMTextEncoding;
+
+/*
+ * The runtime requires certain callbacks be used to communicate between
+ * session events and the embedding application.
+ *
+ * In general, you can pass nil as a callback and a "good" default will be used.
+ *
+ * JMConsoleProcPtr - redirect stderr or stdout - the message is delivered in the encoding specified when
+ * you created the session, or possibly binary data.
+ * JMConsoleReadProcPtr - take input from the user from a console or file. The input is expected to
+ * be in the encoding specified when you opened the session.
+ * JMExitProcPtr - called via System.exit(int), return "true" to kill the current thread,
+ * false, to cause a 'QUIT' AppleEvent to be sent to the current process,
+ * or just tear down the runtime and exit to shell immediately
+ * JMLowMemoryProcPtr - This callback is available to notify the embedding application that
+ * a low memory situation has occurred so it can attempt to recover appropriately.
+ * JMAuthenicateURLProcPtr - prompt the user for autentication based on the URL. If you pass
+ * nil, JManager will prompt the user. Return false if the user pressed cancel.
+ */
+typedef CALLBACK_API_C( void , JMConsoleProcPtr )(JMSessionRef session, const void *message, SInt32 messageLengthInBytes);
+typedef CALLBACK_API_C( SInt32 , JMConsoleReadProcPtr )(JMSessionRef session, void *buffer, SInt32 maxBufferLength);
+typedef CALLBACK_API_C( Boolean , JMExitProcPtr )(JMSessionRef session, SInt32 status);
+typedef CALLBACK_API_C( Boolean , JMAuthenticateURLProcPtr )(JMSessionRef session, const char *url, const char *realm, char userName[255], char password[255])/* into C string parameters */;
+typedef CALLBACK_API_C( void , JMLowMemoryProcPtr )(JMSessionRef session);
+
+struct JMSessionCallbacks {
+ UInt32 fVersion; /* should be set to kJMVersion */
+ JMConsoleProcPtr fStandardOutput; /* JM will route "stdout" to this function. */
+ JMConsoleProcPtr fStandardError; /* JM will route "stderr" to this function. */
+ JMConsoleReadProcPtr fStandardIn; /* read from console - can be nil for default behavior (no console IO) */
+ JMExitProcPtr fExitProc; /* handle System.exit(int) requests */
+ JMAuthenticateURLProcPtr fAuthenticateProc; /* present basic authentication dialog */
+ JMLowMemoryProcPtr fLowMemProc; /* Low Memory notification Proc */
+};
+typedef struct JMSessionCallbacks JMSessionCallbacks;
+
+enum JMVerifierOptions {
+ eDontCheckCode = 0,
+ eCheckRemoteCode = 1,
+ eCheckAllCode = 2
+};
+typedef enum JMVerifierOptions JMVerifierOptions;
+
+
+/*
+ * JMRuntimeOptions is a mask that allows you to specify certain attributes
+ * for the runtime. Bitwise or the fields together, or use one of the "premade" entries.
+ * eJManager2Defaults is the factory default, and best bet to use.
+ */
+
+enum JMRuntimeOptions {
+ eJManager2Defaults = 0,
+ eUseAppHeapOnly = (1 << 0),
+ eDisableJITC = (1 << 1),
+ eEnableDebugger = (1 << 2),
+ eDisableInternetConfig = (1 << 3),
+ eInhibitClassUnloading = (1 << 4),
+ eEnableProfiling = (1 << 5),
+ eJManager1Compatible = (eDisableInternetConfig | eInhibitClassUnloading)
+};
+typedef enum JMRuntimeOptions JMRuntimeOptions;
+
+
+
+
+/*
+ * Returns the version of the currently installed JManager library.
+ * Compare to kJMVersion. This is the only call that doesn't
+ * require a session, or a reference to something that references
+ * a session.
+ */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( unsigned long )
+JMGetVersion (void);
+
+/*
+ * Returns the version number of the MRJ installation. This is an
+ * official version number that will change for each official release
+ * of MRJ, whereas for an incremental MRJ release, the version number
+ * returned by JMGetVersion may not change.
+ */
+EXTERN_API_C( UInt32 )
+JMGetMRJRuntimeVersion (void);
+
+/*
+ * JMOpenSession creates a new Java Runtime. Note that JManger 2.0 doesn't set
+ * security options at the time of runtime instantiation. AppletViewer Objecs have
+ * seperate security attributes bound to them, and the verifier is availiable elsewhere
+ * as well. The client data parameter lets a client associate an arbitgrary tagged pointer
+ * with the seession.
+ * When you create the session, you must specify the desired Text Encoding to use for
+ * console IO. Usually, its OK to use "kTextEncodingMacRoman". See TextCommon.h for the list.
+ */
+EXTERN_API_C( OSStatus )
+JMOpenSession (JMSessionRef * session,
+ JMRuntimeOptions runtimeOptions,
+ JMVerifierOptions verifyMode,
+ const JMSessionCallbacks * callbacks,
+ JMTextEncoding desiredEncoding,
+ JMClientData data);
+
+EXTERN_API_C( OSStatus )
+JMCloseSession (JMSessionRef session);
+
+
+/*
+ * Client data getter/setter functions.
+ */
+EXTERN_API_C( OSStatus )
+JMGetSessionData (JMSessionRef session,
+ JMClientData * data);
+
+EXTERN_API_C( OSStatus )
+JMSetSessionData (JMSessionRef session,
+ JMClientData data);
+
+
+/*
+ * Prepend the target of the FSSpec to the class path.
+ * If a file, .zip or other known archive file - not a .class file
+ */
+EXTERN_API_C( OSStatus )
+JMAddToClassPath (JMSessionRef session,
+ const FSSpec * spec);
+
+
+/*
+ * Utility returns (client owned) null terminated handle containing "file://xxxx", or nil if fnfErr
+ */
+EXTERN_API_C( Handle )
+JMFSSToURL (JMSessionRef session,
+ const FSSpec * spec);
+
+
+/*
+ * Turns "file:///disk/file" into an FSSpec. other handlers return paramErr
+ */
+EXTERN_API_C( OSStatus )
+JMURLToFSS (JMSessionRef session,
+ JMTextRef urlString,
+ FSSpec * spec);
+
+
+/*
+ * JMIdle gives time to all Java threads. Giving more time makes Java programs run faster,
+ * but can reduce overall system responsiveness. JMIdle will return sooner if low-level (user)
+ * events appear in the event queue.
+ */
+EXTERN_API_C( OSStatus )
+JMIdle (JMSessionRef session,
+ UInt32 jmTimeMillis);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+/*
+ * JMGetCurrenvEnv gives access to the underlying JRI interface, if available.
+ * This gives the client more control over the underlying Java runtime, without
+ * exposing the implementation too much.
+ * NOTE: JRI is deprecated; please upgrade your code to work with JNI instead.
+ */
+#ifdef JRI_H
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( JRIRuntimeInstance *)
+JMGetJRIRuntimeInstance (JMSessionRef session);
+
+EXTERN_API_C( JRIEnv *)
+JMGetCurrentJRIEnv (JMSessionRef session);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* defined(JRI_H) */
+
+/*
+ * JNI is to be preferred.
+ */
+#ifdef JNI_H
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( JNIEnv *)
+JMGetCurrentEnv (JMSessionRef session);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* defined(JNI_H) */
+
+/*
+ * Since JManager calls reutrn jref (JRI Java references)
+ * you need to convert between them and JNI references (jobjects) if you're
+ * using JNI. These routines facilitate that conversion.
+ */
+#if defined(JRI_H) && defined(JNI_H)
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( jobject )
+JMJRIRefToJNIObject (JMSessionRef session,
+ JNIEnv * env,
+ jref jriRef);
+
+EXTERN_API_C( jref )
+JMJNIObjectToJRIRef (JMSessionRef session,
+ JNIEnv * env,
+ jobject jniObject);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* defined(JRI_H) && defined(JNI_H) */
+
+/*
+ * Java defines system-wide properties that applets can use to make queries about the
+ * host system. Many of these properties correspond to defaults provided by "Internet Config."
+ * JMPutSessionProperty can be used by a client program to modify various system-wide properties.
+ */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+JMGetSessionProperty (JMSessionRef session,
+ JMTextRef propertyName,
+ JMTextRef * propertyValue);
+
+EXTERN_API_C( OSStatus )
+JMPutSessionProperty (JMSessionRef session,
+ JMTextRef propertyName,
+ JMTextRef propertyValue);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+/*
+ * Returns a com.apple.mrj.JManager.JMSession object
+ */
+#ifdef JNI_H
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( jobject )
+JMGetSessionJNIObject (JMSessionRef session,
+ JNIEnv * env);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* defined(JNI_H) */
+
+#ifdef JRI_H
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( jref )
+JMGetSessionObject (JMSessionRef session);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* defined(JRI_H) */
+
+/*
+ * JMText: opaque object that encapsulates a string, length, and
+ * character encoding. Strings passed between JManager and the
+ * embedding application goes through this interface. Only the most
+ * rudimentary conversion routines are supplied - it is expected that
+ * the embedding application will most of its work in the System Script.
+ *
+ * These APIs present some questions about who actually owns the
+ * JMText. The rule is, if you created a JMTextRef, you are responsible
+ * for deleting it after passing it into the runtime. If the runtime passes
+ * one to you, it will be deleted after the callback.
+ *
+ * If a pointer to an uninitialised JMTextRef is passed in to a routine (eg JMGetSessionProperty),
+ * it is assumed to have been created for the caller, and it is the callers responsibility to
+ * dispose of it.
+ *
+ * The encoding types are taken verbatim from the Text Encoding Converter,
+ * which handles the ugly backside of script conversion.
+ */
+/*
+ * JMNewTextRef can create from a buffer of data in the specified encoding
+ */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+JMNewTextRef (JMSessionRef session,
+ JMTextRef * textRef,
+ JMTextEncoding encoding,
+ const void * charBuffer,
+ UInt32 bufferLengthInBytes);
+
+
+/*
+ * JMCopyTextRef clones a text ref.
+ */
+EXTERN_API_C( OSStatus )
+JMCopyTextRef (JMTextRef textRefSrc,
+ JMTextRef * textRefDst);
+
+
+/*
+ * Disposes of a text ref passed back from the runtime, or created explicitly through JMNewTextRef
+ */
+EXTERN_API_C( OSStatus )
+JMDisposeTextRef (JMTextRef textRef);
+
+
+/*
+ * Returns the text length, in characters
+ */
+EXTERN_API_C( OSStatus )
+JMGetTextLength (JMTextRef textRef,
+ UInt32 * textLengthInCharacters);
+
+
+/*
+ * Returns the text length, in number of bytes taken in the destination encoding
+ */
+EXTERN_API_C( OSStatus )
+JMGetTextLengthInBytes (JMTextRef textRef,
+ JMTextEncoding dstEncoding,
+ UInt32 * textLengthInBytes);
+
+
+/*
+ * Copies the specified number of characters to the destination buffer with the appropriate
+ * destination encoding.
+ */
+EXTERN_API_C( OSStatus )
+JMGetTextBytes (JMTextRef textRef,
+ JMTextEncoding dstEncoding,
+ void * textBuffer,
+ UInt32 textBufferLength,
+ UInt32 * numCharsCopied);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+/*
+ * Return the JMText as a reference to a Java String. Note that
+ * this is the only reference to the string - it will be collected if you don't
+ * hang on to it.
+ */
+#ifdef JNI_H
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( jstring )
+JMTextToJNIJavaString (JMTextRef textRef,
+ JMSessionRef session,
+ JNIEnv * env);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* defined(JNI_H) */
+
+#ifdef JRI_H
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( jref )
+JMTextToJavaString (JMTextRef textRef);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* defined(JRI_H) */
+
+/*
+ * Returns a Handle to a null terminated, "C" string in the System Script.
+ * Note that using this routine could result in data loss, if the characters
+ * are not availiable in the System Script.
+ */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( Handle )
+JMTextToMacOSCStringHandle (JMTextRef textRef);
+
+
+
+
+/*
+ * Proxy properties in the runtime.
+ *
+ * These will only be checked if InternetConfig isn't used to specify properties,
+ * or if it doesn't have the data for these.
+ */
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct JMProxyInfo {
+ Boolean useProxy;
+ char proxyHost[255];
+ UInt16 proxyPort;
+};
+typedef struct JMProxyInfo JMProxyInfo;
+
+enum JMProxyType {
+ eHTTPProxy = 0,
+ eFirewallProxy = 1,
+ eFTPProxy = 2
+};
+typedef enum JMProxyType JMProxyType;
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+JMGetProxyInfo (JMSessionRef session,
+ JMProxyType proxyType,
+ JMProxyInfo * proxyInfo);
+
+EXTERN_API_C( OSStatus )
+JMSetProxyInfo (JMSessionRef session,
+ JMProxyType proxyType,
+ const JMProxyInfo * proxyInfo);
+
+
+/*
+ * Security - JManager 2.0 security is handled on a per-applet basis.
+ * There are some security settings that are inherited from InternetConfig
+ * (Proxy Servers) but the verifier can now be enabled and disabled.
+ */
+EXTERN_API_C( OSStatus )
+JMGetVerifyMode (JMSessionRef session,
+ JMVerifierOptions * verifierOptions);
+
+EXTERN_API_C( OSStatus )
+JMSetVerifyMode (JMSessionRef session,
+ JMVerifierOptions verifierOptions);
+
+
+
+
+/*
+ * The basic unit of AWT interaction is the JMFrame. A JMFrame is bound to top level
+ * awt Frame, Window, or Dialog. When a user event occurs for a MacOS window, the event is passed
+ * to the corrosponding frame object. Similarly, when an AWT event occurs that requires the
+ * Mac OS Window to change, a callback is made. JManager 1.x bound the frame to the window through
+ * a callback to set and restore the windows GrafPort. In JManager 2.0, a GrafPort, Offset, and
+ * ClipRgn are specified up front - changes in visibility and structure require that these be re-set.
+ * This enables support for the JavaSoft DrawingSurface API - and also improves graphics performance.
+ * You should reset the graphics attributes anytime the visiblity changes, like when scrolling.
+ * You should also set it initially when the AWTContext requests the frame.
+ * At various times, JM will call back to the client to register a new JMFrame,
+ * indicating the frame type. The client should take the following steps:
+ *
+ * o Create a new invisible window of the specified type
+ * o Fill in the callbacks parameter with function pointers
+ * o Do something to bind the frame to the window (like stuff the WindowPtr in the JMClientData of the frame)
+ * o Register the visiblity parameters (GrafPtr, etc) with the frame
+ */
+#endif /* CALL_NOT_IN_CARBON */
+
+
+enum ReorderRequest {
+ eBringToFront = 0, /* bring the window to front */
+ eSendToBack = 1, /* send the window to back */
+ eSendBehindFront = 2 /* send the window behind the front window */
+};
+typedef enum ReorderRequest ReorderRequest;
+
+typedef CALLBACK_API_C( void , JMSetFrameSizeProcPtr )(JMFrameRef frame, const Rect *newBounds);
+typedef CALLBACK_API_C( void , JMFrameInvalRectProcPtr )(JMFrameRef frame, const Rect *r);
+typedef CALLBACK_API_C( void , JMFrameShowHideProcPtr )(JMFrameRef frame, Boolean showFrameRequested);
+typedef CALLBACK_API_C( void , JMSetTitleProcPtr )(JMFrameRef frame, JMTextRef title);
+typedef CALLBACK_API_C( void , JMCheckUpdateProcPtr )(JMFrameRef frame);
+typedef CALLBACK_API_C( void , JMReorderFrame )(JMFrameRef frame, ReorderRequest theRequest);
+typedef CALLBACK_API_C( void , JMSetResizeable )(JMFrameRef frame, Boolean resizeable);
+typedef CALLBACK_API_C( void , JMGetFrameInsets )(JMFrameRef frame, Rect *insets);
+/*
+ * New in JManager 2.1:
+ * If the AWT needs to set focus to a frame (in the case of multiple JMFrames within
+ * a single Mac OS Frame) it will call back to the embedding application using
+ * JMRRequestFocus. The application should then defocus what it thought did have the
+ * focus, and set the focus to the new frame.
+ * If the user is tabbing within a JMFrame, and the focus reaches the last focusable
+ * component (or the first, if focus is traversing backwards) JMNexetFocus will be called.
+ * The application should defocus the component that requests this, and focus the next application
+ * visible focusable element. (If none, send focus back to the frame.)
+ */
+typedef CALLBACK_API_C( void , JMNextFocus )(JMFrameRef frame, Boolean forward);
+typedef CALLBACK_API_C( void , JMRequestFocus )(JMFrameRef frame);
+
+struct JMFrameCallbacks {
+ UInt32 fVersion; /* should be set to kJMVersion */
+ JMSetFrameSizeProcPtr fSetFrameSize;
+ JMFrameInvalRectProcPtr fInvalRect;
+ JMFrameShowHideProcPtr fShowHide;
+ JMSetTitleProcPtr fSetTitle;
+ JMCheckUpdateProcPtr fCheckUpdate;
+ JMReorderFrame fReorderFrame;
+ JMSetResizeable fSetResizeable;
+ JMGetFrameInsets fGetInsets;
+ JMNextFocus fNextFocus;
+ JMRequestFocus fRequestFocus;
+};
+typedef struct JMFrameCallbacks JMFrameCallbacks;
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+JMSetFrameVisibility (JMFrameRef frame,
+ GrafPtr famePort,
+ Point frameOrigin,
+ RgnHandle frameClip);
+
+EXTERN_API_C( OSStatus )
+JMGetFrameData (JMFrameRef frame,
+ JMClientData * data);
+
+EXTERN_API_C( OSStatus )
+JMSetFrameData (JMFrameRef frame,
+ JMClientData data);
+
+EXTERN_API_C( OSStatus )
+JMGetFrameSize (JMFrameRef frame,
+ Rect * result);
+
+/* note that the top left indicates the "global" position of this frame */
+/* use this to update the frame position when it gets moved */
+EXTERN_API_C( OSStatus )
+JMSetFrameSize (JMFrameRef frame,
+ const Rect * newSize);
+
+/*
+ * Dispatch a particular event to an embedded frame
+ */
+EXTERN_API_C( OSStatus )
+JMFrameClickWithEventRecord (JMFrameRef frame,
+ Point localPos,
+ const EventRecord * event);
+
+EXTERN_API_C( OSStatus )
+JMFrameKey (JMFrameRef frame,
+ char asciiChar,
+ char keyCode,
+ short modifiers);
+
+EXTERN_API_C( OSStatus )
+JMFrameKeyRelease (JMFrameRef frame,
+ char asciiChar,
+ char keyCode,
+ short modifiers);
+
+EXTERN_API_C( OSStatus )
+JMFrameUpdate (JMFrameRef frame,
+ RgnHandle updateRgn);
+
+EXTERN_API_C( OSStatus )
+JMFrameActivate (JMFrameRef frame,
+ Boolean activate);
+
+EXTERN_API_C( OSStatus )
+JMFrameResume (JMFrameRef frame,
+ Boolean resume);
+
+EXTERN_API_C( OSStatus )
+JMFrameMouseOver (JMFrameRef frame,
+ Point localPos,
+ short modifiers);
+
+EXTERN_API_C( OSStatus )
+JMFrameShowHide (JMFrameRef frame,
+ Boolean showFrame);
+
+EXTERN_API_C( OSStatus )
+JMFrameGoAway (JMFrameRef frame);
+
+EXTERN_API_C( JMAWTContextRef )
+JMGetFrameContext (JMFrameRef frame);
+
+EXTERN_API_C( OSStatus )
+JMFrameDragTracking (JMFrameRef frame,
+ DragTrackingMessage message,
+ DragReference theDragRef);
+
+EXTERN_API_C( OSStatus )
+JMFrameDragReceive (JMFrameRef frame,
+ DragReference theDragRef);
+
+/*
+ * JMFrameClick is deprecated - please use JMFrameClickWithEventRecord instead.
+ */
+EXTERN_API_C( OSStatus )
+JMFrameClick (JMFrameRef frame,
+ Point localPos,
+ short modifiers);
+
+/*
+ * If you may have multiple JMFrames in a single Mac OS Window (for example,
+ * in a browser) then use JMFrameFocus to control when you believe the
+ * frame should logically contain the focus. This will allow for the correct
+ * appearance of Controls and Text Fields. If you will only have one
+ * JMFrame per Mac OS Window, use JMFrameFocus as well as JMFrameActivate to
+ * control hiliting.
+ */
+EXTERN_API_C( OSStatus )
+JMFrameFocus (JMFrameRef frame,
+ Boolean gotFocus);
+
+/*
+ * Cause a Frame and its contents to be rendered in a GrafPort.
+ * This is typically going to be used to cause an applet to print itself
+ * into a PrGrafPort.
+ * If you pass 'true' as the last parameter, the paint(Graphics) method of the
+ * frame is called, rather than print(Graphics).
+ */
+EXTERN_API_C( OSStatus )
+JMDrawFrameInPort (JMFrameRef frame,
+ GrafPtr framePort,
+ Point frameOrigin,
+ RgnHandle clipRgn,
+ Boolean callPaintAsOpposedToPrint);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+/*
+ * returns the java.awt.Frame for this frame
+*/
+#ifdef JNI_H
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( jobject )
+JMGetAWTFrameJNIObject (JMFrameRef frame,
+ JNIEnv * env);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* defined(JNI_H) */
+
+#ifdef JRI_H
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( jref )
+JMGetAWTFrameObject (JMFrameRef frame);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* defined(JRI_H) */
+
+/*
+ * returns the com.apple.mrj.JManager.JMFrame for this frame
+ */
+#ifdef JNI_H
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( jobject )
+JMGetJMFrameJNIObject (JMFrameRef frame,
+ JNIEnv * env);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* defined(JNI_H) */
+
+#ifdef JRI_H
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( jref )
+JMGetJMFrameObject (JMFrameRef frame);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* defined(JRI_H) */
+
+/*
+ * Window types
+ */
+
+enum JMFrameKind {
+ eBorderlessModelessWindowFrame = 0,
+ eModelessWindowFrame = 1,
+ eModalWindowFrame = 2,
+ eModelessDialogFrame = 3
+};
+typedef enum JMFrameKind JMFrameKind;
+
+
+/* JMAppletPageRef -
+ * Creating a "page" is optional.
+ * Applets will share the same class loader (and thus static variables) iff
+ * they are share the same JMAppletPageRef and have the same codebase.
+ */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+JMNewAppletPage (JMAppletPageRef * page,
+ JMSessionRef session);
+
+EXTERN_API_C( OSStatus )
+JMDisposeAppletPage (JMAppletPageRef page);
+
+
+
+/* JMAWTContext -
+ * To create a top level frame, you must use a JMAWTContext object.
+ * The JMAWTContext provides a context for the AWT to request frames.
+ * A AWTContext has a threadgroup associated with it - all events and processing occurs
+ * there. When you create one, it is quiescent, you must call resume before it begins executing.
+ */
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API_C( OSStatus , JMRequestFrameProcPtr )(JMAWTContextRef context, JMFrameRef newFrame, JMFrameKind kind, const Rect *initialBounds, Boolean resizeable, JMFrameCallbacks *callbacks);
+typedef CALLBACK_API_C( OSStatus , JMReleaseFrameProcPtr )(JMAWTContextRef context, JMFrameRef oldFrame);
+typedef CALLBACK_API_C( SInt16 , JMUniqueMenuIDProcPtr )(JMAWTContextRef context, Boolean isSubmenu);
+typedef CALLBACK_API_C( void , JMExceptionOccurredProcPtr )(JMAWTContextRef context, JMTextRef exceptionName, JMTextRef exceptionMsg, JMTextRef stackTrace);
+
+struct JMAWTContextCallbacks {
+ UInt32 fVersion; /* should be set to kJMVersion */
+ JMRequestFrameProcPtr fRequestFrame; /* a new frame is being created. */
+ JMReleaseFrameProcPtr fReleaseFrame; /* an existing frame is being destroyed. */
+ JMUniqueMenuIDProcPtr fUniqueMenuID; /* a new menu will be created with this id. */
+ JMExceptionOccurredProcPtr fExceptionOccurred; /* just some notification that some recent operation caused an exception. You can't do anything really from here. */
+};
+typedef struct JMAWTContextCallbacks JMAWTContextCallbacks;
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+JMNewAWTContext (JMAWTContextRef * context,
+ JMSessionRef session,
+ const JMAWTContextCallbacks * callbacks,
+ JMClientData data);
+
+EXTERN_API_C( OSStatus )
+JMNewAWTContextInPage (JMAWTContextRef * context,
+ JMSessionRef session,
+ JMAppletPageRef page,
+ const JMAWTContextCallbacks * callbacks,
+ JMClientData data);
+
+EXTERN_API_C( OSStatus )
+JMDisposeAWTContext (JMAWTContextRef context);
+
+EXTERN_API_C( OSStatus )
+JMGetAWTContextData (JMAWTContextRef context,
+ JMClientData * data);
+
+EXTERN_API_C( OSStatus )
+JMSetAWTContextData (JMAWTContextRef context,
+ JMClientData data);
+
+EXTERN_API_C( OSStatus )
+JMCountAWTContextFrames (JMAWTContextRef context,
+ UInt32 * frameCount);
+
+EXTERN_API_C( OSStatus )
+JMGetAWTContextFrame (JMAWTContextRef context,
+ UInt32 frameIndex,
+ JMFrameRef * frame);
+
+/*
+ * Starting in MRJ 2.1, JMMenuSelected is deprecated. Please use JMMenuSelectedWithModifiers instead.
+ */
+EXTERN_API_C( OSStatus )
+JMMenuSelected (JMAWTContextRef context,
+ MenuHandle hMenu,
+ short menuItem);
+
+/*
+ * Starting in MRJ 2.1, this call takes an additional 'modifiers' parameter that you can get
+ * from your event record.
+ */
+EXTERN_API_C( OSStatus )
+JMMenuSelectedWithModifiers (JMAWTContextRef context,
+ MenuHandle hMenu,
+ short menuItem,
+ short modifiers);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#ifdef JRI_H
+/*
+ * JRI Access APIs
+ */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+JMExecMethodInContext (JMAWTContextRef context,
+ jref objref,
+ JRIMethodID methodID,
+ UInt32 argCount,
+ JRIValue args[]);
+
+EXTERN_API_C( OSStatus )
+JMExecStaticMethodInContext (JMAWTContextRef context,
+ JRIClassID classID,
+ JRIMethodID methodID,
+ UInt32 argCount,
+ JRIValue args[]);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* defined(JRI_H) */
+
+#ifdef JNI_H
+/*
+ * JNI Access APIs
+ * Note that you must pass the JNIEnv to these as well.
+ */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+JMExecJNIMethodInContext (JMAWTContextRef context,
+ JNIEnv * env,
+ jobject objref,
+ jmethodID methodID,
+ UInt32 argCount,
+ jvalue args[]);
+
+EXTERN_API_C( OSStatus )
+JMExecJNIStaticMethodInContext (JMAWTContextRef context,
+ JNIEnv * env,
+ jclass classID,
+ jmethodID methodID,
+ UInt32 argCount,
+ jvalue args[]);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* defined(JNI_H) */
+
+/*
+ * return a com.apple.mrj.JManager.JMAWTContext
+ */
+#ifdef JNI_H
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( jobject )
+JMGetAwtContextJNIObject (JMAWTContextRef context,
+ JNIEnv * env);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* defined(JNI_H) */
+
+#ifdef JRI_H
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( jref )
+JMGetAwtContextObject (JMAWTContextRef context);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* defined(JRI_H) */
+
+#ifdef JNI_H
+/*
+ * Beginning in 2.1, this function maps a JNIEnv to the owning AWTContext, if one exists
+ */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( JMAWTContextRef )
+JMJNIToAWTContext (JMSessionRef session,
+ JNIEnv * env);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* defined(JNI_H) */
+
+
+
+/*
+ * JMAppletLocator - Since Java applets are always referenced by a Uniform Resource Locator
+ * (see RFC 1737, http://www.w3.org/pub/WWW/Addressing/rfc1738.txt), we provide an object
+ * that encapsulates the information about a set of applets. A JMAppletLocator is built
+ * by providing a base URL, which must point at a valid HTML document containing applet
+ * tags. To save a network transaction, the contents of the document may be passed optionally.
+ *
+ * You can also use a JMLocatorInfoBlock for a synchronous resolution of the applet,
+ * assuming that you already have the info for the tag.
+ */
+
+enum JMLocatorErrors {
+ eLocatorNoErr = 0, /* the html was retrieved successfully*/
+ eHostNotFound = 1, /* the host specified by the url could not be found*/
+ eFileNotFound = 2, /* the file could not be found on the host*/
+ eLocatorTimeout = 3, /* a timeout occurred retrieving the html text*/
+ eLocatorKilled = 4 /* in response to a JMDisposeAppletLocator before it has completed*/
+};
+typedef enum JMLocatorErrors JMLocatorErrors;
+
+typedef CALLBACK_API_C( void , JMFetchCompleted )(JMAppletLocatorRef ref, JMLocatorErrors status);
+
+struct JMAppletLocatorCallbacks {
+ UInt32 fVersion; /* should be set to kJMVersion */
+ JMFetchCompleted fCompleted; /* called when the html has been completely fetched */
+};
+typedef struct JMAppletLocatorCallbacks JMAppletLocatorCallbacks;
+/*
+ * These structures are used to pass pre-parsed parameter
+ * tags to the AppletLocator. Implies synchronous semantics.
+ */
+
+
+struct JMLIBOptionalParams {
+ JMTextRef fParamName; /* could be from a <parameter name=foo value=bar> or "zipbase", etc */
+ JMTextRef fParamValue; /* the value of this optional tag */
+};
+typedef struct JMLIBOptionalParams JMLIBOptionalParams;
+
+struct JMLocatorInfoBlock {
+ UInt32 fVersion; /* should be set to kJMVersion */
+
+ /* These are required to be present and not nil */
+
+ JMTextRef fBaseURL; /* the URL of this applet's host page */
+ JMTextRef fAppletCode; /* code= parameter */
+ short fWidth; /* width= parameter */
+ short fHeight; /* height= parameter */
+
+
+ /* These are optional parameters */
+ SInt32 fOptionalParameterCount; /* how many in this array */
+ JMLIBOptionalParams * fParams; /* pointer to an array of these (points to first element) */
+};
+typedef struct JMLocatorInfoBlock JMLocatorInfoBlock;
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+JMNewAppletLocator (JMAppletLocatorRef * locatorRef,
+ JMSessionRef session,
+ const JMAppletLocatorCallbacks * callbacks,
+ JMTextRef url,
+ JMTextRef htmlText,
+ JMClientData data);
+
+EXTERN_API_C( OSStatus )
+JMNewAppletLocatorFromInfo (JMAppletLocatorRef * locatorRef,
+ JMSessionRef session,
+ const JMLocatorInfoBlock * info,
+ JMClientData data);
+
+EXTERN_API_C( OSStatus )
+JMDisposeAppletLocator (JMAppletLocatorRef locatorRef);
+
+EXTERN_API_C( OSStatus )
+JMGetAppletLocatorData (JMAppletLocatorRef locatorRef,
+ JMClientData * data);
+
+EXTERN_API_C( OSStatus )
+JMSetAppletLocatorData (JMAppletLocatorRef locatorRef,
+ JMClientData data);
+
+EXTERN_API_C( OSStatus )
+JMCountApplets (JMAppletLocatorRef locatorRef,
+ UInt32 * appletCount);
+
+EXTERN_API_C( OSStatus )
+JMGetAppletDimensions (JMAppletLocatorRef locatorRef,
+ UInt32 appletIndex,
+ UInt32 * width,
+ UInt32 * height);
+
+EXTERN_API_C( OSStatus )
+JMGetAppletTag (JMAppletLocatorRef locatorRef,
+ UInt32 appletIndex,
+ JMTextRef * tagRef);
+
+EXTERN_API_C( OSStatus )
+JMGetAppletName (JMAppletLocatorRef locatorRef,
+ UInt32 appletIndex,
+ JMTextRef * nameRef);
+
+
+/*
+ * JMAppletViewer - Applets are instantiated, one by one, by specifying a JMAppletLocator and
+ * a zero-based index (Macintosh API's usually use one-based indexing, the Java language
+ * uses zero, however.). The resulting applet is encapsulated in a JMAppletViewer object.
+ * Since applets can have one or more visible areas to draw in, one or more JMFrame objects
+ * may be requested while the viewer is being created, or at a later time, thus the client
+ * must provide callbacks to satisfy these requests.
+ *
+ * The window name for the ShowDocument callback is one of:
+ * _self show in current frame
+ * _parent show in parent frame
+ * _top show in top-most frame
+ * _blank show in new unnamed top-level window
+ * <other> show in new top-level window named <other>
+ */
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API_C( void , JMShowDocumentProcPtr )(JMAppletViewerRef viewer, JMTextRef urlString, JMTextRef windowName);
+typedef CALLBACK_API_C( void , JMSetStatusMsgProcPtr )(JMAppletViewerRef viewer, JMTextRef statusMsg);
+
+struct JMAppletViewerCallbacks {
+ UInt32 fVersion; /* should be set to kJMVersion */
+ JMShowDocumentProcPtr fShowDocument; /* go to a url, optionally in a new window */
+ JMSetStatusMsgProcPtr fSetStatusMsg; /* applet changed status message */
+};
+typedef struct JMAppletViewerCallbacks JMAppletViewerCallbacks;
+/*
+ * NEW: per-applet security settings
+ * Previously, these settings were attached to the session.
+ * JManager 2.0 allows them to be attached to each viewer.
+ */
+
+enum JMNetworkSecurityOptions {
+ eNoNetworkAccess = 0,
+ eAppletHostAccess = 1,
+ eUnrestrictedAccess = 2
+};
+typedef enum JMNetworkSecurityOptions JMNetworkSecurityOptions;
+
+
+enum JMFileSystemOptions {
+ eNoFSAccess = 0,
+ eLocalAppletAccess = 1,
+ eAllFSAccess = 2
+};
+typedef enum JMFileSystemOptions JMFileSystemOptions;
+
+/*
+ * Lists of packages are comma separated,
+ * the default for mrj.security.system.access is
+ * "sun,netscape,com.apple".
+ */
+
+
+struct JMAppletSecurity {
+ UInt32 fVersion; /* should be set to kJMVersion */
+ JMNetworkSecurityOptions fNetworkSecurity; /* can this applet access network resources */
+ JMFileSystemOptions fFileSystemSecurity; /* can this applet access network resources */
+
+ Boolean fRestrictSystemAccess; /* restrict access to system packages (com.apple.*, sun.*, netscape.*) also found in the property "mrj.security.system.access" */
+ Boolean fRestrictSystemDefine; /* restrict classes from loading system packages (com.apple.*, sun.*, netscape.*) also found in the property "mrj.security.system.define" */
+
+ Boolean fRestrictApplicationAccess; /* restrict access to application packages found in the property "mrj.security.application.access" */
+ Boolean fRestrictApplicationDefine; /* restrict access to application packages found in the property "mrj.security.application.access" */
+};
+typedef struct JMAppletSecurity JMAppletSecurity;
+/*
+ * AppletViewer methods
+ */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+JMNewAppletViewer (JMAppletViewerRef * viewer,
+ JMAWTContextRef context,
+ JMAppletLocatorRef locatorRef,
+ UInt32 appletIndex,
+ const JMAppletSecurity * security,
+ const JMAppletViewerCallbacks * callbacks,
+ JMClientData data);
+
+EXTERN_API_C( OSStatus )
+JMDisposeAppletViewer (JMAppletViewerRef viewer);
+
+EXTERN_API_C( OSStatus )
+JMGetAppletViewerData (JMAppletViewerRef viewer,
+ JMClientData * data);
+
+EXTERN_API_C( OSStatus )
+JMSetAppletViewerData (JMAppletViewerRef viewer,
+ JMClientData data);
+
+
+/*
+ * You can change the applet security on the fly
+ */
+EXTERN_API_C( OSStatus )
+JMGetAppletViewerSecurity (JMAppletViewerRef viewer,
+ JMAppletSecurity * data);
+
+EXTERN_API_C( OSStatus )
+JMSetAppletViewerSecurity (JMAppletViewerRef viewer,
+ const JMAppletSecurity * data);
+
+
+/*
+ * JMReloadApplet reloads viewer's applet from the source.
+ * JMRestartApplet reinstantiates the applet without reloading.
+ */
+EXTERN_API_C( OSStatus )
+JMReloadApplet (JMAppletViewerRef viewer);
+
+EXTERN_API_C( OSStatus )
+JMRestartApplet (JMAppletViewerRef viewer);
+
+
+/*
+ * JMSuspendApplet tells the Java thread scheduler to stop executing the viewer's applet.
+ * JMResumeApplet resumes execution of the viewer's applet.
+ */
+EXTERN_API_C( OSStatus )
+JMSuspendApplet (JMAppletViewerRef viewer);
+
+EXTERN_API_C( OSStatus )
+JMResumeApplet (JMAppletViewerRef viewer);
+
+
+/*
+ * To get back to the JMAppletViewerRef instance from whence a frame came,
+ * as well as the ultimate frame parent (the one created _for_ the applet viewer)
+ */
+EXTERN_API_C( OSStatus )
+JMGetFrameViewer (JMFrameRef frame,
+ JMAppletViewerRef * viewer,
+ JMFrameRef * parentFrame);
+
+/*
+ * To get a ref back to the Frame that was created for this JMAppletViewerRef
+ */
+EXTERN_API_C( OSStatus )
+JMGetViewerFrame (JMAppletViewerRef viewer,
+ JMFrameRef * frame);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+/*
+ * To get the ref of the com.apple.mrj.JManager.JMAppletViewer java object
+ */
+#ifdef JNI_H
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( jobject )
+JMGetAppletViewerJNIObject (JMAppletViewerRef viewer,
+ JNIEnv * env);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* defined(JNI_H) */
+
+#ifdef JRI_H
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( jref )
+JMGetAppletViewerObject (JMAppletViewerRef viewer);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* defined(JRI_H) */
+
+/*
+ * To get the ref of the java.applet.Applet itself
+ */
+#ifdef JNI_H
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( jobject )
+JMGetAppletJNIObject (JMAppletViewerRef viewer,
+ JNIEnv * env);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* defined(JNI_H) */
+
+#ifdef JRI_H
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( jref )
+JMGetAppletObject (JMAppletViewerRef viewer);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* defined(JRI_H) */
+
+/*
+ * Tell MRJ to add connID to its list of shared libraries used when searching for
+ * JNI (and JRI) native methods. This is useful for overriding or redirecting
+ * a java call to System.loadLibrary(). In particular System.loadLibrary()
+ * does not reuse CFM connections to libraries already open by someone outside
+ * of the java session. It always forces its own private copy of a shared library
+ * to be opened. This can result in multiple instances of the data/TOC section
+ * of a shared library.
+ * Note: This function has no effect on JDirect based native methods.
+ * If connID exports a function named "JNI_OnLoad", it is immediately called.
+ * If javaShouldClose is true, MRJ will close the connection when the session is closed.
+ * Returns false and does nothing if a library with that name is already registered.
+ */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( Boolean )
+JMRegisterLibrary (JMSessionRef session,
+ ConstStr63Param libraryName,
+ CFragConnectionID connID,
+ Boolean javaShouldClose);
+
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __JMANAGER__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__JMANAGER__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __JMANAGER__ */
+
diff --git a/include/qt/Kernel.h b/include/qt/Kernel.h
new file mode 100644
index 000000000..40ccead44
--- /dev/null
+++ b/include/qt/Kernel.h
@@ -0,0 +1,30 @@
+/*
+ File: Kernel.h
+
+ Contains: Kernel Interfaces
+
+ Version: Technology: System 8
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __KERNEL__
+#define __KERNEL__
+
+#ifndef __DRIVERSERVICES__
+#include "DriverServices.h"
+#endif
+
+
+/*
+ The contents of Kernel.h has been merged into DriverServices.h
+*/
+
+#endif /* __KERNEL__ */
+
diff --git a/include/qt/LanguageAnalysis.h b/include/qt/LanguageAnalysis.h
new file mode 100644
index 000000000..77068af58
--- /dev/null
+++ b/include/qt/LanguageAnalysis.h
@@ -0,0 +1,454 @@
+/*
+ File: LanguageAnalysis.h
+
+ Contains: Language Analysis Manager Interfaces
+
+ Version: Technology: Mac OS 8
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1996-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __LANGUAGEANALYSIS__
+#define __LANGUAGEANALYSIS__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+#ifndef __AEREGISTRY__
+#include "AERegistry.h"
+#endif
+
+#ifndef __DICTIONARY__
+#include "Dictionary.h"
+#endif
+
+#ifndef __TEXTCOMMON__
+#include "TextCommon.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+typedef struct OpaqueLAEnvironmentRef* LAEnvironmentRef;
+typedef struct OpaqueLAContextRef* LAContextRef;
+typedef AEKeyword LAPropertyKey;
+typedef DescType LAPropertyType;
+/*
+ Data structure for high level API
+*/
+
+struct LAMorphemeRec {
+ ByteCount sourceTextLength;
+ LogicalAddress sourceTextPtr;
+ ByteCount morphemeTextLength;
+ LogicalAddress morphemeTextPtr;
+ UInt32 partOfSpeech;
+};
+typedef struct LAMorphemeRec LAMorphemeRec;
+
+struct LAMorphemesArray {
+ ItemCount morphemesCount;
+ ByteCount processedTextLength;
+ ByteCount morphemesTextLength;
+ LAMorphemeRec morphemes[1];
+};
+typedef struct LAMorphemesArray LAMorphemesArray;
+typedef LAMorphemesArray * LAMorphemesArrayPtr;
+enum {
+ kLAMorphemesArrayVersion = 0
+};
+
+/*
+ Definitions for result path/bundle structure
+*/
+
+typedef AERecord LAMorphemeBundle;
+typedef AERecord LAMorphemePath;
+typedef AERecord LAMorpheme;
+typedef AERecord LAHomograph;
+enum {
+ keyAELAMorphemeBundle = FOUR_CHAR_CODE('lmfb'),
+ keyAELAMorphemePath = FOUR_CHAR_CODE('lmfp'),
+ keyAELAMorpheme = FOUR_CHAR_CODE('lmfn'),
+ keyAELAHomograph = FOUR_CHAR_CODE('lmfh')
+};
+
+enum {
+ typeLAMorphemeBundle = typeAERecord,
+ typeLAMorphemePath = typeAERecord,
+ typeLAMorpheme = typeAEList,
+ typeLAHomograph = typeAEList
+};
+
+/*
+ Definitions for morpheme/homograph information
+*/
+enum {
+ keyAEMorphemePartOfSpeechCode = FOUR_CHAR_CODE('lamc'),
+ keyAEMorphemeTextRange = FOUR_CHAR_CODE('lamt')
+};
+
+enum {
+ typeAEMorphemePartOfSpeechCode = FOUR_CHAR_CODE('lamc'),
+ typeAEMorphemeTextRange = FOUR_CHAR_CODE('lamt')
+};
+
+typedef UInt32 MorphemePartOfSpeech;
+
+struct MorphemeTextRange {
+ UInt32 sourceOffset;
+ UInt32 length;
+};
+typedef struct MorphemeTextRange MorphemeTextRange;
+/*
+ Mask for High level API convert flags
+*/
+enum {
+ kLAEndOfSourceTextMask = 0x00000001
+};
+
+/*
+ Constants for leading/trailing path of analysis function
+*/
+enum {
+ kLADefaultEdge = 0,
+ kLAFreeEdge = 1,
+ kLAIncompleteEdge = 2
+};
+
+/*
+ Constants for confirm and shift function
+*/
+enum {
+ kLAAllMorphemes = 0
+};
+
+
+/*
+ Library version
+*/
+EXTERN_API( UInt32 )
+LALibraryVersion (void);
+
+/*
+ High level API
+*/
+EXTERN_API( OSStatus )
+LATextToMorphemes (LAContextRef context,
+ TextEncoding preferedEncoding,
+ ByteCount textLength,
+ ConstLogicalAddress sourceText,
+ ByteCount bufferSize,
+ OptionBits convertFlags,
+ UInt32 structureVersion,
+ ByteCount * acceptedLength,
+ LAMorphemesArrayPtr resultBuffer);
+
+/*
+ Handling Context
+*/
+EXTERN_API( OSStatus )
+LAOpenAnalysisContext (LAEnvironmentRef environ,
+ LAContextRef * context);
+
+EXTERN_API( OSStatus )
+LACloseAnalysisContext (LAContextRef context);
+
+/*
+ Handling Environment
+*/
+EXTERN_API( OSStatus )
+LAGetEnvironmentList (UInt32 maxCount,
+ UInt32 * actualCount,
+ LAEnvironmentRef environmentList[]);
+
+EXTERN_API( OSStatus )
+LAGetEnvironmentName (LAEnvironmentRef environment,
+ Str63 environmentName);
+
+EXTERN_API( OSStatus )
+LAGetEnvironmentRef (ConstStr63Param targetEnvironmentName,
+ LAEnvironmentRef * environment);
+
+EXTERN_API( OSStatus )
+LACreateCustomEnvironment (LAEnvironmentRef baseEnvironment,
+ ConstStr63Param newEnvironmentName,
+ Boolean persistent,
+ LAEnvironmentRef * newEnvironment);
+
+EXTERN_API( OSStatus )
+LADeleteCustomEnvironment (LAEnvironmentRef environment);
+
+/*
+ Handling dictionries
+*/
+EXTERN_API( OSStatus )
+LAOpenDictionary (LAEnvironmentRef environ,
+ const FSSpec * dictionary);
+
+EXTERN_API( OSStatus )
+LACloseDictionary (LAEnvironmentRef environ,
+ const FSSpec * dictionary);
+
+EXTERN_API( OSStatus )
+LAListAvailableDictionaries (LAEnvironmentRef environ,
+ ItemCount maxCount,
+ ItemCount * actualCount,
+ FSSpec dictionaryList[],
+ Boolean opened[]);
+
+EXTERN_API( OSStatus )
+LAAddNewWord (LAEnvironmentRef environ,
+ const FSSpec * dictionary,
+ const AEDesc * dataList);
+
+/*
+ Analyzing text
+*/
+EXTERN_API( OSStatus )
+LAMorphemeAnalysis (LAContextRef context,
+ ConstUniCharArrayPtr text,
+ UniCharCount textLength,
+ LAMorphemePath * leadingPath,
+ LAMorphemePath * trailingPath,
+ ItemCount pathCount,
+ LAMorphemeBundle * result);
+
+EXTERN_API( OSStatus )
+LAContinuousMorphemeAnalysis (LAContextRef context,
+ ConstUniCharArrayPtr text,
+ UniCharCount textLength,
+ Boolean incrementalText,
+ LAMorphemePath * leadingPath,
+ LAMorphemePath * trailingPath,
+ Boolean * modified);
+
+EXTERN_API( OSStatus )
+LAGetMorphemes (LAContextRef context,
+ LAMorphemePath * result);
+
+EXTERN_API( OSStatus )
+LAShiftMorphemes (LAContextRef context,
+ ItemCount morphemeCount,
+ LAMorphemePath * path,
+ UniCharCount * shiftedLength);
+
+EXTERN_API( OSStatus )
+LAResetAnalysis (LAContextRef context);
+
+/*
+ Check Language Analysis Manager availability
+*/
+#if TARGET_RT_MAC_CFM
+#ifdef __cplusplus
+ inline pascal Boolean LALanguageAnalysisAvailable() { return (LALibraryVersion != (void*)kUnresolvedCFragSymbolAddress); }
+#else
+ #define LALanguageAnalysisAvailable() ((LALibraryVersion != (void*)kUnresolvedCFragSymbolAddress)
+#endif
+#elif TARGET_RT_MAC_MACHO
+/* Language Analysis Manager is always available on OS X */
+#ifdef __cplusplus
+ inline pascal Boolean LALanguageAnalysisAvailable() { return true; }
+#else
+ #define LALanguageAnalysisAvailable() (true)
+#endif
+#endif /* */
+
+/*
+=============================================================================================
+ Definitions for Japanese Analysis Module
+=============================================================================================
+*/
+/*
+ Names for default environments for Japanese analysis
+*/
+#define kLAJapaneseKanaKanjiEnvironment "\pKanaKanjiConversion"
+#define kLAJapaneseMorphemeAnalysisEnvironment "\pJapaneseMorphemeAnalysis"
+#define kLAJapaneseTTSEnvironment "\pJapaneseTextToSpeech"
+/*
+ File cretor for dictionary of Apple Japanese access method
+*/
+enum {
+ kAppleJapaneseDictionarySignature = FOUR_CHAR_CODE('jlan')
+};
+
+/*
+ Engine limitations
+*/
+enum {
+ kMaxInputLengthOfAppleJapaneseEngine = 200
+};
+
+/*
+ Definitions of information in the path/bundle
+*/
+
+typedef MorphemePartOfSpeech JapanesePartOfSpeech;
+typedef UInt16 HomographWeight;
+typedef UInt8 HomographAccent;
+/*
+ AE keywords and type definitions for morpheme/homograph information
+*/
+enum {
+ keyAEHomographDicInfo = FOUR_CHAR_CODE('lahd'),
+ keyAEHomographWeight = FOUR_CHAR_CODE('lahw'),
+ keyAEHomographAccent = FOUR_CHAR_CODE('laha')
+};
+
+enum {
+ typeAEHomographDicInfo = FOUR_CHAR_CODE('lahd'),
+ typeAEHomographWeight = typeShortInteger,
+ typeAEHomographAccent = FOUR_CHAR_CODE('laha')
+};
+
+/*
+ Structure for dictionary information of homograph
+*/
+
+struct HomographDicInfoRec {
+ DCMDictionaryID dictionaryID;
+ DCMUniqueID uniqueID;
+};
+typedef struct HomographDicInfoRec HomographDicInfoRec;
+/*
+=============================================================================================
+ Definitions for Japanese part of speeches
+=============================================================================================
+*/
+/*
+ Masks for part of speeches
+*/
+enum {
+ kLASpeechRoughClassMask = 0x0000F000,
+ kLASpeechMediumClassMask = 0x0000FF00,
+ kLASpeechStrictClassMask = 0x0000FFF0,
+ kLASpeechKatsuyouMask = 0x0000000F
+};
+
+
+/*
+ Part of speeches
+*/
+enum {
+ kLASpeechMeishi = 0x00000000, /* noun */
+ kLASpeechFutsuuMeishi = 0x00000000, /* general noun */
+ kLASpeechJinmei = 0x00000100, /* person name */
+ kLASpeechJinmeiSei = 0x00000110, /* family name */
+ kLASpeechJinmeiMei = 0x00000120, /* first name */
+ kLASpeechChimei = 0x00000200, /* place name */
+ kLASpeechSetsubiChimei = 0x00000210, /* place name with suffix */
+ kLASpeechSoshikimei = 0x00000300, /* organization name */
+ kLASpeechKoyuuMeishi = 0x00000400, /* proper noun */
+ kLASpeechSahenMeishi = 0x00000500, /* special noun */
+ kLASpeechKeidouMeishi = 0x00000600, /* special noun */
+ kLASpeechRentaishi = 0x00001000,
+ kLASpeechFukushi = 0x00002000, /* adverb */
+ kLASpeechSetsuzokushi = 0x00003000, /* conjunction */
+ kLASpeechKandoushi = 0x00004000,
+ kLASpeechDoushi = 0x00005000, /* verb */
+ kLASpeechGodanDoushi = 0x00005000,
+ kLASpeechKagyouGodan = 0x00005000,
+ kLASpeechSagyouGodan = 0x00005010,
+ kLASpeechTagyouGodan = 0x00005020,
+ kLASpeechNagyouGodan = 0x00005030,
+ kLASpeechMagyouGodan = 0x00005040,
+ kLASpeechRagyouGodan = 0x00005050,
+ kLASpeechWagyouGodan = 0x00005060,
+ kLASpeechGagyouGodan = 0x00005070,
+ kLASpeechBagyouGodan = 0x00005080,
+ kLASpeechIchidanDoushi = 0x00005100,
+ kLASpeechKahenDoushi = 0x00005200,
+ kLASpeechSahenDoushi = 0x00005300,
+ kLASpeechZahenDoushi = 0x00005400,
+ kLASpeechKeiyoushi = 0x00006000, /* adjective */
+ kLASpeechKeiyoudoushi = 0x00007000,
+ kLASpeechSettougo = 0x00008000, /* prefix*/
+ kLASpeechSuujiSettougo = 0x00008100, /* prefix for numbers */
+ kLASpeechSetsubigo = 0x00009000, /* suffix */
+ kLASpeechJinmeiSetsubigo = 0x00009100, /* suffix for person name */
+ kLASpeechChimeiSetsubigo = 0x00009200, /* suffix for place name */
+ kLASpeechSoshikimeiSetsubigo = 0x00009300, /* suffix for organization name */
+ kLASpeechSuujiSetsubigo = 0x00009400, /* suffix for numbers */
+ kLASpeechMuhinshi = 0x0000A000, /* no category */
+ kLASpeechTankanji = 0x0000A000, /* character */
+ kLASpeechKigou = 0x0000A100, /* symbol */
+ kLASpeechKuten = 0x0000A110,
+ kLASpeechTouten = 0x0000A120,
+ kLASpeechSuushi = 0x0000A200, /* numbers */
+ kLASpeechDokuritsugo = 0x0000A300,
+ kLASpeechSeiku = 0x0000A400,
+ kLASpeechJodoushi = 0x0000B000, /* auxiliary verb */
+ kLASpeechJoshi = 0x0000C000 /* postpositional particle */
+};
+
+
+/*
+ Conjugations
+ */
+enum {
+ kLASpeechKatsuyouGokan = 0x00000001, /* stem */
+ kLASpeechKatsuyouMizen = 0x00000002,
+ kLASpeechKatsuyouRenyou = 0x00000003,
+ kLASpeechKatsuyouSyuushi = 0x00000004,
+ kLASpeechKatsuyouRentai = 0x00000005,
+ kLASpeechKatsuyouKatei = 0x00000006,
+ kLASpeechKatsuyouMeirei = 0x00000007
+};
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __LANGUAGEANALYSIS__ */
+
diff --git a/include/qt/Lists.h b/include/qt/Lists.h
new file mode 100644
index 000000000..315944fe6
--- /dev/null
+++ b/include/qt/Lists.h
@@ -0,0 +1,650 @@
+/*
+ File: Lists.h
+
+ Contains: List Manager Interfaces.
+
+ Version: Technology: Mac OS 8
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __LISTS__
+#define __LISTS__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __CONTROLS__
+#include "Controls.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+typedef Point Cell;
+typedef Rect ListBounds;
+typedef char DataArray[32001];
+typedef char * DataPtr;
+typedef DataPtr * DataHandle;
+typedef CALLBACK_API( short , ListSearchProcPtr )(Ptr aPtr, Ptr bPtr, short aLen, short bLen);
+typedef CALLBACK_API( Boolean , ListClickLoopProcPtr )(void );
+/*
+ WARNING: ListClickLoopProcPtr uses register based parameters under classic 68k
+ and cannot be written in a high-level language without
+ the help of mixed mode or assembly glue.
+*/
+typedef STACK_UPP_TYPE(ListSearchProcPtr) ListSearchUPP;
+typedef REGISTER_UPP_TYPE(ListClickLoopProcPtr) ListClickLoopUPP;
+#if !TARGET_OS_MAC
+/* QuickTime 3.0 */
+typedef long ListNotification;
+enum {
+ listNotifyNothing = FOUR_CHAR_CODE('nada'), /* No (null) notification*/
+ listNotifyClick = FOUR_CHAR_CODE('clik'), /* Control was clicked*/
+ listNotifyDoubleClick = FOUR_CHAR_CODE('dblc'), /* Control was double-clicked*/
+ listNotifyPreClick = FOUR_CHAR_CODE('pclk') /* Control about to be clicked*/
+};
+
+#endif /* !TARGET_OS_MAC */
+
+
+struct ListRec {
+ Rect rView;
+ GrafPtr port;
+ Point indent;
+ Point cellSize;
+ ListBounds visible;
+ ControlHandle vScroll;
+ ControlHandle hScroll;
+ SInt8 selFlags;
+ Boolean lActive;
+ SInt8 lReserved;
+ SInt8 listFlags;
+ long clikTime;
+ Point clikLoc;
+ Point mouseLoc;
+ ListClickLoopUPP lClickLoop;
+ Cell lastClick;
+ long refCon;
+ Handle listDefProc;
+ Handle userHandle;
+ ListBounds dataBounds;
+ DataHandle cells;
+ short maxIndex;
+ short cellArray[1];
+};
+typedef struct ListRec ListRec;
+
+typedef ListRec * ListPtr;
+typedef ListPtr * ListHandle;
+/* ListRef is obsolete. Use ListHandle. */
+typedef ListHandle ListRef;
+
+
+enum {
+ /* ListRec.listFlags bits*/
+ lDoVAutoscrollBit = 1,
+ lDoHAutoscrollBit = 0
+};
+
+enum {
+ /* ListRec.listFlags masks*/
+ lDoVAutoscroll = 2,
+ lDoHAutoscroll = 1
+};
+
+
+enum {
+ /* ListRec.selFlags bits*/
+ lOnlyOneBit = 7,
+ lExtendDragBit = 6,
+ lNoDisjointBit = 5,
+ lNoExtendBit = 4,
+ lNoRectBit = 3,
+ lUseSenseBit = 2,
+ lNoNilHiliteBit = 1
+};
+
+
+enum {
+ /* ListRec.selFlags masks*/
+ lOnlyOne = -128,
+ lExtendDrag = 64,
+ lNoDisjoint = 32,
+ lNoExtend = 16,
+ lNoRect = 8,
+ lUseSense = 4,
+ lNoNilHilite = 2
+};
+
+
+enum {
+ /* LDEF messages*/
+ lInitMsg = 0,
+ lDrawMsg = 1,
+ lHiliteMsg = 2,
+ lCloseMsg = 3
+};
+
+
+
+
+typedef CALLBACK_API( void , ListDefProcPtr )(short lMessage, Boolean lSelect, Rect *lRect, Cell lCell, short lDataOffset, short lDataLen, ListHandle lHandle);
+typedef STACK_UPP_TYPE(ListDefProcPtr) ListDefUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(ListSearchUPP)
+ NewListSearchUPP (ListSearchProcPtr userRoutine);
+
+ EXTERN_API(ListClickLoopUPP)
+ NewListClickLoopUPP (ListClickLoopProcPtr userRoutine);
+
+ EXTERN_API(ListDefUPP)
+ NewListDefUPP (ListDefProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeListSearchUPP (ListSearchUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeListClickLoopUPP (ListClickLoopUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeListDefUPP (ListDefUPP userUPP);
+
+ EXTERN_API(short)
+ InvokeListSearchUPP (Ptr aPtr,
+ Ptr bPtr,
+ short aLen,
+ short bLen,
+ ListSearchUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeListClickLoopUPP (ListClickLoopUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeListDefUPP (short lMessage,
+ Boolean lSelect,
+ Rect * lRect,
+ Cell lCell,
+ short lDataOffset,
+ short lDataLen,
+ ListHandle lHandle,
+ ListDefUPP userUPP);
+
+#else
+ enum { uppListSearchProcInfo = 0x00002BE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 2_bytes, 2_bytes) */
+ enum { uppListClickLoopProcInfo = 0x00000012 }; /* register 1_byte:D0 Func() */
+ enum { uppListDefProcInfo = 0x000EBD80 }; /* pascal no_return_value Func(2_bytes, 1_byte, 4_bytes, 4_bytes, 2_bytes, 2_bytes, 4_bytes) */
+ #define NewListSearchUPP(userRoutine) (ListSearchUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppListSearchProcInfo, GetCurrentArchitecture())
+ #define NewListClickLoopUPP(userRoutine) (ListClickLoopUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppListClickLoopProcInfo, GetCurrentArchitecture())
+ #define NewListDefUPP(userRoutine) (ListDefUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppListDefProcInfo, GetCurrentArchitecture())
+ #define DisposeListSearchUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeListClickLoopUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeListDefUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeListSearchUPP(aPtr, bPtr, aLen, bLen, userUPP) (short)CALL_FOUR_PARAMETER_UPP((userUPP), uppListSearchProcInfo, (aPtr), (bPtr), (aLen), (bLen))
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 InvokeListClickLoopUPP(__A0)
+ Boolean InvokeListClickLoopUPP(ListClickLoopUPP userUPP) = 0x4E90;
+ #else
+ #define InvokeListClickLoopUPP(userUPP) (Boolean)CALL_ZERO_PARAMETER_UPP((userUPP), uppListClickLoopProcInfo)
+ #endif
+ #define InvokeListDefUPP(lMessage, lSelect, lRect, lCell, lDataOffset, lDataLen, lHandle, userUPP) CALL_SEVEN_PARAMETER_UPP((userUPP), uppListDefProcInfo, (lMessage), (lSelect), (lRect), (lCell), (lDataOffset), (lDataLen), (lHandle))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewListSearchProc(userRoutine) NewListSearchUPP(userRoutine)
+#define NewListClickLoopProc(userRoutine) NewListClickLoopUPP(userRoutine)
+#define NewListDefProc(userRoutine) NewListDefUPP(userRoutine)
+#define CallListSearchProc(userRoutine, aPtr, bPtr, aLen, bLen) InvokeListSearchUPP(aPtr, bPtr, aLen, bLen, userRoutine)
+#define CallListClickLoopProc(userRoutine) InvokeListClickLoopUPP(userRoutine)
+#define CallListDefProc(userRoutine, lMessage, lSelect, lRect, lCell, lDataOffset, lDataLen, lHandle) InvokeListDefUPP(lMessage, lSelect, lRect, lCell, lDataOffset, lDataLen, lHandle, userRoutine)
+enum {
+ kListDefUserProcType = 0,
+ kListDefStandardTextType = 1,
+ kListDefStandardIconType = 2
+};
+
+typedef UInt32 ListDefType;
+
+struct ListDefSpec {
+ ListDefType defType;
+ union {
+ ListDefUPP userProc;
+ } u;
+};
+typedef struct ListDefSpec ListDefSpec;
+EXTERN_API( OSStatus )
+CreateCustomList (const Rect * rView,
+ const ListBounds * dataBounds,
+ Point cellSize,
+ const ListDefSpec * theSpec,
+ WindowPtr theWindow,
+ Boolean drawIt,
+ Boolean hasGrow,
+ Boolean scrollHoriz,
+ Boolean scrollVert,
+ ListHandle * outList);
+
+
+#if !TARGET_OS_MAC
+/* QuickTime 3.0 */
+typedef CALLBACK_API( void , ListNotificationProcPtr )(ListHandle theList, ListNotification notification, long param);
+
+typedef ListNotificationProcPtr ListNotificationUPP;
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( void )
+LSetNotificationCallback (ListNotificationProcPtr callBack,
+ ListHandle lHandle);
+
+EXTERN_API_C( void )
+GetListVisibleBounds (ListHandle theList,
+ Rect * visibleBounds);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* !TARGET_OS_MAC */
+
+EXTERN_API( ListHandle )
+LNew (const Rect * rView,
+ const ListBounds * dataBounds,
+ Point cSize,
+ short theProc,
+ WindowPtr theWindow,
+ Boolean drawIt,
+ Boolean hasGrow,
+ Boolean scrollHoriz,
+ Boolean scrollVert) THREEWORDINLINE(0x3F3C, 0x0044, 0xA9E7);
+
+EXTERN_API( void )
+LDispose (ListHandle lHandle) THREEWORDINLINE(0x3F3C, 0x0028, 0xA9E7);
+
+EXTERN_API( short )
+LAddColumn (short count,
+ short colNum,
+ ListHandle lHandle) THREEWORDINLINE(0x3F3C, 0x0004, 0xA9E7);
+
+EXTERN_API( short )
+LAddRow (short count,
+ short rowNum,
+ ListHandle lHandle) THREEWORDINLINE(0x3F3C, 0x0008, 0xA9E7);
+
+EXTERN_API( void )
+LDelColumn (short count,
+ short colNum,
+ ListHandle lHandle) THREEWORDINLINE(0x3F3C, 0x0020, 0xA9E7);
+
+EXTERN_API( void )
+LDelRow (short count,
+ short rowNum,
+ ListHandle lHandle) THREEWORDINLINE(0x3F3C, 0x0024, 0xA9E7);
+
+EXTERN_API( Boolean )
+LGetSelect (Boolean next,
+ Cell * theCell,
+ ListHandle lHandle) THREEWORDINLINE(0x3F3C, 0x003C, 0xA9E7);
+
+EXTERN_API( Cell )
+LLastClick (ListHandle lHandle) THREEWORDINLINE(0x3F3C, 0x0040, 0xA9E7);
+
+EXTERN_API( Boolean )
+LNextCell (Boolean hNext,
+ Boolean vNext,
+ Cell * theCell,
+ ListHandle lHandle) THREEWORDINLINE(0x3F3C, 0x0048, 0xA9E7);
+
+EXTERN_API( Boolean )
+LSearch (const void * dataPtr,
+ short dataLen,
+ ListSearchUPP searchProc,
+ Cell * theCell,
+ ListHandle lHandle) THREEWORDINLINE(0x3F3C, 0x0054, 0xA9E7);
+
+EXTERN_API( void )
+LSize (short listWidth,
+ short listHeight,
+ ListHandle lHandle) THREEWORDINLINE(0x3F3C, 0x0060, 0xA9E7);
+
+EXTERN_API( void )
+LSetDrawingMode (Boolean drawIt,
+ ListHandle lHandle) THREEWORDINLINE(0x3F3C, 0x002C, 0xA9E7);
+
+EXTERN_API( void )
+LScroll (short dCols,
+ short dRows,
+ ListHandle lHandle) THREEWORDINLINE(0x3F3C, 0x0050, 0xA9E7);
+
+EXTERN_API( void )
+LAutoScroll (ListHandle lHandle) THREEWORDINLINE(0x3F3C, 0x0010, 0xA9E7);
+
+EXTERN_API( void )
+LUpdate (RgnHandle theRgn,
+ ListHandle lHandle) THREEWORDINLINE(0x3F3C, 0x0064, 0xA9E7);
+
+EXTERN_API( void )
+LActivate (Boolean act,
+ ListHandle lHandle) TWOWORDINLINE(0x4267, 0xA9E7);
+
+EXTERN_API( void )
+LCellSize (Point cSize,
+ ListHandle lHandle) THREEWORDINLINE(0x3F3C, 0x0014, 0xA9E7);
+
+EXTERN_API( Boolean )
+LClick (Point pt,
+ short modifiers,
+ ListHandle lHandle) THREEWORDINLINE(0x3F3C, 0x0018, 0xA9E7);
+
+EXTERN_API( void )
+LAddToCell (const void * dataPtr,
+ short dataLen,
+ Cell theCell,
+ ListHandle lHandle) THREEWORDINLINE(0x3F3C, 0x000C, 0xA9E7);
+
+EXTERN_API( void )
+LClrCell (Cell theCell,
+ ListHandle lHandle) THREEWORDINLINE(0x3F3C, 0x001C, 0xA9E7);
+
+EXTERN_API( void )
+LGetCell (void * dataPtr,
+ short * dataLen,
+ Cell theCell,
+ ListHandle lHandle) THREEWORDINLINE(0x3F3C, 0x0038, 0xA9E7);
+
+EXTERN_API( void )
+LRect (Rect * cellRect,
+ Cell theCell,
+ ListHandle lHandle) THREEWORDINLINE(0x3F3C, 0x004C, 0xA9E7);
+
+EXTERN_API( void )
+LSetCell (const void * dataPtr,
+ short dataLen,
+ Cell theCell,
+ ListHandle lHandle) THREEWORDINLINE(0x3F3C, 0x0058, 0xA9E7);
+
+EXTERN_API( void )
+LSetSelect (Boolean setIt,
+ Cell theCell,
+ ListHandle lHandle) THREEWORDINLINE(0x3F3C, 0x005C, 0xA9E7);
+
+EXTERN_API( void )
+LDraw (Cell theCell,
+ ListHandle lHandle) THREEWORDINLINE(0x3F3C, 0x0030, 0xA9E7);
+
+EXTERN_API( void )
+LGetCellDataLocation (short * offset,
+ short * len,
+ Cell theCell,
+ ListHandle lHandle) THREEWORDINLINE(0x3F3C, 0x0034, 0xA9E7);
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+SetListDefinitionProc (SInt16 resID,
+ ListDefUPP defProc);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if !TARGET_OS_MAC
+/* QuickTime 3.0 */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( void )
+LSetLDEF (ListDefProcPtr proc,
+ ListRef lHandle);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* !TARGET_OS_MAC */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( void )
+laddtocell (const void * dataPtr,
+ short dataLen,
+ const Cell * theCell,
+ ListHandle lHandle);
+
+EXTERN_API_C( void )
+lclrcell (const Cell * theCell,
+ ListHandle lHandle);
+
+EXTERN_API_C( void )
+lgetcelldatalocation (short * offset,
+ short * len,
+ const Cell * theCell,
+ ListHandle lHandle);
+
+EXTERN_API_C( void )
+lgetcell (void * dataPtr,
+ short * dataLen,
+ const Cell * theCell,
+ ListHandle lHandle);
+
+EXTERN_API_C( ListHandle )
+lnew (const Rect * rView,
+ const ListBounds * dataBounds,
+ Point * cSize,
+ short theProc,
+ WindowPtr theWindow,
+ Boolean drawIt,
+ Boolean hasGrow,
+ Boolean scrollHoriz,
+ Boolean scrollVert);
+
+EXTERN_API_C( void )
+lrect (Rect * cellRect,
+ const Cell * theCell,
+ ListHandle lHandle);
+
+EXTERN_API_C( void )
+lsetcell (const void * dataPtr,
+ short dataLen,
+ const Cell * theCell,
+ ListHandle lHandle);
+
+EXTERN_API_C( void )
+lsetselect (Boolean setIt,
+ const Cell * theCell,
+ ListHandle lHandle);
+
+EXTERN_API_C( void )
+ldraw (const Cell * theCell,
+ ListHandle lHandle);
+
+EXTERN_API_C( Boolean )
+lclick (Point * pt,
+ short modifiers,
+ ListHandle lHandle);
+
+EXTERN_API_C( void )
+lcellsize (Point * cSize,
+ ListHandle lHandle);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if OLDROUTINENAMES
+#define LDoDraw(drawIt, lHandle) LSetDrawingMode(drawIt, lHandle)
+#define LFind(offset, len, theCell, lHandle) LGetCellDataLocation(offset, len, theCell, lHandle)
+#if CGLUESUPPORTED
+#define lfind(offset, len, theCell, lHandle) lgetcelldatalocation(offset, len, theCell, lHandle)
+#endif
+#endif /* OLDROUTINENAMES */
+
+#if ACCESSOR_CALLS_ARE_FUNCTIONS
+/* Getters */
+EXTERN_API( Rect *)
+GetListViewBounds (ListRef list,
+ Rect * view);
+
+EXTERN_API( CGrafPtr )
+GetListPort (ListRef list);
+
+EXTERN_API( Point *)
+GetListCellIndent (ListRef list,
+ Point * indent);
+
+EXTERN_API( Point *)
+GetListCellSize (ListRef list,
+ Point * size);
+
+EXTERN_API( ListBounds *)
+GetListVisibleCells (ListRef list,
+ ListBounds * visible);
+
+EXTERN_API( ControlHandle )
+GetListVerticalScrollBar (ListRef list);
+
+EXTERN_API( ControlHandle )
+GetListHorizontalScrollBar (ListRef list);
+
+EXTERN_API( Boolean )
+GetListActive (ListRef list);
+
+EXTERN_API( SInt32 )
+GetListClickTime (ListRef list);
+
+EXTERN_API( Point *)
+GetListClickLocation (ListRef list,
+ Point * click);
+
+EXTERN_API( Point *)
+GetListMouseLocation (ListRef list,
+ Point * mouse);
+
+EXTERN_API( ListClickLoopUPP )
+GetListClickLoop (ListRef list);
+
+EXTERN_API( SInt32 )
+GetListRefCon (ListRef list);
+
+EXTERN_API( Handle )
+GetListDefinition (ListRef list);
+
+EXTERN_API( Handle )
+GetListUserHandle (ListRef list);
+
+EXTERN_API( ListBounds *)
+GetListDataBounds (ListRef list,
+ ListBounds * bounds);
+
+EXTERN_API( DataHandle )
+GetListDataHandle (ListRef list);
+
+EXTERN_API( OptionBits )
+GetListFlags (ListRef list);
+
+EXTERN_API( OptionBits )
+GetListSelectionFlags (ListRef list);
+
+/* Setters */
+EXTERN_API( void )
+SetListViewBounds (ListRef list,
+ const Rect * view);
+
+EXTERN_API( void )
+SetListPort (ListRef list,
+ CGrafPtr port);
+
+EXTERN_API( void )
+SetListCellIndent (ListRef list,
+ Point * indent);
+
+EXTERN_API( void )
+SetListClickTime (ListRef list,
+ SInt32 time);
+
+EXTERN_API( void )
+SetListClickLoop (ListRef list,
+ ListClickLoopUPP clickLoop);
+
+EXTERN_API( void )
+SetListLastClick (ListRef list,
+ Cell * lastClick);
+
+EXTERN_API( void )
+SetListRefCon (ListRef list,
+ SInt32 refCon);
+
+EXTERN_API( void )
+SetListUserHandle (ListRef list,
+ Handle userHandle);
+
+EXTERN_API( void )
+SetListFlags (ListRef list,
+ OptionBits listFlags);
+
+EXTERN_API( void )
+SetListSelectionFlags (ListRef list,
+ OptionBits selectionFlags);
+
+/* WARNING: These may go away in a future build. Beware! */
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+SetListDefinition (ListRef list,
+ Handle listDefProc);
+
+EXTERN_API( void )
+SetListCellSize (ListRef list,
+ Point * size);
+
+EXTERN_API( void )
+SetListHorizontalScrollBar (ListRef list,
+ ControlHandle hScroll);
+
+EXTERN_API( void )
+SetListVerticalScrollBar (ListRef list,
+ ControlHandle vScroll);
+
+EXTERN_API( void )
+SetListVisibleCells (ListRef list,
+ ListBounds * visible);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* ACCESSOR_CALLS_ARE_FUNCTIONS */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __LISTS__ */
+
diff --git a/include/qt/LocationManager.h b/include/qt/LocationManager.h
new file mode 100644
index 000000000..40fb4f290
--- /dev/null
+++ b/include/qt/LocationManager.h
@@ -0,0 +1,373 @@
+/*
+ File: LocationManager.h
+
+ Contains: LocationManager (manages groups of settings)
+
+ Version: Technology: Mac OS 8
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __LOCATIONMANAGER__
+#define __LOCATIONMANAGER__
+
+#ifndef __APPLEEVENTS__
+#include "AppleEvents.h"
+#endif
+
+#ifndef __COMPONENTS__
+#include "Components.h"
+#endif
+
+#ifndef __DIALOGS__
+#include "Dialogs.h"
+#endif
+
+#ifndef __PROCESSES__
+#include "Processes.h"
+#endif
+
+#ifndef __STANDARDFILE__
+#include "StandardFile.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* Location Manager API Support -------------------------------------------------------------------- */
+/* A Location Token uniquely identifies a Location on a machine... */
+
+typedef struct OpaqueALMToken* ALMToken;
+#define kALMNoLocationToken ((ALMToken)(-1)) // ALMToken of "off" Location...
+enum {
+ kALMLocationNameMaxLen = 31, /* name (actually imposed by file system)... */
+ kALMNoLocationIndex = -1 /* index for the "off" Location (kALMNoLocationToken)... */
+};
+
+typedef Str31 ALMLocationName;
+/* Returned from ALMConfirmName... */
+
+typedef SInt16 ALMConfirmChoice;
+enum {
+ kALMConfirmRename = 1,
+ kALMConfirmReplace = 2
+};
+
+/* ALMConfirmName dialog item numbers for use in callbacks (ALM 2.0)... */
+
+enum {
+ kALMDuplicateRenameButton = 1, /* if Window refcon is kALMDuplicateDialogRefCon... */
+ kALMDuplicateReplaceButton = 2,
+ kALMDuplicateCancelButton = 3,
+ kALMDuplicatePromptText = 5
+};
+
+enum {
+ kALMRenameRenameButton = 1, /* if Window refcon is kALMRenameDialogRefCon... */
+ kALMRenameCancelButton = 2,
+ kALMRenameEditText = 3,
+ kALMRenamePromptText = 4
+};
+
+/* Refcons of two windows in ALMConfirmName (ALM 2.0)... */
+
+enum {
+ kALMDuplicateDialogRefCon = FOUR_CHAR_CODE('dupl'),
+ kALMRenameDialogRefCon = FOUR_CHAR_CODE('rnam')
+};
+
+/* Callback routine for Location awareness (mimics AppleEvents) in non-application code... */
+
+typedef CALLBACK_API( void , ALMNotificationProcPtr )(AppleEvent *theEvent);
+typedef STACK_UPP_TYPE(ALMNotificationProcPtr) ALMNotificationUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(ALMNotificationUPP)
+ NewALMNotificationUPP (ALMNotificationProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeALMNotificationUPP (ALMNotificationUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeALMNotificationUPP (AppleEvent * theEvent,
+ ALMNotificationUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppALMNotificationProcInfo = 0x000000C0 }; /* pascal no_return_value Func(4_bytes) */
+ #define NewALMNotificationUPP(userRoutine) (ALMNotificationUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppALMNotificationProcInfo, GetCurrentArchitecture())
+ #define DisposeALMNotificationUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeALMNotificationUPP(theEvent, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppALMNotificationProcInfo, (theEvent))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewALMNotificationProc(userRoutine) NewALMNotificationUPP(userRoutine)
+#define CallALMNotificationProc(userRoutine, theEvent) InvokeALMNotificationUPP(theEvent, userRoutine)
+/* Notification AppleEvents sent to apps/registered code... */
+enum {
+ kAELocationChangedNoticeKey = FOUR_CHAR_CODE('walk'), /* Current Location changed... */
+ kAELocationRescanNoticeKey = FOUR_CHAR_CODE('trip') /* Location created/renamed/deleted... */
+};
+
+/* ALMSwitchToLocation masks... */
+
+typedef SInt32 ALMSwitchActionFlags;
+enum {
+ kALMDefaultSwitchFlags = 0x00000000, /* No special action to take... */
+ kALMDontShowStatusWindow = 0x00000001, /* Suppress "switching" window... */
+ kALMSignalViaAE = 0x00000002 /* Switch by sending Finder AppleEvent... */
+};
+
+/* Parameters for Get/Put/Merge Location calls... */
+
+typedef const OSType * ConstALMModuleTypeListPtr;
+enum {
+ kALMAddAllOnSimple = 0, /* Add all single-instance, non-action modules... */
+ kALMAddAllOff = -1 /* Add all modules but turn them off... */
+};
+
+/* Item numbers for use in Get/Put/Merge Location filters... */
+
+enum {
+ kALMLocationSelectButton = 1,
+ kALMLocationCancelButton = 2,
+ kALMLocationBalloonHelp = 3,
+ kALMLocationLocationList = 7,
+ kALMLocationLocationNameEdit = 10,
+ kALMLocationPromptText = 11
+};
+
+enum {
+ kALMLocationSaveButton = kALMLocationSelectButton
+};
+
+/* Location Manager Module API Support ------------------------------------------------------------- */
+
+/* ALMGetScriptInfo stuff... */
+
+enum {
+ kALMScriptInfoVersion = 2 /* Customarily put in resource for localization... */
+};
+
+
+struct ALMScriptManagerInfo {
+ SInt16 version; /* Set to kALMScriptInfoVersion... */
+ SInt16 scriptCode;
+ SInt16 regionCode;
+ SInt16 langCode;
+ SInt16 fontNum;
+ SInt16 fontSize;
+};
+typedef struct ALMScriptManagerInfo ALMScriptManagerInfo;
+typedef ALMScriptManagerInfo * ALMScriptManagerInfoPtr;
+/*
+ Alternate form of ScriptInfo is easier to localize in resources; it is used extensively in
+ samples and internally, so....
+*/
+
+struct ALMAltScriptManagerInfo {
+ SInt16 version;
+ SInt16 scriptCode;
+ SInt16 regionCode;
+ SInt16 langCode;
+ SInt16 fontSize;
+ Str63 fontName;
+};
+typedef struct ALMAltScriptManagerInfo ALMAltScriptManagerInfo;
+typedef ALMAltScriptManagerInfo * ALMAltScriptManagerInfoPtr;
+typedef ALMAltScriptManagerInfoPtr * ALMAltScriptManagerInfoHandle;
+enum {
+ kALMAltScriptManagerInfoRsrcType = FOUR_CHAR_CODE('trip'),
+ kALMAltScriptManagerInfoRsrcID = 0
+};
+
+/* Reboot information used on ALMSetCurrent (input/output parameter)... */
+
+typedef UInt32 ALMRebootFlags;
+enum {
+ kALMNoChange = 0,
+ kALMAvailableNow = 1,
+ kALMFinderRestart = 2,
+ kALMProcesses = 3,
+ kALMExtensions = 4,
+ kALMWarmBoot = 5,
+ kALMColdBoot = 6,
+ kALMShutdown = 7
+};
+
+/*
+ File types and signatures...
+ Note: auto-routing of modules will not be supported for 'thng' files...
+*/
+
+enum {
+ kALMFileCreator = FOUR_CHAR_CODE('fall'), /* Creator of Location Manager files... */
+ kALMComponentModuleFileType = FOUR_CHAR_CODE('thng'), /* Type of a Component Manager Module file [v1.0]... */
+ kALMComponentStateModuleFileType = FOUR_CHAR_CODE('almn'), /* Type of a CM 'state' Module file... */
+ kALMComponentActionModuleFileType = FOUR_CHAR_CODE('almb'), /* Type of a CM 'action' Module file... */
+ kALMCFMStateModuleFileType = FOUR_CHAR_CODE('almm'), /* Type of a CFM 'state' Module file... */
+ kALMCFMActionModuleFileType = FOUR_CHAR_CODE('alma') /* Type of a CFM 'action' Module file... */
+};
+
+/* Component Manager 'thng' info... */
+
+enum {
+ kALMComponentRsrcType = FOUR_CHAR_CODE('thng'),
+ kALMComponentType = FOUR_CHAR_CODE('walk')
+};
+
+/* CFM Modules require a bit of information (replacing some of the 'thng' resource)... */
+
+enum {
+ kALMModuleInfoRsrcType = FOUR_CHAR_CODE('walk'),
+ kALMModuleInfoOriginalVersion = 0
+};
+
+/* These masks apply to the "Flags" field in the 'thng' or 'walk' resource... */
+
+enum {
+ kALMMultiplePerLocation = 0x00000001, /* Module can be added more than once to a Location... */
+ kALMDescriptionGetsStale = 0x00000002 /* Descriptions may change though the setting didn't... */
+};
+
+/* Misc stuff for older implementations ------------------------------------------------------------ */
+
+#if OLDROUTINENAMES
+/* Old error codes for compatibility - new names are in Errors interface... */
+enum {
+ ALMInternalErr = -30049, /* use kALMInternalErr */
+ ALMLocationNotFound = -30048, /* use kALMLocationNotFoundErr */
+ ALMNoSuchModuleErr = -30047, /* use kALMNoSuchModuleErr */
+ ALMModuleCommunicationErr = -30046, /* use kALMModuleCommunicationErr */
+ ALMDuplicateModuleErr = -30045, /* use kALMDuplicateModuleErr */
+ ALMInstallationErr = -30044, /* use kALMInstallationErr */
+ ALMDeferSwitchErr = -30043 /* use kALMDeferSwitchErr */
+};
+
+/* Old ALMConfirmName constants... */
+
+enum {
+ ALMConfirmRenameConfig = kALMConfirmRename,
+ ALMConfirmReplaceConfig = kALMConfirmReplace
+};
+
+/* Old AppleEvents... */
+
+enum {
+ kAELocationNotice = kAELocationChangedNoticeKey
+};
+
+
+typedef ALMScriptManagerInfo ALMScriptMgrInfo;
+typedef UInt32 ALMComponentFlagsEnum;
+#endif /* OLDROUTINENAMES */
+
+/* Location Manager API ---------------------------------------------------------------------------- */
+
+/* The following 7 routines are present if gestaltALMAttr has bit gestaltALMPresent set... */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+ALMGetCurrentLocation (SInt16 * index,
+ ALMToken * token,
+ ALMLocationName name) THREEWORDINLINE(0x303C, 0x0600, 0xAAA4);
+
+EXTERN_API( OSErr )
+ALMGetIndLocation (SInt16 index,
+ ALMToken * token,
+ ALMLocationName name) THREEWORDINLINE(0x303C, 0x0501, 0xAAA4);
+
+EXTERN_API( OSErr )
+ALMCountLocations (SInt16 * locationCount) THREEWORDINLINE(0x303C, 0x0202, 0xAAA4);
+
+EXTERN_API( OSErr )
+ALMSwitchToLocation (ALMToken newLocation,
+ ALMSwitchActionFlags switchFlags) THREEWORDINLINE(0x303C, 0x0403, 0xAAA4);
+
+EXTERN_API( OSErr )
+ALMRegisterNotifyProc (ALMNotificationUPP notificationProc,
+ const ProcessSerialNumber * whichPSN) THREEWORDINLINE(0x303C, 0x0404, 0xAAA4);
+
+EXTERN_API( OSErr )
+ALMRemoveNotifyProc (ALMNotificationUPP notificationProc,
+ const ProcessSerialNumber * whichPSN) THREEWORDINLINE(0x303C, 0x0405, 0xAAA4);
+
+EXTERN_API( OSErr )
+ALMConfirmName (ConstStr255Param message,
+ Str255 theName,
+ ALMConfirmChoice * choice,
+ ModalFilterUPP filter) THREEWORDINLINE(0x303C, 0x0806, 0xAAA4);
+
+/* The following 3 routines are present if gestaltALMAttr has bit gestaltALMHasSFLocation set... */
+
+EXTERN_API( OSErr )
+ALMPutLocation (ConstStr255Param prompt,
+ ALMLocationName name,
+ SInt16 numTypes,
+ ConstALMModuleTypeListPtr typeList,
+ ModalFilterYDUPP filter,
+ void * yourDataPtr) THREEWORDINLINE(0x303C, 0x0B07, 0xAAA4);
+
+EXTERN_API( OSErr )
+ALMGetLocation (ConstStr255Param prompt,
+ ALMLocationName name,
+ ModalFilterYDUPP filter,
+ void * yourDataPtr) THREEWORDINLINE(0x303C, 0x0808, 0xAAA4);
+
+EXTERN_API( OSErr )
+ALMMergeLocation (ConstStr255Param prompt,
+ ALMLocationName name,
+ SInt16 numTypes,
+ ConstALMModuleTypeListPtr typeList,
+ ModalFilterYDUPP filter,
+ void * yourDataPtr) THREEWORDINLINE(0x303C, 0x0B09, 0xAAA4);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __LOCATIONMANAGER__ */
+
diff --git a/include/qt/LowMem.h b/include/qt/LowMem.h
new file mode 100644
index 000000000..b680c1fca
--- /dev/null
+++ b/include/qt/LowMem.h
@@ -0,0 +1,1460 @@
+/*
+ File: LowMem.h
+
+ Contains: Low Memory Accessor Interfaces.
+
+ Version: Technology: Mac OS 8.1
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1993-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __LOWMEM__
+#define __LOWMEM__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __CONTROLS__
+#include "Controls.h"
+#endif
+
+#ifndef __EVENTS__
+#include "Events.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+#ifndef __FONTS__
+#include "Fonts.h"
+#endif
+
+#ifndef __MACMEMORY__
+#include "MacMemory.h"
+#endif
+
+#ifndef __MENUS__
+#include "Menus.h"
+#endif
+
+#ifndef __OSUTILS__
+#include "OSUtils.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#ifndef __RESOURCES__
+#include "Resources.h"
+#endif
+
+
+#if !OPAQUE_TOOLBOX_STRUCTS
+#ifndef __MACWINDOWS__
+#include "MacWindows.h"
+#endif
+
+#endif /* !OPAQUE_TOOLBOX_STRUCTS */
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/**************************************************************************************
+
+ SIMPLE LOWMEM ACCESSORS
+
+**************************************************************************************/
+EXTERN_API( SInt16 ) LMGetScrVRes(void) TWOWORDINLINE(0x3EB8, 0x0102);
+
+EXTERN_API( void ) LMSetScrVRes(SInt16 value) TWOWORDINLINE(0x31DF, 0x0102);
+
+
+EXTERN_API( SInt16 ) LMGetScrHRes(void) TWOWORDINLINE(0x3EB8, 0x0104);
+
+EXTERN_API( void ) LMSetScrHRes(SInt16 value) TWOWORDINLINE(0x31DF, 0x0104);
+
+
+EXTERN_API( Ptr ) LMGetMemTop(void) TWOWORDINLINE(0x2EB8, 0x0108);
+
+EXTERN_API( void ) LMSetMemTop(Ptr value) TWOWORDINLINE(0x21DF, 0x0108);
+
+
+EXTERN_API( Ptr ) LMGetBufPtr(void) TWOWORDINLINE(0x2EB8, 0x010C);
+
+EXTERN_API( void ) LMSetBufPtr(Ptr value) TWOWORDINLINE(0x21DF, 0x010C);
+
+
+EXTERN_API( Ptr ) LMGetHeapEnd(void) TWOWORDINLINE(0x2EB8, 0x0114);
+
+EXTERN_API( void ) LMSetHeapEnd(Ptr value) TWOWORDINLINE(0x21DF, 0x0114);
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( THz ) LMGetTheZone(void) TWOWORDINLINE(0x2EB8, 0x0118);
+
+EXTERN_API( void ) LMSetTheZone(THz value) TWOWORDINLINE(0x21DF, 0x0118);
+
+
+EXTERN_API( Ptr ) LMGetUTableBase(void) TWOWORDINLINE(0x2EB8, 0x011C);
+
+EXTERN_API( void ) LMSetUTableBase(Ptr value) TWOWORDINLINE(0x21DF, 0x011C);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( UInt8 ) LMGetCPUFlag(void) TWOWORDINLINE(0x1EB8, 0x012F);
+
+EXTERN_API( void ) LMSetCPUFlag(UInt8 value) TWOWORDINLINE(0x11DF, 0x012F);
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( Ptr ) LMGetApplLimit(void) TWOWORDINLINE(0x2EB8, 0x0130);
+
+EXTERN_API( void ) LMSetApplLimit(Ptr value) TWOWORDINLINE(0x21DF, 0x0130);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( SInt16 ) LMGetSysEvtMask(void) TWOWORDINLINE(0x3EB8, 0x0144);
+
+/* Carbon Usage: use SetEventMask*/
+EXTERN_API( void ) LMSetSysEvtMask(SInt16 value) TWOWORDINLINE(0x31DF, 0x0144);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( SInt32 ) LMGetRndSeed(void) TWOWORDINLINE(0x2EB8, 0x0156);
+
+EXTERN_API( void ) LMSetRndSeed(SInt32 value) TWOWORDINLINE(0x21DF, 0x0156);
+
+
+EXTERN_API( UInt8 ) LMGetSEvtEnb(void) TWOWORDINLINE(0x1EB8, 0x015C);
+
+EXTERN_API( void ) LMSetSEvtEnb(UInt8 value) TWOWORDINLINE(0x11DF, 0x015C);
+
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( UInt32 ) LMGetTicks(void) TWOWORDINLINE(0x2EB8, 0x016A);
+
+EXTERN_API( void ) LMSetTicks(UInt32 value) TWOWORDINLINE(0x21DF, 0x016A);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( SInt16 ) LMGetKeyThresh(void) TWOWORDINLINE(0x3EB8, 0x018E);
+
+EXTERN_API( void ) LMSetKeyThresh(SInt16 value) TWOWORDINLINE(0x31DF, 0x018E);
+
+
+EXTERN_API( SInt16 ) LMGetKeyRepThresh(void) TWOWORDINLINE(0x3EB8, 0x0190);
+
+EXTERN_API( void ) LMSetKeyRepThresh(SInt16 value) TWOWORDINLINE(0x31DF, 0x0190);
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( Ptr ) LMGetVIA(void) TWOWORDINLINE(0x2EB8, 0x01D4);
+
+EXTERN_API( void ) LMSetVIA(Ptr value) TWOWORDINLINE(0x21DF, 0x01D4);
+
+
+EXTERN_API( Ptr ) LMGetSCCRd(void) TWOWORDINLINE(0x2EB8, 0x01D8);
+
+EXTERN_API( void ) LMSetSCCRd(Ptr value) TWOWORDINLINE(0x21DF, 0x01D8);
+
+
+EXTERN_API( Ptr ) LMGetSCCWr(void) TWOWORDINLINE(0x2EB8, 0x01DC);
+
+EXTERN_API( void ) LMSetSCCWr(Ptr value) TWOWORDINLINE(0x21DF, 0x01DC);
+
+
+EXTERN_API( UInt8 ) LMGetSPValid(void) TWOWORDINLINE(0x1EB8, 0x01F8);
+
+EXTERN_API( void ) LMSetSPValid(UInt8 value) TWOWORDINLINE(0x11DF, 0x01F8);
+
+
+EXTERN_API( UInt8 ) LMGetSPATalkA(void) TWOWORDINLINE(0x1EB8, 0x01F9);
+
+EXTERN_API( void ) LMSetSPATalkA(UInt8 value) TWOWORDINLINE(0x11DF, 0x01F9);
+
+
+EXTERN_API( UInt8 ) LMGetSPATalkB(void) TWOWORDINLINE(0x1EB8, 0x01FA);
+
+EXTERN_API( void ) LMSetSPATalkB(UInt8 value) TWOWORDINLINE(0x11DF, 0x01FA);
+
+
+EXTERN_API( UInt8 ) LMGetSPConfig(void) TWOWORDINLINE(0x1EB8, 0x01FB);
+
+EXTERN_API( void ) LMSetSPConfig(UInt8 value) TWOWORDINLINE(0x11DF, 0x01FB);
+
+
+EXTERN_API( SInt16 ) LMGetSPPortA(void) TWOWORDINLINE(0x3EB8, 0x01FC);
+
+EXTERN_API( void ) LMSetSPPortA(SInt16 value) TWOWORDINLINE(0x31DF, 0x01FC);
+
+
+EXTERN_API( SInt16 ) LMGetSPPortB(void) TWOWORDINLINE(0x3EB8, 0x01FE);
+
+EXTERN_API( void ) LMSetSPPortB(SInt16 value) TWOWORDINLINE(0x31DF, 0x01FE);
+
+
+EXTERN_API( SInt32 ) LMGetSPAlarm(void) TWOWORDINLINE(0x2EB8, 0x0200);
+
+EXTERN_API( void ) LMSetSPAlarm(SInt32 value) TWOWORDINLINE(0x21DF, 0x0200);
+
+
+EXTERN_API( SInt16 ) LMGetSPFont(void) TWOWORDINLINE(0x3EB8, 0x0204);
+
+EXTERN_API( void ) LMSetSPFont(SInt16 value) TWOWORDINLINE(0x31DF, 0x0204);
+
+
+EXTERN_API( UInt8 ) LMGetSPKbd(void) TWOWORDINLINE(0x1EB8, 0x0206);
+
+EXTERN_API( void ) LMSetSPKbd(UInt8 value) TWOWORDINLINE(0x11DF, 0x0206);
+
+
+EXTERN_API( UInt8 ) LMGetSPPrint(void) TWOWORDINLINE(0x1EB8, 0x0207);
+
+EXTERN_API( void ) LMSetSPPrint(UInt8 value) TWOWORDINLINE(0x11DF, 0x0207);
+
+
+EXTERN_API( UInt8 ) LMGetSPVolCtl(void) TWOWORDINLINE(0x1EB8, 0x0208);
+
+EXTERN_API( void ) LMSetSPVolCtl(UInt8 value) TWOWORDINLINE(0x11DF, 0x0208);
+
+
+EXTERN_API( UInt8 ) LMGetSPClikCaret(void) TWOWORDINLINE(0x1EB8, 0x0209);
+
+EXTERN_API( void ) LMSetSPClikCaret(UInt8 value) TWOWORDINLINE(0x11DF, 0x0209);
+
+
+EXTERN_API( UInt8 ) LMGetSPMisc2(void) TWOWORDINLINE(0x1EB8, 0x020B);
+
+EXTERN_API( void ) LMSetSPMisc2(UInt8 value) TWOWORDINLINE(0x11DF, 0x020B);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+/* Carbon Usage: use GetDateTime*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( SInt32 ) LMGetTime(void) TWOWORDINLINE(0x2EB8, 0x020C);
+
+/* Carbon Usage: use SetDateTime*/
+EXTERN_API( void ) LMSetTime(SInt32 value) TWOWORDINLINE(0x21DF, 0x020C);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( SInt16 ) LMGetBootDrive(void) TWOWORDINLINE(0x3EB8, 0x0210);
+
+EXTERN_API( void ) LMSetBootDrive(SInt16 value) TWOWORDINLINE(0x31DF, 0x0210);
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( SInt16 ) LMGetSFSaveDisk(void) TWOWORDINLINE(0x3EB8, 0x0214);
+
+EXTERN_API( void ) LMSetSFSaveDisk(SInt16 value) TWOWORDINLINE(0x31DF, 0x0214);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( UInt8 ) LMGetKbdLast(void) TWOWORDINLINE(0x1EB8, 0x0218);
+
+EXTERN_API( void ) LMSetKbdLast(UInt8 value) TWOWORDINLINE(0x11DF, 0x0218);
+
+
+EXTERN_API( UInt8 ) LMGetKbdType(void) TWOWORDINLINE(0x1EB8, 0x021E);
+
+EXTERN_API( void ) LMSetKbdType(UInt8 value) TWOWORDINLINE(0x11DF, 0x021E);
+
+
+EXTERN_API( SInt16 ) LMGetMemErr(void) TWOWORDINLINE(0x3EB8, 0x0220);
+
+EXTERN_API( void ) LMSetMemErr(SInt16 value) TWOWORDINLINE(0x31DF, 0x0220);
+
+
+EXTERN_API( UInt8 ) LMGetSdVolume(void) TWOWORDINLINE(0x1EB8, 0x0260);
+
+EXTERN_API( void ) LMSetSdVolume(UInt8 value) TWOWORDINLINE(0x11DF, 0x0260);
+
+
+EXTERN_API( Ptr ) LMGetSoundPtr(void) TWOWORDINLINE(0x2EB8, 0x0262);
+
+EXTERN_API( void ) LMSetSoundPtr(Ptr value) TWOWORDINLINE(0x21DF, 0x0262);
+
+
+EXTERN_API( Ptr ) LMGetSoundBase(void) TWOWORDINLINE(0x2EB8, 0x0266);
+
+EXTERN_API( void ) LMSetSoundBase(Ptr value) TWOWORDINLINE(0x21DF, 0x0266);
+
+
+EXTERN_API( UInt8 ) LMGetSoundLevel(void) TWOWORDINLINE(0x1EB8, 0x027F);
+
+EXTERN_API( void ) LMSetSoundLevel(UInt8 value) TWOWORDINLINE(0x11DF, 0x027F);
+
+
+EXTERN_API( SInt16 ) LMGetCurPitch(void) TWOWORDINLINE(0x3EB8, 0x0280);
+
+EXTERN_API( void ) LMSetCurPitch(SInt16 value) TWOWORDINLINE(0x31DF, 0x0280);
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( SInt16 ) LMGetROM85(void) TWOWORDINLINE(0x3EB8, 0x028E);
+
+EXTERN_API( void ) LMSetROM85(SInt16 value) TWOWORDINLINE(0x31DF, 0x028E);
+
+
+EXTERN_API( UInt8 ) LMGetPortBUse(void) TWOWORDINLINE(0x1EB8, 0x0291);
+
+EXTERN_API( void ) LMSetPortBUse(UInt8 value) TWOWORDINLINE(0x11DF, 0x0291);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( GetNextEventFilterUPP ) LMGetGNEFilter(void) TWOWORDINLINE(0x2EB8, 0x029A);
+
+EXTERN_API( void ) LMSetGNEFilter(GetNextEventFilterUPP value) TWOWORDINLINE(0x21DF, 0x029A);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( THz ) LMGetSysZone(void) TWOWORDINLINE(0x2EB8, 0x02A6);
+
+EXTERN_API( void ) LMSetSysZone(THz value) TWOWORDINLINE(0x21DF, 0x02A6);
+
+
+EXTERN_API( THz ) LMGetApplZone(void) TWOWORDINLINE(0x2EB8, 0x02AA);
+
+EXTERN_API( void ) LMSetApplZone(THz value) TWOWORDINLINE(0x21DF, 0x02AA);
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( Ptr ) LMGetROMBase(void) TWOWORDINLINE(0x2EB8, 0x02AE);
+
+EXTERN_API( void ) LMSetROMBase(Ptr value) TWOWORDINLINE(0x21DF, 0x02AE);
+
+
+EXTERN_API( Ptr ) LMGetRAMBase(void) TWOWORDINLINE(0x2EB8, 0x02B2);
+
+EXTERN_API( void ) LMSetRAMBase(Ptr value) TWOWORDINLINE(0x21DF, 0x02B2);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( Ptr ) LMGetDSAlertTab(void) TWOWORDINLINE(0x2EB8, 0x02BA);
+
+EXTERN_API( void ) LMSetDSAlertTab(Ptr value) TWOWORDINLINE(0x21DF, 0x02BA);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+/*
+ NOTE: LMGetABusVars and LMSetABusVars have been removed.
+ Their implememtation in InterfaceLib was inconsistent
+ with their prototypes here. In InterfaceLib LMSetABusVars
+ would copy eight bytes and LMGetABusVars would return the
+ value 0x02D8 instead of the long at that location.
+
+ Use LMGetABusGlobals/LMSetABusGlobals to get/set the
+ long at location 0x02D8 which is a pointer to the AppleTalk
+ globals. Use LMGetABusDCE/LMSetABusDCE to get/set the
+ long at location 0x02DC which is the .MPP driver
+ Device Control Entry.
+
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( Ptr ) LMGetABusGlobals(void) TWOWORDINLINE(0x2EB8, 0x02D8);
+
+EXTERN_API( Ptr ) LMGetABusDCE(void) TWOWORDINLINE(0x2EB8, 0x02DC);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void ) LMSetABusGlobals(Ptr value) TWOWORDINLINE(0x21DF, 0x02D8);
+
+EXTERN_API( void ) LMSetABusDCE(Ptr value) TWOWORDINLINE(0x21DF, 0x02DC);
+
+
+/* Carbon Usage: use GetDblTime*/
+EXTERN_API( UInt32 ) LMGetDoubleTime(void) TWOWORDINLINE(0x2EB8, 0x02F0);
+
+EXTERN_API( void ) LMSetDoubleTime(UInt32 value) TWOWORDINLINE(0x21DF, 0x02F0);
+
+/* Carbon Usage: use GetCaretTime*/
+EXTERN_API( UInt32 ) LMGetCaretTime(void) TWOWORDINLINE(0x2EB8, 0x02F4);
+
+EXTERN_API( void ) LMSetCaretTime(UInt32 value) TWOWORDINLINE(0x21DF, 0x02F4);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( UInt8 ) LMGetScrDmpEnb(void) TWOWORDINLINE(0x1EB8, 0x02F8);
+
+EXTERN_API( void ) LMSetScrDmpEnb(UInt8 value) TWOWORDINLINE(0x11DF, 0x02F8);
+
+
+EXTERN_API( SInt32 ) LMGetBufTgFNum(void) TWOWORDINLINE(0x2EB8, 0x02FC);
+
+EXTERN_API( void ) LMSetBufTgFNum(SInt32 value) TWOWORDINLINE(0x21DF, 0x02FC);
+
+
+EXTERN_API( SInt16 ) LMGetBufTgFFlg(void) TWOWORDINLINE(0x3EB8, 0x0300);
+
+EXTERN_API( void ) LMSetBufTgFFlg(SInt16 value) TWOWORDINLINE(0x31DF, 0x0300);
+
+
+EXTERN_API( SInt16 ) LMGetBufTgFBkNum(void) TWOWORDINLINE(0x3EB8, 0x0302);
+
+EXTERN_API( void ) LMSetBufTgFBkNum(SInt16 value) TWOWORDINLINE(0x31DF, 0x0302);
+
+
+EXTERN_API( SInt32 ) LMGetBufTgDate(void) TWOWORDINLINE(0x2EB8, 0x0304);
+
+EXTERN_API( void ) LMSetBufTgDate(SInt32 value) TWOWORDINLINE(0x21DF, 0x0304);
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( SInt32 ) LMGetLo3Bytes(void) TWOWORDINLINE(0x2EB8, 0x031A);
+
+EXTERN_API( void ) LMSetLo3Bytes(SInt32 value) TWOWORDINLINE(0x21DF, 0x031A);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( SInt32 ) LMGetMinStack(void) TWOWORDINLINE(0x2EB8, 0x031E);
+
+EXTERN_API( void ) LMSetMinStack(SInt32 value) TWOWORDINLINE(0x21DF, 0x031E);
+
+
+EXTERN_API( SInt32 ) LMGetDefltStack(void) TWOWORDINLINE(0x2EB8, 0x0322);
+
+EXTERN_API( void ) LMSetDefltStack(SInt32 value) TWOWORDINLINE(0x21DF, 0x0322);
+
+
+EXTERN_API( Handle ) LMGetGZRootHnd(void) TWOWORDINLINE(0x2EB8, 0x0328);
+
+EXTERN_API( void ) LMSetGZRootHnd(Handle value) TWOWORDINLINE(0x21DF, 0x0328);
+
+
+EXTERN_API( Handle ) LMGetGZMoveHnd(void) TWOWORDINLINE(0x2EB8, 0x0330);
+
+EXTERN_API( void ) LMSetGZMoveHnd(Handle value) TWOWORDINLINE(0x21DF, 0x0330);
+
+#if CALL_NOT_IN_CARBON
+/*
+ LMGetFCBSPtr, LMSetFCBSPtr and LMSetFSFCBLen are not supported with Mac OS 9
+ and later. Access to information in File Control Blocks or Fork Control Blocks
+ (FCBs) should, if at all possible, be made with the GetFCBInfo or GetForkCBInfo
+ routines. See the Technote "FCBs, Now and Forever" or the Technical Q&A
+ "Accessing File Control Blocks" for complete information on this subject.
+ Direct access to FCBs is not allowed by Carbon. Non-Carbon programs that
+ require direct access to FCBs should use the File System Manager (FSM) FCB accessor
+ functions if FSM is available (use the Gestalt selector gestaltFSAttr to determine
+ this). Non-Carbon programs needing direct access to FCBs when FSM is not available
+ can define ENABLE_FCB_ARRAY_ACCESS to be true when compiling.
+*/
+#ifndef ENABLE_FCB_ARRAY_ACCESS
+#define ENABLE_FCB_ARRAY_ACCESS 0
+#endif /* !defined(ENABLE_FCB_ARRAY_ACCESS) */
+
+#if ENABLE_FCB_ARRAY_ACCESS
+#if CALL_NOT_IN_CARBON
+EXTERN_API( Ptr ) LMGetFCBSPtr(void) TWOWORDINLINE(0x2EB8, 0x034E);
+
+EXTERN_API( void ) LMSetFCBSPtr(Ptr value) TWOWORDINLINE(0x21DF, 0x034E);
+
+EXTERN_API( void ) LMSetFSFCBLen(SInt16 value) TWOWORDINLINE(0x31DF, 0x03F6);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* ENABLE_FCB_ARRAY_ACCESS */
+
+/*
+ LMGetFSFCBLen is supported only for the purpose of determining that the HFS
+ file system is available as documented in developer Technotes (the HFS file system
+ is available in System 3.2 and later). There is no documented use of FSFCBLen
+ other than testing it for a positive value.
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( SInt16 ) LMGetFSFCBLen(void) TWOWORDINLINE(0x3EB8, 0x03F6);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( Ptr ) LMGetDefVCBPtr(void) TWOWORDINLINE(0x2EB8, 0x0352);
+
+EXTERN_API( void ) LMSetDefVCBPtr(Ptr value) TWOWORDINLINE(0x21DF, 0x0352);
+
+
+EXTERN_API( SInt32 ) LMGetCurDirStore(void) TWOWORDINLINE(0x2EB8, 0x0398);
+
+EXTERN_API( void ) LMSetCurDirStore(SInt32 value) TWOWORDINLINE(0x21DF, 0x0398);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( UniversalProcPtr ) LMGetToExtFS(void) TWOWORDINLINE(0x2EB8, 0x03F2);
+
+EXTERN_API( void ) LMSetToExtFS(UniversalProcPtr value) TWOWORDINLINE(0x21DF, 0x03F2);
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( Ptr ) LMGetScrnBase(void) TWOWORDINLINE(0x2EB8, 0x0824);
+
+EXTERN_API( void ) LMSetScrnBase(Ptr value) TWOWORDINLINE(0x21DF, 0x0824);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( GDHandle ) LMGetMainDevice(void) TWOWORDINLINE(0x2EB8, 0x08A4);
+
+EXTERN_API( void ) LMSetMainDevice(GDHandle value) TWOWORDINLINE(0x21DF, 0x08A4);
+
+
+EXTERN_API( GDHandle ) LMGetDeviceList(void) TWOWORDINLINE(0x2EB8, 0x08A8);
+
+EXTERN_API( void ) LMSetDeviceList(GDHandle value) TWOWORDINLINE(0x21DF, 0x08A8);
+
+
+EXTERN_API( Handle ) LMGetQDColors(void) TWOWORDINLINE(0x2EB8, 0x08B0);
+
+EXTERN_API( void ) LMSetQDColors(Handle value) TWOWORDINLINE(0x21DF, 0x08B0);
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( UInt8 ) LMGetCrsrBusy(void) TWOWORDINLINE(0x1EB8, 0x08CD);
+
+EXTERN_API( void ) LMSetCrsrBusy(UInt8 value) TWOWORDINLINE(0x11DF, 0x08CD);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( Handle ) LMGetWidthListHand(void) TWOWORDINLINE(0x2EB8, 0x08E4);
+
+EXTERN_API( void ) LMSetWidthListHand(Handle value) TWOWORDINLINE(0x21DF, 0x08E4);
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( SInt16 ) LMGetJournalRef(void) TWOWORDINLINE(0x3EB8, 0x08E8);
+
+EXTERN_API( void ) LMSetJournalRef(SInt16 value) TWOWORDINLINE(0x31DF, 0x08E8);
+
+
+EXTERN_API( SInt16 ) LMGetCrsrThresh(void) TWOWORDINLINE(0x3EB8, 0x08EC);
+
+EXTERN_API( void ) LMSetCrsrThresh(SInt16 value) TWOWORDINLINE(0x31DF, 0x08EC);
+
+
+EXTERN_API( UniversalProcPtr ) LMGetJFetch(void) TWOWORDINLINE(0x2EB8, 0x08F4);
+
+EXTERN_API( void ) LMSetJFetch(UniversalProcPtr value) TWOWORDINLINE(0x21DF, 0x08F4);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( UniversalProcPtr ) LMGetJStash(void) TWOWORDINLINE(0x2EB8, 0x08F8);
+
+EXTERN_API( void ) LMSetJStash(UniversalProcPtr value) TWOWORDINLINE(0x21DF, 0x08F8);
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( UniversalProcPtr ) LMGetJIODone(void) TWOWORDINLINE(0x2EB8, 0x08FC);
+
+EXTERN_API( void ) LMSetJIODone(UniversalProcPtr value) TWOWORDINLINE(0x21DF, 0x08FC);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( SInt16 ) LMGetCurApRefNum(void) TWOWORDINLINE(0x3EB8, 0x0900);
+
+EXTERN_API( void ) LMSetCurApRefNum(SInt16 value) TWOWORDINLINE(0x31DF, 0x0900);
+
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( Ptr ) LMGetCurrentA5(void) TWOWORDINLINE(0x2EB8, 0x0904);
+
+EXTERN_API( void ) LMSetCurrentA5(Ptr value) TWOWORDINLINE(0x21DF, 0x0904);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( Ptr ) LMGetCurStackBase(void) TWOWORDINLINE(0x2EB8, 0x0908);
+
+EXTERN_API( void ) LMSetCurStackBase(Ptr value) TWOWORDINLINE(0x21DF, 0x0908);
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( SInt16 ) LMGetCurJTOffset(void) TWOWORDINLINE(0x3EB8, 0x0934);
+
+EXTERN_API( void ) LMSetCurJTOffset(SInt16 value) TWOWORDINLINE(0x31DF, 0x0934);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( SInt16 ) LMGetCurPageOption(void) TWOWORDINLINE(0x3EB8, 0x0936);
+
+EXTERN_API( void ) LMSetCurPageOption(SInt16 value) TWOWORDINLINE(0x31DF, 0x0936);
+
+
+EXTERN_API( UInt8 ) LMGetHiliteMode(void) TWOWORDINLINE(0x1EB8, 0x0938);
+
+EXTERN_API( void ) LMSetHiliteMode(UInt8 value) TWOWORDINLINE(0x11DF, 0x0938);
+
+
+EXTERN_API( SInt16 ) LMGetPrintErr(void) TWOWORDINLINE(0x3EB8, 0x0944);
+
+EXTERN_API( void ) LMSetPrintErr(SInt16 value) TWOWORDINLINE(0x31DF, 0x0944);
+
+
+#if CALL_NOT_IN_CARBON
+/* Carbon Scrap Manager does not support low memory.*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( SInt32 ) LMGetScrapSize(void) TWOWORDINLINE(0x2EB8, 0x0960);
+
+EXTERN_API( void ) LMSetScrapSize(SInt32 value) TWOWORDINLINE(0x21DF, 0x0960);
+
+EXTERN_API( Handle ) LMGetScrapHandle(void) TWOWORDINLINE(0x2EB8, 0x0964);
+
+EXTERN_API( void ) LMSetScrapHandle(Handle value) TWOWORDINLINE(0x21DF, 0x0964);
+
+EXTERN_API( SInt16 ) LMGetScrapCount(void) TWOWORDINLINE(0x3EB8, 0x0968);
+
+EXTERN_API( void ) LMSetScrapCount(SInt16 value) TWOWORDINLINE(0x31DF, 0x0968);
+
+EXTERN_API( SInt16 ) LMGetScrapState(void) TWOWORDINLINE(0x3EB8, 0x096A);
+
+EXTERN_API( void ) LMSetScrapState(SInt16 value) TWOWORDINLINE(0x31DF, 0x096A);
+
+EXTERN_API( StringPtr ) LMGetScrapName(void) TWOWORDINLINE(0x2EB8, 0x096C);
+
+EXTERN_API( void ) LMSetScrapName(StringPtr value) TWOWORDINLINE(0x21DF, 0x096C);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( Handle ) LMGetROMFont0(void) TWOWORDINLINE(0x2EB8, 0x0980);
+
+EXTERN_API( void ) LMSetROMFont0(Handle value) TWOWORDINLINE(0x21DF, 0x0980);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( SInt16 ) LMGetApFontID(void) TWOWORDINLINE(0x3EB8, 0x0984);
+
+EXTERN_API( void ) LMSetApFontID(SInt16 value) TWOWORDINLINE(0x31DF, 0x0984);
+
+
+#if CALL_NOT_IN_CARBON
+/* Carbon versions of the Window Manager do not support LowMem. */
+/* Carbon Usage: use GetWindowList*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( WindowPtr ) LMGetWindowList(void) TWOWORDINLINE(0x2EB8, 0x09D6);
+
+EXTERN_API( SInt16 ) LMGetSaveUpdate(void) TWOWORDINLINE(0x3EB8, 0x09DA);
+
+EXTERN_API( void ) LMSetSaveUpdate(SInt16 value) TWOWORDINLINE(0x31DF, 0x09DA);
+
+EXTERN_API( SInt16 ) LMGetPaintWhite(void) TWOWORDINLINE(0x3EB8, 0x09DC);
+
+/* Carbon Usage : use InstallWindowContentPaintProc*/
+EXTERN_API( void ) LMSetPaintWhite(SInt16 value) TWOWORDINLINE(0x31DF, 0x09DC);
+
+EXTERN_API( GrafPtr ) LMGetWMgrPort(void) TWOWORDINLINE(0x2EB8, 0x09DE);
+
+EXTERN_API( void ) LMSetWMgrPort(GrafPtr value) TWOWORDINLINE(0x21DF, 0x09DE);
+
+/* Carbon Usage: use GetGrayRgn*/
+EXTERN_API( RgnHandle ) LMGetGrayRgn(void) TWOWORDINLINE(0x2EB8, 0x09EE);
+
+EXTERN_API( DragGrayRgnUPP ) LMGetDragHook(void) TWOWORDINLINE(0x2EB8, 0x09F6);
+
+EXTERN_API( void ) LMSetDragHook(DragGrayRgnUPP value) TWOWORDINLINE(0x21DF, 0x09F6);
+
+EXTERN_API( void ) LMSetWindowList(WindowPtr value) TWOWORDINLINE(0x21DF, 0x09D6);
+
+EXTERN_API( WindowPtr ) LMGetGhostWindow(void) TWOWORDINLINE(0x2EB8, 0x0A84);
+
+EXTERN_API( void ) LMSetGhostWindow(WindowPtr value) TWOWORDINLINE(0x21DF, 0x0A84);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if !OPAQUE_TOOLBOX_STRUCTS
+#if CALL_NOT_IN_CARBON
+EXTERN_API( AuxWinHandle ) LMGetAuxWinHead(void) TWOWORDINLINE(0x2EB8, 0x0CD0);
+
+EXTERN_API( void ) LMSetAuxWinHead(AuxWinHandle value) TWOWORDINLINE(0x21DF, 0x0CD0);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* !OPAQUE_TOOLBOX_STRUCTS */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( WindowPtr ) LMGetCurActivate(void) TWOWORDINLINE(0x2EB8, 0x0A64);
+
+EXTERN_API( void ) LMSetCurActivate(WindowPtr value) TWOWORDINLINE(0x21DF, 0x0A64);
+
+EXTERN_API( WindowPtr ) LMGetCurDeactive(void) TWOWORDINLINE(0x2EB8, 0x0A68);
+
+EXTERN_API( void ) LMSetCurDeactive(WindowPtr value) TWOWORDINLINE(0x21DF, 0x0A68);
+
+EXTERN_API( RgnHandle ) LMGetOldStructure(void) TWOWORDINLINE(0x2EB8, 0x09E6);
+
+EXTERN_API( void ) LMSetOldStructure(RgnHandle value) TWOWORDINLINE(0x21DF, 0x09E6);
+
+EXTERN_API( RgnHandle ) LMGetOldContent(void) TWOWORDINLINE(0x2EB8, 0x09EA);
+
+EXTERN_API( void ) LMSetOldContent(RgnHandle value) TWOWORDINLINE(0x21DF, 0x09EA);
+
+EXTERN_API( void ) LMSetGrayRgn(RgnHandle value) TWOWORDINLINE(0x21DF, 0x09EE);
+
+EXTERN_API( RgnHandle ) LMGetSaveVisRgn(void) TWOWORDINLINE(0x2EB8, 0x09F2);
+
+EXTERN_API( void ) LMSetSaveVisRgn(RgnHandle value) TWOWORDINLINE(0x21DF, 0x09F2);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( SInt32 ) LMGetOneOne(void) TWOWORDINLINE(0x2EB8, 0x0A02);
+
+EXTERN_API( void ) LMSetOneOne(SInt32 value) TWOWORDINLINE(0x21DF, 0x0A02);
+
+
+EXTERN_API( SInt32 ) LMGetMinusOne(void) TWOWORDINLINE(0x2EB8, 0x0A06);
+
+EXTERN_API( void ) LMSetMinusOne(SInt32 value) TWOWORDINLINE(0x21DF, 0x0A06);
+
+
+#if CALL_NOT_IN_CARBON
+/* Carbon Usage: use GetMenuTrackingData*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( SInt16 ) LMGetTopMenuItem(void) TWOWORDINLINE(0x3EB8, 0x0A0A);
+
+/* Carbon Usage: replaced by MDEF messages and GetMenuTrackingData API*/
+EXTERN_API( void ) LMSetTopMenuItem(SInt16 value) TWOWORDINLINE(0x31DF, 0x0A0A);
+
+/* Carbon Usage: use GetMenuTrackingData*/
+EXTERN_API( SInt16 ) LMGetAtMenuBottom(void) TWOWORDINLINE(0x3EB8, 0x0A0C);
+
+/* Carbon Usage: replaced by MDEF messages and GetMenuTrackingData API*/
+EXTERN_API( void ) LMSetAtMenuBottom(SInt16 value) TWOWORDINLINE(0x31DF, 0x0A0C);
+
+
+EXTERN_API( Handle ) LMGetMenuList(void) TWOWORDINLINE(0x2EB8, 0x0A1C);
+
+EXTERN_API( void ) LMSetMenuList(Handle value) TWOWORDINLINE(0x21DF, 0x0A1C);
+
+
+EXTERN_API( SInt16 ) LMGetMBarEnable(void) TWOWORDINLINE(0x3EB8, 0x0A20);
+
+EXTERN_API( void ) LMSetMBarEnable(SInt16 value) TWOWORDINLINE(0x31DF, 0x0A20);
+
+
+EXTERN_API( SInt16 ) LMGetMenuFlash(void) TWOWORDINLINE(0x3EB8, 0x0A24);
+
+EXTERN_API( void ) LMSetMenuFlash(SInt16 value) TWOWORDINLINE(0x31DF, 0x0A24);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( SInt16 ) LMGetTheMenu(void) TWOWORDINLINE(0x3EB8, 0x0A26);
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void ) LMSetTheMenu(SInt16 value) TWOWORDINLINE(0x31DF, 0x0A26);
+
+EXTERN_API( MBarHookUPP ) LMGetMBarHook(void) TWOWORDINLINE(0x2EB8, 0x0A2C);
+
+EXTERN_API( void ) LMSetMBarHook(MBarHookUPP value) TWOWORDINLINE(0x21DF, 0x0A2C);
+
+
+EXTERN_API( MenuHookUPP ) LMGetMenuHook(void) TWOWORDINLINE(0x2EB8, 0x0A30);
+
+EXTERN_API( void ) LMSetMenuHook(MenuHookUPP value) TWOWORDINLINE(0x21DF, 0x0A30);
+
+EXTERN_API( Handle ) LMGetTopMapHndl(void) TWOWORDINLINE(0x2EB8, 0x0A50);
+
+EXTERN_API( void ) LMSetTopMapHndl(Handle value) TWOWORDINLINE(0x21DF, 0x0A50);
+
+
+EXTERN_API( Handle ) LMGetSysMapHndl(void) TWOWORDINLINE(0x2EB8, 0x0A54);
+
+EXTERN_API( void ) LMSetSysMapHndl(Handle value) TWOWORDINLINE(0x21DF, 0x0A54);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( SInt16 ) LMGetSysMap(void) TWOWORDINLINE(0x3EB8, 0x0A58);
+
+EXTERN_API( void ) LMSetSysMap(SInt16 value) TWOWORDINLINE(0x31DF, 0x0A58);
+
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( SInt16 ) LMGetCurMap(void) TWOWORDINLINE(0x3EB8, 0x0A5A);
+
+EXTERN_API( void ) LMSetCurMap(SInt16 value) TWOWORDINLINE(0x31DF, 0x0A5A);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( UInt8 ) LMGetResLoad(void) TWOWORDINLINE(0x1EB8, 0x0A5E);
+
+EXTERN_API( void ) LMSetResLoad(UInt8 value) TWOWORDINLINE(0x11DF, 0x0A5E);
+
+
+EXTERN_API( SInt16 ) LMGetResErr(void) TWOWORDINLINE(0x3EB8, 0x0A60);
+
+EXTERN_API( void ) LMSetResErr(SInt16 value) TWOWORDINLINE(0x31DF, 0x0A60);
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( UInt8 ) LMGetFScaleDisable(void) TWOWORDINLINE(0x1EB8, 0x0A63);
+
+EXTERN_API( void ) LMSetFScaleDisable(UInt8 value) TWOWORDINLINE(0x11DF, 0x0A63);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( UniversalProcPtr ) LMGetDeskHook(void) TWOWORDINLINE(0x2EB8, 0x0A6C);
+
+EXTERN_API( void ) LMSetDeskHook(UniversalProcPtr value) TWOWORDINLINE(0x21DF, 0x0A6C);
+
+
+/* Carbon Usage: Use TEGetDoTextHook.*/
+EXTERN_API( UniversalProcPtr ) LMGetTEDoText(void) TWOWORDINLINE(0x2EB8, 0x0A70);
+
+/* Carbon Usage: Use TESetDoTextHook.*/
+EXTERN_API( void ) LMSetTEDoText(UniversalProcPtr value) TWOWORDINLINE(0x21DF, 0x0A70);
+
+
+/* Carbon Usage: Use TEGetRecalcHook.*/
+EXTERN_API( UniversalProcPtr ) LMGetTERecal(void) TWOWORDINLINE(0x2EB8, 0x0A74);
+
+/* Carbon Usage: Use TESetRecalcHook.*/
+EXTERN_API( void ) LMSetTERecal(UniversalProcPtr value) TWOWORDINLINE(0x21DF, 0x0A74);
+
+EXTERN_API( UniversalProcPtr ) LMGetResumeProc(void) TWOWORDINLINE(0x2EB8, 0x0A8C);
+
+EXTERN_API( void ) LMSetResumeProc(UniversalProcPtr value) TWOWORDINLINE(0x21DF, 0x0A8C);
+
+EXTERN_API( SInt16 ) LMGetANumber(void) TWOWORDINLINE(0x3EB8, 0x0A98);
+
+EXTERN_API( void ) LMSetANumber(SInt16 value) TWOWORDINLINE(0x31DF, 0x0A98);
+
+/* Carbon Usage: Use GetAlertStage.*/
+EXTERN_API( SInt16 ) LMGetACount(void) TWOWORDINLINE(0x3EB8, 0x0A9A);
+
+/* Carbon Usage: Use ResetAlertStage.*/
+EXTERN_API( void ) LMSetACount(SInt16 value) TWOWORDINLINE(0x31DF, 0x0A9A);
+
+EXTERN_API( UniversalProcPtr ) LMGetDABeeper(void) TWOWORDINLINE(0x2EB8, 0x0A9C);
+
+EXTERN_API( void ) LMSetDABeeper(UniversalProcPtr value) TWOWORDINLINE(0x21DF, 0x0A9C);
+
+/* Carbon Usage: use TEGetScrapLength*/
+EXTERN_API( UInt16 ) LMGetTEScrpLength(void) TWOWORDINLINE(0x3EB8, 0x0AB0);
+
+/* Carbon Usage: use TESetScrapLength*/
+EXTERN_API( void ) LMSetTEScrpLength(UInt16 value) TWOWORDINLINE(0x31DF, 0x0AB0);
+
+
+/* Carbon Usage: use TEGetScrapHandle*/
+EXTERN_API( Handle ) LMGetTEScrpHandle(void) TWOWORDINLINE(0x2EB8, 0x0AB4);
+
+/* Carbon Usage: use TESetScrapHandle*/
+EXTERN_API( void ) LMSetTEScrpHandle(Handle value) TWOWORDINLINE(0x21DF, 0x0AB4);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( Handle ) LMGetAppParmHandle(void) TWOWORDINLINE(0x2EB8, 0x0AEC);
+
+EXTERN_API( void ) LMSetAppParmHandle(Handle value) TWOWORDINLINE(0x21DF, 0x0AEC);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( SInt16 ) LMGetDSErrCode(void) TWOWORDINLINE(0x3EB8, 0x0AF0);
+
+EXTERN_API( void ) LMSetDSErrCode(SInt16 value) TWOWORDINLINE(0x31DF, 0x0AF0);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( ResErrUPP ) LMGetResErrProc(void) TWOWORDINLINE(0x2EB8, 0x0AF2);
+
+EXTERN_API( void ) LMSetResErrProc(ResErrUPP value) TWOWORDINLINE(0x21DF, 0x0AF2);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( SInt16 ) LMGetDlgFont(void) TWOWORDINLINE(0x3EB8, 0x0AFA);
+
+/* Carbon Usage: use SetDialogFont*/
+EXTERN_API( void ) LMSetDlgFont(SInt16 value) TWOWORDINLINE(0x31DF, 0x0AFA);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( Ptr ) LMGetWidthPtr(void) TWOWORDINLINE(0x2EB8, 0x0B10);
+
+EXTERN_API( void ) LMSetWidthPtr(Ptr value) TWOWORDINLINE(0x21DF, 0x0B10);
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( Ptr ) LMGetATalkHk2(void) TWOWORDINLINE(0x2EB8, 0x0B18);
+
+EXTERN_API( void ) LMSetATalkHk2(Ptr value) TWOWORDINLINE(0x21DF, 0x0B18);
+
+
+EXTERN_API( SInt16 ) LMGetHWCfgFlags(void) TWOWORDINLINE(0x3EB8, 0x0B22);
+
+EXTERN_API( void ) LMSetHWCfgFlags(SInt16 value) TWOWORDINLINE(0x31DF, 0x0B22);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( Handle ) LMGetWidthTabHandle(void) TWOWORDINLINE(0x2EB8, 0x0B2A);
+
+EXTERN_API( void ) LMSetWidthTabHandle(Handle value) TWOWORDINLINE(0x21DF, 0x0B2A);
+
+
+EXTERN_API( SInt32 ) LMGetLastSPExtra(void) TWOWORDINLINE(0x2EB8, 0x0B4C);
+
+EXTERN_API( void ) LMSetLastSPExtra(SInt32 value) TWOWORDINLINE(0x21DF, 0x0B4C);
+
+
+#if CALL_NOT_IN_CARBON
+/* Carbon Usage: use GetMenuTrackingData*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( SInt32 ) LMGetMenuDisable(void) TWOWORDINLINE(0x2EB8, 0x0B54);
+
+/* Carbon Usage: use new MDEF messages*/
+EXTERN_API( void ) LMSetMenuDisable(SInt32 value) TWOWORDINLINE(0x21DF, 0x0B54);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( UInt8 ) LMGetROMMapInsert(void) TWOWORDINLINE(0x1EB8, 0x0B9E);
+
+EXTERN_API( void ) LMSetROMMapInsert(UInt8 value) TWOWORDINLINE(0x11DF, 0x0B9E);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( UInt8 ) LMGetTmpResLoad(void) TWOWORDINLINE(0x1EB8, 0x0B9F);
+
+EXTERN_API( void ) LMSetTmpResLoad(UInt8 value) TWOWORDINLINE(0x11DF, 0x0B9F);
+
+
+EXTERN_API( Ptr ) LMGetIntlSpec(void) TWOWORDINLINE(0x2EB8, 0x0BA0);
+
+EXTERN_API( void ) LMSetIntlSpec(Ptr value) TWOWORDINLINE(0x21DF, 0x0BA0);
+
+
+EXTERN_API( UInt8 ) LMGetWordRedraw(void) TWOWORDINLINE(0x1EB8, 0x0BA5);
+
+EXTERN_API( void ) LMSetWordRedraw(UInt8 value) TWOWORDINLINE(0x11DF, 0x0BA5);
+
+
+EXTERN_API( SInt16 ) LMGetSysFontFam(void) TWOWORDINLINE(0x3EB8, 0x0BA6);
+
+EXTERN_API( void ) LMSetSysFontFam(SInt16 value) TWOWORDINLINE(0x31DF, 0x0BA6);
+
+
+EXTERN_API( SInt16 ) LMGetSysFontSize(void) TWOWORDINLINE(0x3EB8, 0x0BA8);
+
+EXTERN_API( void ) LMSetSysFontSize(SInt16 value) TWOWORDINLINE(0x31DF, 0x0BA8);
+
+
+#if CALL_NOT_IN_CARBON
+/* Carbon Usge: use GetMBarHeight*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( SInt16 ) LMGetMBarHeight(void) TWOWORDINLINE(0x3EB8, 0x0BAA);
+
+/* Carbon Usage: use Hide/ShowMenuBar*/
+EXTERN_API( void ) LMSetMBarHeight(SInt16 value) TWOWORDINLINE(0x31DF, 0x0BAA);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( SInt16 ) LMGetTESysJust(void) TWOWORDINLINE(0x3EB8, 0x0BAC);
+
+EXTERN_API( void ) LMSetTESysJust(SInt16 value) TWOWORDINLINE(0x31DF, 0x0BAC);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( Handle ) LMGetLastFOND(void) TWOWORDINLINE(0x2EB8, 0x0BC2);
+
+EXTERN_API( void ) LMSetLastFOND(Handle value) TWOWORDINLINE(0x21DF, 0x0BC2);
+
+
+EXTERN_API( UInt8 ) LMGetFractEnable(void) TWOWORDINLINE(0x1EB8, 0x0BF4);
+
+EXTERN_API( void ) LMSetFractEnable(UInt8 value) TWOWORDINLINE(0x11DF, 0x0BF4);
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( UInt8 ) LMGetMMU32Bit(void) TWOWORDINLINE(0x1EB8, 0x0CB2);
+
+EXTERN_API( void ) LMSetMMU32Bit(UInt8 value) TWOWORDINLINE(0x11DF, 0x0CB2);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( GDHandle ) LMGetTheGDevice(void) TWOWORDINLINE(0x2EB8, 0x0CC8);
+
+EXTERN_API( void ) LMSetTheGDevice(GDHandle value) TWOWORDINLINE(0x21DF, 0x0CC8);
+
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( PixPatHandle ) LMGetDeskCPat(void) TWOWORDINLINE(0x2EB8, 0x0CD8);
+
+EXTERN_API( void ) LMSetDeskCPat(PixPatHandle value) TWOWORDINLINE(0x21DF, 0x0CD8);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( SInt16 ) LMGetTimeDBRA(void) TWOWORDINLINE(0x3EB8, 0x0D00);
+
+EXTERN_API( void ) LMSetTimeDBRA(SInt16 value) TWOWORDINLINE(0x31DF, 0x0D00);
+
+
+EXTERN_API( SInt16 ) LMGetTimeSCCDB(void) TWOWORDINLINE(0x3EB8, 0x0D02);
+
+EXTERN_API( void ) LMSetTimeSCCDB(SInt16 value) TWOWORDINLINE(0x31DF, 0x0D02);
+
+
+EXTERN_API( UniversalProcPtr ) LMGetJVBLTask(void) TWOWORDINLINE(0x2EB8, 0x0D28);
+
+EXTERN_API( void ) LMSetJVBLTask(UniversalProcPtr value) TWOWORDINLINE(0x21DF, 0x0D28);
+
+
+EXTERN_API( Handle ) LMGetSynListHandle(void) TWOWORDINLINE(0x2EB8, 0x0D32);
+
+EXTERN_API( void ) LMSetSynListHandle(Handle value) TWOWORDINLINE(0x21DF, 0x0D32);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( MCTableHandle ) LMGetMenuCInfo(void) TWOWORDINLINE(0x2EB8, 0x0D50);
+
+EXTERN_API( void ) LMSetMenuCInfo(MCTableHandle value) TWOWORDINLINE(0x21DF, 0x0D50);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( UniversalProcPtr ) LMGetJDTInstall(void) TWOWORDINLINE(0x2EB8, 0x0D9C);
+
+EXTERN_API( void ) LMSetJDTInstall(UniversalProcPtr value) TWOWORDINLINE(0x21DF, 0x0D9C);
+
+
+EXTERN_API( SInt16 ) LMGetTimeSCSIDB(void) TWOWORDINLINE(0x3EB8, 0x0B24);
+
+EXTERN_API( void ) LMSetTimeSCSIDB(SInt16 value) TWOWORDINLINE(0x31DF, 0x0B24);
+
+
+
+/**************************************************************************************
+
+ MORE COMPLEX LOWMEM ACCESSORS
+
+**************************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+#if TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+/**************************************************************************************
+ "BIG DATA"
+
+ These lowmem accessors access big (> 4 bytes) values.
+**************************************************************************************/
+#define LMGetDSAlertRect(dsAlertRectValue) (*(dsAlertRectValue) = * (Rect*) 0x03F8)
+#define LMSetDSAlertRect(dsAlertRectValue) ((* (Rect *) 0x03F8) = *(dsAlertRectValue))
+#define LMGetDragPattern(dragPatternValue) (*(dragPatternValue) = * (Pattern *) 0x0A34)
+#define LMSetDragPattern(dragPatternValue) ((* (Pattern *) 0x0A34) = *(dragPatternValue))
+#define LMGetDeskPattern(deskPatternValue) (*(deskPatternValue) = * (Pattern *) 0x0A3C)
+#define LMSetDeskPattern(deskPatternValue) ((* (Pattern *) 0x0A3C) = *(deskPatternValue))
+#define LMGetHiliteRGB(hiliteRGBValue) (*(hiliteRGBValue) = *(RGBColor*)0x0DA0)
+#define LMSetHiliteRGB(hiliteRGBValue) ((* (RGBColor *) 0x0DA0) = *(hiliteRGBValue))
+#define LMGetEventQueue() ( (QHdrPtr) 0x014A)
+#define LMSetEventQueue(eventQueueValue) ((* (QHdrPtr) 0x014A) = *(QHdrPtr)(eventQueueValue))
+#define LMGetVBLQueue() ( (QHdrPtr) 0x0160)
+#define LMSetVBLQueue(vblQueueValue) ((* (QHdrPtr) 0x0160) = *(QHdrPtr)(vblQueueValue))
+#define LMGetDrvQHdr() ( (QHdrPtr) 0x0308)
+#define LMSetDrvQHdr(drvQHdrValue) ((* (QHdrPtr) 0x0308) = *(QHdrPtr)(drvQHdrValue))
+#define LMGetVCBQHdr() ( (QHdrPtr) 0x0356)
+#define LMSetVCBQHdr(vcbQHdrValue) ((* (QHdrPtr) 0x0356) = *(QHdrPtr)(vcbQHdrValue))
+#define LMGetDTQueue() ( (QHdrPtr) 0x0D92)
+#define LMSetDTQueue(dtQueueValue) ((* (QHdrPtr) 0x0D92) = *(QHdrPtr)(dtQueueValue))
+#define LMGetFSQHdr() ( (QHdrPtr) 0x0360)
+/**************************************************************************************
+ "BLOCKMOVE ACCESSORS"
+
+ These lowmem accessors use the BlockMove to set
+**************************************************************************************/
+#define LMGetCurApName() ((StringPtr) 0x0910)
+#define LMSetCurApName(curApNameValue) (BlockMoveData((Ptr)(curApNameValue), (Ptr)0x0910, sizeof(Str31)))
+#define LMGetSysResName() ( (StringPtr) 0x0AD8)
+#define LMSetSysResName(sysResNameValue) (BlockMoveData((Ptr)(sysResNameValue), (Ptr)0x0AD8, sizeof(Str15)))
+#define LMGetFinderName() ((StringPtr)0x02E0)
+#define LMSetFinderName(finderName) (BlockMoveData((Ptr)(finderName), (Ptr)0x02E0, sizeof(Str15)))
+#define LMGetScratch20() ((Ptr) 0x01E4)
+#define LMSetScratch20(scratch20Value) (BlockMoveData((Ptr) (scratch20Value), (Ptr) 0x01E4, 20))
+#define LMGetToolScratch() ((Ptr) 0x09CE)
+#define LMSetToolScratch(toolScratchValue) (BlockMoveData((Ptr)(toolScratchValue), (Ptr) 0x09CE, 8))
+#define LMGetApplScratch() ((Ptr) 0x0A78)
+#define LMSetApplScratch(applScratchValue) (BlockMoveData((Ptr) (applScratchValue), (Ptr) 0x0A78, 12))
+/**************************************************************************************
+ "INDEXED ACCESSORS"
+
+ These lowmem accessors take an index parameter to get/set an indexed
+ lowmem global.
+**************************************************************************************/
+#if CALL_NOT_IN_CARBON
+/*************************************************************************************
+ The DAString accessors are gone with Carbon. Please use ParamText and
+ GetParamText instead.
+**************************************************************************************/
+#define LMGetDAStrings(whichString) ( ((StringHandle*)0x0AA0)[whichString] )
+#define LMSetDAStrings(stringsValue, whichString) ( ((StringHandle*)0x0AA0)[whichString] = (stringsValue) )
+#endif /* CALL_NOT_IN_CARBON */
+
+#define LMGetLvl2DT(vectorNumber) ( ((UniversalProcPtr*)0x01B2)[vectorNumber] )
+#define LMSetLvl2DT(lvl2DTValue, vectorNumber) ( ((UniversalProcPtr*)0x01B2)[vectorNumber] = (lvl2DTValue) )
+#define LMGetExtStsDT(vectorNumber) ( ((UniversalProcPtr*)0x02BE)[vectorNumber] )
+#define LMSetExtStsDT(extStsDTValue, vectorNumber) ( ((UniversalProcPtr*)0x02BE)[vectorNumber] = (extStsDTValue) )
+
+#else
+/**************************************************************************************
+ "BIG DATA"
+
+ These lowmem accessors access big (> 4 bytes) values.
+**************************************************************************************/
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void ) LMGetDSAlertRect(Rect *dsAlertRectValue);
+
+EXTERN_API( void ) LMSetDSAlertRect(const Rect *dsAlertRectValue);
+
+EXTERN_API( void ) LMGetDragPattern(Pattern *dragPatternValue);
+
+EXTERN_API( void ) LMSetDragPattern(const Pattern *dragPatternValue);
+
+EXTERN_API( void ) LMGetDeskPattern(Pattern *deskPatternValue);
+
+EXTERN_API( void ) LMSetDeskPattern(const Pattern *deskPatternValue);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( void ) LMGetHiliteRGB(RGBColor *hiliteRGBValue);
+
+EXTERN_API( void ) LMSetHiliteRGB(const RGBColor *hiliteRGBValue);
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( QHdrPtr ) LMGetEventQueue(void );
+
+EXTERN_API( void ) LMSetEventQueue(QHdrPtr eventQueueValue);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( QHdrPtr ) LMGetVBLQueue(void );
+
+EXTERN_API( void ) LMSetVBLQueue(QHdrPtr vblQueueValue);
+
+EXTERN_API( QHdrPtr ) LMGetDrvQHdr(void );
+
+EXTERN_API( void ) LMSetDrvQHdr(QHdrPtr drvQHdrValue);
+
+EXTERN_API( QHdrPtr ) LMGetVCBQHdr(void );
+
+EXTERN_API( void ) LMSetVCBQHdr(QHdrPtr vcbQHdrValue);
+
+EXTERN_API( QHdrPtr ) LMGetDTQueue(void );
+
+EXTERN_API( void ) LMSetDTQueue(QHdrPtr dtQueueValue);
+
+EXTERN_API( QHdrPtr ) LMGetFSQHdr(void );
+
+/**************************************************************************************
+ "BLOCKMOVE ACCESSORS"
+
+ These lowmem accessors use the BlockMove to set
+**************************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( StringPtr ) LMGetCurApName(void );
+
+EXTERN_API( void ) LMSetCurApName(ConstStr31Param curApNameValue);
+
+EXTERN_API( StringPtr ) LMGetSysResName(void );
+
+EXTERN_API( void ) LMSetSysResName(ConstStr15Param sysResNameValue);
+
+EXTERN_API( StringPtr ) LMGetFinderName(void );
+
+EXTERN_API( void ) LMSetFinderName(ConstStr15Param finderNameValue);
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( Ptr ) LMGetScratch20(void );
+
+EXTERN_API( void ) LMSetScratch20(const void *scratch20Value);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( Ptr ) LMGetToolScratch(void );
+
+EXTERN_API( void ) LMSetToolScratch(const void *toolScratchValue);
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( Ptr ) LMGetApplScratch(void );
+
+EXTERN_API( void ) LMSetApplScratch(const void *applScratchValue);
+
+
+/**************************************************************************************
+ "INDEXED ACCESSORS"
+
+ These lowmem accessors take an index parameter to get/set an indexed
+ lowmem global.
+**************************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+/* Carbon Usage: use GetParamText*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( StringHandle ) LMGetDAStrings(short whichString);
+
+/* Carbon Usage: use ParamText*/
+EXTERN_API( void ) LMSetDAStrings(StringHandle stringsValue, short whichString);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( UniversalProcPtr ) LMGetLvl2DT(short vectorNumber);
+
+EXTERN_API( void ) LMSetLvl2DT(UniversalProcPtr Lvl2DTValue, short vectorNumber);
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( UniversalProcPtr ) LMGetExtStsDT(short vectorNumber);
+
+EXTERN_API( void ) LMSetExtStsDT(UniversalProcPtr ExtStsDTValue, short vectorNumber);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_CPU_68K && !TARGET_RT_MAC_CFM */
+
+/**************************************************************************************
+ "Missing Accessors"
+
+ These lowmem accessors are not in the original InterfaceLib. They were
+ added to InterfaceLib in Mac OS 8.5. In Universal Interfaces 3.2 they
+ were defined via a macro. In you want to use these functions on a pre-8.5
+ systems, you must write your own macros to override the function prototype
+ or write your own implementation.
+
+**************************************************************************************/
+/* accesses "CrsrNew"*/
+EXTERN_API( Boolean ) LMGetCursorNew(void) TWOWORDINLINE(0x1EB8, 0x08CE);
+
+EXTERN_API( void ) LMSetCursorNew(Boolean value) TWOWORDINLINE(0x11DF, 0x08CE);
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void ) LMSetMouseTemp(Point value) TWOWORDINLINE(0x21DF, 0x0828);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+/* accesses "MTemp"*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( Point ) LMGetMouseTemp(void) TWOWORDINLINE(0x2EB8, 0x0828);
+
+/*
+ accesses "MBState"
+ Carbon Usage: use Button()
+*/
+EXTERN_API( UInt8 ) LMGetMouseButtonState(void) TWOWORDINLINE(0x1EB8, 0x0172);
+
+EXTERN_API( void ) LMSetMouseButtonState(UInt8 value) TWOWORDINLINE(0x11DF, 0x0172);
+
+/*
+ accesses "RawMouse"
+ Carbon Usage: use GetGlobalMouse
+*/
+EXTERN_API( Point ) LMGetRawMouseLocation(void) TWOWORDINLINE(0x2EB8, 0x082C);
+
+/* Carbon Usage: use GetGlobalMouse*/
+EXTERN_API( void ) LMSetRawMouseLocation(Point value) TWOWORDINLINE(0x21DF, 0x082C);
+
+
+/*
+ accesses "Mouse"
+ Carbon Usage: use GetGlobalMouse
+*/
+EXTERN_API( Point ) LMGetMouseLocation(void) TWOWORDINLINE(0x2EB8, 0x0830);
+
+EXTERN_API( void ) LMSetMouseLocation(Point value) TWOWORDINLINE(0x21DF, 0x0830);
+
+/* accesses "TheCrsr"*/
+EXTERN_API_C( void ) LMGetTheCursor(Cursor *currentCursor);
+
+EXTERN_API_C( void ) LMSetTheCursor(const Cursor *newCursor);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+/* accesses "HiHeapMark"*/
+EXTERN_API( Ptr ) LMGetHighHeapMark(void) TWOWORDINLINE(0x2EB8, 0x0BAE);
+
+EXTERN_API( void ) LMSetHighHeapMark(Ptr value) TWOWORDINLINE(0x21DF, 0x0BAE);
+
+
+/* accesses "StkLowPt"*/
+EXTERN_API( Ptr ) LMGetStackLowPoint(void) TWOWORDINLINE(0x2EB8, 0x0110);
+
+EXTERN_API( void ) LMSetStackLowPoint(Ptr value) TWOWORDINLINE(0x21DF, 0x0110);
+
+
+/* accesses "ROMMapHndl"*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( Handle ) LMGetROMMapHandle(void) TWOWORDINLINE(0x2EB8, 0x0B06);
+
+EXTERN_API( void ) LMSetROMMapHandle(Handle value) TWOWORDINLINE(0x21DF, 0x0B06);
+
+
+/* accesses "UnitNtryCnt"*/
+EXTERN_API( short ) LMGetUnitTableEntryCount(void) TWOWORDINLINE(0x3EB8, 0x01D2);
+
+EXTERN_API( void ) LMSetUnitTableEntryCount(short value) TWOWORDINLINE(0x31DF, 0x01D2);
+
+
+/* accesses "FmtDefaults"*/
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( Ptr ) LMGetDiskFormatingHFSDefaults(void) TWOWORDINLINE(0x2EB8, 0x039E);
+
+EXTERN_API( void ) LMSetDiskFormatingHFSDefaults(Ptr value) TWOWORDINLINE(0x21DF, 0x039E);
+
+
+/* accesses "PortAUse"*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( UInt8 ) LMGetPortAInfo(void) TWOWORDINLINE(0x1EB8, 0x0290);
+
+EXTERN_API( void ) LMSetPortAInfo(UInt8 value) TWOWORDINLINE(0x11DF, 0x0290);
+
+
+EXTERN_API( long ) LMGetMBTicks(void) TWOWORDINLINE(0x2EB8, 0x016E);
+
+EXTERN_API( void ) LMSetMBTicks(long value) TWOWORDINLINE(0x21DF, 0x016E);
+
+
+EXTERN_API( long ) LMGetKeyTime(void) TWOWORDINLINE(0x2EB8, 0x0186);
+
+EXTERN_API( void ) LMSetKeyTime(long value) TWOWORDINLINE(0x21DF, 0x0186);
+
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __LOWMEM__ */
+
diff --git a/include/qt/MIDI.h b/include/qt/MIDI.h
new file mode 100644
index 000000000..ab1f97ec7
--- /dev/null
+++ b/include/qt/MIDI.h
@@ -0,0 +1,619 @@
+/*
+ File: MIDI.h
+
+ Contains: MIDI Manager Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1988-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __MIDI__
+#define __MIDI__
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*
+ * * * N O T E * * *
+
+ This file has been updated to include MIDI 2.0 interfaces.
+
+ The MIDI 2.0 interfaces were developed for the classic 68K runtime.
+ Since then, Apple has created the PowerPC and CFM 68K runtimes.
+ Currently, the extra functions in MIDI 2.0 are not in InterfaceLib
+ and thus not callable from PowerPC and CFM 68K runtimes (you'll
+ get a linker error).
+*/
+enum {
+ midiMaxNameLen = 31 /*maximum number of characters in port and client names*/
+};
+
+enum {
+ /* Time formats */
+ midiFormatMSec = 0, /*milliseconds*/
+ midiFormatBeats = 1, /*beats*/
+ midiFormat24fpsBit = 2, /*24 frames/sec.*/
+ midiFormat25fpsBit = 3, /*25 frames/sec.*/
+ midiFormat30fpsDBit = 4, /*30 frames/sec. drop-frame*/
+ midiFormat30fpsBit = 5, /*30 frames/sec.*/
+ midiFormat24fpsQF = 6, /*24 frames/sec. longInt format */
+ midiFormat25fpsQF = 7, /*25 frames/sec. longInt format */
+ midiFormat30fpsDQF = 8, /*30 frames/sec. drop-frame longInt format */
+ midiFormat30fpsQF = 9 /*30 frames/sec. longInt format */
+};
+
+enum {
+ midiInternalSync = 0, /*internal sync*/
+ midiExternalSync = 1 /*external sync*/
+};
+
+enum {
+ /* Port types*/
+ midiPortTypeTime = 0, /*time port*/
+ midiPortTypeInput = 1, /*input port*/
+ midiPortTypeOutput = 2, /*output port*/
+ midiPortTypeTimeInv = 3, /*invisible time port*/
+ midiPortInvisible = 0x8000, /*logical OR this to other types to make invisible ports*/
+ midiPortTypeMask = 0x0007 /*logical AND with this to convert new port types to old, i.e. to strip the property bits*/
+};
+
+enum {
+ /* OffsetTimes */
+ midiGetEverything = 0x7FFFFFFF, /*get all packets, regardless of time stamps*/
+ midiGetNothing = (long)0x80000000, /*get no packets, regardless of time stamps*/
+ midiGetCurrent = 0x00000000 /*get current packets only*/
+};
+
+/* MIDI data and messages are passed in MIDIPacket records (see below).
+ The first byte of every MIDIPacket contains a set of flags
+
+ bits 0-1 00 = new MIDIPacket, not continued
+ 01 = begining of continued MIDIPacket
+ 10 = end of continued MIDIPacket
+ 11 = continuation
+ bits 2-3 reserved
+
+ bits 4-6 000 = packet contains MIDI data
+
+ 001 = packet contains MIDI Manager message
+
+ bit 7 0 = MIDIPacket has valid stamp
+ 1 = stamp with current clock
+*/
+enum {
+ midiContMask = 0x03,
+ midiNoCont = 0x00,
+ midiStartCont = 0x01,
+ midiMidCont = 0x03,
+ midiEndCont = 0x02,
+ midiTypeMask = 0x70,
+ midiMsgType = 0x00,
+ midiMgrType = 0x10,
+ midiTimeStampMask = 0x80,
+ midiTimeStampCurrent = 0x80,
+ midiTimeStampValid = 0x00
+};
+
+enum {
+ /* MIDIPacket command words (the first word in the data field for midiMgrType messages) */
+ midiOverflowErr = 0x0001,
+ midiSCCErr = 0x0002,
+ midiPacketErr = 0x0003, /*all command words less than this value are error indicators*/
+ midiMaxErr = 0x00FF
+};
+
+enum {
+ /* Valid results to be returned by readHooks */
+ midiKeepPacket = 0,
+ midiMorePacket = 1,
+ midiNoMorePacket = 2,
+ midiHoldPacket = 3
+};
+
+enum {
+ /* Driver calls */
+ midiOpenDriver = 1,
+ midiCloseDriver = 2
+};
+
+enum {
+ mdvrAbortNotesOff = 0, /*abort previous mdvrNotesOff request*/
+ mdvrChanNotesOff = 1, /*generate channel note off messages*/
+ mdvrAllNotesOff = 2 /*generate all note off messages*/
+};
+
+enum {
+ mdvrStopOut = 0, /*stop calling MDVROut temporarily*/
+ mdvrStartOut = 1 /*resume calling MDVROut*/
+};
+
+
+struct MIDIPacket {
+ UInt8 flags;
+ UInt8 len;
+ long tStamp;
+ UInt8 data[249];
+};
+typedef struct MIDIPacket MIDIPacket;
+typedef MIDIPacket * MIDIPacketPtr;
+typedef CALLBACK_API( short , MIDIReadHookProcPtr )(MIDIPacketPtr myPacket, long myRefCon);
+typedef CALLBACK_API( void , MIDITimeProcPtr )(long curTime, long myRefCon);
+typedef CALLBACK_API( void , MIDIConnectionProcPtr )(short refnum, long refcon, short portType, OSType clientID, OSType portID, Boolean connect, short direction);
+typedef CALLBACK_API( long , MDVRCommProcPtr )(short refnum, short request, long refCon);
+typedef CALLBACK_API( void , MDVRTimeCodeProcPtr )(short refnum, short newFormat, long refCon);
+typedef CALLBACK_API( void , MDVRReadProcPtr )(char *midiChars, short length, long refCon);
+typedef STACK_UPP_TYPE(MIDIReadHookProcPtr) MIDIReadHookUPP;
+typedef STACK_UPP_TYPE(MIDITimeProcPtr) MIDITimeUPP;
+typedef STACK_UPP_TYPE(MIDIConnectionProcPtr) MIDIConnectionUPP;
+typedef STACK_UPP_TYPE(MDVRCommProcPtr) MDVRCommUPP;
+typedef STACK_UPP_TYPE(MDVRTimeCodeProcPtr) MDVRTimeCodeUPP;
+typedef STACK_UPP_TYPE(MDVRReadProcPtr) MDVRReadUPP;
+
+struct MIDIClkInfo {
+ short syncType; /*synchronization external/internal*/
+ long curTime; /*current value of port's clock*/
+ short format; /*time code format*/
+};
+typedef struct MIDIClkInfo MIDIClkInfo;
+
+struct MIDIIDRec {
+ OSType clientID;
+ OSType portID;
+};
+typedef struct MIDIIDRec MIDIIDRec;
+
+struct MIDIPortInfo {
+ short portType; /*type of port*/
+ MIDIIDRec timeBase; /*MIDIIDRec for time base*/
+ short numConnects; /*number of connections*/
+ MIDIIDRec cList[1]; /*ARRAY [1..numConnects] of MIDIIDRec*/
+};
+typedef struct MIDIPortInfo MIDIPortInfo;
+typedef MIDIPortInfo * MIDIPortInfoPtr;
+typedef MIDIPortInfoPtr * MIDIPortInfoHdl;
+typedef MIDIPortInfoPtr * MIDIPortInfoHandle;
+
+struct MIDIPortParams {
+ OSType portID; /*ID of port, unique within client*/
+ short portType; /*Type of port - input, output, time, etc.*/
+ short timeBase; /*refnum of time base, 0 if none*/
+ long offsetTime; /*offset for current time stamps*/
+ MIDIReadHookUPP readHook; /*routine to call when input data is valid*/
+ long refCon; /*refcon for port (for client use)*/
+ MIDIClkInfo initClock; /*initial settings for a time base*/
+ Str255 name; /*name of the port, This is a real live string, not a ptr.*/
+};
+typedef struct MIDIPortParams MIDIPortParams;
+typedef MIDIPortParams * MIDIPortParamsPtr;
+
+struct MIDIIDList {
+ short numIDs;
+ OSType list[1];
+};
+typedef struct MIDIIDList MIDIIDList;
+typedef MIDIIDList * MIDIIDListPtr;
+typedef MIDIIDListPtr * MIDIIDListHdl;
+typedef MIDIIDListPtr * MIDIIDListHandle;
+/* MDVR Control structs*/
+
+struct MDVRInCtlRec {
+ short timeCodeClock; /*refnum of time base for time code*/
+ short timeCodeFormat; /*format of time code output*/
+ MDVRReadUPP readProc; /*proc to call with intput characters*/
+ MDVRCommUPP commProc; /*proc to call for handshaking*/
+ long refCon; /*refCon passed to readProc, commProc*/
+};
+typedef struct MDVRInCtlRec MDVRInCtlRec;
+
+typedef MDVRInCtlRec * MDVRInCtlPtr;
+
+struct MDVROutCtlRec {
+ short timeCodeClock; /*time base driven by time code*/
+ short timeCodeFormat; /*format of time code to listen to*/
+ MDVRTimeCodeUPP timeCodeProc; /*proc called on time code fmt change*/
+ MDVRCommUPP commProc; /*proc called for handshaking*/
+ long refCon; /*refCon passed to timeCodeProc*/
+ Boolean timeCodeFilter; /*filter time code if true*/
+ UInt8 padding; /*unused pad byte*/
+ long midiMsgTicks; /*value of Ticks when MIDI msg rcvd*/
+ long timeCodeTicks; /*value of Ticks when time code rcvd*/
+};
+typedef struct MDVROutCtlRec MDVROutCtlRec;
+
+typedef MDVROutCtlRec * MDVROutCtlPtr;
+typedef void * MDVRPtr;
+#if CALL_NOT_IN_CARBON
+EXTERN_API( NumVersion )
+MIDIVersion (void) FOURWORDINLINE(0x203C, 0x0000, 0x0004, 0xA800);
+
+EXTERN_API( OSErr )
+MIDISignIn (OSType clientID,
+ long refCon,
+ Handle icon,
+ ConstStr255Param name) FOURWORDINLINE(0x203C, 0x0004, 0x0004, 0xA800);
+
+EXTERN_API( void )
+MIDISignOut (OSType clientID) FOURWORDINLINE(0x203C, 0x0008, 0x0004, 0xA800);
+
+EXTERN_API( MIDIIDListHandle )
+MIDIGetClients (void) FOURWORDINLINE(0x203C, 0x000C, 0x0004, 0xA800);
+
+EXTERN_API( void )
+MIDIGetClientName (OSType clientID,
+ Str255 name) FOURWORDINLINE(0x203C, 0x0010, 0x0004, 0xA800);
+
+EXTERN_API( void )
+MIDISetClientName (OSType clientID,
+ ConstStr255Param name) FOURWORDINLINE(0x203C, 0x0014, 0x0004, 0xA800);
+
+EXTERN_API( MIDIIDListHandle )
+MIDIGetPorts (OSType clientID) FOURWORDINLINE(0x203C, 0x0018, 0x0004, 0xA800);
+
+EXTERN_API( OSErr )
+MIDIAddPort (OSType clientID,
+ short BufSize,
+ short * refnum,
+ MIDIPortParamsPtr init) FOURWORDINLINE(0x203C, 0x001C, 0x0004, 0xA800);
+
+EXTERN_API( MIDIPortInfoHandle )
+MIDIGetPortInfo (OSType clientID,
+ OSType portID) FOURWORDINLINE(0x203C, 0x0020, 0x0004, 0xA800);
+
+EXTERN_API( OSErr )
+MIDIConnectData (OSType srcClID,
+ OSType srcPortID,
+ OSType dstClID,
+ OSType dstPortID) FOURWORDINLINE(0x203C, 0x0024, 0x0004, 0xA800);
+
+EXTERN_API( OSErr )
+MIDIUnConnectData (OSType srcClID,
+ OSType srcPortID,
+ OSType dstClID,
+ OSType dstPortID) FOURWORDINLINE(0x203C, 0x0028, 0x0004, 0xA800);
+
+EXTERN_API( OSErr )
+MIDIConnectTime (OSType srcClID,
+ OSType srcPortID,
+ OSType dstClID,
+ OSType dstPortID) FOURWORDINLINE(0x203C, 0x002C, 0x0004, 0xA800);
+
+EXTERN_API( OSErr )
+MIDIUnConnectTime (OSType srcClID,
+ OSType srcPortID,
+ OSType dstClID,
+ OSType dstPortID) FOURWORDINLINE(0x203C, 0x0030, 0x0004, 0xA800);
+
+EXTERN_API( void )
+MIDIFlush (short refnum) FOURWORDINLINE(0x203C, 0x0034, 0x0004, 0xA800);
+
+EXTERN_API( ProcPtr )
+MIDIGetReadHook (short refnum) FOURWORDINLINE(0x203C, 0x0038, 0x0004, 0xA800);
+
+EXTERN_API( void )
+MIDISetReadHook (short refnum,
+ ProcPtr hook) FOURWORDINLINE(0x203C, 0x003C, 0x0004, 0xA800);
+
+EXTERN_API( void )
+MIDIGetPortName (OSType clientID,
+ OSType portID,
+ Str255 name) FOURWORDINLINE(0x203C, 0x0040, 0x0004, 0xA800);
+
+EXTERN_API( void )
+MIDISetPortName (OSType clientID,
+ OSType portID,
+ ConstStr255Param name) FOURWORDINLINE(0x203C, 0x0044, 0x0004, 0xA800);
+
+EXTERN_API( void )
+MIDIWakeUp (short refnum,
+ long time,
+ long period,
+ MIDITimeUPP timeProc) FOURWORDINLINE(0x203C, 0x0048, 0x0004, 0xA800);
+
+EXTERN_API( void )
+MIDIRemovePort (short refnum) FOURWORDINLINE(0x203C, 0x004C, 0x0004, 0xA800);
+
+EXTERN_API( short )
+MIDIGetSync (short refnum) FOURWORDINLINE(0x203C, 0x0050, 0x0004, 0xA800);
+
+EXTERN_API( void )
+MIDISetSync (short refnum,
+ short sync) FOURWORDINLINE(0x203C, 0x0054, 0x0004, 0xA800);
+
+EXTERN_API( long )
+MIDIGetCurTime (short refnum) FOURWORDINLINE(0x203C, 0x0058, 0x0004, 0xA800);
+
+EXTERN_API( void )
+MIDISetCurTime (short refnum,
+ long time) FOURWORDINLINE(0x203C, 0x005C, 0x0004, 0xA800);
+
+EXTERN_API( void )
+MIDIStartTime (short refnum) FOURWORDINLINE(0x203C, 0x0060, 0x0004, 0xA800);
+
+EXTERN_API( void )
+MIDIStopTime (short refnum) FOURWORDINLINE(0x203C, 0x0064, 0x0004, 0xA800);
+
+EXTERN_API( void )
+MIDIPoll (short refnum,
+ long offsetTime) FOURWORDINLINE(0x203C, 0x0068, 0x0004, 0xA800);
+
+EXTERN_API( OSErr )
+MIDIWritePacket (short refnum,
+ MIDIPacketPtr packet) FOURWORDINLINE(0x203C, 0x006C, 0x0004, 0xA800);
+
+EXTERN_API( Boolean )
+MIDIWorldChanged (OSType clientID) FOURWORDINLINE(0x203C, 0x0070, 0x0004, 0xA800);
+
+EXTERN_API( long )
+MIDIGetOffsetTime (short refnum) FOURWORDINLINE(0x203C, 0x0074, 0x0004, 0xA800);
+
+EXTERN_API( void )
+MIDISetOffsetTime (short refnum,
+ long offsetTime) FOURWORDINLINE(0x203C, 0x0078, 0x0004, 0xA800);
+
+EXTERN_API( long )
+MIDIConvertTime (short srcFormat,
+ short dstFormat,
+ long time) FOURWORDINLINE(0x203C, 0x007C, 0x0004, 0xA800);
+
+EXTERN_API( long )
+MIDIGetRefCon (short refnum) FOURWORDINLINE(0x203C, 0x0080, 0x0004, 0xA800);
+
+EXTERN_API( void )
+MIDISetRefCon (short refnum,
+ long refCon) FOURWORDINLINE(0x203C, 0x0084, 0x0004, 0xA800);
+
+EXTERN_API( long )
+MIDIGetClRefCon (OSType clientID) FOURWORDINLINE(0x203C, 0x0088, 0x0004, 0xA800);
+
+EXTERN_API( void )
+MIDISetClRefCon (OSType clientID,
+ long refCon) FOURWORDINLINE(0x203C, 0x008C, 0x0004, 0xA800);
+
+EXTERN_API( short )
+MIDIGetTCFormat (short refnum) FOURWORDINLINE(0x203C, 0x0090, 0x0004, 0xA800);
+
+EXTERN_API( void )
+MIDISetTCFormat (short refnum,
+ short format) FOURWORDINLINE(0x203C, 0x0094, 0x0004, 0xA800);
+
+EXTERN_API( void )
+MIDISetRunRate (short refnum,
+ short rate,
+ long time) FOURWORDINLINE(0x203C, 0x0098, 0x0004, 0xA800);
+
+EXTERN_API( Handle )
+MIDIGetClientIcon (OSType clientID) FOURWORDINLINE(0x203C, 0x009C, 0x0004, 0xA800);
+
+EXTERN_API( ProcPtr )
+MIDICallAddress (short callNum) FOURWORDINLINE(0x203C, 0x00A4, 0x0004, 0xA800);
+
+EXTERN_API( void )
+MIDISetConnectionProc (short refNum,
+ ProcPtr connectionProc,
+ long refCon) FOURWORDINLINE(0x203C, 0x00A8, 0x0004, 0xA800);
+
+EXTERN_API( void )
+MIDIGetConnectionProc (short refnum,
+ ProcPtr * connectionProc,
+ long * refCon) FOURWORDINLINE(0x203C, 0x00AC, 0x0004, 0xA800);
+
+EXTERN_API( void )
+MIDIDiscardPacket (short refnum,
+ MIDIPacketPtr packet) FOURWORDINLINE(0x203C, 0x00B0, 0x0004, 0xA800);
+
+EXTERN_API( OSErr )
+MDVRSignIn (OSType clientID,
+ long refCon,
+ Handle icon,
+ Str255 name) FOURWORDINLINE(0x203C, 0x00B4, 0x0004, 0xA800);
+
+EXTERN_API( void )
+MDVRSignOut (OSType clientID) FOURWORDINLINE(0x203C, 0x00B8, 0x0004, 0xA800);
+
+EXTERN_API( MDVRPtr )
+MDVROpen (short portType,
+ short refnum) FOURWORDINLINE(0x203C, 0x00BC, 0x0004, 0xA800);
+
+EXTERN_API( void )
+MDVRClose (MDVRPtr driverPtr) FOURWORDINLINE(0x203C, 0x00C0, 0x0004, 0xA800);
+
+EXTERN_API( void )
+MDVRControlIn (MDVRPtr portPtr,
+ MDVRInCtlPtr inputCtl) FOURWORDINLINE(0x203C, 0x00C4, 0x0004, 0xA800);
+
+EXTERN_API( void )
+MDVRControlOut (MDVRPtr portPtr,
+ MDVROutCtlPtr outputCtl) FOURWORDINLINE(0x203C, 0x00C8, 0x0004, 0xA800);
+
+EXTERN_API( void )
+MDVRIn (MDVRPtr portPtr) FOURWORDINLINE(0x203C, 0x00CC, 0x0004, 0xA800);
+
+EXTERN_API( void )
+MDVROut (MDVRPtr portPtr,
+ char * dataPtr,
+ short length) FOURWORDINLINE(0x203C, 0x00D0, 0x0004, 0xA800);
+
+EXTERN_API( void )
+MDVRNotesOff (MDVRPtr portPtr,
+ short mode) FOURWORDINLINE(0x203C, 0x00D4, 0x0004, 0xA800);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(MIDIReadHookUPP)
+ NewMIDIReadHookUPP (MIDIReadHookProcPtr userRoutine);
+
+ EXTERN_API(MIDITimeUPP)
+ NewMIDITimeUPP (MIDITimeProcPtr userRoutine);
+
+ EXTERN_API(MIDIConnectionUPP)
+ NewMIDIConnectionUPP (MIDIConnectionProcPtr userRoutine);
+
+ EXTERN_API(MDVRCommUPP)
+ NewMDVRCommUPP (MDVRCommProcPtr userRoutine);
+
+ EXTERN_API(MDVRTimeCodeUPP)
+ NewMDVRTimeCodeUPP (MDVRTimeCodeProcPtr userRoutine);
+
+ EXTERN_API(MDVRReadUPP)
+ NewMDVRReadUPP (MDVRReadProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeMIDIReadHookUPP (MIDIReadHookUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeMIDITimeUPP (MIDITimeUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeMIDIConnectionUPP (MIDIConnectionUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeMDVRCommUPP (MDVRCommUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeMDVRTimeCodeUPP (MDVRTimeCodeUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeMDVRReadUPP (MDVRReadUPP userUPP);
+
+ EXTERN_API(short)
+ InvokeMIDIReadHookUPP (MIDIPacketPtr myPacket,
+ long myRefCon,
+ MIDIReadHookUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeMIDITimeUPP (long curTime,
+ long myRefCon,
+ MIDITimeUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeMIDIConnectionUPP (short refnum,
+ long refcon,
+ short portType,
+ OSType clientID,
+ OSType portID,
+ Boolean connect,
+ short direction,
+ MIDIConnectionUPP userUPP);
+
+ EXTERN_API(long)
+ InvokeMDVRCommUPP (short refnum,
+ short request,
+ long refCon,
+ MDVRCommUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeMDVRTimeCodeUPP (short refnum,
+ short newFormat,
+ long refCon,
+ MDVRTimeCodeUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeMDVRReadUPP (char * midiChars,
+ short length,
+ long refCon,
+ MDVRReadUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppMIDIReadHookProcInfo = 0x000003E0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes) */
+ enum { uppMIDITimeProcInfo = 0x000003C0 }; /* pascal no_return_value Func(4_bytes, 4_bytes) */
+ enum { uppMIDIConnectionProcInfo = 0x0009FB80 }; /* pascal no_return_value Func(2_bytes, 4_bytes, 2_bytes, 4_bytes, 4_bytes, 1_byte, 2_bytes) */
+ enum { uppMDVRCommProcInfo = 0x00000EB0 }; /* pascal 4_bytes Func(2_bytes, 2_bytes, 4_bytes) */
+ enum { uppMDVRTimeCodeProcInfo = 0x00000E80 }; /* pascal no_return_value Func(2_bytes, 2_bytes, 4_bytes) */
+ enum { uppMDVRReadProcInfo = 0x00000EC0 }; /* pascal no_return_value Func(4_bytes, 2_bytes, 4_bytes) */
+ #define NewMIDIReadHookUPP(userRoutine) (MIDIReadHookUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMIDIReadHookProcInfo, GetCurrentArchitecture())
+ #define NewMIDITimeUPP(userRoutine) (MIDITimeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMIDITimeProcInfo, GetCurrentArchitecture())
+ #define NewMIDIConnectionUPP(userRoutine) (MIDIConnectionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMIDIConnectionProcInfo, GetCurrentArchitecture())
+ #define NewMDVRCommUPP(userRoutine) (MDVRCommUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMDVRCommProcInfo, GetCurrentArchitecture())
+ #define NewMDVRTimeCodeUPP(userRoutine) (MDVRTimeCodeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMDVRTimeCodeProcInfo, GetCurrentArchitecture())
+ #define NewMDVRReadUPP(userRoutine) (MDVRReadUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMDVRReadProcInfo, GetCurrentArchitecture())
+ #define DisposeMIDIReadHookUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeMIDITimeUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeMIDIConnectionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeMDVRCommUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeMDVRTimeCodeUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeMDVRReadUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeMIDIReadHookUPP(myPacket, myRefCon, userUPP) (short)CALL_TWO_PARAMETER_UPP((userUPP), uppMIDIReadHookProcInfo, (myPacket), (myRefCon))
+ #define InvokeMIDITimeUPP(curTime, myRefCon, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppMIDITimeProcInfo, (curTime), (myRefCon))
+ #define InvokeMIDIConnectionUPP(refnum, refcon, portType, clientID, portID, connect, direction, userUPP) CALL_SEVEN_PARAMETER_UPP((userUPP), uppMIDIConnectionProcInfo, (refnum), (refcon), (portType), (clientID), (portID), (connect), (direction))
+ #define InvokeMDVRCommUPP(refnum, request, refCon, userUPP) (long)CALL_THREE_PARAMETER_UPP((userUPP), uppMDVRCommProcInfo, (refnum), (request), (refCon))
+ #define InvokeMDVRTimeCodeUPP(refnum, newFormat, refCon, userUPP) CALL_THREE_PARAMETER_UPP((userUPP), uppMDVRTimeCodeProcInfo, (refnum), (newFormat), (refCon))
+ #define InvokeMDVRReadUPP(midiChars, length, refCon, userUPP) CALL_THREE_PARAMETER_UPP((userUPP), uppMDVRReadProcInfo, (midiChars), (length), (refCon))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewMIDIReadHookProc(userRoutine) NewMIDIReadHookUPP(userRoutine)
+#define NewMIDITimeProc(userRoutine) NewMIDITimeUPP(userRoutine)
+#define NewMIDIConnectionProc(userRoutine) NewMIDIConnectionUPP(userRoutine)
+#define NewMDVRCommProc(userRoutine) NewMDVRCommUPP(userRoutine)
+#define NewMDVRTimeCodeProc(userRoutine) NewMDVRTimeCodeUPP(userRoutine)
+#define NewMDVRReadProc(userRoutine) NewMDVRReadUPP(userRoutine)
+#define CallMIDIReadHookProc(userRoutine, myPacket, myRefCon) InvokeMIDIReadHookUPP(myPacket, myRefCon, userRoutine)
+#define CallMIDITimeProc(userRoutine, curTime, myRefCon) InvokeMIDITimeUPP(curTime, myRefCon, userRoutine)
+#define CallMIDIConnectionProc(userRoutine, refnum, refcon, portType, clientID, portID, connect, direction) InvokeMIDIConnectionUPP(refnum, refcon, portType, clientID, portID, connect, direction, userRoutine)
+#define CallMDVRCommProc(userRoutine, refnum, request, refCon) InvokeMDVRCommUPP(refnum, request, refCon, userRoutine)
+#define CallMDVRTimeCodeProc(userRoutine, refnum, newFormat, refCon) InvokeMDVRTimeCodeUPP(refnum, newFormat, refCon, userRoutine)
+#define CallMDVRReadProc(userRoutine, midiChars, length, refCon) InvokeMDVRReadUPP(midiChars, length, refCon, userRoutine)
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MIDI__ */
+
diff --git a/include/qt/MacErrors.h b/include/qt/MacErrors.h
new file mode 100644
index 000000000..a448a784a
--- /dev/null
+++ b/include/qt/MacErrors.h
@@ -0,0 +1,2718 @@
+/*
+ File: MacErrors.h
+
+ Contains: OSErr codes.
+
+ Version: Technology: Mac OS 9
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __MACERRORS__
+#define __MACERRORS__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ paramErr = -50, /*error in user parameter list*/
+ noHardwareErr = -200, /*Sound Manager Error Returns*/
+ notEnoughHardwareErr = -201, /*Sound Manager Error Returns*/
+ userCanceledErr = -128,
+ qErr = -1, /*queue element not found during deletion*/
+ vTypErr = -2, /*invalid queue element*/
+ corErr = -3, /*core routine number out of range*/
+ unimpErr = -4, /*unimplemented core routine*/
+ SlpTypeErr = -5, /*invalid queue element*/
+ seNoDB = -8, /*no debugger installed to handle debugger command*/
+ controlErr = -17, /*I/O System Errors*/
+ statusErr = -18, /*I/O System Errors*/
+ readErr = -19, /*I/O System Errors*/
+ writErr = -20, /*I/O System Errors*/
+ badUnitErr = -21, /*I/O System Errors*/
+ unitEmptyErr = -22, /*I/O System Errors*/
+ openErr = -23, /*I/O System Errors*/
+ closErr = -24, /*I/O System Errors*/
+ dRemovErr = -25, /*tried to remove an open driver*/
+ dInstErr = -26 /*DrvrInstall couldn't find driver in resources*/
+};
+
+enum {
+ abortErr = -27, /*IO call aborted by KillIO*/
+ iIOAbortErr = -27, /*IO abort error (Printing Manager)*/
+ notOpenErr = -28, /*Couldn't rd/wr/ctl/sts cause driver not opened*/
+ unitTblFullErr = -29, /*unit table has no more entries*/
+ dceExtErr = -30, /*dce extension error*/
+ slotNumErr = -360, /*invalid slot # error*/
+ gcrOnMFMErr = -400, /*gcr format on high density media error*/
+ dirFulErr = -33, /*Directory full*/
+ dskFulErr = -34, /*disk full*/
+ nsvErr = -35, /*no such volume*/
+ ioErr = -36, /*I/O error (bummers)*/
+ bdNamErr = -37, /*there may be no bad names in the final system!*/
+ fnOpnErr = -38, /*File not open*/
+ eofErr = -39, /*End of file*/
+ posErr = -40, /*tried to position to before start of file (r/w)*/
+ mFulErr = -41, /*memory full (open) or file won't fit (load)*/
+ tmfoErr = -42, /*too many files open*/
+ fnfErr = -43, /*File not found*/
+ wPrErr = -44, /*diskette is write protected.*/
+ fLckdErr = -45 /*file is locked*/
+};
+
+enum {
+ vLckdErr = -46, /*volume is locked*/
+ fBsyErr = -47, /*File is busy (delete)*/
+ dupFNErr = -48, /*duplicate filename (rename)*/
+ opWrErr = -49, /*file already open with with write permission*/
+ rfNumErr = -51, /*refnum error*/
+ gfpErr = -52, /*get file position error*/
+ volOffLinErr = -53, /*volume not on line error (was Ejected)*/
+ permErr = -54, /*permissions error (on file open)*/
+ volOnLinErr = -55, /*drive volume already on-line at MountVol*/
+ nsDrvErr = -56, /*no such drive (tried to mount a bad drive num)*/
+ noMacDskErr = -57, /*not a mac diskette (sig bytes are wrong)*/
+ extFSErr = -58, /*volume in question belongs to an external fs*/
+ fsRnErr = -59, /*file system internal error:during rename the old entry was deleted but could not be restored.*/
+ badMDBErr = -60, /*bad master directory block*/
+ wrPermErr = -61, /*write permissions error*/
+ dirNFErr = -120, /*Directory not found*/
+ tmwdoErr = -121, /*No free WDCB available*/
+ badMovErr = -122, /*Move into offspring error*/
+ wrgVolTypErr = -123, /*Wrong volume type error [operation not supported for MFS]*/
+ volGoneErr = -124 /*Server volume has been disconnected.*/
+};
+
+enum {
+ fidNotFound = -1300, /*no file thread exists.*/
+ fidExists = -1301, /*file id already exists*/
+ notAFileErr = -1302, /*directory specified*/
+ diffVolErr = -1303, /*files on different volumes*/
+ catChangedErr = -1304, /*the catalog has been modified*/
+ desktopDamagedErr = -1305, /*desktop database files are corrupted*/
+ sameFileErr = -1306, /*can't exchange a file with itself*/
+ badFidErr = -1307, /*file id is dangling or doesn't match with the file number*/
+ notARemountErr = -1308, /*when _Mount allows only remounts and doesn't get one*/
+ fileBoundsErr = -1309, /*file's EOF, offset, mark or size is too big*/
+ fsDataTooBigErr = -1310, /*file or volume is too big for system*/
+ volVMBusyErr = -1311, /*can't eject because volume is in use by VM*/
+ badFCBErr = -1327, /*FCBRecPtr is not valid*/
+ errFSUnknownCall = -1400, /* selector is not recognized by this filesystem */
+ errFSBadFSRef = -1401, /* FSRef parameter is bad */
+ errFSBadForkName = -1402, /* Fork name parameter is bad */
+ errFSBadBuffer = -1403, /* A buffer parameter was bad */
+ errFSBadForkRef = -1404, /* A ForkRefNum parameter was bad */
+ errFSBadInfoBitmap = -1405, /* A CatalogInfoBitmap or VolumeInfoBitmap has reserved or invalid bits set */
+ errFSMissingCatInfo = -1406, /* A CatalogInfo parameter was NULL */
+ errFSNotAFolder = -1407, /* Expected a folder, got a file */
+ errFSForkNotFound = -1409, /* Named fork does not exist */
+ errFSNameTooLong = -1410, /* File/fork name is too long to create/rename */
+ errFSMissingName = -1411, /* A Unicode name parameter was NULL or nameLength parameter was zero */
+ errFSBadPosMode = -1412, /* Newline bits set in positionMode */
+ errFSBadAllocFlags = -1413, /* Invalid bits set in allocationFlags */
+ errFSNoMoreItems = -1417, /* Iteration ran out of items to return */
+ errFSBadItemCount = -1418, /* maximumItems was zero */
+ errFSBadSearchParams = -1419, /* Something wrong with CatalogSearch searchParams */
+ errFSRefsDifferent = -1420, /* FSCompareFSRefs; refs are for different objects */
+ errFSForkExists = -1421, /* Named fork already exists. */
+ errFSBadIteratorFlags = -1422, /* Flags passed to FSOpenIterator are bad */
+ errFSIteratorNotFound = -1423, /* Passed FSIterator is not an open iterator */
+ errFSIteratorNotSupported = -1424, /* The iterator's flags or container are not supported by this call */
+ envNotPresent = -5500, /*returned by glue.*/
+ envBadVers = -5501, /*Version non-positive*/
+ envVersTooBig = -5502, /*Version bigger than call can handle*/
+ fontDecError = -64, /*error during font declaration*/
+ fontNotDeclared = -65, /*font not declared*/
+ fontSubErr = -66, /*font substitution occurred*/
+ fontNotOutlineErr = -32615, /*bitmap font passed to routine that does outlines only*/
+ firstDskErr = -84, /*I/O System Errors*/
+ lastDskErr = -64, /*I/O System Errors*/
+ noDriveErr = -64, /*drive not installed*/
+ offLinErr = -65, /*r/w requested for an off-line drive*/
+ noNybErr = -66 /*couldn't find 5 nybbles in 200 tries*/
+};
+
+enum {
+ noAdrMkErr = -67, /*couldn't find valid addr mark*/
+ dataVerErr = -68, /*read verify compare failed*/
+ badCksmErr = -69, /*addr mark checksum didn't check*/
+ badBtSlpErr = -70, /*bad addr mark bit slip nibbles*/
+ noDtaMkErr = -71, /*couldn't find a data mark header*/
+ badDCksum = -72, /*bad data mark checksum*/
+ badDBtSlp = -73, /*bad data mark bit slip nibbles*/
+ wrUnderrun = -74, /*write underrun occurred*/
+ cantStepErr = -75, /*step handshake failed*/
+ tk0BadErr = -76, /*track 0 detect doesn't change*/
+ initIWMErr = -77, /*unable to initialize IWM*/
+ twoSideErr = -78, /*tried to read 2nd side on a 1-sided drive*/
+ spdAdjErr = -79, /*unable to correctly adjust disk speed*/
+ seekErr = -80, /*track number wrong on address mark*/
+ sectNFErr = -81, /*sector number never found on a track*/
+ fmt1Err = -82, /*can't find sector 0 after track format*/
+ fmt2Err = -83, /*can't get enough sync*/
+ verErr = -84, /*track failed to verify*/
+ clkRdErr = -85, /*unable to read same clock value twice*/
+ clkWrErr = -86, /*time written did not verify*/
+ prWrErr = -87, /*parameter ram written didn't read-verify*/
+ prInitErr = -88, /*InitUtil found the parameter ram uninitialized*/
+ rcvrErr = -89, /*SCC receiver error (framing; parity; OR)*/
+ breakRecd = -90 /*Break received (SCC)*/
+};
+
+enum {
+ /*Scrap Manager errors*/
+ noScrapErr = -100, /*No scrap exists error*/
+ noTypeErr = -102 /*No object of that type in scrap*/
+};
+
+enum {
+ /* ENET error codes */
+ eLenErr = -92, /*Length error ddpLenErr*/
+ eMultiErr = -91 /*Multicast address error ddpSktErr*/
+};
+
+enum {
+ ddpSktErr = -91, /*error in soket number*/
+ ddpLenErr = -92, /*data length too big*/
+ noBridgeErr = -93, /*no network bridge for non-local send*/
+ lapProtErr = -94, /*error in attaching/detaching protocol*/
+ excessCollsns = -95, /*excessive collisions on write*/
+ portNotPwr = -96, /*serial port not currently powered*/
+ portInUse = -97, /*driver Open error code (port is in use)*/
+ portNotCf = -98 /*driver Open error code (parameter RAM not configured for this connection)*/
+};
+
+enum {
+ /* Memory Manager errors*/
+ memROZWarn = -99, /*soft error in ROZ*/
+ memROZError = -99, /*hard error in ROZ*/
+ memROZErr = -99, /*hard error in ROZ*/
+ memFullErr = -108, /*Not enough room in heap zone*/
+ nilHandleErr = -109, /*Master Pointer was NIL in HandleZone or other*/
+ memWZErr = -111, /*WhichZone failed (applied to free block)*/
+ memPurErr = -112, /*trying to purge a locked or non-purgeable block*/
+ memAdrErr = -110, /*address was odd; or out of range*/
+ memAZErr = -113, /*Address in zone check failed*/
+ memPCErr = -114, /*Pointer Check failed*/
+ memBCErr = -115, /*Block Check failed*/
+ memSCErr = -116, /*Size Check failed*/
+ memLockedErr = -117 /*trying to move a locked block (MoveHHi)*/
+};
+
+enum {
+ /* Printing Errors */
+ iMemFullErr = -108,
+ iIOAbort = -27
+};
+
+
+enum {
+ resourceInMemory = -188, /*Resource already in memory*/
+ writingPastEnd = -189, /*Writing past end of file*/
+ inputOutOfBounds = -190, /*Offset of Count out of bounds*/
+ resNotFound = -192, /*Resource not found*/
+ resFNotFound = -193, /*Resource file not found*/
+ addResFailed = -194, /*AddResource failed*/
+ addRefFailed = -195, /*AddReference failed*/
+ rmvResFailed = -196, /*RmveResource failed*/
+ rmvRefFailed = -197, /*RmveReference failed*/
+ resAttrErr = -198, /*attribute inconsistent with operation*/
+ mapReadErr = -199, /*map inconsistent with operation*/
+ CantDecompress = -186, /*resource bent ("the bends") - can't decompress a compressed resource*/
+ badExtResource = -185, /*extended resource has a bad format.*/
+ noMemForPictPlaybackErr = -145,
+ rgnOverflowErr = -147,
+ rgnTooBigError = -147,
+ pixMapTooDeepErr = -148,
+ insufficientStackErr = -149,
+ nsStackErr = -149
+};
+
+enum {
+ evtNotEnb = 1 /*event not enabled at PostEvent*/
+};
+
+/* OffScreen QuickDraw Errors */
+enum {
+ cMatchErr = -150, /*Color2Index failed to find an index*/
+ cTempMemErr = -151, /*failed to allocate memory for temporary structures*/
+ cNoMemErr = -152, /*failed to allocate memory for structure*/
+ cRangeErr = -153, /*range error on colorTable request*/
+ cProtectErr = -154, /*colorTable entry protection violation*/
+ cDevErr = -155, /*invalid type of graphics device*/
+ cResErr = -156, /*invalid resolution for MakeITable*/
+ cDepthErr = -157, /*invalid pixel depth */
+ rgnTooBigErr = -500,
+ updPixMemErr = -125, /*insufficient memory to update a pixmap*/
+ pictInfoVersionErr = -11000, /*wrong version of the PictInfo structure*/
+ pictInfoIDErr = -11001, /*the internal consistancy check for the PictInfoID is wrong*/
+ pictInfoVerbErr = -11002, /*the passed verb was invalid*/
+ cantLoadPickMethodErr = -11003, /*unable to load the custom pick proc*/
+ colorsRequestedErr = -11004, /*the number of colors requested was illegal*/
+ pictureDataErr = -11005 /*the picture data was invalid*/
+};
+
+/* ColorSync Result codes */
+enum {
+ /* General Errors */
+ cmProfileError = -170,
+ cmMethodError = -171,
+ cmMethodNotFound = -175, /* CMM not present */
+ cmProfileNotFound = -176, /* Responder error */
+ cmProfilesIdentical = -177, /* Profiles the same */
+ cmCantConcatenateError = -178, /* Profile can't be concatenated */
+ cmCantXYZ = -179, /* CMM cant handle XYZ space */
+ cmCantDeleteProfile = -180, /* Responder error */
+ cmUnsupportedDataType = -181, /* Responder error */
+ cmNoCurrentProfile = -182 /* Responder error */
+};
+
+
+enum {
+ /*Sound Manager errors*/
+ noHardware = noHardwareErr, /*obsolete spelling*/
+ notEnoughHardware = notEnoughHardwareErr, /*obsolete spelling*/
+ queueFull = -203, /*Sound Manager Error Returns*/
+ resProblem = -204, /*Sound Manager Error Returns*/
+ badChannel = -205, /*Sound Manager Error Returns*/
+ badFormat = -206, /*Sound Manager Error Returns*/
+ notEnoughBufferSpace = -207, /*could not allocate enough memory*/
+ badFileFormat = -208, /*was not type AIFF or was of bad format,corrupt*/
+ channelBusy = -209, /*the Channel is being used for a PFD already*/
+ buffersTooSmall = -210, /*can not operate in the memory allowed*/
+ channelNotBusy = -211,
+ noMoreRealTime = -212, /*not enough CPU cycles left to add another task*/
+ siVBRCompressionNotSupported = -213, /*vbr audio compression not supported for this operation*/
+ siNoSoundInHardware = -220, /*no Sound Input hardware*/
+ siBadSoundInDevice = -221, /*invalid index passed to SoundInGetIndexedDevice*/
+ siNoBufferSpecified = -222, /*returned by synchronous SPBRecord if nil buffer passed*/
+ siInvalidCompression = -223, /*invalid compression type*/
+ siHardDriveTooSlow = -224, /*hard drive too slow to record to disk*/
+ siInvalidSampleRate = -225, /*invalid sample rate*/
+ siInvalidSampleSize = -226, /*invalid sample size*/
+ siDeviceBusyErr = -227, /*input device already in use*/
+ siBadDeviceName = -228, /*input device could not be opened*/
+ siBadRefNum = -229, /*invalid input device reference number*/
+ siInputDeviceErr = -230, /*input device hardware failure*/
+ siUnknownInfoType = -231, /*invalid info type selector (returned by driver)*/
+ siUnknownQuality = -232 /*invalid quality selector (returned by driver)*/
+};
+
+/*Speech Manager errors*/
+enum {
+ noSynthFound = -240,
+ synthOpenFailed = -241,
+ synthNotReady = -242,
+ bufTooSmall = -243,
+ voiceNotFound = -244,
+ incompatibleVoice = -245,
+ badDictFormat = -246,
+ badInputText = -247
+};
+
+/* Midi Manager Errors: */
+enum {
+ midiNoClientErr = -250, /*no client with that ID found*/
+ midiNoPortErr = -251, /*no port with that ID found*/
+ midiTooManyPortsErr = -252, /*too many ports already installed in the system*/
+ midiTooManyConsErr = -253, /*too many connections made*/
+ midiVConnectErr = -254, /*pending virtual connection created*/
+ midiVConnectMade = -255, /*pending virtual connection resolved*/
+ midiVConnectRmvd = -256, /*pending virtual connection removed*/
+ midiNoConErr = -257, /*no connection exists between specified ports*/
+ midiWriteErr = -258, /*MIDIWritePacket couldn't write to all connected ports*/
+ midiNameLenErr = -259, /*name supplied is longer than 31 characters*/
+ midiDupIDErr = -260, /*duplicate client ID*/
+ midiInvalidCmdErr = -261 /*command not supported for port type*/
+};
+
+
+enum {
+ nmTypErr = -299 /*Notification Manager:wrong queue type*/
+};
+
+
+enum {
+ siInitSDTblErr = 1, /*slot int dispatch table could not be initialized.*/
+ siInitVBLQsErr = 2, /*VBLqueues for all slots could not be initialized.*/
+ siInitSPTblErr = 3, /*slot priority table could not be initialized.*/
+ sdmJTInitErr = 10, /*SDM Jump Table could not be initialized.*/
+ sdmInitErr = 11, /*SDM could not be initialized.*/
+ sdmSRTInitErr = 12, /*Slot Resource Table could not be initialized.*/
+ sdmPRAMInitErr = 13, /*Slot PRAM could not be initialized.*/
+ sdmPriInitErr = 14 /*Cards could not be initialized.*/
+};
+
+enum {
+ smSDMInitErr = -290, /*Error; SDM could not be initialized.*/
+ smSRTInitErr = -291, /*Error; Slot Resource Table could not be initialized.*/
+ smPRAMInitErr = -292, /*Error; Slot Resource Table could not be initialized.*/
+ smPriInitErr = -293, /*Error; Cards could not be initialized.*/
+ smEmptySlot = -300, /*No card in slot*/
+ smCRCFail = -301, /*CRC check failed for declaration data*/
+ smFormatErr = -302, /*FHeader Format is not Apple's*/
+ smRevisionErr = -303, /*Wrong revison level*/
+ smNoDir = -304, /*Directory offset is Nil*/
+ smDisabledSlot = -305, /*This slot is disabled (-305 use to be smLWTstBad)*/
+ smNosInfoArray = -306 /*No sInfoArray. Memory Mgr error.*/
+};
+
+
+enum {
+ smResrvErr = -307, /*Fatal reserved error. Resreved field <> 0.*/
+ smUnExBusErr = -308, /*Unexpected BusError*/
+ smBLFieldBad = -309, /*ByteLanes field was bad.*/
+ smFHBlockRdErr = -310, /*Error occurred during _sGetFHeader.*/
+ smFHBlkDispErr = -311, /*Error occurred during _sDisposePtr (Dispose of FHeader block).*/
+ smDisposePErr = -312, /*_DisposePointer error*/
+ smNoBoardSRsrc = -313, /*No Board sResource.*/
+ smGetPRErr = -314, /*Error occurred during _sGetPRAMRec (See SIMStatus).*/
+ smNoBoardId = -315, /*No Board Id.*/
+ smInitStatVErr = -316, /*The InitStatusV field was negative after primary or secondary init.*/
+ smInitTblVErr = -317, /*An error occurred while trying to initialize the Slot Resource Table.*/
+ smNoJmpTbl = -318, /*SDM jump table could not be created.*/
+ smReservedSlot = -318, /*slot is reserved, VM should not use this address space.*/
+ smBadBoardId = -319, /*BoardId was wrong; re-init the PRAM record.*/
+ smBusErrTO = -320, /*BusError time out.*/
+ /* These errors are logged in the vendor status field of the sInfo record. */
+ svTempDisable = -32768L, /*Temporarily disable card but run primary init.*/
+ svDisabled = -32640, /*Reserve range -32640 to -32768 for Apple temp disables.*/
+ smBadRefId = -330, /*Reference Id not found in List*/
+ smBadsList = -331, /*Bad sList: Id1 < Id2 < Id3 ...format is not followed.*/
+ smReservedErr = -332, /*Reserved field not zero*/
+ smCodeRevErr = -333 /*Code revision is wrong*/
+};
+
+enum {
+ smCPUErr = -334, /*Code revision is wrong*/
+ smsPointerNil = -335, /*LPointer is nil From sOffsetData. If this error occurs; check sInfo rec for more information.*/
+ smNilsBlockErr = -336, /*Nil sBlock error (Dont allocate and try to use a nil sBlock)*/
+ smSlotOOBErr = -337, /*Slot out of bounds error*/
+ smSelOOBErr = -338, /*Selector out of bounds error*/
+ smNewPErr = -339, /*_NewPtr error*/
+ smBlkMoveErr = -340, /*_BlockMove error*/
+ smCkStatusErr = -341, /*Status of slot = fail.*/
+ smGetDrvrNamErr = -342, /*Error occurred during _sGetDrvrName.*/
+ smDisDrvrNamErr = -343, /*Error occurred during _sDisDrvrName.*/
+ smNoMoresRsrcs = -344, /*No more sResources*/
+ smsGetDrvrErr = -345, /*Error occurred during _sGetDriver.*/
+ smBadsPtrErr = -346, /*Bad pointer was passed to sCalcsPointer*/
+ smByteLanesErr = -347, /*NumByteLanes was determined to be zero.*/
+ smOffsetErr = -348, /*Offset was too big (temporary error*/
+ smNoGoodOpens = -349, /*No opens were successfull in the loop.*/
+ smSRTOvrFlErr = -350, /*SRT over flow.*/
+ smRecNotFnd = -351 /*Record not found in the SRT.*/
+};
+
+
+enum {
+ /*Dictionary Manager errors*/
+ notBTree = -410, /*The file is not a dictionary.*/
+ btNoSpace = -413, /*Can't allocate disk space.*/
+ btDupRecErr = -414, /*Record already exists.*/
+ btRecNotFnd = -415, /*Record cannot be found.*/
+ btKeyLenErr = -416, /*Maximum key length is too long or equal to zero.*/
+ btKeyAttrErr = -417, /*There is no such a key attribute.*/
+ unknownInsertModeErr = -20000, /*There is no such an insert mode.*/
+ recordDataTooBigErr = -20001, /*The record data is bigger than buffer size (1024 bytes).*/
+ invalidIndexErr = -20002 /*The recordIndex parameter is not valid.*/
+};
+
+
+/*
+ * Error codes from FSM functions
+ */
+enum {
+ fsmFFSNotFoundErr = -431, /* Foreign File system does not exist - new Pack2 could return this error too */
+ fsmBusyFFSErr = -432, /* File system is busy, cannot be removed */
+ fsmBadFFSNameErr = -433, /* Name length not 1 <= length <= 31 */
+ fsmBadFSDLenErr = -434, /* FSD size incompatible with current FSM vers */
+ fsmDuplicateFSIDErr = -435, /* FSID already exists on InstallFS */
+ fsmBadFSDVersionErr = -436, /* FSM version incompatible with FSD */
+ fsmNoAlternateStackErr = -437, /* no alternate stack for HFS CI */
+ fsmUnknownFSMMessageErr = -438 /* unknown message passed to FSM */
+};
+
+
+enum {
+ /* Edition Mgr errors*/
+ editionMgrInitErr = -450, /*edition manager not inited by this app*/
+ badSectionErr = -451, /*not a valid SectionRecord*/
+ notRegisteredSectionErr = -452, /*not a registered SectionRecord*/
+ badEditionFileErr = -453, /*edition file is corrupt*/
+ badSubPartErr = -454, /*can not use sub parts in this release*/
+ multiplePublisherWrn = -460, /*A Publisher is already registered for that container*/
+ containerNotFoundWrn = -461, /*could not find editionContainer at this time*/
+ containerAlreadyOpenWrn = -462, /*container already opened by this section*/
+ notThePublisherWrn = -463 /*not the first registered publisher for that container*/
+};
+
+enum {
+ teScrapSizeErr = -501, /*scrap item too big for text edit record*/
+ hwParamErr = -502, /*bad selector for _HWPriv*/
+ driverHardwareGoneErr = -503 /*disk driver's hardware was disconnected*/
+};
+
+enum {
+ /*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 */
+};
+
+enum {
+ /* More Process Manager errors */
+ wrongApplicationPlatform = -875, /* The application could not launch because the required platform is not available */
+ appVersionTooOld = -876 /* The application's creator and version are incompatible with the current version of Mac OS. */
+};
+
+/* Thread Manager Error Codes */
+enum {
+ threadTooManyReqsErr = -617,
+ threadNotFoundErr = -618,
+ threadProtocolErr = -619
+};
+
+/*MemoryDispatch errors*/
+enum {
+ notEnoughMemoryErr = -620, /*insufficient physical memory*/
+ notHeldErr = -621, /*specified range of memory is not held*/
+ cannotMakeContiguousErr = -622, /*cannot make specified range contiguous*/
+ notLockedErr = -623, /*specified range of memory is not locked*/
+ interruptsMaskedErr = -624, /*don't call with interrupts masked*/
+ cannotDeferErr = -625, /*unable to defer additional functions*/
+ noMMUErr = -626 /*no MMU present*/
+};
+
+enum {
+ /* Database access error codes */
+ rcDBNull = -800,
+ rcDBValue = -801,
+ rcDBError = -802,
+ rcDBBadType = -803,
+ rcDBBreak = -804,
+ rcDBExec = -805,
+ rcDBBadSessID = -806,
+ rcDBBadSessNum = -807, /* bad session number for DBGetConnInfo */
+ rcDBBadDDEV = -808, /* bad ddev specified on DBInit */
+ rcDBAsyncNotSupp = -809, /* ddev does not support async calls */
+ rcDBBadAsyncPB = -810, /* tried to kill a bad pb */
+ rcDBNoHandler = -811, /* no app handler for specified data type */
+ rcDBWrongVersion = -812, /* incompatible versions */
+ rcDBPackNotInited = -813 /* attempt to call other routine before InitDBPack */
+};
+
+
+/*Help Mgr error range: -850 to -874*/
+enum {
+ hmHelpDisabled = -850, /* Show Balloons mode was off, call to routine ignored */
+ hmBalloonAborted = -853, /* Returned if mouse was moving or mouse wasn't in window port rect */
+ hmSameAsLastBalloon = -854, /* Returned from HMShowMenuBalloon if menu & item is same as last time */
+ hmHelpManagerNotInited = -855, /* Returned from HMGetHelpMenuHandle if help menu not setup */
+ hmSkippedBalloon = -857, /* Returned from calls if helpmsg specified a skip balloon */
+ hmWrongVersion = -858, /* Returned if help mgr resource was the wrong version */
+ hmUnknownHelpType = -859, /* Returned if help msg record contained a bad type */
+ hmOperationUnsupported = -861, /* Returned from HMShowBalloon call if bad method passed to routine */
+ hmNoBalloonUp = -862, /* Returned from HMRemoveBalloon if no balloon was visible when call was made */
+ hmCloseViewActive = -863 /* Returned from HMRemoveBalloon if CloseView was active */
+};
+
+
+
+enum {
+ /*PPC errors*/
+ notInitErr = -900, /*PPCToolBox not initialized*/
+ nameTypeErr = -902, /*Invalid or inappropriate locationKindSelector in locationName*/
+ noPortErr = -903, /*Unable to open port or bad portRefNum. If you're calling */
+ /* AESend, this is because your application does not have */
+ /* the isHighLevelEventAware bit set in your SIZE resource. */
+ noGlobalsErr = -904, /*The system is hosed, better re-boot*/
+ localOnlyErr = -905, /*Network activity is currently disabled*/
+ destPortErr = -906, /*Port does not exist at destination*/
+ sessTableErr = -907, /*Out of session tables, try again later*/
+ noSessionErr = -908, /*Invalid session reference number*/
+ badReqErr = -909, /*bad parameter or invalid state for operation*/
+ portNameExistsErr = -910, /*port is already open (perhaps in another app)*/
+ noUserNameErr = -911, /*user name unknown on destination machine*/
+ userRejectErr = -912, /*Destination rejected the session request*/
+ noMachineNameErr = -913, /*user hasn't named his Macintosh in the Network Setup Control Panel*/
+ noToolboxNameErr = -914, /*A system resource is missing, not too likely*/
+ noResponseErr = -915, /*unable to contact destination*/
+ portClosedErr = -916, /*port was closed*/
+ sessClosedErr = -917, /*session was closed*/
+ badPortNameErr = -919, /*PPCPortRec malformed*/
+ noDefaultUserErr = -922, /*user hasn't typed in owners name in Network Setup Control Pannel*/
+ notLoggedInErr = -923, /*The default userRefNum does not yet exist*/
+ noUserRefErr = -924, /*unable to create a new userRefNum*/
+ networkErr = -925, /*An error has occurred in the network, not too likely*/
+ noInformErr = -926, /*PPCStart failed because destination did not have inform pending*/
+ authFailErr = -927, /*unable to authenticate user at destination*/
+ noUserRecErr = -928, /*Invalid user reference number*/
+ badServiceMethodErr = -930, /*illegal service type, or not supported*/
+ badLocNameErr = -931, /*location name malformed*/
+ guestNotAllowedErr = -932 /*destination port requires authentication*/
+};
+
+/* Font Mgr errors*/
+enum {
+ kFMIterationCompleted = -980L,
+ kFMInvalidFontFamilyErr = -981L,
+ kFMInvalidFontErr = -982L,
+ kFMIterationScopeModifiedErr = -983L,
+ kFMFontTableAccessErr = -984L,
+ kFMFontContainerAccessErr = -985L
+};
+
+enum {
+ noMaskFoundErr = -1000 /*Icon Utilties Error*/
+};
+
+enum {
+ nbpBuffOvr = -1024, /*Buffer overflow in LookupName*/
+ nbpNoConfirm = -1025,
+ nbpConfDiff = -1026, /*Name confirmed at different socket*/
+ nbpDuplicate = -1027, /*Duplicate name exists already*/
+ nbpNotFound = -1028, /*Name not found on remove*/
+ nbpNISErr = -1029 /*Error trying to open the NIS*/
+};
+
+enum {
+ aspBadVersNum = -1066, /*Server cannot support this ASP version*/
+ aspBufTooSmall = -1067, /*Buffer too small*/
+ aspNoMoreSess = -1068, /*No more sessions on server*/
+ aspNoServers = -1069, /*No servers at that address*/
+ aspParamErr = -1070, /*Parameter error*/
+ aspServerBusy = -1071, /*Server cannot open another session*/
+ aspSessClosed = -1072, /*Session closed*/
+ aspSizeErr = -1073, /*Command block too big*/
+ aspTooMany = -1074, /*Too many clients (server error)*/
+ aspNoAck = -1075 /*No ack on attention request (server err)*/
+};
+
+enum {
+ reqFailed = -1096,
+ tooManyReqs = -1097,
+ tooManySkts = -1098,
+ badATPSkt = -1099,
+ badBuffNum = -1100,
+ noRelErr = -1101,
+ cbNotFound = -1102,
+ noSendResp = -1103,
+ noDataArea = -1104,
+ reqAborted = -1105
+};
+
+/* ADSP Error Codes */
+enum {
+ /* driver control ioResults */
+ errRefNum = -1280, /* bad connection refNum */
+ errAborted = -1279, /* control call was aborted */
+ errState = -1278, /* bad connection state for this operation */
+ errOpening = -1277, /* open connection request failed */
+ errAttention = -1276, /* attention message too long */
+ errFwdReset = -1275, /* read terminated by forward reset */
+ errDSPQueueSize = -1274, /* DSP Read/Write Queue Too small */
+ errOpenDenied = -1273 /* open connection request was denied */
+};
+
+
+/*--------------------------------------------------------------
+ Apple event manager error messages
+--------------------------------------------------------------*/
+enum {
+ errAECoercionFail = -1700, /* bad parameter data or unable to coerce the data supplied */
+ errAEDescNotFound = -1701,
+ errAECorruptData = -1702,
+ errAEWrongDataType = -1703,
+ errAENotAEDesc = -1704,
+ errAEBadListItem = -1705, /* the specified list item does not exist */
+ errAENewerVersion = -1706, /* need newer version of the AppleEvent manager */
+ errAENotAppleEvent = -1707, /* the event is not in AppleEvent format */
+ errAEEventNotHandled = -1708, /* the AppleEvent was not handled by any handler */
+ errAEReplyNotValid = -1709, /* AEResetTimer was passed an invalid reply parameter */
+ errAEUnknownSendMode = -1710, /* mode wasn't NoReply, WaitReply, or QueueReply or Interaction level is unknown */
+ errAEWaitCanceled = -1711, /* in AESend, the user cancelled out of wait loop for reply or receipt */
+ errAETimeout = -1712, /* the AppleEvent timed out */
+ errAENoUserInteraction = -1713, /* no user interaction is allowed */
+ errAENotASpecialFunction = -1714, /* there is no special function for/with this keyword */
+ errAEParamMissed = -1715, /* a required parameter was not accessed */
+ errAEUnknownAddressType = -1716, /* the target address type is not known */
+ errAEHandlerNotFound = -1717, /* no handler in the dispatch tables fits the parameters to AEGetEventHandler or AEGetCoercionHandler */
+ errAEReplyNotArrived = -1718, /* the contents of the reply you are accessing have not arrived yet */
+ errAEIllegalIndex = -1719, /* index is out of range in a put operation */
+ errAEImpossibleRange = -1720, /* A range like 3rd to 2nd, or 1st to all. */
+ errAEWrongNumberArgs = -1721, /* Logical op kAENOT used with other than 1 term */
+ errAEAccessorNotFound = -1723, /* Accessor proc matching wantClass and containerType or wildcards not found */
+ errAENoSuchLogical = -1725, /* Something other than AND, OR, or NOT */
+ errAEBadTestKey = -1726, /* Test is neither typeLogicalDescriptor nor typeCompDescriptor */
+ errAENotAnObjSpec = -1727, /* Param to AEResolve not of type 'obj ' */
+ errAENoSuchObject = -1728, /* e.g.,: specifier asked for the 3rd, but there are only 2. Basically, this indicates a run-time resolution error. */
+ errAENegativeCount = -1729, /* CountProc returned negative value */
+ errAEEmptyListContainer = -1730, /* Attempt to pass empty list as container to accessor */
+ errAEUnknownObjectType = -1731, /* available only in version 1.0.1 or greater */
+ errAERecordingIsAlreadyOn = -1732, /* available only in version 1.0.1 or greater */
+ errAEReceiveTerminate = -1733, /* break out of all levels of AEReceive to the topmost (1.1 or greater) */
+ errAEReceiveEscapeCurrent = -1734, /* break out of only lowest level of AEReceive (1.1 or greater) */
+ errAEEventFiltered = -1735, /* event has been filtered, and should not be propogated (1.1 or greater) */
+ errAEDuplicateHandler = -1736, /* attempt to install handler in table for identical class and id (1.1 or greater) */
+ errAEStreamBadNesting = -1737, /* nesting violation while streaming */
+ errAEStreamAlreadyConverted = -1738, /* attempt to convert a stream that has already been converted */
+ errAEDescIsNull = -1739 /* attempting to perform an invalid operation on a null descriptor */
+};
+
+enum {
+ errOSASystemError = -1750,
+ errOSAInvalidID = -1751,
+ errOSABadStorageType = -1752,
+ errOSAScriptError = -1753,
+ errOSABadSelector = -1754,
+ errOSASourceNotAvailable = -1756,
+ errOSANoSuchDialect = -1757,
+ errOSADataFormatObsolete = -1758,
+ errOSADataFormatTooNew = -1759,
+ errOSACorruptData = errAECorruptData,
+ errOSARecordingIsAlreadyOn = errAERecordingIsAlreadyOn,
+ errOSAComponentMismatch = -1761, /* Parameters are from 2 different components */
+ errOSACantOpenComponent = -1762 /* Can't connect to scripting system with that ID */
+};
+
+
+
+/* AppleEvent error definitions */
+enum {
+ errOffsetInvalid = -1800,
+ errOffsetIsOutsideOfView = -1801,
+ errTopOfDocument = -1810,
+ errTopOfBody = -1811,
+ errEndOfDocument = -1812,
+ errEndOfBody = -1813
+};
+
+enum {
+ /* Drag Manager error codes */
+ badDragRefErr = -1850, /* unknown drag reference */
+ badDragItemErr = -1851, /* unknown drag item reference */
+ badDragFlavorErr = -1852, /* unknown flavor type */
+ duplicateFlavorErr = -1853, /* flavor type already exists */
+ cantGetFlavorErr = -1854, /* error while trying to get flavor data */
+ duplicateHandlerErr = -1855, /* handler already exists */
+ handlerNotFoundErr = -1856, /* handler not found */
+ dragNotAcceptedErr = -1857, /* drag was not accepted by receiver */
+ unsupportedForPlatformErr = -1858, /* call is for PowerPC only */
+ noSuitableDisplaysErr = -1859, /* no displays support translucency */
+ badImageRgnErr = -1860, /* bad translucent image region */
+ badImageErr = -1861 /* bad translucent image PixMap */
+};
+
+
+/* QuickTime errors */
+enum {
+ couldNotResolveDataRef = -2000,
+ badImageDescription = -2001,
+ badPublicMovieAtom = -2002,
+ cantFindHandler = -2003,
+ cantOpenHandler = -2004,
+ badComponentType = -2005,
+ noMediaHandler = -2006,
+ noDataHandler = -2007,
+ invalidMedia = -2008,
+ invalidTrack = -2009,
+ invalidMovie = -2010,
+ invalidSampleTable = -2011,
+ invalidDataRef = -2012,
+ invalidHandler = -2013,
+ invalidDuration = -2014,
+ invalidTime = -2015,
+ cantPutPublicMovieAtom = -2016,
+ badEditList = -2017,
+ mediaTypesDontMatch = -2018,
+ progressProcAborted = -2019,
+ movieToolboxUninitialized = -2020,
+ noRecordOfApp = movieToolboxUninitialized, /* replica */
+ wfFileNotFound = -2021,
+ cantCreateSingleForkFile = -2022, /* happens when file already exists */
+ invalidEditState = -2023,
+ nonMatchingEditState = -2024,
+ staleEditState = -2025,
+ userDataItemNotFound = -2026,
+ maxSizeToGrowTooSmall = -2027,
+ badTrackIndex = -2028,
+ trackIDNotFound = -2029,
+ trackNotInMovie = -2030,
+ timeNotInTrack = -2031,
+ timeNotInMedia = -2032,
+ badEditIndex = -2033,
+ internalQuickTimeError = -2034,
+ cantEnableTrack = -2035,
+ invalidRect = -2036,
+ invalidSampleNum = -2037,
+ invalidChunkNum = -2038,
+ invalidSampleDescIndex = -2039,
+ invalidChunkCache = -2040,
+ invalidSampleDescription = -2041,
+ dataNotOpenForRead = -2042,
+ dataNotOpenForWrite = -2043,
+ dataAlreadyOpenForWrite = -2044,
+ dataAlreadyClosed = -2045,
+ endOfDataReached = -2046,
+ dataNoDataRef = -2047,
+ noMovieFound = -2048,
+ invalidDataRefContainer = -2049,
+ badDataRefIndex = -2050,
+ noDefaultDataRef = -2051,
+ couldNotUseAnExistingSample = -2052,
+ featureUnsupported = -2053,
+ noVideoTrackInMovieErr = -2054, /* QT for Windows error */
+ noSoundTrackInMovieErr = -2055, /* QT for Windows error */
+ soundSupportNotAvailableErr = -2056, /* QT for Windows error */
+ unsupportedAuxiliaryImportData = -2057,
+ auxiliaryExportDataUnavailable = -2058,
+ samplesAlreadyInMediaErr = -2059,
+ noSourceTreeFoundErr = -2060,
+ sourceNotFoundErr = -2061,
+ movieTextNotFoundErr = -2062,
+ missingRequiredParameterErr = -2063,
+ invalidSpriteWorldPropertyErr = -2064,
+ invalidSpritePropertyErr = -2065,
+ gWorldsNotSameDepthAndSizeErr = -2066,
+ invalidSpriteIndexErr = -2067,
+ invalidImageIndexErr = -2068,
+ invalidSpriteIDErr = -2069
+};
+
+enum {
+ internalComponentErr = -2070,
+ notImplementedMusicOSErr = -2071,
+ cantSendToSynthesizerOSErr = -2072,
+ cantReceiveFromSynthesizerOSErr = -2073,
+ illegalVoiceAllocationOSErr = -2074,
+ illegalPartOSErr = -2075,
+ illegalChannelOSErr = -2076,
+ illegalKnobOSErr = -2077,
+ illegalKnobValueOSErr = -2078,
+ illegalInstrumentOSErr = -2079,
+ illegalControllerOSErr = -2080,
+ midiManagerAbsentOSErr = -2081,
+ synthesizerNotRespondingOSErr = -2082,
+ synthesizerOSErr = -2083,
+ illegalNoteChannelOSErr = -2084,
+ noteChannelNotAllocatedOSErr = -2085,
+ tunePlayerFullOSErr = -2086,
+ tuneParseOSErr = -2087,
+ noExportProcAvailableErr = -2089,
+ videoOutputInUseErr = -2090
+};
+
+enum {
+ componentDllLoadErr = -2091, /* Windows specific errors (when component is loading)*/
+ componentDllEntryNotFoundErr = -2092, /* Windows specific errors (when component is loading)*/
+ qtmlDllLoadErr = -2093, /* Windows specific errors (when qtml is loading)*/
+ qtmlDllEntryNotFoundErr = -2094, /* Windows specific errors (when qtml is loading)*/
+ qtmlUninitialized = -2095,
+ unsupportedOSErr = -2096,
+ unsupportedProcessorErr = -2097
+};
+
+enum {
+ cannotFindAtomErr = -2101,
+ notLeafAtomErr = -2102,
+ atomsNotOfSameTypeErr = -2103,
+ atomIndexInvalidErr = -2104,
+ duplicateAtomTypeAndIDErr = -2105,
+ invalidAtomErr = -2106,
+ invalidAtomContainerErr = -2107,
+ invalidAtomTypeErr = -2108,
+ cannotBeLeafAtomErr = -2109,
+ pathTooLongErr = -2110,
+ emptyPathErr = -2111,
+ noPathMappingErr = -2112,
+ pathNotVerifiedErr = -2113,
+ unknownFormatErr = -2114,
+ wackBadFileErr = -2115,
+ wackForkNotFoundErr = -2116,
+ wackBadMetaDataErr = -2117,
+ qfcbNotFoundErr = -2118,
+ qfcbNotCreatedErr = -2119,
+ AAPNotCreatedErr = -2120,
+ AAPNotFoundErr = -2121,
+ ASDBadHeaderErr = -2122,
+ ASDBadForkErr = -2123,
+ ASDEntryNotFoundErr = -2124,
+ fileOffsetTooBigErr = -2125,
+ notAllowedToSaveMovieErr = -2126,
+ qtNetworkAlreadyAllocatedErr = -2127,
+ urlDataHHTTPProtocolErr = -2129,
+ urlDataHHTTPNoNetDriverErr = -2130,
+ urlDataHHTTPURLErr = -2131,
+ urlDataHHTTPRedirectErr = -2132,
+ urlDataHFTPProtocolErr = -2133,
+ urlDataHFTPShutdownErr = -2134,
+ urlDataHFTPBadUserErr = -2135,
+ urlDataHFTPBadPasswordErr = -2136,
+ urlDataHFTPServerErr = -2137,
+ urlDataHFTPDataConnectionErr = -2138,
+ urlDataHFTPNoDirectoryErr = -2139,
+ urlDataHFTPQuotaErr = -2140,
+ urlDataHFTPPermissionsErr = -2141,
+ urlDataHFTPFilenameErr = -2142,
+ urlDataHFTPNoNetDriverErr = -2143,
+ urlDataHFTPBadNameListErr = -2144,
+ urlDataHFTPNeedPasswordErr = -2145,
+ urlDataHFTPNoPasswordErr = -2146,
+ urlDataHFTPServerDisconnectedErr = -2147,
+ urlDataHFTPURLErr = -2148,
+ notEnoughDataErr = -2149,
+ qtActionNotHandledErr = -2157,
+ qtXMLParseErr = -2158,
+ qtXMLApplicationErr = -2159
+};
+
+
+enum {
+ digiUnimpErr = -2201, /* feature unimplemented */
+ qtParamErr = -2202, /* bad input parameter (out of range, etc) */
+ matrixErr = -2203, /* bad matrix, digitizer did nothing */
+ notExactMatrixErr = -2204, /* warning of bad matrix, digitizer did its best */
+ noMoreKeyColorsErr = -2205, /* all key indexes in use */
+ notExactSizeErr = -2206, /* Can't do exact size requested */
+ badDepthErr = -2207, /* Can't digitize into this depth */
+ noDMAErr = -2208, /* Can't do DMA digitizing (i.e. can't go to requested dest */
+ badCallOrderErr = -2209, /* Usually due to a status call being called prior to being setup first */
+ vdImageDescStaleErr = -2210, /* The ImageDescription previously returned from VDGetImageDescription is no longer valid */
+ vdHardwareGoneErr = -2211, /* The hardware device providing video frames has been unplugged */
+ vdDontHaveThatUniqueIDErr = -2212 /* The hardware device does not have the ID you are asking for */
+};
+
+
+/* Kernel Error Codes */
+enum {
+ kernelIncompleteErr = -2401,
+ kernelCanceledErr = -2402,
+ kernelOptionsErr = -2403,
+ kernelPrivilegeErr = -2404,
+ kernelUnsupportedErr = -2405,
+ kernelObjectExistsErr = -2406,
+ kernelWritePermissionErr = -2407,
+ kernelReadPermissionErr = -2408,
+ kernelExecutePermissionErr = -2409,
+ kernelDeletePermissionErr = -2410,
+ kernelExecutionLevelErr = -2411,
+ kernelAttributeErr = -2412,
+ kernelAsyncSendLimitErr = -2413,
+ kernelAsyncReceiveLimitErr = -2414,
+ kernelTimeoutErr = -2415,
+ kernelInUseErr = -2416,
+ kernelTerminatedErr = -2417,
+ kernelExceptionErr = -2418,
+ kernelIDErr = -2419,
+ kernelAlreadyFreeErr = -2421,
+ kernelReturnValueErr = -2422,
+ kernelUnrecoverableErr = -2499
+};
+
+
+
+enum {
+ /* Text Services Mgr error codes */
+ tsmComponentNoErr = 0, /* component result = no error */
+ tsmUnsupScriptLanguageErr = -2500,
+ tsmInputMethodNotFoundErr = -2501,
+ tsmNotAnAppErr = -2502, /* not an application error */
+ tsmAlreadyRegisteredErr = -2503, /* want to register again error */
+ tsmNeverRegisteredErr = -2504, /* app never registered error (not TSM aware) */
+ tsmInvalidDocIDErr = -2505, /* invalid TSM documentation id */
+ tsmTSMDocBusyErr = -2506, /* document is still active */
+ tsmDocNotActiveErr = -2507, /* document is NOT active */
+ tsmNoOpenTSErr = -2508, /* no open text service */
+ tsmCantOpenComponentErr = -2509, /* can't open the component */
+ tsmTextServiceNotFoundErr = -2510, /* no text service found */
+ tsmDocumentOpenErr = -2511, /* there are open documents */
+ tsmUseInputWindowErr = -2512, /* not TSM aware because we are using input window */
+ tsmTSHasNoMenuErr = -2513, /* the text service has no menu */
+ tsmTSNotOpenErr = -2514, /* text service is not open */
+ tsmComponentAlreadyOpenErr = -2515, /* text service already opened for the document */
+ tsmInputMethodIsOldErr = -2516, /* returned by GetDefaultInputMethod */
+ tsmScriptHasNoIMErr = -2517, /* script has no imput method or is using old IM */
+ tsmUnsupportedTypeErr = -2518, /* unSupported interface type error */
+ tsmUnknownErr = -2519, /* any other errors */
+ tsmInvalidContext = -2520, /* Invalid TSMContext specified in call */
+ tsmNoHandler = -2521, /* No Callback Handler exists for callback */
+ tsmNoMoreTokens = -2522, /* No more tokens are available for the source text */
+ tsmNoStem = -2523, /* No stem exists for the token */
+ tsmDefaultIsNotInputMethodErr = -2524 /* Current Input source is KCHR or uchr, not Input Method (GetDefaultInputMethod) */
+};
+
+
+enum {
+ /* Mixed Mode error codes */
+ mmInternalError = -2526
+};
+
+/* NameRegistry error codes */
+enum {
+ nrLockedErr = -2536,
+ nrNotEnoughMemoryErr = -2537,
+ nrInvalidNodeErr = -2538,
+ nrNotFoundErr = -2539,
+ nrNotCreatedErr = -2540,
+ nrNameErr = -2541,
+ nrNotSlotDeviceErr = -2542,
+ nrDataTruncatedErr = -2543,
+ nrPowerErr = -2544,
+ nrPowerSwitchAbortErr = -2545,
+ nrTypeMismatchErr = -2546,
+ nrNotModifiedErr = -2547,
+ nrOverrunErr = -2548,
+ nrResultCodeBase = -2549,
+ nrPathNotFound = -2550, /* a path component lookup failed */
+ nrPathBufferTooSmall = -2551, /* buffer for path is too small */
+ nrInvalidEntryIterationOp = -2552, /* invalid entry iteration operation */
+ nrPropertyAlreadyExists = -2553, /* property already exists */
+ nrIterationDone = -2554, /* iteration operation is done */
+ nrExitedIteratorScope = -2555, /* outer scope of iterator was exited */
+ nrTransactionAborted = -2556, /* transaction was aborted */
+ nrCallNotSupported = -2557 /* This call is not available or supported on this machine */
+};
+
+/* Icon Services error codes */
+enum {
+ invalidIconRefErr = -2580, /* The icon ref is not valid */
+ noSuchIconErr = -2581, /* The requested icon could not be found */
+ noIconDataAvailableErr = -2582 /* The necessary icon data is not available */
+};
+
+
+/*
+ Dynamic AppleScript errors:
+
+ These errors result from data-dependent conditions and are typically
+ signaled at runtime.
+*/
+enum {
+ errOSACantCoerce = errAECoercionFail, /* Signaled when a value can't be coerced to the desired type. */
+ errOSACantAccess = errAENoSuchObject, /* Signaled when an object is not found in a container*/
+ errOSACantAssign = -10006, /* Signaled when an object cannot be set in a container.*/
+ errOSAGeneralError = -2700, /* Signaled by user scripts or applications when no actual error code is to be returned.*/
+ errOSADivideByZero = -2701, /* Signaled when there is an attempt to divide by zero*/
+ errOSANumericOverflow = -2702, /* Signaled when integer or real value is too large to be represented*/
+ errOSACantLaunch = -2703, /* Signaled when application can't be launched or when it is remote and program linking is not enabled*/
+ errOSAAppNotHighLevelEventAware = -2704, /* Signaled when an application can't respond to AppleEvents*/
+ errOSACorruptTerminology = -2705, /* Signaled when an application's terminology resource is not readable*/
+ errOSAStackOverflow = -2706, /* Signaled when the runtime stack overflows*/
+ errOSAInternalTableOverflow = -2707, /* Signaled when a runtime internal data structure overflows*/
+ errOSADataBlockTooLarge = -2708, /* Signaled when an intrinsic limitation is exceeded for the size of a value or data structure.*/
+ errOSACantGetTerminology = -2709,
+ errOSACantCreate = -2710
+};
+
+/*
+ Component-specific dynamic script errors:
+
+ The range -2720 thru -2739 is reserved for component-specific runtime errors.
+ (Note that error codes from different scripting components in this range will
+ overlap.)
+*/
+/*
+ Static AppleScript errors:
+
+ These errors comprise what are commonly thought of as parse and compile-
+ time errors. However, in a dynamic system (e.g. AppleScript) any or all
+ of these may also occur at runtime.
+*/
+enum {
+ errOSATypeError = errAEWrongDataType,
+ OSAMessageNotUnderstood = errAEEventNotHandled, /* Signaled when a message was sent to an object that didn't handle it*/
+ OSAUndefinedHandler = errAEHandlerNotFound, /* Signaled when a function to be returned doesn't exist. */
+ OSAIllegalAccess = errAEAccessorNotFound, /* Signaled when a container can never have the requested object*/
+ OSAIllegalIndex = errAEIllegalIndex, /* Signaled when index was out of range. Specialization of errOSACantAccess*/
+ OSAIllegalRange = errAEImpossibleRange, /* Signaled when a range is screwy. Specialization of errOSACantAccess*/
+ OSAIllegalAssign = -10003, /* Signaled when an object can never be set in a container*/
+ OSASyntaxError = -2740, /* Signaled when a syntax error occurs. (e.g. "Syntax error" or "<this> can't go after <that>")*/
+ OSASyntaxTypeError = -2741, /* Signaled when another form of syntax was expected. (e.g. "expected a <type> but found <this>")*/
+ OSATokenTooLong = -2742, /* Signaled when a name or number is too long to be parsed*/
+ OSAMissingParameter = errAEDescNotFound, /* Signaled when a parameter is missing for a function invocation*/
+ OSAParameterMismatch = errAEWrongNumberArgs, /* Signaled when function is called with the wrong number of parameters, or a parameter pattern cannot be matched*/
+ OSADuplicateParameter = -2750, /* Signaled when a formal parameter, local variable, or instance variable is specified more than once*/
+ OSADuplicateProperty = -2751, /* Signaled when a formal parameter, local variable, or instance variable is specified more than once.*/
+ OSADuplicateHandler = -2752, /* Signaled when more than one handler is defined with the same name in a scope where the language doesn't allow it*/
+ OSAUndefinedVariable = -2753, /* Signaled when a variable is accessed that has no value*/
+ OSAInconsistentDeclarations = -2754, /* Signaled when a variable is declared inconsistently in the same scope, such as both local and global*/
+ OSAControlFlowError = -2755 /* Signaled when illegal control flow occurs in an application (no catcher for throw, non-lexical loop exit, etc.)*/
+};
+
+/*
+ Component-specific AppleScript static errors:
+
+ The range -2760 thru -2779 is reserved for component-specific parsing and
+ compile-time errors. (Note that error codes from different scripting
+ components in this range will overlap.)
+*/
+/*
+ Dialect-specific AppleScript errors:
+
+ The range -2780 thru -2799 is reserved for dialect specific error codes for
+ scripting components that support dialects. (Note that error codes from
+ different scripting components in this range will overlap, as well as error
+ codes from different dialects in the same scripting component.)
+*/
+
+/**************************************************************************
+ Apple Script Error Codes
+**************************************************************************/
+/* Runtime errors: */
+enum {
+ errASCantConsiderAndIgnore = -2720,
+ errASCantCompareMoreThan32k = -2721, /* Parser/Compiler errors: */
+ errASTerminologyNestingTooDeep = -2760,
+ errASIllegalFormalParameter = -2761,
+ errASParameterNotForEvent = -2762,
+ errASNoResultReturned = -2763, /* The range -2780 thru -2799 is reserved for dialect specific error codes. (Error codes from different dialects may overlap.) */
+ errASInconsistentNames = -2780 /* English errors: */
+};
+
+
+/* The preferred spelling for Code Fragment Manager errors:*/
+enum {
+ cfragFirstErrCode = -2800, /* The first value in the range of CFM errors.*/
+ cfragContextIDErr = -2800, /* The context ID was not valid.*/
+ cfragConnectionIDErr = -2801, /* The connection ID was not valid.*/
+ cfragNoSymbolErr = -2802, /* The specified symbol was not found.*/
+ cfragNoSectionErr = -2803, /* The specified section was not found.*/
+ cfragNoLibraryErr = -2804, /* The named library was not found.*/
+ cfragDupRegistrationErr = -2805, /* The registration name was already in use.*/
+ cfragFragmentFormatErr = -2806, /* A fragment's container format is unknown.*/
+ cfragUnresolvedErr = -2807, /* A fragment had "hard" unresolved imports.*/
+ cfragNoPositionErr = -2808, /* The registration insertion point was not found.*/
+ cfragNoPrivateMemErr = -2809, /* Out of memory for internal bookkeeping.*/
+ cfragNoClientMemErr = -2810, /* Out of memory for fragment mapping or section instances.*/
+ cfragNoIDsErr = -2811, /* No more CFM IDs for contexts, connections, etc.*/
+ cfragInitOrderErr = -2812, /* */
+ cfragImportTooOldErr = -2813, /* An import library was too old for a client.*/
+ cfragImportTooNewErr = -2814, /* An import library was too new for a client.*/
+ cfragInitLoopErr = -2815, /* Circularity in required initialization order.*/
+ cfragInitAtBootErr = -2816, /* A boot library has an initialization function. (System 7 only)*/
+ cfragLibConnErr = -2817, /* */
+ cfragCFMStartupErr = -2818, /* Internal error during CFM initialization.*/
+ cfragCFMInternalErr = -2819, /* An internal inconstistancy has been detected.*/
+ cfragFragmentCorruptErr = -2820, /* A fragment's container was corrupt (known format).*/
+ cfragInitFunctionErr = -2821, /* A fragment's initialization routine returned an error.*/
+ cfragNoApplicationErr = -2822, /* No application member found in the cfrg resource.*/
+ cfragArchitectureErr = -2823, /* A fragment has an unacceptable architecture.*/
+ cfragFragmentUsageErr = -2824, /* A semantic error in usage of the fragment.*/
+ cfragFileSizeErr = -2825, /* A file was too large to be mapped.*/
+ cfragNotClosureErr = -2826, /* The closure ID was actually a connection ID.*/
+ cfragNoRegistrationErr = -2827, /* The registration name was not found.*/
+ cfragContainerIDErr = -2828, /* The fragment container ID was not valid.*/
+ cfragClosureIDErr = -2829, /* The closure ID was not valid.*/
+ cfragAbortClosureErr = -2830, /* Used by notification handlers to abort a closure.*/
+ cfragOutputLengthErr = -2831, /* An output parameter is too small to hold the value.*/
+ cfragLastErrCode = -2899 /* The last value in the range of CFM errors.*/
+};
+
+#if OLDROUTINENAMES
+/* The old spelling for Code Fragment Manager errors, kept for compatibility:*/
+enum {
+ fragContextNotFound = cfragContextIDErr,
+ fragConnectionIDNotFound = cfragConnectionIDErr,
+ fragSymbolNotFound = cfragNoSymbolErr,
+ fragSectionNotFound = cfragNoSectionErr,
+ fragLibNotFound = cfragNoLibraryErr,
+ fragDupRegLibName = cfragDupRegistrationErr,
+ fragFormatUnknown = cfragFragmentFormatErr,
+ fragHadUnresolveds = cfragUnresolvedErr,
+ fragNoMem = cfragNoPrivateMemErr,
+ fragNoAddrSpace = cfragNoClientMemErr,
+ fragNoContextIDs = cfragNoIDsErr,
+ fragObjectInitSeqErr = cfragInitOrderErr,
+ fragImportTooOld = cfragImportTooOldErr,
+ fragImportTooNew = cfragImportTooNewErr,
+ fragInitLoop = cfragInitLoopErr,
+ fragInitRtnUsageErr = cfragInitAtBootErr,
+ fragLibConnErr = cfragLibConnErr,
+ fragMgrInitErr = cfragCFMStartupErr,
+ fragConstErr = cfragCFMInternalErr,
+ fragCorruptErr = cfragFragmentCorruptErr,
+ fragUserInitProcErr = cfragInitFunctionErr,
+ fragAppNotFound = cfragNoApplicationErr,
+ fragArchError = cfragArchitectureErr,
+ fragInvalidFragmentUsage = cfragFragmentUsageErr,
+ fragLastErrCode = cfragLastErrCode
+};
+
+#endif /* OLDROUTINENAMES */
+
+/*Component Manager & component errors*/
+enum {
+ invalidComponentID = -3000,
+ validInstancesExist = -3001,
+ componentNotCaptured = -3002,
+ componentDontRegister = -3003,
+ unresolvedComponentDLLErr = -3004
+};
+
+/*Translation manager & Translation components*/
+enum {
+ invalidTranslationPathErr = -3025, /*Source type to destination type not a valid path*/
+ couldNotParseSourceFileErr = -3026, /*Source document does not contain source type*/
+ noTranslationPathErr = -3030,
+ badTranslationSpecErr = -3031,
+ noPrefAppErr = -3032
+};
+
+enum {
+ buf2SmallErr = -3101,
+ noMPPErr = -3102,
+ ckSumErr = -3103,
+ extractErr = -3104,
+ readQErr = -3105,
+ atpLenErr = -3106,
+ atpBadRsp = -3107,
+ recNotFnd = -3108,
+ sktClosedErr = -3109
+};
+
+
+/* OpenTransport errors*/
+enum {
+ kOTNoError = 0, /* No Error occurred */
+ kOTOutOfMemoryErr = -3211, /* OT ran out of memory, may be a temporary */
+ kOTNotFoundErr = -3201, /* OT generic not found error */
+ kOTDuplicateFoundErr = -3216, /* OT generic duplicate found error */
+ kOTBadAddressErr = -3150, /* XTI2OSStatus(TBADADDR) A Bad address was specified */
+ kOTBadOptionErr = -3151, /* XTI2OSStatus(TBADOPT) A Bad option was specified */
+ kOTAccessErr = -3152, /* XTI2OSStatus(TACCES) Missing access permission */
+ kOTBadReferenceErr = -3153, /* XTI2OSStatus(TBADF) Bad provider reference */
+ kOTNoAddressErr = -3154, /* XTI2OSStatus(TNOADDR) No address was specified */
+ kOTOutStateErr = -3155, /* XTI2OSStatus(TOUTSTATE) Call issued in wrong state */
+ kOTBadSequenceErr = -3156, /* XTI2OSStatus(TBADSEQ) Sequence specified does not exist */
+ kOTSysErrorErr = -3157, /* XTI2OSStatus(TSYSERR) A system error occurred */
+ kOTLookErr = -3158, /* XTI2OSStatus(TLOOK) An event occurred - call Look() */
+ kOTBadDataErr = -3159, /* XTI2OSStatus(TBADDATA) An illegal amount of data was specified */
+ kOTBufferOverflowErr = -3160, /* XTI2OSStatus(TBUFOVFLW) Passed buffer not big enough */
+ kOTFlowErr = -3161, /* XTI2OSStatus(TFLOW) Provider is flow-controlled */
+ kOTNoDataErr = -3162, /* XTI2OSStatus(TNODATA) No data available for reading */
+ kOTNoDisconnectErr = -3163, /* XTI2OSStatus(TNODIS) No disconnect indication available */
+ kOTNoUDErrErr = -3164, /* XTI2OSStatus(TNOUDERR) No Unit Data Error indication available */
+ kOTBadFlagErr = -3165, /* XTI2OSStatus(TBADFLAG) A Bad flag value was supplied */
+ kOTNoReleaseErr = -3166, /* XTI2OSStatus(TNOREL) No orderly release indication available */
+ kOTNotSupportedErr = -3167, /* XTI2OSStatus(TNOTSUPPORT) Command is not supported */
+ kOTStateChangeErr = -3168, /* XTI2OSStatus(TSTATECHNG) State is changing - try again later */
+ kOTNoStructureTypeErr = -3169, /* XTI2OSStatus(TNOSTRUCTYPE) Bad structure type requested for OTAlloc */
+ kOTBadNameErr = -3170, /* XTI2OSStatus(TBADNAME) A bad endpoint name was supplied */
+ kOTBadQLenErr = -3171, /* XTI2OSStatus(TBADQLEN) A Bind to an in-use addr with qlen > 0 */
+ kOTAddressBusyErr = -3172, /* XTI2OSStatus(TADDRBUSY) Address requested is already in use */
+ kOTIndOutErr = -3173, /* XTI2OSStatus(TINDOUT) Accept failed because of pending listen */
+ kOTProviderMismatchErr = -3174, /* XTI2OSStatus(TPROVMISMATCH) Tried to accept on incompatible endpoint */
+ kOTResQLenErr = -3175, /* XTI2OSStatus(TRESQLEN) */
+ kOTResAddressErr = -3176, /* XTI2OSStatus(TRESADDR) */
+ kOTQFullErr = -3177, /* XTI2OSStatus(TQFULL) */
+ kOTProtocolErr = -3178, /* XTI2OSStatus(TPROTO) An unspecified provider error occurred */
+ kOTBadSyncErr = -3179, /* XTI2OSStatus(TBADSYNC) A synchronous call at interrupt time */
+ kOTCanceledErr = -3180, /* XTI2OSStatus(TCANCELED) The command was cancelled */
+ kEPERMErr = -3200, /* Permission denied */
+ kENOENTErr = -3201, /* No such file or directory */
+ kENORSRCErr = -3202, /* No such resource */
+ kEINTRErr = -3203, /* Interrupted system service */
+ kEIOErr = -3204, /* I/O error */
+ kENXIOErr = -3205, /* No such device or address */
+ kEBADFErr = -3208, /* Bad file number */
+ kEAGAINErr = -3210, /* Try operation again later */
+ kENOMEMErr = -3211, /* Not enough space */
+ kEACCESErr = -3212, /* Permission denied */
+ kEFAULTErr = -3213, /* Bad address */
+ kEBUSYErr = -3215, /* Device or resource busy */
+ kEEXISTErr = -3216, /* File exists */
+ kENODEVErr = -3218, /* No such device */
+ kEINVALErr = -3221, /* Invalid argument */
+ kENOTTYErr = -3224, /* Not a character device */
+ kEPIPEErr = -3231, /* Broken pipe */
+ kERANGEErr = -3233, /* Message size too large for STREAM */
+ kEWOULDBLOCKErr = -3234, /* Call would block, so was aborted */
+ kEDEADLKErr = -3234, /* or a deadlock would occur */
+ kEALREADYErr = -3236, /* */
+ kENOTSOCKErr = -3237, /* Socket operation on non-socket */
+ kEDESTADDRREQErr = -3238, /* Destination address required */
+ kEMSGSIZEErr = -3239, /* Message too long */
+ kEPROTOTYPEErr = -3240, /* Protocol wrong type for socket */
+ kENOPROTOOPTErr = -3241, /* Protocol not available */
+ kEPROTONOSUPPORTErr = -3242, /* Protocol not supported */
+ kESOCKTNOSUPPORTErr = -3243, /* Socket type not supported */
+ kEOPNOTSUPPErr = -3244, /* Operation not supported on socket */
+ kEADDRINUSEErr = -3247, /* Address already in use */
+ kEADDRNOTAVAILErr = -3248, /* Can't assign requested address */
+ kENETDOWNErr = -3249, /* Network is down */
+ kENETUNREACHErr = -3250, /* Network is unreachable */
+ kENETRESETErr = -3251, /* Network dropped connection on reset */
+ kECONNABORTEDErr = -3252, /* Software caused connection abort */
+ kECONNRESETErr = -3253, /* Connection reset by peer */
+ kENOBUFSErr = -3254, /* No buffer space available */
+ kEISCONNErr = -3255, /* Socket is already connected */
+ kENOTCONNErr = -3256, /* Socket is not connected */
+ kESHUTDOWNErr = -3257, /* Can't send after socket shutdown */
+ kETOOMANYREFSErr = -3258, /* Too many references: can't splice */
+ kETIMEDOUTErr = -3259, /* Connection timed out */
+ kECONNREFUSEDErr = -3260, /* Connection refused */
+ kEHOSTDOWNErr = -3263, /* Host is down */
+ kEHOSTUNREACHErr = -3264, /* No route to host */
+ kEPROTOErr = -3269, /* ooo fill out missing codes ooo */
+ kETIMEErr = -3270, /* */
+ kENOSRErr = -3271, /* */
+ kEBADMSGErr = -3272, /* */
+ kECANCELErr = -3273, /* */
+ kENOSTRErr = -3274, /* */
+ kENODATAErr = -3275, /* */
+ kEINPROGRESSErr = -3276, /* */
+ kESRCHErr = -3277, /* */
+ kENOMSGErr = -3278, /* */
+ kOTClientNotInittedErr = -3279, /* */
+ kOTPortHasDiedErr = -3280, /* */
+ kOTPortWasEjectedErr = -3281, /* */
+ kOTBadConfigurationErr = -3282, /* */
+ kOTConfigurationChangedErr = -3283, /* */
+ kOTUserRequestedErr = -3284, /* */
+ kOTPortLostConnection = -3285 /* */
+};
+
+
+/* Color Picker errors*/
+enum {
+ firstPickerError = -4000,
+ invalidPickerType = firstPickerError,
+ requiredFlagsDontMatch = -4001,
+ pickerResourceError = -4002,
+ cantLoadPicker = -4003,
+ cantCreatePickerWindow = -4004,
+ cantLoadPackage = -4005,
+ pickerCantLive = -4006,
+ colorSyncNotInstalled = -4007,
+ badProfileError = -4008,
+ noHelpForItem = -4009
+};
+
+
+
+/* NSL error codes*/
+enum {
+ kNSL68kContextNotSupported = -4170, /* no 68k allowed*/
+ kNSLSchedulerError = -4171, /* A custom thread routine encountered an error*/
+ kNSLBadURLSyntax = -4172, /* URL contains illegal characters*/
+ kNSLNoCarbonLib = -4173,
+ kNSLUILibraryNotAvailable = -4174, /* The NSL UI Library needs to be in the Extensions Folder*/
+ kNSLNotImplementedYet = -4175,
+ kNSLErrNullPtrError = -4176,
+ kNSLSomePluginsFailedToLoad = -4177, /* (one or more plugins failed to load, but at least one did load; this error isn't fatal)*/
+ kNSLNullNeighborhoodPtr = -4178, /* (client passed a null neighborhood ptr)*/
+ kNSLNoPluginsForSearch = -4179, /* (no plugins will respond to search request; bad protocol(s)?)*/
+ kNSLSearchAlreadyInProgress = -4180, /* (you can only have one ongoing search per clientRef)*/
+ kNSLNoPluginsFound = -4181, /* (manager didn't find any valid plugins to load)*/
+ kNSLPluginLoadFailed = -4182, /* (manager unable to load one of the plugins)*/
+ kNSLBadProtocolTypeErr = -4183, /* (client is trying to add a null protocol type)*/
+ kNSLNullListPtr = -4184, /* (client is trying to add items to a nil list)*/
+ kNSLBadClientInfoPtr = -4185, /* (nil ClientAsyncInfoPtr; no reference available)*/
+ kNSLCannotContinueLookup = -4186, /* (Can't continue lookup; error or bad state)*/
+ kNSLBufferTooSmallForData = -4187, /* (Client buffer too small for data from plugin)*/
+ kNSLNoContextAvailable = -4188, /* (ContinueLookup function ptr invalid)*/
+ kNSLRequestBufferAlreadyInList = -4189,
+ kNSLInvalidPluginSpec = -4190,
+ kNSLNoSupportForService = -4191,
+ kNSLBadNetConnection = -4192,
+ kNSLBadDataTypeErr = -4193,
+ kNSLBadServiceTypeErr = -4194,
+ kNSLBadReferenceErr = -4195,
+ kNSLNoElementsInList = -4196,
+ kNSLInsufficientOTVer = -4197,
+ kNSLInsufficientSysVer = -4198,
+ kNSLNotInitialized = -4199,
+ kNSLInitializationFailed = -4200 /* UNABLE TO INITIALIZE THE MANAGER!!!!! DO NOT CONTINUE!!!!*/
+};
+
+
+
+/* desktop printing error codes*/
+enum {
+ kDTPHoldJobErr = -4200,
+ kDTPStopQueueErr = -4201,
+ kDTPTryAgainErr = -4202,
+ kDTPAbortJobErr = 128
+};
+
+
+/* ColorSync Result codes */
+enum {
+ /* Profile Access Errors */
+ cmElementTagNotFound = -4200,
+ cmIndexRangeErr = -4201, /* Tag index out of range */
+ cmCantDeleteElement = -4202,
+ cmFatalProfileErr = -4203,
+ cmInvalidProfile = -4204, /* A Profile must contain a 'cs1 ' tag to be valid */
+ cmInvalidProfileLocation = -4205, /* Operation not supported for this profile location */
+ cmCantCopyModifiedV1Profile = -4215, /* Illegal to copy version 1 profiles that have been modified */
+ /* Profile Search Errors */
+ cmInvalidSearch = -4206, /* Bad Search Handle */
+ cmSearchError = -4207,
+ cmErrIncompatibleProfile = -4208, /* Other ColorSync Errors */
+ cmInvalidColorSpace = -4209, /* Profile colorspace does not match bitmap type */
+ cmInvalidSrcMap = -4210, /* Source pix/bit map was invalid */
+ cmInvalidDstMap = -4211, /* Destination pix/bit map was invalid */
+ cmNoGDevicesError = -4212, /* Begin/End Matching -- no gdevices available */
+ cmInvalidProfileComment = -4213, /* Bad Profile comment during drawpicture */
+ cmRangeOverFlow = -4214, /* Color conversion warning that some output color values over/underflowed and were clipped */
+ cmNamedColorNotFound = -4216, /* NamedColor not found */
+ cmCantGamutCheckError = -4217 /* Gammut checking not supported by this ColorWorld */
+};
+
+/* new Folder Manager error codes */
+enum {
+ badFolderDescErr = -4270,
+ duplicateFolderDescErr = -4271,
+ noMoreFolderDescErr = -4272,
+ invalidFolderTypeErr = -4273,
+ duplicateRoutingErr = -4274,
+ routingNotFoundErr = -4275,
+ badRoutingSizeErr = -4276
+};
+
+
+/* Core Foundation errors*/
+enum {
+ coreFoundationUnknownErr = -4960
+};
+
+/* ScrapMgr error codes (CarbonLib 1.0 and later)*/
+enum {
+ internalScrapErr = -4988,
+ duplicateScrapFlavorErr = -4989,
+ badScrapRefErr = -4990,
+ processStateIncorrectErr = -4991,
+ scrapPromiseNotKeptErr = -4992,
+ noScrapPromiseKeeperErr = -4993,
+ nilScrapFlavorDataErr = -4994,
+ scrapFlavorFlagsMismatchErr = -4995,
+ scrapFlavorSizeMismatchErr = -4996,
+ illegalScrapFlavorFlagsErr = -4997,
+ illegalScrapFlavorTypeErr = -4998,
+ illegalScrapFlavorSizeErr = -4999,
+ scrapFlavorNotFoundErr = -102, /* == noTypeErr*/
+ needClearScrapErr = -100 /* == noScrapErr*/
+};
+
+
+enum {
+ /* AFP Protocol Errors */
+ afpAccessDenied = -5000, /* Insufficient access privileges for operation */
+ afpAuthContinue = -5001, /* Further information required to complete AFPLogin call */
+ afpBadUAM = -5002, /* Unknown user authentication method specified */
+ afpBadVersNum = -5003, /* Unknown AFP protocol version number specified */
+ afpBitmapErr = -5004, /* Bitmap contained bits undefined for call */
+ afpCantMove = -5005, /* Move destination is offspring of source, or root was specified */
+ afpDenyConflict = -5006, /* Specified open/deny modes conflict with current open modes */
+ afpDirNotEmpty = -5007, /* Cannot delete non-empty directory */
+ afpDiskFull = -5008, /* Insufficient free space on volume for operation */
+ afpEofError = -5009, /* Read beyond logical end-of-file */
+ afpFileBusy = -5010, /* Cannot delete an open file */
+ afpFlatVol = -5011, /* Cannot create directory on specified volume */
+ afpItemNotFound = -5012, /* Unknown UserName/UserID or missing comment/APPL entry */
+ afpLockErr = -5013, /* Some or all of requested range is locked by another user */
+ afpMiscErr = -5014, /* Unexpected error encountered during execution */
+ afpNoMoreLocks = -5015, /* Maximum lock limit reached */
+ afpNoServer = -5016, /* Server not responding */
+ afpObjectExists = -5017, /* Specified destination file or directory already exists */
+ afpObjectNotFound = -5018, /* Specified file or directory does not exist */
+ afpParmErr = -5019, /* A specified parameter was out of allowable range */
+ afpRangeNotLocked = -5020, /* Tried to unlock range that was not locked by user */
+ afpRangeOverlap = -5021, /* Some or all of range already locked by same user */
+ afpSessClosed = -5022, /* Session closed*/
+ afpUserNotAuth = -5023, /* No AFPLogin call has successfully been made for this session */
+ afpCallNotSupported = -5024, /* Unsupported AFP call was made */
+ afpObjectTypeErr = -5025, /* File/Directory specified where Directory/File expected */
+ afpTooManyFilesOpen = -5026, /* Maximum open file count reached */
+ afpServerGoingDown = -5027, /* Server is shutting down */
+ afpCantRename = -5028, /* AFPRename cannot rename volume */
+ afpDirNotFound = -5029, /* Unknown directory specified */
+ afpIconTypeError = -5030, /* Icon size specified different from existing icon size */
+ afpVolLocked = -5031, /* Volume is Read-Only */
+ afpObjectLocked = -5032, /* Object is M/R/D/W inhibited*/
+ afpContainsSharedErr = -5033, /* the folder being shared contains a shared folder*/
+ afpIDNotFound = -5034,
+ afpIDExists = -5035,
+ afpDiffVolErr = -5036,
+ afpCatalogChanged = -5037,
+ afpSameObjectErr = -5038,
+ afpBadIDErr = -5039,
+ afpPwdSameErr = -5040, /* Someone tried to change their password to the same password on a mantadory password change */
+ afpPwdTooShortErr = -5041, /* The password being set is too short: there is a minimum length that must be met or exceeded */
+ afpPwdExpiredErr = -5042, /* The password being used is too old: this requires the user to change the password before log-in can continue */
+ afpInsideSharedErr = -5043, /* The folder being shared is inside a shared folder OR the folder contains a shared folder and is being moved into a shared folder */
+ /* OR the folder contains a shared folder and is being moved into the descendent of a shared folder.*/
+ afpInsideTrashErr = -5044, /* The folder being shared is inside the trash folder OR the shared folder is being moved into the trash folder */
+ /* OR the folder is being moved to the trash and it contains a shared folder */
+ afpPwdNeedsChangeErr = -5045, /* The password needs to be changed*/
+ afpPwdPolicyErr = -5046, /* Password does not conform to servers password policy */
+ afpAlreadyLoggedInErr = -5047, /* User has been authenticated but is already logged in from another machine (and that's not allowed on this server) */
+ afpCallNotAllowed = -5048 /* The server knows what you wanted to do, but won't let you do it just now */
+};
+
+enum {
+ /* AppleShare Client Errors */
+ afpBadDirIDType = -5060,
+ afpCantMountMoreSrvre = -5061, /* The Maximum number of server connections has been reached */
+ afpAlreadyMounted = -5062, /* The volume is already mounted */
+ afpSameNodeErr = -5063 /* An Attempt was made to connect to a file server running on the same machine */
+};
+
+
+
+/*Text Engines, TSystemTextEngines, HIEditText error coded*/
+
+enum {
+ errUnknownAttributeTag = -5240,
+ errMarginWilllNotFit = -5241,
+ errNotInImagingMode = -5242,
+ errAlreadyInImagingMode = -5243,
+ errEngineNotFound = -5244,
+ errIteratorReachedEnd = -5245,
+ errInvalidRange = -5246,
+ errOffsetNotOnElementBounday = -5247,
+ errNoHiliteText = -5248,
+ errEmptyScrap = -5249,
+ errReadOnlyText = -5250,
+ errUnknownElement = -5251,
+ errNonContiuousAttribute = -5252,
+ errCannotUndo = -5253
+};
+
+
+/* HTMLRendering OSStaus codes*/
+enum {
+ hrHTMLRenderingLibNotInstalledErr = -5360,
+ hrMiscellaneousExceptionErr = -5361,
+ hrUnableToResizeHandleErr = -5362
+};
+
+
+/* IAExtractor result codes */
+enum {
+ errIANoErr = 0,
+ errIAUnknownErr = -5380,
+ errIAAllocationErr = -5381,
+ errIAParamErr = -5382,
+ errIANoMoreItems = -5383,
+ errIABufferTooSmall = -5384,
+ errIACanceled = -5385,
+ errIAInvalidDocument = -5386,
+ errIATextExtractionErr = -5387,
+ errIAEndOfTextRun = -5388
+};
+
+
+/* QuickTime Streaming Errors */
+enum {
+ qtsBadSelectorErr = -5400,
+ qtsBadStateErr = -5401,
+ qtsBadDataErr = -5402, /* something is wrong with the data */
+ qtsUnsupportedDataTypeErr = -5403,
+ qtsUnsupportedRateErr = -5404,
+ qtsUnsupportedFeatureErr = -5405,
+ qtsTooMuchDataErr = -5406,
+ qtsUnknownValueErr = -5407,
+ qtsTimeoutErr = -5408,
+ qtsConnectionFailedErr = -5420,
+ qtsAddressBusyErr = -5421
+};
+
+
+enum {
+ /*Gestalt error codes*/
+ gestaltUnknownErr = -5550, /*value returned if Gestalt doesn't know the answer*/
+ gestaltUndefSelectorErr = -5551, /*undefined selector was passed to Gestalt*/
+ gestaltDupSelectorErr = -5552, /*tried to add an entry that already existed*/
+ gestaltLocationErr = -5553 /*gestalt function ptr wasn't in sysheap*/
+};
+
+
+/* Menu Manager error codes*/
+enum {
+ menuPropertyInvalidErr = -5603, /* invalid property creator */
+ menuPropertyInvalid = menuPropertyInvalidErr, /* "menuPropertyInvalid" is deprecated */
+ menuPropertyNotFoundErr = -5604, /* specified property wasn't found */
+ menuNotFoundErr = -5620, /* specified menu or menu ID wasn't found */
+ menuUsesSystemDefErr = -5621, /* GetMenuDefinition failed because the menu uses the system MDEF */
+ menuItemNotFoundErr = -5622, /* specified menu item wasn't found*/
+ menuInvalidErr = -5623 /* menu is invalid*/
+};
+
+
+/* Window Manager error codes*/
+enum {
+ errInvalidWindowPtr = -5600, /* tried to pass a bad WindowRef argument*/
+ errInvalidWindowRef = -5600, /* tried to pass a bad WindowRef argument*/
+ errUnsupportedWindowAttributesForClass = -5601, /* tried to create a window with WindowAttributes not supported by the WindowClass*/
+ errWindowDoesNotHaveProxy = -5602, /* tried to do something requiring a proxy to a window which doesn't have a proxy*/
+ errInvalidWindowProperty = -5603, /* tried to access a property tag with private creator*/
+ errWindowPropertyNotFound = -5604, /* tried to get a nonexistent property*/
+ errUnrecognizedWindowClass = -5605, /* tried to create a window with a bad WindowClass*/
+ errCorruptWindowDescription = -5606, /* tried to load a corrupt window description (size or version fields incorrect)*/
+ errUserWantsToDragWindow = -5607, /* if returned from TrackWindowProxyDrag, you should call DragWindow on the window*/
+ errWindowsAlreadyInitialized = -5608, /* tried to call InitFloatingWindows twice, or called InitWindows and then floating windows*/
+ errFloatingWindowsNotInitialized = -5609, /* called HideFloatingWindows or ShowFloatingWindows without calling InitFloatingWindows*/
+ errWindowNotFound = -5610 /* returned from FindWindowOfClass*/
+};
+
+
+/* Dialog Mgr error codes*/
+enum {
+ dialogNoTimeoutErr = -5640
+};
+
+
+/* NavigationLib error codes*/
+enum {
+ kNavInvalidSystemConfigErr = -5696,
+ kNavCustomControlMessageFailedErr = -5697,
+ kNavInvalidCustomControlMessageErr = -5698,
+ kNavMissingKindStringErr = -5699
+};
+
+
+/* Collection Manager errors */
+enum {
+ collectionItemLockedErr = -5750,
+ collectionItemNotFoundErr = -5751,
+ collectionIndexRangeErr = -5752,
+ collectionVersionErr = -5753
+};
+
+
+/* QuickTime Streaming Server Errors */
+enum {
+ kQTSSUnknownErr = -6150
+};
+
+
+enum {
+ /* Display Manager error codes (-6220...-6269)*/
+ kDMGenErr = -6220, /*Unexpected Error*/
+ /* Mirroring-Specific Errors */
+ kDMMirroringOnAlready = -6221, /*Returned by all calls that need mirroring to be off to do their thing.*/
+ kDMWrongNumberOfDisplays = -6222, /*Can only handle 2 displays for now.*/
+ kDMMirroringBlocked = -6223, /*DMBlockMirroring() has been called.*/
+ kDMCantBlock = -6224, /*Mirroring is already on, can't Block now (call DMUnMirror() first).*/
+ kDMMirroringNotOn = -6225, /*Returned by all calls that need mirroring to be on to do their thing.*/
+ /* Other Display Manager Errors */
+ kSysSWTooOld = -6226, /*Missing critical pieces of System Software.*/
+ kDMSWNotInitializedErr = -6227, /*Required software not initialized (eg windowmanager or display mgr).*/
+ kDMDriverNotDisplayMgrAwareErr = -6228, /*Video Driver does not support display manager.*/
+ kDMDisplayNotFoundErr = -6229, /*Could not find item (will someday remove).*/
+ kDMNotFoundErr = -6229, /*Could not find item.*/
+ kDMDisplayAlreadyInstalledErr = -6230, /*Attempt to add an already installed display.*/
+ kDMMainDisplayCannotMoveErr = -6231, /*Trying to move main display (or a display mirrored to it) */
+ kDMNoDeviceTableclothErr = -6231, /*obsolete*/
+ kDMFoundErr = -6232 /*Did not proceed because we found an item*/
+};
+
+
+/*
+ Language Analysis error codes
+*/
+enum {
+ laTooSmallBufferErr = -6984, /* output buffer is too small to store any result */
+ laEnvironmentBusyErr = -6985, /* specified environment is used */
+ laEnvironmentNotFoundErr = -6986, /* can't fint the specified environment */
+ laEnvironmentExistErr = -6987, /* same name environment is already exists */
+ laInvalidPathErr = -6988, /* path is not correct */
+ laNoMoreMorphemeErr = -6989, /* nothing to read*/
+ laFailAnalysisErr = -6990, /* analysis failed*/
+ laTextOverFlowErr = -6991, /* text is too long*/
+ laDictionaryNotOpenedErr = -6992, /* the dictionary is not opened*/
+ laDictionaryUnknownErr = -6993, /* can't use this dictionary with this environment*/
+ laDictionaryTooManyErr = -6994, /* too many dictionaries*/
+ laPropertyValueErr = -6995, /* Invalid property value*/
+ laPropertyUnknownErr = -6996, /* the property is unknown to this environment*/
+ laPropertyIsReadOnlyErr = -6997, /* the property is read only*/
+ laPropertyNotFoundErr = -6998, /* can't find the property*/
+ laPropertyErr = -6999, /* Error in properties*/
+ laEngineNotFoundErr = -7000 /* can't find the engine*/
+};
+
+
+enum {
+ kUSBNoErr = 0,
+ kUSBNoTran = 0,
+ kUSBNoDelay = 0,
+ kUSBPending = 1
+};
+
+/*
+
+ USB Hardware Errors
+ Note pipe stalls are communication
+ errors. The affected pipe can not
+ be used until USBClearPipeStallByReference
+ is used.
+ kUSBEndpointStallErr is returned in
+ response to a stall handshake
+ from a device. The device has to be
+ cleared before a USBClearPipeStallByReference
+ can be used.
+*/
+enum {
+ kUSBNotSent2Err = -6901, /* Transaction not sent */
+ kUSBNotSent1Err = -6902, /* Transaction not sent */
+ kUSBBufUnderRunErr = -6903, /* Host hardware failure on data out, PCI busy? */
+ kUSBBufOvrRunErr = -6904, /* Host hardware failure on data in, PCI busy? */
+ kUSBRes2Err = -6905,
+ kUSBRes1Err = -6906,
+ kUSBUnderRunErr = -6907, /* Less data than buffer */
+ kUSBOverRunErr = -6908, /* Packet too large or more data than buffer */
+ kUSBWrongPIDErr = -6909, /* Pipe stall, Bad or wrong PID */
+ kUSBPIDCheckErr = -6910, /* Pipe stall, PID CRC error */
+ kUSBNotRespondingErr = -6911, /* Pipe stall, No device, device hung */
+ kUSBEndpointStallErr = -6912, /* Device didn't understand */
+ kUSBDataToggleErr = -6913, /* Pipe stall, Bad data toggle */
+ kUSBBitstufErr = -6914, /* Pipe stall, bitstuffing */
+ kUSBCRCErr = -6915, /* Pipe stall, bad CRC */
+ kUSBLinkErr = -6916
+};
+
+
+/*
+
+ USB Manager Errors
+*/
+enum {
+ kUSBQueueFull = -6948, /* Internal queue maxxed */
+ kUSBNotHandled = -6987, /* Notification was not handled (same as NotFound)*/
+ kUSBUnknownNotification = -6949, /* Notification type not defined */
+ kUSBBadDispatchTable = -6950 /* Improper driver dispatch table */
+};
+
+
+/* USB Services Errors */
+enum {
+ kUSBQueueAborted = -6970, /* Pipe zero stall cleared.*/
+ kUSBTimedOut = -6971, /* Transaction timed out. */
+ kUSBDeviceDisconnected = -6972, /* Disconnected during suspend or reset */
+ kUSBDeviceNotSuspended = -6973, /* device is not suspended for resume */
+ kUSBDeviceSuspended = -6974, /* Device is suspended */
+ kUSBInvalidBuffer = -6975, /* bad buffer, usually nil */
+ kUSBDevicePowerProblem = -6976, /* Device has a power problem */
+ kUSBDeviceBusy = -6977, /* Device is already being configured */
+ kUSBUnknownInterfaceErr = -6978, /* Interface ref not recognised */
+ kUSBPipeStalledError = -6979, /* Pipe has stalled, error needs to be cleared */
+ kUSBPipeIdleError = -6980, /* Pipe is Idle, it will not accept transactions */
+ kUSBNoBandwidthError = -6981, /* Not enough bandwidth available */
+ kUSBAbortedError = -6982, /* Pipe aborted */
+ kUSBFlagsError = -6983, /* Unused flags not zeroed */
+ kUSBCompletionError = -6984, /* no completion routine specified */
+ kUSBPBLengthError = -6985, /* pbLength too small */
+ kUSBPBVersionError = -6986, /* Wrong pbVersion */
+ kUSBNotFound = -6987, /* Not found */
+ kUSBOutOfMemoryErr = -6988, /* Out of memory */
+ kUSBDeviceErr = -6989, /* Device error */
+ kUSBNoDeviceErr = -6990, /* No device*/
+ kUSBAlreadyOpenErr = -6991, /* Already open */
+ kUSBTooManyTransactionsErr = -6992, /* Too many transactions */
+ kUSBUnknownRequestErr = -6993, /* Unknown request */
+ kUSBRqErr = -6994, /* Request error */
+ kUSBIncorrectTypeErr = -6995, /* Incorrect type */
+ kUSBTooManyPipesErr = -6996, /* Too many pipes */
+ kUSBUnknownPipeErr = -6997, /* Pipe ref not recognised */
+ kUSBUnknownDeviceErr = -6998, /* device ref not recognised */
+ kUSBInternalErr = -6999 /* Internal error */
+};
+
+
+/*
+ DictionaryMgr error codes
+*/
+enum {
+ dcmParamErr = -7100, /* bad parameter*/
+ dcmNotDictionaryErr = -7101, /* not dictionary*/
+ dcmBadDictionaryErr = -7102, /* invalid dictionary*/
+ dcmPermissionErr = -7103, /* invalid permission*/
+ dcmDictionaryNotOpenErr = -7104, /* dictionary not opened*/
+ dcmDictionaryBusyErr = -7105, /* dictionary is busy*/
+ dcmBlockFullErr = -7107, /* dictionary block full*/
+ dcmNoRecordErr = -7108, /* no such record*/
+ dcmDupRecordErr = -7109, /* same record already exist*/
+ dcmNecessaryFieldErr = -7110, /* lack required/identify field*/
+ dcmBadFieldInfoErr = -7111, /* incomplete information*/
+ dcmBadFieldTypeErr = -7112, /* no such field type supported*/
+ dcmNoFieldErr = -7113, /* no such field exist*/
+ dcmBadKeyErr = -7115, /* bad key information*/
+ dcmTooManyKeyErr = -7116, /* too many key field*/
+ dcmBadDataSizeErr = -7117, /* too big data size*/
+ dcmBadFindMethodErr = -7118, /* no such find method supported*/
+ dcmBadPropertyErr = -7119, /* no such property exist*/
+ dcmProtectedErr = -7121, /* need keyword to use dictionary*/
+ dcmNoAccessMethodErr = -7122, /* no such AccessMethod*/
+ dcmBadFeatureErr = -7124, /* invalid AccessMethod feature*/
+ dcmIterationCompleteErr = -7126, /* no more item in iterator*/
+ dcmBufferOverflowErr = -7127 /* data is larger than buffer size*/
+};
+
+
+/* ATSUnicode error codes*/
+enum {
+ kATSUInvalidTextLayoutErr = -8790, /* An attempt was made to use a ATSUTextLayout */
+ /* which hadn't been initialized or is otherwise */
+ /* in an invalid state. */
+ kATSUInvalidStyleErr = -8791, /* An attempt was made to use a ATSUStyle which */
+ /* hadn't been properly allocated or is otherwise */
+ /* in an invalid state. */
+ kATSUInvalidTextRangeErr = -8792, /* An attempt was made to extract information */
+ /* from or perform an operation on a ATSUTextLayout */
+ /* for a range of text not covered by the ATSUTextLayout. */
+ kATSUFontsMatched = -8793, /* This is not an error code but is returned by */
+ /* ATSUMatchFontsToText() when changes need to */
+ /* be made to the fonts associated with the text. */
+ kATSUFontsNotMatched = -8794, /* This value is returned by ATSUMatchFontsToText() */
+ /* when the text contains Unicode characters which */
+ /* cannot be represented by any installed font. */
+ kATSUNoCorrespondingFontErr = -8795, /* This value is retrned by font ID conversion */
+ /* routines ATSUFONDtoFontID() and ATSUFontIDtoFOND() */
+ /* to indicate that the input font ID is valid but */
+ /* there is no conversion possible. For example, */
+ /* data-fork fonts can only be used with ATSUI not */
+ /* the FontManager, and so converting an ATSUIFontID */
+ /* for such a font will fail. */
+ kATSUInvalidFontErr = -8796, /* Used when an attempt was made to use an invalid font ID.*/
+ kATSUInvalidAttributeValueErr = -8797, /* Used when an attempt was made to use an attribute with */
+ /* a bad or undefined value. */
+ kATSUInvalidAttributeSizeErr = -8798, /* Used when an attempt was made to use an attribute with a */
+ /* bad size. */
+ kATSUInvalidAttributeTagErr = -8799, /* Used when an attempt was made to use a tag value that*/
+ /* was not appropriate for the function call it was used. */
+ kATSUInvalidCacheErr = -8800, /* Used when an attempt was made to read in style data */
+ /* from an invalid cache. Either the format of the */
+ /* cached data doesn't match that used by Apple Type */
+ /* Services for Unicode(tm) Imaging, or the cached data */
+ /* is corrupt. */
+ kATSUNotSetErr = -8801, /* Used when the client attempts to retrieve an attribute, */
+ /* font feature, or font variation from a style when it */
+ /* hadn't been set. In such a case, the default value will*/
+ /* be returned for the attribute's value.*/
+ kATSUNoStyleRunsAssignedErr = -8802, /* Used when an attempt was made to measure, highlight or draw*/
+ /* a ATSUTextLayout object that has no styleRuns associated with it.*/
+ kATSUQuickDrawTextErr = -8803, /* Used when QuickDraw Text encounters an error rendering or measuring*/
+ /* a line of ATSUI text.*/
+ kATSULowLevelErr = -8804, /* Used when an error was encountered within the low level ATS */
+ /* mechanism performing an operation requested by ATSUI.*/
+ kATSUNoFontCmapAvailableErr = -8805, /* Used when no CMAP table can be accessed or synthesized for the */
+ /* font passed into a SetAttributes Font call.*/
+ kATSUNoFontScalerAvailableErr = -8806, /* Used when no font scaler is available for the font passed*/
+ /* into a SetAttributes Font call.*/
+ kATSUCoordinateOverflowErr = -8807, /* Used to indicate the coordinates provided to an ATSUI routine caused*/
+ /* a coordinate overflow (i.e. > 32K).*/
+ kATSULineBreakInWord = -8808, /* This is not an error code but is returned by ATSUBreakLine to */
+ /* indicate that the returned offset is within a word since there was*/
+ /* only less than one word that could fit the requested width.*/
+ kATSULastErr = -8809 /* The last ATSUI error code.*/
+};
+
+
+/* Error & status codes for general text and text encoding conversion*/
+
+enum {
+ /* general text errors*/
+ kTextUnsupportedEncodingErr = -8738, /* specified encoding not supported for this operation*/
+ kTextMalformedInputErr = -8739, /* in DBCS, for example, high byte followed by invalid low byte*/
+ kTextUndefinedElementErr = -8740, /* text conversion errors*/
+ kTECMissingTableErr = -8745,
+ kTECTableChecksumErr = -8746,
+ kTECTableFormatErr = -8747,
+ kTECCorruptConverterErr = -8748, /* invalid converter object reference*/
+ kTECNoConversionPathErr = -8749,
+ kTECBufferBelowMinimumSizeErr = -8750, /* output buffer too small to allow processing of first input text element*/
+ kTECArrayFullErr = -8751, /* supplied name buffer or TextRun, TextEncoding, or UnicodeMapping array is too small*/
+ kTECBadTextRunErr = -8752,
+ kTECPartialCharErr = -8753, /* input buffer ends in the middle of a multibyte character, conversion stopped*/
+ kTECUnmappableElementErr = -8754,
+ kTECIncompleteElementErr = -8755, /* text element may be incomplete or is too long for internal buffers*/
+ kTECDirectionErr = -8756, /* direction stack overflow, etc.*/
+ kTECGlobalsUnavailableErr = -8770, /* globals have already been deallocated (premature TERM)*/
+ kTECItemUnavailableErr = -8771, /* item (e.g. name) not available for specified region (& encoding if relevant)*/
+ /* text conversion status codes*/
+ kTECUsedFallbacksStatus = -8783,
+ kTECNeedFlushStatus = -8784,
+ kTECOutputBufferFullStatus = -8785, /* output buffer has no room for conversion of next input text element (partial conversion)*/
+ /* deprecated error & status codes for low-level converter*/
+ unicodeChecksumErr = -8769,
+ unicodeNoTableErr = -8768,
+ unicodeVariantErr = -8767,
+ unicodeFallbacksErr = -8766,
+ unicodePartConvertErr = -8765,
+ unicodeBufErr = -8764,
+ unicodeCharErr = -8763,
+ unicodeElementErr = -8762,
+ unicodeNotFoundErr = -8761,
+ unicodeTableFormatErr = -8760,
+ unicodeDirectionErr = -8759,
+ unicodeContextualErr = -8758,
+ unicodeTextEncodingDataErr = -8757
+};
+
+
+/* UTCUtils Status Codes */
+enum {
+ kUTCUnderflowErr = -8850,
+ kUTCOverflowErr = -8851,
+ kIllegalClockValueErr = -8852
+};
+
+
+/* QuickTime errors (Image Compression Manager) */
+enum {
+ codecErr = -8960,
+ noCodecErr = -8961,
+ codecUnimpErr = -8962,
+ codecSizeErr = -8963,
+ codecScreenBufErr = -8964,
+ codecImageBufErr = -8965,
+ codecSpoolErr = -8966,
+ codecAbortErr = -8967,
+ codecWouldOffscreenErr = -8968,
+ codecBadDataErr = -8969,
+ codecDataVersErr = -8970,
+ codecExtensionNotFoundErr = -8971,
+ scTypeNotFoundErr = codecExtensionNotFoundErr,
+ codecConditionErr = -8972,
+ codecOpenErr = -8973,
+ codecCantWhenErr = -8974,
+ codecCantQueueErr = -8975,
+ codecNothingToBlitErr = -8976,
+ codecNoMemoryPleaseWaitErr = -8977,
+ codecDisabledErr = -8978, /* codec disabled itself -- pass codecFlagReenable to reset*/
+ codecNeedToFlushChainErr = -8979,
+ lockPortBitsBadSurfaceErr = -8980,
+ lockPortBitsWindowMovedErr = -8981,
+ lockPortBitsWindowResizedErr = -8982,
+ lockPortBitsWindowClippedErr = -8983,
+ lockPortBitsBadPortErr = -8984,
+ lockPortBitsSurfaceLostErr = -8985,
+ codecParameterDialogConfirm = -8986,
+ codecNeedAccessKeyErr = -8987, /* codec needs password in order to decompress*/
+ codecOffscreenFailedErr = -8988,
+ codecDroppedFrameErr = -8989, /* returned from ImageCodecDrawBand */
+ directXObjectAlreadyExists = -8990,
+ lockPortBitsWrongGDeviceErr = -8991,
+ codecOffscreenFailedPleaseRetryErr = -8992,
+ badCodecCharacterizationErr = -8993,
+ noThumbnailFoundErr = -8994
+};
+
+
+/* PCCard error codes */
+enum {
+ kBadAdapterErr = -9050, /* invalid adapter number*/
+ kBadAttributeErr = -9051, /* specified attributes field value is invalid*/
+ kBadBaseErr = -9052, /* specified base system memory address is invalid*/
+ kBadEDCErr = -9053, /* specified EDC generator specified is invalid*/
+ kBadIRQErr = -9054, /* specified IRQ level is invalid*/
+ kBadOffsetErr = -9055, /* specified PC card memory array offset is invalid*/
+ kBadPageErr = -9056, /* specified page is invalid*/
+ kBadSizeErr = -9057, /* specified size is invalid*/
+ kBadSocketErr = -9058, /* specified logical or physical socket number is invalid*/
+ kBadTypeErr = -9059, /* specified window or interface type is invalid*/
+ kBadVccErr = -9060, /* specified Vcc power level index is invalid*/
+ kBadVppErr = -9061, /* specified Vpp1 or Vpp2 power level index is invalid*/
+ kBadWindowErr = -9062, /* specified window is invalid*/
+ kBadArgLengthErr = -9063, /* ArgLength argument is invalid*/
+ kBadArgsErr = -9064, /* values in argument packet are invalid*/
+ kBadHandleErr = -9065, /* clientHandle is invalid*/
+ kBadCISErr = -9066, /* CIS on card is invalid*/
+ kBadSpeedErr = -9067, /* specified speed is unavailable*/
+ kReadFailureErr = -9068, /* unable to complete read request*/
+ kWriteFailureErr = -9069, /* unable to complete write request*/
+ kGeneralFailureErr = -9070, /* an undefined error has occurred*/
+ kNoCardErr = -9071, /* no PC card in the socket*/
+ kUnsupportedFunctionErr = -9072, /* function is not supported by this implementation*/
+ kUnsupportedModeErr = -9073, /* mode is not supported*/
+ kBusyErr = -9074, /* unable to process request at this time - try later*/
+ kWriteProtectedErr = -9075, /* media is write-protected*/
+ kConfigurationLockedErr = -9076, /* a configuration has already been locked*/
+ kInUseErr = -9077, /* requested resource is being used by a client*/
+ kNoMoreItemsErr = -9078, /* there are no more of the requested item*/
+ kOutOfResourceErr = -9079, /* Card Services has exhausted the resource*/
+ kNoCardSevicesSocketsErr = -9080,
+ kInvalidRegEntryErr = -9081,
+ kBadLinkErr = -9082,
+ kBadDeviceErr = -9083,
+ k16BitCardErr = -9084,
+ kCardBusCardErr = -9085,
+ kPassCallToChainErr = -9086,
+ kCantConfigureCardErr = -9087,
+ kPostCardEventErr = -9088, /* _PCCSLPostCardEvent failed and dropped an event */
+ kInvalidDeviceNumber = -9089,
+ kUnsupportedVsErr = -9090, /* Unsupported Voltage Sense */
+ kInvalidCSClientErr = -9091, /* Card Services ClientID is not registered */
+ kBadTupleDataErr = -9092, /* Data in tuple is invalid */
+ kBadCustomIFIDErr = -9093, /* Custom interface ID is invalid */
+ kNoIOWindowRequestedErr = -9094, /* Request I/O window before calling configuration */
+ kNoMoreTimerClientsErr = -9095, /* All timer callbacks are in use */
+ kNoMoreInterruptSlotsErr = -9096, /* All internal Interrupt slots are in use */
+ kNoClientTableErr = -9097, /* The client table has not be initialized yet */
+ kUnsupportedCardErr = -9098, /* Card not supported by generic enabler*/
+ kNoCardEnablersFoundErr = -9099, /* No Enablers were found*/
+ kNoEnablerForCardErr = -9100, /* No Enablers were found that can support the card*/
+ kNoCompatibleNameErr = -9101, /* There is no compatible driver name for this device*/
+ kClientRequestDenied = -9102, /* CS Clients should return this code inorder to */
+ /* deny a request-type CS Event */
+ kNotReadyErr = -9103, /* PC Card failed to go ready */
+ kTooManyIOWindowsErr = -9104, /* device requested more than one I/O window */
+ kAlreadySavedStateErr = -9105, /* The state has been saved on previous call */
+ kAttemptDupCardEntryErr = -9106, /* The Enabler was asked to create a duplicate card entry */
+ kCardPowerOffErr = -9107, /* Power to the card has been turned off */
+ kNotZVCapableErr = -9108, /* This socket does not support Zoomed Video */
+ kNoCardBusCISErr = -9109 /* No valid CIS exists for this CardBus card */
+};
+
+
+/* QuickTime errors (Sequence Grabber) */
+enum {
+ noDeviceForChannel = -9400,
+ grabTimeComplete = -9401,
+ cantDoThatInCurrentMode = -9402,
+ notEnoughMemoryToGrab = -9403,
+ notEnoughDiskSpaceToGrab = -9404,
+ couldntGetRequiredComponent = -9405,
+ badSGChannel = -9406,
+ seqGrabInfoNotAvailable = -9407,
+ deviceCantMeetRequest = -9408
+};
+
+/* QuickTime errors (Movie Controller) */
+enum {
+ badControllerHeight = -9994,
+ editingNotAllowed = -9995,
+ controllerBoundsNotExact = -9996,
+ cannotSetWidthOfAttachedController = -9997,
+ controllerHasFixedHeight = -9998,
+ cannotMoveAttachedController = -9999
+};
+
+/* AERegistry Errors */
+enum {
+ errAEBadKeyForm = -10002,
+ errAECantHandleClass = -10010,
+ errAECantSupplyType = -10009,
+ errAECantUndo = -10015,
+ errAEEventFailed = -10000,
+ errAEIndexTooLarge = -10007,
+ errAEInTransaction = -10011,
+ errAELocalOnly = -10016,
+ errAENoSuchTransaction = -10012,
+ errAENotAnElement = -10008,
+ errAENotASingleObject = -10014,
+ errAENotModifiable = -10003,
+ errAENoUserSelection = -10013,
+ errAEPrivilegeError = -10004,
+ errAEReadDenied = -10005,
+ errAETypeError = -10001,
+ errAEWriteDenied = -10006,
+ errAENotAnEnumMember = -10023, /* enumerated value in SetData is not allowed for this property */
+ errAECantPutThatThere = -10024, /* in make new, duplicate, etc. class can't be an element of container */
+ errAEPropertiesClash = -10025 /* illegal combination of properties settings for Set Data, make new, or duplicate */
+};
+
+/* TELErr */
+enum {
+ telGenericError = -1,
+ telNoErr = 0,
+ telNoTools = 8, /* no telephone tools found in extension folder */
+ telBadTermErr = -10001, /* invalid TELHandle or handle not found*/
+ telBadDNErr = -10002, /* TELDNHandle not found or invalid */
+ telBadCAErr = -10003, /* TELCAHandle not found or invalid */
+ telBadHandErr = -10004, /* bad handle specified */
+ telBadProcErr = -10005, /* bad msgProc specified */
+ telCAUnavail = -10006, /* a CA is not available */
+ telNoMemErr = -10007, /* no memory to allocate handle */
+ telNoOpenErr = -10008, /* unable to open terminal */
+ telBadHTypeErr = -10010, /* bad hook type specified */
+ telHTypeNotSupp = -10011, /* hook type not supported by this tool */
+ telBadLevelErr = -10012, /* bad volume level setting */
+ telBadVTypeErr = -10013, /* bad volume type error */
+ telVTypeNotSupp = -10014, /* volume type not supported by this tool*/
+ telBadAPattErr = -10015, /* bad alerting pattern specified */
+ telAPattNotSupp = -10016, /* alerting pattern not supported by tool*/
+ telBadIndex = -10017, /* bad index specified */
+ telIndexNotSupp = -10018, /* index not supported by this tool */
+ telBadStateErr = -10019, /* bad device state specified */
+ telStateNotSupp = -10020, /* device state not supported by tool */
+ telBadIntExt = -10021, /* bad internal external error */
+ telIntExtNotSupp = -10022, /* internal external type not supported by this tool */
+ telBadDNDType = -10023, /* bad DND type specified */
+ telDNDTypeNotSupp = -10024, /* DND type is not supported by this tool */
+ telFeatNotSub = -10030, /* feature not subscribed */
+ telFeatNotAvail = -10031, /* feature subscribed but not available */
+ telFeatActive = -10032, /* feature already active */
+ telFeatNotSupp = -10033, /* feature program call not supported by this tool */
+ telConfLimitErr = -10040, /* limit specified is too high for this configuration */
+ telConfNoLimit = -10041, /* no limit was specified but required*/
+ telConfErr = -10042, /* conference was not prepared */
+ telConfRej = -10043, /* conference request was rejected */
+ telTransferErr = -10044, /* transfer not prepared */
+ telTransferRej = -10045, /* transfer request rejected */
+ telCBErr = -10046, /* call back feature not set previously */
+ telConfLimitExceeded = -10047, /* attempt to exceed switch conference limits */
+ telBadDNType = -10050, /* DN type invalid */
+ telBadPageID = -10051, /* bad page ID specified*/
+ telBadIntercomID = -10052, /* bad intercom ID specified */
+ telBadFeatureID = -10053, /* bad feature ID specified */
+ telBadFwdType = -10054, /* bad fwdType specified */
+ telBadPickupGroupID = -10055, /* bad pickup group ID specified */
+ telBadParkID = -10056, /* bad park id specified */
+ telBadSelect = -10057, /* unable to select or deselect DN */
+ telBadBearerType = -10058, /* bad bearerType specified */
+ telBadRate = -10059, /* bad rate specified */
+ telDNTypeNotSupp = -10060, /* DN type not supported by tool */
+ telFwdTypeNotSupp = -10061, /* forward type not supported by tool */
+ telBadDisplayMode = -10062, /* bad display mode specified */
+ telDisplayModeNotSupp = -10063, /* display mode not supported by tool */
+ telNoCallbackRef = -10064, /* no call back reference was specified, but is required */
+ telAlreadyOpen = -10070, /* terminal already open */
+ telStillNeeded = -10071, /* terminal driver still needed by someone else */
+ telTermNotOpen = -10072, /* terminal not opened via TELOpenTerm */
+ telCANotAcceptable = -10080, /* CA not "acceptable" */
+ telCANotRejectable = -10081, /* CA not "rejectable" */
+ telCANotDeflectable = -10082, /* CA not "deflectable" */
+ telPBErr = -10090, /* parameter block error, bad format */
+ telBadFunction = -10091, /* bad msgCode specified */
+ /* telNoTools = -10101, unable to find any telephone tools */
+ telNoSuchTool = -10102, /* unable to find tool with name specified */
+ telUnknownErr = -10103, /* unable to set config */
+ telNoCommFolder = -10106, /* Communications/Extensions f not found */
+ telInitFailed = -10107, /* initialization failed */
+ telBadCodeResource = -10108, /* code resource not found */
+ telDeviceNotFound = -10109, /* device not found */
+ telBadProcID = -10110, /* invalid procID */
+ telValidateFailed = -10111, /* telValidate failed */
+ telAutoAnsNotOn = -10112, /* autoAnswer in not turned on */
+ telDetAlreadyOn = -10113, /* detection is already turned on */
+ telBadSWErr = -10114, /* Software not installed properly */
+ telBadSampleRate = -10115, /* incompatible sample rate */
+ telNotEnoughdspBW = -10116 /* not enough real-time for allocation */
+};
+
+
+enum {
+ /*Power Manager Errors*/
+ pmBusyErr = -13000, /*Power Mgr never ready to start handshake*/
+ pmReplyTOErr = -13001, /*Timed out waiting for reply*/
+ pmSendStartErr = -13002, /*during send, pmgr did not start hs*/
+ pmSendEndErr = -13003, /*during send, pmgr did not finish hs*/
+ pmRecvStartErr = -13004, /*during receive, pmgr did not start hs*/
+ pmRecvEndErr = -13005 /*during receive, pmgr did not finish hs configured for this connection*/
+};
+
+/*Power Manager 2.0 Errors*/
+enum {
+ kPowerHandlerExistsForDeviceErr = -13006,
+ kPowerHandlerNotFoundForDeviceErr = -13007,
+ kPowerHandlerNotFoundForProcErr = -13008,
+ kPowerMgtMessageNotHandled = -13009,
+ kPowerMgtRequestDenied = -13010,
+ kCantReportProcessorTemperatureErr = -13013,
+ kProcessorTempRoutineRequiresMPLib2 = -13014,
+ kNoSuchPowerSource = -13020
+};
+
+
+/* Debugging library errors */
+enum {
+ debuggingExecutionContextErr = -13880, /* routine cannot be called at this time */
+ debuggingDuplicateSignatureErr = -13881, /* componentSignature already registered */
+ debuggingDuplicateOptionErr = -13882, /* optionSelectorNum already registered */
+ debuggingInvalidSignatureErr = -13883, /* componentSignature not registered */
+ debuggingInvalidOptionErr = -13884, /* optionSelectorNum is not registered */
+ debuggingInvalidNameErr = -13885, /* componentName or optionName is invalid (NULL) */
+ debuggingNoCallbackErr = -13886, /* debugging component has no callback */
+ debuggingNoMatchErr = -13887 /* debugging component or option not found at this index */
+};
+
+
+/* HID device driver error codes */
+enum {
+ kHIDVersionIncompatibleErr = -13909,
+ kHIDDeviceNotReady = -13910 /* The device is still initializing, try again later*/
+};
+
+
+/* HID error codes */
+enum {
+ kHIDSuccess = 0,
+ kHIDInvalidRangePageErr = -13923,
+ kHIDReportIDZeroErr = -13924,
+ kHIDReportCountZeroErr = -13925,
+ kHIDReportSizeZeroErr = -13926,
+ kHIDUnmatchedDesignatorRangeErr = -13927,
+ kHIDUnmatchedStringRangeErr = -13928,
+ kHIDInvertedUsageRangeErr = -13929,
+ kHIDUnmatchedUsageRangeErr = -13930,
+ kHIDInvertedPhysicalRangeErr = -13931,
+ kHIDInvertedLogicalRangeErr = -13932,
+ kHIDBadLogicalMaximumErr = -13933,
+ kHIDBadLogicalMinimumErr = -13934,
+ kHIDUsagePageZeroErr = -13935,
+ kHIDEndOfDescriptorErr = -13936,
+ kHIDNotEnoughMemoryErr = -13937,
+ kHIDBadParameterErr = -13938,
+ kHIDNullPointerErr = -13939,
+ kHIDInvalidReportLengthErr = -13940,
+ kHIDInvalidReportTypeErr = -13941,
+ kHIDBadLogPhysValuesErr = -13942,
+ kHIDIncompatibleReportErr = -13943,
+ kHIDInvalidPreparsedDataErr = -13944,
+ kHIDNotValueArrayErr = -13945,
+ kHIDUsageNotFoundErr = -13946,
+ kHIDValueOutOfRangeErr = -13947,
+ kHIDBufferTooSmallErr = -13948,
+ kHIDNullStateErr = -13949,
+ kHIDBaseError = -13950
+};
+
+
+/* MacTextEditor error codes */
+enum {
+ kTXNEndIterationErr = -22000,
+ kTXNCannotAddFrameErr = -22001,
+ kTXNInvalidFrameIDErr = -22002,
+ kTXNIllegalToCrossDataBoundariesErr = -22003,
+ kTXNUserCanceledOperationErr = -22004,
+ kTXNBadDefaultFileTypeWarning = -22005,
+ kTXNCannotSetAutoIndentErr = -22006,
+ kTXNRunIndexOutofBoundsErr = -22007,
+ kTXNNoMatchErr = -22008,
+ kTXNAttributeTagInvalidForRunErr = -22009, /*dataValue is set to this per invalid tag*/
+ kTXNSomeOrAllTagsInvalidForRunErr = -22010,
+ kTXNInvalidRunIndex = -22011,
+ kTXNAlreadyInitializedErr = -22012,
+ kTXNCannotTurnTSMOffWhenUsingUnicodeErr = -22013,
+ kTXNCopyNotAllowedInEchoModeErr = -22014,
+ kTXNDataTypeNotAllowedErr = -22015
+};
+
+
+
+
+/*Possible errors from the PrinterStatus bottleneck*/
+enum {
+ printerStatusOpCodeNotSupportedErr = -25280
+};
+
+
+/* Keychain Manager error codes */
+enum {
+ errKCNotAvailable = -25291,
+ errKCReadOnly = -25292,
+ errKCAuthFailed = -25293,
+ errKCNoSuchKeychain = -25294,
+ errKCInvalidKeychain = -25295,
+ errKCDuplicateKeychain = -25296,
+ errKCDuplicateCallback = -25297,
+ errKCInvalidCallback = -25298,
+ errKCDuplicateItem = -25299,
+ errKCItemNotFound = -25300,
+ errKCBufferTooSmall = -25301,
+ errKCDataTooLarge = -25302,
+ errKCNoSuchAttr = -25303,
+ errKCInvalidItemRef = -25304,
+ errKCInvalidSearchRef = -25305,
+ errKCNoSuchClass = -25306,
+ errKCNoDefaultKeychain = -25307,
+ errKCInteractionNotAllowed = -25308,
+ errKCReadOnlyAttr = -25309,
+ errKCWrongKCVersion = -25310,
+ errKCKeySizeNotAllowed = -25311,
+ errKCNoStorageModule = -25312,
+ errKCNoCertificateModule = -25313,
+ errKCNoPolicyModule = -25314,
+ errKCInteractionRequired = -25315,
+ errKCDataNotAvailable = -25316,
+ errKCDataNotModifiable = -25317,
+ errKCCreateChainFailed = -25318
+};
+
+
+/* UnicodeUtilities error & status codes*/
+enum {
+ kUCOutputBufferTooSmall = -25340, /* Output buffer too small for Unicode string result*/
+ kUCTextBreakLocatorMissingType = -25341 /* Unicode text break error*/
+};
+
+
+
+/* Multiprocessing API error codes*/
+enum {
+ kMPIterationEndErr = -29275,
+ kMPPrivilegedErr = -29276,
+ kMPProcessCreatedErr = -29288,
+ kMPProcessTerminatedErr = -29289,
+ kMPTaskCreatedErr = -29290,
+ kMPTaskBlockedErr = -29291,
+ kMPTaskStoppedErr = -29292, /* A convention used with MPThrowException.*/
+ kMPBlueBlockingErr = -29293,
+ kMPDeletedErr = -29295,
+ kMPTimeoutErr = -29296,
+ kMPTaskAbortedErr = -29297,
+ kMPInsufficientResourcesErr = -29298,
+ kMPInvalidIDErr = -29299
+};
+
+/* StringCompare error codes (in TextUtils range)*/
+enum {
+ kCollateAttributesNotFoundErr = -29500,
+ kCollateInvalidOptions = -29501,
+ kCollateMissingUnicodeTableErr = -29502,
+ kCollateUnicodeConvertFailedErr = -29503,
+ kCollatePatternNotFoundErr = -29504,
+ kCollateInvalidChar = -29505,
+ kCollateBufferTooSmall = -29506,
+ kCollateInvalidCollationRef = -29507
+};
+
+
+/* FontSync OSStatus Codes */
+enum {
+ kFNSInvalidReferenceErr = -29580, /* ref. was NULL or otherwise bad */
+ kFNSBadReferenceVersionErr = -29581, /* ref. version is out of known range */
+ kFNSInvalidProfileErr = -29582, /* profile is NULL or otherwise bad */
+ kFNSBadProfileVersionErr = -29583, /* profile version is out of known range */
+ kFNSDuplicateReferenceErr = -29584, /* the ref. being added is already in the profile */
+ kFNSMismatchErr = -29585, /* reference didn't match or wasn't found in profile */
+ kFNSInsufficientDataErr = -29586, /* insufficient data for the operation */
+ kFNSBadFlattenedSizeErr = -29587, /* flattened size didn't match input or was too small */
+ kFNSNameNotFoundErr = -29589 /* The name with the requested paramters was not found */
+};
+
+
+
+/* MacLocales error codes*/
+enum {
+ kLocalesBufferTooSmallErr = -30001,
+ kLocalesTableFormatErr = -30002,
+ kLocalesDefaultDisplayStatus = -30029 /* Requested display locale unavailable, used default*/
+};
+
+
+/* Settings Manager (formerly known as Location Manager) Errors */
+enum {
+ kALMInternalErr = -30049,
+ kALMGroupNotFoundErr = -30048,
+ kALMNoSuchModuleErr = -30047,
+ kALMModuleCommunicationErr = -30046,
+ kALMDuplicateModuleErr = -30045,
+ kALMInstallationErr = -30044,
+ kALMDeferSwitchErr = -30043,
+ kALMRebootFlagsLevelErr = -30042
+};
+
+enum {
+ kALMLocationNotFoundErr = kALMGroupNotFoundErr /* Old name */
+};
+
+
+/* SoundSprocket Error Codes */
+enum {
+ kSSpInternalErr = -30340,
+ kSSpVersionErr = -30341,
+ kSSpCantInstallErr = -30342,
+ kSSpParallelUpVectorErr = -30343,
+ kSSpScaleToZeroErr = -30344
+};
+
+
+/* NetSprocket Error Codes */
+enum {
+ kNSpInitializationFailedErr = -30360,
+ kNSpAlreadyInitializedErr = -30361,
+ kNSpTopologyNotSupportedErr = -30362,
+ kNSpPipeFullErr = -30364,
+ kNSpHostFailedErr = -30365,
+ kNSpProtocolNotAvailableErr = -30366,
+ kNSpInvalidGameRefErr = -30367,
+ kNSpInvalidParameterErr = -30369,
+ kNSpOTNotPresentErr = -30370,
+ kNSpOTVersionTooOldErr = -30371,
+ kNSpMemAllocationErr = -30373,
+ kNSpAlreadyAdvertisingErr = -30374,
+ kNSpNotAdvertisingErr = -30376,
+ kNSpInvalidAddressErr = -30377,
+ kNSpFreeQExhaustedErr = -30378,
+ kNSpRemovePlayerFailedErr = -30379,
+ kNSpAddressInUseErr = -30380,
+ kNSpFeatureNotImplementedErr = -30381,
+ kNSpNameRequiredErr = -30382,
+ kNSpInvalidPlayerIDErr = -30383,
+ kNSpInvalidGroupIDErr = -30384,
+ kNSpNoPlayersErr = -30385,
+ kNSpNoGroupsErr = -30386,
+ kNSpNoHostVolunteersErr = -30387,
+ kNSpCreateGroupFailedErr = -30388,
+ kNSpAddPlayerFailedErr = -30389,
+ kNSpInvalidDefinitionErr = -30390,
+ kNSpInvalidProtocolRefErr = -30391,
+ kNSpInvalidProtocolListErr = -30392,
+ kNSpTimeoutErr = -30393,
+ kNSpGameTerminatedErr = -30394,
+ kNSpConnectFailedErr = -30395,
+ kNSpSendFailedErr = -30396,
+ kNSpMessageTooBigErr = -30397,
+ kNSpCantBlockErr = -30398,
+ kNSpJoinFailedErr = -30399
+};
+
+
+/* InputSprockets error codes */
+enum {
+ kISpInternalErr = -30420,
+ kISpSystemListErr = -30421,
+ kISpBufferToSmallErr = -30422,
+ kISpElementInListErr = -30423,
+ kISpElementNotInListErr = -30424,
+ kISpSystemInactiveErr = -30425,
+ kISpDeviceInactiveErr = -30426,
+ kISpSystemActiveErr = -30427,
+ kISpDeviceActiveErr = -30428,
+ kISpListBusyErr = -30429
+};
+
+/* DrawSprockets error/warning codes */
+enum {
+ kDSpNotInitializedErr = -30440L,
+ kDSpSystemSWTooOldErr = -30441L,
+ kDSpInvalidContextErr = -30442L,
+ kDSpInvalidAttributesErr = -30443L,
+ kDSpContextAlreadyReservedErr = -30444L,
+ kDSpContextNotReservedErr = -30445L,
+ kDSpContextNotFoundErr = -30446L,
+ kDSpFrameRateNotReadyErr = -30447L,
+ kDSpConfirmSwitchWarning = -30448L,
+ kDSpInternalErr = -30449L,
+ kDSpStereoContextErr = -30450L
+};
+
+
+/*
+ ***************************************************************************
+ Find By Content errors are assigned in the range -30500 to -30539, inclusive.
+ ***************************************************************************
+*/
+enum {
+ kFBCvTwinExceptionErr = -30500, /*no telling what it was*/
+ kFBCnoIndexesFound = -30501,
+ kFBCallocFailed = -30502, /*probably low memory*/
+ kFBCbadParam = -30503,
+ kFBCfileNotIndexed = -30504,
+ kFBCbadIndexFile = -30505, /*bad FSSpec, or bad data in file*/
+ kFBCcompactionFailed = -30506, /*V-Twin exception caught*/
+ kFBCvalidationFailed = -30507, /*V-Twin exception caught*/
+ kFBCindexingFailed = -30508, /*V-Twin exception caught*/
+ kFBCcommitFailed = -30509, /*V-Twin exception caught*/
+ kFBCdeletionFailed = -30510, /*V-Twin exception caught*/
+ kFBCmoveFailed = -30511, /*V-Twin exception caught*/
+ kFBCtokenizationFailed = -30512, /*couldn't read from document or query*/
+ kFBCmergingFailed = -30513, /*couldn't merge index files*/
+ kFBCindexCreationFailed = -30514, /*couldn't create index*/
+ kFBCaccessorStoreFailed = -30515,
+ kFBCaddDocFailed = -30516,
+ kFBCflushFailed = -30517,
+ kFBCindexNotFound = -30518,
+ kFBCnoSearchSession = -30519,
+ kFBCindexingCanceled = -30520,
+ kFBCaccessCanceled = -30521,
+ kFBCindexFileDestroyed = -30522,
+ kFBCindexNotAvailable = -30523,
+ kFBCsearchFailed = -30524,
+ kFBCsomeFilesNotIndexed = -30525,
+ kFBCillegalSessionChange = -30526, /*tried to add/remove vols to a session*/
+ /*that has hits*/
+ kFBCanalysisNotAvailable = -30527,
+ kFBCbadIndexFileVersion = -30528,
+ kFBCsummarizationCanceled = -30529,
+ kFBCindexDiskIOFailed = -30530,
+ kFBCbadSearchSession = -30531,
+ kFBCnoSuchHit = -30532
+};
+
+
+/* QuickTime VR Errors */
+enum {
+ notAQTVRMovieErr = -30540,
+ constraintReachedErr = -30541,
+ callNotSupportedByNodeErr = -30542,
+ selectorNotSupportedByNodeErr = -30543,
+ invalidNodeIDErr = -30544,
+ invalidViewStateErr = -30545,
+ timeNotInViewErr = -30546,
+ propertyNotSupportedByNodeErr = -30547,
+ settingNotSupportedByNodeErr = -30548,
+ limitReachedErr = -30549,
+ invalidNodeFormatErr = -30550,
+ invalidHotSpotIDErr = -30551,
+ noMemoryNodeFailedInitialize = -30552,
+ streamingNodeNotReadyErr = -30553,
+ qtvrLibraryLoadErr = -30554,
+ qtvrUninitialized = -30555
+};
+
+
+/* Appearance Manager Error Codes */
+enum {
+ themeInvalidBrushErr = -30560, /* pattern index invalid */
+ themeProcessRegisteredErr = -30561,
+ themeProcessNotRegisteredErr = -30562,
+ themeBadTextColorErr = -30563,
+ themeHasNoAccentsErr = -30564,
+ themeBadCursorIndexErr = -30565,
+ themeScriptFontNotFoundErr = -30566, /* theme font requested for uninstalled script system */
+ themeMonitorDepthNotSupportedErr = -30567 /* theme not supported at monitor depth */
+};
+
+
+/*------------------------------------------------------------------------------------------------------*/
+/* Control Mgr Errors are in the range -30580 .. -30599 */
+/*------------------------------------------------------------------------------------------------------*/
+enum {
+ errMessageNotSupported = -30580,
+ errDataNotSupported = -30581,
+ errControlDoesntSupportFocus = -30582,
+ errWindowDoesntSupportFocus = -30583,
+ errUnknownControl = -30584,
+ errCouldntSetFocus = -30585,
+ errNoRootControl = -30586,
+ errRootAlreadyExists = -30587,
+ errInvalidPartCode = -30588,
+ errControlsAlreadyExist = -30589,
+ errControlIsNotEmbedder = -30590,
+ errDataSizeMismatch = -30591,
+ errControlHiddenOrDisabled = -30592,
+ errWindowRegionCodeInvalid = -30593,
+ errCantEmbedIntoSelf = -30594,
+ errCantEmbedRoot = -30595,
+ errItemNotControl = -30596,
+ controlInvalidDataVersionErr = -30597,
+ controlPropertyInvalid = -5603,
+ controlPropertyNotFoundErr = -5604,
+ controlHandleInvalidErr = -30599
+};
+
+
+
+
+/* URLAccess Error Codes */
+enum {
+ kURLInvalidURLReferenceError = -30770,
+ kURLProgressAlreadyDisplayedError = -30771,
+ kURLDestinationExistsError = -30772,
+ kURLInvalidURLError = -30773,
+ kURLUnsupportedSchemeError = -30774,
+ kURLServerBusyError = -30775,
+ kURLAuthenticationError = -30776,
+ kURLPropertyNotYetKnownError = -30777,
+ kURLUnknownPropertyError = -30778,
+ kURLPropertyBufferTooSmallError = -30779,
+ kURLUnsettablePropertyError = -30780,
+ kURLInvalidCallError = -30781,
+ kURLFileEmptyError = -30783,
+ kURLExtensionFailureError = -30785,
+ kURLInvalidConfigurationError = -30786,
+ kURLAccessNotAvailableError = -30787,
+ kURL68kNotSupportedError = -30788
+};
+
+
+enum {
+ badComponentInstance = (long)0x80008001,
+ badComponentSelector = (long)0x80008002
+};
+
+
+
+enum {
+ dsBusError = 1, /*bus error*/
+ dsAddressErr = 2, /*address error*/
+ dsIllInstErr = 3, /*illegal instruction error*/
+ dsZeroDivErr = 4, /*zero divide error*/
+ dsChkErr = 5, /*check trap error*/
+ dsOvflowErr = 6, /*overflow trap error*/
+ dsPrivErr = 7, /*privilege violation error*/
+ dsTraceErr = 8, /*trace mode error*/
+ dsLineAErr = 9, /*line 1010 trap error*/
+ dsLineFErr = 10, /*line 1111 trap error*/
+ dsMiscErr = 11, /*miscellaneous hardware exception error*/
+ dsCoreErr = 12, /*unimplemented core routine error*/
+ dsIrqErr = 13, /*uninstalled interrupt error*/
+ dsIOCoreErr = 14, /*IO Core Error*/
+ dsLoadErr = 15, /*Segment Loader Error*/
+ dsFPErr = 16, /*Floating point error*/
+ dsNoPackErr = 17, /*package 0 not present*/
+ dsNoPk1 = 18, /*package 1 not present*/
+ dsNoPk2 = 19 /*package 2 not present*/
+};
+
+enum {
+ dsNoPk3 = 20, /*package 3 not present*/
+ dsNoPk4 = 21, /*package 4 not present*/
+ dsNoPk5 = 22, /*package 5 not present*/
+ dsNoPk6 = 23, /*package 6 not present*/
+ dsNoPk7 = 24, /*package 7 not present*/
+ dsMemFullErr = 25, /*out of memory!*/
+ dsBadLaunch = 26, /*can't launch file*/
+ dsFSErr = 27, /*file system map has been trashed*/
+ dsStknHeap = 28, /*stack has moved into application heap*/
+ negZcbFreeErr = 33, /*ZcbFree has gone negative*/
+ dsFinderErr = 41, /*can't load the Finder error*/
+ dsBadSlotInt = 51, /*unserviceable slot interrupt*/
+ dsBadSANEOpcode = 81, /*bad opcode given to SANE Pack4*/
+ dsBadPatchHeader = 83, /*SetTrapAddress saw the "come-from" header*/
+ menuPrgErr = 84, /*happens when a menu is purged*/
+ dsMBarNFnd = 85, /*Menu Manager Errors*/
+ dsHMenuFindErr = 86, /*Menu Manager Errors*/
+ dsWDEFNotFound = 87, /*could not load WDEF*/
+ dsCDEFNotFound = 88, /*could not load CDEF*/
+ dsMDEFNotFound = 89 /*could not load MDEF*/
+};
+
+enum {
+ dsNoFPU = 90, /*an FPU instruction was executed and the machine doesn't have one*/
+ dsNoPatch = 98, /*Can't patch for particular Model Mac*/
+ dsBadPatch = 99, /*Can't load patch resource*/
+ dsParityErr = 101, /*memory parity error*/
+ dsOldSystem = 102, /*System is too old for this ROM*/
+ ds32BitMode = 103, /*booting in 32-bit on a 24-bit sys*/
+ dsNeedToWriteBootBlocks = 104, /*need to write new boot blocks*/
+ dsNotEnoughRAMToBoot = 105, /*must have at least 1.5MB of RAM to boot 7.0*/
+ dsBufPtrTooLow = 106, /*bufPtr moved too far during boot*/
+ dsVMDeferredFuncTableFull = 112, /*VM's DeferUserFn table is full*/
+ dsVMBadBackingStore = 113, /*Error occurred while reading or writing the VM backing-store file*/
+ dsCantHoldSystemHeap = 114, /*Unable to hold the system heap during boot*/
+ dsSystemRequiresPowerPC = 116, /*Startup disk requires PowerPC*/
+ dsGibblyMovedToDisabledFolder = 117, /* For debug builds only, signals that active gibbly was disabled during boot. */
+ dsUnBootableSystem = 118, /* Active system file will not boot on this system because it was designed only to boot from a CD. */
+ dsMustUseFCBAccessors = 119, /* FCBSPtr and FSFCBLen are invalid - must use FSM FCB accessor functions */
+ dsMacOSROMVersionTooOld = 120, /* The version of the "Mac OS ROM" file is too old to be used with the installed version of system software */
+ dsLostConnectionToNetworkDisk = 121, /* Lost communication with Netboot server */
+ dsWriteToSupervisorStackGuardPage = 128, /*the supervisor stack overflowed into its guard page */
+ dsReinsert = 30, /*request user to reinsert off-line volume*/
+ shutDownAlert = 42, /*handled like a shutdown error*/
+ dsShutDownOrRestart = 20000, /*user choice between ShutDown and Restart*/
+ dsSwitchOffOrRestart = 20001, /*user choice between switching off and Restart*/
+ dsForcedQuit = 20002, /*allow the user to ExitToShell, return if Cancel*/
+ dsRemoveDisk = 20003, /*request user to remove disk from manual eject drive*/
+ dsDirtyDisk = 20004, /*request user to return a manually-ejected dirty disk*/
+ dsShutDownOrResume = 20109, /*allow user to return to Finder or ShutDown*/
+ dsSCSIWarn = 20010, /*Portable SCSI adapter warning.*/
+ dsMBSysError = 29200, /*Media Bay replace warning.*/
+ dsMBFlpySysError = 29201, /*Media Bay, floppy replace warning.*/
+ dsMBATASysError = 29202, /*Media Bay, ATA replace warning.*/
+ dsMBATAPISysError = 29203, /*Media Bay, ATAPI replace warning...*/
+ dsMBExternFlpySysError = 29204, /*Media Bay, external floppy drive reconnect warning*/
+ dsPCCardATASysError = 29205 /*PCCard has been ejected while still in use. */
+};
+
+/*
+ System Errors that are used after MacsBug is loaded to put up dialogs since these should not
+ cause MacsBug to stop, they must be in the range (30, 42, 16384-32767) negative numbers add
+ to an existing dialog without putting up a whole new dialog
+*/
+enum {
+ dsNoExtsMacsBug = -1, /*not a SysErr, just a placeholder */
+ dsNoExtsDisassembler = -2, /*not a SysErr, just a placeholder */
+ dsMacsBugInstalled = -10, /*say "MacsBug Installed"*/
+ dsDisassemblerInstalled = -11, /*say "Disassembler Installed"*/
+ dsExtensionsDisabled = -13, /*say "Extensions Disabled"*/
+ dsGreeting = 40, /*welcome to Macintosh greeting*/
+ dsSysErr = 32767, /*general system error*/
+ /*old names here for compatibility's sake*/
+ WDEFNFnd = dsWDEFNotFound
+};
+
+enum {
+ CDEFNFnd = dsCDEFNotFound,
+ dsNotThe1 = 31, /*not the disk I wanted*/
+ dsBadStartupDisk = 42, /*unable to mount boot volume (sad Mac only)*/
+ dsSystemFileErr = 43, /*can't find System file to open (sad Mac only)*/
+ dsHD20Installed = -12, /*say "HD20 Startup"*/
+ mBarNFnd = -126, /*system error code for MBDF not found*/
+ fsDSIntErr = -127, /*non-hardware Internal file system error*/
+ hMenuFindErr = -127, /*could not find HMenu's parent in MenuKey (wrong error code - obsolete)*/
+ userBreak = -490, /*user debugger break*/
+ strUserBreak = -491, /*user debugger break; display string on stack*/
+ exUserBreak = -492 /*user debugger break; execute debugger commands on stack*/
+};
+
+
+enum {
+ /* DS Errors which are specific to the new runtime model introduced with PowerPC */
+ dsBadLibrary = 1010, /* Bad shared library */
+ dsMixedModeFailure = 1011 /* Internal Mixed Mode Failure */
+};
+
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter SysError(__D0)
+ #endif
+EXTERN_API( void )
+SysError (short errorCode) ONEWORDINLINE(0xA9C9);
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MACERRORS__ */
+
diff --git a/include/qt/MacHelp.h b/include/qt/MacHelp.h
new file mode 100644
index 000000000..d371d3e0f
--- /dev/null
+++ b/include/qt/MacHelp.h
@@ -0,0 +1,372 @@
+/*
+ File: MacHelp.h
+
+ Contains: Macintosh Help Package Interfaces.
+
+ Version: Technology: CarbonLib 1.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1998-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __MACHELP__
+#define __MACHELP__
+
+#ifndef __CONTROLS__
+#include "Controls.h"
+#endif
+
+#ifndef __DIALOGS__
+#include "Dialogs.h"
+#endif
+
+#ifndef __EVENTS__
+#include "Events.h"
+#endif
+
+#ifndef __MACWINDOWS__
+#include "MacWindows.h"
+#endif
+
+#ifndef __MENUS__
+#include "Menus.h"
+#endif
+
+#ifndef __MOVIES__
+#include "Movies.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*----------------------------------------------------------------------------------*/
+/* Help Manager constants, etc. */
+/*----------------------------------------------------------------------------------*/
+#ifndef __BALLOONS__
+enum {
+ kMacHelpVersion = 0x0003,
+ hmBalloonHelpVersion = kMacHelpVersion /* Backwards compatibility */
+};
+
+#endif /* !defined(__BALLOONS__) */
+
+
+typedef SInt16 HMContentRequest;
+enum {
+ kHMSupplyContent = 0,
+ kHMDisposeContent = 1
+};
+
+
+typedef UInt32 HMContentType;
+enum {
+ kHMNoContent = FOUR_CHAR_CODE('none'),
+ kHMPascalStrContent = FOUR_CHAR_CODE('pstr'),
+ kHMPictResContent = FOUR_CHAR_CODE('pict'),
+ kHMStringResContent = FOUR_CHAR_CODE('str#'),
+ kHMTEHandleContent = FOUR_CHAR_CODE('txth'),
+ kHMPictHandleContent = FOUR_CHAR_CODE('pcth'),
+ kHMTextResContent = FOUR_CHAR_CODE('text'),
+ kHMStrResContent = FOUR_CHAR_CODE('str '),
+ kHMMovieContent = FOUR_CHAR_CODE('moov')
+};
+
+
+typedef SInt16 HMTagDisplaySide;
+enum {
+ kHMDefaultSide = 0,
+ kHMTopSide = 1,
+ kHMLeftSide = 2,
+ kHMBottomSide = 3,
+ kHMRightSide = 4,
+ kHMTopLeftCorner = 5,
+ kHMTopRightCorner = 6,
+ kHMLeftTopCorner = 7,
+ kHMLeftBottomCorner = 8,
+ kHMBottomLeftCorner = 9,
+ kHMBottomRightCorner = 10,
+ kHMRightTopCorner = 11,
+ kHMRightBottomCorner = 12
+};
+
+
+typedef SInt16 HMContentProvidedType;
+enum {
+ kHMContentProvided = 0,
+ kHMContentNotProvided = 1,
+ kHMContentNotProvidedDontPropagate = 2
+};
+
+enum {
+ kHMMinimumContentIndex = 0,
+ kHMMaximumContentIndex = 1
+};
+
+enum {
+ kHMIllegalContentForMinimumState = -1000 /* *** Need real numbers here*/
+};
+
+enum {
+ kHMHelpPropertyContentTag = FOUR_CHAR_CODE('help')
+};
+
+#ifndef __BALLOONS__
+
+struct HMStringResType {
+ short hmmResID;
+ short hmmIndex;
+};
+typedef struct HMStringResType HMStringResType;
+#endif /* !defined(__BALLOONS__) */
+
+
+struct HMHelpContent {
+ HMContentType contentType;
+ union {
+ Str255 tagString; /* Pascal String*/
+ SInt16 tagPictID; /* 'PICT' resource ID*/
+ HMStringResType tagStringRes; /* STR# resource ID and index*/
+ TEHandle tagTEHandle; /* TextEdit handle*/
+ PicHandle tagPictHandle; /* Picture handle*/
+ SInt16 tagTextRes; /* TEXT/styl resource ID*/
+ SInt16 tagStrRes; /* STR resource ID*/
+ Movie tagMovie; /* QuickTime movie*/
+ } u;
+};
+typedef struct HMHelpContent HMHelpContent;
+
+struct HMHelpContentRec {
+ SInt32 version;
+ Rect absHotRect;
+ HMTagDisplaySide tagSide;
+ HMHelpContent content[2];
+};
+typedef struct HMHelpContentRec HMHelpContentRec;
+
+typedef HMHelpContentRec * HMHelpContentPtr;
+/*------------------------------------------------------------------------------------------*/
+/* Callback procs */
+/*------------------------------------------------------------------------------------------ */
+typedef CALLBACK_API( OSStatus , HMControlContentProcPtr )(ControlRef inControl, Point inGlobalMouse, HMContentRequest inRequest, HMContentProvidedType *outContentProvided, HMHelpContentPtr ioHelpContent);
+typedef CALLBACK_API( OSStatus , HMWindowContentProcPtr )(WindowPtr inWindow, Point inGlobalMouse, HMContentRequest inRequest, HMContentProvidedType *outContentProvided, HMHelpContentPtr ioHelpContent);
+typedef CALLBACK_API( OSStatus , HMMenuTitleContentProcPtr )(MenuHandle inMenu, HMContentRequest inRequest, HMContentProvidedType *outContentProvided, HMHelpContentPtr ioHelpContent);
+typedef CALLBACK_API( OSStatus , HMMenuItemContentProcPtr )(const MenuTrackingData *inTrackingData, HMContentRequest inRequest, HMContentProvidedType *outContentProvided, HMHelpContentPtr ioHelpContent);
+typedef STACK_UPP_TYPE(HMControlContentProcPtr) HMControlContentUPP;
+typedef STACK_UPP_TYPE(HMWindowContentProcPtr) HMWindowContentUPP;
+typedef STACK_UPP_TYPE(HMMenuTitleContentProcPtr) HMMenuTitleContentUPP;
+typedef STACK_UPP_TYPE(HMMenuItemContentProcPtr) HMMenuItemContentUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(HMControlContentUPP)
+ NewHMControlContentUPP (HMControlContentProcPtr userRoutine);
+
+ EXTERN_API(HMWindowContentUPP)
+ NewHMWindowContentUPP (HMWindowContentProcPtr userRoutine);
+
+ EXTERN_API(HMMenuTitleContentUPP)
+ NewHMMenuTitleContentUPP (HMMenuTitleContentProcPtr userRoutine);
+
+ EXTERN_API(HMMenuItemContentUPP)
+ NewHMMenuItemContentUPP (HMMenuItemContentProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeHMControlContentUPP (HMControlContentUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeHMWindowContentUPP (HMWindowContentUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeHMMenuTitleContentUPP (HMMenuTitleContentUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeHMMenuItemContentUPP (HMMenuItemContentUPP userUPP);
+
+ EXTERN_API(OSStatus)
+ InvokeHMControlContentUPP (ControlRef inControl,
+ Point inGlobalMouse,
+ HMContentRequest inRequest,
+ HMContentProvidedType * outContentProvided,
+ HMHelpContentPtr ioHelpContent,
+ HMControlContentUPP userUPP);
+
+ EXTERN_API(OSStatus)
+ InvokeHMWindowContentUPP (WindowPtr inWindow,
+ Point inGlobalMouse,
+ HMContentRequest inRequest,
+ HMContentProvidedType * outContentProvided,
+ HMHelpContentPtr ioHelpContent,
+ HMWindowContentUPP userUPP);
+
+ EXTERN_API(OSStatus)
+ InvokeHMMenuTitleContentUPP (MenuHandle inMenu,
+ HMContentRequest inRequest,
+ HMContentProvidedType * outContentProvided,
+ HMHelpContentPtr ioHelpContent,
+ HMMenuTitleContentUPP userUPP);
+
+ EXTERN_API(OSStatus)
+ InvokeHMMenuItemContentUPP (const MenuTrackingData * inTrackingData,
+ HMContentRequest inRequest,
+ HMContentProvidedType * outContentProvided,
+ HMHelpContentPtr ioHelpContent,
+ HMMenuItemContentUPP userUPP);
+
+#else
+ enum { uppHMControlContentProcInfo = 0x0000FBF0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes, 2_bytes, 4_bytes, 4_bytes) */
+ enum { uppHMWindowContentProcInfo = 0x0000FBF0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes, 2_bytes, 4_bytes, 4_bytes) */
+ enum { uppHMMenuTitleContentProcInfo = 0x00003EF0 }; /* pascal 4_bytes Func(4_bytes, 2_bytes, 4_bytes, 4_bytes) */
+ enum { uppHMMenuItemContentProcInfo = 0x00003EF0 }; /* pascal 4_bytes Func(4_bytes, 2_bytes, 4_bytes, 4_bytes) */
+ #define NewHMControlContentUPP(userRoutine) (HMControlContentUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppHMControlContentProcInfo, GetCurrentArchitecture())
+ #define NewHMWindowContentUPP(userRoutine) (HMWindowContentUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppHMWindowContentProcInfo, GetCurrentArchitecture())
+ #define NewHMMenuTitleContentUPP(userRoutine) (HMMenuTitleContentUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppHMMenuTitleContentProcInfo, GetCurrentArchitecture())
+ #define NewHMMenuItemContentUPP(userRoutine) (HMMenuItemContentUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppHMMenuItemContentProcInfo, GetCurrentArchitecture())
+ #define DisposeHMControlContentUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeHMWindowContentUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeHMMenuTitleContentUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeHMMenuItemContentUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeHMControlContentUPP(inControl, inGlobalMouse, inRequest, outContentProvided, ioHelpContent, userUPP) (OSStatus)CALL_FIVE_PARAMETER_UPP((userUPP), uppHMControlContentProcInfo, (inControl), (inGlobalMouse), (inRequest), (outContentProvided), (ioHelpContent))
+ #define InvokeHMWindowContentUPP(inWindow, inGlobalMouse, inRequest, outContentProvided, ioHelpContent, userUPP) (OSStatus)CALL_FIVE_PARAMETER_UPP((userUPP), uppHMWindowContentProcInfo, (inWindow), (inGlobalMouse), (inRequest), (outContentProvided), (ioHelpContent))
+ #define InvokeHMMenuTitleContentUPP(inMenu, inRequest, outContentProvided, ioHelpContent, userUPP) (OSStatus)CALL_FOUR_PARAMETER_UPP((userUPP), uppHMMenuTitleContentProcInfo, (inMenu), (inRequest), (outContentProvided), (ioHelpContent))
+ #define InvokeHMMenuItemContentUPP(inTrackingData, inRequest, outContentProvided, ioHelpContent, userUPP) (OSStatus)CALL_FOUR_PARAMETER_UPP((userUPP), uppHMMenuItemContentProcInfo, (inTrackingData), (inRequest), (outContentProvided), (ioHelpContent))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewHMControlContentProc(userRoutine) NewHMControlContentUPP(userRoutine)
+#define NewHMWindowContentProc(userRoutine) NewHMWindowContentUPP(userRoutine)
+#define NewHMMenuTitleContentProc(userRoutine) NewHMMenuTitleContentUPP(userRoutine)
+#define NewHMMenuItemContentProc(userRoutine) NewHMMenuItemContentUPP(userRoutine)
+#define CallHMControlContentProc(userRoutine, inControl, inGlobalMouse, inRequest, outContentProvided, ioHelpContent) InvokeHMControlContentUPP(inControl, inGlobalMouse, inRequest, outContentProvided, ioHelpContent, userRoutine)
+#define CallHMWindowContentProc(userRoutine, inWindow, inGlobalMouse, inRequest, outContentProvided, ioHelpContent) InvokeHMWindowContentUPP(inWindow, inGlobalMouse, inRequest, outContentProvided, ioHelpContent, userRoutine)
+#define CallHMMenuTitleContentProc(userRoutine, inMenu, inRequest, outContentProvided, ioHelpContent) InvokeHMMenuTitleContentUPP(inMenu, inRequest, outContentProvided, ioHelpContent, userRoutine)
+#define CallHMMenuItemContentProc(userRoutine, inTrackingData, inRequest, outContentProvided, ioHelpContent) InvokeHMMenuItemContentUPP(inTrackingData, inRequest, outContentProvided, ioHelpContent, userRoutine)
+/*------------------------------------------------------------------------------------------*/
+/* API */
+/*------------------------------------------------------------------------------------------*/
+/* Installing/Retrieving Content */
+EXTERN_API( OSStatus )
+HMSetControlHelpContent (ControlRef inControl,
+ const HMHelpContentRec * inContent);
+
+EXTERN_API( OSStatus )
+HMGetControlHelpContent (ControlRef inControl,
+ HMHelpContentRec * outContent);
+
+EXTERN_API( OSStatus )
+HMSetWindowHelpContent (WindowRef inWindow,
+ const HMHelpContentRec * inContent);
+
+EXTERN_API( OSStatus )
+HMGetWindowHelpContent (WindowRef inWindow,
+ HMHelpContentRec * outContent);
+
+EXTERN_API( OSStatus )
+HMSetMenuItemHelpContent (MenuRef inMenu,
+ MenuItemIndex inItem,
+ const HMHelpContentRec * inContent);
+
+EXTERN_API( OSStatus )
+HMGetMenuItemHelpContent (MenuRef inMenu,
+ MenuItemIndex inItem,
+ HMHelpContentRec * outContent);
+
+/* Installing/Retrieving Content Callbacks */
+EXTERN_API( OSStatus )
+HMInstallControlContentCallback (ControlRef inControl,
+ HMControlContentUPP inContentUPP);
+
+EXTERN_API( OSStatus )
+HMInstallWindowContentCallback (WindowRef inWindow,
+ HMWindowContentUPP inContentUPP);
+
+EXTERN_API( OSStatus )
+HMInstallMenuTitleContentCallback (MenuRef inMenu,
+ HMMenuTitleContentUPP inContentUPP);
+
+EXTERN_API( OSStatus )
+HMInstallMenuItemContentCallback (MenuRef inMenu,
+ HMMenuItemContentUPP inContentUPP);
+
+
+EXTERN_API( OSStatus )
+HMGetControlContentCallback (ControlRef inControl,
+ HMControlContentUPP * outContentUPP);
+
+EXTERN_API( OSStatus )
+HMGetWindowContentCallback (WindowRef inWindow,
+ HMWindowContentUPP * outContentUPP);
+
+EXTERN_API( OSStatus )
+HMGetMenuTitleContentCallback (MenuRef inMenu,
+ HMMenuTitleContentUPP * outContentUPP);
+
+EXTERN_API( OSStatus )
+HMGetMenuItemContentCallback (MenuRef inMenu,
+ HMMenuItemContentUPP * outContentUPP);
+
+/* Enabling and Disabling Help Tags */
+EXTERN_API( Boolean )
+HMAreHelpTagsDisplayed (void);
+
+EXTERN_API( OSStatus )
+HMSetHelpTagsDisplayed (Boolean inDisplayTags);
+
+EXTERN_API( OSStatus )
+HMSetTagDelay (Duration inDelay);
+
+EXTERN_API( OSStatus )
+HMGetTagDelay (Duration * outDelay);
+
+/* Compatibility */
+EXTERN_API( OSStatus )
+HMSetMenuHelpFromBalloonRsrc (MenuRef inMenu,
+ SInt16 inHmnuRsrcID);
+
+EXTERN_API( OSStatus )
+HMSetDialogHelpFromBalloonRsrc (DialogRef inDialog,
+ SInt16 inHdlgRsrcID,
+ SInt16 inItemStart);
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MACHELP__ */
+
diff --git a/include/qt/MacMemory.h b/include/qt/MacMemory.h
new file mode 100644
index 000000000..b09193919
--- /dev/null
+++ b/include/qt/MacMemory.h
@@ -0,0 +1,991 @@
+/*
+ File: MacMemory.h
+
+ Contains: Memory Manager Interfaces.
+
+ Version: Technology: System 8.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __MACMEMORY__
+#define __MACMEMORY__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ maxSize = 0x7FFFFFF0 /*the largest block possible*/
+};
+
+enum {
+ defaultPhysicalEntryCount = 8
+};
+
+enum {
+ /* values returned from the GetPageState function */
+ kPageInMemory = 0,
+ kPageOnDisk = 1,
+ kNotPaged = 2
+};
+
+enum {
+ /* masks for Zone->heapType field */
+ k32BitHeap = 1, /* valid in all Memory Managers */
+ kNewStyleHeap = 2, /* true if new Heap Manager is present */
+ kNewDebugHeap = 4 /* true if new Heap Manager is running in debug mode on this heap */
+};
+
+/* Note: The type "Size" moved to Types.h */
+
+
+typedef CALLBACK_API( long , GrowZoneProcPtr )(Size cbNeeded);
+typedef CALLBACK_API( void , PurgeProcPtr )(Handle blockToPurge);
+typedef CALLBACK_API( void , UserFnProcPtr )(void *parameter);
+/*
+ WARNING: UserFnProcPtr uses register based parameters under classic 68k
+ and cannot be written in a high-level language without
+ the help of mixed mode or assembly glue.
+*/
+typedef STACK_UPP_TYPE(GrowZoneProcPtr) GrowZoneUPP;
+typedef STACK_UPP_TYPE(PurgeProcPtr) PurgeUPP;
+typedef REGISTER_UPP_TYPE(UserFnProcPtr) UserFnUPP;
+
+struct Zone {
+ Ptr bkLim;
+ Ptr purgePtr;
+ Ptr hFstFree;
+ long zcbFree;
+ GrowZoneUPP gzProc;
+ short moreMast;
+ short flags;
+ short cntRel;
+ short maxRel;
+ short cntNRel;
+ SInt8 heapType; /* previously "maxNRel", now holds flags (e.g. k32BitHeap)*/
+ SInt8 unused;
+ short cntEmpty;
+ short cntHandles;
+ long minCBFree;
+ PurgeUPP purgeProc;
+ Ptr sparePtr;
+ Ptr allocPtr;
+ short heapData;
+};
+typedef struct Zone Zone;
+
+typedef Zone * THz;
+
+struct MemoryBlock {
+ void * address;
+ unsigned long count;
+};
+typedef struct MemoryBlock MemoryBlock;
+
+struct LogicalToPhysicalTable {
+ MemoryBlock logical;
+ MemoryBlock physical[8];
+};
+typedef struct LogicalToPhysicalTable LogicalToPhysicalTable;
+
+typedef short PageState;
+typedef short StatusRegisterContents;
+enum {
+ kVolumeVirtualMemoryInfoVersion1 = 1 /* first version of VolumeVirtualMemoryInfo*/
+};
+
+
+struct VolumeVirtualMemoryInfo {
+ PBVersion version; /* Input: Version of the VolumeVirtualMemoryInfo structure*/
+ SInt16 volumeRefNum; /* Input: volume reference number*/
+ Boolean inUse; /* output: true if volume is currently used for file mapping*/
+ UInt8 _fill;
+ UInt32 vmOptions; /* output: tells what volume can support (same as DriverGestaltVMOptionsResponse vmOptions bits in DriverGestalt)*/
+ /* end of kVolumeVirtualMemoryInfoVersion1 structure*/
+};
+typedef struct VolumeVirtualMemoryInfo VolumeVirtualMemoryInfo;
+typedef VolumeVirtualMemoryInfo * VolumeVirtualMemoryInfoPtr;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(GrowZoneUPP)
+ NewGrowZoneUPP (GrowZoneProcPtr userRoutine);
+
+ EXTERN_API(PurgeUPP)
+ NewPurgeUPP (PurgeProcPtr userRoutine);
+
+ EXTERN_API(UserFnUPP)
+ NewUserFnUPP (UserFnProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGrowZoneUPP (GrowZoneUPP userUPP);
+
+ EXTERN_API(void)
+ DisposePurgeUPP (PurgeUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeUserFnUPP (UserFnUPP userUPP);
+
+ EXTERN_API(long)
+ InvokeGrowZoneUPP (Size cbNeeded,
+ GrowZoneUPP userUPP);
+
+ EXTERN_API(void)
+ InvokePurgeUPP (Handle blockToPurge,
+ PurgeUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeUserFnUPP (void * parameter,
+ UserFnUPP userUPP);
+
+#else
+ enum { uppGrowZoneProcInfo = 0x000000F0 }; /* pascal 4_bytes Func(4_bytes) */
+ enum { uppPurgeProcInfo = 0x000000C0 }; /* pascal no_return_value Func(4_bytes) */
+ enum { uppUserFnProcInfo = 0x00009802 }; /* register no_return_value Func(4_bytes:A0) */
+ #define NewGrowZoneUPP(userRoutine) (GrowZoneUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGrowZoneProcInfo, GetCurrentArchitecture())
+ #define NewPurgeUPP(userRoutine) (PurgeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPurgeProcInfo, GetCurrentArchitecture())
+ #define NewUserFnUPP(userRoutine) (UserFnUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppUserFnProcInfo, GetCurrentArchitecture())
+ #define DisposeGrowZoneUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposePurgeUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeUserFnUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGrowZoneUPP(cbNeeded, userUPP) (long)CALL_ONE_PARAMETER_UPP((userUPP), uppGrowZoneProcInfo, (cbNeeded))
+ #define InvokePurgeUPP(blockToPurge, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppPurgeProcInfo, (blockToPurge))
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter InvokeUserFnUPP(__A0, __A1)
+ void InvokeUserFnUPP(void * parameter, UserFnUPP userUPP) = 0x4E91;
+ #else
+ #define InvokeUserFnUPP(parameter, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppUserFnProcInfo, (parameter))
+ #endif
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGrowZoneProc(userRoutine) NewGrowZoneUPP(userRoutine)
+#define NewPurgeProc(userRoutine) NewPurgeUPP(userRoutine)
+#define NewUserFnProc(userRoutine) NewUserFnUPP(userRoutine)
+#define CallGrowZoneProc(userRoutine, cbNeeded) InvokeGrowZoneUPP(cbNeeded, userRoutine)
+#define CallPurgeProc(userRoutine, blockToPurge) InvokePurgeUPP(blockToPurge, userRoutine)
+#define CallUserFnProc(userRoutine, parameter) InvokeUserFnUPP(parameter, userRoutine)
+#if CALL_NOT_IN_CARBON
+EXTERN_API( Ptr )
+GetApplLimit (void) TWOWORDINLINE(0x2EB8, 0x0130);
+
+EXTERN_API( THz )
+SystemZone (void) TWOWORDINLINE(0x2EB8, 0x02A6);
+
+EXTERN_API( THz )
+ApplicationZone (void) TWOWORDINLINE(0x2EB8, 0x02AA);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( Handle )
+GZSaveHnd (void) TWOWORDINLINE(0x2EB8, 0x0328);
+
+EXTERN_API( Ptr )
+TopMem (void) TWOWORDINLINE(0x2EB8, 0x0108);
+
+EXTERN_API( OSErr )
+MemError (void) TWOWORDINLINE(0x3EB8, 0x0220);
+
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __A0 GetZone
+ #endif
+EXTERN_API( THz )
+GetZone (void) ONEWORDINLINE(0xA11A);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __A0 NewHandle(__D0)
+ #endif
+EXTERN_API( Handle )
+NewHandle (Size byteCount) ONEWORDINLINE(0xA122);
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __A0 NewHandleSys(__D0)
+ #endif
+EXTERN_API( Handle )
+NewHandleSys (Size byteCount) ONEWORDINLINE(0xA522);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __A0 NewHandleClear(__D0)
+ #endif
+EXTERN_API( Handle )
+NewHandleClear (Size byteCount) ONEWORDINLINE(0xA322);
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __A0 NewHandleSysClear(__D0)
+ #endif
+EXTERN_API( Handle )
+NewHandleSysClear (Size byteCount) ONEWORDINLINE(0xA722);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __A0 HandleZone(__A0)
+ #endif
+EXTERN_API( THz )
+HandleZone (Handle h) ONEWORDINLINE(0xA126);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __A0 RecoverHandle(__A0)
+ #endif
+EXTERN_API( Handle )
+RecoverHandle (Ptr p) ONEWORDINLINE(0xA128);
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __A0 RecoverHandleSys(__A0)
+ #endif
+EXTERN_API( Handle )
+RecoverHandleSys (Ptr p) ONEWORDINLINE(0xA528);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __A0 NewPtr(__D0)
+ #endif
+EXTERN_API( Ptr )
+NewPtr (Size byteCount) ONEWORDINLINE(0xA11E);
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __A0 NewPtrSys(__D0)
+ #endif
+EXTERN_API( Ptr )
+NewPtrSys (Size byteCount) ONEWORDINLINE(0xA51E);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __A0 NewPtrClear(__D0)
+ #endif
+EXTERN_API( Ptr )
+NewPtrClear (Size byteCount) ONEWORDINLINE(0xA31E);
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __A0 NewPtrSysClear(__D0)
+ #endif
+EXTERN_API( Ptr )
+NewPtrSysClear (Size byteCount) ONEWORDINLINE(0xA71E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __A0 PtrZone(__A0)
+ #endif
+EXTERN_API( THz )
+PtrZone (Ptr p) ONEWORDINLINE(0xA148);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 MaxBlock
+ #endif
+EXTERN_API( long )
+MaxBlock (void) ONEWORDINLINE(0xA061);
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 MaxBlockSys
+ #endif
+EXTERN_API( long )
+MaxBlockSys (void) ONEWORDINLINE(0xA461);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 StackSpace
+ #endif
+EXTERN_API( long )
+StackSpace (void) ONEWORDINLINE(0xA065);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __A0 NewEmptyHandle
+ #endif
+EXTERN_API( Handle )
+NewEmptyHandle (void) ONEWORDINLINE(0xA166);
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __A0 NewEmptyHandleSys
+ #endif
+EXTERN_API( Handle )
+NewEmptyHandleSys (void) ONEWORDINLINE(0xA566);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter HLock(__A0)
+ #endif
+EXTERN_API( void )
+HLock (Handle h) ONEWORDINLINE(0xA029);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter HUnlock(__A0)
+ #endif
+EXTERN_API( void )
+HUnlock (Handle h) ONEWORDINLINE(0xA02A);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter HPurge(__A0)
+ #endif
+EXTERN_API( void )
+HPurge (Handle h) ONEWORDINLINE(0xA049);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter HNoPurge(__A0)
+ #endif
+EXTERN_API( void )
+HNoPurge (Handle h) ONEWORDINLINE(0xA04A);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter HLockHi(__A0)
+ #endif
+EXTERN_API( void )
+HLockHi (Handle h) TWOWORDINLINE(0xA064, 0xA029);
+
+EXTERN_API( Handle )
+TempNewHandle (Size logicalSize,
+ OSErr * resultCode) THREEWORDINLINE(0x3F3C, 0x001D, 0xA88F);
+
+EXTERN_API( Size )
+TempMaxMem (Size * grow) THREEWORDINLINE(0x3F3C, 0x0015, 0xA88F);
+
+EXTERN_API( long )
+TempFreeMem (void) THREEWORDINLINE(0x3F3C, 0x0018, 0xA88F);
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+InitZone (GrowZoneUPP pgrowZone,
+ short cmoreMasters,
+ void * limitPtr,
+ void * startPtr);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter SetZone(__A0)
+ #endif
+EXTERN_API( void )
+SetZone (THz hz) ONEWORDINLINE(0xA01B);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 CompactMem(__D0)
+ #endif
+EXTERN_API( Size )
+CompactMem (Size cbNeeded) ONEWORDINLINE(0xA04C);
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 CompactMemSys(__D0)
+ #endif
+EXTERN_API( Size )
+CompactMemSys (Size cbNeeded) ONEWORDINLINE(0xA44C);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PurgeMem(__D0)
+ #endif
+EXTERN_API( void )
+PurgeMem (Size cbNeeded) ONEWORDINLINE(0xA04D);
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PurgeMemSys(__D0)
+ #endif
+EXTERN_API( void )
+PurgeMemSys (Size cbNeeded) ONEWORDINLINE(0xA44D);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 FreeMem
+ #endif
+EXTERN_API( long )
+FreeMem (void) ONEWORDINLINE(0xA01C);
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 FreeMemSys
+ #endif
+EXTERN_API( long )
+FreeMemSys (void) ONEWORDINLINE(0xA41C);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter ReserveMem(__D0)
+ #endif
+EXTERN_API( void )
+ReserveMem (Size cbNeeded) ONEWORDINLINE(0xA040);
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter ReserveMemSys(__D0)
+ #endif
+EXTERN_API( void )
+ReserveMemSys (Size cbNeeded) ONEWORDINLINE(0xA440);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 MaxMem(__A1)
+ #endif
+EXTERN_API( Size )
+MaxMem (Size * grow) TWOWORDINLINE(0xA11D, 0x2288);
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 MaxMemSys(__A1)
+ #endif
+EXTERN_API( Size )
+MaxMemSys (Size * grow) TWOWORDINLINE(0xA51D, 0x2288);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter SetGrowZone(__A0)
+ #endif
+EXTERN_API( void )
+SetGrowZone (GrowZoneUPP growZone) ONEWORDINLINE(0xA04B);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter MoveHHi(__A0)
+ #endif
+EXTERN_API( void )
+MoveHHi (Handle h) ONEWORDINLINE(0xA064);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter DisposePtr(__A0)
+ #endif
+EXTERN_API( void )
+DisposePtr (Ptr p) ONEWORDINLINE(0xA01F);
+
+EXTERN_API( Size )
+GetPtrSize (Ptr p);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter SetPtrSize(__A0, __D0)
+ #endif
+EXTERN_API( void )
+SetPtrSize (Ptr p,
+ Size newSize) ONEWORDINLINE(0xA020);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter DisposeHandle(__A0)
+ #endif
+EXTERN_API( void )
+DisposeHandle (Handle h) ONEWORDINLINE(0xA023);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter SetHandleSize(__A0, __D0)
+ #endif
+EXTERN_API( void )
+SetHandleSize (Handle h,
+ Size newSize) ONEWORDINLINE(0xA024);
+
+/*
+ NOTE
+
+ GetHandleSize and GetPtrSize are documented in Inside Mac as returning 0
+ in case of an error, but the traps actually return an error code in D0.
+ The glue sets D0 to 0 if an error occurred.
+*/
+EXTERN_API( Size )
+GetHandleSize (Handle h);
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 InlineGetHandleSize(__A0)
+ #endif
+EXTERN_API( Size )
+InlineGetHandleSize (Handle h) ONEWORDINLINE(0xA025);
+
+
+#if !TARGET_OS_MAC
+#define InlineGetHandleSize GetHandleSize
+#endif
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter ReallocateHandle(__A0, __D0)
+ #endif
+EXTERN_API( void )
+ReallocateHandle (Handle h,
+ Size byteCount) ONEWORDINLINE(0xA027);
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter ReallocateHandleSys(__A0, __D0)
+ #endif
+EXTERN_API( void )
+ReallocateHandleSys (Handle h,
+ Size byteCount) ONEWORDINLINE(0xA427);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter EmptyHandle(__A0)
+ #endif
+EXTERN_API( void )
+EmptyHandle (Handle h) ONEWORDINLINE(0xA02B);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter HSetRBit(__A0)
+ #endif
+EXTERN_API( void )
+HSetRBit (Handle h) ONEWORDINLINE(0xA067);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter HClrRBit(__A0)
+ #endif
+EXTERN_API( void )
+HClrRBit (Handle h) ONEWORDINLINE(0xA068);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 HGetState(__A0)
+ #endif
+EXTERN_API( SInt8 )
+HGetState (Handle h) ONEWORDINLINE(0xA069);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter HSetState(__A0, __D0)
+ #endif
+EXTERN_API( void )
+HSetState (Handle h,
+ SInt8 flags) ONEWORDINLINE(0xA06A);
+
+EXTERN_API( void )
+PurgeSpace (long * total,
+ long * contig);
+
+/*
+ PurgeSpaceTotal and PurgeSpaceContiguous are currently only implement
+ on classic 68K. The are the same as PurgeSpace() but return just
+ one value (either total space purgable or contiguous space purgable).
+ Begining in Mac OS 8.5 they are available in InterfaceLib.
+*/
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __A0 PurgeSpaceTotal
+ #endif
+EXTERN_API( long )
+PurgeSpaceTotal (void) ONEWORDINLINE(0xA062);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PurgeSpaceContiguous
+ #endif
+EXTERN_API( long )
+PurgeSpaceContiguous (void) ONEWORDINLINE(0xA062);
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __A0 PurgeSpaceSysTotal
+ #endif
+EXTERN_API( long )
+PurgeSpaceSysTotal (void) ONEWORDINLINE(0xA562);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PurgeSpaceSysContiguous
+ #endif
+EXTERN_API( long )
+PurgeSpaceSysContiguous (void) ONEWORDINLINE(0xA562);
+
+
+/*****************************************************************************
+
+ The routines:
+
+ BlockMoveUncached, BlockMoveDataUncached
+ BlockZero, BlockZeroUncached
+
+ were first created for developers writing drivers. Originally they only
+ existed in DriverServicesLib. Later they were added to InterfaceLib
+ in PCI based PowerMacs. MacOS 8.5 provides these routines in InterfaceLib
+ on all supported machines.
+
+*****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter BlockMove(__A0, __A1, __D0)
+ #endif
+EXTERN_API( void )
+BlockMove (const void * srcPtr,
+ void * destPtr,
+ Size byteCount) ONEWORDINLINE(0xA02E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter BlockMoveData(__A0, __A1, __D0)
+ #endif
+EXTERN_API( void )
+BlockMoveData (const void * srcPtr,
+ void * destPtr,
+ Size byteCount) ONEWORDINLINE(0xA22E);
+
+EXTERN_API_C( void )
+BlockMoveUncached (const void * srcPtr,
+ void * destPtr,
+ Size byteCount);
+
+EXTERN_API_C( void )
+BlockMoveDataUncached (const void * srcPtr,
+ void * destPtr,
+ Size byteCount);
+
+EXTERN_API_C( void )
+BlockZero (void * destPtr,
+ Size byteCount);
+
+EXTERN_API_C( void )
+BlockZeroUncached (void * destPtr,
+ Size byteCount);
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+MaxApplZone (void) ONEWORDINLINE(0xA063);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter SetApplBase(__A0)
+ #endif
+EXTERN_API( void )
+SetApplBase (void * startPtr) ONEWORDINLINE(0xA057);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( void )
+MoreMasters (void) ONEWORDINLINE(0xA036);
+
+#if TARGET_API_MAC_CARBON
+EXTERN_API_C( void )
+MoreMasterPointers (UInt32 inCount);
+
+#endif /* TARGET_API_MAC_CARBON */
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter SetApplLimit(__A0)
+ #endif
+EXTERN_API( void )
+SetApplLimit (void * zoneLimit) ONEWORDINLINE(0xA02D);
+
+EXTERN_API( void )
+InitApplZone (void) ONEWORDINLINE(0xA02C);
+
+
+/* Temporary Memory routines renamed, but obsolete, in System 7.0 and later. */
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( void )
+TempHLock (Handle h,
+ OSErr * resultCode) THREEWORDINLINE(0x3F3C, 0x001E, 0xA88F);
+
+EXTERN_API( void )
+TempHUnlock (Handle h,
+ OSErr * resultCode) THREEWORDINLINE(0x3F3C, 0x001F, 0xA88F);
+
+EXTERN_API( void )
+TempDisposeHandle (Handle h,
+ OSErr * resultCode) THREEWORDINLINE(0x3F3C, 0x0020, 0xA88F);
+
+EXTERN_API( Ptr )
+TempTopMem (void) THREEWORDINLINE(0x3F3C, 0x0016, 0xA88F);
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 HoldMemory(__A0, __A1)
+ #endif
+EXTERN_API( OSErr )
+HoldMemory (void * address,
+ unsigned long count) TWOWORDINLINE(0x7000, 0xA05C);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 UnholdMemory(__A0, __A1)
+ #endif
+EXTERN_API( OSErr )
+UnholdMemory (void * address,
+ unsigned long count) TWOWORDINLINE(0x7001, 0xA05C);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 LockMemory(__A0, __A1)
+ #endif
+EXTERN_API( OSErr )
+LockMemory (void * address,
+ unsigned long count) TWOWORDINLINE(0x7002, 0xA05C);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 LockMemoryForOutput(__A0, __A1)
+ #endif
+EXTERN_API( OSErr )
+LockMemoryForOutput (void * address,
+ unsigned long count) TWOWORDINLINE(0x700A, 0xA05C);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 LockMemoryContiguous(__A0, __A1)
+ #endif
+EXTERN_API( OSErr )
+LockMemoryContiguous (void * address,
+ unsigned long count) TWOWORDINLINE(0x7004, 0xA05C);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 UnlockMemory(__A0, __A1)
+ #endif
+EXTERN_API( OSErr )
+UnlockMemory (void * address,
+ unsigned long count) TWOWORDINLINE(0x7003, 0xA05C);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 MakeMemoryResident(__A0, __A1)
+ #endif
+EXTERN_API( OSErr )
+MakeMemoryResident (void * address,
+ unsigned long count) TWOWORDINLINE(0x700B, 0xA05C);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 ReleaseMemoryData(__A0, __A1)
+ #endif
+EXTERN_API( OSErr )
+ReleaseMemoryData (void * address,
+ unsigned long count) TWOWORDINLINE(0x700C, 0xA05C);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 MakeMemoryNonResident(__A0, __A1)
+ #endif
+EXTERN_API( OSErr )
+MakeMemoryNonResident (void * address,
+ unsigned long count) TWOWORDINLINE(0x700D, 0xA05C);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 FlushMemory(__A0, __A1)
+ #endif
+EXTERN_API( OSErr )
+FlushMemory (void * address,
+ unsigned long count) TWOWORDINLINE(0x700E, 0xA05C);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+GetPhysical (LogicalToPhysicalTable * addresses,
+ unsigned long * physicalEntryCount);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 GetVolumeVirtualMemoryInfo(__A0)
+ #endif
+EXTERN_API( OSErr )
+GetVolumeVirtualMemoryInfo (VolumeVirtualMemoryInfoPtr volVMInfo) TWOWORDINLINE(0x700F, 0xA05C);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 DeferUserFn(__A0, __D0)
+ #endif
+EXTERN_API( OSErr )
+DeferUserFn (UserFnUPP userFunction,
+ void * argument) ONEWORDINLINE(0xA08F);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 DebuggerGetMax
+ #endif
+EXTERN_API( long )
+DebuggerGetMax (void) TWOWORDINLINE(0x7000, 0xA08D);
+
+EXTERN_API( void )
+DebuggerEnter (void) TWOWORDINLINE(0x7001, 0xA08D);
+
+EXTERN_API( void )
+DebuggerExit (void) TWOWORDINLINE(0x7002, 0xA08D);
+
+EXTERN_API( void )
+DebuggerPoll (void) TWOWORDINLINE(0x7003, 0xA08D);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 GetPageState(__A0)
+ #endif
+EXTERN_API( PageState )
+GetPageState (const void * address) TWOWORDINLINE(0x7004, 0xA08D);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PageFaultFatal
+ #endif
+EXTERN_API( Boolean )
+PageFaultFatal (void) TWOWORDINLINE(0x7005, 0xA08D);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 DebuggerLockMemory(__A0, __A1)
+ #endif
+EXTERN_API( OSErr )
+DebuggerLockMemory (void * address,
+ unsigned long count) TWOWORDINLINE(0x7006, 0xA08D);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 DebuggerUnlockMemory(__A0, __A1)
+ #endif
+EXTERN_API( OSErr )
+DebuggerUnlockMemory (void * address,
+ unsigned long count) TWOWORDINLINE(0x7007, 0xA08D);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 EnterSupervisorMode
+ #endif
+EXTERN_API( StatusRegisterContents )
+EnterSupervisorMode (void) TWOWORDINLINE(0x7008, 0xA08D);
+
+
+/*
+ StripAddress is a trap on classic 68K and the
+ identity function on PowerMacs and other OS's.
+*/
+#if TARGET_OS_MAC && TARGET_CPU_68K
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 StripAddress(__D0)
+ #endif
+EXTERN_API( Ptr )
+StripAddress (void * theAddress) ONEWORDINLINE(0xA055);
+
+#else
+#define StripAddress(x) ((Ptr)(x))
+#endif
+/*
+ Translate24To32 is a trap on classic 68K and the
+ identity function on PowerMacs and other OS's.
+*/
+#if TARGET_OS_MAC && TARGET_CPU_68K
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 Translate24To32(__D0)
+ #endif
+EXTERN_API( Ptr )
+Translate24To32 (void * addr24) ONEWORDINLINE(0xA091);
+
+#else
+#define Translate24To32(x) ((Ptr)(x))
+#endif
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( OSErr )
+HandToHand (Handle * theHndl);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PtrToXHand(__A0, __A1, __D0)
+ #endif
+EXTERN_API( OSErr )
+PtrToXHand (const void * srcPtr,
+ Handle dstHndl,
+ long size) ONEWORDINLINE(0xA9E2);
+
+EXTERN_API( OSErr )
+PtrToHand (const void * srcPtr,
+ Handle * dstHndl,
+ long size);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 HandAndHand(__A0, __A1)
+ #endif
+EXTERN_API( OSErr )
+HandAndHand (Handle hand1,
+ Handle hand2) ONEWORDINLINE(0xA9E4);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PtrAndHand(__A0, __A1, __D0)
+ #endif
+EXTERN_API( OSErr )
+PtrAndHand (const void * ptr1,
+ Handle hand2,
+ long size) ONEWORDINLINE(0xA9EF);
+
+/* Carbon routines to aid in debugging. */
+/* Checks all applicable heaps for validity */
+EXTERN_API( Boolean )
+CheckAllHeaps (void);
+
+/* Checks the application heap for validity */
+EXTERN_API( Boolean )
+IsHeapValid (void);
+
+/* It is invalid to pass a NULL or an empty Handle to IsHandleValid */
+EXTERN_API( Boolean )
+IsHandleValid (Handle h);
+
+/* It is invalid to pass a NULL Pointer to IsPointerValid */
+EXTERN_API( Boolean )
+IsPointerValid (Ptr p);
+
+
+#if OLDROUTINENAMES
+#define ApplicZone() ApplicationZone()
+#define MFTempNewHandle(logicalSize, resultCode) TempNewHandle(logicalSize, resultCode)
+#define MFMaxMem(grow) TempMaxMem(grow)
+#define MFFreeMem() TempFreeMem()
+#define MFTempHLock(h, resultCode) TempHLock(h, resultCode)
+#define MFTempHUnlock(h, resultCode) TempHUnlock(h, resultCode)
+#define MFTempDisposHandle(h, resultCode) TempDisposeHandle(h, resultCode)
+#define MFTopMem() TempTopMem()
+#define ResrvMem(cbNeeded) ReserveMem(cbNeeded)
+#define DisposPtr(p) DisposePtr(p)
+#define DisposHandle(h) DisposeHandle(h)
+#define ReallocHandle(h, byteCount) ReallocateHandle(h, byteCount)
+#endif /* OLDROUTINENAMES */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MACMEMORY__ */
+
diff --git a/include/qt/MacTCP.h b/include/qt/MacTCP.h
new file mode 100644
index 000000000..f50ee014b
--- /dev/null
+++ b/include/qt/MacTCP.h
@@ -0,0 +1,840 @@
+/*
+ File: MacTCP.h
+
+ Contains: TCP Manager Interfaces.
+
+ Version: Technology: MacTCP 2.0.6
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1989-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __MACTCP__
+#define __MACTCP__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+#ifndef __APPLETALK__
+#include "AppleTalk.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*
+Developer Notes:
+ 0. This MacTCP header replaces what used to be defined in the following header files
+ MacTCPCommonTypes.h
+ GetMyIPAddr.h
+ MiscIPPB.h
+ TCPPB.h
+ UDPPB.h
+
+ When the various control calls are made to the ip driver, you must set up a
+ NewRoutineDescriptor for every non-nil completion routine and/or notifyProc parameter.
+ Otherwise, the 68K driver code, will not correctly call your routine.
+ 1. For ipctlGetAddr Control calls, use NewGetIPIOCompletionProc
+ to set up a GetIPIOCompletionUPP universal procptr to pass as
+ the ioCompletion parameter.
+ 2. For the ipctlEchoICMP and ipctlLAPStats Control calls, use
+ NewIPIOCompletion to set up a IPIOCompletionUPP universal procptr
+ to pass in the ioCompletion field of the parameter block.
+ 3. For TCPCreatePB Control calls, use NewTCPNotifyProc to set up a
+ TCPNotifyUPP universal procptr to pass in the notifyProc field
+ of the parameter block
+ 4. For all of the TCP Control calls using the TCPiopb parameter block,
+ use NewTCPIOCompletionProc to set up a TCPIOCompletionUPP
+ universal procptr to pass in the ioCompletion field of the paramter
+ block.
+ 5. For UDBCreatePB Control calls, use NewUDPNotifyProc to set up a
+ UDPNotifyUPP universal procptr to pass in the notifyProc field
+ of the parameter block
+ 6. For all of the UDP Control calls using the UDPiopb parameter block,
+ use NewUDPIOCompletionProc to set up a UDPIOCompletionUPP
+ universal procptr to pass in the ioCompletion field of the paramter
+ block.
+ 7. For all calls implementing a notifyProc or ioCompletion routine
+ which was set up using a NewTCPRoutineProc call, do not call
+ DisposeRoutineSDescriptor on the universal procptr until
+ after the completion or notify proc has completed.
+*/
+
+/* MacTCP return Codes in the range -23000 through -23049 */
+enum {
+ inProgress = 1, /* I/O in progress */
+ ipBadLapErr = -23000, /* bad network configuration */
+ ipBadCnfgErr = -23001, /* bad IP configuration error */
+ ipNoCnfgErr = -23002, /* missing IP or LAP configuration error */
+ ipLoadErr = -23003, /* error in MacTCP load */
+ ipBadAddr = -23004, /* error in getting address */
+ connectionClosing = -23005, /* connection is closing */
+ invalidLength = -23006,
+ connectionExists = -23007, /* request conflicts with existing connection */
+ connectionDoesntExist = -23008, /* connection does not exist */
+ insufficientResources = -23009, /* insufficient resources to perform request */
+ invalidStreamPtr = -23010,
+ streamAlreadyOpen = -23011,
+ connectionTerminated = -23012,
+ invalidBufPtr = -23013,
+ invalidRDS = -23014,
+ invalidWDS = -23014,
+ openFailed = -23015,
+ commandTimeout = -23016,
+ duplicateSocket = -23017
+};
+
+/* Error codes from internal IP functions */
+enum {
+ ipDontFragErr = -23032, /* Packet too large to send w/o fragmenting */
+ ipDestDeadErr = -23033, /* destination not responding */
+ icmpEchoTimeoutErr = -23035, /* ICMP echo timed-out */
+ ipNoFragMemErr = -23036, /* no memory to send fragmented pkt */
+ ipRouteErr = -23037, /* can't route packet off-net */
+ nameSyntaxErr = -23041,
+ cacheFault = -23042,
+ noResultProc = -23043,
+ noNameServer = -23044,
+ authNameErr = -23045,
+ noAnsErr = -23046,
+ dnrErr = -23047,
+ outOfMemory = -23048
+};
+
+
+enum {
+ BYTES_16WORD = 2, /* bytes per = 16, bit ip word */
+ BYTES_32WORD = 4, /* bytes per = 32, bit ip word */
+ BYTES_64WORD = 8 /* bytes per = 64, bit ip word */
+};
+
+/* 8-bit quantity */
+typedef UInt8 b_8;
+/* 16-bit quantity */
+typedef UInt16 b_16;
+/* 32-bit quantity */
+typedef UInt32 b_32;
+/* IP address is 32-bits */
+typedef b_32 ip_addr;
+
+struct ip_addrbytes {
+ union {
+ b_32 addr;
+ UInt8 byte[4];
+ } a;
+};
+typedef struct ip_addrbytes ip_addrbytes;
+
+struct wdsEntry {
+ unsigned short length; /* length of buffer */
+ Ptr ptr; /* pointer to buffer */
+};
+typedef struct wdsEntry wdsEntry;
+
+struct rdsEntry {
+ unsigned short length; /* length of buffer */
+ Ptr ptr; /* pointer to buffer */
+};
+typedef struct rdsEntry rdsEntry;
+
+typedef unsigned long BufferPtr;
+typedef unsigned long StreamPtr;
+enum {
+ netUnreach = 0,
+ hostUnreach = 1,
+ protocolUnreach = 2,
+ portUnreach = 3,
+ fragReqd = 4,
+ sourceRouteFailed = 5,
+ timeExceeded = 6,
+ parmProblem = 7,
+ missingOption = 8,
+ lastICMPMsgType = 32767
+};
+
+typedef unsigned short ICMPMsgType;
+typedef b_16 ip_port;
+
+struct ICMPReport {
+ StreamPtr streamPtr;
+ ip_addr localHost;
+ ip_port localPort;
+ ip_addr remoteHost;
+ ip_port remotePort;
+ short reportType;
+ unsigned short optionalAddlInfo;
+ unsigned long optionalAddlInfoPtr;
+};
+typedef struct ICMPReport ICMPReport;
+/* csCode to get our IP address */
+enum {
+ ipctlGetAddr = 15
+};
+
+typedef struct GetAddrParamBlock GetAddrParamBlock;
+typedef CALLBACK_API_C( void , GetIPIOCompletionProcPtr )(GetAddrParamBlock *iopb);
+typedef STACK_UPP_TYPE(GetIPIOCompletionProcPtr) GetIPIOCompletionUPP;
+
+struct GetAddrParamBlock {
+ QElem * qLink;
+ short qType;
+ short ioTrap;
+ Ptr ioCmdAddr;
+ GetIPIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ StringPtr ioNamePtr;
+ short ioVRefNum;
+ short ioCRefNum;
+ short csCode;
+ ip_addr ourAddress; /* our IP address */
+ long ourNetMask; /* our IP net mask */
+};
+
+/* control codes */
+enum {
+ ipctlEchoICMP = 17, /* send icmp echo */
+ ipctlLAPStats = 19 /* get lap stats */
+};
+
+
+typedef struct ICMPParamBlock ICMPParamBlock;
+typedef CALLBACK_API_C( void , IPIOCompletionProcPtr )(ICMPParamBlock *iopb);
+typedef STACK_UPP_TYPE(IPIOCompletionProcPtr) IPIOCompletionUPP;
+
+struct ICMPParamBlock {
+ QElem * qLink;
+ short qType;
+ short ioTrap;
+ Ptr ioCmdAddr;
+ IPIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ StringPtr ioNamePtr;
+ short ioVRefNum;
+ short ioCRefNum;
+ short csCode;
+ short params[11];
+ struct {
+ unsigned long echoRequestOut; /* time in ticks of when the echo request went out */
+ unsigned long echoReplyIn; /* time in ticks of when the reply was received */
+ rdsEntry echoedData; /* data received in responce */
+ Ptr options;
+ unsigned long userDataPtr;
+ } icmpEchoInfo;
+};
+
+typedef CALLBACK_API_C( void , ICMPEchoNotifyProcPtr )(ICMPParamBlock *iopb);
+typedef STACK_UPP_TYPE(ICMPEchoNotifyProcPtr) ICMPEchoNotifyUPP;
+typedef struct LAPStats LAPStats;
+
+struct IPParamBlock {
+ QElem * qLink;
+ short qType;
+ short ioTrap;
+ Ptr ioCmdAddr;
+ IPIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ StringPtr ioNamePtr;
+ short ioVRefNum;
+ short ioCRefNum;
+ short csCode;
+ union {
+ struct {
+ ip_addr dest; /* echo to IP address */
+ wdsEntry data;
+ short timeout;
+ Ptr options;
+ unsigned short optLength;
+ ICMPEchoNotifyUPP icmpCompletion;
+ unsigned long userDataPtr;
+ } IPEchoPB;
+ struct {
+ LAPStats * lapStatsPtr;
+ } LAPStatsPB;
+ } csParam;
+};
+typedef struct IPParamBlock IPParamBlock;
+
+
+struct nbp_entry {
+ ip_addr ip_address; /* IP address */
+ AddrBlock at_address; /* matching AppleTalk address */
+ Boolean gateway; /* TRUE if entry for a gateway */
+ Boolean valid; /* TRUE if LAP address is valid */
+ Boolean probing; /* TRUE if NBP lookup pending */
+ SInt8 afiller; /* Filler for proper byte alignment */
+ long age; /* ticks since cache entry verified */
+ long access; /* ticks since last access */
+ SInt8 filler[116]; /* for internal use only !!! */
+};
+typedef struct nbp_entry nbp_entry;
+
+struct Enet_addr {
+ b_16 en_hi;
+ b_32 en_lo;
+};
+typedef struct Enet_addr Enet_addr;
+
+struct arp_entry {
+ short age; /* cache aging field */
+ b_16 protocol; /* Protocol type */
+ ip_addr ip_address; /* IP address */
+ Enet_addr en_address; /* matching Ethernet address */
+};
+typedef struct arp_entry arp_entry;
+
+union LAPStatsAddrXlation {
+ arp_entry * arp_table;
+ nbp_entry * nbp_table;
+};
+typedef union LAPStatsAddrXlation LAPStatsAddrXlation;
+
+struct LAPStats {
+ short ifType;
+ char * ifString;
+ short ifMaxMTU;
+ long ifSpeed;
+ short ifPhyAddrLength;
+ char * ifPhysicalAddress;
+ LAPStatsAddrXlation AddrXlation;
+ short slotNumber;
+};
+
+/* number of ARP table entries */
+enum {
+ ARP_TABLE_SIZE = 20
+};
+
+enum {
+ NBP_TABLE_SIZE = 20, /* number of NBP table entries */
+ NBP_MAX_NAME_SIZE = 16 + 10 + 2
+};
+
+
+
+/* Command codes */
+enum {
+ TCPCreate = 30,
+ TCPPassiveOpen = 31,
+ TCPActiveOpen = 32,
+ TCPSend = 34,
+ TCPNoCopyRcv = 35,
+ TCPRcvBfrReturn = 36,
+ TCPRcv = 37,
+ TCPClose = 38,
+ TCPAbort = 39,
+ TCPStatus = 40,
+ TCPExtendedStat = 41,
+ TCPRelease = 42,
+ TCPGlobalInfo = 43,
+ TCPCtlMax = 49
+};
+
+enum {
+ TCPClosing = 1,
+ TCPULPTimeout = 2,
+ TCPTerminate = 3,
+ TCPDataArrival = 4,
+ TCPUrgent = 5,
+ TCPICMPReceived = 6,
+ lastEvent = 32767
+};
+
+
+typedef unsigned short TCPEventCode;
+enum {
+ TCPRemoteAbort = 2,
+ TCPNetworkFailure = 3,
+ TCPSecPrecMismatch = 4,
+ TCPULPTimeoutTerminate = 5,
+ TCPULPAbort = 6,
+ TCPULPClose = 7,
+ TCPServiceError = 8,
+ lastReason = 32767
+};
+
+typedef unsigned short TCPTerminationReason;
+typedef CALLBACK_API( void , TCPNotifyProcPtr )(StreamPtr tcpStream, unsigned short eventCode, Ptr userDataPtr, unsigned short terminReason, ICMPReport *icmpMsg);
+typedef STACK_UPP_TYPE(TCPNotifyProcPtr) TCPNotifyUPP;
+typedef unsigned short tcp_port;
+/* ValidityFlags */
+enum {
+ timeoutValue = 0x80,
+ timeoutAction = 0x40,
+ typeOfService = 0x20,
+ precedence = 0x10
+};
+
+/* TOSFlags */
+enum {
+ lowDelay = 0x01,
+ throughPut = 0x02,
+ reliability = 0x04
+};
+
+
+struct TCPCreatePB {
+ Ptr rcvBuff;
+ unsigned long rcvBuffLen;
+ TCPNotifyUPP notifyProc;
+ Ptr userDataPtr;
+};
+typedef struct TCPCreatePB TCPCreatePB;
+
+struct TCPOpenPB {
+ SInt8 ulpTimeoutValue;
+ SInt8 ulpTimeoutAction;
+ SInt8 validityFlags;
+ SInt8 commandTimeoutValue;
+ ip_addr remoteHost;
+ tcp_port remotePort;
+ ip_addr localHost;
+ tcp_port localPort;
+ SInt8 tosFlags;
+ SInt8 precedence;
+ Boolean dontFrag;
+ SInt8 timeToLive;
+ SInt8 security;
+ SInt8 optionCnt;
+ SInt8 options[40];
+ Ptr userDataPtr;
+};
+typedef struct TCPOpenPB TCPOpenPB;
+
+
+struct TCPSendPB {
+ SInt8 ulpTimeoutValue;
+ SInt8 ulpTimeoutAction;
+ SInt8 validityFlags;
+ Boolean pushFlag;
+ Boolean urgentFlag;
+ SInt8 filler; /* Filler for proper byte alignment */
+ Ptr wdsPtr;
+ unsigned long sendFree;
+ unsigned short sendLength;
+ Ptr userDataPtr;
+};
+typedef struct TCPSendPB TCPSendPB;
+
+/* for receive and return rcv buff calls */
+/* Note: the filler in the following structure is in a different location than */
+/* that specified in the Programmer's Guide. */
+
+struct TCPReceivePB {
+ SInt8 commandTimeoutValue;
+ Boolean markFlag;
+ Boolean urgentFlag;
+ SInt8 filler; /* Filler for proper byte alignment */
+ Ptr rcvBuff;
+ unsigned short rcvBuffLen;
+ Ptr rdsPtr;
+ unsigned short rdsLength;
+ unsigned short secondTimeStamp;
+ Ptr userDataPtr;
+};
+typedef struct TCPReceivePB TCPReceivePB;
+
+
+struct TCPClosePB {
+ SInt8 ulpTimeoutValue;
+ SInt8 ulpTimeoutAction;
+ SInt8 validityFlags;
+ SInt8 filler; /* Filler for proper byte alignment */
+ Ptr userDataPtr;
+};
+typedef struct TCPClosePB TCPClosePB;
+
+struct HistoBucket {
+ unsigned short value;
+ unsigned long counter;
+};
+typedef struct HistoBucket HistoBucket;
+enum {
+ NumOfHistoBuckets = 7
+};
+
+
+struct TCPConnectionStats {
+ unsigned long dataPktsRcvd;
+ unsigned long dataPktsSent;
+ unsigned long dataPktsResent;
+ unsigned long bytesRcvd;
+ unsigned long bytesRcvdDup;
+ unsigned long bytesRcvdPastWindow;
+ unsigned long bytesSent;
+ unsigned long bytesResent;
+ unsigned short numHistoBuckets;
+ HistoBucket sentSizeHisto[7];
+ unsigned short lastRTT;
+ unsigned short tmrSRTT;
+ unsigned short rttVariance;
+ unsigned short tmrRTO;
+ SInt8 sendTries;
+ SInt8 sourchQuenchRcvd;
+};
+typedef struct TCPConnectionStats TCPConnectionStats;
+
+struct TCPStatusPB {
+ SInt8 ulpTimeoutValue;
+ SInt8 ulpTimeoutAction;
+ long unused;
+ ip_addr remoteHost;
+ tcp_port remotePort;
+ ip_addr localHost;
+ tcp_port localPort;
+ SInt8 tosFlags;
+ SInt8 precedence;
+ SInt8 connectionState;
+ SInt8 filler; /* Filler for proper byte alignment */
+ unsigned short sendWindow;
+ unsigned short rcvWindow;
+ unsigned short amtUnackedData;
+ unsigned short amtUnreadData;
+ Ptr securityLevelPtr;
+ unsigned long sendUnacked;
+ unsigned long sendNext;
+ unsigned long congestionWindow;
+ unsigned long rcvNext;
+ unsigned long srtt;
+ unsigned long lastRTT;
+ unsigned long sendMaxSegSize;
+ TCPConnectionStats * connStatPtr;
+ Ptr userDataPtr;
+};
+typedef struct TCPStatusPB TCPStatusPB;
+
+struct TCPAbortPB {
+ Ptr userDataPtr;
+};
+typedef struct TCPAbortPB TCPAbortPB;
+
+struct TCPParam {
+ unsigned long tcpRtoA;
+ unsigned long tcpRtoMin;
+ unsigned long tcpRtoMax;
+ unsigned long tcpMaxSegSize;
+ unsigned long tcpMaxConn;
+ unsigned long tcpMaxWindow;
+};
+typedef struct TCPParam TCPParam;
+
+struct TCPStats {
+ unsigned long tcpConnAttempts;
+ unsigned long tcpConnOpened;
+ unsigned long tcpConnAccepted;
+ unsigned long tcpConnClosed;
+ unsigned long tcpConnAborted;
+ unsigned long tcpOctetsIn;
+ unsigned long tcpOctetsOut;
+ unsigned long tcpOctetsInDup;
+ unsigned long tcpOctetsRetrans;
+ unsigned long tcpInputPkts;
+ unsigned long tcpOutputPkts;
+ unsigned long tcpDupPkts;
+ unsigned long tcpRetransPkts;
+};
+typedef struct TCPStats TCPStats;
+
+typedef StreamPtr * StreamPPtr;
+
+struct TCPGlobalInfoPB {
+ TCPParam * tcpParamPtr;
+ TCPStats * tcpStatsPtr;
+ StreamPPtr tcpCDBTable[1];
+ Ptr userDataPtr;
+ unsigned short maxTCPConnections;
+};
+typedef struct TCPGlobalInfoPB TCPGlobalInfoPB;
+typedef struct TCPiopb TCPiopb;
+typedef CALLBACK_API_C( void , TCPIOCompletionProcPtr )(TCPiopb *iopb);
+typedef STACK_UPP_TYPE(TCPIOCompletionProcPtr) TCPIOCompletionUPP;
+
+struct TCPiopb {
+ SInt8 fill12[12];
+ TCPIOCompletionUPP ioCompletion;
+ short ioResult;
+ Ptr ioNamePtr;
+ short ioVRefNum;
+ short ioCRefNum;
+ short csCode;
+ StreamPtr tcpStream;
+ union {
+ TCPCreatePB create;
+ TCPOpenPB open;
+ TCPSendPB send;
+ TCPReceivePB receive;
+ TCPClosePB close;
+ TCPAbortPB abort;
+ TCPStatusPB status;
+ TCPGlobalInfoPB globalInfo;
+ } csParam;
+};
+
+enum {
+ UDPCreate = 20,
+ UDPRead = 21,
+ UDPBfrReturn = 22,
+ UDPWrite = 23,
+ UDPRelease = 24,
+ UDPMaxMTUSize = 25,
+ UDPStatus = 26,
+ UDPMultiCreate = 27,
+ UDPMultiSend = 28,
+ UDPMultiRead = 29,
+ UDPCtlMax = 29
+};
+
+enum {
+ UDPDataArrival = 1,
+ UDPICMPReceived = 2,
+ lastUDPEvent = 32767
+};
+
+
+typedef unsigned short UDPEventCode;
+typedef CALLBACK_API( void , UDPNotifyProcPtr )(StreamPtr udpStream, unsigned short eventCode, Ptr userDataPtr, ICMPReport *icmpMsg);
+typedef STACK_UPP_TYPE(UDPNotifyProcPtr) UDPNotifyUPP;
+typedef unsigned short udp_port;
+/* for create and release calls */
+
+struct UDPCreatePB {
+ Ptr rcvBuff;
+ unsigned long rcvBuffLen;
+ UDPNotifyUPP notifyProc;
+ unsigned short localPort;
+ Ptr userDataPtr;
+ udp_port endingPort;
+};
+typedef struct UDPCreatePB UDPCreatePB;
+
+struct UDPSendPB {
+ unsigned short reserved;
+ ip_addr remoteHost;
+ udp_port remotePort;
+ Ptr wdsPtr;
+ Boolean checkSum;
+ SInt8 filler; /* Filler for proper byte alignment */
+ unsigned short sendLength;
+ Ptr userDataPtr;
+ udp_port localPort;
+};
+typedef struct UDPSendPB UDPSendPB;
+/* for receive and buffer return calls */
+
+struct UDPReceivePB {
+ unsigned short timeOut;
+ ip_addr remoteHost;
+ udp_port remotePort;
+ Ptr rcvBuff;
+ unsigned short rcvBuffLen;
+ unsigned short secondTimeStamp;
+ Ptr userDataPtr;
+ ip_addr destHost; /* only for use with multi rcv */
+ udp_port destPort; /* only for use with multi rcv */
+};
+typedef struct UDPReceivePB UDPReceivePB;
+
+struct UDPMTUPB {
+ unsigned short mtuSize;
+ ip_addr remoteHost;
+ Ptr userDataPtr;
+};
+typedef struct UDPMTUPB UDPMTUPB;
+typedef struct UDPiopb UDPiopb;
+typedef CALLBACK_API_C( void , UDPIOCompletionProcPtr )(UDPiopb *iopb);
+typedef STACK_UPP_TYPE(UDPIOCompletionProcPtr) UDPIOCompletionUPP;
+
+struct UDPiopb {
+ SInt8 fill12[12];
+ UDPIOCompletionUPP ioCompletion;
+ short ioResult;
+ Ptr ioNamePtr;
+ short ioVRefNum;
+ short ioCRefNum;
+ short csCode;
+ StreamPtr udpStream;
+ union {
+ UDPCreatePB create;
+ UDPSendPB send;
+ UDPReceivePB receive;
+ UDPMTUPB mtu;
+ } csParam;
+};
+
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(GetIPIOCompletionUPP)
+ NewGetIPIOCompletionUPP (GetIPIOCompletionProcPtr userRoutine);
+
+ EXTERN_API(IPIOCompletionUPP)
+ NewIPIOCompletionUPP (IPIOCompletionProcPtr userRoutine);
+
+ EXTERN_API(ICMPEchoNotifyUPP)
+ NewICMPEchoNotifyUPP (ICMPEchoNotifyProcPtr userRoutine);
+
+ EXTERN_API(TCPNotifyUPP)
+ NewTCPNotifyUPP (TCPNotifyProcPtr userRoutine);
+
+ EXTERN_API(TCPIOCompletionUPP)
+ NewTCPIOCompletionUPP (TCPIOCompletionProcPtr userRoutine);
+
+ EXTERN_API(UDPNotifyUPP)
+ NewUDPNotifyUPP (UDPNotifyProcPtr userRoutine);
+
+ EXTERN_API(UDPIOCompletionUPP)
+ NewUDPIOCompletionUPP (UDPIOCompletionProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGetIPIOCompletionUPP (GetIPIOCompletionUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeIPIOCompletionUPP (IPIOCompletionUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeICMPEchoNotifyUPP (ICMPEchoNotifyUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeTCPNotifyUPP (TCPNotifyUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeTCPIOCompletionUPP (TCPIOCompletionUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeUDPNotifyUPP (UDPNotifyUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeUDPIOCompletionUPP (UDPIOCompletionUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeGetIPIOCompletionUPP (GetAddrParamBlock * iopb,
+ GetIPIOCompletionUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeIPIOCompletionUPP (ICMPParamBlock * iopb,
+ IPIOCompletionUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeICMPEchoNotifyUPP (ICMPParamBlock * iopb,
+ ICMPEchoNotifyUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeTCPNotifyUPP (StreamPtr tcpStream,
+ unsigned short eventCode,
+ Ptr userDataPtr,
+ unsigned short terminReason,
+ ICMPReport * icmpMsg,
+ TCPNotifyUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeTCPIOCompletionUPP (TCPiopb * iopb,
+ TCPIOCompletionUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeUDPNotifyUPP (StreamPtr udpStream,
+ unsigned short eventCode,
+ Ptr userDataPtr,
+ ICMPReport * icmpMsg,
+ UDPNotifyUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeUDPIOCompletionUPP (UDPiopb * iopb,
+ UDPIOCompletionUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppGetIPIOCompletionProcInfo = 0x000000C1 }; /* no_return_value Func(4_bytes) */
+ enum { uppIPIOCompletionProcInfo = 0x000000C1 }; /* no_return_value Func(4_bytes) */
+ enum { uppICMPEchoNotifyProcInfo = 0x000000C1 }; /* no_return_value Func(4_bytes) */
+ enum { uppTCPNotifyProcInfo = 0x0000EEC0 }; /* pascal no_return_value Func(4_bytes, 2_bytes, 4_bytes, 2_bytes, 4_bytes) */
+ enum { uppTCPIOCompletionProcInfo = 0x000000C1 }; /* no_return_value Func(4_bytes) */
+ enum { uppUDPNotifyProcInfo = 0x00003EC0 }; /* pascal no_return_value Func(4_bytes, 2_bytes, 4_bytes, 4_bytes) */
+ enum { uppUDPIOCompletionProcInfo = 0x000000C1 }; /* no_return_value Func(4_bytes) */
+ #define NewGetIPIOCompletionUPP(userRoutine) (GetIPIOCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGetIPIOCompletionProcInfo, GetCurrentArchitecture())
+ #define NewIPIOCompletionUPP(userRoutine) (IPIOCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppIPIOCompletionProcInfo, GetCurrentArchitecture())
+ #define NewICMPEchoNotifyUPP(userRoutine) (ICMPEchoNotifyUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMPEchoNotifyProcInfo, GetCurrentArchitecture())
+ #define NewTCPNotifyUPP(userRoutine) (TCPNotifyUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTCPNotifyProcInfo, GetCurrentArchitecture())
+ #define NewTCPIOCompletionUPP(userRoutine) (TCPIOCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTCPIOCompletionProcInfo, GetCurrentArchitecture())
+ #define NewUDPNotifyUPP(userRoutine) (UDPNotifyUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppUDPNotifyProcInfo, GetCurrentArchitecture())
+ #define NewUDPIOCompletionUPP(userRoutine) (UDPIOCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppUDPIOCompletionProcInfo, GetCurrentArchitecture())
+ #define DisposeGetIPIOCompletionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeIPIOCompletionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeICMPEchoNotifyUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeTCPNotifyUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeTCPIOCompletionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeUDPNotifyUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeUDPIOCompletionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGetIPIOCompletionUPP(iopb, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppGetIPIOCompletionProcInfo, (iopb))
+ #define InvokeIPIOCompletionUPP(iopb, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppIPIOCompletionProcInfo, (iopb))
+ #define InvokeICMPEchoNotifyUPP(iopb, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppICMPEchoNotifyProcInfo, (iopb))
+ #define InvokeTCPNotifyUPP(tcpStream, eventCode, userDataPtr, terminReason, icmpMsg, userUPP) CALL_FIVE_PARAMETER_UPP((userUPP), uppTCPNotifyProcInfo, (tcpStream), (eventCode), (userDataPtr), (terminReason), (icmpMsg))
+ #define InvokeTCPIOCompletionUPP(iopb, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppTCPIOCompletionProcInfo, (iopb))
+ #define InvokeUDPNotifyUPP(udpStream, eventCode, userDataPtr, icmpMsg, userUPP) CALL_FOUR_PARAMETER_UPP((userUPP), uppUDPNotifyProcInfo, (udpStream), (eventCode), (userDataPtr), (icmpMsg))
+ #define InvokeUDPIOCompletionUPP(iopb, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppUDPIOCompletionProcInfo, (iopb))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGetIPIOCompletionProc(userRoutine) NewGetIPIOCompletionUPP(userRoutine)
+#define NewIPIOCompletionProc(userRoutine) NewIPIOCompletionUPP(userRoutine)
+#define NewICMPEchoNotifyProc(userRoutine) NewICMPEchoNotifyUPP(userRoutine)
+#define NewTCPNotifyProc(userRoutine) NewTCPNotifyUPP(userRoutine)
+#define NewTCPIOCompletionProc(userRoutine) NewTCPIOCompletionUPP(userRoutine)
+#define NewUDPNotifyProc(userRoutine) NewUDPNotifyUPP(userRoutine)
+#define NewUDPIOCompletionProc(userRoutine) NewUDPIOCompletionUPP(userRoutine)
+#define CallGetIPIOCompletionProc(userRoutine, iopb) InvokeGetIPIOCompletionUPP(iopb, userRoutine)
+#define CallIPIOCompletionProc(userRoutine, iopb) InvokeIPIOCompletionUPP(iopb, userRoutine)
+#define CallICMPEchoNotifyProc(userRoutine, iopb) InvokeICMPEchoNotifyUPP(iopb, userRoutine)
+#define CallTCPNotifyProc(userRoutine, tcpStream, eventCode, userDataPtr, terminReason, icmpMsg) InvokeTCPNotifyUPP(tcpStream, eventCode, userDataPtr, terminReason, icmpMsg, userRoutine)
+#define CallTCPIOCompletionProc(userRoutine, iopb) InvokeTCPIOCompletionUPP(iopb, userRoutine)
+#define CallUDPNotifyProc(userRoutine, udpStream, eventCode, userDataPtr, icmpMsg) InvokeUDPNotifyUPP(udpStream, eventCode, userDataPtr, icmpMsg, userRoutine)
+#define CallUDPIOCompletionProc(userRoutine, iopb) InvokeUDPIOCompletionUPP(iopb, userRoutine)
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MACTCP__ */
+
diff --git a/include/qt/MacTypes.h b/include/qt/MacTypes.h
new file mode 100644
index 000000000..a736ed63c
--- /dev/null
+++ b/include/qt/MacTypes.h
@@ -0,0 +1,688 @@
+/*
+ File: MacTypes.h
+
+ Contains: Basic Macintosh data types.
+
+ Version: Technology: Mac OS 9
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __MACTYPES__
+#define __MACTYPES__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/********************************************************************************
+
+ Special values in C
+
+ NULL The C standard for an impossible pointer value
+ nil A carry over from pascal, NULL is prefered for C
+
+*********************************************************************************/
+#ifndef NULL
+ /* Symantec C compilers (but not C++) want NULL and nil to be (void*)0 */
+ #if !defined(__cplusplus) && (defined(__SC__) || defined(THINK_C))
+ #define NULL ((void *) 0)
+ #else
+ #define NULL 0L
+ #endif
+#endif
+
+#ifndef nil
+ #define nil NULL
+#endif
+
+
+/********************************************************************************
+
+ Base integer types for all target OS's and CPU's
+
+ UInt8 8-bit unsigned integer
+ SInt8 8-bit signed integer
+ UInt16 16-bit unsigned integer
+ SInt16 16-bit signed integer
+ UInt32 32-bit unsigned integer
+ SInt32 32-bit signed integer
+ UInt64 64-bit unsigned integer
+ SInt64 64-bit signed integer
+
+*********************************************************************************/
+typedef unsigned char UInt8;
+typedef signed char SInt8;
+typedef unsigned short UInt16;
+typedef signed short SInt16;
+typedef unsigned long UInt32;
+typedef signed long SInt32;
+#if TARGET_RT_BIG_ENDIAN
+
+struct wide {
+ SInt32 hi;
+ UInt32 lo;
+};
+typedef struct wide wide;
+
+struct UnsignedWide {
+ UInt32 hi;
+ UInt32 lo;
+};
+typedef struct UnsignedWide UnsignedWide;
+#else
+
+struct wide {
+ UInt32 lo;
+ SInt32 hi;
+};
+typedef struct wide wide;
+
+struct UnsignedWide {
+ UInt32 lo;
+ UInt32 hi;
+};
+typedef struct UnsignedWide UnsignedWide;
+#endif /* TARGET_RT_BIG_ENDIAN */
+
+
+#if TYPE_LONGLONG
+/*
+ Note: wide and UnsignedWide must always be structs for source code
+ compatibility. On the other hand UInt64 and SInt64 can be
+ either a struct or a long long, depending on the compiler.
+
+ If you use UInt64 and SInt64 you should do all operations on
+ those data types through the functions/macros in Math64.h.
+ This will assure that your code compiles with compilers that
+ support long long and those that don't.
+
+ The MS Visual C/C++ compiler uses __int64 instead of long long.
+*/
+ #if defined(_MSC_VER) && !defined(__MWERKS__) && defined(_M_IX86)
+ typedef signed __int64 SInt64;
+ typedef unsigned __int64 UInt64;
+ #else
+ typedef signed long long SInt64;
+ typedef unsigned long long UInt64;
+ #endif
+#else
+
+
+typedef wide SInt64;
+typedef UnsignedWide UInt64;
+#endif /* TYPE_LONGLONG */
+
+/********************************************************************************
+
+ Base fixed point types
+
+ Fixed 16-bit signed integer plus 16-bit fraction
+ UnsignedFixed 16-bit unsigned integer plus 16-bit fraction
+ Fract 2-bit signed integer plus 30-bit fraction
+ ShortFixed 8-bit signed integer plus 8-bit fraction
+
+*********************************************************************************/
+typedef long Fixed;
+typedef Fixed * FixedPtr;
+typedef long Fract;
+typedef Fract * FractPtr;
+typedef unsigned long UnsignedFixed;
+typedef UnsignedFixed * UnsignedFixedPtr;
+typedef short ShortFixed;
+typedef ShortFixed * ShortFixedPtr;
+
+
+/********************************************************************************
+
+ Base floating point types
+
+ Float32 32 bit IEEE float: 1 sign bit, 8 exponent bits, 23 fraction bits
+ Float64 64 bit IEEE float: 1 sign bit, 11 exponent bits, 52 fraction bits
+ Float80 80 bit MacOS float: 1 sign bit, 15 exponent bits, 1 integer bit, 63 fraction bits
+ Float96 96 bit 68881 float: 1 sign bit, 15 exponent bits, 16 pad bits, 1 integer bit, 63 fraction bits
+
+ Note: These are fixed size floating point types, useful when writing a floating
+ point value to disk. If your compiler does not support a particular size
+ float, a struct is used instead.
+ Use of of the NCEG types (e.g. double_t) or an ANSI C type (e.g. double) if
+ you want a floating point representation that is natural for any given
+ compiler, but might be a different size on different compilers.
+
+*********************************************************************************/
+typedef float Float32;
+#if defined(__MWERKS__) || defined(THINK_C)
+ typedef short double Float64;
+#else
+ typedef double Float64;
+#endif
+#if TARGET_CPU_68K
+ #if TARGET_RT_MAC_68881
+ typedef long double Float96;
+ struct Float80 {
+ SInt16 exp;
+ UInt16 man[4];
+ };
+ typedef struct Float80 Float80;
+ #else
+ typedef long double Float80;
+ struct Float96 {
+ SInt16 exp[2]; /* the second 16-bits are undefined */
+ UInt16 man[4];
+ };
+ typedef struct Float96 Float96;
+ #endif
+#else
+ struct Float80 {
+ SInt16 exp;
+ UInt16 man[4];
+ };
+ typedef struct Float80 Float80;
+
+ struct Float96 {
+ SInt16 exp[2]; /* the second 16-bits are undefined */
+ UInt16 man[4];
+ };
+ typedef struct Float96 Float96;
+#endif
+
+/********************************************************************************
+
+ MacOS Memory Manager types
+
+ Ptr Pointer to a non-relocatable block
+ Handle Pointer to a master pointer to a relocatable block
+ Size The number of bytes in a block (signed for historical reasons)
+
+*********************************************************************************/
+typedef char * Ptr;
+typedef Ptr * Handle;
+typedef long Size;
+
+/********************************************************************************
+
+ Higher level basic types
+
+ OSErr 16-bit result error code
+ OSStatus 32-bit result error code
+ LogicalAddress Address in the clients virtual address space
+ ConstLogicalAddress Address in the clients virtual address space that will only be read
+ PhysicalAddress Real address as used on the hardware bus
+ BytePtr Pointer to an array of bytes
+ ByteCount The size of an array of bytes
+ ByteOffset An offset into an array of bytes
+ ItemCount 32-bit iteration count
+ OptionBits Standard 32-bit set of bit flags
+ PBVersion ?
+ Duration 32-bit millisecond timer for drivers
+ AbsoluteTime 64-bit clock
+ ScriptCode A particular set of written characters (e.g. Roman vs Cyrillic) and their encoding
+ LangCode A particular language (e.g. English), as represented using a particular ScriptCode
+ RegionCode Designates a language as used in a particular region (e.g. British vs American
+ English) together with other region-dependent characteristics (e.g. date format)
+ FourCharCode A 32-bit value made by packing four 1 byte characters together
+ OSType A FourCharCode used in the OS and file system (e.g. creator)
+ ResType A FourCharCode used to tag resources (e.g. 'DLOG')
+
+*********************************************************************************/
+typedef SInt16 OSErr;
+typedef SInt32 OSStatus;
+typedef void * LogicalAddress;
+typedef const void * ConstLogicalAddress;
+typedef void * PhysicalAddress;
+typedef UInt8 * BytePtr;
+typedef UInt32 ByteCount;
+typedef UInt32 ByteOffset;
+typedef SInt32 Duration;
+typedef UnsignedWide AbsoluteTime;
+typedef UInt32 OptionBits;
+typedef UInt32 ItemCount;
+typedef UInt32 PBVersion;
+typedef SInt16 ScriptCode;
+typedef SInt16 LangCode;
+typedef SInt16 RegionCode;
+typedef unsigned long FourCharCode;
+typedef FourCharCode OSType;
+typedef FourCharCode ResType;
+typedef OSType * OSTypePtr;
+typedef ResType * ResTypePtr;
+
+/********************************************************************************
+
+ Boolean types and values
+
+ Boolean A one byte value, holds "false" (0) or "true" (1)
+ false The Boolean value of zero (0)
+ true The Boolean value of one (1)
+
+*********************************************************************************/
+/*
+ The identifiers "true" and "false" are becoming keywords in C++
+ and work with the new built-in type "bool"
+ "Boolean" will remain an unsigned char for compatibility with source
+ code written before "bool" existed.
+ */
+#if !TYPE_BOOL
+ #if TARGET_OS_WIN32
+ /* MS VC normally warns if true or false is defined */
+ #pragma warning (disable: 4237)
+ #endif
+enum {
+ false = 0,
+ true = 1
+};
+
+ #if TARGET_OS_WIN32
+ #pragma warning (default: 4237)
+ #endif
+#endif /* !TYPE_BOOL */
+
+typedef unsigned char Boolean;
+/********************************************************************************
+
+ Function Pointer Types
+
+ ProcPtr Generic pointer to a function
+ Register68kProcPtr Pointer to a 68K function that expects parameters in registers
+ UniversalProcPtr Pointer to classic 68K code or a RoutineDescriptor
+
+ ProcHandle Pointer to a ProcPtr
+ UniversalProcHandle Pointer to a UniversalProcPtr
+
+*********************************************************************************/
+typedef CALLBACK_API_C( long , ProcPtr )();
+typedef CALLBACK_API( void , Register68kProcPtr )();
+#if TARGET_OS_MAC && TARGET_RT_MAC_CFM
+/* Note that the RoutineDescriptor structure is defined in the MixedMode.h header */
+typedef struct RoutineDescriptor *UniversalProcPtr;
+#else
+typedef ProcPtr UniversalProcPtr;
+#endif /* TARGET_OS_MAC && TARGET_RT_MAC_CFM */
+
+typedef ProcPtr * ProcHandle;
+typedef UniversalProcPtr * UniversalProcHandle;
+
+
+/********************************************************************************
+
+ Common Constants
+
+ noErr OSErr: function performed properly - no error
+ kNilOptions OptionBits: all flags false
+ kInvalidID KernelID: NULL is for pointers as kInvalidID is for ID's
+ kVariableLengthArray array bounds: variable length array
+
+ Note: kVariableLengthArray is used in array bounds to specify a variable length array.
+ It is ususally used in variable length structs when the last field is an array
+ of any size. Before ANSI C, we used zero as the bounds of variable length
+ array, but zero length array are illegal in ANSI C. Example usage:
+
+ struct FooList
+ {
+ short listLength;
+ Foo elements[kVariableLengthArray];
+ };
+
+*********************************************************************************/
+enum {
+ noErr = 0
+};
+
+enum {
+ kNilOptions = 0
+};
+
+#define kInvalidID 0
+enum {
+ kVariableLengthArray = 1
+};
+
+enum {
+ kUnknownType = 0x3F3F3F3F /* '????' QuickTime 3.0: default unknown ResType or OSType */
+};
+
+
+
+/********************************************************************************
+
+ String Types
+
+ UniChar A single 16-bit Unicode character
+ UniCharCount A count of Unicode characters in an array or buffer
+
+ StrNNN Pascal string holding up to NNN bytes
+ StringPtr Pointer to a pascal string
+ StringHandle Pointer to a StringPtr
+ ConstStringPtr Pointer to a read-only pascal string
+ ConstStrNNNParam For function parameters only - means string is const
+
+ CStringPtr Pointer to a C string (in C: char*)
+ ConstCStringPtr Pointer to a read-only C string (in C: const char*)
+
+ Note: The length of a pascal string is stored as the first byte.
+ A pascal string does not have a termination byte.
+ A pascal string can hold at most 255 bytes of data.
+ The first character in a pascal string is offset one byte from the start of the string.
+
+ A C string is terminated with a byte of value zero.
+ A C string has no length limitation.
+ The first character in a C string is the zeroth byte of the string.
+
+
+*********************************************************************************/
+typedef UInt16 UniChar;
+typedef UniChar * UniCharPtr;
+typedef UInt32 UniCharCount;
+typedef UniCharCount * UniCharCountPtr;
+typedef unsigned char Str255[256];
+typedef unsigned char Str63[64];
+typedef unsigned char Str32[33];
+typedef unsigned char Str31[32];
+typedef unsigned char Str27[28];
+typedef unsigned char Str15[16];
+/*
+ The type Str32 is used in many AppleTalk based data structures.
+ It holds up to 32 one byte chars. The problem is that with the
+ length byte it is 33 bytes long. This can cause weird alignment
+ problems in structures. To fix this the type "Str32Field" has
+ been created. It should only be used to hold 32 chars, but
+ it is 34 bytes long so that there are no alignment problems.
+*/
+typedef unsigned char Str32Field[34];
+/*
+ QuickTime 3.0:
+ The type StrFileName is used to make MacOS structs work
+ cross-platform. For example FSSpec or SFReply previously
+ contained a Str63 field. They now contain a StrFileName
+ field which is the same when targeting the MacOS but is
+ a 256 char buffer for Win32 and unix, allowing them to
+ contain long file names.
+*/
+#if TARGET_OS_MAC
+typedef Str63 StrFileName;
+#else
+typedef Str255 StrFileName;
+#endif /* TARGET_OS_MAC */
+
+typedef unsigned char * StringPtr;
+typedef StringPtr * StringHandle;
+typedef const unsigned char * ConstStringPtr;
+typedef const unsigned char * ConstStr255Param;
+typedef const unsigned char * ConstStr63Param;
+typedef const unsigned char * ConstStr32Param;
+typedef const unsigned char * ConstStr31Param;
+typedef const unsigned char * ConstStr27Param;
+typedef const unsigned char * ConstStr15Param;
+#if TARGET_OS_MAC
+typedef ConstStr63Param ConstStrFileNameParam;
+#else
+typedef ConstStr255Param ConstStrFileNameParam;
+#endif /* TARGET_OS_MAC */
+
+#ifdef __cplusplus
+inline unsigned char StrLength(ConstStr255Param string) { return (*string); }
+#else
+#define StrLength(string) (*(unsigned char *)(string))
+#endif /* defined(__cplusplus) */
+
+#if OLDROUTINENAMES
+#define Length(string) StrLength(string)
+#endif /* OLDROUTINENAMES */
+
+/********************************************************************************
+
+ Quickdraw Types
+
+ Point 2D Quickdraw coordinate, range: -32K to +32K
+ Rect Rectangluar Quickdraw area
+ Style Quickdraw font rendering styles
+ StyleParameter Style when used as a parameter (historical 68K convention)
+ StyleField Style when used as a field (historical 68K convention)
+ CharParameter Char when used as a parameter (historical 68K convention)
+
+ Note: The original Macintosh toolbox in 68K Pascal defined Style as a SET.
+ Both Style and CHAR occupy 8-bits in packed records or 16-bits when
+ used as fields in non-packed records or as parameters.
+
+*********************************************************************************/
+
+struct Point {
+ short v;
+ short h;
+};
+typedef struct Point Point;
+typedef Point * PointPtr;
+
+struct Rect {
+ short top;
+ short left;
+ short bottom;
+ short right;
+};
+typedef struct Rect Rect;
+typedef Rect * RectPtr;
+
+struct FixedPoint {
+ Fixed x;
+ Fixed y;
+};
+typedef struct FixedPoint FixedPoint;
+
+struct FixedRect {
+ Fixed left;
+ Fixed top;
+ Fixed right;
+ Fixed bottom;
+};
+typedef struct FixedRect FixedRect;
+
+typedef short CharParameter;
+enum {
+ normal = 0,
+ bold = 1,
+ italic = 2,
+ underline = 4,
+ outline = 8,
+ shadow = 0x10,
+ condense = 0x20,
+ extend = 0x40
+};
+
+typedef unsigned char Style;
+typedef short StyleParameter;
+typedef Style StyleField;
+
+
+/********************************************************************************
+
+ THINK C base objects
+
+ HandleObject Root class for handle based THINK C++ objects
+ PascalObject Root class for pascal style objects in THINK C++
+
+*********************************************************************************/
+#if defined(__SC__) && !defined(__STDC__) && defined(__cplusplus)
+ class __machdl HandleObject {};
+ #if TARGET_CPU_68K
+ class __pasobj PascalObject {};
+ #endif
+#endif
+
+
+/********************************************************************************
+
+ MacOS versioning structures
+
+ VersRec Contents of a 'vers' resource
+ VersRecPtr Pointer to a VersRecPtr
+ VersRecHndl Resource Handle containing a VersRec
+ NumVersion Packed BCD version representation (e.g. "4.2.1a3" is 0x04214003)
+ UniversalProcPtr Pointer to classic 68K code or a RoutineDescriptor
+
+ ProcHandle Pointer to a ProcPtr
+ UniversalProcHandle Pointer to a UniversalProcPtr
+
+*********************************************************************************/
+#if TARGET_RT_BIG_ENDIAN
+
+struct NumVersion {
+ /* Numeric version part of 'vers' resource */
+ UInt8 majorRev; /*1st part of version number in BCD*/
+ UInt8 minorAndBugRev; /*2nd & 3rd part of version number share a byte*/
+ UInt8 stage; /*stage code: dev, alpha, beta, final*/
+ UInt8 nonRelRev; /*revision level of non-released version*/
+};
+typedef struct NumVersion NumVersion;
+#else
+
+struct NumVersion {
+ /* Numeric version part of 'vers' resource accessable in little endian format */
+ UInt8 nonRelRev; /*revision level of non-released version*/
+ UInt8 stage; /*stage code: dev, alpha, beta, final*/
+ UInt8 minorAndBugRev; /*2nd & 3rd part of version number share a byte*/
+ UInt8 majorRev; /*1st part of version number in BCD*/
+};
+typedef struct NumVersion NumVersion;
+#endif /* TARGET_RT_BIG_ENDIAN */
+
+enum {
+ /* Version Release Stage Codes */
+ developStage = 0x20,
+ alphaStage = 0x40,
+ betaStage = 0x60,
+ finalStage = 0x80
+};
+
+
+union NumVersionVariant {
+ /* NumVersionVariant is a wrapper so NumVersion can be accessed as a 32-bit value */
+ NumVersion parts;
+ unsigned long whole;
+};
+typedef union NumVersionVariant NumVersionVariant;
+typedef NumVersionVariant * NumVersionVariantPtr;
+typedef NumVersionVariantPtr * NumVersionVariantHandle;
+
+struct VersRec {
+ /* 'vers' resource format */
+ NumVersion numericVersion; /*encoded version number*/
+ short countryCode; /*country code from intl utilities*/
+ Str255 shortVersion; /*version number string - worst case*/
+ Str255 reserved; /*longMessage string packed after shortVersion*/
+};
+typedef struct VersRec VersRec;
+typedef VersRec * VersRecPtr;
+typedef VersRecPtr * VersRecHndl;
+/*********************************************************************************
+
+ Old names for types
+
+*********************************************************************************/
+
+typedef UInt8 Byte;
+typedef SInt8 SignedByte;
+typedef wide * WidePtr;
+typedef UnsignedWide * UnsignedWidePtr;
+typedef Float80 extended80;
+typedef Float96 extended96;
+typedef SInt8 VHSelect;
+
+/*********************************************************************************
+
+ Debugger functions
+
+*********************************************************************************/
+EXTERN_API( void )
+Debugger (void) ONEWORDINLINE(0xA9FF);
+
+EXTERN_API( void )
+DebugStr (ConstStr255Param debuggerMsg) ONEWORDINLINE(0xABFF);
+
+#if TARGET_OS_MAC
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( void )
+debugstr (const char * debuggerMsg);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if TARGET_CPU_PPC
+/* Only for Mac OS native drivers */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( void )
+SysDebug (void);
+
+EXTERN_API_C( void )
+SysDebugStr (ConstStr255Param str);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_CPU_PPC */
+
+/* SADE break points */
+EXTERN_API( void )
+SysBreak (void) THREEWORDINLINE(0x303C, 0xFE16, 0xA9C9);
+
+EXTERN_API( void )
+SysBreakStr (ConstStr255Param debuggerMsg) THREEWORDINLINE(0x303C, 0xFE15, 0xA9C9);
+
+EXTERN_API( void )
+SysBreakFunc (ConstStr255Param debuggerMsg) THREEWORDINLINE(0x303C, 0xFE14, 0xA9C9);
+
+/* old names for Debugger and DebugStr */
+#if OLDROUTINENAMES && TARGET_CPU_68K
+ #define Debugger68k() Debugger()
+ #define DebugStr68k(s) DebugStr(s)
+#endif
+#endif /* TARGET_OS_MAC */
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MACTYPES__ */
+
diff --git a/include/qt/MacWindows.h b/include/qt/MacWindows.h
new file mode 100644
index 000000000..9f16e23e0
--- /dev/null
+++ b/include/qt/MacWindows.h
@@ -0,0 +1,1885 @@
+/*
+ File: MacWindows.h
+
+ Contains: Window Manager Interfaces
+
+ Version: Technology: Mac OS 9
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1997-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __MACWINDOWS__
+#define __MACWINDOWS__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __ALIASES__
+#include "Aliases.h"
+#endif
+
+#ifndef __APPLEEVENTS__
+#include "AppleEvents.h"
+#endif
+
+#ifndef __COLLECTIONS__
+#include "Collections.h"
+#endif
+
+#ifndef __DRAG__
+#include "Drag.h"
+#endif
+
+#ifndef __EVENTS__
+#include "Events.h"
+#endif
+
+#ifndef __MENUS__
+#include "Menus.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+#ifndef __QDOFFSCREEN__
+#include "QDOffscreen.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#ifndef __TEXTCOMMON__
+#include "TextCommon.h"
+#endif
+
+#ifndef __ICONS__
+#include "Icons.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* */
+/* Current documentation for the Mac OS Window Manager is available on the web: */
+/* <http://developer.apple.com/techpubs/macos8/HumanInterfaceToolbox/WindowManager/windowmanager.html> */
+/* */
+/*--------------------------------------------------------------------------------------*/
+/* o Property Types */
+/*--------------------------------------------------------------------------------------*/
+typedef OSType PropertyCreator;
+typedef OSType PropertyTag;
+/*--------------------------------------------------------------------------------------*/
+/* o Window Classes */
+/*--------------------------------------------------------------------------------------*/
+
+typedef UInt32 WindowClass;
+enum {
+ kAlertWindowClass = 1L, /* "I need your attention now."*/
+ kMovableAlertWindowClass = 2L, /* "I need your attention now, but I'm kind enough to let you switch out of this app to do other things."*/
+ kModalWindowClass = 3L, /* system modal, not draggable*/
+ kMovableModalWindowClass = 4L, /* application modal, draggable*/
+ kFloatingWindowClass = 5L, /* floats above all other application windows*/
+ kDocumentWindowClass = 6L, /* document windows*/
+ kDesktopWindowClass = 7L, /* desktop window (usually only one of these exists) - OS X only in CarbonLib 1.0*/
+ kUtilityWindowClass = 8L, /* Available in CarbonLib 1.1 and later, and in Mac OS X*/
+ kHelpWindowClass = 10L, /* Available in CarbonLib 1.1 and later, and in Mac OS X*/
+ kSheetWindowClass = 11L, /* Available in CarbonLib 1.3 and later, and in Mac OS X*/
+ kToolbarWindowClass = 12L, /* Available in CarbonLib 1.1 and later, and in Mac OS X*/
+ kPlainWindowClass = 13L, /* Available in CarbonLib 1.2.5 and later, and Mac OS X*/
+ kOverlayWindowClass = 14L, /* Available in Mac OS X*/
+ kSheetAlertWindowClass = 15L, /* Available in CarbonLib 1.3 and later, and in Mac OS X 10.1 and later*/
+ kAltPlainWindowClass = 16L, /* Available in CarbonLib 1.3 and later, and in Mac OS X 10.1 and later*/
+ kDrawerWindowClass = 20L, /* Available in Mac OS X 10.2 or later*/
+ kAllWindowClasses = (unsigned long)0xFFFFFFFF /* for use with GetFrontWindowOfClass, FindWindowOfClass, GetNextWindowOfClass*/
+};
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Window Attributes */
+/*--------------------------------------------------------------------------------------*/
+
+typedef UInt32 WindowAttributes;
+enum {
+ kWindowNoAttributes = 0L, /* no attributes*/
+ kWindowCloseBoxAttribute = (1L << 0), /* window has a close box*/
+ kWindowHorizontalZoomAttribute = (1L << 1), /* window has horizontal zoom box*/
+ kWindowVerticalZoomAttribute = (1L << 2), /* window has vertical zoom box*/
+ kWindowFullZoomAttribute = (kWindowVerticalZoomAttribute | kWindowHorizontalZoomAttribute),
+ kWindowCollapseBoxAttribute = (1L << 3), /* window has a collapse box*/
+ kWindowResizableAttribute = (1L << 4), /* window is resizable*/
+ kWindowSideTitlebarAttribute = (1L << 5), /* window wants a titlebar on the side (floating window class only)*/
+ kWindowNoUpdatesAttribute = (1L << 16), /* this window receives no update events*/
+ kWindowNoActivatesAttribute = (1L << 17), /* this window receives no activate events*/
+ kWindowNoBufferingAttribute = (1L << 20), /* this window is not buffered (Mac OS X only)*/
+ kWindowStandardDocumentAttributes = (kWindowCloseBoxAttribute | kWindowFullZoomAttribute | kWindowCollapseBoxAttribute | kWindowResizableAttribute),
+ kWindowStandardFloatingAttributes = (kWindowCloseBoxAttribute | kWindowCollapseBoxAttribute)
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o Window Definition Type */
+/*--------------------------------------------------------------------------------------*/
+enum {
+ kWindowDefProcType = FOUR_CHAR_CODE('WDEF')
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o Mac OS 7.5 Window Definition Resource IDs */
+/*--------------------------------------------------------------------------------------*/
+enum {
+ kStandardWindowDefinition = 0, /* for document windows and dialogs*/
+ kRoundWindowDefinition = 1, /* old da-style window*/
+ kFloatingWindowDefinition = 124 /* for floating windows*/
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o Variant Codes */
+/*--------------------------------------------------------------------------------------*/
+enum {
+ /* for use with kStandardWindowDefinition */
+ kDocumentWindowVariantCode = 0,
+ kModalDialogVariantCode = 1,
+ kPlainDialogVariantCode = 2,
+ kShadowDialogVariantCode = 3,
+ kMovableModalDialogVariantCode = 5,
+ kAlertVariantCode = 7,
+ kMovableAlertVariantCode = 9, /* for use with kFloatingWindowDefinition */
+ kSideFloaterVariantCode = 8
+};
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o DefProc IDs */
+/*--------------------------------------------------------------------------------------*/
+enum {
+ /* classic ids */
+ documentProc = 0,
+ dBoxProc = 1,
+ plainDBox = 2,
+ altDBoxProc = 3,
+ noGrowDocProc = 4,
+ movableDBoxProc = 5,
+ zoomDocProc = 8,
+ zoomNoGrow = 12,
+ rDocProc = 16, /* floating window defproc ids */
+ floatProc = 1985,
+ floatGrowProc = 1987,
+ floatZoomProc = 1989,
+ floatZoomGrowProc = 1991,
+ floatSideProc = 1993,
+ floatSideGrowProc = 1995,
+ floatSideZoomProc = 1997,
+ floatSideZoomGrowProc = 1999
+};
+
+enum {
+ /* Resource IDs for theme-savvy window defprocs */
+ kWindowDocumentDefProcResID = 64,
+ kWindowDialogDefProcResID = 65,
+ kWindowUtilityDefProcResID = 66,
+ kWindowUtilitySideTitleDefProcResID = 67
+};
+
+enum {
+ /* Proc IDs for theme-savvy windows */
+ kWindowDocumentProc = 1024,
+ kWindowGrowDocumentProc = 1025,
+ kWindowVertZoomDocumentProc = 1026,
+ kWindowVertZoomGrowDocumentProc = 1027,
+ kWindowHorizZoomDocumentProc = 1028,
+ kWindowHorizZoomGrowDocumentProc = 1029,
+ kWindowFullZoomDocumentProc = 1030,
+ kWindowFullZoomGrowDocumentProc = 1031
+};
+
+
+enum {
+ /* Proc IDs for theme-savvy dialogs */
+ kWindowPlainDialogProc = 1040,
+ kWindowShadowDialogProc = 1041,
+ kWindowModalDialogProc = 1042,
+ kWindowMovableModalDialogProc = 1043,
+ kWindowAlertProc = 1044,
+ kWindowMovableAlertProc = 1045
+};
+
+
+enum {
+ /* procIDs available from Mac OS 8.1 (Appearance 1.0.1) forward */
+ kWindowMovableModalGrowProc = 1046
+};
+
+
+enum {
+ /* Proc IDs for top title bar theme-savvy floating windows */
+ kWindowFloatProc = 1057,
+ kWindowFloatGrowProc = 1059,
+ kWindowFloatVertZoomProc = 1061,
+ kWindowFloatVertZoomGrowProc = 1063,
+ kWindowFloatHorizZoomProc = 1065,
+ kWindowFloatHorizZoomGrowProc = 1067,
+ kWindowFloatFullZoomProc = 1069,
+ kWindowFloatFullZoomGrowProc = 1071
+};
+
+
+enum {
+ /* Proc IDs for side title bar theme-savvy floating windows */
+ kWindowFloatSideProc = 1073,
+ kWindowFloatSideGrowProc = 1075,
+ kWindowFloatSideVertZoomProc = 1077,
+ kWindowFloatSideVertZoomGrowProc = 1079,
+ kWindowFloatSideHorizZoomProc = 1081,
+ kWindowFloatSideHorizZoomGrowProc = 1083,
+ kWindowFloatSideFullZoomProc = 1085,
+ kWindowFloatSideFullZoomGrowProc = 1087
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o System 7 Window Positioning Constants */
+/* */
+/* Passed into StandardAlert and used in 'WIND', 'DLOG', and 'ALRT' templates */
+/* StandardAlert uses zero to specify the default position. Other calls use zero to */
+/* specify "no position". Do not pass these constants to RepositionWindow. Do not */
+/* store these constants in the BasicWindowDescription of a 'wind' resource. */
+/*--------------------------------------------------------------------------------------*/
+
+enum {
+ kWindowNoPosition = 0x0000,
+ kWindowDefaultPosition = 0x0000, /* used by StandardAlert*/
+ kWindowCenterMainScreen = 0x280A,
+ kWindowAlertPositionMainScreen = 0x300A,
+ kWindowStaggerMainScreen = 0x380A,
+ kWindowCenterParentWindow = 0xA80A,
+ kWindowAlertPositionParentWindow = 0xB00A,
+ kWindowStaggerParentWindow = 0xB80A,
+ kWindowCenterParentWindowScreen = 0x680A,
+ kWindowAlertPositionParentWindowScreen = 0x700A,
+ kWindowStaggerParentWindowScreen = 0x780A
+};
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Window Positioning Methods */
+/* */
+/* Positioning methods passed to RepositionWindow. */
+/* Do not use them in WIND, ALRT, DLOG templates. */
+/* Do not confuse these constants with the constants above */
+/*--------------------------------------------------------------------------------------*/
+
+typedef UInt32 WindowPositionMethod;
+enum {
+ kWindowCenterOnMainScreen = 0x00000001,
+ kWindowCenterOnParentWindow = 0x00000002,
+ kWindowCenterOnParentWindowScreen = 0x00000003,
+ kWindowCascadeOnMainScreen = 0x00000004,
+ kWindowCascadeOnParentWindow = 0x00000005,
+ kWindowCascadeOnParentWindowScreen = 0x00000006,
+ kWindowAlertPositionOnMainScreen = 0x00000007,
+ kWindowAlertPositionOnParentWindow = 0x00000008,
+ kWindowAlertPositionOnParentWindowScreen = 0x00000009
+};
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o GetWindowRegion Types */
+/*--------------------------------------------------------------------------------------*/
+typedef UInt16 WindowRegionCode;
+enum {
+ /* Region values to pass into GetWindowRegion & GetWindowBounds */
+ kWindowTitleBarRgn = 0,
+ kWindowTitleTextRgn = 1,
+ kWindowCloseBoxRgn = 2,
+ kWindowZoomBoxRgn = 3,
+ kWindowDragRgn = 5,
+ kWindowGrowRgn = 6,
+ kWindowCollapseBoxRgn = 7,
+ kWindowTitleProxyIconRgn = 8, /* Mac OS 8.5 forward*/
+ kWindowStructureRgn = 32,
+ kWindowContentRgn = 33, /* Content area of the window; empty when the window is collapsed*/
+ kWindowUpdateRgn = 34, /* Carbon forward*/
+ kWindowGlobalPortRgn = 40 /* Carbon forward - bounds of the window's port in global coordinates; not affected by CollapseWindow*/
+};
+
+/* GetWindowRegionRec - a pointer to this is passed in WDEF param for kWindowMsgGetRegion*/
+
+struct GetWindowRegionRec {
+ RgnHandle winRgn;
+ WindowRegionCode regionCode;
+};
+typedef struct GetWindowRegionRec GetWindowRegionRec;
+
+typedef GetWindowRegionRec * GetWindowRegionPtr;
+typedef GetWindowRegionRec * GetWindowRegionRecPtr;
+/*--------------------------------------------------------------------------------------*/
+/* o WDEF Message Types */
+/*--------------------------------------------------------------------------------------*/
+/*
+ SetupWindowProxyDragImageRec - setup the proxy icon drag image
+ Both regions are allocated and disposed by the Window Manager.
+ The GWorld is disposed of by the Window Manager, but the WDEF must allocate
+ it. See Technote on Drag Manager 1.1 additions for more information and sample code for
+ setting up drag images.
+*/
+
+
+struct SetupWindowProxyDragImageRec {
+ GWorldPtr imageGWorld; /* locked GWorld containing the drag image - output - can be NULL*/
+ RgnHandle imageRgn; /* image clip region, contains the portion of the image which gets blitted to screen - preallocated output - if imageGWorld is NULL, this is ignored*/
+ RgnHandle outlineRgn; /* the outline region used on shallow monitors - preallocated output - must always be non-empty*/
+};
+typedef struct SetupWindowProxyDragImageRec SetupWindowProxyDragImageRec;
+/* MeasureWindowTitleRec - a pointer to this is passed in WDEF param for kWindowMsgMeasureTitle*/
+
+struct MeasureWindowTitleRec {
+ /* output parameters (filled in by the WDEF)*/
+ SInt16 fullTitleWidth; /* text + proxy icon width*/
+ SInt16 titleTextWidth; /* text width*/
+};
+typedef struct MeasureWindowTitleRec MeasureWindowTitleRec;
+typedef MeasureWindowTitleRec * MeasureWindowTitleRecPtr;
+
+/*--------------------------------------------------------------------------------------*/
+/* o Standard Window Kinds */
+/*--------------------------------------------------------------------------------------*/
+enum {
+ dialogKind = 2,
+ userKind = 8,
+ kDialogWindowKind = 2,
+ kApplicationWindowKind = 8
+};
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o FindWindow Result Codes */
+/*--------------------------------------------------------------------------------------*/
+
+typedef SInt16 WindowPartCode;
+enum {
+ inDesk = 0,
+ inNoWindow = 0,
+ inMenuBar = 1,
+ inSysWindow = 2,
+ inContent = 3,
+ inDrag = 4,
+ inGrow = 5,
+ inGoAway = 6,
+ inZoomIn = 7,
+ inZoomOut = 8,
+ inCollapseBox = 11, /* Mac OS 8.0 forward*/
+ inProxyIcon = 12 /* Mac OS 8.5 forward*/
+};
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Window Definition Hit Test Result Codes */
+/*--------------------------------------------------------------------------------------*/
+
+typedef SInt16 WindowDefPartCode;
+enum {
+ wNoHit = 0,
+ wInContent = 1,
+ wInDrag = 2,
+ wInGrow = 3,
+ wInGoAway = 4,
+ wInZoomIn = 5,
+ wInZoomOut = 6,
+ wInCollapseBox = 9, /* Mac OS 8.0 forward*/
+ wInProxyIcon = 10 /* Mac OS 8.5 forward*/
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o Window Definition Messages */
+/*--------------------------------------------------------------------------------------*/
+
+enum {
+ kWindowMsgDraw = 0,
+ kWindowMsgHitTest = 1,
+ kWindowMsgCalculateShape = 2,
+ kWindowMsgInitialize = 3,
+ kWindowMsgCleanUp = 4,
+ kWindowMsgDrawGrowOutline = 5,
+ kWindowMsgDrawGrowBox = 6
+};
+
+/* Messages available from Mac OS 8.0 forward*/
+enum {
+ kWindowMsgGetFeatures = 7,
+ kWindowMsgGetRegion = 8
+};
+
+/* Messages available from Mac OS 8.5 forward*/
+enum {
+ kWindowMsgDragHilite = 9, /* parameter boolean indicating on or off*/
+ kWindowMsgModified = 10, /* parameter boolean indicating saved (false) or modified (true)*/
+ kWindowMsgDrawInCurrentPort = 11, /* same as kWindowMsgDraw, but must draw in current port*/
+ kWindowMsgSetupProxyDragImage = 12, /* parameter pointer to SetupWindowProxyDragImageRec*/
+ kWindowMsgStateChanged = 13, /* something about the window's state has changed*/
+ kWindowMsgMeasureTitle = 14 /* measure and return the ideal title width*/
+};
+
+/* old names*/
+enum {
+ wDraw = 0,
+ wHit = 1,
+ wCalcRgns = 2,
+ wNew = 3,
+ wDispose = 4,
+ wGrow = 5,
+ wDrawGIcon = 6
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o State-changed Flags for kWindowMsgStateChanged */
+/*--------------------------------------------------------------------------------------*/
+enum {
+ kWindowStateTitleChanged = (1 << 0)
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o Window Feature Bits */
+/*--------------------------------------------------------------------------------------*/
+enum {
+ kWindowCanGrow = (1 << 0),
+ kWindowCanZoom = (1 << 1),
+ kWindowCanCollapse = (1 << 2),
+ kWindowIsModal = (1 << 3),
+ kWindowCanGetWindowRegion = (1 << 4),
+ kWindowIsAlert = (1 << 5),
+ kWindowHasTitleBar = (1 << 6)
+};
+
+/* Feature bits available from Mac OS 8.5 forward*/
+enum {
+ kWindowSupportsDragHilite = (1 << 7), /* window definition supports kWindowMsgDragHilite*/
+ kWindowSupportsModifiedBit = (1 << 8), /* window definition supports kWindowMsgModified*/
+ kWindowCanDrawInCurrentPort = (1 << 9), /* window definition supports kWindowMsgDrawInCurrentPort*/
+ kWindowCanSetupProxyDragImage = (1 << 10), /* window definition supports kWindowMsgSetupProxyDragImage*/
+ kWindowCanMeasureTitle = (1 << 11), /* window definition supports kWindowMsgMeasureTitle*/
+ kWindowWantsDisposeAtProcessDeath = (1 << 12), /* window definition wants a Dispose message for windows still extant during ExitToShell*/
+ kWindowDefSupportsColorGrafPort = 0x40000002 /* window definition does not need the monochrome GrafPort hack during kWindowMsgCalculateShape*/
+};
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Desktop Pattern Resource ID */
+/*--------------------------------------------------------------------------------------*/
+enum {
+ deskPatID = 16
+};
+
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Window Color Part Codes */
+/*--------------------------------------------------------------------------------------*/
+enum {
+ wContentColor = 0,
+ wFrameColor = 1,
+ wTextColor = 2,
+ wHiliteColor = 3,
+ wTitleBarColor = 4
+};
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Region Dragging Constants */
+/*--------------------------------------------------------------------------------------*/
+
+enum {
+ kMouseUpOutOfSlop = (long)0x80008000
+};
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Window Color Table */
+/*--------------------------------------------------------------------------------------*/
+
+struct WinCTab {
+ long wCSeed; /* reserved */
+ short wCReserved; /* reserved */
+ short ctSize; /* usually 4 for windows */
+ ColorSpec ctTable[5];
+};
+typedef struct WinCTab WinCTab;
+
+typedef WinCTab * WCTabPtr;
+typedef WCTabPtr * WCTabHandle;
+/*--------------------------------------------------------------------------------------*/
+/* o WindowRecord */
+/*--------------------------------------------------------------------------------------*/
+#if !OPAQUE_TOOLBOX_STRUCTS
+typedef struct WindowRecord WindowRecord;
+typedef WindowRecord * WindowPeek;
+
+struct WindowRecord {
+ GrafPort port;
+ short windowKind;
+ Boolean visible;
+ Boolean hilited;
+ Boolean goAwayFlag;
+ Boolean spareFlag;
+ RgnHandle strucRgn;
+ RgnHandle contRgn;
+ RgnHandle updateRgn;
+ Handle windowDefProc;
+ Handle dataHandle;
+ StringHandle titleHandle;
+ short titleWidth;
+ Handle controlList;
+ WindowPeek nextWindow;
+ PicHandle windowPic;
+ long refCon;
+};
+
+#endif /* !OPAQUE_TOOLBOX_STRUCTS */
+
+/*--------------------------------------------------------------------------------------*/
+/* o Color WindowRecord */
+/*--------------------------------------------------------------------------------------*/
+#if !OPAQUE_TOOLBOX_STRUCTS
+typedef struct CWindowRecord CWindowRecord;
+typedef CWindowRecord * CWindowPeek;
+
+struct CWindowRecord {
+ CGrafPort port;
+ short windowKind;
+ Boolean visible;
+ Boolean hilited;
+ Boolean goAwayFlag;
+ Boolean spareFlag;
+ RgnHandle strucRgn;
+ RgnHandle contRgn;
+ RgnHandle updateRgn;
+ Handle windowDefProc;
+ Handle dataHandle;
+ StringHandle titleHandle;
+ short titleWidth;
+ Handle controlList;
+ CWindowPeek nextWindow;
+ PicHandle windowPic;
+ long refCon;
+};
+
+#endif /* !OPAQUE_TOOLBOX_STRUCTS */
+
+/*--------------------------------------------------------------------------------------*/
+/* o AuxWinHandle */
+/*--------------------------------------------------------------------------------------*/
+#if !OPAQUE_TOOLBOX_STRUCTS
+typedef struct AuxWinRec AuxWinRec;
+typedef AuxWinRec * AuxWinPtr;
+typedef AuxWinPtr * AuxWinHandle;
+
+struct AuxWinRec {
+ AuxWinHandle awNext; /*handle to next AuxWinRec*/
+ WindowPtr awOwner; /*ptr to window */
+ CTabHandle awCTable; /*color table for this window*/
+ Handle reserved;
+ long awFlags; /*reserved for expansion*/
+ CTabHandle awReserved; /*reserved for expansion*/
+ long awRefCon; /*user Constant*/
+};
+
+#endif /* !OPAQUE_TOOLBOX_STRUCTS */
+
+/*--------------------------------------------------------------------------------------*/
+/* o BasicWindowDescription */
+/* */
+/* Contains statically-sized basic attributes of the window, for storage in a */
+/* collection item. */
+/*--------------------------------------------------------------------------------------*/
+/* constants for the version field*/
+enum {
+ kWindowDefinitionVersionOne = 1,
+ kWindowDefinitionVersionTwo = 2
+};
+
+/* constants for the stateflags bit field */
+enum {
+ kWindowIsCollapsedState = (1 << 0L)
+};
+
+
+struct BasicWindowDescription {
+ UInt32 descriptionSize; /* sizeof(BasicWindowDescription)*/
+
+ Rect windowContentRect; /* location on screen*/
+ Rect windowZoomRect; /* location on screen when zoomed out*/
+ UInt32 windowRefCon; /* the refcon - __avoid saving stale pointers here__ */
+ UInt32 windowStateFlags; /* window state bit flags*/
+ WindowPositionMethod windowPositionMethod; /* method last used by RepositionWindow to position the window (if any)*/
+
+ UInt32 windowDefinitionVersion;
+ union {
+ struct {
+ SInt16 windowDefProc; /* defProc and variant*/
+ Boolean windowHasCloseBox;
+ } versionOne;
+
+ struct {
+ WindowClass windowClass; /* the class*/
+ WindowAttributes windowAttributes; /* the attributes*/
+ } versionTwo;
+
+ } windowDefinition;
+};
+typedef struct BasicWindowDescription BasicWindowDescription;
+/* the window manager stores the default collection items using these IDs*/
+enum {
+ kStoredWindowSystemTag = FOUR_CHAR_CODE('appl'), /* Only Apple collection items will be of this tag*/
+ kStoredBasicWindowDescriptionID = FOUR_CHAR_CODE('sbas'), /* BasicWindowDescription*/
+ kStoredWindowPascalTitleID = FOUR_CHAR_CODE('s255') /* pascal title string*/
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o Window Class Ordering */
+/* */
+/* Special cases for the "behind" parameter in window creation calls. */
+/*--------------------------------------------------------------------------------------*/
+#define kFirstWindowOfClass ((WindowRef)-1L)
+#define kLastWindowOfClass ((WindowRef)0L)
+/*--------------------------------------------------------------------------------------*/
+/* o Zoom Information Handle */
+/*--------------------------------------------------------------------------------------*/
+
+struct WStateData {
+ Rect userState; /*user zoom state*/
+ Rect stdState; /*standard zoom state*/
+};
+typedef struct WStateData WStateData;
+typedef WStateData * WStateDataPtr;
+typedef WStateDataPtr * WStateDataHandle;
+/*--------------------------------------------------------------------------------------*/
+/* o MixedMode & ProcPtrs */
+/*--------------------------------------------------------------------------------------*/
+typedef CALLBACK_API( long , WindowDefProcPtr )(short varCode, WindowRef window, short message, long param);
+typedef CALLBACK_API( void , DeskHookProcPtr )(Boolean mouseClick, EventRecord *theEvent);
+/*
+ WARNING: DeskHookProcPtr uses register based parameters under classic 68k
+ and cannot be written in a high-level language without
+ the help of mixed mode or assembly glue.
+*/
+typedef CALLBACK_API( OSStatus , WindowPaintProcPtr )(GDHandle device, GrafPtr qdContext, WindowRef window, RgnHandle inClientPaintRgn, RgnHandle outSystemPaintRgn, void *refCon);
+typedef STACK_UPP_TYPE(WindowDefProcPtr) WindowDefUPP;
+typedef REGISTER_UPP_TYPE(DeskHookProcPtr) DeskHookUPP;
+typedef STACK_UPP_TYPE(WindowPaintProcPtr) WindowPaintUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(WindowDefUPP)
+ NewWindowDefUPP (WindowDefProcPtr userRoutine);
+
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(DeskHookUPP)
+ NewDeskHookUPP (DeskHookProcPtr userRoutine);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ EXTERN_API(WindowPaintUPP)
+ NewWindowPaintUPP (WindowPaintProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeWindowDefUPP (WindowDefUPP userUPP);
+
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(void)
+ DisposeDeskHookUPP (DeskHookUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ EXTERN_API(void)
+ DisposeWindowPaintUPP (WindowPaintUPP userUPP);
+
+ EXTERN_API(long)
+ InvokeWindowDefUPP (short varCode,
+ WindowRef window,
+ short message,
+ long param,
+ WindowDefUPP userUPP);
+
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(void)
+ InvokeDeskHookUPP (Boolean mouseClick,
+ EventRecord * theEvent,
+ DeskHookUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ EXTERN_API(OSStatus)
+ InvokeWindowPaintUPP (GDHandle device,
+ GrafPtr qdContext,
+ WindowRef window,
+ RgnHandle inClientPaintRgn,
+ RgnHandle outSystemPaintRgn,
+ void * refCon,
+ WindowPaintUPP userUPP);
+
+#else
+ enum { uppWindowDefProcInfo = 0x00003BB0 }; /* pascal 4_bytes Func(2_bytes, 4_bytes, 2_bytes, 4_bytes) */
+ enum { uppDeskHookProcInfo = 0x00130802 }; /* register no_return_value Func(1_byte:D0, 4_bytes:A0) */
+ enum { uppWindowPaintProcInfo = 0x0003FFF0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewWindowDefUPP(userRoutine) (WindowDefUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppWindowDefProcInfo, GetCurrentArchitecture())
+ #define NewDeskHookUPP(userRoutine) (DeskHookUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDeskHookProcInfo, GetCurrentArchitecture())
+ #define NewWindowPaintUPP(userRoutine) (WindowPaintUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppWindowPaintProcInfo, GetCurrentArchitecture())
+ #define DisposeWindowDefUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeDeskHookUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeWindowPaintUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeWindowDefUPP(varCode, window, message, param, userUPP) (long)CALL_FOUR_PARAMETER_UPP((userUPP), uppWindowDefProcInfo, (varCode), (window), (message), (param))
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter InvokeDeskHookUPP(__D0, __A0, __A1)
+ void InvokeDeskHookUPP(Boolean mouseClick, EventRecord * theEvent, DeskHookUPP userUPP) = 0x4E91;
+ #else
+ #define InvokeDeskHookUPP(mouseClick, theEvent, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppDeskHookProcInfo, (mouseClick), (theEvent))
+ #endif
+ #define InvokeWindowPaintUPP(device, qdContext, window, inClientPaintRgn, outSystemPaintRgn, refCon, userUPP) (OSStatus)CALL_SIX_PARAMETER_UPP((userUPP), uppWindowPaintProcInfo, (device), (qdContext), (window), (inClientPaintRgn), (outSystemPaintRgn), (refCon))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewWindowDefProc(userRoutine) NewWindowDefUPP(userRoutine)
+#define NewDeskHookProc(userRoutine) NewDeskHookUPP(userRoutine)
+#define NewWindowPaintProc(userRoutine) NewWindowPaintUPP(userRoutine)
+#define CallWindowDefProc(userRoutine, varCode, window, message, param) InvokeWindowDefUPP(varCode, window, message, param, userRoutine)
+#define CallDeskHookProc(userRoutine, mouseClick, theEvent) InvokeDeskHookUPP(mouseClick, theEvent, userRoutine)
+#define CallWindowPaintProc(userRoutine, device, qdContext, window, inClientPaintRgn, outSystemPaintRgn, refCon) InvokeWindowPaintUPP(device, qdContext, window, inClientPaintRgn, outSystemPaintRgn, refCon, userRoutine)
+/*--------------------------------------------------------------------------------------*/
+/* o Window Definition Spec. Used in Carbon to specify the code that defines a window. */
+/*--------------------------------------------------------------------------------------*/
+enum {
+ kWindowDefProcPtr = 0 /* raw proc-ptr based access*/
+};
+
+
+typedef UInt32 WindowDefType;
+
+struct WindowDefSpec {
+ WindowDefType defType;
+ union {
+ WindowDefUPP defProc;
+ } u;
+};
+typedef struct WindowDefSpec WindowDefSpec;
+/*--------------------------------------------------------------------------------------*/
+/* o Window Creation & Persistence */
+/*--------------------------------------------------------------------------------------*/
+EXTERN_API( WindowRef )
+GetNewCWindow (short windowID,
+ void * wStorage,
+ WindowRef behind) ONEWORDINLINE(0xAA46);
+
+EXTERN_API( WindowRef )
+NewWindow (void * wStorage,
+ const Rect * boundsRect,
+ ConstStr255Param title,
+ Boolean visible,
+ short theProc,
+ WindowRef behind,
+ Boolean goAwayFlag,
+ long refCon) ONEWORDINLINE(0xA913);
+
+EXTERN_API( WindowRef )
+GetNewWindow (short windowID,
+ void * wStorage,
+ WindowRef behind) ONEWORDINLINE(0xA9BD);
+
+EXTERN_API( WindowRef )
+NewCWindow (void * wStorage,
+ const Rect * boundsRect,
+ ConstStr255Param title,
+ Boolean visible,
+ short procID,
+ WindowRef behind,
+ Boolean goAwayFlag,
+ long refCon) ONEWORDINLINE(0xAA45);
+
+EXTERN_API( void )
+DisposeWindow (WindowRef window) ONEWORDINLINE(0xA914);
+
+#if CALL_NOT_IN_CARBON
+#if TARGET_OS_MAC
+ #define MacCloseWindow CloseWindow
+#endif
+EXTERN_API( void )
+MacCloseWindow (WindowRef window) ONEWORDINLINE(0xA92D);
+
+
+/*
+ Routines available from Mac OS 8.5 forward
+ or from Mac OS 8.1 forward when linking to CarbonLib
+*/
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( OSStatus )
+CreateNewWindow (WindowClass windowClass,
+ WindowAttributes attributes,
+ const Rect * contentBounds,
+ WindowRef * outWindow);
+
+/* Routines available from Mac OS 8.5 forward*/
+
+/* Create a window from a 'wind' resource*/
+EXTERN_API( OSStatus )
+CreateWindowFromResource (SInt16 resID,
+ WindowRef * outWindow);
+
+/* window persistence*/
+EXTERN_API( OSStatus )
+StoreWindowIntoCollection (WindowRef window,
+ Collection collection);
+
+EXTERN_API( OSStatus )
+CreateWindowFromCollection (Collection collection,
+ WindowRef * outWindow);
+
+/* window refcounting*/
+EXTERN_API( OSStatus )
+GetWindowOwnerCount (WindowRef window,
+ UInt32 * outCount);
+
+EXTERN_API( OSStatus )
+CloneWindow (WindowRef window);
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Custom Windows */
+/*--------------------------------------------------------------------------------------*/
+/* Routines available from Mac OS 8.1 forward when linking to CarbonLib*/
+
+EXTERN_API( OSStatus )
+CreateCustomWindow (const WindowDefSpec * def,
+ WindowClass windowClass,
+ WindowAttributes attributes,
+ const Rect * contentBounds,
+ WindowRef * outWindow);
+
+EXTERN_API( OSStatus )
+ReshapeCustomWindow (WindowRef window);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Window Metainformation Accessors */
+/*--------------------------------------------------------------------------------------*/
+
+/*
+ Routines available from Mac OS 8.5 forward
+ or from Mac OS 8.1 forward when linking to CarbonLib
+*/
+EXTERN_API( OSStatus )
+GetWindowClass (WindowRef window,
+ WindowClass * outClass);
+
+EXTERN_API( OSStatus )
+GetWindowAttributes (WindowRef window,
+ WindowAttributes * outAttributes);
+
+/*
+ Routines available from Mac OS 9.0 forward
+ or from Mac OS 8.1 forward when linking to CarbonLib
+*/
+EXTERN_API( OSStatus )
+ChangeWindowAttributes (WindowRef window,
+ WindowAttributes setTheseAttributes,
+ WindowAttributes clearTheseAttributes);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Floating Windows */
+/*--------------------------------------------------------------------------------------*/
+/*
+ Routines available from Mac OS 8.6 forward
+ or from Mac OS 8.1 forward when linking to CarbonLib
+*/
+
+EXTERN_API( OSStatus )
+ShowFloatingWindows (void);
+
+EXTERN_API( OSStatus )
+HideFloatingWindows (void);
+
+EXTERN_API( Boolean )
+AreFloatingWindowsVisible (void);
+
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Background Image */
+/*--------------------------------------------------------------------------------------*/
+/* SetWinColor is not available in Carbon.*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+SetWinColor (WindowRef window,
+ WCTabHandle newColorTable) ONEWORDINLINE(0xAA41);
+
+/* SetDeskCPat is not available in Carbon.*/
+EXTERN_API( void )
+SetDeskCPat (PixPatHandle deskPixPat) ONEWORDINLINE(0xAA47);
+
+/*
+ Routines available from Mac OS 8.5 forward
+ or from Mac OS 8.1 forward when linking to CarbonLib
+*/
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( OSStatus )
+SetWindowContentColor (WindowRef window,
+ const RGBColor * color);
+
+EXTERN_API( OSStatus )
+GetWindowContentColor (WindowRef window,
+ RGBColor * color);
+
+/* Routines available from Mac OS 8.5 forward*/
+EXTERN_API( OSStatus )
+GetWindowContentPattern (WindowRef window,
+ PixPatHandle outPixPat);
+
+EXTERN_API( OSStatus )
+SetWindowContentPattern (WindowRef window,
+ PixPatHandle pixPat);
+
+/* Routines available from Mac OS 9.0 forward*/
+
+typedef OptionBits WindowPaintProcOptions;
+enum {
+ kWindowPaintProcOptionsNone = 0
+};
+
+EXTERN_API( OSStatus )
+InstallWindowContentPaintProc (WindowRef window,
+ WindowPaintUPP paintProc,
+ WindowPaintProcOptions options,
+ void * refCon) /* can be NULL */;
+
+/*--------------------------------------------------------------------------------------*/
+/* o Scrolling Routines */
+/*--------------------------------------------------------------------------------------*/
+
+typedef UInt32 ScrollWindowOptions;
+enum {
+ kScrollWindowNoOptions = 0,
+ kScrollWindowInvalidate = (1L << 0), /* add the exposed area to the window's update region*/
+ kScrollWindowEraseToPortBackground = (1L << 1) /* erase the exposed area using the background color/pattern of the window's grafport*/
+};
+
+
+/* Routines available from Mac OS 8.1 forward when linking to CarbonLib*/
+
+EXTERN_API( OSStatus )
+ScrollWindowRect (WindowRef inWindow,
+ const Rect * inScrollRect,
+ SInt16 inHPixels,
+ SInt16 inVPixels,
+ ScrollWindowOptions inOptions,
+ RgnHandle outExposedRgn) /* can be NULL */;
+
+EXTERN_API( OSStatus )
+ScrollWindowRegion (WindowRef inWindow,
+ RgnHandle inScrollRgn,
+ SInt16 inHPixels,
+ SInt16 inVPixels,
+ ScrollWindowOptions inOptions,
+ RgnHandle outExposedRgn) /* can be NULL */;
+
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Low-Level Region & Painting Routines */
+/*--------------------------------------------------------------------------------------*/
+EXTERN_API( void )
+ClipAbove (WindowRef window) ONEWORDINLINE(0xA90B);
+
+/* SaveOld/DrawNew are not available in Carbon. Use ReshapeCustomWindow instead.*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+SaveOld (WindowRef window) ONEWORDINLINE(0xA90E);
+
+EXTERN_API( void )
+DrawNew (WindowRef window,
+ Boolean update) ONEWORDINLINE(0xA90F);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( void )
+PaintOne (WindowRef window, /* can be NULL */
+ RgnHandle clobberedRgn) ONEWORDINLINE(0xA90C);
+
+EXTERN_API( void )
+PaintBehind (WindowRef startWindow, /* can be NULL */
+ RgnHandle clobberedRgn) ONEWORDINLINE(0xA90D);
+
+EXTERN_API( void )
+CalcVis (WindowRef window) ONEWORDINLINE(0xA909);
+
+EXTERN_API( void )
+CalcVisBehind (WindowRef startWindow, /* can be NULL */
+ RgnHandle clobberedRgn) ONEWORDINLINE(0xA90A);
+
+EXTERN_API( Boolean )
+CheckUpdate (EventRecord * theEvent) ONEWORDINLINE(0xA911);
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Window List */
+/*--------------------------------------------------------------------------------------*/
+#if TARGET_OS_MAC
+ #define MacFindWindow FindWindow
+#endif
+EXTERN_API( WindowPartCode )
+MacFindWindow (Point thePoint,
+ WindowRef * window) ONEWORDINLINE(0xA92C);
+
+EXTERN_API( WindowRef )
+FrontWindow (void) ONEWORDINLINE(0xA924);
+
+EXTERN_API( void )
+BringToFront (WindowRef window) ONEWORDINLINE(0xA920);
+
+EXTERN_API( void )
+SendBehind (WindowRef window,
+ WindowRef behindWindow) ONEWORDINLINE(0xA921);
+
+EXTERN_API( void )
+SelectWindow (WindowRef window) ONEWORDINLINE(0xA91F);
+
+/*
+ Routines available from Mac OS 8.6 forward
+ or from Mac OS 8.1 forward when linking to CarbonLib
+*/
+
+EXTERN_API( WindowRef )
+FrontNonFloatingWindow (void);
+
+/* Routines available from Mac OS 8.1 forward when linking to CarbonLib*/
+
+EXTERN_API( WindowRef )
+GetNextWindowOfClass (WindowRef inWindow,
+ WindowClass inWindowClass,
+ Boolean mustBeVisible);
+
+EXTERN_API( WindowPtr )
+GetFrontWindowOfClass (WindowClass inWindowClass,
+ Boolean mustBeVisible);
+
+EXTERN_API( OSStatus )
+FindWindowOfClass (const Point * where,
+ WindowClass inWindowClass,
+ WindowRef * outWindow,
+ SInt16 * outWindowPart);
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Misc Low-Level stuff */
+/*--------------------------------------------------------------------------------------*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+InitWindows (void) ONEWORDINLINE(0xA912);
+
+/* The window manager port does not exist in Carbon. */
+/* We are investigating replacement technologies. */
+EXTERN_API( void )
+GetWMgrPort (GrafPtr * wPort) ONEWORDINLINE(0xA910);
+
+EXTERN_API( void )
+GetCWMgrPort (CGrafPtr * wMgrCPort) ONEWORDINLINE(0xAA48);
+
+/*
+ Routines available from Mac OS 8.5 forward
+ or from Mac OS 8.1 forward when linking to CarbonLib
+*/
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( Boolean )
+IsValidWindowPtr (WindowPtr possibleWindow);
+
+/*
+ Routines available from Mac OS 8.6 forward
+ InitFloatingWindows is not available in Carbon;
+ window ordering is always active for Carbon clients
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSStatus )
+InitFloatingWindows (void);
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Various & Sundry Window Accessors */
+/*--------------------------------------------------------------------------------------*/
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( void )
+HiliteWindow (WindowRef window,
+ Boolean fHilite) ONEWORDINLINE(0xA91C);
+
+EXTERN_API( void )
+SetWRefCon (WindowRef window,
+ long data) ONEWORDINLINE(0xA918);
+
+EXTERN_API( long )
+GetWRefCon (WindowRef window) ONEWORDINLINE(0xA917);
+
+EXTERN_API( void )
+SetWindowPic (WindowRef window,
+ PicHandle pic) ONEWORDINLINE(0xA92E);
+
+EXTERN_API( PicHandle )
+GetWindowPic (WindowRef window) ONEWORDINLINE(0xA92F);
+
+EXTERN_API( short )
+GetWVariant (WindowRef window) ONEWORDINLINE(0xA80A);
+
+/* Routines available from Mac OS 8.0 (Appearance 1.0) forward*/
+EXTERN_API( OSStatus )
+GetWindowFeatures (WindowRef window,
+ UInt32 * outFeatures) THREEWORDINLINE(0x303C, 0x0013, 0xAA74);
+
+EXTERN_API( OSStatus )
+GetWindowRegion (WindowRef window,
+ WindowRegionCode inRegionCode,
+ RgnHandle ioWinRgn) THREEWORDINLINE(0x303C, 0x0014, 0xAA74);
+
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Update Events */
+/*--------------------------------------------------------------------------------------*/
+/*
+ These aren't present in Carbon. Please use the InvalWindowRect, etc. routines
+ below instead.
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+InvalRect (const Rect * badRect) ONEWORDINLINE(0xA928);
+
+EXTERN_API( void )
+InvalRgn (RgnHandle badRgn) ONEWORDINLINE(0xA927);
+
+EXTERN_API( void )
+ValidRect (const Rect * goodRect) ONEWORDINLINE(0xA92A);
+
+EXTERN_API( void )
+ValidRgn (RgnHandle goodRgn) ONEWORDINLINE(0xA929);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( void )
+BeginUpdate (WindowRef window) ONEWORDINLINE(0xA922);
+
+EXTERN_API( void )
+EndUpdate (WindowRef window) ONEWORDINLINE(0xA923);
+
+/*
+ Routines available from Mac OS 8.5 forward
+ or from Mac OS 8.1 forward when linking to CarbonLib
+*/
+
+EXTERN_API( OSStatus )
+InvalWindowRgn (WindowRef window,
+ RgnHandle region);
+
+EXTERN_API( OSStatus )
+InvalWindowRect (WindowRef window,
+ const Rect * bounds);
+
+EXTERN_API( OSStatus )
+ValidWindowRgn (WindowRef window,
+ RgnHandle region);
+
+EXTERN_API( OSStatus )
+ValidWindowRect (WindowRef window,
+ const Rect * bounds);
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o DrawGrowIcon */
+/* */
+/* DrawGrowIcon is deprecated from Mac OS 8.0 forward. Theme-savvy window defprocs */
+/* include the grow box in the window frame. */
+/*--------------------------------------------------------------------------------------*/
+EXTERN_API( void )
+DrawGrowIcon (WindowRef window) ONEWORDINLINE(0xA904);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Window Titles */
+/*--------------------------------------------------------------------------------------*/
+EXTERN_API( void )
+SetWTitle (WindowRef window,
+ ConstStr255Param title) ONEWORDINLINE(0xA91A);
+
+EXTERN_API( void )
+GetWTitle (WindowRef window,
+ Str255 title) ONEWORDINLINE(0xA919);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Window Proxies */
+/*--------------------------------------------------------------------------------------*/
+/*
+ Routines available from Mac OS 8.5 forward
+ or from Mac OS 8.1 forward when linking to CarbonLib
+*/
+
+EXTERN_API( OSStatus )
+SetWindowProxyFSSpec (WindowRef window,
+ const FSSpec * inFile);
+
+EXTERN_API( OSStatus )
+GetWindowProxyFSSpec (WindowRef window,
+ FSSpec * outFile);
+
+EXTERN_API( OSStatus )
+SetWindowProxyAlias (WindowRef window,
+ AliasHandle alias);
+
+EXTERN_API( OSStatus )
+GetWindowProxyAlias (WindowRef window,
+ AliasHandle * alias);
+
+EXTERN_API( OSStatus )
+SetWindowProxyCreatorAndType (WindowRef window,
+ OSType fileCreator,
+ OSType fileType,
+ SInt16 vRefNum);
+
+EXTERN_API( OSStatus )
+GetWindowProxyIcon (WindowRef window,
+ IconRef * outIcon);
+
+EXTERN_API( OSStatus )
+SetWindowProxyIcon (WindowRef window,
+ IconRef icon);
+
+EXTERN_API( OSStatus )
+RemoveWindowProxy (WindowRef window);
+
+EXTERN_API( OSStatus )
+BeginWindowProxyDrag (WindowRef window,
+ DragReference * outNewDrag,
+ RgnHandle outDragOutlineRgn);
+
+EXTERN_API( OSStatus )
+EndWindowProxyDrag (WindowRef window,
+ DragReference theDrag);
+
+EXTERN_API( OSStatus )
+TrackWindowProxyFromExistingDrag (WindowRef window,
+ Point startPt,
+ DragReference drag,
+ RgnHandle inDragOutlineRgn);
+
+EXTERN_API( OSStatus )
+TrackWindowProxyDrag (WindowRef window,
+ Point startPt);
+
+EXTERN_API( Boolean )
+IsWindowModified (WindowRef window);
+
+EXTERN_API( OSStatus )
+SetWindowModified (WindowRef window,
+ Boolean modified);
+
+EXTERN_API( Boolean )
+IsWindowPathSelectClick (WindowRef window,
+ const EventRecord * event);
+
+EXTERN_API( OSStatus )
+WindowPathSelect (WindowRef window,
+ MenuHandle menu, /* can be NULL */
+ SInt32 * outMenuResult);
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o HiliteWindowFrameForDrag */
+/* */
+/* If you call ShowDragHilite and HideDragHilite, you don't need to use this routine. */
+/* If you implement custom drag hiliting, you should call HiliteWindowFrameForDrag */
+/* when the drag is tracking inside a window with drag-hilited content. */
+/*--------------------------------------------------------------------------------------*/
+/* Routines available from Mac OS 8.5 forward*/
+
+EXTERN_API( OSStatus )
+HiliteWindowFrameForDrag (WindowRef window,
+ Boolean hilited) TWOWORDINLINE(0x7019, 0xA829);
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Window Transitions */
+/* */
+/* TransitionWindow displays a window with accompanying animation and sound. */
+/*--------------------------------------------------------------------------------------*/
+/* Routines available from Mac OS 8.5 forward*/
+
+
+typedef UInt32 WindowTransitionEffect;
+enum {
+ kWindowZoomTransitionEffect = 1 /* Finder-like zoom rectangles, use with Show or Open transition actions*/
+};
+
+
+typedef UInt32 WindowTransitionAction;
+enum {
+ kWindowShowTransitionAction = 1, /* param is rect in global coordinates from which to start the animation*/
+ kWindowHideTransitionAction = 2 /* param is rect in global coordinates at which to end the animation*/
+};
+
+EXTERN_API( OSStatus )
+TransitionWindow (WindowRef window,
+ WindowTransitionEffect effect,
+ WindowTransitionAction action,
+ const Rect * rect) /* can be NULL */;
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Window Positioning */
+/*--------------------------------------------------------------------------------------*/
+
+#if TARGET_OS_MAC
+ #define MacMoveWindow MoveWindow
+#endif
+EXTERN_API( void )
+MacMoveWindow (WindowRef window,
+ short hGlobal,
+ short vGlobal,
+ Boolean front) ONEWORDINLINE(0xA91B);
+
+EXTERN_API( void )
+SizeWindow (WindowRef window,
+ short w,
+ short h,
+ Boolean fUpdate) ONEWORDINLINE(0xA91D);
+
+
+/* Note: bBox can only be NULL on Carbon or OS X systems */
+EXTERN_API( long )
+GrowWindow (WindowRef window,
+ Point startPt,
+ const Rect * bBox) /* can be NULL */ ONEWORDINLINE(0xA92B);
+
+/* Note: boundsRect can only be NULL on Carbon or OS X systems */
+EXTERN_API( void )
+DragWindow (WindowRef window,
+ Point startPt,
+ const Rect * boundsRect) /* can be NULL */ ONEWORDINLINE(0xA925);
+
+EXTERN_API( void )
+ZoomWindow (WindowRef window,
+ WindowPartCode partCode,
+ Boolean front) ONEWORDINLINE(0xA83A);
+
+/* Routines available from Mac OS 8.0 (Appearance 1.0) forward*/
+
+EXTERN_API( Boolean )
+IsWindowCollapsable (WindowRef window) THREEWORDINLINE(0x303C, 0x000F, 0xAA74);
+
+EXTERN_API( Boolean )
+IsWindowCollapsed (WindowRef window) THREEWORDINLINE(0x303C, 0x0010, 0xAA74);
+
+EXTERN_API( OSStatus )
+CollapseWindow (WindowRef window,
+ Boolean collapse) THREEWORDINLINE(0x303C, 0x0011, 0xAA74);
+
+EXTERN_API( OSStatus )
+CollapseAllWindows (Boolean collapse) THREEWORDINLINE(0x303C, 0x0012, 0xAA74);
+
+/*
+ Routines available from Mac OS 8.5 forward
+ or from Mac OS 8.1 forward when linking to CarbonLib
+*/
+
+EXTERN_API( OSStatus )
+GetWindowBounds (WindowRef window,
+ WindowRegionCode regionCode,
+ Rect * globalBounds);
+
+/* Note: newContentRect can only be NULL on Carbon or OS X systems */
+EXTERN_API( Boolean )
+ResizeWindow (WindowRef window,
+ Point startPoint,
+ const Rect * sizeConstraints, /* can be NULL */
+ Rect * newContentRect) /* can be NULL */;
+
+/* Routines available from Mac OS 8.5 forward*/
+
+EXTERN_API( OSStatus )
+SetWindowBounds (WindowRef window,
+ WindowRegionCode regionCode,
+ const Rect * globalBounds);
+
+EXTERN_API( OSStatus )
+RepositionWindow (WindowRef window,
+ WindowRef parentWindow,
+ WindowPositionMethod method);
+
+
+EXTERN_API( OSStatus )
+MoveWindowStructure (WindowRef window,
+ short hGlobal,
+ short vGlobal);
+
+EXTERN_API( Boolean )
+IsWindowInStandardState (WindowRef window,
+ Point * idealSize,
+ Rect * idealStandardState);
+
+EXTERN_API( OSStatus )
+ZoomWindowIdeal (WindowRef window,
+ SInt16 partCode,
+ Point * ioIdealSize);
+
+EXTERN_API( OSStatus )
+GetWindowIdealUserState (WindowRef window,
+ Rect * userState);
+
+EXTERN_API( OSStatus )
+SetWindowIdealUserState (WindowRef window,
+ Rect * userState);
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Window Visibility */
+/*--------------------------------------------------------------------------------------*/
+
+EXTERN_API( void )
+HideWindow (WindowRef window) ONEWORDINLINE(0xA916);
+
+#if TARGET_OS_MAC
+ #define MacShowWindow ShowWindow
+#endif
+EXTERN_API( void )
+MacShowWindow (WindowRef window) ONEWORDINLINE(0xA915);
+
+EXTERN_API( void )
+ShowHide (WindowRef window,
+ Boolean showFlag) ONEWORDINLINE(0xA908);
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Window Properties */
+/*--------------------------------------------------------------------------------------*/
+/*
+ Routines available from Mac OS 8.5 forward
+ or from Mac OS 8.1 forward when linking to CarbonLib
+*/
+
+EXTERN_API( OSStatus )
+GetWindowProperty (WindowRef window,
+ PropertyCreator propertyCreator,
+ PropertyTag propertyTag,
+ UInt32 bufferSize,
+ UInt32 * actualSize, /* can be NULL */
+ void * propertyBuffer);
+
+EXTERN_API( OSStatus )
+GetWindowPropertySize (WindowRef window,
+ PropertyCreator creator,
+ PropertyTag tag,
+ UInt32 * size);
+
+EXTERN_API( OSStatus )
+SetWindowProperty (WindowRef window,
+ PropertyCreator propertyCreator,
+ PropertyTag propertyTag,
+ UInt32 propertySize,
+ void * propertyBuffer);
+
+EXTERN_API( OSStatus )
+RemoveWindowProperty (WindowRef window,
+ PropertyCreator propertyCreator,
+ PropertyTag propertyTag);
+
+
+/* Routines available from Mac OS 8.1 forward when linking to CarbonLib*/
+
+enum {
+ kWindowPropertyPersistent = 0x00000001 /* whether this property gets saved when flattening the window */
+};
+
+EXTERN_API( OSStatus )
+GetWindowPropertyAttributes (WindowRef window,
+ OSType propertyCreator,
+ OSType propertyTag,
+ UInt32 * attributes);
+
+EXTERN_API( OSStatus )
+ChangeWindowPropertyAttributes (WindowRef window,
+ OSType propertyCreator,
+ OSType propertyTag,
+ UInt32 attributesToSet,
+ UInt32 attributesToClear);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Utilities */
+/*--------------------------------------------------------------------------------------*/
+EXTERN_API( long )
+PinRect (const Rect * theRect,
+ Point thePt) ONEWORDINLINE(0xA94E);
+
+
+EXTERN_API( RgnHandle )
+GetGrayRgn (void) TWOWORDINLINE(0x2EB8, 0x09EE);
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Window Part Tracking */
+/*--------------------------------------------------------------------------------------*/
+EXTERN_API( Boolean )
+TrackBox (WindowRef window,
+ Point thePt,
+ WindowPartCode partCode) ONEWORDINLINE(0xA83B);
+
+EXTERN_API( Boolean )
+TrackGoAway (WindowRef window,
+ Point thePt) ONEWORDINLINE(0xA91E);
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Region Dragging */
+/*--------------------------------------------------------------------------------------*/
+EXTERN_API( long )
+DragGrayRgn (RgnHandle theRgn,
+ Point startPt,
+ const Rect * limitRect,
+ const Rect * slopRect,
+ short axis,
+ DragGrayRgnUPP actionProc) ONEWORDINLINE(0xA905);
+
+EXTERN_API( long )
+DragTheRgn (RgnHandle theRgn,
+ Point startPt,
+ const Rect * limitRect,
+ const Rect * slopRect,
+ short axis,
+ DragGrayRgnUPP actionProc) ONEWORDINLINE(0xA926);
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o GetAuxWin */
+/* */
+/* GetAuxWin is not available in Carbon */
+/*--------------------------------------------------------------------------------------*/
+#if !OPAQUE_TOOLBOX_STRUCTS
+#if CALL_NOT_IN_CARBON
+EXTERN_API( Boolean )
+GetAuxWin (WindowRef window,
+ AuxWinHandle * awHndl) ONEWORDINLINE(0xAA42);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* !OPAQUE_TOOLBOX_STRUCTS */
+
+/*--------------------------------------------------------------------------------------*/
+/* o C Glue */
+/*--------------------------------------------------------------------------------------*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( void )
+setwtitle (WindowRef window,
+ const char * title);
+
+EXTERN_API_C( Boolean )
+trackgoaway (WindowRef window,
+ Point * thePt);
+
+EXTERN_API_C( short )
+findwindow (Point * thePoint,
+ WindowRef * window);
+
+EXTERN_API_C( void )
+getwtitle (WindowRef window,
+ char * title);
+
+EXTERN_API_C( long )
+growwindow (WindowRef window,
+ Point * startPt,
+ const Rect * bBox);
+
+EXTERN_API_C( WindowRef )
+newwindow (void * wStorage,
+ const Rect * boundsRect,
+ const char * title,
+ Boolean visible,
+ short theProc,
+ WindowRef behind,
+ Boolean goAwayFlag,
+ long refCon);
+
+EXTERN_API_C( WindowRef )
+newcwindow (void * wStorage,
+ const Rect * boundsRect,
+ const char * title,
+ Boolean visible,
+ short procID,
+ WindowRef behind,
+ Boolean goAwayFlag,
+ long refCon);
+
+EXTERN_API_C( long )
+pinrect (const Rect * theRect,
+ Point * thePt);
+
+EXTERN_API_C( Boolean )
+trackbox (WindowRef window,
+ Point * thePt,
+ short partCode);
+
+EXTERN_API_C( long )
+draggrayrgn (RgnHandle theRgn,
+ Point * startPt,
+ const Rect * boundsRect,
+ const Rect * slopRect,
+ short axis,
+ DragGrayRgnUPP actionProc);
+
+EXTERN_API_C( void )
+dragwindow (WindowRef window,
+ Point * startPt,
+ const Rect * boundsRect);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+/*--------------------------------------------------------------------------------------*/
+/* o WindowRecord Accessors */
+/*--------------------------------------------------------------------------------------*/
+/*
+ CHAPTER XVI - the Opacity Wars
+
+ A long, long time ago, in a metaverse far, far away...
+
+ On an ancient gravestone by the side of the road is a hastily-scrawled
+ epitaph, written in an archaic dialect. With the help of your robot guide,
+ you translate it:
+
+ "Shared data structures are difficult/impossible to coordinate in a preemptively
+ multitasking OS. To allow Apple to provide a fully reentrant toolbox in
+ the future, while still maintaining a reasonable migration path for existing
+ codebases and developer knowledge, the decision has been made to make all
+ toolbox objects opaque."
+
+ You hear a vague rumbling sound in the distance. Your guide suggests backing
+ away, but you ignore it, wishing to admire the ornamentation on the gravestone.
+
+ Not the best decision. The grave ERUPTS, a dusty maelstrom filling your
+ senses, fragment of dirt and bone flying through the air. You are thrown
+ violently to the ground, shocked but conscious.
+
+ The dust clears quickly, revealing a wizened man sitting on the gravestone.
+ He wears a robe and speaks in deep, passionate tones:
+
+ "N.B. If you attempt to access fields of the WindowRecord, ControlRecord,
+ DialogRecord, or MenuInfo directly in Mac OS X, you _will_ crash. To avoid
+ this unpleasant situation, please use the accessor macros which correspond to
+ the routines within the ACCESSOR_CALLS_ARE_FUNCTIONS conditional."
+
+ Yes, this is another change in direction. But you're sort 'o used to that
+ by now. And this time, there is no turning back.
+*/
+#if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
+#ifdef __cplusplus
+inline CGrafPtr GetWindowPort(WindowRef w) { return (CGrafPtr) w; }
+inline void SetPortWindowPort(WindowRef w) { MacSetPort( (GrafPtr) GetWindowPort(w)); }
+inline SInt16 GetWindowKind(WindowRef w) { return ( *(SInt16 *) (((UInt8 *) w) + sizeof(GrafPort))); }
+inline void SetWindowKind(WindowRef w, SInt16 wKind) { *(SInt16 *) (((UInt8 *) w) + sizeof(GrafPort)) = wKind; }
+#if TARGET_OS_MAC
+inline Boolean IsWindowVisible(WindowRef w) { return *(Boolean *) (((UInt8 *) w) + sizeof(GrafPort) + 0x2); }
+#endif
+inline Boolean MacIsWindowVisible(WindowRef w) { return *(Boolean *) (((UInt8 *) w) + sizeof(GrafPort) + 0x2); }
+inline Boolean IsWindowHilited(WindowRef w) { return *(Boolean *) (((UInt8 *) w) + sizeof(GrafPort) + 0x3); }
+inline Boolean GetWindowGoAwayFlag(WindowRef w) { return *(Boolean *) (((UInt8 *) w) + sizeof(GrafPort) + 0x4); }
+inline Boolean GetWindowZoomFlag(WindowRef w) { return *(Boolean *) (((UInt8 *) w) + sizeof(GrafPort) + 0x5); }
+inline void GetWindowStructureRgn(WindowRef w, RgnHandle r) { MacCopyRgn( *(RgnHandle *)(((UInt8 *) w) + sizeof(GrafPort) + 0x6), r ); }
+inline void GetWindowContentRgn(WindowRef w, RgnHandle r) { MacCopyRgn( *(RgnHandle *)(((UInt8 *) w) + sizeof(GrafPort) + 0xA), r ); }
+inline void GetWindowUpdateRgn(WindowRef w, RgnHandle r) { MacCopyRgn( *(RgnHandle *)(((UInt8 *) w) + sizeof(GrafPort) + 0xE), r ); }
+inline SInt16 GetWindowTitleWidth(WindowRef w) { return *(SInt16 *)(((UInt8 *) w) + sizeof(GrafPort) + 0x1E); }
+#if TARGET_OS_MAC
+inline WindowRef GetNextWindow(WindowRef w) { return *(WindowRef *) (((UInt8 *) w) + sizeof(GrafPort) + 0x24); }
+#endif
+inline WindowRef MacGetNextWindow(WindowRef w) { return *(WindowRef *) (((UInt8 *) w) + sizeof(GrafPort) + 0x24); }
+
+inline void GetWindowStandardState(WindowRef w, Rect *r)
+{ Rect *stateRects = ( (Rect *) (**(Handle *) (((UInt8 *) w) + sizeof(GrafPort) + 0x16)));
+if (stateRects != NULL) *r = stateRects[1]; }
+inline void SetWindowStandardState(WindowRef w, const Rect *r)
+{ Rect *stateRects = ( (Rect *) (**(Handle *) (((UInt8 *) w) + sizeof(GrafPort) + 0x16)));
+ if (stateRects != NULL) stateRects[1] = *r; }
+inline void GetWindowUserState(WindowRef w, Rect *r)
+{ Rect *stateRects = ( (Rect *) (**(Handle *) (((UInt8 *) w) + sizeof(GrafPort) + 0x16)));
+ if (stateRects != NULL) *r = stateRects[0]; }
+inline void SetWindowUserState(WindowRef w, const Rect *r)
+{ Rect *stateRects = ( (Rect *) (**(Handle *) (((UInt8 *) w) + sizeof(GrafPort) + 0x16)));
+ if (stateRects != NULL) stateRects[0] = *r; }
+inline Handle GetWindowDataHandle(WindowRef w) { return (((WindowPeek) (w))->dataHandle); }
+inline void SetWindowDataHandle(WindowRef w, Handle data) { (((WindowPeek) (w))->dataHandle) = ((Handle) (data)); }
+#else
+#if TARGET_OS_MAC
+#define IsWindowVisible MacIsWindowVisible
+#define GetNextWindow MacGetNextWindow
+#endif
+#define ShowHideWindow(w) ShowHide(w)
+#define SetPortWindowPort(w) MacSetPort( (GrafPtr) GetWindowPort(w) )
+#define GetWindowPort(w) ( (CGrafPtr) w)
+#define GetWindowKind(w) ( *(SInt16 *) (((UInt8 *) w) + sizeof(GrafPort)))
+#define SetWindowKind(w, wKind) ( *(SInt16 *) (((UInt8 *) w) + sizeof(GrafPort)) = wKind )
+#define MacIsWindowVisible(w) ( *(Boolean *) (((UInt8 *) w) + sizeof(GrafPort) + 0x2))
+#define IsWindowHilited(w) ( *(Boolean *) (((UInt8 *) w) + sizeof(GrafPort) + 0x3))
+#define GetWindowGoAwayFlag(w) ( *(Boolean *) (((UInt8 *) w) + sizeof(GrafPort) + 0x4))
+#define GetWindowZoomFlag(w) ( *(Boolean *) (((UInt8 *) w) + sizeof(GrafPort) + 0x5))
+#define GetWindowStructureRgn(w, aRgnHandle) MacCopyRgn( *(RgnHandle *)(((UInt8 *) w) + sizeof(GrafPort) + 0x6), aRgnHandle )
+#define GetWindowContentRgn(w, aRgnHandle) MacCopyRgn( *(RgnHandle *)(((UInt8 *) w) + sizeof(GrafPort) + 0xA), aRgnHandle )
+
+#define GetWindowUpdateRgn(w, aRgnHandle) MacCopyRgn( *(RgnHandle *)(((UInt8 *) w) + sizeof(GrafPort) + 0xE), aRgnHandle )
+
+#define GetWindowTitleWidth(w) ( *(SInt16 *) (((UInt8 *) w) + sizeof(GrafPort) + 0x1E))
+#define MacGetNextWindow(w) ( *(WindowRef *) (((UInt8 *) w) + sizeof(GrafPort) + 0x24))
+
+#define GetWindowStandardState(w, aRectPtr) do { Rect *stateRects = ( (Rect *) (**(Handle *) (((UInt8 *) w) + sizeof(GrafPort) + 0x16))); \
+ if (stateRects != NULL) *aRectPtr = stateRects[1]; } while (false)
+#define SetWindowStandardState(w, aRectPtr) do { Rect *stateRects = ( (Rect *) (**(Handle *) (((UInt8 *) w) + sizeof(GrafPort) + 0x16))); \
+ if (stateRects != NULL) stateRects[1] = *aRectPtr; } while (false)
+#define GetWindowUserState(w, aRectPtr) do { Rect *stateRects = ( (Rect *) (**(Handle *) (((UInt8 *) w) + sizeof(GrafPort) + 0x16))); \
+ if (stateRects != NULL) *aRectPtr = stateRects[0]; } while (false)
+#define SetWindowUserState(w, aRectPtr) do { Rect *stateRects = ( (Rect *) (**(Handle *) (((UInt8 *) w) + sizeof(GrafPort) + 0x16))); \
+ if (stateRects != NULL) stateRects[0] = *aRectPtr; } while (false)
+#define GetWindowDataHandle(windowRef) (((WindowPeek) (windowRef))->dataHandle)
+#define SetWindowDataHandle(windowRef, data) (((WindowPeek) (windowRef))->dataHandle) = ((Handle) (data))
+
+#endif /* defined(__cplusplus) */
+
+#endif /* !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS */
+
+#if ACCESSOR_CALLS_ARE_FUNCTIONS
+/* */
+/* Direct modification of the close box and zoom box "flags" is not supported in Carbon. */
+/* */
+/* GetWindowGoAwayFlag */
+/* GetWindowSpareFlag */
+/* SetWindowGoAwayFlag */
+/* SetWindowSpareFlag */
+/* */
+/* Use GetWindowAttributes and ChangeWindowAttributes if you must dynamically */
+/* access the zoom box and close box attributes. */
+/* */
+/* Still available as transitional API in PreCarbon.o, since GetWindowAttributes is not implemented there. */
+EXTERN_API( Boolean )
+GetWindowGoAwayFlag (WindowRef window);
+
+EXTERN_API( Boolean )
+GetWindowSpareFlag (WindowRef window);
+
+/* Getters */
+EXTERN_API( WindowRef )
+GetWindowList (void);
+
+EXTERN_API( CGrafPtr )
+GetWindowPort (WindowRef window);
+
+EXTERN_API( short )
+GetWindowKind (WindowRef window);
+
+#if TARGET_OS_MAC
+ #define MacIsWindowVisible IsWindowVisible
+#endif
+EXTERN_API( Boolean )
+MacIsWindowVisible (WindowRef window);
+
+EXTERN_API( Boolean )
+IsWindowHilited (WindowRef window);
+
+EXTERN_API( Boolean )
+IsWindowUpdatePending (WindowRef window);
+
+#if TARGET_OS_MAC
+ #define MacGetNextWindow GetNextWindow
+#endif
+EXTERN_API( WindowRef )
+MacGetNextWindow (WindowRef window);
+
+EXTERN_API( Rect *)
+GetWindowStandardState (WindowRef window,
+ Rect * rect);
+
+EXTERN_API( Rect *)
+GetWindowUserState (WindowRef window,
+ Rect * rect);
+
+/* Setters */
+EXTERN_API( void )
+SetWindowKind (WindowRef window,
+ short kind);
+
+EXTERN_API( void )
+SetWindowStandardState (WindowRef window,
+ const Rect * rect);
+
+EXTERN_API( void )
+SetWindowUserState (WindowRef window,
+ const Rect * rect);
+
+/* Utilities */
+/* set the current QuickDraw port to the port associated with the window */
+EXTERN_API( void )
+SetPortWindowPort (WindowRef window);
+
+EXTERN_API( Rect *)
+GetWindowPortBounds (WindowRef window,
+ Rect * bounds);
+
+/* GetWindowFromPort is needed to 'cast up' to a WindowRef from a GrafPort */
+EXTERN_API( WindowRef )
+GetWindowFromPort (CGrafPtr port);
+
+/* To prevent upward dependencies, GetDialogFromWindow() is defined in the Dialogs interface: */
+/* pascal DialogPtr GetDialogFromWindow(WindowRef window); */
+#endif /* ACCESSOR_CALLS_ARE_FUNCTIONS */
+
+
+
+
+
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MACWINDOWS__ */
+
diff --git a/include/qt/MachineExceptions.h b/include/qt/MachineExceptions.h
new file mode 100644
index 000000000..b7a3f9329
--- /dev/null
+++ b/include/qt/MachineExceptions.h
@@ -0,0 +1,285 @@
+/*
+ File: MachineExceptions.h
+
+ Contains: Processor Exception Handling Interfaces.
+
+ Version: Technology: Mac OS 8
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1993-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __MACHINEEXCEPTIONS__
+#define __MACHINEEXCEPTIONS__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* Some basic declarations used throughout the kernel */
+typedef struct OpaqueAreaID* AreaID;
+#if TARGET_OS_MAC
+/* Machine Dependent types for PowerPC: */
+
+struct MachineInformationPowerPC {
+ UnsignedWide CTR;
+ UnsignedWide LR;
+ UnsignedWide PC;
+ unsigned long CR;
+ unsigned long XER;
+ unsigned long MSR;
+ unsigned long MQ;
+ unsigned long ExceptKind;
+ unsigned long DSISR;
+ UnsignedWide DAR;
+ UnsignedWide Reserved;
+};
+typedef struct MachineInformationPowerPC MachineInformationPowerPC;
+
+struct RegisterInformationPowerPC {
+ UnsignedWide R0;
+ UnsignedWide R1;
+ UnsignedWide R2;
+ UnsignedWide R3;
+ UnsignedWide R4;
+ UnsignedWide R5;
+ UnsignedWide R6;
+ UnsignedWide R7;
+ UnsignedWide R8;
+ UnsignedWide R9;
+ UnsignedWide R10;
+ UnsignedWide R11;
+ UnsignedWide R12;
+ UnsignedWide R13;
+ UnsignedWide R14;
+ UnsignedWide R15;
+ UnsignedWide R16;
+ UnsignedWide R17;
+ UnsignedWide R18;
+ UnsignedWide R19;
+ UnsignedWide R20;
+ UnsignedWide R21;
+ UnsignedWide R22;
+ UnsignedWide R23;
+ UnsignedWide R24;
+ UnsignedWide R25;
+ UnsignedWide R26;
+ UnsignedWide R27;
+ UnsignedWide R28;
+ UnsignedWide R29;
+ UnsignedWide R30;
+ UnsignedWide R31;
+};
+typedef struct RegisterInformationPowerPC RegisterInformationPowerPC;
+
+struct FPUInformationPowerPC {
+ UnsignedWide Registers[32];
+ unsigned long FPSCR;
+ unsigned long Reserved;
+};
+typedef struct FPUInformationPowerPC FPUInformationPowerPC;
+
+union Vector128 {
+#ifdef __VEC__
+ vector unsigned long v;
+#endif
+ unsigned long l[4];
+ unsigned short s[8];
+ unsigned char c[16];
+};
+typedef union Vector128 Vector128;
+
+struct VectorInformationPowerPC {
+ Vector128 Registers[32];
+ Vector128 VSCR;
+ UInt32 VRsave;
+};
+typedef struct VectorInformationPowerPC VectorInformationPowerPC;
+/* Exception related declarations */
+enum {
+ kWriteReference = 0,
+ kReadReference = 1,
+ kFetchReference = 2,
+ writeReference = kWriteReference, /* Obsolete name*/
+ readReference = kReadReference, /* Obsolete name*/
+ fetchReference = kFetchReference /* Obsolete name*/
+};
+
+
+typedef unsigned long MemoryReferenceKind;
+
+struct MemoryExceptionInformation {
+ AreaID theArea;
+ LogicalAddress theAddress;
+ OSStatus theError;
+ MemoryReferenceKind theReference;
+};
+typedef struct MemoryExceptionInformation MemoryExceptionInformation;
+enum {
+ kUnknownException = 0,
+ kIllegalInstructionException = 1,
+ kTrapException = 2,
+ kAccessException = 3,
+ kUnmappedMemoryException = 4,
+ kExcludedMemoryException = 5,
+ kReadOnlyMemoryException = 6,
+ kUnresolvablePageFaultException = 7,
+ kPrivilegeViolationException = 8,
+ kTraceException = 9,
+ kInstructionBreakpointException = 10,
+ kDataBreakpointException = 11,
+ kIntegerException = 12,
+ kFloatingPointException = 13,
+ kStackOverflowException = 14,
+ kTaskTerminationException = 15,
+ kTaskCreationException = 16,
+ kDataAlignmentException = 17
+};
+
+#if OLDROUTINENAMES
+enum {
+ unknownException = kUnknownException, /* Obsolete name*/
+ illegalInstructionException = kIllegalInstructionException, /* Obsolete name*/
+ trapException = kTrapException, /* Obsolete name*/
+ accessException = kAccessException, /* Obsolete name*/
+ unmappedMemoryException = kUnmappedMemoryException, /* Obsolete name*/
+ excludedMemoryException = kExcludedMemoryException, /* Obsolete name*/
+ readOnlyMemoryException = kReadOnlyMemoryException, /* Obsolete name*/
+ unresolvablePageFaultException = kUnresolvablePageFaultException, /* Obsolete name*/
+ privilegeViolationException = kPrivilegeViolationException, /* Obsolete name*/
+ traceException = kTraceException, /* Obsolete name*/
+ instructionBreakpointException = kInstructionBreakpointException, /* Obsolete name*/
+ dataBreakpointException = kDataBreakpointException, /* Obsolete name*/
+ integerException = kIntegerException, /* Obsolete name*/
+ floatingPointException = kFloatingPointException, /* Obsolete name*/
+ stackOverflowException = kStackOverflowException, /* Obsolete name*/
+ terminationException = kTaskTerminationException, /* Obsolete name*/
+ kTerminationException = kTaskTerminationException /* Obsolete name*/
+};
+
+#endif /* OLDROUTINENAMES */
+
+
+typedef unsigned long ExceptionKind;
+
+union ExceptionInfo {
+ MemoryExceptionInformation * memoryInfo;
+};
+typedef union ExceptionInfo ExceptionInfo;
+
+struct ExceptionInformationPowerPC {
+ ExceptionKind theKind;
+ MachineInformationPowerPC * machineState;
+ RegisterInformationPowerPC * registerImage;
+ FPUInformationPowerPC * FPUImage;
+ ExceptionInfo info;
+ VectorInformationPowerPC * vectorImage;
+};
+typedef struct ExceptionInformationPowerPC ExceptionInformationPowerPC;
+#if TARGET_CPU_PPC || TARGET_CPU_68K
+
+typedef ExceptionInformationPowerPC ExceptionInformation;
+typedef MachineInformationPowerPC MachineInformation;
+typedef RegisterInformationPowerPC RegisterInformation;
+typedef FPUInformationPowerPC FPUInformation;
+typedef VectorInformationPowerPC VectorInformation;
+#endif /* TARGET_CPU_PPC || TARGET_CPU_68K */
+
+/*
+ Note: An ExceptionHandler is NOT a UniversalProcPtr, except in Carbon.
+ It must be a PowerPC function pointer with NO routine descriptor,
+ except on Carbon, where it must be a UniversalProcPtr (TPP actually)
+ to allow the interface to work from both CFM and Mach-O.
+*/
+typedef CALLBACK_API_C( OSStatus , ExceptionHandlerProcPtr )(ExceptionInformation *theException);
+typedef TVECTOR_UPP_TYPE(ExceptionHandlerProcPtr) ExceptionHandlerUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(ExceptionHandlerUPP)
+ NewExceptionHandlerUPP (ExceptionHandlerProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeExceptionHandlerUPP (ExceptionHandlerUPP userUPP);
+
+ EXTERN_API(OSStatus)
+ InvokeExceptionHandlerUPP (ExceptionInformation * theException,
+ ExceptionHandlerUPP userUPP);
+
+#else
+ #define NewExceptionHandlerUPP(userRoutine) (userRoutine)
+ #define DisposeExceptionHandlerUPP(userUPP)
+ #define InvokeExceptionHandlerUPP(theException, userUPP) (*userUPP)(theException)
+#endif
+/*
+ ExceptionHandler function pointers (TPP):
+ on classic PowerPC, use raw function pointers
+ on classic PowerPC with OPAQUE_UPP_TYPES=1, use UPP's
+ on Carbon, use UPP's
+*/
+#if TARGET_OS_MAC && !OPAQUE_UPP_TYPES
+/* use raw function pointers*/
+typedef ExceptionHandlerProcPtr ExceptionHandlerTPP;
+#else
+/* use UPP's*/
+typedef ExceptionHandlerUPP ExceptionHandlerTPP;
+#endif /* TARGET_OS_MAC && !OPAQUE_UPP_TYPES */
+
+typedef ExceptionHandlerTPP ExceptionHandler;
+/* Routine for installing per-process exception handlers */
+EXTERN_API( ExceptionHandlerTPP ) InstallExceptionHandler(ExceptionHandlerTPP theHandler);
+
+#endif /* TARGET_OS_MAC */
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MACHINEEXCEPTIONS__ */
+
diff --git a/include/qt/Math64.h b/include/qt/Math64.h
new file mode 100644
index 000000000..06cf99471
--- /dev/null
+++ b/include/qt/Math64.h
@@ -0,0 +1,429 @@
+/*
+ File: Math64.h
+
+ Contains: 64-bit integer math Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __MATH64__
+#define __MATH64__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+
+/*--------------------------------------------------------------------------------
+ These routines are intended to provide C software support for
+ 64 bit integer types. Their behavior should mimic anticipated
+ 64 bit hardware. This implementation should replace use of the
+ "wide" type found in PowerPC.
+
+ The following routines are available for performing math on 64-bit integers:
+
+ S64Max
+ Returns the largest representable SInt64.
+ S64Min
+ Returns the smallest (i.e. most negative) SInt64. Note: the negative
+ (absolute value) of this number is not representable in an SInt64.
+ That means that S64Negate(S64Min) is not representable (in fact,
+ it returns S64Min).
+ S64Add
+ Adds two integers, producing an integer result. If an overflow
+ occurs the result is congruent mod (2^64) as if the operands and
+ result were unsigned. No overflow is signaled.
+
+ S64Subtract
+ Subtracts two integers, producing an integer result. If an overflow
+ occurs the result is congruent mod (2^64) as if the operands and
+ result were unsigned. No overflow is signaled.
+
+ S64Negate
+ Returns the additive inverse of a signed number (i.e. it returns
+ 0 - the number). S64Negate (S64Min) is not representable (in fact,
+ it returns S64Min).
+
+ S64Absolute
+ Returns the absolute value of the number (i.e. the number if
+ it is positive, or 0 - the number if it is negative).
+ See S64Negate above.
+
+ S64Multiply
+ Multiplies two signed numbers, producing a signed result. Overflow
+ is ignored and the low-order part of the product is returned. The
+ sign of the result is not guaranteed to be correct if the magnitude
+ of the product is not representable.
+
+ S64Div
+ Divides dividend by divisor, returning the quotient.
+
+ S64Mod
+ Returns the remainder of divide of dividend by divisor. The sign of
+ the remainder is the same as the sign of the dividend (i.e., it takes
+ the absolute values of the operands, does the division, then fixes
+ the sign of the quotient and remainder).
+
+ S64Divide
+ Divides dividend by divisor, returning the quotient. The remainder
+ is returned in *remainder if remainder (the pointer) is non-NULL.
+ The sign of the remainder is the same as the sign of the dividend
+ (i.e. it takes the absolute values of the operands, does the division,
+ then fixes the sign of the quotient and remainder). If the divisor
+ is zero, then S64Max() will be returned (or S64Min() if the dividend
+ is negative), and the remainder will be the dividend; no error is
+ reported.
+
+ S64Set
+ Given an SInt32, returns an SInt64 with the same value. Use this
+ routine instead of coding 64-bit constants (at least when the
+ constant will fit in an SInt32).
+
+ S64SetU
+ Given a UInt32, returns a SInt64 with the same value.
+
+ S64Set
+ Given an SInt64, returns an SInt32 by discarding the high-order
+ 32 bits.
+
+ S64Compare
+ Given two signed numbers, left and right, returns an
+ SInt32 that compares with zero the same way left compares with
+ right. If you wanted to perform a comparison on 64-bit integers
+ of the form:
+ operand_1 <operation> operand_2
+ then you could use an expression of the form:
+ xxxS64Compare(operand_1,operand_2) <operation> 0
+ to test for the same condition.
+
+ CAUTION: DO NOT depend on the exact value returned by this routine.
+ Only the sign (i.e. positive, zero, or negative) of the result is
+ guaranteed.
+
+ S64And, S64Or, S64Eor and S64Not
+
+ Return Boolean (1 or 0) depending on the outcome of the logical
+ operation.
+
+ S64BitwiseAnd, S64BitwiseOr, S64BitwiseEor and S64BitwiseNot
+
+ Return the Bitwise result.
+
+ S64ShiftRight and S64ShiftLeft
+
+ The lower 7 bits of the shift argument determines the amount of
+ shifting. S64ShiftRight is an arithmetic shift while U64ShiftRight
+ is a logical shift.
+
+ SInt64ToLongDouble
+
+ Converts SInt64 to long double. Note all SInt64s fit exactly into
+ long doubles, thus, the binary -> decimal conversion routines
+ in fp.h can be used to achieve SInt64 -> long double -> decimal
+ conversions.
+
+ LongDoubleToSInt64
+
+ Converts a long double to a SInt64. Any decimal string that fits
+ into a SInt64 can be converted exactly into a long double, using the
+ conversion routines found in fp.h. Then this routine can be used
+ to complete the conversion to SInt64.
+
+ SInt64ToWide
+
+ Converts a SInt64 to a wide struct. If SInt64 is implemented
+ as a typedef of wide, the marco does nothing. If SInt64 is
+ implememnted as a long long, it casts the long long into a
+ wide struct.
+
+ WideToSInt64
+
+ Converts a wide struct into a SInt64. If SInt64 is implemented
+ as a typedef of wide, the marco does nothing. If SInt64 is
+ implememnted as a long long, it reads the struct into a long long.
+
+
+ The corresponding UInt64 routines are also included.
+
+--------------------------------------------------------------------------------*/
+
+#if TYPE_LONGLONG
+
+#ifdef __MRC__
+ #define S64Max() 9223372036854775807LL
+#else
+ #define S64Max() 9223372036854775807
+#endif
+#define S64Min() (-S64Max() - 1)
+#define S64Add(x, y) ((SInt64) (x) + (SInt64) (y))
+#define S64Subtract(x, y) ((SInt64) (x) - (SInt64) (y))
+#define S64Negate(x) (-(SInt64) (x))
+#define S64Absolute(x) absll((SInt64) (x))
+#define S64Multiply(x, y) ((SInt64) (x) * (SInt64) (y))
+#define S64Div(x, y) ((SInt64) (x) / (SInt64) (y))
+#define S64Mod(x, y) ((SInt64) (x) % (SInt64) (y))
+#define S64Set(x) ((SInt64) (x))
+#define S64SetU(x) ((SInt64) (x))
+#define S32Set(x) ((SInt32) (x))
+
+#define S64And(x, y) ((Boolean)((SInt64) (x) && (SInt64) (y)))
+#define S64Or(x, y) ((Boolean)((SInt64) (x) || (SInt64) (y)))
+#define S64Eor(x, y) ((Boolean)((SInt64) (x) ^ (SInt64) (y)))
+#define S64Not(x) ((Boolean)(!(SInt64) (x)))
+#define S64BitwiseAnd(x, y) ((SInt64) (x) & (SInt64) (y))
+#define S64BitwiseOr(x, y) ((SInt64) (x) | (SInt64) (y))
+#define S64BitwiseEor(x, y) (((SInt64) (x) & (~(SInt64) (y))) | ((~(SInt64) (x)) & (SInt64) (y)))
+#define S64BitwiseNot(x) (~(SInt64) (x))
+#define S64ShiftRight(x, y) ((SInt64) (x) >> (UInt32) (y))
+#define S64ShiftLeft(x, y) ((SInt64) (x) << (UInt32) (y))
+#define SInt64ToLongDouble(x) ((long double)(x))
+#define LongDoubleToSInt64(x) ((SInt64)(x))
+
+
+#ifdef __MRC__
+ #define U64Max() 0xffffffffffffffffULL
+#else
+ #define U64Max() 0xffffffffffffffff
+#endif
+#define U64Add(x, y) ((UInt64) (x) + (UInt64) (y))
+#define U64Subtract(x, y) ((UInt64) (x) - (UInt64) (y))
+#define U64Multiply(x, y) ((UInt64) (x) * (UInt64) (y))
+#define U64Div(x, y) ((UInt64) (x) / (UInt64) (y))
+#define U64Mod(x, y) ((UInt64) (x) % (UInt64) (y))
+#define U64Set(x) ((UInt64) (x))
+#define U64SetU(x) ((UInt64) (x))
+#define U32SetU(x) ((UInt32) (x))
+
+#define U64And(x, y) ((Boolean)((UInt64) (x) && (UInt64) (y)))
+#define U64Or(x, y) ((Boolean)((UInt64) (x) || (UInt64) (y)))
+#define U64Eor(x, y) ((Boolean)((UInt64) (x) ^ (UInt64) (y)))
+#define U64Not(x) ((Boolean)(!(UInt64) (x)))
+#define U64BitwiseAnd(x, y) ((UInt64) (x) & (UInt64) (y))
+#define U64BitwiseOr(x, y) ((UInt64) (x) | (UInt64) (y))
+#define U64BitwiseEor(x, y) (((UInt64) (x) & (~(UInt64) (y))) | ((~(UInt64) (x)) & (UInt64) (y)))
+#define U64BitwiseNot(x) (~(UInt64) (x))
+#define U64ShiftRight(x, y) ((UInt64) (x) >> (UInt32) (y))
+#define U64ShiftLeft(x, y) ((UInt64) (x) << (UInt32) (y))
+#define UInt64ToLongDouble(x) ((long double)(x))
+#define LongDoubleToUInt64(x) ((UInt64)(x))
+#define UInt64ToSInt64(x) ((SInt64)(x))
+#define SInt64ToUInt64(x) ((UInt64)(x))
+
+#else
+EXTERN_API_C( SInt64 ) S64Max(void );
+
+EXTERN_API_C( SInt64 ) S64Min(void );
+
+EXTERN_API_C( SInt64 ) S64Add(SInt64 x, SInt64 y);
+
+EXTERN_API_C( SInt64 ) S64Subtract(SInt64 left, SInt64 right);
+
+EXTERN_API_C( SInt64 ) S64Negate(SInt64 value);
+
+EXTERN_API_C( SInt64 ) S64Absolute(SInt64 value);
+
+EXTERN_API_C( SInt64 ) S64Multiply(SInt64 xparam, SInt64 yparam);
+
+#define S64Div(dividend, divisor) S64Divide(dividend, divisor, NULL)
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( SInt64 ) S64Mod(SInt64 dividend, SInt64 divisor);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API_C( SInt64 ) S64Divide(SInt64 dividend, SInt64 divisor, SInt64 *remainder);
+
+EXTERN_API_C( SInt64 ) S64Set(SInt32 value);
+
+EXTERN_API_C( SInt64 ) S64SetU(UInt32 value);
+
+EXTERN_API_C( SInt32 ) S32Set(SInt64 value);
+
+EXTERN_API_C( Boolean ) S64And(SInt64 left, SInt64 right);
+
+EXTERN_API_C( Boolean ) S64Or(SInt64 left, SInt64 right);
+
+EXTERN_API_C( Boolean ) S64Eor(SInt64 left, SInt64 right);
+
+EXTERN_API_C( Boolean ) S64Not(SInt64 value);
+
+EXTERN_API_C( SInt64 ) S64BitwiseAnd(SInt64 left, SInt64 right);
+
+EXTERN_API_C( SInt64 ) S64BitwiseOr(SInt64 left, SInt64 right);
+
+EXTERN_API_C( SInt64 ) S64BitwiseEor(SInt64 left, SInt64 right);
+
+EXTERN_API_C( SInt64 ) S64BitwiseNot(SInt64 value);
+
+EXTERN_API_C( SInt64 ) S64ShiftRight(SInt64 value, UInt32 shift);
+
+EXTERN_API_C( SInt64 ) S64ShiftLeft(SInt64 value, UInt32 shift);
+
+#if !TARGET_RT_MAC_MACHO
+/*
+ "long double" means 128 bit type on PowerPC and 80-bit type on 68K
+*/
+EXTERN_API_C( long double ) SInt64ToLongDouble(SInt64 value);
+
+EXTERN_API_C( SInt64 ) LongDoubleToSInt64(long double value);
+
+#else
+
+#define SInt64ToLongDouble(x) ((long double)(x))
+#define LongDoubleToSInt64(x) ((SInt64)(x))
+
+#endif /* !TARGET_RT_MAC_MACHO */
+
+EXTERN_API_C( UInt64 ) U64Max(void );
+
+EXTERN_API_C( UInt64 ) U64Add(UInt64 x, UInt64 y);
+
+EXTERN_API_C( UInt64 ) U64Subtract(UInt64 left, UInt64 right);
+
+EXTERN_API_C( UInt64 ) U64Multiply(UInt64 xparam, UInt64 yparam);
+
+#define U64Div(dividend, divisor) U64Divide(dividend, divisor, NULL)
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( UInt64 ) U64Mod(UInt64 dividend, UInt64 divisor);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API_C( UInt64 ) U64Divide(UInt64 dividend, UInt64 divisor, UInt64 *remainder);
+
+EXTERN_API_C( UInt64 ) U64Set(SInt32 value);
+
+EXTERN_API_C( UInt64 ) U64SetU(UInt32 value);
+
+EXTERN_API_C( UInt32 ) U32SetU(UInt64 value);
+
+EXTERN_API_C( Boolean ) U64And(UInt64 left, UInt64 right);
+
+EXTERN_API_C( Boolean ) U64Or(UInt64 left, UInt64 right);
+
+EXTERN_API_C( Boolean ) U64Eor(UInt64 left, UInt64 right);
+
+EXTERN_API_C( Boolean ) U64Not(UInt64 value);
+
+EXTERN_API_C( UInt64 ) U64BitwiseAnd(UInt64 left, UInt64 right);
+
+EXTERN_API_C( UInt64 ) U64BitwiseOr(UInt64 left, UInt64 right);
+
+EXTERN_API_C( UInt64 ) U64BitwiseEor(UInt64 left, UInt64 right);
+
+EXTERN_API_C( UInt64 ) U64BitwiseNot(UInt64 value);
+
+EXTERN_API_C( UInt64 ) U64ShiftRight(UInt64 value, UInt32 shift);
+
+EXTERN_API_C( UInt64 ) U64ShiftLeft(UInt64 value, UInt32 shift);
+
+#if !TARGET_RT_MAC_MACHO
+/*
+ "long double" means 128 bit type on PowerPC and 80-bit type on 68K
+*/
+EXTERN_API_C( long double ) UInt64ToLongDouble(UInt64 value);
+
+EXTERN_API_C( UInt64 ) LongDoubleToUInt64(long double value);
+
+#else
+
+#define UInt64ToLongDouble(x) ((long double)(x))
+#define LongDoubleToUInt64(x) ((UInt64)(x))
+
+#endif /* !TARGET_RT_MAC_MACHO */
+
+EXTERN_API_C( SInt64 ) UInt64ToSInt64(UInt64 value);
+
+EXTERN_API_C( UInt64 ) SInt64ToUInt64(SInt64 value);
+
+#endif /* TYPE_LONGLONG */
+
+EXTERN_API_C( SInt32 ) S64Compare(SInt64 left, SInt64 right);
+
+EXTERN_API_C( SInt32 ) U64Compare(UInt64 left, UInt64 right);
+
+
+// sam says you want these to be dispatched routines
+#if TARGET_OS_WIN32 && TYPE_LONGLONG
+#define S64Compare(left,right) ((int)(left - right))
+#define U64Compare(left,right) ((int)(left - right))
+#endif
+
+
+/*
+ Functions to convert between [Unsigned]Wide and [S|U]Int64 types.
+
+ These functions are necessary if source code which uses both
+ wide and SInt64 is to compile under a compiler that supports
+ long long.
+*/
+#if TYPE_LONGLONG
+ #define SInt64ToWide(x) (*((wide*)(&x)))
+ #define WideToSInt64(x) (*((SInt64*)(&x)))
+ #define UInt64ToUnsignedWide(x) (*((UnsignedWide*)(&x)))
+ #define UnsignedWideToUInt64(x) (*((UInt64*)(&x)))
+#else
+ #define SInt64ToWide(x) (x)
+ #define WideToSInt64(x) (x)
+ #define UInt64ToUnsignedWide(x) (x)
+ #define UnsignedWideToUInt64(x) (x)
+#endif
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MATH64__ */
+
diff --git a/include/qt/MediaHandlers.h b/include/qt/MediaHandlers.h
new file mode 100644
index 000000000..ac6727f60
--- /dev/null
+++ b/include/qt/MediaHandlers.h
@@ -0,0 +1,846 @@
+/*
+ File: MediaHandlers.h
+
+ Contains: QuickTime Interfaces.
+
+ Version: Technology: QuickTime 6.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1990-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __MEDIAHANDLERS__
+#define __MEDIAHANDLERS__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __COMPONENTS__
+#include "Components.h"
+#endif
+
+#ifndef __MOVIES__
+#include "Movies.h"
+#endif
+
+#ifndef __SOUND__
+#include "Sound.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+typedef CALLBACK_API( void , PrePrerollCompleteProcPtr )(MediaHandler mh, OSErr err, void *refcon);
+typedef STACK_UPP_TYPE(PrePrerollCompleteProcPtr) PrePrerollCompleteUPP;
+enum {
+ handlerHasSpatial = 1 << 0,
+ handlerCanClip = 1 << 1,
+ handlerCanMatte = 1 << 2,
+ handlerCanTransferMode = 1 << 3,
+ handlerNeedsBuffer = 1 << 4,
+ handlerNoIdle = 1 << 5,
+ handlerNoScheduler = 1 << 6,
+ handlerWantsTime = 1 << 7,
+ handlerCGrafPortOnly = 1 << 8,
+ handlerCanSend = 1 << 9,
+ handlerCanHandleComplexMatrix = 1 << 10,
+ handlerWantsDestinationPixels = 1 << 11,
+ handlerCanSendImageData = 1 << 12,
+ handlerCanPicSave = 1 << 13
+};
+
+/* media task flags */
+enum {
+ mMustDraw = 1 << 3,
+ mAtEnd = 1 << 4,
+ mPreflightDraw = 1 << 5,
+ mSyncDrawing = 1 << 6,
+ mPrecompositeOnly = 1 << 9,
+ mSoundOnly = 1 << 10,
+ mDoIdleActionsBeforeDraws = 1 << 11,
+ mDisableIdleActions = 1 << 12
+};
+
+/* media task result flags */
+enum {
+ mDidDraw = 1 << 0,
+ mNeedsToDraw = 1 << 2,
+ mDrawAgain = 1 << 3,
+ mPartialDraw = 1 << 4,
+ mWantIdleActions = 1 << 5
+};
+
+enum {
+ forceUpdateRedraw = 1 << 0,
+ forceUpdateNewBuffer = 1 << 1
+};
+
+/* media hit test flags */
+enum {
+ mHitTestBounds = 1L << 0, /* point must only be within targetRefCon's bounding box */
+ mHitTestImage = 1L << 1, /* point must be within the shape of the targetRefCon's image */
+ mHitTestInvisible = 1L << 2, /* invisible targetRefCon's may be hit tested */
+ mHitTestIsClick = 1L << 3 /* for codecs that want mouse events */
+};
+
+/* media is opaque flags */
+enum {
+ mOpaque = 1L << 0,
+ mInvisible = 1L << 1
+};
+
+/* MediaSetPublicInfo/MediaGetPublicInfo selectors */
+enum {
+ kMediaQTIdleFrequencySelector = FOUR_CHAR_CODE('idfq')
+};
+
+
+struct GetMovieCompleteParams {
+ short version;
+ Movie theMovie;
+ Track theTrack;
+ Media theMedia;
+ TimeScale movieScale;
+ TimeScale mediaScale;
+ TimeValue movieDuration;
+ TimeValue trackDuration;
+ TimeValue mediaDuration;
+ Fixed effectiveRate;
+ TimeBase timeBase;
+ short volume;
+ Fixed width;
+ Fixed height;
+ MatrixRecord trackMovieMatrix;
+ CGrafPtr moviePort;
+ GDHandle movieGD;
+ PixMapHandle trackMatte;
+ QTAtomContainer inputMap;
+ QTMediaContextID mediaContextID;
+};
+typedef struct GetMovieCompleteParams GetMovieCompleteParams;
+enum {
+ kMediaVideoParamBrightness = 1,
+ kMediaVideoParamContrast = 2,
+ kMediaVideoParamHue = 3,
+ kMediaVideoParamSharpness = 4,
+ kMediaVideoParamSaturation = 5,
+ kMediaVideoParamBlackLevel = 6,
+ kMediaVideoParamWhiteLevel = 7
+};
+
+/* These are for MediaGetInfo() and MediaSetInfo().*/
+enum {
+ kMHInfoEncodedFrameRate = FOUR_CHAR_CODE('orat') /* Parameter is a MHInfoEncodedFrameRateRecord*.*/
+};
+
+/* This holds the frame rate at which the track was encoded.*/
+
+struct MHInfoEncodedFrameRateRecord {
+ Fixed encodedFrameRate;
+};
+typedef struct MHInfoEncodedFrameRateRecord MHInfoEncodedFrameRateRecord;
+
+typedef Handle * dataHandlePtr;
+typedef dataHandlePtr * dataHandleHandle;
+
+
+struct QTCustomActionTargetRecord {
+ Movie movie;
+ DoMCActionUPP doMCActionCallbackProc;
+ long callBackRefcon;
+ Track track;
+ long trackObjectRefCon;
+ Track defaultTrack;
+ long defaultObjectRefCon;
+ long reserved1;
+ long reserved2;
+};
+typedef struct QTCustomActionTargetRecord QTCustomActionTargetRecord;
+
+typedef QTCustomActionTargetRecord * QTCustomActionTargetPtr;
+
+struct MediaEQSpectrumBandsRecord {
+ short count;
+ UnsignedFixedPtr frequency; /* pointer to array of frequencies*/
+};
+typedef struct MediaEQSpectrumBandsRecord MediaEQSpectrumBandsRecord;
+typedef MediaEQSpectrumBandsRecord * MediaEQSpectrumBandsRecordPtr;
+EXTERN_API( ComponentResult )
+CallComponentExecuteWiredAction (ComponentInstance ci,
+ QTAtomContainer actionContainer,
+ QTAtom actionAtom,
+ QTCustomActionTargetPtr target,
+ QTEventRecordPtr event) FIVEWORDINLINE(0x2F3C, 0x0010, 0xFFF7, 0x7000, 0xA82A);
+
+
+/* MediaCallRange2 */
+/* These are unique to each type of media handler */
+/* They are also included in the public interfaces */
+
+
+/* Flags for MediaSetChunkManagementFlags*/
+enum {
+ kEmptyPurgableChunksOverAllowance = 1
+};
+
+EXTERN_API( ComponentResult )
+MediaSetChunkManagementFlags (MediaHandler mh,
+ UInt32 flags,
+ UInt32 flagsMask) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0415, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaGetChunkManagementFlags (MediaHandler mh,
+ UInt32 * flags) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0416, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaSetPurgeableChunkMemoryAllowance (MediaHandler mh,
+ Size allowance) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0417, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaGetPurgeableChunkMemoryAllowance (MediaHandler mh,
+ Size * allowance) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0418, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaEmptyAllPurgeableChunks (MediaHandler mh) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0419, 0x7000, 0xA82A);
+
+/***** These are the calls for dealing with the Generic media handler *****/
+EXTERN_API( ComponentResult )
+MediaInitialize (MediaHandler mh,
+ GetMovieCompleteParams * gmc) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0501, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaSetHandlerCapabilities (MediaHandler mh,
+ long flags,
+ long flagsMask) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0502, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaIdle (MediaHandler mh,
+ TimeValue atMediaTime,
+ long flagsIn,
+ long * flagsOut,
+ const TimeRecord * movieTime) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0503, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaGetMediaInfo (MediaHandler mh,
+ Handle h) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0504, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaPutMediaInfo (MediaHandler mh,
+ Handle h) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0505, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaSetActive (MediaHandler mh,
+ Boolean enableMedia) FIVEWORDINLINE(0x2F3C, 0x0002, 0x0506, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaSetRate (MediaHandler mh,
+ Fixed rate) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0507, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaGGetStatus (MediaHandler mh,
+ ComponentResult * statusErr) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0508, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaTrackEdited (MediaHandler mh) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0509, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaSetMediaTimeScale (MediaHandler mh,
+ TimeScale newTimeScale) FIVEWORDINLINE(0x2F3C, 0x0004, 0x050A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaSetMovieTimeScale (MediaHandler mh,
+ TimeScale newTimeScale) FIVEWORDINLINE(0x2F3C, 0x0004, 0x050B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaSetGWorld (MediaHandler mh,
+ CGrafPtr aPort,
+ GDHandle aGD) FIVEWORDINLINE(0x2F3C, 0x0008, 0x050C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaSetDimensions (MediaHandler mh,
+ Fixed width,
+ Fixed height) FIVEWORDINLINE(0x2F3C, 0x0008, 0x050D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaSetClip (MediaHandler mh,
+ RgnHandle theClip) FIVEWORDINLINE(0x2F3C, 0x0004, 0x050E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaSetMatrix (MediaHandler mh,
+ MatrixRecord * trackMovieMatrix) FIVEWORDINLINE(0x2F3C, 0x0004, 0x050F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaGetTrackOpaque (MediaHandler mh,
+ Boolean * trackIsOpaque) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0510, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaSetGraphicsMode (MediaHandler mh,
+ long mode,
+ const RGBColor * opColor) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0511, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaGetGraphicsMode (MediaHandler mh,
+ long * mode,
+ RGBColor * opColor) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0512, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaGSetVolume (MediaHandler mh,
+ short volume) FIVEWORDINLINE(0x2F3C, 0x0002, 0x0513, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaSetSoundBalance (MediaHandler mh,
+ short balance) FIVEWORDINLINE(0x2F3C, 0x0002, 0x0514, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaGetSoundBalance (MediaHandler mh,
+ short * balance) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0515, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaGetNextBoundsChange (MediaHandler mh,
+ TimeValue * when) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0516, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaGetSrcRgn (MediaHandler mh,
+ RgnHandle rgn,
+ TimeValue atMediaTime) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0517, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaPreroll (MediaHandler mh,
+ TimeValue time,
+ Fixed rate) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0518, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaSampleDescriptionChanged (MediaHandler mh,
+ long index) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0519, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaHasCharacteristic (MediaHandler mh,
+ OSType characteristic,
+ Boolean * hasIt) FIVEWORDINLINE(0x2F3C, 0x0008, 0x051A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaGetOffscreenBufferSize (MediaHandler mh,
+ Rect * bounds,
+ short depth,
+ CTabHandle ctab) FIVEWORDINLINE(0x2F3C, 0x000A, 0x051B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaSetHints (MediaHandler mh,
+ long hints) FIVEWORDINLINE(0x2F3C, 0x0004, 0x051C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaGetName (MediaHandler mh,
+ Str255 name,
+ long requestedLanguage,
+ long * actualLanguage) FIVEWORDINLINE(0x2F3C, 0x000C, 0x051D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaForceUpdate (MediaHandler mh,
+ long forceUpdateFlags) FIVEWORDINLINE(0x2F3C, 0x0004, 0x051E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaGetDrawingRgn (MediaHandler mh,
+ RgnHandle * partialRgn) FIVEWORDINLINE(0x2F3C, 0x0004, 0x051F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaGSetActiveSegment (MediaHandler mh,
+ TimeValue activeStart,
+ TimeValue activeDuration) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0520, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaInvalidateRegion (MediaHandler mh,
+ RgnHandle invalRgn) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0521, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaGetNextStepTime (MediaHandler mh,
+ short flags,
+ TimeValue mediaTimeIn,
+ TimeValue * mediaTimeOut,
+ Fixed rate) FIVEWORDINLINE(0x2F3C, 0x000E, 0x0522, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaSetNonPrimarySourceData (MediaHandler mh,
+ long inputIndex,
+ long dataDescriptionSeed,
+ Handle dataDescription,
+ void * data,
+ long dataSize,
+ ICMCompletionProcRecordPtr asyncCompletionProc,
+ ICMConvertDataFormatUPP transferProc,
+ void * refCon) FIVEWORDINLINE(0x2F3C, 0x0020, 0x0523, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaChangedNonPrimarySource (MediaHandler mh,
+ long inputIndex) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0524, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaTrackReferencesChanged (MediaHandler mh) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0525, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaGetSampleDataPointer (MediaHandler mh,
+ long sampleNum,
+ Ptr * dataPtr,
+ long * dataSize,
+ long * sampleDescIndex) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0526, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaReleaseSampleDataPointer (MediaHandler mh,
+ long sampleNum) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0527, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaTrackPropertyAtomChanged (MediaHandler mh) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0528, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaSetTrackInputMapReference (MediaHandler mh,
+ QTAtomContainer inputMap) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0529, 0x7000, 0xA82A);
+
+
+EXTERN_API( ComponentResult )
+MediaSetVideoParam (MediaHandler mh,
+ long whichParam,
+ unsigned short * value) FIVEWORDINLINE(0x2F3C, 0x0008, 0x052B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaGetVideoParam (MediaHandler mh,
+ long whichParam,
+ unsigned short * value) FIVEWORDINLINE(0x2F3C, 0x0008, 0x052C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaCompare (MediaHandler mh,
+ Boolean * isOK,
+ Media srcMedia,
+ ComponentInstance srcMediaComponent) FIVEWORDINLINE(0x2F3C, 0x000C, 0x052D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaGetClock (MediaHandler mh,
+ ComponentInstance * clock) FIVEWORDINLINE(0x2F3C, 0x0004, 0x052E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaSetSoundOutputComponent (MediaHandler mh,
+ Component outputComponent) FIVEWORDINLINE(0x2F3C, 0x0004, 0x052F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaGetSoundOutputComponent (MediaHandler mh,
+ Component * outputComponent) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0530, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaSetSoundLocalizationData (MediaHandler mh,
+ Handle data) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0531, 0x7000, 0xA82A);
+
+
+
+
+EXTERN_API( ComponentResult )
+MediaGetInvalidRegion (MediaHandler mh,
+ RgnHandle rgn) FIVEWORDINLINE(0x2F3C, 0x0004, 0x053C, 0x7000, 0xA82A);
+
+
+EXTERN_API( ComponentResult )
+MediaSampleDescriptionB2N (MediaHandler mh,
+ SampleDescriptionHandle sampleDescriptionH) FIVEWORDINLINE(0x2F3C, 0x0004, 0x053E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaSampleDescriptionN2B (MediaHandler mh,
+ SampleDescriptionHandle sampleDescriptionH) FIVEWORDINLINE(0x2F3C, 0x0004, 0x053F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaQueueNonPrimarySourceData (MediaHandler mh,
+ long inputIndex,
+ long dataDescriptionSeed,
+ Handle dataDescription,
+ void * data,
+ long dataSize,
+ ICMCompletionProcRecordPtr asyncCompletionProc,
+ const ICMFrameTimeRecord * frameTime,
+ ICMConvertDataFormatUPP transferProc,
+ void * refCon) FIVEWORDINLINE(0x2F3C, 0x0024, 0x0540, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaFlushNonPrimarySourceData (MediaHandler mh,
+ long inputIndex) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0541, 0x7000, 0xA82A);
+
+
+EXTERN_API( ComponentResult )
+MediaGetURLLink (MediaHandler mh,
+ Point displayWhere,
+ Handle * urlLink) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0543, 0x7000, 0xA82A);
+
+
+EXTERN_API( ComponentResult )
+MediaMakeMediaTimeTable (MediaHandler mh,
+ long ** offsets,
+ TimeValue startTime,
+ TimeValue endTime,
+ TimeValue timeIncrement,
+ short firstDataRefIndex,
+ short lastDataRefIndex,
+ long * retDataRefSkew) FIVEWORDINLINE(0x2F3C, 0x0018, 0x0545, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaHitTestForTargetRefCon (MediaHandler mh,
+ long flags,
+ Point loc,
+ long * targetRefCon) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0546, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaHitTestTargetRefCon (MediaHandler mh,
+ long targetRefCon,
+ long flags,
+ Point loc,
+ Boolean * wasHit) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0547, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaGetActionsForQTEvent (MediaHandler mh,
+ QTEventRecordPtr event,
+ long targetRefCon,
+ QTAtomContainer * container,
+ QTAtom * atom) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0548, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaDisposeTargetRefCon (MediaHandler mh,
+ long targetRefCon) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0549, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaTargetRefConsEqual (MediaHandler mh,
+ long firstRefCon,
+ long secondRefCon,
+ Boolean * equal) FIVEWORDINLINE(0x2F3C, 0x000C, 0x054A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaSetActionsCallback (MediaHandler mh,
+ ActionsUPP actionsCallbackProc,
+ void * refcon) FIVEWORDINLINE(0x2F3C, 0x0008, 0x054B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaPrePrerollBegin (MediaHandler mh,
+ TimeValue time,
+ Fixed rate,
+ PrePrerollCompleteUPP completeProc,
+ void * refcon) FIVEWORDINLINE(0x2F3C, 0x0010, 0x054C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaPrePrerollCancel (MediaHandler mh,
+ void * refcon) FIVEWORDINLINE(0x2F3C, 0x0004, 0x054D, 0x7000, 0xA82A);
+
+
+EXTERN_API( ComponentResult )
+MediaEnterEmptyEdit (MediaHandler mh) FIVEWORDINLINE(0x2F3C, 0x0000, 0x054F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaCurrentMediaQueuedData (MediaHandler mh,
+ long * milliSecs) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0550, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaGetEffectiveVolume (MediaHandler mh,
+ short * volume) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0551, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaResolveTargetRefCon (MediaHandler mh,
+ QTAtomContainer container,
+ QTAtom atom,
+ long * targetRefCon) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0552, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaGetSoundLevelMeteringEnabled (MediaHandler mh,
+ Boolean * enabled) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0553, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaSetSoundLevelMeteringEnabled (MediaHandler mh,
+ Boolean enable) FIVEWORDINLINE(0x2F3C, 0x0002, 0x0554, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaGetSoundLevelMeterInfo (MediaHandler mh,
+ LevelMeterInfoPtr levelInfo) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0555, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaGetEffectiveSoundBalance (MediaHandler mh,
+ short * balance) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0556, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaSetScreenLock (MediaHandler mh,
+ Boolean lockIt) FIVEWORDINLINE(0x2F3C, 0x0002, 0x0557, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaSetDoMCActionCallback (MediaHandler mh,
+ DoMCActionUPP doMCActionCallbackProc,
+ void * refcon) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0558, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaGetErrorString (MediaHandler mh,
+ ComponentResult theError,
+ Str255 errorString) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0559, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaGetSoundEqualizerBands (MediaHandler mh,
+ MediaEQSpectrumBandsRecordPtr spectrumInfo) FIVEWORDINLINE(0x2F3C, 0x0004, 0x055A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaSetSoundEqualizerBands (MediaHandler mh,
+ MediaEQSpectrumBandsRecordPtr spectrumInfo) FIVEWORDINLINE(0x2F3C, 0x0004, 0x055B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaGetSoundEqualizerBandLevels (MediaHandler mh,
+ UInt8 * bandLevels) FIVEWORDINLINE(0x2F3C, 0x0004, 0x055C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaDoIdleActions (MediaHandler mh) FIVEWORDINLINE(0x2F3C, 0x0000, 0x055D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaSetSoundBassAndTreble (MediaHandler mh,
+ short bass,
+ short treble) FIVEWORDINLINE(0x2F3C, 0x0004, 0x055E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaGetSoundBassAndTreble (MediaHandler mh,
+ short * bass,
+ short * treble) FIVEWORDINLINE(0x2F3C, 0x0008, 0x055F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaTimeBaseChanged (MediaHandler mh) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0560, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaMCIsPlayerEvent (MediaHandler mh,
+ const EventRecord * e,
+ Boolean * handledIt) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0561, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaGetMediaLoadState (MediaHandler mh,
+ long * mediaLoadState) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0562, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaVideoOutputChanged (MediaHandler mh,
+ ComponentInstance vout) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0563, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaEmptySampleCache (MediaHandler mh,
+ long sampleNum,
+ long sampleCount) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0564, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaGetPublicInfo (MediaHandler mh,
+ OSType infoSelector,
+ void * infoDataPtr,
+ Size * ioDataSize) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0565, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaSetPublicInfo (MediaHandler mh,
+ OSType infoSelector,
+ void * infoDataPtr,
+ Size dataSize) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0566, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaGetUserPreferredCodecs (MediaHandler mh,
+ CodecComponentHandle * userPreferredCodecs) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0567, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaSetUserPreferredCodecs (MediaHandler mh,
+ CodecComponentHandle userPreferredCodecs) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0568, 0x7000, 0xA82A);
+
+/* Keyboard Focus Support*/
+
+EXTERN_API( ComponentResult )
+MediaRefConSetProperty (MediaHandler mh,
+ long refCon,
+ long propertyType,
+ void * propertyValue) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0569, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaRefConGetProperty (MediaHandler mh,
+ long refCon,
+ long propertyType,
+ void * propertyValue) FIVEWORDINLINE(0x2F3C, 0x000C, 0x056A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaNavigateTargetRefCon (MediaHandler mh,
+ long navigation,
+ long * refCon) FIVEWORDINLINE(0x2F3C, 0x0008, 0x056B, 0x7000, 0xA82A);
+
+
+EXTERN_API( ComponentResult )
+MediaGGetIdleManager (MediaHandler mh,
+ IdleManager * pim) FIVEWORDINLINE(0x2F3C, 0x0004, 0x056C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MediaGSetIdleManager (MediaHandler mh,
+ IdleManager im) FIVEWORDINLINE(0x2F3C, 0x0004, 0x056D, 0x7000, 0xA82A);
+
+
+
+
+
+/* selectors for component calls */
+enum {
+ kCallComponentExecuteWiredActionSelect = -9,
+ kMediaSetChunkManagementFlagsSelect = 0x0415,
+ kMediaGetChunkManagementFlagsSelect = 0x0416,
+ kMediaSetPurgeableChunkMemoryAllowanceSelect = 0x0417,
+ kMediaGetPurgeableChunkMemoryAllowanceSelect = 0x0418,
+ kMediaEmptyAllPurgeableChunksSelect = 0x0419,
+ kMediaInitializeSelect = 0x0501,
+ kMediaSetHandlerCapabilitiesSelect = 0x0502,
+ kMediaIdleSelect = 0x0503,
+ kMediaGetMediaInfoSelect = 0x0504,
+ kMediaPutMediaInfoSelect = 0x0505,
+ kMediaSetActiveSelect = 0x0506,
+ kMediaSetRateSelect = 0x0507,
+ kMediaGGetStatusSelect = 0x0508,
+ kMediaTrackEditedSelect = 0x0509,
+ kMediaSetMediaTimeScaleSelect = 0x050A,
+ kMediaSetMovieTimeScaleSelect = 0x050B,
+ kMediaSetGWorldSelect = 0x050C,
+ kMediaSetDimensionsSelect = 0x050D,
+ kMediaSetClipSelect = 0x050E,
+ kMediaSetMatrixSelect = 0x050F,
+ kMediaGetTrackOpaqueSelect = 0x0510,
+ kMediaSetGraphicsModeSelect = 0x0511,
+ kMediaGetGraphicsModeSelect = 0x0512,
+ kMediaGSetVolumeSelect = 0x0513,
+ kMediaSetSoundBalanceSelect = 0x0514,
+ kMediaGetSoundBalanceSelect = 0x0515,
+ kMediaGetNextBoundsChangeSelect = 0x0516,
+ kMediaGetSrcRgnSelect = 0x0517,
+ kMediaPrerollSelect = 0x0518,
+ kMediaSampleDescriptionChangedSelect = 0x0519,
+ kMediaHasCharacteristicSelect = 0x051A,
+ kMediaGetOffscreenBufferSizeSelect = 0x051B,
+ kMediaSetHintsSelect = 0x051C,
+ kMediaGetNameSelect = 0x051D,
+ kMediaForceUpdateSelect = 0x051E,
+ kMediaGetDrawingRgnSelect = 0x051F,
+ kMediaGSetActiveSegmentSelect = 0x0520,
+ kMediaInvalidateRegionSelect = 0x0521,
+ kMediaGetNextStepTimeSelect = 0x0522,
+ kMediaSetNonPrimarySourceDataSelect = 0x0523,
+ kMediaChangedNonPrimarySourceSelect = 0x0524,
+ kMediaTrackReferencesChangedSelect = 0x0525,
+ kMediaGetSampleDataPointerSelect = 0x0526,
+ kMediaReleaseSampleDataPointerSelect = 0x0527,
+ kMediaTrackPropertyAtomChangedSelect = 0x0528,
+ kMediaSetTrackInputMapReferenceSelect = 0x0529,
+ kMediaSetVideoParamSelect = 0x052B,
+ kMediaGetVideoParamSelect = 0x052C,
+ kMediaCompareSelect = 0x052D,
+ kMediaGetClockSelect = 0x052E,
+ kMediaSetSoundOutputComponentSelect = 0x052F,
+ kMediaGetSoundOutputComponentSelect = 0x0530,
+ kMediaSetSoundLocalizationDataSelect = 0x0531,
+ kMediaGetInvalidRegionSelect = 0x053C,
+ kMediaSampleDescriptionB2NSelect = 0x053E,
+ kMediaSampleDescriptionN2BSelect = 0x053F,
+ kMediaQueueNonPrimarySourceDataSelect = 0x0540,
+ kMediaFlushNonPrimarySourceDataSelect = 0x0541,
+ kMediaGetURLLinkSelect = 0x0543,
+ kMediaMakeMediaTimeTableSelect = 0x0545,
+ kMediaHitTestForTargetRefConSelect = 0x0546,
+ kMediaHitTestTargetRefConSelect = 0x0547,
+ kMediaGetActionsForQTEventSelect = 0x0548,
+ kMediaDisposeTargetRefConSelect = 0x0549,
+ kMediaTargetRefConsEqualSelect = 0x054A,
+ kMediaSetActionsCallbackSelect = 0x054B,
+ kMediaPrePrerollBeginSelect = 0x054C,
+ kMediaPrePrerollCancelSelect = 0x054D,
+ kMediaEnterEmptyEditSelect = 0x054F,
+ kMediaCurrentMediaQueuedDataSelect = 0x0550,
+ kMediaGetEffectiveVolumeSelect = 0x0551,
+ kMediaResolveTargetRefConSelect = 0x0552,
+ kMediaGetSoundLevelMeteringEnabledSelect = 0x0553,
+ kMediaSetSoundLevelMeteringEnabledSelect = 0x0554,
+ kMediaGetSoundLevelMeterInfoSelect = 0x0555,
+ kMediaGetEffectiveSoundBalanceSelect = 0x0556,
+ kMediaSetScreenLockSelect = 0x0557,
+ kMediaSetDoMCActionCallbackSelect = 0x0558,
+ kMediaGetErrorStringSelect = 0x0559,
+ kMediaGetSoundEqualizerBandsSelect = 0x055A,
+ kMediaSetSoundEqualizerBandsSelect = 0x055B,
+ kMediaGetSoundEqualizerBandLevelsSelect = 0x055C,
+ kMediaDoIdleActionsSelect = 0x055D,
+ kMediaSetSoundBassAndTrebleSelect = 0x055E,
+ kMediaGetSoundBassAndTrebleSelect = 0x055F,
+ kMediaTimeBaseChangedSelect = 0x0560,
+ kMediaMCIsPlayerEventSelect = 0x0561,
+ kMediaGetMediaLoadStateSelect = 0x0562,
+ kMediaVideoOutputChangedSelect = 0x0563,
+ kMediaEmptySampleCacheSelect = 0x0564,
+ kMediaGetPublicInfoSelect = 0x0565,
+ kMediaSetPublicInfoSelect = 0x0566,
+ kMediaGetUserPreferredCodecsSelect = 0x0567,
+ kMediaSetUserPreferredCodecsSelect = 0x0568,
+ kMediaRefConSetPropertySelect = 0x0569,
+ kMediaRefConGetPropertySelect = 0x056A,
+ kMediaNavigateTargetRefConSelect = 0x056B,
+ kMediaGGetIdleManagerSelect = 0x056C,
+ kMediaGSetIdleManagerSelect = 0x056D
+};
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(PrePrerollCompleteUPP)
+ NewPrePrerollCompleteUPP (PrePrerollCompleteProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposePrePrerollCompleteUPP (PrePrerollCompleteUPP userUPP);
+
+ EXTERN_API(void)
+ InvokePrePrerollCompleteUPP (MediaHandler mh,
+ OSErr err,
+ void * refcon,
+ PrePrerollCompleteUPP userUPP);
+
+#else
+ enum { uppPrePrerollCompleteProcInfo = 0x00000EC0 }; /* pascal no_return_value Func(4_bytes, 2_bytes, 4_bytes) */
+ #define NewPrePrerollCompleteUPP(userRoutine) (PrePrerollCompleteUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPrePrerollCompleteProcInfo, GetCurrentArchitecture())
+ #define DisposePrePrerollCompleteUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokePrePrerollCompleteUPP(mh, err, refcon, userUPP) CALL_THREE_PARAMETER_UPP((userUPP), uppPrePrerollCompleteProcInfo, (mh), (err), (refcon))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewPrePrerollCompleteProc(userRoutine) NewPrePrerollCompleteUPP(userRoutine)
+#define CallPrePrerollCompleteProc(userRoutine, mh, err, refcon) InvokePrePrerollCompleteUPP(mh, err, refcon, userRoutine)
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MEDIAHANDLERS__ */
+
diff --git a/include/qt/Menus.h b/include/qt/Menus.h
new file mode 100644
index 000000000..294a3431a
--- /dev/null
+++ b/include/qt/Menus.h
@@ -0,0 +1,1239 @@
+/*
+ File: Menus.h
+
+ Contains: Menu Manager Interfaces.
+
+ Version: Technology: Mac OS 9.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __MENUS__
+#define __MENUS__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __EVENTS__
+#include "Events.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#ifndef __FONTS__
+#include "Fonts.h"
+#endif
+
+#ifndef __TEXTCOMMON__
+#include "TextCommon.h"
+#endif
+
+#ifndef __PROCESSES__
+#include "Processes.h"
+#endif
+
+#ifndef __APPLEEVENTS__
+#include "AppleEvents.h"
+#endif
+
+#ifndef __COLLECTIONS__
+#include "Collections.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Menu Constants */
+/*--------------------------------------------------------------------------------------*/
+enum {
+ noMark = 0 /*mark symbol for MarkItem*/
+};
+
+enum {
+ /* menu defProc messages */
+ kMenuDrawMsg = 0,
+ kMenuSizeMsg = 2,
+ kMenuPopUpMsg = 3,
+ kMenuCalcItemMsg = 5,
+ kMenuThemeSavvyMsg = 7, /* is your MDEF theme-savvy? If so, return hex 7473 in the whichItem parameter*/
+ mDrawMsg = 0,
+ mSizeMsg = 2,
+ mPopUpMsg = 3, /* position the popup menu rect appropriately */
+ mCalcItemMsg = 5
+};
+
+#if CALL_NOT_IN_CARBON
+/*
+ Carbon MDEFs must replace mChooseMsg with the new messages kMenuFindItemMsg and kMenuHiliteItemMsg.
+ mDrawItemMsg was used by the popup menu control before 8.5, but is no longer used.
+*/
+enum {
+ mChooseMsg = 1,
+ mDrawItemMsg = 4,
+ kMenuChooseMsg = 1,
+ kMenuDrawItemMsg = 4
+};
+
+#endif /* CALL_NOT_IN_CARBON */
+
+enum {
+ kThemeSavvyMenuResponse = 0x7473
+};
+
+/* these MDEF messages are only supported in Carbon*/
+enum {
+ kMenuInitMsg = 8,
+ kMenuDisposeMsg = 9,
+ kMenuFindItemMsg = 10,
+ kMenuHiliteItemMsg = 11
+};
+
+enum {
+ textMenuProc = 0,
+ hMenuCmd = 27, /*itemCmd == 0x001B ==> hierarchical menu*/
+ hierMenu = -1, /*a hierarchical menu - for InsertMenu call*/
+ kInsertHierarchicalMenu = -1, /*a better name for hierMenu */
+ mctAllItems = -98, /*search for all Items for the given ID*/
+ mctLastIDIndic = -99 /*last color table entry has this in ID field*/
+};
+
+/* Constants for use with MacOS 8.0 (Appearance 1.0) and later*/
+enum {
+ kMenuStdMenuProc = 63,
+ kMenuStdMenuBarProc = 63
+};
+
+enum {
+ kMenuNoModifiers = 0, /* Mask for no modifiers*/
+ kMenuShiftModifier = (1 << 0), /* Mask for shift key modifier*/
+ kMenuOptionModifier = (1 << 1), /* Mask for option key modifier*/
+ kMenuControlModifier = (1 << 2), /* Mask for control key modifier*/
+ kMenuNoCommandModifier = (1 << 3) /* Mask for no command key modifier*/
+};
+
+enum {
+ kMenuNoIcon = 0, /* No icon*/
+ kMenuIconType = 1, /* Type for ICON*/
+ kMenuShrinkIconType = 2, /* Type for ICON plotted 16 x 16*/
+ kMenuSmallIconType = 3, /* Type for SICN*/
+ kMenuColorIconType = 4, /* Type for cicn*/
+ kMenuIconSuiteType = 5, /* Type for Icon Suite*/
+ kMenuIconRefType = 6 /* Type for Icon Ref*/
+};
+
+enum {
+ kMenuAttrExcludesMarkColumn = (1 << 0), /* No space is allocated for the mark character */
+ kMenuAttrAutoDisable = (1 << 2) /* Menu title is automatically disabled when all items are disabled */
+};
+
+typedef OptionBits MenuAttributes;
+enum {
+ kMenuItemAttrSubmenuParentChoosable = (1 << 2) /* Parent item of a submenu is still selectable by the user */
+};
+
+typedef OptionBits MenuItemAttributes;
+
+typedef UInt32 MenuTrackingMode;
+enum {
+ kMenuTrackingModeMouse = 1, /* Menus are being tracked using the mouse*/
+ kMenuTrackingModeKeyboard = 2 /* Menus are being tracked using the keyboard*/
+};
+
+/*--------------------------------------------------------------------------------------*/
+/* o Menu Types */
+/*--------------------------------------------------------------------------------------*/
+typedef SInt16 MenuID;
+typedef UInt16 MenuItemIndex;
+typedef UInt32 MenuCommand;
+#if !OPAQUE_TOOLBOX_STRUCTS
+
+struct MenuInfo {
+ MenuID menuID;
+ short menuWidth;
+ short menuHeight;
+ Handle menuProc;
+ long enableFlags;
+ Str255 menuData;
+};
+typedef struct MenuInfo MenuInfo;
+
+typedef MenuInfo * MenuPtr;
+typedef MenuPtr * MenuHandle;
+#else
+typedef struct OpaqueMenuHandle* MenuHandle;
+#endif /* !OPAQUE_TOOLBOX_STRUCTS */
+
+/* MenuRef and MenuHandle are equivalent. Use either. We don't care.*/
+typedef MenuHandle MenuRef;
+
+struct MCEntry {
+ MenuID mctID; /*menu ID. ID = 0 is the menu bar*/
+ short mctItem; /*menu Item. Item = 0 is a title*/
+ RGBColor mctRGB1; /*usage depends on ID and Item*/
+ RGBColor mctRGB2; /*usage depends on ID and Item*/
+ RGBColor mctRGB3; /*usage depends on ID and Item*/
+ RGBColor mctRGB4; /*usage depends on ID and Item*/
+ short mctReserved; /*reserved for internal use*/
+};
+typedef struct MCEntry MCEntry;
+typedef MCEntry * MCEntryPtr;
+
+typedef MCEntry MCTable[1];
+typedef MCEntry * MCTablePtr;
+typedef MCTablePtr * MCTableHandle;
+
+struct MenuCRsrc {
+ short numEntries; /*number of entries*/
+ MCTable mcEntryRecs; /*ARRAY [1..numEntries] of MCEntry*/
+};
+typedef struct MenuCRsrc MenuCRsrc;
+typedef MenuCRsrc * MenuCRsrcPtr;
+typedef MenuCRsrcPtr * MenuCRsrcHandle;
+#if TARGET_OS_WIN32
+/* QuickTime 3.0 */
+
+struct MenuAccessKeyRec {
+ short count;
+ long flags;
+ unsigned char keys[1];
+};
+typedef struct MenuAccessKeyRec MenuAccessKeyRec;
+
+typedef MenuAccessKeyRec * MenuAccessKeyPtr;
+typedef MenuAccessKeyPtr * MenuAccessKeyHandle;
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( void )
+SetMenuItemHotKey (MenuRef menu,
+ short itemID,
+ char hotKey,
+ long flags);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_OS_WIN32 */
+
+
+struct MenuTrackingData {
+ MenuRef menu;
+ MenuItemIndex itemSelected;
+ MenuItemIndex itemUnderMouse;
+ Rect itemRect;
+ SInt32 virtualMenuTop;
+ SInt32 virtualMenuBottom;
+};
+typedef struct MenuTrackingData MenuTrackingData;
+typedef MenuTrackingData * MenuTrackingDataPtr;
+
+struct HiliteMenuItemData {
+ MenuItemIndex previousItem;
+ MenuItemIndex newItem;
+};
+typedef struct HiliteMenuItemData HiliteMenuItemData;
+typedef HiliteMenuItemData * HiliteMenuItemDataPtr;
+/*--------------------------------------------------------------------------------------*/
+/* o Menu ProcPtrs */
+/* */
+/* All of these procs are considered deprecated. Developers interested in portability */
+/* to Carbon should avoid them entirely, if at all possible. */
+/*--------------------------------------------------------------------------------------*/
+typedef CALLBACK_API( void , MenuDefProcPtr )(short message, MenuRef theMenu, Rect *menuRect, Point hitPt, short *whichItem);
+typedef STACK_UPP_TYPE(MenuDefProcPtr) MenuDefUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(MenuDefUPP)
+ NewMenuDefUPP (MenuDefProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeMenuDefUPP (MenuDefUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeMenuDefUPP (short message,
+ MenuRef theMenu,
+ Rect * menuRect,
+ Point hitPt,
+ short * whichItem,
+ MenuDefUPP userUPP);
+
+#else
+ enum { uppMenuDefProcInfo = 0x0000FF80 }; /* pascal no_return_value Func(2_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewMenuDefUPP(userRoutine) (MenuDefUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMenuDefProcInfo, GetCurrentArchitecture())
+ #define DisposeMenuDefUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeMenuDefUPP(message, theMenu, menuRect, hitPt, whichItem, userUPP) CALL_FIVE_PARAMETER_UPP((userUPP), uppMenuDefProcInfo, (message), (theMenu), (menuRect), (hitPt), (whichItem))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewMenuDefProc(userRoutine) NewMenuDefUPP(userRoutine)
+#define CallMenuDefProc(userRoutine, message, theMenu, menuRect, hitPt, whichItem) InvokeMenuDefUPP(message, theMenu, menuRect, hitPt, whichItem, userRoutine)
+typedef CALLBACK_API( long , MenuBarDefProcPtr )(short selector, short message, short parameter1, long parameter2);
+typedef CALLBACK_API( void , MenuHookProcPtr )(void );
+typedef CALLBACK_API( short , MBarHookProcPtr )(Rect *menuRect);
+typedef STACK_UPP_TYPE(MenuBarDefProcPtr) MenuBarDefUPP;
+typedef STACK_UPP_TYPE(MenuHookProcPtr) MenuHookUPP;
+typedef STACK_UPP_TYPE(MBarHookProcPtr) MBarHookUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(MenuBarDefUPP)
+ NewMenuBarDefUPP (MenuBarDefProcPtr userRoutine);
+
+ EXTERN_API(MenuHookUPP)
+ NewMenuHookUPP (MenuHookProcPtr userRoutine);
+
+ EXTERN_API(MBarHookUPP)
+ NewMBarHookUPP (MBarHookProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeMenuBarDefUPP (MenuBarDefUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeMenuHookUPP (MenuHookUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeMBarHookUPP (MBarHookUPP userUPP);
+
+ EXTERN_API(long)
+ InvokeMenuBarDefUPP (short selector,
+ short message,
+ short parameter1,
+ long parameter2,
+ MenuBarDefUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeMenuHookUPP (MenuHookUPP userUPP);
+
+ EXTERN_API(short)
+ InvokeMBarHookUPP (Rect * menuRect,
+ MBarHookUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppMenuBarDefProcInfo = 0x00003AB0 }; /* pascal 4_bytes Func(2_bytes, 2_bytes, 2_bytes, 4_bytes) */
+ enum { uppMenuHookProcInfo = 0x00000000 }; /* pascal no_return_value Func() */
+ enum { uppMBarHookProcInfo = 0x000000CF }; /* SPECIAL_CASE_PROCINFO(12) */
+ #define NewMenuBarDefUPP(userRoutine) (MenuBarDefUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMenuBarDefProcInfo, GetCurrentArchitecture())
+ #define NewMenuHookUPP(userRoutine) (MenuHookUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMenuHookProcInfo, GetCurrentArchitecture())
+ #define NewMBarHookUPP(userRoutine) (MBarHookUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMBarHookProcInfo, GetCurrentArchitecture())
+ #define DisposeMenuBarDefUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeMenuHookUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeMBarHookUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeMenuBarDefUPP(selector, message, parameter1, parameter2, userUPP) (long)CALL_FOUR_PARAMETER_UPP((userUPP), uppMenuBarDefProcInfo, (selector), (message), (parameter1), (parameter2))
+ #define InvokeMenuHookUPP(userUPP) CALL_ZERO_PARAMETER_UPP((userUPP), uppMenuHookProcInfo)
+ #define InvokeMBarHookUPP(menuRect, userUPP) (short)CALL_ONE_PARAMETER_UPP((userUPP), uppMBarHookProcInfo, (menuRect))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewMenuBarDefProc(userRoutine) NewMenuBarDefUPP(userRoutine)
+#define NewMenuHookProc(userRoutine) NewMenuHookUPP(userRoutine)
+#define NewMBarHookProc(userRoutine) NewMBarHookUPP(userRoutine)
+#define CallMenuBarDefProc(userRoutine, selector, message, parameter1, parameter2) InvokeMenuBarDefUPP(selector, message, parameter1, parameter2, userRoutine)
+#define CallMenuHookProc(userRoutine) InvokeMenuHookUPP(userRoutine)
+#define CallMBarHookProc(userRoutine, menuRect) InvokeMBarHookUPP(menuRect, userRoutine)
+enum {
+ kMenuDefProcPtr = 0 /* raw proc-ptr access based on old MDEF */
+};
+
+
+typedef UInt32 MenuDefType;
+
+struct MenuDefSpec {
+ MenuDefType defType;
+ union {
+ MenuDefUPP defProc;
+ } u;
+};
+typedef struct MenuDefSpec MenuDefSpec;
+typedef MenuDefSpec * MenuDefSpecPtr;
+/*--------------------------------------------------------------------------------------*/
+/* o Menu Manager Initialization */
+/*--------------------------------------------------------------------------------------*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+InitProcMenu (short resID) ONEWORDINLINE(0xA808);
+
+EXTERN_API( void )
+InitMenus (void) ONEWORDINLINE(0xA930);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Menu Manipulation */
+/*--------------------------------------------------------------------------------------*/
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( MenuRef )
+NewMenu (MenuID menuID,
+ ConstStr255Param menuTitle) ONEWORDINLINE(0xA931);
+
+#if TARGET_OS_MAC
+ #define MacGetMenu GetMenu
+#endif
+EXTERN_API( MenuRef )
+MacGetMenu (short resourceID) ONEWORDINLINE(0xA9BF);
+
+EXTERN_API( void )
+DisposeMenu (MenuRef theMenu) ONEWORDINLINE(0xA932);
+
+EXTERN_API( void )
+CalcMenuSize (MenuRef theMenu) ONEWORDINLINE(0xA948);
+
+EXTERN_API( short )
+CountMenuItems (MenuRef theMenu) ONEWORDINLINE(0xA950);
+
+/* CountMItems() has been renamed to CountMenuItems() in Carbon */
+#if CALL_NOT_IN_CARBON
+EXTERN_API( short )
+CountMItems (MenuRef theMenu) ONEWORDINLINE(0xA950);
+
+#if CALL_NOT_IN_CARBON
+#define CountMenuItems( menu ) CountMItems( menu )
+#endif /* CALL_NOT_IN_CARBON */
+
+/* Routines available in Mac OS 8.5 and later */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( OSStatus )
+GetMenuFont (MenuRef menu,
+ SInt16 * outFontID,
+ UInt16 * outFontSize);
+
+EXTERN_API( OSStatus )
+SetMenuFont (MenuRef menu,
+ SInt16 inFontID,
+ UInt16 inFontSize);
+
+EXTERN_API( Boolean )
+GetMenuExcludesMarkColumn (MenuRef menu);
+
+EXTERN_API( OSStatus )
+SetMenuExcludesMarkColumn (MenuRef menu,
+ Boolean excludesMark);
+
+/* Routines available in Carbon only*/
+
+EXTERN_API( OSStatus )
+RegisterMenuDefinition (SInt16 inResID,
+ MenuDefSpecPtr inDefSpec);
+
+EXTERN_API( OSStatus )
+CreateNewMenu (MenuID menuID,
+ MenuAttributes menuAttributes,
+ MenuRef * outMenuRef);
+
+EXTERN_API( OSStatus )
+CreateCustomMenu (const MenuDefSpec * defSpec,
+ MenuID menuID,
+ MenuAttributes menuAttributes,
+ MenuRef * outMenuRef);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Menu Item Insertion */
+/*--------------------------------------------------------------------------------------*/
+#if TARGET_OS_MAC
+ #define MacAppendMenu AppendMenu
+#endif
+EXTERN_API( void )
+MacAppendMenu (MenuRef menu,
+ ConstStr255Param data) ONEWORDINLINE(0xA933);
+
+EXTERN_API( void )
+InsertResMenu (MenuRef theMenu,
+ ResType theType,
+ short afterItem) ONEWORDINLINE(0xA951);
+
+EXTERN_API( void )
+AppendResMenu (MenuRef theMenu,
+ ResType theType) ONEWORDINLINE(0xA94D);
+
+#if TARGET_OS_MAC
+ #define MacInsertMenuItem InsertMenuItem
+#endif
+EXTERN_API( void )
+MacInsertMenuItem (MenuRef theMenu,
+ ConstStr255Param itemString,
+ short afterItem) ONEWORDINLINE(0xA826);
+
+EXTERN_API( void )
+DeleteMenuItem (MenuRef theMenu,
+ short item) ONEWORDINLINE(0xA952);
+
+EXTERN_API( void )
+InsertFontResMenu (MenuRef theMenu,
+ short afterItem,
+ short scriptFilter) THREEWORDINLINE(0x303C, 0x0400, 0xA825);
+
+EXTERN_API( void )
+InsertIntlResMenu (MenuRef theMenu,
+ ResType theType,
+ short afterItem,
+ short scriptFilter) THREEWORDINLINE(0x303C, 0x0601, 0xA825);
+
+/* Routines available in Mac OS 8.5 and later*/
+
+EXTERN_API( OSStatus )
+AppendMenuItemText (MenuRef menu,
+ ConstStr255Param inString);
+
+EXTERN_API( OSStatus )
+InsertMenuItemText (MenuRef menu,
+ ConstStr255Param inString,
+ MenuItemIndex afterItem);
+
+/* Routines available in Carbon and later*/
+
+/*--------------------------------------------------------------------------------------*/
+/* o Menu Events */
+/*--------------------------------------------------------------------------------------*/
+EXTERN_API( long )
+MenuKey (CharParameter ch) ONEWORDINLINE(0xA93E);
+
+EXTERN_API( long )
+MenuSelect (Point startPt) ONEWORDINLINE(0xA93D);
+
+EXTERN_API( long )
+PopUpMenuSelect (MenuRef menu,
+ short top,
+ short left,
+ short popUpItem) ONEWORDINLINE(0xA80B);
+
+EXTERN_API( long )
+MenuChoice (void) ONEWORDINLINE(0xAA66);
+
+/* Routines available in Mac OS 8.0 (Appearance 1.0) and later*/
+EXTERN_API( UInt32 )
+MenuEvent (const EventRecord * inEvent) THREEWORDINLINE(0x303C, 0x020C, 0xA825);
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Menu Bar */
+/*--------------------------------------------------------------------------------------*/
+EXTERN_API( short )
+GetMBarHeight (void) TWOWORDINLINE(0x3EB8, 0x0BAA);
+
+#if TARGET_OS_MAC
+ #define MacDrawMenuBar DrawMenuBar
+#endif
+EXTERN_API( void )
+MacDrawMenuBar (void) ONEWORDINLINE(0xA937);
+
+EXTERN_API( void )
+InvalMenuBar (void) ONEWORDINLINE(0xA81D);
+
+EXTERN_API( void )
+HiliteMenu (MenuID menuID) ONEWORDINLINE(0xA938);
+
+EXTERN_API( Handle )
+GetNewMBar (short menuBarID) ONEWORDINLINE(0xA9C0);
+
+EXTERN_API( Handle )
+GetMenuBar (void) ONEWORDINLINE(0xA93B);
+
+EXTERN_API( void )
+SetMenuBar (Handle menuList) ONEWORDINLINE(0xA93C);
+
+EXTERN_API( MenuRef )
+GetMenuHandle (MenuID menuID) ONEWORDINLINE(0xA949);
+
+#if TARGET_OS_MAC
+ #define MacInsertMenu InsertMenu
+#endif
+EXTERN_API( void )
+MacInsertMenu (MenuRef theMenu,
+ MenuID beforeID) ONEWORDINLINE(0xA935);
+
+#if TARGET_OS_MAC
+ #define MacDeleteMenu DeleteMenu
+#endif
+EXTERN_API( void )
+MacDeleteMenu (MenuID menuID) ONEWORDINLINE(0xA936);
+
+EXTERN_API( void )
+ClearMenuBar (void) ONEWORDINLINE(0xA934);
+
+EXTERN_API( void )
+SetMenuFlashCount (short count) ONEWORDINLINE(0xA94A);
+
+/* SetMenuFlash() has been renamed to SetMenuFlashCount() in Carbon */
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+SetMenuFlash (short count) ONEWORDINLINE(0xA94A);
+
+#if CALL_NOT_IN_CARBON
+#define SetMenuFlashCount( count ) SetMenuFlash( count )
+#endif /* CALL_NOT_IN_CARBON */
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( void )
+FlashMenuBar (MenuID menuID) ONEWORDINLINE(0xA94C);
+
+/* These are obsolete because Carbon does not support desk accessories.*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( Boolean )
+SystemEdit (short editCmd) ONEWORDINLINE(0xA9C2);
+
+EXTERN_API( void )
+SystemMenu (long menuResult) ONEWORDINLINE(0xA9B5);
+
+/* Routines available in Mac OS 8.5 and later*/
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( Boolean )
+IsMenuBarVisible (void);
+
+EXTERN_API( void )
+ShowMenuBar (void);
+
+EXTERN_API( void )
+HideMenuBar (void);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Menu Item Accessors */
+/*--------------------------------------------------------------------------------------*/
+#if TARGET_OS_MAC
+ #define MacCheckMenuItem CheckMenuItem
+#endif
+EXTERN_API( void )
+MacCheckMenuItem (MenuRef theMenu,
+ short item,
+ Boolean checked) ONEWORDINLINE(0xA945);
+
+/* CheckItem() has been renamed to CheckMenuItem() in Carbon */
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+CheckItem (MenuRef theMenu,
+ short item,
+ Boolean checked) ONEWORDINLINE(0xA945);
+
+#if TARGET_OS_MAC && CALL_NOT_IN_CARBON
+#define CheckMenuItem( menu, item, checked ) CheckItem( menu, item, checked )
+#endif
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( void )
+SetMenuItemText (MenuRef theMenu,
+ short item,
+ ConstStr255Param itemString) ONEWORDINLINE(0xA947);
+
+EXTERN_API( void )
+GetMenuItemText (MenuRef theMenu,
+ short item,
+ Str255 itemString) ONEWORDINLINE(0xA946);
+
+EXTERN_API( void )
+SetItemMark (MenuRef theMenu,
+ short item,
+ CharParameter markChar) ONEWORDINLINE(0xA944);
+
+EXTERN_API( void )
+GetItemMark (MenuRef theMenu,
+ short item,
+ CharParameter * markChar) ONEWORDINLINE(0xA943);
+
+EXTERN_API( void )
+SetItemCmd (MenuRef theMenu,
+ short item,
+ CharParameter cmdChar) ONEWORDINLINE(0xA84F);
+
+EXTERN_API( void )
+GetItemCmd (MenuRef theMenu,
+ short item,
+ CharParameter * cmdChar) ONEWORDINLINE(0xA84E);
+
+EXTERN_API( void )
+SetItemIcon (MenuRef theMenu,
+ short item,
+ short iconIndex) ONEWORDINLINE(0xA940);
+
+/* icon is returned in high byte of 16-bit iconIndex */
+EXTERN_API( void )
+GetItemIcon (MenuRef theMenu,
+ short item,
+ short * iconIndex) ONEWORDINLINE(0xA93F);
+
+EXTERN_API( void )
+SetItemStyle (MenuRef theMenu,
+ short item,
+ StyleParameter chStyle) ONEWORDINLINE(0xA942);
+
+EXTERN_API( void )
+GetItemStyle (MenuRef theMenu,
+ short item,
+ Style * chStyle);
+
+/* These APIs are not supported in Carbon. Please use EnableMenuItem and */
+/* DisableMenuItem (available back through Mac OS 8.5) instead. */
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+DisableItem (MenuRef theMenu,
+ short item) ONEWORDINLINE(0xA93A);
+
+EXTERN_API( void )
+EnableItem (MenuRef theMenu,
+ short item) ONEWORDINLINE(0xA939);
+
+/* Routines available in Mac OS 8.0 (Appearance 1.0) and later*/
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( OSErr )
+SetMenuItemCommandID (MenuRef inMenu,
+ SInt16 inItem,
+ MenuCommand inCommandID) THREEWORDINLINE(0x303C, 0x0502, 0xA825);
+
+EXTERN_API( OSErr )
+GetMenuItemCommandID (MenuRef inMenu,
+ SInt16 inItem,
+ MenuCommand * outCommandID) THREEWORDINLINE(0x303C, 0x0503, 0xA825);
+
+EXTERN_API( OSErr )
+SetMenuItemModifiers (MenuRef inMenu,
+ SInt16 inItem,
+ UInt8 inModifiers) THREEWORDINLINE(0x303C, 0x0404, 0xA825);
+
+EXTERN_API( OSErr )
+GetMenuItemModifiers (MenuRef inMenu,
+ SInt16 inItem,
+ UInt8 * outModifiers) THREEWORDINLINE(0x303C, 0x0505, 0xA825);
+
+EXTERN_API( OSErr )
+SetMenuItemIconHandle (MenuRef inMenu,
+ SInt16 inItem,
+ UInt8 inIconType,
+ Handle inIconHandle) THREEWORDINLINE(0x303C, 0x0606, 0xA825);
+
+EXTERN_API( OSErr )
+GetMenuItemIconHandle (MenuRef inMenu,
+ SInt16 inItem,
+ UInt8 * outIconType,
+ Handle * outIconHandle) THREEWORDINLINE(0x303C, 0x0707, 0xA825);
+
+EXTERN_API( OSErr )
+SetMenuItemTextEncoding (MenuRef inMenu,
+ SInt16 inItem,
+ TextEncoding inScriptID) THREEWORDINLINE(0x303C, 0x0408, 0xA825);
+
+EXTERN_API( OSErr )
+GetMenuItemTextEncoding (MenuRef inMenu,
+ SInt16 inItem,
+ TextEncoding * outScriptID) THREEWORDINLINE(0x303C, 0x0509, 0xA825);
+
+EXTERN_API( OSErr )
+SetMenuItemHierarchicalID (MenuRef inMenu,
+ SInt16 inItem,
+ MenuID inHierID) THREEWORDINLINE(0x303C, 0x040D, 0xA825);
+
+EXTERN_API( OSErr )
+GetMenuItemHierarchicalID (MenuRef inMenu,
+ SInt16 inItem,
+ MenuID * outHierID) THREEWORDINLINE(0x303C, 0x050E, 0xA825);
+
+EXTERN_API( OSErr )
+SetMenuItemFontID (MenuRef inMenu,
+ SInt16 inItem,
+ SInt16 inFontID) THREEWORDINLINE(0x303C, 0x040F, 0xA825);
+
+EXTERN_API( OSErr )
+GetMenuItemFontID (MenuRef inMenu,
+ SInt16 inItem,
+ SInt16 * outFontID) THREEWORDINLINE(0x303C, 0x0510, 0xA825);
+
+EXTERN_API( OSErr )
+SetMenuItemRefCon (MenuRef inMenu,
+ SInt16 inItem,
+ UInt32 inRefCon) THREEWORDINLINE(0x303C, 0x050A, 0xA825);
+
+EXTERN_API( OSErr )
+GetMenuItemRefCon (MenuRef inMenu,
+ SInt16 inItem,
+ UInt32 * outRefCon) THREEWORDINLINE(0x303C, 0x050B, 0xA825);
+
+/* Please use the menu item property APIs in Carbon.*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+SetMenuItemRefCon2 (MenuRef inMenu,
+ SInt16 inItem,
+ UInt32 inRefCon2) THREEWORDINLINE(0x303C, 0x0511, 0xA825);
+
+EXTERN_API( OSErr )
+GetMenuItemRefCon2 (MenuRef inMenu,
+ SInt16 inItem,
+ UInt32 * outRefCon2) THREEWORDINLINE(0x303C, 0x0512, 0xA825);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( OSErr )
+SetMenuItemKeyGlyph (MenuRef inMenu,
+ SInt16 inItem,
+ SInt16 inGlyph) THREEWORDINLINE(0x303C, 0x0513, 0xA825);
+
+EXTERN_API( OSErr )
+GetMenuItemKeyGlyph (MenuRef inMenu,
+ SInt16 inItem,
+ SInt16 * outGlyph) THREEWORDINLINE(0x303C, 0x0514, 0xA825);
+
+/* Routines available in Mac OS 8.5 and later (supporting enabling/disabling of > 31 items)*/
+
+#if TARGET_OS_MAC
+ #define MacEnableMenuItem EnableMenuItem
+#endif
+EXTERN_API( void )
+MacEnableMenuItem (MenuRef theMenu,
+ MenuItemIndex item);
+
+EXTERN_API( void )
+DisableMenuItem (MenuRef theMenu,
+ MenuItemIndex item);
+
+EXTERN_API( Boolean )
+IsMenuItemEnabled (MenuRef menu,
+ MenuItemIndex item);
+
+EXTERN_API( void )
+EnableMenuItemIcon (MenuRef theMenu,
+ MenuItemIndex item) THREEWORDINLINE(0x303C, 0x0019, 0xA825);
+
+EXTERN_API( void )
+DisableMenuItemIcon (MenuRef theMenu,
+ MenuItemIndex item) THREEWORDINLINE(0x303C, 0x0020, 0xA825);
+
+EXTERN_API( Boolean )
+IsMenuItemIconEnabled (MenuRef menu,
+ MenuItemIndex item) THREEWORDINLINE(0x303C, 0x0018, 0xA825);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Menu Item Color Tables */
+/* */
+/* Menu color manipulation is considered deprecated with the advent of the Appearance */
+/* Manager. Avoid using these routines if possible */
+/*--------------------------------------------------------------------------------------*/
+EXTERN_API( void )
+DeleteMCEntries (MenuID menuID,
+ short menuItem) ONEWORDINLINE(0xAA60);
+
+EXTERN_API( MCTableHandle )
+GetMCInfo (void) ONEWORDINLINE(0xAA61);
+
+EXTERN_API( void )
+SetMCInfo (MCTableHandle menuCTbl) ONEWORDINLINE(0xAA62);
+
+EXTERN_API( void )
+DisposeMCInfo (MCTableHandle menuCTbl) ONEWORDINLINE(0xAA63);
+
+EXTERN_API( MCEntryPtr )
+GetMCEntry (MenuID menuID,
+ short menuItem) ONEWORDINLINE(0xAA64);
+
+EXTERN_API( void )
+SetMCEntries (short numEntries,
+ MCTablePtr menuCEntries) ONEWORDINLINE(0xAA65);
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Properties (Mac OS 8.5 and later) */
+/* */
+/* With the following property APIs, you can attach any piece of data you'd like to a */
+/* menu or menu item. Passing zero for the item number parameter indicates you'd like */
+/* to attach the data to the menu itself, and not to any specific menu item. */
+/*--------------------------------------------------------------------------------------*/
+enum {
+ kMenuPropertyPersistent = 0x00000001 /* whether this property gets saved when flattening the menu*/
+};
+
+EXTERN_API( OSStatus )
+GetMenuItemProperty (MenuRef menu,
+ MenuItemIndex item,
+ OSType propertyCreator,
+ OSType propertyTag,
+ UInt32 bufferSize,
+ UInt32 * actualSize,
+ void * propertyBuffer);
+
+EXTERN_API( OSStatus )
+GetMenuItemPropertySize (MenuRef menu,
+ MenuItemIndex item,
+ OSType propertyCreator,
+ OSType propertyTag,
+ UInt32 * size);
+
+EXTERN_API( OSStatus )
+SetMenuItemProperty (MenuRef menu,
+ MenuItemIndex item,
+ OSType propertyCreator,
+ OSType propertyTag,
+ UInt32 propertySize,
+ const void * propertyData);
+
+EXTERN_API( OSStatus )
+RemoveMenuItemProperty (MenuRef menu,
+ MenuItemIndex item,
+ OSType propertyCreator,
+ OSType propertyTag);
+
+EXTERN_API( OSStatus )
+GetMenuItemPropertyAttributes (MenuRef menu,
+ MenuItemIndex item,
+ OSType propertyCreator,
+ OSType propertyTag,
+ UInt32 * attributes);
+
+EXTERN_API( OSStatus )
+ChangeMenuItemPropertyAttributes (MenuRef menu,
+ MenuItemIndex item,
+ OSType propertyCreator,
+ OSType propertyTag,
+ UInt32 attributesToSet,
+ UInt32 attributesToClear);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Attributes (Carbon and later) */
+/* */
+/* Each menu and menu item has attribute flags. */
+/*--------------------------------------------------------------------------------------*/
+EXTERN_API( OSStatus )
+GetMenuAttributes (MenuRef menu,
+ MenuAttributes * outAttributes);
+
+EXTERN_API( OSStatus )
+ChangeMenuAttributes (MenuRef menu,
+ MenuAttributes setTheseAttributes,
+ MenuAttributes clearTheseAttributes);
+
+EXTERN_API( OSStatus )
+GetMenuItemAttributes (MenuRef menu,
+ MenuItemIndex item,
+ MenuItemAttributes * outAttributes);
+
+EXTERN_API( OSStatus )
+ChangeMenuItemAttributes (MenuRef menu,
+ MenuItemIndex item,
+ MenuItemAttributes setTheseAttributes,
+ MenuItemAttributes clearTheseAttributes);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Mass menu item enabling and disabling (Carbon and later) */
+/* */
+/* Useful when rewriting code that whacks the enableFlags field directly. */
+/*--------------------------------------------------------------------------------------*/
+EXTERN_API( void )
+DisableAllMenuItems (MenuRef theMenu);
+
+EXTERN_API( void )
+EnableAllMenuItems (MenuRef theMenu);
+
+EXTERN_API( Boolean )
+MenuHasEnabledItems (MenuRef theMenu);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Menu tracking status (Carbon and later) */
+/* */
+/* Get info about the selected menu item during menu tracking. Replaces direct access */
+/* to low-mem globals that used to hold this info. */
+/*--------------------------------------------------------------------------------------*/
+EXTERN_API( OSStatus )
+GetMenuTrackingData (MenuRef theMenu,
+ MenuTrackingData * outData);
+
+/*--------------------------------------------------------------------------------------*/
+/* o.Universal command ID access (Carbon and later) */
+/* */
+/* These APIs allow you to operate on menu items strictly by command ID, with no */
+/* knowledge of a menu item's index. */
+/*--------------------------------------------------------------------------------------*/
+EXTERN_API( ItemCount )
+CountMenuItemsWithCommandID (MenuRef menu,
+ MenuCommand commandID);
+
+EXTERN_API( OSStatus )
+GetIndMenuItemWithCommandID (MenuRef menu,
+ MenuCommand commandID,
+ UInt32 itemIndex,
+ MenuRef * outMenu,
+ MenuItemIndex * outIndex);
+
+EXTERN_API( void )
+EnableMenuCommand (MenuRef theMenu,
+ MenuCommand commandID);
+
+EXTERN_API( void )
+DisableMenuCommand (MenuRef theMenu,
+ MenuCommand commandID);
+
+EXTERN_API( Boolean )
+IsMenuCommandEnabled (MenuRef menu,
+ MenuCommand commandID);
+
+EXTERN_API( OSStatus )
+GetMenuCommandProperty (MenuRef menu,
+ MenuCommand commandID,
+ OSType propertyCreator,
+ OSType propertyTag,
+ ByteCount bufferSize,
+ ByteCount * actualSize,
+ void * propertyBuffer);
+
+EXTERN_API( OSStatus )
+GetMenuCommandPropertySize (MenuRef menu,
+ MenuCommand commandID,
+ OSType propertyCreator,
+ OSType propertyTag,
+ ByteCount * size);
+
+EXTERN_API( OSStatus )
+SetMenuCommandProperty (MenuRef menu,
+ MenuCommand commandID,
+ OSType propertyCreator,
+ OSType propertyTag,
+ ByteCount propertySize,
+ const void * propertyData);
+
+EXTERN_API( OSStatus )
+RemoveMenuCommandProperty (MenuRef menu,
+ MenuCommand commandID,
+ OSType propertyCreator,
+ OSType propertyTag);
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o.Standard font menu (Carbon and later) */
+/* */
+/* These APIs allow you to create and use the standard font menu. */
+/*--------------------------------------------------------------------------------------*/
+enum {
+ kHierarchicalFontMenuOption = 0x00000001
+};
+
+EXTERN_API( OSStatus )
+CreateStandardFontMenu (MenuRef menu,
+ MenuItemIndex afterItem,
+ MenuID firstHierMenuID,
+ OptionBits options,
+ ItemCount * outHierMenuCount);
+
+EXTERN_API( OSStatus )
+UpdateStandardFontMenu (MenuRef menu,
+ ItemCount * outHierMenuCount);
+
+EXTERN_API( OSStatus )
+GetFontFamilyFromMenuSelection (MenuRef menu,
+ MenuItemIndex item,
+ FMFontFamily * outFontFamily,
+ FMFontStyle * outStyle);
+
+/*--------------------------------------------------------------------------------------*/
+/* o Contextual Menu routines and constants */
+/* available with Conxtextual Menu extension 1.0 and later */
+/*--------------------------------------------------------------------------------------*/
+/* Gestalt Selector for classic 68K apps only. */
+/* CFM apps should weak link and check the symbols. */
+enum {
+ gestaltContextualMenuAttr = FOUR_CHAR_CODE('cmnu'),
+ gestaltContextualMenuUnusedBit = 0,
+ gestaltContextualMenuTrapAvailable = 1
+};
+
+/* Values indicating what kind of help the application supports */
+enum {
+ kCMHelpItemNoHelp = 0,
+ kCMHelpItemAppleGuide = 1,
+ kCMHelpItemOtherHelp = 2
+};
+
+/* Values indicating what was chosen from the menu */
+enum {
+ kCMNothingSelected = 0,
+ kCMMenuItemSelected = 1,
+ kCMShowHelpSelected = 3
+};
+
+EXTERN_API( OSStatus )
+InitContextualMenus (void) TWOWORDINLINE(0x7001, 0xAA72);
+
+EXTERN_API( Boolean )
+IsShowContextualMenuClick (const EventRecord * inEvent) TWOWORDINLINE(0x7002, 0xAA72);
+
+EXTERN_API( OSStatus )
+ContextualMenuSelect (MenuRef inMenu,
+ Point inGlobalLocation,
+ Boolean inReserved,
+ UInt32 inHelpType,
+ ConstStr255Param inHelpItemString,
+ const AEDesc * inSelection,
+ UInt32 * outUserSelectionType,
+ SInt16 * outMenuID,
+ MenuItemIndex * outMenuItem) TWOWORDINLINE(0x7003, 0xAA72);
+
+EXTERN_API( Boolean )
+ProcessIsContextualMenuClient (ProcessSerialNumber * inPSN) TWOWORDINLINE(0x7004, 0xAA72);
+
+
+/*--------------------------------------------------------------------------------------*/
+/* o Contextual Menu Plugin Notes */
+/* */
+/* For Mac OS X, we will support a new type of Contextual Menu Plugin: the CFM-based */
+/* plugin. Each plugin must be a separate file in the Contextual Menu Items subfolder */
+/* of the system folder. It must export two functions and has the option of exporting */
+/* a third; these three functions are virtually identical to the methods that must be */
+/* supported by a SOM-based plugin. */
+/* */
+/* The required symbols must be named "ExamineContext" and "HandleSelection". */
+/* The optional symbol must be named "PostMenuCleanup". */
+/* */
+/* The ExamineContext routine must have the following prototype: */
+/* pascal OSStatus ExamineContext( const AEDesc* inContext, */
+/* AEDescList* outCommandPairs ); */
+/* */
+/* The HandleSelection routine must have the following prototype: */
+/* pascal OSStatus HandleSelection( const AEDesc* inContext, */
+/* SInt32 inCommandID ); */
+/* */
+/* The PostMenuCleanup routine must have the following prototype: */
+/* pascal void PostMenuCleanup( void ); */
+/*--------------------------------------------------------------------------------------*/
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( MenuRef )
+newmenu (MenuID menuID,
+ const char * menuTitle);
+
+EXTERN_API_C( void )
+appendmenu (MenuRef menu,
+ const char * data);
+
+EXTERN_API_C( void )
+insertmenuitem (MenuRef theMenu,
+ const char * itemString,
+ short afterItem);
+
+EXTERN_API_C( long )
+menuselect (const Point * startPt);
+
+EXTERN_API_C( void )
+setmenuitemtext (MenuRef menu,
+ short item,
+ const char * itemString);
+
+EXTERN_API_C( void )
+getmenuitemtext (MenuRef menu,
+ short item,
+ char * itemString);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if OLDROUTINENAMES
+#define AddResMenu(theMenu, theType) AppendResMenu(theMenu, theType)
+#define InsMenuItem(theMenu, itemString, afterItem) InsertMenuItem(theMenu, itemString, afterItem)
+#define DelMenuItem( theMenu, item ) DeleteMenuItem( theMenu, item )
+#if TARGET_OS_MAC
+#define SetItem MacSetItem
+#define GetItem MacGetItem
+#endif
+#define MacSetItem(theMenu, item, itemString) SetMenuItemText(theMenu, item, itemString)
+#define MacGetItem(theMenu, item, itemString) GetMenuItemText(theMenu, item, itemString)
+#define GetMHandle(menuID) GetMenuHandle(menuID)
+#define DelMCEntries(menuID, menuItem) DeleteMCEntries(menuID, menuItem)
+#define DispMCInfo(menuCTbl) DisposeMCInfo(menuCTbl)
+#if CALL_NOT_IN_CARBON
+#define addresmenu(menu, data) appendresmenu(menu, data)
+#define getitem(menu, item, itemString) getmenuitemtext(menu, item, itemString)
+#define setitem(menu, item, itemString) setmenuitemtext(menu, item, itemString)
+#define insmenuitem(theMenu, itemString, afterItem) insertmenuitem(theMenu, itemString, afterItem)
+#endif
+#endif /* OLDROUTINENAMES */
+
+#if ACCESSOR_CALLS_ARE_FUNCTIONS
+/* Getters */
+EXTERN_API( MenuID )
+GetMenuID (MenuRef menu);
+
+EXTERN_API( SInt16 )
+GetMenuWidth (MenuRef menu);
+
+EXTERN_API( SInt16 )
+GetMenuHeight (MenuRef menu);
+
+EXTERN_API( StringPtr )
+GetMenuTitle (MenuRef menu,
+ Str255 title);
+
+EXTERN_API( OSStatus )
+GetMenuDefinition (MenuRef menu,
+ MenuDefSpecPtr outDefSpec);
+
+/* Setters */
+EXTERN_API( void )
+SetMenuID (MenuRef menu,
+ MenuID menuID);
+
+EXTERN_API( void )
+SetMenuWidth (MenuRef menu,
+ SInt16 width);
+
+EXTERN_API( void )
+SetMenuHeight (MenuRef menu,
+ SInt16 height);
+
+EXTERN_API( OSStatus )
+SetMenuTitle (MenuRef menu,
+ ConstStr255Param title);
+
+EXTERN_API( OSStatus )
+SetMenuDefinition (MenuRef menu,
+ const MenuDefSpec * defSpec);
+
+#endif /* ACCESSOR_CALLS_ARE_FUNCTIONS */
+
+
+
+#if TARGET_OS_WIN32
+#endif /* TARGET_OS_WIN32 */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MENUS__ */
+
diff --git a/include/qt/MixedMode.h b/include/qt/MixedMode.h
new file mode 100644
index 000000000..dacf535a5
--- /dev/null
+++ b/include/qt/MixedMode.h
@@ -0,0 +1,699 @@
+/*
+ File: MixedMode.h
+
+ Contains: Mixed Mode Manager Interfaces.
+
+ Version: Technology: Mac OS 8
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1992-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __MIXEDMODE__
+#define __MIXEDMODE__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* Mixed Mode constants */
+/* Current Routine Descriptor Version */
+enum {
+ kRoutineDescriptorVersion = 7
+};
+
+/* MixedModeMagic Magic Cookie/Trap number */
+enum {
+ _MixedModeMagic = 0xAAFE
+};
+
+/* MixedModeState Version for CFM68K Mixed Mode */
+enum {
+ kCurrentMixedModeStateRecord = 1
+};
+
+/* Calling Conventions */
+typedef unsigned short CallingConventionType;
+enum {
+ kPascalStackBased = 0,
+ kCStackBased = 1,
+ kRegisterBased = 2,
+ kD0DispatchedPascalStackBased = 8,
+ kD1DispatchedPascalStackBased = 12,
+ kD0DispatchedCStackBased = 9,
+ kStackDispatchedPascalStackBased = 14,
+ kThinkCStackBased = 5
+};
+
+/* ISA Types */
+typedef SInt8 ISAType;
+enum {
+ kM68kISA = 0,
+ kPowerPCISA = 1
+};
+
+/* RTA Types */
+typedef SInt8 RTAType;
+enum {
+ kOld68kRTA = 0 << 4,
+ kPowerPCRTA = 0 << 4,
+ kCFM68kRTA = 1 << 4
+};
+
+
+#if TARGET_CPU_PPC
+ #define GetCurrentISA() ((ISAType) kPowerPCISA)
+ #define GetCurrentRTA() ((RTAType) kPowerPCRTA)
+#elif TARGET_CPU_68K
+ #define GetCurrentISA() ((ISAType) kM68kISA)
+ #if TARGET_RT_MAC_CFM
+ #define GetCurrentRTA() ((RTAType) kCFM68kRTA)
+ #else
+ #define GetCurrentRTA() ((RTAType) kOld68kRTA)
+ #endif
+#endif
+#define GetCurrentArchitecture() (GetCurrentISA() | GetCurrentRTA())
+
+/* Constants for specifing 68k registers */
+enum {
+ kRegisterD0 = 0,
+ kRegisterD1 = 1,
+ kRegisterD2 = 2,
+ kRegisterD3 = 3,
+ kRegisterD4 = 8,
+ kRegisterD5 = 9,
+ kRegisterD6 = 10,
+ kRegisterD7 = 11,
+ kRegisterA0 = 4,
+ kRegisterA1 = 5,
+ kRegisterA2 = 6,
+ kRegisterA3 = 7,
+ kRegisterA4 = 12,
+ kRegisterA5 = 13,
+ kRegisterA6 = 14, /* A7 is the same as the PowerPC SP */
+ kCCRegisterCBit = 16,
+ kCCRegisterVBit = 17,
+ kCCRegisterZBit = 18,
+ kCCRegisterNBit = 19,
+ kCCRegisterXBit = 20
+};
+
+typedef unsigned short registerSelectorType;
+/* SizeCodes we use everywhere */
+enum {
+ kNoByteCode = 0,
+ kOneByteCode = 1,
+ kTwoByteCode = 2,
+ kFourByteCode = 3
+};
+
+/* Mixed Mode Routine Records */
+typedef unsigned long ProcInfoType;
+/* Routine Flag Bits */
+typedef unsigned short RoutineFlagsType;
+enum {
+ kProcDescriptorIsAbsolute = 0x00,
+ kProcDescriptorIsRelative = 0x01
+};
+
+enum {
+ kFragmentIsPrepared = 0x00,
+ kFragmentNeedsPreparing = 0x02
+};
+
+enum {
+ kUseCurrentISA = 0x00,
+ kUseNativeISA = 0x04
+};
+
+enum {
+ kPassSelector = 0x00,
+ kDontPassSelector = 0x08
+};
+
+enum {
+ kRoutineIsNotDispatchedDefaultRoutine = 0x00,
+ kRoutineIsDispatchedDefaultRoutine = 0x10
+};
+
+enum {
+ kProcDescriptorIsProcPtr = 0x00,
+ kProcDescriptorIsIndex = 0x20
+};
+
+
+struct RoutineRecord {
+ ProcInfoType procInfo; /* calling conventions */
+ SInt8 reserved1; /* Must be 0 */
+ ISAType ISA; /* Instruction Set Architecture */
+ RoutineFlagsType routineFlags; /* Flags for each routine */
+ ProcPtr procDescriptor; /* Where is the thing we're calling? */
+ UInt32 reserved2; /* Must be 0 */
+ UInt32 selector; /* For dispatched routines, the selector */
+};
+typedef struct RoutineRecord RoutineRecord;
+typedef RoutineRecord * RoutineRecordPtr;
+typedef RoutineRecordPtr * RoutineRecordHandle;
+/* Mixed Mode Routine Descriptors */
+/* Definitions of the Routine Descriptor Flag Bits */
+
+typedef UInt8 RDFlagsType;
+enum {
+ kSelectorsAreNotIndexable = 0x00,
+ kSelectorsAreIndexable = 0x01
+};
+
+/* Routine Descriptor Structure */
+
+struct RoutineDescriptor {
+ UInt16 goMixedModeTrap; /* Our A-Trap */
+ SInt8 version; /* Current Routine Descriptor version */
+ RDFlagsType routineDescriptorFlags; /* Routine Descriptor Flags */
+ UInt32 reserved1; /* Unused, must be zero */
+ UInt8 reserved2; /* Unused, must be zero */
+ UInt8 selectorInfo; /* If a dispatched routine, calling convention, else 0 */
+ UInt16 routineCount; /* Number of routines in this RD */
+ RoutineRecord routineRecords[1]; /* The individual routines */
+};
+typedef struct RoutineDescriptor RoutineDescriptor;
+typedef RoutineDescriptor * RoutineDescriptorPtr;
+typedef RoutineDescriptorPtr * RoutineDescriptorHandle;
+/* 68K MixedModeStateRecord */
+
+struct MixedModeStateRecord {
+ UInt32 state1;
+ UInt32 state2;
+ UInt32 state3;
+ UInt32 state4;
+};
+typedef struct MixedModeStateRecord MixedModeStateRecord;
+#if CALL_NOT_IN_CARBON
+/* Macros for building static Routine Descriptors (not available in Carbon) */
+
+/* A macro which creates a static instance of a non-dispatched routine descriptor */
+#define BUILD_ROUTINE_DESCRIPTOR(procInfo, procedure) \
+ { \
+ _MixedModeMagic, /* Mixed Mode A-Trap */ \
+ kRoutineDescriptorVersion, /* version */ \
+ kSelectorsAreNotIndexable, /* RD Flags - not dispatched */ \
+ 0, /* reserved 1 */ \
+ 0, /* reserved 2 */ \
+ 0, /* selector info */ \
+ 0, /* number of routines */ \
+ { /* ItÕs an array */ \
+ { /* ItÕs a struct */ \
+ (procInfo), /* the ProcInfo */ \
+ 0, /* reserved */ \
+ GetCurrentArchitecture(), /* ISA and RTA */ \
+ kProcDescriptorIsAbsolute | /* Flags - itÕs absolute addr */\
+ kFragmentIsPrepared | /* ItÕs prepared */ \
+ kUseNativeISA, /* Always use native ISA */ \
+ (ProcPtr)(procedure), /* the procedure */ \
+ 0, /* reserved */ \
+ 0 /* Not dispatched */ \
+ } \
+ } \
+ }
+
+/* a macro which creates a static instance of a fat routine descriptor */
+#define BUILD_FAT_ROUTINE_DESCRIPTOR(m68kProcInfo, m68kProcPtr, powerPCProcInfo, powerPCProcPtr) \
+ { \
+ _MixedModeMagic, /* Mixed Mode A-Trap */ \
+ kRoutineDescriptorVersion, /* version */ \
+ kSelectorsAreNotIndexable, /* RD Flags - not dispatched */ \
+ 0, /* reserved */ \
+ 0, /* reserved */ \
+ 0, /* reserved */ \
+ 1, /* Array count */ \
+ { /* ItÕs an array */ \
+ { /* ItÕs a struct */ \
+ (m68kProcInfo), /* the ProcInfo */ \
+ 0, /* reserved */ \
+ kM68kISA | /* ISA */ \
+ kOld68kRTA, /* RTA */ \
+ kProcDescriptorIsAbsolute | /* Flags - itÕs absolute addr */\
+ kUseCurrentISA, /* Use current ISA */ \
+ (ProcPtr)(m68kProcPtr), /* the procedure */ \
+ 0, /* reserved */ \
+ 0, /* reserved */ \
+ }, \
+ { /* ItÕs a struct */ \
+ (powerPCProcInfo), /* the ProcInfo */ \
+ 0, /* reserved */ \
+ GetCurrentArchitecture(), /* ISA and RTA */ \
+ kProcDescriptorIsAbsolute | /* Flags - itÕs absolute addr */\
+ kFragmentIsPrepared | /* ItÕs prepared */ \
+ kUseCurrentISA, /* Always use current ISA */ \
+ (ProcPtr)(powerPCProcPtr), /* the procedure */ \
+ 0, /* reserved */ \
+ 0 /* reserved */ \
+ } \
+ } \
+ }
+#endif /* CALL_NOT_IN_CARBON */
+
+/* Mixed Mode ProcInfos */
+enum {
+ /* Calling Convention Offsets */
+ kCallingConventionWidth = 4,
+ kCallingConventionPhase = 0,
+ kCallingConventionMask = 0x0F, /* Result Offsets */
+ kResultSizeWidth = 2,
+ kResultSizePhase = kCallingConventionWidth,
+ kResultSizeMask = 0x30, /* Parameter offsets & widths */
+ kStackParameterWidth = 2,
+ kStackParameterPhase = (kCallingConventionWidth + kResultSizeWidth),
+ kStackParameterMask = (long)0xFFFFFFC0, /* Register Result Location offsets & widths */
+ kRegisterResultLocationWidth = 5,
+ kRegisterResultLocationPhase = (kCallingConventionWidth + kResultSizeWidth), /* Register Parameter offsets & widths */
+ kRegisterParameterWidth = 5,
+ kRegisterParameterPhase = (kCallingConventionWidth + kResultSizeWidth + kRegisterResultLocationWidth),
+ kRegisterParameterMask = 0x7FFFF800,
+ kRegisterParameterSizePhase = 0,
+ kRegisterParameterSizeWidth = 2,
+ kRegisterParameterWhichPhase = kRegisterParameterSizeWidth,
+ kRegisterParameterWhichWidth = 3, /* Dispatched Stack Routine Selector offsets & widths */
+ kDispatchedSelectorSizeWidth = 2,
+ kDispatchedSelectorSizePhase = (kCallingConventionWidth + kResultSizeWidth), /* Dispatched Stack Routine Parameter offsets */
+ kDispatchedParameterPhase = (kCallingConventionWidth + kResultSizeWidth + kDispatchedSelectorSizeWidth), /* Special Case offsets & widths */
+ kSpecialCaseSelectorWidth = 6,
+ kSpecialCaseSelectorPhase = kCallingConventionWidth,
+ kSpecialCaseSelectorMask = 0x03F0
+};
+
+enum {
+ kSpecialCase = 0x000F /* (CallingConventionType) */
+};
+
+enum {
+ /* all of the special cases enumerated. The selector field is 6 bits wide */
+ kSpecialCaseHighHook = 0,
+ kSpecialCaseCaretHook = 0, /* same as kSpecialCaseHighHook */
+ kSpecialCaseEOLHook = 1,
+ kSpecialCaseWidthHook = 2,
+ kSpecialCaseTextWidthHook = 2, /* same as kSpecialCaseWidthHook */
+ kSpecialCaseNWidthHook = 3,
+ kSpecialCaseDrawHook = 4,
+ kSpecialCaseHitTestHook = 5,
+ kSpecialCaseTEFindWord = 6,
+ kSpecialCaseProtocolHandler = 7,
+ kSpecialCaseSocketListener = 8,
+ kSpecialCaseTERecalc = 9,
+ kSpecialCaseTEDoText = 10,
+ kSpecialCaseGNEFilterProc = 11,
+ kSpecialCaseMBarHook = 12
+};
+
+
+/*
+ NOTES ON USING ROUTINE DESCRIPTOR FUNCTIONS
+
+ When calling these routine from classic 68k code there are two possible intentions.
+
+ The first is source compatibility with code ported to CFM (either PowerPC or 68k CFM). When
+ the code is compiled for CFM the functions create routine descriptors that can be used by
+ the mixed mode manager operating on that machine. When the code is compiled for classic 68k
+ these functions do nothing so that the code will run on Macintoshes that do not have a
+ mixed mode manager. The dual nature of these functions is achieved by turning the CFM calls
+ into "no-op" macros for classic 68k: You can put "NewRoutineDescriptor" in your source,
+ compile it for any runtime or instruction set architecture, and it will run correctly on the
+ intended runtime/instruction platform. All without source changes and/or conditional source.
+
+ The other intention is for code that "knows" that it is executing as classic 68k runtime
+ and is specifically trying to call code of another architecture using mixed mode. Since the
+ routines were designed with classic <-> CFM source compatibility in mind this second case
+ is treated special. For classic 68k code to create routines descriptors for use by mixed mode
+ it must call the "Trap" versions of the routines (NewRoutineDescriptorTrap). These versions
+ are only available to classic 68k callers: rigging the interfaces to allow calling them
+ from CFM code will result in runtime failure because no shared library implements or exports
+ the functions.
+
+
+ This almost appears seamless until you consider "fat" routine descriptors and the advent of
+ CFM-68K. What does "fat" mean? CFM-68K is not emulated on PowerPC and PowerPC is not emulated
+ on CFM-68K. It makes no sense to create a routine descriptor having both a CFM-68K routine
+ and a PowerPC native routine pointer. Therefore "fat" is defined to be a mix of classic and
+ CFM for the hardware's native instruction set: on PowerPC fat is classic and PowerPC native,
+ on a 68k machine with CFM-68K installed fat is classic and CFM-68K.
+
+ By definition fat routine descriptors are only constructed by code that is aware of the
+ architecture it is executing as and that another architecture exists. Source compatibility
+ between code intented as pure classic and pure CFM is not an issue and so NewFatRoutineDescriptor
+ is not available when building pure classic code.
+
+ NewFatRoutineDescriptorTrap is available to classic code on both PowerPC and CFM-68K. The
+ classic code can use the code fragment manager routine "FindSymbol" to obtain the address of
+ a routine in a shared library and then construct a routine descriptor with both the CFM routine
+ and classic routine.
+*/
+
+#if TARGET_OS_MAC && TARGET_RT_MAC_CFM
+#if CALL_NOT_IN_CARBON
+EXTERN_API( UniversalProcPtr )
+NewRoutineDescriptor (ProcPtr theProc,
+ ProcInfoType theProcInfo,
+ ISAType theISA);
+
+EXTERN_API( void )
+DisposeRoutineDescriptor (UniversalProcPtr theProcPtr);
+
+EXTERN_API( UniversalProcPtr )
+NewFatRoutineDescriptor (ProcPtr theM68kProc,
+ ProcPtr thePowerPCProc,
+ ProcInfoType theProcInfo);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+#define DisposeRoutineDescriptor(theProcPtr)
+#define NewRoutineDescriptor(theProc, theProcInfo, theISA) ((UniversalProcPtr)theProc)
+/* Note that the call to NewFatRoutineDescriptor is undefined. */
+#endif /* TARGET_OS_MAC && TARGET_RT_MAC_CFM */
+
+
+#if TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+/*
+ The "Trap" versions of the MixedMode calls are only for classic 68K clients that
+ want to load and use CFM based code.
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( UniversalProcPtr )
+NewRoutineDescriptorTrap (ProcPtr theProc,
+ ProcInfoType theProcInfo,
+ ISAType theISA) TWOWORDINLINE(0x7000, 0xAA59);
+
+EXTERN_API( void )
+DisposeRoutineDescriptorTrap (UniversalProcPtr theProcPtr) TWOWORDINLINE(0x7001, 0xAA59);
+
+EXTERN_API( UniversalProcPtr )
+NewFatRoutineDescriptorTrap (ProcPtr theM68kProc,
+ ProcPtr thePowerPCProc,
+ ProcInfoType theProcInfo) TWOWORDINLINE(0x7002, 0xAA59);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_CPU_68K && !TARGET_RT_MAC_CFM */
+
+#if !TARGET_CPU_68K || TARGET_RT_MAC_CFM
+/*
+ CallUniversalProc is defined for all targets except classic 68k code. This will
+ catch accidental calls from classic 68K code that previously only showed up as
+ linker errors.
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( long )
+CallUniversalProc (UniversalProcPtr theProcPtr,
+ ProcInfoType procInfo,
+ ...);
+
+EXTERN_API_C( long )
+CallOSTrapUniversalProc (UniversalProcPtr theProcPtr,
+ ProcInfoType procInfo,
+ ...);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* !TARGET_CPU_68K || TARGET_RT_MAC_CFM */
+
+#if TARGET_CPU_68K
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+SaveMixedModeState (MixedModeStateRecord * stateStorage,
+ UInt32 stateVersion) TWOWORDINLINE(0x7003, 0xAA59);
+
+EXTERN_API( OSErr )
+RestoreMixedModeState (MixedModeStateRecord * stateStorage,
+ UInt32 stateVersion) TWOWORDINLINE(0x7004, 0xAA59);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_CPU_68K */
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ * Macros for building ProcInfos. Examples:
+ *
+ *
+ * uppModalFilterProcInfo = kPascalStackBased
+ * | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
+ * | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(DialogPtr)))
+ * | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(EventRecord*)))
+ * | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(short*))),
+ *
+ * uppDeskHookProcInfo = kRegisterBased
+ * | REGISTER_ROUTINE_PARAMETER(1, kRegisterD0, SIZE_CODE(sizeof(Boolean)))
+ * | REGISTER_ROUTINE_PARAMETER(2, kRegisterA0, SIZE_CODE(sizeof(EventRecord*)))
+ *
+ * uppGXSpoolResourceProcInfo = kCStackBased
+ * | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
+ * | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxSpoolFile)))
+ * | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Handle)))
+ * | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(ResType)))
+ * | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(long)))
+ *
+ * uppTEFindWordProcInfo = SPECIAL_CASE_PROCINFO( 6 ),
+ *
+ */
+
+
+/* * * * * * * * * * * * * *
+ * SIZE_CODE - Return the size code for an object, given its size in bytes.
+ * size - size of an object in bytes
+ */
+#define SIZE_CODE(size) \
+ (((size) == 4) ? kFourByteCode : (((size) == 2) ? kTwoByteCode : (((size) == 1) ? kOneByteCode : 0)))
+
+
+/* * * * * * * * * * * * * *
+ * RESULT_SIZE - Return the result field of a ProcInfo, given the return objectÕs size.
+ * This is the same for all ProcInfos
+ * sizeCode - size code
+ */
+#define RESULT_SIZE(sizeCode) \
+ ((ProcInfoType)(sizeCode) << kResultSizePhase)
+
+
+/* * * * * * * * * * * * * *
+ * STACK_ROUTINE_PARAMETER - Return a parameter field of a ProcInfo, for a simple,
+ * non-dispatched, stack based routine.
+ * whichParam - which parameter
+ * sizeCode - size code
+ */
+#define STACK_ROUTINE_PARAMETER(whichParam, sizeCode) \
+ ((ProcInfoType)(sizeCode) << (kStackParameterPhase + (((whichParam) - 1) * kStackParameterWidth)))
+
+
+/* * * * * * * * * * * * * *
+ * DISPATCHED_STACK_ROUTINE_PARAMETER - Return a parameter field of a ProcInfo, for
+ * a dispatched, stack based routine. The same
+ * macro is used regardless of the type of
+ * dispatching.
+ * whichParam - which parameter
+ * sizeCode - size code
+ */
+#define DISPATCHED_STACK_ROUTINE_PARAMETER(whichParam, sizeCode) \
+ ((ProcInfoType)(sizeCode) << (kDispatchedParameterPhase + (((whichParam) - 1) * kStackParameterWidth)))
+
+
+/* * * * * * * * * * * * * *
+ * DISPATCHED_STACK_ROUTINE_SELECTOR_SIZE - Return a the selector size field of a ProcInfo
+ * for a dispatched, stack based routine. The
+ * same macro is used regardless of the type of
+ * dispatching.
+ * sizeCode - size code
+ */
+#define DISPATCHED_STACK_ROUTINE_SELECTOR_SIZE(sizeCode) \
+ ((ProcInfoType)(sizeCode) << kDispatchedSelectorSizePhase)
+
+
+/* * * * * * * * * * * * * *
+ * REGISTER_RESULT_LOCATION - Return the Result Location field of a ProcInfo,
+ * given the location.
+ * whichReg - which register
+ */
+#define REGISTER_RESULT_LOCATION(whichReg) \
+ ((ProcInfoType)(whichReg) << kRegisterResultLocationPhase)
+
+
+/* * * * * * * * * * * * * *
+ * REGISTER_ROUTINE_PARAMETER - Return a parameter field of a ProcInfo for a
+ * register based routine.
+ */
+#define REGISTER_ROUTINE_PARAMETER(whichParam, whichReg, sizeCode) \
+ ((((ProcInfoType)(sizeCode) << kRegisterParameterSizePhase) | ((ProcInfoType)(whichReg) << kRegisterParameterWhichPhase)) << \
+ (kRegisterParameterPhase + (((whichParam) - 1) * kRegisterParameterWidth)))
+
+
+/* * * * * * * * * * * * * *
+ *
+ * SPECIAL_CASE_PROCINFO - Returns the procInfo constant for the following special cases:
+ *
+ * High Hook & Caret Hook - (see I-379)
+ * C calling conventions, Rect on stack, pointer in A3, no return value
+ * EOL Hook - (see VI-15-26)
+ * Register-based; inputs in D0, A3, A4;
+ * output is Z flag of status register
+ * Width Hook - (see VI-15-27)
+ * Register-based; inputs in D0, D1, A0, A3, A4; output in D1
+ * NWidth Hook - (see VI-15-27)
+ * Register-based; inputs in D0, D1, D2, A0, A2, A3, A4; output in D1
+ * TextWidthHook - (see VI-15-28)
+ * Register-based; inputs in D0, D1, A0, A3, A4; output in D1
+ * DrawHook - (see VI-15-28)
+ * Register-based; inputs in D0, D1, A0, A3, A4; no output
+ * HitTestHook - (See VI-15-29)
+ * Register-based; inputs in D0, D1, D2, A0, A3, A4; outputs in D0, D1, D2
+ * FindWord - (see VI-15-30)
+ * Register-based; inputs in D0, D2, A3, A4; outputs in D0, D1
+ * ADBRoutines - (see V-371)
+ * Register-based; inputs in A0, A1, A2, D0; no outputs
+ * ProtocolHandler - (see II-326)
+ * Register-based; inputs in A0, A1, A2, A3, A4, D1.w; output in Z
+ * SocketListener - (see II-329)
+ * Register-based; inputs in A0, A1, A2, A3, A4, D0.b, D1.w; output in Z
+ * Reclac - (see I-391)
+ * Register-based; inputs in A3, D7; outputs in D2, D3, D4
+ * DoText - (see I-391)
+ * Register-based; inputs in A3, D3, D4, D7; outputs in A0, D0
+ * GNEFilterProc - (see tech note 85)
+ * Register & Stack Based; inputs in A1, D0 & on the stack; outputs on the stack
+ * MenuBarHook - (see I-356)
+ * Register & Stack Based; input on the stack; output in D0
+*/
+#define SPECIAL_CASE_PROCINFO(specialCaseCode) \
+ (kSpecialCase | ((ProcInfoType)(specialCaseCode) << 4))
+
+
+/* * * * * * * * * * * * * * *
+ * STACK_UPP_TYPE - used in typedefs to create ÅUPP type
+ * REGISTER_UPP_TYPE - used in typedefs to create ÅUPP type
+ * TVECTOR_UPP_TYPE - used in typedefs to create ÅUPP type
+ *
+ * Example:
+ *
+ * typedef STACK_UPP_TYPE(ModalFilterProcPtr) ModalFilterUPP;
+ * typedef REGISTER_UPP_TYPE(IOCompletionProcPtr) IOCompletionUPP;
+ *
+ */
+#if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ /* classic 68k runtime */
+ #define STACK_UPP_TYPE(name) name
+ #define REGISTER_UPP_TYPE(name) Register68kProcPtr
+ #define TVECTOR_UPP_TYPE(name) name
+#elif TARGET_OS_MAC && TARGET_RT_MAC_CFM
+ /* PowerPC and CFM68K runtime */
+ #if OPAQUE_UPP_TYPES
+ #define STACK_UPP_TYPE(name) struct Opaque##name##*
+ #define REGISTER_UPP_TYPE(name) struct Opaque##name##*
+ #define TVECTOR_UPP_TYPE(name) struct Opaque##name##*
+ #else
+ #define STACK_UPP_TYPE(name) UniversalProcPtr
+ #define REGISTER_UPP_TYPE(name) UniversalProcPtr
+ #define TVECTOR_UPP_TYPE(name) name
+ #endif
+#elif TARGET_OS_MAC && TARGET_RT_MAC_MACHO
+ /* Mac OS X runtime */
+ #define STACK_UPP_TYPE(name) name
+ #define REGISTER_UPP_TYPE(name) name
+ #define TVECTOR_UPP_TYPE(name) name
+#else
+ /* other runtimes */
+ #define STACK_UPP_TYPE(name) name
+ #define REGISTER_UPP_TYPE(name) name
+ #define TVECTOR_UPP_TYPE(name) name
+#endif
+
+
+/* * * * * * * * * * * * * * *
+ * CALL_Å_PARAMETER_UPP - used in CallÅProc macros
+ *
+ * Example:
+ *
+ * #define CallIOCompletionProc(userRoutine, paramBlock) \
+ * CALL_TWO_PARAMETER_UPP((userRoutine), uppIOCompletionProcInfo, (paramBlock))
+ *
+ */
+#if TARGET_OS_MAC && TARGET_RT_MAC_CFM
+ #define CALL_ZERO_PARAMETER_UPP( upp, procInfo) CallUniversalProc(upp, procInfo)
+ #define CALL_ONE_PARAMETER_UPP( upp, procInfo, p1) CallUniversalProc(upp, procInfo, (p1))
+ #define CALL_TWO_PARAMETER_UPP( upp, procInfo, p1, p2) CallUniversalProc(upp, procInfo, (p1), (p2))
+ #define CALL_THREE_PARAMETER_UPP( upp, procInfo, p1, p2, p3) CallUniversalProc(upp, procInfo, (p1), (p2), (p3))
+ #define CALL_FOUR_PARAMETER_UPP( upp, procInfo, p1, p2, p3, p4) CallUniversalProc(upp, procInfo, (p1), (p2), (p3), (p4))
+ #define CALL_FIVE_PARAMETER_UPP( upp, procInfo, p1, p2, p3, p4, p5) CallUniversalProc(upp, procInfo, (p1), (p2), (p3), (p4), (p5))
+ #define CALL_SIX_PARAMETER_UPP( upp, procInfo, p1, p2, p3, p4, p5, p6) CallUniversalProc(upp, procInfo, (p1), (p2), (p3), (p4), (p5), (p6))
+ #define CALL_SEVEN_PARAMETER_UPP( upp, procInfo, p1, p2, p3, p4, p5, p6, p7) CallUniversalProc(upp, procInfo, (p1), (p2), (p3), (p4), (p5), (p6), (p7))
+ #define CALL_EIGHT_PARAMETER_UPP( upp, procInfo, p1, p2, p3, p4, p5, p6, p7, p8) CallUniversalProc(upp, procInfo, (p1), (p2), (p3), (p4), (p5), (p6), (p7), (p8))
+ #define CALL_NINE_PARAMETER_UPP( upp, procInfo, p1, p2, p3, p4, p5, p6, p7, p8, p9) CallUniversalProc(upp, procInfo, (p1), (p2), (p3), (p4), (p5), (p6), (p7), (p8), (p9))
+ #define CALL_TEN_PARAMETER_UPP( upp, procInfo, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) CallUniversalProc(upp, procInfo, (p1), (p2), (p3), (p4), (p5), (p6), (p7), (p8), (p9), (p10))
+ #define CALL_ELEVEN_PARAMETER_UPP( upp, procInfo, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) CallUniversalProc(upp, procInfo, (p1), (p2), (p3), (p4), (p5), (p6), (p7), (p8), (p9), (p10), (p11))
+ #define CALL_TWELVE_PARAMETER_UPP( upp, procInfo, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12) CallUniversalProc(upp, procInfo, (p1), (p2), (p3), (p4), (p5), (p6), (p7), (p8), (p9), (p10), (p11), (p12))
+ #define CALL_THIRTEEN_PARAMETER_UPP(upp, procInfo, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13) CallUniversalProc(upp, procInfo, (p1), (p2), (p3), (p4), (p5), (p6), (p7), (p8), (p9), (p10), (p11), (p12), (p13))
+#else
+ #define CALL_ZERO_PARAMETER_UPP( upp, procInfo) (*(upp))()
+ #define CALL_ONE_PARAMETER_UPP( upp, procInfo, p1) (*(upp))((p1))
+ #define CALL_TWO_PARAMETER_UPP( upp, procInfo, p1, p2) (*(upp))((p1), (p2))
+ #define CALL_THREE_PARAMETER_UPP( upp, procInfo, p1, p2, p3) (*(upp))((p1), (p2), (p3))
+ #define CALL_FOUR_PARAMETER_UPP( upp, procInfo, p1, p2, p3, p4) (*(upp))((p1), (p2), (p3), (p4))
+ #define CALL_FIVE_PARAMETER_UPP( upp, procInfo, p1, p2, p3, p4, p5) (*(upp))((p1), (p2), (p3), (p4), (p5))
+ #define CALL_SIX_PARAMETER_UPP( upp, procInfo, p1, p2, p3, p4, p5, p6) (*(upp))((p1), (p2), (p3), (p4), (p5), (p6))
+ #define CALL_SEVEN_PARAMETER_UPP( upp, procInfo, p1, p2, p3, p4, p5, p6, p7) (*(upp))((p1), (p2), (p3), (p4), (p5), (p6), (p7))
+ #define CALL_EIGHT_PARAMETER_UPP( upp, procInfo, p1, p2, p3, p4, p5, p6, p7, p8) (*(upp))((p1), (p2), (p3), (p4), (p5), (p6), (p7), (p8))
+ #define CALL_NINE_PARAMETER_UPP( upp, procInfo, p1, p2, p3, p4, p5, p6, p7, p8, p9) (*(upp))((p1), (p2), (p3), (p4), (p5), (p6), (p7), (p8), (p9))
+ #define CALL_TEN_PARAMETER_UPP( upp, procInfo, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) (*(upp))((p1), (p2), (p3), (p4), (p5), (p6), (p7), (p8), (p9), (p10))
+ #define CALL_ELEVEN_PARAMETER_UPP( upp, procInfo, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) (*(upp))((p1), (p2), (p3), (p4), (p5), (p6), (p7), (p8), (p9), (p10), (p11))
+ #define CALL_TWELVE_PARAMETER_UPP( upp, procInfo, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12) (*(upp))((p1), (p2), (p3), (p4), (p5), (p6), (p7), (p8), (p9), (p10), (p11), (p12))
+ #define CALL_THIRTEEN_PARAMETER_UPP(upp, procInfo, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13) (*(upp))((p1), (p2), (p3), (p4), (p5), (p6), (p7), (p8), (p9), (p10), (p11), (p12), (p13))
+#endif
+
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MIXEDMODE__ */
+
diff --git a/include/qt/MovieManager.h b/include/qt/MovieManager.h
new file mode 100644
index 000000000..7f177a51d
--- /dev/null
+++ b/include/qt/MovieManager.h
@@ -0,0 +1,998 @@
+/*
+ File: MovieManager.h
+
+ Contains: Interface for MovieManager component
+
+ Version: Technology: QuickTime 4.2
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 2000-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __MOVIEMANAGER__
+#define __MOVIEMANAGER__
+
+#ifndef __MOVIES__
+#include "Movies.h"
+#endif
+
+#ifndef __QUICKTIMEVR__
+#include "QuickTimeVR.h"
+#endif
+
+#ifndef __COMPONENTS__
+#include "Components.h"
+#endif
+
+#ifndef __EVENTS__
+#include "Events.h"
+#endif
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MACWINDOWS__
+#include "MacWindows.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+typedef ComponentInstance MovieManagerComponent;
+typedef void * ObjectRef;
+typedef void * ObjectSpec;
+typedef OSType MessageClass;
+typedef UInt32 PropertyID;
+typedef UInt32 MessageID;
+typedef OSType ValueFormat;
+typedef void * MessageData;
+/* == message class constants ==*/
+enum {
+ kMMgrGetPropertyClass = FOUR_CHAR_CODE('getp'),
+ kMMgrSetPropertyClass = FOUR_CHAR_CODE('setp'),
+ kMMgrSendCommandClass = FOUR_CHAR_CODE('cmd ')
+};
+
+
+struct CharBuff {
+ UInt32 length;
+ char * buff;
+};
+typedef struct CharBuff CharBuff;
+
+struct PropArg {
+ ValueFormat valueFormat;
+ void * value; /* data if <= 32 bits, otherwise pointer to the actual data */
+};
+typedef struct PropArg PropArg;
+
+struct PropertyParams {
+ UInt16 paramCount;
+ UInt16 flags;
+ PropArg args[8];
+};
+typedef struct PropertyParams PropertyParams;
+/*
+
+ struct with the same layout as a PropArg but with a union for the value field for ease of use
+*/
+
+struct PropArgU {
+ ValueFormat valueFormat;
+ union {
+ Boolean booleanVal;
+ SInt8 byteVal;
+ SInt32 longVal;
+ SInt16 shortVal;
+ Fixed fixedVal;
+ Point pointVal;
+ QTFloatSingle float32Val;
+ QTFloatDouble * float64PtrVal;
+ void * voidVal;
+ StringPtr str255Val;
+ char * cStrVal;
+ CharBuff * charBuffVal;
+ RGBColor * rbgPtr;
+ Ptr ptrVal;
+ Handle textHandle;
+ } value;
+};
+typedef struct PropArgU PropArgU;
+/*
+
+ struct with the same layout as a PropertyParams but with an array of PropArgUs
+*/
+
+struct PropertyParamsU {
+ UInt16 paramCount;
+ UInt16 flags;
+ PropArgU args[8];
+};
+typedef struct PropertyParamsU PropertyParamsU;
+
+struct FindOffset {
+ TimeValue time; /* the movie time at which the text was found */
+ SInt32 trackNum; /* number of the track in which the text was found */
+ SInt32 offset; /* offset (in chars) of the text with the track's sample */
+};
+typedef struct FindOffset FindOffset;
+/* == enums ==*/
+
+/* Movie Commands */
+enum {
+ kMMgrCmdAdd = FOUR_CHAR_CODE('add '),
+ kMMgrCmdAddScaled = FOUR_CHAR_CODE('adsc'),
+ kMMgrCmdClear = FOUR_CHAR_CODE('cler'),
+ kMMgrCmdCopy = FOUR_CHAR_CODE('copy'),
+ kMMgrCmdCopyFrame = FOUR_CHAR_CODE('cfrm'),
+ kMMgrCmdCut = FOUR_CHAR_CODE('cut '),
+ kMMgrCmdDelete = FOUR_CHAR_CODE('delt'),
+ kMMgrCmdExportMovie = FOUR_CHAR_CODE('expt'),
+ kMMgrCmdFindText = FOUR_CHAR_CODE('find'),
+ kMMgrCmdFrameLoaded = FOUR_CHAR_CODE('fram'),
+ kMMgrCmdGoBackAction = FOUR_CHAR_CODE('gobk'),
+ kMMgrCmdIdle = FOUR_CHAR_CODE('idle'),
+ kMMgrCmdLoadExporterSettings = FOUR_CHAR_CODE('lexp'),
+ kMMgrCmdMouseDown = FOUR_CHAR_CODE('clik'),
+ kMMgrCmdMouseEnter = FOUR_CHAR_CODE('entr'),
+ kMMgrCmdMouseExit = FOUR_CHAR_CODE('exit'),
+ kMMgrCmdMouseTrigger = FOUR_CHAR_CODE('trig'),
+ kMMgrCmdMouseUp = FOUR_CHAR_CODE('cend'),
+ kMMgrCmdMovieLoaded = FOUR_CHAR_CODE('load'),
+ kMMgrCmdNudge = FOUR_CHAR_CODE('nudg'),
+ kMMgrCmdPaste = FOUR_CHAR_CODE('pste'),
+ kMMgrCmdPause = FOUR_CHAR_CODE('paus'),
+ kMMgrCmdPlay = FOUR_CHAR_CODE('play'),
+ kMMgrCmdPreroll = FOUR_CHAR_CODE('prol'),
+ kMMgrCmdReplace = FOUR_CHAR_CODE('rplc'),
+ kMMgrCmdReverse = FOUR_CHAR_CODE('rvrs'),
+ kMMgrCmdRewind = FOUR_CHAR_CODE('rwnd'),
+ kMMgrCmdRotate = FOUR_CHAR_CODE('rota'),
+ kMMgrCmdSave = FOUR_CHAR_CODE('sve '),
+ kMMgrCmdSaveAs = FOUR_CHAR_CODE('sas '),
+ kMMgrCmdSaveAsSelfContained = FOUR_CHAR_CODE('sass'),
+ kMMgrCmdSaveCopy = FOUR_CHAR_CODE('scp '),
+ kMMgrCmdSaveCopySelfContained = FOUR_CHAR_CODE('scps'),
+ kMMgrCmdSaveExporterSettings = FOUR_CHAR_CODE('sexp'),
+ kMMgrCmdSaveSelfContained = FOUR_CHAR_CODE('sves'),
+ kMMgrCmdShowDefaultView = FOUR_CHAR_CODE('sdfl'),
+ kMMgrCmdShowExportDialog = FOUR_CHAR_CODE('shoe'),
+ kMMgrCmdShowPoster = FOUR_CHAR_CODE('spos'),
+ kMMgrCmdSkew = FOUR_CHAR_CODE('skew'),
+ kMMgrCmdStep = FOUR_CHAR_CODE('step'),
+ kMMgrCmdStepFwd = FOUR_CHAR_CODE('stpf'),
+ kMMgrCmdStepRev = FOUR_CHAR_CODE('stpr'),
+ kMMgrCmdStop = FOUR_CHAR_CODE('stop'),
+ kMMgrCmdTrim = FOUR_CHAR_CODE('trim'),
+ kMMgrCmdUndo = FOUR_CHAR_CODE('undo')
+};
+
+
+/* Properties */
+enum {
+ kMMgrPropActionsEnabled = FOUR_CHAR_CODE('a ok'),
+ kMMgrPropActiveTransport = FOUR_CHAR_CODE('atrn'),
+ kMMgrPropAlbum = FOUR_CHAR_CODE('©alb'),
+ kMMgrPropAllowBalloonHelp = FOUR_CHAR_CODE('balo'),
+ kMMgrPropAllowEditing = FOUR_CHAR_CODE('edit'),
+ kMMgrPropAllowMultipleStreams = FOUR_CHAR_CODE('amss'),
+ kMMgrPropArtist = FOUR_CHAR_CODE('@ART'),
+ kMMgrPropAttached = FOUR_CHAR_CODE('atch'),
+ kMMgrPropAutoPlay = FOUR_CHAR_CODE('play'),
+ kMMgrPropBackColor = FOUR_CHAR_CODE('bclr'),
+ kMMgrPropBadge = FOUR_CHAR_CODE('badg'),
+ kMMgrPropBitRate = FOUR_CHAR_CODE('brte'),
+ kMMgrPropBottom = FOUR_CHAR_CODE('botm'),
+ kMMgrPropBottomRight = FOUR_CHAR_CODE('btrt'),
+ kMMgrPropChapterTrackRef = FOUR_CHAR_CODE('chap'),
+ kMMgrPropChapterMode = FOUR_CHAR_CODE('chmd'),
+ kMMgrPropChapterName = FOUR_CHAR_CODE('@chp'),
+ kMMgrPropCharacteristics = FOUR_CHAR_CODE('char'),
+ kMMgrPropCodecSequence = FOUR_CHAR_CODE('cseq'),
+ kMMgrPropCommands = FOUR_CHAR_CODE('cmds'),
+ kMMgrPropComments = FOUR_CHAR_CODE('cmnt'),
+ kMMgrPropComponentVersion = FOUR_CHAR_CODE('cvrs'),
+ kMMgrPropCompressMovieHeader = FOUR_CHAR_CODE('chdr'),
+ kMMgrPropConnectionSpeed = FOUR_CHAR_CODE('cspd'),
+ kMMgrPropConverted = FOUR_CHAR_CODE('cnvt'),
+ kMMgrPropCopyright = FOUR_CHAR_CODE('©cpy'),
+ kMMgrPropCursorID = FOUR_CHAR_CODE('crid'),
+ kMMgrPropCurrNodeID = FOUR_CHAR_CODE('cnod'),
+ kMMgrPropDataRefs = FOUR_CHAR_CODE('dtrf'),
+ kMMgrPropDefaultNodeID = FOUR_CHAR_CODE('dnod'),
+ kMMgrPropDescription = FOUR_CHAR_CODE('©des'),
+ kMMgrPropDefaultRect = FOUR_CHAR_CODE('drct'),
+ kMMgrPropDragEnabled = FOUR_CHAR_CODE('drag'),
+ kMMgrPropDuration = FOUR_CHAR_CODE('dura'),
+ kMMgrPropEnabled = FOUR_CHAR_CODE('enab'),
+ kMMgrPropEndSelection = FOUR_CHAR_CODE('ends'),
+ kMMgrPropEndTime = FOUR_CHAR_CODE('endt'),
+ kMMgrPropExporter = FOUR_CHAR_CODE('exp '),
+ kMMgrPropExporters = FOUR_CHAR_CODE('exps'),
+ kMMgrPropFieldOfView = FOUR_CHAR_CODE('fov '),
+ kMMgrPropFieldOfViewRange = FOUR_CHAR_CODE('fovr'),
+ kMMgrPropFindTextCaseSensitive = FOUR_CHAR_CODE('fcse'),
+ kMMgrPropFindTextReverse = FOUR_CHAR_CODE('frev'),
+ kMMgrPropFindTextStart = FOUR_CHAR_CODE('fstt'),
+ kMMgrPropFindTextWrapAround = FOUR_CHAR_CODE('fwrp'),
+ kMMgrPropFlattenCrossplatform = FOUR_CHAR_CODE('flat'),
+ kMMgrPropForeColor = FOUR_CHAR_CODE('fclr'),
+ kMMgrPropFormat = FOUR_CHAR_CODE('frmt'),
+ kMMgrPropFoundTextOffset = FOUR_CHAR_CODE('foff'),
+ kMMgrPropFrameObjects = FOUR_CHAR_CODE('frob'),
+ kMMgrPropFrameRate = FOUR_CHAR_CODE('frte'),
+ kMMgrPropFullCommandList = FOUR_CHAR_CODE('fcmd'),
+ kMMgrPropFullName = FOUR_CHAR_CODE('©nam'),
+ kMMgrPropFullPropertyList = FOUR_CHAR_CODE('fprp'),
+ kMMgrPropGraphicsMode = FOUR_CHAR_CODE('mode'),
+ kMMgrPropHasChanged = FOUR_CHAR_CODE('drty'),
+ kMMgrPropHeight = FOUR_CHAR_CODE('hght'),
+ kMMgrPropHighQualityMode = FOUR_CHAR_CODE('hqty'),
+ kMMgrPropHREF = FOUR_CHAR_CODE('href'),
+ kMMgrPropHTTPProxy = FOUR_CHAR_CODE('http'),
+ kMMgrPropHTTPTransport = FOUR_CHAR_CODE('httt'),
+ kMMgrPropID = FOUR_CHAR_CODE('id '),
+ kMMgrPropIdleFrequency = FOUR_CHAR_CODE('idle'),
+ kMMgrPropImageCorrection = FOUR_CHAR_CODE('icor'),
+ kMMgrPropImageName = FOUR_CHAR_CODE('imnm'),
+ kMMgrPropImageNdx = FOUR_CHAR_CODE('imnd'),
+ kMMgrPropImageQuality = FOUR_CHAR_CODE('iqty'),
+ kMMgrPropInformation = FOUR_CHAR_CODE('©inf'),
+ kMMgrPropIsRegistered = FOUR_CHAR_CODE('regi'),
+ kMMgrPropIsVRMovie = FOUR_CHAR_CODE('isvr'),
+ kMMgrPropLanguage = FOUR_CHAR_CODE('lang'),
+ kMMgrPropLayer = FOUR_CHAR_CODE('layr'),
+ kMMgrPropLeft = FOUR_CHAR_CODE('left'),
+ kMMgrPropLinkDestination = FOUR_CHAR_CODE('dest'),
+ kMMgrPropLoadState = FOUR_CHAR_CODE('load'),
+ kMMgrPropLocation = FOUR_CHAR_CODE('loc '),
+ kMMgrPropLockMessages = FOUR_CHAR_CODE('lokm'),
+ kMMgrPropLockScreen = FOUR_CHAR_CODE('loks'),
+ kMMgrPropLoop = FOUR_CHAR_CODE('loop'),
+ kMMgrPropLoopIsPalindrome = FOUR_CHAR_CODE('paln'),
+ kMMgrPropMask = FOUR_CHAR_CODE('mask'),
+ kMMgrPropMatrix = FOUR_CHAR_CODE('mtrx'),
+ kMMgrPropMaxTimeLoaded = FOUR_CHAR_CODE('mtme'),
+ kMMgrPropMemCheckLevel = FOUR_CHAR_CODE('dbmc'),
+ kMMgrPropMessages = FOUR_CHAR_CODE('msg '),
+ kMMgrPropMIMEType = FOUR_CHAR_CODE('mime'),
+ kMMgrPropMissingComponents = FOUR_CHAR_CODE('miss'),
+ kMMgrPropMovie = FOUR_CHAR_CODE('moov'),
+ kMMgrPropMute = FOUR_CHAR_CODE('mute'),
+ kMMgrPropName = FOUR_CHAR_CODE('name'),
+ kMMgrPropNextMovie = FOUR_CHAR_CODE('next'),
+ kMMgrPropNoProxyHosts = FOUR_CHAR_CODE('nprx'),
+ kMMgrPropNumber = FOUR_CHAR_CODE('numb'),
+ kMMgrPropOriginalFormat = FOUR_CHAR_CODE('©fmt'),
+ kMMgrPropOriginalSource = FOUR_CHAR_CODE('©src'),
+ kMMgrPropOwner = FOUR_CHAR_CODE('ownr'),
+ kMMgrPropPacketLoss = FOUR_CHAR_CODE('loss'),
+ kMMgrPropPanAngle = FOUR_CHAR_CODE('pan '),
+ kMMgrPropPanAngleRange = FOUR_CHAR_CODE('panr'),
+ kMMgrPropPlaySelectionOnly = FOUR_CHAR_CODE('psel'),
+ kMMgrPropPort = FOUR_CHAR_CODE('port'),
+ kMMgrPropPreferredLoc = FOUR_CHAR_CODE('ploc'),
+ kMMgrPropPreferredRate = FOUR_CHAR_CODE('prte'),
+ kMMgrPropPreferredSoundVolume = FOUR_CHAR_CODE('pvol'),
+ kMMgrPropProperties = FOUR_CHAR_CODE('prop'),
+ kMMgrPropRate = FOUR_CHAR_CODE('rate'),
+ kMMgrPropReadOnly = FOUR_CHAR_CODE('rwno'),
+ kMMgrPropRectangle = FOUR_CHAR_CODE('rect'),
+ kMMgrPropRight = FOUR_CHAR_CODE('rght'),
+ kMMgrPropRTSPProxy = FOUR_CHAR_CODE('rtsp'),
+ kMMgrPropSaveDisabled = FOUR_CHAR_CODE('save'),
+ kMMgrPropScale = FOUR_CHAR_CODE('scal'),
+ kMMgrPropScaleMedia = FOUR_CHAR_CODE('spsc'),
+ kMMgrPropScript = FOUR_CHAR_CODE('scrp'),
+ kMMgrPropSeeAllFrames = FOUR_CHAR_CODE('sall'),
+ kMMgrPropShowHotSpots = FOUR_CHAR_CODE('show'),
+ kMMgrPropShowStreamStatsNames = FOUR_CHAR_CODE('snam'),
+ kMMgrPropSize = FOUR_CHAR_CODE('size'),
+ kMMgrPropSOCKSProxy = FOUR_CHAR_CODE('sock'),
+ kMMgrPropSoftware = FOUR_CHAR_CODE('©swr'),
+ kMMgrPropSoundBalance = FOUR_CHAR_CODE('sbal'),
+ kMMgrPropSoundBass = FOUR_CHAR_CODE('sbas'),
+ kMMgrPropSoundOutputComponent = FOUR_CHAR_CODE('sout'),
+ kMMgrPropSoundTreble = FOUR_CHAR_CODE('strb'),
+ kMMgrPropSoundVolume = FOUR_CHAR_CODE('svol'),
+ kMMgrPropStartSelection = FOUR_CHAR_CODE('strs'),
+ kMMgrPropStartTime = FOUR_CHAR_CODE('strt'),
+ kMMgrPropStatus = FOUR_CHAR_CODE('stts'),
+ kMMgrPropStreamStats = FOUR_CHAR_CODE('stat'),
+ kMMgrPropSuppressHotSpotNames = FOUR_CHAR_CODE('hnam'),
+ kMMgrPropTargetMovieID = FOUR_CHAR_CODE('tid '),
+ kMMgrPropTargetMovieName = FOUR_CHAR_CODE('tnam'),
+ kMMgrPropText = FOUR_CHAR_CODE('text'),
+ kMMgrPropTiltAngle = FOUR_CHAR_CODE('tlt '),
+ kMMgrPropTiltAngleRange = FOUR_CHAR_CODE('tltr'),
+ kMMgrPropTime = FOUR_CHAR_CODE('time'),
+ kMMgrPropTimeScale = FOUR_CHAR_CODE('tscl'),
+ kMMgrPropTop = FOUR_CHAR_CODE('top '),
+ kMMgrPropTopLeft = FOUR_CHAR_CODE('topl'),
+ kMMgrPropType = FOUR_CHAR_CODE('type'),
+ kMMgrPropUDPTransport = FOUR_CHAR_CODE('udpt'),
+ kMMgrPropURL = FOUR_CHAR_CODE('url '),
+ kMMgrPropUseCustomCLUT = FOUR_CHAR_CODE('clut'),
+ kMMgrPropUserData = FOUR_CHAR_CODE('udat'),
+ kMMgrPropVariable = FOUR_CHAR_CODE('var '),
+ kMMgrPropVersion = FOUR_CHAR_CODE('vers'),
+ kMMgrPropVisible = FOUR_CHAR_CODE('visi'),
+ kMMgrPropWidth = FOUR_CHAR_CODE('widt')
+};
+
+
+/*
+ **
+ == object specification ==
+*/
+enum {
+ /* ***/
+ /* obj->objClass*/
+ kObjClassQuickTime = FOUR_CHAR_CODE('cQtm'),
+ kObjClassMovie = FOUR_CHAR_CODE('cMoV'),
+ kObjClassWindow = FOUR_CHAR_CODE('cwnd'),
+ kObjClassTrack = FOUR_CHAR_CODE('ctrk'),
+ kObjClassSprite = FOUR_CHAR_CODE('cspr'),
+ kObjClassHotSpot = FOUR_CHAR_CODE('chsp'),
+ kObjClassNode = FOUR_CHAR_CODE('cnde'),
+ kObjClassQTiObj = FOUR_CHAR_CODE('cqti'),
+ kObjClassController = FOUR_CHAR_CODE('cctr'),
+ kObjClassImage = FOUR_CHAR_CODE('cimg'),
+ kObjClassScene = FOUR_CHAR_CODE('cscn'),
+ kObjClassDataRefs = FOUR_CHAR_CODE('data'),
+ kObjUserData = FOUR_CHAR_CODE('udta'),
+ kObjClassEvery = FOUR_CHAR_CODE('****'), /* ** */
+ /* obj->objRefType*/
+ kByIndex = FOUR_CHAR_CODE('indx'), /* formAbsolutePosition */
+ kByID = FOUR_CHAR_CODE('ID '), /* formUniqueID */
+ kByName = FOUR_CHAR_CODE('name'), /* formName */
+ kByPosition = FOUR_CHAR_CODE('rele'), /* formRelativePosition */
+ kByType = FOUR_CHAR_CODE('type'), /* ** */
+ /* special values when obj->objRefVal == kByIndex */
+ kIndexFirst = 1,
+ kIndexAll = -1,
+ kIndexLast = -2,
+ kIndexMiddle = -3,
+ kIndexAny = -4, /* ** */
+ /* values when obj->objRefVal == kByPosition */
+ kIndexThis = FOUR_CHAR_CODE('this'),
+ kIndexPrev = FOUR_CHAR_CODE('prev'), /* kAEPrevious */
+ kIndexNext = FOUR_CHAR_CODE('next'), /* kAENext */
+ /* ** */
+ /* obj->objModifier "special" track types (non-media types) */
+ kTrackTypeAny = FOUR_CHAR_CODE('*trk'),
+ kTrackTypeQTVR = FOUR_CHAR_CODE('vrtr'),
+ KTrackTypeMPEGVideo = FOUR_CHAR_CODE('m1a '),
+ KTrackTypeMPEGAudeo = FOUR_CHAR_CODE('m1v '),
+ kTrackTypeChapter = FOUR_CHAR_CODE('chap'), /* kTrackReferenceChapterList */
+ kTrackTypeAudio = FOUR_CHAR_CODE('ears'), /* AudioMediaCharacteristic */
+ kTrackTypeVisual = FOUR_CHAR_CODE('eyes'), /* VisualMediaCharacteristic */
+ kTrackTypeStreaming = FOUR_CHAR_CODE('strm') /* kQTSStreamMediaType*/
+};
+
+
+
+/* == movie manager object spec structures ==*/
+
+/*
+ **
+ == movie object spec ==
+*/
+
+struct ExternalObjectSpec {
+ OSType objClass; /* type of object (movie, track, etc) */
+ OSType objModifier; /* object modifier (track type, etc) */
+ OSType objRefType; /* how to interpret objRefVal (by name, by ID, etc) */
+ SInt32 objRefVal; /* object identifier (ID, index, offset to name, etc) */
+};
+typedef struct ExternalObjectSpec ExternalObjectSpec;
+typedef ExternalObjectSpec * ExternalObjectSpecPtr;
+
+struct MovieObjectSpec {
+ SInt32 count;
+ ExternalObjectSpec objRef[1];
+};
+typedef struct MovieObjectSpec MovieObjectSpec;
+typedef MovieObjectSpec * MovieObjectSpecPtr;
+
+struct MovieObjectRecord {
+ SInt32 data[1];
+};
+typedef struct MovieObjectRecord MovieObjectRecord;
+
+typedef MovieObjectRecord * MovieObjectPtr;
+/* == movie manager object reference structures ==*/
+
+/*
+ **
+ == forward struct declarations for recursively-defined structures
+*/
+typedef struct MovieRef MovieRef;
+typedef MovieRef * MovieRefPtr;
+typedef struct TrackRef TrackRef;
+typedef TrackRef * TrackRefPtr;
+typedef struct SceneRef SceneRef;
+typedef SceneRef * SceneRefPtr;
+typedef struct SpriteRef SpriteRef;
+typedef SpriteRef * SpriteRefPtr;
+typedef struct NodeRef NodeRef;
+typedef NodeRef * NodeRefPtr;
+typedef struct HotSpotRef HotSpotRef;
+typedef HotSpotRef * HotSpotRefPtr;
+typedef struct GenericRef GenericRef;
+typedef GenericRef * GenericRefPtr;
+/* header common to all movie object reference structures*/
+
+struct GenericRef {
+ GenericRefPtr parent;
+ GenericRefPtr child;
+ OSType objType;
+};
+
+
+struct MovieObjectRef {
+ void * reserved;
+ OSType targetType;
+ SInt32 objectCount;
+ union {
+ GenericRefPtr generic;
+ MovieRefPtr movie;
+ TrackRefPtr track;
+ SceneRefPtr scene;
+ SpriteRefPtr sprite;
+ NodeRefPtr node;
+ HotSpotRefPtr hotSpot;
+ } obj;
+};
+typedef struct MovieObjectRef MovieObjectRef;
+typedef MovieObjectRef * MovieObjectRefPtr;
+
+#define MOVIE_OBJECT_REF_TYPE(ref) ((ref) ? (ref)->obj.generic->objType : 0)
+
+
+struct MovieRef {
+ TrackRefPtr parent; /* track or NULL if is root movie*/
+ TrackRefPtr child; /* child track */
+ OSType objType;
+ Movie movie;
+ MovieController controller;
+ DoMCActionUPP mcActionFilterUPP; /* UPP of MovieMedia movie controller's filter proc*/
+ void * mcActionRefcon; /* refcon for same*/
+};
+
+
+struct TrackRef {
+ MovieRefPtr parent; /* parent movie */
+ GenericRefPtr child; /* child scene or node */
+ OSType objType;
+ UInt32 flags;
+ OSType trackType;
+ Track track;
+ SInt32 id;
+ SInt32 index;
+ Media media;
+
+ /* VR only data*/
+ QTVRInstance vrInstance;
+ QTAtomContainer vrWorld;
+};
+
+
+struct SceneRef {
+ TrackRefPtr parent; /* parent track */
+ SpriteRefPtr child; /* child sprite */
+ OSType objType;
+ SInt32 index; /* ID is the same as index*/
+ TimeValue startTime;
+ TimeValue duration;
+ SInt32 currentSceneIndex;
+};
+
+
+struct SpriteRef {
+ SceneRefPtr parent;
+ GenericRefPtr child; /* NULL, sprites have no children */
+ OSType objType;
+ MediaHandler handler;
+ QTAtomID id;
+ SInt16 index;
+};
+
+
+struct NodeRef {
+ TrackRefPtr parent; /* parent track */
+ HotSpotRefPtr child; /* NULL, */
+ OSType objType;
+ QTAtomContainer info;
+ QTAtomID id;
+ SInt16 index;
+ UInt16 flags;
+};
+
+
+struct HotSpotRef {
+ NodeRefPtr parent; /* parent node */
+ GenericRefPtr child; /* NULL, hotspots have no children */
+ OSType objType;
+ QTAtomID id;
+ SInt16 index;
+};
+
+enum {
+ kReserved1 = (1L << 0),
+ kReserved2 = (1L << 1),
+ kHasAudioCharacteristics = (1L << 2),
+ kHasVisualCharacteristics = (1L << 3),
+ kHasTextCharacteristics = (1L << 4),
+ kCanSendVideoCharacteristics = (1L << 5),
+ kProvidesActionsCharacteristics = (1L << 6),
+ kHasNonLinearCharacteristics = (1L << 7),
+ kHasCanStepCharacteristics = (1L << 8),
+ kHasNoDurationCharacteristics = (1L << 9), /* not really "characteristics", but hey...*/
+ kHasSpriteCharacteristics = (1L << 10),
+ kHasVRCharacteristics = (1L << 11),
+ kHasStreamingCharacteristics = (1L << 12),
+ kHasMovieCharacteristics = (1L << 13)
+};
+
+
+
+/* == data types ==*/
+
+enum {
+ kPtrToDataType = (1L << 31),
+ dataType_Boolean = FOUR_CHAR_CODE('bool'),
+ dataType_BooleanPtr = (dataType_Boolean | kPtrToDataType),
+ dataType_UInt8 = FOUR_CHAR_CODE('ui8 '),
+ dataType_UInt8Ptr = (dataType_Boolean | kPtrToDataType),
+ dataType_Int8 = FOUR_CHAR_CODE('i8 '),
+ dataType_Int8Ptr = (dataType_Int8 | kPtrToDataType),
+ dataType_UInt16 = FOUR_CHAR_CODE('ui16'),
+ dataType_UInt16Ptr = (dataType_UInt16 | kPtrToDataType),
+ dataType_Int16 = FOUR_CHAR_CODE('i16 '),
+ dataType_Int16Ptr = (dataType_Int16 | kPtrToDataType),
+ dataType_UInt32 = FOUR_CHAR_CODE('ui32'),
+ dataType_UInt32Ptr = (dataType_UInt32 | kPtrToDataType),
+ dataType_Int32 = FOUR_CHAR_CODE('i32 '),
+ dataType_Int32Ptr = (dataType_Int32 | kPtrToDataType),
+ dataType_FourCharCode = FOUR_CHAR_CODE('code'),
+ dataType_FourCharCodePtr = (dataType_FourCharCode | kPtrToDataType),
+ dataType_RGBColor = FOUR_CHAR_CODE('rgba'),
+ dataType_RGBColorPtr = (dataType_RGBColor | kPtrToDataType),
+ dataType_Fixed = FOUR_CHAR_CODE('fix '),
+ dataType_FixedPtr = (dataType_Fixed | kPtrToDataType),
+ dataType_FloatSingle = FOUR_CHAR_CODE('fsin'),
+ dataType_FloatSinglePtr = (dataType_FloatSingle | kPtrToDataType),
+ dataType_FloatDouble = FOUR_CHAR_CODE('fdbl'),
+ dataType_FloatDoublePtr = (dataType_FloatDouble | kPtrToDataType),
+ dataType_QDPoint = FOUR_CHAR_CODE('poin'),
+ dataType_QDPointPtr = (dataType_QDPoint | kPtrToDataType),
+ dataType_FixedPoint = FOUR_CHAR_CODE('fixp'),
+ dataType_FixedPointPtr = (dataType_FixedPoint | kPtrToDataType),
+ dataType_QDRect = FOUR_CHAR_CODE('rect'),
+ dataType_QDRectPtr = (dataType_QDRect | kPtrToDataType),
+ dataType_QDRegion = FOUR_CHAR_CODE('rgn '),
+ dataType_QDRegionPtr = (dataType_QDRegion | kPtrToDataType),
+ dataType_PString = FOUR_CHAR_CODE('pstr'),
+ dataType_PStringPtr = (dataType_PString | kPtrToDataType),
+ dataType_CString = FOUR_CHAR_CODE('cstr'),
+ dataType_CStringPtr = (dataType_CString | kPtrToDataType),
+ dataType_CharBuff = FOUR_CHAR_CODE('cbuf'),
+ dataType_CharBuffPtr = (dataType_CharBuff | kPtrToDataType),
+ dataType_TextHandle = FOUR_CHAR_CODE('text'),
+ dataType_TextHandlePtr = (dataType_TextHandle | kPtrToDataType),
+ dataType_Matrix = FOUR_CHAR_CODE('matr'),
+ dataType_MatrixPtr = (dataType_Matrix | kPtrToDataType),
+ dataType_Alias = FOUR_CHAR_CODE('alis'),
+ dataType_AliasPtr = (dataType_Alias | kPtrToDataType),
+ dataType_MacDate = FOUR_CHAR_CODE('date'),
+ dataType_MacDatePtr = (dataType_MacDate | kPtrToDataType),
+ dataType_TimeValue = FOUR_CHAR_CODE('time'),
+ dataType_TimeValuePtr = (dataType_TimeValue | kPtrToDataType),
+ dataType_BCDVersion = FOUR_CHAR_CODE('vers'),
+ dataType_BCDVersionPtr = (dataType_BCDVersion | kPtrToDataType),
+ dataType_Opaque = FOUR_CHAR_CODE('void'),
+ dataType_OpaquePtr = (dataType_Opaque | kPtrToDataType),
+ dataType_GraphicsMode = FOUR_CHAR_CODE('gmod'),
+ dataType_GraphicsModePtr = (dataType_GraphicsMode | kPtrToDataType),
+ dataType_GraphicsModeRecord = FOUR_CHAR_CODE('gmrc'),
+ dataType_GraphicsModeRecordPtr = (dataType_GraphicsModeRecord | kPtrToDataType),
+ dataType_QTSProxyPref = FOUR_CHAR_CODE('prxy'),
+ dataType_QTSProxyPrefPtr = (dataType_QTSProxyPref | kPtrToDataType),
+ dataType_QTSTransportPref = FOUR_CHAR_CODE('trns'),
+ dataType_QTSTransportPrefPtr = (dataType_QTSTransportPref | kPtrToDataType),
+ dataType_QTSNoProxyPref = FOUR_CHAR_CODE('nprx'),
+ dataType_QTSNoProxyPrefPtr = (dataType_QTSNoProxyPref | kPtrToDataType),
+ dataType_FindOffset = FOUR_CHAR_CODE('find'),
+ dataType_FindOffsetPtr = (dataType_FindOffset | kPtrToDataType)
+};
+
+
+/* == movie manager notification flags == */
+enum {
+ kNotifyBeforeMessageSend = (1L << 0), /* notify before a message is sent to an object*/
+ kNotifyAfterMessageSend = (1L << 1), /* notify after a message was successfully sent to an object*/
+ kNotifyOnHighLevelEvent = (1L << 2), /* notify before high level events*/
+ kNotifyOnMouseEvent = (1L << 3), /* notify before mouse up/down/enter/exit/trigger events*/
+ kNotifyOnMCActionEvent = (1L << 4) /* notify before looking at mcAction events*/
+};
+
+
+/* == movie manager notification types ==*/
+enum {
+ /* ***/
+ /* notification types*/
+ kNotifyTypeHighLevelEvent = FOUR_CHAR_CODE('high'), /* hight level event (HighLevelEventRecord *)*/
+ kNotifyTypeMCAction = FOUR_CHAR_CODE('mcac'), /* mcAction notification (MMgrControllerEventRecord *)*/
+ kNotifyMouseEvent = FOUR_CHAR_CODE('mous'), /* mouse event*/
+ kNotifyTypePreMessageSend = FOUR_CHAR_CODE('prms'), /* message send (MovieObjectRef *)*/
+ kNotifyTypePostMessageSend = FOUR_CHAR_CODE('poms') /* */
+};
+
+/* == movie manager notification IDs ==*/
+enum {
+ /* ***/
+ /* "high level" events*/
+ kNotifyOpenMovie = FOUR_CHAR_CODE('open'),
+ kNotifyCloseMovie = FOUR_CHAR_CODE('clos'),
+ kNotifyEnteringNode = FOUR_CHAR_CODE('vren'), /* entering node, data = new node ID (SInt32)*/
+ kNotifyLeavingNode = FOUR_CHAR_CODE('vrlv'), /* leaving VR node, data = leave node data (LeaveNodeRecord *)*/
+ /* ?? */
+ /* ????? does it make sense to send these notifications? User could use the notification to set the*/
+ /* ????? movieID/movieName property, which would then be returned...*/
+ /*@@@@@ kGetExternalMovieID,*/
+ /*@@@@@ kGetExternalMovieName,*/
+ /* ?????*/
+ kNotifyEdited = FOUR_CHAR_CODE('edit'), /* movie has been edited*/
+ kNotifyLinkToURL = FOUR_CHAR_CODE('lurl'), /* the movie wants to link to a url, data = URL (handle of C string)*/
+ kNotifyRateChanged = FOUR_CHAR_CODE('rate'), /* the movie's rate has changed, data = rate (Fixed)*/
+ kNotifyTimeChanged = FOUR_CHAR_CODE('ctim'), /* the movie's time has changed, data = new time (SInt32)*/
+ kNotifyVolumeChanged = FOUR_CHAR_CODE('cvol'), /* the movie's volume has changed, data = new volume (SInt32)*/
+ kNotifyShowStatusString = FOUR_CHAR_CODE('stts'), /* a movie status message, data = status string (handle of C string)*/
+ kNotifyShowMessageString = FOUR_CHAR_CODE('smsg'), /* a sprite message string (mcActionShowMessageString), data = string (StringPtr)*/
+ kNotifySpriteCustomAction = FOUR_CHAR_CODE('scst'), /* a sprite custom app wired event (kActionApplicationNumberAndString), data = params (SpriteDebugMessage *)*/
+ kNotifySpriteDebugStr = FOUR_CHAR_CODE('sdbg'), /* a sprite debugstr wired event (kActionDebugStr), param = string (stringPtr)*/
+ /* ***/
+ /* mouse event notification*/
+ kNotifyMouseEnter = FOUR_CHAR_CODE('entr'), /* mouse has entered a movie object, data = object ID (SInt32)*/
+ kNotifyMouseWithin = FOUR_CHAR_CODE('mwin'), /* mouse is still within a movie object, data = object ID (SInt32)*/
+ kNotifyMouseExit = FOUR_CHAR_CODE('exit'), /* mouse has left the building, data = object ID (SInt32)*/
+ kNotifyMouseDown = FOUR_CHAR_CODE('clik'), /* mouse clicked within a movie object, data = object ID (SInt32)*/
+ kNotifyMouseStillDown = FOUR_CHAR_CODE('stld'), /* mouse is still down within a movie object, data = object ID (SInt32)*/
+ kNotifyMouseTrigger = FOUR_CHAR_CODE('trig'), /* mouse released within the movie object it went down in, data = object ID (SInt32)*/
+ kNotifyMouseUp = FOUR_CHAR_CODE('cend') /* mouse released outside of the movie object it went down in, data = object ID (SInt32)*/
+};
+
+
+/*
+ **
+ == movie manager event record ==
+*/
+
+struct MMgrEventRecord {
+ OSType objClass; /* class of event target object*/
+ SInt32 when; /* ticks at time of event*/
+ Point where; /* local mouse loc at time of event*/
+ UInt32 flags;
+};
+typedef struct MMgrEventRecord MMgrEventRecord;
+typedef MMgrEventRecord * MMgrEventRecordPtr;
+/*
+ **
+ == structure passed to notification proc for a controller filter event notification ==
+*/
+
+struct MMgrControllerEventRecord {
+ void * params; /* param normally passed to controller filter for this action*/
+ SInt16 action; /* action*/
+};
+typedef struct MMgrControllerEventRecord MMgrControllerEventRecord;
+typedef MMgrControllerEventRecord * MMgrControllerEventRecordPtr;
+/*
+ **
+ == structure passed to notification proc for pre/post message send ==
+*/
+
+struct MMgrMessageNotificationRecord {
+ MovieObjectRef * targetObject; /* resolved movie object target*/
+ MessageClass msgClass; /* message class*/
+ MessageID msgID; /* message ID*/
+ PropertyParams * params; /* message params*/
+};
+typedef struct MMgrMessageNotificationRecord MMgrMessageNotificationRecord;
+typedef MMgrMessageNotificationRecord * MMgrMessageNotificationRecordPtr;
+/*
+ **
+ == movie manager hight level event notification record ==
+*/
+
+struct HighLevelEventRecord {
+ OSType eventID;
+ void * data; /* event specific params*/
+};
+typedef struct HighLevelEventRecord HighLevelEventRecord;
+
+/*
+ **
+ == structure passed to notification proc for a sprite kNotifySpriteCustomAction (kActionApplicationNumberAndString) notification ==
+*/
+
+struct SpriteDebugMessage {
+ SInt32 number; /* sprite action param 1, a long*/
+ Handle stringHandle; /* sprite action param 2, a Pascal string*/
+};
+typedef struct SpriteDebugMessage SpriteDebugMessage;
+typedef SpriteDebugMessage * SpriteDebugMessagePtr;
+/*
+ **
+ == structure passed to notification proc upon leaving a VR node ==
+*/
+
+struct LeaveNodeRecord {
+ UInt32 fromNodeID; /* the id of the node we're about to leave*/
+ UInt32 toNodeID; /* the id of the node we're about to enter*/
+};
+typedef struct LeaveNodeRecord LeaveNodeRecord;
+typedef LeaveNodeRecord * LeaveNodeRecordPtr;
+/* == movie manager errors == */
+enum {
+ errInvalidTrackType = -2300,
+ errCurrentSceneOnly = -2301,
+ errNoSuchScene = -2302,
+ errCantCoerceValue = -2303,
+ errPropNotSupported = -2304,
+ errCmdNotSupported = -2305,
+ errParamCountOutOfBounds = -2306,
+ errNotImplementedYet = -2307,
+ errBadLanguageForThisMovie = -2308,
+ errReadOnly = -2319,
+ errInvalidTimeForThisMovie = -2310,
+ errNoExporterSet = -2311,
+ errMovieNotEditable = -2312
+};
+
+/*
+ **
+ == messaging callback ==
+*/
+
+typedef CALLBACK_API( OSErr , MovieManagerFilterProcPtr )(Movie movie, MovieController mc, OSType eventType, MMgrEventRecord *evt, void *evtData, void *refCon);
+typedef STACK_UPP_TYPE(MovieManagerFilterProcPtr) MovieManagerFilterUPP;
+/* == selector ranges == */
+enum {
+ selectorRange_MooVMgr = 0x0000
+};
+
+
+enum {
+ kMovieManagerCompType = FOUR_CHAR_CODE('mngr'),
+ kMovieManagerSubType = FOUR_CHAR_CODE('moov')
+};
+
+enum {
+ kMooVMgrSetMovieSelect = selectorRange_MooVMgr + 1,
+ kMooVMgrGetMovieSelect = 0x0002,
+ kMooVMgrSetMovieControllerSelect = 0x0003,
+ kMooVMgrGetMovieControllerSelect = 0x0004,
+ kMooVMgrObjectExistsSelect = 0x0005,
+ kMooVMgrCountObjectsSelect = 0x0006,
+ kMooVMgrSendMessageToObjectSelect = 0x0007,
+ kMooVMgrMapNameToIDSelect = 0x0008,
+ kMooVMgrCoerceValueToTypeSelect = 0x0009,
+ kMooVMgrSetNotificationFlagsSelect = 0x000A,
+ kMooVMgrGetNotificationFlagsSelect = 0x000B,
+ kMooVMgrSetNotificationProcSelect = 0x000C,
+ kMooVMgrGetObjectProperty = 0x000D,
+ kMooVMgrSetObjectProperty = 0x000E
+};
+
+
+
+/* = standard component stuff = */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( ComponentResult )
+MovieManagerOpen (MovieManagerComponent moovMgr,
+ ComponentInstance self) FIVEWORDINLINE(0x2F3C, 0x0004, 0xFFFF, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieManagerClose (MovieManagerComponent moovMgr,
+ ComponentInstance self) FIVEWORDINLINE(0x2F3C, 0x0004, 0xFFFE, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieManagerCanDo (MovieManagerComponent moovMgr,
+ SInt16 ftnNumber) FIVEWORDINLINE(0x2F3C, 0x0002, 0xFFFD, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieManagerVersion (MovieManagerComponent moovMgr) FIVEWORDINLINE(0x2F3C, 0x0000, 0xFFFC, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieManagerTarget (MovieManagerComponent moovMgr,
+ ComponentInstance target) FIVEWORDINLINE(0x2F3C, 0x0004, 0xFFFA, 0x7000, 0xA82A);
+
+
+/* = initialization, hierarchy, editing = */
+
+EXTERN_API( ComponentResult )
+MovieManagerSetMovie (MovieManagerComponent moovMgr,
+ Movie movie) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0001, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieManagerGetMovie (MovieManagerComponent moovMgr,
+ Movie * movie) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0002, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieManagerSetMovieController (MovieManagerComponent moovMgr,
+ MovieController controller) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0003, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieManagerGetMovieController (MovieManagerComponent moovMgr,
+ MovieController * controller) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0004, 0x7000, 0xA82A);
+
+
+/* = movie objects = */
+
+EXTERN_API( ComponentResult )
+MovieManagerObjectExists (MovieManagerComponent moovMgr,
+ MovieObjectSpec * objectSpec,
+ Boolean * exists) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0005, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieManagerCountObjects (MovieManagerComponent moovMgr,
+ OSType countClass,
+ MovieObjectSpec * objectSpec,
+ SInt32 * count) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0006, 0x7000, 0xA82A);
+
+
+/* = property/message = */
+
+EXTERN_API( ComponentResult )
+MovieManagerSendMessageToObject (MovieManagerComponent moovMgr,
+ MovieObjectSpec * objectSpec,
+ MessageClass msgClass,
+ MessageID msgID,
+ PropertyParams * params) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0007, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieManagerMapNameToID (MovieManagerComponent moovMgr,
+ StringPtr name,
+ OSType * id) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0008, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieManagerCoerceValueToType (MovieManagerComponent moovMgr,
+ PropArgU * dst,
+ ValueFormat dstType,
+ PropArgU * src) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0009, 0x7000, 0xA82A);
+
+/* = notification */
+EXTERN_API( ComponentResult )
+MovieManagerSetNotificationFlags (MovieManagerComponent moovMgr,
+ UInt32 flags,
+ UInt32 flagsMask) FIVEWORDINLINE(0x2F3C, 0x0008, 0x000A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieManagerGetNotificationFlags (MovieManagerComponent moovMgr,
+ UInt32 * flags) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieManagerSetNotificationProc (MovieManagerComponent moovMgr,
+ MovieManagerFilterUPP callback,
+ const void * refCon,
+ UInt32 flags) FIVEWORDINLINE(0x2F3C, 0x000C, 0x000C, 0x7000, 0xA82A);
+
+
+/* = obsolete, to be removed after OS X beta*/
+EXTERN_API( ComponentResult )
+MovieManagerGetObjectProperty (MovieManagerComponent moovMgr,
+ MovieObjectSpec * objectSpec,
+ PropertyID propID,
+ PropertyParams * params) FIVEWORDINLINE(0x2F3C, 0x000C, 0x000D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieManagerSetObjectProperty (MovieManagerComponent moovMgr,
+ MovieObjectSpec * objectSpec,
+ PropertyID propID,
+ PropertyParams * params) FIVEWORDINLINE(0x2F3C, 0x000C, 0x000E, 0x7000, 0xA82A);
+
+
+
+
+/* selectors for component calls */
+enum {
+ kMovieManagerOpenSelect = -1,
+ kMovieManagerCloseSelect = -2,
+ kMovieManagerCanDoSelect = -3,
+ kMovieManagerVersionSelect = -4,
+ kMovieManagerTargetSelect = -6,
+ kMovieManagerSetMovieSelect = 0x0001,
+ kMovieManagerGetMovieSelect = 0x0002,
+ kMovieManagerSetMovieControllerSelect = 0x0003,
+ kMovieManagerGetMovieControllerSelect = 0x0004,
+ kMovieManagerObjectExistsSelect = 0x0005,
+ kMovieManagerCountObjectsSelect = 0x0006,
+ kMovieManagerSendMessageToObjectSelect = 0x0007,
+ kMovieManagerMapNameToIDSelect = 0x0008,
+ kMovieManagerCoerceValueToTypeSelect = 0x0009,
+ kMovieManagerSetNotificationFlagsSelect = 0x000A,
+ kMovieManagerGetNotificationFlagsSelect = 0x000B,
+ kMovieManagerSetNotificationProcSelect = 0x000C,
+ kMovieManagerGetObjectPropertySelect = 0x000D,
+ kMovieManagerSetObjectPropertySelect = 0x000E
+};
+#endif /* CALL_NOT_IN_CARBON */
+
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(MovieManagerFilterUPP)
+ NewMovieManagerFilterUPP (MovieManagerFilterProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeMovieManagerFilterUPP (MovieManagerFilterUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeMovieManagerFilterUPP (Movie movie,
+ MovieController mc,
+ OSType eventType,
+ MMgrEventRecord * evt,
+ void * evtData,
+ void * refCon,
+ MovieManagerFilterUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppMovieManagerFilterProcInfo = 0x0003FFE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewMovieManagerFilterUPP(userRoutine) (MovieManagerFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMovieManagerFilterProcInfo, GetCurrentArchitecture())
+ #define DisposeMovieManagerFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeMovieManagerFilterUPP(movie, mc, eventType, evt, evtData, refCon, userUPP) (OSErr)CALL_SIX_PARAMETER_UPP((userUPP), uppMovieManagerFilterProcInfo, (movie), (mc), (eventType), (evt), (evtData), (refCon))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewMovieManagerFilterProc(userRoutine) NewMovieManagerFilterUPP(userRoutine)
+#define CallMovieManagerFilterProc(userRoutine, movie, mc, eventType, evt, evtData, refCon) InvokeMovieManagerFilterUPP(movie, mc, eventType, evt, evtData, refCon, userRoutine)
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MOVIEMANAGER__ */
+
diff --git a/include/qt/Movies.h b/include/qt/Movies.h
new file mode 100644
index 000000000..f938dc9c1
--- /dev/null
+++ b/include/qt/Movies.h
@@ -0,0 +1,6401 @@
+/*
+ File: Movies.h
+
+ Contains: QuickTime Interfaces.
+
+ Version: Technology: QuickTime 6.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1990-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __MOVIES__
+#define __MOVIES__
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#ifndef __ALIASES__
+#include "Aliases.h"
+#endif
+
+#ifndef __EVENTS__
+#include "Events.h"
+#endif
+
+#ifndef __MENUS__
+#include "Menus.h"
+#endif
+
+#ifndef __COMPONENTS__
+#include "Components.h"
+#endif
+
+#ifndef __IMAGECOMPRESSION__
+#include "ImageCompression.h"
+#endif
+
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+
+/* "kFix1" is defined in FixMath as "fixed1" */
+/* error codes are in Errors.[haa] */
+/* gestalt codes are in Gestalt.[hpa] */
+enum {
+ MovieFileType = FOUR_CHAR_CODE('MooV'),
+ MovieScrapType = FOUR_CHAR_CODE('moov')
+};
+
+enum {
+ MovieResourceType = FOUR_CHAR_CODE('moov'),
+ MovieForwardPointerResourceType = FOUR_CHAR_CODE('fore'),
+ MovieBackwardPointerResourceType = FOUR_CHAR_CODE('back')
+};
+
+enum {
+ MovieResourceAtomType = FOUR_CHAR_CODE('moov'),
+ MovieDataAtomType = FOUR_CHAR_CODE('mdat'),
+ FreeAtomType = FOUR_CHAR_CODE('free'),
+ SkipAtomType = FOUR_CHAR_CODE('skip'),
+ WideAtomPlaceholderType = FOUR_CHAR_CODE('wide')
+};
+
+enum {
+ MediaHandlerType = FOUR_CHAR_CODE('mhlr'),
+ DataHandlerType = FOUR_CHAR_CODE('dhlr')
+};
+
+enum {
+ VideoMediaType = FOUR_CHAR_CODE('vide'),
+ SoundMediaType = FOUR_CHAR_CODE('soun'),
+ TextMediaType = FOUR_CHAR_CODE('text'),
+ BaseMediaType = FOUR_CHAR_CODE('gnrc'),
+ MPEGMediaType = FOUR_CHAR_CODE('MPEG'),
+ MusicMediaType = FOUR_CHAR_CODE('musi'),
+ TimeCodeMediaType = FOUR_CHAR_CODE('tmcd'),
+ SpriteMediaType = FOUR_CHAR_CODE('sprt'),
+ FlashMediaType = FOUR_CHAR_CODE('flsh'),
+ MovieMediaType = FOUR_CHAR_CODE('moov'),
+ TweenMediaType = FOUR_CHAR_CODE('twen'),
+ ThreeDeeMediaType = FOUR_CHAR_CODE('qd3d'),
+ SkinMediaType = FOUR_CHAR_CODE('skin'),
+ HandleDataHandlerSubType = FOUR_CHAR_CODE('hndl'),
+ PointerDataHandlerSubType = FOUR_CHAR_CODE('ptr '),
+ NullDataHandlerSubType = FOUR_CHAR_CODE('null'),
+ ResourceDataHandlerSubType = FOUR_CHAR_CODE('rsrc'),
+ URLDataHandlerSubType = FOUR_CHAR_CODE('url '),
+ WiredActionHandlerType = FOUR_CHAR_CODE('wire')
+};
+
+enum {
+ VisualMediaCharacteristic = FOUR_CHAR_CODE('eyes'),
+ AudioMediaCharacteristic = FOUR_CHAR_CODE('ears'),
+ kCharacteristicCanSendVideo = FOUR_CHAR_CODE('vsnd'),
+ kCharacteristicProvidesActions = FOUR_CHAR_CODE('actn'),
+ kCharacteristicNonLinear = FOUR_CHAR_CODE('nonl'),
+ kCharacteristicCanStep = FOUR_CHAR_CODE('step'),
+ kCharacteristicHasNoDuration = FOUR_CHAR_CODE('noti'),
+ kCharacteristicHasSkinData = FOUR_CHAR_CODE('skin'),
+ kCharacteristicProvidesKeyFocus = FOUR_CHAR_CODE('keyf')
+};
+
+enum {
+ kUserDataMovieControllerType = FOUR_CHAR_CODE('ctyp'),
+ kUserDataName = FOUR_CHAR_CODE('name'),
+ kUserDataTextAlbum = FOUR_CHAR_CODE('©alb'),
+ kUserDataTextArtist = FOUR_CHAR_CODE('©ART'),
+ kUserDataTextAuthor = FOUR_CHAR_CODE('©aut'),
+ kUserDataTextChapter = FOUR_CHAR_CODE('©chp'),
+ kUserDataTextComment = FOUR_CHAR_CODE('©cmt'),
+ kUserDataTextComposer = FOUR_CHAR_CODE('©com'),
+ kUserDataTextCopyright = FOUR_CHAR_CODE('©cpy'),
+ kUserDataTextCreationDate = FOUR_CHAR_CODE('©day'),
+ kUserDataTextDescription = FOUR_CHAR_CODE('©des'),
+ kUserDataTextDirector = FOUR_CHAR_CODE('©dir'),
+ kUserDataTextDisclaimer = FOUR_CHAR_CODE('©dis'),
+ kUserDataTextEncodedBy = FOUR_CHAR_CODE('©enc'),
+ kUserDataTextFullName = FOUR_CHAR_CODE('©nam'),
+ kUserDataTextGenre = FOUR_CHAR_CODE('©gen'),
+ kUserDataTextHostComputer = FOUR_CHAR_CODE('©hst'),
+ kUserDataTextInformation = FOUR_CHAR_CODE('©inf'),
+ kUserDataTextKeywords = FOUR_CHAR_CODE('©key'),
+ kUserDataTextMake = FOUR_CHAR_CODE('©mak'),
+ kUserDataTextModel = FOUR_CHAR_CODE('©mod'),
+ kUserDataTextOriginalArtist = FOUR_CHAR_CODE('©ope'),
+ kUserDataTextOriginalFormat = FOUR_CHAR_CODE('©fmt'),
+ kUserDataTextOriginalSource = FOUR_CHAR_CODE('©src'),
+ kUserDataTextPerformers = FOUR_CHAR_CODE('©prf'),
+ kUserDataTextProducer = FOUR_CHAR_CODE('©prd'),
+ kUserDataTextProduct = FOUR_CHAR_CODE('©PRD'),
+ kUserDataTextSoftware = FOUR_CHAR_CODE('©swr'),
+ kUserDataTextSpecialPlaybackRequirements = FOUR_CHAR_CODE('©req'),
+ kUserDataTextTrack = FOUR_CHAR_CODE('©trk'),
+ kUserDataTextWarning = FOUR_CHAR_CODE('©wrn'),
+ kUserDataTextWriter = FOUR_CHAR_CODE('©wrt'),
+ kUserDataTextURLLink = FOUR_CHAR_CODE('©url'),
+ kUserDataTextEditDate1 = FOUR_CHAR_CODE('©ed1')
+};
+
+enum {
+ kUserDataUnicodeBit = 1L << 7
+};
+
+enum {
+ DoTheRightThing = 0
+};
+
+
+
+struct MovieRecord {
+ long data[1];
+};
+typedef struct MovieRecord MovieRecord;
+
+typedef MovieRecord * Movie;
+typedef Movie * MoviePtr;
+
+struct TrackRecord {
+ long data[1];
+};
+typedef struct TrackRecord TrackRecord;
+
+typedef TrackRecord * Track;
+
+struct MediaRecord {
+ long data[1];
+};
+typedef struct MediaRecord MediaRecord;
+
+typedef MediaRecord * Media;
+
+struct UserDataRecord {
+ long data[1];
+};
+typedef struct UserDataRecord UserDataRecord;
+
+typedef UserDataRecord * UserData;
+
+struct TrackEditStateRecord {
+ long data[1];
+};
+typedef struct TrackEditStateRecord TrackEditStateRecord;
+
+typedef TrackEditStateRecord * TrackEditState;
+
+struct MovieEditStateRecord {
+ long data[1];
+};
+typedef struct MovieEditStateRecord MovieEditStateRecord;
+
+typedef MovieEditStateRecord * MovieEditState;
+
+struct QTRestrictionSetRecord {
+ long data[1];
+};
+typedef struct QTRestrictionSetRecord QTRestrictionSetRecord;
+
+typedef QTRestrictionSetRecord * QTRestrictionSet;
+
+struct SpriteWorldRecord {
+ long data[1];
+};
+typedef struct SpriteWorldRecord SpriteWorldRecord;
+
+typedef SpriteWorldRecord * SpriteWorld;
+
+struct SpriteRecord {
+ long data[1];
+};
+typedef struct SpriteRecord SpriteRecord;
+
+typedef SpriteRecord * Sprite;
+
+struct QTTweenerRecord {
+ long data[1];
+};
+typedef struct QTTweenerRecord QTTweenerRecord;
+
+typedef QTTweenerRecord * QTTweener;
+
+struct SampleDescription {
+ long descSize;
+ long dataFormat;
+ long resvd1;
+ short resvd2;
+ short dataRefIndex;
+};
+typedef struct SampleDescription SampleDescription;
+typedef SampleDescription * SampleDescriptionPtr;
+typedef SampleDescriptionPtr * SampleDescriptionHandle;
+typedef struct OpaqueQTBandwidthReference* QTBandwidthReference;
+typedef struct OpaqueQTScheduledBandwidthReference* QTScheduledBandwidthReference;
+enum {
+ kQTNetworkStatusNoNetwork = -2,
+ kQTNetworkStatusUncertain = -1,
+ kQTNetworkStatusNotConnected = 0,
+ kQTNetworkStatusConnected = 1
+};
+
+
+typedef Handle QTAtomContainer;
+typedef long QTAtom;
+typedef long QTAtomType;
+typedef long QTAtomID;
+/* QTFloatDouble is the 64-bit IEEE-754 standard*/
+typedef Float64 QTFloatDouble;
+/* QTFloatSingle is the 32-bit IEEE-754 standard*/
+typedef Float32 QTFloatSingle;
+
+
+
+struct SoundDescription {
+ long descSize; /* total size of SoundDescription including extra data */
+ long dataFormat; /* sound format */
+ long resvd1; /* reserved for apple use. set to zero */
+ short resvd2; /* reserved for apple use. set to zero */
+ short dataRefIndex;
+ short version; /* which version is this data */
+ short revlevel; /* what version of that codec did this */
+ long vendor; /* whose codec compressed this data */
+ short numChannels; /* number of channels of sound */
+ short sampleSize; /* number of bits per sample */
+ short compressionID; /* unused. set to zero. */
+ short packetSize; /* unused. set to zero. */
+ UnsignedFixed sampleRate; /* sample rate sound is captured at */
+};
+typedef struct SoundDescription SoundDescription;
+typedef SoundDescription * SoundDescriptionPtr;
+typedef SoundDescriptionPtr * SoundDescriptionHandle;
+/* version 1 of the SoundDescription record*/
+
+struct SoundDescriptionV1 {
+ /* original fields*/
+ SoundDescription desc;
+ /* fixed compression ratio information*/
+ unsigned long samplesPerPacket;
+ unsigned long bytesPerPacket;
+ unsigned long bytesPerFrame;
+ unsigned long bytesPerSample;
+ /* additional atom based fields ([long size, long type, some data], repeat)*/
+};
+typedef struct SoundDescriptionV1 SoundDescriptionV1;
+typedef SoundDescriptionV1 * SoundDescriptionV1Ptr;
+typedef SoundDescriptionV1Ptr * SoundDescriptionV1Handle;
+
+struct TextDescription {
+ long descSize; /* Total size of TextDescription*/
+ long dataFormat; /* 'text'*/
+
+ long resvd1;
+ short resvd2;
+ short dataRefIndex;
+
+ long displayFlags; /* see enum below for flag values*/
+
+ long textJustification; /* Can be: teCenter,teFlush -Default,-Right,-Left*/
+
+ RGBColor bgColor; /* Background color*/
+
+ Rect defaultTextBox; /* Location to place the text within the track bounds*/
+ ScrpSTElement defaultStyle; /* Default style (struct defined in TextEdit.h)*/
+ char defaultFontName[1]; /* Font Name (pascal string - struct extended to fit) */
+};
+typedef struct TextDescription TextDescription;
+typedef TextDescription * TextDescriptionPtr;
+typedef TextDescriptionPtr * TextDescriptionHandle;
+
+struct SpriteDescription {
+ long descSize; /* total size of SpriteDescription including extra data */
+ long dataFormat; /* */
+ long resvd1; /* reserved for apple use */
+ short resvd2;
+ short dataRefIndex;
+ long version; /* which version is this data */
+ OSType decompressorType; /* which decompressor to use, 0 for no decompression */
+ long sampleFlags; /* how to interpret samples */
+};
+typedef struct SpriteDescription SpriteDescription;
+typedef SpriteDescription * SpriteDescriptionPtr;
+typedef SpriteDescriptionPtr * SpriteDescriptionHandle;
+
+struct FlashDescription {
+ long descSize;
+ long dataFormat;
+ long resvd1;
+ short resvd2;
+ short dataRefIndex;
+ long version; /* which version is this data */
+ OSType decompressorType; /* which decompressor to use, 0 for no decompression */
+ long flags;
+};
+typedef struct FlashDescription FlashDescription;
+typedef FlashDescription * FlashDescriptionPtr;
+typedef FlashDescriptionPtr * FlashDescriptionHandle;
+
+struct ThreeDeeDescription {
+ long descSize; /* total size of ThreeDeeDescription including extra data */
+ long dataFormat; /* */
+ long resvd1; /* reserved for apple use */
+ short resvd2;
+ short dataRefIndex;
+ long version; /* which version is this data */
+ long rendererType; /* which renderer to use, 0 for default */
+ long decompressorType; /* which decompressor to use, 0 for default */
+};
+typedef struct ThreeDeeDescription ThreeDeeDescription;
+typedef ThreeDeeDescription * ThreeDeeDescriptionPtr;
+typedef ThreeDeeDescriptionPtr * ThreeDeeDescriptionHandle;
+
+struct DataReferenceRecord {
+ OSType dataRefType;
+ Handle dataRef;
+};
+typedef struct DataReferenceRecord DataReferenceRecord;
+
+typedef DataReferenceRecord * DataReferencePtr;
+/*--------------------------
+ Music Sample Description
+--------------------------*/
+
+struct MusicDescription {
+ long descSize;
+ long dataFormat; /* 'musi' */
+
+ long resvd1;
+ short resvd2;
+ short dataRefIndex;
+
+ long musicFlags;
+ unsigned long headerData[1]; /* variable size! */
+
+};
+typedef struct MusicDescription MusicDescription;
+typedef MusicDescription * MusicDescriptionPtr;
+typedef MusicDescriptionPtr * MusicDescriptionHandle;
+enum {
+ kMusicFlagDontPlay2Soft = 1L << 0,
+ kMusicFlagDontSlaveToMovie = 1L << 1
+};
+
+
+enum {
+ dfDontDisplay = 1 << 0, /* Don't display the text*/
+ dfDontAutoScale = 1 << 1, /* Don't scale text as track bounds grows or shrinks*/
+ dfClipToTextBox = 1 << 2, /* Clip update to the textbox*/
+ dfUseMovieBGColor = 1 << 3, /* Set text background to movie's background color*/
+ dfShrinkTextBoxToFit = 1 << 4, /* Compute minimum box to fit the sample*/
+ dfScrollIn = 1 << 5, /* Scroll text in until last of text is in view */
+ dfScrollOut = 1 << 6, /* Scroll text out until last of text is gone (if both set, scroll in then out)*/
+ dfHorizScroll = 1 << 7, /* Scroll text horizontally (otherwise it's vertical)*/
+ dfReverseScroll = 1 << 8, /* vert: scroll down rather than up; horiz: scroll backwards (justfication dependent)*/
+ dfContinuousScroll = 1 << 9, /* new samples cause previous samples to scroll out */
+ dfFlowHoriz = 1 << 10, /* horiz scroll text flows in textbox rather than extend to right */
+ dfContinuousKaraoke = 1 << 11, /* ignore begin offset, hilite everything up to the end offset(karaoke)*/
+ dfDropShadow = 1 << 12, /* display text with a drop shadow */
+ dfAntiAlias = 1 << 13, /* attempt to display text anti aliased*/
+ dfKeyedText = 1 << 14, /* key the text over background*/
+ dfInverseHilite = 1 << 15, /* Use inverse hiliting rather than using hilite color*/
+ dfTextColorHilite = 1 << 16 /* changes text color in place of hiliting. */
+};
+
+enum {
+ searchTextDontGoToFoundTime = 1L << 16,
+ searchTextDontHiliteFoundText = 1L << 17,
+ searchTextOneTrackOnly = 1L << 18,
+ searchTextEnabledTracksOnly = 1L << 19
+};
+
+/*use these with the text property routines*/
+enum {
+ /* set property parameter / get property parameter*/
+ kTextTextHandle = 1, /* Handle / preallocated Handle*/
+ kTextTextPtr = 2, /* Pointer*/
+ kTextTEStyle = 3, /* TextStyle * / TextStyle **/
+ kTextSelection = 4, /* long [2] / long [2]*/
+ kTextBackColor = 5, /* RGBColor * / RGBColor **/
+ kTextForeColor = 6, /* RGBColor * / RGBColor **/
+ kTextFace = 7, /* long / long **/
+ kTextFont = 8, /* long / long **/
+ kTextSize = 9, /* long / long **/
+ kTextAlignment = 10, /* short * / short **/
+ kTextHilite = 11, /* hiliteRecord * / hiliteRecord **/
+ kTextDropShadow = 12, /* dropShadowRecord * / dropShadowRecord **/
+ kTextDisplayFlags = 13, /* long / long **/
+ kTextScroll = 14, /* TimeValue * / TimeValue **/
+ kTextRelativeScroll = 15, /* Point **/
+ kTextHyperTextFace = 16, /* hyperTextSetFace * / hyperTextSetFace **/
+ kTextHyperTextColor = 17, /* hyperTextSetColor * / hyperTextSetColor **/
+ kTextKeyEntry = 18, /* short*/
+ kTextMouseDown = 19, /* Point **/
+ kTextTextBox = 20, /* Rect * / Rect **/
+ kTextEditState = 21, /* short / short **/
+ kTextLength = 22 /* / long **/
+};
+
+enum {
+ k3DMediaRendererEntry = FOUR_CHAR_CODE('rend'),
+ k3DMediaRendererName = FOUR_CHAR_CODE('name'),
+ k3DMediaRendererCode = FOUR_CHAR_CODE('rcod')
+};
+
+/* progress messages */
+enum {
+ movieProgressOpen = 0,
+ movieProgressUpdatePercent = 1,
+ movieProgressClose = 2
+};
+
+/* progress operations */
+enum {
+ progressOpFlatten = 1,
+ progressOpInsertTrackSegment = 2,
+ progressOpInsertMovieSegment = 3,
+ progressOpPaste = 4,
+ progressOpAddMovieSelection = 5,
+ progressOpCopy = 6,
+ progressOpCut = 7,
+ progressOpLoadMovieIntoRam = 8,
+ progressOpLoadTrackIntoRam = 9,
+ progressOpLoadMediaIntoRam = 10,
+ progressOpImportMovie = 11,
+ progressOpExportMovie = 12
+};
+
+enum {
+ mediaQualityDraft = 0x0000,
+ mediaQualityNormal = 0x0040,
+ mediaQualityBetter = 0x0080,
+ mediaQualityBest = 0x00C0
+};
+
+/*****
+ Interactive Sprites Support
+*****/
+/* QTEventRecord flags*/
+enum {
+ kQTEventPayloadIsQTList = 1L << 0
+};
+
+
+struct QTEventRecord {
+ long version;
+ OSType eventType;
+ Point where;
+ long flags;
+ long payloadRefcon; /* from here down only present if version >= 2*/
+ long param1;
+ long param2;
+ long param3;
+};
+typedef struct QTEventRecord QTEventRecord;
+typedef QTEventRecord * QTEventRecordPtr;
+
+struct QTAtomSpec {
+ QTAtomContainer container;
+ QTAtom atom;
+};
+typedef struct QTAtomSpec QTAtomSpec;
+typedef QTAtomSpec * QTAtomSpecPtr;
+
+struct ResolvedQTEventSpec {
+ QTAtomSpec actionAtom;
+ Track targetTrack;
+ long targetRefCon;
+};
+typedef struct ResolvedQTEventSpec ResolvedQTEventSpec;
+typedef ResolvedQTEventSpec * ResolvedQTEventSpecPtr;
+
+/* action constants */
+enum {
+ kActionMovieSetVolume = 1024, /* (short movieVolume) */
+ kActionMovieSetRate = 1025, /* (Fixed rate) */
+ kActionMovieSetLoopingFlags = 1026, /* (long loopingFlags) */
+ kActionMovieGoToTime = 1027, /* (TimeValue time) */
+ kActionMovieGoToTimeByName = 1028, /* (Str255 timeName) */
+ kActionMovieGoToBeginning = 1029, /* no params */
+ kActionMovieGoToEnd = 1030, /* no params */
+ kActionMovieStepForward = 1031, /* no params */
+ kActionMovieStepBackward = 1032, /* no params */
+ kActionMovieSetSelection = 1033, /* (TimeValue startTime, TimeValue endTime) */
+ kActionMovieSetSelectionByName = 1034, /* (Str255 startTimeName, Str255 endTimeName) */
+ kActionMoviePlaySelection = 1035, /* (Boolean selectionOnly) */
+ kActionMovieSetLanguage = 1036, /* (long language) */
+ kActionMovieChanged = 1037, /* no params */
+ kActionMovieRestartAtTime = 1038, /* (TimeValue startTime, Fixed rate) */
+ kActionMovieGotoNextChapter = 1039, /* no params */
+ kActionMovieGotoPreviousChapter = 1040, /* no params */
+ kActionMovieGotoFirstChapter = 1041, /* no params */
+ kActionMovieGotoLastChapter = 1042, /* no params */
+ kActionMovieGotoChapterByIndex = 1043, /* ( short index ) */
+ kActionMovieSetScale = 1044, /* (Fixed xScale, Fixed yScale) */
+ kActionTrackSetVolume = 2048, /* (short volume) */
+ kActionTrackSetBalance = 2049, /* (short balance) */
+ kActionTrackSetEnabled = 2050, /* (Boolean enabled) */
+ kActionTrackSetMatrix = 2051, /* (MatrixRecord matrix) */
+ kActionTrackSetLayer = 2052, /* (short layer) */
+ kActionTrackSetClip = 2053, /* (RgnHandle clip) */
+ kActionTrackSetCursor = 2054, /* (QTATomID cursorID) */
+ kActionTrackSetGraphicsMode = 2055, /* (ModifierTrackGraphicsModeRecord graphicsMode) */
+ kActionTrackSetIdleFrequency = 2056, /* (long frequency) */
+ kActionTrackSetBassTreble = 2057, /* (short base, short treble) */
+ kActionSpriteSetMatrix = 3072, /* (MatrixRecord matrix) */
+ kActionSpriteSetImageIndex = 3073, /* (short imageIndex) */
+ kActionSpriteSetVisible = 3074, /* (short visible) */
+ kActionSpriteSetLayer = 3075, /* (short layer) */
+ kActionSpriteSetGraphicsMode = 3076, /* (ModifierTrackGraphicsModeRecord graphicsMode) */
+ kActionSpritePassMouseToCodec = 3078, /* no params */
+ kActionSpriteClickOnCodec = 3079, /* Point localLoc */
+ kActionSpriteTranslate = 3080, /* (Fixed x, Fixed y, Boolean isAbsolute) */
+ kActionSpriteScale = 3081, /* (Fixed xScale, Fixed yScale) */
+ kActionSpriteRotate = 3082, /* (Fixed degrees) */
+ kActionSpriteStretch = 3083, /* (Fixed p1x, Fixed p1y, Fixed p2x, Fixed p2y, Fixed p3x, Fixed p3y, Fixed p4x, Fixed p4y) */
+ kActionSpriteSetCanBeHitTested = 3094, /* (short canBeHitTested) */
+ kActionQTVRSetPanAngle = 4096, /* (float panAngle) */
+ kActionQTVRSetTiltAngle = 4097, /* (float tiltAngle) */
+ kActionQTVRSetFieldOfView = 4098, /* (float fieldOfView) */
+ kActionQTVRShowDefaultView = 4099, /* no params */
+ kActionQTVRGoToNodeID = 4100, /* (UInt32 nodeID) */
+ kActionQTVREnableHotSpot = 4101, /* long ID, Boolean enable */
+ kActionQTVRShowHotSpots = 4102, /* Boolean show */
+ kActionQTVRTranslateObject = 4103, /* float xMove, float yMove */
+ kActionQTVRSetViewState = 4109, /* long viewStateType, short state */
+ kActionMusicPlayNote = 5120, /* (long sampleDescIndex, long partNumber, long delay, long pitch, long velocity, long duration) */
+ kActionMusicSetController = 5121, /* (long sampleDescIndex, long partNumber, long delay, long controller, long value) */
+ kActionCase = 6144, /* [(CaseStatementActionAtoms)] */
+ kActionWhile = 6145, /* [(WhileStatementActionAtoms)] */
+ kActionGoToURL = 6146, /* (C string urlLink) */
+ kActionSendQTEventToSprite = 6147, /* ([(SpriteTargetAtoms)], QTEventRecord theEvent) */
+ kActionDebugStr = 6148, /* (Str255 theString) */
+ kActionPushCurrentTime = 6149, /* no params */
+ kActionPushCurrentTimeWithLabel = 6150, /* (Str255 theLabel) */
+ kActionPopAndGotoTopTime = 6151, /* no params */
+ kActionPopAndGotoLabeledTime = 6152, /* (Str255 theLabel) */
+ kActionStatusString = 6153, /* (C string theString, long stringTypeFlags) */
+ kActionSendQTEventToTrackObject = 6154, /* ([(TrackObjectTargetAtoms)], QTEventRecord theEvent) */
+ kActionAddChannelSubscription = 6155, /* (Str255 channelName, C string channelsURL, C string channelsPictureURL) */
+ kActionRemoveChannelSubscription = 6156, /* (C string channelsURL) */
+ kActionOpenCustomActionHandler = 6157, /* (long handlerID, ComponentDescription handlerDesc) */
+ kActionDoScript = 6158, /* (long scriptTypeFlags, CString command, CString arguments) */
+ kActionDoCompressedActions = 6159, /* (compressed QTAtomContainer prefixed with eight bytes: long compressorType, long decompressedSize) */
+ kActionSendAppMessage = 6160, /* (long appMessageID) */
+ kActionLoadComponent = 6161, /* (ComponentDescription handlerDesc) */
+ kActionSetFocus = 6162, /* [(TargetAtoms theObject)] */
+ kActionDontPassKeyEvent = 6163, /* no params */
+ kActionSetRandomSeed = 6164, /* long randomSeed */
+ kActionSpriteTrackSetVariable = 7168, /* (QTAtomID variableID, float value) */
+ kActionSpriteTrackNewSprite = 7169, /* (QTAtomID spriteID, short imageIndex, MatrixRecord *matrix, short visible, short layer, ModifierTrackGraphicsModeRecord *graphicsMode, QTAtomID actionHandlingSpriteID) */
+ kActionSpriteTrackDisposeSprite = 7170, /* (QTAtomID spriteID) */
+ kActionSpriteTrackSetVariableToString = 7171, /* (QTAtomID variableID, C string value) */
+ kActionSpriteTrackConcatVariables = 7172, /* (QTAtomID firstVariableID, QTAtomID secondVariableID, QTAtomID resultVariableID ) */
+ kActionSpriteTrackSetVariableToMovieURL = 7173, /* (QTAtomID variableID, < optional: [(MovieTargetAtoms)] > ) */
+ kActionSpriteTrackSetVariableToMovieBaseURL = 7174, /* (QTAtomID variableID, < optional: [(MovieTargetAtoms)] > ) */
+ kActionSpriteTrackSetAllSpritesHitTestingMode = 7181,
+ kActionSpriteTrackNewImage = 7182, /* (C string imageURL, QTAtomID desiredID) */
+ kActionSpriteTrackDisposeImage = 7183, /* (short imageIndex) */
+ kActionApplicationNumberAndString = 8192, /* (long aNumber, Str255 aString ) */
+ kActionQD3DNamedObjectTranslateTo = 9216, /* (Fixed x, Fixed y, Fixed z ) */
+ kActionQD3DNamedObjectScaleTo = 9217, /* (Fixed xScale, Fixed yScale, Fixed zScale ) */
+ kActionQD3DNamedObjectRotateTo = 9218, /* (Fixed xDegrees, Fixed yDegrees, Fixed zDegrees ) */
+ kActionFlashTrackSetPan = 10240, /* (short xPercent, short yPercent ) */
+ kActionFlashTrackSetZoom = 10241, /* (short zoomFactor ) */
+ kActionFlashTrackSetZoomRect = 10242, /* (long left, long top, long right, long bottom ) */
+ kActionFlashTrackGotoFrameNumber = 10243, /* (long frameNumber ) */
+ kActionFlashTrackGotoFrameLabel = 10244, /* (C string frameLabel ) */
+ kActionFlashTrackSetFlashVariable = 10245, /* (C string path, C string name, C string value, Boolean updateFocus) */
+ kActionFlashTrackDoButtonActions = 10246, /* (C string path, long buttonID, long transition) */
+ kActionMovieTrackAddChildMovie = 11264, /* (QTAtomID childMovieID, C string childMovieURL) */
+ kActionMovieTrackLoadChildMovie = 11265, /* (QTAtomID childMovieID) */
+ kActionMovieTrackLoadChildMovieWithQTListParams = 11266, /* (QTAtomID childMovieID, C string qtlistXML) */
+ kActionTextTrackPasteText = 12288, /* (C string theText, long startSelection, long endSelection ) */
+ kActionTextTrackSetTextBox = 12291, /* (short left, short top, short right, short bottom) */
+ kActionTextTrackSetTextStyle = 12292, /* (Handle textStyle) */
+ kActionTextTrackSetSelection = 12293, /* (long startSelection, long endSelection ) */
+ kActionTextTrackSetBackgroundColor = 12294, /* (ModifierTrackGraphicsModeRecord backgroundColor ) */
+ kActionTextTrackSetForegroundColor = 12295, /* (ModifierTrackGraphicsModeRecord foregroundColor ) */
+ kActionTextTrackSetFace = 12296, /* (long fontFace ) */
+ kActionTextTrackSetFont = 12297, /* (long fontID ) */
+ kActionTextTrackSetSize = 12298, /* (long fontSize ) */
+ kActionTextTrackSetAlignment = 12299, /* (short alignment ) */
+ kActionTextTrackSetHilite = 12300, /* (long startHighlight, long endHighlight, ModifierTrackGraphicsModeRecord highlightColor ) */
+ kActionTextTrackSetDropShadow = 12301, /* (Point dropShadow, short transparency ) */
+ kActionTextTrackSetDisplayFlags = 12302, /* (long flags ) */
+ kActionTextTrackSetScroll = 12303, /* (long delay ) */
+ kActionTextTrackRelativeScroll = 12304, /* (short deltaX, short deltaY ) */
+ kActionTextTrackFindText = 12305, /* (long flags, Str255 theText, ModifierTrackGraphicsModeRecord highlightColor ) */
+ kActionTextTrackSetHyperTextFace = 12306, /* (short index, long fontFace ) */
+ kActionTextTrackSetHyperTextColor = 12307, /* (short index, ModifierTrackGraphicsModeRecord highlightColor ) */
+ kActionTextTrackKeyEntry = 12308, /* (short character ) */
+ kActionTextTrackMouseDown = 12309, /* no params */
+ kActionTextTrackSetEditable = 12310, /* (short editState) */
+ kActionListAddElement = 13312, /* (C string parentPath, long atIndex, C string newElementName) */
+ kActionListRemoveElements = 13313, /* (C string parentPath, long startIndex, long endIndex) */
+ kActionListSetElementValue = 13314, /* (C string elementPath, C string valueString) */
+ kActionListPasteFromXML = 13315, /* (C string xml, C string targetParentPath, long startIndex) */
+ kActionListSetMatchingFromXML = 13316, /* (C string xml, C string targetParentPath) */
+ kActionListSetFromURL = 13317, /* (C string url, C string targetParentPath ) */
+ kActionListExchangeLists = 13318, /* (C string url, C string parentPath) */
+ kActionListServerQuery = 13319 /* (C string url, C string keyValuePairs, long flags, C string parentPath) */
+};
+
+
+enum {
+ kOperandExpression = 1,
+ kOperandConstant = 2,
+ kOperandSubscribedToChannel = 3, /* C string channelsURL */
+ kOperandUniqueCustomActionHandlerID = 4,
+ kOperandCustomActionHandlerIDIsOpen = 5, /* long ID */
+ kOperandConnectionSpeed = 6,
+ kOperandGMTDay = 7,
+ kOperandGMTMonth = 8,
+ kOperandGMTYear = 9,
+ kOperandGMTHours = 10,
+ kOperandGMTMinutes = 11,
+ kOperandGMTSeconds = 12,
+ kOperandLocalDay = 13,
+ kOperandLocalMonth = 14,
+ kOperandLocalYear = 15,
+ kOperandLocalHours = 16,
+ kOperandLocalMinutes = 17,
+ kOperandLocalSeconds = 18,
+ kOperandRegisteredForQuickTimePro = 19,
+ kOperandPlatformRunningOn = 20,
+ kOperandQuickTimeVersion = 21,
+ kOperandComponentVersion = 22, /* C string type, C string subType, C string manufacturer */
+ kOperandOriginalHandlerRefcon = 23,
+ kOperandTicks = 24,
+ kOperandMaxLoadedTimeInMovie = 25,
+ kOperandEventParameter = 26, /* short index */
+ kOperandFreeMemory = 27,
+ kOperandNetworkStatus = 28,
+ kOperandQuickTimeVersionRegistered = 29, /* long version */
+ kOperandSystemVersion = 30,
+ kOperandMovieVolume = 1024,
+ kOperandMovieRate = 1025,
+ kOperandMovieIsLooping = 1026,
+ kOperandMovieLoopIsPalindrome = 1027,
+ kOperandMovieTime = 1028,
+ kOperandMovieDuration = 1029,
+ kOperandMovieTimeScale = 1030,
+ kOperandMovieWidth = 1031,
+ kOperandMovieHeight = 1032,
+ kOperandMovieLoadState = 1033,
+ kOperandMovieTrackCount = 1034,
+ kOperandMovieIsActive = 1035,
+ kOperandMovieName = 1036,
+ kOperandMovieID = 1037,
+ kOperandMovieChapterCount = 1038,
+ kOperandMovieChapterIndex = 1039,
+ kOperandMovieChapterName = 1040,
+ kOperandMovieChapterNameByIndex = 1041, /* ( short index ) */
+ kOperandMovieChapterIndexByName = 1042, /* (c string name) */
+ kOperandMovieAnnotation = 1043, /* (c string requested, long flags) */
+ kOperandMovieConnectionFlags = 1044,
+ kOperandMovieConnectionString = 1045,
+ kOperandTrackVolume = 2048,
+ kOperandTrackBalance = 2049,
+ kOperandTrackEnabled = 2050,
+ kOperandTrackLayer = 2051,
+ kOperandTrackWidth = 2052,
+ kOperandTrackHeight = 2053,
+ kOperandTrackDuration = 2054,
+ kOperandTrackName = 2055,
+ kOperandTrackID = 2056,
+ kOperandTrackIdleFrequency = 2057,
+ kOperandTrackBass = 2058,
+ kOperandTrackTreble = 2059,
+ kOperandSpriteBoundsLeft = 3072,
+ kOperandSpriteBoundsTop = 3073,
+ kOperandSpriteBoundsRight = 3074,
+ kOperandSpriteBoundsBottom = 3075,
+ kOperandSpriteImageIndex = 3076,
+ kOperandSpriteVisible = 3077,
+ kOperandSpriteLayer = 3078,
+ kOperandSpriteTrackVariable = 3079, /* [QTAtomID variableID] */
+ kOperandSpriteTrackNumSprites = 3080,
+ kOperandSpriteTrackNumImages = 3081,
+ kOperandSpriteID = 3082,
+ kOperandSpriteIndex = 3083,
+ kOperandSpriteFirstCornerX = 3084,
+ kOperandSpriteFirstCornerY = 3085,
+ kOperandSpriteSecondCornerX = 3086,
+ kOperandSpriteSecondCornerY = 3087,
+ kOperandSpriteThirdCornerX = 3088,
+ kOperandSpriteThirdCornerY = 3089,
+ kOperandSpriteFourthCornerX = 3090,
+ kOperandSpriteFourthCornerY = 3091,
+ kOperandSpriteImageRegistrationPointX = 3092,
+ kOperandSpriteImageRegistrationPointY = 3093,
+ kOperandSpriteTrackSpriteIDAtPoint = 3094, /* short x, short y */
+ kOperandSpriteName = 3095,
+ kOperandSpriteCanBeHitTested = 3105, /* short */
+ kOperandSpriteTrackAllSpritesHitTestingMode = 3106,
+ kOperandSpriteTrackImageIDByIndex = 3107, /* short imageIndex */
+ kOperandSpriteTrackImageIndexByID = 3108, /* QTAtomID */
+ kOperandQTVRPanAngle = 4096,
+ kOperandQTVRTiltAngle = 4097,
+ kOperandQTVRFieldOfView = 4098,
+ kOperandQTVRNodeID = 4099,
+ kOperandQTVRHotSpotsVisible = 4100,
+ kOperandQTVRViewCenterH = 4101,
+ kOperandQTVRViewCenterV = 4102,
+ kOperandQTVRViewStateCount = 4103,
+ kOperandQTVRViewState = 4104, /* long viewStateType */
+ kOperandMouseLocalHLoc = 5120, /* [TargetAtoms aTrack] */
+ kOperandMouseLocalVLoc = 5121, /* [TargetAtoms aTrack] */
+ kOperandKeyIsDown = 5122, /* [short modKeys, char asciiValue] */
+ kOperandRandom = 5123, /* [short min, short max] */
+ kOperandCanHaveFocus = 5124, /* [(TargetAtoms theObject)] */
+ kOperandHasFocus = 5125, /* [(TargetAtoms theObject)] */
+ kOperandTextTrackEditable = 6144,
+ kOperandTextTrackCopyText = 6145, /* long startSelection, long endSelection */
+ kOperandTextTrackStartSelection = 6146,
+ kOperandTextTrackEndSelection = 6147,
+ kOperandTextTrackTextBoxLeft = 6148,
+ kOperandTextTrackTextBoxTop = 6149,
+ kOperandTextTrackTextBoxRight = 6150,
+ kOperandTextTrackTextBoxBottom = 6151,
+ kOperandTextTrackTextLength = 6152,
+ kOperandListCountElements = 7168, /* (C string parentPath) */
+ kOperandListGetElementPathByIndex = 7169, /* (C string parentPath, long index) */
+ kOperandListGetElementValue = 7170, /* (C string elementPath) */
+ kOperandListCopyToXML = 7171, /* (C string parentPath, long startIndex, long endIndex) */
+ kOperandSin = 8192, /* float x */
+ kOperandCos = 8193, /* float x */
+ kOperandTan = 8194, /* float x */
+ kOperandATan = 8195, /* float x */
+ kOperandATan2 = 8196, /* float y, float x */
+ kOperandDegreesToRadians = 8197, /* float x */
+ kOperandRadiansToDegrees = 8198, /* float x */
+ kOperandSquareRoot = 8199, /* float x */
+ kOperandExponent = 8200, /* float x */
+ kOperandLog = 8201, /* float x */
+ kOperandFlashTrackVariable = 9216, /* [CString path, CString name] */
+ kOperandStringLength = 10240, /* (C string text) */
+ kOperandStringCompare = 10241, /* (C string aText, C string bText, Boolean caseSensitive, Boolan diacSensitive) */
+ kOperandStringSubString = 10242, /* (C string text, long offset, long length) */
+ kOperandStringConcat = 10243 /* (C string aText, C string bText) */
+};
+
+enum {
+ kFirstMovieAction = kActionMovieSetVolume,
+ kLastMovieAction = kActionMovieSetScale,
+ kFirstTrackAction = kActionTrackSetVolume,
+ kLastTrackAction = kActionTrackSetBassTreble,
+ kFirstSpriteAction = kActionSpriteSetMatrix,
+ kLastSpriteAction = kActionSpriteSetCanBeHitTested,
+ kFirstQTVRAction = kActionQTVRSetPanAngle,
+ kLastQTVRAction = kActionQTVRSetViewState,
+ kFirstMusicAction = kActionMusicPlayNote,
+ kLastMusicAction = kActionMusicSetController,
+ kFirstSystemAction = kActionCase,
+ kLastSystemAction = kActionSetRandomSeed,
+ kFirstSpriteTrackAction = kActionSpriteTrackSetVariable,
+ kLastSpriteTrackAction = kActionSpriteTrackDisposeImage,
+ kFirstApplicationAction = kActionApplicationNumberAndString,
+ kLastApplicationAction = kActionApplicationNumberAndString,
+ kFirstQD3DNamedObjectAction = kActionQD3DNamedObjectTranslateTo,
+ kLastQD3DNamedObjectAction = kActionQD3DNamedObjectRotateTo,
+ kFirstFlashTrackAction = kActionFlashTrackSetPan,
+ kLastFlashTrackAction = kActionFlashTrackDoButtonActions,
+ kFirstMovieTrackAction = kActionMovieTrackAddChildMovie,
+ kLastMovieTrackAction = kActionMovieTrackLoadChildMovieWithQTListParams,
+ kFirstTextTrackAction = kActionTextTrackPasteText,
+ kLastTextTrackAction = kActionTextTrackSetEditable,
+ kFirstMultiTargetAction = kActionListAddElement,
+ kLastMultiTargetAction = kActionListServerQuery,
+ kFirstAction = kFirstMovieAction,
+ kLastAction = kLastMultiTargetAction
+};
+
+/* target atom types*/
+enum {
+ kTargetMovie = FOUR_CHAR_CODE('moov'), /* no data */
+ kTargetMovieName = FOUR_CHAR_CODE('mona'), /* (PString movieName) */
+ kTargetMovieID = FOUR_CHAR_CODE('moid'), /* (long movieID) */
+ kTargetRootMovie = FOUR_CHAR_CODE('moro'), /* no data */
+ kTargetParentMovie = FOUR_CHAR_CODE('mopa'), /* no data */
+ kTargetChildMovieTrackName = FOUR_CHAR_CODE('motn'), /* (PString childMovieTrackName) */
+ kTargetChildMovieTrackID = FOUR_CHAR_CODE('moti'), /* (long childMovieTrackID) */
+ kTargetChildMovieTrackIndex = FOUR_CHAR_CODE('motx'), /* (long childMovieTrackIndex) */
+ kTargetChildMovieMovieName = FOUR_CHAR_CODE('momn'), /* (PString childMovieName) */
+ kTargetChildMovieMovieID = FOUR_CHAR_CODE('momi'), /* (long childMovieID) */
+ kTargetTrackName = FOUR_CHAR_CODE('trna'), /* (PString trackName) */
+ kTargetTrackID = FOUR_CHAR_CODE('trid'), /* (long trackID) */
+ kTargetTrackType = FOUR_CHAR_CODE('trty'), /* (OSType trackType) */
+ kTargetTrackIndex = FOUR_CHAR_CODE('trin'), /* (long trackIndex) */
+ kTargetSpriteName = FOUR_CHAR_CODE('spna'), /* (PString spriteName) */
+ kTargetSpriteID = FOUR_CHAR_CODE('spid'), /* (QTAtomID spriteID) */
+ kTargetSpriteIndex = FOUR_CHAR_CODE('spin'), /* (short spriteIndex) */
+ kTargetQD3DNamedObjectName = FOUR_CHAR_CODE('nana'), /* (CString objectName) */
+ kTargetCurrentQTEventParams = FOUR_CHAR_CODE('evpa') /* no data */
+};
+
+/* action container atom types*/
+enum {
+ kQTEventType = FOUR_CHAR_CODE('evnt'),
+ kAction = FOUR_CHAR_CODE('actn'),
+ kWhichAction = FOUR_CHAR_CODE('whic'),
+ kActionParameter = FOUR_CHAR_CODE('parm'),
+ kActionTarget = FOUR_CHAR_CODE('targ'),
+ kActionFlags = FOUR_CHAR_CODE('flag'),
+ kActionParameterMinValue = FOUR_CHAR_CODE('minv'),
+ kActionParameterMaxValue = FOUR_CHAR_CODE('maxv'),
+ kActionListAtomType = FOUR_CHAR_CODE('list'),
+ kExpressionContainerAtomType = FOUR_CHAR_CODE('expr'),
+ kConditionalAtomType = FOUR_CHAR_CODE('test'),
+ kOperatorAtomType = FOUR_CHAR_CODE('oper'),
+ kOperandAtomType = FOUR_CHAR_CODE('oprn'),
+ kCommentAtomType = FOUR_CHAR_CODE('why '),
+ kCustomActionHandler = FOUR_CHAR_CODE('cust'),
+ kCustomHandlerID = FOUR_CHAR_CODE('id '),
+ kCustomHandlerDesc = FOUR_CHAR_CODE('desc'),
+ kQTEventRecordAtomType = FOUR_CHAR_CODE('erec')
+};
+
+/* QTEvent types */
+enum {
+ kQTEventMouseClick = FOUR_CHAR_CODE('clik'),
+ kQTEventMouseClickEnd = FOUR_CHAR_CODE('cend'),
+ kQTEventMouseClickEndTriggerButton = FOUR_CHAR_CODE('trig'),
+ kQTEventMouseEnter = FOUR_CHAR_CODE('entr'),
+ kQTEventMouseExit = FOUR_CHAR_CODE('exit'),
+ kQTEventMouseMoved = FOUR_CHAR_CODE('move'),
+ kQTEventFrameLoaded = FOUR_CHAR_CODE('fram'),
+ kQTEventIdle = FOUR_CHAR_CODE('idle'),
+ kQTEventKey = FOUR_CHAR_CODE('key '), /* qtevent.param1 = key, qtevent.param2 = modifiers, qtEvent.param3 = scanCode */
+ kQTEventMovieLoaded = FOUR_CHAR_CODE('load'),
+ kQTEventRequestToModifyMovie = FOUR_CHAR_CODE('reqm'),
+ kQTEventListReceived = FOUR_CHAR_CODE('list'),
+ kQTEventKeyUp = FOUR_CHAR_CODE('keyU') /* qtevent.param1 = key, qtevent.param2 = modifiers, qtEvent.param3 = scanCode */
+};
+
+/* flags for the kActionFlags atom */
+enum {
+ kActionFlagActionIsDelta = 1L << 1,
+ kActionFlagParameterWrapsAround = 1L << 2,
+ kActionFlagActionIsToggle = 1L << 3
+};
+
+/* flags for stringTypeFlags field of the QTStatusStringRecord */
+enum {
+ kStatusStringIsURLLink = 1L << 1,
+ kStatusStringIsStreamingStatus = 1L << 2,
+ kStatusHasCodeNumber = 1L << 3, /* high 16 bits of stringTypeFlags is error code number*/
+ kStatusIsError = 1L << 4
+};
+
+/* flags for scriptTypeFlags field of the QTDoScriptRecord*/
+enum {
+ kScriptIsUnknownType = 1L << 0,
+ kScriptIsJavaScript = 1L << 1,
+ kScriptIsLingoEvent = 1L << 2,
+ kScriptIsVBEvent = 1L << 3,
+ kScriptIsProjectorCommand = 1L << 4,
+ kScriptIsAppleScript = 1L << 5
+};
+
+/* flags for CheckQuickTimeRegistration routine*/
+enum {
+ kQTRegistrationDialogTimeOutFlag = 1 << 0,
+ kQTRegistrationDialogShowDialog = 1 << 1,
+ kQTRegistrationDialogForceDialog = 1 << 2
+};
+
+/* constants for kOperatorAtomType IDs (operator types)*/
+enum {
+ kOperatorAdd = FOUR_CHAR_CODE('add '),
+ kOperatorSubtract = FOUR_CHAR_CODE('sub '),
+ kOperatorMultiply = FOUR_CHAR_CODE('mult'),
+ kOperatorDivide = FOUR_CHAR_CODE('div '),
+ kOperatorOr = FOUR_CHAR_CODE('or '),
+ kOperatorAnd = FOUR_CHAR_CODE('and '),
+ kOperatorNot = FOUR_CHAR_CODE('not '),
+ kOperatorLessThan = FOUR_CHAR_CODE('< '),
+ kOperatorLessThanEqualTo = FOUR_CHAR_CODE('<= '),
+ kOperatorEqualTo = FOUR_CHAR_CODE('= '),
+ kOperatorNotEqualTo = FOUR_CHAR_CODE('!= '),
+ kOperatorGreaterThan = FOUR_CHAR_CODE('> '),
+ kOperatorGreaterThanEqualTo = FOUR_CHAR_CODE('>= '),
+ kOperatorModulo = FOUR_CHAR_CODE('mod '),
+ kOperatorIntegerDivide = FOUR_CHAR_CODE('idiv'),
+ kOperatorAbsoluteValue = FOUR_CHAR_CODE('abs '),
+ kOperatorNegate = FOUR_CHAR_CODE('neg ')
+};
+
+/* constants for kOperandPlatformRunningOn*/
+enum {
+ kPlatformMacintosh = 1,
+ kPlatformWindows = 2
+};
+
+/* flags for kOperandSystemVersion*/
+enum {
+ kSystemIsWindows9x = 0x00010000,
+ kSystemIsWindowsNT = 0x00020000
+};
+
+/* constants for MediaPropertiesAtom*/
+enum {
+ kMediaPropertyNonLinearAtomType = FOUR_CHAR_CODE('nonl'),
+ kMediaPropertyHasActions = 105
+};
+
+
+/* TimeBase equates */
+
+typedef long TimeValue;
+typedef long TimeScale;
+typedef wide CompTimeValue;
+typedef SInt64 TimeValue64;
+enum {
+ loopTimeBase = 1,
+ palindromeLoopTimeBase = 2,
+ maintainTimeBaseZero = 4
+};
+
+typedef unsigned long TimeBaseFlags;
+
+struct TimeBaseRecord {
+ long data[1];
+};
+typedef struct TimeBaseRecord TimeBaseRecord;
+
+typedef TimeBaseRecord * TimeBase;
+
+struct CallBackRecord {
+ long data[1];
+};
+typedef struct CallBackRecord CallBackRecord;
+
+typedef CallBackRecord * QTCallBack;
+
+struct TimeRecord {
+ CompTimeValue value; /* units */
+ TimeScale scale; /* units per second */
+ TimeBase base;
+};
+typedef struct TimeRecord TimeRecord;
+/* CallBack equates */
+enum {
+ triggerTimeFwd = 0x0001, /* when curTime exceeds triggerTime going forward */
+ triggerTimeBwd = 0x0002, /* when curTime exceeds triggerTime going backwards */
+ triggerTimeEither = 0x0003, /* when curTime exceeds triggerTime going either direction */
+ triggerRateLT = 0x0004, /* when rate changes to less than trigger value */
+ triggerRateGT = 0x0008, /* when rate changes to greater than trigger value */
+ triggerRateEqual = 0x0010, /* when rate changes to equal trigger value */
+ triggerRateLTE = triggerRateLT | triggerRateEqual,
+ triggerRateGTE = triggerRateGT | triggerRateEqual,
+ triggerRateNotEqual = triggerRateGT | triggerRateEqual | triggerRateLT,
+ triggerRateChange = 0,
+ triggerAtStart = 0x0001,
+ triggerAtStop = 0x0002
+};
+
+
+typedef unsigned short QTCallBackFlags;
+enum {
+ timeBaseBeforeStartTime = 1,
+ timeBaseAfterStopTime = 2
+};
+
+typedef unsigned long TimeBaseStatus;
+enum {
+ callBackAtTime = 1,
+ callBackAtRate = 2,
+ callBackAtTimeJump = 3,
+ callBackAtExtremes = 4,
+ callBackAtTimeBaseDisposed = 5,
+ callBackAtInterrupt = 0x8000,
+ callBackAtDeferredTask = 0x4000
+};
+
+typedef unsigned short QTCallBackType;
+typedef CALLBACK_API( void , QTCallBackProcPtr )(QTCallBack cb, long refCon);
+typedef STACK_UPP_TYPE(QTCallBackProcPtr) QTCallBackUPP;
+enum {
+ qtcbNeedsRateChanges = 1, /* wants to know about rate changes */
+ qtcbNeedsTimeChanges = 2, /* wants to know about time changes */
+ qtcbNeedsStartStopChanges = 4 /* wants to know when TimeBase start/stop is changed*/
+};
+
+
+struct QTCallBackHeader {
+ long callBackFlags;
+ long reserved1;
+ SInt8 qtPrivate[40];
+};
+typedef struct QTCallBackHeader QTCallBackHeader;
+typedef CALLBACK_API( void , QTSyncTaskProcPtr )(void *task);
+typedef STACK_UPP_TYPE(QTSyncTaskProcPtr) QTSyncTaskUPP;
+
+struct QTSyncTaskRecord {
+ void * qLink;
+ QTSyncTaskUPP proc;
+};
+typedef struct QTSyncTaskRecord QTSyncTaskRecord;
+
+typedef QTSyncTaskRecord * QTSyncTaskPtr;
+
+typedef CALLBACK_API( OSErr , MovieRgnCoverProcPtr )(Movie theMovie, RgnHandle changedRgn, long refcon);
+typedef CALLBACK_API( OSErr , MovieProgressProcPtr )(Movie theMovie, short message, short whatOperation, Fixed percentDone, long refcon);
+typedef CALLBACK_API( OSErr , MovieDrawingCompleteProcPtr )(Movie theMovie, long refCon);
+typedef CALLBACK_API( OSErr , TrackTransferProcPtr )(Track t, long refCon);
+typedef CALLBACK_API( OSErr , GetMovieProcPtr )(long offset, long size, void *dataPtr, void *refCon);
+typedef CALLBACK_API( Boolean , MoviePreviewCallOutProcPtr )(long refcon);
+typedef CALLBACK_API( OSErr , TextMediaProcPtr )(Handle theText, Movie theMovie, short *displayFlag, long refcon);
+typedef CALLBACK_API( OSErr , ActionsProcPtr )(void *refcon, Track targetTrack, long targetRefCon, QTEventRecordPtr theEvent);
+typedef CALLBACK_API( OSErr , DoMCActionProcPtr )(void *refcon, short action, void *params, Boolean *handled);
+typedef CALLBACK_API( OSErr , MovieExecuteWiredActionsProcPtr )(Movie theMovie, void *refcon, long flags, QTAtomContainer wiredActions);
+typedef CALLBACK_API( void , MoviePrePrerollCompleteProcPtr )(Movie theMovie, OSErr prerollErr, void *refcon);
+typedef CALLBACK_API( void , QTNextTaskNeededSoonerCallbackProcPtr )(TimeValue duration, unsigned long flags, void *refcon);
+typedef CALLBACK_API( void , MoviesErrorProcPtr )(OSErr theErr, long refcon);
+typedef STACK_UPP_TYPE(MovieRgnCoverProcPtr) MovieRgnCoverUPP;
+typedef STACK_UPP_TYPE(MovieProgressProcPtr) MovieProgressUPP;
+typedef STACK_UPP_TYPE(MovieDrawingCompleteProcPtr) MovieDrawingCompleteUPP;
+typedef STACK_UPP_TYPE(TrackTransferProcPtr) TrackTransferUPP;
+typedef STACK_UPP_TYPE(GetMovieProcPtr) GetMovieUPP;
+typedef STACK_UPP_TYPE(MoviePreviewCallOutProcPtr) MoviePreviewCallOutUPP;
+typedef STACK_UPP_TYPE(TextMediaProcPtr) TextMediaUPP;
+typedef STACK_UPP_TYPE(ActionsProcPtr) ActionsUPP;
+typedef STACK_UPP_TYPE(DoMCActionProcPtr) DoMCActionUPP;
+typedef STACK_UPP_TYPE(MovieExecuteWiredActionsProcPtr) MovieExecuteWiredActionsUPP;
+typedef STACK_UPP_TYPE(MoviePrePrerollCompleteProcPtr) MoviePrePrerollCompleteUPP;
+typedef STACK_UPP_TYPE(QTNextTaskNeededSoonerCallbackProcPtr) QTNextTaskNeededSoonerCallbackUPP;
+typedef STACK_UPP_TYPE(MoviesErrorProcPtr) MoviesErrorUPP;
+typedef ComponentInstance MediaHandler;
+typedef ComponentInstance DataHandler;
+typedef Component MediaHandlerComponent;
+typedef Component DataHandlerComponent;
+typedef ComponentResult HandlerError;
+enum {
+ keepInRam = 1 << 0, /* load and make non-purgable*/
+ unkeepInRam = 1 << 1, /* mark as purgable*/
+ flushFromRam = 1 << 2, /* empty those handles*/
+ loadForwardTrackEdits = 1 << 3, /* load track edits into ram for playing forward*/
+ loadBackwardTrackEdits = 1 << 4 /* load track edits into ram for playing in reverse*/
+};
+
+enum {
+ newMovieActive = 1 << 0,
+ newMovieDontResolveDataRefs = 1 << 1,
+ newMovieDontAskUnresolvedDataRefs = 1 << 2,
+ newMovieDontAutoAlternates = 1 << 3,
+ newMovieDontUpdateForeBackPointers = 1 << 4,
+ newMovieDontAutoUpdateClock = 1 << 5,
+ newMovieAsyncOK = 1 << 8,
+ newMovieIdleImportOK = 1 << 10,
+ newMovieDontInteractWithUser = 1 << 11
+};
+
+/* track usage bits */
+enum {
+ trackUsageInMovie = 1 << 1,
+ trackUsageInPreview = 1 << 2,
+ trackUsageInPoster = 1 << 3
+};
+
+/* Add/GetMediaSample flags */
+enum {
+ mediaSampleNotSync = 1 << 0, /* sample is not a sync sample (eg. is frame differenced */
+ mediaSampleShadowSync = 1 << 1 /* sample is a shadow sync */
+};
+
+enum {
+ pasteInParallel = 1 << 0,
+ showUserSettingsDialog = 1 << 1,
+ movieToFileOnlyExport = 1 << 2,
+ movieFileSpecValid = 1 << 3
+};
+
+enum {
+ nextTimeMediaSample = 1 << 0,
+ nextTimeMediaEdit = 1 << 1,
+ nextTimeTrackEdit = 1 << 2,
+ nextTimeSyncSample = 1 << 3,
+ nextTimeStep = 1 << 4,
+ nextTimeEdgeOK = 1 << 14,
+ nextTimeIgnoreActiveSegment = 1 << 15
+};
+
+typedef unsigned short nextTimeFlagsEnum;
+enum {
+ createMovieFileDeleteCurFile = 1L << 31,
+ createMovieFileDontCreateMovie = 1L << 30,
+ createMovieFileDontOpenFile = 1L << 29,
+ createMovieFileDontCreateResFile = 1L << 28
+};
+
+typedef unsigned long createMovieFileFlagsEnum;
+enum {
+ flattenAddMovieToDataFork = 1L << 0,
+ flattenActiveTracksOnly = 1L << 2,
+ flattenDontInterleaveFlatten = 1L << 3,
+ flattenFSSpecPtrIsDataRefRecordPtr = 1L << 4,
+ flattenCompressMovieResource = 1L << 5,
+ flattenForceMovieResourceBeforeMovieData = 1L << 6
+};
+
+typedef unsigned long movieFlattenFlagsEnum;
+enum {
+ movieInDataForkResID = -1 /* magic res ID */
+};
+
+enum {
+ mcTopLeftMovie = 1 << 0, /* usually centered */
+ mcScaleMovieToFit = 1 << 1, /* usually only scales down */
+ mcWithBadge = 1 << 2, /* give me a badge */
+ mcNotVisible = 1 << 3, /* don't show controller */
+ mcWithFrame = 1 << 4 /* gimme a frame */
+};
+
+enum {
+ movieScrapDontZeroScrap = 1 << 0,
+ movieScrapOnlyPutMovie = 1 << 1
+};
+
+enum {
+ dataRefSelfReference = 1 << 0,
+ dataRefWasNotResolved = 1 << 1
+};
+
+typedef unsigned long dataRefAttributesFlags;
+enum {
+ kMovieAnchorDataRefIsDefault = 1 << 0 /* data ref returned is movie default data ref */
+};
+
+enum {
+ hintsScrubMode = 1 << 0, /* mask == && (if flags == scrub on, flags != scrub off) */
+ hintsLoop = 1 << 1,
+ hintsDontPurge = 1 << 2,
+ hintsUseScreenBuffer = 1 << 5,
+ hintsAllowInterlace = 1 << 6,
+ hintsUseSoundInterp = 1 << 7,
+ hintsHighQuality = 1 << 8, /* slooooow */
+ hintsPalindrome = 1 << 9,
+ hintsInactive = 1 << 11,
+ hintsOffscreen = 1 << 12,
+ hintsDontDraw = 1 << 13,
+ hintsAllowBlacklining = 1 << 14,
+ hintsDontUseVideoOverlaySurface = 1 << 16,
+ hintsIgnoreBandwidthRestrictions = 1 << 17,
+ hintsPlayingEveryFrame = 1 << 18,
+ hintsAllowDynamicResize = 1 << 19,
+ hintsSingleField = 1 << 20,
+ hintsNoRenderingTimeOut = 1 << 21,
+ hintsFlushVideoInsteadOfDirtying = 1 << 22,
+ hintsEnableSubPixelPositioning = 1L << 23
+};
+
+typedef unsigned long playHintsEnum;
+enum {
+ mediaHandlerFlagBaseClient = 1
+};
+
+typedef unsigned long mediaHandlerFlagsEnum;
+enum {
+ movieTrackMediaType = 1 << 0,
+ movieTrackCharacteristic = 1 << 1,
+ movieTrackEnabledOnly = 1 << 2
+};
+
+
+struct SampleReferenceRecord {
+ long dataOffset;
+ long dataSize;
+ TimeValue durationPerSample;
+ long numberOfSamples;
+ short sampleFlags;
+};
+typedef struct SampleReferenceRecord SampleReferenceRecord;
+
+typedef SampleReferenceRecord * SampleReferencePtr;
+
+struct SampleReference64Record {
+ wide dataOffset;
+ unsigned long dataSize;
+ TimeValue durationPerSample;
+ unsigned long numberOfSamples;
+ short sampleFlags;
+};
+typedef struct SampleReference64Record SampleReference64Record;
+
+typedef SampleReference64Record * SampleReference64Ptr;
+
+/*************************
+* Initialization Routines
+**************************/
+EXTERN_API( void )
+CheckQuickTimeRegistration (void * registrationKey,
+ long flags) THREEWORDINLINE(0x303C, 0x02DA, 0xAAAA);
+
+EXTERN_API( OSErr )
+EnterMovies (void) TWOWORDINLINE(0x7001, 0xAAAA);
+
+EXTERN_API( void )
+ExitMovies (void) TWOWORDINLINE(0x7002, 0xAAAA);
+
+/*************************
+* Error Routines
+**************************/
+
+EXTERN_API( OSErr )
+GetMoviesError (void) TWOWORDINLINE(0x7003, 0xAAAA);
+
+EXTERN_API( void )
+ClearMoviesStickyError (void) THREEWORDINLINE(0x303C, 0x00DE, 0xAAAA);
+
+EXTERN_API( OSErr )
+GetMoviesStickyError (void) TWOWORDINLINE(0x7004, 0xAAAA);
+
+EXTERN_API( void )
+SetMoviesErrorProc (MoviesErrorUPP errProc,
+ long refcon) THREEWORDINLINE(0x303C, 0x00EF, 0xAAAA);
+
+
+/*************************
+* Idle Routines
+**************************/
+EXTERN_API( void )
+MoviesTask (Movie theMovie,
+ long maxMilliSecToUse) TWOWORDINLINE(0x7005, 0xAAAA);
+
+EXTERN_API( OSErr )
+PrerollMovie (Movie theMovie,
+ TimeValue time,
+ Fixed Rate) TWOWORDINLINE(0x7006, 0xAAAA);
+
+EXTERN_API( OSErr )
+PrePrerollMovie (Movie m,
+ TimeValue time,
+ Fixed rate,
+ MoviePrePrerollCompleteUPP proc,
+ void * refcon) THREEWORDINLINE(0x303C, 0x02F7, 0xAAAA);
+
+EXTERN_API( void )
+AbortPrePrerollMovie (Movie m,
+ OSErr err) THREEWORDINLINE(0x303C, 0x02F8, 0xAAAA);
+
+EXTERN_API( OSErr )
+LoadMovieIntoRam (Movie theMovie,
+ TimeValue time,
+ TimeValue duration,
+ long flags) TWOWORDINLINE(0x7007, 0xAAAA);
+
+EXTERN_API( OSErr )
+LoadTrackIntoRam (Track theTrack,
+ TimeValue time,
+ TimeValue duration,
+ long flags) THREEWORDINLINE(0x303C, 0x016E, 0xAAAA);
+
+EXTERN_API( OSErr )
+LoadMediaIntoRam (Media theMedia,
+ TimeValue time,
+ TimeValue duration,
+ long flags) TWOWORDINLINE(0x7008, 0xAAAA);
+
+EXTERN_API( void )
+SetMovieActive (Movie theMovie,
+ Boolean active) TWOWORDINLINE(0x7009, 0xAAAA);
+
+EXTERN_API( Boolean )
+GetMovieActive (Movie theMovie) TWOWORDINLINE(0x700A, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTGetWallClockTimeBase (TimeBase * wallClockTimeBase) THREEWORDINLINE(0x303C, 0x0347, 0xAAAA);
+
+
+/*************************
+* Idle Management
+**************************/
+typedef struct OpaqueIdleManager* IdleManager;
+EXTERN_API( IdleManager )
+QTIdleManagerOpen (void) THREEWORDINLINE(0x303C, 0x0348, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTIdleManagerClose (IdleManager im) THREEWORDINLINE(0x303C, 0x0349, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTIdleManagerGetNextIdleTime (IdleManager im,
+ TimeRecord * nextIdle) THREEWORDINLINE(0x303C, 0x034A, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTIdleManagerSetNextIdleTime (IdleManager im,
+ TimeRecord * nextIdle) THREEWORDINLINE(0x303C, 0x034B, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTIdleManagerSetNextIdleTimeNever (IdleManager im) THREEWORDINLINE(0x303C, 0x0373, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTIdleManagerSetNextIdleTimeNow (IdleManager im) THREEWORDINLINE(0x303C, 0x0374, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTIdleManagerSetNextIdleTimeDelta (IdleManager im,
+ TimeValue duration,
+ TimeScale scale) THREEWORDINLINE(0x303C, 0x0375, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTIdleManagerSetParent (IdleManager im,
+ IdleManager parent) THREEWORDINLINE(0x303C, 0x034C, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTIdleManagerNeedsAnIdle (IdleManager im,
+ Boolean * needsOne) THREEWORDINLINE(0x303C, 0x0371, 0xAAAA);
+
+
+/*************************
+* Carbon Movie Control
+**************************/
+/* Movie Control option bits*/
+enum {
+ kMovieControlOptionHideController = (1L << 0),
+ kMovieControlOptionLocateTopLeft = (1L << 1),
+ kMovieControlOptionEnableEditing = (1L << 2),
+ kMovieControlOptionHandleEditingHI = (1L << 3),
+ kMovieControlOptionSetKeysEnabled = (1L << 4),
+ kMovieControlOptionManuallyIdled = (1L << 5)
+};
+
+/* Item tags for use in GetControlData() (some with SetControlData()) calls on Movie Controls*/
+enum {
+ kMovieControlDataMovieController = FOUR_CHAR_CODE('mc '),
+ kMovieControlDataMovie = FOUR_CHAR_CODE('moov'),
+ kMovieControlDataManualIdling = FOUR_CHAR_CODE('manu')
+};
+
+/*
+** CreateMovieControl() - This is the public API routine that creates a Movie Control. Given a window and location
+** plus a movie, it constructs a Movie Control with a Movie Controller in the window.
+*/
+EXTERN_API( OSErr )
+CreateMovieControl (WindowRef theWindow,
+ Rect * localRect,
+ Movie theMovie,
+ UInt32 options,
+ ControlRef * returnedControl) THREEWORDINLINE(0x303C, 0x0378, 0xAAAA);
+
+
+/*************************
+* calls for playing movies, previews, posters
+**************************/
+EXTERN_API( void )
+StartMovie (Movie theMovie) TWOWORDINLINE(0x700B, 0xAAAA);
+
+EXTERN_API( void )
+StopMovie (Movie theMovie) TWOWORDINLINE(0x700C, 0xAAAA);
+
+EXTERN_API( void )
+GoToBeginningOfMovie (Movie theMovie) TWOWORDINLINE(0x700D, 0xAAAA);
+
+EXTERN_API( void )
+GoToEndOfMovie (Movie theMovie) TWOWORDINLINE(0x700E, 0xAAAA);
+
+EXTERN_API( Boolean )
+IsMovieDone (Movie theMovie) THREEWORDINLINE(0x303C, 0x00DD, 0xAAAA);
+
+EXTERN_API( Boolean )
+GetMoviePreviewMode (Movie theMovie) TWOWORDINLINE(0x700F, 0xAAAA);
+
+EXTERN_API( void )
+SetMoviePreviewMode (Movie theMovie,
+ Boolean usePreview) TWOWORDINLINE(0x7010, 0xAAAA);
+
+EXTERN_API( void )
+ShowMoviePoster (Movie theMovie) TWOWORDINLINE(0x7011, 0xAAAA);
+
+EXTERN_API( void )
+PlayMoviePreview (Movie theMovie,
+ MoviePreviewCallOutUPP callOutProc,
+ long refcon) THREEWORDINLINE(0x303C, 0x00F2, 0xAAAA);
+
+/*************************
+* calls for controlling movies & tracks which are playing
+**************************/
+EXTERN_API( TimeBase )
+GetMovieTimeBase (Movie theMovie) TWOWORDINLINE(0x7012, 0xAAAA);
+
+EXTERN_API( void )
+SetMovieMasterTimeBase (Movie theMovie,
+ TimeBase tb,
+ const TimeRecord * slaveZero) THREEWORDINLINE(0x303C, 0x0167, 0xAAAA);
+
+EXTERN_API( void )
+SetMovieMasterClock (Movie theMovie,
+ Component clockMeister,
+ const TimeRecord * slaveZero) THREEWORDINLINE(0x303C, 0x0168, 0xAAAA);
+
+EXTERN_API( void )
+ChooseMovieClock (Movie m,
+ long flags) THREEWORDINLINE(0x303C, 0x0269, 0xAAAA);
+
+EXTERN_API( void )
+GetMovieGWorld (Movie theMovie,
+ CGrafPtr * port,
+ GDHandle * gdh) TWOWORDINLINE(0x7015, 0xAAAA);
+
+EXTERN_API( void )
+SetMovieGWorld (Movie theMovie,
+ CGrafPtr port,
+ GDHandle gdh) TWOWORDINLINE(0x7016, 0xAAAA);
+
+enum {
+ movieDrawingCallWhenChanged = 0,
+ movieDrawingCallAlways = 1
+};
+
+EXTERN_API( void )
+SetMovieDrawingCompleteProc (Movie theMovie,
+ long flags,
+ MovieDrawingCompleteUPP proc,
+ long refCon) THREEWORDINLINE(0x303C, 0x01DE, 0xAAAA);
+
+
+EXTERN_API( void )
+GetMovieNaturalBoundsRect (Movie theMovie,
+ Rect * naturalBounds) THREEWORDINLINE(0x303C, 0x022C, 0xAAAA);
+
+EXTERN_API( Track )
+GetNextTrackForCompositing (Movie theMovie,
+ Track theTrack) THREEWORDINLINE(0x303C, 0x01FA, 0xAAAA);
+
+EXTERN_API( Track )
+GetPrevTrackForCompositing (Movie theMovie,
+ Track theTrack) THREEWORDINLINE(0x303C, 0x01FB, 0xAAAA);
+
+EXTERN_API( void )
+SetTrackGWorld (Track theTrack,
+ CGrafPtr port,
+ GDHandle gdh,
+ TrackTransferUPP proc,
+ long refCon) THREEWORDINLINE(0x303C, 0x009D, 0xAAAA);
+
+EXTERN_API( PicHandle )
+GetMoviePict (Movie theMovie,
+ TimeValue time) TWOWORDINLINE(0x701D, 0xAAAA);
+
+EXTERN_API( PicHandle )
+GetTrackPict (Track theTrack,
+ TimeValue time) TWOWORDINLINE(0x701E, 0xAAAA);
+
+EXTERN_API( PicHandle )
+GetMoviePosterPict (Movie theMovie) THREEWORDINLINE(0x303C, 0x00F7, 0xAAAA);
+
+/* called between Begin & EndUpdate */
+EXTERN_API( OSErr )
+UpdateMovie (Movie theMovie) TWOWORDINLINE(0x701F, 0xAAAA);
+
+EXTERN_API( OSErr )
+InvalidateMovieRegion (Movie theMovie,
+ RgnHandle invalidRgn) THREEWORDINLINE(0x303C, 0x022A, 0xAAAA);
+
+/**** spatial movie routines ****/
+EXTERN_API( void )
+GetMovieBox (Movie theMovie,
+ Rect * boxRect) THREEWORDINLINE(0x303C, 0x00F9, 0xAAAA);
+
+EXTERN_API( void )
+SetMovieBox (Movie theMovie,
+ const Rect * boxRect) THREEWORDINLINE(0x303C, 0x00FA, 0xAAAA);
+
+/** movie display clip */
+EXTERN_API( RgnHandle )
+GetMovieDisplayClipRgn (Movie theMovie) THREEWORDINLINE(0x303C, 0x00FC, 0xAAAA);
+
+EXTERN_API( void )
+SetMovieDisplayClipRgn (Movie theMovie,
+ RgnHandle theClip) THREEWORDINLINE(0x303C, 0x00FD, 0xAAAA);
+
+/** movie src clip */
+EXTERN_API( RgnHandle )
+GetMovieClipRgn (Movie theMovie) THREEWORDINLINE(0x303C, 0x0100, 0xAAAA);
+
+EXTERN_API( void )
+SetMovieClipRgn (Movie theMovie,
+ RgnHandle theClip) THREEWORDINLINE(0x303C, 0x0101, 0xAAAA);
+
+/** track src clip */
+EXTERN_API( RgnHandle )
+GetTrackClipRgn (Track theTrack) THREEWORDINLINE(0x303C, 0x0102, 0xAAAA);
+
+EXTERN_API( void )
+SetTrackClipRgn (Track theTrack,
+ RgnHandle theClip) THREEWORDINLINE(0x303C, 0x0103, 0xAAAA);
+
+/** bounds in display space (not clipped by display clip) */
+EXTERN_API( RgnHandle )
+GetMovieDisplayBoundsRgn (Movie theMovie) THREEWORDINLINE(0x303C, 0x00FB, 0xAAAA);
+
+EXTERN_API( RgnHandle )
+GetTrackDisplayBoundsRgn (Track theTrack) THREEWORDINLINE(0x303C, 0x0112, 0xAAAA);
+
+/** bounds in movie space */
+EXTERN_API( RgnHandle )
+GetMovieBoundsRgn (Movie theMovie) THREEWORDINLINE(0x303C, 0x00FE, 0xAAAA);
+
+EXTERN_API( RgnHandle )
+GetTrackMovieBoundsRgn (Track theTrack) THREEWORDINLINE(0x303C, 0x00FF, 0xAAAA);
+
+/** bounds in track space */
+EXTERN_API( RgnHandle )
+GetTrackBoundsRgn (Track theTrack) THREEWORDINLINE(0x303C, 0x0111, 0xAAAA);
+
+/** mattes - always in track space */
+EXTERN_API( PixMapHandle )
+GetTrackMatte (Track theTrack) THREEWORDINLINE(0x303C, 0x0115, 0xAAAA);
+
+EXTERN_API( void )
+SetTrackMatte (Track theTrack,
+ PixMapHandle theMatte) THREEWORDINLINE(0x303C, 0x0116, 0xAAAA);
+
+EXTERN_API( void )
+DisposeMatte (PixMapHandle theMatte) THREEWORDINLINE(0x303C, 0x014A, 0xAAAA);
+
+/** video out */
+EXTERN_API( void )
+SetMovieVideoOutput (Movie theMovie,
+ ComponentInstance vout) THREEWORDINLINE(0x303C, 0x0340, 0xAAAA);
+
+/*************************
+* calls for getting/saving movies
+**************************/
+EXTERN_API( Movie )
+NewMovie (long flags) THREEWORDINLINE(0x303C, 0x0187, 0xAAAA);
+
+EXTERN_API( OSErr )
+PutMovieIntoHandle (Movie theMovie,
+ Handle publicMovie) TWOWORDINLINE(0x7022, 0xAAAA);
+
+EXTERN_API( OSErr )
+PutMovieIntoDataFork (Movie theMovie,
+ short fRefNum,
+ long offset,
+ long maxSize) THREEWORDINLINE(0x303C, 0x01B4, 0xAAAA);
+
+EXTERN_API( OSErr )
+PutMovieIntoDataFork64 (Movie theMovie,
+ long fRefNum,
+ const wide * offset,
+ unsigned long maxSize) THREEWORDINLINE(0x303C, 0x02EA, 0xAAAA);
+
+EXTERN_API( OSErr )
+PutMovieIntoStorage (Movie theMovie,
+ DataHandler dh,
+ const wide * offset,
+ unsigned long maxSize) THREEWORDINLINE(0x303C, 0x0391, 0xAAAA);
+
+EXTERN_API( OSErr )
+PutMovieForDataRefIntoHandle (Movie theMovie,
+ Handle dataRef,
+ OSType dataRefType,
+ Handle publicMovie) THREEWORDINLINE(0x303C, 0x0380, 0xAAAA);
+
+EXTERN_API( void )
+DisposeMovie (Movie theMovie) TWOWORDINLINE(0x7023, 0xAAAA);
+
+/*************************
+* Movie State Routines
+**************************/
+EXTERN_API( unsigned long )
+GetMovieCreationTime (Movie theMovie) TWOWORDINLINE(0x7026, 0xAAAA);
+
+EXTERN_API( unsigned long )
+GetMovieModificationTime (Movie theMovie) TWOWORDINLINE(0x7027, 0xAAAA);
+
+EXTERN_API( TimeScale )
+GetMovieTimeScale (Movie theMovie) TWOWORDINLINE(0x7029, 0xAAAA);
+
+EXTERN_API( void )
+SetMovieTimeScale (Movie theMovie,
+ TimeScale timeScale) TWOWORDINLINE(0x702A, 0xAAAA);
+
+EXTERN_API( TimeValue )
+GetMovieDuration (Movie theMovie) TWOWORDINLINE(0x702B, 0xAAAA);
+
+EXTERN_API( Fixed )
+GetMovieRate (Movie theMovie) TWOWORDINLINE(0x702C, 0xAAAA);
+
+EXTERN_API( void )
+SetMovieRate (Movie theMovie,
+ Fixed rate) TWOWORDINLINE(0x702D, 0xAAAA);
+
+EXTERN_API( Fixed )
+GetMoviePreferredRate (Movie theMovie) THREEWORDINLINE(0x303C, 0x00F3, 0xAAAA);
+
+EXTERN_API( void )
+SetMoviePreferredRate (Movie theMovie,
+ Fixed rate) THREEWORDINLINE(0x303C, 0x00F4, 0xAAAA);
+
+EXTERN_API( short )
+GetMoviePreferredVolume (Movie theMovie) THREEWORDINLINE(0x303C, 0x00F5, 0xAAAA);
+
+EXTERN_API( void )
+SetMoviePreferredVolume (Movie theMovie,
+ short volume) THREEWORDINLINE(0x303C, 0x00F6, 0xAAAA);
+
+EXTERN_API( short )
+GetMovieVolume (Movie theMovie) TWOWORDINLINE(0x702E, 0xAAAA);
+
+EXTERN_API( void )
+SetMovieVolume (Movie theMovie,
+ short volume) TWOWORDINLINE(0x702F, 0xAAAA);
+
+EXTERN_API( void )
+GetMovieMatrix (Movie theMovie,
+ MatrixRecord * matrix) TWOWORDINLINE(0x7031, 0xAAAA);
+
+EXTERN_API( void )
+SetMovieMatrix (Movie theMovie,
+ const MatrixRecord * matrix) TWOWORDINLINE(0x7032, 0xAAAA);
+
+EXTERN_API( void )
+GetMoviePreviewTime (Movie theMovie,
+ TimeValue * previewTime,
+ TimeValue * previewDuration) TWOWORDINLINE(0x7033, 0xAAAA);
+
+EXTERN_API( void )
+SetMoviePreviewTime (Movie theMovie,
+ TimeValue previewTime,
+ TimeValue previewDuration) TWOWORDINLINE(0x7034, 0xAAAA);
+
+EXTERN_API( TimeValue )
+GetMoviePosterTime (Movie theMovie) TWOWORDINLINE(0x7035, 0xAAAA);
+
+EXTERN_API( void )
+SetMoviePosterTime (Movie theMovie,
+ TimeValue posterTime) TWOWORDINLINE(0x7036, 0xAAAA);
+
+EXTERN_API( void )
+GetMovieSelection (Movie theMovie,
+ TimeValue * selectionTime,
+ TimeValue * selectionDuration) TWOWORDINLINE(0x7037, 0xAAAA);
+
+EXTERN_API( void )
+SetMovieSelection (Movie theMovie,
+ TimeValue selectionTime,
+ TimeValue selectionDuration) TWOWORDINLINE(0x7038, 0xAAAA);
+
+EXTERN_API( void )
+SetMovieActiveSegment (Movie theMovie,
+ TimeValue startTime,
+ TimeValue duration) THREEWORDINLINE(0x303C, 0x015C, 0xAAAA);
+
+EXTERN_API( void )
+GetMovieActiveSegment (Movie theMovie,
+ TimeValue * startTime,
+ TimeValue * duration) THREEWORDINLINE(0x303C, 0x015D, 0xAAAA);
+
+EXTERN_API( TimeValue )
+GetMovieTime (Movie theMovie,
+ TimeRecord * currentTime) TWOWORDINLINE(0x7039, 0xAAAA);
+
+EXTERN_API( void )
+SetMovieTime (Movie theMovie,
+ const TimeRecord * newtime) TWOWORDINLINE(0x703C, 0xAAAA);
+
+EXTERN_API( void )
+SetMovieTimeValue (Movie theMovie,
+ TimeValue newtime) TWOWORDINLINE(0x703D, 0xAAAA);
+
+
+EXTERN_API( UserData )
+GetMovieUserData (Movie theMovie) TWOWORDINLINE(0x703E, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTGetTimeUntilNextTask (long * duration,
+ long scale) THREEWORDINLINE(0x303C, 0x036F, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTInstallNextTaskNeededSoonerCallback (QTNextTaskNeededSoonerCallbackUPP callbackProc,
+ TimeScale scale,
+ unsigned long flags,
+ void * refcon) THREEWORDINLINE(0x303C, 0x0376, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTUninstallNextTaskNeededSoonerCallback (QTNextTaskNeededSoonerCallbackUPP callbackProc,
+ void * refcon) THREEWORDINLINE(0x303C, 0x0377, 0xAAAA);
+
+/*************************
+* Track/Media finding routines
+**************************/
+EXTERN_API( long )
+GetMovieTrackCount (Movie theMovie) TWOWORDINLINE(0x703F, 0xAAAA);
+
+EXTERN_API( Track )
+GetMovieTrack (Movie theMovie,
+ long trackID) TWOWORDINLINE(0x7040, 0xAAAA);
+
+EXTERN_API( Track )
+GetMovieIndTrack (Movie theMovie,
+ long index) THREEWORDINLINE(0x303C, 0x0117, 0xAAAA);
+
+EXTERN_API( Track )
+GetMovieIndTrackType (Movie theMovie,
+ long index,
+ OSType trackType,
+ long flags) THREEWORDINLINE(0x303C, 0x0208, 0xAAAA);
+
+EXTERN_API( long )
+GetTrackID (Track theTrack) THREEWORDINLINE(0x303C, 0x0127, 0xAAAA);
+
+EXTERN_API( Movie )
+GetTrackMovie (Track theTrack) THREEWORDINLINE(0x303C, 0x00D0, 0xAAAA);
+
+/*************************
+* Track creation routines
+**************************/
+EXTERN_API( Track )
+NewMovieTrack (Movie theMovie,
+ Fixed width,
+ Fixed height,
+ short trackVolume) THREEWORDINLINE(0x303C, 0x0188, 0xAAAA);
+
+EXTERN_API( void )
+DisposeMovieTrack (Track theTrack) TWOWORDINLINE(0x7042, 0xAAAA);
+
+/*************************
+* Track State routines
+**************************/
+EXTERN_API( unsigned long )
+GetTrackCreationTime (Track theTrack) TWOWORDINLINE(0x7043, 0xAAAA);
+
+EXTERN_API( unsigned long )
+GetTrackModificationTime (Track theTrack) TWOWORDINLINE(0x7044, 0xAAAA);
+
+
+EXTERN_API( Boolean )
+GetTrackEnabled (Track theTrack) TWOWORDINLINE(0x7045, 0xAAAA);
+
+EXTERN_API( void )
+SetTrackEnabled (Track theTrack,
+ Boolean isEnabled) TWOWORDINLINE(0x7046, 0xAAAA);
+
+EXTERN_API( long )
+GetTrackUsage (Track theTrack) TWOWORDINLINE(0x7047, 0xAAAA);
+
+EXTERN_API( void )
+SetTrackUsage (Track theTrack,
+ long usage) TWOWORDINLINE(0x7048, 0xAAAA);
+
+EXTERN_API( TimeValue )
+GetTrackDuration (Track theTrack) TWOWORDINLINE(0x704B, 0xAAAA);
+
+EXTERN_API( TimeValue )
+GetTrackOffset (Track theTrack) TWOWORDINLINE(0x704C, 0xAAAA);
+
+EXTERN_API( void )
+SetTrackOffset (Track theTrack,
+ TimeValue movieOffsetTime) TWOWORDINLINE(0x704D, 0xAAAA);
+
+EXTERN_API( short )
+GetTrackLayer (Track theTrack) TWOWORDINLINE(0x7050, 0xAAAA);
+
+EXTERN_API( void )
+SetTrackLayer (Track theTrack,
+ short layer) TWOWORDINLINE(0x7051, 0xAAAA);
+
+EXTERN_API( Track )
+GetTrackAlternate (Track theTrack) TWOWORDINLINE(0x7052, 0xAAAA);
+
+EXTERN_API( void )
+SetTrackAlternate (Track theTrack,
+ Track alternateT) TWOWORDINLINE(0x7053, 0xAAAA);
+
+EXTERN_API( void )
+SetAutoTrackAlternatesEnabled (Movie theMovie,
+ Boolean enable) THREEWORDINLINE(0x303C, 0x015E, 0xAAAA);
+
+EXTERN_API( void )
+SelectMovieAlternates (Movie theMovie) THREEWORDINLINE(0x303C, 0x015F, 0xAAAA);
+
+EXTERN_API( short )
+GetTrackVolume (Track theTrack) TWOWORDINLINE(0x7054, 0xAAAA);
+
+EXTERN_API( void )
+SetTrackVolume (Track theTrack,
+ short volume) TWOWORDINLINE(0x7055, 0xAAAA);
+
+EXTERN_API( void )
+GetTrackMatrix (Track theTrack,
+ MatrixRecord * matrix) TWOWORDINLINE(0x7056, 0xAAAA);
+
+EXTERN_API( void )
+SetTrackMatrix (Track theTrack,
+ const MatrixRecord * matrix) TWOWORDINLINE(0x7057, 0xAAAA);
+
+EXTERN_API( void )
+GetTrackDimensions (Track theTrack,
+ Fixed * width,
+ Fixed * height) TWOWORDINLINE(0x705D, 0xAAAA);
+
+EXTERN_API( void )
+SetTrackDimensions (Track theTrack,
+ Fixed width,
+ Fixed height) TWOWORDINLINE(0x705E, 0xAAAA);
+
+EXTERN_API( UserData )
+GetTrackUserData (Track theTrack) TWOWORDINLINE(0x705F, 0xAAAA);
+
+EXTERN_API( OSErr )
+GetTrackDisplayMatrix (Track theTrack,
+ MatrixRecord * matrix) THREEWORDINLINE(0x303C, 0x0263, 0xAAAA);
+
+EXTERN_API( OSErr )
+GetTrackSoundLocalizationSettings (Track theTrack,
+ Handle * settings) THREEWORDINLINE(0x303C, 0x0282, 0xAAAA);
+
+EXTERN_API( OSErr )
+SetTrackSoundLocalizationSettings (Track theTrack,
+ Handle settings) THREEWORDINLINE(0x303C, 0x0283, 0xAAAA);
+
+/*************************
+* get Media routines
+**************************/
+EXTERN_API( Media )
+NewTrackMedia (Track theTrack,
+ OSType mediaType,
+ TimeScale timeScale,
+ Handle dataRef,
+ OSType dataRefType) THREEWORDINLINE(0x303C, 0x018E, 0xAAAA);
+
+EXTERN_API( void )
+DisposeTrackMedia (Media theMedia) TWOWORDINLINE(0x7061, 0xAAAA);
+
+EXTERN_API( Media )
+GetTrackMedia (Track theTrack) TWOWORDINLINE(0x7062, 0xAAAA);
+
+EXTERN_API( Track )
+GetMediaTrack (Media theMedia) THREEWORDINLINE(0x303C, 0x00C5, 0xAAAA);
+
+
+
+/*************************
+* Media State routines
+**************************/
+EXTERN_API( unsigned long )
+GetMediaCreationTime (Media theMedia) TWOWORDINLINE(0x7066, 0xAAAA);
+
+EXTERN_API( unsigned long )
+GetMediaModificationTime (Media theMedia) TWOWORDINLINE(0x7067, 0xAAAA);
+
+EXTERN_API( TimeScale )
+GetMediaTimeScale (Media theMedia) TWOWORDINLINE(0x7068, 0xAAAA);
+
+EXTERN_API( void )
+SetMediaTimeScale (Media theMedia,
+ TimeScale timeScale) TWOWORDINLINE(0x7069, 0xAAAA);
+
+EXTERN_API( TimeValue )
+GetMediaDuration (Media theMedia) TWOWORDINLINE(0x706A, 0xAAAA);
+
+EXTERN_API( short )
+GetMediaLanguage (Media theMedia) TWOWORDINLINE(0x706B, 0xAAAA);
+
+EXTERN_API( void )
+SetMediaLanguage (Media theMedia,
+ short language) TWOWORDINLINE(0x706C, 0xAAAA);
+
+EXTERN_API( short )
+GetMediaQuality (Media theMedia) TWOWORDINLINE(0x706D, 0xAAAA);
+
+EXTERN_API( void )
+SetMediaQuality (Media theMedia,
+ short quality) TWOWORDINLINE(0x706E, 0xAAAA);
+
+EXTERN_API( void )
+GetMediaHandlerDescription (Media theMedia,
+ OSType * mediaType,
+ Str255 creatorName,
+ OSType * creatorManufacturer) TWOWORDINLINE(0x706F, 0xAAAA);
+
+EXTERN_API( UserData )
+GetMediaUserData (Media theMedia) TWOWORDINLINE(0x7070, 0xAAAA);
+
+EXTERN_API( OSErr )
+GetMediaInputMap (Media theMedia,
+ QTAtomContainer * inputMap) THREEWORDINLINE(0x303C, 0x0249, 0xAAAA);
+
+EXTERN_API( OSErr )
+SetMediaInputMap (Media theMedia,
+ QTAtomContainer inputMap) THREEWORDINLINE(0x303C, 0x024A, 0xAAAA);
+
+/*************************
+* Media Handler routines
+**************************/
+EXTERN_API( MediaHandler )
+GetMediaHandler (Media theMedia) TWOWORDINLINE(0x7071, 0xAAAA);
+
+EXTERN_API( OSErr )
+SetMediaHandler (Media theMedia,
+ MediaHandlerComponent mH) THREEWORDINLINE(0x303C, 0x0190, 0xAAAA);
+
+
+/*************************
+* Media's Data routines
+**************************/
+EXTERN_API( OSErr )
+BeginMediaEdits (Media theMedia) TWOWORDINLINE(0x7072, 0xAAAA);
+
+EXTERN_API( OSErr )
+EndMediaEdits (Media theMedia) TWOWORDINLINE(0x7073, 0xAAAA);
+
+EXTERN_API( OSErr )
+SetMediaDefaultDataRefIndex (Media theMedia,
+ short index) THREEWORDINLINE(0x303C, 0x01E0, 0xAAAA);
+
+EXTERN_API( void )
+GetMediaDataHandlerDescription (Media theMedia,
+ short index,
+ OSType * dhType,
+ Str255 creatorName,
+ OSType * creatorManufacturer) THREEWORDINLINE(0x303C, 0x019E, 0xAAAA);
+
+EXTERN_API( DataHandler )
+GetMediaDataHandler (Media theMedia,
+ short index) THREEWORDINLINE(0x303C, 0x019F, 0xAAAA);
+
+EXTERN_API( OSErr )
+SetMediaDataHandler (Media theMedia,
+ short index,
+ DataHandlerComponent dataHandler) THREEWORDINLINE(0x303C, 0x01A0, 0xAAAA);
+
+EXTERN_API( Component )
+GetDataHandler (Handle dataRef,
+ OSType dataHandlerSubType,
+ long flags) THREEWORDINLINE(0x303C, 0x01ED, 0xAAAA);
+
+EXTERN_API( OSErr )
+OpenADataHandler (Handle dataRef,
+ OSType dataHandlerSubType,
+ Handle anchorDataRef,
+ OSType anchorDataRefType,
+ TimeBase tb,
+ long flags,
+ ComponentInstance * dh) THREEWORDINLINE(0x303C, 0x031C, 0xAAAA);
+
+/*************************
+* Media Sample Table Routines
+**************************/
+EXTERN_API( long )
+GetMediaSampleDescriptionCount (Media theMedia) TWOWORDINLINE(0x7077, 0xAAAA);
+
+EXTERN_API( void )
+GetMediaSampleDescription (Media theMedia,
+ long index,
+ SampleDescriptionHandle descH) TWOWORDINLINE(0x7078, 0xAAAA);
+
+EXTERN_API( OSErr )
+SetMediaSampleDescription (Media theMedia,
+ long index,
+ SampleDescriptionHandle descH) THREEWORDINLINE(0x303C, 0x01D0, 0xAAAA);
+
+EXTERN_API( long )
+GetMediaSampleCount (Media theMedia) TWOWORDINLINE(0x7079, 0xAAAA);
+
+EXTERN_API( long )
+GetMediaSyncSampleCount (Media theMedia) THREEWORDINLINE(0x303C, 0x02B2, 0xAAAA);
+
+EXTERN_API( void )
+SampleNumToMediaTime (Media theMedia,
+ long logicalSampleNum,
+ TimeValue * sampleTime,
+ TimeValue * sampleDuration) TWOWORDINLINE(0x707A, 0xAAAA);
+
+EXTERN_API( void )
+MediaTimeToSampleNum (Media theMedia,
+ TimeValue time,
+ long * sampleNum,
+ TimeValue * sampleTime,
+ TimeValue * sampleDuration) TWOWORDINLINE(0x707B, 0xAAAA);
+
+
+EXTERN_API( OSErr )
+AddMediaSample (Media theMedia,
+ Handle dataIn,
+ long inOffset,
+ unsigned long size,
+ TimeValue durationPerSample,
+ SampleDescriptionHandle sampleDescriptionH,
+ long numberOfSamples,
+ short sampleFlags,
+ TimeValue * sampleTime) TWOWORDINLINE(0x707C, 0xAAAA);
+
+EXTERN_API( OSErr )
+AddMediaSampleReference (Media theMedia,
+ long dataOffset,
+ unsigned long size,
+ TimeValue durationPerSample,
+ SampleDescriptionHandle sampleDescriptionH,
+ long numberOfSamples,
+ short sampleFlags,
+ TimeValue * sampleTime) TWOWORDINLINE(0x707D, 0xAAAA);
+
+EXTERN_API( OSErr )
+AddMediaSampleReferences (Media theMedia,
+ SampleDescriptionHandle sampleDescriptionH,
+ long numberOfSamples,
+ SampleReferencePtr sampleRefs,
+ TimeValue * sampleTime) THREEWORDINLINE(0x303C, 0x01F7, 0xAAAA);
+
+EXTERN_API( OSErr )
+AddMediaSampleReferences64 (Media theMedia,
+ SampleDescriptionHandle sampleDescriptionH,
+ long numberOfSamples,
+ SampleReference64Ptr sampleRefs,
+ TimeValue * sampleTime) THREEWORDINLINE(0x303C, 0x02E8, 0xAAAA);
+
+EXTERN_API( OSErr )
+GetMediaSample (Media theMedia,
+ Handle dataOut,
+ long maxSizeToGrow,
+ long * size,
+ TimeValue time,
+ TimeValue * sampleTime,
+ TimeValue * durationPerSample,
+ SampleDescriptionHandle sampleDescriptionH,
+ long * sampleDescriptionIndex,
+ long maxNumberOfSamples,
+ long * numberOfSamples,
+ short * sampleFlags) TWOWORDINLINE(0x707E, 0xAAAA);
+
+EXTERN_API( OSErr )
+GetMediaSampleReference (Media theMedia,
+ long * dataOffset,
+ long * size,
+ TimeValue time,
+ TimeValue * sampleTime,
+ TimeValue * durationPerSample,
+ SampleDescriptionHandle sampleDescriptionH,
+ long * sampleDescriptionIndex,
+ long maxNumberOfSamples,
+ long * numberOfSamples,
+ short * sampleFlags) TWOWORDINLINE(0x707F, 0xAAAA);
+
+EXTERN_API( OSErr )
+GetMediaSampleReferences (Media theMedia,
+ TimeValue time,
+ TimeValue * sampleTime,
+ SampleDescriptionHandle sampleDescriptionH,
+ long * sampleDescriptionIndex,
+ long maxNumberOfEntries,
+ long * actualNumberofEntries,
+ SampleReferencePtr sampleRefs) THREEWORDINLINE(0x303C, 0x0235, 0xAAAA);
+
+EXTERN_API( OSErr )
+GetMediaSampleReferences64 (Media theMedia,
+ TimeValue time,
+ TimeValue * sampleTime,
+ SampleDescriptionHandle sampleDescriptionH,
+ long * sampleDescriptionIndex,
+ long maxNumberOfEntries,
+ long * actualNumberofEntries,
+ SampleReference64Ptr sampleRefs) THREEWORDINLINE(0x303C, 0x02E9, 0xAAAA);
+
+EXTERN_API( OSErr )
+SetMediaPreferredChunkSize (Media theMedia,
+ long maxChunkSize) THREEWORDINLINE(0x303C, 0x01F8, 0xAAAA);
+
+EXTERN_API( OSErr )
+GetMediaPreferredChunkSize (Media theMedia,
+ long * maxChunkSize) THREEWORDINLINE(0x303C, 0x01F9, 0xAAAA);
+
+EXTERN_API( OSErr )
+SetMediaShadowSync (Media theMedia,
+ long frameDiffSampleNum,
+ long syncSampleNum) THREEWORDINLINE(0x303C, 0x0121, 0xAAAA);
+
+EXTERN_API( OSErr )
+GetMediaShadowSync (Media theMedia,
+ long frameDiffSampleNum,
+ long * syncSampleNum) THREEWORDINLINE(0x303C, 0x0122, 0xAAAA);
+
+/*************************
+* Editing Routines
+**************************/
+EXTERN_API( OSErr )
+InsertMediaIntoTrack (Track theTrack,
+ TimeValue trackStart,
+ TimeValue mediaTime,
+ TimeValue mediaDuration,
+ Fixed mediaRate) THREEWORDINLINE(0x303C, 0x0183, 0xAAAA);
+
+EXTERN_API( OSErr )
+InsertTrackSegment (Track srcTrack,
+ Track dstTrack,
+ TimeValue srcIn,
+ TimeValue srcDuration,
+ TimeValue dstIn) THREEWORDINLINE(0x303C, 0x0085, 0xAAAA);
+
+EXTERN_API( OSErr )
+InsertMovieSegment (Movie srcMovie,
+ Movie dstMovie,
+ TimeValue srcIn,
+ TimeValue srcDuration,
+ TimeValue dstIn) THREEWORDINLINE(0x303C, 0x0086, 0xAAAA);
+
+EXTERN_API( OSErr )
+InsertEmptyTrackSegment (Track dstTrack,
+ TimeValue dstIn,
+ TimeValue dstDuration) THREEWORDINLINE(0x303C, 0x0087, 0xAAAA);
+
+EXTERN_API( OSErr )
+InsertEmptyMovieSegment (Movie dstMovie,
+ TimeValue dstIn,
+ TimeValue dstDuration) THREEWORDINLINE(0x303C, 0x0088, 0xAAAA);
+
+EXTERN_API( OSErr )
+DeleteTrackSegment (Track theTrack,
+ TimeValue startTime,
+ TimeValue duration) THREEWORDINLINE(0x303C, 0x0089, 0xAAAA);
+
+EXTERN_API( OSErr )
+DeleteMovieSegment (Movie theMovie,
+ TimeValue startTime,
+ TimeValue duration) THREEWORDINLINE(0x303C, 0x008A, 0xAAAA);
+
+EXTERN_API( OSErr )
+ScaleTrackSegment (Track theTrack,
+ TimeValue startTime,
+ TimeValue oldDuration,
+ TimeValue newDuration) THREEWORDINLINE(0x303C, 0x008B, 0xAAAA);
+
+EXTERN_API( OSErr )
+ScaleMovieSegment (Movie theMovie,
+ TimeValue startTime,
+ TimeValue oldDuration,
+ TimeValue newDuration) THREEWORDINLINE(0x303C, 0x008C, 0xAAAA);
+
+
+/*************************
+* Hi-level Editing Routines
+**************************/
+EXTERN_API( Movie )
+CutMovieSelection (Movie theMovie) THREEWORDINLINE(0x303C, 0x008D, 0xAAAA);
+
+EXTERN_API( Movie )
+CopyMovieSelection (Movie theMovie) THREEWORDINLINE(0x303C, 0x008E, 0xAAAA);
+
+EXTERN_API( void )
+PasteMovieSelection (Movie theMovie,
+ Movie src) THREEWORDINLINE(0x303C, 0x008F, 0xAAAA);
+
+EXTERN_API( void )
+AddMovieSelection (Movie theMovie,
+ Movie src) THREEWORDINLINE(0x303C, 0x0152, 0xAAAA);
+
+EXTERN_API( void )
+ClearMovieSelection (Movie theMovie) THREEWORDINLINE(0x303C, 0x00E1, 0xAAAA);
+
+EXTERN_API( OSErr )
+PasteHandleIntoMovie (Handle h,
+ OSType handleType,
+ Movie theMovie,
+ long flags,
+ ComponentInstance userComp) THREEWORDINLINE(0x303C, 0x00CB, 0xAAAA);
+
+EXTERN_API( OSErr )
+PutMovieIntoTypedHandle (Movie theMovie,
+ Track targetTrack,
+ OSType handleType,
+ Handle publicMovie,
+ TimeValue start,
+ TimeValue dur,
+ long flags,
+ ComponentInstance userComp) THREEWORDINLINE(0x303C, 0x01CD, 0xAAAA);
+
+EXTERN_API( Component )
+IsScrapMovie (Track targetTrack) THREEWORDINLINE(0x303C, 0x00CC, 0xAAAA);
+
+/*************************
+* Middle-level Editing Routines
+**************************/
+EXTERN_API( OSErr )
+CopyTrackSettings (Track srcTrack,
+ Track dstTrack) THREEWORDINLINE(0x303C, 0x0153, 0xAAAA);
+
+EXTERN_API( OSErr )
+CopyMovieSettings (Movie srcMovie,
+ Movie dstMovie) THREEWORDINLINE(0x303C, 0x0154, 0xAAAA);
+
+EXTERN_API( OSErr )
+AddEmptyTrackToMovie (Track srcTrack,
+ Movie dstMovie,
+ Handle dataRef,
+ OSType dataRefType,
+ Track * dstTrack) TWOWORDINLINE(0x7074, 0xAAAA);
+
+enum {
+ kQTCloneShareSamples = 1 << 0,
+ kQTCloneDontCopyEdits = 1 << 1
+};
+
+EXTERN_API( OSErr )
+AddClonedTrackToMovie (Track srcTrack,
+ Movie dstMovie,
+ long flags,
+ Track * dstTrack) THREEWORDINLINE(0x303C, 0x0344, 0xAAAA);
+
+/*************************
+* movie & track edit state routines
+**************************/
+EXTERN_API( MovieEditState )
+NewMovieEditState (Movie theMovie) THREEWORDINLINE(0x303C, 0x0104, 0xAAAA);
+
+EXTERN_API( OSErr )
+UseMovieEditState (Movie theMovie,
+ MovieEditState toState) THREEWORDINLINE(0x303C, 0x0105, 0xAAAA);
+
+EXTERN_API( OSErr )
+DisposeMovieEditState (MovieEditState state) THREEWORDINLINE(0x303C, 0x0106, 0xAAAA);
+
+EXTERN_API( TrackEditState )
+NewTrackEditState (Track theTrack) THREEWORDINLINE(0x303C, 0x0107, 0xAAAA);
+
+EXTERN_API( OSErr )
+UseTrackEditState (Track theTrack,
+ TrackEditState state) THREEWORDINLINE(0x303C, 0x0108, 0xAAAA);
+
+EXTERN_API( OSErr )
+DisposeTrackEditState (TrackEditState state) THREEWORDINLINE(0x303C, 0x0109, 0xAAAA);
+
+/*************************
+* track reference routines
+**************************/
+EXTERN_API( OSErr )
+AddTrackReference (Track theTrack,
+ Track refTrack,
+ OSType refType,
+ long * addedIndex) THREEWORDINLINE(0x303C, 0x01F0, 0xAAAA);
+
+EXTERN_API( OSErr )
+DeleteTrackReference (Track theTrack,
+ OSType refType,
+ long index) THREEWORDINLINE(0x303C, 0x01F1, 0xAAAA);
+
+EXTERN_API( OSErr )
+SetTrackReference (Track theTrack,
+ Track refTrack,
+ OSType refType,
+ long index) THREEWORDINLINE(0x303C, 0x01F2, 0xAAAA);
+
+EXTERN_API( Track )
+GetTrackReference (Track theTrack,
+ OSType refType,
+ long index) THREEWORDINLINE(0x303C, 0x01F3, 0xAAAA);
+
+EXTERN_API( OSType )
+GetNextTrackReferenceType (Track theTrack,
+ OSType refType) THREEWORDINLINE(0x303C, 0x01F4, 0xAAAA);
+
+EXTERN_API( long )
+GetTrackReferenceCount (Track theTrack,
+ OSType refType) THREEWORDINLINE(0x303C, 0x01F5, 0xAAAA);
+
+
+/*************************
+* high level file conversion routines
+**************************/
+EXTERN_API( OSErr )
+ConvertFileToMovieFile (const FSSpec * inputFile,
+ const FSSpec * outputFile,
+ OSType creator,
+ ScriptCode scriptTag,
+ short * resID,
+ long flags,
+ ComponentInstance userComp,
+ MovieProgressUPP proc,
+ long refCon) THREEWORDINLINE(0x303C, 0x01CB, 0xAAAA);
+
+EXTERN_API( OSErr )
+ConvertMovieToFile (Movie theMovie,
+ Track onlyTrack,
+ FSSpec * outputFile,
+ OSType fileType,
+ OSType creator,
+ ScriptCode scriptTag,
+ short * resID,
+ long flags,
+ ComponentInstance userComp) THREEWORDINLINE(0x303C, 0x01CC, 0xAAAA);
+
+enum {
+ kGetMovieImporterValidateToFind = 1L << 0,
+ kGetMovieImporterAllowNewFile = 1L << 1,
+ kGetMovieImporterDontConsiderGraphicsImporters = 1L << 2,
+ kGetMovieImporterDontConsiderFileOnlyImporters = 1L << 6,
+ kGetMovieImporterAutoImportOnly = 1L << 10 /* reject aggressive movie importers which have dontAutoFileMovieImport set*/
+};
+
+EXTERN_API( OSErr )
+GetMovieImporterForDataRef (OSType dataRefType,
+ Handle dataRef,
+ long flags,
+ Component * importer) THREEWORDINLINE(0x303C, 0x02C7, 0xAAAA);
+
+
+enum {
+ kQTGetMIMETypeInfoIsQuickTimeMovieType = FOUR_CHAR_CODE('moov'), /* info is a pointer to a Boolean*/
+ kQTGetMIMETypeInfoIsUnhelpfulType = FOUR_CHAR_CODE('dumb') /* info is a pointer to a Boolean*/
+};
+
+EXTERN_API( OSErr )
+QTGetMIMETypeInfo (const char * mimeStringStart,
+ short mimeStringLength,
+ OSType infoSelector,
+ void * infoDataPtr,
+ long * infoDataSize) THREEWORDINLINE(0x303C, 0x036A, 0xAAAA);
+
+/*************************
+* Movie Timebase Conversion Routines
+**************************/
+EXTERN_API( TimeValue )
+TrackTimeToMediaTime (TimeValue value,
+ Track theTrack) THREEWORDINLINE(0x303C, 0x0096, 0xAAAA);
+
+EXTERN_API( Fixed )
+GetTrackEditRate (Track theTrack,
+ TimeValue atTime) THREEWORDINLINE(0x303C, 0x0123, 0xAAAA);
+
+
+/*************************
+* Miscellaneous Routines
+**************************/
+
+EXTERN_API( long )
+GetMovieDataSize (Movie theMovie,
+ TimeValue startTime,
+ TimeValue duration) THREEWORDINLINE(0x303C, 0x0098, 0xAAAA);
+
+EXTERN_API( OSErr )
+GetMovieDataSize64 (Movie theMovie,
+ TimeValue startTime,
+ TimeValue duration,
+ wide * dataSize) THREEWORDINLINE(0x303C, 0x02EB, 0xAAAA);
+
+EXTERN_API( long )
+GetTrackDataSize (Track theTrack,
+ TimeValue startTime,
+ TimeValue duration) THREEWORDINLINE(0x303C, 0x0149, 0xAAAA);
+
+EXTERN_API( OSErr )
+GetTrackDataSize64 (Track theTrack,
+ TimeValue startTime,
+ TimeValue duration,
+ wide * dataSize) THREEWORDINLINE(0x303C, 0x02EC, 0xAAAA);
+
+EXTERN_API( long )
+GetMediaDataSize (Media theMedia,
+ TimeValue startTime,
+ TimeValue duration) THREEWORDINLINE(0x303C, 0x0099, 0xAAAA);
+
+EXTERN_API( OSErr )
+GetMediaDataSize64 (Media theMedia,
+ TimeValue startTime,
+ TimeValue duration,
+ wide * dataSize) THREEWORDINLINE(0x303C, 0x02ED, 0xAAAA);
+
+EXTERN_API( Boolean )
+PtInMovie (Movie theMovie,
+ Point pt) THREEWORDINLINE(0x303C, 0x009A, 0xAAAA);
+
+EXTERN_API( Boolean )
+PtInTrack (Track theTrack,
+ Point pt) THREEWORDINLINE(0x303C, 0x009B, 0xAAAA);
+
+/*************************
+* Group Selection Routines
+**************************/
+
+EXTERN_API( void )
+SetMovieLanguage (Movie theMovie,
+ long language) THREEWORDINLINE(0x303C, 0x009C, 0xAAAA);
+
+
+/*************************
+* User Data
+**************************/
+
+EXTERN_API( OSErr )
+GetUserData (UserData theUserData,
+ Handle data,
+ OSType udType,
+ long index) THREEWORDINLINE(0x303C, 0x009E, 0xAAAA);
+
+EXTERN_API( OSErr )
+AddUserData (UserData theUserData,
+ Handle data,
+ OSType udType) THREEWORDINLINE(0x303C, 0x009F, 0xAAAA);
+
+EXTERN_API( OSErr )
+RemoveUserData (UserData theUserData,
+ OSType udType,
+ long index) THREEWORDINLINE(0x303C, 0x00A0, 0xAAAA);
+
+EXTERN_API( short )
+CountUserDataType (UserData theUserData,
+ OSType udType) THREEWORDINLINE(0x303C, 0x014B, 0xAAAA);
+
+EXTERN_API( long )
+GetNextUserDataType (UserData theUserData,
+ OSType udType) THREEWORDINLINE(0x303C, 0x01A5, 0xAAAA);
+
+EXTERN_API( OSErr )
+GetUserDataItem (UserData theUserData,
+ void * data,
+ long size,
+ OSType udType,
+ long index) THREEWORDINLINE(0x303C, 0x0126, 0xAAAA);
+
+EXTERN_API( OSErr )
+SetUserDataItem (UserData theUserData,
+ void * data,
+ long size,
+ OSType udType,
+ long index) THREEWORDINLINE(0x303C, 0x012E, 0xAAAA);
+
+EXTERN_API( OSErr )
+AddUserDataText (UserData theUserData,
+ Handle data,
+ OSType udType,
+ long index,
+ short itlRegionTag) THREEWORDINLINE(0x303C, 0x014C, 0xAAAA);
+
+EXTERN_API( OSErr )
+GetUserDataText (UserData theUserData,
+ Handle data,
+ OSType udType,
+ long index,
+ short itlRegionTag) THREEWORDINLINE(0x303C, 0x014D, 0xAAAA);
+
+EXTERN_API( OSErr )
+RemoveUserDataText (UserData theUserData,
+ OSType udType,
+ long index,
+ short itlRegionTag) THREEWORDINLINE(0x303C, 0x014E, 0xAAAA);
+
+EXTERN_API( OSErr )
+NewUserData (UserData * theUserData) THREEWORDINLINE(0x303C, 0x012F, 0xAAAA);
+
+EXTERN_API( OSErr )
+DisposeUserData (UserData theUserData) THREEWORDINLINE(0x303C, 0x0130, 0xAAAA);
+
+EXTERN_API( OSErr )
+NewUserDataFromHandle (Handle h,
+ UserData * theUserData) THREEWORDINLINE(0x303C, 0x0131, 0xAAAA);
+
+EXTERN_API( OSErr )
+PutUserDataIntoHandle (UserData theUserData,
+ Handle h) THREEWORDINLINE(0x303C, 0x0132, 0xAAAA);
+
+
+enum {
+ kQTCopyUserDataReplace = FOUR_CHAR_CODE('rplc'), /* Delete all destination user data items and then add source user data items */
+ kQTCopyUserDataMerge = FOUR_CHAR_CODE('merg') /* Add source user data items to destination user data */
+};
+
+EXTERN_API( OSErr )
+CopyMovieUserData (Movie srcMovie,
+ Movie dstMovie,
+ OSType copyRule) THREEWORDINLINE(0x303C, 0x0386, 0xAAAA);
+
+EXTERN_API( OSErr )
+CopyTrackUserData (Track srcTrack,
+ Track dstTrack,
+ OSType copyRule) THREEWORDINLINE(0x303C, 0x0387, 0xAAAA);
+
+EXTERN_API( OSErr )
+CopyMediaUserData (Media srcMedia,
+ Media dstMedia,
+ OSType copyRule) THREEWORDINLINE(0x303C, 0x0388, 0xAAAA);
+
+EXTERN_API( OSErr )
+CopyUserData (UserData srcUserData,
+ UserData dstUserData,
+ OSType copyRule) THREEWORDINLINE(0x303C, 0x0389, 0xAAAA);
+
+
+EXTERN_API( OSErr )
+SetMoviePropertyAtom (Movie theMovie,
+ QTAtomContainer propertyAtom) THREEWORDINLINE(0x303C, 0x0284, 0xAAAA);
+
+EXTERN_API( OSErr )
+GetMoviePropertyAtom (Movie theMovie,
+ QTAtomContainer * propertyAtom) THREEWORDINLINE(0x303C, 0x0285, 0xAAAA);
+
+
+EXTERN_API( void )
+GetMediaNextInterestingTime (Media theMedia,
+ short interestingTimeFlags,
+ TimeValue time,
+ Fixed rate,
+ TimeValue * interestingTime,
+ TimeValue * interestingDuration) THREEWORDINLINE(0x303C, 0x016D, 0xAAAA);
+
+EXTERN_API( void )
+GetTrackNextInterestingTime (Track theTrack,
+ short interestingTimeFlags,
+ TimeValue time,
+ Fixed rate,
+ TimeValue * interestingTime,
+ TimeValue * interestingDuration) THREEWORDINLINE(0x303C, 0x00E2, 0xAAAA);
+
+EXTERN_API( void )
+GetMovieNextInterestingTime (Movie theMovie,
+ short interestingTimeFlags,
+ short numMediaTypes,
+ const OSType * whichMediaTypes,
+ TimeValue time,
+ Fixed rate,
+ TimeValue * interestingTime,
+ TimeValue * interestingDuration) THREEWORDINLINE(0x303C, 0x010E, 0xAAAA);
+
+
+EXTERN_API( OSErr )
+CreateMovieFile (const FSSpec * fileSpec,
+ OSType creator,
+ ScriptCode scriptTag,
+ long createMovieFileFlags,
+ short * resRefNum,
+ Movie * newmovie) THREEWORDINLINE(0x303C, 0x0191, 0xAAAA);
+
+EXTERN_API( OSErr )
+OpenMovieFile (const FSSpec * fileSpec,
+ short * resRefNum,
+ SInt8 permission) THREEWORDINLINE(0x303C, 0x0192, 0xAAAA);
+
+EXTERN_API( OSErr )
+CloseMovieFile (short resRefNum) THREEWORDINLINE(0x303C, 0x00D5, 0xAAAA);
+
+EXTERN_API( OSErr )
+DeleteMovieFile (const FSSpec * fileSpec) THREEWORDINLINE(0x303C, 0x0175, 0xAAAA);
+
+EXTERN_API( OSErr )
+NewMovieFromFile (Movie * theMovie,
+ short resRefNum,
+ short * resId,
+ StringPtr resName,
+ short newMovieFlags,
+ Boolean * dataRefWasChanged) THREEWORDINLINE(0x303C, 0x00F0, 0xAAAA);
+
+EXTERN_API( OSErr )
+NewMovieFromHandle (Movie * theMovie,
+ Handle h,
+ short newMovieFlags,
+ Boolean * dataRefWasChanged) THREEWORDINLINE(0x303C, 0x00F1, 0xAAAA);
+
+EXTERN_API( OSErr )
+NewMovieFromDataFork (Movie * theMovie,
+ short fRefNum,
+ long fileOffset,
+ short newMovieFlags,
+ Boolean * dataRefWasChanged) THREEWORDINLINE(0x303C, 0x01B3, 0xAAAA);
+
+EXTERN_API( OSErr )
+NewMovieFromDataFork64 (Movie * theMovie,
+ long fRefNum,
+ const wide * fileOffset,
+ short newMovieFlags,
+ Boolean * dataRefWasChanged) THREEWORDINLINE(0x303C, 0x02EE, 0xAAAA);
+
+EXTERN_API( OSErr )
+NewMovieFromUserProc (Movie * m,
+ short flags,
+ Boolean * dataRefWasChanged,
+ GetMovieUPP getProc,
+ void * refCon,
+ Handle defaultDataRef,
+ OSType dataRefType) THREEWORDINLINE(0x303C, 0x01EC, 0xAAAA);
+
+EXTERN_API( OSErr )
+NewMovieFromDataRef (Movie * m,
+ short flags,
+ short * id,
+ Handle dataRef,
+ OSType dataRefType) THREEWORDINLINE(0x303C, 0x0220, 0xAAAA);
+
+EXTERN_API( OSErr )
+NewMovieFromStorageOffset (Movie * theMovie,
+ DataHandler dh,
+ const wide * fileOffset,
+ short newMovieFlags,
+ Boolean * dataRefWasChanged) THREEWORDINLINE(0x303C, 0x03B4, 0xAAAA);
+
+EXTERN_API( OSErr )
+NewMovieForDataRefFromHandle (Movie * theMovie,
+ Handle h,
+ short newMovieFlags,
+ Boolean * dataRefWasChanged,
+ Handle dataRef,
+ OSType dataRefType) THREEWORDINLINE(0x303C, 0x0381, 0xAAAA);
+
+EXTERN_API( OSErr )
+AddMovieResource (Movie theMovie,
+ short resRefNum,
+ short * resId,
+ ConstStr255Param resName) THREEWORDINLINE(0x303C, 0x00D7, 0xAAAA);
+
+EXTERN_API( OSErr )
+UpdateMovieResource (Movie theMovie,
+ short resRefNum,
+ short resId,
+ ConstStr255Param resName) THREEWORDINLINE(0x303C, 0x00D8, 0xAAAA);
+
+EXTERN_API( OSErr )
+RemoveMovieResource (short resRefNum,
+ short resId) THREEWORDINLINE(0x303C, 0x0176, 0xAAAA);
+
+EXTERN_API( OSErr )
+CreateMovieStorage (Handle dataRef,
+ OSType dataRefType,
+ OSType creator,
+ ScriptCode scriptTag,
+ long createMovieFileFlags,
+ DataHandler * outDataHandler,
+ Movie * newmovie) THREEWORDINLINE(0x303C, 0x038A, 0xAAAA);
+
+EXTERN_API( OSErr )
+OpenMovieStorage (Handle dataRef,
+ OSType dataRefType,
+ long flags,
+ DataHandler * outDataHandler) THREEWORDINLINE(0x303C, 0x038B, 0xAAAA);
+
+EXTERN_API( OSErr )
+CloseMovieStorage (DataHandler dh) THREEWORDINLINE(0x303C, 0x038C, 0xAAAA);
+
+EXTERN_API( OSErr )
+DeleteMovieStorage (Handle dataRef,
+ OSType dataRefType) THREEWORDINLINE(0x303C, 0x038D, 0xAAAA);
+
+EXTERN_API( OSErr )
+AddMovieToStorage (Movie theMovie,
+ DataHandler dh) THREEWORDINLINE(0x303C, 0x038F, 0xAAAA);
+
+EXTERN_API( OSErr )
+UpdateMovieInStorage (Movie theMovie,
+ DataHandler dh) THREEWORDINLINE(0x303C, 0x0390, 0xAAAA);
+
+EXTERN_API( Boolean )
+HasMovieChanged (Movie theMovie) THREEWORDINLINE(0x303C, 0x00D9, 0xAAAA);
+
+EXTERN_API( void )
+ClearMovieChanged (Movie theMovie) THREEWORDINLINE(0x303C, 0x0113, 0xAAAA);
+
+EXTERN_API( OSErr )
+SetMovieDefaultDataRef (Movie theMovie,
+ Handle dataRef,
+ OSType dataRefType) THREEWORDINLINE(0x303C, 0x01C1, 0xAAAA);
+
+EXTERN_API( OSErr )
+GetMovieDefaultDataRef (Movie theMovie,
+ Handle * dataRef,
+ OSType * dataRefType) THREEWORDINLINE(0x303C, 0x01D2, 0xAAAA);
+
+EXTERN_API( OSErr )
+SetMovieAnchorDataRef (Movie theMovie,
+ Handle dataRef,
+ OSType dataRefType) THREEWORDINLINE(0x303C, 0x0315, 0xAAAA);
+
+EXTERN_API( OSErr )
+GetMovieAnchorDataRef (Movie theMovie,
+ Handle * dataRef,
+ OSType * dataRefType,
+ long * outFlags) THREEWORDINLINE(0x303C, 0x0316, 0xAAAA);
+
+EXTERN_API( OSErr )
+SetMovieColorTable (Movie theMovie,
+ CTabHandle ctab) THREEWORDINLINE(0x303C, 0x0205, 0xAAAA);
+
+EXTERN_API( OSErr )
+GetMovieColorTable (Movie theMovie,
+ CTabHandle * ctab) THREEWORDINLINE(0x303C, 0x0206, 0xAAAA);
+
+EXTERN_API( void )
+FlattenMovie (Movie theMovie,
+ long movieFlattenFlags,
+ const FSSpec * theFile,
+ OSType creator,
+ ScriptCode scriptTag,
+ long createMovieFileFlags,
+ short * resId,
+ ConstStr255Param resName) THREEWORDINLINE(0x303C, 0x019B, 0xAAAA);
+
+EXTERN_API( Movie )
+FlattenMovieData (Movie theMovie,
+ long movieFlattenFlags,
+ const FSSpec * theFile,
+ OSType creator,
+ ScriptCode scriptTag,
+ long createMovieFileFlags) THREEWORDINLINE(0x303C, 0x019C, 0xAAAA);
+
+EXTERN_API( Movie )
+FlattenMovieDataToDataRef (Movie theMovie,
+ long movieFlattenFlags,
+ Handle dataRef,
+ OSType dataRefType,
+ OSType creator,
+ ScriptCode scriptTag,
+ long createMovieFileFlags) THREEWORDINLINE(0x303C, 0x0392, 0xAAAA);
+
+EXTERN_API( void )
+SetMovieProgressProc (Movie theMovie,
+ MovieProgressUPP p,
+ long refcon) THREEWORDINLINE(0x303C, 0x019A, 0xAAAA);
+
+EXTERN_API( void )
+GetMovieProgressProc (Movie theMovie,
+ MovieProgressUPP * p,
+ long * refcon) THREEWORDINLINE(0x303C, 0x0300, 0xAAAA);
+
+EXTERN_API( OSErr )
+CreateShortcutMovieFile (const FSSpec * fileSpec,
+ OSType creator,
+ ScriptCode scriptTag,
+ long createMovieFileFlags,
+ Handle targetDataRef,
+ OSType targetDataRefType) THREEWORDINLINE(0x303C, 0x02FA, 0xAAAA);
+
+EXTERN_API( OSErr )
+MovieSearchText (Movie theMovie,
+ Ptr text,
+ long size,
+ long searchFlags,
+ Track * searchTrack,
+ TimeValue * searchTime,
+ long * searchOffset) THREEWORDINLINE(0x303C, 0x0207, 0xAAAA);
+
+EXTERN_API( void )
+GetPosterBox (Movie theMovie,
+ Rect * boxRect) THREEWORDINLINE(0x303C, 0x016F, 0xAAAA);
+
+EXTERN_API( void )
+SetPosterBox (Movie theMovie,
+ const Rect * boxRect) THREEWORDINLINE(0x303C, 0x0170, 0xAAAA);
+
+EXTERN_API( RgnHandle )
+GetMovieSegmentDisplayBoundsRgn (Movie theMovie,
+ TimeValue time,
+ TimeValue duration) THREEWORDINLINE(0x303C, 0x016C, 0xAAAA);
+
+EXTERN_API( RgnHandle )
+GetTrackSegmentDisplayBoundsRgn (Track theTrack,
+ TimeValue time,
+ TimeValue duration) THREEWORDINLINE(0x303C, 0x016B, 0xAAAA);
+
+EXTERN_API( void )
+SetMovieCoverProcs (Movie theMovie,
+ MovieRgnCoverUPP uncoverProc,
+ MovieRgnCoverUPP coverProc,
+ long refcon) THREEWORDINLINE(0x303C, 0x0179, 0xAAAA);
+
+EXTERN_API( OSErr )
+GetMovieCoverProcs (Movie theMovie,
+ MovieRgnCoverUPP * uncoverProc,
+ MovieRgnCoverUPP * coverProc,
+ long * refcon) THREEWORDINLINE(0x303C, 0x01DD, 0xAAAA);
+
+EXTERN_API( ComponentResult )
+GetTrackStatus (Track theTrack) THREEWORDINLINE(0x303C, 0x0172, 0xAAAA);
+
+EXTERN_API( ComponentResult )
+GetMovieStatus (Movie theMovie,
+ Track * firstProblemTrack) THREEWORDINLINE(0x303C, 0x0173, 0xAAAA);
+
+enum {
+ kMovieLoadStateError = -1L,
+ kMovieLoadStateLoading = 1000,
+ kMovieLoadStateLoaded = 2000,
+ kMovieLoadStatePlayable = 10000,
+ kMovieLoadStatePlaythroughOK = 20000,
+ kMovieLoadStateComplete = 100000L
+};
+
+EXTERN_API( long )
+GetMovieLoadState (Movie theMovie) THREEWORDINLINE(0x303C, 0x0314, 0xAAAA);
+
+/* Input flags for CanQuickTimeOpenFile/DataRef */
+enum {
+ kQTDontUseDataToFindImporter = 1L << 0,
+ kQTDontLookForMovieImporterIfGraphicsImporterFound = 1L << 1,
+ kQTAllowOpeningStillImagesAsMovies = 1L << 2,
+ kQTAllowImportersThatWouldCreateNewFile = 1L << 3,
+ kQTAllowAggressiveImporters = 1L << 4 /* eg, TEXT and PICT movie importers*/
+};
+
+/* Determines whether the file could be opened using a graphics importer or opened in place as a movie. */
+EXTERN_API( OSErr )
+CanQuickTimeOpenFile (FSSpecPtr fileSpec,
+ OSType fileType,
+ OSType fileNameExtension,
+ Boolean * outCanOpenWithGraphicsImporter,
+ Boolean * outCanOpenAsMovie,
+ Boolean * outPreferGraphicsImporter,
+ UInt32 inFlags) THREEWORDINLINE(0x303C, 0x033E, 0xAAAA);
+
+/* Determines whether the file could be opened using a graphics importer or opened in place as a movie. */
+EXTERN_API( OSErr )
+CanQuickTimeOpenDataRef (Handle dataRef,
+ OSType dataRefType,
+ Boolean * outCanOpenWithGraphicsImporter,
+ Boolean * outCanOpenAsMovie,
+ Boolean * outPreferGraphicsImporter,
+ UInt32 inFlags) THREEWORDINLINE(0x303C, 0x033F, 0xAAAA);
+
+/****
+ Movie Controller support routines
+****/
+EXTERN_API( ComponentInstance )
+NewMovieController (Movie theMovie,
+ const Rect * movieRect,
+ long someFlags) THREEWORDINLINE(0x303C, 0x018A, 0xAAAA);
+
+EXTERN_API( void )
+DisposeMovieController (ComponentInstance mc) THREEWORDINLINE(0x303C, 0x018B, 0xAAAA);
+
+EXTERN_API( void )
+ShowMovieInformation (Movie theMovie,
+ ModalFilterUPP filterProc,
+ long refCon) THREEWORDINLINE(0x303C, 0x0209, 0xAAAA);
+
+
+/*****
+ Scrap routines
+*****/
+EXTERN_API( OSErr )
+PutMovieOnScrap (Movie theMovie,
+ long movieScrapFlags) THREEWORDINLINE(0x303C, 0x018C, 0xAAAA);
+
+EXTERN_API( Movie )
+NewMovieFromScrap (long newMovieFlags) THREEWORDINLINE(0x303C, 0x018D, 0xAAAA);
+
+
+/*****
+ DataRef routines
+*****/
+
+EXTERN_API( OSErr )
+GetMediaDataRef (Media theMedia,
+ short index,
+ Handle * dataRef,
+ OSType * dataRefType,
+ long * dataRefAttributes) THREEWORDINLINE(0x303C, 0x0197, 0xAAAA);
+
+EXTERN_API( OSErr )
+SetMediaDataRef (Media theMedia,
+ short index,
+ Handle dataRef,
+ OSType dataRefType) THREEWORDINLINE(0x303C, 0x01C9, 0xAAAA);
+
+EXTERN_API( OSErr )
+SetMediaDataRefAttributes (Media theMedia,
+ short index,
+ long dataRefAttributes) THREEWORDINLINE(0x303C, 0x01CA, 0xAAAA);
+
+EXTERN_API( OSErr )
+AddMediaDataRef (Media theMedia,
+ short * index,
+ Handle dataRef,
+ OSType dataRefType) THREEWORDINLINE(0x303C, 0x0198, 0xAAAA);
+
+EXTERN_API( OSErr )
+GetMediaDataRefCount (Media theMedia,
+ short * count) THREEWORDINLINE(0x303C, 0x0199, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTNewAlias (const FSSpec * fss,
+ AliasHandle * alias,
+ Boolean minimal) THREEWORDINLINE(0x303C, 0x0201, 0xAAAA);
+
+/*****
+ Playback hint routines
+*****/
+EXTERN_API( void )
+SetMoviePlayHints (Movie theMovie,
+ long flags,
+ long flagsMask) THREEWORDINLINE(0x303C, 0x01A1, 0xAAAA);
+
+EXTERN_API( void )
+SetMediaPlayHints (Media theMedia,
+ long flags,
+ long flagsMask) THREEWORDINLINE(0x303C, 0x01A2, 0xAAAA);
+
+EXTERN_API( void )
+GetMediaPlayHints (Media theMedia,
+ long * flags) THREEWORDINLINE(0x303C, 0x02CE, 0xAAAA);
+
+/*****
+ Load time track hints
+*****/
+enum {
+ preloadAlways = 1L << 0,
+ preloadOnlyIfEnabled = 1L << 1
+};
+
+EXTERN_API( void )
+SetTrackLoadSettings (Track theTrack,
+ TimeValue preloadTime,
+ TimeValue preloadDuration,
+ long preloadFlags,
+ long defaultHints) THREEWORDINLINE(0x303C, 0x01E3, 0xAAAA);
+
+EXTERN_API( void )
+GetTrackLoadSettings (Track theTrack,
+ TimeValue * preloadTime,
+ TimeValue * preloadDuration,
+ long * preloadFlags,
+ long * defaultHints) THREEWORDINLINE(0x303C, 0x01E4, 0xAAAA);
+
+/*****
+ Big screen TV
+*****/
+enum {
+ fullScreenHideCursor = 1L << 0,
+ fullScreenAllowEvents = 1L << 1,
+ fullScreenDontChangeMenuBar = 1L << 2,
+ fullScreenPreflightSize = 1L << 3
+};
+
+EXTERN_API( OSErr )
+BeginFullScreen (Ptr * restoreState,
+ GDHandle whichGD,
+ short * desiredWidth,
+ short * desiredHeight,
+ WindowRef * newWindow,
+ RGBColor * eraseColor,
+ long flags) THREEWORDINLINE(0x303C, 0x0233, 0xAAAA);
+
+EXTERN_API( OSErr )
+EndFullScreen (Ptr fullState,
+ long flags) THREEWORDINLINE(0x303C, 0x0234, 0xAAAA);
+
+/*****
+ Wired Actions
+*****/
+/* flags for MovieExecuteWiredActions*/
+enum {
+ movieExecuteWiredActionDontExecute = 1L << 0
+};
+
+EXTERN_API( OSErr )
+AddMovieExecuteWiredActionsProc (Movie theMovie,
+ MovieExecuteWiredActionsUPP proc,
+ void * refCon) THREEWORDINLINE(0x303C, 0x0302, 0xAAAA);
+
+EXTERN_API( OSErr )
+RemoveMovieExecuteWiredActionsProc (Movie theMovie,
+ MovieExecuteWiredActionsUPP proc,
+ void * refCon) THREEWORDINLINE(0x303C, 0x0303, 0xAAAA);
+
+EXTERN_API( OSErr )
+MovieExecuteWiredActions (Movie theMovie,
+ long flags,
+ QTAtomContainer actions) THREEWORDINLINE(0x303C, 0x0304, 0xAAAA);
+
+
+
+/*****
+ Keyboard Navigation/Editable Text Field Support
+*****/
+/*
+ Navigation Direction Constants
+ for MediaNavigateTargetRefCon
+*/
+enum {
+ kRefConNavigationNext = 0,
+ kRefConNavigationPrevious = 1
+};
+
+/*
+ Refcon Properties
+ for MediaRefConGetProerty/MediaRefConSetProperty
+*/
+enum {
+ kRefConPropertyCanHaveFocus = 1, /* Boolean */
+ kRefConPropertyHasFocus = 2 /* Boolean */
+};
+
+/* media properties*/
+enum {
+ kTrackFocusCanEditFlag = FOUR_CHAR_CODE('kedt'),
+ kTrackDefaultFocusFlags = FOUR_CHAR_CODE('kfoc'),
+ kTrackFocusDefaultRefcon = FOUR_CHAR_CODE('kref')
+};
+
+/* focus flags*/
+enum {
+ kTrackFocusOn = 1,
+ kTrackHandlesTabs = 2 /* this is reserved for a future release*/
+};
+
+
+
+/*****
+ Flash track properties
+*****/
+enum {
+ kFlashTrackPropertyAcceptAllClicks = FOUR_CHAR_CODE('clik') /* type of media property atom; data is a Boolean */
+};
+
+/*****
+ Sprite Toolbox
+*****/
+enum {
+ kBackgroundSpriteLayerNum = 32767
+};
+
+
+/* Sprite Properties*/
+enum {
+ kSpritePropertyMatrix = 1,
+ kSpritePropertyImageDescription = 2,
+ kSpritePropertyImageDataPtr = 3,
+ kSpritePropertyVisible = 4,
+ kSpritePropertyLayer = 5,
+ kSpritePropertyGraphicsMode = 6,
+ kSpritePropertyImageDataSize = 7,
+ kSpritePropertyActionHandlingSpriteID = 8,
+ kSpritePropertyCanBeHitTested = 9,
+ kSpritePropertyImageIndex = 100,
+ kSpriteTrackPropertyBackgroundColor = 101,
+ kSpriteTrackPropertyOffscreenBitDepth = 102,
+ kSpriteTrackPropertySampleFormat = 103,
+ kSpriteTrackPropertyScaleSpritesToScaleWorld = 104,
+ kSpriteTrackPropertyHasActions = 105,
+ kSpriteTrackPropertyVisible = 106,
+ kSpriteTrackPropertyQTIdleEventsFrequency = 107,
+ kSpriteTrackPropertyAllSpritesHitTestingMode = 108,
+ kSpriteTrackPropertyPreferredDepthInterpretationMode = 109,
+ kSpriteImagePropertyRegistrationPoint = 1000,
+ kSpriteImagePropertyGroupID = 1001
+};
+
+/* values for kSpriteTrackPropertyPreferredDepthInterpretationMode*/
+enum {
+ kSpriteTrackPreferredDepthCompatibilityMode = 0,
+ kSpriteTrackPreferredDepthModernMode = 1
+};
+
+/* values for kSpriteTrackPropertyAllSpritesHitTestingMode*/
+enum {
+ kSpriteHitTestUseSpritesOwnPropertiesMode = 0,
+ kSpriteHitTestTreatAllSpritesAsHitTestableMode = 1,
+ kSpriteHitTestTreatAllSpritesAsNotHitTestableMode = 2
+};
+
+/* special value for kSpriteTrackPropertyQTIdleEventsFrequency (the default)*/
+enum {
+ kNoQTIdleEvents = -1
+};
+
+/* GetSpriteProperties for accessing invalid SpriteWorldRegion*/
+enum {
+ kGetSpriteWorldInvalidRegionAndLeaveIntact = -1L,
+ kGetSpriteWorldInvalidRegionAndThenSetEmpty = -2L
+};
+
+/* flagsIn for SpriteWorldIdle*/
+enum {
+ kOnlyDrawToSpriteWorld = 1L << 0,
+ kSpriteWorldPreflight = 1L << 1
+};
+
+/* flagsOut for SpriteWorldIdle*/
+enum {
+ kSpriteWorldDidDraw = 1L << 0,
+ kSpriteWorldNeedsToDraw = 1L << 1
+};
+
+/* flags for sprite track sample format*/
+enum {
+ kKeyFrameAndSingleOverride = 1L << 1,
+ kKeyFrameAndAllOverrides = 1L << 2
+};
+
+/* sprite world flags*/
+enum {
+ kScaleSpritesToScaleWorld = 1L << 1,
+ kSpriteWorldHighQuality = 1L << 2,
+ kSpriteWorldDontAutoInvalidate = 1L << 3,
+ kSpriteWorldInvisible = 1L << 4,
+ kSpriteWorldDirtyInsteadOfFlush = 1L << 5
+};
+
+EXTERN_API( OSErr )
+NewSpriteWorld (SpriteWorld * newSpriteWorld,
+ GWorldPtr destination,
+ GWorldPtr spriteLayer,
+ RGBColor * backgroundColor,
+ GWorldPtr background) THREEWORDINLINE(0x303C, 0x0239, 0xAAAA);
+
+EXTERN_API( void )
+DisposeSpriteWorld (SpriteWorld theSpriteWorld) THREEWORDINLINE(0x303C, 0x023A, 0xAAAA);
+
+EXTERN_API( OSErr )
+SetSpriteWorldClip (SpriteWorld theSpriteWorld,
+ RgnHandle clipRgn) THREEWORDINLINE(0x303C, 0x023B, 0xAAAA);
+
+EXTERN_API( OSErr )
+SetSpriteWorldMatrix (SpriteWorld theSpriteWorld,
+ const MatrixRecord * matrix) THREEWORDINLINE(0x303C, 0x023C, 0xAAAA);
+
+EXTERN_API( OSErr )
+SetSpriteWorldGraphicsMode (SpriteWorld theSpriteWorld,
+ long mode,
+ const RGBColor * opColor) THREEWORDINLINE(0x303C, 0x02D9, 0xAAAA);
+
+EXTERN_API( OSErr )
+SpriteWorldIdle (SpriteWorld theSpriteWorld,
+ long flagsIn,
+ long * flagsOut) THREEWORDINLINE(0x303C, 0x023D, 0xAAAA);
+
+EXTERN_API( OSErr )
+InvalidateSpriteWorld (SpriteWorld theSpriteWorld,
+ Rect * invalidArea) THREEWORDINLINE(0x303C, 0x023E, 0xAAAA);
+
+EXTERN_API( OSErr )
+SpriteWorldHitTest (SpriteWorld theSpriteWorld,
+ long flags,
+ Point loc,
+ Sprite * spriteHit) THREEWORDINLINE(0x303C, 0x0246, 0xAAAA);
+
+EXTERN_API( OSErr )
+SpriteHitTest (Sprite theSprite,
+ long flags,
+ Point loc,
+ Boolean * wasHit) THREEWORDINLINE(0x303C, 0x0247, 0xAAAA);
+
+EXTERN_API( void )
+DisposeAllSprites (SpriteWorld theSpriteWorld) THREEWORDINLINE(0x303C, 0x023F, 0xAAAA);
+
+EXTERN_API( OSErr )
+SetSpriteWorldFlags (SpriteWorld spriteWorld,
+ long flags,
+ long flagsMask) THREEWORDINLINE(0x303C, 0x02C2, 0xAAAA);
+
+EXTERN_API( OSErr )
+NewSprite (Sprite * newSprite,
+ SpriteWorld itsSpriteWorld,
+ ImageDescriptionHandle idh,
+ Ptr imageDataPtr,
+ MatrixRecord * matrix,
+ Boolean visible,
+ short layer) THREEWORDINLINE(0x303C, 0x0240, 0xAAAA);
+
+EXTERN_API( void )
+DisposeSprite (Sprite theSprite) THREEWORDINLINE(0x303C, 0x0241, 0xAAAA);
+
+EXTERN_API( void )
+InvalidateSprite (Sprite theSprite) THREEWORDINLINE(0x303C, 0x0242, 0xAAAA);
+
+EXTERN_API( OSErr )
+SetSpriteProperty (Sprite theSprite,
+ long propertyType,
+ void * propertyValue) THREEWORDINLINE(0x303C, 0x0243, 0xAAAA);
+
+EXTERN_API( OSErr )
+GetSpriteProperty (Sprite theSprite,
+ long propertyType,
+ void * propertyValue) THREEWORDINLINE(0x303C, 0x0244, 0xAAAA);
+
+/*****
+ QT Atom Data Support
+*****/
+enum {
+ kParentAtomIsContainer = 0
+};
+
+/* create and dispose QTAtomContainer objects*/
+
+EXTERN_API( OSErr )
+QTNewAtomContainer (QTAtomContainer * atomData) THREEWORDINLINE(0x303C, 0x020C, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTDisposeAtomContainer (QTAtomContainer atomData) THREEWORDINLINE(0x303C, 0x020D, 0xAAAA);
+
+/* locating nested atoms within QTAtomContainer container*/
+
+EXTERN_API( QTAtomType )
+QTGetNextChildType (QTAtomContainer container,
+ QTAtom parentAtom,
+ QTAtomType currentChildType) THREEWORDINLINE(0x303C, 0x020E, 0xAAAA);
+
+EXTERN_API( short )
+QTCountChildrenOfType (QTAtomContainer container,
+ QTAtom parentAtom,
+ QTAtomType childType) THREEWORDINLINE(0x303C, 0x020F, 0xAAAA);
+
+EXTERN_API( QTAtom )
+QTFindChildByIndex (QTAtomContainer container,
+ QTAtom parentAtom,
+ QTAtomType atomType,
+ short index,
+ QTAtomID * id) THREEWORDINLINE(0x303C, 0x0210, 0xAAAA);
+
+EXTERN_API( QTAtom )
+QTFindChildByID (QTAtomContainer container,
+ QTAtom parentAtom,
+ QTAtomType atomType,
+ QTAtomID id,
+ short * index) THREEWORDINLINE(0x303C, 0x021D, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTNextChildAnyType (QTAtomContainer container,
+ QTAtom parentAtom,
+ QTAtom currentChild,
+ QTAtom * nextChild) THREEWORDINLINE(0x303C, 0x0200, 0xAAAA);
+
+/* set a leaf atom's data*/
+EXTERN_API( OSErr )
+QTSetAtomData (QTAtomContainer container,
+ QTAtom atom,
+ long dataSize,
+ void * atomData) THREEWORDINLINE(0x303C, 0x0211, 0xAAAA);
+
+/* extracting data*/
+EXTERN_API( OSErr )
+QTCopyAtomDataToHandle (QTAtomContainer container,
+ QTAtom atom,
+ Handle targetHandle) THREEWORDINLINE(0x303C, 0x0212, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTCopyAtomDataToPtr (QTAtomContainer container,
+ QTAtom atom,
+ Boolean sizeOrLessOK,
+ long size,
+ void * targetPtr,
+ long * actualSize) THREEWORDINLINE(0x303C, 0x0213, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTGetAtomTypeAndID (QTAtomContainer container,
+ QTAtom atom,
+ QTAtomType * atomType,
+ QTAtomID * id) THREEWORDINLINE(0x303C, 0x0232, 0xAAAA);
+
+/* extract a copy of an atom and all of it's children, caller disposes*/
+EXTERN_API( OSErr )
+QTCopyAtom (QTAtomContainer container,
+ QTAtom atom,
+ QTAtomContainer * targetContainer) THREEWORDINLINE(0x303C, 0x0214, 0xAAAA);
+
+/* obtaining direct reference to atom data*/
+EXTERN_API( OSErr )
+QTLockContainer (QTAtomContainer container) THREEWORDINLINE(0x303C, 0x0215, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTGetAtomDataPtr (QTAtomContainer container,
+ QTAtom atom,
+ long * dataSize,
+ Ptr * atomData) THREEWORDINLINE(0x303C, 0x0216, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTUnlockContainer (QTAtomContainer container) THREEWORDINLINE(0x303C, 0x0217, 0xAAAA);
+
+/*
+ building QTAtomContainer trees
+ creates and inserts new atom at specified index, existing atoms at or after index are moved toward end of list
+ used for Top-Down tree creation
+*/
+EXTERN_API( OSErr )
+QTInsertChild (QTAtomContainer container,
+ QTAtom parentAtom,
+ QTAtomType atomType,
+ QTAtomID id,
+ short index,
+ long dataSize,
+ void * data,
+ QTAtom * newAtom) THREEWORDINLINE(0x303C, 0x0218, 0xAAAA);
+
+/* inserts children from childrenContainer as children of parentAtom*/
+EXTERN_API( OSErr )
+QTInsertChildren (QTAtomContainer container,
+ QTAtom parentAtom,
+ QTAtomContainer childrenContainer) THREEWORDINLINE(0x303C, 0x0219, 0xAAAA);
+
+/* destruction*/
+EXTERN_API( OSErr )
+QTRemoveAtom (QTAtomContainer container,
+ QTAtom atom) THREEWORDINLINE(0x303C, 0x021A, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTRemoveChildren (QTAtomContainer container,
+ QTAtom atom) THREEWORDINLINE(0x303C, 0x021B, 0xAAAA);
+
+/* replacement must be same type as target*/
+EXTERN_API( OSErr )
+QTReplaceAtom (QTAtomContainer targetContainer,
+ QTAtom targetAtom,
+ QTAtomContainer replacementContainer,
+ QTAtom replacementAtom) THREEWORDINLINE(0x303C, 0x021C, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTSwapAtoms (QTAtomContainer container,
+ QTAtom atom1,
+ QTAtom atom2) THREEWORDINLINE(0x303C, 0x01FF, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTSetAtomID (QTAtomContainer container,
+ QTAtom atom,
+ QTAtomID newID) THREEWORDINLINE(0x303C, 0x0231, 0xAAAA);
+
+EXTERN_API( QTAtom )
+QTGetAtomParent (QTAtomContainer container,
+ QTAtom childAtom) THREEWORDINLINE(0x303C, 0x02EF, 0xAAAA);
+
+EXTERN_API( OSErr )
+SetMediaPropertyAtom (Media theMedia,
+ QTAtomContainer propertyAtom) THREEWORDINLINE(0x303C, 0x022E, 0xAAAA);
+
+EXTERN_API( OSErr )
+GetMediaPropertyAtom (Media theMedia,
+ QTAtomContainer * propertyAtom) THREEWORDINLINE(0x303C, 0x022F, 0xAAAA);
+
+
+/*****
+ Tween Support
+*****/
+typedef struct TweenRecord TweenRecord;
+typedef CALLBACK_API( ComponentResult , TweenerDataProcPtr )(TweenRecord *tr, void *tweenData, long tweenDataSize, long dataDescriptionSeed, Handle dataDescription, ICMCompletionProcRecordPtr asyncCompletionProc, UniversalProcPtr transferProc, void *refCon);
+typedef STACK_UPP_TYPE(TweenerDataProcPtr) TweenerDataUPP;
+
+struct TweenRecord {
+ long version;
+
+ QTAtomContainer container;
+ QTAtom tweenAtom;
+ QTAtom dataAtom;
+ Fixed percent;
+
+ TweenerDataUPP dataProc;
+
+ void * private1;
+ void * private2;
+};
+
+
+struct TweenV1Record {
+ long version;
+
+ QTAtomContainer container;
+ QTAtom tweenAtom;
+ QTAtom dataAtom;
+ Fixed percent;
+
+ TweenerDataUPP dataProc;
+
+ void * private1;
+ void * private2;
+
+ Fract fractPercent;
+};
+typedef struct TweenV1Record TweenV1Record;
+enum {
+ kTweenRecordNoFlags = 0,
+ kTweenRecordIsAtInterruptTime = 0x00000001
+};
+
+
+struct TweenV2Record {
+ long version;
+
+ QTAtomContainer container;
+ QTAtom tweenAtom;
+ QTAtom dataAtom;
+ Fixed percent;
+
+ TweenerDataUPP dataProc;
+
+ void * private1;
+ void * private2;
+
+ Fract fractPercent;
+
+ long flags;
+};
+typedef struct TweenV2Record TweenV2Record;
+EXTERN_API( OSErr )
+QTNewTween (QTTweener * tween,
+ QTAtomContainer container,
+ QTAtom tweenAtom,
+ TimeValue maxTime) THREEWORDINLINE(0x303C, 0x029D, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTDisposeTween (QTTweener tween) THREEWORDINLINE(0x303C, 0x029F, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTDoTween (QTTweener tween,
+ TimeValue atTime,
+ Handle result,
+ long * resultSize,
+ TweenerDataUPP tweenDataProc,
+ void * tweenDataRefCon) THREEWORDINLINE(0x303C, 0x029E, 0xAAAA);
+
+/*
+ QTDoTweenPtr is an interrupt-safe version of QTDoTween. It has the following limitations:
+ - not all tween types support this call (those which must allocated memory), in which case they return codecUnimpErr.
+ - the QTAtomContainer used for the tween must be locked
+ - the dataSize must be large enough to contain the result
+ - this call is not supported for sequence tweens, use interpolation tweens instead
+*/
+EXTERN_API( OSErr )
+QTDoTweenPtr (QTTweener tween,
+ TimeValue atTime,
+ Ptr result,
+ long resultSize) THREEWORDINLINE(0x303C, 0x036E, 0xAAAA);
+
+/*****
+ Sound Description Manipulations
+*****/
+EXTERN_API( OSErr )
+AddSoundDescriptionExtension (SoundDescriptionHandle desc,
+ Handle extension,
+ OSType idType) THREEWORDINLINE(0x303C, 0x02CF, 0xAAAA);
+
+EXTERN_API( OSErr )
+GetSoundDescriptionExtension (SoundDescriptionHandle desc,
+ Handle * extension,
+ OSType idType) THREEWORDINLINE(0x303C, 0x02D0, 0xAAAA);
+
+EXTERN_API( OSErr )
+RemoveSoundDescriptionExtension (SoundDescriptionHandle desc,
+ OSType idType) THREEWORDINLINE(0x303C, 0x02D1, 0xAAAA);
+
+/*****
+ Preferences
+*****/
+EXTERN_API( OSErr )
+GetQuickTimePreference (OSType preferenceType,
+ QTAtomContainer * preferenceAtom) THREEWORDINLINE(0x303C, 0x02D4, 0xAAAA);
+
+EXTERN_API( OSErr )
+SetQuickTimePreference (OSType preferenceType,
+ QTAtomContainer preferenceAtom) THREEWORDINLINE(0x303C, 0x02D5, 0xAAAA);
+
+/*****
+ Effects and dialog Support
+*****/
+/* atom types for entries in the effects list*/
+enum {
+ kEffectNameAtom = FOUR_CHAR_CODE('name'), /* name of effect */
+ kEffectTypeAtom = FOUR_CHAR_CODE('type'), /* codec sub-type for effect */
+ kEffectManufacturerAtom = FOUR_CHAR_CODE('manu') /* codec manufacturer for effect */
+};
+
+
+struct QTParamPreviewRecord {
+ long sourceID; /* 1 based source identifier*/
+ PicHandle sourcePicture; /* picture for preview, must not dispose until dialog is disposed*/
+};
+typedef struct QTParamPreviewRecord QTParamPreviewRecord;
+
+typedef QTParamPreviewRecord * QTParamPreviewPtr;
+
+struct QTParamDialogEventRecord {
+ EventRecord * theEvent; /* Event received by the dialog */
+ DialogRef whichDialog; /* dialog that event was directed towards */
+ short itemHit; /* dialog item which was hit */
+};
+typedef struct QTParamDialogEventRecord QTParamDialogEventRecord;
+
+typedef QTParamDialogEventRecord * QTParamDialogEventPtr;
+
+struct QTParamFetchPreviewRecord {
+ GWorldPtr theWorld; /* the world into which to draw the preview */
+ Fixed percentage; /* frame percentage (from 0.0 - 1.0) to be drawn */
+};
+typedef struct QTParamFetchPreviewRecord QTParamFetchPreviewRecord;
+
+typedef QTParamFetchPreviewRecord * QTParamFetchPreviewPtr;
+enum {
+ pdActionConfirmDialog = 1, /* no param*/
+ pdActionSetAppleMenu = 2, /* param is MenuRef*/
+ pdActionSetEditMenu = 3, /* param is MenuRef*/
+ pdActionGetDialogValues = 4, /* param is QTAtomContainer*/
+ pdActionSetPreviewUserItem = 5, /* param is long*/
+ pdActionSetPreviewPicture = 6, /* param is QTParamPreviewPtr;*/
+ pdActionSetColorPickerEventProc = 7, /* param is UserEventUPP*/
+ pdActionSetDialogTitle = 8, /* param is StringPtr */
+ pdActionGetSubPanelMenu = 9, /* param is MenuRef* */
+ pdActionActivateSubPanel = 10, /* param is long */
+ pdActionConductStopAlert = 11, /* param is StringPtr */
+ pdActionModelessCallback = 12, /* param is QTParamDialogEventPtr */
+ pdActionFetchPreview = 13, /* param is QTParamFetchPreviewPtr */
+ pdActionSetDialogSettings = 14, /* param is QTAtomContainer */
+ pdActionGetDialogSettings = 15, /* param is QTAtomContainer */
+ pdActionGetNextSample = 16, /* param is QTAtomContainer with effect sample to change - createdDialog may be NIL */
+ pdActionGetPreviousSample = 17, /* param is QTAtomContainer with effect sample to change - createdDialog may be NIL */
+ pdActionCompactSample = 18, /* param is QTAtomContainer with effect sample to compact, - createdDialog may be NIL */
+ pdActionSetEditCallout = 19, /* param is QTParamPreviewCalloutPtr, can be NIL */
+ pdActionSetSampleTime = 20, /* param is QTParamSampleTimePtr, can be NIL */
+ pdActionDoEditCommand = 21, /* param is long with menu command (ie, mcMenuCut etc) */
+ pdActionGetSubPanelMenuValue = 22, /* param is long and returns current sub-panel value selected by the effect */
+ /* Action codes and typedefs used for custom controls within effects */
+ pdActionCustomNewControl = 23, /* param is QTCustomControlNewPtr */
+ pdActionCustomDisposeControl = 24, /* param is QTCustomControlNewPtr */
+ pdActionCustomPositionControl = 25, /* param is QTCustomControlPositionControlPtr */
+ pdActionCustomShowHideControl = 26, /* param is QTCustomControlShowHideControlPtr */
+ pdActionCustomHandleEvent = 27, /* param is QTCustomControlHandleEventPtr */
+ pdActionCustomSetFocus = 28, /* param is QTCustomControlSetFocusPtr */
+ pdActionCustomSetEditMenu = 29, /* param is QTCustomControlSetEditMenuPtr */
+ pdActionCustomSetPreviewPicture = 30, /* param is QTCustomControlSetPreviewPicturePtr */
+ pdActionCustomSetEditCallout = 31, /* param is QTCustomControlSetEditCalloutPtr */
+ pdActionCustomGetEnableValue = 32, /* param is QTCustomControlGetEnableValuePtr */
+ pdActionCustomSetSampleTime = 33, /* param is QTCustomControlSetSampleTimePtr */
+ pdActionCustomGetValue = 34, /* param is QTCustomControlGetValue */
+ pdActionCustomDoEditCommand = 35 /* param is QTCustomControlDoEditCommand */
+};
+
+/* Sample Time information */
+enum {
+ pdSampleTimeDisplayOptionsNone = 0x00000000
+};
+
+
+struct QTParamSampleTimeRecord {
+ long displayOptions;
+ TimeRecord sampleStartTime;
+ TimeValue sampleDuration;
+ long framesPerSecond; /* if 0, will cause revert to seconds display*/
+};
+typedef struct QTParamSampleTimeRecord QTParamSampleTimeRecord;
+
+typedef QTParamSampleTimeRecord * QTParamSampleTimePtr;
+/* Preview change callout information */
+
+struct QTParamPreviewCalloutRecord {
+ MoviePreviewCallOutUPP calloutProc; /* called when user makes editing changes to dialog. May be NIL. You should return true from your function. */
+ long refCon; /* passed to the callout procedure */
+};
+typedef struct QTParamPreviewCalloutRecord QTParamPreviewCalloutRecord;
+
+typedef QTParamPreviewCalloutRecord * QTParamPreviewCalloutPtr;
+typedef long QTParameterDialogOptions;
+/* ------- CUSTOM EFFECT CONTROLS*/
+/*
+ Effects may choose to implement custom controls to allow the user to more easily edit complex parameters
+ that are ill-served by simple sliders or type in boxes. Effects may allow a custom control for either
+ a single parameter, or for a group of parameters.
+
+ Parameter(s) for a custom control must still be data types defined by the standard set, or for
+ complex records of data, must be defined within a group as individual parameters made up from base
+ data types (for example, a point is a group containing two Fixed point numbers).
+ This is to allow applications that do not wish to use the custom control for the effect to set values themselves.
+
+ Effects should be aware that these custom controls may be deployed by the application in either a dialog or
+ a window, with application defined background colors or patterns, along with application defined font
+ characteristics for the window.
+
+ It is recommended that effects implement custom controls only when needed, and that custom controls be used
+ for specific types of parameters (ie, point, rectangle, polygon, path) rather than the entire user interface
+ for the effect. Effects may choose to implement multiple custom controls which combine with standard controls
+ to present the total user interface. For effects which have very complex user interfaces not well suited for
+ inclusion within a single window, it is recommended to use kParameterImageIsPreset -- which allows the effect to
+ have an external editing application for parameters which may then be set within the standard UI via the open file
+ dialog or drag and drop. The Lens Flare effect's "Flare Type" is an example of such a preset.
+
+ For parameters that use a custom control to control a single parameter value, a new behavior
+ flag has been added (kCustomControl), and the behavior for the parameter should be kParameterItemControl.
+
+ For parameters that are groups, the same flag (kCustomControl) should be used, and the behavior
+ should be kParameterItemGroupDivider. Groups with the kCustomControl bit set will be implemented
+ by calling the custom control for that group -- the parameters within that group will not be processed
+ in the normal manner.
+
+ In both cases, the new customType and customID fields of the behavior must be filled in. These are
+ used in order to allow your custom control to determine which parameter is being edited in the case
+ where the custom control is used for the editing of multiple parameters. These values are passed into
+ the pdActionCustomNewControl call. Since the custom control mechanism is also used by QuickTime's
+ default effect dialogs, you should be prepared to pass onto the base effect any pdActionCustomNewControl
+ calls for type/id pairs that you do not handle yourself. When pdActionCustomNewControl is called
+ for controls of types handled by QuickTime, customType is kParameterAtomTypeAndID and customID is
+ the ID of the parameter atom.
+*/
+
+
+/*
+ pdActionCustomNewControlControl is called by application to create a new custom control or set of controls
+ for an effect parameter. When pdActionCustomNewControl is called, the effect should perform any
+ basic allocation it needs for storage and return the result in storage. The options parameter tells
+ the control if the application wishes to support interpolated, optionally interpolated, or a single
+ value parameter.
+
+ Since pdActionCustomNewControlControl may be called upon your effect for other items within the
+ dialog, it is recommended that your effect have an easy way to determine which controls it implements:
+ a) by having storage be a pointer with an OSType at the begining to mark controls
+ implemented by your code.
+ - or -
+ b) keeping track in your component globals those custom controls which you have created.
+
+ When pdActionCustomDisposeControl is called any allocation done by the control should be disposed. In addition,
+ pdActionCustomDisposeControl is the last chance the control has to commit any user changes into the sample.
+ Controls which implement type in fields typically need to commit any final user edits at this time.
+*/
+
+struct QTCustomControlNewRecord {
+ void * storage; /* storage allocated/disposed by the control*/
+ QTParameterDialogOptions options; /* options used to control interpolation/not*/
+ QTAtomContainer sample; /* sample that holds the data to be edited*/
+ long customType; /* custom type and ID specified by effect for creation of this control*/
+ long customID;
+};
+typedef struct QTCustomControlNewRecord QTCustomControlNewRecord;
+
+typedef QTCustomControlNewRecord * QTCustomControlNewPtr;
+/*
+ pdActionCustomPositionControl is called by the application to position the control within a window or dialog.
+
+ The control should determine if it will fit in the alloted area and position itself there. It should also
+ return the space taken up by the control. Note you are free to implement controls which are variable in size depending upon
+ which parameter you are editing. You need not scale your control to the requested size. If the area presented to your
+ control is too small, set didFit to false. You should still return in used the size you would have liked to use for
+ the control. The application will then try again with a new size. Note that all
+ controls must be able to fit within a minimum of 300 by 250 pixels.
+
+ Custom controls that draw text should make note of the text font, size, and style at this time in order
+ to properly display within application windows.
+
+ Note that the default state for the control is hidden. You will receive a pdActionCustomShowHideControl
+ in order to enable your control. You should not draw your control in response to pdActionCustomPositionControl.
+*/
+
+struct QTCustomControlPositionControlRecord {
+ void * storage; /* storage for the control*/
+ WindowPtr window; /* window to be used by the control*/
+ Rect location; /* location within the window the control may use*/
+ Rect used; /* returned by the control to indicate size it actually used*/
+ Boolean didFit; /* did the control fit in the specified area?*/
+ Boolean pad[3];
+};
+typedef struct QTCustomControlPositionControlRecord QTCustomControlPositionControlRecord;
+
+typedef QTCustomControlPositionControlRecord * QTCustomControlPositionControlPtr;
+/*
+ pdActionCustomShowHideControl is called when the application wishes to enable/disable your control, or
+ completely disable drawing of the control
+
+ Your control should make note of the new state (if different from the last) and perform an InvalRect()
+ on your drawing area, or you may draw your control's initial state in the case of show. You should not
+ attempt to erase your control as the result of a hide -- instead call InvalRect() and allow the application
+ to process the resulting event as appropriate.
+*/
+
+struct QTCustomControlShowHideControlRecord {
+ void * storage; /* storage for the control*/
+ Boolean show; /* display the control?*/
+ Boolean enable; /* enable the control (ie, black vs gray display)*/
+ Boolean pad[2];
+};
+typedef struct QTCustomControlShowHideControlRecord QTCustomControlShowHideControlRecord;
+
+typedef QTCustomControlShowHideControlRecord * QTCustomControlShowHideControlPtr;
+/*
+ pdActionCustomHandleEvent is called to allow your custom control to process events.
+
+ Typical controls handle the following events:
+ - activate - to draw your control in normal/gray mode
+ - update - to draw your control
+ - mouseDown - to handle clicks
+ - keyDown - to handle typing when you have focus
+ - idle - to perform idle drawing (if applicable)
+ If your control handles the entire event, set didProcess to true. If
+ you handled the event, but other controls still need the event, set didProcess to false.
+
+ If your control supports the concept of focus for the purposes of typing (such as by having
+ a type-in box for the parameter) then you set the tookFocus Boolean as part of your processing
+ of the event. It is assumed that your control will draw the appropriate focus UI as a result, and
+ the calling application will disable any focus drawing within the remainder of the UI.
+
+ By default, custom controls are not given idle time. If you need idle time, set needIdle to true
+ in response to the even that causes you to need idle (typically the taking of focus, or the first draw).
+ Your control will continue to be given idle events until you set needIdle to false in response to
+ a nullEvent.
+*/
+
+struct QTCustomControlHandleEventRecord {
+ void * storage; /* storage for the control*/
+ EventRecord * pEvent; /* event to process*/
+ Boolean didProcess; /* did we process entire event?*/
+ Boolean tookFocus; /* did we take focus as a result of this event (typically mouseDowns)*/
+ Boolean needIdle; /* does this control need idle events?*/
+ Boolean didEdit; /* did we edit the samples?*/
+};
+typedef struct QTCustomControlHandleEventRecord QTCustomControlHandleEventRecord;
+
+typedef QTCustomControlHandleEventRecord * QTCustomControlHandleEventPtr;
+/*
+ pdActionCustomSetFocus is called in order to set or advance the current focus of the user interface, typically
+ because the user has pressed the tab or shift-tab keys, or because the user clicked within the area defined by
+ your control.
+
+ Your control will be called with pdActionFocusFirst, pdActionFocusLast, or pdActionFocusOff to set or clear focus on your
+ control. Your control will be called with pdActionFocusForward or pdActionFocusBackward to cycle
+ focus within your control (if your control has multiple focus). If your control does not support focus,
+ or the focus request results in focus moving beyond your supported range, return pdActionFocusOff in
+ the focus parameter. Otherwise, return the focus that you set.
+
+ Controls which have no focus would always set focus to be pdActionFocusOff.
+
+ Controls with a single focus would set pdActionFocusFirst when requsted to set either
+ pdActionFocusFirst or pdActionFocusLast, and would set pdActionFocusOff for either
+ pdActionFocusForward or pdActionFocusBackward.
+*/
+enum {
+ pdActionFocusOff = 0, /* no focus */
+ pdActionFocusFirst = 1, /* focus on first element */
+ pdActionFocusLast = 2, /* focus on last element */
+ pdActionFocusForward = 3, /* focus on next element */
+ pdActionFocusBackward = 4 /* focus on previous element */
+};
+
+
+struct QTCustomControlSetFocusRecord {
+ void * storage; /* storage for the control*/
+ long focus; /* focus to set, return resulting focus*/
+};
+typedef struct QTCustomControlSetFocusRecord QTCustomControlSetFocusRecord;
+
+typedef QTCustomControlSetFocusRecord * QTCustomControlSetFocusPtr;
+/*
+ pdActionCustomSetEditMenu will be called to inform your custom control of the location of the edit menu.
+
+ If your control has editing boxes, this is useful in order to allow the user to perform cut/copy/paste operations
+ when focus is on one of these boxes.
+*/
+
+struct QTCustomControlSetEditMenuRecord {
+ void * storage; /* storage for the control*/
+ MenuHandle editMenu; /* edit menu, or NIL*/
+};
+typedef struct QTCustomControlSetEditMenuRecord QTCustomControlSetEditMenuRecord;
+
+typedef QTCustomControlSetEditMenuRecord * QTCustomControlSetEditMenuPtr;
+/*
+ pdActionCustomSetPreviewPicture will be called to inform your custom control of preview information that you
+ may wish to use in the drawing of your user interface.
+*/
+
+struct QTCustomControlSetPreviewPictureRecord {
+ void * storage; /* storage for the control*/
+ QTParamPreviewPtr preview; /* preview to set*/
+};
+typedef struct QTCustomControlSetPreviewPictureRecord QTCustomControlSetPreviewPictureRecord;
+
+typedef QTCustomControlSetPreviewPictureRecord * QTCustomControlSetPreviewPicturePtr;
+/*
+ pdActionCustomSetEditCallout tells your control of the need by the application to be informed of
+ changes to the parameter values (typically for the purposes of updating previews).
+
+ If a callout is available, your custom control should call it whenever a change has been
+ made to the parameter(s) that your control is editing (as a result of user actions, most typically).
+ If you choose not to implement this, live dragging or updating of values will not work.
+*/
+
+struct QTCustomControlSetEditCalloutRecord {
+ void * storage; /* storage for the control*/
+ QTParamPreviewCalloutPtr callout; /* requested callout, or NIL to disable*/
+};
+typedef struct QTCustomControlSetEditCalloutRecord QTCustomControlSetEditCalloutRecord;
+
+typedef QTCustomControlSetEditCalloutRecord * QTCustomControlSetEditCalloutPtr;
+/*
+ pdActionCustomGetEnableValue allows you to return a value for the purposes of enabling/disabling
+ other controls.
+ Most custom controls do not need to implement this call.
+
+ If your control is able to control the enabling and disabling of other parameter controls (such as is done
+ by standard pop up or enumerated type controls), you need to supply a value that can be use for greater than/less than
+ types of comparisons.
+*/
+
+struct QTCustomControlGetEnableValueRecord {
+ void * storage; /* storage for the control*/
+ long currentValue; /* value to compare against for enable/disable purposes*/
+};
+typedef struct QTCustomControlGetEnableValueRecord QTCustomControlGetEnableValueRecord;
+
+typedef QTCustomControlGetEnableValueRecord * QTCustomControlGetEnableValuePtr;
+/*
+ pdActionCustomSetSampleTime tells your control information from the application about the duration
+ and start time for the sample being edited.
+
+ Most controls do not need this information, but some may choose to use it in the interface
+ they present the user. However, this call need not be made by applications, so the custom
+ control should be prepared to run when the sample time information is not available.
+*/
+
+struct QTCustomControlSetSampleTimeRecord {
+ void * storage; /* storage for the control*/
+ QTParamSampleTimePtr sampleTime; /* sample time information or NIL*/
+};
+typedef struct QTCustomControlSetSampleTimeRecord QTCustomControlSetSampleTimeRecord;
+
+typedef QTCustomControlSetSampleTimeRecord * QTCustomControlSetSampleTimePtr;
+/*
+ pdActionCustomGetValue tells your control to store any value(s) into the specified atom container.
+
+ All custom controls must implement this call
+*/
+
+struct QTCustomControlGetValueRecord {
+ void * storage; /* storage for the control*/
+ QTAtomContainer sample; /* sample to store into*/
+};
+typedef struct QTCustomControlGetValueRecord QTCustomControlGetValueRecord;
+
+typedef QTCustomControlGetValueRecord * QTCustomControlGetValuePtr;
+/*
+ pdActionCustomDoEditCommand tells your control to handle edit commands if it allow focus and type in boxes.
+
+ All custom controls must implement this call if they support edit boxes
+*/
+
+struct QTCustomControlDoEditCommandRecord {
+ void * storage; /* storage for the control*/
+ long command; /* command to execute, return 0 here if processed*/
+};
+typedef struct QTCustomControlDoEditCommandRecord QTCustomControlDoEditCommandRecord;
+
+typedef QTCustomControlDoEditCommandRecord * QTCustomControlDoEditCommandPtr;
+typedef long QTParameterDialog;
+enum {
+ elOptionsIncludeNoneInList = 0x00000001 /* "None" effect is included in list */
+};
+
+typedef long QTEffectListOptions;
+enum {
+ pdOptionsCollectOneValue = 0x00000001, /* should collect a single value only*/
+ pdOptionsAllowOptionalInterpolations = 0x00000002, /* non-novice interpolation options are shown */
+ pdOptionsModalDialogBox = 0x00000004, /* dialog box should be modal */
+ pdOptionsEditCurrentEffectOnly = 0x00000008, /* List of effects will not be shown */
+ pdOptionsHidePreview = 0x00000010 /* Preview item will not be shown */
+};
+
+enum {
+ effectIsRealtime = 0 /* effect can be rendered in real time */
+};
+
+/*
+ QTGetEffectsListExtended is a call that provides for
+ more advanced filtering of effects to be placed into the
+ effect list. Applications can filter on:
+ 1) number of input sources
+ 2) effect major or minor class
+ 3) custom filtering through a callback
+ The callback will be called for each effect which passes
+ the other criteria for inclusion. If the callback
+ returns a true result the effect will be included in the list.
+
+ Note that your filter proc may receive multiple effects from various
+ manufacturers. If you return true for multiple effects of a given type
+ only the one with the higher parameter version number will be included.
+ If you wish other filtering (such as effects from a given manufacturer, you
+ can do this by return false for the other effects and true for those
+ that you prefer.
+*/
+typedef CALLBACK_API( Boolean , QTEffectListFilterProcPtr )(Component effect, long effectMinSource, long effectMaxSource, OSType majorClass, OSType minorClass, void *refcon);
+typedef STACK_UPP_TYPE(QTEffectListFilterProcPtr) QTEffectListFilterUPP;
+EXTERN_API( OSErr )
+QTGetEffectsList (QTAtomContainer * returnedList,
+ long minSources,
+ long maxSources,
+ QTEffectListOptions getOptions) THREEWORDINLINE(0x303C, 0x02C9, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTGetEffectsListExtended (QTAtomContainer * returnedList,
+ long minSources,
+ long maxSources,
+ QTEffectListOptions getOptions,
+ OSType majorClass,
+ OSType minorClass,
+ QTEffectListFilterUPP filterProc,
+ void * filterRefCon) THREEWORDINLINE(0x303C, 0x036D, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTCreateStandardParameterDialog (QTAtomContainer effectList,
+ QTAtomContainer parameters,
+ QTParameterDialogOptions dialogOptions,
+ QTParameterDialog * createdDialog) THREEWORDINLINE(0x303C, 0x02CA, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTIsStandardParameterDialogEvent (EventRecord * pEvent,
+ QTParameterDialog createdDialog) THREEWORDINLINE(0x303C, 0x02CB, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTDismissStandardParameterDialog (QTParameterDialog createdDialog) THREEWORDINLINE(0x303C, 0x02CC, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTStandardParameterDialogDoAction (QTParameterDialog createdDialog,
+ long action,
+ void * params) THREEWORDINLINE(0x303C, 0x02CD, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTGetEffectSpeed (QTAtomContainer parameters,
+ Fixed * pFPS) THREEWORDINLINE(0x303C, 0x02D2, 0xAAAA);
+
+/*****
+ Error reporting
+*****/
+
+struct QTErrorReplacementRecord {
+ long numEntries;
+ StringPtr replacementString[1]; /* array of numEntries StringPtrs (each String is allocated separately).*/
+};
+typedef struct QTErrorReplacementRecord QTErrorReplacementRecord;
+
+typedef QTErrorReplacementRecord * QTErrorReplacementPtr;
+/*
+ QTAddMovieError is used to add orthogonal errors to a list of errors that will
+ later be reported (at the end of an import or playback, for example). Errors are stored
+ in 'qter' resources within the component.
+
+ QTAddMovieError(Movie addTo, // in: movie to add error to
+ Component adder, // in: component which is adding the error
+ long errorCode, // in: error code being added
+ QTErrorReplacementPtr stringReplacements);// in: list of strings to subsitute (in order) for "^1", "^2", etc
+*/
+EXTERN_API( OSErr )
+QTAddMovieError (Movie movieH,
+ Component c,
+ long errorCode,
+ QTErrorReplacementPtr stringReplacements) THREEWORDINLINE(0x303C, 0x037A, 0xAAAA);
+
+
+/*****
+ Access Keys
+*****/
+enum {
+ kAccessKeyAtomType = FOUR_CHAR_CODE('acky')
+};
+
+enum {
+ kAccessKeySystemFlag = 1L << 0
+};
+
+EXTERN_API( OSErr )
+QTGetAccessKeys (Str255 accessKeyType,
+ long flags,
+ QTAtomContainer * keys) THREEWORDINLINE(0x303C, 0x02B3, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTRegisterAccessKey (Str255 accessKeyType,
+ long flags,
+ Handle accessKey) THREEWORDINLINE(0x303C, 0x02B4, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTUnregisterAccessKey (Str255 accessKeyType,
+ long flags,
+ Handle accessKey) THREEWORDINLINE(0x303C, 0x02B5, 0xAAAA);
+
+/*****
+ Content Restrictions
+*****/
+
+EXTERN_API( OSErr )
+QTGetMovieRestrictions (Movie theMovie,
+ QTRestrictionSet * outRestrictionSet,
+ UInt32 * outSeed) THREEWORDINLINE(0x303C, 0x03A5, 0xAAAA);
+
+
+EXTERN_API( OSErr )
+QTRestrictionsGetInfo (QTRestrictionSet inRestrictionSet,
+ long * outRestrictionClassCount,
+ long * outSeed) THREEWORDINLINE(0x303C, 0x03A1, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTRestrictionsGetIndClass (QTRestrictionSet inRestrictionSet,
+ long inIndex,
+ OSType * outClass) THREEWORDINLINE(0x303C, 0x03A2, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTRestrictionsGetItem (QTRestrictionSet inRestrictionSet,
+ OSType inRestrictionClass,
+ UInt32 * outRestrictions) THREEWORDINLINE(0x303C, 0x03A3, 0xAAAA);
+
+
+EXTERN_API( OSErr )
+QTGetSupportedRestrictions (OSType inRestrictionClass,
+ UInt32 * outRestrictionIDs) THREEWORDINLINE(0x303C, 0x03B2, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTCreateUUID (QTUUID * outUUID,
+ long creationFlags) THREEWORDINLINE(0x303C, 0x039B, 0xAAAA);
+
+EXTERN_API( Boolean )
+QTEqualUUIDs (const QTUUID * uuid1,
+ const QTUUID * uuid2) THREEWORDINLINE(0x303C, 0x039C, 0xAAAA);
+
+
+
+/*****
+ Time table
+*****/
+EXTERN_API( OSErr )
+MakeTrackTimeTable (Track trackH,
+ long ** offsets,
+ TimeValue startTime,
+ TimeValue endTime,
+ TimeValue timeIncrement,
+ short firstDataRefIndex,
+ short lastDataRefIndex,
+ long * retdataRefSkew) THREEWORDINLINE(0x303C, 0x02BE, 0xAAAA);
+
+EXTERN_API( OSErr )
+MakeMediaTimeTable (Media theMedia,
+ long ** offsets,
+ TimeValue startTime,
+ TimeValue endTime,
+ TimeValue timeIncrement,
+ short firstDataRefIndex,
+ short lastDataRefIndex,
+ long * retdataRefSkew) THREEWORDINLINE(0x303C, 0x02BF, 0xAAAA);
+
+EXTERN_API( OSErr )
+GetMaxLoadedTimeInMovie (Movie theMovie,
+ TimeValue * time) THREEWORDINLINE(0x303C, 0x02C0, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTMovieNeedsTimeTable (Movie theMovie,
+ Boolean * needsTimeTable) THREEWORDINLINE(0x303C, 0x02C3, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTGetDataRefMaxFileOffset (Movie movieH,
+ OSType dataRefType,
+ Handle dataRef,
+ long * offset) THREEWORDINLINE(0x303C, 0x02C6, 0xAAAA);
+
+
+/*****
+ Bandwidth management support
+*****/
+enum {
+ ConnectionSpeedPrefsType = FOUR_CHAR_CODE('cspd'),
+ BandwidthManagementPrefsType = FOUR_CHAR_CODE('bwmg')
+};
+
+
+
+struct ConnectionSpeedPrefsRecord {
+ long connectionSpeed;
+};
+typedef struct ConnectionSpeedPrefsRecord ConnectionSpeedPrefsRecord;
+
+typedef ConnectionSpeedPrefsRecord * ConnectionSpeedPrefsPtr;
+typedef ConnectionSpeedPrefsPtr * ConnectionSpeedPrefsHandle;
+
+struct BandwidthManagementPrefsRecord {
+ Boolean overrideConnectionSpeedForBandwidth;
+};
+typedef struct BandwidthManagementPrefsRecord BandwidthManagementPrefsRecord;
+
+typedef BandwidthManagementPrefsRecord * BandwidthManagementPrefsPtr;
+typedef BandwidthManagementPrefsPtr * BandwidthManagementPrefsHandle;
+enum {
+ kQTIdlePriority = 10,
+ kQTNonRealTimePriority = 20,
+ kQTRealTimeSharedPriority = 25,
+ kQTRealTimePriority = 30
+};
+
+enum {
+ kQTBandwidthNotifyNeedToStop = 1L << 0,
+ kQTBandwidthNotifyGoodToGo = 1L << 1,
+ kQTBandwidthChangeRequest = 1L << 2,
+ kQTBandwidthQueueRequest = 1L << 3,
+ kQTBandwidthScheduledRequest = 1L << 4,
+ kQTBandwidthVoluntaryRelease = 1L << 5
+};
+
+typedef CALLBACK_API( OSErr , QTBandwidthNotificationProcPtr )(long flags, void *reserved, void *refcon);
+
+struct QTScheduledBandwidthRecord {
+ long recordSize; /* total number of bytes in QTScheduledBandwidthRecord*/
+
+ long priority;
+ long dataRate;
+ CompTimeValue startTime; /* bandwidth usage start time*/
+ CompTimeValue duration; /* duration of bandwidth usage (0 if unknown)*/
+ CompTimeValue prerollDuration; /* time for negotiation before startTime (0 if unknown)*/
+ TimeScale scale; /* timescale of value/duration/prerollDuration fields*/
+ TimeBase base; /* timebase*/
+};
+typedef struct QTScheduledBandwidthRecord QTScheduledBandwidthRecord;
+
+typedef QTScheduledBandwidthRecord * QTScheduledBandwidthPtr;
+typedef QTScheduledBandwidthPtr * QTScheduledBandwidthHandle;
+typedef STACK_UPP_TYPE(QTBandwidthNotificationProcPtr) QTBandwidthNotificationUPP;
+EXTERN_API( OSErr )
+QTBandwidthRequest (long priority,
+ QTBandwidthNotificationUPP callback,
+ const void * refcon,
+ QTBandwidthReference * bwRef,
+ long flags) THREEWORDINLINE(0x303C, 0x02F5, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTBandwidthRequestForTimeBase (TimeBase tb,
+ long priority,
+ QTBandwidthNotificationUPP callback,
+ const void * refcon,
+ QTBandwidthReference * bwRef,
+ long flags) THREEWORDINLINE(0x303C, 0x0318, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTBandwidthRelease (QTBandwidthReference bwRef,
+ long flags) THREEWORDINLINE(0x303C, 0x02F6, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTScheduledBandwidthRequest (QTScheduledBandwidthPtr scheduleRec,
+ QTBandwidthNotificationUPP notificationCallback,
+ void * refcon,
+ QTScheduledBandwidthReference * sbwRef,
+ long flags) THREEWORDINLINE(0x303C, 0x0310, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTScheduledBandwidthRelease (QTScheduledBandwidthReference sbwRef,
+ long flags) THREEWORDINLINE(0x303C, 0x0311, 0xAAAA);
+
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(QTCallBackUPP)
+ NewQTCallBackUPP (QTCallBackProcPtr userRoutine);
+
+ EXTERN_API(QTSyncTaskUPP)
+ NewQTSyncTaskUPP (QTSyncTaskProcPtr userRoutine);
+
+ EXTERN_API(MovieRgnCoverUPP)
+ NewMovieRgnCoverUPP (MovieRgnCoverProcPtr userRoutine);
+
+ EXTERN_API(MovieProgressUPP)
+ NewMovieProgressUPP (MovieProgressProcPtr userRoutine);
+
+ EXTERN_API(MovieDrawingCompleteUPP)
+ NewMovieDrawingCompleteUPP (MovieDrawingCompleteProcPtr userRoutine);
+
+ EXTERN_API(TrackTransferUPP)
+ NewTrackTransferUPP (TrackTransferProcPtr userRoutine);
+
+ EXTERN_API(GetMovieUPP)
+ NewGetMovieUPP (GetMovieProcPtr userRoutine);
+
+ EXTERN_API(MoviePreviewCallOutUPP)
+ NewMoviePreviewCallOutUPP (MoviePreviewCallOutProcPtr userRoutine);
+
+ EXTERN_API(TextMediaUPP)
+ NewTextMediaUPP (TextMediaProcPtr userRoutine);
+
+ EXTERN_API(ActionsUPP)
+ NewActionsUPP (ActionsProcPtr userRoutine);
+
+ EXTERN_API(DoMCActionUPP)
+ NewDoMCActionUPP (DoMCActionProcPtr userRoutine);
+
+ EXTERN_API(MovieExecuteWiredActionsUPP)
+ NewMovieExecuteWiredActionsUPP (MovieExecuteWiredActionsProcPtr userRoutine);
+
+ EXTERN_API(MoviePrePrerollCompleteUPP)
+ NewMoviePrePrerollCompleteUPP (MoviePrePrerollCompleteProcPtr userRoutine);
+
+ EXTERN_API(QTNextTaskNeededSoonerCallbackUPP)
+ NewQTNextTaskNeededSoonerCallbackUPP (QTNextTaskNeededSoonerCallbackProcPtr userRoutine);
+
+ EXTERN_API(MoviesErrorUPP)
+ NewMoviesErrorUPP (MoviesErrorProcPtr userRoutine);
+
+ EXTERN_API(TweenerDataUPP)
+ NewTweenerDataUPP (TweenerDataProcPtr userRoutine);
+
+ EXTERN_API(QTEffectListFilterUPP)
+ NewQTEffectListFilterUPP (QTEffectListFilterProcPtr userRoutine);
+
+ EXTERN_API(QTBandwidthNotificationUPP)
+ NewQTBandwidthNotificationUPP (QTBandwidthNotificationProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeQTCallBackUPP (QTCallBackUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeQTSyncTaskUPP (QTSyncTaskUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeMovieRgnCoverUPP (MovieRgnCoverUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeMovieProgressUPP (MovieProgressUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeMovieDrawingCompleteUPP (MovieDrawingCompleteUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeTrackTransferUPP (TrackTransferUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeGetMovieUPP (GetMovieUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeMoviePreviewCallOutUPP (MoviePreviewCallOutUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeTextMediaUPP (TextMediaUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeActionsUPP (ActionsUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeDoMCActionUPP (DoMCActionUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeMovieExecuteWiredActionsUPP (MovieExecuteWiredActionsUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeMoviePrePrerollCompleteUPP (MoviePrePrerollCompleteUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeQTNextTaskNeededSoonerCallbackUPP (QTNextTaskNeededSoonerCallbackUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeMoviesErrorUPP (MoviesErrorUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeTweenerDataUPP (TweenerDataUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeQTEffectListFilterUPP (QTEffectListFilterUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeQTBandwidthNotificationUPP (QTBandwidthNotificationUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeQTCallBackUPP (QTCallBack cb,
+ long refCon,
+ QTCallBackUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeQTSyncTaskUPP (void * task,
+ QTSyncTaskUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeMovieRgnCoverUPP (Movie theMovie,
+ RgnHandle changedRgn,
+ long refcon,
+ MovieRgnCoverUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeMovieProgressUPP (Movie theMovie,
+ short message,
+ short whatOperation,
+ Fixed percentDone,
+ long refcon,
+ MovieProgressUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeMovieDrawingCompleteUPP (Movie theMovie,
+ long refCon,
+ MovieDrawingCompleteUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeTrackTransferUPP (Track t,
+ long refCon,
+ TrackTransferUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGetMovieUPP (long offset,
+ long size,
+ void * dataPtr,
+ void * refCon,
+ GetMovieUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeMoviePreviewCallOutUPP (long refcon,
+ MoviePreviewCallOutUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeTextMediaUPP (Handle theText,
+ Movie theMovie,
+ short * displayFlag,
+ long refcon,
+ TextMediaUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeActionsUPP (void * refcon,
+ Track targetTrack,
+ long targetRefCon,
+ QTEventRecordPtr theEvent,
+ ActionsUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeDoMCActionUPP (void * refcon,
+ short action,
+ void * params,
+ Boolean * handled,
+ DoMCActionUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeMovieExecuteWiredActionsUPP (Movie theMovie,
+ void * refcon,
+ long flags,
+ QTAtomContainer wiredActions,
+ MovieExecuteWiredActionsUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeMoviePrePrerollCompleteUPP (Movie theMovie,
+ OSErr prerollErr,
+ void * refcon,
+ MoviePrePrerollCompleteUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeQTNextTaskNeededSoonerCallbackUPP (TimeValue duration,
+ unsigned long flags,
+ void * refcon,
+ QTNextTaskNeededSoonerCallbackUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeMoviesErrorUPP (OSErr theErr,
+ long refcon,
+ MoviesErrorUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokeTweenerDataUPP (TweenRecord * tr,
+ void * tweenData,
+ long tweenDataSize,
+ long dataDescriptionSeed,
+ Handle dataDescription,
+ ICMCompletionProcRecordPtr asyncCompletionProc,
+ UniversalProcPtr transferProc,
+ void * refCon,
+ TweenerDataUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeQTEffectListFilterUPP (Component effect,
+ long effectMinSource,
+ long effectMaxSource,
+ OSType majorClass,
+ OSType minorClass,
+ void * refcon,
+ QTEffectListFilterUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeQTBandwidthNotificationUPP (long flags,
+ void * reserved,
+ void * refcon,
+ QTBandwidthNotificationUPP userUPP);
+
+#else
+ enum { uppQTCallBackProcInfo = 0x000003C0 }; /* pascal no_return_value Func(4_bytes, 4_bytes) */
+ enum { uppQTSyncTaskProcInfo = 0x000000C0 }; /* pascal no_return_value Func(4_bytes) */
+ enum { uppMovieRgnCoverProcInfo = 0x00000FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppMovieProgressProcInfo = 0x0000FAE0 }; /* pascal 2_bytes Func(4_bytes, 2_bytes, 2_bytes, 4_bytes, 4_bytes) */
+ enum { uppMovieDrawingCompleteProcInfo = 0x000003E0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes) */
+ enum { uppTrackTransferProcInfo = 0x000003E0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes) */
+ enum { uppGetMovieProcInfo = 0x00003FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppMoviePreviewCallOutProcInfo = 0x000000D0 }; /* pascal 1_byte Func(4_bytes) */
+ enum { uppTextMediaProcInfo = 0x00003FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppActionsProcInfo = 0x00003FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppDoMCActionProcInfo = 0x00003EE0 }; /* pascal 2_bytes Func(4_bytes, 2_bytes, 4_bytes, 4_bytes) */
+ enum { uppMovieExecuteWiredActionsProcInfo = 0x00003FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppMoviePrePrerollCompleteProcInfo = 0x00000EC0 }; /* pascal no_return_value Func(4_bytes, 2_bytes, 4_bytes) */
+ enum { uppQTNextTaskNeededSoonerCallbackProcInfo = 0x00000FC0 }; /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppMoviesErrorProcInfo = 0x00000380 }; /* pascal no_return_value Func(2_bytes, 4_bytes) */
+ enum { uppTweenerDataProcInfo = 0x003FFFF0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppQTEffectListFilterProcInfo = 0x0003FFD0 }; /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppQTBandwidthNotificationProcInfo = 0x00000FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ #define NewQTCallBackUPP(userRoutine) (QTCallBackUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTCallBackProcInfo, GetCurrentArchitecture())
+ #define NewQTSyncTaskUPP(userRoutine) (QTSyncTaskUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTSyncTaskProcInfo, GetCurrentArchitecture())
+ #define NewMovieRgnCoverUPP(userRoutine) (MovieRgnCoverUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMovieRgnCoverProcInfo, GetCurrentArchitecture())
+ #define NewMovieProgressUPP(userRoutine) (MovieProgressUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMovieProgressProcInfo, GetCurrentArchitecture())
+ #define NewMovieDrawingCompleteUPP(userRoutine) (MovieDrawingCompleteUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMovieDrawingCompleteProcInfo, GetCurrentArchitecture())
+ #define NewTrackTransferUPP(userRoutine) (TrackTransferUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTrackTransferProcInfo, GetCurrentArchitecture())
+ #define NewGetMovieUPP(userRoutine) (GetMovieUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGetMovieProcInfo, GetCurrentArchitecture())
+ #define NewMoviePreviewCallOutUPP(userRoutine) (MoviePreviewCallOutUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMoviePreviewCallOutProcInfo, GetCurrentArchitecture())
+ #define NewTextMediaUPP(userRoutine) (TextMediaUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTextMediaProcInfo, GetCurrentArchitecture())
+ #define NewActionsUPP(userRoutine) (ActionsUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppActionsProcInfo, GetCurrentArchitecture())
+ #define NewDoMCActionUPP(userRoutine) (DoMCActionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDoMCActionProcInfo, GetCurrentArchitecture())
+ #define NewMovieExecuteWiredActionsUPP(userRoutine) (MovieExecuteWiredActionsUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMovieExecuteWiredActionsProcInfo, GetCurrentArchitecture())
+ #define NewMoviePrePrerollCompleteUPP(userRoutine) (MoviePrePrerollCompleteUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMoviePrePrerollCompleteProcInfo, GetCurrentArchitecture())
+ #define NewQTNextTaskNeededSoonerCallbackUPP(userRoutine) (QTNextTaskNeededSoonerCallbackUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTNextTaskNeededSoonerCallbackProcInfo, GetCurrentArchitecture())
+ #define NewMoviesErrorUPP(userRoutine) (MoviesErrorUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMoviesErrorProcInfo, GetCurrentArchitecture())
+ #define NewTweenerDataUPP(userRoutine) (TweenerDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTweenerDataProcInfo, GetCurrentArchitecture())
+ #define NewQTEffectListFilterUPP(userRoutine) (QTEffectListFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTEffectListFilterProcInfo, GetCurrentArchitecture())
+ #define NewQTBandwidthNotificationUPP(userRoutine) (QTBandwidthNotificationUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTBandwidthNotificationProcInfo, GetCurrentArchitecture())
+ #define DisposeQTCallBackUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeQTSyncTaskUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeMovieRgnCoverUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeMovieProgressUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeMovieDrawingCompleteUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeTrackTransferUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeGetMovieUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeMoviePreviewCallOutUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeTextMediaUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeActionsUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeDoMCActionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeMovieExecuteWiredActionsUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeMoviePrePrerollCompleteUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeQTNextTaskNeededSoonerCallbackUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeMoviesErrorUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeTweenerDataUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeQTEffectListFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeQTBandwidthNotificationUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeQTCallBackUPP(cb, refCon, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppQTCallBackProcInfo, (cb), (refCon))
+ #define InvokeQTSyncTaskUPP(task, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppQTSyncTaskProcInfo, (task))
+ #define InvokeMovieRgnCoverUPP(theMovie, changedRgn, refcon, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppMovieRgnCoverProcInfo, (theMovie), (changedRgn), (refcon))
+ #define InvokeMovieProgressUPP(theMovie, message, whatOperation, percentDone, refcon, userUPP) (OSErr)CALL_FIVE_PARAMETER_UPP((userUPP), uppMovieProgressProcInfo, (theMovie), (message), (whatOperation), (percentDone), (refcon))
+ #define InvokeMovieDrawingCompleteUPP(theMovie, refCon, userUPP) (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppMovieDrawingCompleteProcInfo, (theMovie), (refCon))
+ #define InvokeTrackTransferUPP(t, refCon, userUPP) (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppTrackTransferProcInfo, (t), (refCon))
+ #define InvokeGetMovieUPP(offset, size, dataPtr, refCon, userUPP) (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppGetMovieProcInfo, (offset), (size), (dataPtr), (refCon))
+ #define InvokeMoviePreviewCallOutUPP(refcon, userUPP) (Boolean)CALL_ONE_PARAMETER_UPP((userUPP), uppMoviePreviewCallOutProcInfo, (refcon))
+ #define InvokeTextMediaUPP(theText, theMovie, displayFlag, refcon, userUPP) (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppTextMediaProcInfo, (theText), (theMovie), (displayFlag), (refcon))
+ #define InvokeActionsUPP(refcon, targetTrack, targetRefCon, theEvent, userUPP) (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppActionsProcInfo, (refcon), (targetTrack), (targetRefCon), (theEvent))
+ #define InvokeDoMCActionUPP(refcon, action, params, handled, userUPP) (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppDoMCActionProcInfo, (refcon), (action), (params), (handled))
+ #define InvokeMovieExecuteWiredActionsUPP(theMovie, refcon, flags, wiredActions, userUPP) (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppMovieExecuteWiredActionsProcInfo, (theMovie), (refcon), (flags), (wiredActions))
+ #define InvokeMoviePrePrerollCompleteUPP(theMovie, prerollErr, refcon, userUPP) CALL_THREE_PARAMETER_UPP((userUPP), uppMoviePrePrerollCompleteProcInfo, (theMovie), (prerollErr), (refcon))
+ #define InvokeQTNextTaskNeededSoonerCallbackUPP(duration, flags, refcon, userUPP) CALL_THREE_PARAMETER_UPP((userUPP), uppQTNextTaskNeededSoonerCallbackProcInfo, (duration), (flags), (refcon))
+ #define InvokeMoviesErrorUPP(theErr, refcon, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppMoviesErrorProcInfo, (theErr), (refcon))
+ #define InvokeTweenerDataUPP(tr, tweenData, tweenDataSize, dataDescriptionSeed, dataDescription, asyncCompletionProc, transferProc, refCon, userUPP) (ComponentResult)CALL_EIGHT_PARAMETER_UPP((userUPP), uppTweenerDataProcInfo, (tr), (tweenData), (tweenDataSize), (dataDescriptionSeed), (dataDescription), (asyncCompletionProc), (transferProc), (refCon))
+ #define InvokeQTEffectListFilterUPP(effect, effectMinSource, effectMaxSource, majorClass, minorClass, refcon, userUPP) (Boolean)CALL_SIX_PARAMETER_UPP((userUPP), uppQTEffectListFilterProcInfo, (effect), (effectMinSource), (effectMaxSource), (majorClass), (minorClass), (refcon))
+ #define InvokeQTBandwidthNotificationUPP(flags, reserved, refcon, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppQTBandwidthNotificationProcInfo, (flags), (reserved), (refcon))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewQTCallBackProc(userRoutine) NewQTCallBackUPP(userRoutine)
+#define NewQTSyncTaskProc(userRoutine) NewQTSyncTaskUPP(userRoutine)
+#define NewMovieRgnCoverProc(userRoutine) NewMovieRgnCoverUPP(userRoutine)
+#define NewMovieProgressProc(userRoutine) NewMovieProgressUPP(userRoutine)
+#define NewMovieDrawingCompleteProc(userRoutine) NewMovieDrawingCompleteUPP(userRoutine)
+#define NewTrackTransferProc(userRoutine) NewTrackTransferUPP(userRoutine)
+#define NewGetMovieProc(userRoutine) NewGetMovieUPP(userRoutine)
+#define NewMoviePreviewCallOutProc(userRoutine) NewMoviePreviewCallOutUPP(userRoutine)
+#define NewTextMediaProc(userRoutine) NewTextMediaUPP(userRoutine)
+#define NewActionsProc(userRoutine) NewActionsUPP(userRoutine)
+#define NewDoMCActionProc(userRoutine) NewDoMCActionUPP(userRoutine)
+#define NewMovieExecuteWiredActionsProc(userRoutine) NewMovieExecuteWiredActionsUPP(userRoutine)
+#define NewMoviePrePrerollCompleteProc(userRoutine) NewMoviePrePrerollCompleteUPP(userRoutine)
+#define NewQTNextTaskNeededSoonerCallbackProc(userRoutine) NewQTNextTaskNeededSoonerCallbackUPP(userRoutine)
+#define NewMoviesErrorProc(userRoutine) NewMoviesErrorUPP(userRoutine)
+#define NewTweenerDataProc(userRoutine) NewTweenerDataUPP(userRoutine)
+#define NewQTEffectListFilterProc(userRoutine) NewQTEffectListFilterUPP(userRoutine)
+#define NewQTBandwidthNotificationProc(userRoutine) NewQTBandwidthNotificationUPP(userRoutine)
+#define CallQTCallBackProc(userRoutine, cb, refCon) InvokeQTCallBackUPP(cb, refCon, userRoutine)
+#define CallQTSyncTaskProc(userRoutine, task) InvokeQTSyncTaskUPP(task, userRoutine)
+#define CallMovieRgnCoverProc(userRoutine, theMovie, changedRgn, refcon) InvokeMovieRgnCoverUPP(theMovie, changedRgn, refcon, userRoutine)
+#define CallMovieProgressProc(userRoutine, theMovie, message, whatOperation, percentDone, refcon) InvokeMovieProgressUPP(theMovie, message, whatOperation, percentDone, refcon, userRoutine)
+#define CallMovieDrawingCompleteProc(userRoutine, theMovie, refCon) InvokeMovieDrawingCompleteUPP(theMovie, refCon, userRoutine)
+#define CallTrackTransferProc(userRoutine, t, refCon) InvokeTrackTransferUPP(t, refCon, userRoutine)
+#define CallGetMovieProc(userRoutine, offset, size, dataPtr, refCon) InvokeGetMovieUPP(offset, size, dataPtr, refCon, userRoutine)
+#define CallMoviePreviewCallOutProc(userRoutine, refcon) InvokeMoviePreviewCallOutUPP(refcon, userRoutine)
+#define CallTextMediaProc(userRoutine, theText, theMovie, displayFlag, refcon) InvokeTextMediaUPP(theText, theMovie, displayFlag, refcon, userRoutine)
+#define CallActionsProc(userRoutine, refcon, targetTrack, targetRefCon, theEvent) InvokeActionsUPP(refcon, targetTrack, targetRefCon, theEvent, userRoutine)
+#define CallDoMCActionProc(userRoutine, refcon, action, params, handled) InvokeDoMCActionUPP(refcon, action, params, handled, userRoutine)
+#define CallMovieExecuteWiredActionsProc(userRoutine, theMovie, refcon, flags, wiredActions) InvokeMovieExecuteWiredActionsUPP(theMovie, refcon, flags, wiredActions, userRoutine)
+#define CallMoviePrePrerollCompleteProc(userRoutine, theMovie, prerollErr, refcon) InvokeMoviePrePrerollCompleteUPP(theMovie, prerollErr, refcon, userRoutine)
+#define CallQTNextTaskNeededSoonerCallbackProc(userRoutine, duration, flags, refcon) InvokeQTNextTaskNeededSoonerCallbackUPP(duration, flags, refcon, userRoutine)
+#define CallMoviesErrorProc(userRoutine, theErr, refcon) InvokeMoviesErrorUPP(theErr, refcon, userRoutine)
+#define CallTweenerDataProc(userRoutine, tr, tweenData, tweenDataSize, dataDescriptionSeed, dataDescription, asyncCompletionProc, transferProc, refCon) InvokeTweenerDataUPP(tr, tweenData, tweenDataSize, dataDescriptionSeed, dataDescription, asyncCompletionProc, transferProc, refCon, userRoutine)
+#define CallQTEffectListFilterProc(userRoutine, effect, effectMinSource, effectMaxSource, majorClass, minorClass, refcon) InvokeQTEffectListFilterUPP(effect, effectMinSource, effectMaxSource, majorClass, minorClass, refcon, userRoutine)
+#define CallQTBandwidthNotificationProc(userRoutine, flags, reserved, refcon) InvokeQTBandwidthNotificationUPP(flags, reserved, refcon, userRoutine)
+/*****
+ QT International Text Atom Support
+*****/
+enum {
+ kITextRemoveEverythingBut = 0 << 1,
+ kITextRemoveLeaveSuggestedAlternate = 1 << 1
+};
+
+enum {
+ kITextAtomType = FOUR_CHAR_CODE('itxt'),
+ kITextStringAtomType = FOUR_CHAR_CODE('text')
+};
+
+EXTERN_API( OSErr )
+ITextAddString (QTAtomContainer container,
+ QTAtom parentAtom,
+ RegionCode theRegionCode,
+ ConstStr255Param theString) THREEWORDINLINE(0x303C, 0x027A, 0xAAAA);
+
+EXTERN_API( OSErr )
+ITextRemoveString (QTAtomContainer container,
+ QTAtom parentAtom,
+ RegionCode theRegionCode,
+ long flags) THREEWORDINLINE(0x303C, 0x027B, 0xAAAA);
+
+EXTERN_API( OSErr )
+ITextGetString (QTAtomContainer container,
+ QTAtom parentAtom,
+ RegionCode requestedRegion,
+ RegionCode * foundRegion,
+ StringPtr theString) THREEWORDINLINE(0x303C, 0x027C, 0xAAAA);
+
+EXTERN_API( OSErr )
+QTTextToNativeText (Handle theText,
+ long encoding,
+ long flags) THREEWORDINLINE(0x303C, 0x02DB, 0xAAAA);
+
+/* QTParseTextHREF inContainer atoms*/
+enum {
+ kQTParseTextHREFText = FOUR_CHAR_CODE('text'), /* string*/
+ kQTParseTextHREFBaseURL = FOUR_CHAR_CODE('burl'), /* string*/
+ kQTParseTextHREFClickPoint = FOUR_CHAR_CODE('clik'), /* Point; if present, QTParseTextHREF will expand URLs to support server-side image maps*/
+ kQTParseTextHREFUseAltDelim = FOUR_CHAR_CODE('altd'), /* boolean; if no kQTParseTextHREFDelimiter, delim is ':'*/
+ kQTParseTextHREFDelimiter = FOUR_CHAR_CODE('delm'), /* character*/
+ kQTParseTextHREFRecomposeHREF = FOUR_CHAR_CODE('rhrf') /* Boolean; if true, QTParseTextHREF returns recomposed HREF with URL expanded as appropriate*/
+};
+
+/* QTParseTextHREF outContainer atoms*/
+enum {
+ kQTParseTextHREFURL = FOUR_CHAR_CODE('url '), /* string*/
+ kQTParseTextHREFTarget = FOUR_CHAR_CODE('targ'), /* string*/
+ kQTParseTextHREFChapter = FOUR_CHAR_CODE('chap'), /* string*/
+ kQTParseTextHREFIsAutoHREF = FOUR_CHAR_CODE('auto'), /* Boolean*/
+ kQTParseTextHREFIsServerMap = FOUR_CHAR_CODE('smap'), /* Boolean*/
+ kQTParseTextHREFHREF = FOUR_CHAR_CODE('href'), /* string; recomposed HREF with URL expanded as appropriate, suitable for mcActionLinkToURL*/
+ kQTParseTextHREFEMBEDArgs = FOUR_CHAR_CODE('mbed') /* string; text between 'E<' and '>' to be used as new movie's embed tags*/
+};
+
+EXTERN_API( OSErr )
+QTParseTextHREF (char * href,
+ SInt32 hrefLen,
+ QTAtomContainer inContainer,
+ QTAtomContainer * outContainer) THREEWORDINLINE(0x303C, 0x0319, 0xAAAA);
+
+/*************************
+* track reference types
+**************************/
+enum {
+ kTrackReferenceChapterList = FOUR_CHAR_CODE('chap'),
+ kTrackReferenceTimeCode = FOUR_CHAR_CODE('tmcd'),
+ kTrackReferenceModifier = FOUR_CHAR_CODE('ssrc')
+};
+
+/*************************
+* modifier track types
+**************************/
+enum {
+ kTrackModifierInput = 0x696E, /* is really 'in'*/
+ kTrackModifierType = 0x7479, /* is really 'ty'*/
+ kTrackModifierReference = FOUR_CHAR_CODE('ssrc'),
+ kTrackModifierObjectID = FOUR_CHAR_CODE('obid'),
+ kTrackModifierInputName = FOUR_CHAR_CODE('name')
+};
+
+enum {
+ kInputMapSubInputID = FOUR_CHAR_CODE('subi')
+};
+
+enum {
+ kTrackModifierTypeMatrix = 1,
+ kTrackModifierTypeClip = 2,
+ kTrackModifierTypeGraphicsMode = 5,
+ kTrackModifierTypeVolume = 3,
+ kTrackModifierTypeBalance = 4,
+ kTrackModifierTypeImage = FOUR_CHAR_CODE('vide'), /* was kTrackModifierTypeSpriteImage*/
+ kTrackModifierObjectMatrix = 6,
+ kTrackModifierObjectGraphicsMode = 7,
+ kTrackModifierType3d4x4Matrix = 8,
+ kTrackModifierCameraData = 9,
+ kTrackModifierSoundLocalizationData = 10,
+ kTrackModifierObjectImageIndex = 11,
+ kTrackModifierObjectLayer = 12,
+ kTrackModifierObjectVisible = 13,
+ kTrackModifierAngleAspectCamera = 14,
+ kTrackModifierPanAngle = FOUR_CHAR_CODE('pan '),
+ kTrackModifierTiltAngle = FOUR_CHAR_CODE('tilt'),
+ kTrackModifierVerticalFieldOfViewAngle = FOUR_CHAR_CODE('fov '),
+ kTrackModifierObjectQTEventSend = FOUR_CHAR_CODE('evnt'),
+ kTrackModifierObjectCanBeHitTested = 15
+};
+
+
+struct ModifierTrackGraphicsModeRecord {
+ long graphicsMode;
+ RGBColor opColor;
+};
+typedef struct ModifierTrackGraphicsModeRecord ModifierTrackGraphicsModeRecord;
+
+/*************************
+* tween track types
+**************************/
+enum {
+ kTweenTypeShort = 1,
+ kTweenTypeLong = 2,
+ kTweenTypeFixed = 3,
+ kTweenTypePoint = 4,
+ kTweenTypeQDRect = 5,
+ kTweenTypeQDRegion = 6,
+ kTweenTypeMatrix = 7,
+ kTweenTypeRGBColor = 8,
+ kTweenTypeGraphicsModeWithRGBColor = 9,
+ kTweenTypeQTFloatSingle = 10,
+ kTweenTypeQTFloatDouble = 11,
+ kTweenTypeFixedPoint = 12,
+ kTweenType3dScale = FOUR_CHAR_CODE('3sca'),
+ kTweenType3dTranslate = FOUR_CHAR_CODE('3tra'),
+ kTweenType3dRotate = FOUR_CHAR_CODE('3rot'),
+ kTweenType3dRotateAboutPoint = FOUR_CHAR_CODE('3rap'),
+ kTweenType3dRotateAboutAxis = FOUR_CHAR_CODE('3rax'),
+ kTweenType3dRotateAboutVector = FOUR_CHAR_CODE('3rvc'),
+ kTweenType3dQuaternion = FOUR_CHAR_CODE('3qua'),
+ kTweenType3dMatrix = FOUR_CHAR_CODE('3mat'),
+ kTweenType3dCameraData = FOUR_CHAR_CODE('3cam'),
+ kTweenType3dAngleAspectCameraData = FOUR_CHAR_CODE('3caa'),
+ kTweenType3dSoundLocalizationData = FOUR_CHAR_CODE('3slc'),
+ kTweenTypePathToMatrixTranslation = FOUR_CHAR_CODE('gxmt'),
+ kTweenTypePathToMatrixRotation = FOUR_CHAR_CODE('gxpr'),
+ kTweenTypePathToMatrixTranslationAndRotation = FOUR_CHAR_CODE('gxmr'),
+ kTweenTypePathToFixedPoint = FOUR_CHAR_CODE('gxfp'),
+ kTweenTypePathXtoY = FOUR_CHAR_CODE('gxxy'),
+ kTweenTypePathYtoX = FOUR_CHAR_CODE('gxyx'),
+ kTweenTypeAtomList = FOUR_CHAR_CODE('atom'),
+ kTweenTypePolygon = FOUR_CHAR_CODE('poly'),
+ kTweenTypeMultiMatrix = FOUR_CHAR_CODE('mulm'),
+ kTweenTypeSpin = FOUR_CHAR_CODE('spin'),
+ kTweenType3dMatrixNonLinear = FOUR_CHAR_CODE('3nlr'),
+ kTweenType3dVRObject = FOUR_CHAR_CODE('3vro')
+};
+
+enum {
+ kTweenEntry = FOUR_CHAR_CODE('twen'),
+ kTweenData = FOUR_CHAR_CODE('data'),
+ kTweenType = FOUR_CHAR_CODE('twnt'),
+ kTweenStartOffset = FOUR_CHAR_CODE('twst'),
+ kTweenDuration = FOUR_CHAR_CODE('twdu'),
+ kTweenFlags = FOUR_CHAR_CODE('flag'),
+ kTweenOutputMin = FOUR_CHAR_CODE('omin'),
+ kTweenOutputMax = FOUR_CHAR_CODE('omax'),
+ kTweenSequenceElement = FOUR_CHAR_CODE('seqe'),
+ kTween3dInitialCondition = FOUR_CHAR_CODE('icnd'),
+ kTweenInterpolationID = FOUR_CHAR_CODE('intr'),
+ kTweenRegionData = FOUR_CHAR_CODE('qdrg'),
+ kTweenPictureData = FOUR_CHAR_CODE('PICT'),
+ kListElementType = FOUR_CHAR_CODE('type'),
+ kListElementDataType = FOUR_CHAR_CODE('daty'),
+ kNameAtom = FOUR_CHAR_CODE('name'),
+ kInitialRotationAtom = FOUR_CHAR_CODE('inro'),
+ kNonLinearTweenHeader = FOUR_CHAR_CODE('nlth')
+};
+
+/* kTweenFlags*/
+enum {
+ kTweenReturnDelta = 1L << 0
+};
+
+
+struct TweenSequenceEntryRecord {
+ Fixed endPercent;
+ QTAtomID tweenAtomID;
+ QTAtomID dataAtomID;
+};
+typedef struct TweenSequenceEntryRecord TweenSequenceEntryRecord;
+
+#ifdef __QD3D__
+
+struct ThreeDeeVRObjectSample {
+ long rows;
+ long columns;
+ TQ3Matrix4x4 calib1;
+ TQ3Matrix4x4 calib2;
+ long reserved1;
+ long reserved2;
+};
+
+typedef struct ThreeDeeVRObjectSample ThreeDeeVRObjectSample;
+
+struct ThreeDeeNonLinearSample {
+ float DurFromLastSample; /* 0 to 1 */
+ TQ3Matrix4x4 matrix;
+};
+typedef struct ThreeDeeNonLinearSample ThreeDeeNonLinearSample;
+
+struct ThreeDeeNonLinearTweenHeaderAtom {
+ long number;
+ long dataSize;
+ float tensionFactor; /* default is 0 */
+ long reserved1;
+ long reserved2;
+};
+typedef struct ThreeDeeNonLinearTweenHeaderAtom ThreeDeeNonLinearTweenHeaderAtom;
+
+
+#endif
+
+
+
+#if OLDROUTINENAMES
+
+/*************************
+* Video Media routines
+**************************/
+
+#define GetVideoMediaGraphicsMode MediaGetGraphicsMode
+#define SetVideoMediaGraphicsMode MediaSetGraphicsMode
+
+/* use these two routines at your own peril */
+#define ResetVideoMediaStatistics VideoMediaResetStatistics
+#define GetVideoMediaStatistics VideoMediaGetStatistics
+
+/*************************
+* Sound Media routines
+**************************/
+
+#define GetSoundMediaBalance MediaGetSoundBalance
+#define SetSoundMediaBalance MediaSetSoundBalance
+
+/*************************
+* Text Media routines
+**************************/
+
+#define SetTextProc TextMediaSetTextProc
+#define AddTextSample TextMediaAddTextSample
+#define AddTESample TextMediaAddTESample
+#define AddHiliteSample TextMediaAddHiliteSample
+#define FindNextText TextMediaFindNextText
+#define HiliteTextSample TextMediaHiliteTextSample
+#define SetTextSampleData TextMediaSetTextSampleData
+#define DrawRaw TextMediaDrawRaw
+#define RawSetup TextMediaRawSetup
+#define RawIdle TextMediaRawIdle
+#define SetTextProperty TextMediaSetTextProperty
+
+/*************************
+* Sprite Media routines
+**************************/
+
+#define SetSpriteMediaSpriteProperty SpriteMediaSetProperty
+#define GetSpriteMediaSpriteProperty SpriteMediaGetProperty
+#define HitTestSpriteMedia SpriteMediaHitTestSprites
+#define CountSpriteMediaSprites SpriteMediaCountSprites
+#define CountSpriteMediaImages SpriteMediaCountImages
+#define GetSpriteMediaIndImageDescription SpriteMediaGetIndImageDescription
+#define GetDisplayedSampleNumber SpriteMediaGetDisplayedSampleNumber
+#endif /* OLDROUTINENAMES */
+
+
+
+
+
+
+/*****
+ Content Restrictions
+*****/
+enum {
+ kQTRestrictionClassSave = FOUR_CHAR_CODE('save'),
+ kQTRestrictionSaveDontAddMovieResource = (1L << 0),
+ kQTRestrictionSaveDontFlatten = (1L << 1),
+ kQTRestrictionSaveDontExport = (1L << 2),
+ kQTRestrictionSaveDontExtract = (1L << 3), /* don't allow any form of extraction of content*/
+ kQTRestrictionClassEdit = FOUR_CHAR_CODE('edit'),
+ kQTRestrictionEditDontCopy = (1L << 0), /* disable copy */
+ kQTRestrictionEditDontCut = (1L << 1), /* disable cut */
+ kQTRestrictionEditDontPaste = (1L << 2), /* disable paste */
+ kQTRestrictionEditDontClear = (1L << 3), /* disable clear*/
+ kQTRestrictionEditDontModify = (1L << 4), /* don't allow modification of content*/
+ kQTRestrictionEditDontExtract = (1L << 5) /* don't allow any form of extraction of content*/
+};
+
+
+
+/*************************
+* Video Media routines
+**************************/
+
+
+enum {
+ videoFlagDontLeanAhead = 1L << 0
+};
+
+
+
+
+/* use these five routines at your own peril*/
+EXTERN_API( ComponentResult )
+VideoMediaResetStatistics (MediaHandler mh) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0105, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+VideoMediaGetStatistics (MediaHandler mh) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0106, 0x7000, 0xA82A);
+
+
+EXTERN_API( ComponentResult )
+VideoMediaGetStallCount (MediaHandler mh,
+ unsigned long * stalls) FIVEWORDINLINE(0x2F3C, 0x0004, 0x010E, 0x7000, 0xA82A);
+
+
+EXTERN_API( ComponentResult )
+VideoMediaSetCodecParameter (MediaHandler mh,
+ CodecType cType,
+ OSType parameterID,
+ long parameterChangeSeed,
+ void * dataPtr,
+ long dataSize) FIVEWORDINLINE(0x2F3C, 0x0014, 0x010F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+VideoMediaGetCodecParameter (MediaHandler mh,
+ CodecType cType,
+ OSType parameterID,
+ Handle outParameterData) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0110, 0x7000, 0xA82A);
+
+
+
+
+/*************************
+* Text Media routines
+**************************/
+
+
+
+/* Return displayFlags for TextProc */
+enum {
+ txtProcDefaultDisplay = 0, /* Use the media's default*/
+ txtProcDontDisplay = 1, /* Don't display the text*/
+ txtProcDoDisplay = 2 /* Do display the text*/
+};
+
+EXTERN_API( ComponentResult )
+TextMediaSetTextProc (MediaHandler mh,
+ TextMediaUPP TextProc,
+ long refcon) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0101, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TextMediaAddTextSample (MediaHandler mh,
+ Ptr text,
+ unsigned long size,
+ short fontNumber,
+ short fontSize,
+ Style textFace,
+ RGBColor * textColor,
+ RGBColor * backColor,
+ short textJustification,
+ Rect * textBox,
+ long displayFlags,
+ TimeValue scrollDelay,
+ short hiliteStart,
+ short hiliteEnd,
+ RGBColor * rgbHiliteColor,
+ TimeValue duration,
+ TimeValue * sampleTime) FIVEWORDINLINE(0x2F3C, 0x0034, 0x0102, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TextMediaAddTESample (MediaHandler mh,
+ TEHandle hTE,
+ RGBColor * backColor,
+ short textJustification,
+ Rect * textBox,
+ long displayFlags,
+ TimeValue scrollDelay,
+ short hiliteStart,
+ short hiliteEnd,
+ RGBColor * rgbHiliteColor,
+ TimeValue duration,
+ TimeValue * sampleTime) FIVEWORDINLINE(0x2F3C, 0x0026, 0x0103, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TextMediaAddHiliteSample (MediaHandler mh,
+ short hiliteStart,
+ short hiliteEnd,
+ RGBColor * rgbHiliteColor,
+ TimeValue duration,
+ TimeValue * sampleTime) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0104, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TextMediaDrawRaw (MediaHandler mh,
+ GWorldPtr gw,
+ GDHandle gd,
+ void * data,
+ long dataSize,
+ TextDescriptionHandle tdh) FIVEWORDINLINE(0x2F3C, 0x0014, 0x0109, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TextMediaSetTextProperty (MediaHandler mh,
+ TimeValue atMediaTime,
+ long propertyType,
+ void * data,
+ long dataSize) FIVEWORDINLINE(0x2F3C, 0x0010, 0x010A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TextMediaRawSetup (MediaHandler mh,
+ GWorldPtr gw,
+ GDHandle gd,
+ void * data,
+ long dataSize,
+ TextDescriptionHandle tdh,
+ TimeValue sampleDuration) FIVEWORDINLINE(0x2F3C, 0x0018, 0x010B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TextMediaRawIdle (MediaHandler mh,
+ GWorldPtr gw,
+ GDHandle gd,
+ TimeValue sampleTime,
+ long flagsIn,
+ long * flagsOut) FIVEWORDINLINE(0x2F3C, 0x0014, 0x010C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TextMediaGetTextProperty (MediaHandler mh,
+ TimeValue atMediaTime,
+ long propertyType,
+ void * data,
+ long dataSize) FIVEWORDINLINE(0x2F3C, 0x0010, 0x010D, 0x7000, 0xA82A);
+
+enum {
+ findTextEdgeOK = 1 << 0, /* Okay to find text at specified sample time*/
+ findTextCaseSensitive = 1 << 1, /* Case sensitive search*/
+ findTextReverseSearch = 1 << 2, /* Search from sampleTime backwards*/
+ findTextWrapAround = 1 << 3, /* Wrap search when beginning or end of movie is hit*/
+ findTextUseOffset = 1 << 4 /* Begin search at the given character offset into sample rather than edge*/
+};
+
+EXTERN_API( ComponentResult )
+TextMediaFindNextText (MediaHandler mh,
+ Ptr text,
+ long size,
+ short findFlags,
+ TimeValue startTime,
+ TimeValue * foundTime,
+ TimeValue * foundDuration,
+ long * offset) FIVEWORDINLINE(0x2F3C, 0x001A, 0x0105, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TextMediaHiliteTextSample (MediaHandler mh,
+ TimeValue sampleTime,
+ short hiliteStart,
+ short hiliteEnd,
+ RGBColor * rgbHiliteColor) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0106, 0x7000, 0xA82A);
+
+enum {
+ dropShadowOffsetType = FOUR_CHAR_CODE('drpo'),
+ dropShadowTranslucencyType = FOUR_CHAR_CODE('drpt')
+};
+
+EXTERN_API( ComponentResult )
+TextMediaSetTextSampleData (MediaHandler mh,
+ void * data,
+ OSType dataType) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0107, 0x7000, 0xA82A);
+
+
+
+
+
+/*************************
+* Sprite Media routines
+**************************/
+/* flags for sprite hit test routines */
+enum {
+ spriteHitTestBounds = 1L << 0, /* point must only be within sprite's bounding box*/
+ spriteHitTestImage = 1L << 1, /* point must be within the shape of the sprite's image*/
+ spriteHitTestInvisibleSprites = 1L << 2, /* invisible sprites may be hit tested*/
+ spriteHitTestIsClick = 1L << 3, /* for codecs that want mouse events*/
+ spriteHitTestLocInDisplayCoordinates = 1L << 4, /* set if you want to pass a display coordiate point to SpriteHitTest*/
+ spriteHitTestTreatAllSpritesAsHitTestable = 1L << 5 /* set if you want to override each sprites hittestable property as true*/
+};
+
+/* atom types for sprite media */
+enum {
+ kSpriteAtomType = FOUR_CHAR_CODE('sprt'),
+ kSpriteImagesContainerAtomType = FOUR_CHAR_CODE('imct'),
+ kSpriteImageAtomType = FOUR_CHAR_CODE('imag'),
+ kSpriteImageDataAtomType = FOUR_CHAR_CODE('imda'),
+ kSpriteImageDataRefAtomType = FOUR_CHAR_CODE('imre'),
+ kSpriteImageDataRefTypeAtomType = FOUR_CHAR_CODE('imrt'),
+ kSpriteImageGroupIDAtomType = FOUR_CHAR_CODE('imgr'),
+ kSpriteImageRegistrationAtomType = FOUR_CHAR_CODE('imrg'),
+ kSpriteImageDefaultImageIndexAtomType = FOUR_CHAR_CODE('defi'),
+ kSpriteSharedDataAtomType = FOUR_CHAR_CODE('dflt'),
+ kSpriteNameAtomType = FOUR_CHAR_CODE('name'),
+ kSpriteImageNameAtomType = FOUR_CHAR_CODE('name'),
+ kSpriteUsesImageIDsAtomType = FOUR_CHAR_CODE('uses'), /* leaf data is an array of QTAtomID's, one per image used*/
+ kSpriteBehaviorsAtomType = FOUR_CHAR_CODE('beha'),
+ kSpriteImageBehaviorAtomType = FOUR_CHAR_CODE('imag'),
+ kSpriteCursorBehaviorAtomType = FOUR_CHAR_CODE('crsr'),
+ kSpriteStatusStringsBehaviorAtomType = FOUR_CHAR_CODE('sstr'),
+ kSpriteVariablesContainerAtomType = FOUR_CHAR_CODE('vars'),
+ kSpriteStringVariableAtomType = FOUR_CHAR_CODE('strv'),
+ kSpriteFloatingPointVariableAtomType = FOUR_CHAR_CODE('flov')
+};
+
+
+struct QTRuntimeSpriteDescStruct {
+ long version; /* set to zero*/
+ QTAtomID spriteID;
+ short imageIndex;
+ MatrixRecord matrix;
+ short visible;
+ short layer;
+ ModifierTrackGraphicsModeRecord graphicsMode;
+ QTAtomID actionHandlingSpriteID;
+};
+typedef struct QTRuntimeSpriteDescStruct QTRuntimeSpriteDescStruct;
+
+typedef QTRuntimeSpriteDescStruct * QTRuntimeSpriteDescPtr;
+/*
+ when filling in QTSpriteButtonBehaviorStruct values -1 may be used to indicate that
+ the state transition does not change the property
+*/
+
+struct QTSpriteButtonBehaviorStruct {
+ QTAtomID notOverNotPressedStateID;
+ QTAtomID overNotPressedStateID;
+ QTAtomID overPressedStateID;
+ QTAtomID notOverPressedStateID;
+};
+typedef struct QTSpriteButtonBehaviorStruct QTSpriteButtonBehaviorStruct;
+
+typedef QTSpriteButtonBehaviorStruct * QTSpriteButtonBehaviorPtr;
+EXTERN_API( ComponentResult )
+SpriteMediaSetProperty (MediaHandler mh,
+ short spriteIndex,
+ long propertyType,
+ void * propertyValue) FIVEWORDINLINE(0x2F3C, 0x000A, 0x0101, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SpriteMediaGetProperty (MediaHandler mh,
+ short spriteIndex,
+ long propertyType,
+ void * propertyValue) FIVEWORDINLINE(0x2F3C, 0x000A, 0x0102, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SpriteMediaHitTestSprites (MediaHandler mh,
+ long flags,
+ Point loc,
+ short * spriteHitIndex) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0103, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SpriteMediaCountSprites (MediaHandler mh,
+ short * numSprites) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0104, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SpriteMediaCountImages (MediaHandler mh,
+ short * numImages) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0105, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SpriteMediaGetIndImageDescription (MediaHandler mh,
+ short imageIndex,
+ ImageDescriptionHandle imageDescription) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0106, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SpriteMediaGetDisplayedSampleNumber (MediaHandler mh,
+ long * sampleNum) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0107, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SpriteMediaGetSpriteName (MediaHandler mh,
+ QTAtomID spriteID,
+ Str255 spriteName) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0108, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SpriteMediaGetImageName (MediaHandler mh,
+ short imageIndex,
+ Str255 imageName) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0109, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SpriteMediaSetSpriteProperty (MediaHandler mh,
+ QTAtomID spriteID,
+ long propertyType,
+ void * propertyValue) FIVEWORDINLINE(0x2F3C, 0x000C, 0x010A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SpriteMediaGetSpriteProperty (MediaHandler mh,
+ QTAtomID spriteID,
+ long propertyType,
+ void * propertyValue) FIVEWORDINLINE(0x2F3C, 0x000C, 0x010B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SpriteMediaHitTestAllSprites (MediaHandler mh,
+ long flags,
+ Point loc,
+ QTAtomID * spriteHitID) FIVEWORDINLINE(0x2F3C, 0x000C, 0x010C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SpriteMediaHitTestOneSprite (MediaHandler mh,
+ QTAtomID spriteID,
+ long flags,
+ Point loc,
+ Boolean * wasHit) FIVEWORDINLINE(0x2F3C, 0x0010, 0x010D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SpriteMediaSpriteIndexToID (MediaHandler mh,
+ short spriteIndex,
+ QTAtomID * spriteID) FIVEWORDINLINE(0x2F3C, 0x0006, 0x010E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SpriteMediaSpriteIDToIndex (MediaHandler mh,
+ QTAtomID spriteID,
+ short * spriteIndex) FIVEWORDINLINE(0x2F3C, 0x0008, 0x010F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SpriteMediaGetSpriteActionsForQTEvent (MediaHandler mh,
+ QTEventRecordPtr event,
+ QTAtomID spriteID,
+ QTAtomContainer * container,
+ QTAtom * atom) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0110, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SpriteMediaSetActionVariable (MediaHandler mh,
+ QTAtomID variableID,
+ const float * value) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0111, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SpriteMediaGetActionVariable (MediaHandler mh,
+ QTAtomID variableID,
+ float * value) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0112, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SpriteMediaGetIndImageProperty (MediaHandler mh,
+ short imageIndex,
+ long imagePropertyType,
+ void * imagePropertyValue) FIVEWORDINLINE(0x2F3C, 0x000A, 0x0113, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SpriteMediaNewSprite (MediaHandler mh,
+ QTRuntimeSpriteDescPtr newSpriteDesc) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0114, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SpriteMediaDisposeSprite (MediaHandler mh,
+ QTAtomID spriteID) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0115, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SpriteMediaSetActionVariableToString (MediaHandler mh,
+ QTAtomID variableID,
+ Ptr theCString) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0116, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SpriteMediaGetActionVariableAsString (MediaHandler mh,
+ QTAtomID variableID,
+ Handle * theCString) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0117, 0x7000, 0xA82A);
+
+
+EXTERN_API( ComponentResult )
+SpriteMediaNewImage (MediaHandler mh,
+ Handle dataRef,
+ OSType dataRefType,
+ QTAtomID desiredID) FIVEWORDINLINE(0x2F3C, 0x000C, 0x011B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SpriteMediaDisposeImage (MediaHandler mh,
+ short imageIndex) FIVEWORDINLINE(0x2F3C, 0x0002, 0x011C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SpriteMediaImageIndexToID (MediaHandler mh,
+ short imageIndex,
+ QTAtomID * imageID) FIVEWORDINLINE(0x2F3C, 0x0006, 0x011D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SpriteMediaImageIDToIndex (MediaHandler mh,
+ QTAtomID imageID,
+ short * imageIndex) FIVEWORDINLINE(0x2F3C, 0x0008, 0x011E, 0x7000, 0xA82A);
+
+
+/*************************
+* Flash Media routines
+**************************/
+
+EXTERN_API( ComponentResult )
+FlashMediaSetPan (MediaHandler mh,
+ short xPercent,
+ short yPercent) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0101, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+FlashMediaSetZoom (MediaHandler mh,
+ short factor) FIVEWORDINLINE(0x2F3C, 0x0002, 0x0102, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+FlashMediaSetZoomRect (MediaHandler mh,
+ long left,
+ long top,
+ long right,
+ long bottom) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0103, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+FlashMediaGetRefConBounds (MediaHandler mh,
+ long refCon,
+ long * left,
+ long * top,
+ long * right,
+ long * bottom) FIVEWORDINLINE(0x2F3C, 0x0014, 0x0104, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+FlashMediaGetRefConID (MediaHandler mh,
+ long refCon,
+ long * refConID) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0105, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+FlashMediaIDToRefCon (MediaHandler mh,
+ long refConID,
+ long * refCon) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0106, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+FlashMediaGetDisplayedFrameNumber (MediaHandler mh,
+ long * flashFrameNumber) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0107, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+FlashMediaFrameNumberToMovieTime (MediaHandler mh,
+ long flashFrameNumber,
+ TimeValue * movieTime) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0108, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+FlashMediaFrameLabelToMovieTime (MediaHandler mh,
+ Ptr theLabel,
+ TimeValue * movieTime) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0109, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+FlashMediaGetFlashVariable (MediaHandler mh,
+ char * path,
+ char * name,
+ Handle * theVariableCStringOut) FIVEWORDINLINE(0x2F3C, 0x000C, 0x010A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+FlashMediaSetFlashVariable (MediaHandler mh,
+ char * path,
+ char * name,
+ char * value,
+ Boolean updateFocus) FIVEWORDINLINE(0x2F3C, 0x000E, 0x010B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+FlashMediaDoButtonActions (MediaHandler mh,
+ char * path,
+ long buttonID,
+ long transition) FIVEWORDINLINE(0x2F3C, 0x000C, 0x010C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+FlashMediaGetSupportedSwfVersion (MediaHandler mh,
+ unsigned char * swfVersion) FIVEWORDINLINE(0x2F3C, 0x0004, 0x010D, 0x7000, 0xA82A);
+
+
+
+/* sample format atoms*/
+enum {
+ kMovieMediaDataReference = FOUR_CHAR_CODE('mmdr'), /* data reference*/
+ kMovieMediaDefaultDataReferenceID = FOUR_CHAR_CODE('ddri'), /* atom id*/
+ kMovieMediaSlaveTime = FOUR_CHAR_CODE('slti'), /* boolean*/
+ kMovieMediaSlaveAudio = FOUR_CHAR_CODE('slau'), /* boolean*/
+ kMovieMediaSlaveGraphicsMode = FOUR_CHAR_CODE('slgr'), /* boolean*/
+ kMovieMediaAutoPlay = FOUR_CHAR_CODE('play'), /* boolean*/
+ kMovieMediaLoop = FOUR_CHAR_CODE('loop'), /* UInt8 (0=no loop, 1=loop, 2=palindrome loop)*/
+ kMovieMediaUseMIMEType = FOUR_CHAR_CODE('mime'), /* string indicating the MIME type to use for the dataref (usually not required)*/
+ kMovieMediaTitle = FOUR_CHAR_CODE('titl'), /* string of the media's title (tooltips)*/
+ kMovieMediaAltText = FOUR_CHAR_CODE('altt'), /* string of alternate text if media isn't loaded*/
+ kMovieMediaClipBegin = FOUR_CHAR_CODE('clpb'), /* MovieMediaTimeRecord of start time of embedded media*/
+ kMovieMediaClipDuration = FOUR_CHAR_CODE('clpd'), /* MovieMediaTimeRecord of duration of embedded media*/
+ kMovieMediaRegionAtom = FOUR_CHAR_CODE('regi'), /* contains subatoms that describe layout*/
+ kMovieMediaSlaveTrackDuration = FOUR_CHAR_CODE('sltr'), /* Boolean indicating that media handler should adjust track and media based on actual embedded movie duration*/
+ kMovieMediaEnableFrameStepping = FOUR_CHAR_CODE('enfs'), /* boolean. if true stepping on external movie steps frames within embedded movie.*/
+ kMovieMediaBackgroundColor = FOUR_CHAR_CODE('bkcl'), /* RGBColor.*/
+ kMovieMediaPrerollTime = FOUR_CHAR_CODE('prer') /* SInt32 indicating preroll time*/
+};
+
+/* fit types*/
+enum {
+ kMovieMediaFitNone = 0,
+ kMovieMediaFitScroll = FOUR_CHAR_CODE('scro'),
+ kMovieMediaFitClipIfNecessary = FOUR_CHAR_CODE('hidd'),
+ kMovieMediaFitFill = FOUR_CHAR_CODE('fill'),
+ kMovieMediaFitMeet = FOUR_CHAR_CODE('meet'),
+ kMovieMediaFitSlice = FOUR_CHAR_CODE('slic')
+};
+
+/* sub atoms for region atom*/
+enum {
+ kMovieMediaSpatialAdjustment = FOUR_CHAR_CODE('fit '), /* OSType from kMovieMediaFit**/
+ kMovieMediaRectangleAtom = FOUR_CHAR_CODE('rect'),
+ kMovieMediaTop = FOUR_CHAR_CODE('top '),
+ kMovieMediaLeft = FOUR_CHAR_CODE('left'),
+ kMovieMediaWidth = FOUR_CHAR_CODE('wd '),
+ kMovieMediaHeight = FOUR_CHAR_CODE('ht ')
+};
+
+/* contained movie properties*/
+enum {
+ kMoviePropertyDuration = FOUR_CHAR_CODE('dura'), /* TimeValue **/
+ kMoviePropertyTimeScale = FOUR_CHAR_CODE('tims'), /* TimeValue **/
+ kMoviePropertyTime = FOUR_CHAR_CODE('timv'), /* TimeValue **/
+ kMoviePropertyNaturalBounds = FOUR_CHAR_CODE('natb'), /* Rect **/
+ kMoviePropertyMatrix = FOUR_CHAR_CODE('mtrx'), /* Matrix **/
+ kMoviePropertyTrackList = FOUR_CHAR_CODE('tlst') /* long ****/
+};
+
+
+enum {
+ kTrackPropertyMediaType = FOUR_CHAR_CODE('mtyp'), /* OSType*/
+ kTrackPropertyInstantiation = FOUR_CHAR_CODE('inst') /* MovieMediaInstantiationInfoRecord*/
+};
+
+
+struct MovieMediaTimeRecord {
+ wide time;
+ TimeScale scale;
+};
+typedef struct MovieMediaTimeRecord MovieMediaTimeRecord;
+
+struct MovieMediaInstantiationInfoRecord {
+ Boolean immediately;
+ Boolean pad;
+ SInt32 bitRate;
+};
+typedef struct MovieMediaInstantiationInfoRecord MovieMediaInstantiationInfoRecord;
+/*************************
+* Movie Media routines
+**************************/
+
+
+EXTERN_API( ComponentResult )
+MovieMediaGetChildDoMCActionCallback (MediaHandler mh,
+ DoMCActionUPP * doMCActionCallbackProc,
+ long * refcon) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0102, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieMediaGetDoMCActionCallback (MediaHandler mh,
+ DoMCActionUPP * doMCActionCallbackProc,
+ long * refcon) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0103, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieMediaGetCurrentMovieProperty (MediaHandler mh,
+ OSType whichProperty,
+ void * value) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0104, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieMediaGetCurrentTrackProperty (MediaHandler mh,
+ long trackID,
+ OSType whichProperty,
+ void * value) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0105, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieMediaGetChildMovieDataReference (MediaHandler mh,
+ QTAtomID dataRefID,
+ short dataRefIndex,
+ OSType * dataRefType,
+ Handle * dataRef,
+ QTAtomID * dataRefIDOut,
+ short * dataRefIndexOut) FIVEWORDINLINE(0x2F3C, 0x0016, 0x0106, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieMediaSetChildMovieDataReference (MediaHandler mh,
+ QTAtomID dataRefID,
+ OSType dataRefType,
+ Handle dataRef) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0107, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieMediaLoadChildMovieFromDataReference (MediaHandler mh,
+ QTAtomID dataRefID) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0108, 0x7000, 0xA82A);
+
+
+
+/*************************
+* 3D Media routines
+**************************/
+EXTERN_API( ComponentResult )
+Media3DGetNamedObjectList (MediaHandler mh,
+ QTAtomContainer * objectList) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0101, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+Media3DGetRendererList (MediaHandler mh,
+ QTAtomContainer * rendererList) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0102, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+Media3DGetCurrentGroup (MediaHandler mh,
+ void * group) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0103, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+Media3DTranslateNamedObjectTo (MediaHandler mh,
+ char * objectName,
+ Fixed x,
+ Fixed y,
+ Fixed z) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0104, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+Media3DScaleNamedObjectTo (MediaHandler mh,
+ char * objectName,
+ Fixed xScale,
+ Fixed yScale,
+ Fixed zScale) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0105, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+Media3DRotateNamedObjectTo (MediaHandler mh,
+ char * objectName,
+ Fixed xDegrees,
+ Fixed yDegrees,
+ Fixed zDegrees) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0106, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+Media3DSetCameraData (MediaHandler mh,
+ void * cameraData) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0107, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+Media3DGetCameraData (MediaHandler mh,
+ void * cameraData) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0108, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+Media3DSetCameraAngleAspect (MediaHandler mh,
+ QTFloatSingle fov,
+ QTFloatSingle aspectRatioXToY) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0109, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+Media3DGetCameraAngleAspect (MediaHandler mh,
+ QTFloatSingle * fov,
+ QTFloatSingle * aspectRatioXToY) FIVEWORDINLINE(0x2F3C, 0x0008, 0x010A, 0x7000, 0xA82A);
+
+
+EXTERN_API( ComponentResult )
+Media3DSetCameraRange (MediaHandler mh,
+ void * tQ3CameraRange) FIVEWORDINLINE(0x2F3C, 0x0004, 0x010D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+Media3DGetCameraRange (MediaHandler mh,
+ void * tQ3CameraRange) FIVEWORDINLINE(0x2F3C, 0x0004, 0x010E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+Media3DGetViewObject (MediaHandler mh,
+ void * tq3viewObject) FIVEWORDINLINE(0x2F3C, 0x0004, 0x010F, 0x7000, 0xA82A);
+
+
+
+/****************************************
+* *
+* M O V I E C O N T R O L L E R *
+* *
+****************************************/
+enum {
+ MovieControllerComponentType = FOUR_CHAR_CODE('play')
+};
+
+
+enum {
+ kMovieControllerQTVRFlag = 1 << 0,
+ kMovieControllerDontDisplayToUser = 1 << 1
+};
+
+
+typedef ComponentInstance MovieController;
+typedef MovieController * MovieControllerPtr;
+enum {
+ mcActionIdle = 1, /* no param*/
+ mcActionDraw = 2, /* param is WindowRef*/
+ mcActionActivate = 3, /* no param*/
+ mcActionDeactivate = 4, /* no param*/
+ mcActionMouseDown = 5, /* param is pointer to EventRecord*/
+ mcActionKey = 6, /* param is pointer to EventRecord*/
+ mcActionPlay = 8, /* param is Fixed, play rate*/
+ mcActionGoToTime = 12, /* param is TimeRecord*/
+ mcActionSetVolume = 14, /* param is a short*/
+ mcActionGetVolume = 15, /* param is pointer to a short*/
+ mcActionStep = 18, /* param is number of steps (short)*/
+ mcActionSetLooping = 21, /* param is Boolean*/
+ mcActionGetLooping = 22, /* param is pointer to a Boolean*/
+ mcActionSetLoopIsPalindrome = 23, /* param is Boolean*/
+ mcActionGetLoopIsPalindrome = 24, /* param is pointer to a Boolean*/
+ mcActionSetGrowBoxBounds = 25, /* param is a Rect*/
+ mcActionControllerSizeChanged = 26, /* no param*/
+ mcActionSetSelectionBegin = 29, /* param is TimeRecord*/
+ mcActionSetSelectionDuration = 30, /* param is TimeRecord, action only taken on set-duration*/
+ mcActionSetKeysEnabled = 32, /* param is Boolean*/
+ mcActionGetKeysEnabled = 33, /* param is pointer to Boolean*/
+ mcActionSetPlaySelection = 34, /* param is Boolean*/
+ mcActionGetPlaySelection = 35, /* param is pointer to Boolean*/
+ mcActionSetUseBadge = 36, /* param is Boolean*/
+ mcActionGetUseBadge = 37, /* param is pointer to Boolean*/
+ mcActionSetFlags = 38, /* param is long of flags*/
+ mcActionGetFlags = 39, /* param is pointer to a long of flags*/
+ mcActionSetPlayEveryFrame = 40, /* param is Boolean*/
+ mcActionGetPlayEveryFrame = 41, /* param is pointer to Boolean*/
+ mcActionGetPlayRate = 42, /* param is pointer to Fixed*/
+ mcActionShowBalloon = 43, /* param is a pointer to a boolean. set to false to stop balloon*/
+ mcActionBadgeClick = 44, /* param is pointer to Boolean. set to false to ignore click*/
+ mcActionMovieClick = 45, /* param is pointer to event record. change "what" to nullEvt to kill click*/
+ mcActionSuspend = 46, /* no param*/
+ mcActionResume = 47, /* no param*/
+ mcActionSetControllerKeysEnabled = 48, /* param is Boolean*/
+ mcActionGetTimeSliderRect = 49, /* param is pointer to rect*/
+ mcActionMovieEdited = 50, /* no param*/
+ mcActionGetDragEnabled = 51, /* param is pointer to Boolean*/
+ mcActionSetDragEnabled = 52, /* param is Boolean*/
+ mcActionGetSelectionBegin = 53, /* param is TimeRecord*/
+ mcActionGetSelectionDuration = 54, /* param is TimeRecord*/
+ mcActionPrerollAndPlay = 55, /* param is Fixed, play rate*/
+ mcActionGetCursorSettingEnabled = 56, /* param is pointer to Boolean*/
+ mcActionSetCursorSettingEnabled = 57, /* param is Boolean*/
+ mcActionSetColorTable = 58, /* param is CTabHandle*/
+ mcActionLinkToURL = 59, /* param is Handle to URL*/
+ mcActionCustomButtonClick = 60, /* param is pointer to EventRecord*/
+ mcActionForceTimeTableUpdate = 61, /* no param*/
+ mcActionSetControllerTimeLimits = 62, /* param is pointer to 2 time values min/max. do no send this message to controller. used internally only.*/
+ mcActionExecuteAllActionsForQTEvent = 63, /* param is ResolvedQTEventSpecPtr*/
+ mcActionExecuteOneActionForQTEvent = 64, /* param is ResolvedQTEventSpecPtr*/
+ mcActionAdjustCursor = 65, /* param is pointer to EventRecord (WindowRef is in message parameter)*/
+ mcActionUseTrackForTimeTable = 66, /* param is pointer to {long trackID; Boolean useIt}. do not send this message to controller. */
+ mcActionClickAndHoldPoint = 67, /* param is point (local coordinates). return true if point has click & hold action (e.g., VR object movie autorotate spot)*/
+ mcActionShowMessageString = 68, /* param is a StringPtr*/
+ mcActionShowStatusString = 69, /* param is a QTStatusStringPtr*/
+ mcActionGetExternalMovie = 70, /* param is a QTGetExternalMoviePtr*/
+ mcActionGetChapterTime = 71, /* param is a QTGetChapterTimePtr*/
+ mcActionPerformActionList = 72, /* param is a QTAtomSpecPtr*/
+ mcActionEvaluateExpression = 73, /* param is a QTEvaluateExpressionPtr*/
+ mcActionFetchParameterAs = 74, /* param is a QTFetchParameterAsPtr*/
+ mcActionGetCursorByID = 75, /* param is a QTGetCursorByIDPtr*/
+ mcActionGetNextURL = 76, /* param is a Handle to URL*/
+ mcActionMovieChanged = 77,
+ mcActionDoScript = 78, /* param is QTDoScriptPtr*/
+ mcActionRestartAtTime = 79, /* param is QTResartAtTimePtr*/
+ mcActionGetIndChapter = 80, /* param is QTChapterInfoPtr*/
+ mcActionLinkToURLExtended = 81, /* param is QTAtomContainer as used by QTParseHREF*/
+ mcActionSetVolumeStep = 82, /* param is short containing amount to step volume via arrow keys - default = 64*/
+ mcActionAutoPlay = 83, /* param is Fixed, play rate*/
+ mcActionPauseToBuffer = 84, /* param is Fixed, play rate on restart*/
+ mcActionAppMessageReceived = 85, /* param is a long, application message*/
+ mcActionEvaluateExpressionWithType = 89, /* param is a QTEvaluateExpressionWithTypePtr*/
+ mcActionGetMovieName = 90, /* param is a p String Handle*/
+ mcActionGetMovieID = 91, /* param is pointer to long*/
+ mcActionGetMovieActive = 92 /* param is pointer to Boolean*/
+};
+
+typedef short mcAction;
+enum {
+ mcFlagSuppressMovieFrame = 1 << 0,
+ mcFlagSuppressStepButtons = 1 << 1,
+ mcFlagSuppressSpeakerButton = 1 << 2,
+ mcFlagsUseWindowPalette = 1 << 3,
+ mcFlagsDontInvalidate = 1 << 4,
+ mcFlagsUseCustomButton = 1 << 5
+};
+
+
+enum {
+ mcPositionDontInvalidate = 1 << 5
+};
+
+typedef unsigned long mcFlags;
+enum {
+ kMCIEEnabledButtonPicture = 1,
+ kMCIEDisabledButtonPicture = 2,
+ kMCIEDepressedButtonPicture = 3,
+ kMCIEEnabledSizeBoxPicture = 4,
+ kMCIEDisabledSizeBoxPicture = 5,
+ kMCIEEnabledUnavailableButtonPicture = 6,
+ kMCIEDisabledUnavailableButtonPicture = 7,
+ kMCIESoundSlider = 128,
+ kMCIESoundThumb = 129,
+ kMCIEColorTable = 256,
+ kMCIEIsFlatAppearance = 257,
+ kMCIEDoButtonIconsDropOnDepress = 258
+};
+
+typedef unsigned long MCInterfaceElement;
+typedef CALLBACK_API( Boolean , MCActionFilterProcPtr )(MovieController mc, short *action, void *params);
+typedef CALLBACK_API( Boolean , MCActionFilterWithRefConProcPtr )(MovieController mc, short action, void *params, long refCon);
+typedef STACK_UPP_TYPE(MCActionFilterProcPtr) MCActionFilterUPP;
+typedef STACK_UPP_TYPE(MCActionFilterWithRefConProcPtr) MCActionFilterWithRefConUPP;
+/*
+ menu related stuff
+*/
+enum {
+ mcInfoUndoAvailable = 1 << 0,
+ mcInfoCutAvailable = 1 << 1,
+ mcInfoCopyAvailable = 1 << 2,
+ mcInfoPasteAvailable = 1 << 3,
+ mcInfoClearAvailable = 1 << 4,
+ mcInfoHasSound = 1 << 5,
+ mcInfoIsPlaying = 1 << 6,
+ mcInfoIsLooping = 1 << 7,
+ mcInfoIsInPalindrome = 1 << 8,
+ mcInfoEditingEnabled = 1 << 9,
+ mcInfoMovieIsInteractive = 1 << 10
+};
+
+/* menu item codes*/
+enum {
+ mcMenuUndo = 1,
+ mcMenuCut = 3,
+ mcMenuCopy = 4,
+ mcMenuPaste = 5,
+ mcMenuClear = 6
+};
+
+/* messages to the application via mcActionAppMessageReceived*/
+enum {
+ kQTAppMessageSoftwareChanged = 1, /* notification to app that installed QuickTime software has been updated*/
+ kQTAppMessageWindowCloseRequested = 3, /* request for app to close window containing movie controller*/
+ kQTAppMessageExitFullScreenRequested = 4, /* request for app to turn off full screen mode if active*/
+ kQTAppMessageDisplayChannels = 5, /* request for app to display the channel UI*/
+ kQTAppMessageEnterFullScreenRequested = 6 /* request for app to turn on full screen mode*/
+};
+
+/* structures used as mcActionFilterProc params*/
+
+struct QTStatusStringRecord {
+ long stringTypeFlags;
+ char * statusString;
+};
+typedef struct QTStatusStringRecord QTStatusStringRecord;
+
+typedef QTStatusStringRecord * QTStatusStringPtr;
+
+struct QTGetExternalMovieRecord {
+ long targetType; /* set to kTargetMovieName or kTargetMovieID*/
+ StringPtr movieName;
+ long movieID;
+ MoviePtr theMovie;
+ MovieControllerPtr theController;
+};
+typedef struct QTGetExternalMovieRecord QTGetExternalMovieRecord;
+
+typedef QTGetExternalMovieRecord * QTGetExternalMoviePtr;
+
+struct QTGetChapterTimeRecord {
+ StringPtr chapterName;
+ TimeRecord chapterTime;
+};
+typedef struct QTGetChapterTimeRecord QTGetChapterTimeRecord;
+
+typedef QTGetChapterTimeRecord * QTGetChapterTimePtr;
+
+struct QTChapterInfoRecord {
+ long index; /* first chapter has index of 1*/
+ TimeValue time; /* -1 if no more chapters available*/
+ Str255 name;
+};
+typedef struct QTChapterInfoRecord QTChapterInfoRecord;
+
+typedef QTChapterInfoRecord * QTChapterInfoPtr;
+
+struct QTEvaluateExpressionRecord {
+ QTAtomSpec expressionSpec;
+ float * expressionResult;
+};
+typedef struct QTEvaluateExpressionRecord QTEvaluateExpressionRecord;
+
+typedef QTEvaluateExpressionRecord * QTEvaluateExpressionPtr;
+
+struct QTEvaluateExpressionWithTypeRecord {
+ long recordSize; /* Size of structure (fill in at allocation) */
+ QTAtomSpec expressionSpec;
+ float * expressionResult;
+ long fetchAsType;
+ Handle nonNumericResult;
+ /* Current size is 24 */
+};
+typedef struct QTEvaluateExpressionWithTypeRecord QTEvaluateExpressionWithTypeRecord;
+
+typedef QTEvaluateExpressionWithTypeRecord * QTEvaluateExpressionWithTypePtr;
+
+struct QTFetchParameterAsRecord {
+ QTAtomSpec paramListSpec;
+ long paramIndex;
+ long paramType;
+ long allowedFlags;
+ void * min;
+ void * max;
+ void * currentValue;
+ void * newValue;
+ Boolean isUnsignedValue;
+};
+typedef struct QTFetchParameterAsRecord QTFetchParameterAsRecord;
+
+typedef QTFetchParameterAsRecord * QTFetchParameterAsPtr;
+
+struct QTGetCursorByIDRecord {
+ short cursorID;
+ Handle colorCursorData;
+ long reserved1;
+};
+typedef struct QTGetCursorByIDRecord QTGetCursorByIDRecord;
+
+typedef QTGetCursorByIDRecord * QTGetCursorByIDPtr;
+
+struct QTDoScriptRecord {
+ long scriptTypeFlags;
+ char * command;
+ char * arguments;
+};
+typedef struct QTDoScriptRecord QTDoScriptRecord;
+
+typedef QTDoScriptRecord * QTDoScriptPtr;
+
+struct QTRestartAtTimeRecord {
+ TimeValue startTime; /* time scale is the movie timescale*/
+ Fixed rate; /* if rate is zero, the movie's current rate is maintained*/
+};
+typedef struct QTRestartAtTimeRecord QTRestartAtTimeRecord;
+
+typedef QTRestartAtTimeRecord * QTRestartAtTimePtr;
+/* values for paramType field of QTFetchParameterAsRecord*/
+enum {
+ kFetchAsBooleanPtr = 1,
+ kFetchAsShortPtr = 2,
+ kFetchAsLongPtr = 3,
+ kFetchAsMatrixRecordPtr = 4,
+ kFetchAsModifierTrackGraphicsModeRecord = 5,
+ kFetchAsHandle = 6,
+ kFetchAsStr255 = 7,
+ kFetchAsFloatPtr = 8,
+ kFetchAsPointPtr = 9,
+ kFetchAsNewAtomContainer = 10,
+ kFetchAsQTEventRecordPtr = 11,
+ kFetchAsFixedPtr = 12,
+ kFetchAsSetControllerValuePtr = 13,
+ kFetchAsRgnHandle = 14, /* flipped to native*/
+ kFetchAsComponentDescriptionPtr = 15,
+ kFetchAsCString = 16
+};
+
+enum {
+ kQTCursorOpenHand = -19183,
+ kQTCursorClosedHand = -19182,
+ kQTCursorPointingHand = -19181,
+ kQTCursorRightArrow = -19180,
+ kQTCursorLeftArrow = -19179,
+ kQTCursorDownArrow = -19178,
+ kQTCursorUpArrow = -19177,
+ kQTCursorIBeam = -19176
+};
+
+
+
+
+
+
+/* target management */
+EXTERN_API( ComponentResult )
+MCSetMovie (MovieController mc,
+ Movie theMovie,
+ WindowRef movieWindow,
+ Point where) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0002, 0x7000, 0xA82A);
+
+EXTERN_API( Movie )
+MCGetIndMovie (MovieController mc,
+ short index) FIVEWORDINLINE(0x2F3C, 0x0002, 0x0005, 0x7000, 0xA82A);
+
+
+#define MCGetMovie(mc) MCGetIndMovie(mc, 0)
+EXTERN_API( ComponentResult )
+MCRemoveAllMovies (MovieController mc) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0006, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MCRemoveAMovie (MovieController mc,
+ Movie m) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0003, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MCRemoveMovie (MovieController mc) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0006, 0x7000, 0xA82A);
+
+/* event handling etc. */
+EXTERN_API( ComponentResult )
+MCIsPlayerEvent (MovieController mc,
+ const EventRecord * e) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0007, 0x7000, 0xA82A);
+
+/* obsolete. use MCSetActionFilterWithRefCon instead. */
+EXTERN_API( ComponentResult )
+MCSetActionFilter (MovieController mc,
+ MCActionFilterUPP blob) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0008, 0x7000, 0xA82A);
+
+/*
+ proc is of the form:
+ Boolean userPlayerFilter(MovieController mc, short *action, void *params) =
+ proc returns TRUE if it handles the action, FALSE if not
+ action is passed as a VAR so that it could be changed by filter
+ this is consistent with the current dialog manager stuff
+ params is any potential parameters that go with the action
+ such as set playback rate to xxx.
+*/
+EXTERN_API( ComponentResult )
+MCDoAction (MovieController mc,
+ short action,
+ void * params) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0009, 0x7000, 0xA82A);
+
+/* state type things */
+EXTERN_API( ComponentResult )
+MCSetControllerAttached (MovieController mc,
+ Boolean attach) FIVEWORDINLINE(0x2F3C, 0x0002, 0x000A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MCIsControllerAttached (MovieController mc) FIVEWORDINLINE(0x2F3C, 0x0000, 0x000B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MCSetControllerPort (MovieController mc,
+ CGrafPtr gp) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000C, 0x7000, 0xA82A);
+
+EXTERN_API( CGrafPtr )
+MCGetControllerPort (MovieController mc) FIVEWORDINLINE(0x2F3C, 0x0000, 0x000D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MCSetVisible (MovieController mc,
+ Boolean visible) FIVEWORDINLINE(0x2F3C, 0x0002, 0x000E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MCGetVisible (MovieController mc) FIVEWORDINLINE(0x2F3C, 0x0000, 0x000F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MCGetControllerBoundsRect (MovieController mc,
+ Rect * bounds) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0010, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MCSetControllerBoundsRect (MovieController mc,
+ const Rect * bounds) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0011, 0x7000, 0xA82A);
+
+EXTERN_API( RgnHandle )
+MCGetControllerBoundsRgn (MovieController mc) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0012, 0x7000, 0xA82A);
+
+EXTERN_API( RgnHandle )
+MCGetWindowRgn (MovieController mc,
+ WindowRef w) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0013, 0x7000, 0xA82A);
+
+
+/* other stuff */
+EXTERN_API( ComponentResult )
+MCMovieChanged (MovieController mc,
+ Movie m) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0014, 0x7000, 0xA82A);
+
+
+/*
+ called when the app has changed thing about the movie (like bounding rect) or rate. So that we
+ can update our graphical (and internal) state accordingly.
+*/
+EXTERN_API( ComponentResult )
+MCSetDuration (MovieController mc,
+ TimeValue duration) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0015, 0x7000, 0xA82A);
+
+/*
+ duration to use for time slider -- will be reset next time MCMovieChanged is called
+ or MCSetMovie is called
+*/
+EXTERN_API( TimeValue )
+MCGetCurrentTime (MovieController mc,
+ TimeScale * scale) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0016, 0x7000, 0xA82A);
+
+/*
+ returns the time value and the time scale it is on. if there are no movies, the
+ time scale is passed back as 0. scale is an optional parameter
+
+*/
+EXTERN_API( ComponentResult )
+MCNewAttachedController (MovieController mc,
+ Movie theMovie,
+ WindowRef w,
+ Point where) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0017, 0x7000, 0xA82A);
+
+/*
+ makes theMovie the only movie attached to the controller. makes the controller visible.
+ the window and where parameters are passed a long to MCSetMovie and behave as
+ described there
+*/
+EXTERN_API( ComponentResult )
+MCDraw (MovieController mc,
+ WindowRef w) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0018, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MCActivate (MovieController mc,
+ WindowRef w,
+ Boolean activate) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0019, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MCIdle (MovieController mc) FIVEWORDINLINE(0x2F3C, 0x0000, 0x001A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MCKey (MovieController mc,
+ SInt8 key,
+ long modifiers) FIVEWORDINLINE(0x2F3C, 0x0006, 0x001B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MCClick (MovieController mc,
+ WindowRef w,
+ Point where,
+ long when,
+ long modifiers) FIVEWORDINLINE(0x2F3C, 0x0010, 0x001C, 0x7000, 0xA82A);
+
+
+/*
+ calls for editing
+*/
+EXTERN_API( ComponentResult )
+MCEnableEditing (MovieController mc,
+ Boolean enabled) FIVEWORDINLINE(0x2F3C, 0x0002, 0x001D, 0x7000, 0xA82A);
+
+EXTERN_API( long )
+MCIsEditingEnabled (MovieController mc) FIVEWORDINLINE(0x2F3C, 0x0000, 0x001E, 0x7000, 0xA82A);
+
+EXTERN_API( Movie )
+MCCopy (MovieController mc) FIVEWORDINLINE(0x2F3C, 0x0000, 0x001F, 0x7000, 0xA82A);
+
+EXTERN_API( Movie )
+MCCut (MovieController mc) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0020, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MCPaste (MovieController mc,
+ Movie srcMovie) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0021, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MCClear (MovieController mc) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0022, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MCUndo (MovieController mc) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0023, 0x7000, 0xA82A);
+
+
+/*
+ * somewhat special stuff
+ */
+EXTERN_API( ComponentResult )
+MCPositionController (MovieController mc,
+ const Rect * movieRect,
+ const Rect * controllerRect,
+ long someFlags) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0024, 0x7000, 0xA82A);
+
+
+EXTERN_API( ComponentResult )
+MCGetControllerInfo (MovieController mc,
+ long * someFlags) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0025, 0x7000, 0xA82A);
+
+
+
+EXTERN_API( ComponentResult )
+MCSetClip (MovieController mc,
+ RgnHandle theClip,
+ RgnHandle movieClip) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0028, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MCGetClip (MovieController mc,
+ RgnHandle * theClip,
+ RgnHandle * movieClip) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0029, 0x7000, 0xA82A);
+
+
+EXTERN_API( ComponentResult )
+MCDrawBadge (MovieController mc,
+ RgnHandle movieRgn,
+ RgnHandle * badgeRgn) FIVEWORDINLINE(0x2F3C, 0x0008, 0x002A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MCSetUpEditMenu (MovieController mc,
+ long modifiers,
+ MenuRef mh) FIVEWORDINLINE(0x2F3C, 0x0008, 0x002B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MCGetMenuString (MovieController mc,
+ long modifiers,
+ short item,
+ Str255 aString) FIVEWORDINLINE(0x2F3C, 0x000A, 0x002C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MCSetActionFilterWithRefCon (MovieController mc,
+ MCActionFilterWithRefConUPP blob,
+ long refCon) FIVEWORDINLINE(0x2F3C, 0x0008, 0x002D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MCPtInController (MovieController mc,
+ Point thePt,
+ Boolean * inController) FIVEWORDINLINE(0x2F3C, 0x0008, 0x002E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MCInvalidate (MovieController mc,
+ WindowRef w,
+ RgnHandle invalidRgn) FIVEWORDINLINE(0x2F3C, 0x0008, 0x002F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MCAdjustCursor (MovieController mc,
+ WindowRef w,
+ Point where,
+ long modifiers) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0030, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MCGetInterfaceElement (MovieController mc,
+ MCInterfaceElement whichElement,
+ void * element) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0031, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MCGetDoActionsProc (MovieController mc,
+ DoMCActionUPP * doMCActionProc,
+ long * doMCActionRefCon) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0032, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MCAddMovieSegment (MovieController mc,
+ Movie srcMovie,
+ Boolean scaled) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0033, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MCTrimMovieSegment (MovieController mc) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0034, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MCSetIdleManager (MovieController mc,
+ IdleManager im) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0035, 0x7000, 0xA82A);
+
+/* Called (but not implemented) by controllers that derive from the standard movie controller.
+ All controllers except standard movie controller must delegate this call. */
+enum {
+ kControllerUnderstandsIdleManagers = 1 << 0
+};
+
+EXTERN_API( ComponentResult )
+MCSetControllerCapabilities (MovieController mc,
+ long flags,
+ long flagsMask) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0036, 0x7000, 0xA82A);
+
+
+
+
+
+/****************************************
+* *
+* T I M E B A S E *
+* *
+****************************************/
+EXTERN_API( TimeBase )
+NewTimeBase (void) THREEWORDINLINE(0x303C, 0x00A5, 0xAAAA);
+
+EXTERN_API( void )
+DisposeTimeBase (TimeBase tb) THREEWORDINLINE(0x303C, 0x00B6, 0xAAAA);
+
+EXTERN_API( TimeValue )
+GetTimeBaseTime (TimeBase tb,
+ TimeScale s,
+ TimeRecord * tr) THREEWORDINLINE(0x303C, 0x00A6, 0xAAAA);
+
+EXTERN_API( void )
+SetTimeBaseTime (TimeBase tb,
+ const TimeRecord * tr) THREEWORDINLINE(0x303C, 0x00A7, 0xAAAA);
+
+EXTERN_API( void )
+SetTimeBaseValue (TimeBase tb,
+ TimeValue t,
+ TimeScale s) THREEWORDINLINE(0x303C, 0x00A8, 0xAAAA);
+
+EXTERN_API( Fixed )
+GetTimeBaseRate (TimeBase tb) THREEWORDINLINE(0x303C, 0x00A9, 0xAAAA);
+
+EXTERN_API( void )
+SetTimeBaseRate (TimeBase tb,
+ Fixed r) THREEWORDINLINE(0x303C, 0x00AA, 0xAAAA);
+
+EXTERN_API( TimeValue )
+GetTimeBaseStartTime (TimeBase tb,
+ TimeScale s,
+ TimeRecord * tr) THREEWORDINLINE(0x303C, 0x00AB, 0xAAAA);
+
+EXTERN_API( void )
+SetTimeBaseStartTime (TimeBase tb,
+ const TimeRecord * tr) THREEWORDINLINE(0x303C, 0x00AC, 0xAAAA);
+
+EXTERN_API( TimeValue )
+GetTimeBaseStopTime (TimeBase tb,
+ TimeScale s,
+ TimeRecord * tr) THREEWORDINLINE(0x303C, 0x00AD, 0xAAAA);
+
+EXTERN_API( void )
+SetTimeBaseStopTime (TimeBase tb,
+ const TimeRecord * tr) THREEWORDINLINE(0x303C, 0x00AE, 0xAAAA);
+
+EXTERN_API( long )
+GetTimeBaseFlags (TimeBase tb) THREEWORDINLINE(0x303C, 0x00B1, 0xAAAA);
+
+EXTERN_API( void )
+SetTimeBaseFlags (TimeBase tb,
+ long timeBaseFlags) THREEWORDINLINE(0x303C, 0x00B2, 0xAAAA);
+
+EXTERN_API( void )
+SetTimeBaseMasterTimeBase (TimeBase slave,
+ TimeBase master,
+ const TimeRecord * slaveZero) THREEWORDINLINE(0x303C, 0x00B4, 0xAAAA);
+
+EXTERN_API( TimeBase )
+GetTimeBaseMasterTimeBase (TimeBase tb) THREEWORDINLINE(0x303C, 0x00AF, 0xAAAA);
+
+EXTERN_API( void )
+SetTimeBaseMasterClock (TimeBase slave,
+ Component clockMeister,
+ const TimeRecord * slaveZero) THREEWORDINLINE(0x303C, 0x00B3, 0xAAAA);
+
+EXTERN_API( ComponentInstance )
+GetTimeBaseMasterClock (TimeBase tb) THREEWORDINLINE(0x303C, 0x00B0, 0xAAAA);
+
+EXTERN_API( void )
+ConvertTime (TimeRecord * inout,
+ TimeBase newBase) THREEWORDINLINE(0x303C, 0x00B5, 0xAAAA);
+
+EXTERN_API( void )
+ConvertTimeScale (TimeRecord * inout,
+ TimeScale newScale) THREEWORDINLINE(0x303C, 0x00B7, 0xAAAA);
+
+EXTERN_API( void )
+AddTime (TimeRecord * dst,
+ const TimeRecord * src) THREEWORDINLINE(0x303C, 0x010C, 0xAAAA);
+
+EXTERN_API( void )
+SubtractTime (TimeRecord * dst,
+ const TimeRecord * src) THREEWORDINLINE(0x303C, 0x010D, 0xAAAA);
+
+EXTERN_API( long )
+GetTimeBaseStatus (TimeBase tb,
+ TimeRecord * unpinnedTime) THREEWORDINLINE(0x303C, 0x010B, 0xAAAA);
+
+EXTERN_API( void )
+SetTimeBaseZero (TimeBase tb,
+ TimeRecord * zero) THREEWORDINLINE(0x303C, 0x0128, 0xAAAA);
+
+EXTERN_API( Fixed )
+GetTimeBaseEffectiveRate (TimeBase tb) THREEWORDINLINE(0x303C, 0x0124, 0xAAAA);
+
+
+/****************************************
+* *
+* C A L L B A C K *
+* *
+****************************************/
+EXTERN_API( QTCallBack )
+NewCallBack (TimeBase tb,
+ short cbType) THREEWORDINLINE(0x303C, 0x00EB, 0xAAAA);
+
+EXTERN_API( void )
+DisposeCallBack (QTCallBack cb) THREEWORDINLINE(0x303C, 0x00EC, 0xAAAA);
+
+EXTERN_API( short )
+GetCallBackType (QTCallBack cb) THREEWORDINLINE(0x303C, 0x00ED, 0xAAAA);
+
+EXTERN_API( TimeBase )
+GetCallBackTimeBase (QTCallBack cb) THREEWORDINLINE(0x303C, 0x00EE, 0xAAAA);
+
+EXTERN_API( OSErr )
+CallMeWhen (QTCallBack cb,
+ QTCallBackUPP callBackProc,
+ long refCon,
+ long param1,
+ long param2,
+ long param3) THREEWORDINLINE(0x303C, 0x00B8, 0xAAAA);
+
+EXTERN_API( void )
+CancelCallBack (QTCallBack cb) THREEWORDINLINE(0x303C, 0x00B9, 0xAAAA);
+
+
+/****************************************
+* *
+* C L O C K C A L L B A C K *
+* S U P P O R T *
+* *
+****************************************/
+EXTERN_API( OSErr )
+AddCallBackToTimeBase (QTCallBack cb) THREEWORDINLINE(0x303C, 0x0129, 0xAAAA);
+
+EXTERN_API( OSErr )
+RemoveCallBackFromTimeBase (QTCallBack cb) THREEWORDINLINE(0x303C, 0x012A, 0xAAAA);
+
+EXTERN_API( QTCallBack )
+GetFirstCallBack (TimeBase tb) THREEWORDINLINE(0x303C, 0x012B, 0xAAAA);
+
+EXTERN_API( QTCallBack )
+GetNextCallBack (QTCallBack cb) THREEWORDINLINE(0x303C, 0x012C, 0xAAAA);
+
+EXTERN_API( void )
+ExecuteCallBack (QTCallBack cb) THREEWORDINLINE(0x303C, 0x012D, 0xAAAA);
+
+
+
+
+
+
+EXTERN_API( ComponentResult )
+MusicMediaGetIndexedTunePlayer (ComponentInstance ti,
+ long sampleDescIndex,
+ ComponentInstance * tp) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0101, 0x7000, 0xA82A);
+
+
+/* UPP call backs */
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(MCActionFilterUPP)
+ NewMCActionFilterUPP (MCActionFilterProcPtr userRoutine);
+
+ EXTERN_API(MCActionFilterWithRefConUPP)
+ NewMCActionFilterWithRefConUPP (MCActionFilterWithRefConProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeMCActionFilterUPP (MCActionFilterUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeMCActionFilterWithRefConUPP (MCActionFilterWithRefConUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeMCActionFilterUPP (MovieController mc,
+ short * action,
+ void * params,
+ MCActionFilterUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeMCActionFilterWithRefConUPP (MovieController mc,
+ short action,
+ void * params,
+ long refCon,
+ MCActionFilterWithRefConUPP userUPP);
+
+#else
+ enum { uppMCActionFilterProcInfo = 0x00000FD0 }; /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppMCActionFilterWithRefConProcInfo = 0x00003ED0 }; /* pascal 1_byte Func(4_bytes, 2_bytes, 4_bytes, 4_bytes) */
+ #define NewMCActionFilterUPP(userRoutine) (MCActionFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMCActionFilterProcInfo, GetCurrentArchitecture())
+ #define NewMCActionFilterWithRefConUPP(userRoutine) (MCActionFilterWithRefConUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMCActionFilterWithRefConProcInfo, GetCurrentArchitecture())
+ #define DisposeMCActionFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeMCActionFilterWithRefConUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeMCActionFilterUPP(mc, action, params, userUPP) (Boolean)CALL_THREE_PARAMETER_UPP((userUPP), uppMCActionFilterProcInfo, (mc), (action), (params))
+ #define InvokeMCActionFilterWithRefConUPP(mc, action, params, refCon, userUPP) (Boolean)CALL_FOUR_PARAMETER_UPP((userUPP), uppMCActionFilterWithRefConProcInfo, (mc), (action), (params), (refCon))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewMCActionFilterProc(userRoutine) NewMCActionFilterUPP(userRoutine)
+#define NewMCActionFilterWithRefConProc(userRoutine) NewMCActionFilterWithRefConUPP(userRoutine)
+#define CallMCActionFilterProc(userRoutine, mc, action, params) InvokeMCActionFilterUPP(mc, action, params, userRoutine)
+#define CallMCActionFilterWithRefConProc(userRoutine, mc, action, params, refCon) InvokeMCActionFilterWithRefConUPP(mc, action, params, refCon, userRoutine)
+
+/* selectors for component calls */
+enum {
+ kVideoMediaResetStatisticsSelect = 0x0105,
+ kVideoMediaGetStatisticsSelect = 0x0106,
+ kVideoMediaGetStallCountSelect = 0x010E,
+ kVideoMediaSetCodecParameterSelect = 0x010F,
+ kVideoMediaGetCodecParameterSelect = 0x0110,
+ kTextMediaSetTextProcSelect = 0x0101,
+ kTextMediaAddTextSampleSelect = 0x0102,
+ kTextMediaAddTESampleSelect = 0x0103,
+ kTextMediaAddHiliteSampleSelect = 0x0104,
+ kTextMediaDrawRawSelect = 0x0109,
+ kTextMediaSetTextPropertySelect = 0x010A,
+ kTextMediaRawSetupSelect = 0x010B,
+ kTextMediaRawIdleSelect = 0x010C,
+ kTextMediaGetTextPropertySelect = 0x010D,
+ kTextMediaFindNextTextSelect = 0x0105,
+ kTextMediaHiliteTextSampleSelect = 0x0106,
+ kTextMediaSetTextSampleDataSelect = 0x0107,
+ kSpriteMediaSetPropertySelect = 0x0101,
+ kSpriteMediaGetPropertySelect = 0x0102,
+ kSpriteMediaHitTestSpritesSelect = 0x0103,
+ kSpriteMediaCountSpritesSelect = 0x0104,
+ kSpriteMediaCountImagesSelect = 0x0105,
+ kSpriteMediaGetIndImageDescriptionSelect = 0x0106,
+ kSpriteMediaGetDisplayedSampleNumberSelect = 0x0107,
+ kSpriteMediaGetSpriteNameSelect = 0x0108,
+ kSpriteMediaGetImageNameSelect = 0x0109,
+ kSpriteMediaSetSpritePropertySelect = 0x010A,
+ kSpriteMediaGetSpritePropertySelect = 0x010B,
+ kSpriteMediaHitTestAllSpritesSelect = 0x010C,
+ kSpriteMediaHitTestOneSpriteSelect = 0x010D,
+ kSpriteMediaSpriteIndexToIDSelect = 0x010E,
+ kSpriteMediaSpriteIDToIndexSelect = 0x010F,
+ kSpriteMediaGetSpriteActionsForQTEventSelect = 0x0110,
+ kSpriteMediaSetActionVariableSelect = 0x0111,
+ kSpriteMediaGetActionVariableSelect = 0x0112,
+ kSpriteMediaGetIndImagePropertySelect = 0x0113,
+ kSpriteMediaNewSpriteSelect = 0x0114,
+ kSpriteMediaDisposeSpriteSelect = 0x0115,
+ kSpriteMediaSetActionVariableToStringSelect = 0x0116,
+ kSpriteMediaGetActionVariableAsStringSelect = 0x0117,
+ kSpriteMediaNewImageSelect = 0x011B,
+ kSpriteMediaDisposeImageSelect = 0x011C,
+ kSpriteMediaImageIndexToIDSelect = 0x011D,
+ kSpriteMediaImageIDToIndexSelect = 0x011E,
+ kFlashMediaSetPanSelect = 0x0101,
+ kFlashMediaSetZoomSelect = 0x0102,
+ kFlashMediaSetZoomRectSelect = 0x0103,
+ kFlashMediaGetRefConBoundsSelect = 0x0104,
+ kFlashMediaGetRefConIDSelect = 0x0105,
+ kFlashMediaIDToRefConSelect = 0x0106,
+ kFlashMediaGetDisplayedFrameNumberSelect = 0x0107,
+ kFlashMediaFrameNumberToMovieTimeSelect = 0x0108,
+ kFlashMediaFrameLabelToMovieTimeSelect = 0x0109,
+ kFlashMediaGetFlashVariableSelect = 0x010A,
+ kFlashMediaSetFlashVariableSelect = 0x010B,
+ kFlashMediaDoButtonActionsSelect = 0x010C,
+ kFlashMediaGetSupportedSwfVersionSelect = 0x010D,
+ kMovieMediaGetChildDoMCActionCallbackSelect = 0x0102,
+ kMovieMediaGetDoMCActionCallbackSelect = 0x0103,
+ kMovieMediaGetCurrentMoviePropertySelect = 0x0104,
+ kMovieMediaGetCurrentTrackPropertySelect = 0x0105,
+ kMovieMediaGetChildMovieDataReferenceSelect = 0x0106,
+ kMovieMediaSetChildMovieDataReferenceSelect = 0x0107,
+ kMovieMediaLoadChildMovieFromDataReferenceSelect = 0x0108,
+ kMedia3DGetNamedObjectListSelect = 0x0101,
+ kMedia3DGetRendererListSelect = 0x0102,
+ kMedia3DGetCurrentGroupSelect = 0x0103,
+ kMedia3DTranslateNamedObjectToSelect = 0x0104,
+ kMedia3DScaleNamedObjectToSelect = 0x0105,
+ kMedia3DRotateNamedObjectToSelect = 0x0106,
+ kMedia3DSetCameraDataSelect = 0x0107,
+ kMedia3DGetCameraDataSelect = 0x0108,
+ kMedia3DSetCameraAngleAspectSelect = 0x0109,
+ kMedia3DGetCameraAngleAspectSelect = 0x010A,
+ kMedia3DSetCameraRangeSelect = 0x010D,
+ kMedia3DGetCameraRangeSelect = 0x010E,
+ kMedia3DGetViewObjectSelect = 0x010F,
+ kMCSetMovieSelect = 0x0002,
+ kMCGetIndMovieSelect = 0x0005,
+ kMCRemoveAllMoviesSelect = 0x0006,
+ kMCRemoveAMovieSelect = 0x0003,
+ kMCRemoveMovieSelect = 0x0006,
+ kMCIsPlayerEventSelect = 0x0007,
+ kMCSetActionFilterSelect = 0x0008,
+ kMCDoActionSelect = 0x0009,
+ kMCSetControllerAttachedSelect = 0x000A,
+ kMCIsControllerAttachedSelect = 0x000B,
+ kMCSetControllerPortSelect = 0x000C,
+ kMCGetControllerPortSelect = 0x000D,
+ kMCSetVisibleSelect = 0x000E,
+ kMCGetVisibleSelect = 0x000F,
+ kMCGetControllerBoundsRectSelect = 0x0010,
+ kMCSetControllerBoundsRectSelect = 0x0011,
+ kMCGetControllerBoundsRgnSelect = 0x0012,
+ kMCGetWindowRgnSelect = 0x0013,
+ kMCMovieChangedSelect = 0x0014,
+ kMCSetDurationSelect = 0x0015,
+ kMCGetCurrentTimeSelect = 0x0016,
+ kMCNewAttachedControllerSelect = 0x0017,
+ kMCDrawSelect = 0x0018,
+ kMCActivateSelect = 0x0019,
+ kMCIdleSelect = 0x001A,
+ kMCKeySelect = 0x001B,
+ kMCClickSelect = 0x001C,
+ kMCEnableEditingSelect = 0x001D,
+ kMCIsEditingEnabledSelect = 0x001E,
+ kMCCopySelect = 0x001F,
+ kMCCutSelect = 0x0020,
+ kMCPasteSelect = 0x0021,
+ kMCClearSelect = 0x0022,
+ kMCUndoSelect = 0x0023,
+ kMCPositionControllerSelect = 0x0024,
+ kMCGetControllerInfoSelect = 0x0025,
+ kMCSetClipSelect = 0x0028,
+ kMCGetClipSelect = 0x0029,
+ kMCDrawBadgeSelect = 0x002A,
+ kMCSetUpEditMenuSelect = 0x002B,
+ kMCGetMenuStringSelect = 0x002C,
+ kMCSetActionFilterWithRefConSelect = 0x002D,
+ kMCPtInControllerSelect = 0x002E,
+ kMCInvalidateSelect = 0x002F,
+ kMCAdjustCursorSelect = 0x0030,
+ kMCGetInterfaceElementSelect = 0x0031,
+ kMCGetDoActionsProcSelect = 0x0032,
+ kMCAddMovieSegmentSelect = 0x0033,
+ kMCTrimMovieSegmentSelect = 0x0034,
+ kMCSetIdleManagerSelect = 0x0035,
+ kMCSetControllerCapabilitiesSelect = 0x0036,
+ kMusicMediaGetIndexedTunePlayerSelect = 0x0101
+};
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MOVIES__ */
+
diff --git a/include/qt/MoviesFormat.h b/include/qt/MoviesFormat.h
new file mode 100644
index 000000000..502977893
--- /dev/null
+++ b/include/qt/MoviesFormat.h
@@ -0,0 +1,803 @@
+/*
+ File: MoviesFormat.h
+
+ Contains: QuickTime Interfaces.
+
+ Version: Technology: QuickTime 6.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1990-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __MOVIESFORMAT__
+#define __MOVIESFORMAT__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MOVIES__
+#include "Movies.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ kMovieVersion = 0 /* version number of the format here described */
+};
+
+/****************************************
+*
+* General Types -
+* These types are used in more than one of the
+* directory types.
+*
+****************************************/
+/* MoviesUserData is the type used for user data in movie and track directories */
+
+struct MoviesUserData {
+ long size; /* size of this user data */
+ long udType; /* type of user data */
+ char data[1]; /* the user data */
+};
+typedef struct MoviesUserData MoviesUserData;
+
+struct UserDataAtom {
+ long size;
+ long atomType;
+ MoviesUserData userData[1];
+};
+typedef struct UserDataAtom UserDataAtom;
+/* MoviesDataDescription tells us where the data for the movie or track lives.
+ The data can follow the directory, be in the datafork of the same file as the directory resource,
+ be in the resource fork of the same file as the directory resource, be in another file in the
+ data fork or resource fork, or require a specific bottleneck to fetch the data. */
+/****************************************
+*
+* MediaDirectory information -
+* The MediaDirectory is tightly coupled to the data.
+*
+****************************************/
+
+
+struct SampleDescriptionAtom {
+ long size;
+ long atomType; /* = 'stsd' */
+ long flags; /* 1 byte of version / 3 bytes of flags */
+ long numEntries;
+ SampleDescription sampleDescTable[1];
+};
+typedef struct SampleDescriptionAtom SampleDescriptionAtom;
+/* TimeToSampleNum maps physical sample time to physical sample number. */
+
+struct TimeToSampleNum {
+ long sampleCount;
+ TimeValue sampleDuration;
+};
+typedef struct TimeToSampleNum TimeToSampleNum;
+
+struct TimeToSampleNumAtom {
+ long size;
+ long atomType; /* = 'stts' */
+ long flags; /* 1 byte of version / 3 bytes of flags */
+ long numEntries;
+ TimeToSampleNum timeToSampleNumTable[1];
+};
+typedef struct TimeToSampleNumAtom TimeToSampleNumAtom;
+/* SyncSamples is a list of the physical samples which are self contained. */
+
+struct SyncSampleAtom {
+ long size;
+ long atomType; /* = 'stss' */
+ long flags; /* 1 byte of version / 3 bytes of flags */
+ long numEntries;
+ long syncSampleTable[1];
+};
+typedef struct SyncSampleAtom SyncSampleAtom;
+/* SampleToChunk maps physical sample number to chunk number. */
+/* same as SampleToChunk, but redundant first sample is removed */
+
+struct SampleToChunk {
+ long firstChunk;
+ long samplesPerChunk;
+ long sampleDescriptionID;
+};
+typedef struct SampleToChunk SampleToChunk;
+
+struct SampleToChunkAtom {
+ long size;
+ long atomType; /* = 'stsc' */
+ long flags; /* 1 byte of version / 3 bytes of flags */
+ long numEntries;
+ SampleToChunk sampleToChunkTable[1];
+};
+typedef struct SampleToChunkAtom SampleToChunkAtom;
+
+struct ChunkOffsetAtom {
+ long size;
+ long atomType; /* = 'stco' */
+ long flags; /* 1 byte of version / 3 bytes of flags */
+ long numEntries;
+ long chunkOffsetTable[1];
+};
+typedef struct ChunkOffsetAtom ChunkOffsetAtom;
+
+struct SampleSizeAtom {
+ long size;
+ long atomType; /* = 'stsz' */
+ long flags; /* 1 byte of version / 3 bytes of flags */
+ long sampleSize;
+ long numEntries;
+ long sampleSizeTable[1];
+};
+typedef struct SampleSizeAtom SampleSizeAtom;
+
+struct ShadowSync {
+ long fdSampleNum;
+ long syncSampleNum;
+};
+typedef struct ShadowSync ShadowSync;
+
+struct ShadowSyncAtom {
+ long size;
+ long atomType; /* = 'stsz' */
+ long flags; /* 1 byte of version / 3 bytes of flags */
+ long numEntries;
+ ShadowSync shadowSyncTable[1];
+};
+typedef struct ShadowSyncAtom ShadowSyncAtom;
+
+struct SampleTableAtom {
+ long size;
+ long atomType; /* = 'stbl' */
+
+ SampleDescriptionAtom sampleDescription;
+ TimeToSampleNumAtom timeToSampleNum;
+ SampleToChunkAtom sampleToChunk;
+ SyncSampleAtom syncSample;
+ SampleSizeAtom sampleSize;
+ ChunkOffsetAtom chunkOffset;
+ ShadowSyncAtom shadowSync;
+};
+typedef struct SampleTableAtom SampleTableAtom;
+
+struct PublicHandlerInfo {
+ long flags; /* 1 byte of version / 3 bytes of flags */
+
+ long componentType;
+ long componentSubType;
+ long componentManufacturer;
+ long componentFlags;
+ long componentFlagsMask;
+ char componentName[1];
+};
+typedef struct PublicHandlerInfo PublicHandlerInfo;
+
+struct HandlerAtom {
+ long size;
+ long atomType; /* = 'hdlr' */
+
+ PublicHandlerInfo hInfo;
+};
+typedef struct HandlerAtom HandlerAtom;
+/* a data reference is a private structure */
+
+typedef long DataRefAtom;
+
+struct DataInfoAtom {
+ long size;
+ long atomType; /* = 'dinf' */
+
+ DataRefAtom dataRef;
+};
+typedef struct DataInfoAtom DataInfoAtom;
+
+struct RgnAtom {
+ long size;
+ long atomType;
+
+ short rgnSize;
+ Rect rgnBBox;
+ char data[1];
+};
+typedef struct RgnAtom RgnAtom;
+
+struct MatteCompressedAtom {
+ long size;
+ long atomType;
+
+ long flags; /* 1 byte of version / 3 bytes of flags */
+
+ ImageDescription matteImageDescription;
+
+ char matteData[1];
+};
+typedef struct MatteCompressedAtom MatteCompressedAtom;
+
+struct MatteAtom {
+ long size;
+ long atomType;
+
+ MatteCompressedAtom aCompressedMatte;
+};
+typedef struct MatteAtom MatteAtom;
+
+struct ClippingAtom {
+ long size;
+ long atomType;
+
+ RgnAtom aRgnClip;
+};
+typedef struct ClippingAtom ClippingAtom;
+/***********************
+* Media Info Example Structures
+***********************/
+
+
+struct VideoMediaInfoHeader {
+ long flags; /* 1 byte of version / 3 bytes of flags */
+
+ short graphicsMode; /* for QD - transfer mode */
+ short opColorRed; /* opcolor for transfer mode */
+ short opColorGreen;
+ short opColorBlue;
+};
+typedef struct VideoMediaInfoHeader VideoMediaInfoHeader;
+
+struct VideoMediaInfoHeaderAtom {
+ long size; /* size of Media info */
+ long atomType; /* = 'vmhd' */
+ VideoMediaInfoHeader vmiHeader;
+};
+typedef struct VideoMediaInfoHeaderAtom VideoMediaInfoHeaderAtom;
+
+struct VideoMediaInfo {
+ long size; /* size of Media info */
+ long atomType; /* = 'minf' */
+
+ VideoMediaInfoHeaderAtom header;
+
+ HandlerAtom dataHandler;
+
+ DataInfoAtom dataInfo;
+
+ SampleTableAtom sampleTable;
+};
+typedef struct VideoMediaInfo VideoMediaInfo;
+
+struct SoundMediaInfoHeader {
+ long flags; /* 1 byte of version / 3 bytes of flags */
+
+ short balance;
+ short rsrvd;
+};
+typedef struct SoundMediaInfoHeader SoundMediaInfoHeader;
+
+struct SoundMediaInfoHeaderAtom {
+ long size; /* size of Media info */
+ long atomType; /* = 'vmhd' */
+
+ SoundMediaInfoHeader smiHeader;
+};
+typedef struct SoundMediaInfoHeaderAtom SoundMediaInfoHeaderAtom;
+
+struct SoundMediaInfo {
+ long size; /* size of Media info */
+ long atomType; /* = 'minf' */
+
+ SoundMediaInfoHeaderAtom header;
+
+ HandlerAtom dataHandler;
+
+ DataRefAtom dataReference;
+
+ SampleTableAtom sampleTable;
+};
+typedef struct SoundMediaInfo SoundMediaInfo;
+/* whatever data the media handler needs goes after the atomType */
+
+struct MediaInfo {
+ long size;
+ long atomType;
+};
+typedef struct MediaInfo MediaInfo;
+/***********************
+* Media Directory Structures
+***********************/
+
+struct MediaHeader {
+ long flags; /* 1 byte of version / 3 bytes of flags */
+
+ long creationTime; /* seconds since Jan 1904 when directory was created */
+ long modificationTime; /* seconds since Jan 1904 when directory was appended */
+
+ TimeValue timeScale; /* start time for Media (Media time) */
+ TimeValue duration; /* length of Media (Media time) */
+
+ short language;
+ short quality;
+};
+typedef struct MediaHeader MediaHeader;
+
+struct MediaHeaderAtom {
+ long size;
+ long atomType;
+
+ MediaHeader header;
+};
+typedef struct MediaHeaderAtom MediaHeaderAtom;
+
+struct MediaDirectory {
+ long size;
+ long atomType; /* = 'mdia' */
+
+ MediaHeaderAtom mediaHeader; /* standard Media information */
+
+ HandlerAtom mediaHandler;
+
+ MediaInfo mediaInfo;
+};
+typedef struct MediaDirectory MediaDirectory;
+/***********************
+* Track Structures
+***********************/
+enum {
+ TrackEnable = 1 << 0,
+ TrackInMovie = 1 << 1,
+ TrackInPreview = 1 << 2,
+ TrackInPoster = 1 << 3
+};
+
+
+struct TrackHeader {
+ long flags; /* 1 byte of version / 3 bytes of flags */
+
+ long creationTime; /* seconds since Jan 1904 when directory was created */
+ long modificationTime; /* seconds since Jan 1904 when directory was appended */
+
+ long trackID;
+
+ long reserved1;
+
+ TimeValue duration; /* length of track (track time) */
+
+ long reserved2;
+ long reserved3;
+
+ short layer;
+ short alternateGroup;
+
+ short volume;
+ short reserved4;
+
+ MatrixRecord matrix;
+ Fixed trackWidth;
+ Fixed trackHeight;
+};
+typedef struct TrackHeader TrackHeader;
+
+struct TrackHeaderAtom {
+ long size; /* size of track header */
+ long atomType; /* = 'tkhd' */
+
+ TrackHeader header;
+};
+typedef struct TrackHeaderAtom TrackHeaderAtom;
+
+struct EditListType {
+ TimeValue trackDuration;
+ TimeValue mediaTime;
+ Fixed mediaRate;
+};
+typedef struct EditListType EditListType;
+
+struct EditListAtom {
+ long size;
+ long atomType; /* = elst */
+
+ long flags; /* 1 byte of version / 3 bytes of flags */
+
+ long numEntries;
+ EditListType editListTable[1];
+};
+typedef struct EditListAtom EditListAtom;
+
+struct EditsAtom {
+ long size;
+ long atomType; /* = edts */
+
+ EditListAtom editList;
+};
+typedef struct EditsAtom EditsAtom;
+
+struct TrackLoadSettings {
+ TimeValue preloadStartTime;
+ TimeValue preloadDuration;
+ long preloadFlags;
+ long defaultHints;
+};
+typedef struct TrackLoadSettings TrackLoadSettings;
+
+struct TrackLoadSettingsAtom {
+ long size;
+ long atomType; /* = load */
+
+ TrackLoadSettings settings;
+};
+typedef struct TrackLoadSettingsAtom TrackLoadSettingsAtom;
+
+struct TrackDirectory {
+ long size;
+ long atomType; /* = 'trak' */
+
+ TrackHeaderAtom trackHeader; /* standard track information */
+
+ ClippingAtom trackClip;
+
+ EditsAtom edits;
+
+ MediaDirectory media;
+
+ UserDataAtom userData; /* space for extending with new data types */
+};
+typedef struct TrackDirectory TrackDirectory;
+/****************************************
+*
+* MovieDirectory -
+* The MovieDirectory is the top level structure which
+* holds the TrackInstance describing where the
+* TrackDirectories are.
+*
+****************************************/
+
+struct MovieHeader {
+ long flags; /* 1 byte of version / 3 bytes of flags */
+
+ long creationTime; /* seconds since Jan 1904 when directory was created */
+ long modificationTime; /* seconds since Jan 1904 when directory was appended */
+
+ TimeValue timeScale; /* Time specifications */
+ TimeValue duration;
+ Fixed preferredRate; /* rate at which to play this movie */
+
+ short preferredVolume; /* volume to play movie at */
+ short reserved1;
+
+ long preferredLong1;
+ long preferredLong2;
+
+ MatrixRecord matrix;
+
+ TimeValue previewTime; /* time in track the proxy begins (track time) */
+ TimeValue previewDuration; /* how long the proxy lasts (track time) */
+
+ TimeValue posterTime; /* time in track the proxy begins (track time) */
+
+ TimeValue selectionTime; /* time in track the proxy begins (track time) */
+ TimeValue selectionDuration; /* time in track the proxy begins (track time) */
+ TimeValue currentTime; /* time in track the proxy begins (track time) */
+
+ long nextTrackID; /* next value to use for a TrackID */
+};
+typedef struct MovieHeader MovieHeader;
+
+struct MovieHeaderAtom {
+ long size;
+ long atomType; /* = 'mvhd' */
+
+ MovieHeader header;
+};
+typedef struct MovieHeaderAtom MovieHeaderAtom;
+
+struct TrackDirectoryEntry {
+ TrackDirectory trackDirectory; /* Track directory information */
+};
+typedef struct TrackDirectoryEntry TrackDirectoryEntry;
+
+struct MovieDirectory {
+ long size;
+ long atomType; /* = 'moov' */
+
+ MovieHeaderAtom header;
+
+ ClippingAtom movieClip;
+
+ /* Track Directories */
+ TrackDirectoryEntry track[1]; /* Track directory information */
+
+ /* User data for Movie */
+ UserDataAtom userData; /* space for user extensions */
+};
+typedef struct MovieDirectory MovieDirectory;
+/****************************************
+****************************************/
+
+/* Movie formats and tags */
+enum {
+ /* some system defined format IDs */
+ MOVIE_TYPE = FOUR_CHAR_CODE('moov'),
+ TRACK_TYPE = FOUR_CHAR_CODE('trak'),
+ MEDIA_TYPE = FOUR_CHAR_CODE('mdia'),
+ VIDEO_TYPE = FOUR_CHAR_CODE('vide'),
+ SOUND_TYPE = FOUR_CHAR_CODE('soun')
+};
+
+/* atom id's */
+enum {
+ MovieAID = FOUR_CHAR_CODE('moov'),
+ MovieHeaderAID = FOUR_CHAR_CODE('mvhd'),
+ ClipAID = FOUR_CHAR_CODE('clip'),
+ RgnClipAID = FOUR_CHAR_CODE('crgn'),
+ MatteAID = FOUR_CHAR_CODE('matt'),
+ MatteCompAID = FOUR_CHAR_CODE('kmat'),
+ TrackAID = FOUR_CHAR_CODE('trak'),
+ UserDataAID = FOUR_CHAR_CODE('udta'),
+ TrackHeaderAID = FOUR_CHAR_CODE('tkhd'),
+ EditsAID = FOUR_CHAR_CODE('edts'),
+ EditListAID = FOUR_CHAR_CODE('elst'),
+ MediaAID = FOUR_CHAR_CODE('mdia'),
+ MediaHeaderAID = FOUR_CHAR_CODE('mdhd'),
+ MediaInfoAID = FOUR_CHAR_CODE('minf'),
+ VideoMediaInfoHeaderAID = FOUR_CHAR_CODE('vmhd'),
+ SoundMediaInfoHeaderAID = FOUR_CHAR_CODE('smhd'),
+ GenericMediaInfoHeaderAID = FOUR_CHAR_CODE('gmhd'),
+ GenericMediaInfoAID = FOUR_CHAR_CODE('gmin'),
+ DataInfoAID = FOUR_CHAR_CODE('dinf'),
+ DataRefAID = FOUR_CHAR_CODE('dref'),
+ SampleTableAID = FOUR_CHAR_CODE('stbl'),
+ STSampleDescAID = FOUR_CHAR_CODE('stsd'),
+ STTimeToSampAID = FOUR_CHAR_CODE('stts'),
+ STSyncSampleAID = FOUR_CHAR_CODE('stss'),
+ STSampleToChunkAID = FOUR_CHAR_CODE('stsc'),
+ STShadowSyncAID = FOUR_CHAR_CODE('stsh'),
+ HandlerAID = FOUR_CHAR_CODE('hdlr'),
+ STSampleSizeAID = FOUR_CHAR_CODE('stsz'),
+ STChunkOffsetAID = FOUR_CHAR_CODE('stco'),
+ STChunkOffset64AID = FOUR_CHAR_CODE('co64'),
+ STSampleIDAID = FOUR_CHAR_CODE('stid'),
+ DataRefContainerAID = FOUR_CHAR_CODE('drfc'),
+ TrackReferenceAID = FOUR_CHAR_CODE('tref'),
+ ColorTableAID = FOUR_CHAR_CODE('ctab'),
+ LoadSettingsAID = FOUR_CHAR_CODE('load'),
+ PropertyAtomAID = FOUR_CHAR_CODE('code'),
+ InputMapAID = FOUR_CHAR_CODE('imap'),
+ MovieBufferHintsAID = FOUR_CHAR_CODE('mbfh'),
+ MovieDataRefAliasAID = FOUR_CHAR_CODE('mdra'),
+ SoundLocalizationAID = FOUR_CHAR_CODE('sloc'),
+ CompressedMovieAID = FOUR_CHAR_CODE('cmov'),
+ CompressedMovieDataAID = FOUR_CHAR_CODE('cmvd'),
+ DataCompressionAtomAID = FOUR_CHAR_CODE('dcom'),
+ ReferenceMovieRecordAID = FOUR_CHAR_CODE('rmra'),
+ ReferenceMovieDescriptorAID = FOUR_CHAR_CODE('rmda'),
+ ReferenceMovieDataRefAID = FOUR_CHAR_CODE('rdrf'),
+ ReferenceMovieVersionCheckAID = FOUR_CHAR_CODE('rmvc'),
+ ReferenceMovieDataRateAID = FOUR_CHAR_CODE('rmdr'),
+ ReferenceMovieComponentCheckAID = FOUR_CHAR_CODE('rmcd'),
+ ReferenceMovieQualityAID = FOUR_CHAR_CODE('rmqu'),
+ ReferenceMovieLanguageAID = FOUR_CHAR_CODE('rmla'),
+ ReferenceMovieCPURatingAID = FOUR_CHAR_CODE('rmcs'),
+ ReferenceMovieAlternateGroupAID = FOUR_CHAR_CODE('rmag'),
+ ReferenceMovieNetworkStatusAID = FOUR_CHAR_CODE('rnet'),
+ CloneMediaAID = FOUR_CHAR_CODE('clon'),
+ FileTypeAID = FOUR_CHAR_CODE('ftyp'),
+ SecureContentInfoAID = FOUR_CHAR_CODE('sinf'),
+ SecureContentSchemeTypeAID = FOUR_CHAR_CODE('schm'),
+ SecureContentSchemeInfoAID = FOUR_CHAR_CODE('schi')
+};
+
+/* Text ATOM definitions*/
+
+
+struct TextBoxAtom {
+ long size;
+ long atomType; /* = 'tbox' */
+ Rect textBox; /* New text box (overrides defaultTextBox)*/
+};
+typedef struct TextBoxAtom TextBoxAtom;
+
+struct HiliteAtom {
+ long size;
+ long atomType; /* = 'hlit' */
+ long selStart; /* hilite selection start character*/
+ long selEnd; /* hilite selection end character*/
+};
+typedef struct HiliteAtom HiliteAtom;
+
+struct KaraokeRec {
+ TimeValue timeVal;
+ short beginHilite;
+ short endHilite;
+};
+typedef struct KaraokeRec KaraokeRec;
+
+struct KaraokeAtom {
+ long numEntries;
+ KaraokeRec karaokeEntries[1];
+};
+typedef struct KaraokeAtom KaraokeAtom;
+/* for ReferenceMovieDataRefRecord.flags*/
+enum {
+ kDataRefIsSelfContained = (1 << 0)
+};
+
+
+struct ReferenceMovieDataRefRecord {
+ long flags;
+ OSType dataRefType;
+ long dataRefSize;
+ char dataRef[1];
+};
+typedef struct ReferenceMovieDataRefRecord ReferenceMovieDataRefRecord;
+/* for VersionCheckRecord.checkType*/
+enum {
+ kVersionCheckMin = 0, /* val1 is the min. version required*/
+ kVersionCheckMask = 1 /* (gestalt return value & val2) must == val1*/
+};
+
+
+struct QTAltVersionCheckRecord {
+ long flags; /* currently always 0*/
+ OSType gestaltTag;
+ UInt32 val1;
+ UInt32 val2;
+ short checkType;
+};
+typedef struct QTAltVersionCheckRecord QTAltVersionCheckRecord;
+/* some helpful constants for DataRateRecord.dataRate */
+enum {
+ kDataRate144ModemRate = 1400L,
+ kDataRate288ModemRate = 2800L,
+ kDataRateISDNRate = 5600L,
+ kDataRateDualISDNRate = 11200L,
+ kDataRate256kbpsRate = 25600L,
+ kDataRate384kbpsRate = 38400L,
+ kDataRate512kbpsRate = 51200L,
+ kDataRate768kbpsRate = 76800L,
+ kDataRate1MbpsRate = 100000L,
+ kDataRateT1Rate = 150000L,
+ kDataRateInfiniteRate = 0x7FFFFFFF,
+ kDataRateDefaultIfNotSet = kDataRateISDNRate
+};
+
+
+struct QTAltDataRateRecord {
+ long flags; /* currently always 0*/
+ long dataRate;
+};
+typedef struct QTAltDataRateRecord QTAltDataRateRecord;
+
+struct QTAltComponentCheckRecord {
+ long flags; /* currently always 0 */
+ ComponentDescription cd;
+ unsigned long minVersion;
+};
+typedef struct QTAltComponentCheckRecord QTAltComponentCheckRecord;
+
+struct QTAltLanguageRecord {
+ long flags; /* currently always 0*/
+ short language;
+};
+typedef struct QTAltLanguageRecord QTAltLanguageRecord;
+
+enum {
+ kQTCPUSpeed1Rating = 100, /* slowest*/
+ kQTCPUSpeed2Rating = 200,
+ kQTCPUSpeed3Rating = 300,
+ kQTCPUSpeed4Rating = 400,
+ kQTCPUSpeed5Rating = 500 /* fastest*/
+};
+
+
+struct QTAltCPURatingRecord {
+ UInt32 flags; /* currently always 0*/
+ UInt16 speed;
+};
+typedef struct QTAltCPURatingRecord QTAltCPURatingRecord;
+
+struct ReferenceMovieNetworkStatusRecord {
+ UInt32 flags; /* currently always 0*/
+ UInt32 valueCount; /* how many status values are in array*/
+ long netStatusValues[1]; /* a value from kQTNetworkStatus... constants*/
+};
+typedef struct ReferenceMovieNetworkStatusRecord ReferenceMovieNetworkStatusRecord;
+
+struct CloneRecord {
+ long flags;
+ long masterTrackID; /* track ID of the track we're cloning */
+};
+typedef struct CloneRecord CloneRecord;
+
+struct CloneAtom {
+ long size;
+ long atomType; /* = clon */
+
+ CloneRecord cloneInfo;
+};
+typedef struct CloneAtom CloneAtom;
+
+struct FileTypeAtom {
+ long size;
+ long atomType; /* = 'ftyp' */
+ long majorBrand; /* best use brand */
+ long minorVersion;
+ long compatibleBrands[4]; /* 1 or greater */
+};
+typedef struct FileTypeAtom FileTypeAtom;
+enum {
+ kQTFileTypeBrandQuickTimeMovie = FOUR_CHAR_CODE('qt '), /* QuickTime movie files*/
+ kQTFileTypeBrandISOFile = FOUR_CHAR_CODE('isom'), /* ISO Base Media files*/
+ kQTFileTypeBrandMPEG4v1 = FOUR_CHAR_CODE('mp41'), /* MPEG-4 (ISO/IEC 14496-1) version 1 files*/
+ kQTFileTypeBrandMPEG4v2 = FOUR_CHAR_CODE('mp42') /* MPEG-4 (ISO/IEC 14496-1) version 2 files*/
+};
+
+
+struct SecureContentInfoAtom {
+ long size;
+ long atomType; /* = 'sinf' */
+};
+typedef struct SecureContentInfoAtom SecureContentInfoAtom;
+
+struct SecureContentSchemeTypeAtom {
+ long size;
+ long atomType; /* = 'schm' */
+
+ long flags; /* 1 byte of version / 3 bytes of flags */
+
+ long schemeType;
+ UInt16 schemeVersion;
+ /* if flags & 1, C string holding URL for security component server*/
+};
+typedef struct SecureContentSchemeTypeAtom SecureContentSchemeTypeAtom;
+
+struct SecureContentSchemeInfoAtom {
+ long size;
+ long atomType; /* = 'schi' */
+};
+typedef struct SecureContentSchemeInfoAtom SecureContentSchemeInfoAtom;
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MOVIESFORMAT__ */
+
diff --git a/include/qt/Multiprocessing.h b/include/qt/Multiprocessing.h
new file mode 100644
index 000000000..1847e859a
--- /dev/null
+++ b/include/qt/Multiprocessing.h
@@ -0,0 +1,973 @@
+/*
+ File: Multiprocessing.h
+
+ Contains: Multiprocessing interfaces
+
+ Version: Technology: Multiprocessing API version 2.0, integrated nanokernel support
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 DayStar Digital, Inc.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+
+/*
+ ===========================================================================================
+ *** WARNING: You must properly check the availability of MP services before calling them!
+ See the section titled "Checking API Availability".
+ ===========================================================================================
+*/
+
+
+#ifndef __MULTIPROCESSING__
+#define __MULTIPROCESSING__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __CODEFRAGMENTS__
+#include "CodeFragments.h"
+#endif
+
+
+#ifndef __DRIVERSERVICES__
+#include "DriverServices.h"
+#endif
+
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*
+ ===========================================================================================
+ This is the header file for version 2.0 of the Mac OS multiprocessing support. This version
+ has been totally reimplemented and has significant new services. The main goal of the
+ reimplementation has been to transfer task management into the core operating system to provide
+ much more reliable and more efficient operation, including on single processor machines.
+ The memory management has also been massively improved, it is much faster and wastes much
+ less space. New services include POSIX style per-task storage, timers with millisecond and
+ microsecond resolutions, memory allocation at a specified alignment, and system pageable
+ and RAM resident memory pools. See the MP API documentation for details.
+ The old "DayStar" debugging services (whose names began with an underscore) have been
+ removed from this header. A very few are still implemented for binary compatibility, or in
+ cases where they happened to be exposed inappropriately. (E.g. _MPIsFullyInitialized must
+ be called to see if the MP API is ReallyTruly(tm) usable.) New code and recompiles of old
+ code should avoid use of these defunct services, except for _MPIsFullyInitialized.
+ ===========================================================================================
+*/
+
+
+/*
+ ===========================================================================================
+ The following services are from the original MP API and remain supported in version 2.0:
+ MPProcessors
+ MPCreateTask
+ MPTerminateTask
+ MPCurrentTaskID
+ MPYield
+ MPExit
+ MPCreateQueue
+ MPDeleteQueue
+ MPNotifyQueue
+ MPWaitOnQueue
+ MPCreateSemaphore
+ MPCreateBinarySemaphore (In C only, a macro that calls MPCreateSemaphore.)
+ MPDeleteSemaphore
+ MPSignalSemaphore
+ MPWaitOnSemaphore
+ MPCreateCriticalRegion
+ MPDeleteCriticalRegion
+ MPEnterCriticalRegion
+ MPExitCriticalRegion
+ MPAllocate (Deprecated, use MPAllocateAligned for new builds.)
+ MPFree
+ MPBlockCopy
+ MPLibraryIsLoaded (In C only, a macro.)
+ _MPIsFullyInitialized (See comments about checking for MP API availability.)
+ ===========================================================================================
+*/
+
+
+/*
+ ===========================================================================================
+ The following services are new in version 2.0:
+ MPProcessorsScheduled
+ MPSetTaskWeight
+ MPTaskIsPreemptive
+ MPAllocateTaskStorageIndex
+ MPDeallocateTaskStorageIndex
+ MPSetTaskStorageValue
+ MPGetTaskStorageValue
+ MPSetQueueReserve
+ MPCreateEvent
+ MPDeleteEvent
+ MPSetEvent
+ MPWaitForEvent
+ UpTime
+ DurationToAbsolute
+ AbsoluteToDuration
+ MPDelayUntil
+ MPCreateTimer
+ MPDeleteTimer
+ MPSetTimerNotify
+ MPArmTimer
+ MPCancelTimer
+ MPSetExceptionHandler
+ MPThrowException
+ MPDisposeTaskException
+ MPExtractTaskState
+ MPSetTaskState
+ MPRegisterDebugger
+ MPUnregisterDebugger
+ MPAllocateAligned (Preferred over MPAllocate.)
+ MPGetAllocatedBlockSize
+ MPBlockClear
+ MPDataToCode
+ MPRemoteCall (Preferred over _MPRPC.)
+ ===========================================================================================
+*/
+
+
+/*
+ ===========================================================================================
+ The following services are new in version 2.1:
+ MPCreateNotification
+ MPDeleteNotification
+ MPModifyNotification
+ MPCauseNotification
+ MPGetNextTaskID
+ MPGetNextCpuID
+ ===========================================================================================
+*/
+
+
+/*
+ ===========================================================================================
+ The following services are "unofficial" extensions to the original API. They are not in
+ the multiprocessing API documentation, but were in previous versions of this header. They
+ remain supported in version 2.0. They may not be supported in other environments.
+ _MPRPC (Deprecated, use MPRemoteCall for new builds.)
+ _MPAllocateSys (Deprecated, use MPAllocateAligned for new builds.)
+ _MPTaskIsToolboxSafe
+ _MPLibraryVersion
+ _MPLibraryIsCompatible
+ ===========================================================================================
+*/
+
+
+/*
+ ===========================================================================================
+ The following services were in previous versions of this header for "debugging only" use.
+ They are NOT implemented in version 2.0. For old builds they can be accessed by defining
+ the symbol MPIncludeDefunctServices to have a nonzero value.
+ _MPInitializePrintf
+ _MPPrintf
+ _MPDebugStr
+ _MPStatusPString
+ _MPStatusCString
+ ===========================================================================================
+*/
+
+
+/*
+ .
+ ===========================================================================================
+ General Types and Constants
+ ===========================
+*/
+
+
+#define MPCopyrightNotice \
+ "Copyright © 1995-1999 Apple Computer, Inc.\n"
+#define MPLibraryName "MPLibrary"
+#define MPLibraryCName MPLibraryName
+#define MPLibraryPName "\p" MPLibraryName
+#define MP_API_Version "2.1"
+
+enum {
+ MPLibrary_MajorVersion = 2,
+ MPLibrary_MinorVersion = 1,
+ MPLibrary_Release = 1,
+ MPLibrary_DevelopmentRevision = 1
+};
+
+
+typedef CFragContextID MPProcessID;
+typedef struct OpaqueMPTaskID* MPTaskID;
+typedef struct OpaqueMPQueueID* MPQueueID;
+typedef struct OpaqueMPSemaphoreID* MPSemaphoreID;
+typedef struct OpaqueMPCriticalRegionID* MPCriticalRegionID;
+typedef struct OpaqueMPTimerID* MPTimerID;
+typedef struct OpaqueMPEventID* MPEventID;
+typedef struct OpaqueMPAddressSpaceID* MPAddressSpaceID;
+typedef struct OpaqueMPNotificationID* MPNotificationID;
+typedef struct OpaqueMPCoherenceID* MPCoherenceID;
+typedef struct OpaqueMPCpuID* MPCpuID;
+typedef struct OpaqueMPOpaqueID* MPOpaqueID;
+enum {
+ kMPNoID = kInvalidID /* New code should use kInvalidID everywhere.*/
+};
+
+
+typedef OptionBits MPTaskOptions;
+typedef UInt32 TaskStorageIndex;
+typedef UInt32 TaskStorageValue;
+typedef ItemCount MPSemaphoreCount;
+typedef UInt32 MPTaskWeight;
+typedef UInt32 MPEventFlags;
+typedef UInt32 MPExceptionKind;
+typedef UInt32 MPTaskStateKind;
+typedef UInt32 MPDebuggerLevel;
+enum {
+ kDurationImmediate = 0L,
+ kDurationForever = 0x7FFFFFFF,
+ kDurationMillisecond = 1,
+ kDurationMicrosecond = -1
+};
+
+
+/*
+ .
+ ===========================================================================================
+ Tasking Services
+ ================
+*/
+
+
+EXTERN_API_C( ItemCount )
+MPProcessors (void);
+
+/* The physical total.*/
+EXTERN_API_C( ItemCount )
+MPProcessorsScheduled (void);
+
+/* Those currently in use.*/
+EXTERN_API_C( OSStatus )
+MPGetNextCpuID (MPCoherenceID owningCoherenceID,
+ MPCpuID * cpuID);
+
+
+enum {
+ /* For MPCreateTask options*/
+ kMPCreateTaskTakesAllExceptionsMask = 1L << 1,
+ kMPCreateTaskValidOptionsMask = kMPCreateTaskTakesAllExceptionsMask
+};
+
+
+/* -------------------------------------------------------------------------------------------*/
+
+
+typedef CALLBACK_API_C( OSStatus , TaskProc )(void *parameter);
+EXTERN_API_C( OSStatus )
+MPCreateTask (TaskProc entryPoint,
+ void * parameter,
+ ByteCount stackSize,
+ MPQueueID notifyQueue,
+ void * terminationParameter1,
+ void * terminationParameter2,
+ MPTaskOptions options,
+ MPTaskID * task);
+
+EXTERN_API_C( OSStatus )
+MPTerminateTask (MPTaskID task,
+ OSStatus terminationStatus);
+
+EXTERN_API_C( OSStatus )
+MPSetTaskWeight (MPTaskID task,
+ MPTaskWeight weight);
+
+EXTERN_API_C( Boolean )
+MPTaskIsPreemptive (MPTaskID taskID);
+
+/* May be kInvalidID.*/
+EXTERN_API_C( void )
+MPExit (OSStatus status);
+
+EXTERN_API_C( void )
+MPYield (void);
+
+EXTERN_API_C( MPTaskID )
+MPCurrentTaskID (void);
+
+EXTERN_API_C( OSStatus )
+MPGetNextTaskID (MPProcessID owningProcessID,
+ MPTaskID * taskID);
+
+
+/* -------------------------------------------------------------------------------------------*/
+
+
+/*
+ ---------------------------------------------------
+ ! The task storage services are new in version 2.0.
+*/
+
+
+EXTERN_API_C( OSStatus )
+MPAllocateTaskStorageIndex (TaskStorageIndex * index);
+
+EXTERN_API_C( OSStatus )
+MPDeallocateTaskStorageIndex (TaskStorageIndex index);
+
+EXTERN_API_C( OSStatus )
+MPSetTaskStorageValue (TaskStorageIndex index,
+ TaskStorageValue value);
+
+EXTERN_API_C( TaskStorageValue )
+MPGetTaskStorageValue (TaskStorageIndex index);
+
+
+/*
+ .
+ ===========================================================================================
+ Synchronization Services
+ ========================
+*/
+
+
+EXTERN_API_C( OSStatus )
+MPCreateQueue (MPQueueID * queue);
+
+EXTERN_API_C( OSStatus )
+MPDeleteQueue (MPQueueID queue);
+
+EXTERN_API_C( OSStatus )
+MPNotifyQueue (MPQueueID queue,
+ void * param1,
+ void * param2,
+ void * param3);
+
+EXTERN_API_C( OSStatus )
+MPWaitOnQueue (MPQueueID queue,
+ void ** param1,
+ void ** param2,
+ void ** param3,
+ Duration timeout);
+
+EXTERN_API_C( OSStatus )
+MPSetQueueReserve (MPQueueID queue,
+ ItemCount count);
+
+
+/* -------------------------------------------------------------------------------------------*/
+
+
+EXTERN_API_C( OSStatus )
+MPCreateSemaphore (MPSemaphoreCount maximumValue,
+ MPSemaphoreCount initialValue,
+ MPSemaphoreID * semaphore);
+
+EXTERN_API_C( OSStatus )
+MPDeleteSemaphore (MPSemaphoreID semaphore);
+
+EXTERN_API_C( OSStatus )
+MPSignalSemaphore (MPSemaphoreID semaphore);
+
+EXTERN_API_C( OSStatus )
+MPWaitOnSemaphore (MPSemaphoreID semaphore,
+ Duration timeout);
+
+
+#define MPCreateBinarySemaphore(semaphore) \
+ MPCreateSemaphore ( 1, 1, (semaphore) )
+
+/* -------------------------------------------------------------------------------------------*/
+
+
+EXTERN_API_C( OSStatus )
+MPCreateCriticalRegion (MPCriticalRegionID * criticalRegion);
+
+EXTERN_API_C( OSStatus )
+MPDeleteCriticalRegion (MPCriticalRegionID criticalRegion);
+
+EXTERN_API_C( OSStatus )
+MPEnterCriticalRegion (MPCriticalRegionID criticalRegion,
+ Duration timeout);
+
+EXTERN_API_C( OSStatus )
+MPExitCriticalRegion (MPCriticalRegionID criticalRegion);
+
+
+/* -------------------------------------------------------------------------------------------*/
+
+EXTERN_API( OSStatus )
+MPCreateEvent (MPEventID * event);
+
+EXTERN_API_C( OSStatus )
+MPDeleteEvent (MPEventID event);
+
+EXTERN_API_C( OSStatus )
+MPSetEvent (MPEventID event,
+ MPEventFlags flags);
+
+EXTERN_API( OSStatus )
+MPWaitForEvent (MPEventID event,
+ MPEventFlags * flags,
+ Duration timeout);
+
+/*
+ .
+ ===========================================================================================
+ Notification Services (API)
+ =====================
+*/
+
+
+
+EXTERN_API_C( OSStatus )
+MPCreateNotification (MPNotificationID * notificationID);
+
+/* -------------------------------------------------------------------------------------------*/
+
+EXTERN_API_C( OSStatus )
+MPDeleteNotification (MPNotificationID notificationID);
+
+/* -------------------------------------------------------------------------------------------*/
+
+EXTERN_API_C( OSStatus )
+MPModifyNotification (MPNotificationID notificationID,
+ MPOpaqueID anID,
+ void * notifyParam1,
+ void * notifyParam2,
+ void * notifyParam3);
+
+/* -------------------------------------------------------------------------------------------*/
+
+EXTERN_API_C( OSStatus )
+MPCauseNotification (MPNotificationID notificationID);
+
+
+
+/*
+ .
+ ===========================================================================================
+ Timer Services
+ ==============
+*/
+
+
+/*
+ --------------------------------------------
+ ! The timer services are new in version 2.0.
+*/
+
+
+#if 0
+/* For now these are taken from DriverServices, should be in a better place.*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( AbsoluteTime )
+UpTime (void);
+
+EXTERN_API_C( AbsoluteTime )
+DurationToAbsolute (Duration duration);
+
+EXTERN_API_C( Duration )
+AbsoluteToDuration (AbsoluteTime time);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* 0 */
+
+enum {
+ /* For MPArmTimer options*/
+ kMPPreserveTimerIDMask = 1L << 0,
+ kMPTimeIsDeltaMask = 1L << 1,
+ kMPTimeIsDurationMask = 1L << 2
+};
+
+
+EXTERN_API_C( OSStatus )
+MPDelayUntil (AbsoluteTime * expirationTime);
+
+EXTERN_API_C( OSStatus )
+MPCreateTimer (MPTimerID * timerID);
+
+EXTERN_API_C( OSStatus )
+MPDeleteTimer (MPTimerID timerID);
+
+EXTERN_API_C( OSStatus )
+MPSetTimerNotify (MPTimerID timerID,
+ MPOpaqueID anID,
+ void * notifyParam1,
+ void * notifyParam2,
+ void * notifyParam3);
+
+EXTERN_API_C( OSStatus )
+MPArmTimer (MPTimerID timerID,
+ AbsoluteTime * expirationTime,
+ OptionBits options);
+
+EXTERN_API_C( OSStatus )
+MPCancelTimer (MPTimerID timerID,
+ AbsoluteTime * timeRemaining);
+
+
+/*
+ .
+ ===========================================================================================
+ Memory Services
+ ===============
+*/
+
+
+enum {
+ /* Maximum allocation request size is 1GB.*/
+ kMPMaxAllocSize = 1024L * 1024 * 1024
+};
+
+enum {
+ /* Values for the alignment parameter to MPAllocateAligned.*/
+ kMPAllocateDefaultAligned = 0,
+ kMPAllocate8ByteAligned = 3,
+ kMPAllocate16ByteAligned = 4,
+ kMPAllocate32ByteAligned = 5,
+ kMPAllocate1024ByteAligned = 10,
+ kMPAllocate4096ByteAligned = 12,
+ kMPAllocateMaxAlignment = 16, /* Somewhat arbitrary limit on expectations.*/
+ kMPAllocateAltiVecAligned = kMPAllocate16ByteAligned, /* The P.C. name.*/
+ kMPAllocateVMXAligned = kMPAllocateAltiVecAligned, /* The older, common name.*/
+ kMPAllocateVMPageAligned = 254, /* Pseudo value, converted at runtime.*/
+ kMPAllocateInterlockAligned = 255 /* Pseudo value, converted at runtime.*/
+};
+
+enum {
+ /* Values for the options parameter to MPAllocateAligned.*/
+ kMPAllocateClearMask = 0x0001, /* Zero the allocated block.*/
+ kMPAllocateGloballyMask = 0x0002, /* Allocate from the globally visible pool.*/
+ kMPAllocateResidentMask = 0x0004, /* Allocate from the RAM-resident pool.*/
+ kMPAllocateNoGrowthMask = 0x0010 /* Do not attempt to grow the pool.*/
+};
+
+
+/* -------------------------------------------------------------------------------------------*/
+
+
+EXTERN_API_C( LogicalAddress )
+MPAllocateAligned (ByteCount size,
+ UInt8 alignment,
+ OptionBits options);
+
+/* ! MPAllocateAligned is new in version 2.0.*/
+EXTERN_API_C( LogicalAddress )
+MPAllocate (ByteCount size);
+
+/* Use MPAllocateAligned instead.*/
+EXTERN_API_C( void )
+MPFree (LogicalAddress object);
+
+EXTERN_API_C( ByteCount )
+MPGetAllocatedBlockSize (LogicalAddress object);
+
+/* -------------------------------------------------------------------------------------------*/
+
+
+EXTERN_API_C( void )
+MPBlockCopy (LogicalAddress source,
+ LogicalAddress destination,
+ ByteCount size);
+
+EXTERN_API_C( void )
+MPBlockClear (LogicalAddress address,
+ ByteCount size);
+
+/* ! MPBlockClear is new in version 2.0.*/
+EXTERN_API_C( void )
+MPDataToCode (LogicalAddress address,
+ ByteCount size);
+
+/* ! MPDataToCode is new in version 2.0.*/
+/*
+ .
+ ===========================================================================================
+ Exception/Debugging Services
+ ============================
+*/
+
+
+/*
+ -------------------------------------------------------------------------------------------
+ *** Important Note ***
+ ----------------------
+
+ The functions MPExtractTaskState and MPSetTaskState infer the size of the "info" buffer
+ from the "kind" parameter. A given value for MPTaskStateKind will always refer to a
+ single specific physical buffer layout. Should new register sets be added, or the size
+ or number of any registers change, new values of MPTaskStateKind will be introduced to
+ refer to the new buffer layouts.
+
+ The following types for the buffers are in MachineExceptions. The correspondence between
+ MPTaskStateKind values and MachineExceptions types is:
+
+ kMPTaskStateRegisters -> RegisterInformation
+ kMPTaskStateFPU -> FPUInformation
+ kMPTaskStateVectors -> VectorInformation
+ kMPTaskStateMachine -> MachineInformation
+ kMPTaskState32BitMemoryException -> ExceptionInfo for old-style 32-bit memory exceptions
+
+ For reference, on PowerPC the MachineExceptions types contain:
+
+ RegisterInformation -> The GPRs, 32 values of 64 bits each.
+ FPUInformation -> The FPRs plus FPSCR, 32 values of 64 bits each, one value of
+ 32 bits.
+ VectorInformation -> The AltiVec vector registers plus VSCR and VRSave, 32 values
+ of 128 bits each, one value of 128 bits, and one 32 bit value.
+ MachineInformation -> The CTR, LR, PC, each of 64 bits. The CR, XER, MSR, MQ,
+ exception kind, and DSISR, each of 32 bits. The 64 bit DAR.
+ ExceptionInfo -> Only memory exceptions are specified, 4 fields of 32 bits each.
+ Note that this type only covers memory exceptions on 32-bit CPUs!
+ The following types are declared here:
+ kMPTaskStateTaskInfo -> MPTaskInfo
+*/
+
+enum {
+ /* Values for the TaskStateKind to MPExtractTaskState and MPSetTaskState.*/
+ kMPTaskStateRegisters = 0, /* The task general registers.*/
+ kMPTaskStateFPU = 1, /* The task floating point registers*/
+ kMPTaskStateVectors = 2, /* The task vector registers*/
+ kMPTaskStateMachine = 3, /* The task machine registers*/
+ kMPTaskState32BitMemoryException = 4 /* The task memory exception information for 32-bit CPUs.*/
+};
+
+enum {
+ kMPTaskStateTaskInfo = 5 /* Static and dynamic information about the task.*/
+};
+
+enum {
+ /* Option bits and numbers for MPDisposeTaskException.*/
+ kMPTaskPropagate = 0, /* The exception is propagated.*/
+ kMPTaskResumeStep = 1, /* The task is resumed and single step is enabled.*/
+ kMPTaskResumeBranch = 2, /* The task is resumed and branch stepping is enabled.*/
+ kMPTaskResumeMask = 0x0000, /* The task is resumed.*/
+ kMPTaskPropagateMask = 1 << kMPTaskPropagate, /* The exception is propagated.*/
+ kMPTaskResumeStepMask = 1 << kMPTaskResumeStep, /* The task is resumed and single step is enabled.*/
+ kMPTaskResumeBranchMask = 1 << kMPTaskResumeBranch /* The task is resumed and branch stepping is enabled.*/
+};
+
+
+enum {
+ /* For kMPTaskStateTaskInfo, the task's runState*/
+ kMPTaskBlocked = 0, /* Task is blocked (queued on resource)*/
+ kMPTaskReady = 1, /* Task is runnable*/
+ kMPTaskRunning = 2 /* Task is running*/
+};
+
+enum {
+ /* For kMPTaskStateTaskInfo, the version of the MPTaskInfo structure requested.*/
+ kMPTaskInfoVersion = 2
+};
+
+
+
+struct MPTaskInfo {
+ PBVersion version; /* Version of the data structure requested*/
+
+ OSType name; /* Task name*/
+
+ OSType queueName; /* Task's queue owner name*/
+ UInt16 runState; /* Running, ready, blocked*/
+ UInt16 lastCPU; /* Address of CPU where task previously ran*/
+ UInt32 weight; /* Processing weight: 1 - 10,000*/
+
+ MPProcessID processID; /* Owning process ID*/
+
+ AbsoluteTime cpuTime; /* Accumulated task time*/
+ AbsoluteTime schedTime; /* Time when last scheduled*/
+ AbsoluteTime creationTime; /* Time when task created*/
+
+ ItemCount codePageFaults; /* Page faults from code execution*/
+ ItemCount dataPageFaults; /* Page faults from data access*/
+ ItemCount preemptions; /* Number of times task was preempted*/
+
+ MPCpuID cpuID; /* ID of CPU where task previously ran*/
+};
+typedef struct MPTaskInfo MPTaskInfo;
+/*
+ Upon a task exception, the following message is sent to the designated queue:
+ 1. The MPTaskID,
+ 2. The exception kind. These are enumerated in the interfaces header MachineExceptions.h
+ 3. N/A
+*/
+
+
+
+/* -------------------------------------------------------------------------------------------*/
+
+EXTERN_API_C( OSStatus )
+MPSetExceptionHandler (MPTaskID task,
+ MPQueueID exceptionQ);
+
+EXTERN_API_C( OSStatus )
+MPDisposeTaskException (MPTaskID task,
+ OptionBits action);
+
+EXTERN_API_C( OSStatus )
+MPExtractTaskState (MPTaskID task,
+ MPTaskStateKind kind,
+ void * info);
+
+EXTERN_API_C( OSStatus )
+MPSetTaskState (MPTaskID task,
+ MPTaskStateKind kind,
+ void * info);
+
+EXTERN_API_C( OSStatus )
+MPThrowException (MPTaskID task,
+ MPExceptionKind kind);
+
+/* -------------------------------------------------------------------------------------------*/
+
+EXTERN_API_C( OSStatus )
+MPRegisterDebugger (MPQueueID queue,
+ MPDebuggerLevel level);
+
+EXTERN_API_C( OSStatus )
+MPUnregisterDebugger (MPQueueID queue);
+
+
+
+/*
+ .
+ ===========================================================================================
+ Remote Call Services
+ ====================
+*/
+
+typedef CALLBACK_API_C( void *, MPRemoteProcedure )(void *parameter);
+
+typedef UInt8 MPRemoteContext;
+enum {
+ kMPAnyRemoteContext = 0,
+ kMPOwningProcessRemoteContext = 1
+};
+
+
+EXTERN_API_C( void *)
+MPRemoteCall (MPRemoteProcedure remoteProc,
+ void * parameter,
+ MPRemoteContext context);
+
+/* ! MPRemoteCall is new in version 2.0.*/
+/*
+ .
+ ===========================================================================================
+ Checking API Availability
+ =========================
+*/
+
+
+/*
+ ===========================================================================================
+ *** WARNING: You must properly check the availability of MP services before calling them!
+ ===========================================================================================
+
+ Checking for the availability of the MP API is rather ugly. This is a historical problem,
+ caused by the original implementation letting itself get prepared when it really wasn't
+ usable and complicated by some important clients then depending on weak linking to "work".
+ (And further complicated by CFM not supporting "deferred" imports, which is how many
+ programmers think weak imports work.)
+
+ The end result is that the MP API library may get prepared by CFM but be totally unusable.
+ This means that if you import from the MP API library, you cannot simply check for a
+ resolved import to decide if MP services are available. Worse, if you explicitly prepare
+ the MP API library you cannot assume that a noErr result from GetSharedLibrary means that
+ MP services are available.
+
+ o If you import from the MP API library you MUST:
+
+ Use the MPLibraryIsLoaded macro (or equivalent code in languages other than C) to tell
+ if the MP API services are available. It is not sufficient to simply check that an
+ imported symbol is resolved as is commonly done for other libraries. The macro expands
+ to the expression:
+
+ ( ( (UInt32)_MPIsFullyInitialized != (UInt32)kUnresolvedCFragSymbolAddress ) &&
+ ( _MPIsFullyInitialized () ) )
+
+ This checks if the imported symbol _MPIsFullyInitialized is resolved and if resolved
+ calls it. Both parts must succeed for the MP API services to be available.
+
+ o If you explicitly prepare the MP API library you MUST:
+
+ Use code similar to the following example to tell if the MP API services are available.
+ It is not sufficient to depend on just a noErr result from GetSharedLibrary.
+
+ OSErr err;
+ Boolean mpIsAvailable = false;
+ CFragConnectionID connID = kInvalidID;
+ MPIsFullyInitializedProc mpIsFullyInitialized = NULL;
+
+ err = GetSharedLibrary ( "\pMPLibrary", kCompiledCFragArch, kReferenceCFrag,
+ &connID, NULL, NULL );
+
+ if ( err == noErr ) {
+ err = FindSymbol ( connID, "\p_MPIsFullyInitialized",
+ (Ptr *) &mpIsFullyInitialized, NULL );
+ }
+
+ if ( err == noErr ) {
+ mpIsAvailable = (* mpIsFullyInitialized) ();
+ }
+
+ ===========================================================================================
+*/
+
+
+EXTERN_API_C( Boolean )
+_MPIsFullyInitialized (void);
+
+typedef CALLBACK_API_C( Boolean , MPIsFullyInitializedProc )(void );
+#define MPLibraryIsLoaded() \
+ ( ( (UInt32)_MPIsFullyInitialized != (UInt32)kUnresolvedCFragSymbolAddress ) && \
+ ( _MPIsFullyInitialized () ) )
+/*
+ .
+ ===========================================================================================
+ Miscellaneous Services
+ ======================
+*/
+
+
+EXTERN_API_C( void )
+_MPLibraryVersion (const char ** versionCString,
+ UInt32 * major,
+ UInt32 * minor,
+ UInt32 * release,
+ UInt32 * revision);
+
+/*
+ .
+ ===========================================================================================
+ Unofficial Services
+ ===================
+*/
+
+
+/*
+ ===========================================================================================
+ *** WARNING ***
+ These services are not part of the officially documented multiprocessing API. They may not
+ be avaliable in future versions of Mac OS multiprocessing support, or in environments that
+ have a different underlying OS architecture such as Mac OS on top of a microkernel, the
+ Mac OS Blue Box under Mac OS X, native MP support in Mac OS X, etc.
+ ===========================================================================================
+*/
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( LogicalAddress )
+_MPAllocateSys (ByteCount size);
+
+/* Use MPAllocateAligned instead.*/
+EXTERN_API_C( void *)
+_MPRPC (MPRemoteProcedure remoteProc,
+ void * parameter);
+
+/* Use _MPRemoteCall instead.*/
+EXTERN_API_C( Boolean )
+_MPTaskIsToolboxSafe (MPTaskID task);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API_C( Boolean )
+_MPLibraryIsCompatible (const char * versionCString,
+ UInt32 major,
+ UInt32 minor,
+ UInt32 release,
+ UInt32 revision);
+
+
+#define MPRPC _MPRPC
+#define MPTaskIsToolboxSafe _MPTaskIsToolboxSafe
+
+/*
+ .
+ ===========================================================================================
+ Defunct Services
+ ================
+*/
+
+#if CALL_NOT_IN_CARBON
+#ifndef MPIncludeDefunctServices
+#define MPIncludeDefunctServices 0
+#endif /* !defined(MPIncludeDefunctServices) */
+
+#if MPIncludeDefunctServices
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( void )
+_MPDebugStr (ConstStr255Param msg);
+
+EXTERN_API_C( StringPtr )
+_MPStatusPString (OSStatus status);
+
+EXTERN_API_C( const char *)
+_MPStatusCString (OSStatus status);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#include "stdarg.h"
+typedef CALLBACK_API_C( void , MPPrintfHandler )(MPTaskID taskID, const char *format, va_list args);
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( void )
+_MPInitializePrintf (MPPrintfHandler pfn);
+
+EXTERN_API_C( void )
+_MPPrintf (const char * format,
+ ...);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* MPIncludeDefunctServices */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+/* ===========================================================================================*/
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MULTIPROCESSING__ */
+
diff --git a/include/qt/NSL.h b/include/qt/NSL.h
new file mode 100644
index 000000000..e408b6422
--- /dev/null
+++ b/include/qt/NSL.h
@@ -0,0 +1,786 @@
+/*
+ File: NSL.h
+
+ Contains: Interface to API for using the NSL Manager
+
+ Version: Technology: Mac OS 8.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __NSL__
+#define __NSL__
+
+#ifndef __CODEFRAGMENTS__
+#include "CodeFragments.h"
+#endif
+
+#ifndef __EVENTS__
+#include "Events.h"
+#endif
+
+#ifndef __THREADS__
+#include "Threads.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ kNSLMinSystemVersion = 0x0900, /* equivalent to 9.0*/
+ kNSLMinOTVersion = 0x0130 /* equivalent to 1.3*/
+};
+
+enum {
+ kNSLDefaultListSize = 256 /* default list size for service and protocol lists*/
+};
+
+enum {
+ kNSLURLDelimiter = ',' /* delimits URL's within memory buffers*/
+};
+
+
+#define kNSLErrorNoErr {noErr, kNSLNoContext} /* an initializer for the NSLError struct */
+
+enum {
+ kNSLNoContext = 0 /* the default context for NSLError structs*/
+};
+
+
+struct NSLError {
+ OSStatus theErr;
+ UInt32 theContext;
+};
+typedef struct NSLError NSLError;
+typedef NSLError * NSLErrorPtr;
+enum {
+ /* Constants to use with NSLPrepareRequest*/
+ /* kNSLDuplicateSearchInProgress is not strictly an error. The client is free to ignore*/
+ /* this result, and nothing bad will happen if it does. It is*/
+ /* informational only.*/
+ kNSLDuplicateSearchInProgress = 100,
+ kNSLUserCanceled = userCanceledErr, /* User hit cancel from the NSLStandardGetURL dialog */
+ /* Invalid enumeratorRef */
+ kNSLInvalidEnumeratorRef = 0 /* this is not an error; it is the equiv to a NULL ptr*/
+};
+
+
+typedef UInt16 NSLSearchState;
+enum {
+ /* State codes for notifiers.*/
+ kNSLSearchStateBufferFull = 1,
+ kNSLSearchStateOnGoing = 2,
+ kNSLSearchStateComplete = 3,
+ kNSLSearchStateStalled = 4,
+ kNSLWaitingForContinue = 5
+};
+
+
+typedef UInt32 NSLEventCode;
+enum {
+ /* Event codes*/
+ kNSLServicesLookupDataEvent = 6,
+ kNSLNeighborhoodLookupDataEvent = 7,
+ kNSLNewDataEvent = 8,
+ kNSLContinueLookupEvent = 9
+};
+
+
+
+typedef UInt32 NSLClientRef;
+typedef UInt32 NSLRequestRef;
+typedef UInt32 NSLOneBasedIndex;
+typedef char * NSLPath;
+typedef char * NSLServiceType;
+typedef Handle NSLServicesList;
+typedef unsigned char * NSLNeighborhood;
+/*
+ cstring which is a comma delimited list of protocols which can be used to
+ create a NSLProtocolList internally
+*/
+
+typedef UInt32 NSLDialogOptionFlags;
+enum {
+ kNSLDefaultNSLDlogOptions = 0x00000000, /* use defaults for all the options */
+ kNSLNoURLTEField = 0x00000001 /* don't show url text field for manual entry */
+};
+
+
+
+struct NSLDialogOptions {
+ UInt16 version;
+ NSLDialogOptionFlags dialogOptionFlags; /* option flags for affecting the dialog's behavior */
+ Str255 windowTitle;
+ Str255 actionButtonLabel; /* label of the default button (or null string for default) */
+ Str255 cancelButtonLabel; /* label of the cancel button (or null string for default) */
+ Str255 message; /* custom message prompt (or null string for default) */
+};
+typedef struct NSLDialogOptions NSLDialogOptions;
+
+/* the async information block for client<->manager interaction*/
+
+struct NSLClientAsyncInfo {
+ void * clientContextPtr; /* set by the client for its own use*/
+ void * mgrContextPtr; /* set by NSL mgr; ptr to request object ptr*/
+ char * resultBuffer;
+ long bufferLen;
+ long maxBufferSize;
+ UInt32 startTime; /* when the search starts, to use with maxSearchTime to determine time-out condition*/
+ UInt32 intStartTime; /* used with alertInterval*/
+ UInt32 maxSearchTime; /* total time for search, in ticks (0 == no time limit)*/
+ UInt32 alertInterval; /* call client's notifier or return, every this many ticks ( 0 == don't use this param)*/
+ UInt32 totalItems; /* total number of tuples currently in buffer*/
+ UInt32 alertThreshold; /* call client's notifier or return, every this many items found ( 0 == don't use this param)*/
+ NSLSearchState searchState;
+ NSLError searchResult;
+ NSLEventCode searchDataType; /* this is a data type code which allows the client's asyncNotifier to properly*/
+ /* handle the data in resultBuffer.*/
+};
+typedef struct NSLClientAsyncInfo NSLClientAsyncInfo;
+typedef NSLClientAsyncInfo * NSLClientAsyncInfoPtr;
+
+/* the async information block plugin<->manager interaction*/
+
+struct NSLPluginAsyncInfo {
+ void * mgrContextPtr; /* set by NSL mgr; ptr to request object ptr*/
+ void * pluginContextPtr; /* set/used by individual plugins*/
+ void * pluginPtr; /* ptr to the plugin object waiting for continue lookup call*/
+ char * resultBuffer; /* set by plugin to point at data*/
+ long bufferLen;
+ long maxBufferSize;
+ UInt32 maxSearchTime; /* total time for search, in ticks (0 == no time limit)*/
+ UInt32 reserved1;
+ UInt32 reserved2;
+ UInt32 reserved3;
+ NSLClientRef clientRef;
+ NSLRequestRef requestRef;
+ NSLSearchState searchState;
+ OSStatus searchResult;
+};
+typedef struct NSLPluginAsyncInfo NSLPluginAsyncInfo;
+typedef NSLPluginAsyncInfo * NSLPluginAsyncInfoPtr;
+
+/* the mgr asynchronous notifier routine.*/
+typedef CALLBACK_API( void , NSLMgrNotifyProcPtr )(NSLPluginAsyncInfo *thePluginAsyncInfo);
+
+/* the client asynchronous notifier routine.*/
+typedef CALLBACK_API( void , NSLClientNotifyProcPtr )(NSLClientAsyncInfo *theClientAsyncInfo);
+typedef STACK_UPP_TYPE(NSLMgrNotifyProcPtr) NSLMgrNotifyUPP;
+typedef STACK_UPP_TYPE(NSLClientNotifyProcPtr) NSLClientNotifyUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(NSLMgrNotifyUPP)
+ NewNSLMgrNotifyUPP (NSLMgrNotifyProcPtr userRoutine);
+
+ EXTERN_API(NSLClientNotifyUPP)
+ NewNSLClientNotifyUPP (NSLClientNotifyProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeNSLMgrNotifyUPP (NSLMgrNotifyUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeNSLClientNotifyUPP (NSLClientNotifyUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeNSLMgrNotifyUPP (NSLPluginAsyncInfo * thePluginAsyncInfo,
+ NSLMgrNotifyUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeNSLClientNotifyUPP (NSLClientAsyncInfo * theClientAsyncInfo,
+ NSLClientNotifyUPP userUPP);
+
+#else
+ enum { uppNSLMgrNotifyProcInfo = 0x000000C0 }; /* pascal no_return_value Func(4_bytes) */
+ enum { uppNSLClientNotifyProcInfo = 0x000000C0 }; /* pascal no_return_value Func(4_bytes) */
+ #define NewNSLMgrNotifyUPP(userRoutine) (NSLMgrNotifyUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNSLMgrNotifyProcInfo, GetCurrentArchitecture())
+ #define NewNSLClientNotifyUPP(userRoutine) (NSLClientNotifyUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNSLClientNotifyProcInfo, GetCurrentArchitecture())
+ #define DisposeNSLMgrNotifyUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeNSLClientNotifyUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeNSLMgrNotifyUPP(thePluginAsyncInfo, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppNSLMgrNotifyProcInfo, (thePluginAsyncInfo))
+ #define InvokeNSLClientNotifyUPP(theClientAsyncInfo, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppNSLClientNotifyProcInfo, (theClientAsyncInfo))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewNSLMgrNotifyProc(userRoutine) NewNSLMgrNotifyUPP(userRoutine)
+#define NewNSLClientNotifyProc(userRoutine) NewNSLClientNotifyUPP(userRoutine)
+#define CallNSLMgrNotifyProc(userRoutine, thePluginAsyncInfo) InvokeNSLMgrNotifyUPP(thePluginAsyncInfo, userRoutine)
+#define CallNSLClientNotifyProc(userRoutine, theClientAsyncInfo) InvokeNSLClientNotifyUPP(theClientAsyncInfo, userRoutine)
+
+/*
+ this struct is a format for dealing with our internal data representation. Typed data will be contiguous chunk of
+ memory, with the first 4 bytes being a data "descriptor".
+*/
+
+struct NSLTypedData {
+ unsigned long dataType;
+ unsigned long lengthOfData;
+/* void* theData; */
+
+};
+typedef struct NSLTypedData NSLTypedData;
+typedef NSLTypedData * NSLTypedDataPtr;
+
+#define kNSLDataType 'NSL_'
+/*
+ This is just a header at the beginning of a handle that stores our list of service types.
+ Each service type is a pascal string, so each service type starts after the end of the
+ previous one.
+*/
+
+struct NSLServicesListHeader {
+ unsigned long numServices;
+ unsigned long logicalLen; /* length of all usable data in handle*/
+/* Ptr firstService; */
+
+};
+typedef struct NSLServicesListHeader NSLServicesListHeader;
+typedef NSLServicesListHeader * NSLServicesListHeaderPtr;
+
+/* some defs for common protocols*/
+
+#define kSLPProtocolType "SLP"
+#define kDNSProtocolType "DNS"
+#define kLDAPProtocolType "LDAP"
+#define kNBPProtocolType "NBP"
+
+/*
+ general information from a plug-in. Includes supported protocols, data types and services,
+ as well as an info/comment string describing the function of the plug-in in human-readable
+ form. The offsets point to the beginning of each list of data returned, and the protocol
+ data offset is the startOfData member of the struct
+*/
+
+struct NSLPluginData {
+ long reserved1;
+ long reserved2;
+ long reserved3;
+ Boolean supportsRegistration;
+ Boolean isPurgeable;
+ UInt16 totalLen; /* length of everything, including header*/
+ UInt16 dataTypeOffset;
+ UInt16 serviceListOffset;
+ UInt16 protocolListOffset;
+ UInt16 commentStringOffset;
+/* char* startOfData; */
+ /* protocol data is first on the list*/
+};
+typedef struct NSLPluginData NSLPluginData;
+typedef NSLPluginData * NSLPluginDataPtr;
+
+/*
+ -----------------------------------------------------------------------------
+ Finding out if the library is present and getting its version
+ -----------------------------------------------------------------------------
+*/
+
+EXTERN_API( UInt32 )
+NSLLibraryVersion (void);
+
+
+
+ #ifdef __cplusplus
+ inline pascal Boolean NSLLibraryPresent() { return NSLLibraryVersion != (void*)kUnresolvedCFragSymbolAddress; }
+ #else
+ #define NSLLibraryPresent() ((NSLLibraryVersion != (void*)kUnresolvedCFragSymbolAddress))
+ #endif
+
+typedef CALLBACK_API( Boolean , NSLURLFilterProcPtr )(char *url, Str255 displayString)/* optional filter function */;
+/* you can provide for calls to NSLStandardGetURL*/
+typedef CALLBACK_API( void , NSLEventProcPtr )(EventRecord *newEvent, void *userContext)/* optional callback routine for getting Events while the dialog is up */;
+typedef STACK_UPP_TYPE(NSLURLFilterProcPtr) NSLURLFilterUPP;
+typedef STACK_UPP_TYPE(NSLEventProcPtr) NSLEventUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(NSLURLFilterUPP)
+ NewNSLURLFilterUPP (NSLURLFilterProcPtr userRoutine);
+
+ EXTERN_API(NSLEventUPP)
+ NewNSLEventUPP (NSLEventProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeNSLURLFilterUPP (NSLURLFilterUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeNSLEventUPP (NSLEventUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeNSLURLFilterUPP (char * url,
+ Str255 displayString,
+ NSLURLFilterUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeNSLEventUPP (EventRecord * newEvent,
+ void * userContext,
+ NSLEventUPP userUPP);
+
+#else
+ enum { uppNSLURLFilterProcInfo = 0x000003D0 }; /* pascal 1_byte Func(4_bytes, 4_bytes) */
+ enum { uppNSLEventProcInfo = 0x000003C0 }; /* pascal no_return_value Func(4_bytes, 4_bytes) */
+ #define NewNSLURLFilterUPP(userRoutine) (NSLURLFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNSLURLFilterProcInfo, GetCurrentArchitecture())
+ #define NewNSLEventUPP(userRoutine) (NSLEventUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNSLEventProcInfo, GetCurrentArchitecture())
+ #define DisposeNSLURLFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeNSLEventUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeNSLURLFilterUPP(url, displayString, userUPP) (Boolean)CALL_TWO_PARAMETER_UPP((userUPP), uppNSLURLFilterProcInfo, (url), (displayString))
+ #define InvokeNSLEventUPP(newEvent, userContext, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppNSLEventProcInfo, (newEvent), (userContext))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewNSLURLFilterProc(userRoutine) NewNSLURLFilterUPP(userRoutine)
+#define NewNSLEventProc(userRoutine) NewNSLEventUPP(userRoutine)
+#define CallNSLURLFilterProc(userRoutine, url, displayString) InvokeNSLURLFilterUPP(url, displayString, userRoutine)
+#define CallNSLEventProc(userRoutine, newEvent, userContext) InvokeNSLEventUPP(newEvent, userContext, userRoutine)
+
+/*
+ -----------------------------------------------------------------------------
+ High level API calls: the following two calls are ALL an application needs
+ to register/deregister its service.
+ If you use these, you don't need to make any of the other calls to NSLAPI
+ (including NSLOpenNavigationAPI)
+ -----------------------------------------------------------------------------
+*/
+
+/* <--- error code from registration */
+/* ---> urlToRegister is a null terminated url that has only legal characters defined for URLs. Use HexEncodeText to encode*/
+/* portions of the url that have illegal characters */
+/* ---> neighborhoodToRegisterIn is an optional parameter for explicitly defining a neighborhood to register in.
+ If parameter is NULL, then the plugins will determine where to register the service */
+EXTERN_API( NSLError )
+NSLStandardRegisterURL (NSLPath urlToRegister,
+ NSLNeighborhood neighborhoodToRegisterIn) /* can be NULL */;
+
+/* <--- error code from registration */
+/* ---> urlToRegister is a null terminated url that has only legal characters defined for URLs. Use HexEncodeText to encode*/
+/* portions of the url that have illegal characters */
+/* ---> neighborhoodToDeregisterIn is an optional parameter for explicitly defining a neighborhood to register in.
+ If parameter is NULL, then the plugins will determine where to register the service */
+EXTERN_API( NSLError )
+NSLStandardDeregisterURL (NSLPath urlToDeregister,
+ NSLNeighborhood neighborhoodToDeregisterIn) /* can be NULL */;
+
+/* <--- function returns OSStatus of the operation. noErr will be returned if valid, kNSLUserCanceled will be returned if the user cancels */
+/* ---> dialogOptions */
+/* ---> eventProc */
+/* ---> eventProcContextPtr */
+/* ---> filterProc */
+/* ---> serviceTypeList */
+/* <--- userSelectedURL */
+/* NSLDialogOptions* dialogOptions */
+/*
+ dialogOptions is a user defined structure defining the look, feel and operation of NSLStandardGetURL dialog
+ default behavior can be achieved by passing in a pointer to a structure that has been filled out by a previous
+ call to NSLGetDefaultDialogOptions or by passing in NULL.
+*/
+/* NSLEventUPP eventProc */
+/*
+ the eventProc is a callback NSLURLFilterUPP that will
+ get called with Events that the dialog doesn't handle. If you pass in nil,
+ you won't get update events while the NSLStandardGetURL dialog is open.
+*/
+/* void* eventProcContextPtr */
+/* you can provide a pointer to some contextual data that you want to have sent to your eventProc filter*/
+/* NSLURLFilterProcPtr filterProc */
+/*
+ the filter param is a callback NSLURLFilterUPP that
+ will get called (if not nil) for each url that is going to be displayed in
+ the dialog's result list. A result of false will not include the url for the
+ user to select from. You also have the option of handling the way the url looks
+ in the dialog listing by copying the preferred name into the displayString
+ parameter. (If left alone, NSLStandardGetURL dialog will strip the service type
+ portion off the url).
+*/
+/* char* serviceTypeList */
+/*
+ the serviceTypeList parameter is a null terminated string that will
+ directly affect the contents of the services popup in the dialog.
+ The structure of this string is a set of tuples as follows:
+ Name of ServiceType as to be represented in the popup followed by
+ a comma delimted list of service descriptors (ie http,https) that will
+ used in the search of that type. Each comma delimited tuple is delimited
+ by semi-colons.
+*/
+/*
+ For example:
+ If you want to search for services of type http (web), https (secure web),
+ and ftp, you could pass in the string "Web Servers,http,https;FTP Servers,ftp".
+ This would result in a popup list with two items ("Web Servers" and "FTP Servers")
+ and searches performed on them will provide results of type http and https for the
+ first, and ftp for the second.
+*/
+
+/*
+ Results list Icons:
+ NSLStandardGetURL provides icons in its listings for the following types:
+ "http", "https", "ftp", "afp", "lpr", "LaserWriter", "AFPServer"
+ any other types will get a generic icon. However, you can provide icons
+ if you wish by including an '#ics8' resource id at the end of your comma
+ delimited list. The dialog will then use that icon if found in its results
+ list. This icon will be used for all types in a tuple.
+ For example:
+ The param "Web Servers,http,https;Telnet Servers,telnet;NFS Servers,nfs,129"
+ would result in lists of http and https services to be shown with their default
+ icons, telnet servers would be shown with the default misc. icon and nfs
+ servers would be shown with your icon at resource id 129.
+*/
+
+/* char** url */
+/*
+ pass in the address of a char* and it will point to the resulting url. If the user
+ cancels (the function returns false), the pointer will be set to nil. If the function
+ returns true (user selected a url), then you must call NSLFreeURL on the pointer when
+ you are done with it.
+*/
+/*
+ Call this to have the user select a url based service from a dialog.
+ Function takes on input an optional filter proc, a serviceTypeList, and an address to a Ptr.
+ Function sets the value of the Ptr to a newly created c-style null terminated string
+ containing the user's choice of URL.
+*/
+
+EXTERN_API( OSStatus )
+NSLStandardGetURL (NSLDialogOptions * dialogOptions, /* can be NULL */
+ NSLEventUPP eventProc, /* can be NULL */
+ void * eventProcContextPtr, /* can be NULL */
+ NSLURLFilterUPP filterProc, /* can be NULL */
+ char * serviceTypeList,
+ char ** userSelectedURL);
+
+/*-----------------------------------------------------------------------------*/
+
+EXTERN_API( OSStatus )
+NSLHexEncodeText (const char * rawText,
+ UInt16 rawTextLen,
+ char * newTextBuffer,
+ UInt16 * newTextBufferLen,
+ Boolean * textChanged);
+
+EXTERN_API( OSStatus )
+NSLHexDecodeText (const char * encodedText,
+ UInt16 encodedTextLen,
+ char * decodedTextBuffer,
+ UInt16 * decodedTextBufferLen,
+ Boolean * textChanged);
+
+EXTERN_API( OSStatus )
+NSLGetDefaultDialogOptions (NSLDialogOptions * dialogOptions);
+
+/* <--- function returns null (useful for setting variable at same time as freeing it */
+/* ---> url is memory created by a call to NSLStandardGetURL */
+EXTERN_API( char *)
+NSLFreeURL (char * url);
+
+/*
+ -----------------------------------------------------------------------------
+ Basic API Utility calls: sufficient to create, and parse data structures
+ -----------------------------------------------------------------------------
+*/
+
+EXTERN_API( NSLServicesList )
+NSLMakeNewServicesList (const char * initialServiceList);
+
+EXTERN_API( NSLError )
+NSLAddServiceToServicesList (NSLServicesList serviceList,
+ NSLServiceType serviceType);
+
+EXTERN_API( void )
+NSLDisposeServicesList (NSLServicesList theList);
+
+/*
+ The name reflects the name of the Neighborhood, i.e. "apple.com." or "AppleTalk Zone One".
+ The protocolList is a comma delimited list of protocols that the Neighborhood might exist in.
+ If the user passes in NULL, then all protocols will be queried. The result must be disposed
+ of by the user by calling NSLFreeNeighborhood.
+*/
+EXTERN_API( NSLNeighborhood )
+NSLMakeNewNeighborhood (const char * name,
+ const char * protocolList) /* can be NULL */;
+
+/* creates an exact copy of an existing neighborhood */
+EXTERN_API( NSLNeighborhood )
+NSLCopyNeighborhood (NSLNeighborhood neighborhood);
+
+EXTERN_API( NSLNeighborhood )
+NSLFreeNeighborhood (NSLNeighborhood neighborhood);
+
+EXTERN_API( void )
+NSLGetNameFromNeighborhood (NSLNeighborhood neighborhood,
+ char ** name,
+ long * length);
+
+/*
+ create a block of formatted data, pointed to by newDataPtr. This will be used
+ in calls (typically request-related calls) for plug-ins that handle the NSL data type.
+*/
+EXTERN_API( OSStatus )
+NSLMakeServicesRequestPB (NSLServicesList serviceList,
+ NSLTypedDataPtr * newDataPtr);
+
+/* releases any storage created with MakeXXXPB calls, associated with TypedData.*/
+EXTERN_API( NSLTypedDataPtr )
+NSLFreeTypedDataPtr (NSLTypedDataPtr nslTypeData);
+
+/*
+ utility function that returns whether a url was found, a pointer to the beginning
+ of the url, and the length of the URL.
+*/
+EXTERN_API( Boolean )
+NSLGetNextUrl (NSLClientAsyncInfoPtr infoPtr,
+ char ** urlPtr,
+ long * urlLength);
+
+/*
+ utility function that returns whether a Neighborhood was found, a pointer to the beginning
+ of the Neighborhood, and the length of the Neighborhood.
+*/
+EXTERN_API( Boolean )
+NSLGetNextNeighborhood (NSLClientAsyncInfoPtr infoPtr,
+ NSLNeighborhood * neighborhood,
+ long * neighborhoodLength);
+
+
+/*
+ NSLErrorToString: convert a numeric error code to its string equivalent. Caller must
+ have allocated sufficient space to store both strings. (Max 255 chars each)
+
+ The errorString parameter will return a textual explanation of what is wrong,
+ while the solutionString returns a possible solution to get around the problem
+*/
+
+EXTERN_API( OSStatus )
+NSLErrorToString (NSLError theErr,
+ char * errorString,
+ char * solutionString);
+
+
+/*
+ -----------------------------------------------------------------------------
+ Basic API calls: sufficient to create simple requests, and receive answers
+ -----------------------------------------------------------------------------
+*/
+
+EXTERN_API( OSStatus )
+NSLOpenNavigationAPI (NSLClientRef * newRef);
+
+EXTERN_API( void )
+NSLCloseNavigationAPI (NSLClientRef theClient);
+
+/*
+ NSLPrepareRequest: creates an NSLRequestRef, sets up some internal data
+ notifier is an NSLClientNotifyUPP that will be called when data is available, when the lookup has
+ completed, or if an error occurs. When the notifier is called, the cookie will be the NSLRequestRef.
+ If notifier is NULL, then the NSLManager will assume that the request is made synchronously. This
+ should only be used while in a separate thread, so that the client app can still process events, etc.
+
+ contextPtr is a void* which is passed as the contextPtr argument when the notifier is called.
+
+ upon exit:
+ 1) ref will contain a pointer to a NSLRequestRef which must be passed to all other functions
+ which require a NSLRequestRef.
+ 2) infoPtr will point to a newly created ClientAsycnInfoPtr which will be disposed by the manager when the search is completed
+ NOTE: Only one search can be running at a time per clientRef.
+*/
+
+EXTERN_API( NSLError )
+NSLPrepareRequest (NSLClientNotifyUPP notifier,
+ void * contextPtr,
+ NSLClientRef theClient,
+ NSLRequestRef * ref,
+ char * bufPtr,
+ unsigned long bufLen,
+ NSLClientAsyncInfoPtr * infoPtr);
+
+
+/*
+ NSLStartNeighborhoodLookup: looking for neighborhoods associated with or neighboring a particular neighborhood
+ Passing in NULL for neighborhood will generate a list of a default neighborhood(s)
+
+*/
+
+EXTERN_API( NSLError )
+NSLStartNeighborhoodLookup (NSLRequestRef ref,
+ NSLNeighborhood neighborhood,
+ NSLClientAsyncInfo * asyncInfo);
+
+/*
+ NSLStartServicesLookup: starts looking for entities if the specified type in the specified neighborhood
+
+*/
+
+EXTERN_API( NSLError )
+NSLStartServicesLookup (NSLRequestRef ref,
+ NSLNeighborhood neighborhood,
+ NSLTypedDataPtr requestData,
+ NSLClientAsyncInfo * asyncInfo);
+
+
+/* NSLContinueLookup: continues a paused/outstanding lookup*/
+
+EXTERN_API( NSLError )
+NSLContinueLookup (NSLClientAsyncInfo * asyncInfo);
+
+
+/* NSLCancelRequest: cancels an ongoing search*/
+
+EXTERN_API( NSLError )
+NSLCancelRequest (NSLRequestRef ref);
+
+/*
+ NSLDeleteRequest: deletes info associated with this ref. The ClientAsyncInfoPtr will no longer be valid
+ This must be called when the client is no longer using this requestRef.
+*/
+
+EXTERN_API( NSLError )
+NSLDeleteRequest (NSLRequestRef ref);
+
+
+/*
+ -----------------------------------------------------------------------------
+ Utility API calls: use these accessors to manipulate NSL's typed data
+ -----------------------------------------------------------------------------
+*/
+
+/* NSLParseServicesRequestPB provides the inverse of NSLMakeRequestPB, filling out the offsets found within newDataPtr*/
+/* <--- returns an OSStatus if any errors occur parsing the data */
+/* <--- newDataPtr is the construct passed to the plugin */
+/* ---> serviceListPtr is the address of a pointer which will be set to point at the portion of the newDataPtr that holds the serviceList to be searched */
+/* ---> serviceListLen is the length of the serviceListPtr data pointed to by serviceListPtr */
+EXTERN_API( OSStatus )
+NSLParseServicesRequestPB (NSLTypedDataPtr newDataPtr,
+ char ** serviceListPtr,
+ UInt16 * serviceListLen);
+
+
+/* NSLParseServiceRegistrationPB provides for breaking apart a registration request from a client to a plugin*/
+/* <--- returns an OSStatus if any errors occur parsing the data */
+/* <--- newDataPtr is the construct passed to the plugin */
+/* ---> neighborhoodPtr gets set to point at the portion of the newDataPtr that contains the neighborhood */
+/* ---> neighborhoodLen is the length of the neighborhood pointed to by neighborhoodPtr */
+/* ---> urlPtr is the address of a pointer which will be set to point at the portion of the newDataPtr that holds the url to be registered */
+/* ---> urlLen is the length of the url data pointed to by urlPtr */
+EXTERN_API( OSStatus )
+NSLParseServiceRegistrationPB (NSLTypedDataPtr newDataPtr,
+ NSLNeighborhood * neighborhoodPtr,
+ UInt16 * neighborhoodLen,
+ char ** urlPtr,
+ UInt16 * urlLen);
+
+/*
+ NSLGetErrorStringsFromResource makes a basic assumption!
+ errorString and solutionString both point to valid memory of at least 256 bytes!
+*/
+/* <--- returns an OSStatus if any errors occur */
+/* ---> theErr is an OSStatus to be matched against a resource list of errors */
+/* ---> fileSpecPtr is a FSSpecPtr to the resource containing the list of errors */
+/* ---> errorResID is the resourceID of the NSLI resource of the list of errors */
+/* <--> errorString is a pointer to valid memory of at least 256 bytes which will be filled out by the error portion of the error string */
+/* <--> solutionString is a pointer to valid memory of at least 256 bytes which will be filled out by the solution portion of the error string */
+EXTERN_API( OSStatus )
+NSLGetErrorStringsFromResource (OSStatus theErr,
+ const FSSpec * fileSpecPtr,
+ SInt16 errorResID,
+ char * errorString,
+ char * solutionString);
+
+/* <--- Returns true if given service is in the given service list */
+/* ---> serviceList is a valid NSLServicesList containing information about services to be searched */
+/* ---> svcToFind is an NSLServiceType of a particular service to check if it is in the serviceList */
+EXTERN_API( Boolean )
+NSLServiceIsInServiceList (NSLServicesList serviceList,
+ NSLServiceType svcToFind);
+
+/* <--- returns an OSStatus if any errors occur parsing the data */
+/* ---> svcString is the address of a pointer which will be set to point at the portion of theURL that holds the serviceType of theURL */
+/* ---> svcLen is the length of the serviceType pointed to by svcString */
+EXTERN_API( OSStatus )
+NSLGetServiceFromURL (char * theURL,
+ char ** svcString,
+ UInt16 * svcLen);
+
+/* <--- returns the length of a Neighborhood data structure */
+/* ---> neighborhood is a valid NSLNeighborhood */
+EXTERN_API( long )
+NSLGetNeighborhoodLength (NSLNeighborhood neighborhood);
+
+/*
+ -------------------------------------------------------------------------------------
+ Utility API calls: use these routines to separate plugin threads from client threads
+ -------------------------------------------------------------------------------------
+*/
+
+/* this routine works the same as the Thread manager's routine NewThread, except */
+/* that the thread is added to the NSL manager's thread list. */
+EXTERN_API( OSErr )
+NSLNewThread (ThreadStyle threadStyle,
+ ThreadEntryProcPtr threadEntry,
+ void * threadParam,
+ Size stackSize,
+ ThreadOptions options,
+ void ** threadResult,
+ ThreadID * threadMade);
+
+/* this routine works the same as the Thread manager's routine DisposeThread, except */
+/* that the thread is removed from the NSL manager's thread list. */
+EXTERN_API( OSErr )
+NSLDisposeThread (ThreadID threadToDump,
+ void * threadResult,
+ Boolean recycleThread);
+
+#if OLDROUTINENAMES
+
+typedef NSLClientAsyncInfo ClientAsyncInfo;
+typedef NSLPluginAsyncInfo PluginAsyncInfo;
+typedef NSLTypedData TypedData;
+typedef NSLPluginData PluginData;
+typedef NSLClientAsyncInfoPtr ClientAsyncInfoPtr;
+typedef NSLPluginAsyncInfoPtr PluginAsyncInfoPtr;
+typedef NSLTypedDataPtr TypedDataPtr;
+typedef NSLPluginDataPtr PluginDataPtr;
+
+#endif /* OLDROUTINENAMES */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __NSL__ */
+
diff --git a/include/qt/NSLUtility.h b/include/qt/NSLUtility.h
new file mode 100644
index 000000000..7eef58c02
--- /dev/null
+++ b/include/qt/NSLUtility.h
@@ -0,0 +1,25 @@
+/*
+ File: NSLUtility.h
+
+ Contains: Interface to API for using the NSL Manager
+
+ Version: Technology: Mac OS 8.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __NSLUTILITY__
+#define __NSLUTILITY__
+
+
+// This file is obsolete. Please delete it from your sources.
+
+
+#endif /* __NSLUTILITY__ */
+
diff --git a/include/qt/NameRegistry.h b/include/qt/NameRegistry.h
new file mode 100644
index 000000000..bae17773b
--- /dev/null
+++ b/include/qt/NameRegistry.h
@@ -0,0 +1,539 @@
+/*
+ File: NameRegistry.h
+
+ Contains: NameRegistry Interfaces
+
+ Version: Technology: MacOS
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1993-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __NAMEREGISTRY__
+#define __NAMEREGISTRY__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*******************************************************************************
+ *
+ * Foundation Types
+ *
+ */
+/* Value of a property */
+typedef void * RegPropertyValue;
+/* Length of property value */
+typedef UInt32 RegPropertyValueSize;
+/*******************************************************************************
+ *
+ * RegEntryID : The Global x-Namespace Entry Identifier
+ *
+ */
+
+struct RegEntryID {
+ UInt32 contents[4];
+};
+typedef struct RegEntryID RegEntryID;
+typedef RegEntryID * RegEntryIDPtr;
+/*******************************************************************************
+ *
+ * Root Entry Name Definitions (Applies to all Names in the RootNameSpace)
+ *
+ * o Names are a colon-separated list of name components. Name components
+ * may not themselves contain colons.
+ * o Names are presented as null-terminated ASCII character strings.
+ * o Names follow similar parsing rules to Apple file system absolute
+ * and relative paths. However the '::' parent directory syntax is
+ * not currently supported.
+ */
+/* Max length of Entry Name */
+enum {
+ kRegCStrMaxEntryNameLength = 47
+};
+
+/* Entry Names are single byte ASCII */
+
+typedef char RegCStrEntryName;
+typedef char * RegCStrEntryNamePtr;
+/* length of RegCStrEntryNameBuf = kRegCStrMaxEntryNameLength+1*/
+typedef char RegCStrEntryNameBuf[48];
+typedef char RegCStrPathName;
+typedef UInt32 RegPathNameSize;
+enum {
+ kRegPathNameSeparator = ':', /* 0x3A */
+ kRegEntryNameTerminator = 0x00, /* '\0' */
+ kRegPathNameTerminator = 0x00 /* '\0' */
+};
+
+/*******************************************************************************
+ *
+ * Property Name and ID Definitions
+ * (Applies to all Properties Regardless of NameSpace)
+ */
+enum {
+ kRegMaximumPropertyNameLength = 31, /* Max length of Property Name */
+ kRegPropertyNameTerminator = 0x00 /* '\0' */
+};
+
+typedef char RegPropertyNameBuf[32];
+typedef char RegPropertyName;
+typedef char * RegPropertyNamePtr;
+/*******************************************************************************
+ *
+ * Iteration Operations
+ *
+ * These specify direction when traversing the name relationships
+ */
+typedef UInt32 RegIterationOp;
+typedef RegIterationOp RegEntryIterationOp;
+enum {
+ /* Absolute locations*/
+ kRegIterRoot = 0x00000002, /* "Upward" Relationships */
+ kRegIterParents = 0x00000003, /* include all parent(s) of entry */
+ /* "Downward" Relationships*/
+ kRegIterChildren = 0x00000004, /* include all children */
+ kRegIterSubTrees = 0x00000005, /* include all sub trees of entry */
+ kRegIterDescendants = 0x00000005, /* include all descendants of entry */
+ /* "Horizontal" Relationships */
+ kRegIterSibling = 0x00000006, /* include all siblings */
+ /* Keep doing the same thing*/
+ kRegIterContinue = 0x00000001
+};
+
+/*******************************************************************************
+ *
+ * Name Entry and Property Modifiers
+ *
+ *
+ *
+ * Modifiers describe special characteristics of names
+ * and properties. Modifiers might be supported for
+ * some names and not others.
+ *
+ * Device Drivers should not rely on functionality
+ * specified as a modifier.
+ */
+typedef UInt32 RegModifiers;
+typedef RegModifiers RegEntryModifiers;
+typedef RegModifiers RegPropertyModifiers;
+enum {
+ kRegNoModifiers = 0x00000000, /* no entry modifiers in place */
+ kRegUniversalModifierMask = 0x0000FFFF, /* mods to all entries */
+ kRegNameSpaceModifierMask = 0x00FF0000, /* mods to all entries within namespace */
+ kRegModifierMask = (long)0xFF000000 /* mods to just this entry */
+};
+
+/* Universal Property Modifiers */
+enum {
+ kRegPropertyValueIsSavedToNVRAM = 0x00000020, /* property is non-volatile (saved in NVRAM) */
+ kRegPropertyValueIsSavedToDisk = 0x00000040 /* property is non-volatile (saved on disk) */
+};
+
+/* NameRegistry version, Gestalt/PEF-style -- MUST BE KEPT IN SYNC WITH MAKEFILE !! */
+enum {
+ LatestNR_PEFVersion = 0x01030000 /* latest NameRegistryLib version (Gestalt/PEF-style) */
+};
+
+/* ///////////////////////
+//
+// The Registry API
+//
+/////////////////////// */
+/* NameRegistry dispatch indexes */
+enum {
+ kSelectRegistryEntryIDInit = 0,
+ kSelectRegistryEntryIDCompare = 1,
+ kSelectRegistryEntryIDCopy = 2,
+ kSelectRegistryEntryIDDispose = 3,
+ kSelectRegistryCStrEntryCreate = 4,
+ kSelectRegistryEntryDelete = 5,
+ kSelectRegistryEntryCopy = 6,
+ kSelectRegistryEntryIterateCreate = 7,
+ kSelectRegistryEntryIterateDispose = 8,
+ kSelectRegistryEntryIterateSet = 9,
+ kSelectRegistryEntryIterate = 10,
+ kSelectRegistryEntrySearch = 11,
+ kSelectRegistryCStrEntryLookup = 12,
+ kSelectRegistryEntryToPathSize = 13,
+ kSelectRegistryCStrEntryToPath = 14,
+ kSelectRegistryCStrEntryToName = 15,
+ kSelectRegistryPropertyCreate = 16,
+ kSelectRegistryPropertyDelete = 17,
+ kSelectRegistryPropertyRename = 18,
+ kSelectRegistryPropertyIterateCreate = 19,
+ kSelectRegistryPropertyIterateDispose = 20,
+ kSelectRegistryPropertyIterate = 21,
+ kSelectRegistryPropertyGetSize = 22,
+ kSelectRegistryPropertyGet = 23,
+ kSelectRegistryPropertySet = 24,
+ kSelectRegistryEntryGetMod = 25,
+ kSelectRegistryEntrySetMod = 26,
+ kSelectRegistryPropertyGetMod = 27,
+ kSelectRegistryPropertySetMod = 28,
+ kSelectRegistryEntryMod = 29,
+ kSelectRegistryEntryPropertyMod = 30, /* if you add more selectors here, remember to change 'kSelectRegistryHighestSelector' below*/
+ kSelectRegistryHighestSelector = kSelectRegistryEntryPropertyMod
+};
+
+
+/* ///////////////////////
+//
+// Entry Management
+//
+/////////////////////// */
+
+/*-------------------------------
+ * EntryID handling
+ */
+/*
+ * Initialize an EntryID to a known invalid state
+ * note: invalid != uninitialized
+ */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+RegistryEntryIDInit (RegEntryID * id) TWOWORDINLINE(0x7000, 0xABE9);
+
+/*
+ * Compare EntryID's for equality or if invalid
+ *
+ * If a NULL value is given for either id1 or id2, the other id
+ * is compared with an invalid ID. If both are NULL, the id's
+ * are consided equal (result = true).
+ */
+EXTERN_API_C( Boolean )
+RegistryEntryIDCompare (const RegEntryID * id1,
+ const RegEntryID * id2) TWOWORDINLINE(0x7001, 0xABE9);
+
+/*
+ * Copy an EntryID
+ */
+EXTERN_API_C( OSStatus )
+RegistryEntryIDCopy (const RegEntryID * src,
+ RegEntryID * dst) TWOWORDINLINE(0x7002, 0xABE9);
+
+/*
+ * Free an ID so it can be reused.
+ */
+EXTERN_API_C( OSStatus )
+RegistryEntryIDDispose (RegEntryID * id) TWOWORDINLINE(0x7003, 0xABE9);
+
+/*-------------------------------
+ * Adding and removing entries
+ *
+ * If (parentEntry) is NULL, the name is assumed
+ * to be a rooted path. It is rooted to an anonymous, unnamed root.
+ */
+EXTERN_API_C( OSStatus )
+RegistryCStrEntryCreate (const RegEntryID * parentEntry,
+ const RegCStrPathName * name,
+ RegEntryID * newEntry) TWOWORDINLINE(0x7004, 0xABE9);
+
+EXTERN_API_C( OSStatus )
+RegistryEntryDelete (const RegEntryID * id) TWOWORDINLINE(0x7005, 0xABE9);
+
+EXTERN_API_C( OSStatus )
+RegistryEntryCopy (RegEntryID * parentEntryID,
+ RegEntryID * sourceDevice,
+ RegEntryID * destDevice) TWOWORDINLINE(0x7006, 0xABE9);
+
+/*---------------------------
+ * Traversing the namespace
+ *
+ * To support arbitrary namespace implementations in the future,
+ * I have hidden the form that the place pointer takes. The previous
+ * interface exposed the place pointer by specifying it as a
+ * RegEntryID.
+ *
+ * I have also removed any notion of returning the entries
+ * in a particular order, because an implementation might
+ * return the names in semi-random order. Many name service
+ * implementations will store the names in a hashed lookup
+ * table.
+ *
+ * Writing code to traverse some set of names consists of
+ * a call to begin the iteration, the iteration loop, and
+ * a call to end the iteration. The begin call initializes
+ * the iteration cookie data structure. The call to end the
+ * iteration should be called even in the case of error so
+ * that allocated data structures can be freed.
+ *
+ * Create(...)
+ * do {
+ * Iterate(...);
+ * } while (!done);
+ * Dispose(...);
+ *
+ * This is the basic code structure for callers of the iteration
+ * interface.
+ */
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef struct OpaqueRegEntryIter* RegEntryIter;
+/*
+ * create/dispose the iterator structure
+ * defaults to root with relationship = kRegIterDescendants
+ */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+RegistryEntryIterateCreate (RegEntryIter * cookie) TWOWORDINLINE(0x7007, 0xABE9);
+
+EXTERN_API_C( OSStatus )
+RegistryEntryIterateDispose (RegEntryIter * cookie) TWOWORDINLINE(0x7008, 0xABE9);
+
+/*
+ * set Entry Iterator to specified entry
+ */
+EXTERN_API_C( OSStatus )
+RegistryEntryIterateSet (RegEntryIter * cookie,
+ const RegEntryID * startEntryID) TWOWORDINLINE(0x7009, 0xABE9);
+
+/*
+ * Return each value of the iteration
+ *
+ * return entries related to the current entry
+ * with the specified relationship
+ */
+EXTERN_API_C( OSStatus )
+RegistryEntryIterate (RegEntryIter * cookie,
+ RegEntryIterationOp relationship,
+ RegEntryID * foundEntry,
+ Boolean * done) TWOWORDINLINE(0x700A, 0xABE9);
+
+/*
+ * return entries with the specified property
+ *
+ * A NULL RegPropertyValue pointer will return an
+ * entry with the property containing any value.
+ */
+EXTERN_API_C( OSStatus )
+RegistryEntrySearch (RegEntryIter * cookie,
+ RegEntryIterationOp relationship,
+ RegEntryID * foundEntry,
+ Boolean * done,
+ const RegPropertyName * propertyName,
+ const void * propertyValue,
+ RegPropertyValueSize propertySize) TWOWORDINLINE(0x700B, 0xABE9);
+
+/*--------------------------------
+ * Find a name in the namespace
+ *
+ * This is the fast lookup mechanism.
+ * NOTE: A reverse lookup mechanism
+ * has not been provided because
+ * some name services may not
+ * provide a fast, general reverse
+ * lookup.
+ */
+EXTERN_API_C( OSStatus )
+RegistryCStrEntryLookup (const RegEntryID * searchPointID,
+ const RegCStrPathName * pathName,
+ RegEntryID * foundEntry) TWOWORDINLINE(0x700C, 0xABE9);
+
+/*---------------------------------------------
+ * Convert an entry to a rooted name string
+ *
+ * A utility routine to turn an Entry ID
+ * back into a name string.
+ */
+EXTERN_API_C( OSStatus )
+RegistryEntryToPathSize (const RegEntryID * entryID,
+ RegPathNameSize * pathSize) TWOWORDINLINE(0x700D, 0xABE9);
+
+EXTERN_API_C( OSStatus )
+RegistryCStrEntryToPath (const RegEntryID * entryID,
+ RegCStrPathName * pathName,
+ RegPathNameSize pathSize) TWOWORDINLINE(0x700E, 0xABE9);
+
+/*
+ * Parse a path name.
+ *
+ * Retrieve the last component of the path, and
+ * return a spec for the parent.
+ */
+EXTERN_API_C( OSStatus )
+RegistryCStrEntryToName (const RegEntryID * entryID,
+ RegEntryID * parentEntry,
+ RegCStrEntryName * nameComponent,
+ Boolean * done) TWOWORDINLINE(0x700F, 0xABE9);
+
+/* //////////////////////////////////////////////////////
+//
+// Property Management
+//
+////////////////////////////////////////////////////// */
+/*-------------------------------
+ * Adding and removing properties
+ */
+EXTERN_API_C( OSStatus )
+RegistryPropertyCreate (const RegEntryID * entryID,
+ const RegPropertyName * propertyName,
+ const void * propertyValue,
+ RegPropertyValueSize propertySize) TWOWORDINLINE(0x7010, 0xABE9);
+
+EXTERN_API_C( OSStatus )
+RegistryPropertyDelete (const RegEntryID * entryID,
+ const RegPropertyName * propertyName) TWOWORDINLINE(0x7011, 0xABE9);
+
+EXTERN_API_C( OSStatus )
+RegistryPropertyRename (const RegEntryID * entry,
+ const RegPropertyName * oldName,
+ const RegPropertyName * newName) TWOWORDINLINE(0x7012, 0xABE9);
+
+/*---------------------------
+ * Traversing the Properties of a name
+ *
+ */
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef struct OpaqueRegPropertyIter* RegPropertyIter;
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+RegistryPropertyIterateCreate (const RegEntryID * entry,
+ RegPropertyIter * cookie) TWOWORDINLINE(0x7013, 0xABE9);
+
+EXTERN_API_C( OSStatus )
+RegistryPropertyIterateDispose (RegPropertyIter * cookie) TWOWORDINLINE(0x7014, 0xABE9);
+
+EXTERN_API_C( OSStatus )
+RegistryPropertyIterate (RegPropertyIter * cookie,
+ RegPropertyName * foundProperty,
+ Boolean * done) TWOWORDINLINE(0x7015, 0xABE9);
+
+/*
+ * Get the value of the specified property for the specified entry.
+ *
+ */
+EXTERN_API_C( OSStatus )
+RegistryPropertyGetSize (const RegEntryID * entryID,
+ const RegPropertyName * propertyName,
+ RegPropertyValueSize * propertySize) TWOWORDINLINE(0x7016, 0xABE9);
+
+/*
+ * (*propertySize) is the maximum size of the value returned in the buffer
+ * pointed to by (propertyValue). Upon return, (*propertySize) is the size of the
+ * value returned.
+ */
+EXTERN_API_C( OSStatus )
+RegistryPropertyGet (const RegEntryID * entryID,
+ const RegPropertyName * propertyName,
+ void * propertyValue,
+ RegPropertyValueSize * propertySize) TWOWORDINLINE(0x7017, 0xABE9);
+
+EXTERN_API_C( OSStatus )
+RegistryPropertySet (const RegEntryID * entryID,
+ const RegPropertyName * propertyName,
+ const void * propertyValue,
+ RegPropertyValueSize propertySize) TWOWORDINLINE(0x7018, 0xABE9);
+
+/* //////////////////////////////////////////////////////
+//
+// Modifier Management
+//
+////////////////////////////////////////////////////// */
+/*
+ * Modifiers describe special characteristics of names
+ * and properties. Modifiers might be supported for
+ * some names and not others.
+ *
+ * Device Drivers should not rely on functionality
+ * specified as a modifier. These interfaces
+ * are for use in writing Experts.
+ */
+/*
+ * Get and Set operators for entry modifiers
+ */
+EXTERN_API_C( OSStatus )
+RegistryEntryGetMod (const RegEntryID * entry,
+ RegEntryModifiers * modifiers) TWOWORDINLINE(0x7019, 0xABE9);
+
+EXTERN_API_C( OSStatus )
+RegistryEntrySetMod (const RegEntryID * entry,
+ RegEntryModifiers modifiers) TWOWORDINLINE(0x701A, 0xABE9);
+
+/*
+ * Get and Set operators for property modifiers
+ */
+EXTERN_API_C( OSStatus )
+RegistryPropertyGetMod (const RegEntryID * entry,
+ const RegPropertyName * name,
+ RegPropertyModifiers * modifiers) TWOWORDINLINE(0x701B, 0xABE9);
+
+EXTERN_API_C( OSStatus )
+RegistryPropertySetMod (const RegEntryID * entry,
+ const RegPropertyName * name,
+ RegPropertyModifiers modifiers) TWOWORDINLINE(0x701C, 0xABE9);
+
+/*
+ * Iterator operator for entry modifier search
+ */
+EXTERN_API_C( OSStatus )
+RegistryEntryMod (RegEntryIter * cookie,
+ RegEntryIterationOp relationship,
+ RegEntryID * foundEntry,
+ Boolean * done,
+ RegEntryModifiers matchingModifiers) TWOWORDINLINE(0x701D, 0xABE9);
+
+/*
+ * Iterator operator for entries with matching
+ * property modifiers
+ */
+EXTERN_API_C( OSStatus )
+RegistryEntryPropertyMod (RegEntryIter * cookie,
+ RegEntryIterationOp relationship,
+ RegEntryID * foundEntry,
+ Boolean * done,
+ RegPropertyModifiers matchingModifiers) TWOWORDINLINE(0x701E, 0xABE9);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __NAMEREGISTRY__ */
+
diff --git a/include/qt/Navigation.h b/include/qt/Navigation.h
new file mode 100644
index 000000000..aad321a46
--- /dev/null
+++ b/include/qt/Navigation.h
@@ -0,0 +1,586 @@
+/*
+ File: Navigation.h
+
+ Contains: Navigation Services Interfaces
+
+ Version: Technology: Navigation 2.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1996-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __NAVIGATION__
+#define __NAVIGATION__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __APPLEEVENTS__
+#include "AppleEvents.h"
+#endif
+
+#ifndef __TRANSLATION__
+#include "Translation.h"
+#endif
+
+#ifndef __MACWINDOWS__
+#include "MacWindows.h"
+#endif
+
+#ifndef __CODEFRAGMENTS__
+#include "CodeFragments.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ kNavDialogOptionsVersion = 0,
+ kNavReplyRecordVersion = 0,
+ kNavCBRecVersion = 0,
+ kNavFileOrFolderVersion = 1,
+ kNavMenuItemSpecVersion = 0
+};
+
+typedef UInt16 NavDataVersion;
+
+typedef UInt32 NavAskSaveChangesAction;
+enum {
+ /* input action codes for NavAskSaveChanges() */
+ kNavSaveChangesClosingDocument = 1,
+ kNavSaveChangesQuittingApplication = 2,
+ kNavSaveChangesOther = 0
+};
+
+
+
+typedef UInt32 NavAskSaveChangesResult;
+enum {
+ /* result codes for NavAskSaveChanges() */
+ kNavAskSaveChangesSave = 1,
+ kNavAskSaveChangesCancel = 2,
+ kNavAskSaveChangesDontSave = 3
+};
+
+
+
+typedef UInt32 NavAskDiscardChangesResult;
+enum {
+ /* result codes for NavAskDiscardChanges() */
+ kNavAskDiscardChanges = 1,
+ kNavAskDiscardChangesCancel = 2
+};
+
+
+
+typedef SInt16 NavFilterModes;
+enum {
+ /* which elements are being filtered for objects: */
+ kNavFilteringBrowserList = 0,
+ kNavFilteringFavorites = 1,
+ kNavFilteringRecents = 2,
+ kNavFilteringShortCutVolumes = 3,
+ kNavFilteringLocationPopup = 4 /* for v1.1 or greater */
+};
+
+
+
+struct NavFileOrFolderInfo {
+ UInt16 version;
+ Boolean isFolder;
+ Boolean visible;
+ UInt32 creationDate;
+ UInt32 modificationDate;
+ union {
+ struct {
+ Boolean locked; /* file is locked */
+ Boolean resourceOpen; /* resource fork is opened */
+ Boolean dataOpen; /* data fork is opened */
+ Boolean reserved1;
+ UInt32 dataSize; /* size of the data fork */
+ UInt32 resourceSize; /* size of the resource fork */
+ FInfo finderInfo; /* more file info: */
+ FXInfo finderXInfo;
+ } fileInfo;
+ struct {
+ Boolean shareable;
+ Boolean sharePoint;
+ Boolean mounted;
+ Boolean readable;
+ Boolean writeable;
+ Boolean reserved2;
+ UInt32 numberOfFiles;
+ DInfo finderDInfo;
+ DXInfo finderDXInfo;
+ OSType folderType;
+ OSType folderCreator;
+ char reserved3[206];
+ } folderInfo;
+
+ } fileAndFolder;
+};
+typedef struct NavFileOrFolderInfo NavFileOrFolderInfo;
+
+union NavEventDataInfo {
+ EventRecord * event; /* for event processing */
+ void * param; /* points to event specific data */
+};
+typedef union NavEventDataInfo NavEventDataInfo;
+
+struct NavEventData {
+ NavEventDataInfo eventDataParms; /* the event data */
+ SInt16 itemHit; /* the dialog item number, for v1.1 or greater */
+};
+typedef struct NavEventData NavEventData;
+
+typedef UInt32 NavContext;
+
+struct NavCBRec {
+ UInt16 version;
+ NavContext context; /* used by customization code to call Navigation Services */
+ WindowPtr window; /* the dialog */
+ Rect customRect; /* local coordinate rectangle of customization area */
+ Rect previewRect; /* local coordinate rectangle of the preview area */
+ NavEventData eventData;
+ char reserved[222];
+};
+typedef struct NavCBRec NavCBRec;
+typedef NavCBRec * NavCBRecPtr;
+enum {
+ kNavCBEvent = 0, /* an event has occurred (update, idle events, etc.) */
+ kNavCBCustomize = 1, /* protocol for negotiating customization space */
+ kNavCBStart = 2, /* the navigation dialog is starting up */
+ kNavCBTerminate = 3, /* the navigation dialog is closing down */
+ kNavCBAdjustRect = 4, /* the navigation dialog is being resized */
+ kNavCBNewLocation = 5, /* user has chosen a new location in the browser */
+ kNavCBShowDesktop = 6, /* user has navigated to the desktop */
+ kNavCBSelectEntry = 7, /* user has made a selection in the browser */
+ kNavCBPopupMenuSelect = 8, /* signifies that a popup menu selection was made */
+ kNavCBAccept = 9, /* user has accepted the navigation dialog */
+ kNavCBCancel = 10, /* user has cancelled the navigation dialog */
+ kNavCBAdjustPreview = 11, /* preview button was clicked or the preview was resized */
+ kNavCBOpenSelection = (long)0x80000000 /* user has opened or chosen an object, v2.0 or greater */
+};
+
+
+typedef SInt32 NavEventCallbackMessage;
+typedef void * NavCallBackUserData;
+/* for events and customization: */
+typedef CALLBACK_API( void , NavEventProcPtr )(NavEventCallbackMessage callBackSelector, NavCBRecPtr callBackParms, void *callBackUD);
+/* for preview support: */
+typedef CALLBACK_API( Boolean , NavPreviewProcPtr )(NavCBRecPtr callBackParms, void *callBackUD);
+/* filtering callback information: */
+typedef CALLBACK_API( Boolean , NavObjectFilterProcPtr )(AEDesc *theItem, void *info, void *callBackUD, NavFilterModes filterMode);
+typedef STACK_UPP_TYPE(NavEventProcPtr) NavEventUPP;
+typedef STACK_UPP_TYPE(NavPreviewProcPtr) NavPreviewUPP;
+typedef STACK_UPP_TYPE(NavObjectFilterProcPtr) NavObjectFilterUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(NavEventUPP)
+ NewNavEventUPP (NavEventProcPtr userRoutine);
+
+ EXTERN_API(NavPreviewUPP)
+ NewNavPreviewUPP (NavPreviewProcPtr userRoutine);
+
+ EXTERN_API(NavObjectFilterUPP)
+ NewNavObjectFilterUPP (NavObjectFilterProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeNavEventUPP (NavEventUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeNavPreviewUPP (NavPreviewUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeNavObjectFilterUPP (NavObjectFilterUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeNavEventUPP (NavEventCallbackMessage callBackSelector,
+ NavCBRecPtr callBackParms,
+ void * callBackUD,
+ NavEventUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeNavPreviewUPP (NavCBRecPtr callBackParms,
+ void * callBackUD,
+ NavPreviewUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeNavObjectFilterUPP (AEDesc * theItem,
+ void * info,
+ void * callBackUD,
+ NavFilterModes filterMode,
+ NavObjectFilterUPP userUPP);
+
+#else
+ enum { uppNavEventProcInfo = 0x00000FC0 }; /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppNavPreviewProcInfo = 0x000003D0 }; /* pascal 1_byte Func(4_bytes, 4_bytes) */
+ enum { uppNavObjectFilterProcInfo = 0x00002FD0 }; /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 2_bytes) */
+ #define NewNavEventUPP(userRoutine) (NavEventUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNavEventProcInfo, GetCurrentArchitecture())
+ #define NewNavPreviewUPP(userRoutine) (NavPreviewUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNavPreviewProcInfo, GetCurrentArchitecture())
+ #define NewNavObjectFilterUPP(userRoutine) (NavObjectFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNavObjectFilterProcInfo, GetCurrentArchitecture())
+ #define DisposeNavEventUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeNavPreviewUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeNavObjectFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeNavEventUPP(callBackSelector, callBackParms, callBackUD, userUPP) CALL_THREE_PARAMETER_UPP((userUPP), uppNavEventProcInfo, (callBackSelector), (callBackParms), (callBackUD))
+ #define InvokeNavPreviewUPP(callBackParms, callBackUD, userUPP) (Boolean)CALL_TWO_PARAMETER_UPP((userUPP), uppNavPreviewProcInfo, (callBackParms), (callBackUD))
+ #define InvokeNavObjectFilterUPP(theItem, info, callBackUD, filterMode, userUPP) (Boolean)CALL_FOUR_PARAMETER_UPP((userUPP), uppNavObjectFilterProcInfo, (theItem), (info), (callBackUD), (filterMode))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewNavEventProc(userRoutine) NewNavEventUPP(userRoutine)
+#define NewNavPreviewProc(userRoutine) NewNavPreviewUPP(userRoutine)
+#define NewNavObjectFilterProc(userRoutine) NewNavObjectFilterUPP(userRoutine)
+#define CallNavEventProc(userRoutine, callBackSelector, callBackParms, callBackUD) InvokeNavEventUPP(callBackSelector, callBackParms, callBackUD, userRoutine)
+#define CallNavPreviewProc(userRoutine, callBackParms, callBackUD) InvokeNavPreviewUPP(callBackParms, callBackUD, userRoutine)
+#define CallNavObjectFilterProc(userRoutine, theItem, info, callBackUD, filterMode) InvokeNavObjectFilterUPP(theItem, info, callBackUD, filterMode, userRoutine)
+
+typedef SInt32 NavCustomControlMessage;
+enum {
+ kNavCtlShowDesktop = 0, /* show desktop, parms = nil */
+ kNavCtlSortBy = 1, /* sort key field, parms->NavSortKeyField */
+ kNavCtlSortOrder = 2, /* sort order, parms->NavSortOrder */
+ kNavCtlScrollHome = 3, /* scroll list home, parms = nil */
+ kNavCtlScrollEnd = 4, /* scroll list end, parms = nil */
+ kNavCtlPageUp = 5, /* page list up, parms = nil */
+ kNavCtlPageDown = 6, /* page list down, parms = nil */
+ kNavCtlGetLocation = 7, /* get current location, parms<-AEDesc */
+ kNavCtlSetLocation = 8, /* set current location, parms->AEDesc */
+ kNavCtlGetSelection = 9, /* get current selection, parms<-AEDescList */
+ kNavCtlSetSelection = 10, /* set current selection, parms->AEDescList */
+ kNavCtlShowSelection = 11, /* make selection visible, parms = nil */
+ kNavCtlOpenSelection = 12, /* open view of selection, parms = nil */
+ kNavCtlEjectVolume = 13, /* eject volume, parms->vRefNum */
+ kNavCtlNewFolder = 14, /* create a new folder, parms->StringPtr */
+ kNavCtlCancel = 15, /* cancel dialog, parms = nil */
+ kNavCtlAccept = 16, /* accept dialog default, parms = nil */
+ kNavCtlIsPreviewShowing = 17, /* query preview status, parms<-Boolean */
+ kNavCtlAddControl = 18, /* add one control to dialog, parms->ControlHandle */
+ kNavCtlAddControlList = 19, /* add control list to dialog, parms->Handle (DITL rsrc) */
+ kNavCtlGetFirstControlID = 20, /* get 1st control ID, parms<-UInt16 */
+ kNavCtlSelectCustomType = 21, /* select a custom menu item parms->NavMenuItemSpec */
+ kNavCtlSelectAllType = 22, /* select an "All" menu item parms->SInt16 */
+ kNavCtlGetEditFileName = 23, /* get save dlog's file name parms<-StringPtr */
+ kNavCtlSetEditFileName = 24, /* set save dlog's file name parms->StringPtr */
+ kNavCtlSelectEditFileName = 25, /* select save dlog file name parms->ControlEditTextSelectionRec, v1.1 or greater */
+ kNavCtlBrowserSelectAll = 26, /* re-scan the browser list parms = nil, v2.0 or greater */
+ kNavCtlGotoParent = 27, /* navigate to parent parms = nil, v2.0 or greater */
+ kNavCtlSetActionState = 28, /* restrict navigation parms->NavActionState (flags), v2.0 or greater */
+ kNavCtlBrowserRedraw = 29, /* rescan browser list parms = nil, v2.0 or greater */
+ kNavCtlTerminate = 30 /* terminate/dismiss dialog parms = nil, v2.0 or greater */
+};
+
+
+typedef UInt32 NavActionState;
+enum {
+ kNavNormalState = 0x00000000, /* normal/default state */
+ kNavDontOpenState = 0x00000001, /* disallow opening files/folders */
+ kNavDontSaveState = 0x00000002, /* disallow saving files */
+ kNavDontChooseState = 0x00000004, /* disallow choosing objects */
+ kNavDontNewFolderState = 0x00000010 /* disallow creating new folders */
+};
+
+
+typedef UInt16 NavPopupMenuItem;
+enum {
+ kNavAllKnownFiles = 0,
+ kNavAllReadableFiles = 1,
+ kNavAllFiles = 2
+};
+
+
+typedef UInt16 NavSortKeyField;
+enum {
+ kNavSortNameField = 0,
+ kNavSortDateField = 1
+};
+
+
+
+typedef UInt16 NavSortOrder;
+enum {
+ kNavSortAscending = 0,
+ kNavSortDescending = 1
+};
+
+
+
+typedef UInt32 NavDialogOptionFlags;
+enum {
+ kNavDefaultNavDlogOptions = 0x000000E4, /* use defaults for all the options */
+ kNavNoTypePopup = 0x00000001, /* don't show file type/extension popup on Open/Save */
+ kNavDontAutoTranslate = 0x00000002, /* don't automatically translate on Open */
+ kNavDontAddTranslateItems = 0x00000004, /* don't add translation choices on Open/Save */
+ kNavAllFilesInPopup = 0x00000010, /* "All Files" menu item in the type popup on Open */
+ kNavAllowStationery = 0x00000020, /* allow saving of stationery files */
+ kNavAllowPreviews = 0x00000040, /* allow preview to show */
+ kNavAllowMultipleFiles = 0x00000080, /* allow multiple items to be selected */
+ kNavAllowInvisibleFiles = 0x00000100, /* allow invisible items to be shown */
+ kNavDontResolveAliases = 0x00000200, /* don't resolve aliases */
+ kNavSelectDefaultLocation = 0x00000400, /* make the default location the browser selection */
+ kNavSelectAllReadableItem = 0x00000800, /* make the dialog select "All Readable Documents" on open */
+ kNavSupportPackages = 0x00001000, /* recognize file system packages, v2.0 or greater */
+ kNavAllowOpenPackages = 0x00002000, /* allow opening of packages, v2.0 or greater */
+ kNavDontAddRecents = 0x00004000, /* don't add chosen objects to the recents list, v2.0 or greater */
+ kNavDontUseCustomFrame = 0x00008000 /* don't add the bevelled custom frame, v2.0 or greater */
+};
+
+
+
+typedef UInt32 NavTranslationOptions;
+enum {
+ kNavTranslateInPlace = 0, /* translate in place, replacing translation source file (default for Save) */
+ kNavTranslateCopy = 1 /* translate to a copy of the source file (default for Open) */
+};
+
+
+
+struct NavMenuItemSpec {
+ UInt16 version;
+ OSType menuCreator;
+ OSType menuType;
+ Str255 menuItemName;
+ char reserved[245];
+};
+typedef struct NavMenuItemSpec NavMenuItemSpec;
+typedef NavMenuItemSpec * NavMenuItemSpecArrayPtr;
+typedef NavMenuItemSpecArrayPtr * NavMenuItemSpecArrayHandle;
+typedef NavMenuItemSpecArrayPtr NavMenuItemSpecPtr;
+typedef NavMenuItemSpecArrayHandle NavMenuItemSpecHandle;
+enum {
+ kNavGenericSignature = FOUR_CHAR_CODE('****')
+};
+
+
+struct NavTypeList {
+ OSType componentSignature;
+ short reserved;
+ short osTypeCount;
+ OSType osType[1];
+};
+typedef struct NavTypeList NavTypeList;
+typedef NavTypeList * NavTypeListPtr;
+typedef NavTypeListPtr * NavTypeListHandle;
+
+struct NavDialogOptions {
+ UInt16 version;
+ NavDialogOptionFlags dialogOptionFlags; /* option flags for affecting the dialog's behavior */
+ Point location; /* top-left location of the dialog, or {-1,-1} for default position */
+ Str255 clientName;
+ Str255 windowTitle;
+ Str255 actionButtonLabel; /* label of the default button (or null string for default) */
+ Str255 cancelButtonLabel; /* label of the cancel button (or null string for default) */
+ Str255 savedFileName; /* default name for text box in NavPutFile (or null string for default) */
+ Str255 message; /* custom message prompt (or null string for default) */
+ UInt32 preferenceKey; /* a key for to managing preferences for using multiple utility dialogs */
+ NavMenuItemSpecArrayHandle popupExtension; /* extended popup menu items, an array of NavMenuItemSpecs */
+ char reserved[494];
+};
+typedef struct NavDialogOptions NavDialogOptions;
+/* data returned by the utility dialogs: */
+
+struct NavReplyRecord {
+ UInt16 version;
+ Boolean validRecord; /* open/save: true if the user confirmed a selection, false on cancel */
+ Boolean replacing; /* save: true if the user is overwriting an existing object for save */
+ Boolean isStationery; /* save: true if the user wants to save an object as stationery */
+ Boolean translationNeeded; /* save: translation is 'needed', open: translation 'has taken place' */
+ AEDescList selection; /* open/save: list of AppleEvent descriptors of the chosen object(s) */
+ ScriptCode keyScript; /* open/save: script in which the name of each item in 'selection' is to be displayed */
+ FileTranslationSpecArrayHandle fileTranslation; /* open/save: list of file translation specs of the chosen object(s), if translation is needed */
+ UInt32 reserved1;
+ char reserved[231];
+};
+typedef struct NavReplyRecord NavReplyRecord;
+EXTERN_API( OSErr )
+NavLoad (void);
+
+EXTERN_API( OSErr )
+NavUnload (void);
+
+EXTERN_API( UInt32 )
+NavLibraryVersion (void);
+
+EXTERN_API( OSErr )
+NavGetDefaultDialogOptions (NavDialogOptions * dialogOptions);
+
+
+EXTERN_API( OSErr )
+NavGetFile (AEDesc * defaultLocation, /* can be NULL */
+ NavReplyRecord * reply,
+ NavDialogOptions * dialogOptions,
+ NavEventUPP eventProc, /* can be NULL */
+ NavPreviewUPP previewProc, /* can be NULL */
+ NavObjectFilterUPP filterProc, /* can be NULL */
+ NavTypeListHandle typeList, /* can be NULL */
+ void * callBackUD) /* can be NULL */;
+
+EXTERN_API( OSErr )
+NavPutFile (AEDesc * defaultLocation, /* can be NULL */
+ NavReplyRecord * reply,
+ NavDialogOptions * dialogOptions,
+ NavEventUPP eventProc, /* can be NULL */
+ OSType fileType,
+ OSType fileCreator,
+ void * callBackUD) /* can be NULL */;
+
+EXTERN_API( OSErr )
+NavAskSaveChanges (NavDialogOptions * dialogOptions,
+ NavAskSaveChangesAction action,
+ NavAskSaveChangesResult * reply,
+ NavEventUPP eventProc, /* can be NULL */
+ void * callBackUD) /* can be NULL */;
+
+EXTERN_API( OSErr )
+NavCustomAskSaveChanges (NavDialogOptions * dialogOptions,
+ NavAskSaveChangesResult * reply,
+ NavEventUPP eventProc, /* can be NULL */
+ void * callBackUD) /* can be NULL */;
+
+EXTERN_API( OSErr )
+NavAskDiscardChanges (NavDialogOptions * dialogOptions,
+ NavAskDiscardChangesResult * reply,
+ NavEventUPP eventProc, /* can be NULL */
+ void * callBackUD) /* can be NULL */;
+
+EXTERN_API( OSErr )
+NavChooseFile (AEDesc * defaultLocation, /* can be NULL */
+ NavReplyRecord * reply,
+ NavDialogOptions * dialogOptions,
+ NavEventUPP eventProc, /* can be NULL */
+ NavPreviewUPP previewProc, /* can be NULL */
+ NavObjectFilterUPP filterProc, /* can be NULL */
+ NavTypeListHandle typeList, /* can be NULL */
+ void * callBackUD) /* can be NULL */;
+
+EXTERN_API( OSErr )
+NavChooseFolder (AEDesc * defaultLocation, /* can be NULL */
+ NavReplyRecord * reply,
+ NavDialogOptions * dialogOptions,
+ NavEventUPP eventProc, /* can be NULL */
+ NavObjectFilterUPP filterProc, /* can be NULL */
+ void * callBackUD) /* can be NULL */;
+
+EXTERN_API( OSErr )
+NavChooseVolume (AEDesc * defaultSelection, /* can be NULL */
+ NavReplyRecord * reply,
+ NavDialogOptions * dialogOptions,
+ NavEventUPP eventProc, /* can be NULL */
+ NavObjectFilterUPP filterProc, /* can be NULL */
+ void * callBackUD) /* can be NULL */;
+
+EXTERN_API( OSErr )
+NavChooseObject (AEDesc * defaultLocation, /* can be NULL */
+ NavReplyRecord * reply,
+ NavDialogOptions * dialogOptions,
+ NavEventUPP eventProc, /* can be NULL */
+ NavObjectFilterUPP filterProc, /* can be NULL */
+ void * callBackUD) /* can be NULL */;
+
+EXTERN_API( OSErr )
+NavNewFolder (AEDesc * defaultLocation, /* can be NULL */
+ NavReplyRecord * reply,
+ NavDialogOptions * dialogOptions,
+ NavEventUPP eventProc, /* can be NULL */
+ void * callBackUD) /* can be NULL */;
+
+EXTERN_API( OSErr )
+NavTranslateFile (NavReplyRecord * reply,
+ NavTranslationOptions howToTranslate);
+
+EXTERN_API( OSErr )
+NavCompleteSave (NavReplyRecord * reply,
+ NavTranslationOptions howToTranslate);
+
+EXTERN_API( OSErr )
+NavCustomControl (NavContext context,
+ NavCustomControlMessage selector,
+ void * parms);
+
+EXTERN_API( OSErr )
+NavCreatePreview (AEDesc * theObject,
+ OSType previewDataType,
+ const void * previewData,
+ Size previewDataSize);
+
+EXTERN_API( OSErr )
+NavDisposeReply (NavReplyRecord * reply);
+
+EXTERN_API( Boolean )
+NavServicesCanRun (void);
+
+
+#if TARGET_RT_MAC_CFM
+#ifdef __cplusplus
+ inline pascal Boolean NavServicesAvailable() { return ((NavLibraryVersion != (void*)kUnresolvedCFragSymbolAddress) && NavServicesCanRun()); }
+#else
+ #define NavServicesAvailable() ((NavLibraryVersion != (void*)kUnresolvedCFragSymbolAddress) && NavServicesCanRun())
+#endif
+#elif TARGET_RT_MAC_MACHO
+/* Navigation is always available on OS X */
+#ifdef __cplusplus
+ inline pascal Boolean NavServicesAvailable() { return true; }
+#else
+ #define NavServicesAvailable() (true)
+#endif
+#else
+/* NavServicesAvailable() is implemented in Navigation.o for classic 68K clients*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( Boolean )
+NavServicesAvailable (void);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __NAVIGATION__ */
+
diff --git a/include/qt/NetSprocket.h b/include/qt/NetSprocket.h
new file mode 100644
index 000000000..b0beddd80
--- /dev/null
+++ b/include/qt/NetSprocket.h
@@ -0,0 +1,599 @@
+/*
+ File: NetSprocket.h
+
+ Contains: Games Sprockets: NetSprocket interfaces
+
+ Version: Technology: NetSprocket 1.7
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1996-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __NETSPROCKET__
+#define __NETSPROCKET__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __EVENTS__
+#include "Events.h"
+#endif
+
+#ifndef __OPENTRANSPORT__
+#include "OpenTransport.h"
+#endif
+
+#ifndef __OPENTRANSPORTPROVIDERS__
+#include "OpenTransportProviders.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if TARGET_OS_MAC
+enum {
+ kNSpMaxPlayerNameLen = 31,
+ kNSpMaxGroupNameLen = 31,
+ kNSpMaxPasswordLen = 31,
+ kNSpMaxGameNameLen = 31,
+ kNSpMaxDefinitionStringLen = 255
+};
+
+
+/* NetSprocket basic types */
+typedef struct OpaqueNSpGameReference* NSpGameReference;
+typedef struct OpaqueNSpProtocolReference* NSpProtocolReference;
+typedef struct OpaqueNSpProtocolListReference* NSpProtocolListReference;
+typedef struct OpaqueNSpAddressReference* NSpAddressReference;
+typedef SInt32 NSpEventCode;
+typedef SInt32 NSpGameID;
+typedef SInt32 NSpPlayerID;
+typedef NSpPlayerID NSpGroupID;
+typedef UInt32 NSpPlayerType;
+typedef SInt32 NSpFlags;
+typedef Str31 NSpPlayerName;
+/* Individual player info */
+
+ struct NSpPlayerInfo {
+ NSpPlayerID id;
+ NSpPlayerType type;
+ Str31 name;
+ UInt32 groupCount;
+ NSpGroupID groups[1];
+ };
+ typedef struct NSpPlayerInfo NSpPlayerInfo;
+
+typedef NSpPlayerInfo * NSpPlayerInfoPtr;
+/* list of all players */
+
+struct NSpPlayerEnumeration {
+ UInt32 count;
+ NSpPlayerInfoPtr playerInfo[1];
+};
+typedef struct NSpPlayerEnumeration NSpPlayerEnumeration;
+typedef NSpPlayerEnumeration * NSpPlayerEnumerationPtr;
+/* Individual group info */
+
+struct NSpGroupInfo {
+ NSpGroupID id;
+ UInt32 playerCount;
+ NSpPlayerID players[1];
+};
+typedef struct NSpGroupInfo NSpGroupInfo;
+typedef NSpGroupInfo * NSpGroupInfoPtr;
+/* List of all groups */
+
+struct NSpGroupEnumeration {
+ UInt32 count;
+ NSpGroupInfoPtr groups[1];
+};
+typedef struct NSpGroupEnumeration NSpGroupEnumeration;
+typedef NSpGroupEnumeration * NSpGroupEnumerationPtr;
+/* Topology types */
+
+typedef UInt32 NSpTopology;
+enum {
+ kNSpClientServer = 0x00000001
+};
+
+/* Game information */
+
+struct NSpGameInfo {
+ UInt32 maxPlayers;
+ UInt32 currentPlayers;
+ UInt32 currentGroups;
+ NSpTopology topology;
+ UInt32 reserved;
+ Str31 name;
+ Str31 password;
+};
+typedef struct NSpGameInfo NSpGameInfo;
+/* Structure used for sending and receiving network messages */
+struct NSpMessageHeader {
+ UInt32 version; /* Used by NetSprocket. Don't touch this */
+ SInt32 what; /* The kind of message (e.g. player joined) */
+ NSpPlayerID from; /* ID of the sender */
+ NSpPlayerID to; /* (player or group) id of the intended recipient */
+ UInt32 id; /* Unique ID for this message & (from) player */
+ UInt32 when; /* Timestamp for the message */
+ UInt32 messageLen; /* Bytes of data in the entire message (including the header) */
+};
+typedef struct NSpMessageHeader NSpMessageHeader;
+/* NetSprocket-defined message structures */
+
+struct NSpErrorMessage {
+ NSpMessageHeader header;
+ OSStatus error;
+};
+typedef struct NSpErrorMessage NSpErrorMessage;
+
+struct NSpJoinRequestMessage {
+ NSpMessageHeader header;
+ Str31 name;
+ Str31 password;
+ UInt32 theType;
+ UInt32 customDataLen;
+ UInt8 customData[1];
+};
+typedef struct NSpJoinRequestMessage NSpJoinRequestMessage;
+
+struct NSpJoinApprovedMessage {
+ NSpMessageHeader header;
+};
+typedef struct NSpJoinApprovedMessage NSpJoinApprovedMessage;
+
+struct NSpJoinDeniedMessage {
+ NSpMessageHeader header;
+ Str255 reason;
+};
+typedef struct NSpJoinDeniedMessage NSpJoinDeniedMessage;
+
+struct NSpPlayerJoinedMessage {
+ NSpMessageHeader header;
+ UInt32 playerCount;
+ NSpPlayerInfo playerInfo;
+};
+typedef struct NSpPlayerJoinedMessage NSpPlayerJoinedMessage;
+
+struct NSpPlayerLeftMessage {
+ NSpMessageHeader header;
+ UInt32 playerCount;
+ NSpPlayerID playerID;
+ NSpPlayerName playerName;
+};
+typedef struct NSpPlayerLeftMessage NSpPlayerLeftMessage;
+
+struct NSpHostChangedMessage {
+ NSpMessageHeader header;
+ NSpPlayerID newHost;
+};
+typedef struct NSpHostChangedMessage NSpHostChangedMessage;
+
+struct NSpGameTerminatedMessage {
+ NSpMessageHeader header;
+};
+typedef struct NSpGameTerminatedMessage NSpGameTerminatedMessage;
+
+struct NSpCreateGroupMessage {
+ NSpMessageHeader header;
+ NSpGroupID groupID;
+ NSpPlayerID requestingPlayer;
+};
+typedef struct NSpCreateGroupMessage NSpCreateGroupMessage;
+
+struct NSpDeleteGroupMessage {
+ NSpMessageHeader header;
+ NSpGroupID groupID;
+ NSpPlayerID requestingPlayer;
+};
+typedef struct NSpDeleteGroupMessage NSpDeleteGroupMessage;
+
+struct NSpAddPlayerToGroupMessage {
+ NSpMessageHeader header;
+ NSpGroupID group;
+ NSpPlayerID player;
+};
+typedef struct NSpAddPlayerToGroupMessage NSpAddPlayerToGroupMessage;
+
+struct NSpRemovePlayerFromGroupMessage {
+ NSpMessageHeader header;
+ NSpGroupID group;
+ NSpPlayerID player;
+};
+typedef struct NSpRemovePlayerFromGroupMessage NSpRemovePlayerFromGroupMessage;
+
+struct NSpPlayerTypeChangedMessage {
+ NSpMessageHeader header;
+ NSpPlayerID player;
+ NSpPlayerType newType;
+};
+typedef struct NSpPlayerTypeChangedMessage NSpPlayerTypeChangedMessage;
+/* Different kinds of messages. These can NOT be bitwise ORed together */
+enum {
+ kNSpSendFlag_Junk = 0x00100000, /* will be sent (try once) when there is nothing else pending */
+ kNSpSendFlag_Normal = 0x00200000, /* will be sent immediately (try once) */
+ kNSpSendFlag_Registered = 0x00400000 /* will be sent immediately (guaranteed, in order) */
+};
+
+
+/* Options for message delivery. These can be bitwise ORed together with each other,
+ as well as with ONE of the above */
+enum {
+ kNSpSendFlag_FailIfPipeFull = 0x00000001,
+ kNSpSendFlag_SelfSend = 0x00000002,
+ kNSpSendFlag_Blocking = 0x00000004
+};
+
+
+/* Options for Hosting Joining, and Deleting games */
+enum {
+ kNSpGameFlag_DontAdvertise = 0x00000001,
+ kNSpGameFlag_ForceTerminateGame = 0x00000002
+};
+
+/* Message "what" types */
+/* Apple reserves all negative "what" values (anything with high bit set) */
+enum {
+ kNSpSystemMessagePrefix = (long)0x80000000,
+ kNSpError = kNSpSystemMessagePrefix | 0x7FFFFFFF,
+ kNSpJoinRequest = kNSpSystemMessagePrefix | 0x00000001,
+ kNSpJoinApproved = kNSpSystemMessagePrefix | 0x00000002,
+ kNSpJoinDenied = kNSpSystemMessagePrefix | 0x00000003,
+ kNSpPlayerJoined = kNSpSystemMessagePrefix | 0x00000004,
+ kNSpPlayerLeft = kNSpSystemMessagePrefix | 0x00000005,
+ kNSpHostChanged = kNSpSystemMessagePrefix | 0x00000006,
+ kNSpGameTerminated = kNSpSystemMessagePrefix | 0x00000007,
+ kNSpGroupCreated = kNSpSystemMessagePrefix | 0x00000008,
+ kNSpGroupDeleted = kNSpSystemMessagePrefix | 0x00000009,
+ kNSpPlayerAddedToGroup = kNSpSystemMessagePrefix | 0x0000000A,
+ kNSpPlayerRemovedFromGroup = kNSpSystemMessagePrefix | 0x0000000B,
+ kNSpPlayerTypeChanged = kNSpSystemMessagePrefix | 0x0000000C
+};
+
+
+/* Special TPlayerIDs for sending messages */
+enum {
+ kNSpAllPlayers = 0x00000000,
+ kNSpHostOnly = (long)0xFFFFFFFF
+};
+
+
+
+
+/************************ Initialization ************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+NSpInitialize (UInt32 inStandardMessageSize,
+ UInt32 inBufferSize,
+ UInt32 inQElements,
+ NSpGameID inGameID,
+ UInt32 inTimeout);
+
+
+
+
+/************************** Protocols **************************/
+/* Programmatic protocol routines */
+EXTERN_API_C( OSStatus )
+NSpProtocol_New (const char * inDefinitionString,
+ NSpProtocolReference * outReference);
+
+EXTERN_API_C( void )
+NSpProtocol_Dispose (NSpProtocolReference inProtocolRef);
+
+EXTERN_API_C( OSStatus )
+NSpProtocol_ExtractDefinitionString (NSpProtocolReference inProtocolRef,
+ char * outDefinitionString);
+
+
+/* Protocol list routines */
+EXTERN_API_C( OSStatus )
+NSpProtocolList_New (NSpProtocolReference inProtocolRef,
+ NSpProtocolListReference * outList);
+
+EXTERN_API_C( void )
+NSpProtocolList_Dispose (NSpProtocolListReference inProtocolList);
+
+EXTERN_API_C( OSStatus )
+NSpProtocolList_Append (NSpProtocolListReference inProtocolList,
+ NSpProtocolReference inProtocolRef);
+
+EXTERN_API_C( OSStatus )
+NSpProtocolList_Remove (NSpProtocolListReference inProtocolList,
+ NSpProtocolReference inProtocolRef);
+
+EXTERN_API_C( OSStatus )
+NSpProtocolList_RemoveIndexed (NSpProtocolListReference inProtocolList,
+ UInt32 inIndex);
+
+EXTERN_API_C( UInt32 )
+NSpProtocolList_GetCount (NSpProtocolListReference inProtocolList);
+
+EXTERN_API_C( NSpProtocolReference )
+NSpProtocolList_GetIndexedRef (NSpProtocolListReference inProtocolList,
+ UInt32 inIndex);
+
+
+/* Helpers */
+EXTERN_API_C( NSpProtocolReference )
+NSpProtocol_CreateAppleTalk (ConstStr31Param inNBPName,
+ ConstStr31Param inNBPType,
+ UInt32 inMaxRTT,
+ UInt32 inMinThruput);
+
+EXTERN_API_C( NSpProtocolReference )
+NSpProtocol_CreateIP (InetPort inPort,
+ UInt32 inMaxRTT,
+ UInt32 inMinThruput);
+
+
+/*********************** Human Interface ************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API( Boolean , NSpEventProcPtr )(EventRecord *inEvent);
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( NSpAddressReference )
+NSpDoModalJoinDialog (ConstStr31Param inGameType,
+ ConstStr255Param inEntityListLabel,
+ Str31 ioName,
+ Str31 ioPassword,
+ NSpEventProcPtr inEventProcPtr);
+
+EXTERN_API_C( Boolean )
+NSpDoModalHostDialog (NSpProtocolListReference ioProtocolList,
+ Str31 ioGameName,
+ Str31 ioPlayerName,
+ Str31 ioPassword,
+ NSpEventProcPtr inEventProcPtr);
+
+
+/********************* Hosting and Joining **********************/
+EXTERN_API_C( OSStatus )
+NSpGame_Host (NSpGameReference * outGame,
+ NSpProtocolListReference inProtocolList,
+ UInt32 inMaxPlayers,
+ ConstStr31Param inGameName,
+ ConstStr31Param inPassword,
+ ConstStr31Param inPlayerName,
+ NSpPlayerType inPlayerType,
+ NSpTopology inTopology,
+ NSpFlags inFlags);
+
+EXTERN_API_C( OSStatus )
+NSpGame_Join (NSpGameReference * outGame,
+ NSpAddressReference inAddress,
+ ConstStr31Param inName,
+ ConstStr31Param inPassword,
+ NSpPlayerType inType,
+ void * inCustomData,
+ UInt32 inCustomDataLen,
+ NSpFlags inFlags);
+
+EXTERN_API_C( OSStatus )
+NSpGame_EnableAdvertising (NSpGameReference inGame,
+ NSpProtocolReference inProtocol,
+ Boolean inEnable);
+
+EXTERN_API_C( OSStatus )
+NSpGame_Dispose (NSpGameReference inGame,
+ NSpFlags inFlags);
+
+EXTERN_API_C( OSStatus )
+NSpGame_GetInfo (NSpGameReference inGame,
+ NSpGameInfo * ioInfo);
+
+/************************** Messaging **************************/
+EXTERN_API_C( OSStatus )
+NSpMessage_Send (NSpGameReference inGame,
+ NSpMessageHeader * inMessage,
+ NSpFlags inFlags);
+
+EXTERN_API_C( NSpMessageHeader *)
+NSpMessage_Get (NSpGameReference inGame);
+
+EXTERN_API_C( void )
+NSpMessage_Release (NSpGameReference inGame,
+ NSpMessageHeader * inMessage);
+
+/* Helpers */
+EXTERN_API_C( OSStatus )
+NSpMessage_SendTo (NSpGameReference inGame,
+ NSpPlayerID inTo,
+ SInt32 inWhat,
+ void * inData,
+ UInt32 inDataLen,
+ NSpFlags inFlags);
+
+
+/********************* Player Information **********************/
+EXTERN_API_C( OSStatus )
+NSpPlayer_ChangeType (NSpGameReference inGame,
+ NSpPlayerID inPlayerID,
+ NSpPlayerType inNewType);
+
+EXTERN_API_C( OSStatus )
+NSpPlayer_Remove (NSpGameReference inGame,
+ NSpPlayerID inPlayerID);
+
+EXTERN_API_C( OSStatus )
+NSpPlayer_GetAddress (NSpGameReference inGame,
+ NSpPlayerID inPlayerID,
+ OTAddress ** outAddress);
+
+EXTERN_API_C( NSpPlayerID )
+NSpPlayer_GetMyID (NSpGameReference inGame);
+
+EXTERN_API_C( OSStatus )
+NSpPlayer_GetInfo (NSpGameReference inGame,
+ NSpPlayerID inPlayerID,
+ NSpPlayerInfoPtr * outInfo);
+
+EXTERN_API_C( void )
+NSpPlayer_ReleaseInfo (NSpGameReference inGame,
+ NSpPlayerInfoPtr inInfo);
+
+EXTERN_API_C( OSStatus )
+NSpPlayer_GetEnumeration (NSpGameReference inGame,
+ NSpPlayerEnumerationPtr * outPlayers);
+
+EXTERN_API_C( void )
+NSpPlayer_ReleaseEnumeration (NSpGameReference inGame,
+ NSpPlayerEnumerationPtr inPlayers);
+
+EXTERN_API_C( UInt32 )
+NSpPlayer_GetRoundTripTime (NSpGameReference inGame,
+ NSpPlayerID inPlayer);
+
+EXTERN_API_C( UInt32 )
+NSpPlayer_GetThruput (NSpGameReference inGame,
+ NSpPlayerID inPlayer);
+
+
+/********************* Group Management **********************/
+EXTERN_API_C( OSStatus )
+NSpGroup_New (NSpGameReference inGame,
+ NSpGroupID * outGroupID);
+
+EXTERN_API_C( OSStatus )
+NSpGroup_Dispose (NSpGameReference inGame,
+ NSpGroupID inGroupID);
+
+EXTERN_API_C( OSStatus )
+NSpGroup_AddPlayer (NSpGameReference inGame,
+ NSpGroupID inGroupID,
+ NSpPlayerID inPlayerID);
+
+EXTERN_API_C( OSStatus )
+NSpGroup_RemovePlayer (NSpGameReference inGame,
+ NSpGroupID inGroupID,
+ NSpPlayerID inPlayerID);
+
+EXTERN_API_C( OSStatus )
+NSpGroup_GetInfo (NSpGameReference inGame,
+ NSpGroupID inGroupID,
+ NSpGroupInfoPtr * outInfo);
+
+EXTERN_API_C( void )
+NSpGroup_ReleaseInfo (NSpGameReference inGame,
+ NSpGroupInfoPtr inInfo);
+
+EXTERN_API_C( OSStatus )
+NSpGroup_GetEnumeration (NSpGameReference inGame,
+ NSpGroupEnumerationPtr * outGroups);
+
+EXTERN_API_C( void )
+NSpGroup_ReleaseEnumeration (NSpGameReference inGame,
+ NSpGroupEnumerationPtr inGroups);
+
+
+/************************** Utilities ***************************/
+EXTERN_API_C( NumVersion )
+NSpGetVersion (void);
+
+EXTERN_API_C( void )
+NSpSetConnectTimeout (UInt32 inSeconds);
+
+EXTERN_API_C( void )
+NSpClearMessageHeader (NSpMessageHeader * inMessage);
+
+EXTERN_API_C( UInt32 )
+NSpGetCurrentTimeStamp (NSpGameReference inGame);
+
+EXTERN_API_C( NSpAddressReference )
+NSpConvertOTAddrToAddressReference (OTAddress * inAddress);
+
+EXTERN_API_C( OTAddress *)
+NSpConvertAddressReferenceToOTAddr (NSpAddressReference inAddress);
+
+EXTERN_API_C( void )
+NSpReleaseAddressReference (NSpAddressReference inAddress);
+
+
+/************************ Advanced/Async routines ****************/
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API( void , NSpCallbackProcPtr )(NSpGameReference inGame, void *inContext, NSpEventCode inCode, OSStatus inStatus, void *inCookie);
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+NSpInstallCallbackHandler (NSpCallbackProcPtr inHandler,
+ void * inContext);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API( Boolean , NSpJoinRequestHandlerProcPtr )(NSpGameReference inGame, NSpJoinRequestMessage *inMessage, void *inContext, Str255 outReason);
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+NSpInstallJoinRequestHandler (NSpJoinRequestHandlerProcPtr inHandler,
+ void * inContext);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API( Boolean , NSpMessageHandlerProcPtr )(NSpGameReference inGame, NSpMessageHeader *inMessage, void *inContext);
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+NSpInstallAsyncMessageHandler (NSpMessageHandlerProcPtr inHandler,
+ void * inContext);
+
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_OS_MAC */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __NETSPROCKET__ */
+
diff --git a/include/qt/NetworkSetup.h b/include/qt/NetworkSetup.h
new file mode 100644
index 000000000..bafeab232
--- /dev/null
+++ b/include/qt/NetworkSetup.h
@@ -0,0 +1,1495 @@
+/*
+ File: NetworkSetup.h
+
+ Contains: Network Setup Interfaces
+
+ Version: Technology: 1.1.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1998-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __NETWORKSETUP__
+#define __NETWORKSETUP__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+#ifndef __OPENTRANSPORT__
+#include "OpenTransport.h"
+#endif
+
+#ifndef __OPENTRANSPORTPROVIDERS__
+#include "OpenTransportProviders.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if CALL_NOT_IN_CARBON
+#ifndef __NETWORKSETUPTYPES__
+#define __NETWORKSETUPTYPES__
+typedef struct OpaqueCfgDatabaseRef* CfgDatabaseRef;
+typedef UInt32 CfgAreaID;
+typedef OSType CfgEntityClass;
+typedef OSType CfgEntityType;
+
+struct CfgEntityRef {
+ CfgAreaID fLoc;
+ UInt32 fReserved;
+ Str255 fID;
+};
+typedef struct CfgEntityRef CfgEntityRef;
+
+struct CfgResourceLocator {
+ FSSpec fFile;
+ UInt16 fResID;
+};
+typedef struct CfgResourceLocator CfgResourceLocator;
+
+struct CfgEntityInfo {
+ CfgEntityClass fClass;
+ CfgEntityType fType;
+ Str255 fName;
+ CfgResourceLocator fIcon;
+};
+typedef struct CfgEntityInfo CfgEntityInfo;
+
+typedef void * CfgEntityAccessID;
+
+struct CfgPrefsHeader {
+ UInt16 fSize; /* size includes this header*/
+ UInt16 fVersion;
+ OSType fType;
+};
+typedef struct CfgPrefsHeader CfgPrefsHeader;
+/* -------------------------------------------------------------------------
+ Error codes
+ ------------------------------------------------------------------------- */
+enum {
+ kCfgErrDatabaseChanged = -3290, /* database has changed since last call - close and reopen DB*/
+ kCfgErrAreaNotFound = -3291, /* Area doesn't exist*/
+ kCfgErrAreaAlreadyExists = -3292, /* Area already exists*/
+ kCfgErrAreaNotOpen = -3293, /* Area needs to open first*/
+ kCfgErrConfigLocked = -3294, /* Access conflict - retry later*/
+ kCfgErrEntityNotFound = -3295, /* An entity with this name doesn't exist*/
+ kCfgErrEntityAlreadyExists = -3296, /* An entity with this name already exists*/
+ kCfgErrPrefsTypeNotFound = -3297, /* An record with this PrefsType doesn't exist*/
+ kCfgErrDataTruncated = -3298, /* Data truncated when read buffer too small*/
+ kCfgErrFileCorrupted = -3299 /* The database format appears to be corrupted.*/
+};
+
+/* reserve a 'free' tag for free blocks*/
+enum {
+ kCfgTypefree = FOUR_CHAR_CODE('free')
+};
+
+/* -------------------------------------------------------------------------
+ CfgEntityClass / CfgEntityType
+
+ The database can distinguish between several classes of objects and
+ several types withing each class
+ Use of different classes allow to store type of information in the same database
+
+ Other entity classes and types can be defined by developers.
+ they should be unique and registered with Developer Tech Support (DTS)
+ ------------------------------------------------------------------------- */
+enum {
+ kCfgClassAnyEntity = FOUR_CHAR_CODE('****'),
+ kCfgClassUnknownEntity = FOUR_CHAR_CODE('????'),
+ kCfgTypeAnyEntity = FOUR_CHAR_CODE('****'),
+ kCfgTypeUnknownEntity = FOUR_CHAR_CODE('????')
+};
+
+/* -------------------------------------------------------------------------
+ For CfgIsSameEntityRef
+ ------------------------------------------------------------------------- */
+enum {
+ kCfgIgnoreArea = true,
+ kCfgDontIgnoreArea = false
+};
+
+#endif /* __NETWORKSETUPTYPES__ */
+/*******************************************************************************
+** Configuration Information Access API
+********************************************************************************/
+/* -------------------------------------------------------------------------
+ Database access
+ ------------------------------------------------------------------------- */
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSStatus )
+OTCfgOpenDatabase (CfgDatabaseRef * dbRef);
+
+/*
+ OTCfgOpenDatabase()
+
+ Inputs: none
+ Outputs: CfgDatabaseRef* dbRef Reference to opened database
+ Returns: OSStatus *** list errors ***
+
+ Opens the Configuration API for a given client. This call should be made prior to any other call.
+*/
+EXTERN_API( OSStatus )
+OTCfgCloseDatabase (CfgDatabaseRef * dbRef);
+
+/*
+ OTCfgCloseDatabase()
+
+ Inputs: CfgDatabaseRef* dbRef Reference to opened database
+ Outputs: CfgDatabaseRef* dbRef Reference to opened database is cleared
+ Returns: OSStatus *** list errors ***
+
+ Closes the Configuration API for a given client. This call should be made when the client no
+ longer wants to use the Configuration API.
+*/
+/* -------------------------------------------------------------------------
+ Area management
+ ------------------------------------------------------------------------- */
+EXTERN_API( OSStatus )
+OTCfgGetAreasCount (CfgDatabaseRef dbRef,
+ ItemCount * itemCount);
+
+/*
+ OTCfgGetAreasCount()
+
+ Inputs: CfgDatabaseRef dbRef Reference to opened database
+ Outputs: ItemCount* itemCount Number of entities defined
+ Returns: OSStatus *** list errors ***
+
+ Returns the number of areas currently defined.
+*/
+EXTERN_API( OSStatus )
+OTCfgGetAreasList (CfgDatabaseRef dbRef,
+ ItemCount * itemCount,
+ CfgAreaID areaID[],
+ Str255 areaName[]);
+
+/*
+ OTCfgGetAreasList()
+
+ Inputs: CfgDatabaseRef dbRef Reference to opened database
+ ItemCount* itemCount Number of entities requested
+ Outputs: ItemCount* itemCount Number of entities defined
+ Returns: OSStatus *** list errors ***
+
+ Returns a list of area IDs and names. On entry, count should be set to whatever OTCfgGetAreasCount
+ returned. On exit, count contains the actual number of areas found. This can be less than the
+ initial count value if areas were deleted in the meantime. The id and name parameters are stored
+ in arrays that should each be able to contain count values.
+*/
+EXTERN_API( OSStatus )
+OTCfgGetCurrentArea (CfgDatabaseRef dbRef,
+ CfgAreaID * areaID);
+
+/*
+ OTCfgGetCurrentArea()
+
+ Inputs: CfgDatabaseRef dbRef Reference to opened database
+ Outputs: CfgAreaID* areaID ID of current area
+ Returns: OSStatus *** list errors ***
+
+ Returns the id of the current area.
+*/
+EXTERN_API( OSStatus )
+OTCfgSetCurrentArea (CfgDatabaseRef dbRef,
+ CfgAreaID areaID);
+
+/*
+ OTCfgSetCurrentArea()
+
+ Inputs: CfgDatabaseRef dbRef Reference to opened database
+ CfgAreaID areaID ID of area to make active
+ Outputs: none
+ Returns: OSStatus *** list errors ***
+
+ Sets the current area. If the area doesn't exist kCfgErrAreaNotFound is returned.
+*/
+EXTERN_API( OSStatus )
+OTCfgCreateArea (CfgDatabaseRef dbRef,
+ ConstStr255Param areaName,
+ CfgAreaID * areaID);
+
+/*
+ OTCfgCreateArea()
+
+ Inputs: CfgDatabaseRef dbRef Reference to opened database
+ ConstStr255Param areaName Name of area to create
+ Outputs: CfgAreaID* areaID ID of newly created area
+ Returns: OSStatus *** list errors ***
+
+ Creates a new area with the specified name. Then name must be unique or kCfgErrAreaAlreadyExists
+ will be returned.
+*/
+EXTERN_API( OSStatus )
+OTCfgDeleteArea (CfgDatabaseRef dbRef,
+ CfgAreaID areaID);
+
+/*
+ OTCfgDeleteArea()
+
+ Inputs: CfgDatabaseRef dbRef Reference to opened database
+ CfgAreaID areaID ID of area to delete
+ Outputs: none
+ Returns: OSStatus *** list errors ***
+
+ Deletes the specified area. If the area doesn't exist kCfgErrAreaNotFound is returned.
+*/
+EXTERN_API( OSStatus )
+OTCfgDuplicateArea (CfgDatabaseRef dbRef,
+ CfgAreaID sourceAreaID,
+ CfgAreaID destAreaID);
+
+/*
+ OTCfgDuplicateArea()
+
+ Inputs: CfgDatabaseRef dbRef Reference to opened database
+ CfgAreaID sourceAreaID Area to duplicate
+ CfgAreaID destAreaID Area to contain duplicate
+ Outputs: none
+ Returns: OSStatus *** list errors ***
+
+ Duplicates the source area content into the destination area. Both areas should exist prior to
+ making this call. If either area doesn't exist kCfgErrAreaNotFound is returned.
+*/
+EXTERN_API( OSStatus )
+OTCfgSetAreaName (CfgDatabaseRef dbRef,
+ CfgAreaID areaID,
+ ConstStr255Param areaName,
+ CfgAreaID * newAreaID);
+
+/*
+ OTCfgSetAreaName()
+
+ Inputs: CfgDatabaseRef dbRef Reference to opened database
+ CfgAreaID areaID ID of area being named
+ ConstStr255Param areaName New name for area
+ Outputs: CfgAreaID* newAreaID ID of renamed area
+ Returns: OSStatus *** list errors ***
+
+ Renames the specified area. A new id is returned: it should be used from now on. If the area
+ doesn't exist kCfgErrAreaNotFound is returned.
+*/
+EXTERN_API( OSStatus )
+OTCfgGetAreaName (CfgDatabaseRef dbRef,
+ CfgAreaID areaID,
+ Str255 areaName);
+
+/*
+ OTCfgGetAreaName()
+
+ Inputs: CfgDatabaseRef dbRef Reference to opened database
+ CfgAreaID areaID ID of area being queried
+ Outputs: Str255 areaName Name of area
+ Returns: OSStatus *** list errors ***
+
+ Gets the name of the specified area. If the area doesn't exist kCfgErrAreaNotFound is returned.
+*/
+/* -------------------------------------------------------------------------
+ Configuration Database API
+
+ Single Writer ONLY!!!
+ ------------------------------------------------------------------------- */
+/* -------------------------------------------------------------------------
+ Opening an area for reading
+ ------------------------------------------------------------------------- */
+EXTERN_API( OSStatus )
+OTCfgOpenArea (CfgDatabaseRef dbRef,
+ CfgAreaID areaID);
+
+/*
+ OTCfgOpenArea()
+
+ Inputs: CfgDatabaseRef dbRef Reference to opened database
+ CfgAreaID areaID ID of area to open
+ Outputs: none
+ Returns: OSStatus *** list errors ***
+
+ Opens the specified area for reading. If the area doesn't exist kCfgErrAreaNotFound is returned.
+*/
+EXTERN_API( OSStatus )
+OTCfgCloseArea (CfgDatabaseRef dbRef,
+ CfgAreaID areaID);
+
+/*
+ OTCfgCloseArea()
+
+ Inputs: CfgDatabaseRef dbRef Reference to opened database
+ CfgAreaID areaID ID of area to close
+ Outputs: none
+ Returns: OSStatus *** list errors ***
+
+ Closes an area opened for reading. If the area doesn't exist kCfgErrAreaNotFound is returned.
+ Opening an area for writing All modifications to an area should be performed as part of a
+ transaction.
+*/
+/*
+ For write access
+*/
+EXTERN_API( OSStatus )
+OTCfgBeginAreaModifications (CfgDatabaseRef dbRef,
+ CfgAreaID readAreaID,
+ CfgAreaID * writeAreaID);
+
+/*
+ OTCfgBeginAreaModifications()
+
+ Inputs: CfgDatabaseRef dbRef Reference to opened database
+ CfgAreaID readAreaID ID of area opened for reading
+ Outputs: CfgAreaID* writeAreaID ID of area opened for modification
+ Returns: OSStatus *** list errors ***
+
+ Opens the specified area for writing. A new area id is provided. This area id should be used to
+ enumerate, add, delete, read and write to the modified data. The original id can still be used to
+ access the original unmodified data. If the area doesn't exist kCfgErrAreaNotFound is returned.
+*/
+EXTERN_API( OSStatus )
+OTCfgCommitAreaModifications (CfgDatabaseRef dbRef,
+ CfgAreaID readAreaID,
+ CfgAreaID writeAreaID);
+
+/*
+ OTCfgCommitAreaModifications()
+
+ Inputs: CfgDatabaseRef dbRef Reference to opened database
+ CfgAreaID readAreaID ID of area opened for reading
+ CfgAreaID writeAreaID ID of area opened for modification
+ Outputs: none
+ Returns: OSStatus *** list errors ***
+
+ Closes an area opened for writing. All modifications are committed and readers are informed that
+ the database changed state ( kCfgStateChangedErr ). The areaID should be the id of the original
+ area. If the area doesn't exist or the wrong id is passed, kCfgErrAreaNotFound is returned.
+*/
+EXTERN_API( OSStatus )
+OTCfgAbortAreaModifications (CfgDatabaseRef dbRef,
+ CfgAreaID readAreaID);
+
+/*
+ OTCfgAbortAreaModifications()
+
+ Inputs: CfgDatabaseRef dbRef Reference to opened database
+ CfgAreaID readAreaID ID of area opened for reading
+ Outputs: none
+ Returns: OSStatus *** list errors ***
+
+ Closes an area opened for writing, discarding any modification. The areaID should be the id of
+ the original area. If the area doesn't exist or the wrong id is passed kCfgErrAreaNotFound is
+ returned.
+*/
+/*
+ Working with entities
+
+ Entities can be manipulated as soon as an area has been opened. The same calls work both for
+ areas opened for reading or for modification. In the latter case, the calls can be used on the
+ original or new area id to access the original data or the modified data.
+*/
+/*
+ For everybody
+ Count receives the actual number of entities
+*/
+EXTERN_API( OSStatus )
+OTCfgGetEntitiesCount (CfgDatabaseRef dbRef,
+ CfgAreaID areaID,
+ CfgEntityClass entityClass,
+ CfgEntityType entityType,
+ ItemCount * itemCount);
+
+/*
+ OTCfgGetEntitiesCount()
+
+ Inputs: CfgDatabaseRef dbRef Reference to opened database
+ CfgAreaID areaID ID of area to count
+ CfgEntityClass entityClass Class of entities to count
+ CfgEntityType entityType Type of entities to count
+ Outputs: ItemCount* itemCount Count of matching entities
+ Returns: OSStatus *** list errors ***
+
+ Returns the number of entities of the specified class and type in the specified area. To obtain
+ all entities regardless of their class or type pass kCfgClassAnyEntity or kCfgTypeAnyEntity. If
+ the area doesn't exist or the wrong id is passed kCfgErrAreaNotFound is returned.
+*/
+
+/*
+ Count as input, is the number of entities to read;
+ count as output, receives the actual number of entities or the number you specified.
+*/
+EXTERN_API( OSStatus )
+OTCfgGetEntitiesList (CfgDatabaseRef dbRef,
+ CfgAreaID areaID,
+ CfgEntityClass entityClass,
+ CfgEntityType entityType,
+ ItemCount * itemCount,
+ CfgEntityRef entityRef[],
+ CfgEntityInfo entityInfo[]);
+
+/*
+ OTCfgGetEntitiesList()
+
+ Inputs: CfgDatabaseRef dbRef Reference to opened database
+ CfgAreaID areaID ID of area to list
+ CfgEntityClass entityClass Class of entities to list
+ CfgEntityType entityType Type of entities to list
+ ItemCount* itemCount Count of entities requested
+ Outputs: ItemCount* itemCount Count of entities listed
+ Returns: OSStatus *** list errors ***
+
+ Returns the list of entities of the specified class and type in the specified area. To obtain all
+ entities regardless of their class or type pass kCfgClassAnyEntity or kCfgTypeAnyEntity. The
+ count parameter should have the value obtained by CfgGetEntitiesCount. On exit count may be less
+ if some entities were deleted in the meantime. The id and info parameters should be arrays large
+ enough to hold count entries. If the area doesn't exist or the wrong id is passed
+ kCfgErrAreaNotFound is returned. The info array contains information about each entity,
+ including its class, type, name and the area of its icon:
+
+ struct CfgEntityInfo
+ {
+ CfgEntityClass fClass;
+ CfgEntityType fType;
+ ConstStr255Param fName;
+ CfgResourceLocator fIcon;
+ };
+*/
+EXTERN_API( OSStatus )
+OTCfgCreateEntity (CfgDatabaseRef dbRef,
+ CfgAreaID areaID,
+ const CfgEntityInfo * entityInfo,
+ CfgEntityRef * entityRef);
+
+/*
+ OTCfgCreateEntity()
+
+ Inputs: CfgDatabaseRef dbRef Reference to opened database
+ CfgAreaID areaID ID of area to contain entity
+ CfgEntityInfo* entityInfo Information that defines the entity
+ Outputs: CfgEntityRef* entityRef Reference to entity created
+ Returns: OSStatus *** list errors ***
+
+ Creates a new entity with the specified class, type and name and returns an id for it. If the
+ area doesn't exist or the wrong id is passed kCfgErrAreaNotFound is returned. If there is already
+ an entity with the same name kCfgErrEntityAlreadyExists is returned.
+*/
+EXTERN_API( OSStatus )
+OTCfgDeleteEntity (CfgDatabaseRef dbRef,
+ const CfgEntityRef * entityRef);
+
+/*
+ OTCfgDeleteEntity()
+
+ Inputs: CfgDatabaseRef dbRef Reference to opened database
+ CfgEntityRef* entityRef Reference to entity to delete
+ Outputs: none
+ Returns: OSStatus *** list errors ***
+
+ Deletes the specified entity. If there is no entity with this id kCfgEntityNotfoundErr is returned
+*/
+EXTERN_API( OSStatus )
+OTCfgDuplicateEntity (CfgDatabaseRef dbRef,
+ const CfgEntityRef * entityRef,
+ const CfgEntityRef * newEntityRef);
+
+/*
+ OTCfgDuplicateEntity()
+
+ Inputs: CfgDatabaseRef dbRef Reference to opened database
+ CfgEntityRef* entityRef Reference to entity to duplicate
+ Outputs: CfgEntityRef* newEntityRef Reference to duplicate entity
+ Returns: OSStatus *** list errors ***
+
+ Duplicates the specified entity. Both entities should exit. If any entity doesn't exist
+ kCfgErrEntityNotFound is returned.
+*/
+EXTERN_API( OSStatus )
+OTCfgSetEntityName (CfgDatabaseRef dbRef,
+ const CfgEntityRef * entityRef,
+ ConstStr255Param entityName,
+ CfgEntityRef * newEntityRef);
+
+/*
+ OTCfgSetEntityName()
+
+ Inputs: CfgDatabaseRef dbRef Reference to opened database
+ CfgEntityRef* entityRef Reference to entity to duplicate
+ ConstStr255Param entityName New name for entity
+ Outputs: CfgEntityRef* newEntityRef Reference to renamed entity
+ Returns: OSStatus *** list errors ***
+
+ Renames the specified entity. If the entity doesn't exist kCfgEntityNotfoundErr is returned. If
+ there is already an entity with that name kCfgErrEntityAlreadyExists is returned.
+*/
+EXTERN_API( void )
+OTCfgGetEntityArea (const CfgEntityRef * entityRef,
+ CfgAreaID * areaID);
+
+/*
+ OTCfgGetEntityArea()
+
+ Inputs: CfgEntityRef *entityRef Reference to an entity
+ Outputs: CfgAreaID *areaID ID of area that contains the entity
+ Returns: none
+
+ Returns the area ID associated with the specified entity reference.
+*/
+EXTERN_API( void )
+OTCfgGetEntityName (const CfgEntityRef * entityRef,
+ Str255 entityName);
+
+/*
+ OTCfgGetEntityName()
+
+ Inputs: CfgEntityRef *entityRef Reference to an entity
+ Outputs: Str255 entityName Name of the entity
+ Returns: none
+
+ Returns the entity name associated with the specified entity reference.
+*/
+EXTERN_API( void )
+OTCfgChangeEntityArea (CfgEntityRef * entityRef,
+ CfgAreaID newAreaID);
+
+/*
+ OTCfgChangeEntityArea()
+
+ Inputs: CfgEntityRef *entityRef Reference to an entity
+ CfgAreaID newAreaID ID of area to contain moved entity
+ Outputs: none
+ Returns: none
+
+ Changes the area ID associated with the specified entity reference. This effectively moves the
+ entity to a different area.
+*/
+/* -------------------------------------------------------------------------
+ These API calls are for the protocol developers to compare the IDs.
+ ------------------------------------------------------------------------- */
+/* -------------------------------------------------------------------------
+ For OTCfgIsSameEntityRef
+ ------------------------------------------------------------------------- */
+#endif /* CALL_NOT_IN_CARBON */
+
+enum {
+ kOTCfgIgnoreArea = kCfgIgnoreArea,
+ kOTCfgDontIgnoreArea = kCfgDontIgnoreArea
+};
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( Boolean )
+OTCfgIsSameEntityRef (const CfgEntityRef * entityRef1,
+ const CfgEntityRef * entityRef2,
+ Boolean ignoreArea);
+
+/*
+ OTCfgIsSameEntityRef()
+
+ Inputs: CfgEntityRef* entityRef1 Reference to an entity
+ CfgEntityRef* entityRef2 Reference to another entity
+ Boolean ignoreArea If true, ignore the area ID
+ Outputs: none
+ Returns: Boolean If true, entity references match
+
+ Compare two entity references. If ignoreArea is true, and the two entity names are the same, then return
+ true. If ignoreArea is false, then the area IDs must be the same, as well as the entity names
+ must be the same, then can return true.
+*/
+EXTERN_API( Boolean )
+OTCfgIsSameAreaID (CfgAreaID areaID1,
+ CfgAreaID areaID2);
+
+/*
+ OTCfgIsSameAreaID()
+
+ Inputs: CfgAreaID areaID1 ID of an area
+ CfgAreaID areaID2 ID of another area
+ Outputs: none
+ Returns: Boolean If true, area IDs match
+
+ Compare two area IDs. Return true for matching area IDs, and return false for the different area IDs.
+*/
+/* -------------------------------------------------------------------------
+ Dealing with individual preferences
+ ------------------------------------------------------------------------- */
+/* -------------------------------------------------------------------------
+ Open Preferences
+ if writer = true, GetPrefs and SetPrefs are allowed, else only GetPrefs is allowed.
+ ------------------------------------------------------------------------- */
+EXTERN_API( OSStatus )
+OTCfgOpenPrefs (CfgDatabaseRef dbRef,
+ const CfgEntityRef * entityRef,
+ Boolean writer,
+ CfgEntityAccessID * accessID);
+
+/*
+ OTCfgOpenPrefs()
+
+ Inputs: CfgDatabaseRef dbRef Reference to opened database
+ CfgEntityRef* entityRef Reference to an entity
+ Boolean writer If true, open for write
+ Outputs: CfgEntityAccessID* accessID ID for entity access
+ Returns: OSStatus *** list errors ***
+
+ Open the specified entity and return the CfgEntityAccessID for the following access of the
+ content of the entity. If writer is true, CfgGetPrefs and CfgSetPrefs are allowed, otherwise only
+ CfgGetPrefs is allowed.
+*/
+EXTERN_API( OSStatus )
+OTCfgClosePrefs (CfgEntityAccessID accessID);
+
+/*
+ OTCfgClosePrefs()
+
+ Inputs: CfgEntityAccessID* accessID ID for entity to close
+ Outputs: none
+ Returns: OSStatus *** list errors ***
+
+ Close the entity with the specified CfgEntityAccessID.
+*/
+/* -------------------------------------------------------------------------
+ Get/Set Preferences
+
+ Accessing the content of an entity
+
+ These API calls are for the protocol developers. It supports multiple records per entity. Each
+ record is identified by the prefsType and the size of the record. The protocol stack will provide
+ the STRUCT to view the content of each record.
+ ------------------------------------------------------------------------- */
+EXTERN_API( OSStatus )
+OTCfgSetPrefs (CfgEntityAccessID accessID,
+ OSType prefsType,
+ const void * data,
+ ByteCount length);
+
+/*
+ OTCfgSetPrefs()
+
+ Inputs: CfgEntityAccessID* accessID ID of entity to access
+ OSType prefsType Record type to set
+ void* data Address of data
+ ByteCount length Number of bytes of data
+ Outputs: none
+ Returns: OSStatus *** list errors ***
+
+ Write the data to the specified record. The record is identified by the prefsType. If the entity
+ is not opened for the writer, an error code is returned.
+*/
+EXTERN_API( OSStatus )
+OTCfgGetPrefs (CfgEntityAccessID accessID,
+ OSType prefsType,
+ void * data,
+ ByteCount length);
+
+/*
+ OTCfgGetPrefs()
+
+ Inputs: CfgEntityAccessID* accessID ID of entity to access
+ OSType prefsType Record type to get
+ void* data Address for data
+ ByteCount length Number of bytes of data requested
+ Outputs: none
+ Returns: OSStatus *** list errors ***
+
+ Read the data from the specified record to the passed buffer. The record is identified by the
+ prefsType. If the passed buffer is too small, kCfgErrDataTruncated is returned, but will copy as
+ many data as possible to the buffer.
+*/
+EXTERN_API( OSStatus )
+OTCfgGetPrefsSize (CfgEntityAccessID accessID,
+ OSType prefsType,
+ ByteCount * length);
+
+/*
+ OTCfgGetPrefsSize()
+
+ Inputs: CfgEntityAccessID* accessID ID of entity to access
+ OSType prefsType Record type to get
+ ByteCount length Number of bytes of data available
+ Outputs: none
+ Returns: OSStatus *** list errors ***
+
+ Returns the length, in bytes, of the specified record. The record is identified by the prefsType.
+*/
+/* -------------------------------------------------------------------------
+ Get table of contents for prefs
+ ------------------------------------------------------------------------- */
+EXTERN_API( OSStatus )
+OTCfgGetPrefsTOCCount (CfgEntityAccessID accessID,
+ ItemCount * itemCount);
+
+/*
+ OTCfgGetPrefsTOCCount()
+
+ Inputs: CfgEntityAccessID* accessID ID of entity to access
+ Outputs: ItemCount* itemCount Number of entries available
+ Returns: OSStatus *** list errors ***
+
+ Get the count of all the record headers in the entity. Return the number of records in the count.
+*/
+EXTERN_API( OSStatus )
+OTCfgGetPrefsTOC (CfgEntityAccessID accessID,
+ ItemCount * itemCount,
+ CfgPrefsHeader PrefsTOC[]);
+
+/*
+ OTCfgGetPrefsTOC()
+
+ Inputs: CfgEntityAccessID* accessID ID of entity to access
+ ItemCount* itemCount Number of entries requested
+ Outputs: ItemCount* itemCount Number of entries available
+ CfgPrefsHeader PrefsTOC[] Table of entries
+ Returns: OSStatus *** list errors ***
+
+ Get the list of all the record headers in the entity. Return the number of records in the count.
+ If the PrefsTOC is specified, it has to be big enough to hold all the record headers. If the
+ PrefsTOC is null, only the count is returned.
+*/
+EXTERN_API( SInt16 )
+OTCfgEncrypt (UInt8 * key,
+ UInt8 * data,
+ SInt16 dataLen);
+
+/*
+ OTCfgEncrypt()
+
+ Inputs: UInt8 *key encryption key ( user name )
+ UInt8 *data data to encrypt ( password )
+ SInt16 dataLen length of data to encrypt
+ Outputs: UInt8 *data encrypted data
+ Returns: SInt16 length of encrypted data
+
+ Encrypt the password, using the user name as the encryption key. Return the encrypted password and its length.
+*/
+EXTERN_API( SInt16 )
+OTCfgDecrypt (UInt8 * key,
+ UInt8 * data,
+ SInt16 dataLen);
+
+/*
+ OTCfgDecrypt()
+
+ Inputs: UInt8 *key encryption key ( user name )
+ UInt8 *data data to decrypt ( password )
+ SInt16 dataLen length of data to decrypt
+ Outputs: UInt8 *data decrypted data
+ Returns: SInt16 length of decrypted data
+
+ Decrypt the password, using the user name as the encryption key. Return the decrypted password and its length.
+*/
+EXTERN_API( Handle )
+OTCfgGetDefault (ResType entityType,
+ ResType entityClass,
+ ResType recordType);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSStatus )
+OTCfgInstallNotifier (CfgDatabaseRef dbRef,
+ CfgEntityClass theClass,
+ CfgEntityType theType,
+ OTNotifyProcPtr notifier,
+ void * contextPtr);
+
+EXTERN_API( OSStatus )
+OTCfgRemoveNotifier (CfgDatabaseRef dbRef,
+ CfgEntityClass theClass,
+ CfgEntityType theType);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+typedef UInt16 OTCfgIRPortSetting;
+enum {
+ kOTCfgTypeStruct = FOUR_CHAR_CODE('stru'),
+ kOTCfgTypeElement = FOUR_CHAR_CODE('elem'),
+ kOTCfgTypeVector = FOUR_CHAR_CODE('vect')
+};
+
+/* -------------------------------------------------------------------------
+ CfgEntityClass / CfgEntityType
+
+ The database can distinguish between several classes of objects and
+ several types withing each class
+ Use of different classes allow to store type of information in the same database
+
+ Other entity classes and types can be defined by developers.
+ they should be unique and registered with Developer Tech Support (DTS)
+ ------------------------------------------------------------------------- */
+enum {
+ kOTCfgClassNetworkConnection = FOUR_CHAR_CODE('otnc'),
+ kOTCfgClassGlobalSettings = FOUR_CHAR_CODE('otgl'),
+ kOTCfgClassServer = FOUR_CHAR_CODE('otsv'),
+ kOTCfgTypeGeneric = FOUR_CHAR_CODE('otan'),
+ kOTCfgTypeAppleTalk = FOUR_CHAR_CODE('atlk'),
+ kOTCfgTypeTCPv4 = FOUR_CHAR_CODE('tcp4'),
+ kOTCfgTypeTCPv6 = FOUR_CHAR_CODE('tcp6'),
+ kOTCfgTypeRemote = FOUR_CHAR_CODE('ara '),
+ kOTCfgTypeDial = FOUR_CHAR_CODE('dial'),
+ kOTCfgTypeModem = FOUR_CHAR_CODE('modm'),
+ kOTCfgTypeInfrared = FOUR_CHAR_CODE('infr'),
+ kOTCfgClassSetOfSettings = FOUR_CHAR_CODE('otsc'),
+ kOTCfgTypeSetOfSettings = FOUR_CHAR_CODE('otst'),
+ kOTCfgTypeDNS = FOUR_CHAR_CODE('dns ')
+};
+
+/*******************************************************************************
+** Preferences Structures
+********************************************************************************/
+enum {
+ kOTCfgIndexSetsActive = 0,
+ kOTCfgIndexSetsEdit = 1,
+ kOTCfgIndexSetsLimit = 2 /* last value, no comma*/
+};
+
+
+struct CfgSetsStruct {
+ UInt32 fFlags;
+ UInt32 fTimes[2];
+};
+typedef struct CfgSetsStruct CfgSetsStruct;
+
+struct CfgSetsElement {
+ CfgEntityRef fEntityRef;
+ CfgEntityInfo fEntityInfo;
+};
+typedef struct CfgSetsElement CfgSetsElement;
+
+struct CfgSetsVector {
+ UInt32 fCount;
+ CfgSetsElement fElements[1];
+};
+typedef struct CfgSetsVector CfgSetsVector;
+/* Common */
+enum {
+ /* connection */
+ kOTCfgTypeConfigName = FOUR_CHAR_CODE('cnam'),
+ kOTCfgTypeConfigSelected = FOUR_CHAR_CODE('ccfg'), /* transport options */
+ kOTCfgTypeUserLevel = FOUR_CHAR_CODE('ulvl'),
+ kOTCfgTypeWindowPosition = FOUR_CHAR_CODE('wpos')
+};
+
+/* AppleTalk */
+enum {
+ /* connection */
+ kOTCfgTypeAppleTalkPrefs = FOUR_CHAR_CODE('atpf'),
+ kOTCfgTypeAppleTalkVersion = FOUR_CHAR_CODE('cvrs'),
+ kOTCfgTypeAppleTalkLocks = FOUR_CHAR_CODE('lcks'),
+ kOTCfgTypeAppleTalkPort = FOUR_CHAR_CODE('port'),
+ kOTCfgTypeAppleTalkProtocol = FOUR_CHAR_CODE('prot'),
+ kOTCfgTypeAppleTalkPassword = FOUR_CHAR_CODE('pwrd'),
+ kOTCfgTypeAppleTalkPortFamily = FOUR_CHAR_CODE('ptfm') /* transport options */
+};
+
+enum {
+ kOTCfgIndexAppleTalkAARP = 0,
+ kOTCfgIndexAppleTalkDDP = 1,
+ kOTCfgIndexAppleTalkNBP = 2,
+ kOTCfgIndexAppleTalkZIP = 3,
+ kOTCfgIndexAppleTalkATP = 4,
+ kOTCfgIndexAppleTalkADSP = 5,
+ kOTCfgIndexAppleTalkPAP = 6,
+ kOTCfgIndexAppleTalkASP = 7,
+ kOTCfgIndexAppleTalkLast = 7
+};
+
+
+struct OTCfgAppleTalkPrefs {
+ UInt16 fVersion;
+ UInt16 fNumPrefs;
+ OTPortRef fPort;
+ void * fLink;
+ void * fPrefs[8];
+};
+typedef struct OTCfgAppleTalkPrefs OTCfgAppleTalkPrefs;
+
+struct OTCfgAARPPrefs {
+ UInt16 fVersion;
+ UInt16 fSize;
+ UInt32 fAgingCount;
+ UInt32 fAgingInterval;
+ OTByteCount fProtAddrLen;
+ OTByteCount fHWAddrLen;
+ UInt32 fMaxEntries;
+ OTByteCount fProbeInterval;
+ OTByteCount fProbeRetryCount;
+ OTByteCount fRequestInterval;
+ OTByteCount fRequestRetryCount;
+};
+typedef struct OTCfgAARPPrefs OTCfgAARPPrefs;
+
+struct OTCfgDDPPrefs {
+ UInt16 fVersion;
+ UInt16 fSize;
+ UInt32 fTSDUSize;
+ UInt8 fLoadType;
+ UInt8 fNode;
+ UInt16 fNetwork;
+ UInt16 fRTMPRequestLimit;
+ UInt16 fRTMPRequestInterval;
+ UInt32 fAddressGenLimit;
+ UInt32 fBRCAgingInterval;
+ UInt32 fRTMPAgingInterval;
+ UInt32 fMaxAddrTries;
+ Boolean fDefaultChecksum;
+ Boolean fIsFixedNode;
+ UInt8 fMyZone[33];
+};
+typedef struct OTCfgDDPPrefs OTCfgDDPPrefs;
+
+struct OTCfgATPFPrefs {
+ OTCfgAppleTalkPrefs fAT;
+ OTCfgAARPPrefs fAARP;
+ OTCfgDDPPrefs fDDP;
+ char fFill[122];
+};
+typedef struct OTCfgATPFPrefs OTCfgATPFPrefs;
+/* Infrared */
+enum {
+ kOTCfgTypeInfraredPrefs = FOUR_CHAR_CODE('atpf'),
+ kOTCfgTypeInfraredGlobal = FOUR_CHAR_CODE('irgo')
+};
+
+
+struct OTCfgIRPrefs {
+ CfgPrefsHeader fHdr;
+ OTPortRef fPort; /* OT port id*/
+ OTCfgIRPortSetting fPortSetting; /* Ir protocol, irda or irtalk*/
+ Boolean fNotifyOnDisconnect; /* notify user on irda disconnect?*/
+ Boolean fDisplayIRControlStrip; /* show ir control strip?*/
+ Point fWindowPosition; /* The position of the editor window*/
+};
+typedef struct OTCfgIRPrefs OTCfgIRPrefs;
+
+struct OTCfgIRGlobal {
+ CfgPrefsHeader fHdr; /* standard prefererences header*/
+ UInt32 fOptions; /* options bitmask*/
+ UInt32 fNotifyMask; /* Notification options.*/
+ UInt32 fUnloadTimeout; /* Unload timeout (in milliseconds)*/
+};
+typedef struct OTCfgIRGlobal OTCfgIRGlobal;
+/* TCP/IP v4 */
+enum {
+ /* connection */
+ kOTCfgTypeTCPalis = FOUR_CHAR_CODE('alis'),
+ kOTCfgTypeTCPcvrs = FOUR_CHAR_CODE('cvrs'),
+ kOTCfgTypeTCPdcid = FOUR_CHAR_CODE('dcid'),
+ kOTCfgTypeTCPdclt = FOUR_CHAR_CODE('dclt'),
+ kOTCfgTypeTCPdtyp = FOUR_CHAR_CODE('dtyp'),
+ kOTCfgTypeTCPidns = FOUR_CHAR_CODE('idns'),
+ kOTCfgTypeTCPihst = FOUR_CHAR_CODE('ihst'),
+ kOTCfgTypeTCPiitf = FOUR_CHAR_CODE('iitf'),
+ kOTCfgTypeTCPara = FOUR_CHAR_CODE('ipcp'),
+ kOTCfgTypeTCPirte = FOUR_CHAR_CODE('irte'),
+ kOTCfgTypeTCPisdm = FOUR_CHAR_CODE('isdm'),
+ kOTCfgTypeTCPstng = FOUR_CHAR_CODE('stng'),
+ kOTCfgTypeTCPunld = FOUR_CHAR_CODE('unld'),
+ kOTCfgTypeTCPVersion = FOUR_CHAR_CODE('cvrs'), /* Version */
+ kOTCfgTypeTCPDevType = FOUR_CHAR_CODE('dvty'),
+ kOTCfgTypeTCPPrefs = FOUR_CHAR_CODE('iitf'),
+ kOTCfgTypeTCPServersList = FOUR_CHAR_CODE('idns'),
+ kOTCfgTypeTCPSearchList = FOUR_CHAR_CODE('ihst'),
+ kOTCfgTypeTCPRoutersList = FOUR_CHAR_CODE('irte'),
+ kOTCfgTypeTCPDomainsList = FOUR_CHAR_CODE('isdm'),
+ kOTCfgTypeTCPPort = FOUR_CHAR_CODE('port'), /* Ports */
+ kOTCfgTypeTCPProtocol = FOUR_CHAR_CODE('prot'),
+ kOTCfgTypeTCPPassword = FOUR_CHAR_CODE('pwrd'), /* Password */
+ kOTCfgTypeTCPLocks = FOUR_CHAR_CODE('stng'), /* locks */
+ kOTCfgTypeTCPUnloadType = FOUR_CHAR_CODE('unld') /* transport options */
+};
+
+
+
+struct OTCfgIDNSPrefs {
+ short fCount;
+ InetHost fAddressesList;
+};
+typedef struct OTCfgIDNSPrefs OTCfgIDNSPrefs;
+
+struct OTCfgHSTFPrefs {
+ char fPrimaryInterfaceIndex; /* always 1 in OT 1.0 / 1.1*/
+ /* this structure IS packed!*/
+ UInt8 fLocalDomainName[256];
+ /* followed by */
+ UInt8 admindomain[256];
+};
+typedef struct OTCfgHSTFPrefs OTCfgHSTFPrefs;
+/* This is your worst case, a fixed size structure, tacked on after a variable length string.*/
+/* Use the macro to help access the movable beast. */
+
+#define kIITFPartP( h ) ( (OTCfgIITFPrefsPart*) &( (**( (OTCfgIITFPrefs**) h )).fAppleTalkZone[ (**( (OTCfgIITFPrefs**) h )).fAppleTalkZone[0] + 1 ] ) )
+
+/*
+ This structure also contains an IP address and subnet mask that are not aligned on a four byte boundary.
+ In order to avoid compiler warnings, and the possibility of code that won't work,
+ these fields are defined here as four character arrays.
+ It is suggested that BlockMoveData be used to copy to and from a field of type InetHost.
+*/
+
+struct OTCfgIITFPrefsPart {
+ char path[36];
+ char module[32];
+ unsigned long framing;
+};
+typedef struct OTCfgIITFPrefsPart OTCfgIITFPrefsPart;
+
+struct OTCfgIITFPrefs {
+ short fCount;
+ UInt8 fConfigMethod;
+ /* this structure IS packed!*/
+ /* Followed by:*/
+ UInt8 fIPAddress[4];
+ UInt8 fSubnetMask[4];
+ UInt8 fAppleTalkZone[256];
+ /* this structure IS packed!*/
+ UInt8 fFiller;
+ OTCfgIITFPrefsPart part;
+};
+typedef struct OTCfgIITFPrefs OTCfgIITFPrefs;
+
+struct OTCfgIRTEEntry {
+ InetHost fToHost; /* always 0;*/
+ InetHost fViaHost; /* router address;*/
+ short fLocal; /* always 0*/
+ short fHost; /* always 0*/
+};
+typedef struct OTCfgIRTEEntry OTCfgIRTEEntry;
+
+struct OTCfgIRTEPrefs {
+ short fCount;
+ OTCfgIRTEEntry fList[1];
+};
+typedef struct OTCfgIRTEPrefs OTCfgIRTEPrefs;
+
+struct OTCfgISDMPrefs {
+ short fCount;
+ Str255 fDomainsList;
+};
+typedef struct OTCfgISDMPrefs OTCfgISDMPrefs;
+
+struct OTCfgDHCPRecord {
+ InetHost ipIPAddr;
+ InetHost ipConfigServer;
+ UInt32 ipLeaseGrantTime;
+ UInt32 ipLeaseExpirationTime;
+};
+typedef struct OTCfgDHCPRecord OTCfgDHCPRecord;
+/* DNS */
+enum {
+ /* connection */
+ kOTCfgTypeDNSidns = FOUR_CHAR_CODE('idns'),
+ kOTCfgTypeDNSisdm = FOUR_CHAR_CODE('isdm'),
+ kOTCfgTypeDNSihst = FOUR_CHAR_CODE('ihst'),
+ kOTCfgTypeDNSstng = FOUR_CHAR_CODE('stng'),
+ kOTCfgTypeDNSPassword = FOUR_CHAR_CODE('pwrd') /* transport options */
+};
+
+/* Modem */
+enum {
+ /* connection */
+ kOTCfgTypeModemModem = FOUR_CHAR_CODE('ccl '), /* Type for Modem configuration resource*/
+ kOTCfgTypeModemLocks = FOUR_CHAR_CODE('lkmd'), /* Types for lock resources*/
+ kOTCfgTypeModemAdminPswd = FOUR_CHAR_CODE('mdpw'), /* Password*/
+ /* transport options */
+ kOTCfgTypeModemApp = FOUR_CHAR_CODE('mapt')
+};
+
+
+struct OTCfgRemoteConfigModem {
+ UInt32 version;
+ Boolean useModemScript;
+ char pad00; /* this structure is NOT packed!*/
+ FSSpec modemScript;
+ Boolean modemSpeakerOn;
+ Boolean modemPulseDial;
+ UInt32 modemDialToneMode;
+ SInt8 lowerLayerName[36];
+};
+typedef struct OTCfgRemoteConfigModem OTCfgRemoteConfigModem;
+
+struct OTCfgModemLocks {
+ UInt32 version;
+ UInt32 port;
+ UInt32 script;
+ UInt32 speaker;
+ UInt32 dialing;
+};
+typedef struct OTCfgModemLocks OTCfgModemLocks;
+
+struct OTCfgModemAppPrefs {
+ UInt32 version;
+ Point windowPos;
+ SInt32 userMode;
+};
+typedef struct OTCfgModemAppPrefs OTCfgModemAppPrefs;
+/* Remote Access */
+enum {
+ /* connection */
+ kOTCfgTypeRemoteARAP = FOUR_CHAR_CODE('arap'),
+ kOTCfgTypeRemoteAddress = FOUR_CHAR_CODE('cadr'),
+ kOTCfgTypeRemoteChat = FOUR_CHAR_CODE('ccha'),
+ kOTCfgTypeRemoteDialing = FOUR_CHAR_CODE('cdia'),
+ kOTCfgTypeRemoteExtAddress = FOUR_CHAR_CODE('cead'),
+ kOTCfgTypeRemoteClientLocks = FOUR_CHAR_CODE('clks'),
+ kOTCfgTypeRemoteClientMisc = FOUR_CHAR_CODE('cmsc'),
+ kOTCfgTypeRemoteConnect = FOUR_CHAR_CODE('conn'),
+ kOTCfgTypeRemoteUser = FOUR_CHAR_CODE('cusr'),
+ kOTCfgTypeRemoteDialAssist = FOUR_CHAR_CODE('dass'),
+ kOTCfgTypeRemoteIPCP = FOUR_CHAR_CODE('ipcp'),
+ kOTCfgTypeRemoteLCP = FOUR_CHAR_CODE('lcp '), /* trailing space is important! */
+ kOTCfgTypeRemoteLogOptions = FOUR_CHAR_CODE('logo'),
+ kOTCfgTypeRemotePassword = FOUR_CHAR_CODE('pass'),
+ kOTCfgTypeRemotePort = FOUR_CHAR_CODE('port'),
+ kOTCfgTypeRemoteServerLocks = FOUR_CHAR_CODE('slks'),
+ kOTCfgTypeRemoteServer = FOUR_CHAR_CODE('srvr'),
+ kOTCfgTypeRemoteUserMode = FOUR_CHAR_CODE('usmd'),
+ kOTCfgTypeRemoteX25 = FOUR_CHAR_CODE('x25 '), /* trailing space is important! */
+ /* transport options */
+ kOTCfgTypeRemoteApp = FOUR_CHAR_CODE('capt')
+};
+
+/*******************************************************************************
+* OTCfgRemoteLogOptions
+*
+* This structure is appended to OTCfgRemoteConnect records in the
+* OTCfgRemoteConnect::additional list.
+*
+* NOTE
+*
+* All OTCfgRemoteConnect::additional structures MUST have the same fields up to
+* the "additional" field. See OTCfgRemoteX25Info.
+********************************************************************************/
+
+struct OTCfgRemoteLogOptions {
+ UInt32 version;
+ UInt32 fType; /* kRAConnectAdditionalLogOptions*/
+ void * additional;
+ UInt32 logLevel; /* values defined above.*/
+ UInt32 reserved[4]; /* for later use.*/
+};
+typedef struct OTCfgRemoteLogOptions OTCfgRemoteLogOptions;
+/*******************************************************************************
+* New structures for dialing mode, phone numbers, and configuration stats.
+*
+*
+********************************************************************************/
+enum {
+ kOTCfgRemoteMaxAddressSize = (255 + 1)
+};
+
+
+struct OTCfgRemoteAddress {
+ struct OTCfgRemoteAddress * next;
+ UInt8 address[256];
+};
+typedef struct OTCfgRemoteAddress OTCfgRemoteAddress;
+/*******************************************************************************
+* OTCfgRemoteDialing
+*
+* This structure is appended to OTCfgRemoteConnect records in the
+* OTCfgRemoteConnect::additional list.
+*
+* NOTE
+*
+* All OTCfgRemoteConnect::additional structures MUST have the same fields up to
+* the "additional" field. See OTCfgRemoteX25Info.
+********************************************************************************/
+
+struct OTCfgRemoteDialing {
+ UInt32 version;
+ UInt32 fType; /* kRAConnectAdditionalDialing*/
+ void * additional;
+ UInt32 dialMode; /* values defined above.*/
+ SInt32 redialTries;
+ UInt32 redialDelay; /* in seconds.*/
+ OTCfgRemoteAddress * addresses;
+};
+typedef struct OTCfgRemoteDialing OTCfgRemoteDialing;
+/*******************************************************************************
+* OTCfgRemoteScript
+*
+* This is appended to OTCfgRemoteConnect records in the "additional" list.
+* It is currently only used for passing in a modem script to override
+* the default script. Connect scripts have their own field in OTCfgRemoteConnect.
+*
+* NOTE
+*
+* All OTCfgRemoteConnect::additional structures MUST have the same fields up to
+* the "additional" field. See OTCfgRemoteX25Info and OTCfgRemoteDialing.
+********************************************************************************/
+
+struct OTCfgRemoteScript {
+ UInt32 version;
+ UInt32 fType; /* kRAConnectAdditionalScript*/
+ void * additional;
+ UInt32 scriptType;
+ UInt32 scriptLength;
+ UInt8 * scriptData;
+};
+typedef struct OTCfgRemoteScript OTCfgRemoteScript;
+/*******************************************************************************
+* Miscellaneous limits
+* The size limits for strings include a 1 byte for the string length or
+* a terminating NULL character.
+********************************************************************************/
+enum {
+ kOTCfgRemoteMaxPasswordLength = 255,
+ kOTCfgRemoteMaxPasswordSize = (255 + 1),
+ kOTCfgRemoteMaxUserNameLength = 255,
+ kOTCfgRemoteMaxUserNameSize = (255 + 1),
+ kOTCfgRemoteMaxAddressLength = 255, /* kOTCfgRemoteMaxAddressSize = (255 + 1),*/
+ kOTCfgRemoteMaxServerNameLength = 32,
+ kOTCfgRemoteMaxServerNameSize = (32 + 1),
+ kOTCfgRemoteMaxMessageLength = 255,
+ kOTCfgRemoteMaxMessageSize = (255 + 1),
+ kOTCfgRemoteMaxX25ClosedUserGroupLength = 4,
+ kOTCfgRemoteInfiniteSeconds = (long)0xFFFFFFFF,
+ kOTCfgRemoteMinReminderMinutes = 1,
+ kOTCfgRemoteChatScriptFileCreator = FOUR_CHAR_CODE('ttxt'),
+ kOTCfgRemoteChatScriptFileType = FOUR_CHAR_CODE('TEXT'),
+ kOTCfgRemoteMaxChatScriptLength = 0x8000
+};
+
+/*******************************************************************************
+* X.25 connection information, added to OTCfgRemoteConnect's additional info list.
+*
+* NOTE
+*
+* All OTCfgRemoteConnect::additional structures MUST have the same fields up to
+* the "additional" field. See OTCfgRemoteScript & OTCfgRemoteDialing.
+********************************************************************************/
+
+struct OTCfgRemoteX25Info {
+ UInt32 version;
+ UInt32 fType; /* kRAConnectAdditionalX25*/
+ void * additional; /* Ptr to additional connect info*/
+ FSSpec script; /* PAD's CCL script*/
+ UInt8 address[256]; /* address of server*/
+ UInt8 userName[256];
+ /* network user ID*/
+ UInt8 closedUserGroup[5];
+ /* closed user group*/
+ Boolean reverseCharge; /* request reverse charging*/
+};
+typedef struct OTCfgRemoteX25Info OTCfgRemoteX25Info;
+/*******************************************************************************
+* OTCfgRemoteDisconnect
+*
+* Use this structure to terminate Remote Access connections.
+********************************************************************************/
+
+struct OTCfgRemoteDisconnect {
+ UInt32 whenSeconds; /* Number of seconds until disconnect*/
+ UInt32 showStatus; /* Show disconnect status window*/
+};
+typedef struct OTCfgRemoteDisconnect OTCfgRemoteDisconnect;
+/*******************************************************************************
+* OTCfgRemoteIsRemote
+*
+* Use this structure to find out if an AppleTalk address is on the
+* remote side of the current ARA link. The "isRemote" field is set to
+* "true" if the address is remote.
+********************************************************************************/
+
+struct OTCfgRemoteIsRemote {
+ UInt32 net; /* AppleTalk network number*/
+ UInt32 node; /* AppleTalk node number*/
+ UInt32 isRemote; /* returned.*/
+};
+typedef struct OTCfgRemoteIsRemote OTCfgRemoteIsRemote;
+/*******************************************************************************
+* OTCfgRemoteConnect
+*
+* Use this structure to initiate Remote Access connections.
+********************************************************************************/
+
+struct OTCfgRemoteConnect {
+ UInt32 version;
+ UInt32 fType; /* RAConnectType defined above.*/
+ UInt32 isGuest; /* (boolean) True for guest login*/
+ UInt32 canInteract; /* (boolean) True if dialogs can be displayed*/
+ UInt32 showStatus; /* (boolean) Display (dis)connection status dialogs?*/
+ UInt32 passwordSaved; /* (boolean) "Save Password" checked in doc.*/
+ UInt32 flashConnectedIcon; /* (boolean) Flash icon in menu bar*/
+ UInt32 issueConnectedReminders; /* (boolean) Use Notification Manager reminders*/
+ SInt32 reminderMinutes; /* How long between each reminder?*/
+ UInt32 connectManually; /* (boolean) True if we are connecting manually*/
+ UInt32 allowModemDataCompression; /* (boolean) currently, only for kSerialProtoPPP*/
+ UInt32 chatMode; /* Flags defined above*/
+ UInt32 serialProtocolMode; /* Flags defined above*/
+
+ UInt8 * password;
+ UInt8 * userName;
+ UInt32 addressLength; /* Length of phone number or other address*/
+ UInt8 * address; /* Phone number or address data*/
+ Str63 chatScriptName; /* Name of imported chat script (informational only)*/
+ UInt32 chatScriptLength; /* Length of Chat script*/
+ UInt8 * chatScript; /* Chat script data*/
+
+ void * additional; /* Ptr to additional connect info,*/
+ /* such as OTCfgRemoteX25Info*/
+
+ UInt32 useSecurityModule; /* (boolean) use line-level security module ?*/
+ OSType securitySignature; /* signature of security module file*/
+ UInt32 securityDataLength; /* 0..kSecurityMaxConfigData*/
+ UInt8 * securityData; /* Ptr to data of size securityDataLength*/
+};
+typedef struct OTCfgRemoteConnect OTCfgRemoteConnect;
+/*******************************************************************************
+* OTCfgRemoteConnectInfo
+*
+* If requestCode = kRAGetConnectInfo, "connectInfo" returns a pointer to a
+* new OTCfgRemoteConnect block that describes the current connection.
+*
+* If requestCode = kRADisposeConnectInfo, the memory pointed to by
+* "connectInfo" is released for reuse. "connectInfo" must point to a valid
+* OTCfgRemoteConnect structure previously returned by kRAGetConnectInfo.
+********************************************************************************/
+
+struct OTCfgRemoteConnectInfo {
+ OTCfgRemoteConnect * connectInfo; /* Returned or disposed, depending on requestCode*/
+};
+typedef struct OTCfgRemoteConnectInfo OTCfgRemoteConnectInfo;
+/*******************************************************************************
+* OTCfgRemoteStatus
+*
+* Use this structure to get the status of Remote Access connections.
+********************************************************************************/
+enum {
+ kOTCfgRemoteStatusIdle = 1,
+ kOTCfgRemoteStatusConnecting = 2,
+ kOTCfgRemoteStatusConnected = 3,
+ kOTCfgRemoteStatusDisconnecting = 4
+};
+
+
+
+struct OTCfgRemoteStatus {
+ UInt32 status; /* values defined above*/
+ Boolean answerEnabled;
+ char pad00; /* This structure is NOT packed*/
+ UInt32 secondsConnected;
+ UInt32 secondsRemaining;
+ UInt8 userName[256]; /* Pascal format*/
+ UInt8 serverName[33]; /* Pascal format*/
+ char pad01; /* This structure is NOT packed*/
+ UInt32 messageIndex;
+ UInt8 message[256]; /* Pascal format*/
+ UInt32 serialProtocolMode; /* Flags defined above.*/
+ UInt8 baudMessage[256]; /* Pascal format*/
+ Boolean isServer;
+ char pad02; /* This structure is NOT packed*/
+ UInt32 bytesIn;
+ UInt32 bytesOut;
+ UInt32 linkSpeed;
+ UInt32 localIPAddress;
+ UInt32 remoteIPAddress;
+};
+typedef struct OTCfgRemoteStatus OTCfgRemoteStatus;
+/*******************************************************************************
+* OTCfgRemoteUserMessage
+*
+* Use this structure when converting result codes into user messages.
+********************************************************************************/
+
+struct OTCfgRemoteUserMessage {
+ UInt32 version;
+ SInt32 messageID;
+ UInt8 userMessage[256];
+ UInt8 userDiagnostic[256];
+};
+typedef struct OTCfgRemoteUserMessage OTCfgRemoteUserMessage;
+/*******************************************************************************
+* OTCfgRemoteNotifier
+*
+* Use this structure to install a procedure to receive asynchronous
+* Remote Access notifications.
+********************************************************************************/
+
+typedef UInt32 OTCfgRemoteEventCode;
+typedef CALLBACK_API_C( void , RANotifyProcPtr )(void *contextPtr, OTCfgRemoteEventCode code, OSStatus result, void *cookie);
+
+struct OTCfgRemoteNotifier {
+ RANotifyProcPtr procPtr;
+ void * contextPtr;
+};
+typedef struct OTCfgRemoteNotifier OTCfgRemoteNotifier;
+/*******************************************************************************
+* OTCfgRemoteRequest
+*
+* All Remote Access API calls must pass a pointer to an OTCfgRemoteRequest structure.
+********************************************************************************/
+
+struct OTCfgRemoteRequest {
+ SInt8 reserved1[16]; /* Do not use. */
+ OSErr result; /* <--*/
+ SInt8 reserved2[8]; /* Do not use.*/
+ SInt16 requestCode; /* -->*/
+ SInt16 portId; /* <-->*/
+ union {
+ OTCfgRemoteNotifier Notifier;
+ OTCfgRemoteConnect Connect;
+ OTCfgRemoteDisconnect Disconnect;
+ OTCfgRemoteStatus Status;
+ OTCfgRemoteIsRemote IsRemote;
+ OTCfgRemoteConnectInfo ConnectInfo;
+ } fType;
+};
+typedef struct OTCfgRemoteRequest OTCfgRemoteRequest;
+
+struct OTCfgRemoteConfigCAPT {
+ UInt32 fWord1;
+ Point fWindowPosition;
+ UInt32 fWord3;
+ UInt32 fUserLevel;
+ UInt32 fSetupVisible;
+};
+typedef struct OTCfgRemoteConfigCAPT OTCfgRemoteConfigCAPT;
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __NETWORKSETUP__ */
+
diff --git a/include/qt/Notification.h b/include/qt/Notification.h
new file mode 100644
index 000000000..3d6960140
--- /dev/null
+++ b/include/qt/Notification.h
@@ -0,0 +1,123 @@
+/*
+ File: Notification.h
+
+ Contains: Notification Manager interfaces
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1989-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __NOTIFICATION__
+#define __NOTIFICATION__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __OSUTILS__
+#include "OSUtils.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+typedef struct NMRec NMRec;
+typedef NMRec * NMRecPtr;
+typedef CALLBACK_API( void , NMProcPtr )(NMRecPtr nmReqPtr);
+typedef STACK_UPP_TYPE(NMProcPtr) NMUPP;
+
+struct NMRec {
+ QElemPtr qLink; /* next queue entry*/
+ short qType; /* queue type -- ORD(nmType) = 8*/
+ short nmFlags; /* reserved*/
+ long nmPrivate; /* reserved*/
+ short nmReserved; /* reserved*/
+ short nmMark; /* item to mark in Apple menu*/
+ Handle nmIcon; /* handle to small icon*/
+ Handle nmSound; /* handle to sound record*/
+ StringPtr nmStr; /* string to appear in alert*/
+ NMUPP nmResp; /* pointer to response routine*/
+ long nmRefCon; /* for application use*/
+};
+
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(NMUPP)
+ NewNMUPP (NMProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeNMUPP (NMUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeNMUPP (NMRecPtr nmReqPtr,
+ NMUPP userUPP);
+
+#else
+ enum { uppNMProcInfo = 0x000000C0 }; /* pascal no_return_value Func(4_bytes) */
+ #define NewNMUPP(userRoutine) (NMUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNMProcInfo, GetCurrentArchitecture())
+ #define DisposeNMUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeNMUPP(nmReqPtr, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppNMProcInfo, (nmReqPtr))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewNMProc(userRoutine) NewNMUPP(userRoutine)
+#define CallNMProc(userRoutine, nmReqPtr) InvokeNMUPP(nmReqPtr, userRoutine)
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 NMInstall(__A0)
+ #endif
+EXTERN_API( OSErr )
+NMInstall (NMRecPtr nmReqPtr) ONEWORDINLINE(0xA05E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 NMRemove(__A0)
+ #endif
+EXTERN_API( OSErr )
+NMRemove (NMRecPtr nmReqPtr) ONEWORDINLINE(0xA05F);
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __NOTIFICATION__ */
+
diff --git a/include/qt/NumberFormatting.h b/include/qt/NumberFormatting.h
new file mode 100644
index 000000000..135d39b18
--- /dev/null
+++ b/include/qt/NumberFormatting.h
@@ -0,0 +1,194 @@
+/*
+ File: NumberFormatting.h
+
+ Contains: Utilites for formatting numbers
+
+ Version: Technology:
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1996-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __NUMBERFORMATTING__
+#define __NUMBERFORMATTING__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __INTLRESOURCES__
+#include "IntlResources.h"
+#endif
+
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*
+
+ Here are the current System 7 routine names and the translations to the older forms.
+ Please use the newer forms in all new code and migrate the older names out of existing
+ code as maintainance permits.
+
+ New Name Old Name(s)
+
+ ExtendedToString FormatX2Str
+ FormatRecToString Format2Str
+ NumToString
+ StringToExtended FormatStr2X
+ StringToFormatRec Str2Format
+ StringToNum
+
+*/
+
+struct NumFormatString {
+ UInt8 fLength;
+ UInt8 fVersion;
+ char data[254]; /* private data */
+};
+typedef struct NumFormatString NumFormatString;
+typedef NumFormatString NumFormatStringRec;
+
+typedef short FormatStatus;
+enum {
+ fVNumber = 0 /* first version of NumFormatString */
+};
+
+typedef SInt8 FormatClass;
+enum {
+ fPositive = 0,
+ fNegative = 1,
+ fZero = 2
+};
+
+typedef SInt8 FormatResultType;
+enum {
+ fFormatOK = 0,
+ fBestGuess = 1,
+ fOutOfSynch = 2,
+ fSpuriousChars = 3,
+ fMissingDelimiter = 4,
+ fExtraDecimal = 5,
+ fMissingLiteral = 6,
+ fExtraExp = 7,
+ fFormatOverflow = 8,
+ fFormStrIsNAN = 9,
+ fBadPartsTable = 10,
+ fExtraPercent = 11,
+ fExtraSeparator = 12,
+ fEmptyFormatString = 13
+};
+
+
+struct FVector {
+ short start;
+ short length;
+};
+typedef struct FVector FVector;
+/* index by [fPositive..fZero] */
+
+typedef FVector TripleInt[3];
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( void )
+stringtonum (const char * theString,
+ long * theNum);
+
+EXTERN_API_C( void )
+numtostring (long theNum,
+ char * theString);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( void )
+StringToNum (ConstStr255Param theString,
+ long * theNum);
+
+EXTERN_API( void )
+NumToString (long theNum,
+ Str255 theString);
+
+EXTERN_API( FormatStatus )
+ExtendedToString (const extended80 * x,
+ const NumFormatString * myCanonical,
+ const NumberParts * partsTable,
+ Str255 outString) FOURWORDINLINE(0x2F3C, 0x8210, 0xFFE8, 0xA8B5);
+
+EXTERN_API( FormatStatus )
+StringToExtended (ConstStr255Param source,
+ const NumFormatString * myCanonical,
+ const NumberParts * partsTable,
+ extended80 * x) FOURWORDINLINE(0x2F3C, 0x8210, 0xFFE6, 0xA8B5);
+
+EXTERN_API( FormatStatus )
+StringToFormatRec (ConstStr255Param inString,
+ const NumberParts * partsTable,
+ NumFormatString * outString) FOURWORDINLINE(0x2F3C, 0x820C, 0xFFEC, 0xA8B5);
+
+EXTERN_API( FormatStatus )
+FormatRecToString (const NumFormatString * myCanonical,
+ const NumberParts * partsTable,
+ Str255 outString,
+ TripleInt positions) FOURWORDINLINE(0x2F3C, 0x8210, 0xFFEA, 0xA8B5);
+
+
+#if OLDROUTINENAMES
+#define FormatX2Str(x, myCanonical, partsTable, outString) \
+ ExtendedToString( x, myCanonical, partsTable, outString)
+#define FormatStr2X(source, myCanonical, partsTable, x) \
+ StringToExtended( source, myCanonical, partsTable, x)
+#define Str2Format(inString, partsTable, outString) \
+ StringToFormatRec(inString, partsTable, outString)
+#define Format2Str(myCanonical, partsTable, outString, positions) \
+ FormatRecToString(myCanonical, partsTable, outString, positions)
+#endif /* OLDROUTINENAMES */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __NUMBERFORMATTING__ */
+
diff --git a/include/qt/OCE.h b/include/qt/OCE.h
new file mode 100644
index 000000000..d6496c382
--- /dev/null
+++ b/include/qt/OCE.h
@@ -0,0 +1,1537 @@
+/*
+ File: OCE.h
+
+ Contains: Apple Open Collaboration Environment (AOCE) Interfaces.
+
+ Version: Technology: AOCE Toolbox 1.02
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __OCE__
+#define __OCE__
+
+#ifndef REZ
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __ALIASES__
+#include "Aliases.h"
+#endif
+
+#ifndef __APPLEEVENTS__
+#include "AppleEvents.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* All utility routines defined here are callable at interrupt level. */
+typedef unsigned short OCERecordTypeIndex;
+typedef unsigned short OCEAttributeTypeIndex;
+/* For anyone who absolutely needs a define of the body of the standard record or
+attribute type, use these below. CAUTION! All the types below are assumed to be
+in character set 'smRoman'. If you try to compare these to some RString or
+AttributeType variable, you must take the character set code into account. Future
+standard types may be defined using character sets other than 'smRoman'. */
+
+/* All these standard definitions begin with the Apple symbol (not shown here).
+
+NOTE: To access these, you must call OCEGetIndRecordType or OCEGetIndAttributeType
+with the proper index. These routines return pointers to the standard type.
+This was done so that code fragments (INITs, CDEVs, CSAMs, etc). which cannot
+use global data can also use these. */
+/* Indices for the standard definitions for certain record types (OCERecordTypeIndex): */
+enum {
+ kUserRecTypeNum = 1, /* "User" */
+ kGroupRecTypeNum = 2, /* "Group" */
+ kMnMRecTypeNum = 3, /* "AppleMail(tm) M&M" */
+ kMnMForwarderRecTypeNum = 4, /* "AppleMail(tm) Fwdr" */
+ kNetworkSpecRecTypeNum = 5, /* "NetworkSpec" */
+ kADAPServerRecTypeNum = 6, /* "ADAP Server" */
+ kADAPDNodeRecTypeNum = 7, /* "ADAP DNode" */
+ kADAPDNodeRepRecTypeNum = 8, /* "ADAP DNode Rep" */
+ kServerSetupRecTypeNum = 9, /* "Server Setup" */
+ kDirectoryRecTypeNum = 10, /* "Directory" */
+ kDNodeRecTypeNum = 11, /* "DNode" */
+ kSetupRecTypeNum = 12, /* "Setup" */
+ kMSAMRecTypeNum = 13, /* "MSAM" */
+ kDSAMRecTypeNum = 14, /* "DSAM" */
+ kAttributeValueRecTypeNum = 15, /* "Attribute Value" */
+ kBusinessCardRecTypeNum = 16, /* "Business Card" */
+ kMailServiceRecTypeNum = 17, /* "Mail Service" */
+ kCombinedRecTypeNum = 18, /* "Combined" */
+ kOtherServiceRecTypeNum = 19, /* "Other Service" */
+ kAFPServiceRecTypeNum = 20, /* "Other Service afps" */
+ kFirstOCERecTypeNum = kUserRecTypeNum, /* first standard OCE record type */
+ kLastOCERecTypeNum = kAFPServiceRecTypeNum, /* last standard OCE record type */
+ kNumOCERecTypes = (kLastOCERecTypeNum - kFirstOCERecTypeNum + 1)
+};
+
+/* Indices for the standard definitions for certain attribute types (OCEAttributeTypeIndex): */
+enum {
+ kMemberAttrTypeNum = 1001, /* "Member" */
+ kAdminsAttrTypeNum = 1002, /* "Administrators" */
+ kMailSlotsAttrTypeNum = 1003, /* "mailslots" */
+ kPrefMailAttrTypeNum = 1004, /* "pref mailslot" */
+ kAddressAttrTypeNum = 1005, /* "Address" */
+ kPictureAttrTypeNum = 1006, /* "Picture" */
+ kAuthKeyAttrTypeNum = 1007, /* "auth key" */
+ kTelephoneAttrTypeNum = 1008, /* "Telephone" */
+ kNBPNameAttrTypeNum = 1009, /* "NBP Name" */
+ kQMappingAttrTypeNum = 1010, /* "ForwarderQMap" */
+ kDialupSlotAttrTypeNum = 1011, /* "DialupSlotInfo" */
+ kHomeNetAttrTypeNum = 1012, /* "Home Internet" */
+ kCoResAttrTypeNum = 1013, /* "Co-resident M&M" */
+ kFwdrLocalAttrTypeNum = 1014, /* "FwdrLocalRecord" */
+ kConnectAttrTypeNum = 1015, /* "Connected To" */
+ kForeignAttrTypeNum = 1016, /* "Foreign RLIs" */
+ kOwnersAttrTypeNum = 1017, /* "Owners" */
+ kReadListAttrTypeNum = 1018, /* "ReadList" */
+ kWriteListAttrTypeNum = 1019, /* "WriteList" */
+ kDescriptorAttrTypeNum = 1020, /* "Descriptor" */
+ kCertificateAttrTypeNum = 1021, /* "Certificate" */
+ kMsgQsAttrTypeNum = 1022, /* "MessageQs" */
+ kPrefMsgQAttrTypeNum = 1023, /* "PrefMessageQ" */
+ kMasterPFAttrTypeNum = 1024, /* "MasterPF" */
+ kMasterNetSpecAttrTypeNum = 1025, /* "MasterNetSpec" */
+ kServersOfAttrTypeNum = 1026, /* "Servers Of" */
+ kParentCIDAttrTypeNum = 1027, /* "Parent CID" */
+ kNetworkSpecAttrTypeNum = 1028, /* "NetworkSpec" */
+ kLocationAttrTypeNum = 1029, /* "Location" */
+ kTimeSvrTypeAttrTypeNum = 1030, /* "TimeServer Type" */
+ kUpdateTimerAttrTypeNum = 1031, /* "Update Timer" */
+ kShadowsOfAttrTypeNum = 1032, /* "Shadows Of" */
+ kShadowServerAttrTypeNum = 1033, /* "Shadow Server" */
+ kTBSetupAttrTypeNum = 1034, /* "TB Setup" */
+ kMailSetupAttrTypeNum = 1035, /* "Mail Setup" */
+ kSlotIDAttrTypeNum = 1036, /* "SlotID" */
+ kGatewayFileIDAttrTypeNum = 1037, /* "Gateway FileID" */
+ kMailServiceAttrTypeNum = 1038, /* "Mail Service" */
+ kStdSlotInfoAttrTypeNum = 1039, /* "Std Slot Info" */
+ kAssoDirectoryAttrTypeNum = 1040, /* "Asso. Directory" */
+ kDirectoryAttrTypeNum = 1041, /* "Directory" */
+ kDirectoriesAttrTypeNum = 1042, /* "Directories" */
+ kSFlagsAttrTypeNum = 1043, /* "SFlags" */
+ kLocalNameAttrTypeNum = 1044, /* "Local Name" */
+ kLocalKeyAttrTypeNum = 1045, /* "Local Key" */
+ kDirUserRIDAttrTypeNum = 1046, /* "Dir User RID" */
+ kDirUserKeyAttrTypeNum = 1047, /* "Dir User Key" */
+ kDirNativeNameAttrTypeNum = 1048, /* "Dir Native Name" */
+ kCommentAttrTypeNum = 1049, /* "Comment" */
+ kRealNameAttrTypeNum = 1050, /* "Real Name" */
+ kPrivateDataAttrTypeNum = 1051, /* "Private Data" */
+ kDirTypeAttrTypeNum = 1052, /* "Directory Type" */
+ kDSAMFileAliasAttrTypeNum = 1053, /* "DSAM File Alias" */
+ kCanAddressToAttrTypeNum = 1054, /* "Can Address To" */
+ kDiscriminatorAttrTypeNum = 1055, /* "Discriminator" */
+ kAliasAttrTypeNum = 1056, /* "Alias" */
+ kParentMSAMAttrTypeNum = 1057, /* "Parent MSAM" */
+ kParentDSAMAttrTypeNum = 1058, /* "Parent DSAM" */
+ kSlotAttrTypeNum = 1059, /* "Slot" */
+ kAssoMailServiceAttrTypeNum = 1060, /* "Asso. Mail Service" */
+ kFakeAttrTypeNum = 1061, /* "Fake" */
+ kInheritSysAdminAttrTypeNum = 1062, /* "Inherit SysAdministrators" */
+ kPreferredPDAttrTypeNum = 1063, /* "Preferred PD" */
+ kLastLoginAttrTypeNum = 1064, /* "Last Login" */
+ kMailerAOMStateAttrTypeNum = 1065, /* "Mailer AOM State" */
+ kMailerSendOptionsAttrTypeNum = 1066, /* "Mailer Send Options" */
+ kJoinedAttrTypeNum = 1067, /* "Joined" */
+ kUnconfiguredAttrTypeNum = 1068, /* "Unconfigured" */
+ kVersionAttrTypeNum = 1069, /* "Version" */
+ kLocationNamesAttrTypeNum = 1070, /* "Location Names" */
+ kActiveAttrTypeNum = 1071, /* "Active" */
+ kDeleteRequestedAttrTypeNum = 1072, /* "Delete Requested" */
+ kGatewayTypeAttrTypeNum = 1073, /* "Gateway Type" */
+ kFirstOCEAttrTypeNum = kMemberAttrTypeNum, /* first standard OCE attr type */
+ kLastOCEAttrTypeNum = kGatewayTypeAttrTypeNum, /* last standard OCE attr type */
+ kNumOCEAttrTypes = (kLastOCEAttrTypeNum - kFirstOCEAttrTypeNum + 1)
+};
+
+
+#endif /* REZ */
+
+/* Standard definitions for certain record types: */
+
+#define kUserRecTypeBody "aoce User"
+#define kGroupRecTypeBody "aoce Group"
+#define kMnMRecTypeBody "aoce AppleMailª M&M"
+#define kMnMForwarderRecTypeBody "aoce AppleMailª Fwdr"
+#define kNetworkSpecRecTypeBody "aoce NetworkSpec"
+#define kADAPServerRecTypeBody "aoce ADAP Server"
+#define kADAPDNodeRecTypeBody "aoce ADAP DNode"
+#define kADAPDNodeRepRecTypeBody "aoce ADAP DNode Rep"
+#define kServerSetupRecTypeBody "aoce Server Setup"
+#define kDirectoryRecTypeBody "aoce Directory"
+#define kDNodeRecTypeBody "aoce DNode"
+#define kSetupRecTypeBody "aoce Setup"
+#define kMSAMRecTypeBody "aoce MSAM"
+#define kDSAMRecTypeBody "aoce DSAM"
+#define kAttributeValueRecTypeBody "aoce Attribute Value"
+#define kBusinessCardRecTypeBody "aoce Business Card"
+#define kMailServiceRecTypeBody "aoce Mail Service"
+#define kCombinedRecTypeBody "aoce Combined"
+#define kOtherServiceRecTypeBody "aoce Other Service"
+#define kAFPServiceRecTypeBody "aoce Other Service afps"
+
+/* Standard definitions for certain attribute types: */
+
+#define kMemberAttrTypeBody "aoce Member"
+#define kAdminsAttrTypeBody "aoce Administrators"
+#define kMailSlotsAttrTypeBody "aoce mailslots"
+#define kPrefMailAttrTypeBody "aoce pref mailslot"
+#define kAddressAttrTypeBody "aoce Address"
+#define kPictureAttrTypeBody "aoce Picture"
+#define kAuthKeyAttrTypeBody "aoce auth key"
+#define kTelephoneAttrTypeBody "aoce Telephone"
+#define kNBPNameAttrTypeBody "aoce NBP Name"
+#define kQMappingAttrTypeBody "aoce ForwarderQMap"
+#define kDialupSlotAttrTypeBody "aoce DialupSlotInfo"
+#define kHomeNetAttrTypeBody "aoce Home Internet"
+#define kCoResAttrTypeBody "aoce Co-resident M&M"
+#define kFwdrLocalAttrTypeBody "aoce FwdrLocalRecord"
+#define kConnectAttrTypeBody "aoce Connected To"
+#define kForeignAttrTypeBody "aoce Foreign RLIs"
+#define kOwnersAttrTypeBody "aoce Owners"
+#define kReadListAttrTypeBody "aoce ReadList"
+#define kWriteListAttrTypeBody "aoce WriteList"
+#define kDescriptorAttrTypeBody "aoce Descriptor"
+#define kCertificateAttrTypeBody "aoce Certificate"
+#define kMsgQsAttrTypeBody "aoce MessageQs"
+#define kPrefMsgQAttrTypeBody "aoce PrefMessageQ"
+#define kMasterPFAttrTypeBody "aoce MasterPF"
+#define kMasterNetSpecAttrTypeBody "aoce MasterNetSpec"
+#define kServersOfAttrTypeBody "aoce Servers Of"
+#define kParentCIDAttrTypeBody "aoce Parent CID"
+#define kNetworkSpecAttrTypeBody "aoce NetworkSpec"
+#define kLocationAttrTypeBody "aoce Location"
+#define kTimeSvrTypeAttrTypeBody "aoce TimeServer Type"
+#define kUpdateTimerAttrTypeBody "aoce Update Timer"
+#define kShadowsOfAttrTypeBody "aoce Shadows Of"
+#define kShadowServerAttrTypeBody "aoce Shadow Server"
+#define kTBSetupAttrTypeBody "aoce TB Setup"
+#define kMailSetupAttrTypeBody "aoce Mail Setup"
+#define kSlotIDAttrTypeBody "aoce SlotID"
+#define kGatewayFileIDAttrTypeBody "aoce Gateway FileID"
+#define kMailServiceAttrTypeBody "aoce Mail Service"
+#define kStdSlotInfoAttrTypeBody "aoce Std Slot Info"
+#define kAssoDirectoryAttrTypeBody "aoce Asso. Directory"
+#define kDirectoryAttrTypeBody "aoce Directory"
+#define kDirectoriesAttrTypeBody "aoce Directories"
+#define kSFlagsAttrTypeBody "aoce SFlags"
+#define kLocalNameAttrTypeBody "aoce Local Name"
+#define kLocalKeyAttrTypeBody "aoce Local Key"
+#define kDirUserRIDAttrTypeBody "aoce Dir User RID"
+#define kDirUserKeyAttrTypeBody "aoce Dir User Key"
+#define kDirNativeNameAttrTypeBody "aoce Dir Native Name"
+#define kCommentAttrTypeBody "aoce Comment"
+#define kRealNameAttrTypeBody "aoce Real Name"
+#define kPrivateDataAttrTypeBody "aoce Private Data"
+#define kDirTypeAttrTypeBody "aoce Directory Type"
+#define kDSAMFileAliasAttrTypeBody "aoce DSAM File Alias"
+#define kCanAddressToAttrTypeBody "aoce Can Address To"
+#define kDiscriminatorAttrTypeBody "aoce Discriminator"
+#define kAliasAttrTypeBody "aoce Alias"
+#define kParentMSAMAttrTypeBody "aoce Parent MSAM"
+#define kParentDSAMAttrTypeBody "aoce Parent DSAM"
+#define kSlotAttrTypeBody "aoce Slot"
+#define kAssoMailServiceAttrTypeBody "aoce Asso. Mail Service"
+#define kFakeAttrTypeBody "aoce Fake"
+#define kInheritSysAdminAttrTypeBody "aoce Inherit SysAdministrators"
+#define kPreferredPDAttrTypeBody "aoce Preferred PD"
+#define kLastLoginAttrTypeBody "aoce Last Login"
+#define kMailerAOMStateAttrTypeBody "aoce Mailer AOM State"
+#define kMailerSendOptionsAttrTypeBody "aoce Mailer Send Options"
+#define kJoinedAttrTypeBody "aoce Joined"
+#define kUnconfiguredAttrTypeBody "aoce Unconfigured"
+#define kVersionAttrTypeBody "aoce Version"
+#define kLocationNamesAttrTypeBody "aoce Location Names"
+#define kActiveAttrTypeBody "aoce Active"
+#define kDeleteRequestedAttrTypeBody "aoce Delete Requested"
+#define kGatewayTypeAttrTypeBody "aoce Gateway Type"
+#ifndef REZ
+/* Miscellaneous enums: */
+enum {
+ kRString32Size = 32, /* max size of the body field in RString32 */
+ kRString64Size = 64, /* max size of the body field in RString64 */
+ kNetworkSpecMaxBytes = 32, /* max size of the body field in NetworkSpec */
+ kPathNameMaxBytes = 1024, /* max size of the data field in PackedPathName */
+ kDirectoryNameMaxBytes = 32, /* max size of the body field in DirectoryName */
+ kAttributeTypeMaxBytes = 32, /* max size of the body field in AttributeType */
+ kAttrValueMaxBytes = 65536L, /* max size of any attribute value */
+ kRStringMaxBytes = 256, /* max size (in bytes) of the body field of a recordName or recordType */
+ kRStringMaxChars = 128 /* max size (in chars) of the body field of a recordName or recordType */
+};
+
+enum {
+ kNULLDNodeNumber = 0, /* Special value meaning none specified */
+ kRootDNodeNumber = 2 /* DNodeNum corresponding to the root of the tree */
+};
+
+
+/* This enum is used to select the kind of RString in calls such as OCERelRString,
+OCEEqualRString, and OCEValidRString.
+
+eGenericSensitive and eGenericInsensitive are enumerators that can be used if you
+use RStrings for things other than what you see in this file. If you want them to
+be compared in a case- and diacritical-sensitive manner (c . C . .), use
+eGenericSensitive. If you want them to be compared in a case- and diacritical-
+insensitive manner (c = C = .), use eGenericInensitive.
+WARNING: do not use eGenericSensitive and eGenericInsensitive with catalog
+names, entity names, pathname parts, entity types, network specs, or attribute
+types! Don't assume that you know how they should be compared!!! */
+enum {
+ kOCEDirName = 0,
+ kOCERecordOrDNodeName = 1,
+ kOCERecordType = 2,
+ kOCENetworkSpec = 3,
+ kOCEAttrType = 4,
+ kOCEGenericSensitive = 5,
+ kOCEGenericInsensitive = 6
+};
+
+typedef unsigned short RStringKind;
+/* Values for the signature field in Discriminator */
+enum {
+ kDirAllKinds = 0,
+ kDirADAPKind = FOUR_CHAR_CODE('adap'),
+ kDirPersonalDirectoryKind = FOUR_CHAR_CODE('pdir'),
+ kDirDSAMKind = FOUR_CHAR_CODE('dsam')
+};
+
+
+typedef unsigned long OCEDirectoryKind;
+/* Values returned by GetDSSpecInfo() */
+enum {
+ kOCEInvalidDSSpec = 0x3F3F3F3F, /* '????' could not be determined */
+ kOCEDirsRootDSSpec = FOUR_CHAR_CODE('root'), /* root of all catalogs ("Catalogs" icon) */
+ kOCEDirectoryDSSpec = FOUR_CHAR_CODE('dire'), /* catalog */
+ kOCEDNodeDSSpec = FOUR_CHAR_CODE('dnod'), /* d-node */
+ kOCERecordDSSpec = FOUR_CHAR_CODE('reco'), /* record */
+ kOCEentnDSSpec = FOUR_CHAR_CODE('entn'), /* extensionType is 'entn' */
+ kOCENOTentnDSSpec = FOUR_CHAR_CODE('not ') /* extensionType is not 'entn' */
+};
+
+
+/* Values for AttributeTag */
+enum {
+ typeRString = FOUR_CHAR_CODE('rstr'),
+ typePackedDSSpec = FOUR_CHAR_CODE('dspc'),
+ typeBinary = FOUR_CHAR_CODE('bnry')
+};
+
+
+/* Bit flag corresponding to the canContainRecords bit. Use it like this:
+ if (foo & kCanContainRecords)
+ then this dNode can contain records!
+kForeignNode is used to indicate nodes in the name hierarchy that correspond to
+foreign catalogs (meaning ADAP sees no clusters or DNodes beneath it, but
+mail routers might be able to route to clusters beneath it. */
+enum {
+ kCanContainRecordsBit = 0,
+ kForeignNodeBit = 1
+};
+
+/* DirNodeKind */
+enum {
+ kCanContainRecords = 1L << kCanContainRecordsBit,
+ kForeignNode = 1L << kForeignNodeBit
+};
+
+typedef unsigned long DirNodeKind;
+
+
+/**** Toolbox Control ****/
+/* We will have a version number and attributes for toolboxes off the aa5e trap
+and the S&F server trap.
+
+This includes the OCE toolbox and S&F Server. [Note: the S&F server will
+change to ONLY service ServerGateway calls -it will then be necessary to run
+it co-resident with an OCE toolbox].
+
+The high order word will represent the S&F Server version number. The low
+order word will represent the OCE toolbox version number. These will be zero
+until the component is up and running. It is not possible to know these
+a-priori. Note: there will not be a seperate version numbers for each component
+in the OCE toolbox or S&F server.
+
+The above is consistent with the standard System 7.0 usage of Gestalt.
+
+The oce tb attribute gestaltOCETBPresent implies the existence of OCE on a
+machine.
+
+The OCE TB attribute gestaltOCETBAvailable implies the availablity of OCE calls.
+
+The attribute gestaltOCESFServerAvailable implies the availablity of OCE calls
+available through the S&F server. This are essentially the server gateway calls.
+
+Any (future) remaining OCE attributes may not be established correctly until
+the attribute gestaltOCETBAvailable is set.
+
+*/
+
+/* Constants used for Transitions. */
+enum {
+ ATTransIPMStart = FOUR_CHAR_CODE('ipms'),
+ ATTransIPMShutdown = FOUR_CHAR_CODE('ipmd'),
+ ATTransDirStart = FOUR_CHAR_CODE('dirs'),
+ ATTransDirShutdown = FOUR_CHAR_CODE('dird'),
+ ATTransAuthStart = FOUR_CHAR_CODE('auts'),
+ ATTransAuthShutdown = FOUR_CHAR_CODE('autd'),
+ ATTransSFStart = FOUR_CHAR_CODE('s&fs'),
+ ATTransSFShutdown = FOUR_CHAR_CODE('s&fd')
+};
+
+
+
+/* Some definitions for time-related parameters: */
+/* Interpreted as UTC seconds since 1/1/1904 */
+typedef unsigned long UTCTime;
+/* seconds EAST of Greenwich */
+typedef long UTCOffset;
+/* This is the same as the ScriptManager script. */
+typedef short CharacterSet;
+/**** RString ****/
+
+/* struct RString is a maximum-sized structure. Allocate one of these and it will
+hold any valid RString. */
+
+struct RString {
+ CharacterSet charSet;
+ unsigned short dataLength;
+ Byte body[256]; /* place for characters */
+};
+typedef struct RString RString;
+/* struct ProtoRString is a minimum-sized structure. Use this for a variable-length RString. */
+
+struct ProtoRString {
+ CharacterSet charSet;
+ unsigned short dataLength;
+};
+typedef struct ProtoRString ProtoRString;
+
+typedef RString * RStringPtr;
+typedef RStringPtr * RStringHandle;
+typedef ProtoRString * ProtoRStringPtr;
+
+struct RString64 {
+ CharacterSet charSet;
+ unsigned short dataLength;
+ Byte body[64];
+};
+typedef struct RString64 RString64;
+
+struct RString32 {
+ CharacterSet charSet;
+ unsigned short dataLength;
+ Byte body[32];
+};
+typedef struct RString32 RString32;
+/* Standard definitions for the entity type field and attribute type
+have been moved to the end of the file. */
+
+/* Copies str1 to str2. str2Length is the size of str2, excluding header.
+A memFull error will be returned if that is not as large as str1->dataLength. */
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+OCECopyRString (const RString * str1,
+ RString * str2,
+ unsigned short str2Length) THREEWORDINLINE(0x303C, 0x0308, 0xAA5C);
+
+
+/* Make an RString from a C string. If the c string is bigger than rStrLength,
+only rStrLength bytes will be copied. (rStrLength does not include the header size) */
+EXTERN_API( void )
+OCECToRString (const char * cStr,
+ CharacterSet charSet,
+ RString * rStr,
+ unsigned short rStrLength) THREEWORDINLINE(0x303C, 0x0339, 0xAA5C);
+
+
+/* Make an RString from a Pascal string. If the Pascal string is bigger than rStrLength,
+only rStrLength bytes will be copied. (rStrLength does not include the header size) */
+EXTERN_API( void )
+OCEPToRString (ConstStr255Param pStr,
+ CharacterSet charSet,
+ RString * rStr,
+ unsigned short rStrLength) THREEWORDINLINE(0x303C, 0x033A, 0xAA5C);
+
+
+/* Make a Pascal string from an RString. It's up to you to check the char set of
+the RString, or if the length of the RString is greater than 255 (the Pascal string's
+length will simply be the lower byte of the RString's length). The StringPtr that is
+returned will point directly into the RString (no memory will be allocated). */
+EXTERN_API( StringPtr )
+OCERToPString (const RString * rStr) THREEWORDINLINE(0x303C, 0x033B, 0xAA5C);
+
+
+/* Check the relative equality of two RStrings. Determines if str1 is greater than,
+equal to, or less than str2. Result types for OCERelRString are defined in <OSUtils.h>
+(same as for RelString). */
+EXTERN_API( short )
+OCERelRString (const void * str1,
+ const void * str2,
+ RStringKind kind) THREEWORDINLINE(0x303C, 0x032D, 0xAA5C);
+
+
+/* Check for equality of two RStrings. Returns true if equal. */
+EXTERN_API( Boolean )
+OCEEqualRString (const void * str1,
+ const void * str2,
+ RStringKind kind) THREEWORDINLINE(0x303C, 0x0316, 0xAA5C);
+
+
+/* Check the validity of an RString. Returns true if the RString is valid */
+EXTERN_API( Boolean )
+OCEValidRString (const void * str,
+ RStringKind kind) THREEWORDINLINE(0x303C, 0x0338, 0xAA5C);
+
+
+/**** CreationID ****/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct CreationID {
+ unsigned long source; /* Fields definitions and usage are not defined */
+ unsigned long seq;
+};
+typedef struct CreationID CreationID;
+
+typedef CreationID AttributeCreationID;
+typedef CreationID * CreationIDPtr;
+
+/* Returns a pointer to a null CreationID . */
+#if CALL_NOT_IN_CARBON
+EXTERN_API( const CreationID *)
+OCENullCID (void) THREEWORDINLINE(0x303C, 0x0344, 0xAA5C);
+
+
+/* Returns a pointer to a special CreationID used within the PathFinder. */
+EXTERN_API( const CreationID *)
+OCEPathFinderCID (void) THREEWORDINLINE(0x303C, 0x033C, 0xAA5C);
+
+
+/* Sets the CreationID to a null value. */
+EXTERN_API( void )
+OCESetCreationIDtoNull (CreationID * cid) THREEWORDINLINE(0x303C, 0x032E, 0xAA5C);
+
+
+/* Copies the value of cid1 to cid2. */
+EXTERN_API( void )
+OCECopyCreationID (const CreationID * cid1,
+ CreationID * cid2) THREEWORDINLINE(0x303C, 0x0300, 0xAA5C);
+
+
+/* Check the equality of two CreationIDs. */
+EXTERN_API( Boolean )
+OCEEqualCreationID (const CreationID * cid1,
+ const CreationID * cid2) THREEWORDINLINE(0x303C, 0x030C, 0xAA5C);
+
+
+/**** NetworkSpec ****/
+/* For the record, a NetworkSpec is an RString with a smaller maximum size.
+I don't just typedef it to an RString, because I want the definition of the NetworkSpec
+struct to contain the max length. But it should be possible to typecast any
+NetworkSpec to an RString and use all the RString utilities on it. */
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct NetworkSpec {
+ CharacterSet charSet;
+ unsigned short dataLength;
+ Byte body[32]; /* always fixed at the max size */
+};
+typedef struct NetworkSpec NetworkSpec;
+typedef NetworkSpec * NetworkSpecPtr;
+
+/**** PackedPathName ****/
+/* struct PackedPathName is a maximum-sized structure. Allocate one of
+these and it will hold any valid packed pathname. */
+
+struct PackedPathName {
+ unsigned short dataLength; /* dataLength excludes the space for the dataLength field */
+ Byte data[1022];
+};
+typedef struct PackedPathName PackedPathName;
+/* struct ProtoPackedPathName is a minimum-sized structure. Use this
+for a variable-length packed PathName. */
+
+struct ProtoPackedPathName {
+ unsigned short dataLength; /* dataLength excludes the space for the dataLength field */
+ /* Followed by data */
+};
+typedef struct ProtoPackedPathName ProtoPackedPathName;
+
+typedef PackedPathName * PackedPathNamePtr;
+typedef ProtoPackedPathName * ProtoPackedPathNamePtr;
+/*
+Copy the contents of path1 to path2. path2Length is the size of path2, and must
+be large enough to hold a copy of path1. A memFull error will be returned if that
+is not the case.
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+OCECopyPackedPathName (const PackedPathName * path1,
+ PackedPathName * path2,
+ unsigned short path2Length) THREEWORDINLINE(0x303C, 0x0304, 0xAA5C);
+
+
+/*
+Returns true if packed path pointer is nil, or is of zero length, or is of
+length 2 and nParts of zero.
+*/
+EXTERN_API( Boolean )
+OCEIsNullPackedPathName (const PackedPathName * path) THREEWORDINLINE(0x303C, 0x031D, 0xAA5C);
+
+
+/*
+OCEUnpackPathName breaks apart the path into its component RStrings, writing string
+pointers into the array 'parts', which the client asserts can hold as many as
+'nParts' elements. The number of parts actually found is returned. Strings are
+placed in the array in order from lowest to highest. The first pathName element
+beneath the root appears last. NOTE THAT THE UNPACKED STRUCT CONTAINS POINTERS INTO
+THE PACKED STRUCT - DON'T DELETE OR REUSE THE PACKED STRUCT UNTIL YOU ARE FINISHED
+WITH THE UNPACKED STRUCT AS WELL
+*/
+EXTERN_API( unsigned short )
+OCEUnpackPathName (const PackedPathName * path,
+ RString *const parts[],
+ unsigned short nParts) THREEWORDINLINE(0x303C, 0x0330, 0xAA5C);
+
+
+/*
+OCEPackedPathNameSize computes the number of bytes of memory needed to hold a
+PackedPathName manufactured from the array of parts. This length
+includes the length of the length field of PackedPathName, so it
+is safe to do a NewPtr (OCEPackedPathNameSize(...)).
+*/
+EXTERN_API( unsigned short )
+OCEPackedPathNameSize (const RStringPtr parts[],
+ unsigned short nParts) THREEWORDINLINE(0x303C, 0x0328, 0xAA5C);
+
+
+/* OCEDNodeNameCount returns the number of RStrings contained within the path. */
+EXTERN_API( unsigned short )
+OCEDNodeNameCount (const PackedPathName * path) THREEWORDINLINE(0x303C, 0x032C, 0xAA5C);
+
+
+/*
+OCEPackPathName packs the parts into the storage provided as 'path'. path must be
+large enough to hold the packed pathname. A memFull error will be returned if
+pathLength is too small. parts[0] should contain the deepest pathName element,
+and parts[nParts - 1] should contain the name of the first pathName element beneath
+the root.
+*/
+EXTERN_API( OSErr )
+OCEPackPathName (const RStringPtr parts[],
+ unsigned short nParts,
+ PackedPathName * path,
+ unsigned short pathLength) THREEWORDINLINE(0x303C, 0x0323, 0xAA5C);
+
+
+/*
+Check the equality of two packed paths.
+*/
+EXTERN_API( Boolean )
+OCEEqualPackedPathName (const PackedPathName * path1,
+ const PackedPathName * path2) THREEWORDINLINE(0x303C, 0x0311, 0xAA5C);
+
+
+/*
+OCEValidPackedPathName checks that the packed PathName is internally consistent.
+Returns true if it's ok.
+*/
+EXTERN_API( Boolean )
+OCEValidPackedPathName (const PackedPathName * path) THREEWORDINLINE(0x303C, 0x0334, 0xAA5C);
+
+
+/**** DirDiscriminator ****/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct DirDiscriminator {
+ OCEDirectoryKind signature;
+ unsigned long misc;
+};
+typedef struct DirDiscriminator DirDiscriminator;
+/* Copies the value of disc1 to disc2. */
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+OCECopyDirDiscriminator (const DirDiscriminator * disc1,
+ DirDiscriminator * disc2) THREEWORDINLINE(0x303C, 0x0301, 0xAA5C);
+
+
+/* Check the equality of two DirDiscriminators. */
+EXTERN_API( Boolean )
+OCEEqualDirDiscriminator (const DirDiscriminator * disc1,
+ const DirDiscriminator * disc2) THREEWORDINLINE(0x303C, 0x030D, 0xAA5C);
+
+/*
+This structure is called RLI because it really contains all the info you
+need to locate a record within the entire name space. It contains four fields.
+The first two are the name of the catalog and a catalog discriminator. These
+two fields are used to indicate to which catalog a given record belongs. The
+discriminator is used to distinguish between two different catalogs that have
+the same name.
+
+The other two fields in the RLI structure are used to indicate a particular
+catalog node within the catalog specified by the directoryName and
+discriminator fields. These fields are exactly analagous to the dirID and
+pathname used in HFS. It is possible to specify a dNode just by dNodeNumber
+(pathname is nil), or just by pathname (dNodeNumber is set to kNULLDNodeNumber),
+or by a combination of the two. The latter is called a 'partial pathname', and
+while it is valid in the Catalog Manager API, it is not supported by ADAP
+catalogs in Release 1.
+
+Note that the path parameter does not include the catalog name, but holds
+the names of all the nodes on the path to the desired catalog node, starting
+with the catalog node and working its way up the tree.
+*/
+
+/**** RLI ****/
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct DirectoryName {
+ CharacterSet charSet;
+ unsigned short dataLength;
+ Byte body[32]; /* space for catalog name */
+};
+typedef struct DirectoryName DirectoryName;
+typedef DirectoryName * DirectoryNamePtr;
+/* Catalog node number */
+
+typedef unsigned long DNodeNum;
+
+struct RLI {
+ DirectoryNamePtr directoryName; /* pointer to the name of the catalog root */
+ DirDiscriminator discriminator; /* used to discriminate between dup catalog names */
+ DNodeNum dNodeNumber; /* number of the node */
+ PackedPathNamePtr path; /* old-style RLI */
+};
+typedef struct RLI RLI;
+typedef RLI * RLIPtr;
+/*
+Create a new RLI from the catalog name, discriminator, DNode number, and
+PackedPathName. You must allocate the storage for the RLI and pass in a pointer
+to it.
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+OCENewRLI (RLI * newRLI,
+ const DirectoryName * dirName,
+ DirDiscriminator * discriminator,
+ DNodeNum dNodeNumber,
+ const PackedPathName * path) THREEWORDINLINE(0x303C, 0x031F, 0xAA5C);
+
+
+/*
+Duplicate the contents of rli1 to rli2. No errors are returned. This
+simply copies the pointers to the catalog name and path, wiping out any pointer
+that you might have had in there.
+*/
+EXTERN_API( void )
+OCEDuplicateRLI (const RLI * rli1,
+ RLI * rli2) THREEWORDINLINE(0x303C, 0x030B, 0xAA5C);
+
+
+/*
+Copy the contents of rli1 to rli2. rli2 must already contain
+pointers to structures large enough to hold copies of the corresponding
+fields from rli1. A memFull error will be returned if that is not the case.
+So if you allocate a brand new empty destination, you must at least set up
+its length fields.
+*/
+EXTERN_API( OSErr )
+OCECopyRLI (const RLI * rli1,
+ RLI * rli2) THREEWORDINLINE(0x303C, 0x0307, 0xAA5C);
+
+
+/*
+Check the equality of two RLIs. This will take into account differences
+in the case and diacriticals of the directoryName and the PathName.
+NOTE THAT THIS WILL FAIL IF rli1 CONTAINS A DNODENUMBER AND A NIL PATHNAME,
+AND rli2 CONTAINS kNULLDNodeNumber AND A NON-NIL PATHNAME. IN OTHER WORDS,
+THE TWO rlis MUST BE OF THE SAME FORM TO CHECK FOR EQUALITY.
+The one exception is that if the pathname is nil, a dNodeNumber of zero and
+kRootDNodeNumber will be treated as equal.
+*/
+EXTERN_API( Boolean )
+OCEEqualRLI (const RLI * rli1,
+ const RLI * rli2) THREEWORDINLINE(0x303C, 0x0315, 0xAA5C);
+
+
+/*
+Check the validity of an RLI. This checks that the catalog name length
+is within bounds, and the packed pathname (if specified) is valid.
+*/
+EXTERN_API( Boolean )
+OCEValidRLI (const RLI * theRLI) THREEWORDINLINE(0x303C, 0x0337, 0xAA5C);
+
+/**** PackedRLI ****/
+/*
+struct PackedRLI is a maximum-sized structure. Allocate one of
+these and it will hold any valid packed pathname.
+*/
+#endif /* CALL_NOT_IN_CARBON */
+
+enum {
+ kRLIMaxBytes = (sizeof(RString) + sizeof(DirDiscriminator) + sizeof(DNodeNum) + kPathNameMaxBytes)
+};
+
+
+struct PackedRLI {
+ unsigned short dataLength; /* dataLength excludes the space for the dataLength field */
+ Byte data[1296];
+};
+typedef struct PackedRLI PackedRLI;
+/*
+struct ProtoPackedRLI is a minimum-sized structure. Use this
+for a variable-length packed RLI.
+*/
+
+struct ProtoPackedRLI {
+ unsigned short dataLength; /* dataLength excludes the space for the dataLength field */
+ /* Followed by data */
+};
+typedef struct ProtoPackedRLI ProtoPackedRLI;
+
+typedef PackedRLI * PackedRLIPtr;
+typedef ProtoPackedRLI * ProtoPackedRLIPtr;
+/*
+Copy the contents of prli1 to prli2. prli2Length is the size of prli2, and must
+be large enough to hold a copy of prli1. A memFull error will be returned if that
+is not the case.
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+OCECopyPackedRLI (const PackedRLI * prli1,
+ PackedRLI * prli2,
+ unsigned short prli2Length) THREEWORDINLINE(0x303C, 0x0305, 0xAA5C);
+
+
+/*
+OCEUnpackRLI breaks apart the prli into its components, writing pointers into
+the rli structure. NOTE THAT THE UNPACKED STRUCT CONTAINS POINTERS INTO THE
+PACKED STRUCT - DON'T DELETE OR REUSE THE PACKED STRUCT UNTIL YOU ARE FINISHED
+WITH THE UNPACKED STRUCT AS WELL
+*/
+EXTERN_API( void )
+OCEUnpackRLI (const PackedRLI * prli,
+ RLI * theRLI) THREEWORDINLINE(0x303C, 0x0331, 0xAA5C);
+
+
+/*
+OCEPackedRLISize computes the number of bytes of memory needed to hold a
+PackedRLI manufactured from an RLI. This length
+includes the length of the length field of PackedRLI, so it
+is safe to do a NewPtr (OCEPackedRLISize(...)).
+*/
+EXTERN_API( unsigned short )
+OCEPackedRLISize (const RLI * theRLI) THREEWORDINLINE(0x303C, 0x032A, 0xAA5C);
+
+
+/*
+OCEPackRLI packs the RLI into the storage provided as 'prli'. prli must be
+large enough to hold the packed RLI. A memFull error will be returned if
+prliLength is too small.
+*/
+EXTERN_API( OSErr )
+OCEPackRLI (const RLI * theRLI,
+ PackedRLI * prli,
+ unsigned short prliLength) THREEWORDINLINE(0x303C, 0x0324, 0xAA5C);
+
+
+/*
+OCEPackedRLIPartsSize computes the number of bytes of memory needed to hold a
+PackedRLI manufactured from the parts of an RLI. This length
+includes the length of the length field of PackedRLI, so it
+is safe to do a NewPtr (OCEPackedRLIPartsSize(...)).
+*/
+EXTERN_API( unsigned short )
+OCEPackedRLIPartsSize (const DirectoryName * dirName,
+ const RStringPtr parts[],
+ unsigned short nParts) THREEWORDINLINE(0x303C, 0x0329, 0xAA5C);
+
+/*
+OCEPackRLIParts packs the parts of an RLI into the storage provided as 'prli'.
+prli must be large enough to hold the packed RLI. A memFull error will be returned
+if prliLength is too small.
+*/
+EXTERN_API( OSErr )
+OCEPackRLIParts (const DirectoryName * dirName,
+ const DirDiscriminator * discriminator,
+ DNodeNum dNodeNumber,
+ const RStringPtr parts[],
+ unsigned short nParts,
+ PackedRLI * prli,
+ unsigned short prliLength) THREEWORDINLINE(0x303C, 0x0325, 0xAA5C);
+
+/*
+Check the equality of two packed prlis.
+*/
+EXTERN_API( Boolean )
+OCEEqualPackedRLI (const PackedRLI * prli1,
+ const PackedRLI * prli2) THREEWORDINLINE(0x303C, 0x0313, 0xAA5C);
+
+
+/*
+Check the validity of a packed RLI. This checks that the catalog name length
+is within bounds, and the packed pathname (if specified) is valid.
+*/
+EXTERN_API( Boolean )
+OCEValidPackedRLI (const PackedRLI * prli) THREEWORDINLINE(0x303C, 0x0336, 0xAA5C);
+
+/*
+If this packed RLI describes a Personal Catalog, this call will return a pointer
+to an alias record that can be used to find the actual file. Otherwise, it returns nil.
+*/
+EXTERN_API( AliasPtr )
+OCEExtractAlias (const PackedRLI * prli) THREEWORDINLINE(0x303C, 0x0318, 0xAA5C);
+
+/*
+This call returns a pointer to a packed RLI that represents the "Catalogs" icon, or
+the root of all catalogs. It is used in the CollabPack.
+*/
+EXTERN_API( const PackedRLI *)
+OCEGetDirectoryRootPackedRLI (void) THREEWORDINLINE(0x303C, 0x0346, 0xAA5C);
+
+/**** LocalRecordID ****/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct LocalRecordID {
+ CreationID cid;
+ RStringPtr recordName;
+ RStringPtr recordType;
+};
+typedef struct LocalRecordID LocalRecordID;
+typedef LocalRecordID * LocalRecordIDPtr;
+/* Create a LocalRecordID from a name, type, and CreationID */
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+OCENewLocalRecordID (const RString * recordName,
+ const RString * recordType,
+ const CreationID * cid,
+ LocalRecordID * lRID) THREEWORDINLINE(0x303C, 0x031E, 0xAA5C);
+
+/*
+Copy LocalRecordID lRID1 to LocalRecordID lRID2. lRID2 must already contain
+pointers to RString structures large enough to hold copies of the corresponding
+fields from lRID1. A memFull error will be returned if that is not the case.
+So if you allocate a brand new empty destination, you must at least set up
+its length field.
+*/
+EXTERN_API( OSErr )
+OCECopyLocalRecordID (const LocalRecordID * lRID1,
+ LocalRecordID * lRID2) THREEWORDINLINE(0x303C, 0x0302, 0xAA5C);
+
+
+/*
+Check the equality of two local RIDs.
+*/
+EXTERN_API( Boolean )
+OCEEqualLocalRecordID (const LocalRecordID * lRID1,
+ const LocalRecordID * lRID2) THREEWORDINLINE(0x303C, 0x030F, 0xAA5C);
+
+/**** ShortRecordID ****/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct ShortRecordID {
+ PackedRLIPtr rli;
+ CreationID cid;
+};
+typedef struct ShortRecordID ShortRecordID;
+typedef ShortRecordID * ShortRecordIDPtr;
+/* Create a ShortRecordID from an RLI struct and a CreationID */
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+OCENewShortRecordID (const PackedRLI * theRLI,
+ const CreationID * cid,
+ ShortRecordIDPtr sRID) THREEWORDINLINE(0x303C, 0x0321, 0xAA5C);
+
+
+/*
+Copy ShortRecordID sRID1 to ShortRecordID sRID2. sRID2 must already contain
+pointers to structures large enough to hold copies of the corresponding
+fields from sRID1. A memFull error will be returned if that is not the case.
+So if you allocate a brand new empty destination, you must at least set up
+its length fields.
+*/
+EXTERN_API( OSErr )
+OCECopyShortRecordID (const ShortRecordID * sRID1,
+ ShortRecordID * sRID2) THREEWORDINLINE(0x303C, 0x030A, 0xAA5C);
+
+
+/*
+Check the equality of two short RIDs.
+*/
+EXTERN_API( Boolean )
+OCEEqualShortRecordID (const ShortRecordID * sRID1,
+ const ShortRecordID * sRID2) THREEWORDINLINE(0x303C, 0x0317, 0xAA5C);
+
+/**** RecordID ****/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct RecordID {
+ PackedRLIPtr rli; /* pointer to a packed rli structure */
+ LocalRecordID local;
+};
+typedef struct RecordID RecordID;
+typedef RecordID * RecordIDPtr;
+/* Create a RecordID from a packed RLI struct and a LocalRecordID.
+This doesn't allocate any new space; the RecordID points to the same
+packed RLI struct and the same name and type RStrings. */
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+OCENewRecordID (const PackedRLI * theRLI,
+ const LocalRecordID * lRID,
+ RecordID * rid) THREEWORDINLINE(0x303C, 0x0320, 0xAA5C);
+
+
+/*
+Copy RecordID RID1 to RecordID RID2. RID2 must already contain
+pointers to structures large enough to hold copies of the corresponding
+fields from lRID1. A memFull error will be returned if that is not the case.
+So if you allocate a brand new empty destination, you must at least set up
+its length fields.
+*/
+EXTERN_API( OSErr )
+OCECopyRecordID (const RecordID * rid1,
+ const RecordID * rid2) THREEWORDINLINE(0x303C, 0x0309, 0xAA5C);
+
+
+/* Check the equality of two RIDs. */
+EXTERN_API( Boolean )
+OCEEqualRecordID (const RecordID * rid1,
+ const RecordID * rid2) THREEWORDINLINE(0x303C, 0x0314, 0xAA5C);
+
+
+/**** PackedRecordID ****/
+/*
+struct PackedRecordID is a maximum-sized structure. Allocate one of
+these and it will hold any valid packed RecordID.
+*/
+#endif /* CALL_NOT_IN_CARBON */
+
+enum {
+ kPackedRecordIDMaxBytes = (kPathNameMaxBytes + sizeof(DNodeNum) + sizeof(DirDiscriminator) + sizeof(CreationID) + (3 * sizeof(RString)))
+};
+
+
+struct PackedRecordID {
+ unsigned short dataLength; /* dataLength excludes the space for the dataLength field */
+ Byte data[1824];
+};
+typedef struct PackedRecordID PackedRecordID;
+/*
+struct ProtoPackedRecordID is a minimum-sized structure. Use this
+for a variable-length packed RecordID.
+*/
+
+struct ProtoPackedRecordID {
+ unsigned short dataLength; /* dataLength excludes the space for the dataLength field */
+ /* Followed by data */
+};
+typedef struct ProtoPackedRecordID ProtoPackedRecordID;
+
+typedef PackedRecordID * PackedRecordIDPtr;
+typedef ProtoPackedRecordID * ProtoPackedRecordIDPtr;
+/*
+Copy PackedRecordID pRID1 to PackedRecordID pRID2. pRID2 must already contain
+pointers to structures large enough to hold copies of the corresponding
+fields from pRID1. A memFull error will be returned if that is not the case.
+pRID2Length is the number of bytes that can be put into pRID2, not counting the
+packed RecordID header.
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+OCECopyPackedRecordID (const PackedRecordID * pRID1,
+ const PackedRecordID * pRID2,
+ unsigned short pRID2Length) THREEWORDINLINE(0x303C, 0x0306, 0xAA5C);
+
+
+/*
+Create a RecordID from a PackedRecordID.
+NOTE THAT THE UNPACKED STRUCT CONTAINS POINTERS INTO THE PACKED STRUCT - DON'T DELETE
+OR REUSE THE PACKED STRUCT UNTIL YOU ARE FINISHED WITH THE UNPACKED STRUCT AS WELL
+*/
+EXTERN_API( void )
+OCEUnpackRecordID (const PackedRecordID * pRID,
+ RecordID * rid) THREEWORDINLINE(0x303C, 0x0332, 0xAA5C);
+
+
+/*
+Create a PackedRecordID from a RecordID. pRID must be large enough to contain
+the packed RecordID. A memFull error will be returned if that is not the case.
+packedRecordIDLength is the number of bytes that can be put into pRID, not
+counting the header.
+*/
+EXTERN_API( OSErr )
+OCEPackRecordID (const RecordID * rid,
+ PackedRecordID * pRID,
+ unsigned short packedRecordIDLength) THREEWORDINLINE(0x303C, 0x0326, 0xAA5C);
+
+
+/*
+Compute the number of bytes of memory needed to hold a RecordID when packed. This
+length includes the length of the length field of PackedRecordID, so it
+is safe to do a NewPtr (OCEPackedRecordIDSize(...)).
+*/
+EXTERN_API( unsigned short )
+OCEPackedRecordIDSize (const RecordID * rid) THREEWORDINLINE(0x303C, 0x032B, 0xAA5C);
+
+
+/*
+Check the equality of two packed RIDs.
+*/
+EXTERN_API( Boolean )
+OCEEqualPackedRecordID (const PackedRecordID * pRID1,
+ const PackedRecordID * pRID2) THREEWORDINLINE(0x303C, 0x0312, 0xAA5C);
+
+
+/* OCEValidPackedRecordID checks the validity of a packed record ID. */
+EXTERN_API( Boolean )
+OCEValidPackedRecordID (const PackedRecordID * pRID) THREEWORDINLINE(0x303C, 0x0335, 0xAA5C);
+
+
+/**** DSSpec ****/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct DSSpec {
+ RecordID * entitySpecifier;
+ OSType extensionType;
+ unsigned short extensionSize;
+ void * extensionValue;
+};
+typedef struct DSSpec DSSpec;
+typedef DSSpec * DSSpecPtr;
+/*
+struct PackedDSSpec is NOT a maximum-sized structure. Allocate one of
+these and it will hold any valid packed RecordID, but not necessarily any additional
+data.
+*/
+
+enum {
+ kPackedDSSpecMaxBytes = (sizeof(PackedRecordID) + sizeof(OSType) + sizeof(UInt16))
+};
+
+
+struct PackedDSSpec {
+ unsigned short dataLength; /* dataLength excludes the space for the dataLength field */
+ Byte data[1832];
+};
+typedef struct PackedDSSpec PackedDSSpec;
+typedef PackedDSSpec * PackedDSSpecPtr;
+typedef PackedDSSpecPtr * PackedDSSpecHandle;
+/*
+struct ProtoPackedDSSpec is a minimum-sized structure. Use this
+for a variable-length packed DSSpec.
+*/
+
+struct ProtoPackedDSSpec {
+ unsigned short dataLength; /* dataLength excludes the space for the dataLength field */
+ /* Followed by data */
+};
+typedef struct ProtoPackedDSSpec ProtoPackedDSSpec;
+typedef ProtoPackedDSSpec * ProtoPackedDSSpecPtr;
+/*
+Copy PackedDSSpec pdss1 to PackedDSSpec pdss2. pdss2 must already contain
+pointers to structures large enough to hold copies of the corresponding
+fields from pdss1. A memFull error will be returned if that is not the case.
+pdss2Length is the number of bytes that can be put into pdss2, not counting the
+packed DSSpec header.
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+OCECopyPackedDSSpec (const PackedDSSpec * pdss1,
+ const PackedDSSpec * pdss2,
+ unsigned short pdss2Length) THREEWORDINLINE(0x303C, 0x0303, 0xAA5C);
+
+
+/*
+Create a DSSpec from a PackedDSSpec.
+NOTE THAT THE UNPACKED STRUCT CONTAINS POINTERS INTO THE PACKED STRUCT - DON'T DELETE
+OR REUSE THE PACKED STRUCT UNTIL YOU ARE FINISHED WITH THE UNPACKED STRUCT AS WELL.
+A pointer to the extension is returned in dss->extensionValue, and the length of that
+extension is returned in dss->extensionSize. If there is no extension, dss->extensionValue will
+be set to nil. This routine will unpack the RecordID (if any) into rid, unpack the rest
+into dss, and set dss->entitySpecifier to rid.
+*/
+EXTERN_API( void )
+OCEUnpackDSSpec (const PackedDSSpec * pdss,
+ DSSpec * dss,
+ RecordID * rid) THREEWORDINLINE(0x303C, 0x032F, 0xAA5C);
+
+
+/*
+Create a PackedDSSpec from a DSSpec. pdss must be large enough to
+contain the packed RecordID and any extension. A memFull error will be returned if that
+is not the case. pdssLength is the number of bytes that can be put into pdss,
+not counting the header.
+*/
+EXTERN_API( OSErr )
+OCEPackDSSpec (const DSSpec * dss,
+ PackedDSSpec * pdss,
+ unsigned short pdssLength) THREEWORDINLINE(0x303C, 0x0322, 0xAA5C);
+
+
+/*
+Compute the number of bytes of memory needed to hold a DSSpec when packed. This
+length includes the length of the length field of PackedDSSpec, so it
+is safe to do a NewPtr (OCEPackedDSSpecSize(...)).
+*/
+EXTERN_API( unsigned short )
+OCEPackedDSSpecSize (const DSSpec * dss) THREEWORDINLINE(0x303C, 0x0327, 0xAA5C);
+
+
+/* Check the equality of two DSSpecs. This compares all fields, even the
+extension (unless extensionSize == 0). The extensions are compared in a case-insensitive and
+diacrit-insensitive manner. */
+EXTERN_API( Boolean )
+OCEEqualDSSpec (const DSSpec * pdss1,
+ const DSSpec * pdss2) THREEWORDINLINE(0x303C, 0x030E, 0xAA5C);
+
+
+/* Check the equality of two PackedDSSpecs. This compares all fields, even the
+extension (unless extensionSize == 0). The extensions are compared in a case-insensitive and
+diacrit-insensitive manner. */
+EXTERN_API( Boolean )
+OCEEqualPackedDSSpec (const PackedDSSpec * pdss1,
+ const PackedDSSpec * pdss2) THREEWORDINLINE(0x303C, 0x0310, 0xAA5C);
+
+
+/*
+Check the validity of a PackedDSSpec. If extensionType is
+'entn', pdss must contain a valid entitySpecifier. For all other extensionTypes, a nil
+entitySpecifier is valid, but if non-nil, it will be checked for validity. No check
+is made on the extension.
+*/
+EXTERN_API( Boolean )
+OCEValidPackedDSSpec (const PackedDSSpec * pdss) THREEWORDINLINE(0x303C, 0x0333, 0xAA5C);
+
+
+/*
+Return info about a DSSpec. This routine does not check validity. If the
+DSSpec has no extension, we determine whether it represents the root of all
+catalogs, a single catalog, a DNode, or a Record. Else it is invalid.
+If the DSSpec has an extension, we simply return the extension type.
+*/
+EXTERN_API( OSType )
+OCEGetDSSpecInfo (const DSSpec * spec) THREEWORDINLINE(0x303C, 0x0319, 0xAA5C);
+
+
+/* OCEGetExtensionType returns the extensionType imbedded in the PackedDSSpec. */
+EXTERN_API( OSType )
+OCEGetExtensionType (const PackedDSSpec * pdss) THREEWORDINLINE(0x303C, 0x031C, 0xAA5C);
+
+/*
+OCEStreamPackedDSSpec streams (flattens) a catalog object a little at a time by
+calling the DSSpecStreamer routine that you provide.
+*/
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API( OSErr , DSSpecStreamerProcPtr )(void *buffer, unsigned long count, Boolean eof, long userData);
+typedef STACK_UPP_TYPE(DSSpecStreamerProcPtr) DSSpecStreamerUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(DSSpecStreamerUPP)
+ NewDSSpecStreamerUPP (DSSpecStreamerProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeDSSpecStreamerUPP (DSSpecStreamerUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeDSSpecStreamerUPP (void * buffer,
+ unsigned long count,
+ Boolean eof,
+ long userData,
+ DSSpecStreamerUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppDSSpecStreamerProcInfo = 0x000037E0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 1_byte, 4_bytes) */
+ #define NewDSSpecStreamerUPP(userRoutine) (DSSpecStreamerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDSSpecStreamerProcInfo, GetCurrentArchitecture())
+ #define DisposeDSSpecStreamerUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeDSSpecStreamerUPP(buffer, count, eof, userData, userUPP) (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppDSSpecStreamerProcInfo, (buffer), (count), (eof), (userData))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewDSSpecStreamerProc(userRoutine) NewDSSpecStreamerUPP(userRoutine)
+#define CallDSSpecStreamerProc(userRoutine, buffer, count, eof, userData) InvokeDSSpecStreamerUPP(buffer, count, eof, userData, userRoutine)
+
+typedef DSSpecStreamerUPP DSSpecStreamer;
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+OCEStreamPackedDSSpec (const DSSpec * dss,
+ DSSpecStreamer stream,
+ long userData,
+ unsigned long * actualCount) THREEWORDINLINE(0x303C, 0x033D, 0xAA5C);
+
+/**** AttributeType ****/
+/*
+For the record, an AttributeType is an RString with a smaller maximum size.
+I don't just typedef it to an RString, because I want the definition of the AttributeType
+struct to contain the max length, because I need to include it in the Attribute struct
+below. But it should be possible to typecast any AttributeType to an RString and use
+all the RString utilities on it.
+*/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct AttributeType {
+ CharacterSet charSet;
+ unsigned short dataLength;
+ Byte body[32]; /* always fixed at the max size */
+};
+typedef struct AttributeType AttributeType;
+typedef AttributeType * AttributeTypePtr;
+/* Miscellaneous defines: (these cannot be made into enums) */
+enum {
+ kMinPackedRStringLength = (sizeof(ProtoRString))
+};
+
+enum {
+ kMinPackedRLISize = (sizeof(ProtoPackedRLI) + sizeof(DirDiscriminator) + sizeof(DNodeNum) + kMinPackedRStringLength + sizeof(ProtoPackedPathName))
+};
+
+/**** AttributeValue ****/
+/* same class as is used in AppleEvents */
+
+typedef DescType AttributeTag;
+
+struct AttributeValue {
+ AttributeTag tag;
+ unsigned long dataLength;
+ void * bytes;
+};
+typedef struct AttributeValue AttributeValue;
+typedef AttributeValue * AttributeValuePtr;
+/**** Attribute ****/
+
+struct Attribute {
+ AttributeType attributeType;
+ AttributeCreationID cid;
+ AttributeValue value;
+};
+typedef struct Attribute Attribute;
+typedef Attribute * AttributePtr;
+#if CALL_NOT_IN_CARBON
+EXTERN_API( RString *)
+OCEGetIndRecordType (OCERecordTypeIndex stringIndex) THREEWORDINLINE(0x303C, 0x031B, 0xAA5C);
+
+EXTERN_API( AttributeType *)
+OCEGetIndAttributeType (OCEAttributeTypeIndex stringIndex) THREEWORDINLINE(0x303C, 0x031A, 0xAA5C);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+enum {
+ _oceTBDispatch = 0xAA5E
+};
+
+/****************************************************************************************
+ PLEASE NOTE! ROUTINES HAVE MOVED TO THIS HEADER!
+
+ OCESizePackedRecipient, OCEPackRecipient, OCEUnpackRecipient, OCEStreamRecipient,
+ OCEGetRecipientType, and OCESetRecipientType have moved to the OCE header file.
+ The OCEMessaging header includes the OCE header, so no changes to your code are
+ required.
+
+****************************************************************************************/
+
+typedef DSSpec OCERecipient;
+enum {
+ kOCESizePackedRecipient = 830,
+ kOCEPackRecipient = 831,
+ kOCEUnpackRecipient = 832,
+ kOCEStreamRecipient = 833,
+ kOCEGetRecipientType = 834,
+ kOCESetRecipientType = 835
+};
+
+/*
+Compute the space that a OCERecipient would take if it were in packed
+form. [Note: does NOT even pad extensionSize, so you may get an odd #back out]
+Safe to pass dereferenced handle(s).
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( unsigned short )
+OCESizePackedRecipient (const OCERecipient * rcpt) THREEWORDINLINE(0x303C, 0x033E, 0xAA5C);
+
+
+/*
+Take an OCERecipient (scatter) and (gather) stream into the specified
+buffer. It is assumed that there is sufficient space in the buffer (that is
+OCESizePackedRecipient). Safe to pass dereferenced handle(s).
+*/
+EXTERN_API( unsigned short )
+OCEPackRecipient (const OCERecipient * rcpt,
+ void * buffer) THREEWORDINLINE(0x303C, 0x033F, 0xAA5C);
+
+/*
+Take a packed OCERecipient and cast a the OCERecipient frame over it. Returns
+amBadDestId if it doesn't look like an OCERecipient. Safe to pass dereferenced
+handle(s).
+*/
+EXTERN_API( OSErr )
+OCEUnpackRecipient (const void * buffer,
+ OCERecipient * rcpt,
+ RecordID * entitySpecifier) THREEWORDINLINE(0x303C, 0x0340, 0xAA5C);
+
+/*
+Take an OCERecipient (scatter) and (gather) stream using the specified
+function. Safe to pass dereferenced handle(s). If streamer function returns
+OCEError OCEStreamRecipient stops execution and passes the error back to the caller
+*/
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API( OSErr , OCERecipientStreamerProcPtr )(void *buffer, unsigned long count, Boolean eof, long userData);
+typedef STACK_UPP_TYPE(OCERecipientStreamerProcPtr) OCERecipientStreamerUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(OCERecipientStreamerUPP)
+ NewOCERecipientStreamerUPP (OCERecipientStreamerProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeOCERecipientStreamerUPP (OCERecipientStreamerUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeOCERecipientStreamerUPP (void * buffer,
+ unsigned long count,
+ Boolean eof,
+ long userData,
+ OCERecipientStreamerUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppOCERecipientStreamerProcInfo = 0x000037E0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 1_byte, 4_bytes) */
+ #define NewOCERecipientStreamerUPP(userRoutine) (OCERecipientStreamerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppOCERecipientStreamerProcInfo, GetCurrentArchitecture())
+ #define DisposeOCERecipientStreamerUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeOCERecipientStreamerUPP(buffer, count, eof, userData, userUPP) (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppOCERecipientStreamerProcInfo, (buffer), (count), (eof), (userData))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewOCERecipientStreamerProc(userRoutine) NewOCERecipientStreamerUPP(userRoutine)
+#define CallOCERecipientStreamerProc(userRoutine, buffer, count, eof, userData) InvokeOCERecipientStreamerUPP(buffer, count, eof, userData, userRoutine)
+typedef OCERecipientStreamerUPP OCERecipientStreamer;
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+OCEStreamRecipient (const OCERecipient * rcpt,
+ OCERecipientStreamer stream,
+ long userData,
+ unsigned long * actualCount) THREEWORDINLINE(0x303C, 0x0341, 0xAA5C);
+
+/* Get the OCERecipient's extensionType. Safe to pass dereferenced handle(s).*/
+EXTERN_API( OSType )
+OCEGetRecipientType (const CreationID * cid) THREEWORDINLINE(0x303C, 0x0342, 0xAA5C);
+
+
+/*
+Set the OCERecipient's extensionType in the specified cid. (Note: we do NOT
+check for a nil pointer). If the extensionType is 'entn', the cid is assumed
+to be "valid" and is not touched. Note: to properly handle non 'entn''s this
+routine must and will zero the high long (source) of the cid! Safe to pass
+dereferenced handle(s).
+*/
+EXTERN_API( void )
+OCESetRecipientType (OSType extensionType,
+ CreationID * cid) THREEWORDINLINE(0x303C, 0x0343, 0xAA5C);
+
+/****************************************************************************************
+ PLEASE NOTE! ROUTINES HAVE MOVED TO THIS HEADER!
+
+ OCEGetAccessControlDSSpec and its corresponding data type and constants have
+ moved to the OCE header from OCEAuthDir. The OCEAuthDir header includes the OCE
+ header, so no changes to your code are required.
+
+****************************************************************************************/
+/* access categories bit numbers */
+#endif /* CALL_NOT_IN_CARBON */
+
+enum {
+ kThisRecordOwnerBit = 0,
+ kFriendsBit = 1,
+ kAuthenticatedInDNodeBit = 2,
+ kAuthenticatedInDirectoryBit = 3,
+ kGuestBit = 4,
+ kMeBit = 5
+};
+
+/* Values of CategoryMask */
+enum {
+ kThisRecordOwnerMask = 1,
+ kFriendsMask = 2,
+ kAuthenticatedInDNodeMask = 4,
+ kAuthenticatedInDirectoryMask = 8,
+ kGuestMask = 16,
+ kMeMask = 32
+};
+
+typedef unsigned long CategoryMask;
+/*
+pass kThisRecordOwnerMask, kFriendsMask, kAuthenticatedInDNodeMask, kAuthenticatedInDirectoryMask,
+kGuestMask, or kMeMask to this routine, and it will return a pointer to a
+DSSpec that can be used in the Get or Set Access Controls calls.
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( DSSpec *)
+OCEGetAccessControlDSSpec (CategoryMask categoryBitMask) THREEWORDINLINE(0x303C, 0x0345, 0xAA5C);
+
+
+
+
+#endif /* REZ */
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __OCE__ */
+
diff --git a/include/qt/OCEAuthDir.h b/include/qt/OCEAuthDir.h
new file mode 100644
index 000000000..6b5e2e0c9
--- /dev/null
+++ b/include/qt/OCEAuthDir.h
@@ -0,0 +1,4714 @@
+/*
+ File: OCEAuthDir.h
+
+ Contains: Apple Open Collaboration Environment Authentication Interfaces.
+
+ Version: Technology: AOCE Toolbox 1.02
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __OCEAUTHDIR__
+#define __OCEAUTHDIR__
+
+#ifndef __APPLETALK__
+#include "AppleTalk.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+#ifndef __OSUTILS__
+#include "OSUtils.h"
+#endif
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+
+#ifndef __OCE__
+#include "OCE.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*****************************************************************************/
+enum {
+ kRC4KeySizeInBytes = 8, /* size of an RC4 key */
+ kRefNumUnknown = 0
+};
+
+enum {
+ kEnumDistinguishedNameBit = 0,
+ kEnumAliasBit = 1,
+ kEnumPseudonymBit = 2,
+ kEnumDNodeBit = 3,
+ kEnumInvisibleBit = 4
+};
+
+/* Values of DirEnumChoices */
+enum {
+ kEnumDistinguishedNameMask = 1L << kEnumDistinguishedNameBit,
+ kEnumAliasMask = 1L << kEnumAliasBit,
+ kEnumPseudonymMask = 1L << kEnumPseudonymBit,
+ kEnumDNodeMask = 1L << kEnumDNodeBit,
+ kEnumInvisibleMask = 1L << kEnumInvisibleBit,
+ kEnumAllMask = (kEnumDistinguishedNameMask | kEnumAliasMask | kEnumPseudonymMask | kEnumDNodeMask | kEnumInvisibleMask)
+};
+
+typedef unsigned long DirEnumChoices;
+/* Values of DirSortOption */
+enum {
+ kSortByName = 0,
+ kSortByType = 1
+};
+
+
+/* Values of DirSortDirection */
+enum {
+ kSortForwards = 0,
+ kSortBackwards = 1
+};
+
+/* Values of DirMatchWith */
+enum {
+ kMatchAll = 0,
+ kExactMatch = 1,
+ kBeginsWith = 2,
+ kEndingWith = 3,
+ kContaining = 4
+};
+
+typedef UInt8 DirMatchWith;
+enum {
+ kCurrentOCESortVersion = 1
+};
+
+/* Access controls are implemented on three levels:
+ * DNode, Record, and Attribute Type levels
+ * Some access control bits apply to the container itself, and some apply to its contents.
+ *
+ * The Catalog Toolbox supports six functions. These calls are:
+ * DSGetDNodeAccessControl : to get Access Controls at the DNode level
+ * DSGetRecordAccessControl : to get Access Controls at the record level
+ * DSGetAttributeAccessControl : to get Access Privileges at the attribute type level
+ *
+ * The GetXXXAccessControl calls will return access control masks for various categories
+ * of users. Please refer to the access control document for a description of the
+ * categories of users. In general these are:
+ * ThisRecordOwner - means the identity of the record itself
+ * Friends - means any one of the assigned friends for the record
+ * AuthenticatedInDNode - means any valid user that is an authenticated entity
+ * in the DNode in which this record is located
+ * AuthenticatedInDirectory - means any valid authenticated catalog user
+ * Guest - means an unauthenticated user.
+ * Bit masks for various permitted access controls are defined below.
+ *
+ * GetXXXAccessControl calls will return access control masks for various categories of
+ * users for this record. In addition they also return the level of access controls
+ * that the user (who is making the GetXXXAccessControl call) has for the DNode,
+ * record, or attribute type.
+ *
+ * For records, the access control granted will be minimum of the DNode access
+ * control and record access control masks. For example, to add an attribute type to a
+ * record, a user must have access control kCreateAttributeTypes at the record and
+ * DNode levels. Similarly, at the attribute type level, access controls will be the
+ * minimum of the DNode, record, and attribute type access controls.
+ *
+ *
+ */
+/* access privileges bit numbers */
+enum {
+ kSeeBit = 0,
+ kAddBit = 1,
+ kDeleteBit = 2,
+ kChangeBit = 3,
+ kRenameBit = 4,
+ kChangePrivsBit = 5,
+ kSeeFoldersBit = 6
+};
+
+/* Values of AccessMask */
+enum {
+ kSeeMask = (1L << kSeeBit),
+ kAddMask = (1L << kAddBit),
+ kDeleteMask = (1L << kDeleteBit),
+ kChangeMask = (1L << kChangeBit),
+ kRenameMask = (1L << kRenameBit),
+ kChangePrivsMask = (1L << kChangePrivsBit),
+ kSeeFoldersMask = (1L << kSeeFoldersBit)
+};
+
+enum {
+ kAllPrivs = (kSeeMask + kAddMask + kDeleteMask + kChangeMask + kRenameMask + kChangePrivsMask + kSeeFoldersMask),
+ kNoPrivs = 0
+};
+
+/*
+
+kSupportsDNodeNumberBit:
+If this bit is set, a DNode can be referenced using DNodeNumbers.
+RecordLocationInfo can be specified using DNodeNumber and PathName component can be nil.
+If this bit is not set, a DNode can be referenced only by PathName to the DNode. In the
+later case DNodeNumber component inside record location info must be set to zero.
+
+kSupportsRecordCreationIDBit:
+If this bit is set, a record can be referenced by specifying CreationID
+in most catalog manager calls. If this bit is not set recordName and recordType are
+required in the recordID specification for all catalog manager calls.
+
+kSupportsAttributeCreationIDBit:
+If this bit is set, an attribute value can be obtained by specifying it's
+CreationID in Lookup call staring point and also can be used in operations
+like DeleteAttributeValue and ChangeAttributeValue an Attribute can be
+specified by AttributeType and CreationID.
+
+*************************************************************************
+Implicit assumption with creationID's and dNodeNumbers are, when supported
+they are persistent and will preserved across boots and life of the system.
+*************************************************************************
+
+Following three bits are for determining the sort order in enumeration.
+kSupportsMatchAllBit:
+If this bit is set, enumeration of all the records is supported
+
+kSupportsBeginsWithBit:
+If this bit is set, enumeration of records matching prefix (e.g. Begin with abc)
+is supported
+
+kSupportsExactMatchBit:
+If this bit is set, existence of a record matching exact matchNameString and recordType
+is supported.
+
+kSupportsEndsWithBit:
+If this bit is set, enumeration of records matching suffix (e.g. end with abc)
+is supported.
+
+kSupportsContainsBit:
+If this bit is set, enumeration of records containing a matchNameString (e.g. containing abc)
+is supported
+
+
+Implicit assumption in all these is, a record type can be specified either as one of the above or
+a type list(more then one) to match exact type.
+The Following four bits will indicate sort ordering in enumeration.
+
+kSupportsOrderedEnumerationBit:
+If this bit is set, Enumerated records or in some order possibly in name order.
+
+kCanSupportNameOrderBit:
+If this is set, catalog will support sortbyName option in Enumerate.
+
+kCanSupportTypeOrderBit:
+If this bit is set, catalog will support sortbyType option in enumearte.
+
+kSupportSortBackwardsBit:
+If this bit is set, catalog supports backward sorting.
+
+kSupportIndexRatioBit:
+If this bit is set, it indicates that enumeration will return approximate position
+of a record (percentile) among all records.
+
+kSupportsEnumerationContinueBit:
+If this bit is set, catalog supports enumeration continue.
+
+kSupportsLookupContinueBit:
+If this bit is set, catalog supports lookup continue.
+
+kSupportsEnumerateAttributeTypeContinueBit:
+If this bit is set, catalog supports EnumerateAttributeType continue.
+
+kSupportsEnumeratePseudonymContinueBit:
+If this bit is set, catalog supports EnumeratePseudonym continue.
+
+kSupportsAliasesBit:
+If this bit is set, catalog supports create/delte/enumerate
+of Alias Records.
+
+kSupportPseudonymBit:
+If this bit is set, catalog supports create/delte/enumerate of
+pseudonyms for a record.
+
+kSupportsPartialPathNameBit:
+If this bit is set, catalog nodes can be specified using DNodeNumber of a
+intermediate DNode and a partial name starting from that DNode to the intended
+DNode.
+
+kSupportsAuthenticationBit:
+If this bit is set, catalog supports authentication manager calls.
+
+kSupportsProxiesBit:
+If this bit is set, catalog supports proxy related calls in authentication manager.
+
+kSupportsFindRecordBit:
+If this bit is set, catalog supports find record call.
+
+Bits and corresponding masks are as defined below.
+*/
+enum {
+ kSupportsDNodeNumberBit = 0,
+ kSupportsRecordCreationIDBit = 1,
+ kSupportsAttributeCreationIDBit = 2,
+ kSupportsMatchAllBit = 3,
+ kSupportsBeginsWithBit = 4,
+ kSupportsExactMatchBit = 5,
+ kSupportsEndsWithBit = 6,
+ kSupportsContainsBit = 7,
+ kSupportsOrderedEnumerationBit = 8,
+ kCanSupportNameOrderBit = 9,
+ kCanSupportTypeOrderBit = 10,
+ kSupportSortBackwardsBit = 11,
+ kSupportIndexRatioBit = 12,
+ kSupportsEnumerationContinueBit = 13,
+ kSupportsLookupContinueBit = 14,
+ kSupportsEnumerateAttributeTypeContinueBit = 15,
+ kSupportsEnumeratePseudonymContinueBit = 16,
+ kSupportsAliasesBit = 17,
+ kSupportsPseudonymsBit = 18,
+ kSupportsPartialPathNamesBit = 19,
+ kSupportsAuthenticationBit = 20,
+ kSupportsProxiesBit = 21,
+ kSupportsFindRecordBit = 22
+};
+
+/* values of DirGestalt */
+enum {
+ kSupportsDNodeNumberMask = 1L << kSupportsDNodeNumberBit,
+ kSupportsRecordCreationIDMask = 1L << kSupportsRecordCreationIDBit,
+ kSupportsAttributeCreationIDMask = 1L << kSupportsAttributeCreationIDBit,
+ kSupportsMatchAllMask = 1L << kSupportsMatchAllBit,
+ kSupportsBeginsWithMask = 1L << kSupportsBeginsWithBit,
+ kSupportsExactMatchMask = 1L << kSupportsExactMatchBit,
+ kSupportsEndsWithMask = 1L << kSupportsEndsWithBit,
+ kSupportsContainsMask = 1L << kSupportsContainsBit,
+ kSupportsOrderedEnumerationMask = 1L << kSupportsOrderedEnumerationBit,
+ kCanSupportNameOrderMask = 1L << kCanSupportNameOrderBit,
+ kCanSupportTypeOrderMask = 1L << kCanSupportTypeOrderBit,
+ kSupportSortBackwardsMask = 1L << kSupportSortBackwardsBit,
+ kSupportIndexRatioMask = 1L << kSupportIndexRatioBit,
+ kSupportsEnumerationContinueMask = 1L << kSupportsEnumerationContinueBit,
+ kSupportsLookupContinueMask = 1L << kSupportsLookupContinueBit,
+ kSupportsEnumerateAttributeTypeContinueMask = 1L << kSupportsEnumerateAttributeTypeContinueBit,
+ kSupportsEnumeratePseudonymContinueMask = 1L << kSupportsEnumeratePseudonymContinueBit,
+ kSupportsAliasesMask = 1L << kSupportsAliasesBit,
+ kSupportsPseudonymsMask = 1L << kSupportsPseudonymsBit,
+ kSupportsPartialPathNamesMask = 1L << kSupportsPartialPathNamesBit,
+ kSupportsAuthenticationMask = 1L << kSupportsAuthenticationBit,
+ kSupportsProxiesMask = 1L << kSupportsProxiesBit,
+ kSupportsFindRecordMask = 1L << kSupportsFindRecordBit
+};
+
+
+/* Values of AuthLocalIdentityOp */
+enum {
+ kAuthLockLocalIdentityOp = 1,
+ kAuthUnlockLocalIdentityOp = 2,
+ kAuthLocalIdentityNameChangeOp = 3
+};
+
+/* Values of AuthLocalIdentityLockAction */
+enum {
+ kAuthLockPending = 1,
+ kAuthLockWillBeDone = 2
+};
+
+
+/* Values of AuthNotifications */
+enum {
+ kNotifyLockBit = 0,
+ kNotifyUnlockBit = 1,
+ kNotifyNameChangeBit = 2
+};
+
+enum {
+ kNotifyLockMask = 1L << kNotifyLockBit,
+ kNotifyUnlockMask = 1L << kNotifyUnlockBit,
+ kNotifyNameChangeMask = 1L << kNotifyNameChangeBit
+};
+
+enum {
+ kPersonalDirectoryFileCreator = FOUR_CHAR_CODE('kl03'),
+ kPersonalDirectoryFileType = FOUR_CHAR_CODE('pabt'),
+ kBusinessCardFileType = FOUR_CHAR_CODE('bust'),
+ kDirectoryFileType = FOUR_CHAR_CODE('dirt'),
+ kDNodeFileType = FOUR_CHAR_CODE('dnod'),
+ kDirsRootFileType = FOUR_CHAR_CODE('drtt'),
+ kRecordFileType = FOUR_CHAR_CODE('rcrd')
+};
+
+typedef unsigned short DirSortOption;
+typedef unsigned short DirSortDirection;
+typedef unsigned long AccessMask;
+typedef unsigned long DirGestalt;
+typedef unsigned long AuthLocalIdentityOp;
+typedef unsigned long AuthLocalIdentityLockAction;
+typedef unsigned long AuthNotifications;
+
+struct DNodeID {
+ DNodeNum dNodeNumber; /* dNodenumber */
+ long reserved1;
+ RStringPtr name;
+ long reserved2;
+};
+typedef struct DNodeID DNodeID;
+
+struct DirEnumSpec {
+ DirEnumChoices enumFlag;
+ unsigned short indexRatio; /* Approx Record Position between 1 and 100 If supported, 0 If not supported */
+ union {
+ LocalRecordID recordIdentifier;
+ DNodeID dNodeIdentifier;
+ } u;
+};
+typedef struct DirEnumSpec DirEnumSpec;
+
+struct DirMetaInfo {
+ unsigned long info[4];
+};
+typedef struct DirMetaInfo DirMetaInfo;
+
+struct SLRV {
+ ScriptCode script; /* Script code in which entries are sorted */
+ short language; /* Language code in which entries are sorted */
+ short regionCode; /* Region code in which entries are sorted */
+ short version; /* version of oce sorting software */
+};
+typedef struct SLRV SLRV;
+/* Catalog types and operations */
+/* unique identifier for an identity */
+
+typedef unsigned long AuthIdentity;
+/* Umbrella LocalIdentity */
+typedef AuthIdentity LocalIdentity;
+/* A DES key is 8 bytes of data */
+
+struct DESKey {
+ unsigned long a;
+ unsigned long b;
+};
+typedef struct DESKey DESKey;
+
+typedef Byte RC4Key[8];
+typedef unsigned long AuthKeyType;
+/* key type followed by its data */
+
+struct AuthKey {
+ AuthKeyType keyType;
+ union {
+ DESKey des;
+ RC4Key rc4;
+ } u;
+};
+typedef struct AuthKey AuthKey;
+typedef AuthKey * AuthKeyPtr;
+typedef union AuthParamBlock AuthParamBlock;
+
+typedef AuthParamBlock * AuthParamBlockPtr;
+/* Fix parameter passing convention (#1274062) ggs, 8-7-95 */
+typedef CALLBACK_API( void , AuthIOCompletionProcPtr )(AuthParamBlockPtr paramBlock);
+/*
+ WARNING: AuthIOCompletionProcPtr uses register based parameters under classic 68k
+ and cannot be written in a high-level language without
+ the help of mixed mode or assembly glue.
+*/
+typedef REGISTER_UPP_TYPE(AuthIOCompletionProcPtr) AuthIOCompletionUPP;
+/*****************************************************************************
+
+
+ Authentication Manager operations
+
+*****************************************************************************/
+/*
+kAuthResolveCreationID:
+userRecord will contain the user information whose creationID has to be
+returned. A client must make this call when he does not know the creaitionID.
+The creationID must be set to nil before making the call. The server will attempt
+to match the recordid's in the data base which match the user name and
+type in the record. Depending on number of matchings, following
+results will be returned.
+Exactly One Match : CreationID in RecordID and also in buffer (if buffer is given)
+totalMatches = actualMatches = 1.
+> 1 Match:
+ Buffer is Large Enough:
+ totalMatches = actualMatches
+ Buffer will contain all the CIDs, kOCEAmbiguousMatches error.
+> 1 Match:
+ Buffer is not Large Enough:
+ totalMatches > actualMatches
+ Buffer will contain all the CIDs (equal to actualMatches), daMoreDataError error.
+0 Matches:
+ kOCENoSuchRecord error
+*/
+
+struct AuthResolveCreationIDPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ AuthIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ RecordIDPtr userRecord; /* --> OCE name(Record) of the user */
+ unsigned long bufferLength; /* --> Buffer Size to hold duplicate Info */
+ void * buffer; /* --> Buffer to hold duplicate Info */
+ unsigned long totalMatches; /* <-- Total Number of matching names found */
+ unsigned long actualMatches; /* <-- Number of matches returned in the buffer */
+};
+typedef struct AuthResolveCreationIDPB AuthResolveCreationIDPB;
+/*
+kAuthBindSpecificIdentity:
+userRecord will contain the user information whose identity has to be
+verified. userKey will contain the userKey. An Identity is returned which
+binds the key and the userRecord. The identity returned can be used in the 'identity'
+field in the header portion (AuthParamHeader) for authenticating the Catalog and
+Authentication manager calls.
+*/
+
+struct AuthBindSpecificIdentityPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ AuthIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ AuthIdentity userIdentity; /* <-- binding identity */
+ RecordIDPtr userRecord; /* --> OCE name(Record) of the user */
+ AuthKeyPtr userKey; /* --> OCE Key for the user */
+};
+typedef struct AuthBindSpecificIdentityPB AuthBindSpecificIdentityPB;
+/*
+kAuthUnbindSpecificIdentity:
+This call will unbind the userRecord and key which were bind earlier.
+*/
+
+struct AuthUnbindSpecificIdentityPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ AuthIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ AuthIdentity userIdentity; /* --> identity to be deleted */
+};
+typedef struct AuthUnbindSpecificIdentityPB AuthUnbindSpecificIdentityPB;
+
+/*
+kAuthGetSpecificIdentityInfo:
+This call will return the userRecord for the given identity. Note: key is not
+returned because this would compromise security.
+*/
+
+struct AuthGetSpecificIdentityInfoPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ AuthIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ AuthIdentity userIdentity; /* --> identity of initiator */
+ RecordIDPtr userRecord; /* <-- OCE name(Record) of the user */
+};
+typedef struct AuthGetSpecificIdentityInfoPB AuthGetSpecificIdentityInfoPB;
+
+/*
+kAuthAddKey:
+userRecord will contain the user information whose identity has to be
+created. userKey will point to the key to be created. password points to
+an RString containing the password used to generate the key.
+*/
+
+struct AuthAddKeyPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ AuthIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ RecordIDPtr userRecord; /* --> OCE name(Record) of the user */
+ AuthKeyPtr userKey; /* <-- OCE Key for the user */
+ RStringPtr password; /* --> Pointer to password string */
+};
+typedef struct AuthAddKeyPB AuthAddKeyPB;
+/*
+kAuthChangeKey:
+userRecord will contain the user information whose identity has to be
+created. userKey will point to the key to be created. password points to
+an RString containing the password used to generate the key.
+*/
+
+struct AuthChangeKeyPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ AuthIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ RecordIDPtr userRecord; /* --> OCE name(Record) of the user */
+ AuthKeyPtr userKey; /* <-- New OCE Key for the user */
+ RStringPtr password; /* -->Pointer to the new password string */
+};
+typedef struct AuthChangeKeyPB AuthChangeKeyPB;
+/*
+AuthDeleteKey:
+userRecord will contain the user information whose Key has to be deleted.
+*/
+
+struct AuthDeleteKeyPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ AuthIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ RecordIDPtr userRecord; /* --> OCE name(Record) of the user */
+};
+typedef struct AuthDeleteKeyPB AuthDeleteKeyPB;
+/* AuthPasswordToKey: Converts an RString into a key. */
+
+struct AuthPasswordToKeyPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ AuthIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ RecordIDPtr userRecord; /* --> OCE name(Record) of the user */
+ AuthKeyPtr key; /* <-- */
+ RStringPtr password; /* -->Pointer to the new password string */
+};
+typedef struct AuthPasswordToKeyPB AuthPasswordToKeyPB;
+/*
+kAuthGetCredentials:
+userRecord will contain the user information whose identity has to be
+kMailDeletedMask. keyType (e.g. asDESKey) will indicate what type of key has to
+be deleted.
+*/
+
+struct AuthGetCredentialsPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ AuthIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ AuthIdentity userIdentity; /* --> identity of initiator */
+ RecordIDPtr recipient; /* --> OCE name of recipient */
+ AuthKeyPtr sessionKey; /* <-- session key */
+ UTCTime expiry; /* <--> desired/actual expiry */
+ unsigned long credentialsLength; /* <--> max/actual credentials size */
+ void * credentials; /* <-- buffer where credentials are returned */
+};
+typedef struct AuthGetCredentialsPB AuthGetCredentialsPB;
+/*
+AuthDecryptCredentialsPB:
+Changes:
+userKey is changed userIdentity.
+userRecord is changed to initiatorRecord. User must supply buffer
+to hold initiatorRecord.
+agentList has changed to agent. There wil be no call back.
+User must supply buffer to hold agent Record.
+An additional boolean parameter 'hasAgent' is included.
+Toolbox will set this if an 'Agent' record is found in the
+credentials. If RecordIDPtr is 'nil', no agent record will
+be copied. However user can examine 'hasAgent', If true user
+can reissue this call with apprpriate buffer for getting a recordID.
+agent has changed to intermediary. User must supply buffer to hold
+intermediary Record. The toolbox will set 'hasIntermediary' if an
+'intermediary' record is found in the credentials.
+*/
+
+struct AuthDecryptCredentialsPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ AuthIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ AuthIdentity userIdentity; /* --> user's Identity */
+ RecordIDPtr initiatorRecord; /* <-- OCE name of the initiator */
+ AuthKeyPtr sessionKey; /* <-- session key */
+ UTCTime expiry; /* <-- credentials expiry time */
+ unsigned long credentialsLength; /* --> actual credentials size */
+ void * credentials; /* --> credentials to be decrypted */
+ UTCTime issueTime; /* <-- credentials expiry time */
+ Boolean hasIntermediary; /* <-- if true, An intermediary Record was found in credentials */
+ Boolean filler1;
+ RecordIDPtr intermediary; /* <-- recordID of the intermediary */
+};
+typedef struct AuthDecryptCredentialsPB AuthDecryptCredentialsPB;
+
+
+struct AuthMakeChallengePB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ AuthIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ AuthKeyPtr key; /* --> UnEncrypted SessionKey */
+ void * challenge; /* <-- Encrypted Challenge */
+ unsigned long challengeBufferLength; /* ->length of challenge buffer */
+ unsigned long challengeLength; /* <-length of Encrypted Challenge */
+};
+typedef struct AuthMakeChallengePB AuthMakeChallengePB;
+
+struct AuthMakeReplyPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ AuthIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ AuthKeyPtr key; /* --> UnEncrypted SessionKey */
+ void * challenge; /* --> Encrypted Challenge */
+ void * reply; /* <-- Encrypted Reply */
+ unsigned long replyBufferLength; /* -->length of challenge buffer */
+ unsigned long challengeLength; /* --> length of Encrypted Challenge */
+ unsigned long replyLength; /* <-- length of Encrypted Reply */
+};
+typedef struct AuthMakeReplyPB AuthMakeReplyPB;
+
+struct AuthVerifyReplyPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ AuthIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ AuthKeyPtr key; /* --> UnEncrypted SessionKey */
+ void * challenge; /* --> Encrypted Challenge */
+ void * reply; /* --> Encrypted Reply */
+ unsigned long challengeLength; /* --> length of Encrypted Challenge */
+ unsigned long replyLength; /* --> length of Encrypted Reply */
+};
+typedef struct AuthVerifyReplyPB AuthVerifyReplyPB;
+
+
+/*
+kAuthGetUTCTime:
+RLI will contain a valid RLI for a cluster server.
+UTC(GMT) time from one of the cluster server will be returned.
+An 'offSet' from UTC(GMT) to Mac Local Time will also be returned.
+If RLI is nil Map DA is used to determine UTC(GMT).
+Mac Local Time = theUTCTime + theUTCOffset.
+*/
+
+struct AuthGetUTCTimePB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ AuthIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ PackedRLIPtr pRLI; /* --> packed RLI of the Node, whose server's UTC is requested */
+ UTCTime theUTCTime; /* <-- current UTC(GMT) Time utc seconds since 1/1/1904 */
+ UTCOffset theUTCOffset; /* <-- offset from UTC(GMT) seconds EAST of Greenwich */
+};
+typedef struct AuthGetUTCTimePB AuthGetUTCTimePB;
+
+/*
+kAuthMakeProxy:
+A user represented bu the 'userIdentity' can make a proxy using this call.
+'recipient' is the RecordID of the recipient whom user is requesting proxy.
+'intermediary' is the RecordID of the intermediary holding proxy for the user.
+'firstValid' is time at which proxy becomes valid.
+'expiry' is the time at which proxy must expire.
+'proxyLength' will have the length of the buffer pointed by 'proxy' as input.
+When the call completes, it will hold the actual length of proxy. If the
+call completes 'kOCEMoreData' error, client can reissue the call with the
+buffer size as 'proxyLength' returned.
+expiry is a suggestion, and may be adjusted to be earlier by the ADAP/OCE server.
+The 'proxy' obtained like this might be used by the 'intermediary' to obtain credentials
+for the server using TradeProxyForCredentials call.
+authDataLength and authData are intended for possible future work, but are
+ignored for now.
+*/
+
+struct AuthMakeProxyPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ AuthIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ AuthIdentity userIdentity; /* --> identity of principal */
+ RecordIDPtr recipient; /* --> OCE name of recipient */
+ UTCTime firstValid; /* --> time at which proxy becomes valid */
+ UTCTime expiry; /* --> time at which proxy expires */
+ unsigned long authDataLength; /* --> size of authorization data */
+ void * authData; /* --> pointer to authorization data */
+ unsigned long proxyLength; /* <--> max/actual proxy size */
+ void * proxy; /* <--> buffer where proxy is returned */
+ RecordIDPtr intermediary; /* --> RecordID of intermediary */
+};
+typedef struct AuthMakeProxyPB AuthMakeProxyPB;
+/*
+kAuthTradeProxyForCredentials:
+Using this call, intermediary holding a 'proxy' for a recipient may obtain credentials
+for that recipient. 'userIdentity' is the identity for the 'intermediary'.
+'recipient' is the RecordID for whom credetials are requested.
+'principal' is the RecordID of the user who created the proxy.
+'proxyLength' is the length of data pointed by 'proxy.
+If the call is succesfull, credentials will be returned in the
+buffer pointed by 'credentials'. 'expiry' is the desired expiry time at input.
+When call succeds this will have expiry time of credentials.
+This is very similar to GetCredentials except that we (of course) need the proxy,
+but we also need the name of the principal who created the proxy.
+*/
+
+struct AuthTradeProxyForCredentialsPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ AuthIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ AuthIdentity userIdentity; /* --> identity of intermediary */
+ RecordIDPtr recipient; /* --> OCE name of recipient */
+ AuthKeyPtr sessionKey; /* <-- session key */
+ UTCTime expiry; /* <--> desired/actual expiry */
+ unsigned long credentialsLength; /* <--> max/actual credentials size */
+ void * credentials; /* <--> buffer where credentials are returned */
+ unsigned long proxyLength; /* --> actual proxy size */
+ void * proxy; /* --> buffer containing proxy */
+ RecordIDPtr principal; /* --> RecordID of principal */
+};
+typedef struct AuthTradeProxyForCredentialsPB AuthTradeProxyForCredentialsPB;
+/* API for Local Identity Interface */
+/*
+AuthGetLocalIdentityPB:
+A Collaborative application intended to work under the umbrella of LocalIdentity
+for the OCE toolbox will have to make this call to obtain LocalIdentity.
+If LocalIdentity has not been setup, then application will get
+'kOCEOCESetupRequired.'. In this case application should put the dialog
+recommended by the OCE Setup document and guide the user through OCE Setup.
+If the OCESetup contains local identity, but user has not unlocked, it will get
+kOCELocalAuthenticationFail. In this case application should use SDPPromptForLocalIdentity
+to prompt user for the password.
+If a backGround application or stand alone code requires LocalIdentity, if it gets the
+OSErr from LocalIdentity and can not call SDPPromptForLocalIdentity, it should it self
+register with the toolbox using kAuthAddToLocalIdentityQueue call. It will be notified
+when a LocalIdentity gets created by a foreground application.
+*/
+
+struct AuthGetLocalIdentityPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ AuthIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ LocalIdentity theLocalIdentity; /* <-- LocalIdentity */
+};
+typedef struct AuthGetLocalIdentityPB AuthGetLocalIdentityPB;
+/*
+kAuthUnlockLocalIdentity:
+The LocalIdentity can be created using this call.
+The userName and password correspond to the LocalIdentity setup.
+If the password matches, then collabIdentity will be returned.
+Typically SDPPromptForLocalIdentity call will make this call.
+All applications which are registered through kAuthAddToLocalIdentityQueue
+will be notified.
+*/
+
+struct AuthUnlockLocalIdentityPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ AuthIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ LocalIdentity theLocalIdentity; /* <-- LocalIdentity */
+ RStringPtr userName; /* --> userName */
+ RStringPtr password; /* -->user password */
+};
+typedef struct AuthUnlockLocalIdentityPB AuthUnlockLocalIdentityPB;
+/*
+kAuthLockLocalIdentity:
+With this call existing LocalIdentity can be locked. If the ASDeleteLocalIdetity
+call fails with 'kOCEOperationDenied' error, name will contain the application which
+denied the operation. This name will be supplied by the application
+when it registered through kAuthAddToLocalIdentityQueue call
+*/
+
+struct AuthLockLocalIdentityPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ AuthIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ LocalIdentity theLocalIdentity; /* --> LocalIdentity */
+ StringPtr name; /* <-- name of the app which denied delete */
+};
+typedef struct AuthLockLocalIdentityPB AuthLockLocalIdentityPB;
+typedef CALLBACK_API( Boolean , NotificationProcPtr )(long clientData, AuthLocalIdentityOp callValue, AuthLocalIdentityLockAction actionValue, LocalIdentity identity);
+typedef STACK_UPP_TYPE(NotificationProcPtr) NotificationUPP;
+
+typedef NotificationUPP NotificationProc;
+/*
+kAuthAddToLocalIdentityQueue:
+An application requiring notification of locking/unlocking of the
+LocalIdentity can install itself using this call. The function provided
+in 'notifyProc' will be called whenever the requested event happens.
+When an AuthLockLocalIdentity call is made to the toolbox, the notificationProc
+will be called with 'kAuthLockPending'. The application may refuse the lock by returning
+a 'true' value. If all the registered entries return 'false' value, locking will be done
+successfully. Otherwise 'kOCEOperationDenied' error is returned to the caller. The appName
+(registered with the notificationProc) of the application which denied locking is also
+returned to the caller making the AuthLockIdentity call.
+*/
+
+struct AuthAddToLocalIdentityQueuePB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ AuthIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ NotificationUPP notifyProc; /* --> notification procedure */
+ AuthNotifications notifyFlags; /* --> notifyFlags */
+ StringPtr appName; /* --> name of application to be returned in Delete/Stop */
+};
+typedef struct AuthAddToLocalIdentityQueuePB AuthAddToLocalIdentityQueuePB;
+/*
+kAuthRemoveFromLocalIdentityQueue:*/
+
+struct AuthRemoveFromLocalIdentityQueuePB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ AuthIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ NotificationUPP notifyProc; /* --> notification procedure */
+};
+typedef struct AuthRemoveFromLocalIdentityQueuePB AuthRemoveFromLocalIdentityQueuePB;
+/*
+kAuthSetupLocalIdentity:
+The LocalIdentity can be Setup using this call.
+The userName and password correspond to the LocalIdentity setup.
+If a LocalIdentity Setup already exists 'kOCELocalIdentitySetupExists' error
+will be returned.
+*/
+
+struct AuthSetupLocalIdentityPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ AuthIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ long aReserved; /* -- */
+ RStringPtr userName; /* --> userName */
+ RStringPtr password; /* -->user password */
+};
+typedef struct AuthSetupLocalIdentityPB AuthSetupLocalIdentityPB;
+/*
+kAuthChangeLocalIdentity:
+An existing LocalIdentity Setup can be changed using this call.
+The userName and password correspond to the LocalIdentity setup.
+If a LocalIdentity Setup does not exists 'kOCEOCESetupRequired' error
+will be returned. The user can use kAuthSetupLocalIdentity call to setit up.
+If the 'password' does not correspond to the existing setup, 'kOCELocalAuthenticationFail'
+OSErr will be returned. If successful, LocalID will have new name as 'userName' and
+password as 'newPassword' and if any applications has installed into
+LocalIdentityQueue with kNotifyNameChangeMask set, it will be notified with
+kAuthLocalIdentityNameChangeOp action value.
+
+*/
+
+struct AuthChangeLocalIdentityPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ AuthIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ long aReserved; /* -- */
+ RStringPtr userName; /* --> userName */
+ RStringPtr password; /* --> current password */
+ RStringPtr newPassword; /* --> new password */
+};
+typedef struct AuthChangeLocalIdentityPB AuthChangeLocalIdentityPB;
+/*
+kAuthRemoveLocalIdentity:
+An existing LocalIdentity Setup can be removed using this call.
+The userName and password correspond to the LocalIdentity setup.
+If a LocalIdentity Setup does not exists 'kOCEOCESetupRequired' error
+will be returned.
+If the 'password' does not correspond to the existing setup, 'kOCELocalAuthenticationFail'
+OSErr will be returned. If successful, LocalIdentity will be removed from the OCE Setup.
+This is a very distructive operation, user must be warned enough before actually making
+this call.
+*/
+
+struct AuthRemoveLocalIdentityPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ AuthIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ long aReserved; /* -- */
+ RStringPtr userName; /* --> userName */
+ RStringPtr password; /* --> current password */
+};
+typedef struct AuthRemoveLocalIdentityPB AuthRemoveLocalIdentityPB;
+/*
+kOCESetupAddDirectoryInfo:
+Using this call identity for a catalog can be setup under LocalIdentity umbrella.
+ASCreateLocalIdentity should have been done succesfully before making this call.
+directoryRecordCID -> is the record creationID obtained when DirAddOCEDirectory or
+DirAddDSAMDirectory call was made.
+rid-> is the recordID in which the identity for the catalog will be established.
+password-> the password associated with the rid in the catalog world.
+*/
+
+struct OCESetupAddDirectoryInfoPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ AuthIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ CreationID directoryRecordCID; /* --> CreationID for the catalog */
+ RecordIDPtr recordID; /* --> recordID for the identity */
+ RStringPtr password; /* --> password in the catalog world */
+};
+typedef struct OCESetupAddDirectoryInfoPB OCESetupAddDirectoryInfoPB;
+/*
+kOCESetupChangeDirectoryInfo:
+Using this call an existing identity for a catalog under LocalIdentity umbrella
+can be changed.
+ASCreateLocalIdentity should have been done succesfully before making this call.
+directoryRecordCID -> is the record creationID obtained when DirAddOCEDirectory or
+DirAddDSAMDirectory call was made.
+rid-> is the recordID in which the identity for the catalog will be established.
+password-> the password associated with the rid in the catalog world.
+newPassword -> the new password for the catalog
+*/
+
+struct OCESetupChangeDirectoryInfoPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ AuthIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ CreationID directoryRecordCID; /* --> CreationID for the catalog */
+ RecordIDPtr recordID; /* --> recordID for the identity */
+ RStringPtr password; /* --> password in the catalog world */
+ RStringPtr newPassword; /* --> new password in the catalog */
+};
+typedef struct OCESetupChangeDirectoryInfoPB OCESetupChangeDirectoryInfoPB;
+/*
+kOCESetupRemoveDirectoryInfo:
+Using this call an existing identity for a catalog under LocalIdentity umbrella
+can be changed.
+ASCreateLocalIdentity should have been done succesfully before making this call.
+directoryRecordCID -> is the record creationID obtained when DirAddOCEDirectory or
+*/
+
+struct OCESetupRemoveDirectoryInfoPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ AuthIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ CreationID directoryRecordCID; /* --> CreationID for the catalog */
+};
+typedef struct OCESetupRemoveDirectoryInfoPB OCESetupRemoveDirectoryInfoPB;
+/*
+kOCESetupGetDirectoryInfo:
+Using this call info on an existing identity for a particular catalog under LocalIdentity umbrella
+can be obtained.
+For the specified catalog 'directoryName' and 'discriminator', rid and nativeName will
+returned. Caller must provide appropriate buffer to get back rid and nativeName.
+'password' will be returned for non-ADAP Catalogs.
+*/
+
+struct OCESetupGetDirectoryInfoPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ AuthIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ DirectoryNamePtr directoryName; /* --> catalog name */
+ DirDiscriminator discriminator; /* --> discriminator for the catalog */
+ RecordIDPtr recordID; /* <-- rid for the catalog identity */
+ RStringPtr nativeName; /* <-- user name in the catalog world */
+ RStringPtr password; /* <-- password in the catalog world */
+};
+typedef struct OCESetupGetDirectoryInfoPB OCESetupGetDirectoryInfoPB;
+/*****************************************************************************
+
+
+ Catalog Manager operations
+
+
+*****************************************************************************/
+typedef union DirParamBlock DirParamBlock;
+
+typedef DirParamBlock * DirParamBlockPtr;
+typedef CALLBACK_API( void , DirIOCompletionProcPtr )(DirParamBlockPtr paramBlock);
+/*
+ WARNING: DirIOCompletionProcPtr uses register based parameters under classic 68k
+ and cannot be written in a high-level language without
+ the help of mixed mode or assembly glue.
+*/
+typedef REGISTER_UPP_TYPE(DirIOCompletionProcPtr) DirIOCompletionUPP;
+/* AddRecord */
+
+struct DirAddRecordPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ RecordIDPtr aRecord; /* --> CreationID returned here */
+ Boolean allowDuplicate; /* --> */
+ Boolean filler1;
+};
+typedef struct DirAddRecordPB DirAddRecordPB;
+
+
+/* DeleteRecord */
+
+struct DirDeleteRecordPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ RecordIDPtr aRecord; /* --> */
+};
+typedef struct DirDeleteRecordPB DirDeleteRecordPB;
+/* aRecord must contain valid PackedRLI and a CreationID. */
+
+
+/**********************************************************************************/
+/*
+DirEnumerate:
+This call can be used to enumerate both DNodes and records under a specified
+DNode. A DNode is specified by the PackedRLIPtr 'aRLI'.
+
+startingPoint indicates where to start the enumeration. Initially,
+it should be set to a value of nil. After some records are enumerated,
+the client can issue the call again with the same aRLI and recordName and
+typeList. The last received DirEnumSpec in the startingPoint field. The server
+will continue the enumeration from that record on. if user wants to get back the
+value specified in the startingRecord also, the Boolean 'includeStartingPoint'
+must be set to 'true'. If this is set to 'false', records specified after the
+startingPoint record will be returned.
+
+sortBy indicates to the server to return the records that match in name-first
+or type-first order. sortDirection indicates to the server to search in forward
+or backward sort order for RecordIDs Specified.
+
+RecordIDS and Enumeration Criteria:
+
+PackedRLIPtr parameter 'aRLI' will be accepted for DNode
+specification.
+
+One RStringPtr 'nameMatchString' is provided. User is allowed to
+specify a wild card in the name. WildCard specification is specified in
+matchNameHow parameter and possible values are defined in DirMatchWith Enum.
+
+'typeCount' parameter indicate how many types are in the 'typeList'.
+
+'typeList' parmeter is a pointer to an RString array of size 'typeCount'.
+
+If 'typeCount' is exactly equal to one, a wild card can be specified
+for the entity type; otherwise types have to be completely specified.
+WildCard specification is specified in matchNameHow parameter
+ and possible values are defined in DirMatchWith Enum.
+
+
+A nil value for 'startingPoint' is allowed when sortDirection specified
+is 'kSortBackwards'. This was not allowed previously.
+
+'enumFlags' parameter is a bit field. The following bits can be set:
+ kEnumDistinguishedNameMask to get back records in the cluster data base.
+ kEnumAliasMask to get back record aliases
+ kEnumPseudonymMask to get back record pseudonyms
+ kEnumDNodeMask to get back any children dNodes for the DNode specified in the
+ 'aRLI' parameter.
+ kEnumForeignDNodeMask to get back any children dNodes which have ForeignDnodes in the
+ dNode specified in the 'aRLI' parameter.
+
+ kEnumAll is combination of all five values and can be used to enumerate
+ everything under a specified DNode.
+
+
+
+The results returned for each element will consist of a DirEnumSpec.
+The DirEnumSpec contains 'enumFlag' which indicates the type of entity and a
+union which will have either DNodeID or LocalRecordID depending on the value of 'enumFlag'.
+The 'enumFlag' will indicate whether the returned element is a
+record(kEnumDistinguishedNameMask bit) or a alias(kEnumAliasMask bit) or a
+Pseudonym(kEnumPseudonymMask) or a child DNode(kEnumDNodeMask bit). If the 'enumFlag' value
+is kEnumDnodeMask, it indicates the value returned in the union is a DNodeID (i.e. 'dNodeNumber'
+is the 'dNodeNumber' of the child dnode(if the catalog supports dNodeNumbers, otherwise
+this will be set to zero). The name will be the child dnode name. For other values of the
+'enumFlag', the value in the union will be LocalRecordID. In addition to kEnumDnodeMask it is
+possible that kEnumForeignDNodeMask is also set. This is an advisory bit and application must make
+it's own decision before displaying these records. If catalog supports kSupportIndexRatioMask, it
+may also return the relative position of the record (percentile of total records) in the
+indexRatio field in EnumSpec.
+
+
+responseSLRV will contain the script, language, region and version of the oce sorting software.
+The results will be collected in the 'getBuffer' supplied by the user.
+If buffer can not hold all the data returned 'kOCEMoreData' error will be returned.
+
+If user receives 'noErr' or 'kOCEMoreData', buffer will contain valid results. A user
+can extract the results in the 'getBuffer' by making DirEnumerateParse' call.
+*/
+
+
+struct DirEnumerateGetPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ PackedRLIPtr aRLI; /* --> an RLI specifying the cluster to be enumerated */
+ DirEnumSpec * startingPoint; /* --> */
+ DirSortOption sortBy; /* --> */
+ DirSortDirection sortDirection; /* --> */
+ long dReserved; /* -- */
+ RStringPtr nameMatchString; /* --> name from which enumeration should start */
+ RStringPtr * typesList; /* --> list of entity types to be enumerated */
+ unsigned long typeCount; /* --> number of types in the list */
+ DirEnumChoices enumFlags; /* --> indicates what to enumerate */
+ Boolean includeStartingPoint; /* --> if true return the record specified in starting point */
+ Byte padByte;
+ DirMatchWith matchNameHow; /* --> Matching Criteria for nameMatchString */
+ DirMatchWith matchTypeHow; /* --> Matching Criteria for typeList */
+ void * getBuffer; /* --> */
+ unsigned long getBufferSize; /* --> */
+ SLRV responseSLRV; /* <-- response SLRV */
+};
+typedef struct DirEnumerateGetPB DirEnumerateGetPB;
+/* The EnumerateRecords call-back function is defined as follows: */
+typedef CALLBACK_API( Boolean , ForEachDirEnumSpecProcPtr )(long clientData, const DirEnumSpec *enumSpec);
+typedef STACK_UPP_TYPE(ForEachDirEnumSpecProcPtr) ForEachDirEnumSpecUPP;
+
+typedef ForEachDirEnumSpecUPP ForEachDirEnumSpec;
+/*
+EnumerateParse:
+After an EnumerateGet call has completed, call EnumerateParse
+to parse through the buffer that was filled in EnumerateGet.
+
+'eachEnumSpec' will be called each time to return to the client a
+DirEnumSpec that matches the pattern for enumeration. 'enumFlag' indicates the type
+of information returned in the DirEnumSpec
+The clientData parameter that you pass in the parameter block will be passed
+to 'forEachEnumDSSpecFunc'. You are free to put anything in clientData - it is intended
+to allow you some way to match the call-back to the original call (for
+example, you make more then one aysynchronous EnumerateGet calls and you want to
+associate returned results in some way).
+
+The client should return FALSE from 'eachEnumSpec' to continue
+processing of the EnumerateParse request. Returning TRUE will
+terminate the EnumerateParse request.
+
+For synchronous calls, the call-back routine actually runs as part of the same thread
+of execution as the thread that made the EnumerateParse call. That means that the
+same low-memory globals, A5, stack, etc. are in effect during the call-back
+that were in effect when the call was made. Because of this, the call-back
+routine has the same restrictions as the caller of EnumerateParse:
+if EnumerateParse was not called from interrupt level, then the call-
+back routine can allocate memory. For asynchronous calls, call-back routine is
+like a ioCompletion except that A5 will be preserved for the application.
+*/
+
+struct DirEnumerateParsePB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ PackedRLIPtr aRLI; /* --> an RLI specifying the cluster to be enumerated */
+ long bReserved; /* -- */
+ long cReserved; /* -- */
+ ForEachDirEnumSpec eachEnumSpec; /* --> */
+ long eReserved; /* -- */
+ long fReserved; /* -- */
+ long gReserved; /* -- */
+ long hReserved; /* -- */
+ long iReserved; /* -- */
+ void * getBuffer; /* --> */
+ unsigned long getBufferSize; /* --> */
+ short l1Reserved; /* -- */
+ short l2Reserved; /* -- */
+ short l3Reserved; /* -- */
+ short l4Reserved; /* -- */
+
+};
+typedef struct DirEnumerateParsePB DirEnumerateParsePB;
+/*
+ * FindRecordGet operates similarly to DirEnumerate except it returns a list
+ * of records instead of records local to a cluster.
+*/
+
+struct DirFindRecordGetPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ RecordIDPtr startingPoint;
+ long reservedA[2];
+ RStringPtr nameMatchString;
+ RStringPtr * typesList;
+ unsigned long typeCount;
+ long reservedB;
+ short reservedC;
+ DirMatchWith matchNameHow;
+ DirMatchWith matchTypeHow;
+ void * getBuffer;
+ unsigned long getBufferSize;
+ DirectoryNamePtr directoryName;
+ DirDiscriminator discriminator;
+};
+typedef struct DirFindRecordGetPB DirFindRecordGetPB;
+/* The FindRecordParse call-back function is defined as follows: */
+typedef CALLBACK_API( Boolean , ForEachRecordProcPtr )(long clientData, const DirEnumSpec *enumSpec, PackedRLIPtr pRLI);
+typedef STACK_UPP_TYPE(ForEachRecordProcPtr) ForEachRecordUPP;
+
+typedef ForEachRecordUPP ForEachRecord;
+/*
+ * This PB same as DirFindRecordGet except it includes the callback function
+*/
+
+struct DirFindRecordParsePB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ RecordIDPtr startingPoint;
+ long reservedA[2];
+ RStringPtr nameMatchString;
+ RStringPtr * typesList;
+ unsigned long typeCount;
+ long reservedB;
+ short reservedC;
+ DirMatchWith matchNameHow;
+ DirMatchWith matchTypeHow;
+ void * getBuffer;
+ unsigned long getBufferSize;
+ DirectoryNamePtr directoryName;
+ DirDiscriminator discriminator;
+ ForEachRecord forEachRecordFunc;
+
+};
+typedef struct DirFindRecordParsePB DirFindRecordParsePB;
+
+
+/*
+LookupGet:
+
+aRecordList is an array of pointers to RecordIDs, each of which must
+contain valid PackedRLI and a CreationID. recordIDCount is
+the size of this array.
+
+attrTypeList is an array of pointers to AttributeTypes. attrTypeCount is
+the size of this array.
+
+staringRecordIndex is the record from which to continue the lookup.
+If you want to start from first record in the list, this must be 1 (not zero).
+This value must always be <= recordIDCount.
+
+startingAttributeIndex is the AttributeType from which we want to continue the lookup.
+If you want to start from first attribute in the list, this must be 1 (not zero).
+This value must always be <= attrTypeCount.
+
+startingAttribute is the value of the attribute value from which we want to
+continue lookup. In case of catalogs supporting creationIDs, startingAttribute
+may contain only a CID. Other catalogs may require the entire value.
+If a non-null cid is given and if an attribute value with that cid is not found, this
+call will terminate with kOCENoSuchAttribute error. A client should not make a LookupParse call
+after getting this error.
+
+'includeStartingPoint' boolean can be set to 'true' to receive the value specified in the
+startingPoint in the results returned. If this is set to 'false', the value
+specified in the startingAttribute will not be returned.
+
+When LookupGet call fails with kOCEMoreData, the client will be able to find out where the call ended
+with a subsequent LookupParse call. When the LookupParse call completes with kOCEMoreData,
+lastRecordIndex, lastAttributeIndex and lastValueCID will point to the corresponding
+recordID, attributeType and the CreationID of the last value returned successfully. These parameters
+are exactly the same ones for the startingRecordIndex, startingAttributeIndex, and startingAttrValueCID
+so they can be used in a subsequent LookupGet call to continue the lookup.
+
+In an extreme case, It is possible that we had an attribute value that is too large to fit
+in the client's buffer. In such cases, if it was the only thing that we tried to fit
+into the buffer, the client will not able to proceed further because he will not know the
+attributeCID of the attribute to continue with. Also he does not know how big a buffer
+would be needed for the next call to get this 'mondo' attribute value successfully.
+
+to support this, LookupParse call will do the following:
+
+If LookupGet has failed with kOCEMoreData error, LookupParse will check to make sure that
+ForEachAttributeValueFunc has been called at least once. If so, the client has the option
+to continue from that attribute CreationID (for PAB/ADAP) in the next LookupGet call.
+However, if it was not even called once, then the attribute value may be too big to fit in the
+user's buffer. In this case, lastAttrValueCID (lastAttribute) and attrSize are returned in the
+parse buffer and the call will fail with kOCEMoreAttrValue. However, it is possible that
+ForEachAttributeValue was not called because the user does not have read access to some of
+the attributeTypes in the list, and the buffer was full before even reading the creationID of
+any of the attribute values. A kOCEMoreData error is returned.
+
+The Toolbox will check for duplicate RecordIDs in the aRecordList. If found, it will return
+'daDuplicateRecordIDErr'.
+
+The Toolbox will check for duplicate AttributeTypes in the attrTypeList. If found it will
+return 'daDuplicateAttrTypeErr'.
+*/
+
+struct DirLookupGetPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ RecordIDPtr * aRecordList; /* --> an array of RecordID pointers */
+ AttributeTypePtr * attrTypeList; /* --> an array of attribute types */
+ long cReserved; /* -- */
+ long dReserved; /* -- */
+ long eReserved; /* -- */
+ long fReserved; /* -- */
+ unsigned long recordIDCount; /* --> */
+ unsigned long attrTypeCount; /* --> */
+ Boolean includeStartingPoint; /* --> if true return the value specified by the starting indices */
+ Byte padByte;
+ short i1Reserved; /* -- */
+ void * getBuffer; /* --> */
+ unsigned long getBufferSize; /* --> */
+ unsigned long startingRecordIndex; /* --> start from this record */
+ unsigned long startingAttrTypeIndex; /* --> start from this attribute type */
+ Attribute startingAttribute; /* --> start from this attribute value */
+ long pReserved; /* -- */
+};
+typedef struct DirLookupGetPB DirLookupGetPB;
+/* The Lookup call-back functions are defined as follows: */
+typedef CALLBACK_API( Boolean , ForEachLookupRecordIDProcPtr )(long clientData, const RecordID *recordID);
+typedef STACK_UPP_TYPE(ForEachLookupRecordIDProcPtr) ForEachLookupRecordIDUPP;
+
+typedef ForEachLookupRecordIDUPP ForEachLookupRecordID;
+typedef CALLBACK_API( Boolean , ForEachAttrTypeLookupProcPtr )(long clientData, const AttributeType *attrType, AccessMask myAttrAccMask);
+typedef STACK_UPP_TYPE(ForEachAttrTypeLookupProcPtr) ForEachAttrTypeLookupUPP;
+typedef ForEachAttrTypeLookupUPP ForEachAttrTypeLookup;
+typedef CALLBACK_API( Boolean , ForEachAttrValueProcPtr )(long clientData, const Attribute *attribute);
+typedef STACK_UPP_TYPE(ForEachAttrValueProcPtr) ForEachAttrValueUPP;
+typedef ForEachAttrValueUPP ForEachAttrValue;
+/*
+LookupParse:
+
+After a LookupGet call has completed, call LookupParse
+to parse through the buffer that was filled in LookupGet. The
+toolbox will parse through the buffer and call the appropriate call-back routines
+for each item in the getBuffer.
+
+'eachRecordID' will be called each time to return to the client one of the
+RecordIDs from aRecordList. The clientData parameter that you
+pass in the parameter block will be passed to eachRecordID.
+You are free to put anything in clientData - it is intended to allow
+you some way to match the call-back to the original call (in case, for
+example, you make simultaneous asynchronous LookupGet calls). If you don't
+want to get a call-back for each RecordID (for example, if you're looking up
+attributes for only one RecordID), pass nil for eachRecordID.
+
+After forEachLocalRecordIDFunc is called, eachAttrType may be called to pass an
+attribute type (one from attrTypeList) that exists in the record specified
+in the last eachRecordID call. If you don't want to get a call-back for
+each AttributeType (for example, if you're looking up only one attribute type,
+or you prefer to read the type from the Attribute struct during the eachAttrValue
+call-back routine), pass nil for eachAttrType. However access controls may
+prohibit you from reading some attribute types; in that case eachAttrValue
+may not be called even though the value exists. Hence the client should
+supply this call-back function to see the access controls for each attribute type.
+
+This will be followed by one or more calls to eachAttrValue, to pass the
+type, tag, and attribute value. NOTE THIS CHANGE: you are no longer expected to
+pass a pointer to a buffer in which to put the value. Now you get a pointer to
+the value, and you can process it within the call-back routine.
+After one or more values are returned, eachAttrType may be called again to pass
+another attribute type that exists in the last-specified RecordID.
+
+The client should return FALSE from eachRecordID, eachAttrType, and
+eachAttrValue to continue processing of the LookupParse request. Returning TRUE
+from any call-back will terminate the LookupParse request.
+
+If LookupGet has failed with kOCEMoreData error, LookupParse will check to make sure that
+ForEachAttributeValueFunc has been called at least once. If so, the client has the option
+to continue from that attribute CreationID (for PAB/ADAP) in the next LookupGet call.
+However, if it was not even called once, then the attribute value may be too big to fit in the
+user's buffer. In this case, lastAttrValueCID (lastAttribute) and attrSize are returned in the
+parse buffer and the call will fail with kOCEMoreAttrValue. However, it is possible that
+ForEachAttributeValue was not called because the user does not have read access to some of
+the attributeTypes in the list, and the buffer was full before even reading the creationID of
+any of the attribute values. A kOCEMoreData error is returned.
+
+For synchronous calls, the call-back routine actually runs as part of the same thread
+of execution as the thread that made the LookupParse call. That means that the
+same low-memory globals, A5, stack, etc. are in effect during the call-back
+that were in effect when the call was made. Because of this, the call-back
+routine has the same restrictions as the caller of LookupParse:
+if LookupParse was not called from interrupt level, then the call-
+back routine can allocate memory. For asynchronous calls, call-back routine is
+like a ioCompletion except that A5 will be preserved for the application.
+*/
+
+struct DirLookupParsePB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ RecordIDPtr * aRecordList; /* --> must be same from the corresponding Get call */
+ AttributeTypePtr * attrTypeList; /* --> must be same from the corresponding Get call */
+ long cReserved; /* -- */
+ ForEachLookupRecordID eachRecordID; /* --> */
+ ForEachAttrTypeLookup eachAttrType; /* --> */
+ ForEachAttrValue eachAttrValue; /* --> */
+ unsigned long recordIDCount; /* --> must be same from the corresponding Get call */
+ unsigned long attrTypeCount; /* --> must be same from the corresponding Get call */
+ long iReserved; /* -- */
+ void * getBuffer; /* --> must be same from the corresponding Get call*/
+ unsigned long getBufferSize; /* --> must be same from the corresponding Get call*/
+ unsigned long lastRecordIndex; /* <-- last RecordID processed when parse completed */
+ unsigned long lastAttributeIndex; /* <-- last Attribute Type processed when parse completed */
+ Attribute lastAttribute; /* <-- last attribute value (with this CreationID) processed when parse completed */
+ unsigned long attrSize; /* <-- length of the attribute we did not return */
+};
+typedef struct DirLookupParsePB DirLookupParsePB;
+
+
+/* AddAttributeValue */
+
+struct DirAddAttributeValuePB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ RecordIDPtr aRecord; /* --> */
+ AttributePtr attr; /* --> AttributeCreationID returned here */
+};
+typedef struct DirAddAttributeValuePB DirAddAttributeValuePB;
+/*
+aRecord must contain valid PackedRLI and a CreationID.
+
+Instead of passing type, length, and value in three separate
+fields, we take a pointer to an Attribute structure that contains
+all three, and has room for the AttributeCreationNumber.
+The AttributeCreationID will be returned in the attr itself.
+
+The AttributeTag tells the catalog service that the attribute is an RString,
+binary, or a RecordID.
+*/
+/*
+DeleteAttributeType:
+This call is provided so that an existing AttributeType can be deleted.
+If any attribute values exist for this type, they will all be deleted
+(if the user has access rights to delete the values) and then the attribute type
+will be deleted. Otherwise dsAccessDenied error will be returned.
+*/
+
+struct DirDeleteAttributeTypePB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ RecordIDPtr aRecord; /* --> */
+ AttributeTypePtr attrType; /* --> */
+};
+typedef struct DirDeleteAttributeTypePB DirDeleteAttributeTypePB;
+/*
+ DeleteAttributeValue
+*/
+
+struct DirDeleteAttributeValuePB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ RecordIDPtr aRecord; /* -> */
+ AttributePtr attr; /* -> */
+};
+typedef struct DirDeleteAttributeValuePB DirDeleteAttributeValuePB;
+
+
+/*
+ ChangeAttributeValue:
+ currentAttr ==> the attribute to be changed. For ADAS and PAB CreationID is
+ sufficient
+ newAttr ==> new value for the attribute. For ADAS and PAB
+ CreationID field will be set when
+ the call succeesfully completes
+
+ aRecord ==> must contain valid PackedRecordLocationInfo and a CreationID.
+
+
+
+*/
+
+struct DirChangeAttributeValuePB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ RecordIDPtr aRecord; /* -> */
+ AttributePtr currentAttr; /* -> */
+ AttributePtr newAttr; /* -> */
+};
+typedef struct DirChangeAttributeValuePB DirChangeAttributeValuePB;
+
+/* VerifyAttributeValue */
+
+struct DirVerifyAttributeValuePB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ RecordIDPtr aRecord; /* --> */
+ AttributePtr attr; /* --> */
+};
+typedef struct DirVerifyAttributeValuePB DirVerifyAttributeValuePB;
+/*
+aRecord must contain valid PackedRLI and a CreationID.
+
+The attribute type and value are passed in the attribute structure. If the
+attribute CreationID is non-zero, the server will verify that an attribute with
+the specified value and creation number exists in aRecord. If the attribute
+CreationID is zero, the server will verify the attribute by type and value
+alone, and return the attribute CreationID in the Attribute struct if the
+attribute exists.
+*/
+
+/*
+EnumerateAttributeTypesGet:
+The following two calls can be used to enumerate the attribute types present in
+a specified RecordID. The first, EnumerateAttributeTypesGet, processes the request
+and reads the response into getBuffer, as much as will fit. A kOCEMoreData error will
+be returned if the buffer was not large enough. After this call completes, the
+client can call EnumerateAttributeTypesParse (see below).
+
+The user will able to continue from a startingPoint by setting a startingAttrType.
+Typically, this should be the last value returned in EnumerateAttributeTypesParse call
+when 'kOCEMoreData' is returned.
+
+If 'includeStartingPoint' is true when a 'startingAttrType' is specified, the starting value
+will be included in the results, if it exists. If this is set to false, this value will not
+be included. AttributeTypes following this type will be returned.
+*/
+
+struct DirEnumerateAttributeTypesGetPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ RecordIDPtr aRecord; /* --> */
+ AttributeTypePtr startingAttrType; /* --> starting point */
+ long cReserved; /* -- */
+ long dReserved; /* -- */
+ long eReserved; /* -- */
+ long fReserved; /* -- */
+ long gReserved; /* -- */
+ long hReserved; /* -- */
+ Boolean includeStartingPoint; /* --> if true return the attrType specified by starting point */
+ Byte padByte;
+ short i1Reserved; /* -- */
+ void * getBuffer; /* --> */
+ unsigned long getBufferSize; /* --> */
+};
+typedef struct DirEnumerateAttributeTypesGetPB DirEnumerateAttributeTypesGetPB;
+/* The call-back function is defined as follows: */
+typedef CALLBACK_API( Boolean , ForEachAttrTypeProcPtr )(long clientData, const AttributeType *attrType);
+typedef STACK_UPP_TYPE(ForEachAttrTypeProcPtr) ForEachAttrTypeUPP;
+
+typedef ForEachAttrTypeUPP ForEachAttrType;
+/*
+EnumerateAttributeTypesParse:
+After an EnumerateAttributeTypesGet call has completed, call EnumerateAttributeTypesParse
+to parse through the buffer that was filled in EnumerateAttributeTypesGet. The
+toolbox will parse through the buffer and call the call-back routine for
+each attribute type in the getBuffer.
+
+The client should return false from eachAttrType to continue
+processing of the EnumerateAttributeTypesParse request. Returning true will
+terminate the EnumerateAttributeTypesParse request. The clientData parameter that
+you pass in the parameter block will be passed to eachAttrType.
+You are free to put anything in clientData - it is intended to allow
+you some way to match the call-back to the original call (in case, for
+example, you make simultaneous asynchronous calls).
+
+For synchronous calls, the call-back routine actually runs as part of the same thread
+of execution as the thread that made the EnumerateAttributeTypesParse call. That means that the
+same low-memory globals, A5, stack, etc. are in effect during the call-back
+that were in effect when the call was made. Because of this, the call-back
+routine has the same restrictions as the caller of EnumerateAttributeTypesParse.
+If EnumerateAttributeTypesParse was not called from interrupt level, then the call-
+back routine can allocate memory. For asynchronous calls, call-back routine is
+like a ioCompletion except that A5 will be preserved for the application.
+*/
+
+struct DirEnumerateAttributeTypesParsePB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ RecordIDPtr aRecord; /* --> Same as DirEnumerateAttributeTypesGetPB */
+ long bReserved; /* -- */
+ long cReserved; /* -- */
+ long dReserved; /* -- */
+ ForEachAttrType eachAttrType; /* --> */
+ long fReserved; /* -- */
+ long gReserved; /* -- */
+ long hReserved; /* -- */
+ long iReserved; /* -- */
+ void * getBuffer; /* --> */
+ unsigned long getBufferSize; /* --> */
+};
+typedef struct DirEnumerateAttributeTypesParsePB DirEnumerateAttributeTypesParsePB;
+/*
+DirAbort:
+With this call a user will able to abort an outstanding catalog service call.
+A user must pass a pointer to the parameter block for the outstanding call.
+In the current version of the product, the toolbox will process this call
+for NetSearchADAPDirectoriesGet or FindADAPDirectoryByNetSearch calls and if possible
+it will abort. For other calls for ADAP and PAB this will return 'daAbortFailErr'.
+For CSAM catalogs, this call will be passed to the corresponding CSAM driver.
+The CSAM driver may process this call or may return 'daAbortFailErr'. This call can
+be called only in synchronous mode. Since the abort call makes references to fields in
+the pb associated with the original call, this pb must not be disposed or or altered if
+the original call completes before the abort call has completed.
+*/
+
+struct DirAbortPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ DirParamBlock * pb; /* --> pb for the call which must be aborted */
+};
+typedef struct DirAbortPB DirAbortPB;
+
+/*
+AddPseudonym:
+An alternate name and type can be added to a given record. If allowDuplicate
+is set the name and type will be added even if the same name and type already
+exists.
+*/
+
+struct DirAddPseudonymPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ RecordIDPtr aRecord; /* --> RecordID to which pseudonym is to be added */
+ RStringPtr pseudonymName; /* --> new name to be added as pseudonym */
+ RStringPtr pseudonymType; /* --> new name to be added as pseudonym */
+ Boolean allowDuplicate; /* --> */
+ Boolean filler1;
+};
+typedef struct DirAddPseudonymPB DirAddPseudonymPB;
+/*
+DeletePseudonym:
+An alternate name and type for a given record can be deleted.
+*/
+
+struct DirDeletePseudonymPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ RecordIDPtr aRecord; /* --> RecordID to which pseudonym to be added */
+ RStringPtr pseudonymName; /* --> pseudonymName to be deleted */
+ RStringPtr pseudonymType; /* --> pseudonymType to be deleted */
+};
+typedef struct DirDeletePseudonymPB DirDeletePseudonymPB;
+
+/*
+ AddAlias:
+ This call can be used to create an alias record. The alias
+ can be created either in the same or different cluster. ADAS will not support
+ this call for this release. A new catalog capability flag 'kSupportsAlias' will indicate
+ if the catalog supports this call. PAB's will support this call. For the PAB implementation,
+ this call will create a record with the name and type specified an aRecord.
+ This call works exactly like AddRecord.
+ If 'allowDuplicate' is false and another record with same name and type already exists
+ 'daNoDupAllowed' error will be returned.
+*/
+
+struct DirAddAliasPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ RecordIDPtr aRecord; /* -> */
+ Boolean allowDuplicate; /* -> */
+ Boolean filler1;
+};
+typedef struct DirAddAliasPB DirAddAliasPB;
+/*
+DirFindValue:
+This call can be used to find the occurrence of a value. The value
+to be matched is passed in the buffer 'matchingData' field. The current
+ADAP/PAB implementation will match a maximum of 32 bytes of data.
+For attribute values in the PAB/ADAP implementation, only the first 32 bytes will
+be used for comparing the occurrence of data. Search can be restricted to
+a particular record and/or attribute type by specifying 'aRecord' or 'aType'.
+After finding one occurrence, 'startingRecord' and 'startingAttribute'
+can be specified to find the next occurrence of the same value.
+'sortDirection' can be specified with starting values to search forward or backward.
+When a matching value is found, the 'recordFound' indicates the reccordID in which the
+data occurrence was found, 'attributeFound' indicates the attribute with in which the
+matching data was found. ADAP/PAB implementation returns only the type and creationID of
+attributes. Catalogs which don't support creationIDs may return the
+complete value; hence this call may need a buffer to hold the data. For ADAP/PAB implementations
+the user has to make a DirLookup call to get the actual data. 'recordFound' and
+'attributeFound' can be used to initialize 'startingRecord' and 'startingAttribute' to
+find the next occurrence of the value.
+*/
+
+struct DirFindValuePB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ PackedRLIPtr aRLI; /* --> an RLI specifying the cluster to be enumerated */
+ LocalRecordIDPtr aRecord; /* --> if not nil, look only in this record */
+ AttributeTypePtr attrType; /* --> if not nil, look only in this attribute type */
+ LocalRecordIDPtr startingRecord; /* --> record in which to start searching */
+ AttributePtr startingAttribute; /* --> attribute in which to start searching */
+ LocalRecordIDPtr recordFound; /* <-- record in which data was found */
+ Attribute attributeFound; /* <-- attribute in which data was found */
+ unsigned long matchSize; /* --> length of matching bytes */
+ void * matchingData; /* --> data bytes to be matched in search */
+ DirSortDirection sortDirection; /* --> sort direction (forwards or backwards) */
+};
+typedef struct DirFindValuePB DirFindValuePB;
+
+
+/*
+EnumeratePseudonymGet:
+This call can be used to enumerate the existing pseudonyms for
+a given record specified in 'aRecord'. A starting point can be specified
+by 'startingName' and 'startingType'. If the 'includeStartingPoint' boolean
+is true and a starting point is specified, the name specified by startingName
+and startingType also is returned in the results, if it exists. If this is set to false,
+the pseudonym in startingName and Type is not included.
+Pseudonyms returned in the 'getBuffer' can be extracted by making an
+EnumeratePseudonymParse call. The results will consist of a RecordID with the
+name and type of the pseudonym. If the buffer could not hold all the results, then
+'kOCEMoreData' error will be returned. The user will be able to continue the call by
+using the last result returned as starting point for the next call.
+*/
+
+struct DirEnumeratePseudonymGetPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ RecordIDPtr aRecord; /* --> */
+ RStringPtr startingName; /* --> */
+ RStringPtr startingType; /* --> */
+ long dReserved; /* -- */
+ long eReserved; /* -- */
+ long fReserved; /* -- */
+ long gReserved; /* -- */
+ long hReserved; /* -- */
+ Boolean includeStartingPoint; /* --> if true return the Pseudonym specified by starting point will be included */
+ Byte padByte;
+ short i1Reserved; /* -- */
+ void * getBuffer; /* --> */
+ unsigned long getBufferSize; /* --> */
+};
+typedef struct DirEnumeratePseudonymGetPB DirEnumeratePseudonymGetPB;
+/* The call-back function is defined as follows: */
+typedef CALLBACK_API( Boolean , ForEachRecordIDProcPtr )(long clientData, const RecordID *recordID);
+typedef STACK_UPP_TYPE(ForEachRecordIDProcPtr) ForEachRecordIDUPP;
+
+typedef ForEachRecordIDUPP ForEachRecordID;
+/*
+EnumeratePseudonymParse:
+The pseudonyms returned in the 'getBuffer' from the EnumeratePseudonymGet call
+can be extracted by using the EnumeratePseudonymParse call. 'eachRecordID'
+will be called for each pseudonym.
+
+Returning true from any call-back will terminate the EnumeratePseudonymParse call.
+
+For synchronous calls, the call-back routine actually runs as part of the same thread
+of execution as the thread that made the EnumeratePseudonymParse call. That means that the
+same low-memory globals, A5, stack, etc. are in effect during the call-back
+that were in effect when the call was made. Because of this, the call-back
+routine has the same restrictions as the caller of EnumeratePseudonymParse:
+if EnumeratePseudonymParse was not called from interrupt level, then the call-
+back routine can allocate memory. For asynchronous calls, call-back routine is
+like a ioCompletion except that A5 will be preserved for the application.
+*/
+
+struct DirEnumeratePseudonymParsePB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ RecordIDPtr aRecord; /* --> same as DirEnumerateAliasesGetPB */
+ long bReserved; /* -- */
+ long cReserved; /* -- */
+ ForEachRecordID eachRecordID; /* --> */
+ long eReserved; /* -- */
+ long fReserved; /* -- */
+ long gReserved; /* -- */
+ long hReserved; /* -- */
+ long iReserved; /* -- */
+ void * getBuffer; /* --> */
+ unsigned long getBufferSize; /* --> */
+};
+typedef struct DirEnumeratePseudonymParsePB DirEnumeratePseudonymParsePB;
+
+
+/* GetNameAndType */
+
+struct DirGetNameAndTypePB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ RecordIDPtr aRecord; /* --> */
+};
+typedef struct DirGetNameAndTypePB DirGetNameAndTypePB;
+/*
+aRecord must contain valid RLI and a CreationID. It
+must also contain pointers to maximum-length RStrings (name and type fields)
+in which will be returned the record's distinguished name and type.
+*/
+
+/*
+SetNameAndType:
+This call can be used to change a name and type for a record. The record
+to be renamed is specified using 'aRecord'.
+'newName' and 'newType' indicate the name and type to be set.
+'allowDuplicate' if true indicates that name is to be set even if another
+name and type exactly matches the newName and newType specified.
+
+'newName' and 'newType' are required since the catalogs not supporting
+CreationID require name and type fields in the recordID to identify a given
+record.
+*/
+
+struct DirSetNameAndTypePB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ RecordIDPtr aRecord; /* --> */
+ Boolean allowDuplicate; /* --> */
+ Byte padByte;
+ RStringPtr newName; /* --> new name for the record */
+ RStringPtr newType; /* --> new type for the record */
+};
+typedef struct DirSetNameAndTypePB DirSetNameAndTypePB;
+
+
+
+/*
+DirGetMetaRecordInfo: This call can be made to obtain
+the MetaRecordInfo for a given record. Information returned
+is 16 bytes of OPAQUE information about the record.
+*/
+
+struct DirGetRecordMetaInfoPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ RecordIDPtr aRecord; /* --> */
+ DirMetaInfo metaInfo; /* <-- */
+};
+typedef struct DirGetRecordMetaInfoPB DirGetRecordMetaInfoPB;
+
+/*
+DirGetDNodeMetaInfo: This call can be made to obtain
+the DNodeMetaInfo for a given Packed RLI. Information returned
+is 16 bytes of OPAQUE information about the DNode.
+*/
+
+struct DirGetDNodeMetaInfoPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ PackedRLIPtr pRLI; /* --> */
+ DirMetaInfo metaInfo; /* <-- */
+};
+typedef struct DirGetDNodeMetaInfoPB DirGetDNodeMetaInfoPB;
+
+/*
+EnumerateDirectoriesGet:
+A user can enumerate all the catalogs installed. This includes installed
+ADAP and CSAM catalogs. The user can specify a signature as input to restrict
+the results. kDirADAPKind will return only ADAP catalogs, kDirDSAMKind
+will return all CSAM catalogs. kDirAllKinds will get both ADAP & CSAM catalogs.
+A specific signature (e.g. X.500) may be used to get catalogs with an X.500 signature.
+The information for each catalog returned will have directoryName, discriminator and features.
+
+If the user receives 'noErr' or 'kOCEMoreData', the buffer will contain valid results. A user
+can extract the results in the 'getBuffer' by making an DirEnumerateDirectories call.
+
+If 'kOCEMoreData' is received, the user can continue enumeration by using the last catalog and
+discriminator as startingDirectoryName and staringDirDiscriminator in the next call.
+
+If 'includeStartingPoint' is true and a starting point is specified,
+the staring point will be returned in the result. If false, it is not included.
+*/
+
+struct DirEnumerateDirectoriesGetPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ OCEDirectoryKind directoryKind; /* --> enumerate catalogs bearing this signature */
+ DirectoryNamePtr startingDirectoryName; /* --> staring catalog name */
+ DirDiscriminator startingDirDiscriminator; /* --> staring catalog discriminator */
+ long eReserved; /* -- */
+ long fReserved; /* -- */
+ long gReserved; /* -- */
+ long hReserved; /* -- */
+ Boolean includeStartingPoint; /* --> if true return the catalog specified by starting point */
+ Byte padByte;
+ short i1Reserved; /* -- */
+ void * getBuffer; /* --> */
+ unsigned long getBufferSize; /* --> */
+};
+typedef struct DirEnumerateDirectoriesGetPB DirEnumerateDirectoriesGetPB;
+
+
+typedef CALLBACK_API( Boolean , ForEachDirectoryProcPtr )(long clientData, const DirectoryName *dirName, const DirDiscriminator *discriminator, DirGestalt features);
+typedef STACK_UPP_TYPE(ForEachDirectoryProcPtr) ForEachDirectoryUPP;
+
+typedef ForEachDirectoryUPP ForEachDirectory;
+/*
+EnumerateDirectoriesParse:
+The catalog info returned in 'getBuffer' from the EnumerateDirectoriesGet call
+can be extracted using the EnumerateDirectoriesParse call. 'eachDirectory' will
+be called for each catalog.
+
+Returning true from any call-back will terminate the EnumerateDirectoriesParse call.
+
+For synchronous calls, the call-back routine actually runs as part of the same thread
+of execution as the thread that made the EnumerateDirectoriesParse call. That means that the
+same low-memory globals, A5, stack, etc. are in effect during the call-back
+that were in effect when the call was made. Because of this, the call-back
+routine has the same restrictions as the caller of EnumerateDirectoriesParse:
+if EnumerateDirectoriesParse was not called from interrupt level, then the call-
+back routine can allocate memory. For asynchronous calls, call-back routine is
+like a ioCompletion except that A5 will be preserved for the application.
+
+eachDirectory will be called each time to return to the client a
+DirectoryName, DirDiscriminator, and features for that catalog.
+*/
+
+struct DirEnumerateDirectoriesParsePB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ long aReserved; /* -- */
+ long bReserved; /* -- */
+ long cReserved; /* -- */
+ long dReserved; /* -- */
+ ForEachDirectory eachDirectory; /* --> */
+ long fReserved; /* -- */
+ long gReserved; /* -- */
+ long hReserved; /* -- */
+ long iReserved; /* -- */
+ void * getBuffer; /* --> */
+ unsigned long getBufferSize; /* --> */
+};
+typedef struct DirEnumerateDirectoriesParsePB DirEnumerateDirectoriesParsePB;
+
+/*
+The Following five call are specific to ADAP Catalogs. Toolbox
+remembers a list of catalogs across boots. If any catalog service
+call is intended for a ADAP catalog, then it must be in the list.
+In order for managing this list, A client (Probably DE will use these
+calls.
+DirAddADAPDirectoryPB: Add a new ADAP catalog to the list.
+DirRemoveADAPDirectory: Remove a ADAP catalog from the list.
+DirNetSearchADAPDirectoriesGet: search an internet for adas catalogs.
+DirNetSearchADAPDirectoriesParse: extract the results obtained NetSearchADAPDirectoriesGet.
+DirFindADAPDirectoryByNetSearch: Find a specified catalog through net search.
+*/
+/*
+NetSearchADAPDirectoriesGet:
+This call can be used to make a network wide search for finding ADAP catalogs.
+This call will be supported only by 'ADAP' and involve highly expensive
+network operations, so the user is advised to use utmost discretion before
+making this call. The results will be collected in the 'getbuffer' and can be
+extracted using NetSearchADAPDirectoriesParse call. The directoryName,
+the directoryDiscriminator, features and serverHint (AppleTalk address for
+a PathFinder serving that catalog) are collected for each catalog found
+on the network. If buffer is too small to hold all the catalogs found on
+the network, a 'kOCEMoreData' error will be returned.
+*/
+
+struct DirNetSearchADAPDirectoriesGetPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ void * getBuffer; /* --> */
+ unsigned long getBufferSize; /* --> */
+ long cReserved; /* -- */
+};
+typedef struct DirNetSearchADAPDirectoriesGetPB DirNetSearchADAPDirectoriesGetPB;
+typedef CALLBACK_API( Boolean , ForEachADAPDirectoryProcPtr )(long clientData, const DirectoryName *dirName, const DirDiscriminator *discriminator, DirGestalt features, AddrBlock serverHint);
+typedef STACK_UPP_TYPE(ForEachADAPDirectoryProcPtr) ForEachADAPDirectoryUPP;
+
+typedef ForEachADAPDirectoryUPP ForEachADAPDirectory;
+/*
+DirNetSearchADAPDirectoriesParse:
+This call can be used to extract the results obtained in the 'getBuffer'.
+The directoryName, directoryDiscriminator, features and
+serverHint (AppleTalk address for a PathFinder serving that catalog) are
+returned in each call-back. These values may be used to make an
+AddADAPDirectory call.
+
+Returning TRUE from any call-back will terminate the NetSearchADAPDirectoriesParse request.
+
+For synchronous calls, the call-back routine actually runs as part of the same thread
+of execution as the thread that made the DirNetSearchADAPDirectoriesParse call. That means that the
+same low-memory globals, A5, stack, etc. are in effect during the call-back
+that were in effect when the call was made. Because of this, the call-back
+routine has the same restrictions as the caller of DirNetSearchADAPDirectoriesParse:
+if DirNetSearchADAPDirectoriesParse was not called from interrupt level, then the call-
+back routine can allocate memory. For asynchronous calls, call-back routine is
+like a ioCompletion except that A5 will be preserved for the application.
+*/
+
+struct DirNetSearchADAPDirectoriesParsePB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ void * getBuffer; /* --> */
+ unsigned long getBufferSize; /* --> */
+ ForEachADAPDirectory eachADAPDirectory; /* --> */
+};
+typedef struct DirNetSearchADAPDirectoriesParsePB DirNetSearchADAPDirectoriesParsePB;
+/*
+DirFindADAPDirectoryByNetSearch:
+This call can be used to make a network wide search to find an ADAP catalog.
+This call will be supported only by 'ADAP' and involves highly expensive
+network operations, so the user is advised to use utmost discretion before
+making this call. The catalog is specified using directoryName and discriminator.
+If 'addToOCESetup' is true, the catalog will be automatically added to the setup
+list and will be visible through the EnumerateDirectories call and also
+also a creationID to the directoryRecord will be returned.
+If this parameter is set to 'false', the catalog will be added to temporary list
+and will be available for making other catalog service calls. The catalogs
+which are not in the preference catalog list will not be visible through the
+EnumerateDirectories call.
+*/
+
+struct DirFindADAPDirectoryByNetSearchPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ DirectoryNamePtr directoryName; /* --> catalog name */
+ DirDiscriminator discriminator; /* --> discriminate between dup catalog names */
+ Boolean addToOCESetup; /* --> add this catalog to OCE Setup List */
+ Byte padByte;
+ CreationID directoryRecordCID; /* <-- creationID for the catalog record */
+};
+typedef struct DirFindADAPDirectoryByNetSearchPB DirFindADAPDirectoryByNetSearchPB;
+
+/*
+DirAddADAPDirectory:
+The catalog specified by 'directoryName' and 'discriminator' will be
+added to the list of catalogs maintained by the Toolbox. Once added,
+the catalog is available across boots, until the catalog is removed
+explicitly through a DirRemoveADAPDirectory call.
+If 'serverHint' is not nil, the address provided will be used
+to contact a PathFinder for the catalog specified.
+If 'serverHint' is nil or does not point to a valid PathFinder server
+for that catalog, this call will fail.
+If 'addToOCESetup' is true, the catalog will be automatically added to the setup
+catalog list and will be visible through EnumerateDirectories calls and
+also a creationID to the directoryRecord will be returned.
+If this parameter is set to 'false', catalog will be added to temprary list
+and will be available for making other catalog service calls. The catalogs
+which are not in the setup list will not be visible through
+EnumerateDirectories call.
+*/
+
+struct DirAddADAPDirectoryPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ DirectoryNamePtr directoryName; /* --> catalog name */
+ DirDiscriminator discriminator; /* --> discriminate between dup catalog names */
+ Boolean addToOCESetup; /* --> add this catalog to OCE Setup */
+ Byte padByte;
+ CreationID directoryRecordCID; /* <-- creationID for the catalog record */
+};
+typedef struct DirAddADAPDirectoryPB DirAddADAPDirectoryPB;
+
+
+/*
+GetDirectoryInfo:
+DirGetDirectoryInfo will do:
+
+If a 'dsRefNum' is non-Zero, the catalog information for
+ the corresponding PAB will be returned.
+ If 'dsRefNum' is zero and 'serverHint' is non-zero, If the
+ 'serverHint' points to a valid ADAP Catalog Server(Path Finder),
+ the catalog information (i.e. directoryName, discriminator, features)
+ for that catalog will be returned.
+ If a valid catalog name and discriminator are provided
+ features (Set of capability flags) for that catalog will be returned.
+*/
+
+struct DirGetDirectoryInfoPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ DirectoryNamePtr directoryName; /* --> catalog name */
+ DirDiscriminator discriminator; /* <--> descriminate between dup catalog names */
+ DirGestalt features; /* <-- capability bit flags */
+};
+typedef struct DirGetDirectoryInfoPB DirGetDirectoryInfoPB;
+
+/*
+ * Note on Access Controls:
+ * Access control is based on a list model.
+ * You can get access controls list which gives dsObject and accMask for each dsObject.
+ * GetAccessControl can be limited to currently supplied identity by setting forCurrentUserOnly.
+ * There are special DSObjects are defined in ADASTypes.h for each of the category
+ * supported in ADAS Catalogs. (kOwner, kFriends, kAuthenticatedToCluster,
+ * kAuthenticatedToDirectory, kGuest) and DUGetActlDSSpec call can be used
+ * to obtain appropraiate DSSpec before making set calls to ADAS catalogs.
+ *
+ */
+
+
+
+
+
+/*
+ GetDNodeAccessControlGet:
+ This call can be done to get back access control list for a DNode.
+ pRLI -> RLI of the DNode whose access control list is sought
+ curUserAccMask -> If this is 'true', Access controls for the user specified by
+ the identity parameter will be returned other wise entire list
+ will be returned.
+ startingDsObj -> If this is not nil, list should be started after this object.
+ startingPointInclusive -> If staringDsObj is specified, include that in the returned
+ results.
+
+ The results will be collected in the 'getBuffer' supplied by the user.
+ If buffer can not hold all the data returned 'daMoreData' error will be returned.
+
+ If user receives 'noErr' or 'daMoreData', buffer will contain valid results. A user
+ can extract the results in the 'getBuffer' by making 'DsGetDNodeAccessControlParse' call.
+
+ Results returned for each DSObject will contain DSSpecPtr and three sets of access mask.
+
+*/
+
+
+struct DirGetDNodeAccessControlGetPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ PackedRLIPtr pRLI; /* -> RLI of the cluster whose access control list is sought */
+ long bReserved; /* -- unused */
+ long cReserved; /* -- unused */
+ long dReserved; /* -- unused */
+ long eResreved; /* --> */
+ Boolean forCurrentUserOnly; /* --> */
+ Boolean filler1;
+ DSSpec * startingPoint; /* --> starting Point */
+ Boolean includeStartingPoint; /* --> if true return the DsObject specified in starting point */
+ Boolean filler2;
+ void * getBuffer; /* -> */
+ unsigned long getBufferSize; /* -> */
+
+
+};
+typedef struct DirGetDNodeAccessControlGetPB DirGetDNodeAccessControlGetPB;
+/* The Access Control call-back function is defined as follows: */
+typedef CALLBACK_API( Boolean , ForEachDNodeAccessControlProcPtr )(long clientData, const DSSpec *dsObj, AccessMask activeDnodeAccMask, AccessMask defaultRecordAccMask, AccessMask defaultAttributeAccMask);
+typedef STACK_UPP_TYPE(ForEachDNodeAccessControlProcPtr) ForEachDNodeAccessControlUPP;
+
+typedef ForEachDNodeAccessControlUPP ForEachDNodeAccessControl;
+/*
+ GetDNodeAccessControlParse:
+ After an GetDNodeAccessControlGet call has completed,
+ call GetDNodeAccessControlParse to parse through the buffer that
+ that was filled in GetDNodeAccessControlGet.
+
+ 'eachObject' will be called each time to return to the client a
+ DsObject and a set of three accMasks (three long words) for that object.
+ Acceesmasks returned apply to the dsObject in the callback :
+ 1. Currently Active Access mask for the specified DNode.
+ 2. Default Access mask for any Record in the DNode
+ 3. Default Access mask for any Attribute in the DNode
+ The clientData parameter that you pass in the parameter block will be passed
+ to 'eachObject'. You are free to put anything in clientData - it is intended
+ to allow you some way to match the call-back to the original call (for
+ example, you make more then one aysynchronous GetDNodeAccessControlGet calls and you want to
+ associate returned results in some way).
+
+ The client should return FALSE from 'eachObject' to continue
+ processing of the GetDNodeAccessControlParse request. Returning TRUE will
+ terminate the GetDNodeAccessControlParse request.
+
+ For synchronous calls, the call-back routine actually runs as part of the same thread
+ of execution as the thread that made the GetDNodeAccessControlParse call. That means that the
+ same low-memory globals, A5, stack, etc. are in effect during the call-back
+ that were in effect when the call was made. Because of this, the call-back
+ routine has the same restrictions as the caller of GetDNodeAccessControlParse:
+ if GetDNodeAccessControlParse was not called from interrupt level, then the call-
+ back routine can allocate memory. For asynchronous calls, call-back routine is
+ like a ioCompletion except that A5 will be preserved for the application.
+
+
+*/
+
+
+struct DirGetDNodeAccessControlParsePB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ PackedRLIPtr pRLI; /* -> RLI of the cluster */
+ long bReserved; /* -- unused */
+ long cReserved; /* -- unused */
+ long dReserved; /* -- unused */
+ ForEachDNodeAccessControl eachObject; /* --> */
+ Boolean forCurrentUserOnly; /* --> */
+ Boolean filler1;
+ DSSpec * startingPoint; /* --> starting Point */
+ Boolean includeStartingPoint; /* --> if true return the record specified in starting point */
+ Boolean filler2;
+ void * getBuffer; /* -> */
+ unsigned long getBufferSize; /* -> */
+
+
+};
+typedef struct DirGetDNodeAccessControlParsePB DirGetDNodeAccessControlParsePB;
+/*
+ GetRecordAccessControlGet:
+ This call can be done to get back access control list for a RecordID.
+ aRecord -> RecordID to which access control list is sought
+ curUserAccMask -> If this is 'true', Access controls for the user specified by
+ the identity parameter will be returned other wise entire list
+ will be returned.
+ startingDsObj -> If this is not nil, list should be started after this object.
+ startingPointInclusive -> If staringDsObj is specified, include that in the returned
+ results.
+
+ The results will be collected in the 'getBuffer' supplied by the user.
+ If buffer can not hold all the data returned 'daMoreData' error will be returned.
+
+ If user receives 'noErr' or 'daMoreData', buffer will contain valid results. A user
+ can extract the results in the 'getBuffer' by making 'DsGetDNodeAccessControlParse' call.
+
+ Results returned for each DSObject will contain DSSpecPtr and accMask.
+
+*/
+
+
+struct DirGetRecordAccessControlGetPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ RecordIDPtr aRecord; /* -> RecordID to which access control list is sought list is sought */
+ long bReserved; /* -- unused */
+ long cReserved; /* -- unused */
+ long dReserved; /* -- unused */
+ long eResreved; /* --> */
+ Boolean forCurrentUserOnly; /* --> */
+ Boolean filler1;
+ DSSpec * startingPoint; /* --> starting Point */
+ Boolean includeStartingPoint; /* --> if true return the record specified in starting point */
+ Boolean filler2;
+ void * getBuffer; /* -> */
+ unsigned long getBufferSize; /* -> */
+
+
+};
+typedef struct DirGetRecordAccessControlGetPB DirGetRecordAccessControlGetPB;
+/* The Access Control call-back function is defined as follows: */
+typedef CALLBACK_API( Boolean , ForEachRecordAccessControlProcPtr )(long clientData, const DSSpec *dsObj, AccessMask activeDnodeAccMask, AccessMask activeRecordAccMask, AccessMask defaultAttributeAccMask);
+typedef STACK_UPP_TYPE(ForEachRecordAccessControlProcPtr) ForEachRecordAccessControlUPP;
+
+typedef ForEachRecordAccessControlUPP ForEachRecordAccessControl;
+/*
+ GetRecordAccessControlParse:
+ After an GetRecordAccessControlGet call has completed,
+ call GetRecordAccessControlParse to parse through the buffer that
+ that was filled in GetRecordAccessControlGet.
+
+ 'eachObject' will be called each time to return to the client a
+ DsObject and a set of three accMasks (three long words) for that object.
+ Acceesmasks returned apply to the dsObject in the callback :
+ 1. Active Access mask for the DNode Containing the Record.
+ 2. Active Access mask for the Record specified.
+ 3. Defualt Access mask for Attributes in the record.
+ The clientData parameter that you pass in the parameter block will be passed
+ to 'eachObject'. You are free to put anything in clientData - it is intended
+ to allow you some way to match the call-back to the original call (for
+ example, you make more then one aysynchronous GetRecordAccessControlGet calls and you want to
+ associate returned results in some way).
+
+ The client should return FALSE from 'eachObject' to continue
+ processing of the GetRecordAccessControlParse request. Returning TRUE will
+ terminate the GetRecordAccessControlParse request.
+
+ For synchronous calls, the call-back routine actually runs as part of the same thread
+ of execution as the thread that made the GetRecordAccessControlParse call. That means that the
+ same low-memory globals, A5, stack, etc. are in effect during the call-back
+ that were in effect when the call was made. Because of this, the call-back
+ routine has the same restrictions as the caller of GetRecordAccessControlParse:
+ if GetRecordAccessControlParse was not called from interrupt level, then the call-
+ back routine can allocate memory. For asynchronous calls, call-back routine is
+ like a ioCompletion except that A5 will be preserved for the application.
+
+
+*/
+
+
+struct DirGetRecordAccessControlParsePB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ RecordIDPtr aRecord; /* -> RecordID to which access control list is sought list is sought */
+ long bReserved; /* -- unused */
+ long cReserved; /* -- unused */
+ long dReserved; /* -- unused */
+ ForEachRecordAccessControl eachObject; /* --> */
+ Boolean forCurrentUserOnly; /* --> */
+ Boolean filler1;
+ DSSpec * startingPoint; /* --> starting Point */
+ Boolean includeStartingPoint; /* --> if true return the record specified in starting point */
+ Boolean filler2;
+ void * getBuffer; /* -> */
+ unsigned long getBufferSize; /* -> */
+
+
+};
+typedef struct DirGetRecordAccessControlParsePB DirGetRecordAccessControlParsePB;
+/*
+ GetAttributeAccessControlGet:
+ This call can be done to get back access control list for a attributeType with in a RecordID.
+ aRecord -> RecordID to which access control list is sought
+ aType -> Attribute Type to which access controls are sought
+ curUserAccMask -> If this is 'true', Access controls for the user specified by
+ the identity parameter will be returned other wise entire list
+ will be returned.
+ startingDsObj -> If this is not nil, list should be started after this object.
+ startingPointInclusive -> If staringDsObj is specified, include that in the returned
+ results.
+
+ The results will be collected in the 'getBuffer' supplied by the user.
+ If buffer can not hold all the data returned 'daMoreData' error will be returned.
+
+ If user receives 'noErr' or 'daMoreData', buffer will contain valid results. A user
+ can extract the results in the 'getBuffer' by making 'DsGetDNodeAccessControlParse' call.
+
+ Results returned for each DSObject will contain DSSpecPtr and accMask.
+
+*/
+
+
+struct DirGetAttributeAccessControlGetPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ RecordIDPtr aRecord; /* -> RecordID to which access control list is sought list is sought */
+ AttributeTypePtr aType; /* -> Attribute Type to which access controls are sought */
+ long cReserved; /* -- unused */
+ long dReserved; /* -- unused */
+ long eResreved; /* --> */
+ Boolean forCurrentUserOnly; /* --> */
+ Boolean filler1;
+ DSSpec * startingPoint; /* --> starting Point */
+ Boolean includeStartingPoint; /* --> if true return the record specified in starting point */
+ Boolean filler2;
+ void * getBuffer; /* -> */
+ unsigned long getBufferSize; /* -> */
+
+
+};
+typedef struct DirGetAttributeAccessControlGetPB DirGetAttributeAccessControlGetPB;
+/* The Access Control call-back function is defined as follows: */
+typedef CALLBACK_API( Boolean , ForEachAttributeAccessControlProcPtr )(long clientData, const DSSpec *dsObj, AccessMask activeDnodeAccMask, AccessMask activeRecordAccMask, AccessMask activeAttributeAccMask);
+typedef STACK_UPP_TYPE(ForEachAttributeAccessControlProcPtr) ForEachAttributeAccessControlUPP;
+
+typedef ForEachAttributeAccessControlUPP ForEachAttributeAccessControl;
+/*
+ GetAttributeAccessControlParse:
+ After an GetAttributeAccessControlGet call has completed,
+ call GetAttributeAccessControlParse to parse through the buffer that
+ that was filled in GetAttributeAccessControlGet.
+
+ 'eachObject' will be called each time to return to the client a
+ DsObject and a set of three accMasks (three long words) for that object.
+ Acceesmasks returned apply to the dsObject in the callback :
+ 1. Active Access mask for the DNode Containing the Attribute.
+ 2. Active Access mask for the Record in the Containing the Attribute.
+ 3. Active Access mask for the specified Attribute.
+ The clientData parameter that you pass in the parameter block will be passed
+ to 'eachObject'. You are free to put anything in clientData - it is intended
+ to allow you some way to match the call-back to the original call (for
+ example, you make more then one aysynchronous GetAttributeAccessControlGet calls and you want to
+ associate returned results in some way).
+
+ The client should return FALSE from 'eachObject' to continue
+ processing of the GetAttributeAccessControlParse request. Returning TRUE will
+ terminate the GetAttributeAccessControlParse request.
+
+ For synchronous calls, the call-back routine actually runs as part of the same thread
+ of execution as the thread that made the GetAttributeAccessControlParse call. That means that the
+ same low-memory globals, A5, stack, etc. are in effect during the call-back
+ that were in effect when the call was made. Because of this, the call-back
+ routine has the same restrictions as the caller of GetAttributeAccessControlParse:
+ if GetAttributeAccessControlParse was not called from interrupt level, then the call-
+ back routine can allocate memory. For asynchronous calls, call-back routine is
+ like a ioCompletion except that A5 will be preserved for the application.
+
+
+*/
+
+
+struct DirGetAttributeAccessControlParsePB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ RecordIDPtr aRecord; /* -> RecordID to which access control list is sought list is sought */
+ AttributeTypePtr aType; /* -> Attribute Type to which access controls are sought */
+ long cReserved; /* -- unused */
+ long dReserved; /* -- unused */
+ ForEachAttributeAccessControl eachObject; /* --> */
+ Boolean forCurrentUserOnly; /* --> */
+ Boolean filler1;
+ DSSpec * startingPoint; /* --> starting Point */
+ Boolean includeStartingPoint; /* --> if true return the record specified in starting point */
+ Boolean filler2;
+ void * getBuffer; /* -> */
+ unsigned long getBufferSize; /* -> */
+
+
+};
+typedef struct DirGetAttributeAccessControlParsePB DirGetAttributeAccessControlParsePB;
+
+
+
+
+
+/*
+MapPathNameToDNodeNumber:
+This call maps a given PathName within a catalog to its DNodeNumber.
+*/
+
+struct DirMapPathNameToDNodeNumberPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ DirectoryNamePtr directoryName; /* --> catalog name */
+ DirDiscriminator discriminator; /* --> discriminator */
+ DNodeNum dNodeNumber; /* <-- dNodenumber to the path */
+ PackedPathNamePtr path; /* --> Path Name to be mapped */
+};
+typedef struct DirMapPathNameToDNodeNumberPB DirMapPathNameToDNodeNumberPB;
+/*
+PathName in the path field will be mapped to the cooresponding dNodeNumber and
+returned in the DNodeNumber field. directoryName and descriminator Fields are
+ignored. DSRefNum is used to identify the catalog.
+*/
+
+
+/*
+MapDNodeNumberToPathName:
+This call will map a given DNodeNumber with in a catalog to the
+corresponding PathName.
+*/
+
+struct DirMapDNodeNumberToPathNamePB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ DirectoryNamePtr directoryName; /* --> catalog name */
+ DirDiscriminator discriminator; /* --> discriminator */
+ DNodeNum dNodeNumber; /* --> dNodenumber to be mapped */
+ PackedPathNamePtr path; /* <-- Packed Path Name returned */
+ unsigned short lengthOfPathName; /* --> length of packed pathName structure*/
+};
+typedef struct DirMapDNodeNumberToPathNamePB DirMapDNodeNumberToPathNamePB;
+/*
+dNodeNumber in the DNodeNumber field will be mapped to the cooresponding
+pathName and returned in the PackedPathName field.
+lengthOfPathName is to be set the length of pathName structure.
+If length of PackedPathName is larger then the lengthOfPathName, kOCEMoreData
+OSErr will be returned.
+*/
+/*
+GetLocalNetworkSpec:
+This call will return the Local NetworkSpec. Client should supply
+an RString big enough to hold the NetworkSpec.
+*/
+
+struct DirGetLocalNetworkSpecPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ DirectoryNamePtr directoryName; /* --> catalog name */
+ DirDiscriminator discriminator; /* --> discriminator */
+ NetworkSpecPtr networkSpec; /* <-- NetworkSpec */
+};
+typedef struct DirGetLocalNetworkSpecPB DirGetLocalNetworkSpecPB;
+/*
+PathName in the path field must be set to nil. internetName should be large
+enough to hold the internetName. InterNetname returned indicates path finder's
+local internet (configured by administrator).
+*/
+/*
+GetDNodeInfo:
+This call will return the information (internetName and descriptor)
+for the given RLI of a DNode.
+*/
+
+struct DirGetDNodeInfoPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ PackedRLIPtr pRLI; /* --> packed RLI whose info is requested */
+ DirNodeKind descriptor; /* <-- dNode descriptor */
+ NetworkSpecPtr networkSpec; /* <-- cluster's networkSpec if kIsCluster */
+};
+typedef struct DirGetDNodeInfoPB DirGetDNodeInfoPB;
+/*
+If DnodeNumber is set to a non zero value, path should be set to nil.
+if DnodeNumber is set to zero, pathName should point to a packed path name.
+internetName should be large enough to hold
+the internetName. (If the internetName is same as the one got by
+GetLocalInternetName call, it indicates cluster is reachable without
+forwarders, --> Tell me if I am wrong)
+*/
+
+/*
+DirCreatePersonalDirectory:
+A new personal catalog can be created by specifying an FSSpec for
+the file. If a file already exists dupFNErr will be returned. This call is
+supported 'synchronous' mode only.
+*/
+
+struct DirCreatePersonalDirectoryPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ FSSpecPtr fsSpec; /* --> FSSpec for the Personal Catalog */
+ OSType fdType; /* --> file type for the Personal Catalog */
+ OSType fdCreator; /* --> file creator for the Personal Catalog */
+};
+typedef struct DirCreatePersonalDirectoryPB DirCreatePersonalDirectoryPB;
+/*
+DirOpenPersonalDirectory:
+An existing personal catalog can be opened using this call.
+User can specify the personal catalog by FSSpec for the AddressBook file.
+'accessRequested' field specifies open permissions. 'fsRdPerm' & 'fsRdWrPerm'
+are the only accepted open modes for the address book.
+When the call completes successfully, a dsRefNum will be returned. The 'dsRefNum'
+field is in the DSParamBlockHeader. In addittion 'accessGranted' indicates
+actual permission with personal catalog is opened and 'features' indicate the capabilty flags
+associated with the personal catalog.
+This call is supported 'synchronous' mode only.
+*/
+
+
+struct DirOpenPersonalDirectoryPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ FSSpecPtr fsSpec; /* --> Open an existing Personal Catalog */
+ SInt8 accessRequested; /* --> Open: permissions Requested(byte)*/
+ SInt8 accessGranted; /* <-- Open: permissions (byte) (Granted)*/
+ DirGestalt features; /* <-- features for Personal Catalog */
+};
+typedef struct DirOpenPersonalDirectoryPB DirOpenPersonalDirectoryPB;
+/*
+DirClosePersonalDirectory: This call lets a client close AddressBook opened by DirOpenPersonalDirectory.
+The Personal Catalog specified by the 'dsRefNum' will be closed.
+This call is supported 'synchronous' mode only.
+*/
+
+struct DirClosePersonalDirectoryPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+};
+typedef struct DirClosePersonalDirectoryPB DirClosePersonalDirectoryPB;
+
+/*
+DirMakePersonalDirectoryRLI: With this call a client can make an RLI
+for a Personal Catalog opened by DirOpenPersonalDirectory Call.
+A packed RLI is created for the Personal Catalog specified by the 'dsRefNum'.
+If a client has a need to make the AddressBook reference to persistent
+acrross boots it should make use of this call. In the current implementaion
+PackedRLI has an embeeded System7.0 'alias'. If in later time
+If client has a need to make reference to the AddressBook, it must use
+ADAPLibrary call 'DUExtractAlias' and resole the 'alias' to 'FSSpec' and
+make DirOpenPersonalDirectory call to get a 'dsRefNum'.
+ 'fromFSSpec' FSPecPtr from which relative alias to be created. If nil,
+ absolute alias is created.
+ 'pRLIBufferSize' indicates the size of buffer pointed by 'pRLI'
+ 'pRLISize' indicates the actual length of 'pRLI'. If the call
+ fails with 'kOCEMoreData' error a client can reissue
+ this call with a larger buffer of this length.
+ 'pRLI' is pointer to the buffer in which 'PackedRLI' is
+ returned.
+This call is supported in 'synchronous' mode only.
+*/
+
+struct DirMakePersonalDirectoryRLIPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ FSSpecPtr fromFSSpec; /* --> FSSpec for creating relative alia */
+ unsigned short pRLIBufferSize; /* --> Length of 'pRLI' buffer */
+ unsigned short pRLISize; /* <-- Length of actual 'pRLI' */
+ PackedRLIPtr pRLI; /* <-- pRLI for the specified AddressBook */
+};
+typedef struct DirMakePersonalDirectoryRLIPB DirMakePersonalDirectoryRLIPB;
+
+/*****************************************************************************
+The calls described below apply only for CSAM Drivers:
+
+The following three calls provide capability to Install/Remove a CSAM at RunTime.
+ DirAddDSAM
+ DirRemoveDSAM
+ DirInstantiateDSAM
+
+The following two calls provide capability to Install/Remove a CSAM Catalog at RunTime.
+ DirAddDSAMDirectory
+ DirRemoveDirectory
+
+DirGetDirectoryIcon call is used by clients to get any special icon associated
+with a CSAM catalog.
+
+*****************************************************************************/
+
+/*
+DirAddDSAM: This call can be used to inorm the availability of a CSAM file
+after discovering the CSAM file.
+ dsamName -> is generic CSAM name e.g. Untitled X.500 directory
+ dsamSignature -> could be generic CSAM kind e.g. 'X500'.
+ fsSpec -> is the FileSpec for the file containing CSAM resources.
+If the call is successfull 'DSAMRecordCID' will be returned. If the
+call returns 'daDSAMRecordCIDExists', record was already there and
+'dsamRecordCID' will be returned.
+This call can be done only in synchronous mode.
+*/
+
+struct DirAddDSAMPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ CreationID dsamRecordCID; /* <-- CreationID for the CSAM record */
+ RStringPtr dsamName; /* --> CSAM name */
+ OCEDirectoryKind dsamKind; /* --> CSAM kind */
+ FSSpecPtr fsSpec; /* --> FSSpec for the file containing CSAM */
+};
+typedef struct DirAddDSAMPB DirAddDSAMPB;
+/*
+DirInstantiateDSAM: This call should be used by the CSAM driver in response
+Driver Open call to indicate the toolbox about the availability of the CSAM.
+ dsamName -> is generic CSAM name e.g. Untitled X.500 directory
+ dsamKind -> could be generic CSAM kind e.g. 'X500'.
+ dsamData -> pointer to private DSAMData. This will be paased back to the CSAM
+ when the CSAM functions (DSAMDirProc,DSAMDirParseProc, DSAMAuthProc) are called.
+ CSAM should already be setup using DirAddDSAM call.
+ DSAMDirProc -> This procedure will be called when any catalog service
+ call intended for the CSAM (other then parse calls)
+ DSAMDirParseProc -> This procedure will be called when any of the parse calls
+ are called.
+ DSAMAuthProc -> This procedure will be called when any of the Authentication Calls
+ are made to the CSAM. If the CSAM does not support authentication, this can be nil.
+This call can be done only in synchronous mode.
+*/
+typedef CALLBACK_API( OSErr , DSAMDirProcPtr )(void *dsamData, DirParamBlockPtr paramBlock, Boolean async);
+typedef STACK_UPP_TYPE(DSAMDirProcPtr) DSAMDirUPP;
+
+typedef DSAMDirUPP DSAMDirProc;
+typedef CALLBACK_API( OSErr , DSAMDirParseProcPtr )(void *dsamData, DirParamBlockPtr paramBlock, Boolean async);
+typedef STACK_UPP_TYPE(DSAMDirParseProcPtr) DSAMDirParseUPP;
+typedef DSAMDirParseUPP DSAMDirParseProc;
+typedef CALLBACK_API( OSErr , DSAMAuthProcPtr )(void *dsamData, AuthParamBlockPtr pb, Boolean async);
+typedef STACK_UPP_TYPE(DSAMAuthProcPtr) DSAMAuthUPP;
+typedef DSAMAuthUPP DSAMAuthProc;
+
+struct DirInstantiateDSAMPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ RStringPtr dsamName; /* --> dsamName name */
+ OCEDirectoryKind dsamKind; /* --> DSAMKind */
+ void * dsamData; /* --> dsamData */
+ DSAMDirUPP dsamDirProc; /* --> of type DSAMDirProc: for catalog service calls */
+ DSAMDirParseUPP dsamDirParseProc; /* --> of type DSAMDirParseProc: for catalog service parse calls */
+ DSAMAuthUPP dsamAuthProc; /* --> of type DSAMAuthProc: for authetication service calls */
+};
+typedef struct DirInstantiateDSAMPB DirInstantiateDSAMPB;
+
+/*
+DirRemoveDSAM: This call can be used to remove a CSAM file from the OCE Setup.
+ dsamRecordCID -> is the creationID of the CSAM record.
+This call can be made only in synchronous mode.
+*/
+
+struct DirRemoveDSAMPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ CreationID dsamRecordCID; /* <-- CreationID for the CSAM record */
+};
+typedef struct DirRemoveDSAMPB DirRemoveDSAMPB;
+
+/*
+DirAddDSAMDirectory: This call can be used to inorm the availability of a CSAM catalog.
+ dsamRecordCID -> recordID for the CSAM serving this catalog
+ directoryName -> name of the catalog
+ discriminator -> discriminator for the catalog
+ directoryRecordCID -> If the call is successful, creationID for the record will
+ be returned.
+*/
+
+struct DirAddDSAMDirectoryPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ CreationID dsamRecordCID; /* --> CreationID for the CSAM record */
+ DirectoryNamePtr directoryName; /* --> catalog name */
+ DirDiscriminator discriminator; /* --> catalog discriminator */
+ DirGestalt features; /* --> capabilty flags for the catalog */
+ CreationID directoryRecordCID; /* <-- creationID for the catalog record */
+};
+typedef struct DirAddDSAMDirectoryPB DirAddDSAMDirectoryPB;
+/*
+DirRemoveDirectory: This call can be used to inform the toolbox that
+catalog specified by 'directoryRecordCID'
+*/
+
+struct DirRemoveDirectoryPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ CreationID directoryRecordCID; /* --> creationID for the catalog record */
+};
+typedef struct DirRemoveDirectoryPB DirRemoveDirectoryPB;
+/*
+ * DSGetExtendedDirectoriesInfo:: This call can be used to get
+ * the information of various foreign catalogs supported.
+ * Typically a DE Template may make this call to create a
+ * Address template or a Gateway may make this call to findout
+ * catalog name space in which MSAM may would support.
+ * Client will supply a buffer pointed by 'bufferPtr' of size 'bufferLength'.
+ * When the call completes with 'daMoreData' error, client can examine 'totalEntries'
+ * returned and reissue the call with increaing buffer.
+ * Toolbox will findout the private information of each of the Foreign Catalogs
+ * by polling CSAM's, Gateways, and MnMServers. The Information returned
+ * for each catalog will be packed in the format:
+ * typedef struct EachDirectoryData {
+ * PackedRLI pRLI; // packed RLI for the catalog
+ * OSType entnType; // Entn Type
+ * long hasMailSlot; // If this catalog has mail slot this will be 1 otherwise zero
+ * ProtoRString RealName; // Packed RString for Real Name (padded to even boundary)
+ * ProtoRString comment; // Packed RString holding any comment for Display (padded to even boundary)
+ * long length; // data length
+ * char data[length]; // data padded to even boundary
+ * };
+ *
+ *
+ *
+ * typedef struct myData {
+ * EachDirectoryData data[numberOfEntries]; // data packed in the above format
+ * };
+ *
+ */
+
+struct DirGetExtendedDirectoriesInfoPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ void * buffer; /* --> Pointer to a buufer where data will be returned */
+ unsigned long bufferSize; /* --> Length of the buffer, Length of actual data will be returned here */
+ unsigned long totalEntries; /* <-- Total Number of Catalogs found */
+ unsigned long actualEntries; /* <-- Total Number of Catalogs entries returned */
+};
+typedef struct DirGetExtendedDirectoriesInfoPB DirGetExtendedDirectoriesInfoPB;
+/*
+DirGetDirectoryIconPB: With this call a client can find out about
+the icons supported by the Catalog.
+Both ADAP and Personal Catalog will not support this call for now.
+A CSAM can support a call so that DE Extension can use this
+call to find appropriate Icons.
+
+Returns kOCEBufferTooSmall if icon is too small, but will update iconSize.
+*/
+
+struct DirGetDirectoryIconPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ PackedRLIPtr pRLI; /* --> packed RLI for the catalog */
+ OSType iconType; /* --> Type of Icon requested */
+ void * iconBuffer; /* --> Buffer to hold Icon Data */
+ unsigned long bufferSize; /* <-> size of buffer to hold icon data */
+};
+typedef struct DirGetDirectoryIconPB DirGetDirectoryIconPB;
+/*
+DirGetOCESetupRefNum: This call will return 'dsRefnum' for the OCE Setup Personal Catalog
+and oceSetupRecordCID for the oceSetup Record.
+Clients interested in manipulating OCE Setup Personal Catalog directly should
+make this call to get 'dsRefNum'.
+'dsRefNum' will be returned in the standard field in the DirParamHeader.
+*/
+
+struct DirGetOCESetupRefNumPB {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ CreationID oceSetupRecordCID; /* --> creationID for the catalog record */
+};
+typedef struct DirGetOCESetupRefNumPB DirGetOCESetupRefNumPB;
+
+/*****************************************************************************/
+/* Catalog and Authentication control blocks and operation definitions */
+
+union AuthParamBlock {
+ struct {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ AuthIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ } header;
+ AuthBindSpecificIdentityPB bindIdentityPB;
+ AuthUnbindSpecificIdentityPB unbindIdentityPB;
+ AuthResolveCreationIDPB resolveCreationIDPB;
+ AuthGetSpecificIdentityInfoPB getIdentityInfoPB;
+ AuthAddKeyPB addKeyPB;
+ AuthChangeKeyPB changeKeyPB;
+ AuthDeleteKeyPB deleteKeyPB;
+ AuthPasswordToKeyPB passwordToKeyPB;
+ AuthGetCredentialsPB getCredentialsPB;
+ AuthDecryptCredentialsPB decryptCredentialsPB;
+ AuthMakeChallengePB makeChallengePB;
+ AuthMakeReplyPB makeReplyPB;
+ AuthVerifyReplyPB verifyReplyPB;
+ AuthGetUTCTimePB getUTCTimePB;
+ AuthMakeProxyPB makeProxyPB;
+ AuthTradeProxyForCredentialsPB tradeProxyForCredentialsPB;
+ AuthGetLocalIdentityPB getLocalIdentityPB;
+ AuthUnlockLocalIdentityPB unLockLocalIdentityPB;
+ AuthLockLocalIdentityPB lockLocalIdentityPB;
+ AuthAddToLocalIdentityQueuePB localIdentityQInstallPB;
+ AuthRemoveFromLocalIdentityQueuePB localIdentityQRemovePB;
+ AuthSetupLocalIdentityPB setupLocalIdentityPB;
+ AuthChangeLocalIdentityPB changeLocalIdentityPB;
+ AuthRemoveLocalIdentityPB removeLocalIdentityPB;
+ OCESetupAddDirectoryInfoPB setupDirectoryIdentityPB;
+ OCESetupChangeDirectoryInfoPB changeDirectoryIdentityPB;
+ OCESetupRemoveDirectoryInfoPB removeDirectoryIdentityPB;
+ OCESetupGetDirectoryInfoPB getDirectoryIdentityInfoPB;
+};
+
+
+union DirParamBlock {
+ struct {
+ void * qLink;
+ long reserved1;
+ long reserved2;
+ DirIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ unsigned long saveA5;
+ short reqCode;
+ long reserved[2];
+ AddrBlock serverHint;
+ short dsRefNum;
+ unsigned long callID;
+ AuthIdentity identity;
+ long gReserved1;
+ long gReserved2;
+ long gReserved3;
+ long clientData;
+ } header;
+ DirAddRecordPB addRecordPB;
+ DirDeleteRecordPB deleteRecordPB;
+ DirEnumerateGetPB enumerateGetPB;
+ DirEnumerateParsePB enumerateParsePB;
+ DirFindRecordGetPB findRecordGetPB;
+ DirFindRecordParsePB findRecordParsePB;
+ DirLookupGetPB lookupGetPB;
+ DirLookupParsePB lookupParsePB;
+ DirAddAttributeValuePB addAttributeValuePB;
+ DirDeleteAttributeTypePB deleteAttributeTypePB;
+ DirDeleteAttributeValuePB deleteAttributeValuePB;
+ DirChangeAttributeValuePB changeAttributeValuePB;
+ DirVerifyAttributeValuePB verifyAttributeValuePB;
+ DirFindValuePB findValuePB;
+ DirEnumeratePseudonymGetPB enumeratePseudonymGetPB;
+ DirEnumeratePseudonymParsePB enumeratePseudonymParsePB;
+ DirAddPseudonymPB addPseudonymPB;
+ DirDeletePseudonymPB deletePseudonymPB;
+ DirAddAliasPB addAliasPB;
+ DirEnumerateAttributeTypesGetPB enumerateAttributeTypesGetPB;
+ DirEnumerateAttributeTypesParsePB enumerateAttributeTypesParsePB;
+ DirGetNameAndTypePB getNameAndTypePB;
+ DirSetNameAndTypePB setNameAndTypePB;
+ DirGetRecordMetaInfoPB getRecordMetaInfoPB;
+ DirGetDNodeMetaInfoPB getDNodeMetaInfoPB;
+ DirGetDirectoryInfoPB getDirectoryInfoPB;
+
+ DirGetDNodeAccessControlGetPB getDNodeAccessControlGetPB;
+ DirGetDNodeAccessControlParsePB getDNodeAccessControlParsePB;
+
+ DirGetRecordAccessControlGetPB getRecordAccessControlGetPB;
+ DirGetRecordAccessControlParsePB getRecordAccessControlParsePB;
+
+ DirGetAttributeAccessControlGetPB getAttributeAccessControlGetPB;
+ DirGetAttributeAccessControlParsePB getAttributeAccessControlParsePB;
+
+
+ DirEnumerateDirectoriesGetPB enumerateDirectoriesGetPB;
+ DirEnumerateDirectoriesParsePB enumerateDirectoriesParsePB;
+
+ DirAddADAPDirectoryPB addADAPDirectoryPB;
+ DirRemoveDirectoryPB removeDirectoryPB;
+ DirNetSearchADAPDirectoriesGetPB netSearchADAPDirectoriesGetPB;
+ DirNetSearchADAPDirectoriesParsePB netSearchADAPDirectoriesParsePB;
+ DirFindADAPDirectoryByNetSearchPB findADAPDirectoryByNetSearchPB;
+
+
+ DirMapDNodeNumberToPathNamePB mapDNodeNumberToPathNamePB;
+ DirMapPathNameToDNodeNumberPB mapPathNameToDNodeNumberPB;
+ DirGetLocalNetworkSpecPB getLocalNetworkSpecPB;
+ DirGetDNodeInfoPB getDNodeInfoPB;
+
+ DirCreatePersonalDirectoryPB createPersonalDirectoryPB;
+ DirOpenPersonalDirectoryPB openPersonalDirectoryPB;
+ DirClosePersonalDirectoryPB closePersonalDirectoryPB;
+ DirMakePersonalDirectoryRLIPB makePersonalDirectoryRLIPB;
+
+ DirAddDSAMPB addDSAMPB;
+ DirInstantiateDSAMPB instantiateDSAMPB;
+ DirRemoveDSAMPB removeDSAMPB;
+ DirAddDSAMDirectoryPB addDSAMDirectoryPB;
+ DirGetExtendedDirectoriesInfoPB getExtendedDirectoriesInfoPB;
+ DirGetDirectoryIconPB getDirectoryIconPB;
+
+ DirGetOCESetupRefNumPB dirGetOCESetupRefNumPB;
+
+ DirAbortPB abortPB;
+};
+
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(AuthIOCompletionUPP)
+ NewAuthIOCompletionUPP (AuthIOCompletionProcPtr userRoutine);
+
+ EXTERN_API(NotificationUPP)
+ NewNotificationUPP (NotificationProcPtr userRoutine);
+
+ EXTERN_API(DirIOCompletionUPP)
+ NewDirIOCompletionUPP (DirIOCompletionProcPtr userRoutine);
+
+ EXTERN_API(ForEachDirEnumSpecUPP)
+ NewForEachDirEnumSpecUPP (ForEachDirEnumSpecProcPtr userRoutine);
+
+ EXTERN_API(ForEachRecordUPP)
+ NewForEachRecordUPP (ForEachRecordProcPtr userRoutine);
+
+ EXTERN_API(ForEachLookupRecordIDUPP)
+ NewForEachLookupRecordIDUPP (ForEachLookupRecordIDProcPtr userRoutine);
+
+ EXTERN_API(ForEachAttrTypeLookupUPP)
+ NewForEachAttrTypeLookupUPP (ForEachAttrTypeLookupProcPtr userRoutine);
+
+ EXTERN_API(ForEachAttrValueUPP)
+ NewForEachAttrValueUPP (ForEachAttrValueProcPtr userRoutine);
+
+ EXTERN_API(ForEachAttrTypeUPP)
+ NewForEachAttrTypeUPP (ForEachAttrTypeProcPtr userRoutine);
+
+ EXTERN_API(ForEachRecordIDUPP)
+ NewForEachRecordIDUPP (ForEachRecordIDProcPtr userRoutine);
+
+ EXTERN_API(ForEachDirectoryUPP)
+ NewForEachDirectoryUPP (ForEachDirectoryProcPtr userRoutine);
+
+ EXTERN_API(ForEachADAPDirectoryUPP)
+ NewForEachADAPDirectoryUPP (ForEachADAPDirectoryProcPtr userRoutine);
+
+ EXTERN_API(ForEachDNodeAccessControlUPP)
+ NewForEachDNodeAccessControlUPP (ForEachDNodeAccessControlProcPtr userRoutine);
+
+ EXTERN_API(ForEachRecordAccessControlUPP)
+ NewForEachRecordAccessControlUPP (ForEachRecordAccessControlProcPtr userRoutine);
+
+ EXTERN_API(ForEachAttributeAccessControlUPP)
+ NewForEachAttributeAccessControlUPP (ForEachAttributeAccessControlProcPtr userRoutine);
+
+ EXTERN_API(DSAMDirUPP)
+ NewDSAMDirUPP (DSAMDirProcPtr userRoutine);
+
+ EXTERN_API(DSAMDirParseUPP)
+ NewDSAMDirParseUPP (DSAMDirParseProcPtr userRoutine);
+
+ EXTERN_API(DSAMAuthUPP)
+ NewDSAMAuthUPP (DSAMAuthProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeAuthIOCompletionUPP (AuthIOCompletionUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeNotificationUPP (NotificationUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeDirIOCompletionUPP (DirIOCompletionUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeForEachDirEnumSpecUPP (ForEachDirEnumSpecUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeForEachRecordUPP (ForEachRecordUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeForEachLookupRecordIDUPP (ForEachLookupRecordIDUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeForEachAttrTypeLookupUPP (ForEachAttrTypeLookupUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeForEachAttrValueUPP (ForEachAttrValueUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeForEachAttrTypeUPP (ForEachAttrTypeUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeForEachRecordIDUPP (ForEachRecordIDUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeForEachDirectoryUPP (ForEachDirectoryUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeForEachADAPDirectoryUPP (ForEachADAPDirectoryUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeForEachDNodeAccessControlUPP (ForEachDNodeAccessControlUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeForEachRecordAccessControlUPP (ForEachRecordAccessControlUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeForEachAttributeAccessControlUPP (ForEachAttributeAccessControlUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeDSAMDirUPP (DSAMDirUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeDSAMDirParseUPP (DSAMDirParseUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeDSAMAuthUPP (DSAMAuthUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeAuthIOCompletionUPP (AuthParamBlockPtr paramBlock,
+ AuthIOCompletionUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeNotificationUPP (long clientData,
+ AuthLocalIdentityOp callValue,
+ AuthLocalIdentityLockAction actionValue,
+ LocalIdentity identity,
+ NotificationUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeDirIOCompletionUPP (DirParamBlockPtr paramBlock,
+ DirIOCompletionUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeForEachDirEnumSpecUPP (long clientData,
+ const DirEnumSpec * enumSpec,
+ ForEachDirEnumSpecUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeForEachRecordUPP (long clientData,
+ const DirEnumSpec * enumSpec,
+ PackedRLIPtr pRLI,
+ ForEachRecordUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeForEachLookupRecordIDUPP (long clientData,
+ const RecordID * recordID,
+ ForEachLookupRecordIDUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeForEachAttrTypeLookupUPP (long clientData,
+ const AttributeType * attrType,
+ AccessMask myAttrAccMask,
+ ForEachAttrTypeLookupUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeForEachAttrValueUPP (long clientData,
+ const Attribute * attribute,
+ ForEachAttrValueUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeForEachAttrTypeUPP (long clientData,
+ const AttributeType * attrType,
+ ForEachAttrTypeUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeForEachRecordIDUPP (long clientData,
+ const RecordID * recordID,
+ ForEachRecordIDUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeForEachDirectoryUPP (long clientData,
+ const DirectoryName * dirName,
+ const DirDiscriminator * discriminator,
+ DirGestalt features,
+ ForEachDirectoryUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeForEachADAPDirectoryUPP (long clientData,
+ const DirectoryName * dirName,
+ const DirDiscriminator * discriminator,
+ DirGestalt features,
+ AddrBlock serverHint,
+ ForEachADAPDirectoryUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeForEachDNodeAccessControlUPP (long clientData,
+ const DSSpec * dsObj,
+ AccessMask activeDnodeAccMask,
+ AccessMask defaultRecordAccMask,
+ AccessMask defaultAttributeAccMask,
+ ForEachDNodeAccessControlUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeForEachRecordAccessControlUPP (long clientData,
+ const DSSpec * dsObj,
+ AccessMask activeDnodeAccMask,
+ AccessMask activeRecordAccMask,
+ AccessMask defaultAttributeAccMask,
+ ForEachRecordAccessControlUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeForEachAttributeAccessControlUPP (long clientData,
+ const DSSpec * dsObj,
+ AccessMask activeDnodeAccMask,
+ AccessMask activeRecordAccMask,
+ AccessMask activeAttributeAccMask,
+ ForEachAttributeAccessControlUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeDSAMDirUPP (void * dsamData,
+ DirParamBlockPtr paramBlock,
+ Boolean async,
+ DSAMDirUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeDSAMDirParseUPP (void * dsamData,
+ DirParamBlockPtr paramBlock,
+ Boolean async,
+ DSAMDirParseUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeDSAMAuthUPP (void * dsamData,
+ AuthParamBlockPtr pb,
+ Boolean async,
+ DSAMAuthUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppAuthIOCompletionProcInfo = 0x00009802 }; /* register no_return_value Func(4_bytes:A0) */
+ enum { uppNotificationProcInfo = 0x00003FD0 }; /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppDirIOCompletionProcInfo = 0x00009802 }; /* register no_return_value Func(4_bytes:A0) */
+ enum { uppForEachDirEnumSpecProcInfo = 0x000003D0 }; /* pascal 1_byte Func(4_bytes, 4_bytes) */
+ enum { uppForEachRecordProcInfo = 0x00000FD0 }; /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppForEachLookupRecordIDProcInfo = 0x000003D0 }; /* pascal 1_byte Func(4_bytes, 4_bytes) */
+ enum { uppForEachAttrTypeLookupProcInfo = 0x00000FD0 }; /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppForEachAttrValueProcInfo = 0x000003D0 }; /* pascal 1_byte Func(4_bytes, 4_bytes) */
+ enum { uppForEachAttrTypeProcInfo = 0x000003D0 }; /* pascal 1_byte Func(4_bytes, 4_bytes) */
+ enum { uppForEachRecordIDProcInfo = 0x000003D0 }; /* pascal 1_byte Func(4_bytes, 4_bytes) */
+ enum { uppForEachDirectoryProcInfo = 0x00003FD0 }; /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppForEachADAPDirectoryProcInfo = 0x0000FFD0 }; /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppForEachDNodeAccessControlProcInfo = 0x0000FFD0 }; /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppForEachRecordAccessControlProcInfo = 0x0000FFD0 }; /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppForEachAttributeAccessControlProcInfo = 0x0000FFD0 }; /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppDSAMDirProcInfo = 0x000007E0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 1_byte) */
+ enum { uppDSAMDirParseProcInfo = 0x000007E0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 1_byte) */
+ enum { uppDSAMAuthProcInfo = 0x000007E0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 1_byte) */
+ #define NewAuthIOCompletionUPP(userRoutine) (AuthIOCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppAuthIOCompletionProcInfo, GetCurrentArchitecture())
+ #define NewNotificationUPP(userRoutine) (NotificationUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNotificationProcInfo, GetCurrentArchitecture())
+ #define NewDirIOCompletionUPP(userRoutine) (DirIOCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDirIOCompletionProcInfo, GetCurrentArchitecture())
+ #define NewForEachDirEnumSpecUPP(userRoutine) (ForEachDirEnumSpecUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachDirEnumSpecProcInfo, GetCurrentArchitecture())
+ #define NewForEachRecordUPP(userRoutine) (ForEachRecordUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachRecordProcInfo, GetCurrentArchitecture())
+ #define NewForEachLookupRecordIDUPP(userRoutine) (ForEachLookupRecordIDUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachLookupRecordIDProcInfo, GetCurrentArchitecture())
+ #define NewForEachAttrTypeLookupUPP(userRoutine) (ForEachAttrTypeLookupUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachAttrTypeLookupProcInfo, GetCurrentArchitecture())
+ #define NewForEachAttrValueUPP(userRoutine) (ForEachAttrValueUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachAttrValueProcInfo, GetCurrentArchitecture())
+ #define NewForEachAttrTypeUPP(userRoutine) (ForEachAttrTypeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachAttrTypeProcInfo, GetCurrentArchitecture())
+ #define NewForEachRecordIDUPP(userRoutine) (ForEachRecordIDUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachRecordIDProcInfo, GetCurrentArchitecture())
+ #define NewForEachDirectoryUPP(userRoutine) (ForEachDirectoryUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachDirectoryProcInfo, GetCurrentArchitecture())
+ #define NewForEachADAPDirectoryUPP(userRoutine) (ForEachADAPDirectoryUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachADAPDirectoryProcInfo, GetCurrentArchitecture())
+ #define NewForEachDNodeAccessControlUPP(userRoutine) (ForEachDNodeAccessControlUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachDNodeAccessControlProcInfo, GetCurrentArchitecture())
+ #define NewForEachRecordAccessControlUPP(userRoutine) (ForEachRecordAccessControlUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachRecordAccessControlProcInfo, GetCurrentArchitecture())
+ #define NewForEachAttributeAccessControlUPP(userRoutine) (ForEachAttributeAccessControlUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachAttributeAccessControlProcInfo, GetCurrentArchitecture())
+ #define NewDSAMDirUPP(userRoutine) (DSAMDirUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDSAMDirProcInfo, GetCurrentArchitecture())
+ #define NewDSAMDirParseUPP(userRoutine) (DSAMDirParseUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDSAMDirParseProcInfo, GetCurrentArchitecture())
+ #define NewDSAMAuthUPP(userRoutine) (DSAMAuthUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDSAMAuthProcInfo, GetCurrentArchitecture())
+ #define DisposeAuthIOCompletionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeNotificationUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeDirIOCompletionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeForEachDirEnumSpecUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeForEachRecordUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeForEachLookupRecordIDUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeForEachAttrTypeLookupUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeForEachAttrValueUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeForEachAttrTypeUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeForEachRecordIDUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeForEachDirectoryUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeForEachADAPDirectoryUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeForEachDNodeAccessControlUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeForEachRecordAccessControlUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeForEachAttributeAccessControlUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeDSAMDirUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeDSAMDirParseUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeDSAMAuthUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter InvokeAuthIOCompletionUPP(__A0, __A1)
+ void InvokeAuthIOCompletionUPP(AuthParamBlockPtr paramBlock, AuthIOCompletionUPP userUPP) = 0x4E91;
+ #else
+ #define InvokeAuthIOCompletionUPP(paramBlock, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppAuthIOCompletionProcInfo, (paramBlock))
+ #endif
+ #define InvokeNotificationUPP(clientData, callValue, actionValue, identity, userUPP) (Boolean)CALL_FOUR_PARAMETER_UPP((userUPP), uppNotificationProcInfo, (clientData), (callValue), (actionValue), (identity))
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter InvokeDirIOCompletionUPP(__A0, __A1)
+ void InvokeDirIOCompletionUPP(DirParamBlockPtr paramBlock, DirIOCompletionUPP userUPP) = 0x4E91;
+ #else
+ #define InvokeDirIOCompletionUPP(paramBlock, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppDirIOCompletionProcInfo, (paramBlock))
+ #endif
+ #define InvokeForEachDirEnumSpecUPP(clientData, enumSpec, userUPP) (Boolean)CALL_TWO_PARAMETER_UPP((userUPP), uppForEachDirEnumSpecProcInfo, (clientData), (enumSpec))
+ #define InvokeForEachRecordUPP(clientData, enumSpec, pRLI, userUPP) (Boolean)CALL_THREE_PARAMETER_UPP((userUPP), uppForEachRecordProcInfo, (clientData), (enumSpec), (pRLI))
+ #define InvokeForEachLookupRecordIDUPP(clientData, recordID, userUPP) (Boolean)CALL_TWO_PARAMETER_UPP((userUPP), uppForEachLookupRecordIDProcInfo, (clientData), (recordID))
+ #define InvokeForEachAttrTypeLookupUPP(clientData, attrType, myAttrAccMask, userUPP) (Boolean)CALL_THREE_PARAMETER_UPP((userUPP), uppForEachAttrTypeLookupProcInfo, (clientData), (attrType), (myAttrAccMask))
+ #define InvokeForEachAttrValueUPP(clientData, attribute, userUPP) (Boolean)CALL_TWO_PARAMETER_UPP((userUPP), uppForEachAttrValueProcInfo, (clientData), (attribute))
+ #define InvokeForEachAttrTypeUPP(clientData, attrType, userUPP) (Boolean)CALL_TWO_PARAMETER_UPP((userUPP), uppForEachAttrTypeProcInfo, (clientData), (attrType))
+ #define InvokeForEachRecordIDUPP(clientData, recordID, userUPP) (Boolean)CALL_TWO_PARAMETER_UPP((userUPP), uppForEachRecordIDProcInfo, (clientData), (recordID))
+ #define InvokeForEachDirectoryUPP(clientData, dirName, discriminator, features, userUPP) (Boolean)CALL_FOUR_PARAMETER_UPP((userUPP), uppForEachDirectoryProcInfo, (clientData), (dirName), (discriminator), (features))
+ #define InvokeForEachADAPDirectoryUPP(clientData, dirName, discriminator, features, serverHint, userUPP) (Boolean)CALL_FIVE_PARAMETER_UPP((userUPP), uppForEachADAPDirectoryProcInfo, (clientData), (dirName), (discriminator), (features), (serverHint))
+ #define InvokeForEachDNodeAccessControlUPP(clientData, dsObj, activeDnodeAccMask, defaultRecordAccMask, defaultAttributeAccMask, userUPP) (Boolean)CALL_FIVE_PARAMETER_UPP((userUPP), uppForEachDNodeAccessControlProcInfo, (clientData), (dsObj), (activeDnodeAccMask), (defaultRecordAccMask), (defaultAttributeAccMask))
+ #define InvokeForEachRecordAccessControlUPP(clientData, dsObj, activeDnodeAccMask, activeRecordAccMask, defaultAttributeAccMask, userUPP) (Boolean)CALL_FIVE_PARAMETER_UPP((userUPP), uppForEachRecordAccessControlProcInfo, (clientData), (dsObj), (activeDnodeAccMask), (activeRecordAccMask), (defaultAttributeAccMask))
+ #define InvokeForEachAttributeAccessControlUPP(clientData, dsObj, activeDnodeAccMask, activeRecordAccMask, activeAttributeAccMask, userUPP) (Boolean)CALL_FIVE_PARAMETER_UPP((userUPP), uppForEachAttributeAccessControlProcInfo, (clientData), (dsObj), (activeDnodeAccMask), (activeRecordAccMask), (activeAttributeAccMask))
+ #define InvokeDSAMDirUPP(dsamData, paramBlock, async, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppDSAMDirProcInfo, (dsamData), (paramBlock), (async))
+ #define InvokeDSAMDirParseUPP(dsamData, paramBlock, async, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppDSAMDirParseProcInfo, (dsamData), (paramBlock), (async))
+ #define InvokeDSAMAuthUPP(dsamData, pb, async, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppDSAMAuthProcInfo, (dsamData), (pb), (async))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewAuthIOCompletionProc(userRoutine) NewAuthIOCompletionUPP(userRoutine)
+#define NewNotificationProc(userRoutine) NewNotificationUPP(userRoutine)
+#define NewDirIOCompletionProc(userRoutine) NewDirIOCompletionUPP(userRoutine)
+#define NewForEachDirEnumSpecProc(userRoutine) NewForEachDirEnumSpecUPP(userRoutine)
+#define NewForEachRecordProc(userRoutine) NewForEachRecordUPP(userRoutine)
+#define NewForEachLookupRecordIDProc(userRoutine) NewForEachLookupRecordIDUPP(userRoutine)
+#define NewForEachAttrTypeLookupProc(userRoutine) NewForEachAttrTypeLookupUPP(userRoutine)
+#define NewForEachAttrValueProc(userRoutine) NewForEachAttrValueUPP(userRoutine)
+#define NewForEachAttrTypeProc(userRoutine) NewForEachAttrTypeUPP(userRoutine)
+#define NewForEachRecordIDProc(userRoutine) NewForEachRecordIDUPP(userRoutine)
+#define NewForEachDirectoryProc(userRoutine) NewForEachDirectoryUPP(userRoutine)
+#define NewForEachADAPDirectoryProc(userRoutine) NewForEachADAPDirectoryUPP(userRoutine)
+#define NewForEachDNodeAccessControlProc(userRoutine) NewForEachDNodeAccessControlUPP(userRoutine)
+#define NewForEachRecordAccessControlProc(userRoutine) NewForEachRecordAccessControlUPP(userRoutine)
+#define NewForEachAttributeAccessControlProc(userRoutine) NewForEachAttributeAccessControlUPP(userRoutine)
+#define NewDSAMDirProc(userRoutine) NewDSAMDirUPP(userRoutine)
+#define NewDSAMDirParseProc(userRoutine) NewDSAMDirParseUPP(userRoutine)
+#define NewDSAMAuthProc(userRoutine) NewDSAMAuthUPP(userRoutine)
+#define CallAuthIOCompletionProc(userRoutine, paramBlock) InvokeAuthIOCompletionUPP(paramBlock, userRoutine)
+#define CallNotificationProc(userRoutine, clientData, callValue, actionValue, identity) InvokeNotificationUPP(clientData, callValue, actionValue, identity, userRoutine)
+#define CallDirIOCompletionProc(userRoutine, paramBlock) InvokeDirIOCompletionUPP(paramBlock, userRoutine)
+#define CallForEachDirEnumSpecProc(userRoutine, clientData, enumSpec) InvokeForEachDirEnumSpecUPP(clientData, enumSpec, userRoutine)
+#define CallForEachRecordProc(userRoutine, clientData, enumSpec, pRLI) InvokeForEachRecordUPP(clientData, enumSpec, pRLI, userRoutine)
+#define CallForEachLookupRecordIDProc(userRoutine, clientData, recordID) InvokeForEachLookupRecordIDUPP(clientData, recordID, userRoutine)
+#define CallForEachAttrTypeLookupProc(userRoutine, clientData, attrType, myAttrAccMask) InvokeForEachAttrTypeLookupUPP(clientData, attrType, myAttrAccMask, userRoutine)
+#define CallForEachAttrValueProc(userRoutine, clientData, attribute) InvokeForEachAttrValueUPP(clientData, attribute, userRoutine)
+#define CallForEachAttrTypeProc(userRoutine, clientData, attrType) InvokeForEachAttrTypeUPP(clientData, attrType, userRoutine)
+#define CallForEachRecordIDProc(userRoutine, clientData, recordID) InvokeForEachRecordIDUPP(clientData, recordID, userRoutine)
+#define CallForEachDirectoryProc(userRoutine, clientData, dirName, discriminator, features) InvokeForEachDirectoryUPP(clientData, dirName, discriminator, features, userRoutine)
+#define CallForEachADAPDirectoryProc(userRoutine, clientData, dirName, discriminator, features, serverHint) InvokeForEachADAPDirectoryUPP(clientData, dirName, discriminator, features, serverHint, userRoutine)
+#define CallForEachDNodeAccessControlProc(userRoutine, clientData, dsObj, activeDnodeAccMask, defaultRecordAccMask, defaultAttributeAccMask) InvokeForEachDNodeAccessControlUPP(clientData, dsObj, activeDnodeAccMask, defaultRecordAccMask, defaultAttributeAccMask, userRoutine)
+#define CallForEachRecordAccessControlProc(userRoutine, clientData, dsObj, activeDnodeAccMask, activeRecordAccMask, defaultAttributeAccMask) InvokeForEachRecordAccessControlUPP(clientData, dsObj, activeDnodeAccMask, activeRecordAccMask, defaultAttributeAccMask, userRoutine)
+#define CallForEachAttributeAccessControlProc(userRoutine, clientData, dsObj, activeDnodeAccMask, activeRecordAccMask, activeAttributeAccMask) InvokeForEachAttributeAccessControlUPP(clientData, dsObj, activeDnodeAccMask, activeRecordAccMask, activeAttributeAccMask, userRoutine)
+#define CallDSAMDirProc(userRoutine, dsamData, paramBlock, async) InvokeDSAMDirUPP(dsamData, paramBlock, async, userRoutine)
+#define CallDSAMDirParseProc(userRoutine, dsamData, paramBlock, async) InvokeDSAMDirParseUPP(dsamData, paramBlock, async, userRoutine)
+#define CallDSAMAuthProc(userRoutine, dsamData, pb, async) InvokeDSAMAuthUPP(dsamData, pb, async, userRoutine)
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+AuthBindSpecificIdentity (AuthParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0200, 0xAA5E);
+
+EXTERN_API( OSErr )
+AuthUnbindSpecificIdentity (AuthParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0201, 0xAA5E);
+
+EXTERN_API( OSErr )
+AuthResolveCreationID (AuthParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0202, 0xAA5E);
+
+EXTERN_API( OSErr )
+AuthGetSpecificIdentityInfo (AuthParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0203, 0xAA5E);
+
+EXTERN_API( OSErr )
+AuthAddKey (AuthParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0207, 0xAA5E);
+
+EXTERN_API( OSErr )
+AuthChangeKey (AuthParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0208, 0xAA5E);
+
+EXTERN_API( OSErr )
+AuthDeleteKey (AuthParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0209, 0xAA5E);
+
+EXTERN_API( OSErr )
+AuthPasswordToKey (AuthParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x020A, 0xAA5E);
+
+EXTERN_API( OSErr )
+AuthGetCredentials (AuthParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x020B, 0xAA5E);
+
+EXTERN_API( OSErr )
+AuthDecryptCredentials (AuthParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x020C, 0xAA5E);
+
+EXTERN_API( OSErr )
+AuthMakeChallenge (AuthParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x020F, 0xAA5E);
+
+EXTERN_API( OSErr )
+AuthMakeReply (AuthParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0210, 0xAA5E);
+
+EXTERN_API( OSErr )
+AuthVerifyReply (AuthParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0211, 0xAA5E);
+
+EXTERN_API( OSErr )
+AuthGetUTCTime (AuthParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x021A, 0xAA5E);
+
+EXTERN_API( OSErr )
+AuthMakeProxy (AuthParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0212, 0xAA5E);
+
+EXTERN_API( OSErr )
+AuthTradeProxyForCredentials (AuthParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0213, 0xAA5E);
+
+/* Local Identity API */
+EXTERN_API( OSErr )
+AuthGetLocalIdentity (AuthParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0204, 0xAA5E);
+
+EXTERN_API( OSErr )
+AuthUnlockLocalIdentity (AuthParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0214, 0xAA5E);
+
+EXTERN_API( OSErr )
+AuthLockLocalIdentity (AuthParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0215, 0xAA5E);
+
+EXTERN_API( OSErr )
+AuthAddToLocalIdentityQueue (AuthParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0205, 0xAA5E);
+
+EXTERN_API( OSErr )
+AuthRemoveFromLocalIdentityQueue (AuthParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0206, 0xAA5E);
+
+EXTERN_API( OSErr )
+AuthSetupLocalIdentity (AuthParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0216, 0xAA5E);
+
+EXTERN_API( OSErr )
+AuthChangeLocalIdentity (AuthParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0217, 0xAA5E);
+
+EXTERN_API( OSErr )
+AuthRemoveLocalIdentity (AuthParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0218, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirAddRecord (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0109, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirDeleteRecord (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x010A, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirEnumerateGet (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0111, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirEnumerateParse (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0101, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirFindRecordGet (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0140, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirFindRecordParse (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0141, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirLookupGet (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0117, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirLookupParse (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0102, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirAddAttributeValue (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x010B, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirDeleteAttributeValue (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x010C, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirDeleteAttributeType (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0130, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirChangeAttributeValue (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x010D, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirVerifyAttributeValue (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x010E, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirFindValue (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0126, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirEnumerateAttributeTypesGet (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0112, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirEnumerateAttributeTypesParse (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0103, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirAddPseudonym (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x010F, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirDeletePseudonym (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0110, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirAddAlias (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x011C, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirEnumeratePseudonymGet (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0113, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirEnumeratePseudonymParse (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0104, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirGetNameAndType (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0114, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirSetNameAndType (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0115, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirGetRecordMetaInfo (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0116, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirGetDNodeMetaInfo (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0118, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirGetDirectoryInfo (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0119, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirGetDNodeAccessControlGet (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x012A, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirGetDNodeAccessControlParse (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x012F, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirGetRecordAccessControlGet (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x012C, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirGetRecordAccessControlParse (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0134, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirGetAttributeAccessControlGet (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x012E, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirGetAttributeAccessControlParse (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0138, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirEnumerateDirectoriesGet (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x011A, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirEnumerateDirectoriesParse (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0106, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirMapPathNameToDNodeNumber (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0122, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirMapDNodeNumberToPathName (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0123, 0xAA5E);
+
+
+EXTERN_API( OSErr )
+DirGetLocalNetworkSpec (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0124, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirGetDNodeInfo (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0125, 0xAA5E);
+
+
+/* Trap Dispatchers for Personal Catalog and CSAM Extensions */
+EXTERN_API( OSErr )
+DirCreatePersonalDirectory (DirParamBlockPtr paramBlock) FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x011F, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirOpenPersonalDirectory (DirParamBlockPtr paramBlock) FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x011E, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirClosePersonalDirectory (DirParamBlockPtr paramBlock) FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0131, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirMakePersonalDirectoryRLI (DirParamBlockPtr paramBlock) FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0132, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirAddDSAM (DirParamBlockPtr paramBlock) FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x011D, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirInstantiateDSAM (DirParamBlockPtr paramBlock) FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0127, 0xAA5E);
+
+
+EXTERN_API( OSErr )
+DirRemoveDSAM (DirParamBlockPtr paramBlock) FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0120, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirAddDSAMDirectory (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0133, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirGetExtendedDirectoriesInfo (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0136, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirGetDirectoryIcon (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0121, 0xAA5E);
+
+
+EXTERN_API( OSErr )
+DirAddADAPDirectory (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0137, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirRemoveDirectory (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0135, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirNetSearchADAPDirectoriesGet (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0108, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirNetSearchADAPDirectoriesParse (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0105, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirFindADAPDirectoryByNetSearch (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0107, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirGetOCESetupRefNum (DirParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0128, 0xAA5E);
+
+EXTERN_API( OSErr )
+DirAbort (DirParamBlockPtr paramBlock) FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x011B, 0xAA5E);
+
+EXTERN_API( OSErr )
+OCESetupAddDirectoryInfo (AuthParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0219, 0xAA5E);
+
+EXTERN_API( OSErr )
+OCESetupChangeDirectoryInfo (AuthParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x021B, 0xAA5E);
+
+EXTERN_API( OSErr )
+OCESetupRemoveDirectoryInfo (AuthParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x020D, 0xAA5E);
+
+EXTERN_API( OSErr )
+OCESetupGetDirectoryInfo (AuthParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x020E, 0xAA5E);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __OCEAUTHDIR__ */
+
diff --git a/include/qt/OCEErrors.h b/include/qt/OCEErrors.h
new file mode 100644
index 000000000..7053390d4
--- /dev/null
+++ b/include/qt/OCEErrors.h
@@ -0,0 +1,370 @@
+/*
+ File: OCEErrors.h
+
+ Contains: Apple Open Collaboration Environment Error Interfaces.
+
+ Version: Technology: AOCE Toolbox 1.02
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __OCEERRORS__
+#define __OCEERRORS__
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*
+Allocated ranges:
+ AOCE General Errors -1500 to -1539
+ AOCE Authentication Errors -1540 to -1609
+ AOCE Catalog Errors -1610 to -1680
+
+ AOCE Standard Mail Errors -1900 to -1949
+ AOCE Standard Catalog Errors -1950 to -1969
+ AOCE Digital Signature Errors -1970 to -1999
+
+ AOCE Templates Errors -15000 to -15039
+ AOCE Mail Errors -15040 to -15089
+ AOCE Messaging Errors -15090 to -15169
+ Reserved for future -15170 to -15199
+*/
+
+/* AOCE General Errors (-1500 to -1539) */
+enum {
+ kOCEToolboxNotOpen = -1500, /* Toolbox not open; perhaps its closing */
+ kOCEInvalidCommand = -1501, /* Request code passed to a trap call is invalid */
+ kOCEInvalidRef = -1502, /* a reference to an object is obsolete or invalid */
+ kOCEBufferTooSmall = -1503, /* the buffer supplied is too small for the task */
+ kOCEVersionErr = -1504, /* some manner of software version mismatch */
+ kOCESyncAsyncErr = -1505, /* Op tried synchronously may only be done async, or vice versa */
+ kOCEInternalErr = -1506, /* the OCE toolbox has an internal error */
+ kOCENotAnOwner = -1507, /* this operation can only be done by the object's owner */
+ kOCENotImplemented = -1508, /* Feature not implemented */
+ kOCENotAuthenticated = -1509, /* The user must be authenticated */
+ kOCEAlreadyExists = -1510, /* The object being added already exists */
+ kOCEDoesntExist = -1511, /* the object being referenced doesn't exist or cannot be found */
+ kOCEConnectionErr = -1512, /* Unable to open or maintain a network transport */
+ kOCEConnectionClosed = -1513, /* Connect has closed */
+ kOCEInvalidRecipient = -1514, /* Invalid recipient/address for this command */
+ kOCEInvalidIndex = -1515, /* invalid index (out of range) */
+ kOCERefIsClosing = -1516, /* Object references is being closed, cannot complete command */
+ kOCEHasPendingMsgs = -1517,
+ kOCEInvalidConfiguration = -1518,
+ kOCERequiredServicesNotAvailable = -1519,
+ kOCEServerInactive = -1520,
+ kOCEMoreDiskSpaceNeeded = -1521, /* Inadequate disk space to safely complete operation */
+ kOCEParamErr = paramErr /* invalid parameter passed to toolbox */
+};
+
+/* AOCE Authentication Errors (-1540 to -1609) */
+enum {
+ kOCEReadAccessDenied = -1540,
+ kOCEWriteAccessDenied = -1541,
+ kOCEAccessRightsInsufficient = -1542, /* stream needs to be authenticated, or not authorized, or someone other than agent trying to TPFC, or problem in server-to-server authentication */
+ kOCEUnsupportedCredentialsVersion = -1543, /* don't know how to read that version of credentials */
+ kOCECredentialsProblem = -1544, /* couldn't successfully decrypt credentials */
+ kOCECredentialsImmature = -1545, /* current time < first valid time */
+ kOCECredentialsExpired = -1546, /* current time > expiry time */
+ kOCEProxyImmature = -1547, /* current time < proxy start time */
+ kOCEProxyExpired = -1548, /* current time > proxy expiry time */
+ kOCEDisallowedRecipient = -1549, /* Recipient not specified in proxy */
+ kOCENoKeyFound = -1550, /* found no key for entity in question */
+ kOCEPrincipalKeyNotFound = -1551, /* couldn't decode proxy because principal has no key */
+ kOCERecipientKeyNotFound = -1552, /* recipient has no key */
+ kOCEAgentKeyNotFound = -1553, /* in TPFC, agent has no key */
+ kOCEKeyAlreadyRegistered = -1554, /* entity already has a key */
+ kOCEMalformedKey = -1555, /* key is of an unknown encryption method, or key doesn't match password */
+ kOCEUndesirableKey = -1556, /* password too short, key too simple, or trying to change cluster key to the same value */
+ kOCEWrongIdentityOrKey = -1557, /* In CheckIdentity, name doesn't exist or key is wrong */
+ kOCEInitiatorKeyProblem = -1558, /* either we couldn't find the initiator's key or we found it but couldn't successfully decrypt instructions or proxy */
+ kOCEBadEncryptionMethod = -1559, /* the specified encryption method is not supported */
+ kOCELocalIdentityDoesNotExist = -1560, /* LocalIdentity has to be setup */
+ kOCELocalAuthenticationFail = -1561, /* LocalIdentity Login has to be done for this operation */
+ kOCELocalIdentitySetupExists = -1562, /* LocalIdentity setup exists, use change instead of setup */
+ kOCEDirectoryIdentitySetupExists = -1563, /* DirectoryIdentity setup exists, use change instead of setup */
+ kOCEDirectoryIdentitySetupDoesNotExist = -1564, /* DirectoryIdentity setup does not exist */
+ kOCENotLocalIdentity = -1565, /* Use LocalIdentity calls instead! */
+ kOCENoMoreIDs = -1566, /* identity table is full */
+ kOCEUnknownID = -1567, /* identity passed is not valid */
+ kOCEOperationDenied = -1568, /* LocalID operation denied */
+ kOCEAmbiguousMatches = -1569, /* ambiguous matches found in resolving CIDs (more than 1 CID) */
+ kOCENoASDSPWorkSpace = -1570, /* No ASDSP workspace passed for Open Secure Stream */
+ kOCEAuthenticationTrouble = -1571 /* generic authentication problem */
+};
+
+/* AOCE Catalog Errors (-1610 to -1680) */
+enum {
+ kOCENotLocal = -1610, /* the server does not serve the requested dNode */
+ kOCETooBusy = -1611, /* server cannot complete call at this time */
+ kOCEDatabaseFull = -1612, /* disk is full */
+ kOCETargetDirectoryInaccessible = -1613, /* Catalog server not responding */
+ kOCEBogusArgs = -1614, /* Args not formatted correctly on the wire */
+ kOCENoSuchDNode = -1615, /* the requested dNode does not exist */
+ kOCEDNodeUnavailable = -1616, /* could not find any servers that serve the requested dNode */
+ kOCEBadRecordID = -1617, /* invalid RecordID (usually name and/or type don't match cid) */
+ kOCENoSuchRecord = -1618, /* the specified record does not exist */
+ kOCENoSuchAttributeValue = -1619, /* The attribute value that was passed in does not exist */
+ kOCENoSuchPseudonym = -1620, /* the specified pseudonym does not exist */
+ kOCEAttributeValueTooBig = -1621, /* self-explanatory */
+ kOCETypeExists = -1622, /* The type already exists in the record */
+ kOCEMoreData = -1623, /* only a warning - buffer not big enough */
+ kOCERefNumBad = -1624, /* RefNum is not valid */
+ kOCEStreamCreationErr = -1625, /* problem creating stream */
+ kOCEOperationNotSupported = -1626, /* the specified catalog does not support this operation */
+ kOCEPABNotOpen = -1627, /* specified Personal Catalog is not open to make the operation */
+ kOCEDSAMInstallErr = -1628, /* specified CSAM could not be installed */
+ kOCEDirListFullErr = -1629, /* catalog list is full, try removing an entry */
+ kOCEDirectoryNotFoundErr = -1630, /* catalog was not found in the list */
+ kOCEAbortNotSupportedForThisCall = -1631, /* this call cannot be aborted */
+ kOCEAborted = -1632, /* this call was aborted */
+ kOCEOCESetupRequired = -1633, /* LocalIdentity Setup is required */
+ kOCEDSAMRecordNotFound = -1634, /* CSAM Record not found */
+ kOCEDSAMNotInstantiated = -1635, /* CSAM is not instantiated */
+ kOCEDSAMRecordExists = -1636, /* CSAM record already exists */
+ kOCELengthError = -1637, /* supplied buffer was too small */
+ kOCEBadStartingRecord = -1638, /* Lookup starting record is not within range */
+ kOCEBadStartingAttribute = -1639, /* Lookup starting attribute is not within range */
+ kOCEMoreAttrValue = -1640, /* attribute value could not fit into buffer (even though it was the only value) */
+ kOCENoDupAllowed = -1641,
+ kOCENoSuchAttributeType = -1642,
+ kOCEMiscError = -1643, /* some other error */
+ kOCENoSuchIcon = -1644, /* no matching icon from GetDirectoryIcon */
+ kOCERLIsDontMatch = -1645, /* RLIs do not match in lookup */
+ kOCEDirectoryCorrupt = -1646 /* Serious disk fill corruption problem */
+};
+
+/* AOCE Standard Mail Errors (-1900 to -1949) */
+enum {
+ kSMPNotEnoughMemoryForAllRecips = -1900,
+ kSMPCopyInProgress = -1901,
+ kSMPMailerNotInitialized = -1902,
+ kSMPShouldNotAddContent = -1903,
+ kSMPMailboxNotFound = -1904,
+ kSMPNoNextLetter = -1905,
+ kSMPHasOpenAttachments = -1906,
+ kSMPFinderNotRunning = -1907,
+ kSMPCommandDisabled = -1908,
+ kSMPNoMailerInWindow = -1909,
+ kSMPNoSuchAddress = -1910,
+ kSMPMailerAlreadyInWindow = -1911,
+ kSMPMailerUneditable = -1912,
+ kSMPNoMatchingBegin = -1913,
+ kSMPCannotSendReceivedLetter = -1914,
+ kSMPIllegalForDraftLetter = -1915,
+ kSMPMailerCannotExpandOrContract = -1916,
+ kSMPMailerAlreadyExpandedOrContracted = -1917,
+ kSMPIllegalComponent = -1918,
+ kSMPMailerAlreadyNotTarget = -1919,
+ kSMPComponentIsAlreadyTarget = -1920,
+ kSMPRecordDoesNotContainAddress = -1921,
+ kSMPAddressAlreadyInList = -1922,
+ kSMPIllegalSendFormats = -1923,
+ kSMPInvalidAddressString = -1924,
+ kSMPSubjectTooBig = -1925,
+ kSMPParamCountErr = -1926, /* enclosure count != 1, while sendEnclosure Only == true. */
+ kSMPTooManyPages = -1927, /* Exceeding the image page limit. */
+ kSMPTooManyEnclosures = -1928
+};
+
+/* AOCE Standard Catalog Errors (-1950 to -1969) */
+enum {
+ kSDPNoSearchText = -1950,
+ kSDPTooManyLoginAttempts = -1951,
+ kSDPNoSelection = -1952,
+ kSDPPersonalDirectoryRepairFailed = -1953
+};
+
+/* AOCE Digital Signature Errors (-1970 to -1999) */
+enum {
+ kSIGOperationIncompatibleErr = -1970, /* context in use for different type of operation */
+ kSIGCertificateQueryDenied = -1971, /* can't query certificates with this context */
+ kSIGVerifyFailedErr = -1972, /* verification failed */
+ kSIGInvalidCredentialErr = -1973, /* verified OK but credential out of date, either pending or expired */
+ kSIGIndexErr = -1974, /* the index given is outside the range of allowable values */
+ kSIGSignerErr = -1975, /* problem with the signer or signature itself */
+ kSIGPasswordErr = -1976, /* password is incorrect */
+ kSIGInternalsErr = -1977, /* an internal error occurred like a bad digest, context or signature */
+ kSIGToolboxNotPresentErr = -1978, /* for client services (ie servers) to report back - not retruned by the TB */
+ kSIGContextPrepareErr = -1979, /* context either prepared with VerifyPrepare, SignPrepare or DigestPrepare already or has been corrupted */
+ kSIGNoDigestErr = -1980, /* no digest in the signature */
+ kSIGConversionErr = -1981, /* unabled to convert an attribute to Mac format */
+ kSIGSignerNotValidErr = -1982, /* Signer has either expired or is pending and can not sign */
+ kSIGNoSignature = -1983 /* standard file signature not found */
+};
+
+/* AOCE Templates Errors (-15000 to -15039) */
+enum {
+ kDETInvalidTargetAspectName = -15000, /* Could not locate an aspect by name */
+ kDETInvalidTargetItemNumber = -15001, /* Item number is target invalid (out of range 1..<number of children>) */
+ kDETInvalidTargetFromNonAspect = -15002, /* Target selection relative to non-aspect object which requires an aspect */
+ kDETInvalidTargetDSSpec = -15003, /* Target DSSpec could not be resolved */
+ kDETUnknownTargetSelector = -15004, /* Unknown selector type for target specification */
+ kDETInvalidTarget = -15005, /* Target specification was invalid (for reasons other than those above) */
+ kDETTargetNotAnAspect = -15006, /* Specified target object was not an aspect */
+ kDETInvalidCommandItemNumber = -15007, /* Command item number invalid (out of range 1..<number of items in selection>) */
+ kDETUnableToGetCommandItemSpec = -15008, /* Unable to retrieve item specification (internal error, possibly out of memory) */
+ kDETRequestedTypeUnavailable = -15009, /* Command item could not be represented in the form requested */
+ kDETInvalidDSSpec = -15010, /* Could not resolve DSSpec (other than in target; see error above for targets) */
+ kDETUnableToAccessProperty = -15011, /* Property could not be found and/or created */
+ kDETInfoPageNotOpen = -15012, /* Info-page not open; request requires an open info-page */
+ kDETNoSuchView = -15013, /* No view found with specified property number */
+ kDETCouldNotAddMenuItem = -15014, /* Could not add item to dynamic menu */
+ kDETCouldNotRemoveMenuItem = -15015, /* Could not remove item from dynamic menu */
+ kDETCouldNotFindMenuItem = -15016, /* Could not find menu item */
+ kDETCouldNotFindCustomView = -15017, /* Could not find custom view in info-page */
+ kDETInvalidReqFunction = -15018, /* Invalid call-back request function */
+ kDETInvalidCallBack = -15019, /* Invalid call-back (for reasons other than those above) */
+ kDETPropertyBusy = -15020 /* Edit is open on the property being set */
+};
+
+/* AOCE Mail Errors (-15040 to -15089) */
+enum {
+ kMailInvalidOrder = -15040, /* This object has already been written to and cannot be written again */
+ /* handle non-zero offsets for now */
+ kMailInvalidSeqNum = -15041, /* Invalid letter sequence o refers to an non-existent letter */
+ kMailAttrNotInHdr = -15042, /* attribute does not exist in this letter header */
+ kMailHdrAttrMissing = -15043, /* required attribute not written into letter header */
+ kMailBadEnclLengthErr = -15044, /* incorrect number of bytes has been written after memForm of PutEnclosure */
+ kMailInvalidRequest = -15045, /* cannot putAttr for report, putRcptReport for letter */
+ kMailInvalidPostItVersion = -15046, /* cannot create new postit with this version */
+ kMailNotASlotInQ = -15047, /* queueID does not refer to a slot's incoming queue */
+ kMailLtrNotOpen = -15048, /* letter is not open, probably not cached in inQ */
+ kMailMissingMailCat = -15049, /* trying to create message in inq, with no postIt */
+ kMailCannotWriteMailCat = -15050, /* cannot update a mail catentry */
+ kMailTooManyTagsPerLetter = -15051, /* cannot add more than kMaxTagsPerLetter tags */
+ kMailGwyDead = -15052, /* MSAM died */
+ kMailIgnoredErr = -15053, /* ePPC message was ignored */
+ kMailLengthErr = -15054, /* ePPC message did not complete */
+ kMailTooManyErr = -15055, /* Too many = request outstanding, */
+ kMailNoMSAMErr = -15056, /* no MSAMs found in mailbox! or for command */
+ kMailCancelled = -15057,
+ kMailSlotSuspended = -15058,
+ kMailMSAMSuspended = -15059,
+ kMailBadSlotInfo = -15060,
+ kMailMalformedContent = -15061, /* a mailed structure is malformed */
+ kMailNoSuchSlot = -15062, /* no such slot */
+ kMailBadLtrInfo = -15063, /* bad info there, can't change */
+ kMailSetFailed = -15064, /* could not set letter info */
+ kMailBadConfig = -15065, /* MSAM has bad config info */
+ kMailBadMSAM = -15066, /* bad MSAM: not usable = reason unspec, */
+ kMailCannotLkupServerSlots = -15067, /* cannot lookup adas for server mail slots */
+ kMailBadState = -15068 /* the state specifiy is not in any of defined */
+};
+
+/* AOCE Messaging Errors (-15090 to -15169) */
+enum {
+ kIPMCantCreateIPMCatEntry = -15090,
+ kIPMInvalidMsgType = -15091, /* bad msg hint */
+ kIPMInvalidProcHint = -15092, /* bad proc hint */
+ kIPMInvalidOffset = -15093, /* bad offset for read/write */
+ kIPMUpdateCatFailed = -15094,
+ kIPMMsgTypeReserved = -15095,
+ kIPMNotInABlock = -15096,
+ kIPMNestedMsgOpened = -15097,
+ kIPMA1HdrCorrupt = -15098,
+ kIPMCorruptDataStructures = -15099,
+ kIPMAbortOfNestedMsg = -15100,
+ kIPMBlockIsNotNestedMsg = -15101,
+ kIPMCacheFillError = -15102,
+ kIPMInvalidSender = -15103,
+ kIPMNoRecipientsYet = -15104,
+ kIPMInvalidFilter = -15105,
+ kIPMAttrNotInHdr = -15106,
+ kIPMBlkNotFound = -15107,
+ kIPMStreamErr = -15108, /* Error on stream (should this ever go out?) */
+ kIPMPortClosed = -15109, /* Port closed (should this ever go out?) */
+ kIPMBinBusy = -15110,
+ kIPMCorruptedBin = -15111,
+ kIPMBadQName = -15112,
+ kIPMEndOfBin = -15113,
+ kIPMBinNeedsConversion = -15114,
+ kIPMMgrInternalErr = -15115,
+ kIPMEltBusy = -15116,
+ kIPMEltClosedNotDeleted = -15117,
+ kIPMBadContext = -15118,
+ kIPMContextIsClosing = -15119,
+ kIPMeoQ = -15120,
+ kIPMQOutOfSpace = -15121,
+ kIPMEltNotFound = -15122,
+ kIPMBinOutOfSpace = -15123,
+ kIPMeoCatEntry = -15124,
+ kIPMeoElt = -15125,
+ kIPMQBusy = -15126,
+ kIPMNotSameBin = -15127,
+ kIPMNoMoreServices = -15128,
+ kIPMLookupAttrTooBig = -15129, /* attribute in lookup is too big */
+ kIPMUnknownUAM = -15130,
+ kIPMUnsupportedLogin = -15131,
+ kIPMLogInUnknown = -15132,
+ kIPMNoMoreFilters = -15133,
+ kIPMCouldNotReadInfoReply = -15134,
+ kIPMInvalidUser = -15135,
+ kIPMNoMoreSessions = -15136,
+ kIPMNilUserProc = -15137,
+ kIPMBadCatSize = -15138,
+ kIPMIncompleteMsg = -15139,
+ kIPMNoResponsibleTunnel = -15140,
+ kIPMAccessDenied = -15141,
+ kIPMReplyParamUnderrun = -15142, /* Too few reply parameters */
+ kIPMReplyParamOverrun = -15143, /* Too many reply parameters */
+ kIPMRequestParamUnderrun = -15144, /* Too few request parameters */
+ kIPMOutOfSync = -15145, /* Protocol sync. error */
+ kIPMNoAttrsFound = -15146, /* couldn't find any attrs in lookup */
+ kIPMWrongAttrTag = -15147, /* wrong attr tag in adas lookup */
+ kIPMNullCID = -15148, /* null cid in enumerate */
+ kIPMBadMailSlotAttrVal = -15149 /* invalid mailslot attr value */
+};
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __OCEERRORS__ */
+
diff --git a/include/qt/OCEMail.h b/include/qt/OCEMail.h
new file mode 100644
index 000000000..0be59ff42
--- /dev/null
+++ b/include/qt/OCEMail.h
@@ -0,0 +1,1589 @@
+/*
+ File: OCEMail.h
+
+ Contains: Apple Open Collaboration Environment OCEMail Interfaces.
+
+ Version: Technology: AOCE Toolbox 1.02
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __OCEMAIL__
+#define __OCEMAIL__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+#ifndef __TEXTEDIT__
+#include "TextEdit.h"
+#endif
+
+
+#ifndef __DIGITALSIGNATURE__
+#include "DigitalSignature.h"
+#endif
+
+#ifndef __OCE__
+#include "OCE.h"
+#endif
+
+#ifndef __OCEAUTHDIR__
+#include "OCEAuthDir.h"
+#endif
+
+#ifndef __OCEMESSAGING__
+#include "OCEMessaging.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/**************************************************************************************/
+/* Common Definitions */
+/**************************************************************************************/
+
+/* reference to a new or open letter or message */
+typedef long MailMsgRef;
+/* reference to an open msam queue */
+typedef long MSAMQueueRef;
+/* identifies slots managed by a PMSAM */
+typedef unsigned short MSAMSlotID;
+/* reference to an active mailbox */
+typedef long MailboxRef;
+/* identifies slots within a mailbox */
+typedef unsigned short MailSlotID;
+/* identifies a letter in a mailbox */
+
+struct MailSeqNum {
+ MailSlotID slotID;
+ long seqNum;
+};
+typedef struct MailSeqNum MailSeqNum;
+/* A MailBuffer is used to describe a buffer used for an IO operation.
+The location of the buffer is pointed to by 'buffer'.
+When reading, the size of the buffer is 'bufferSize'
+and the size of data actually read is 'dataSize'.
+When writing, the size of data to be written is 'bufferSize'
+and the size of data actually written is 'dataSize'.
+*/
+
+struct MailBuffer {
+ long bufferSize;
+ void * buffer;
+ long dataSize;
+};
+typedef struct MailBuffer MailBuffer;
+/* A MailReply is used to describe a commonly used reply buffer format.
+It contains a count of tuples followed by an array of tuples.
+The format of the tuple itself depends on each particular call.
+*/
+
+struct MailReply {
+ unsigned short tupleCount;
+ /* tuple[tupleCount] */
+};
+typedef struct MailReply MailReply;
+/* Shared Memory Communication Area used when Mail Manager sends
+High Level Events to a PMSAM.
+*/
+
+struct SMCA {
+ unsigned short smcaLength; /* includes size of smcaLength field */
+ OSErr result;
+ long userBytes;
+ union {
+ CreationID slotCID; /* for create/modify/delete slot calls */
+ long msgHint; /* for kMailEPPCMsgOpened */
+ } u;
+};
+typedef struct SMCA SMCA;
+/**************************************************************************************/
+/* Value of creator and types fields for messages and blocks defined by MailManager */
+enum {
+ kMailAppleMailCreator = FOUR_CHAR_CODE('apml'), /* message and letter block creator */
+ kMailLtrMsgType = FOUR_CHAR_CODE('lttr'), /* message type of letters, reports */
+ kMailLtrHdrType = FOUR_CHAR_CODE('lthd'), /* contains letter header */
+ kMailContentType = FOUR_CHAR_CODE('body'), /* contains content of letter */
+ kMailEnclosureListType = FOUR_CHAR_CODE('elst'), /* contains list of enclosures */
+ kMailEnclosureDesktopType = FOUR_CHAR_CODE('edsk'), /* contains desktop mgr info for enclosures */
+ kMailEnclosureFileType = FOUR_CHAR_CODE('asgl'), /* contains a file enclosure, format is defined by AppleSingle */
+ kMailImageBodyType = FOUR_CHAR_CODE('imag'), /* contains image of letter */
+ kMailMSAMType = FOUR_CHAR_CODE('gwyi'), /* contains msam specific information */
+ kMailTunnelLtrType = FOUR_CHAR_CODE('tunl'), /* used to read a tunnelled message */
+ kMailHopInfoType = FOUR_CHAR_CODE('hopi'), /* used to read hopInfo for a tunnelled message */
+ kMailReportType = FOUR_CHAR_CODE('rpti'), /* contains report info */
+ kMailFamily = FOUR_CHAR_CODE('mail'), /* Defines family of "mail" msgs: content, header, etc */
+ kMailFamilyFile = FOUR_CHAR_CODE('file') /* Defines family of "direct display" msgs */
+};
+
+/*
+kMailImageBodyType:
+ format is struct TPfPgDir - in Printing.h
+ * struct TPfPgDir {
+ * short pageCount; - number of pages in the image.
+ * long iPgPos[129]; - iPgPos[n] is the offset from the start of the block
+ * - to image of page n.
+ * - iPgPos[n+1] - iPgPos[n] is the length of page n.
+
+kMailReportType:
+Reports have the isReport bit set in MailIndications and contain a block of type kMailReport.
+This block has a header, IPMReportBlockHeader,
+followed by an array of elements, each of type IPMRecipientReport
+
+Various families used by mail or related msgs
+*/
+
+
+/**************************************************************************************/
+
+typedef unsigned short MailAttributeID;
+/* Values of MailAttributeID */
+/* Message store attributes - stored in the catalog */
+/* Will always be present in a letter and have fixed sizes */
+enum {
+ kMailLetterFlagsBit = 1, /* MailLetterFlags */
+ /* Letter attributes - stored in the letter will always be present in a letter and have fixed sizes */
+ kMailIndicationsBit = 3, /* MailIndications */
+ kMailMsgTypeBit = 4, /* OCECreatorType */
+ kMailLetterIDBit = 5, /* MailLetterID */
+ kMailSendTimeStampBit = 6, /* MailTime */
+ kMailNestingLevelBit = 7, /* MailNestingLevel */
+ kMailMsgFamilyBit = 8, /* OSType */
+ /* Letter attributes - stored in the letter may be present in a letter and have fixed sizes */
+ kMailReplyIDBit = 9, /* MailLetterID */
+ kMailConversationIDBit = 10, /* MailLetterID */
+ /* Letter attributes - stored in the letter may be present in a letter and have variable length sizes */
+ kMailSubjectBit = 11, /* RString */
+ kMailFromBit = 12, /* MailRecipient */
+ kMailToBit = 13, /* MailRecipient */
+ kMailCcBit = 14, /* MailRecipient */
+ kMailBccBit = 15 /* MailRecipient */
+};
+
+typedef unsigned long MailAttributeMask;
+/* Values of MailAttributeMask */
+enum {
+ kMailLetterFlagsMask = 1L << (kMailLetterFlagsBit - 1),
+ kMailIndicationsMask = 1L << (kMailIndicationsBit - 1),
+ kMailMsgTypeMask = 1L << (kMailMsgTypeBit - 1),
+ kMailLetterIDMask = 1L << (kMailLetterIDBit - 1),
+ kMailSendTimeStampMask = 1L << (kMailSendTimeStampBit - 1),
+ kMailNestingLevelMask = 1L << (kMailNestingLevelBit - 1),
+ kMailMsgFamilyMask = 1L << (kMailMsgFamilyBit - 1),
+ kMailReplyIDMask = 1L << (kMailReplyIDBit - 1),
+ kMailConversationIDMask = 1L << (kMailConversationIDBit - 1),
+ kMailSubjectMask = 1L << (kMailSubjectBit - 1),
+ kMailFromMask = 1L << (kMailFromBit - 1),
+ kMailToMask = 1L << (kMailToBit - 1),
+ kMailCcMask = 1L << (kMailCcBit - 1),
+ kMailBccMask = 1L << (kMailBccBit - 1)
+};
+
+typedef unsigned long MailAttributeBitmap;
+/**************************************************************************************/
+typedef unsigned short MailLetterSystemFlags;
+/* Values of MailLetterSystemFlags */
+/* letter is available locally (either by nature or via cache) */
+enum {
+ kMailIsLocalBit = 2
+};
+
+enum {
+ kMailIsLocalMask = 1L << kMailIsLocalBit
+};
+
+typedef unsigned short MailLetterUserFlags;
+enum {
+ kMailReadBit = 0, /* this letter has been opened */
+ kMailDontArchiveBit = 1, /* this letter is not to be archived either because it has already been archived or it should not be archived. */
+ kMailInTrashBit = 2 /* this letter is in trash */
+};
+
+/* Values of MailLetterUserFlags */
+enum {
+ kMailReadMask = 1L << kMailReadBit,
+ kMailDontArchiveMask = 1L << kMailDontArchiveBit,
+ kMailInTrashMask = 1L << kMailInTrashBit
+};
+
+
+struct MailLetterFlags {
+ MailLetterSystemFlags sysFlags;
+ MailLetterUserFlags userFlags;
+};
+typedef struct MailLetterFlags MailLetterFlags;
+
+struct MailMaskedLetterFlags {
+ MailLetterFlags flagMask; /* flags that are to be set */
+ MailLetterFlags flagValues; /* and their values */
+};
+typedef struct MailMaskedLetterFlags MailMaskedLetterFlags;
+enum {
+ kMailOriginalInReportBit = 1,
+ kMailNonReceiptReportsBit = 3,
+ kMailReceiptReportsBit = 4,
+ kMailForwardedBit = 5,
+ kMailPriorityBit = 6,
+ kMailIsReportWithOriginalBit = 8,
+ kMailIsReportBit = 9,
+ kMailHasContentBit = 10,
+ kMailHasSignatureBit = 11,
+ kMailAuthenticatedBit = 12,
+ kMailSentBit = 13,
+ kMailNativeContentBit = 14,
+ kMailImageContentBit = 15,
+ kMailStandardContentBit = 16
+};
+
+/* Values of MailIndications */
+enum {
+ kMailStandardContentMask = 1L << (kMailStandardContentBit - 1),
+ kMailImageContentMask = 1L << (kMailImageContentBit - 1),
+ kMailNativeContentMask = 1L << (kMailNativeContentBit - 1),
+ kMailSentMask = 1L << (kMailSentBit - 1),
+ kMailAuthenticatedMask = 1L << (kMailAuthenticatedBit - 1),
+ kMailHasSignatureMask = 1L << (kMailHasSignatureBit - 1),
+ kMailHasContentMask = 1L << (kMailHasContentBit - 1),
+ kMailIsReportMask = 1L << (kMailIsReportBit - 1),
+ kMailIsReportWithOriginalMask = 1L << (kMailIsReportWithOriginalBit - 1),
+ kMailPriorityMask = 3L << (kMailPriorityBit - 1),
+ kMailForwardedMask = 1L << (kMailForwardedBit - 1),
+ kMailReceiptReportsMask = 1L << (kMailReceiptReportsBit - 1),
+ kMailNonReceiptReportsMask = 1L << (kMailNonReceiptReportsBit - 1),
+ kMailOriginalInReportMask = 3L << (kMailOriginalInReportBit - 1)
+};
+
+
+typedef unsigned long MailIndications;
+/* values of the field originalInReport in MailIndications */
+enum {
+ kMailNoOriginal = 0, /* do not enclose original in reports */
+ kMailEncloseOnNonReceipt = 3 /* enclose original in non-delivery reports */
+};
+
+typedef IPMMsgID MailLetterID;
+
+struct MailTime {
+ UTCTime time; /* current UTC(GMT) time */
+ UTCOffset offset; /* offset from GMT */
+};
+typedef struct MailTime MailTime;
+/* innermost letter has nestingLevel 0 */
+
+typedef unsigned short MailNestingLevel;
+typedef OCERecipient MailRecipient;
+/**************************************************************************************/
+enum {
+ kMailTextSegmentBit = 0,
+ kMailPictSegmentBit = 1,
+ kMailSoundSegmentBit = 2,
+ kMailStyledTextSegmentBit = 3,
+ kMailMovieSegmentBit = 4
+};
+
+typedef unsigned short MailSegmentMask;
+/* Values of MailSegmentMask */
+enum {
+ kMailTextSegmentMask = 1L << kMailTextSegmentBit,
+ kMailPictSegmentMask = 1L << kMailPictSegmentBit,
+ kMailSoundSegmentMask = 1L << kMailSoundSegmentBit,
+ kMailStyledTextSegmentMask = 1L << kMailStyledTextSegmentBit,
+ kMailMovieSegmentMask = 1L << kMailMovieSegmentBit
+};
+
+typedef unsigned short MailSegmentType;
+/* Values of MailSegmentType */
+enum {
+ kMailInvalidSegmentType = 0,
+ kMailTextSegmentType = 1,
+ kMailPictSegmentType = 2,
+ kMailSoundSegmentType = 3,
+ kMailStyledTextSegmentType = 4,
+ kMailMovieSegmentType = 5
+};
+
+/**************************************************************************************/
+enum {
+ kMailErrorLogEntryVersion = 0x0101,
+ kMailMSAMErrorStringListID = 128, /* These 'STR#' resources should be */
+ kMailMSAMActionStringListID = 129 /* in the PMSAM resource fork */
+};
+
+typedef unsigned short MailLogErrorType;
+/* Values of MailLogErrorType */
+enum {
+ kMailELECorrectable = 0,
+ kMailELEError = 1,
+ kMailELEWarning = 2,
+ kMailELEInformational = 3
+};
+
+typedef short MailLogErrorCode;
+/* Values of MailLogErrorCode */
+enum {
+ kMailMSAMErrorCode = 0, /* positive codes are indices into PMSAM defined strings */
+ kMailMiscError = -1, /* negative codes are OCE defined */
+ kMailNoModem = -2 /* modem required, but missing */
+};
+
+
+struct MailErrorLogEntryInfo {
+ short version;
+ UTCTime timeOccurred; /* do not fill in */
+ Str31 reportingPMSAM; /* do not fill in */
+ Str31 reportingMSAMSlot; /* do not fill in */
+ MailLogErrorType errorType;
+ MailLogErrorCode errorCode;
+
+ short errorResource; /* resources are valid if */
+ short actionResource; /* errorCode = kMailMSAMErrorCode index starts from 1 */
+ unsigned long filler;
+ unsigned short filler2;
+};
+typedef struct MailErrorLogEntryInfo MailErrorLogEntryInfo;
+/**************************************************************************************/
+
+typedef short MailBlockMode;
+/* Values of MailBlockMode */
+enum {
+ kMailFromStart = 1, /* write data from offset calculated from */
+ kMailFromLEOB = 2, /* start of block, end of block, */
+ kMailFromMark = 3 /* or from the current mark */
+};
+
+
+struct MailEnclosureInfo {
+ StringPtr enclosureName;
+ CInfoPBPtr catInfo;
+ StringPtr comment;
+ void * icon;
+};
+typedef struct MailEnclosureInfo MailEnclosureInfo;
+/**************************************************************************************/
+enum {
+ kOCESetupLocationNone = 0, /* disconnect state */
+ kOCESetupLocationMax = 8 /* maximum location value */
+};
+
+
+typedef char OCESetupLocation;
+/* location state is a bitmask, 0x1=>1st location active,
+ * 0x2 => 2nd, 0x4 => 3rd, etc.
+ */
+#define MailLocationMask(locationNumber) (1<<((locationNumber)-1))
+typedef UInt8 MailLocationFlags;
+
+struct MailLocationInfo {
+ OCESetupLocation location;
+ MailLocationFlags active;
+};
+typedef struct MailLocationInfo MailLocationInfo;
+/**************************************************************************************/
+/* Definitions for Personal MSAMs */
+/**************************************************************************************/
+enum {
+ kMailEPPCMsgVersion = 3
+};
+
+
+struct MailEPPCMsg {
+ short version;
+ union {
+ SMCA * theSMCA; /* for 'crsl', 'mdsl', 'dlsl', 'sndi', 'msgo', 'admn' */
+ long sequenceNumber; /* for 'inqu', 'dlom' */
+ MailLocationInfo locationInfo; /* for 'locc' */
+ } u;
+};
+typedef struct MailEPPCMsg MailEPPCMsg;
+/* Values of OCE defined High Level Event message classes */
+enum {
+ kMailEPPCCreateSlot = FOUR_CHAR_CODE('crsl'),
+ kMailEPPCModifySlot = FOUR_CHAR_CODE('mdsl'),
+ kMailEPPCDeleteSlot = FOUR_CHAR_CODE('dlsl'),
+ kMailEPPCShutDown = FOUR_CHAR_CODE('quit'),
+ kMailEPPCMailboxOpened = FOUR_CHAR_CODE('mbop'),
+ kMailEPPCMailboxClosed = FOUR_CHAR_CODE('mbcl'),
+ kMailEPPCMsgPending = FOUR_CHAR_CODE('msgp'),
+ kMailEPPCSendImmediate = FOUR_CHAR_CODE('sndi'),
+ kMailEPPCContinue = FOUR_CHAR_CODE('cont'),
+ kMailEPPCSchedule = FOUR_CHAR_CODE('sked'),
+ kMailEPPCAdmin = FOUR_CHAR_CODE('admn'),
+ kMailEPPCInQUpdate = FOUR_CHAR_CODE('inqu'),
+ kMailEPPCMsgOpened = FOUR_CHAR_CODE('msgo'),
+ kMailEPPCDeleteOutQMsg = FOUR_CHAR_CODE('dlom'),
+ kMailEPPCWakeup = FOUR_CHAR_CODE('wkup'),
+ kMailEPPCLocationChanged = FOUR_CHAR_CODE('locc')
+};
+
+
+union MailTimer {
+ long frequency; /* how often to connect */
+ long connectTime; /* time since midnight */
+};
+typedef union MailTimer MailTimer;
+enum {
+ kMailTimerOff = 0, /* control is off */
+ kMailTimerTime = 1, /* specifies connect time (relative to midnight) */
+ kMailTimerFrequency = 2 /* specifies connect frequency */
+};
+
+typedef Byte MailTimerKind;
+
+struct MailTimers {
+ MailTimerKind sendTimeKind; /* either kMailTimerTime or kMailTimerFrequency */
+ MailTimerKind receiveTimeKind; /* either kMailTimerTime or kMailTimerFrequency */
+ MailTimer send;
+ MailTimer receive;
+};
+typedef struct MailTimers MailTimers;
+
+
+struct MailStandardSlotInfoAttribute {
+ short version;
+ MailLocationFlags active; /* active if MailLocationMask(i) is set */
+ Byte padByte;
+ MailTimers sendReceiveTimer;
+};
+typedef struct MailStandardSlotInfoAttribute MailStandardSlotInfoAttribute;
+typedef union MSAMParam TempMSAMParam;
+typedef CALLBACK_API( void , MSAMIOCompletionProcPtr )(TempMSAMParam *paramBlock);
+/*
+ WARNING: MSAMIOCompletionProcPtr uses register based parameters under classic 68k
+ and cannot be written in a high-level language without
+ the help of mixed mode or assembly glue.
+*/
+typedef REGISTER_UPP_TYPE(MSAMIOCompletionProcPtr) MSAMIOCompletionUPP;
+
+struct PMSAMGetMSAMRecordPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ CreationID msamCID;
+};
+typedef struct PMSAMGetMSAMRecordPB PMSAMGetMSAMRecordPB;
+
+struct PMSAMOpenQueuesPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MSAMQueueRef inQueueRef;
+ MSAMQueueRef outQueueRef;
+ MSAMSlotID msamSlotID;
+ long filler[2];
+};
+typedef struct PMSAMOpenQueuesPB PMSAMOpenQueuesPB;
+
+typedef unsigned short PMSAMStatus;
+/* Values of PMSAMStatus */
+enum {
+ kPMSAMStatusPending = 1, /* for inQueue and outQueue */
+ kPMSAMStatusError = 2, /* for inQueue and outQueue */
+ kPMSAMStatusSending = 3, /* for outQueue only */
+ kPMSAMStatusCaching = 4, /* for inQueue only */
+ kPMSAMStatusSent = 5 /* for outQueue only */
+};
+
+
+struct PMSAMSetStatusPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MSAMQueueRef queueRef;
+ long seqNum;
+ long msgHint; /* for posting cache error,set this to 0 when report outq status */
+ PMSAMStatus status;
+};
+typedef struct PMSAMSetStatusPB PMSAMSetStatusPB;
+
+struct PMSAMLogErrorPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MSAMSlotID msamSlotID; /* 0 for PMSAM errors */
+ MailErrorLogEntryInfo * logEntry;
+ long filler[2];
+};
+typedef struct PMSAMLogErrorPB PMSAMLogErrorPB;
+/****************************************************************************************/
+enum {
+ kMailMsgSummaryVersion = 1
+};
+
+
+struct MailMasterData {
+ MailAttributeBitmap attrMask; /* indicates attributes present in MsgSummary */
+ MailLetterID messageID;
+ MailLetterID replyID;
+ MailLetterID conversationID;
+};
+typedef struct MailMasterData MailMasterData;
+/* Values for addressedToMe in struct MailCoreData */
+enum {
+ kAddressedAs_TO = 0x01,
+ kAddressedAs_CC = 0x02,
+ kAddressedAs_BCC = 0x04
+};
+
+
+struct MailCoreData {
+ MailLetterFlags letterFlags;
+ unsigned long messageSize;
+ MailIndications letterIndications;
+ OCECreatorType messageType;
+ MailTime sendTime;
+ OSType messageFamily;
+ unsigned char reserved;
+ unsigned char addressedToMe;
+ char agentInfo[6]; /* 6 bytes of special info [set to zero] */
+ /* these are variable length and even padded */
+ RString32 sender; /* recipient's entityName (trunc)*/
+ RString32 subject; /* subject maybe truncated */
+};
+typedef struct MailCoreData MailCoreData;
+
+struct MSAMMsgSummary {
+ short version; /* following flags are defaulted by Toolbox */
+ Boolean msgDeleted; /* true if msg is to be deleted by PMSAM */
+ Boolean msgUpdated; /* true if msgSummary was updated by MailManager */
+ Boolean msgCached; /* true if msg is in the slot's InQueue */
+ Byte padByte;
+
+ MailMasterData masterData;
+ MailCoreData coreData;
+};
+typedef struct MSAMMsgSummary MSAMMsgSummary;
+/* PMSAM can put up to 128 bytes of private msg summary data */
+enum {
+ kMailMaxPMSAMMsgSummaryData = 128
+};
+
+
+struct PMSAMCreateMsgSummaryPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MSAMQueueRef inQueueRef;
+ long seqNum; /* <- seq of the new message */
+ MSAMMsgSummary * msgSummary; /* attributes and mask filled in */
+ MailBuffer * buffer; /* PMSAM specific data to be appended */
+};
+typedef struct PMSAMCreateMsgSummaryPB PMSAMCreateMsgSummaryPB;
+
+
+struct PMSAMPutMsgSummaryPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MSAMQueueRef inQueueRef;
+ long seqNum;
+ MailMaskedLetterFlags * letterFlags; /* if not nil, then set msgStoreFlags */
+ MailBuffer * buffer; /* PMSAM specific data to be overwritten */
+};
+typedef struct PMSAMPutMsgSummaryPB PMSAMPutMsgSummaryPB;
+
+struct PMSAMGetMsgSummaryPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MSAMQueueRef inQueueRef;
+ long seqNum;
+ MSAMMsgSummary * msgSummary; /* if not nil, then read in the msgSummary */
+ MailBuffer * buffer; /* PMSAM specific data to be read */
+ unsigned short msgSummaryOffset; /* offset of PMSAM specific data from start of MsgSummary */
+};
+typedef struct PMSAMGetMsgSummaryPB PMSAMGetMsgSummaryPB;
+/****************************************************************************************/
+/* Definitions for Server MSAMs */
+/**************************************************************************************/
+
+typedef unsigned short SMSAMAdminCode;
+/* Values of SMSAMAdminCode */
+enum {
+ kSMSAMNotifyFwdrSetupChange = 1,
+ kSMSAMNotifyFwdrNameChange = 2,
+ kSMSAMNotifyFwdrPwdChange = 3,
+ kSMSAMGetDynamicFwdrParams = 4
+};
+
+typedef unsigned long SMSAMSlotChanges;
+enum {
+ kSMSAMFwdrHomeInternetChangedBit = 0,
+ kSMSAMFwdrConnectedToChangedBit = 1,
+ kSMSAMFwdrForeignRLIsChangedBit = 2,
+ kSMSAMFwdrMnMServerChangedBit = 3
+};
+
+/* Values of SMSAMSlotChanges */
+enum {
+ kSMSAMFwdrEverythingChangedMask = -1,
+ kSMSAMFwdrHomeInternetChangedMask = 1L << kSMSAMFwdrHomeInternetChangedBit,
+ kSMSAMFwdrConnectedToChangedMask = 1L << kSMSAMFwdrConnectedToChangedBit,
+ kSMSAMFwdrForeignRLIsChangedMask = 1L << kSMSAMFwdrForeignRLIsChangedBit,
+ kSMSAMFwdrMnMServerChangedMask = 1L << kSMSAMFwdrMnMServerChangedBit
+};
+
+/* kSMSAMNotifyFwdrSetupChange */
+
+struct SMSAMSetupChange {
+ SMSAMSlotChanges whatChanged; /* --> bitmap of what parameters changed */
+ AddrBlock serverHint; /* --> try this ADAP server first */
+};
+typedef struct SMSAMSetupChange SMSAMSetupChange;
+/* kSMSAMNotifyFwdrNameChange */
+
+struct SMSAMNameChange {
+ RString newName; /* --> msams new name */
+ AddrBlock serverHint; /* --> try this ADAP server first */
+};
+typedef struct SMSAMNameChange SMSAMNameChange;
+/* kSMSAMNotifyFwdrPasswordChange */
+
+struct SMSAMPasswordChange {
+ RString newPassword; /* --> msams new password */
+ AddrBlock serverHint; /* --> try this ADAP server first */
+};
+typedef struct SMSAMPasswordChange SMSAMPasswordChange;
+/* kSMSAMGetDynamicFwdrParams */
+
+struct SMSAMDynamicParams {
+ unsigned long curDiskUsed; /* <-- amount of disk space used by msam */
+ unsigned long curMemoryUsed; /* <-- amount of memory used by msam */
+};
+typedef struct SMSAMDynamicParams SMSAMDynamicParams;
+
+struct SMSAMAdminEPPCRequest {
+ SMSAMAdminCode adminCode;
+ union {
+ SMSAMSetupChange setupChange;
+ SMSAMNameChange nameChange;
+ SMSAMPasswordChange passwordChange;
+ SMSAMDynamicParams dynamicParams;
+ } u;
+};
+typedef struct SMSAMAdminEPPCRequest SMSAMAdminEPPCRequest;
+
+struct SMSAMSetupPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ RecordIDPtr serverMSAM;
+ RStringPtr password;
+ OSType gatewayType;
+ RStringPtr gatewayTypeDescription;
+ AddrBlock catalogServerHint;
+};
+typedef struct SMSAMSetupPB SMSAMSetupPB;
+
+struct SMSAMStartupPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ AuthIdentity msamIdentity;
+ MSAMQueueRef queueRef;
+};
+typedef struct SMSAMStartupPB SMSAMStartupPB;
+
+struct SMSAMShutdownPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MSAMQueueRef queueRef;
+};
+typedef struct SMSAMShutdownPB SMSAMShutdownPB;
+/****************************************************************************************/
+/* Definitions for reading and writing MSAM Letters */
+/****************************************************************************************/
+
+struct MSAMEnumeratePB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MSAMQueueRef queueRef;
+ long startSeqNum;
+ long nextSeqNum;
+ /* buffer contains a Mail Reply. Each tuple is a MSAMEnumerateInQReply when enumerating the inQueue MSAMEnumerateOutQReply when enumerating the outQueue */
+ MailBuffer buffer;
+};
+typedef struct MSAMEnumeratePB MSAMEnumeratePB;
+
+struct MSAMEnumerateInQReply {
+ long seqNum;
+ Boolean msgDeleted; /* true if msg is to be deleted by PMSAM */
+ Boolean msgUpdated; /* true if MsgSummary has been updated by TB */
+ Boolean msgCached; /* true if msg is in the incoming queue */
+ Byte padByte;
+};
+typedef struct MSAMEnumerateInQReply MSAMEnumerateInQReply;
+
+struct MSAMEnumerateOutQReply {
+ long seqNum;
+ Boolean done; /* true if all responsible recipients have been processed */
+ IPMPriority priority;
+ OSType msgFamily;
+ long approxSize;
+ Boolean tunnelForm; /* true if this letter has to be tunnelled */
+ Byte padByte;
+ NetworkSpec nextHop; /* valid if tunnelForm is true */
+ OCECreatorType msgType;
+};
+typedef struct MSAMEnumerateOutQReply MSAMEnumerateOutQReply;
+
+struct MSAMDeletePB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MSAMQueueRef queueRef;
+ long seqNum;
+ Boolean msgOnly; /* only valid for PMSAM & inQueue */
+ /* set true to delete message but not msgSummary */
+ Byte padByte;
+ /* only valid for SMSAM & tunnelled messages */
+ OSErr result;
+};
+typedef struct MSAMDeletePB MSAMDeletePB;
+
+struct MSAMOpenPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MSAMQueueRef queueRef;
+ long seqNum;
+ MailMsgRef mailMsgRef;
+};
+typedef struct MSAMOpenPB MSAMOpenPB;
+
+struct MSAMOpenNestedPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MailMsgRef mailMsgRef;
+ MailMsgRef nestedRef;
+};
+typedef struct MSAMOpenNestedPB MSAMOpenNestedPB;
+
+struct MSAMClosePB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MailMsgRef mailMsgRef;
+};
+typedef struct MSAMClosePB MSAMClosePB;
+
+struct MSAMGetMsgHeaderPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MailMsgRef mailMsgRef;
+ IPMHeaderSelector selector;
+ Boolean filler1;
+ unsigned long offset;
+ MailBuffer buffer;
+ unsigned long remaining;
+};
+typedef struct MSAMGetMsgHeaderPB MSAMGetMsgHeaderPB;
+/* MSAMGetAttributesPB.buffer returned will contain the attribute values of
+ the attributes indicated in responseMask,
+ from the attribute indicated by the least significant bit set
+ to the attribute indicated by the most significant bit set.
+ Note that recipients - from, to, cc, bcc cannot be read using
+ this call. Use GetRecipients to read these.
+*/
+
+struct MSAMGetAttributesPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MailMsgRef mailMsgRef;
+ MailAttributeBitmap requestMask; /* kMailIndicationsBit thru kMailSubjectBit */
+ MailBuffer buffer;
+ MailAttributeBitmap responseMask;
+ Boolean more;
+ Boolean filler1;
+};
+typedef struct MSAMGetAttributesPB MSAMGetAttributesPB;
+/* attrID value to get resolved recipient list */
+enum {
+ kMailResolvedList = 0
+};
+
+
+struct MailOriginalRecipient {
+ short index;
+};
+typedef struct MailOriginalRecipient MailOriginalRecipient;
+/* Followed by OCEPackedRecipient */
+
+
+
+struct MailResolvedRecipient {
+ short index;
+ short recipientFlags;
+ Boolean responsible;
+ Byte padByte;
+};
+typedef struct MailResolvedRecipient MailResolvedRecipient;
+/* Followed by OCEPackedRecipient */
+
+
+/* MSAMGetRecipientsPB.buffer contains a Mail Reply. Each tuple is a
+ MailOriginalRecipient if getting original recipients
+ ie the attrID is kMail[From, To, Cc, Bcc]Bit
+ MailResolvedRecipient if getting resolved reicpients
+ ie the attrID is kMailResolvedList
+ Both tuples are word alligned.
+*/
+
+struct MSAMGetRecipientsPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MailMsgRef mailMsgRef;
+ MailAttributeID attrID; /* kMailFromBit thru kMailBccBit */
+ unsigned short startIndex; /* starts at 1 */
+ MailBuffer buffer;
+ unsigned short nextIndex;
+ Boolean more;
+ Boolean filler1;
+};
+typedef struct MSAMGetRecipientsPB MSAMGetRecipientsPB;
+
+struct MSAMGetContentPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MailMsgRef mailMsgRef;
+ MailSegmentMask segmentMask;
+ MailBuffer buffer;
+ StScrpRec * textScrap;
+ ScriptCode script;
+ MailSegmentType segmentType;
+ Boolean endOfScript;
+ Boolean endOfSegment;
+ Boolean endOfContent;
+ Boolean filler1;
+ long segmentLength; /* NEW: <- valid first call in a segment */
+ long segmentID; /* NEW: <-> identifier for this segment */
+};
+typedef struct MSAMGetContentPB MSAMGetContentPB;
+
+struct MSAMGetEnclosurePB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MailMsgRef mailMsgRef;
+ Boolean contentEnclosure;
+ Byte padByte;
+ MailBuffer buffer;
+ Boolean endOfFile;
+ Boolean endOfEnclosures;
+};
+typedef struct MSAMGetEnclosurePB MSAMGetEnclosurePB;
+
+struct MailBlockInfo {
+ OCECreatorType blockType;
+ unsigned long offset;
+ unsigned long blockLength;
+};
+typedef struct MailBlockInfo MailBlockInfo;
+
+struct MSAMEnumerateBlocksPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MailMsgRef mailMsgRef;
+ unsigned short startIndex; /* starts at 1 */
+ MailBuffer buffer;
+ /* buffer contains a Mail Reply. Each tuple is a MailBlockInfo */
+ unsigned short nextIndex;
+ Boolean more;
+ Boolean filler1;
+};
+typedef struct MSAMEnumerateBlocksPB MSAMEnumerateBlocksPB;
+
+struct MSAMGetBlockPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MailMsgRef mailMsgRef;
+ OCECreatorType blockType;
+ unsigned short blockIndex;
+ MailBuffer buffer;
+ unsigned long dataOffset;
+ Boolean endOfBlock;
+ Byte padByte;
+ unsigned long remaining;
+};
+typedef struct MSAMGetBlockPB MSAMGetBlockPB;
+/* YOU SHOULD BE USING THE NEW FORM OF MARK RECIPIENTS
+ * THIS VERSION IS MUCH SLOWER AND KEPT FOR COMPATIBILITY
+ * REASONS.
+*/
+/* not valid for tunnel form letters */
+
+struct MSAMMarkRecipientsPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MSAMQueueRef queueRef;
+ long seqNum;
+ MailBuffer buffer; /* buffer contains a Mail Reply. Each tuple is an unsigned short, the index of a recipient to be marked. */
+
+};
+typedef struct MSAMMarkRecipientsPB MSAMMarkRecipientsPB;
+/*
+ * same as MSAMMarkRecipients except it takes a mailMsgRef instead of
+ * queueRef, seqNum
+*/
+/* not valid for tunnel form letters */
+
+struct MSAMnMarkRecipientsPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MailMsgRef mailMsgRef;
+ MailBuffer buffer; /* buffer contains a Mail Reply. Each tuple is an unsigned short, the index of a recipient to be marked. */
+
+};
+typedef struct MSAMnMarkRecipientsPB MSAMnMarkRecipientsPB;
+/****************************************************************************************/
+
+struct MSAMCreatePB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MSAMQueueRef queueRef;
+ Boolean asLetter; /* indicate if we should create as letter or msg */
+ Boolean filler1;
+ IPMMsgType msgType; /* up to application discretion: must be of IPMSenderTag kIPMOSFormatType for asLetter=true */
+ long refCon; /* for messages only */
+ long seqNum; /* set if creating message in the inQueue */
+ Boolean tunnelForm; /* if true tunnelForm else newForm */
+ Boolean bccRecipients; /* true if creating letter with bcc recipients */
+ MailMsgRef newRef;
+};
+typedef struct MSAMCreatePB MSAMCreatePB;
+
+struct MSAMBeginNestedPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MailMsgRef mailMsgRef;
+ long refCon; /* for messages only */
+ IPMMsgType msgType;
+};
+typedef struct MSAMBeginNestedPB MSAMBeginNestedPB;
+
+struct MSAMEndNestedPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MailMsgRef mailMsgRef;
+};
+typedef struct MSAMEndNestedPB MSAMEndNestedPB;
+
+struct MSAMSubmitPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MailMsgRef mailMsgRef;
+ Boolean submitFlag;
+ Byte padByte;
+ MailLetterID msgID;
+};
+typedef struct MSAMSubmitPB MSAMSubmitPB;
+
+struct MSAMPutMsgHeaderPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MailMsgRef mailMsgRef;
+ OCERecipient * replyQueue;
+ IPMSender * sender;
+ IPMNotificationType deliveryNotification;
+ IPMPriority priority;
+};
+typedef struct MSAMPutMsgHeaderPB MSAMPutMsgHeaderPB;
+
+struct MSAMPutAttributePB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MailMsgRef mailMsgRef;
+ MailAttributeID attrID; /* kMailIndicationsBit thru kMailSubjectBit */
+ MailBuffer buffer;
+};
+typedef struct MSAMPutAttributePB MSAMPutAttributePB;
+
+struct MSAMPutRecipientPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MailMsgRef mailMsgRef;
+ MailAttributeID attrID; /* kMailFromBit thru kMailBccBit */
+ MailRecipient * recipient;
+ Boolean responsible; /* valid for server and message msams only */
+ Boolean filler1;
+};
+typedef struct MSAMPutRecipientPB MSAMPutRecipientPB;
+
+struct MSAMPutContentPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+
+ MailMsgRef mailMsgRef;
+ MailSegmentType segmentType;
+ Boolean append;
+ Byte padByte;
+ MailBuffer buffer;
+ StScrpRec * textScrap;
+ Boolean startNewScript;
+ Boolean filler1;
+ ScriptCode script; /* valid only if startNewScript is true */
+};
+typedef struct MSAMPutContentPB MSAMPutContentPB;
+
+struct MSAMPutEnclosurePB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MailMsgRef mailMsgRef;
+ Boolean contentEnclosure;
+ Byte padByte;
+ Boolean hfs; /* true => in file system, false => in memory */
+
+ Boolean append;
+ MailBuffer buffer; /* Unused if hfs == true */
+ FSSpec enclosure;
+ MailEnclosureInfo addlInfo;
+};
+typedef struct MSAMPutEnclosurePB MSAMPutEnclosurePB;
+
+struct MSAMPutBlockPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MailMsgRef mailMsgRef;
+ long refCon; /* for messages only */
+ OCECreatorType blockType;
+ Boolean append;
+ Boolean filler1;
+ MailBuffer buffer;
+ MailBlockMode mode; /* if blockType is kMailTunnelLtrType or kMailHopInfoType mode is assumed to be kMailFromMark */
+ unsigned long offset;
+};
+typedef struct MSAMPutBlockPB MSAMPutBlockPB;
+/****************************************************************************************/
+
+struct MSAMCreateReportPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MSAMQueueRef queueRef; /* to distinguish personal and server MSAMs */
+ MailMsgRef mailMsgRef;
+ MailLetterID msgID; /* kMailLetterIDBit of letter being reported upon */
+ MailRecipient * sender; /* sender of the letter you are creating report on */
+};
+typedef struct MSAMCreateReportPB MSAMCreateReportPB;
+
+struct MSAMPutRecipientReportPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MailMsgRef mailMsgRef;
+ short recipientIndex; /* recipient index in the original letter */
+ OSErr result; /* result of sending the recipient */
+};
+typedef struct MSAMPutRecipientReportPB MSAMPutRecipientReportPB;
+/****************************************************************************************/
+
+struct MailWakeupPMSAMPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ CreationID pmsamCID;
+ MailSlotID mailSlotID;
+};
+typedef struct MailWakeupPMSAMPB MailWakeupPMSAMPB;
+
+struct MailCreateMailSlotPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MailboxRef mailboxRef;
+ long timeout;
+ CreationID pmsamCID;
+ SMCA smca;
+};
+typedef struct MailCreateMailSlotPB MailCreateMailSlotPB;
+
+struct MailModifyMailSlotPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ MailboxRef mailboxRef;
+ long timeout;
+ CreationID pmsamCID;
+ SMCA smca;
+};
+typedef struct MailModifyMailSlotPB MailModifyMailSlotPB;
+
+union MSAMParam {
+ struct {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ MSAMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ } header;
+
+ PMSAMGetMSAMRecordPB pmsamGetMSAMRecord;
+ PMSAMOpenQueuesPB pmsamOpenQueues;
+ PMSAMSetStatusPB pmsamSetStatus;
+ PMSAMLogErrorPB pmsamLogError;
+
+
+ SMSAMSetupPB smsamSetup;
+ SMSAMStartupPB smsamStartup;
+ SMSAMShutdownPB smsamShutdown;
+
+ MSAMEnumeratePB msamEnumerate;
+ MSAMDeletePB msamDelete;
+
+ MSAMOpenPB msamOpen;
+ MSAMOpenNestedPB msamOpenNested;
+ MSAMClosePB msamClose;
+ MSAMGetMsgHeaderPB msamGetMsgHeader;
+ MSAMGetAttributesPB msamGetAttributes;
+ MSAMGetRecipientsPB msamGetRecipients;
+ MSAMGetContentPB msamGetContent;
+ MSAMGetEnclosurePB msamGetEnclosure;
+ MSAMEnumerateBlocksPB msamEnumerateBlocks;
+ MSAMGetBlockPB msamGetBlock;
+ MSAMMarkRecipientsPB msamMarkRecipients;
+ MSAMnMarkRecipientsPB msamnMarkRecipients;
+
+ MSAMCreatePB msamCreate;
+ MSAMBeginNestedPB msamBeginNested;
+ MSAMEndNestedPB msamEndNested;
+ MSAMSubmitPB msamSubmit;
+ MSAMPutMsgHeaderPB msamPutMsgHeader;
+ MSAMPutAttributePB msamPutAttribute;
+ MSAMPutRecipientPB msamPutRecipient;
+ MSAMPutContentPB msamPutContent;
+ MSAMPutEnclosurePB msamPutEnclosure; /* this field is SYSTEM8_DEPRECATED*/
+ MSAMPutBlockPB msamPutBlock;
+
+ MSAMCreateReportPB msamCreateReport; /* Reports and Error Handling Calls */
+ MSAMPutRecipientReportPB msamPutRecipientReport;
+
+ PMSAMCreateMsgSummaryPB pmsamCreateMsgSummary;
+ PMSAMPutMsgSummaryPB pmsamPutMsgSummary;
+ PMSAMGetMsgSummaryPB pmsamGetMsgSummary;
+
+ MailWakeupPMSAMPB wakeupPMSAM;
+ MailCreateMailSlotPB createMailSlot;
+ MailModifyMailSlotPB modifyMailSlot;
+};
+typedef union MSAMParam MSAMParam;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(MSAMIOCompletionUPP)
+ NewMSAMIOCompletionUPP (MSAMIOCompletionProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeMSAMIOCompletionUPP (MSAMIOCompletionUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeMSAMIOCompletionUPP (TempMSAMParam * paramBlock,
+ MSAMIOCompletionUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppMSAMIOCompletionProcInfo = 0x00009802 }; /* register no_return_value Func(4_bytes:A0) */
+ #define NewMSAMIOCompletionUPP(userRoutine) (MSAMIOCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMSAMIOCompletionProcInfo, GetCurrentArchitecture())
+ #define DisposeMSAMIOCompletionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter InvokeMSAMIOCompletionUPP(__A0, __A1)
+ void InvokeMSAMIOCompletionUPP(TempMSAMParam * paramBlock, MSAMIOCompletionUPP userUPP) = 0x4E91;
+ #else
+ #define InvokeMSAMIOCompletionUPP(paramBlock, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppMSAMIOCompletionProcInfo, (paramBlock))
+ #endif
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewMSAMIOCompletionProc(userRoutine) NewMSAMIOCompletionUPP(userRoutine)
+#define CallMSAMIOCompletionProc(userRoutine, paramBlock) InvokeMSAMIOCompletionUPP(paramBlock, userRoutine)
+/* ASYNCHRONOUS ONLY, client must call WaitNextEvent */
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+MailCreateMailSlot (MSAMParam * paramBlock) FIVEWORDINLINE(0x7001, 0x1F00, 0x3F3C, 0x052B, 0xAA5E);
+
+/* ASYNCHRONOUS ONLY, client must call WaitNextEvent */
+EXTERN_API( OSErr )
+MailModifyMailSlot (MSAMParam * paramBlock) FIVEWORDINLINE(0x7001, 0x1F00, 0x3F3C, 0x052C, 0xAA5E);
+
+/* ASYNCHRONOUS ONLY, client must call WaitNextEvent */
+EXTERN_API( OSErr )
+MailWakeupPMSAM (MSAMParam * paramBlock) FIVEWORDINLINE(0x7001, 0x1F00, 0x3F3C, 0x0507, 0xAA5E);
+
+/* Personal MSAM Glue Routines */
+EXTERN_API( OSErr )
+PMSAMOpenQueues (MSAMParam * paramBlock) FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0500, 0xAA5E);
+
+EXTERN_API( OSErr )
+PMSAMSetStatus (MSAMParam * paramBlock,
+ Boolean asyncFlag) THREEWORDINLINE(0x3F3C, 0x0527, 0xAA5E);
+
+/* SYNC ONLY */
+EXTERN_API( OSErr )
+PMSAMGetMSAMRecord (MSAMParam * paramBlock) FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0506, 0xAA5E);
+
+/* Server MSAM Glue Routines */
+/* SYNC ONLY */
+EXTERN_API( OSErr )
+SMSAMSetup (MSAMParam * paramBlock) FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0523, 0xAA5E);
+
+/* SYNC ONLY */
+EXTERN_API( OSErr )
+SMSAMStartup (MSAMParam * paramBlock) FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0501, 0xAA5E);
+
+EXTERN_API( OSErr )
+SMSAMShutdown (MSAMParam * paramBlock,
+ Boolean asyncFlag) THREEWORDINLINE(0x3F3C, 0x0502, 0xAA5E);
+
+/* Get Interface Glue Routines */
+EXTERN_API( OSErr )
+MSAMEnumerate (MSAMParam * paramBlock,
+ Boolean asyncFlag) THREEWORDINLINE(0x3F3C, 0x0503, 0xAA5E);
+
+EXTERN_API( OSErr )
+MSAMDelete (MSAMParam * paramBlock,
+ Boolean asyncFlag) THREEWORDINLINE(0x3F3C, 0x0504, 0xAA5E);
+
+EXTERN_API( OSErr )
+MSAMMarkRecipients (MSAMParam * paramBlock,
+ Boolean asyncFlag) THREEWORDINLINE(0x3F3C, 0x0505, 0xAA5E);
+
+EXTERN_API( OSErr )
+MSAMnMarkRecipients (MSAMParam * paramBlock,
+ Boolean asyncFlag) THREEWORDINLINE(0x3F3C, 0x0512, 0xAA5E);
+
+EXTERN_API( OSErr )
+MSAMOpen (MSAMParam * paramBlock,
+ Boolean asyncFlag) THREEWORDINLINE(0x3F3C, 0x0508, 0xAA5E);
+
+EXTERN_API( OSErr )
+MSAMOpenNested (MSAMParam * paramBlock,
+ Boolean asyncFlag) THREEWORDINLINE(0x3F3C, 0x0509, 0xAA5E);
+
+EXTERN_API( OSErr )
+MSAMClose (MSAMParam * paramBlock,
+ Boolean asyncFlag) THREEWORDINLINE(0x3F3C, 0x050A, 0xAA5E);
+
+EXTERN_API( OSErr )
+MSAMGetRecipients (MSAMParam * paramBlock,
+ Boolean asyncFlag) THREEWORDINLINE(0x3F3C, 0x050C, 0xAA5E);
+
+EXTERN_API( OSErr )
+MSAMGetAttributes (MSAMParam * paramBlock,
+ Boolean asyncFlag) THREEWORDINLINE(0x3F3C, 0x050B, 0xAA5E);
+
+EXTERN_API( OSErr )
+MSAMGetContent (MSAMParam * paramBlock,
+ Boolean asyncFlag) THREEWORDINLINE(0x3F3C, 0x050D, 0xAA5E);
+
+EXTERN_API( OSErr )
+MSAMGetEnclosure (MSAMParam * paramBlock,
+ Boolean asyncFlag) THREEWORDINLINE(0x3F3C, 0x050E, 0xAA5E);
+
+EXTERN_API( OSErr )
+MSAMEnumerateBlocks (MSAMParam * paramBlock,
+ Boolean asyncFlag) THREEWORDINLINE(0x3F3C, 0x050F, 0xAA5E);
+
+EXTERN_API( OSErr )
+MSAMGetBlock (MSAMParam * paramBlock,
+ Boolean asyncFlag) THREEWORDINLINE(0x3F3C, 0x0510, 0xAA5E);
+
+EXTERN_API( OSErr )
+MSAMGetMsgHeader (MSAMParam * paramBlock,
+ Boolean asyncFlag) THREEWORDINLINE(0x3F3C, 0x0511, 0xAA5E);
+
+/* Put Interface Glue Routines */
+EXTERN_API( OSErr )
+MSAMCreate (MSAMParam * paramBlock,
+ Boolean asyncFlag) THREEWORDINLINE(0x3F3C, 0x0514, 0xAA5E);
+
+EXTERN_API( OSErr )
+MSAMBeginNested (MSAMParam * paramBlock,
+ Boolean asyncFlag) THREEWORDINLINE(0x3F3C, 0x0515, 0xAA5E);
+
+EXTERN_API( OSErr )
+MSAMEndNested (MSAMParam * paramBlock) FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0516, 0xAA5E);
+
+/* SYNCHRONOUS ONLY */
+EXTERN_API( OSErr )
+MSAMSubmit (MSAMParam * paramBlock) FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0517, 0xAA5E);
+
+EXTERN_API( OSErr )
+MSAMPutAttribute (MSAMParam * paramBlock,
+ Boolean asyncFlag) THREEWORDINLINE(0x3F3C, 0x0518, 0xAA5E);
+
+EXTERN_API( OSErr )
+MSAMPutRecipient (MSAMParam * paramBlock,
+ Boolean asyncFlag) THREEWORDINLINE(0x3F3C, 0x0519, 0xAA5E);
+
+EXTERN_API( OSErr )
+MSAMPutContent (MSAMParam * paramBlock,
+ Boolean asyncFlag) THREEWORDINLINE(0x3F3C, 0x051A, 0xAA5E);
+
+/* SYNCHRONOUS ONLY */
+EXTERN_API( OSErr )
+MSAMPutEnclosure (MSAMParam * paramBlock) FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x051B, 0xAA5E);
+
+EXTERN_API( OSErr )
+MSAMPutBlock (MSAMParam * paramBlock,
+ Boolean asyncFlag) THREEWORDINLINE(0x3F3C, 0x051C, 0xAA5E);
+
+EXTERN_API( OSErr )
+MSAMPutMsgHeader (MSAMParam * paramBlock,
+ Boolean asyncFlag) THREEWORDINLINE(0x3F3C, 0x051D, 0xAA5E);
+
+/* Reports and Error Handling Glue Routines */
+EXTERN_API( OSErr )
+MSAMCreateReport (MSAMParam * paramBlock,
+ Boolean asyncFlag) THREEWORDINLINE(0x3F3C, 0x051F, 0xAA5E);
+
+EXTERN_API( OSErr )
+MSAMPutRecipientReport (MSAMParam * paramBlock,
+ Boolean asyncFlag) THREEWORDINLINE(0x3F3C, 0x0520, 0xAA5E);
+
+EXTERN_API( OSErr )
+PMSAMLogError (MSAMParam * paramBlock) FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0521, 0xAA5E);
+
+/* MsgSummary Glue Routines */
+EXTERN_API( OSErr )
+PMSAMCreateMsgSummary (MSAMParam * paramBlock,
+ Boolean asyncFlag) THREEWORDINLINE(0x3F3C, 0x0522, 0xAA5E);
+
+EXTERN_API( OSErr )
+PMSAMPutMsgSummary (MSAMParam * paramBlock,
+ Boolean asyncFlag) THREEWORDINLINE(0x3F3C, 0x0525, 0xAA5E);
+
+EXTERN_API( OSErr )
+PMSAMGetMsgSummary (MSAMParam * paramBlock,
+ Boolean asyncFlag) THREEWORDINLINE(0x3F3C, 0x0526, 0xAA5E);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __OCEMAIL__ */
+
diff --git a/include/qt/OCEMessaging.h b/include/qt/OCEMessaging.h
new file mode 100644
index 000000000..ad5c2b748
--- /dev/null
+++ b/include/qt/OCEMessaging.h
@@ -0,0 +1,1153 @@
+/*
+ File: OCEMessaging.h
+
+ Contains: Apple Open Collaboration Environment Messaging Interfaces.
+
+ Version: Technology: AOCE Toolbox 1.02
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __OCEMESSAGING__
+#define __OCEMESSAGING__
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+
+#ifndef __DIGITALSIGNATURE__
+#include "DigitalSignature.h"
+#endif
+
+#ifndef __OCE__
+#include "OCE.h"
+#endif
+
+#ifndef __OCEAUTHDIR__
+#include "OCEAuthDir.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/******************************************************************************/
+/* Definitions common to OCEMessaging and to OCEMail. These relate to addressing,
+message ids and priorities, etc. */
+
+/* Values of IPMPriority */
+enum {
+ kIPMAnyPriority = 0, /* FOR FILTER ONLY */
+ kIPMNormalPriority = 1,
+ kIPMLowPriority = 2,
+ kIPMHighPriority = 3
+};
+
+typedef Byte IPMPriority;
+/* Values of IPMAccessMode */
+enum {
+ kIPMAtMark = 0,
+ kIPMFromStart = 1,
+ kIPMFromLEOM = 2,
+ kIPMFromMark = 3
+};
+
+typedef unsigned short IPMAccessMode;
+enum {
+ kIPMUpdateMsgBit = 4,
+ kIPMNewMsgBit = 5,
+ kIPMDeleteMsgBit = 6
+};
+
+/* Values of IPMNotificationType */
+enum {
+ kIPMUpdateMsgMask = 1 << kIPMUpdateMsgBit,
+ kIPMNewMsgMask = 1 << kIPMNewMsgBit,
+ kIPMDeleteMsgMask = 1 << kIPMDeleteMsgBit
+};
+
+typedef Byte IPMNotificationType;
+/* Values of IPMSenderTag */
+enum {
+ kIPMSenderRStringTag = 0,
+ kIPMSenderRecordIDTag = 1
+};
+
+typedef unsigned short IPMSenderTag;
+enum {
+ kIPMFromDistListBit = 0,
+ kIPMDummyRecBit = 1,
+ kIPMFeedbackRecBit = 2, /* should be redirected to feedback queue */
+ kIPMReporterRecBit = 3, /* should be redirected to reporter original queue */
+ kIPMBCCRecBit = 4 /* this recipient is blind to all recipients of message */
+};
+
+/* Values of OCERecipientOffsetFlags */
+enum {
+ kIPMFromDistListMask = 1 << kIPMFromDistListBit,
+ kIPMDummyRecMask = 1 << kIPMDummyRecBit,
+ kIPMFeedbackRecMask = 1 << kIPMFeedbackRecBit,
+ kIPMReporterRecMask = 1 << kIPMReporterRecBit,
+ kIPMBCCRecMask = 1 << kIPMBCCRecBit
+};
+
+typedef Byte OCERecipientOffsetFlags;
+
+struct OCECreatorType {
+ OSType msgCreator;
+ OSType msgType;
+};
+typedef struct OCECreatorType OCECreatorType;
+enum {
+ kIPMTypeWildCard = FOUR_CHAR_CODE('ipmw'),
+ kIPMFamilyUnspecified = 0,
+ kIPMFamilyWildCard = 0x3F3F3F3F, /* '????' * well known signature */
+ kIPMSignature = FOUR_CHAR_CODE('ipms'), /* base type * well known message types */
+ kIPMReportNotify = FOUR_CHAR_CODE('rptn'), /* routing feedback * well known message block types */
+ kIPMEnclosedMsgType = FOUR_CHAR_CODE('emsg'), /* enclosed (nested) message */
+ kIPMReportInfo = FOUR_CHAR_CODE('rpti'), /* recipient information */
+ kIPMDigitalSignature = FOUR_CHAR_CODE('dsig') /* digital signature */
+};
+
+/* Values of IPMMsgFormat */
+enum {
+ kIPMOSFormatType = 1,
+ kIPMStringFormatType = 2
+};
+
+
+typedef unsigned short IPMMsgFormat;
+typedef Str32 IPMStringMsgType;
+
+union TheType {
+ OCECreatorType msgOSType;
+ IPMStringMsgType msgStrType;
+};
+typedef union TheType TheType;
+
+struct IPMMsgType {
+ IPMMsgFormat format; /* IPMMsgFormat*/
+ TheType theType;
+};
+typedef struct IPMMsgType IPMMsgType;
+/*
+Following are the known extension values for IPM addresses handled by Apple.
+We define the definition of the entn extension below.
+*/
+enum {
+ kOCEalanXtn = FOUR_CHAR_CODE('alan'),
+ kOCEentnXtn = FOUR_CHAR_CODE('entn'), /* entn = entity name (aka DSSpec) */
+ kOCEaphnXtn = FOUR_CHAR_CODE('aphn')
+};
+
+/*
+Following are the specific definitions for the extension for the standard
+OCEMail 'entn' addresses. [Note, the actual extension is formatted as in
+IPMEntityNameExtension.]
+*/
+/* entn extension forms */
+enum {
+ kOCEAddrXtn = FOUR_CHAR_CODE('addr'),
+ kOCEQnamXtn = FOUR_CHAR_CODE('qnam'),
+ kOCEAttrXtn = FOUR_CHAR_CODE('attr'), /* an attribute specification */
+ kOCESpAtXtn = FOUR_CHAR_CODE('spat') /* specific attribute */
+};
+
+/*
+Following are the specific definitions for standard
+OCEMail 'aphn' extension value.
+
+All RStrings here are packed (e.g. truncated to length) and even padded (e.g.
+if length odd, then a pad byte (zero) should be introduced before the next field).
+
+The extension value is in the packed form of the following structure:
+ RString phoneNumber;
+ RString modemType;
+ Str32 queueuName;
+
+The body of phoneNumber compound RString is in the packed form of the following structure:
+ short subType;
+ RString countryCode; // used when subType == kOCEUseHandyDial
+ RString areaCode; // used when subType == kOCEUseHandyDial
+ RString phone; // used when subType == kOCEUseHandyDial
+ RString postFix; // used when subType == kOCEUseHandyDial
+ RString nonHandyDialString; // used when subType == kOCEDontUseHandyDial
+*/
+/* phoneNumber sub type constants */
+enum {
+ kOCEUseHandyDial = 1,
+ kOCEDontUseHandyDial = 2
+};
+
+/* FORMAT OF A PACKED FORM RECIPIENT */
+
+struct ProtoOCEPackedRecipient {
+ unsigned short dataLength;
+};
+typedef struct ProtoOCEPackedRecipient ProtoOCEPackedRecipient;
+enum {
+ kOCEPackedRecipientMaxBytes = (4096 - sizeof(ProtoOCEPackedRecipient))
+};
+
+
+struct OCEPackedRecipient {
+ unsigned short dataLength;
+ Byte data[4094];
+};
+typedef struct OCEPackedRecipient OCEPackedRecipient;
+
+struct IPMEntnQueueExtension {
+ Str32 queueName;
+};
+typedef struct IPMEntnQueueExtension IPMEntnQueueExtension;
+/* kOCEAttrXtn */
+
+struct IPMEntnAttributeExtension {
+ AttributeType attributeName;
+};
+typedef struct IPMEntnAttributeExtension IPMEntnAttributeExtension;
+/* kOCESpAtXtn */
+
+struct IPMEntnSpecificAttributeExtension {
+ AttributeCreationID attributeCreationID;
+ AttributeType attributeName;
+};
+typedef struct IPMEntnSpecificAttributeExtension IPMEntnSpecificAttributeExtension;
+/* All IPM entn extensions fit within the following */
+
+struct IPMEntityNameExtension {
+ OSType subExtensionType;
+ union {
+ IPMEntnSpecificAttributeExtension specificAttribute;
+ IPMEntnAttributeExtension attribute;
+ IPMEntnQueueExtension queue;
+ } u;
+};
+typedef struct IPMEntityNameExtension IPMEntityNameExtension;
+/* addresses with kIPMNBPXtn should specify this nbp type */
+#define kIPMWSReceiverNBPType "\pMsgReceiver"
+
+struct IPMMsgID {
+ unsigned long id[4];
+};
+typedef struct IPMMsgID IPMMsgID;
+
+/* Values of IPMHeaderSelector */
+enum {
+ kIPMTOC = 0,
+ kIPMSender = 1,
+ kIPMProcessHint = 2,
+ kIPMMessageTitle = 3,
+ kIPMMessageType = 4,
+ kIPMFixedInfo = 7
+};
+
+
+typedef Byte IPMHeaderSelector;
+
+union TheSender {
+ RString rString;
+ PackedRecordID rid;
+};
+typedef union TheSender TheSender;
+
+struct IPMSender {
+ IPMSenderTag sendTag;
+ TheSender theSender;
+};
+typedef struct IPMSender IPMSender;
+/******************************************************************************/
+/* Definitions specific to OCEMessaging */
+
+typedef unsigned long IPMContextRef;
+typedef unsigned long IPMQueueRef;
+typedef unsigned long IPMMsgRef;
+typedef unsigned long IPMSeqNum;
+typedef Str32 IPMProcHint;
+typedef Str32 IPMQueueName;
+typedef CALLBACK_API( void , IPMNoteProcPtr )(IPMQueueRef queue, IPMSeqNum seqNum, IPMNotificationType notificationType, unsigned long userData);
+typedef STACK_UPP_TYPE(IPMNoteProcPtr) IPMNoteUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(IPMNoteUPP)
+ NewIPMNoteUPP (IPMNoteProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeIPMNoteUPP (IPMNoteUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeIPMNoteUPP (IPMQueueRef queue,
+ IPMSeqNum seqNum,
+ IPMNotificationType notificationType,
+ unsigned long userData,
+ IPMNoteUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppIPMNoteProcInfo = 0x000037C0 }; /* pascal no_return_value Func(4_bytes, 4_bytes, 1_byte, 4_bytes) */
+ #define NewIPMNoteUPP(userRoutine) (IPMNoteUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppIPMNoteProcInfo, GetCurrentArchitecture())
+ #define DisposeIPMNoteUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeIPMNoteUPP(queue, seqNum, notificationType, userData, userUPP) CALL_FOUR_PARAMETER_UPP((userUPP), uppIPMNoteProcInfo, (queue), (seqNum), (notificationType), (userData))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewIPMNoteProc(userRoutine) NewIPMNoteUPP(userRoutine)
+#define CallIPMNoteProc(userRoutine, queue, seqNum, notificationType, userData) InvokeIPMNoteUPP(queue, seqNum, notificationType, userData, userRoutine)
+
+struct IPMFixedHdrInfo {
+ unsigned short version;
+ Boolean authenticated;
+ Boolean signatureEnclosed; /* digital signature enclosed */
+ unsigned long msgSize;
+ IPMNotificationType notification;
+ IPMPriority priority;
+ unsigned short blockCount;
+ unsigned short originalRcptCount; /* original number of recipients */
+ unsigned long refCon; /* Client defined data */
+ unsigned short reserved;
+ UTCTime creationTime; /* Time when it was created */
+ IPMMsgID msgID;
+ OSType family; /* family this msg belongs (e.g. mail) */
+};
+typedef struct IPMFixedHdrInfo IPMFixedHdrInfo;
+enum {
+ kIPMDeliveryNotificationBit = 0,
+ kIPMNonDeliveryNotificationBit = 1,
+ kIPMEncloseOriginalBit = 2,
+ kIPMSummaryReportBit = 3, /* modify enclose original to only on error */
+ kIPMOriginalOnlyOnErrorBit = 4
+};
+
+enum {
+ kIPMNoNotificationMask = 0x00,
+ kIPMDeliveryNotificationMask = 1 << kIPMDeliveryNotificationBit,
+ kIPMNonDeliveryNotificationMask = 1 << kIPMNonDeliveryNotificationBit,
+ kIPMDontEncloseOriginalMask = 0x00,
+ kIPMEncloseOriginalMask = 1 << kIPMEncloseOriginalBit,
+ kIPMImmediateReportMask = 0x00,
+ kIPMSummaryReportMask = 1 << kIPMSummaryReportBit,
+ kIPMOriginalOnlyOnErrorMask = 1 << kIPMOriginalOnlyOnErrorBit,
+ kIPMEncloseOriginalOnErrorMask = (kIPMOriginalOnlyOnErrorMask | kIPMEncloseOriginalMask)
+};
+
+/* standard Non delivery codes */
+enum {
+ kIPMNoSuchRecipient = 0x0001,
+ kIPMRecipientMalformed = 0x0002,
+ kIPMRecipientAmbiguous = 0x0003,
+ kIPMRecipientAccessDenied = 0x0004,
+ kIPMGroupExpansionProblem = 0x0005,
+ kIPMMsgUnreadable = 0x0006,
+ kIPMMsgExpired = 0x0007,
+ kIPMMsgNoTranslatableContent = 0x0008,
+ kIPMRecipientReqStdCont = 0x0009,
+ kIPMRecipientReqSnapShot = 0x000A,
+ kIPMNoTransferDiskFull = 0x000B,
+ kIPMNoTransferMsgRejectedbyDest = 0x000C,
+ kIPMNoTransferMsgTooLarge = 0x000D
+};
+
+/*************************************************************************/
+/*
+This is the structure that will be returned by enumerate and getmsginfo
+This definition is just to give you a template, the position of msgType
+is variable since this is a packed structure. procHint and msgType are
+packed and even length padded.
+
+* master message info */
+
+struct IPMMsgInfo {
+ IPMSeqNum sequenceNum;
+ unsigned long userData;
+ unsigned short respIndex;
+ SInt8 padByte;
+ IPMPriority priority;
+ unsigned long msgSize;
+ unsigned short originalRcptCount;
+ unsigned short reserved;
+ UTCTime creationTime;
+ IPMMsgID msgID;
+ OSType family; /* family this msg belongs (e.g. mail) */
+ IPMProcHint procHint;
+ SInt8 filler2;
+ IPMMsgType msgType;
+};
+typedef struct IPMMsgInfo IPMMsgInfo;
+
+typedef OCECreatorType IPMBlockType;
+
+struct IPMTOC {
+ IPMBlockType blockType;
+ long blockOffset;
+ unsigned long blockSize;
+ unsigned long blockRefCon;
+};
+typedef struct IPMTOC IPMTOC;
+/*
+The following structure is just to describe the layout of the SingleFilter.
+Each field should be packed and word aligned when passed to the IPM ToolBox.
+*/
+
+struct IPMSingleFilter {
+ IPMPriority priority;
+ SInt8 padByte;
+ OSType family; /* family this msg belongs (e.g. mail), '????' for all */
+ ScriptCode script; /* Language Identifier */
+ IPMProcHint hint;
+ SInt8 filler2;
+ IPMMsgType msgType;
+};
+typedef struct IPMSingleFilter IPMSingleFilter;
+
+struct IPMFilter {
+ unsigned short count;
+ IPMSingleFilter sFilters[1];
+};
+typedef struct IPMFilter IPMFilter;
+/*************************************************************************
+Following structures define the "start" of a recipient report block and the
+elements of the array respectively.
+*/
+
+struct IPMReportBlockHeader {
+ IPMMsgID msgID; /* message id of the original */
+ UTCTime creationTime; /* creation time of the report */
+};
+typedef struct IPMReportBlockHeader IPMReportBlockHeader;
+
+struct OCERecipientReport {
+ unsigned short rcptIndex; /* index of recipient in original message */
+ OSErr result; /* result of sending letter to this recipient*/
+};
+typedef struct OCERecipientReport OCERecipientReport;
+/*************************************************************************/
+typedef union IPMParamBlock IPMParamBlock;
+
+typedef IPMParamBlock * IPMParamBlockPtr;
+typedef CALLBACK_API( void , IPMIOCompletionProcPtr )(IPMParamBlockPtr paramBlock);
+/*
+ WARNING: IPMIOCompletionProcPtr uses register based parameters under classic 68k
+ and cannot be written in a high-level language without
+ the help of mixed mode or assembly glue.
+*/
+typedef REGISTER_UPP_TYPE(IPMIOCompletionProcPtr) IPMIOCompletionUPP;
+
+struct IPMOpenContextPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ IPMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ IPMContextRef contextRef; /* <-- Context reference to be used in further calls*/
+};
+typedef struct IPMOpenContextPB IPMOpenContextPB;
+
+typedef IPMOpenContextPB IPMCloseContextPB;
+
+struct IPMCreateQueuePB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ IPMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ long filler1;
+ OCERecipient * queue;
+ AuthIdentity identity; /* used only if queue is remote */
+ PackedRecordID * owner; /* used only if queue is remote */
+};
+typedef struct IPMCreateQueuePB IPMCreateQueuePB;
+/* For createqueue and deletequeue only queue and identity are used */
+
+typedef IPMCreateQueuePB IPMDeleteQueuePB;
+
+struct IPMOpenQueuePB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ IPMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ IPMContextRef contextRef;
+ OCERecipient * queue;
+ AuthIdentity identity;
+ IPMFilter * filter;
+ IPMQueueRef newQueueRef;
+ IPMNoteUPP notificationProc;
+ unsigned long userData;
+ IPMNotificationType noteType;
+ Byte padByte;
+ long reserved;
+ long reserved2;
+};
+typedef struct IPMOpenQueuePB IPMOpenQueuePB;
+
+struct IPMCloseQueuePB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ IPMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ IPMQueueRef queueRef;
+};
+typedef struct IPMCloseQueuePB IPMCloseQueuePB;
+
+struct IPMEnumerateQueuePB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ IPMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ IPMQueueRef queueRef;
+ IPMSeqNum startSeqNum;
+ Boolean getProcHint;
+ Boolean getMsgType;
+ short filler;
+ IPMFilter * filter;
+ unsigned short numToGet;
+ unsigned short numGotten;
+ unsigned long enumCount;
+ void * enumBuffer; /* will be packed array of IPMMsgInfo */
+ unsigned long actEnumCount;
+};
+typedef struct IPMEnumerateQueuePB IPMEnumerateQueuePB;
+
+typedef IPMEnumerateQueuePB IPMChangeQueueFilterPB;
+
+struct IPMDeleteMsgRangePB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ IPMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ IPMQueueRef queueRef;
+ IPMSeqNum startSeqNum;
+ IPMSeqNum endSeqNum;
+ IPMSeqNum lastSeqNum;
+};
+typedef struct IPMDeleteMsgRangePB IPMDeleteMsgRangePB;
+
+
+struct IPMOpenMsgPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ IPMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ IPMQueueRef queueRef;
+ IPMSeqNum sequenceNum;
+ IPMMsgRef newMsgRef;
+ IPMSeqNum actualSeqNum;
+ Boolean exactMatch;
+ Byte padByte;
+ long reserved;
+};
+typedef struct IPMOpenMsgPB IPMOpenMsgPB;
+
+
+struct IPMOpenHFSMsgPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ IPMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ FSSpec * hfsPath;
+ long filler;
+ IPMMsgRef newMsgRef;
+ long filler2;
+ Byte filler3;
+ Boolean filler4;
+ long reserved;
+};
+typedef struct IPMOpenHFSMsgPB IPMOpenHFSMsgPB;
+
+
+struct IPMOpenBlockAsMsgPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ IPMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ IPMMsgRef msgRef;
+ unsigned long filler;
+ IPMMsgRef newMsgRef;
+ unsigned short filler2[7];
+ unsigned short blockIndex;
+};
+typedef struct IPMOpenBlockAsMsgPB IPMOpenBlockAsMsgPB;
+
+
+struct IPMCloseMsgPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ IPMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ IPMMsgRef msgRef;
+ Boolean deleteMsg;
+ Boolean filler1;
+};
+typedef struct IPMCloseMsgPB IPMCloseMsgPB;
+
+
+struct IPMGetMsgInfoPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ IPMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ IPMMsgRef msgRef;
+ IPMMsgInfo * info;
+};
+typedef struct IPMGetMsgInfoPB IPMGetMsgInfoPB;
+
+
+struct IPMReadHeaderPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ IPMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ IPMMsgRef msgRef;
+ unsigned short fieldSelector;
+ long offset;
+ unsigned long count;
+ void * buffer;
+ unsigned long actualCount;
+ unsigned short filler;
+ unsigned long remaining;
+};
+typedef struct IPMReadHeaderPB IPMReadHeaderPB;
+
+
+struct IPMReadRecipientPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ IPMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ IPMMsgRef msgRef;
+ unsigned short rcptIndex;
+ long offset;
+ unsigned long count;
+ void * buffer;
+ unsigned long actualCount;
+ short reserved; /* must be zero */
+ unsigned long remaining;
+ unsigned short originalIndex;
+ OCERecipientOffsetFlags recipientOffsetFlags;
+ Boolean filler1;
+};
+typedef struct IPMReadRecipientPB IPMReadRecipientPB;
+
+/*
+replyQueue works like recipient. [can no longer read it via ReadHeader]
+OriginalIndex is meaningless, rcptFlags are used seperately and there are
+currently none defined.
+*/
+
+typedef IPMReadRecipientPB IPMReadReplyQueuePB;
+
+struct IPMGetBlkIndexPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ IPMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ IPMMsgRef msgRef;
+ IPMBlockType blockType;
+ unsigned short index;
+ unsigned short startingFrom;
+ IPMBlockType actualBlockType;
+ unsigned short actualBlockIndex;
+};
+typedef struct IPMGetBlkIndexPB IPMGetBlkIndexPB;
+
+
+struct IPMReadMsgPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ IPMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ IPMMsgRef msgRef;
+ IPMAccessMode mode;
+ long offset;
+ unsigned long count;
+ void * buffer;
+ unsigned long actualCount;
+ unsigned short blockIndex;
+ unsigned long remaining;
+};
+typedef struct IPMReadMsgPB IPMReadMsgPB;
+
+struct IPMVerifySignaturePB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ IPMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ IPMMsgRef msgRef;
+ SIGContextPtr signatureContext;
+};
+typedef struct IPMVerifySignaturePB IPMVerifySignaturePB;
+
+struct IPMNewMsgPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ IPMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ unsigned long filler;
+ OCERecipient * recipient;
+ OCERecipient * replyQueue;
+ StringPtr procHint;
+ unsigned short filler2;
+ IPMMsgType * msgType;
+ unsigned long refCon;
+ IPMMsgRef newMsgRef;
+ unsigned short filler3;
+ long filler4;
+ AuthIdentity identity;
+ IPMSender * sender;
+ unsigned long internalUse;
+ unsigned long internalUse2;
+};
+typedef struct IPMNewMsgPB IPMNewMsgPB;
+
+struct IPMNewHFSMsgPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ IPMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ FSSpec * hfsPath;
+ OCERecipient * recipient;
+ OCERecipient * replyQueue;
+ StringPtr procHint;
+ unsigned short filler2;
+ IPMMsgType * msgType;
+ unsigned long refCon;
+ IPMMsgRef newMsgRef;
+ unsigned short filler3;
+ long filler4;
+ AuthIdentity identity;
+ IPMSender * sender;
+ unsigned long internalUse;
+ unsigned long internalUse2;
+};
+typedef struct IPMNewHFSMsgPB IPMNewHFSMsgPB;
+
+struct IPMNestMsgPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ IPMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ IPMMsgRef msgRef;
+ unsigned short filler[9];
+ unsigned long refCon;
+ IPMMsgRef msgToNest;
+ unsigned short filler2;
+ long startingOffset;
+};
+typedef struct IPMNestMsgPB IPMNestMsgPB;
+
+
+struct IPMNewNestedMsgBlockPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ IPMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ IPMMsgRef msgRef;
+ OCERecipient * recipient;
+ OCERecipient * replyQueue;
+ StringPtr procHint;
+ unsigned short filler1;
+ IPMMsgType * msgType;
+ unsigned long refCon;
+ IPMMsgRef newMsgRef;
+ unsigned short filler2;
+ long startingOffset;
+ AuthIdentity identity;
+ IPMSender * sender;
+ unsigned long internalUse;
+ unsigned long internalUse2;
+};
+typedef struct IPMNewNestedMsgBlockPB IPMNewNestedMsgBlockPB;
+
+
+struct IPMEndMsgPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ IPMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ IPMMsgRef msgRef;
+ IPMMsgID msgID;
+ RString * msgTitle;
+ IPMNotificationType deliveryNotification;
+ IPMPriority priority;
+ Boolean cancel;
+ Byte padByte;
+ long reserved;
+ SIGSignaturePtr signature;
+ Size signatureSize;
+ SIGContextPtr signatureContext;
+ /* family this msg belongs (e.g. mail) use kIPMFamilyUnspecified by default */
+ OSType family;
+};
+typedef struct IPMEndMsgPB IPMEndMsgPB;
+
+
+struct IPMAddRecipientPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ IPMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ IPMMsgRef msgRef;
+ OCERecipient * recipient;
+ long reserved;
+};
+typedef struct IPMAddRecipientPB IPMAddRecipientPB;
+
+
+struct IPMAddReplyQueuePB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ IPMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ IPMMsgRef msgRef;
+ long filler;
+ OCERecipient * replyQueue;
+};
+typedef struct IPMAddReplyQueuePB IPMAddReplyQueuePB;
+
+
+struct IPMNewBlockPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ IPMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ IPMMsgRef msgRef;
+ IPMBlockType blockType;
+ unsigned short filler[5];
+ unsigned long refCon;
+ unsigned short filler2[3];
+ long startingOffset;
+};
+typedef struct IPMNewBlockPB IPMNewBlockPB;
+
+
+struct IPMWriteMsgPB {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ IPMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ IPMMsgRef msgRef;
+ IPMAccessMode mode;
+ long offset;
+ unsigned long count;
+ void * buffer;
+ unsigned long actualCount;
+ Boolean currentBlock;
+ Boolean filler1;
+};
+typedef struct IPMWriteMsgPB IPMWriteMsgPB;
+
+
+
+union IPMParamBlock {
+ struct {
+ void * qLink;
+ long reservedH1;
+ long reservedH2;
+ IPMIOCompletionUPP ioCompletion;
+ OSErr ioResult;
+ long saveA5;
+ short reqCode;
+ } header;
+ IPMOpenContextPB openContextPB;
+ IPMCloseContextPB closeContextPB;
+ IPMCreateQueuePB createQueuePB;
+ IPMDeleteQueuePB deleteQueuePB;
+ IPMOpenQueuePB openQueuePB;
+ IPMCloseQueuePB closeQueuePB;
+ IPMEnumerateQueuePB enumerateQueuePB;
+ IPMChangeQueueFilterPB changeQueueFilterPB;
+ IPMDeleteMsgRangePB deleteMsgRangePB;
+ IPMOpenMsgPB openMsgPB;
+ IPMOpenHFSMsgPB openHFSMsgPB;
+ IPMOpenBlockAsMsgPB openBlockAsMsgPB;
+ IPMCloseMsgPB closeMsgPB;
+ IPMGetMsgInfoPB getMsgInfoPB;
+ IPMReadHeaderPB readHeaderPB;
+ IPMReadRecipientPB readRecipientPB;
+ IPMReadReplyQueuePB readReplyQueuePB;
+ IPMGetBlkIndexPB getBlkIndexPB;
+ IPMReadMsgPB readMsgPB;
+ IPMVerifySignaturePB verifySignaturePB;
+ IPMNewMsgPB newMsgPB;
+ IPMNewHFSMsgPB newHFSMsgPB;
+ IPMNestMsgPB nestMsgPB;
+ IPMNewNestedMsgBlockPB newNestedMsgBlockPB;
+ IPMEndMsgPB endMsgPB;
+ IPMAddRecipientPB addRecipientPB;
+ IPMAddReplyQueuePB addReplyQueuePB;
+ IPMNewBlockPB newBlockPB;
+ IPMWriteMsgPB writeMsgPB;
+};
+
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(IPMIOCompletionUPP)
+ NewIPMIOCompletionUPP (IPMIOCompletionProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeIPMIOCompletionUPP (IPMIOCompletionUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeIPMIOCompletionUPP (IPMParamBlockPtr paramBlock,
+ IPMIOCompletionUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppIPMIOCompletionProcInfo = 0x00009802 }; /* register no_return_value Func(4_bytes:A0) */
+ #define NewIPMIOCompletionUPP(userRoutine) (IPMIOCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppIPMIOCompletionProcInfo, GetCurrentArchitecture())
+ #define DisposeIPMIOCompletionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter InvokeIPMIOCompletionUPP(__A0, __A1)
+ void InvokeIPMIOCompletionUPP(IPMParamBlockPtr paramBlock, IPMIOCompletionUPP userUPP) = 0x4E91;
+ #else
+ #define InvokeIPMIOCompletionUPP(paramBlock, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppIPMIOCompletionProcInfo, (paramBlock))
+ #endif
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewIPMIOCompletionProc(userRoutine) NewIPMIOCompletionUPP(userRoutine)
+#define CallIPMIOCompletionProc(userRoutine, paramBlock) InvokeIPMIOCompletionUPP(paramBlock, userRoutine)
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+IPMOpenContext (IPMParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0400, 0xAA5E);
+
+EXTERN_API( OSErr )
+IPMCloseContext (IPMParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0401, 0xAA5E);
+
+EXTERN_API( OSErr )
+IPMNewMsg (IPMParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0402, 0xAA5E);
+
+EXTERN_API( OSErr )
+IPMNewBlock (IPMParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0404, 0xAA5E);
+
+EXTERN_API( OSErr )
+IPMNewNestedMsgBlock (IPMParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0405, 0xAA5E);
+
+EXTERN_API( OSErr )
+IPMNestMsg (IPMParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0406, 0xAA5E);
+
+EXTERN_API( OSErr )
+IPMWriteMsg (IPMParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0407, 0xAA5E);
+
+EXTERN_API( OSErr )
+IPMEndMsg (IPMParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0408, 0xAA5E);
+
+EXTERN_API( OSErr )
+IPMOpenQueue (IPMParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0409, 0xAA5E);
+
+EXTERN_API( OSErr )
+IPMCloseQueue (IPMParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x040A, 0xAA5E);
+
+/* Always synchronous */
+EXTERN_API( OSErr )
+IPMVerifySignature (IPMParamBlockPtr paramBlock) FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0422, 0xAA5E);
+
+EXTERN_API( OSErr )
+IPMOpenMsg (IPMParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x040B, 0xAA5E);
+
+EXTERN_API( OSErr )
+IPMCloseMsg (IPMParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x040C, 0xAA5E);
+
+EXTERN_API( OSErr )
+IPMReadMsg (IPMParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x040D, 0xAA5E);
+
+EXTERN_API( OSErr )
+IPMReadHeader (IPMParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x040E, 0xAA5E);
+
+EXTERN_API( OSErr )
+IPMOpenBlockAsMsg (IPMParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x040F, 0xAA5E);
+
+EXTERN_API( OSErr )
+IPMNewHFSMsg (IPMParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x041E, 0xAA5E);
+
+EXTERN_API( OSErr )
+IPMReadRecipient (IPMParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0410, 0xAA5E);
+
+EXTERN_API( OSErr )
+IPMReadReplyQueue (IPMParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0421, 0xAA5E);
+
+EXTERN_API( OSErr )
+IPMCreateQueue (IPMParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0411, 0xAA5E);
+
+EXTERN_API( OSErr )
+IPMDeleteQueue (IPMParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0412, 0xAA5E);
+
+EXTERN_API( OSErr )
+IPMEnumerateQueue (IPMParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0413, 0xAA5E);
+
+EXTERN_API( OSErr )
+IPMChangeQueueFilter (IPMParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0414, 0xAA5E);
+
+EXTERN_API( OSErr )
+IPMDeleteMsgRange (IPMParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0415, 0xAA5E);
+
+EXTERN_API( OSErr )
+IPMAddRecipient (IPMParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0403, 0xAA5E);
+
+EXTERN_API( OSErr )
+IPMAddReplyQueue (IPMParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x041D, 0xAA5E);
+
+EXTERN_API( OSErr )
+IPMOpenHFSMsg (IPMParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0417, 0xAA5E);
+
+EXTERN_API( OSErr )
+IPMGetBlkIndex (IPMParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0418, 0xAA5E);
+
+EXTERN_API( OSErr )
+IPMGetMsgInfo (IPMParamBlockPtr paramBlock,
+ Boolean async) THREEWORDINLINE(0x3F3C, 0x0419, 0xAA5E);
+
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __OCEMESSAGING__ */
+
diff --git a/include/qt/OCEStandardDirectory.h b/include/qt/OCEStandardDirectory.h
new file mode 100644
index 000000000..31be882a9
--- /dev/null
+++ b/include/qt/OCEStandardDirectory.h
@@ -0,0 +1,652 @@
+/*
+ File: OCEStandardDirectory.h
+
+ Contains: Apple Open Collaboration Environment Standard Directory Interfaces.
+
+ Version: Technology: AOCE Toolbox 1.02
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __OCESTANDARDDIRECTORY__
+#define __OCESTANDARDDIRECTORY__
+
+#ifndef REZ
+#ifndef __ICONS__
+#include "Icons.h"
+#endif
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+
+#ifndef __OCE__
+#include "OCE.h"
+#endif
+
+#ifndef __OCEAUTHDIR__
+#include "OCEAuthDir.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#endif /* REZ */
+
+/* generic icon suites */
+#define genericDirectoryIconResource -16721 /* icl8, icl4, ICN#, ics#, ics4, ics8, sicn */
+#define genericLockedDirectoryIconResource -16716 /* icl8, icl4, ICN#, ics#, ics4, ics8, sicn */
+#define genericRecordIconResource -16722 /* icl8, icl4, ICN#, ics#, ics4, ics8, sicn */
+#define genericAttributeIconResource -16723 /* icl8, icl4, ICN#, ics#, ics4, ics8, sicn */
+#define genericTemplateIconResource -16746 /* icl8, icl4, ICN#, ics#, ics4, ics8 */
+/* standard icon suites */
+#define directoryFolderIconResource -16720 /* icl8, icl4, ICN#, ics#, ics4, ics8, sicn */
+#define lockedDirectoryFolderIconResource -16719 /* icl8, icl4, ICN#, ics#, ics4, ics8, sicn */
+#define personalDirectoryIconResource -16718 /* icl8, icl4, ICN#, ics#, ics4, ics8, sicn */
+#define directoriesIconResource -16717 /* icl8, icl4, ICN#, ics#, ics4, ics8, sicn */
+#define preferredPersonalDirectoryIconResource -16724 /* icl8, icl4, ICN#, ics#, ics4, ics8, sicn */
+/* icon IDs for spinning arrows */
+#define kFirstSpinnerIcon -16745
+#define kLastSpinnerIcon -16738
+/* resource types */
+#define kSDPPanelResourceType 'panl'
+#define kSDPFindPanelResourceType 'find'
+/* Standard FindPanel resource */
+#define kStandardFindLayout -16700
+#ifndef REZ
+/* Prompt For Identity structures */
+enum {
+ kSDPGuestBit = 0,
+ kSDPSpecificIdentityBit = 1,
+ kSDPLocalIdentityBit = 2
+};
+
+/* Values of SDPIdentityKind */
+enum {
+ kSDPGuestMask = 1 << kSDPGuestBit,
+ kSDPSpecificIdentityMask = 1 << kSDPSpecificIdentityBit,
+ kSDPLocalIdentityMask = 1 << kSDPLocalIdentityBit
+};
+
+typedef unsigned short SDPIdentityKind;
+enum {
+ kSDPSuggestionOnly = 0,
+ kSDPRestrictToDirectory = 1,
+ kSDPRestrictToRecord = 2
+};
+
+typedef unsigned short SDPLoginFilterKind;
+
+
+/* Panel Structures */
+/*
+While the panel is in operation, four selection states may exist.
+ 1) kSDPNothingSelected means nothing is selected.
+ 2) kContainSelected means a volume, folder, catalog, dnode, or PAB is selected.
+ 3) kSDPLockedContainerSelected means one of the above, but no access privledges.
+ 4) kSDPRecordSelected means that a record is currently selected.
+*/
+/* Values of SDPSelectionState */
+enum {
+ kSDPNothingSelected = 0,
+ kSDPLockedContainerSelected = 1,
+ kSDPContainerSelected = 2,
+ kSDPRecordSelected = 3,
+ kSDPRecordAliasSelected = 4,
+ kSDPContainerAliasSelected = 5
+};
+
+typedef unsigned short SDPSelectionState;
+
+
+/*
+This type informs the caller of the action the user took, either as the result
+of an event (as returned by SDPPanelEvent) or when SDPOpenSelectedItem is called.
+
+kSDPProcessed means that the event (or call to SDPOpenSelectedItem) resulted in no
+state change.
+
+kSDPSelectedAnItem indicates that the user wants to select the currently-hilited
+record. This is returned, for example, when a user double-clicks on a record.
+
+kSDPChangedSelection implies that the user clicked on a new item (which may mean
+that no item is selected).
+*/
+/* Values of SDPPanelState */
+enum {
+ kSDPProcessed = 0,
+ kSDPSelectedAnItem = 1,
+ kSDPChangedSelection = 2
+};
+
+typedef unsigned short SDPPanelState;
+/*
+Your application may read any of the fields in a SDPPanelRecord, but it should
+use the appropriate routines to make changes to the records with the exception
+of the refCon field which your application may read or write at will. Private
+information follows the SDPPanelRecord, so the handle must not be re-sized.
+*/
+
+struct SDPPanelRecord {
+ Rect bounds;
+ Boolean visible;
+ Boolean enabled;
+ Boolean focused;
+ Byte padByte;
+ AuthIdentity identity;
+ long refCon;
+ Rect listRect;
+ Rect popupRect;
+ short numberOfRows;
+ short rowHeight;
+ Boolean pabMode;
+ Boolean filler1;
+};
+typedef struct SDPPanelRecord SDPPanelRecord;
+
+typedef SDPPanelRecord * SDPPanelPtr;
+typedef SDPPanelPtr * SDPPanelHandle;
+typedef CALLBACK_API( void , PanelBusyProcPtr )(SDPPanelHandle Panel, Boolean busy);
+typedef STACK_UPP_TYPE(PanelBusyProcPtr) PanelBusyUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(PanelBusyUPP)
+ NewPanelBusyUPP (PanelBusyProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposePanelBusyUPP (PanelBusyUPP userUPP);
+
+ EXTERN_API(void)
+ InvokePanelBusyUPP (SDPPanelHandle Panel,
+ Boolean busy,
+ PanelBusyUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppPanelBusyProcInfo = 0x000001C0 }; /* pascal no_return_value Func(4_bytes, 1_byte) */
+ #define NewPanelBusyUPP(userRoutine) (PanelBusyUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPanelBusyProcInfo, GetCurrentArchitecture())
+ #define DisposePanelBusyUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokePanelBusyUPP(Panel, busy, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppPanelBusyProcInfo, (Panel), (busy))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewPanelBusyProc(userRoutine) NewPanelBusyUPP(userRoutine)
+#define CallPanelBusyProc(userRoutine, Panel, busy) InvokePanelBusyUPP(Panel, busy, userRoutine)
+typedef PanelBusyUPP PanelBusyProc;
+/* Find Panel Structures */
+enum {
+ kSDPItemIsSelectedBit = 0,
+ kSDPFindTextExistsBit = 1
+};
+
+/* Values of SDPFindPanelState */
+enum {
+ kSDPItemIsSelectedMask = 1 << kSDPItemIsSelectedBit,
+ kSDPFindTextExistsMask = 1 << kSDPFindTextExistsBit
+};
+
+typedef unsigned short SDPFindPanelState;
+/* Values of SDPFindPanelFocus */
+enum {
+ kSDPFindPanelNoFocus = 0,
+ kSDPFindPanelListHasFocus = 1,
+ kSDPFindPanelTextHasFocus = 2
+};
+
+typedef unsigned short SDPFindPanelFocus;
+
+
+
+struct SDPFindPanelRecord {
+ Point upperLeft;
+ Boolean visible;
+ Boolean enabled;
+ Boolean nowFinding;
+ Byte padByte;
+ SDPFindPanelFocus currentFocus;
+ AuthIdentity identity;
+ short simultaneousSearchCount;
+ long refCon;
+};
+typedef struct SDPFindPanelRecord SDPFindPanelRecord;
+
+typedef SDPFindPanelRecord * SDPFindPanelPtr;
+typedef SDPFindPanelPtr * SDPFindPanelHandle;
+/* Values of SDPFindPanelResult */
+enum {
+ kSDPSelectedAFindItem = 0,
+ kSDPFindSelectionChanged = 1,
+ kSDPFindCompleted = 2,
+ kSDPTextStateChanged = 3,
+ kSDPFocusChanged = 4,
+ kSDPSelectionAndFocusChanged = 5,
+ kSDPMenuChanged = 6,
+ kSDPSelectionAndMenuChanged = 7,
+ kSDPProcessedFind = 8
+};
+
+typedef unsigned short SDPFindPanelResult;
+typedef PackedPathNamePtr * PackedRStringListHandle;
+typedef CALLBACK_API( void , FindPanelBusyProcPtr )(SDPFindPanelHandle findPanel, Boolean busy);
+typedef STACK_UPP_TYPE(FindPanelBusyProcPtr) FindPanelBusyUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(FindPanelBusyUPP)
+ NewFindPanelBusyUPP (FindPanelBusyProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeFindPanelBusyUPP (FindPanelBusyUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeFindPanelBusyUPP (SDPFindPanelHandle findPanel,
+ Boolean busy,
+ FindPanelBusyUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppFindPanelBusyProcInfo = 0x000001C0 }; /* pascal no_return_value Func(4_bytes, 1_byte) */
+ #define NewFindPanelBusyUPP(userRoutine) (FindPanelBusyUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppFindPanelBusyProcInfo, GetCurrentArchitecture())
+ #define DisposeFindPanelBusyUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeFindPanelBusyUPP(findPanel, busy, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppFindPanelBusyProcInfo, (findPanel), (busy))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewFindPanelBusyProc(userRoutine) NewFindPanelBusyUPP(userRoutine)
+#define CallFindPanelBusyProc(userRoutine, findPanel, busy) InvokeFindPanelBusyUPP(findPanel, busy, userRoutine)
+typedef FindPanelBusyUPP FindPanelBusyProc;
+/* Prompt For Identity Routines */
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+SDPPromptForID (AuthIdentity * id,
+ ConstStr255Param guestPrompt,
+ ConstStr255Param specificIDPrompt,
+ ConstStr255Param localIDPrompt,
+ const RString * recordType,
+ SDPIdentityKind permittedKinds,
+ SDPIdentityKind * selectedKind,
+ const RecordID * loginFilter,
+ SDPLoginFilterKind filterKind) FOURWORDINLINE(0x203C, 0x0010, 0x0388, 0xAA5D);
+
+
+
+/*
+SDPNewPanel creates a new panel. You supply the window in which the panel
+is to live, the bounds for the panel (which includes both the menu and the list),
+whether or not the panel is to be initially visible, the initial RLI (nil for
+catalogs and volumes), the types of records that will be shown (only a single
+(non-nil) type which may contain wildcards), the identity by which to browse
+(for access control reasons), and a refCon which is available to the caller.
+*/
+EXTERN_API( OSErr )
+SDPNewPanel (SDPPanelHandle * newPanel,
+ WindowPtr window,
+ const Rect * bounds,
+ Boolean visible,
+ Boolean enabled,
+ const PackedRLI * initialRLI,
+ const RStringPtr * typesList,
+ unsigned long typeCount,
+ AuthIdentity identity,
+ DirEnumChoices enumFlags,
+ DirMatchWith matchTypeHow,
+ long refCon) FOURWORDINLINE(0x203C, 0x0015, 0x0064, 0xAA5D);
+
+
+/*
+SDPSetIdentity Sets the identity used for browsing. NOTE: This call is likely to go
+away if the new authentication scheme works.
+*/
+EXTERN_API( OSErr )
+SDPSetIdentity (SDPPanelHandle panel,
+ AuthIdentity identity) FOURWORDINLINE(0x203C, 0x0004, 0x0073, 0xAA5D);
+
+
+
+
+/*
+SDPGetNewPanel is similar to SDPNewPanel above, except it takes a resource id of a
+'panl' resource.
+*/
+EXTERN_API( OSErr )
+SDPGetNewPanel (SDPPanelHandle * newPanel,
+ short resourceID,
+ WindowPtr window,
+ const PackedRLI * initialRLI,
+ AuthIdentity identity) FOURWORDINLINE(0x203C, 0x0009, 0x0065, 0xAA5D);
+
+
+/*
+Call this when you're completely done with a panel. It deallocates all of the
+associated data structures.
+*/
+EXTERN_API( OSErr )
+SDPDisposePanel (SDPPanelHandle panel) FOURWORDINLINE(0x203C, 0x0002, 0x0066, 0xAA5D);
+
+
+/*
+If the panel is visible, it makes it invisible by hiding the menu, turning off
+drawing of the list, and erasing and invaling the list's rectangle.
+*/
+EXTERN_API( OSErr )
+SDPHidePanel (SDPPanelHandle panel) FOURWORDINLINE(0x203C, 0x0002, 0x0067, 0xAA5D);
+
+
+/* If the panel is invisible, it makes it visible and draws it. */
+EXTERN_API( OSErr )
+SDPShowPanel (SDPPanelHandle panel) FOURWORDINLINE(0x203C, 0x0002, 0x0068, 0xAA5D);
+
+
+/* Disables the list and menu so that it won't accept any commands. */
+EXTERN_API( OSErr )
+SDPEnablePanel (SDPPanelHandle panel,
+ Boolean enable) FOURWORDINLINE(0x203C, 0x0003, 0x0069, 0xAA5D);
+
+/*
+Move the upper-left-hand corner of the panel to (h,v), given in local coordinates of
+the panel's window.
+*/
+EXTERN_API( OSErr )
+SDPMovePanel (SDPPanelHandle panel,
+ short h,
+ short v) FOURWORDINLINE(0x203C, 0x0004, 0x006B, 0xAA5D);
+
+
+/*
+Resizes the panel to have the given width and height (keeping the upper-left-hand
+corner in a fixed position).
+*/
+EXTERN_API( OSErr )
+SDPSizePanel (SDPPanelHandle panel,
+ short width,
+ short height) FOURWORDINLINE(0x203C, 0x0004, 0x006C, 0xAA5D);
+
+
+/*
+This routine simulates a double-click on the selected item (if there is no selected
+item, then it does nothing), and it returns the result of that "double-click" via the
+whatHappened parameter. If a container is selected, then that container will be
+opened and kMovedDownTheHierarchy is returned. If, however, the user is at the lowest
+level in the hierarchy, then kSDPSelectedAnItem is returned.
+*/
+EXTERN_API( OSErr )
+SDPOpenSelectedItem (SDPPanelHandle panel,
+ SDPPanelState * whatHappened) FOURWORDINLINE(0x203C, 0x0004, 0x006D, 0xAA5D);
+
+
+/*
+Returns whether a record is selected, something else is selected, or nothing is
+selected.
+*/
+EXTERN_API( OSErr )
+SDPGetPanelSelectionState (SDPPanelHandle panel,
+ SDPSelectionState * itsState) FOURWORDINLINE(0x203C, 0x0004, 0x006E, 0xAA5D);
+
+
+/*
+Returns the size of the currently-selected DSSpec, or zero if a record is
+not selected. It is safe to do a NewPtr (SDPGetPanelSelectionSize (...))
+*/
+EXTERN_API( OSErr )
+SDPGetPanelSelectionSize (SDPPanelHandle panel,
+ unsigned short * dsSpecSize) FOURWORDINLINE(0x203C, 0x0004, 0x0072, 0xAA5D);
+
+
+/*
+Returns the currently-selected DSSpec, or a zero-lengthed
+DSSpec if a record is not selected. It is assumed that the selection
+buffer allocated is large enough.
+*/
+EXTERN_API( OSErr )
+SDPGetPanelSelection (SDPPanelHandle panel,
+ PackedDSSpec * selection) FOURWORDINLINE(0x203C, 0x0004, 0x006F, 0xAA5D);
+
+
+/*
+Forces browsing to the specified RLI. If prli is the current RLI, then it does
+nothing.
+*/
+EXTERN_API( OSErr )
+SDPSetPath (SDPPanelHandle panel,
+ const PackedRLI * prli) FOURWORDINLINE(0x203C, 0x0004, 0x0070, 0xAA5D);
+
+
+/*
+This is the main driver for the panel. You should pass all events to SDPPanelEvent
+including NULL events. If you have more than 1 panel, you will need to
+call SDPPanelEvent for each panel. NOTE: For Update Events you will also need to call
+SDPUpdatePanel as described below.
+*/
+EXTERN_API( OSErr )
+SDPPanelEvent (SDPPanelHandle panel,
+ const EventRecord * theEvent,
+ SDPPanelState * whatHappened) FOURWORDINLINE(0x203C, 0x0006, 0x0071, 0xAA5D);
+
+
+
+/*
+SDPUpdatePanel should be called in response to an update event. Generally you will
+have first called BeginUpdate, and pass the windows visRgn as theRgn. If NULL
+is passed for theRgn the entire panel is re-drawn. NOTE: Drawing is not cliped to
+theRgn, if this is desired, you must first call SetClip.
+*/
+EXTERN_API( OSErr )
+SDPUpdatePanel (SDPPanelHandle panel,
+ RgnHandle theRgn) FOURWORDINLINE(0x203C, 0x0004, 0x006A, 0xAA5D);
+
+
+/*
+SDPSelectString scrolls and selects the closest matching string at the current
+level. This is the same behavior as if the user typed in the given string.
+*/
+EXTERN_API( OSErr )
+SDPSelectString (SDPPanelHandle panel,
+ const RString * name) FOURWORDINLINE(0x203C, 0x0004, 0x0074, 0xAA5D);
+
+/*
+SDPGetPathLength returns the length in bytes required to hold the current path name
+in RLI format. This corresponds to the path name in the popup menu.
+*/
+EXTERN_API( OSErr )
+SDPGetPathLength (SDPPanelHandle panel,
+ unsigned short * pathNameLength) FOURWORDINLINE(0x203C, 0x0004, 0x0075, 0xAA5D);
+
+/* SDPGetPath returns the current rli. */
+EXTERN_API( OSErr )
+SDPGetPath (SDPPanelHandle panel,
+ PackedRLI * prli,
+ short * dsRefNum) FOURWORDINLINE(0x203C, 0x0006, 0x0076, 0xAA5D);
+
+/*
+SDPSetFocus will draw the focus rectangle or erase the focus rectangle depending upon
+the focus boolean.
+*/
+EXTERN_API( OSErr )
+SDPSetFocus (SDPPanelHandle panel,
+ Boolean focus) FOURWORDINLINE(0x203C, 0x0003, 0x0077, 0xAA5D);
+
+/*
+SDPSetPanelBalloonHelp allows clients to specify a STR# resource id to use for
+balloon help. Balloon help is unavailable until this call is made.
+*/
+EXTERN_API( OSErr )
+SDPSetPanelBalloonHelp (SDPPanelHandle panel,
+ short balloonHelpID) FOURWORDINLINE(0x203C, 0x0003, 0x0078, 0xAA5D);
+
+/*
+SDPInstallPanelBusyProc allows clients to install a CB that will be called while
+the panel is aynchronously busy.
+*/
+EXTERN_API( OSErr )
+SDPInstallPanelBusyProc (SDPPanelHandle panel,
+ PanelBusyProc busyProc) FOURWORDINLINE(0x203C, 0x0004, 0x0079, 0xAA5D);
+
+EXTERN_API( OSErr )
+SDPNewFindPanel (SDPFindPanelHandle * newPanel,
+ WindowPtr window,
+ Point upperLeft,
+ short layoutResourceID,
+ Boolean visible,
+ Boolean enabled,
+ const RStringPtr * typesList,
+ long typeCount,
+ DirMatchWith matchTypeHow,
+ AuthIdentity identity,
+ short simultaneousSearchCount,
+ SDPFindPanelFocus initialFocus,
+ long refCon) FOURWORDINLINE(0x203C, 0x0014, 0x08FC, 0xAA5D);
+
+EXTERN_API( OSErr )
+SDPDisposeFindPanel (SDPFindPanelHandle findPanel) FOURWORDINLINE(0x203C, 0x0002, 0x08FD, 0xAA5D);
+
+EXTERN_API( OSErr )
+SDPStartFind (SDPFindPanelHandle findPanel) FOURWORDINLINE(0x203C, 0x0002, 0x08FE, 0xAA5D);
+
+EXTERN_API( OSErr )
+SDPStopFind (SDPFindPanelHandle findPanel) FOURWORDINLINE(0x203C, 0x0002, 0x08FF, 0xAA5D);
+
+EXTERN_API( OSErr )
+SDPFindPanelEvent (SDPFindPanelHandle findPanel,
+ const EventRecord * event,
+ SDPFindPanelResult * whatHappened) FOURWORDINLINE(0x203C, 0x0006, 0x0900, 0xAA5D);
+
+EXTERN_API( OSErr )
+SDPUpdateFindPanel (SDPFindPanelHandle findPanel,
+ RgnHandle theRgn) FOURWORDINLINE(0x203C, 0x0004, 0x0901, 0xAA5D);
+
+EXTERN_API( OSErr )
+SDPShowFindPanel (SDPFindPanelHandle findPanel) FOURWORDINLINE(0x203C, 0x0002, 0x0902, 0xAA5D);
+
+EXTERN_API( OSErr )
+SDPHideFindPanel (SDPFindPanelHandle findPanel) FOURWORDINLINE(0x203C, 0x0002, 0x0903, 0xAA5D);
+
+EXTERN_API( OSErr )
+SDPMoveFindPanel (SDPFindPanelHandle findPanel,
+ short h,
+ short v) FOURWORDINLINE(0x203C, 0x0004, 0x0904, 0xAA5D);
+
+EXTERN_API( OSErr )
+SDPEnableFindPanel (SDPFindPanelHandle findPanel,
+ Boolean enabled) FOURWORDINLINE(0x203C, 0x0003, 0x0905, 0xAA5D);
+
+EXTERN_API( OSErr )
+SDPSetFindPanelFocus (SDPFindPanelHandle findPanel,
+ SDPFindPanelFocus newFocus) FOURWORDINLINE(0x203C, 0x0003, 0x0906, 0xAA5D);
+
+EXTERN_API( OSErr )
+SDPGetFindPanelState (SDPFindPanelHandle findPanel,
+ SDPFindPanelState * itsState) FOURWORDINLINE(0x203C, 0x0004, 0x0907, 0xAA5D);
+
+EXTERN_API( OSErr )
+SDPGetFindPanelSelectionSize (SDPFindPanelHandle findPanel,
+ unsigned short * size) FOURWORDINLINE(0x203C, 0x0004, 0x0908, 0xAA5D);
+
+EXTERN_API( OSErr )
+SDPGetFindPanelSelection (SDPFindPanelHandle findPanel,
+ PackedDSSpec * selection) FOURWORDINLINE(0x203C, 0x0004, 0x0909, 0xAA5D);
+
+EXTERN_API( OSErr )
+SDPSetFindPanelBalloonHelp (SDPFindPanelHandle findPanel,
+ short balloonHelpID) FOURWORDINLINE(0x203C, 0x0003, 0x090A, 0xAA5D);
+
+EXTERN_API( OSErr )
+SDPSetFindIdentity (SDPFindPanelHandle findPanel,
+ AuthIdentity identity) FOURWORDINLINE(0x203C, 0x0004, 0x090B, 0xAA5D);
+
+EXTERN_API( OSErr )
+SDPInstallFindPanelBusyProc (SDPFindPanelHandle findPanel,
+ FindPanelBusyProc busyProc) FOURWORDINLINE(0x203C, 0x0004, 0x090C, 0xAA5D);
+
+
+
+EXTERN_API( OSErr )
+SDPGetIconByType (const RString * recordType,
+ IconSelectorValue whichIcons,
+ Handle * iconSuite) THREEWORDINLINE(0x303C, 0x0400, 0xAA5C);
+
+EXTERN_API( OSErr )
+SDPGetDSSpecIcon (const PackedDSSpec * packedDSSpec,
+ IconSelectorValue whichIcons,
+ Handle * iconSuite) THREEWORDINLINE(0x303C, 0x0401, 0xAA5C);
+
+EXTERN_API( OSErr )
+SDPGetCategories (PackedRStringListHandle * categories,
+ PackedRStringListHandle * displayNames) THREEWORDINLINE(0x303C, 0x0402, 0xAA5C);
+
+EXTERN_API( OSErr )
+SDPGetCategoryTypes (const RString * category,
+ PackedRStringListHandle * types) THREEWORDINLINE(0x303C, 0x0403, 0xAA5C);
+
+
+
+
+EXTERN_API( OSErr )
+SDPResolveAliasFile (FSSpecPtr fileSpec,
+ PackedDSSpecHandle resolvedDSSpec,
+ AuthIdentity identity,
+ Boolean mayPromptUser) FOURWORDINLINE(0x203C, 0x0007, 0x0E74, 0xAA5D);
+
+EXTERN_API( OSErr )
+SDPResolveAliasDSSpec (PackedDSSpecHandle theAliasDSSpec,
+ AuthIdentity identity,
+ Boolean mayPromptUser) FOURWORDINLINE(0x203C, 0x0005, 0x0E75, 0xAA5D);
+
+EXTERN_API( OSErr )
+SDPRepairPersonalDirectory (FSSpec * pd,
+ Boolean showProgress) FOURWORDINLINE(0x203C, 0x0003, 0x1A2C, 0xAA5D);
+
+
+#endif /* REZ */
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __OCESTANDARDDIRECTORY__ */
+
diff --git a/include/qt/OCEStandardMail.h b/include/qt/OCEStandardMail.h
new file mode 100644
index 000000000..7b904b807
--- /dev/null
+++ b/include/qt/OCEStandardMail.h
@@ -0,0 +1,756 @@
+/*
+ File: OCEStandardMail.h
+
+ Contains: Apple Open Collaboration Environment Standard Mail Interfaces.
+
+ Version: Technology: AOCE Toolbox 1.02
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __OCESTANDARDMAIL__
+#define __OCESTANDARDMAIL__
+
+#ifndef __APPLEEVENTS__
+#include "AppleEvents.h"
+#endif
+
+#ifndef __DIALOGS__
+#include "Dialogs.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+
+#ifndef __OCEAUTHDIR__
+#include "OCEAuthDir.h"
+#endif
+
+#ifndef __OCEMAIL__
+#include "OCEMail.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ kSMPVersion = 1
+};
+
+enum {
+ kSMPNativeFormatName = FOUR_CHAR_CODE('natv')
+};
+
+
+struct LetterSpec {
+ unsigned long spec[3];
+};
+typedef struct LetterSpec LetterSpec;
+enum {
+ typeLetterSpec = FOUR_CHAR_CODE('lttr')
+};
+
+/* Wildcard used for filtering letter types. */
+enum {
+ FilterAnyLetter = FOUR_CHAR_CODE('ltr*'),
+ FilterAppleLetterContent = FOUR_CHAR_CODE('ltc*'),
+ FilterImageContent = FOUR_CHAR_CODE('lti*')
+};
+
+
+
+struct LetterDescriptor {
+ Boolean onDisk;
+ Boolean filler1;
+ union {
+ FSSpec fileSpec;
+ LetterSpec mailboxSpec;
+ } u;
+};
+typedef struct LetterDescriptor LetterDescriptor;
+/*
+SMPPSendAs values. You may add the following values together to determine how the
+file is sent, but you may not set both kSMPSendAsEnclosureMask and kSMPSendFileOnlyMask. This
+will allow you to send the letter as an image so that it will work with fax gateways
+and send as an enclosure as well.
+*/
+enum {
+ kSMPSendAsEnclosureBit = 0, /* Appears as letter with enclosures */
+ kSMPSendFileOnlyBit = 1, /* Appears as a file in mailbox. */
+ kSMPSendAsImageBit = 2 /* Content imaged in letter */
+};
+
+/* Values of SMPPSendAs */
+enum {
+ kSMPSendAsEnclosureMask = 1 << kSMPSendAsEnclosureBit,
+ kSMPSendFileOnlyMask = 1 << kSMPSendFileOnlyBit,
+ kSMPSendAsImageMask = 1 << kSMPSendAsImageBit
+};
+
+
+typedef Byte SMPPSendAs;
+/* Send Package Structures */
+typedef CALLBACK_API( void , SMPDrawImageProcPtr )(long refcon, Boolean inColor);
+typedef STACK_UPP_TYPE(SMPDrawImageProcPtr) SMPDrawImageUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(SMPDrawImageUPP)
+ NewSMPDrawImageUPP (SMPDrawImageProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeSMPDrawImageUPP (SMPDrawImageUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeSMPDrawImageUPP (long refcon,
+ Boolean inColor,
+ SMPDrawImageUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppSMPDrawImageProcInfo = 0x000001C0 }; /* pascal no_return_value Func(4_bytes, 1_byte) */
+ #define NewSMPDrawImageUPP(userRoutine) (SMPDrawImageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSMPDrawImageProcInfo, GetCurrentArchitecture())
+ #define DisposeSMPDrawImageUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeSMPDrawImageUPP(refcon, inColor, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppSMPDrawImageProcInfo, (refcon), (inColor))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewSMPDrawImageProc(userRoutine) NewSMPDrawImageUPP(userRoutine)
+#define CallSMPDrawImageProc(userRoutine, refcon, inColor) InvokeSMPDrawImageUPP(refcon, inColor, userRoutine)
+
+struct SMPRecipientDescriptor {
+ struct SMPRecipientDescriptor * next; /* Q-Link. */
+ OSErr result; /* result code when using the object. */
+ OCEPackedRecipient * recipient; /* Pointer to a Packed Address. */
+ unsigned long size; /* length of recipient in bytes. */
+ MailRecipient theAddress; /* structure points into recipient and theRID. */
+ RecordID theRID; /* structure points into recipient. */
+};
+typedef struct SMPRecipientDescriptor SMPRecipientDescriptor;
+typedef SMPRecipientDescriptor * SMPRecipientDescriptorPtr;
+
+struct SMPEnclosureDescriptor {
+ struct SMPEnclosureDescriptor * next;
+ OSErr result;
+ FSSpec fileSpec;
+ OSType fileCreator; /* Creator of this enclosure. */
+ OSType fileType; /* File Type of this enclosure. */
+};
+typedef struct SMPEnclosureDescriptor SMPEnclosureDescriptor;
+typedef SMPEnclosureDescriptor * SMPEnclosureDescriptorPtr;
+
+struct SMPLetterPB {
+ OSErr result; /* result of operation */
+ RStringPtr subject; /* RString */
+ AuthIdentity senderIdentity; /* Letter is sent from this Identity */
+ SMPRecipientDescriptorPtr toList; /* Pointer to linked list */
+ SMPRecipientDescriptorPtr ccList; /* Pointer to linked list */
+ SMPRecipientDescriptorPtr bccList; /* Pointer to linked list */
+ ScriptCode script; /* Identifier for language */
+ Size textSize; /* length of body data */
+ void * textBuffer; /* body of the letter */
+ SMPPSendAs sendAs; /* Send as Letter,Enclosure,Image */
+ Byte padByte;
+ SMPEnclosureDescriptorPtr enclosures; /* files to be enclosed */
+ SMPDrawImageUPP drawImageProc; /* For imaging */
+ long imageRefCon; /* For imaging */
+ Boolean supportsColor; /* For imaging - set to true if you application supports color imaging */
+ Boolean filler1;
+};
+typedef struct SMPLetterPB SMPLetterPB;
+typedef SMPLetterPB * SMPLetterPBPtr;
+enum {
+ kSMPAppMustHandleEventBit = 0,
+ kSMPAppShouldIgnoreEventBit = 1,
+ kSMPContractedBit = 2,
+ kSMPExpandedBit = 3,
+ kSMPMailerBecomesTargetBit = 4,
+ kSMPAppBecomesTargetBit = 5,
+ kSMPCursorOverMailerBit = 6,
+ kSMPCreateCopyWindowBit = 7,
+ kSMPDisposeCopyWindowBit = 8
+};
+
+/* Values of SMPMailerResult */
+enum {
+ kSMPAppMustHandleEventMask = 1 << kSMPAppMustHandleEventBit,
+ kSMPAppShouldIgnoreEventMask = 1 << kSMPAppShouldIgnoreEventBit,
+ kSMPContractedMask = 1 << kSMPContractedBit,
+ kSMPExpandedMask = 1 << kSMPExpandedBit,
+ kSMPMailerBecomesTargetMask = 1 << kSMPMailerBecomesTargetBit,
+ kSMPAppBecomesTargetMask = 1 << kSMPAppBecomesTargetBit,
+ kSMPCursorOverMailerMask = 1 << kSMPCursorOverMailerBit,
+ kSMPCreateCopyWindowMask = 1 << kSMPCreateCopyWindowBit,
+ kSMPDisposeCopyWindowMask = 1 << kSMPDisposeCopyWindowBit
+};
+
+
+typedef unsigned long SMPMailerResult;
+/* Values of SMPMailerComponent*/
+enum {
+ kSMPOther = -1,
+ kSMPFrom = 32,
+ kSMPTo = 20,
+ kSMPRegarding = 22,
+ kSMPSendDateTime = 29,
+ kSMPAttachments = 26,
+ kSMPAddressOMatic = 16
+};
+
+typedef unsigned long SMPMailerComponent;
+
+enum {
+ kSMPToAddress = kMailToBit,
+ kSMPCCAddress = kMailCcBit,
+ kSMPBCCAddress = kMailBccBit
+};
+
+typedef MailAttributeID SMPAddressType;
+
+enum {
+ kSMPUndoCommand = 0,
+ kSMPCutCommand = 1,
+ kSMPCopyCommand = 2,
+ kSMPPasteCommand = 3,
+ kSMPClearCommand = 4,
+ kSMPSelectAllCommand = 5
+};
+
+typedef unsigned short SMPEditCommand;
+enum {
+ kSMPUndoDisabled = 0,
+ kSMPAppMayUndo = 1,
+ kSMPMailerUndo = 2
+};
+
+typedef unsigned short SMPUndoState;
+/*
+SMPSendFormatMask:
+
+Bitfield indicating which combinations of formats are included in,
+should be included or, or can be included in a letter.
+*/
+enum {
+ kSMPNativeBit = 0,
+ kSMPImageBit = 1,
+ kSMPStandardInterchangeBit = 2
+};
+
+/* Values of SMPSendFormatMask */
+enum {
+ kSMPNativeMask = 1 << kSMPNativeBit,
+ kSMPImageMask = 1 << kSMPImageBit,
+ kSMPStandardInterchangeMask = 1 << kSMPStandardInterchangeBit
+};
+
+typedef unsigned long SMPSendFormatMask;
+
+/*
+ Pseudo-events passed to the clients filter proc for initialization and cleanup.
+*/
+enum {
+ kSMPSendOptionsStart = -1,
+ kSMPSendOptionsEnd = -2
+};
+
+
+/*
+SMPSendFormatMask:
+
+Structure describing the format of a letter. If kSMPNativeMask bit is set, the whichNativeFormat field indicates which of the client-defined formats to use.
+*/
+
+
+struct SMPSendFormat {
+ SMPSendFormatMask whichFormats;
+ short whichNativeFormat; /* 0 based */
+};
+typedef struct SMPSendFormat SMPSendFormat;
+
+
+
+struct SMPLetterInfo {
+ OSType letterCreator;
+ OSType letterType;
+ RString32 subject;
+ RString32 sender;
+};
+typedef struct SMPLetterInfo SMPLetterInfo;
+
+enum {
+ kSMPSave = 0,
+ kSMPSaveAs = 1,
+ kSMPSaveACopy = 2
+};
+
+
+typedef unsigned short SMPSaveType;
+typedef CALLBACK_API( WindowPtr , FrontWindowProcPtr )(long clientData);
+typedef CALLBACK_API( void , PrepareMailerForDrawingProcPtr )(WindowPtr window, long clientData);
+typedef STACK_UPP_TYPE(FrontWindowProcPtr) FrontWindowUPP;
+typedef STACK_UPP_TYPE(PrepareMailerForDrawingProcPtr) PrepareMailerForDrawingUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(FrontWindowUPP)
+ NewFrontWindowUPP (FrontWindowProcPtr userRoutine);
+
+ EXTERN_API(PrepareMailerForDrawingUPP)
+ NewPrepareMailerForDrawingUPP (PrepareMailerForDrawingProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeFrontWindowUPP (FrontWindowUPP userUPP);
+
+ EXTERN_API(void)
+ DisposePrepareMailerForDrawingUPP (PrepareMailerForDrawingUPP userUPP);
+
+ EXTERN_API(WindowPtr)
+ InvokeFrontWindowUPP (long clientData,
+ FrontWindowUPP userUPP);
+
+ EXTERN_API(void)
+ InvokePrepareMailerForDrawingUPP (WindowPtr window,
+ long clientData,
+ PrepareMailerForDrawingUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppFrontWindowProcInfo = 0x000000F0 }; /* pascal 4_bytes Func(4_bytes) */
+ enum { uppPrepareMailerForDrawingProcInfo = 0x000003C0 }; /* pascal no_return_value Func(4_bytes, 4_bytes) */
+ #define NewFrontWindowUPP(userRoutine) (FrontWindowUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppFrontWindowProcInfo, GetCurrentArchitecture())
+ #define NewPrepareMailerForDrawingUPP(userRoutine) (PrepareMailerForDrawingUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPrepareMailerForDrawingProcInfo, GetCurrentArchitecture())
+ #define DisposeFrontWindowUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposePrepareMailerForDrawingUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeFrontWindowUPP(clientData, userUPP) (WindowPtr)CALL_ONE_PARAMETER_UPP((userUPP), uppFrontWindowProcInfo, (clientData))
+ #define InvokePrepareMailerForDrawingUPP(window, clientData, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppPrepareMailerForDrawingProcInfo, (window), (clientData))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewFrontWindowProc(userRoutine) NewFrontWindowUPP(userRoutine)
+#define NewPrepareMailerForDrawingProc(userRoutine) NewPrepareMailerForDrawingUPP(userRoutine)
+#define CallFrontWindowProc(userRoutine, clientData) InvokeFrontWindowUPP(clientData, userRoutine)
+#define CallPrepareMailerForDrawingProc(userRoutine, window, clientData) InvokePrepareMailerForDrawingUPP(window, clientData, userRoutine)
+typedef CALLBACK_API( Boolean , SendOptionsFilterProcPtr )(DialogPtr theDialog, EventRecord *theEvent, short itemHit, long clientData);
+typedef STACK_UPP_TYPE(SendOptionsFilterProcPtr) SendOptionsFilterUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(SendOptionsFilterUPP)
+ NewSendOptionsFilterUPP (SendOptionsFilterProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeSendOptionsFilterUPP (SendOptionsFilterUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeSendOptionsFilterUPP (DialogPtr theDialog,
+ EventRecord * theEvent,
+ short itemHit,
+ long clientData,
+ SendOptionsFilterUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppSendOptionsFilterProcInfo = 0x00003BD0 }; /* pascal 1_byte Func(4_bytes, 4_bytes, 2_bytes, 4_bytes) */
+ #define NewSendOptionsFilterUPP(userRoutine) (SendOptionsFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSendOptionsFilterProcInfo, GetCurrentArchitecture())
+ #define DisposeSendOptionsFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeSendOptionsFilterUPP(theDialog, theEvent, itemHit, clientData, userUPP) (Boolean)CALL_FOUR_PARAMETER_UPP((userUPP), uppSendOptionsFilterProcInfo, (theDialog), (theEvent), (itemHit), (clientData))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewSendOptionsFilterProc(userRoutine) NewSendOptionsFilterUPP(userRoutine)
+#define CallSendOptionsFilterProc(userRoutine, theDialog, theEvent, itemHit, clientData) InvokeSendOptionsFilterUPP(theDialog, theEvent, itemHit, clientData, userRoutine)
+
+struct SMPMailerState {
+ short mailerCount;
+ short currentMailer;
+ Point upperLeft;
+ Boolean hasBeenReceived;
+ Boolean isTarget;
+ Boolean isExpanded;
+ Boolean canMoveToTrash;
+ Boolean canTag;
+ Byte padByte2;
+ unsigned long changeCount;
+ SMPMailerComponent targetComponent;
+ Boolean canCut;
+ Boolean canCopy;
+ Boolean canPaste;
+ Boolean canClear;
+ Boolean canSelectAll;
+ Byte padByte3;
+ SMPUndoState undoState;
+ Str63 undoWhat;
+};
+typedef struct SMPMailerState SMPMailerState;
+
+
+struct SMPSendOptions {
+ Boolean signWhenSent;
+ IPMPriority priority;
+};
+typedef struct SMPSendOptions SMPSendOptions;
+typedef SMPSendOptions * SMPSendOptionsPtr;
+typedef SMPSendOptionsPtr * SMPSendOptionsHandle;
+
+
+struct SMPCloseOptions {
+ Boolean moveToTrash;
+ Boolean addTag;
+ RString32 tag;
+};
+typedef struct SMPCloseOptions SMPCloseOptions;
+typedef SMPCloseOptions * SMPCloseOptionsPtr;
+
+/*----------------------------------------------------------------------------------------
+ Send Package Routines
+----------------------------------------------------------------------------------------*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+SMPSendLetter (SMPLetterPBPtr theLetter) FOURWORDINLINE(0x203C, 0x0002, 0x01F4, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPNewPage (OpenCPicParams * newHeader) FOURWORDINLINE(0x203C, 0x0002, 0x0834, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPImageErr (void) FOURWORDINLINE(0x203C, 0x0000, 0x0835, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPResolveToRecipient (PackedDSSpecPtr dsSpec,
+ SMPRecipientDescriptorPtr * recipientList,
+ AuthIdentity identity) FOURWORDINLINE(0x203C, 0x0006, 0x044C, 0xAA5D);
+
+
+
+EXTERN_API( OSErr )
+SMPInitMailer (long mailerVersion) FOURWORDINLINE(0x203C, 0x0002, 0x1285, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPGetDimensions (short * width,
+ short * contractedHeight,
+ short * expandedHeight) FOURWORDINLINE(0x203C, 0x0006, 0x125C, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPGetTabInfo (SMPMailerComponent * firstTab,
+ SMPMailerComponent * lastTab) FOURWORDINLINE(0x203C, 0x0004, 0x1274, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPNewMailer (WindowPtr window,
+ Point upperLeft,
+ Boolean canContract,
+ Boolean initiallyExpanded,
+ AuthIdentity identity,
+ PrepareMailerForDrawingUPP prepareMailerForDrawingCB,
+ long clientData) FOURWORDINLINE(0x203C, 0x000C, 0x125D, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPPrepareToClose (WindowPtr window) FOURWORDINLINE(0x203C, 0x0002, 0x1287, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPCloseOptionsDialog (WindowPtr window,
+ SMPCloseOptionsPtr closeOptions) FOURWORDINLINE(0x203C, 0x0004, 0x1288, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPTagDialog (WindowPtr window,
+ RString32 * theTag) FOURWORDINLINE(0x203C, 0x0004, 0x128B, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPDisposeMailer (WindowPtr window,
+ SMPCloseOptionsPtr closeOptions) FOURWORDINLINE(0x203C, 0x0004, 0x125E, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPMailerEvent (const EventRecord * event,
+ SMPMailerResult * whatHappened,
+ FrontWindowUPP frontWindowCB,
+ long clientData) FOURWORDINLINE(0x203C, 0x0008, 0x125F, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPClearUndo (WindowPtr window) FOURWORDINLINE(0x203C, 0x0002, 0x1275, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPMailerEditCommand (WindowPtr window,
+ SMPEditCommand command,
+ SMPMailerResult * whatHappened) FOURWORDINLINE(0x203C, 0x0005, 0x1260, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPMailerForward (WindowPtr window,
+ AuthIdentity from) FOURWORDINLINE(0x203C, 0x0004, 0x1261, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPMailerReply (WindowPtr originalLetter,
+ WindowPtr newLetter,
+ Boolean replyToAll,
+ Point upperLeft,
+ Boolean canContract,
+ Boolean initiallyExpanded,
+ AuthIdentity identity,
+ PrepareMailerForDrawingUPP prepareMailerForDrawingCB,
+ long clientData) FOURWORDINLINE(0x203C, 0x000F, 0x1262, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPGetMailerState (WindowPtr window,
+ SMPMailerState * itsState) FOURWORDINLINE(0x203C, 0x0004, 0x1263, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPSendOptionsDialog (WindowPtr window,
+ Str255 documentName,
+ StringPtr nativeFormatNames[],
+ unsigned short nameCount,
+ SMPSendFormatMask canSend,
+ SMPSendFormat * currentFormat,
+ SendOptionsFilterUPP filterProc,
+ long clientData,
+ SMPSendFormat * shouldSend,
+ SMPSendOptionsPtr sendOptions) FOURWORDINLINE(0x203C, 0x0013, 0x1388, 0xAA5D);
+
+
+EXTERN_API( OSErr )
+SMPPrepareCoverPages (WindowPtr window,
+ short * pageCount) FOURWORDINLINE(0x203C, 0x0004, 0x1264, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPDrawNthCoverPage (WindowPtr window,
+ short pageNumber,
+ Boolean doneDrawingCoverPages) FOURWORDINLINE(0x203C, 0x0004, 0x1265, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPPrepareToChange (WindowPtr window) FOURWORDINLINE(0x203C, 0x0002, 0x1289, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPContentChanged (WindowPtr window) FOURWORDINLINE(0x203C, 0x0002, 0x126F, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPBeginSave (WindowPtr window,
+ const FSSpec * diskLetter,
+ OSType creator,
+ OSType fileType,
+ SMPSaveType saveType,
+ Boolean * mustAddContent) FOURWORDINLINE(0x203C, 0x000B, 0x1266, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPEndSave (WindowPtr window,
+ Boolean okToSave) FOURWORDINLINE(0x203C, 0x0003, 0x1270, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPBeginSend (WindowPtr window,
+ OSType creator,
+ OSType fileType,
+ SMPSendOptionsPtr sendOptions,
+ Boolean * mustAddContent) FOURWORDINLINE(0x203C, 0x000A, 0x1267, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPEndSend (WindowPtr window,
+ Boolean okToSend) FOURWORDINLINE(0x203C, 0x0003, 0x1271, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPOpenLetter (const LetterDescriptor * letter,
+ WindowPtr window,
+ Point upperLeft,
+ Boolean canContract,
+ Boolean initiallyExpanded,
+ PrepareMailerForDrawingUPP prepareMailerForDrawingCB,
+ long clientData) FOURWORDINLINE(0x203C, 0x000C, 0x1268, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPAddMainEnclosure (WindowPtr window,
+ const FSSpec * enclosure) FOURWORDINLINE(0x203C, 0x0004, 0x127D, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPGetMainEnclosureFSSpec (WindowPtr window,
+ FSSpec * enclosureDir) FOURWORDINLINE(0x203C, 0x0004, 0x127E, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPAddContent (WindowPtr window,
+ MailSegmentType segmentType,
+ Boolean appendFlag,
+ void * buffer,
+ unsigned long bufferSize,
+ StScrpRec * textScrap,
+ Boolean startNewScript,
+ ScriptCode script) FOURWORDINLINE(0x203C, 0x000C, 0x127A, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPReadContent (WindowPtr window,
+ MailSegmentMask segmentTypeMask,
+ void * buffer,
+ unsigned long bufferSize,
+ unsigned long * dataSize,
+ StScrpRec * textScrap,
+ ScriptCode * script,
+ MailSegmentType * segmentType,
+ Boolean * endOfScript,
+ Boolean * endOfSegment,
+ Boolean * endOfContent,
+ long * segmentLength,
+ long * segmentID) FOURWORDINLINE(0x203C, 0x0019, 0x127B, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPGetFontNameFromLetter (WindowPtr window,
+ short fontNum,
+ Str255 fontName,
+ Boolean doneWithFontTable) FOURWORDINLINE(0x203C, 0x0006, 0x127C, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPAddBlock (WindowPtr window,
+ const OCECreatorType * blockType,
+ Boolean append,
+ void * buffer,
+ unsigned long bufferSize,
+ MailBlockMode mode,
+ unsigned long offset) FOURWORDINLINE(0x203C, 0x000C, 0x127F, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPReadBlock (WindowPtr window,
+ const OCECreatorType * blockType,
+ unsigned short blockIndex,
+ void * buffer,
+ unsigned long bufferSize,
+ unsigned long dataOffset,
+ unsigned long * dataSize,
+ Boolean * endOfBlock,
+ unsigned long * remaining) FOURWORDINLINE(0x203C, 0x0011, 0x1280, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPEnumerateBlocks (WindowPtr window,
+ unsigned short startIndex,
+ void * buffer,
+ unsigned long bufferSize,
+ unsigned long * dataSize,
+ unsigned short * nextIndex,
+ Boolean * more) FOURWORDINLINE(0x203C, 0x000D, 0x1281, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPDrawMailer (WindowPtr window) FOURWORDINLINE(0x203C, 0x0002, 0x1269, 0xAA5D);
+
+
+EXTERN_API( OSErr )
+SMPSetSubject (WindowPtr window,
+ const RString * text) FOURWORDINLINE(0x203C, 0x0004, 0x126B, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPSetFromIdentity (WindowPtr window,
+ AuthIdentity from) FOURWORDINLINE(0x203C, 0x0004, 0x126C, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPAddAddress (WindowPtr window,
+ SMPAddressType addrType,
+ OCEPackedRecipient * address) FOURWORDINLINE(0x203C, 0x0005, 0x126D, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPAddAttachment (WindowPtr window,
+ const FSSpec * attachment) FOURWORDINLINE(0x203C, 0x0004, 0x126E, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPAttachDialog (WindowPtr window) FOURWORDINLINE(0x203C, 0x0002, 0x1276, 0xAA5D);
+
+
+EXTERN_API( OSErr )
+SMPExpandOrContract (WindowPtr window,
+ Boolean expand) FOURWORDINLINE(0x203C, 0x0003, 0x1272, 0xAA5D);
+
+
+EXTERN_API( OSErr )
+SMPMoveMailer (WindowPtr window,
+ short dh,
+ short dv) FOURWORDINLINE(0x203C, 0x0004, 0x126A, 0xAA5D);
+
+
+EXTERN_API( OSErr )
+SMPBecomeTarget (WindowPtr window,
+ Boolean becomeTarget,
+ SMPMailerComponent whichField) FOURWORDINLINE(0x203C, 0x0005, 0x1273, 0xAA5D);
+
+
+EXTERN_API( OSErr )
+SMPGetComponentSize (WindowPtr window,
+ unsigned short whichMailer,
+ SMPMailerComponent whichField,
+ unsigned short * size) FOURWORDINLINE(0x203C, 0x0007, 0x1277, 0xAA5D);
+
+
+EXTERN_API( OSErr )
+SMPGetComponentInfo (WindowPtr window,
+ unsigned short whichMailer,
+ SMPMailerComponent whichField,
+ void * buffer) FOURWORDINLINE(0x203C, 0x0007, 0x1278, 0xAA5D);
+
+
+EXTERN_API( OSErr )
+SMPGetListItemInfo (WindowPtr window,
+ unsigned short whichMailer,
+ SMPMailerComponent whichField,
+ void * buffer,
+ unsigned long bufferLength,
+ unsigned short startItem,
+ unsigned short * itemCount,
+ unsigned short * nextItem,
+ Boolean * more) FOURWORDINLINE(0x203C, 0x0010, 0x1279, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPImage (WindowPtr window,
+ SMPDrawImageUPP drawImageProc,
+ long imageRefCon,
+ Boolean supportsColor) FOURWORDINLINE(0x203C, 0x0007, 0x1282, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPGetNextLetter (OSType * typesList,
+ short numTypes,
+ LetterDescriptor * adjacentLetter) FOURWORDINLINE(0x203C, 0x0005, 0x1286, 0xAA5D);
+
+EXTERN_API( OSErr )
+SMPGetLetterInfo (LetterSpec * mailboxSpec,
+ SMPLetterInfo * info) FOURWORDINLINE(0x203C, 0x0004, 0x128A, 0xAA5D);
+
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __OCESTANDARDMAIL__ */
+
diff --git a/include/qt/OCETemplates.h b/include/qt/OCETemplates.h
new file mode 100644
index 000000000..4c767ade1
--- /dev/null
+++ b/include/qt/OCETemplates.h
@@ -0,0 +1,1851 @@
+/*
+ File: OCETemplates.h
+
+ Contains: Apple Open Collaboration Environment Templates Interfaces.
+
+ Version: Technology: AOCE Toolbox 1.02
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __OCETEMPLATES__
+#define __OCETEMPLATES__
+
+#ifndef REZ
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __EVENTS__
+#include "Events.h"
+#endif
+
+
+#endif /* REZ */
+#ifndef __OCE__
+#include "OCE.h"
+#endif
+
+
+#ifndef REZ
+#ifndef __OCESTANDARDMAIL__
+#include "OCEStandardMail.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#endif /* REZ */
+
+
+/************************************************************************************************
+ ********************************* Template Resource Constants: *********************************
+ ************************************************************************************************/
+
+
+/* Current versions of all the different template types: */
+
+#define kDETAspectVersion -976
+#define kDETInfoPageVersion -976
+#define kDETKillerVersion -976
+#define kDETForwarderVersion -976
+#define kDETFileTypeVersion -976
+
+
+/* 'Normal' separation for template IDs within the file (this is just a suggestion; you can use whatever
+ separation you like, so long as two separate templates don't have overlapping resources): */
+#define kDETIDSep 250
+
+/* A few predefined base IDs (again, just suggestions): */
+#define kDETFirstID (1000)
+#define kDETSecondID (1000+kDETIDSep)
+#define kDETThirdID (1000+2*kDETIDSep)
+#define kDETFourthID (1000+3*kDETIDSep)
+#define kDETFifthID (1000+4*kDETIDSep)
+
+
+
+/* Templates consist of a set of associated resources, at constant offsets from a 'base ID' set by the
+ signature resource of the template. In the case of aspect templates, most of the resources in the
+ template are accessible from the template as property default values. The property number is the same
+ as the offset from the base ID of the resource. In describing the resources which make up templates,
+ we give the type, the offset, and a description. For aspect templates, the offset is also the property #.
+
+ All templates include the following resource fork resources:
+
+ Type Offset Description
+ ---- ------ -----------
+ 'rstr' kDETTemplateName Contains the name of the template
+
+*/
+
+#define kDETTemplateName 0
+
+/* Aspects, info-pages, and forwarders include the following as well:
+
+ Type Offset Description
+ ---- ------ -----------
+ 'rstr' kDETRecordType Contains the type of record this applies to
+ 'rstr' kDETAttributeType Contains the type of attribute this applies to
+ 'detn' kDETAttributeValueTag Contains the tag of the attribute values this applies to
+
+*/
+
+#define kDETRecordType 1
+#define kDETAttributeType 2
+#define kDETAttributeValueTag 3
+
+
+
+/* ************************************ Aspects */
+
+/* In the case of aspects, property numbers and resource id offsets are the same. Therefore, some of the following
+ defines are used for resource offsets, some are used for dynamically generated properties, and some are used for
+ both (i.e., properties which may be dynamically generated, but if they aren't, then they're taken from the
+ resource). Resource types are given in all cases below; even if there is no actual resource (for example in
+ the case of kDETAspectName), it indicates the type for the dynamically generated property. A resource type of
+ 'rstr' corresponds to a property type of kDETPrTypeString; type 'detn' corresponds to kDETPrTypeNumber; and
+ 'detb' corresponds to kDETPrTypeBinary.
+
+
+
+ Type Offset Description
+ ---- ------ -----------
+ 'deta' 0 Identifies the type of resource
+ 'detc' kDETCode Is the code resource, if any is used
+ 'ICN#' kDETAspectMainBitmap
+ 'icl8' kDETAspectMainBitmap
+ 'icl4' kDETAspectMainBitmap
+ 'ics#' kDETAspectMainBitmap
+ 'ics8' kDETAspectMainBitmap
+ 'ics4' kDETAspectMainBitmap
+ 'sicn' kDETAspectMainBitmap Is the icon suite to display for this item type (main aspect only)
+ 'rstr' kDETAspectName Contains the name of the item (attribute main aspect only)
+ 'rst#' kDETAspectCategory Contains the internal categories for the record type (main aspect only)
+ 'rst#' kDETAspectExternalCategory Contains the external (user-visible) names which correspond to the categories in
+ kDETAspectCategory; if this resource is not present, external names are taken from
+ another template; if no other template provides an external name for a given internal
+ category, the internal name is used as the external name (main aspect only)
+ 'rstr' kDETAspectKind Is the item kind to display (main aspect only)
+ 'detn' kDETAspectGender Is the gender of this kind of object for internationalization (main aspect only)
+ 'rstr' kDETAspectWhatIs Is the string for balloon help when item is in sublist (main aspect only)
+ 'rstr' kDETAspectAliasKind Is the item kind to display for aliases to this type of item (main aspect only)
+ 'detn' kDETAspectAliasGender Is the gender of an alias to this kind of object for internationalization (main aspect only)
+ 'rstr' kDETAspectAliasWhatIs Is the string for balloon help when an alias to the item is in sublist (main aspect only)
+ 'rst#' kDETAspectBalloons Is a list of strings for balloon help; for each item in an info-page, it's
+ property # times 2 is used as an index into this array; if the item is not editable,
+ then the property # times 2 plus 1 is used
+
+
+ 'rstr' kDETAspectNewMenuName Is the string to be used for the user to select new item creation; for records, the
+ string is used as a menu entry in the Catalogs menu; for attributes, the string
+ is used in a selection dialog invoked by an 'Add...' button
+ 'rstr' kDETAspectNewEntryName Is the name to be used for new records (with a digit appended if not unique)
+ 'detb' kDETAspectNewValue Is the value to use when creating a new attribute value; the first four bytes
+ is the tag; the rest is the attribute value contents
+ 'detn' kDETAspectSublistOpenOnNew If true (non-zero), automatically open newly created entries (property can be set
+ from a code resource, or via a default value in a resource)
+ 'dett' kDETAspectLookup Is the attribute-to-property translation table
+ 'rstr' kDETAspectDragInString Is a string describing the action of dragging into this aspect (if any)
+ 'rstr' kDETAspectDragInVerb Is a single, short word that's the verb of the action (like 'add' or 'drop'; if
+ there's any doubt, use 'OK')
+ 'rstr' kDETAspectDragInSummary Is a short phrase that describes the action, suitable to be included in a selection list
+ 'rst#' kDETAspectRecordDragIn Is a list of type pairs; in each pair, the first is the type of a record which
+ can be dragged into this aspect, and the second is the attribute type to store
+ the reference in
+ 'rst#' kDETAspectRecordCatDragIn Is a list of category/attribute type pairs; in each pair, the first is the
+ category of records which can be dragged in, and the second is the type of
+ attribute to place the alias in
+ 'rst#' kDETAspectAttrDragIn Is a list of type triples; in each triple, the first is the record type which can be
+ dragged from (or '' for any), the second is the attribute type which can be dragged
+ in, and the third is the attribute type to store the new attribute in
+
+
+ 'rst#' kDETAspectDragOut Is a list of attribute types which can be dragged out of this aspect (an 'rst#'
+ resource with no entries means nothing can be dragged out; no 'rst#' resource means
+ everything can be dragged out)
+ 'detm' kDETAspectViewMenu Is a table to fill in the view menu from
+ 'detp' kDETAspectReverseSort Is a table listing which properties to sort in reverse order
+ 'detw' kDETAspectInfoPageCustomWindow Is a specification of a custom window size/placement & whether to use the
+ page-selector (main aspect only)
+ 'detv' kDETAspectInfoPageCustomWindow Is a view list which is common to all info-pages (main aspect only)
+*/
+
+
+#define kDETAspectCode 4
+#define kDETAspectMainBitmap 5
+#define kDETAspectName 6
+#define kDETAspectCategory 7
+#define kDETAspectExternalCategory 8
+#define kDETAspectKind 9
+#define kDETAspectGender 10
+#define kDETAspectWhatIs 11
+#define kDETAspectAliasKind 12
+#define kDETAspectAliasGender 13
+#define kDETAspectAliasWhatIs 14
+#define kDETAspectBalloons 15
+#define kDETAspectNewMenuName 16
+#define kDETAspectNewEntryName 17
+#define kDETAspectNewValue 18
+#define kDETAspectSublistOpenOnNew 19
+#define kDETAspectLookup 20
+#define kDETAspectDragInString 21
+#define kDETAspectDragInVerb 22
+#define kDETAspectDragInSummary 23
+#define kDETAspectRecordDragIn 24
+#define kDETAspectRecordCatDragIn 25
+#define kDETAspectAttrDragIn 26
+#define kDETAspectAttrDragOut 27
+#define kDETAspectViewMenu 28
+#define kDETAspectReverseSort 29
+#define kDETAspectInfoPageCustomWindow 30
+
+
+
+/* Properties: */
+
+#define kDETNoProperty -1
+
+/* Each aspect has 250 attribute properties in this range: */
+#define kDETFirstLocalProperty 0
+#define kDETLastLocalProperty (kDETFirstLocalProperty+249)
+
+/* Developers should use property numbers starting at this point: */
+#define kDETFirstDevProperty 40
+
+/* The following range provides constant numeric properties for use in patterns and comparisons (constant n is
+ given by kDETFirstConstantProperty+n): */
+#define kDETFirstConstantProperty 250
+#define kDETLastConstantProperty (kDETFirstConstantProperty+249)
+
+/* To convert a number into a constant property, add this: */
+#define kDETConstantProperty kDETFirstConstantProperty
+
+#define kDETZeroProperty (kDETConstantProperty+0)
+#define kDETOneProperty (kDETConstantProperty+1)
+#define kDETFalseProperty (kDETConstantProperty+0)
+#define kDETTrueProperty (kDETConstantProperty+1)
+
+/* The following apply to records, attributes, or aliases; they are the name and kind, as they appear in icon lists: */
+#define kDETPrName 3050
+#define kDETPrKind 3051
+
+/* Access mask properties: */
+#define kDETDNodeAccessMask 25825 /* The DNode access mask */
+#define kDETRecordAccessMask 25826 /* The record access mask */
+#define kDETAttributeAccessMask 25827 /* The attribute access mask */
+#define kDETPrimaryMaskByBit 25828 /* A set of sixteen properties to access all bits of the primary mask */
+
+
+
+/* See AOCE documentation for details definitions of each of these bits: */
+#define kDETPrimarySeeMask kDETPrimaryMaskByBit
+#define kDETPrimaryAddMask (kDETPrimaryMaskByBit+1)
+#define kDETPrimaryDeleteMask (kDETPrimaryMaskByBit+2)
+#define kDETPrimaryChangeMask (kDETPrimaryMaskByBit+3)
+#define kDETPrimaryRenameMask (kDETPrimaryMaskByBit+4)
+#define kDETPrimaryChangePrivsMask (kDETPrimaryMaskByBit+5)
+#define kDETPrimaryTopMaskBit (kDETPrimaryMaskByBit+15)
+
+/* The following property is zero until we've completed the first catalog lookup; from then on it's 1 */
+#define kDETPastFirstLookup 26550
+
+/* The following property is the page number; issuing a property command with this property will flip info-pages */
+#define kDETInfoPageNumber 27050
+
+/* The value of the following properties contains the template number of the targeted aspect's template, and the
+ currently open info-page (if any). These values can be used with kDETAspectTemplate and kDETInfoPageTemplate
+ target selectors. */
+#define kDETAspectTemplateNumber 26551
+#define kDETInfoPageTemplateNumber 26552
+
+/* Properties for property commands to deal with sublist items: */
+#define kDETOpenSelectedItems 26553 /* Open selected sublist items */
+#define kDETAddNewItem 26554 /* Add new sublist item */
+#define kDETRemoveSelectedItems 26555 /* Remove selected sublist items */
+
+/* Property types are used to specify types of properties and conversions between types (zero and negative numbers
+ are reserved for Apple; developer code resources can use positive numbers): */
+#define kDETPrTypeNumber -1 /* A number */
+#define kDETPrTypeString -2 /* A string */
+#define kDETPrTypeBinary -3 /* A binary block */
+
+/* Rez-compatible tag definitions (These are the same as in OCE.h, but they're enums there and can't be rezed¥¥¥) */
+#ifdef REZ
+#define typeRString 'rstr'
+#define typePackedDSSpec 'dspc'
+#define typeBinary 'bnry'
+#endif
+
+
+
+/* ************************************ Info-pages */
+
+/* Info-pages include the following as well:
+
+ Type Offset Description
+ ---- ------ -----------
+ 'deti' 0 Identifies the type of resource; see below for details on the contents
+ 'rstr' kDETInfoPageName Is the name of the view to use in the page selection pop-up
+ 'rstr' kDETInfoPageMainViewAspect Is the name of the aspect to use with the main page view
+ 'rstr' kDETInfoPageMenuName Is the name of the catalogs menu ('Catalogs' if not present)
+ 'detm' kDETInfoPageMenuEntries Are menu entries to go in the Catalogs menu
+
+*/
+
+#define kDETInfoPageName 4
+#define kDETInfoPageMainViewAspect 5
+#define kDETInfoPageMenuName 6
+#define kDETInfoPageMenuEntries 7
+
+
+
+
+/* ************************************ Views
+
+ Flags: */
+
+#define kDETNoFlags 0
+#define kDETEnabled (1 << 0) /* Main view (non-sublist) field enabled */
+
+/* The following flags make sense for items in a sublist only */
+#define kDETHilightIfSelected (1 << 0) /* Hilight view when entry is selected */
+
+/* The following flags make sense for text views only */
+#define kDETNumericOnly (1 << 3) /* Only allow the user to enter digits */
+#define kDETMultiLine (1 << 4) /* Allow multiple lines in view */
+#define kDETDynamicSize (1 << 9) /* Don't draw box around text until user clicks in it, then auto-size it */
+#define kDETAllowNoColons (1 << 10) /* Don't allow the user to enter colons (convert ':'s to '-'s) */
+
+/* The following flags are used for pop-up menus only */
+#define kDETPopupDynamicSize (1 << 8) /* Automatically resize pop-up based on contents */
+
+/* The following flags are used for EditPicture views only */
+#define kDETScaleToView (1 << 8) /* Scale picture to view bounds rather than cropping */
+
+/* Sizes for icons */
+#define kDETLargeIcon 0
+#define kDETSmallIcon 1
+#define kDETMiniIcon 2
+
+/* Stolen from TextEdit.h */
+#define kDETLeft 0
+#define kDETCenter 1
+#define kDETRight -1
+#define kDETForceLeft -2
+
+
+
+/* Flags for use within Box view type attributes - these are distinct from the flags above */
+
+#define kDETUnused 0
+#define kDETBoxTakesContentClicks (1 << 0)
+#define kDETBoxIsRounded (1 << 1)
+#define kDETBoxIsGrayed (1 << 2)
+#define kDETBoxIsInvisible (1 << 3)
+
+/* The common font info */
+
+#define kDETApplicationFont 1
+#define kDETApplicationFontSize 9
+#define kDETAppFontLineHeight 12
+
+#define kDETSystemFont 0
+#define kDETSystemFontSize 12
+#define kDETSystemFontLineHeight 16
+
+#define kDETDefaultFont 1
+#define kDETDefaultFontSize 9
+#define kDETDefaultFontLineHeight 12
+
+/* These were taken from QuickDraw.h (where they're enums and therefore unusable in resource definitions): */
+#define kDETNormal 0
+#define kDETBold 1
+#define kDETItalic 2
+#define kDETUnderline 4
+#define kDETOutline 8
+#define kDETShadow 0x10
+#define kDETCondense 0x20
+#define kDETExtend 0x40
+
+#define kDETIconStyle -3 /* Normal text style for regular sublist entries, italic text style for aliases */
+
+/* View menu: */
+
+#define kDETChangeViewCommand 'view' /* Change the view; used especially in StaticCommandTextFromView sublist headers */
+
+
+/* Info-page window sizes: */
+
+/* Default record info-pages: */
+#define kDETRecordInfoWindHeight 228
+#define kDETRecordInfoWindWidth 400
+
+/* Default attribute info-pages: */
+#define kDETAttributeInfoWindHeight 250
+#define kDETAttributeInfoWindWidth 230
+
+/* Page identifying icon (for default info-page layout): */
+#define kDETSubpageIconTop 8
+#define kDETSubpageIconLeft 8
+#define kDETSubpageIconBottom (kDETSubpageIconTop+32)
+#define kDETSubpageIconRight (kDETSubpageIconLeft+32)
+#define kDETSubpageIconRect {kDETSubpageIconTop, kDETSubpageIconLeft, kDETSubpageIconBottom, kDETSubpageIconRight}
+
+/* The following rectangle can be used in a 'deti' with no sublist: */
+#define kDETNoSublistRect {0, 0, 0, 0}
+
+
+
+
+/* ************************************ Killers
+
+ Killers include the following as well:
+
+ Type Offset Description
+ ---- ------ -----------
+ 'detk' 0 Identifies the type of resource; see below for details on the contents
+ 'rst#' kDETKillerName Contains a list of template names to be killed
+
+*/
+
+#define kDETKillerName 1
+
+
+/* ************************************ Forwarders
+
+ Forwarders include the following as well:
+
+ Type Offset Description
+ ---- ------ -----------
+ 'detf' 0 Identifies the type of resource; see below for details on the contents
+ 'rst#' kDETForwarderTemplateNames Contains a list of names of templates to forward to
+
+*/
+
+#define kDETForwarderTemplateNames 4
+
+
+
+/***********************************************************************************
+ ********************************* Categories: *************************************
+ ***********************************************************************************
+
+ Internal category names: */
+
+#define kDETCategoryAllItems "aoce All Items" /* Everything in or out of a category */
+#define kDETCategoryAddressItems "aoce Address Items" /* Anything that can be used to address something */
+#define kDETCategoryMisc "aoce Miscellaneous" /* Things that don't deserve their own category */
+
+
+
+/***********************************************************************************/
+/********************************* Code Resources: *********************************/
+/***********************************************************************************/
+#ifndef REZ
+/* Target specification: */
+enum {
+ kDETSelf = 0, /* The "current" item */
+ kDETSelfOtherAspect = 1, /* Another aspect of the current item */
+ kDETParent = 2, /* The parent (i.e., the aspect we're in the sublist of, if any) of the current item */
+ kDETSublistItem = 3, /* The itemNumberth item in the sublist */
+ kDETSelectedSublistItem = 4, /* The itemNumberth selected item in the sublist */
+ kDETDSSpec = 5, /* The item specified by the packed DSSpec */
+ kDETAspectTemplate = 6, /* A specific aspect template (number itemNumber) */
+ kDETInfoPageTemplate = 7, /* A specific info-page template (number itemNumber) * Force type to be short */
+ kDETHighSelector = 0xF000
+};
+
+typedef long DETTargetSelector;
+
+struct DETTargetSpecification {
+ DETTargetSelector selector; /* Target selection method (see above) */
+ RStringPtr aspectName; /* The name of the aspect (kDETSelfOtherAspect, kDETSublistItem,*/
+ /* kDETSelectedSublistItem, kDETDSSpec); nil for main aspect or none; */
+ /* always filled in for calls if there is an aspect, even if it's the main aspect */
+ long itemNumber; /* Sublist index (kDETSublistItem & kDETSelectedSublistItem & kDETAspectTemplate);*/
+ /* 1-based indexing */
+ PackedDSSpecPtr dsSpec; /* DSSpec (kDETDSSpec only) */
+};
+typedef struct DETTargetSpecification DETTargetSpecification;
+/* Code resource calls and call-backs both return an OSType:
+ kDETDidNotHandle (1) = used by template to say "I didn't handle it" (for calls only)
+ noErr = function completed successfully
+ any error = function failed, and here's why
+*/
+#define kDETDidNotHandle 1
+/* Call-back functions:
+
+ reqFunction Action
+ ----------- ------
+ kDETcmdBeep Call SysBeep; useful for testing that a code resource's calls/call-backs are working at all
+
+ kDETcmdBusy Put up watch cursor and switch processes; user events elicit a beep
+
+ kDETcmdChangeCallFors Change call-fors mask
+
+ kDETcmdGetCommandSelectionCount Get the command selection count (for calls which have a command selection list)
+ kDETcmdGetCommandItemN Get command selection item n (for calls which have a command selection list)
+
+ kDETcmdOpenDSSpec PackedDSSpec open (can also be done via AppleEvents -- this is a short-cut)
+
+ kDETcmdAboutToTalk About to talk to user: bring us to front, disable watch cursor, etc.
+
+ kDETcmdUnloadTemplates Flush templates
+
+ kDETcmdTemplateCounts Return number of aspect and info-page templates in system
+
+ kDETcmdGetDSSpec Get the PackedDSSpec for this object
+
+ kDETcmdSublistCount Return the count of the sublist items
+ kDETcmdSelectedSublistCount Return the count of the selected sublist items
+
+ kDETcmdRequestSync Request a sync-up of the aspect with the catalog
+
+ kDETcmdBreakAttribute Break an attribute -- apply all applicable patterns to an attribute to generate properties
+
+ kDETcmdGetTemplateFSSpec Get the FSSpec of the file containing the template
+
+ kDETcmdGetOpenEdit Return the property of the view being edited (or kDETNoProperty if none)
+ kDETcmdCloseEdit Close the current edit
+
+ kDETcmdGetPropertyType Get a property type
+
+ kDETcmdGetPropertyNumber Get a property, number format
+ kDETcmdGetPropertyRString Get a property, RString format
+ kDETcmdGetPropertyBinarySize Get a property, binary, return size
+ kDETcmdGetPropertyBinary Get a property, binary format
+
+ kDETcmdGetPropertyChanged Get a property changed flag
+ kDETcmdGetPropertyEditable Get a property editable flag
+
+ kDETcmdSetPropertyType Set a property type
+
+ kDETcmdSetPropertyNumber Set a property, number format
+ kDETcmdSetPropertyRString Set a property, RString format
+ kDETcmdSetPropertyBinary Set a property, binary data & size
+
+ kDETcmdSetPropertyChanged Set a property changed flag
+ kDETcmdSetPropertyEditable Set a property editable flag
+
+ kDETcmdDirtyProperty Dirty a property (notify other code resources of change)
+
+ kDETcmdDoPropertyCommand Issue a property command
+
+ kDETcmdAddMenu Add to the end of a dynamic menu
+ kDETcmdRemoveMenu Remove a dynamic menu item
+ kDETcmdMenuItemRString Get a dynamic menu item RString
+
+ kDETcmdSaveProperty Force a save of a property -- apply all applicable patterns to write out the property
+
+ kDETcmdGetCustomViewUserReference Get custom view user reference (as given in .r file)
+ kDETcmdGetCustomViewBounds Get custom view current bounds
+
+ kDETcmdGetResource Get a resource from a template
+*/
+
+enum {
+ kDETcmdSimpleCallback = 0,
+ kDETcmdBeep = 1,
+ kDETcmdBusy = 2,
+ kDETcmdChangeCallFors = 3,
+ kDETcmdGetCommandSelectionCount = 4,
+ kDETcmdGetCommandItemN = 5,
+ kDETcmdOpenDSSpec = 6,
+ kDETcmdAboutToTalk = 7,
+ kDETcmdUnloadTemplates = 8,
+ kDETcmdTemplateCounts = 9,
+ kDETcmdTargetedCallback = 1000,
+ kDETcmdGetDSSpec = 1001,
+ kDETcmdSublistCount = 1002,
+ kDETcmdSelectedSublistCount = 1003,
+ kDETcmdRequestSync = 1004,
+ kDETcmdBreakAttribute = 1005,
+ kDETcmdGetTemplateFSSpec = 1006,
+ kDETcmdGetOpenEdit = 1007,
+ kDETcmdCloseEdit = 1008,
+ kDETcmdPropertyCallback = 2000,
+ kDETcmdGetPropertyType = 2001,
+ kDETcmdGetPropertyNumber = 2002,
+ kDETcmdGetPropertyRString = 2003,
+ kDETcmdGetPropertyBinarySize = 2004,
+ kDETcmdGetPropertyBinary = 2005,
+ kDETcmdGetPropertyChanged = 2006,
+ kDETcmdGetPropertyEditable = 2007,
+ kDETcmdSetPropertyType = 2008,
+ kDETcmdSetPropertyNumber = 2009,
+ kDETcmdSetPropertyRString = 2010,
+ kDETcmdSetPropertyBinary = 2011,
+ kDETcmdSetPropertyChanged = 2012,
+ kDETcmdSetPropertyEditable = 2013,
+ kDETcmdDirtyProperty = 2014,
+ kDETcmdDoPropertyCommand = 2015,
+ kDETcmdAddMenu = 2016,
+ kDETcmdRemoveMenu = 2017,
+ kDETcmdMenuItemRString = 2018,
+ kDETcmdSaveProperty = 2019,
+ kDETcmdGetCustomViewUserReference = 2020,
+ kDETcmdGetCustomViewBounds = 2021,
+ kDETcmdGetResource = 2022, /* Force type to be long */
+ kDETcmdHighCallback = (long)0xF0000000
+};
+
+
+typedef unsigned long DETCallBackFunctions;
+/* Call functions:
+
+ reqFunction Action
+ ----------- ------
+ kDETcmdInit Called once when template is first loaded (good time to allocate private data); returns call-for list
+ kDETcmdExit Called once when template is freed (good time to free private data)
+
+ kDETcmdAttributeCreation New sublist attribute creation about to occur; this gives the template a chance to modify
+ the value that's about to be created; sent to the template that will be used for
+ the main aspect of the new entry
+
+ kDETcmdDynamicForwarders Return a list of dynamically created forwarders
+
+ kDETcmdInstanceInit Called once when instance of template is started (good time to allocate private instance data)
+ kDETcmdInstanceExit Called once when instance is ended (good time to free private instance data)
+
+ kDETcmdIdle Called periodically during idle times
+
+ kDETcmdViewListChanged Called when the info-page view-list (list of enabled views) has changed
+
+ kDETcmdValidateSave Validate save: about to save info-page, return noErr (or kDETDidNotHandle) if it's OK to do so
+
+ kDETcmdDropQuery Drop query: return the appropriate operation for this drag; ask destination
+ kDETcmdDropMeQuery Drop query: return the appropriate operation for this drag; ask dropee
+
+ kDETcmdAttributeNew Attribute value new (return kDETDidNotHandle to let normal new processing occur)
+ kDETcmdAttributeChange Attribute value change (return kDETDidNotHandle to let normal change processing occur)
+ kDETcmdAttributeDelete Attribute value delete (return kDETDidNotHandle to let normal deletion occur); sent to the
+ main aspect of the attribute that's about to be deleted
+ kDETcmdItemNew Target item (record or attribute) has just been created
+
+ kDETcmdOpenSelf Self open (return noErr to prevent opening; return kDETDidNotHandle to allow it)
+
+ kDETcmdDynamicResource Return a dynamically created resource
+
+ kDETcmdShouldSync Check if the code resource wants to force a sync (update data from catalog)
+ kDETcmdDoSync Give code resource a chance to sync (read in and break all attributes)
+
+ kDETcmdPropertyCommand Command received in the property number range (usually means a button's been pushed)
+
+ kDETcmdMaximumTextLength Return maximum size for text form of property
+
+ kDETcmdPropertyDirtied Property dirtied, need to redraw
+
+ kDETcmdPatternIn Custom pattern element encountered on reading in an attribute
+ kDETcmdPatternOut Custom pattern element encountered on writing out an attribute
+
+ kDETcmdConvertToNumber Convert from template-defined property type to number
+ kDETcmdConvertToRString Convert from template-defined property type to RString
+ kDETcmdConvertFromNumber Convert from number to template-defined property type
+ kDETcmdConvertFromRString Convert from RString to template-defined property type
+
+ kDETcmdCustomViewDraw Custom view draw
+ kDETcmdCustomViewMouseDown Custom view mouse down
+
+ kDETcmdKeyPress Key press (used primarily to filter entry into EditText views)
+ kDETcmdPaste Paste (used primarily to filter entry into EditText views)
+
+ kDETcmdCustomMenuSelected Custom Catalogs menu selected
+ kDETcmdCustomMenuEnabled Return whether custom Catalogs menu entry should be enabled
+*/
+
+enum {
+ kDETcmdSimpleCall = 0,
+ kDETcmdInit = 1,
+ kDETcmdExit = 2,
+ kDETcmdAttributeCreation = 3,
+ kDETcmdDynamicForwarders = 4,
+ kDETcmdTargetedCall = 1000,
+ kDETcmdInstanceInit = 1001,
+ kDETcmdInstanceExit = 1002,
+ kDETcmdIdle = 1003,
+ kDETcmdViewListChanged = 1004,
+ kDETcmdValidateSave = 1005,
+ kDETcmdDropQuery = 1006,
+ kDETcmdDropMeQuery = 1007,
+ kDETcmdAttributeNew = 1008,
+ kDETcmdAttributeChange = 1009,
+ kDETcmdAttributeDelete = 1010,
+ kDETcmdItemNew = 1011,
+ kDETcmdOpenSelf = 1012,
+ kDETcmdDynamicResource = 1013,
+ kDETcmdShouldSync = 1014,
+ kDETcmdDoSync = 1015,
+ kDETcmdPropertyCall = 2000,
+ kDETcmdPropertyCommand = 2001,
+ kDETcmdMaximumTextLength = 2002,
+ kDETcmdPropertyDirtied = 2003,
+ kDETcmdPatternIn = 2004,
+ kDETcmdPatternOut = 2005,
+ kDETcmdConvertToNumber = 2006,
+ kDETcmdConvertToRString = 2007,
+ kDETcmdConvertFromNumber = 2008,
+ kDETcmdConvertFromRString = 2009,
+ kDETcmdCustomViewDraw = 2010,
+ kDETcmdCustomViewMouseDown = 2011,
+ kDETcmdKeyPress = 2012,
+ kDETcmdPaste = 2013,
+ kDETcmdCustomMenuSelected = 2014,
+ kDETcmdCustomMenuEnabled = 2015,
+ kDETcmdHighCall = (long)0xF0000000 /* Force the type to be long */
+};
+
+typedef unsigned long DETCallFunctions;
+/* Valid commandIDs for DETDropQueryBlock and DETDropMeQueryBlock (in addition to property numbers): */
+enum {
+ kDETDoNothing = FOUR_CHAR_CODE('xxx0'),
+ kDETMove = FOUR_CHAR_CODE('move'),
+ kDETDrag = FOUR_CHAR_CODE('drag'),
+ kDETAlias = FOUR_CHAR_CODE('alis')
+};
+
+
+
+struct DETProtoCallBackBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ DETTargetSpecification target; /* The target for the request */
+ short property; /* The property to apply the request to */
+};
+typedef struct DETProtoCallBackBlock DETProtoCallBackBlock;
+
+struct DETBeepBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+};
+typedef struct DETBeepBlock DETBeepBlock;
+
+struct DETBusyBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+};
+typedef struct DETBusyBlock DETBusyBlock;
+
+struct DETChangeCallForsBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ DETTargetSpecification target; /* The target for the request */
+ long newCallFors; /* -> New call-for mask */
+};
+typedef struct DETChangeCallForsBlock DETChangeCallForsBlock;
+
+struct DETGetCommandSelectionCountBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ long count; /* <- The number of items in the command selection list */
+};
+typedef struct DETGetCommandSelectionCountBlock DETGetCommandSelectionCountBlock;
+enum {
+ kDETHFSType = 0, /* HFS item type */
+ kDETDSType = 1, /* Catalog Service item type */
+ kDETMailType = 2, /* Mail (letter) item type */
+ kDETMoverType = 3, /* Sounds, fonts, etc., from inside a suitcase or system file */
+ kDETLastItemType = (long)0xF0000000 /* Force it to be a long (C & C++ seem to disagree about the definition of 0xF000) */
+};
+
+
+typedef unsigned long DETItemType;
+/* FSSpec plus possibly interesting additional info */
+
+struct DETFSInfo {
+ OSType fileType; /* File type */
+ OSType fileCreator; /* File creator */
+ unsigned short fdFlags; /* Finder flags */
+ FSSpec fsSpec; /* FSSpec */
+};
+typedef struct DETFSInfo DETFSInfo;
+
+struct DSRec {
+ PackedDSSpecPtr * dsSpec; /* <- DSSpec for item (caller must DisposHandle() when done) */
+ short refNum; /* <- Refnum for returned address */
+ AuthIdentity identity; /* <- Identity for returned address */
+};
+typedef struct DSRec DSRec;
+
+union ItemRec {
+ DETFSInfo ** fsInfo; /* <- FSSpec & info for item (caller must DisposHandle() when done) */
+ DSRec ds;
+ PackedDSSpecPtr * dsSpec; /* <- DSSpec for item (caller must DisposHandle() when done) */
+ LetterSpec ** ltrSpec; /* <- Letter spec for item (caller must DisposHandle() when done) */
+};
+typedef union ItemRec ItemRec;
+
+struct DETGetCommandItemNBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ long itemNumber; /* -> Item number to retrieve (1-based) */
+ DETItemType itemType; /* -> Type of item to be returned (if we can interpret it as such) */
+ ItemRec item;
+};
+typedef struct DETGetCommandItemNBlock DETGetCommandItemNBlock;
+
+struct DETGetDSSpecBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ DETTargetSpecification target; /* The target for the request */
+ PackedDSSpecPtr * dsSpec; /* <- Handle with result (caller must DisposHandle() when done) */
+ short refNum; /* <- Refnum for address if PD */
+ AuthIdentity identity; /* <- Identity for address */
+ Boolean isAlias; /* <- True if this entry is an alias */
+ Boolean isRecordRef; /* <- True if this entry is a record reference (reserved) */
+};
+typedef struct DETGetDSSpecBlock DETGetDSSpecBlock;
+
+struct DETGetTemplateFSSpecBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ DETTargetSpecification target; /* The target for the request */
+ FSSpec fsSpec; /* <- FSSpec of template file */
+ short baseID; /* <- Base ID of this template */
+ long aspectTemplateNumber; /* <- The template number for this aspect template */
+};
+typedef struct DETGetTemplateFSSpecBlock DETGetTemplateFSSpecBlock;
+
+struct DETGetOpenEditBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ DETTargetSpecification target; /* The target for the request */
+ short viewProperty; /* <- The property of the view being edited (or kNoProperty if none) */
+};
+typedef struct DETGetOpenEditBlock DETGetOpenEditBlock;
+
+struct DETCloseEditBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ DETTargetSpecification target; /* The target for the request */
+};
+typedef struct DETCloseEditBlock DETCloseEditBlock;
+
+struct DETGetPropertyTypeBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ DETTargetSpecification target; /* The target for the request */
+ short property; /* The property to apply the request to */
+ short propertyType; /* <- The type of the property */
+};
+typedef struct DETGetPropertyTypeBlock DETGetPropertyTypeBlock;
+
+struct DETGetPropertyNumberBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ DETTargetSpecification target; /* The target for the request */
+ short property; /* The property to apply the request to */
+ unsigned long propertyValue; /* <- The value of the property */
+};
+typedef struct DETGetPropertyNumberBlock DETGetPropertyNumberBlock;
+
+struct DETGetPropertyRStringBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ DETTargetSpecification target; /* The target for the request */
+ short property; /* The property to apply the request to */
+ RStringHandle propertyValue; /* <- A handle containing the property (as an RString) (caller must DisposHandle() when done) */
+};
+typedef struct DETGetPropertyRStringBlock DETGetPropertyRStringBlock;
+
+struct DETGetPropertyBinarySizeBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ DETTargetSpecification target; /* The target for the request */
+ short property; /* The property to apply the request to */
+ long propertyBinarySize; /* <- The size of the property as a binary block */
+};
+typedef struct DETGetPropertyBinarySizeBlock DETGetPropertyBinarySizeBlock;
+
+struct DETGetPropertyBinaryBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ DETTargetSpecification target; /* The target for the request */
+ short property; /* The property to apply the request to */
+ Handle propertyValue; /* <- Handle with the value of the property (caller must DisposHandle() when done) */
+};
+typedef struct DETGetPropertyBinaryBlock DETGetPropertyBinaryBlock;
+
+struct DETGetPropertyChangedBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ DETTargetSpecification target; /* The target for the request */
+ short property; /* The property to apply the request to */
+ Boolean propertyChanged; /* <- True if the property is marked as changed */
+ Boolean filler1;
+};
+typedef struct DETGetPropertyChangedBlock DETGetPropertyChangedBlock;
+
+struct DETGetPropertyEditableBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ DETTargetSpecification target; /* The target for the request */
+ short property; /* The property to apply the request to */
+ Boolean propertyEditable; /* <- True if the property can be edited by the user (if false, view will appear disabled) */
+ Boolean filler1;
+};
+typedef struct DETGetPropertyEditableBlock DETGetPropertyEditableBlock;
+
+struct DETSetPropertyTypeBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ DETTargetSpecification target; /* The target for the request */
+ short property; /* The property to apply the request to */
+ short newType; /* -> New type for property (just sets type, does not convert contents) */
+};
+typedef struct DETSetPropertyTypeBlock DETSetPropertyTypeBlock;
+
+struct DETSetPropertyNumberBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ DETTargetSpecification target; /* The target for the request */
+ short property; /* The property to apply the request to */
+ unsigned long newValue; /* -> New value to set property to (and set type to number) */
+};
+typedef struct DETSetPropertyNumberBlock DETSetPropertyNumberBlock;
+
+struct DETSetPropertyRStringBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ DETTargetSpecification target; /* The target for the request */
+ short property; /* The property to apply the request to */
+ RStringPtr newValue; /* -> New value to set property to (and set type to RString) */
+};
+typedef struct DETSetPropertyRStringBlock DETSetPropertyRStringBlock;
+
+struct DETSetPropertyBinaryBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ DETTargetSpecification target; /* The target for the request */
+ short property; /* The property to apply the request to */
+ void * newValue; /* -> New value to set property to (and set type to binary) */
+ long newValueSize; /* -> Size of new value */
+};
+typedef struct DETSetPropertyBinaryBlock DETSetPropertyBinaryBlock;
+
+struct DETSetPropertyChangedBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ DETTargetSpecification target; /* The target for the request */
+ short property; /* The property to apply the request to */
+ Boolean propertyChanged; /* -> Value to set changed flag on property to */
+ Boolean filler1;
+};
+typedef struct DETSetPropertyChangedBlock DETSetPropertyChangedBlock;
+
+struct DETSetPropertyEditableBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ DETTargetSpecification target; /* The target for the request */
+ short property; /* The property to apply the request to */
+ Boolean propertyEditable; /* -> Value to set editable flag on property to */
+ Boolean filler1;
+};
+typedef struct DETSetPropertyEditableBlock DETSetPropertyEditableBlock;
+
+struct DETDirtyPropertyBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ DETTargetSpecification target; /* The target for the request */
+ short property; /* The property to apply the request to */
+};
+typedef struct DETDirtyPropertyBlock DETDirtyPropertyBlock;
+
+struct DETDoPropertyCommandBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ DETTargetSpecification target; /* The target for the request */
+ short property; /* The property to apply the request to */
+ long parameter; /* -> Parameter of command */
+};
+typedef struct DETDoPropertyCommandBlock DETDoPropertyCommandBlock;
+
+struct DETSublistCountBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ DETTargetSpecification target; /* The target for the request */
+ long count; /* <- The number of items in the current item's sublist */
+};
+typedef struct DETSublistCountBlock DETSublistCountBlock;
+
+struct DETSelectedSublistCountBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ DETTargetSpecification target; /* The target for the request */
+ long count; /* <- The number of selected items in the current item's sublist */
+};
+typedef struct DETSelectedSublistCountBlock DETSelectedSublistCountBlock;
+
+struct DETRequestSyncBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ DETTargetSpecification target; /* The target for the request */
+};
+typedef struct DETRequestSyncBlock DETRequestSyncBlock;
+
+struct DETAddMenuBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ DETTargetSpecification target; /* The target for the request */
+ short property; /* The property to apply the request to */
+ RString * name; /* -> Name of new menu item */
+ long parameter; /* -> Parameter to return when this item is selected */
+ long addAfter; /* -> Parameter of entry to add after, or -1 for add at end */
+};
+typedef struct DETAddMenuBlock DETAddMenuBlock;
+
+struct DETRemoveMenuBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ DETTargetSpecification target; /* The target for the request */
+ short property; /* The property to apply the request to */
+ long itemToRemove; /* -> Parameter of menu item to remove */
+};
+typedef struct DETRemoveMenuBlock DETRemoveMenuBlock;
+
+struct DETMenuItemRStringBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ DETTargetSpecification target; /* The target for the request */
+ short property; /* The property to apply the request to */
+ long itemParameter; /* -> Parameter of menu item to return string for */
+ RStringHandle rString; /* <- Handle with the RString (caller must DisposHandle() when done) */
+};
+typedef struct DETMenuItemRStringBlock DETMenuItemRStringBlock;
+
+struct DETOpenDSSpecBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ PackedDSSpecPtr dsSpec; /* -> DSSpec of object to be opened */
+};
+typedef struct DETOpenDSSpecBlock DETOpenDSSpecBlock;
+
+struct DETAboutToTalkBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+};
+typedef struct DETAboutToTalkBlock DETAboutToTalkBlock;
+
+struct DETBreakAttributeBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ DETTargetSpecification target; /* The target for the request */
+ AttributePtr breakAttribute; /* -> Attribute to parse */
+ Boolean isChangeable; /* -> True if the value can be changed by the user */
+ Boolean filler1;
+};
+typedef struct DETBreakAttributeBlock DETBreakAttributeBlock;
+
+struct DETSavePropertyBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ DETTargetSpecification target; /* The target for the request */
+ short property; /* The property to apply the request to */
+};
+typedef struct DETSavePropertyBlock DETSavePropertyBlock;
+
+struct DETGetCustomViewUserReferenceBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ DETTargetSpecification target; /* The target for the request */
+ short property; /* The property to apply the request to */
+ short userReference; /* <- User reference value, as specified in the .r file */
+};
+typedef struct DETGetCustomViewUserReferenceBlock DETGetCustomViewUserReferenceBlock;
+
+struct DETGetCustomViewBoundsBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ DETTargetSpecification target; /* The target for the request */
+ short property; /* The property to apply the request to */
+ Rect bounds; /* <- Bounds of the view */
+};
+typedef struct DETGetCustomViewBoundsBlock DETGetCustomViewBoundsBlock;
+
+struct DETGetResourceBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ DETTargetSpecification target; /* The target for the request */
+ short property; /* The property to apply the request to */
+ ResType resourceType; /* -> Resource type */
+ Handle theResource; /* <- The resource handle (caller must dispose when done) */
+};
+typedef struct DETGetResourceBlock DETGetResourceBlock;
+
+struct DETTemplateCounts {
+ DETCallBackFunctions reqFunction; /* Requested function */
+ long aspectTemplateCount; /* <- Number of aspect templates in the system */
+ long infoPageTemplateCount; /* <- Number of info-page templates in the system */
+};
+typedef struct DETTemplateCounts DETTemplateCounts;
+
+struct DETUnloadTemplatesBlock {
+ DETCallBackFunctions reqFunction; /* Requested function */
+};
+typedef struct DETUnloadTemplatesBlock DETUnloadTemplatesBlock;
+
+
+union DETCallBackBlock {
+ DETProtoCallBackBlock protoCallBack;
+ DETBeepBlock beep;
+ DETBusyBlock busy;
+ DETChangeCallForsBlock changeCallFors;
+ DETGetCommandSelectionCountBlock getCommandSelectionCount;
+ DETGetCommandItemNBlock getCommandItemN;
+ DETGetDSSpecBlock getDSSpec;
+ DETGetTemplateFSSpecBlock getTemplateFSSpec;
+ DETGetOpenEditBlock getOpenEdit;
+ DETCloseEditBlock closeEdit;
+ DETGetPropertyTypeBlock getPropertyType;
+ DETGetPropertyNumberBlock getPropertyNumber;
+ DETGetPropertyRStringBlock getPropertyRString;
+ DETGetPropertyBinarySizeBlock getPropertyBinarySize;
+ DETGetPropertyBinaryBlock getPropertyBinary;
+ DETGetPropertyChangedBlock getPropertyChanged;
+ DETGetPropertyEditableBlock getPropertyEditable;
+ DETSetPropertyTypeBlock setPropertyType;
+ DETSetPropertyNumberBlock setPropertyNumber;
+ DETSetPropertyRStringBlock setPropertyRString;
+ DETSetPropertyBinaryBlock setPropertyBinary;
+ DETSetPropertyChangedBlock setPropertyChanged;
+ DETSetPropertyEditableBlock setPropertyEditable;
+ DETDirtyPropertyBlock dirtyProperty;
+ DETDoPropertyCommandBlock doPropertyCommand;
+ DETSublistCountBlock sublistCount;
+ DETSelectedSublistCountBlock selectedSublistCount;
+ DETRequestSyncBlock requestSync;
+ DETAddMenuBlock addMenu;
+ DETRemoveMenuBlock removeMenu;
+ DETMenuItemRStringBlock menuItemRString;
+ DETOpenDSSpecBlock openDSSpec;
+ DETAboutToTalkBlock aboutToTalk;
+ DETBreakAttributeBlock breakAttribute;
+ DETSavePropertyBlock saveProperty;
+ DETGetCustomViewUserReferenceBlock getCustomViewUserReference;
+ DETGetCustomViewBoundsBlock getCustomViewBounds;
+ DETGetResourceBlock getResource;
+ DETTemplateCounts templateCounts;
+ DETUnloadTemplatesBlock unloadTemplates;
+};
+typedef union DETCallBackBlock DETCallBackBlock;
+typedef DETCallBackBlock * DETCallBackBlockPtr;
+typedef union DETCallBlock DETCallBlock;
+
+typedef DETCallBlock * DETCallBlockPtr;
+typedef CALLBACK_API( OSErr , DETCallBackProcPtr )(DETCallBlock *callBlockPtr, DETCallBackBlockPtr callBackBlockPtr);
+typedef STACK_UPP_TYPE(DETCallBackProcPtr) DETCallBackUPP;
+typedef DETCallBackUPP DETCallBack;
+
+struct DETProtoCallBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, */
+ /* common to all invocations of code resource) */
+ long instancePrivate; /* Private storage for use by code resource (separate for each item using the */
+ /* code resource) */
+ DETTargetSpecification target; /* The target (originator) of the call, for targeted and property calls */
+ Boolean targetIsMainAspect; /* True if the target is the main aspect (even though it has a non-nil name) */
+ Boolean filler1;
+ short property; /* The property number the call refers to */
+};
+typedef struct DETProtoCallBlock DETProtoCallBlock;
+
+struct DETInitBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, common to all invocations of code resource) */
+ long newCallFors; /* <- New call-for mask */
+};
+typedef struct DETInitBlock DETInitBlock;
+
+struct DETExitBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, common to all invocations of code resource) */
+};
+typedef struct DETExitBlock DETExitBlock;
+
+struct DETInstanceInitBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, */
+ /* common to all invocations of code resource) */
+ long instancePrivate; /* Private storage for use by code resource (separate for each item using the */
+ /* code resource) */
+ DETTargetSpecification target; /* The target (originator) of the call, for targeted and property calls */
+ Boolean targetIsMainAspect; /* True if the target is the main aspect (even though it has a non-nil name) */
+ Boolean filler1;
+};
+typedef struct DETInstanceInitBlock DETInstanceInitBlock;
+
+struct DETInstanceExitBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, */
+ /* common to all invocations of code resource) */
+ long instancePrivate; /* Private storage for use by code resource (separate for each item using the */
+ /* code resource) */
+ DETTargetSpecification target; /* The target (originator) of the call, for targeted and property calls */
+ Boolean targetIsMainAspect; /* True if the target is the main aspect (even though it has a non-nil name) */
+ Boolean filler1;
+};
+typedef struct DETInstanceExitBlock DETInstanceExitBlock;
+
+struct DETInstanceIdleBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, */
+ /* common to all invocations of code resource) */
+ long instancePrivate; /* Private storage for use by code resource (separate for each item using the */
+ /* code resource) */
+ DETTargetSpecification target; /* The target (originator) of the call, for targeted and property calls */
+ Boolean targetIsMainAspect; /* True if the target is the main aspect (even though it has a non-nil name) */
+ Boolean filler1;
+};
+typedef struct DETInstanceIdleBlock DETInstanceIdleBlock;
+
+struct DETPropertyCommandBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, */
+ /* common to all invocations of code resource) */
+ long instancePrivate; /* Private storage for use by code resource (separate for each item using the */
+ /* code resource) */
+ DETTargetSpecification target; /* The target (originator) of the call, for targeted and property calls */
+ Boolean targetIsMainAspect; /* True if the target is the main aspect (even though it has a non-nil name) */
+ Boolean filler1;
+ short property; /* The property number the call refers to */
+ long parameter; /* -> Parameter of command */
+};
+typedef struct DETPropertyCommandBlock DETPropertyCommandBlock;
+
+struct DETMaximumTextLengthBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, */
+ /* common to all invocations of code resource) */
+ long instancePrivate; /* Private storage for use by code resource (separate for each item using the */
+ /* code resource) */
+ DETTargetSpecification target; /* The target (originator) of the call, for targeted and property calls */
+ Boolean targetIsMainAspect; /* True if the target is the main aspect (even though it has a non-nil name) */
+ Boolean filler1;
+ short property; /* The property number the call refers to */
+ long maxSize; /* <- Return the maximum number of characters the user can entry when property is edited in an EditText */
+};
+typedef struct DETMaximumTextLengthBlock DETMaximumTextLengthBlock;
+
+struct DETViewListChangedBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, */
+ /* common to all invocations of code resource) */
+ long instancePrivate; /* Private storage for use by code resource (separate for each item using the */
+ /* code resource) */
+ DETTargetSpecification target; /* The target (originator) of the call, for targeted and property calls */
+ Boolean targetIsMainAspect; /* True if the target is the main aspect (even though it has a non-nil name) */
+ Boolean filler1;
+};
+typedef struct DETViewListChangedBlock DETViewListChangedBlock;
+
+struct DETPropertyDirtiedBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, */
+ /* common to all invocations of code resource) */
+ long instancePrivate; /* Private storage for use by code resource (separate for each item using the */
+ /* code resource) */
+ DETTargetSpecification target; /* The target (originator) of the call, for targeted and property calls */
+ Boolean targetIsMainAspect; /* True if the target is the main aspect (even though it has a non-nil name) */
+ Boolean filler1;
+ short property; /* The property number the call refers to */
+};
+typedef struct DETPropertyDirtiedBlock DETPropertyDirtiedBlock;
+
+struct DETValidateSaveBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, */
+ /* common to all invocations of code resource) */
+ long instancePrivate; /* Private storage for use by code resource (separate for each item using the */
+ /* code resource) */
+ DETTargetSpecification target; /* The target (originator) of the call, for targeted and property calls */
+ Boolean targetIsMainAspect; /* True if the target is the main aspect (even though it has a non-nil name) */
+ Boolean filler1;
+ RStringHandle errorString; /* <- Handle with error string if validation fails (callee must allocate handle, DE will DisposHandle() it) */
+};
+typedef struct DETValidateSaveBlock DETValidateSaveBlock;
+
+struct DETDropQueryBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, */
+ /* common to all invocations of code resource) */
+ long instancePrivate; /* Private storage for use by code resource (separate for each item using the */
+ /* code resource) */
+ DETTargetSpecification target; /* The target (originator) of the call, for targeted and property calls */
+ Boolean targetIsMainAspect; /* True if the target is the main aspect (even though it has a non-nil name) */
+ Boolean filler1;
+ short modifiers; /* -> Modifiers at drop time (option/control/command/shift keys) */
+ long commandID; /* <-> Command ID (kDETDoNothing, kDETMove, kDETDrag (copy), kDETAlias, or a property number) */
+ AttributeType destinationType; /* <-> Type to convert attribute to */
+ Boolean copyToHFS; /* <- If true, object should be copied to HFS before being operated on, and deleted after */
+ Boolean filler2;
+};
+typedef struct DETDropQueryBlock DETDropQueryBlock;
+
+struct DETDropMeQueryBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, */
+ /* common to all invocations of code resource) */
+ long instancePrivate; /* Private storage for use by code resource (separate for each item using the */
+ /* code resource) */
+ DETTargetSpecification target; /* The target (originator) of the call, for targeted and property calls */
+ Boolean targetIsMainAspect; /* True if the target is the main aspect (even though it has a non-nil name) */
+ Boolean filler1;
+ short modifiers; /* -> Modifiers at drop time (option/control/command/shift keys) */
+ long commandID; /* <-> Command ID (kDETDoNothing, kDETMove, kDETDrag (copy), kDETAlias, or a property number) */
+ AttributeType destinationType; /* <-> Type to convert attribute to */
+ Boolean copyToHFS; /* <- If true, object should be copied to HFS before being operated on, and deleted after */
+ Boolean filler2;
+};
+typedef struct DETDropMeQueryBlock DETDropMeQueryBlock;
+
+struct DETAttributeCreationBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, common to all invocations of code resource) */
+ PackedDSSpecPtr parent; /* -> The object within which the creation will occur */
+ short refNum; /* -> Refnum for returned address (DSSpecs in PDs only) */
+ AuthIdentity identity; /* -> The identity we're browsing as in the parent object */
+ AttributeType attrType; /* <-> The type of the attribute being created */
+ AttributeTag attrTag; /* <-> The tag of the attribute being created */
+ Handle value; /* <-> The value to write (pre-allocated, resize as needed) */
+};
+typedef struct DETAttributeCreationBlock DETAttributeCreationBlock;
+
+struct DETAttributeNewBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, */
+ /* common to all invocations of code resource) */
+ long instancePrivate; /* Private storage for use by code resource (separate for each item using the */
+ /* code resource) */
+ DETTargetSpecification target; /* The target (originator) of the call, for targeted and property calls */
+ Boolean targetIsMainAspect; /* True if the target is the main aspect (even though it has a non-nil name) */
+ Boolean filler1;
+ PackedDSSpecPtr parent; /* -> The object within which the creation will occur */
+ short refNum; /* -> Refnum for returned address (DSSpecs in PDs only) */
+ AuthIdentity identity; /* -> The identity we're browsing as in the parent object */
+ AttributeType attrType; /* <-> The type of the attribute being created */
+ AttributeTag attrTag; /* <-> The tag of the attribute being created */
+ Handle value; /* <-> The value to write (pre-allocated, resize as needed) */
+};
+typedef struct DETAttributeNewBlock DETAttributeNewBlock;
+
+struct DETAttributeChangeBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, */
+ /* common to all invocations of code resource) */
+ long instancePrivate; /* Private storage for use by code resource (separate for each item using the */
+ /* code resource) */
+ DETTargetSpecification target; /* The target (originator) of the call, for targeted and property calls */
+ Boolean targetIsMainAspect; /* True if the target is the main aspect (even though it has a non-nil name) */
+ Boolean filler1;
+ PackedDSSpecPtr parent; /* -> The object within which the creation will occur */
+ short refNum; /* -> Refnum for returned address (DSSpecs in PDs only) */
+ AuthIdentity identity; /* -> The identity we're browsing as in the parent object */
+ AttributeType attrType; /* <-> The type of the attribute being changed */
+ AttributeTag attrTag; /* <-> The tag of the attribute being changed */
+ AttributeCreationID attrCID; /* <-> The CID of the attribute being changed */
+ Handle value; /* <-> The value to write (pre-allocated, resize as needed) */
+};
+typedef struct DETAttributeChangeBlock DETAttributeChangeBlock;
+
+struct DETAttributeDeleteBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, */
+ /* common to all invocations of code resource) */
+ long instancePrivate; /* Private storage for use by code resource (separate for each item using the */
+ /* code resource) */
+ DETTargetSpecification target; /* The target (originator) of the call, for targeted and property calls */
+ Boolean targetIsMainAspect; /* True if the target is the main aspect (even though it has a non-nil name) */
+ Boolean filler1;
+ PackedDSSpecPtr dsSpec; /* -> The object which will be deleted */
+ short refNum; /* -> Refnum for returned address (DSSpecs in PDs only) */
+ AuthIdentity identity; /* -> The identity we're browsing as */
+};
+typedef struct DETAttributeDeleteBlock DETAttributeDeleteBlock;
+
+struct DETItemNewBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, */
+ /* common to all invocations of code resource) */
+ long instancePrivate; /* Private storage for use by code resource (separate for each item using the */
+ /* code resource) */
+ DETTargetSpecification target; /* The target (originator) of the call, for targeted and property calls */
+ Boolean targetIsMainAspect; /* True if the target is the main aspect (even though it has a non-nil name) */
+ Boolean filler1;
+};
+typedef struct DETItemNewBlock DETItemNewBlock;
+
+struct DETShouldSyncBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, */
+ /* common to all invocations of code resource) */
+ long instancePrivate; /* Private storage for use by code resource (separate for each item using the */
+ /* code resource) */
+ DETTargetSpecification target; /* The target (originator) of the call, for targeted and property calls */
+ Boolean targetIsMainAspect; /* True if the target is the main aspect (even though it has a non-nil name) */
+ Boolean filler1;
+ Boolean shouldSync; /* <- True if we should now sync with catalog */
+ Boolean filler2;
+};
+typedef struct DETShouldSyncBlock DETShouldSyncBlock;
+
+struct DETDoSyncBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, */
+ /* common to all invocations of code resource) */
+ long instancePrivate; /* Private storage for use by code resource (separate for each item using the */
+ /* code resource) */
+ DETTargetSpecification target; /* The target (originator) of the call, for targeted and property calls */
+ Boolean targetIsMainAspect; /* True if the target is the main aspect (even though it has a non-nil name) */
+ Boolean filler1;
+};
+typedef struct DETDoSyncBlock DETDoSyncBlock;
+
+struct DETPatternInBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, */
+ /* common to all invocations of code resource) */
+ long instancePrivate; /* Private storage for use by code resource (separate for each item using the */
+ /* code resource) */
+ DETTargetSpecification target; /* The target (originator) of the call, for targeted and property calls */
+ Boolean targetIsMainAspect; /* True if the target is the main aspect (even though it has a non-nil name) */
+ Boolean filler1;
+ short property; /* The property number the call refers to */
+ long elementType; /* -> Element type from pattern */
+ long extra; /* -> Extra field from pattern */
+ AttributePtr attribute; /* -> The complete attribute */
+ long dataOffset; /* <-> Offset to current (next) byte */
+ short bitOffset; /* <-> Bit offset (next bit is *fData >> fBitOffset++) */
+};
+typedef struct DETPatternInBlock DETPatternInBlock;
+
+struct DETPatternOutBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, */
+ /* common to all invocations of code resource) */
+ long instancePrivate; /* Private storage for use by code resource (separate for each item using the */
+ /* code resource) */
+ DETTargetSpecification target; /* The target (originator) of the call, for targeted and property calls */
+ Boolean targetIsMainAspect; /* True if the target is the main aspect (even though it has a non-nil name) */
+ Boolean filler1;
+ short property; /* The property number the call refers to */
+ long elementType; /* -> Element type from pattern */
+ long extra; /* -> Extra field from pattern */
+ AttributePtr attribute; /* -> The attribute (minus the data portion) */
+ Handle data; /* -> Data to be written (pre-allocated, resize and add at end) */
+ long dataOffset; /* <-> Offset to next byte to write */
+ short bitOffset; /* <-> Bit offset (if zero, handle will need to be resized to one more byte before write) */
+};
+typedef struct DETPatternOutBlock DETPatternOutBlock;
+
+struct DETOpenSelfBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, */
+ /* common to all invocations of code resource) */
+ long instancePrivate; /* Private storage for use by code resource (separate for each item using the */
+ /* code resource) */
+ DETTargetSpecification target; /* The target (originator) of the call, for targeted and property calls */
+ Boolean targetIsMainAspect; /* True if the target is the main aspect (even though it has a non-nil name) */
+ Boolean filler1;
+ short modifiers; /* -> Modifiers at open time (option/control/command/shift keys) */
+};
+typedef struct DETOpenSelfBlock DETOpenSelfBlock;
+
+struct DETConvertToNumberBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, */
+ /* common to all invocations of code resource) */
+ long instancePrivate; /* Private storage for use by code resource (separate for each item using the */
+ /* code resource) */
+ DETTargetSpecification target; /* The target (originator) of the call, for targeted and property calls */
+ Boolean targetIsMainAspect; /* True if the target is the main aspect (even though it has a non-nil name) */
+ Boolean filler1;
+ short property; /* The property number the call refers to */
+ long theValue; /* <- The converted value to return */
+};
+typedef struct DETConvertToNumberBlock DETConvertToNumberBlock;
+
+struct DETConvertToRStringBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, */
+ /* common to all invocations of code resource) */
+ long instancePrivate; /* Private storage for use by code resource (separate for each item using the */
+ /* code resource) */
+ DETTargetSpecification target; /* The target (originator) of the call, for targeted and property calls */
+ Boolean targetIsMainAspect; /* True if the target is the main aspect (even though it has a non-nil name) */
+ Boolean filler1;
+ short property; /* The property number the call refers to */
+ RStringHandle theValue; /* <- A handle with the converted value (callee must allocate handle, DE will DisposHandle() it) */
+};
+typedef struct DETConvertToRStringBlock DETConvertToRStringBlock;
+
+struct DETConvertFromNumberBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, */
+ /* common to all invocations of code resource) */
+ long instancePrivate; /* Private storage for use by code resource (separate for each item using the */
+ /* code resource) */
+ DETTargetSpecification target; /* The target (originator) of the call, for targeted and property calls */
+ Boolean targetIsMainAspect; /* True if the target is the main aspect (even though it has a non-nil name) */
+ Boolean filler1;
+ short property; /* The property number the call refers to */
+ long theValue; /* -> The value to convert (result should be written direct to the property) */
+};
+typedef struct DETConvertFromNumberBlock DETConvertFromNumberBlock;
+
+struct DETConvertFromRStringBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, */
+ /* common to all invocations of code resource) */
+ long instancePrivate; /* Private storage for use by code resource (separate for each item using the */
+ /* code resource) */
+ DETTargetSpecification target; /* The target (originator) of the call, for targeted and property calls */
+ Boolean targetIsMainAspect; /* True if the target is the main aspect (even though it has a non-nil name) */
+ Boolean filler1;
+ short property; /* The property number the call refers to */
+ RStringPtr theValue; /* -> The value to convert (result should be written direct to the property) */
+};
+typedef struct DETConvertFromRStringBlock DETConvertFromRStringBlock;
+
+struct DETCustomViewDrawBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, */
+ /* common to all invocations of code resource) */
+ long instancePrivate; /* Private storage for use by code resource (separate for each item using the */
+ /* code resource) */
+ DETTargetSpecification target; /* The target (originator) of the call, for targeted and property calls */
+ Boolean targetIsMainAspect; /* True if the target is the main aspect (even though it has a non-nil name) */
+ Boolean filler1;
+ short property; /* The property number the call refers to */
+};
+typedef struct DETCustomViewDrawBlock DETCustomViewDrawBlock;
+
+struct DETCustomViewMouseDownBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, */
+ /* common to all invocations of code resource) */
+ long instancePrivate; /* Private storage for use by code resource (separate for each item using the */
+ /* code resource) */
+ DETTargetSpecification target; /* The target (originator) of the call, for targeted and property calls */
+ Boolean targetIsMainAspect; /* True if the target is the main aspect (even though it has a non-nil name) */
+ Boolean filler1;
+ short property; /* The property number the call refers to */
+ EventRecord * theEvent; /* -> The original event record of the mouse-down */
+};
+typedef struct DETCustomViewMouseDownBlock DETCustomViewMouseDownBlock;
+
+struct DETKeyPressBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, */
+ /* common to all invocations of code resource) */
+ long instancePrivate; /* Private storage for use by code resource (separate for each item using the */
+ /* code resource) */
+ DETTargetSpecification target; /* The target (originator) of the call, for targeted and property calls */
+ Boolean targetIsMainAspect; /* True if the target is the main aspect (even though it has a non-nil name) */
+ Boolean filler1;
+ short property; /* The property number the call refers to */
+ EventRecord * theEvent; /* -> The original event record of the key-press */
+};
+typedef struct DETKeyPressBlock DETKeyPressBlock;
+
+struct DETPasteBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, */
+ /* common to all invocations of code resource) */
+ long instancePrivate; /* Private storage for use by code resource (separate for each item using the */
+ /* code resource) */
+ DETTargetSpecification target; /* The target (originator) of the call, for targeted and property calls */
+ Boolean targetIsMainAspect; /* True if the target is the main aspect (even though it has a non-nil name) */
+ Boolean filler1;
+ short property; /* The property number the call refers to */
+ short modifiers; /* -> Modifiers at paste time (option/control/command/shift keys) */
+};
+typedef struct DETPasteBlock DETPasteBlock;
+
+struct DETCustomMenuSelectedBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, */
+ /* common to all invocations of code resource) */
+ long instancePrivate; /* Private storage for use by code resource (separate for each item using the */
+ /* code resource) */
+ DETTargetSpecification target; /* The target (originator) of the call, for targeted and property calls */
+ Boolean targetIsMainAspect; /* True if the target is the main aspect (even though it has a non-nil name) */
+ Boolean filler1;
+ short menuTableParameter; /* -> The "property" field from the custom menu table */
+};
+typedef struct DETCustomMenuSelectedBlock DETCustomMenuSelectedBlock;
+
+struct DETCustomMenuEnabledBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, */
+ /* common to all invocations of code resource) */
+ long instancePrivate; /* Private storage for use by code resource (separate for each item using the */
+ /* code resource) */
+ DETTargetSpecification target; /* The target (originator) of the call, for targeted and property calls */
+ Boolean targetIsMainAspect; /* True if the target is the main aspect (even though it has a non-nil name) */
+ Boolean filler1;
+ short menuTableParameter; /* -> The "property" field from the custom menu table */
+ Boolean enable; /* <- Whether to enable the menu item */
+ Boolean filler2;
+};
+typedef struct DETCustomMenuEnabledBlock DETCustomMenuEnabledBlock;
+
+struct DETForwarderListItem {
+ struct DETForwarderListItem ** next; /* Pointer to next item, or nil */
+ AttributeTag attributeValueTag; /* Tag of new templates (0 for none) */
+ PackedPathName rstrs; /* Record type (empty if none), attrbute type (empty if none),list of template names to forward to */
+};
+typedef struct DETForwarderListItem DETForwarderListItem;
+
+typedef DETForwarderListItem * DETForwarderListPtr;
+typedef DETForwarderListPtr * DETForwarderListHandle;
+
+struct DETDynamicForwardersBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, common to all invocations of code resource) */
+ DETForwarderListHandle forwarders; /* <- List of forwaders */
+};
+typedef struct DETDynamicForwardersBlock DETDynamicForwardersBlock;
+
+struct DETDynamicResourceBlock {
+ DETCallFunctions reqFunction; /* Requested function */
+ DETCallBack callBack; /* Pointer to call-back routine */
+ long callBackPrivate; /* Private data for the call-back routine */
+ long templatePrivate; /* Private storage for use by code resource (stays for life of code resource, */
+ /* common to all invocations of code resource) */
+ long instancePrivate; /* Private storage for use by code resource (separate for each item using the */
+ /* code resource) */
+ DETTargetSpecification target; /* The target (originator) of the call, for targeted and property calls */
+ Boolean targetIsMainAspect; /* True if the target is the main aspect (even though it has a non-nil name) */
+ Boolean filler1;
+ ResType resourceType; /* -> The resource type being requested */
+ short propertyNumber; /* -> The property number of the resource being requested */
+ short resourceID; /* -> The resource ID (base ID + property number) of the resource */
+ Handle theResource; /* <- The requested resource */
+};
+typedef struct DETDynamicResourceBlock DETDynamicResourceBlock;
+
+
+union DETCallBlock {
+ DETProtoCallBlock protoCall;
+ DETInitBlock init;
+ DETExitBlock exit;
+ DETInstanceInitBlock instanceInit;
+ DETInstanceExitBlock instanceExit;
+ DETInstanceIdleBlock instanceIdle;
+ DETPropertyCommandBlock propertyCommand;
+ DETMaximumTextLengthBlock maximumTextLength;
+ DETViewListChangedBlock viewListChanged;
+ DETPropertyDirtiedBlock propertyDirtied;
+ DETValidateSaveBlock validateSave;
+ DETDropQueryBlock dropQuery;
+ DETDropMeQueryBlock dropMeQuery;
+ DETAttributeCreationBlock attributeCreationBlock;
+ DETAttributeNewBlock attributeNew;
+ DETAttributeChangeBlock attributeChange;
+ DETAttributeDeleteBlock attributeDelete;
+ DETItemNewBlock itemNew;
+ DETPatternInBlock patternIn;
+ DETPatternOutBlock patternOut;
+ DETShouldSyncBlock shouldSync;
+ DETDoSyncBlock doSync;
+ DETOpenSelfBlock openSelf;
+ DETConvertToNumberBlock convertToNumber;
+ DETConvertToRStringBlock convertToRString;
+ DETConvertFromNumberBlock convertFromNumber;
+ DETConvertFromRStringBlock convertFromRString;
+ DETCustomViewDrawBlock customViewDraw;
+ DETCustomViewMouseDownBlock customViewMouseDown;
+ DETKeyPressBlock keyPress;
+ DETPasteBlock paste;
+ DETCustomMenuSelectedBlock customMenuSelected;
+ DETCustomMenuEnabledBlock customMenuEnabled;
+ DETDynamicForwardersBlock dynamicForwarders;
+ DETDynamicResourceBlock dynamicResource;
+};
+
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(DETCallBackUPP)
+ NewDETCallBackUPP (DETCallBackProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeDETCallBackUPP (DETCallBackUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeDETCallBackUPP (DETCallBlock * callBlockPtr,
+ DETCallBackBlockPtr callBackBlockPtr,
+ DETCallBackUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppDETCallBackProcInfo = 0x000003E0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes) */
+ #define NewDETCallBackUPP(userRoutine) (DETCallBackUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDETCallBackProcInfo, GetCurrentArchitecture())
+ #define DisposeDETCallBackUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeDETCallBackUPP(callBlockPtr, callBackBlockPtr, userUPP) (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppDETCallBackProcInfo, (callBlockPtr), (callBackBlockPtr))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewDETCallBackProc(userRoutine) NewDETCallBackUPP(userRoutine)
+#define CallDETCallBackProc(userRoutine, callBlockPtr, callBackBlockPtr) InvokeDETCallBackUPP(callBlockPtr, callBackBlockPtr, userRoutine)
+/* Call-for list: */
+enum {
+ kDETCallForOther = 1, /* Call for things not listed below (also auto-enabled by DE if any of the below are enabled) */
+ kDETCallForIdle = 2, /* kDETcmdIdle */
+ kDETCallForCommands = 4, /* kDETcmdPropertyCommand, kDETcmdSelfOpen */
+ kDETCallForViewChanges = 8, /* kDETcmdViewListChanged, kDETcmdPropertyDirtied, kDETcmdMaximumTextLength */
+ kDETCallForDrops = 0x10, /* kDETcmdDropQuery, kDETcmdDropMeQuery */
+ kDETCallForAttributes = 0x20, /* kDETcmdAttributeCreation, kDETcmdAttributeNew, kDETcmdAttributeChange, kDETcmdAttributeDelete */
+ kDETCallForValidation = 0x40, /* kDETcmdValidateSave */
+ kDETCallForKeyPresses = 0x80, /* kDETcmdKeyPress and kDETcmdPaste */
+ kDETCallForResources = 0x0100, /* kDETcmdDynamicResource */
+ kDETCallForSyncing = 0x0200, /* kDETcmdShouldSync, kDETcmdDoSync */
+ kDETCallForEscalation = 0x8000, /* All calls escalated from the next lower level */
+ kDETCallForNothing = 0, /* None of the above */
+ kDETCallForEverything = (long)0xFFFFFFFF /* All of the above */
+};
+
+typedef CALLBACK_API( OSErr , DETCallProcPtr )(DETCallBlockPtr callBlockPtr);
+typedef STACK_UPP_TYPE(DETCallProcPtr) DETCallUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(DETCallUPP)
+ NewDETCallUPP (DETCallProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeDETCallUPP (DETCallUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeDETCallUPP (DETCallBlockPtr callBlockPtr,
+ DETCallUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppDETCallProcInfo = 0x000000E0 }; /* pascal 2_bytes Func(4_bytes) */
+ #define NewDETCallUPP(userRoutine) (DETCallUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDETCallProcInfo, GetCurrentArchitecture())
+ #define DisposeDETCallUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeDETCallUPP(callBlockPtr, userUPP) (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppDETCallProcInfo, (callBlockPtr))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewDETCallProc(userRoutine) NewDETCallUPP(userRoutine)
+#define CallDETCallProc(userRoutine, callBlockPtr) InvokeDETCallUPP(callBlockPtr, userRoutine)
+
+typedef DETCallUPP DETCall;
+/* This following macro saves you from having to dig out the call-back pointer from the call block: */
+#define CallBackDET(callBlockPtr, callBackBlockPtr) CallDETCallBackProc(callBlockPtr->protoCall.callBack,callBlockPtr,callBackBlockPtr)
+#endif /* REZ */
+
+/************************************************************************************/
+/********************************* SAM Definitions: *********************************/
+/************************************************************************************/
+
+/* SAM Developers should use property numbers starting at this point: */
+#define kSAMFirstDevProperty kDETFirstDevProperty + 10
+
+
+/*
+ SAM templates have additional resources/properties that are required
+ for interaction with the AOCE Key Chain.
+
+ Type Offset Description
+ ---- ------ -----------
+ 'rstr' kSAMAspectUserName The user name
+ 'rstr' kSAMAspectKind The kind of SAM
+ 'detn' kSAMAspectCannotDelete If 0, then the slot cannot be deleted
+ 'sami' kSAMAspectSlotCreationInfo The info required to create a slot record
+*/
+
+#define kSAMAspectUserName kDETFirstDevProperty + 1
+#define kSAMAspectKind kDETFirstDevProperty + 2
+#define kSAMAspectCannotDelete kDETFirstDevProperty + 3
+#define kSAMAspectSlotCreationInfo kDETFirstDevProperty + 4
+
+/**************************************************************************************
+ ********************************* Admin Definitions: *********************************
+ **************************************************************************************/
+
+#define kDETAdminVersion -978
+
+
+
+
+#ifndef REZ
+
+#endif /* REZ */
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __OCETEMPLATES__ */
+
diff --git a/include/qt/OSA.h b/include/qt/OSA.h
new file mode 100644
index 000000000..8bb834e98
--- /dev/null
+++ b/include/qt/OSA.h
@@ -0,0 +1,1459 @@
+/*
+ File: OSA.h
+
+ Contains: Open Scripting Architecture Client Interfaces.
+
+ Version: Technology: AppleScript 1.4
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1992-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __OSA__
+#define __OSA__
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+#ifndef __APPLEEVENTS__
+#include "AppleEvents.h"
+#endif
+
+#ifndef __AEOBJECTS__
+#include "AEObjects.h"
+#endif
+
+#ifndef __COMPONENTS__
+#include "Components.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/**************************************************************************
+ Types and Constants
+**************************************************************************/
+
+/* The componenent manager type code for components that
+ support the OSA interface defined here. */
+/* 0x6f736120 */
+enum {
+ kOSAComponentType = FOUR_CHAR_CODE('osa ')
+};
+
+/* 0x73637074 */
+enum {
+ kOSAGenericScriptingComponentSubtype = FOUR_CHAR_CODE('scpt')
+};
+
+/* Type of script document files. */
+/* 0x6f736173 */
+enum {
+ kOSAFileType = FOUR_CHAR_CODE('osas')
+};
+
+/*
+ Suite and event code of the RecordedText event.
+ (See OSAStartRecording, below.)
+ */
+/* 0x61736372 */
+enum {
+ kOSASuite = FOUR_CHAR_CODE('ascr')
+};
+
+/* 0x72656364 */
+enum {
+ kOSARecordedText = FOUR_CHAR_CODE('recd')
+};
+
+/* Selector returns boolean */
+/* 0x6d6f6469 */
+enum {
+ kOSAScriptIsModified = FOUR_CHAR_CODE('modi')
+};
+
+/* Selector returns boolean */
+/* 0x63736372 */
+enum {
+ kOSAScriptIsTypeCompiledScript = FOUR_CHAR_CODE('cscr')
+};
+
+/* Selector returns boolean */
+/* 0x76616c75 */
+enum {
+ kOSAScriptIsTypeScriptValue = FOUR_CHAR_CODE('valu')
+};
+
+/* Selector returns boolean */
+/* 0x636e7478 */
+enum {
+ kOSAScriptIsTypeScriptContext = FOUR_CHAR_CODE('cntx')
+};
+
+/* Selector returns a DescType which may be passed to OSACoerceToDesc */
+/* 0x62657374 */
+enum {
+ kOSAScriptBestType = FOUR_CHAR_CODE('best')
+};
+
+/*
+ This selector is used to determine whether a script has source
+ associated with it that when given to OSAGetSource, the call will not
+ fail. The selector returns a boolean.
+ */
+/* 0x67737263 */
+enum {
+ kOSACanGetSource = FOUR_CHAR_CODE('gsrc')
+};
+
+
+enum {
+ typeOSADialectInfo = FOUR_CHAR_CODE('difo'), /* 0x6469666f */
+ keyOSADialectName = FOUR_CHAR_CODE('dnam'), /* 0x646e616d */
+ keyOSADialectCode = FOUR_CHAR_CODE('dcod'), /* 0x64636f64 */
+ keyOSADialectLangCode = FOUR_CHAR_CODE('dlcd'), /* 0x646c6364 */
+ keyOSADialectScriptCode = FOUR_CHAR_CODE('dscd') /* 0x64736364 */
+};
+
+typedef ComponentResult OSAError;
+/* Under the Open Scripting Architecture all error results are longs */
+typedef unsigned long OSAID;
+/*
+ OSAIDs allow transparent manipulation of scripts associated with
+ various scripting systems.
+ */
+enum {
+ kOSANullScript = 0L
+};
+
+/* No -script constant. */
+enum {
+ kOSANullMode = 0, /* sounds better */
+ kOSAModeNull = 0 /* tastes consistent */
+};
+
+/*
+ Some routines take flags that control their execution. This constant
+ declares default mode settings are used.
+ */
+typedef CALLBACK_API( OSErr , OSACreateAppleEventProcPtr )(AEEventClass theAEEventClass, AEEventID theAEEventID, const AEAddressDesc *target, short returnID, long transactionID, AppleEvent *result, long refCon);
+typedef CALLBACK_API( OSErr , OSASendProcPtr )(const AppleEvent *theAppleEvent, AppleEvent *reply, AESendMode sendMode, AESendPriority sendPriority, long timeOutInTicks, AEIdleUPP idleProc, AEFilterUPP filterProc, long refCon);
+typedef STACK_UPP_TYPE(OSACreateAppleEventProcPtr) OSACreateAppleEventUPP;
+typedef STACK_UPP_TYPE(OSASendProcPtr) OSASendUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(OSACreateAppleEventUPP)
+ NewOSACreateAppleEventUPP (OSACreateAppleEventProcPtr userRoutine);
+
+ EXTERN_API(OSASendUPP)
+ NewOSASendUPP (OSASendProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeOSACreateAppleEventUPP (OSACreateAppleEventUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeOSASendUPP (OSASendUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeOSACreateAppleEventUPP (AEEventClass theAEEventClass,
+ AEEventID theAEEventID,
+ const AEAddressDesc * target,
+ short returnID,
+ long transactionID,
+ AppleEvent * result,
+ long refCon,
+ OSACreateAppleEventUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeOSASendUPP (const AppleEvent * theAppleEvent,
+ AppleEvent * reply,
+ AESendMode sendMode,
+ AESendPriority sendPriority,
+ long timeOutInTicks,
+ AEIdleUPP idleProc,
+ AEFilterUPP filterProc,
+ long refCon,
+ OSASendUPP userUPP);
+
+#else
+ enum { uppOSACreateAppleEventProcInfo = 0x000FEFE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppOSASendProcInfo = 0x003FEFE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewOSACreateAppleEventUPP(userRoutine) (OSACreateAppleEventUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppOSACreateAppleEventProcInfo, GetCurrentArchitecture())
+ #define NewOSASendUPP(userRoutine) (OSASendUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppOSASendProcInfo, GetCurrentArchitecture())
+ #define DisposeOSACreateAppleEventUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeOSASendUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeOSACreateAppleEventUPP(theAEEventClass, theAEEventID, target, returnID, transactionID, result, refCon, userUPP) (OSErr)CALL_SEVEN_PARAMETER_UPP((userUPP), uppOSACreateAppleEventProcInfo, (theAEEventClass), (theAEEventID), (target), (returnID), (transactionID), (result), (refCon))
+ #define InvokeOSASendUPP(theAppleEvent, reply, sendMode, sendPriority, timeOutInTicks, idleProc, filterProc, refCon, userUPP) (OSErr)CALL_EIGHT_PARAMETER_UPP((userUPP), uppOSASendProcInfo, (theAppleEvent), (reply), (sendMode), (sendPriority), (timeOutInTicks), (idleProc), (filterProc), (refCon))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewOSACreateAppleEventProc(userRoutine) NewOSACreateAppleEventUPP(userRoutine)
+#define NewOSASendProc(userRoutine) NewOSASendUPP(userRoutine)
+#define CallOSACreateAppleEventProc(userRoutine, theAEEventClass, theAEEventID, target, returnID, transactionID, result, refCon) InvokeOSACreateAppleEventUPP(theAEEventClass, theAEEventID, target, returnID, transactionID, result, refCon, userRoutine)
+#define CallOSASendProc(userRoutine, theAppleEvent, reply, sendMode, sendPriority, timeOutInTicks, idleProc, filterProc, refCon) InvokeOSASendUPP(theAppleEvent, reply, sendMode, sendPriority, timeOutInTicks, idleProc, filterProc, refCon, userRoutine)
+/**************************************************************************
+ OSA Interface Descriptions
+**************************************************************************
+ The OSA Interface is broken down into a required interface, and several
+ optional interfaces to support additional functionality. A given scripting
+ component may choose to support only some of the optional interfaces in
+ addition to the basic interface. The OSA Component Flags may be used to
+ query the Component Manager to find a scripting component with a particular
+ capability, or determine if a particular scripting component supports a
+ particular capability.
+**************************************************************************/
+/* OSA Component Flags: */
+enum {
+ kOSASupportsCompiling = 0x0002,
+ kOSASupportsGetSource = 0x0004,
+ kOSASupportsAECoercion = 0x0008,
+ kOSASupportsAESending = 0x0010,
+ kOSASupportsRecording = 0x0020,
+ kOSASupportsConvenience = 0x0040,
+ kOSASupportsDialects = 0x0080,
+ kOSASupportsEventHandling = 0x0100
+};
+
+/* Component Selectors: */
+enum {
+ kOSASelectLoad = 0x0001,
+ kOSASelectStore = 0x0002,
+ kOSASelectExecute = 0x0003,
+ kOSASelectDisplay = 0x0004,
+ kOSASelectScriptError = 0x0005,
+ kOSASelectDispose = 0x0006,
+ kOSASelectSetScriptInfo = 0x0007,
+ kOSASelectGetScriptInfo = 0x0008,
+ kOSASelectSetActiveProc = 0x0009,
+ kOSASelectGetActiveProc = 0x000A
+};
+
+/* Compiling: */
+enum {
+ kOSASelectScriptingComponentName = 0x0102,
+ kOSASelectCompile = 0x0103,
+ kOSASelectCopyID = 0x0104
+};
+
+/* GetSource: */
+enum {
+ kOSASelectGetSource = 0x0201
+};
+
+/* AECoercion: */
+enum {
+ kOSASelectCoerceFromDesc = 0x0301,
+ kOSASelectCoerceToDesc = 0x0302
+};
+
+/* AESending: */
+enum {
+ kOSASelectSetSendProc = 0x0401,
+ kOSASelectGetSendProc = 0x0402,
+ kOSASelectSetCreateProc = 0x0403,
+ kOSASelectGetCreateProc = 0x0404,
+ kOSASelectSetDefaultTarget = 0x0405
+};
+
+/* Recording: */
+enum {
+ kOSASelectStartRecording = 0x0501,
+ kOSASelectStopRecording = 0x0502
+};
+
+/* Convenience: */
+enum {
+ kOSASelectLoadExecute = 0x0601,
+ kOSASelectCompileExecute = 0x0602,
+ kOSASelectDoScript = 0x0603
+};
+
+/* Dialects: */
+enum {
+ kOSASelectSetCurrentDialect = 0x0701,
+ kOSASelectGetCurrentDialect = 0x0702,
+ kOSASelectAvailableDialects = 0x0703,
+ kOSASelectGetDialectInfo = 0x0704,
+ kOSASelectAvailableDialectCodeList = 0x0705
+};
+
+/* Event Handling: */
+enum {
+ kOSASelectSetResumeDispatchProc = 0x0801,
+ kOSASelectGetResumeDispatchProc = 0x0802,
+ kOSASelectExecuteEvent = 0x0803,
+ kOSASelectDoEvent = 0x0804,
+ kOSASelectMakeContext = 0x0805
+};
+
+/* scripting component specific selectors are added beginning with this value */
+enum {
+ kOSASelectComponentSpecificStart = 0x1001
+};
+
+
+/* Mode Flags:
+
+ Warning: These should not conflict with the AESend mode flags in
+ AppleEvents.h, because we may want to use them as OSA mode flags too.
+*/
+
+/*
+ This mode flag may be passed to OSALoad, OSAStore or OSACompile to
+ instruct the scripting component to not retain the "source" of an
+ expression. This will cause the OSAGetSource call to return the error
+ errOSASourceNotAvailable if used. However, some scripting components
+ may not retain the source anyway. This is mainly used when either space
+ efficiency is desired, or a script is to be "locked" so that its
+ implementation may not be viewed.
+ */
+enum {
+ kOSAModePreventGetSource = 0x00000001
+};
+
+/*
+ These mode flags may be passed to OSACompile, OSAExecute, OSALoadExecute
+ OSACompileExecute, OSADoScript, OSAExecuteEvent, or OSADoEvent to
+ indicate whether or not the script may interact with the user, switch
+ layer or reconnect if necessary. Any AppleEvents will be sent with the
+ corresponding AESend mode supplied.
+ */
+enum {
+ kOSAModeNeverInteract = kAENeverInteract,
+ kOSAModeCanInteract = kAECanInteract,
+ kOSAModeAlwaysInteract = kAEAlwaysInteract,
+ kOSAModeDontReconnect = kAEDontReconnect
+};
+
+/*
+ This mode flag may be passed to OSACompile, OSAExecute, OSALoadExecute
+ OSACompileExecute, OSADoScript, OSAExecuteEvent, or OSADoEvent to
+ indicate whether or not AppleEvents should be sent with the
+ kAECanSwitchLayer mode flag sent or not. NOTE: This flag is exactly the
+ opposite sense of the AppleEvent flag kAECanSwitchLayer. This is to
+ provide a more convenient default, i.e. not supplying any mode
+ (kOSAModeNull) means to send events with kAECanSwitchLayer. Supplying
+ the kOSAModeCantSwitchLayer mode flag will cause AESend to be called
+ without kAECanSwitchLayer.
+ */
+enum {
+ kOSAModeCantSwitchLayer = 0x00000040
+};
+
+/*
+ This mode flag may be passed to OSACompile, OSAExecute, OSALoadExecute
+ OSACompileExecute, OSADoScript, OSAExecuteEvent, or OSADoEvent to
+ indicate whether or not AppleEvents should be sent with the kAEDontRecord
+ mode flag sent or not. NOTE: This flag is exactly the opposite sense of
+ the AppleEvent flag kAEDontRecord. This is to provide a more convenient
+ default, i.e. not supplying any mode (kOSAModeNull) means to send events
+ with kAEDontRecord. Supplying the kOSAModeDoRecord mode flag will
+ cause AESend to be called without kAEDontRecord.
+ */
+enum {
+ kOSAModeDoRecord = 0x00001000
+};
+
+/*
+ This is a mode flag for OSACompile that indicates that a context should
+ be created as the result of compilation. All handler definitions are
+ inserted into the new context, and variables are initialized by
+ evaluating their initial values in a null context (i.e. they must be
+ constant expressions).
+ */
+enum {
+ kOSAModeCompileIntoContext = 0x00000002
+};
+
+/*
+ This is a mode flag for OSACompile that indicates that the previous
+ script ID (input to OSACompile) should be augmented with any new
+ definitions in the sourceData rather than replaced with a new script.
+ This means that the previous script ID must designate a context.
+ The presence of this flag causes the kOSAModeCompileIntoContext flag
+ to be implicitly used, causing any new definitions to be initialized
+ in a null context.
+ */
+enum {
+ kOSAModeAugmentContext = 0x00000004
+};
+
+/*
+ This mode flag may be passed to OSADisplay or OSADoScript to indicate
+ that output only need be human-readable, not re-compilable by OSACompile.
+ If used, output may be arbitrarily "beautified", e.g. quotes may be left
+ off of string values, long lists may have elipses, etc.
+ */
+enum {
+ kOSAModeDisplayForHumans = 0x00000008
+};
+
+/*
+ This mode flag may be passed to OSAStore in the case where the scriptID
+ is a context. This causes the context to be saved, but not the context's
+ parent context. When the stored context is loaded back in, the parent
+ will be kOSANullScript.
+ */
+enum {
+ kOSAModeDontStoreParent = 0x00010000
+};
+
+/*
+ This mode flag may be passed to OSAExecuteEvent to cause the event to
+ be dispatched to the direct object of the event. The direct object (or
+ subject attribute if the direct object is a non-object specifier) will
+ be resolved, and the resulting script object will be the recipient of
+ the message. The context argument to OSAExecuteEvent will serve as the
+ root of the lookup/resolution process.
+ */
+enum {
+ kOSAModeDispatchToDirectObject = 0x00020000
+};
+
+/*
+ This mode flag may be passed to OSAExecuteEvent to indicate that
+ components do not have to get the data of object specifier arguments.
+ */
+enum {
+ kOSAModeDontGetDataForArguments = 0x00040000
+};
+
+/**************************************************************************
+ OSA Basic Scripting Interface
+**************************************************************************
+ Scripting components must at least support the Basic Scripting interface.
+**************************************************************************/
+/* Loading and Storing Scripts:
+
+ These routines allow scripts to be loaded and stored in their internal
+ (possibly compiled, non-text) representation.
+*/
+
+/* Resource type for scripts */
+enum {
+ kOSAScriptResourceType = kOSAGenericScriptingComponentSubtype
+};
+
+/*
+ Default type given to OSAStore which creates "generic" loadable script
+ data descriptors.
+ */
+enum {
+ typeOSAGenericStorage = kOSAScriptResourceType
+};
+
+EXTERN_API( OSAError )
+OSALoad (ComponentInstance scriptingComponent,
+ const AEDesc * scriptData,
+ long modeFlags,
+ OSAID * resultingScriptID) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0001, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectLoad, 12);
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSABadStorageType: scriptData not for this scripting component
+ errOSACorruptData: data seems to be corrupt
+ errOSADataFormatObsolete script data format is no longer supported
+ errOSADataFormatTooNew script data format is from a newer version
+
+ ModeFlags:
+ kOSAModePreventGetSource
+ */
+EXTERN_API( OSAError )
+OSAStore (ComponentInstance scriptingComponent,
+ OSAID scriptID,
+ DescType desiredType,
+ long modeFlags,
+ AEDesc * resultingScriptData) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0002, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectStore, 16);
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSAInvalidID
+ errOSABadStorageType: desiredType not for this scripting component
+
+ ModeFlags:
+ kOSAModePreventGetSource
+ kOSAModeDontStoreParent
+ */
+/* Executing Scripts: */
+EXTERN_API( OSAError )
+OSAExecute (ComponentInstance scriptingComponent,
+ OSAID compiledScriptID,
+ OSAID contextID,
+ long modeFlags,
+ OSAID * resultingScriptValueID) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0003, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectExecute, 16);
+ This call runs a script. The contextID represents the environment
+ with which global variables in the script are resolved. The constant
+ kOSANullScript may be used for the contextID if the application wishes
+ to not deal with context directly (a default one is associated with each
+ scripting component instance). The resultingScriptValueID is the
+ result of evaluation, and contains a value which may be displayed using
+ the OSAGetSource call. The modeFlags convey scripting component
+ specific information.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSAInvalidID
+ errOSAScriptError: the executing script got an error
+
+ ModeFlags:
+ kOSAModeNeverInteract
+ kOSAModeCanInteract
+ kOSAModeAlwaysInteract
+ kOSAModeCantSwitchLayer
+ kOSAModeDontReconnect
+ kOSAModeDoRecord
+ */
+/* Displaying results: */
+EXTERN_API( OSAError )
+OSADisplay (ComponentInstance scriptingComponent,
+ OSAID scriptValueID,
+ DescType desiredType,
+ long modeFlags,
+ AEDesc * resultingText) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0004, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectDisplay, 16);
+ This call is used to convert results (script value IDs) into displayable
+ text. The desiredType should be at least typeChar, and modeFlags are
+ scripting system specific flags to control the formatting of the
+ resulting text. This call differs from OSAGetSource in that (1) it
+ always produces at least typeChar, (2) is only works on script values,
+ (3) it may display it's output in non-compilable form (e.g. without
+ string quotes, elipses inserted in long and/or circular lists, etc.) and
+ (4) it is required by the basic scripting interface.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSAInvalidID
+ errAECoercionFail: desiredType not supported by scripting component
+
+ ModeFlags:
+ kOSAModeDisplayForHumans
+ */
+/* Getting Error Information: */
+EXTERN_API( OSAError )
+OSAScriptError (ComponentInstance scriptingComponent,
+ OSType selector,
+ DescType desiredType,
+ AEDesc * resultingErrorDescription) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0005, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectScriptError, 12);
+ Whenever script execution returns errOSAExecutionError, this routine
+ may be used to get information about that error. The selector describes
+ the type of information desired about the error (various selectors are
+ listed below). The desiredType indicates the data type of the result
+ desired for that selector.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSABadSelector: selector not supported by scripting component
+ errAECoercionFail: desiredType not supported by scripting component
+ */
+/* OSAScriptError selectors: */
+/*
+ This selector is used to determine the error number of a script error.
+ These error numbers may be either system error numbers, or error numbers
+ that are scripting component specific.
+ Required desiredTypes:
+ typeShortInteger
+ */
+enum {
+ kOSAErrorNumber = keyErrorNumber
+};
+
+/*
+ This selector is used to determine the full error message associated
+ with the error number. It should include the name of the application
+ which caused the error, as well as the specific error that occurred.
+ This selector is sufficient for simple error reporting (but see
+ kOSAErrorBriefMessage, below).
+ Required desiredTypes:
+ typeChar error message string
+ */
+enum {
+ kOSAErrorMessage = keyErrorString
+};
+
+/*
+ This selector is used to determine a brief error message associated with
+ the error number. This message and should not mention the name of the
+ application which caused the error, any partial results or offending
+ object (see kOSAErrorApp, kOSAErrorPartialResult and
+ kOSAErrorOffendingObject, below).
+ Required desiredTypes:
+ typeChar brief error message string
+ */
+/* 0x65727262 */
+enum {
+ kOSAErrorBriefMessage = FOUR_CHAR_CODE('errb')
+};
+
+/*
+ This selector is used to determine which application actually got the
+ error (if it was the result of an AESend), or the current application
+ if ....
+ Required desiredTypes:
+ typeProcessSerialNumber PSN of the errant application
+ typeChar name of the errant application
+ */
+/* 0x65726170 */
+enum {
+ kOSAErrorApp = FOUR_CHAR_CODE('erap')
+};
+
+/*
+ This selector is used to determine any partial result returned by an
+ operation. If an AESend call failed, but a partial result was returned,
+ then the partial result may be returned as an AEDesc.
+ Required desiredTypes:
+ typeBest AEDesc of any partial result
+ */
+/* 0x70746c72 */
+enum {
+ kOSAErrorPartialResult = FOUR_CHAR_CODE('ptlr')
+};
+
+/*
+ This selector is used to determine any object which caused the error
+ that may have been indicated by an application. The result is an
+ AEDesc.
+ Required desiredTypes:
+ typeBest AEDesc of any offending object
+ */
+/* 0x65726f62 */
+enum {
+ kOSAErrorOffendingObject = FOUR_CHAR_CODE('erob')
+};
+
+/*
+ This selector is used to determine the type expected by a coercion
+ operation if a type error occurred.
+ */
+/* 0x65727274 */
+enum {
+ kOSAErrorExpectedType = FOUR_CHAR_CODE('errt')
+};
+
+/*
+ This selector is used to determine the source text range (start and
+ end positions) of where the error occurred.
+ Required desiredTypes:
+ typeOSAErrorRange
+ */
+/* 0x65726e67 */
+enum {
+ kOSAErrorRange = FOUR_CHAR_CODE('erng')
+};
+
+/*
+ An AERecord type containing keyOSASourceStart and keyOSASourceEnd fields
+ of type short.
+ */
+/* 0x65726e67 */
+enum {
+ typeOSAErrorRange = FOUR_CHAR_CODE('erng')
+};
+
+/* Field of a typeOSAErrorRange record of typeShortInteger */
+/* 0x73726373 */
+enum {
+ keyOSASourceStart = FOUR_CHAR_CODE('srcs')
+};
+
+/* Field of a typeOSAErrorRange record of typeShortInteger */
+/* 0x73726365 */
+enum {
+ keyOSASourceEnd = FOUR_CHAR_CODE('srce')
+};
+
+/* Disposing Script IDs: */
+EXTERN_API( OSAError )
+OSADispose (ComponentInstance scriptingComponent,
+ OSAID scriptID) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0006, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectDispose, 4);
+ Disposes a script or context.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSAInvalidID
+ */
+/* Getting and Setting Script Information: */
+EXTERN_API( OSAError )
+OSASetScriptInfo (ComponentInstance scriptingComponent,
+ OSAID scriptID,
+ OSType selector,
+ long value) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0007, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectSetScriptInfo, 12);
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSAInvalidID
+ errOSABadSelector: selector not supported by scripting component
+ or selector not for this scriptID
+ */
+EXTERN_API( OSAError )
+OSAGetScriptInfo (ComponentInstance scriptingComponent,
+ OSAID scriptID,
+ OSType selector,
+ long * result) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0008, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectGetScriptInfo, 12);
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSAInvalidID
+ errOSABadSelector: selector not supported by scripting component
+ or selector not for this scriptID
+ */
+/* Manipulating the ActiveProc:
+
+ Scripting systems will supply default values for these procedures if they
+ are not set by the client:
+*/
+typedef CALLBACK_API( OSErr , OSAActiveProcPtr )(long refCon);
+typedef STACK_UPP_TYPE(OSAActiveProcPtr) OSAActiveUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(OSAActiveUPP)
+ NewOSAActiveUPP (OSAActiveProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeOSAActiveUPP (OSAActiveUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeOSAActiveUPP (long refCon,
+ OSAActiveUPP userUPP);
+
+#else
+ enum { uppOSAActiveProcInfo = 0x000000E0 }; /* pascal 2_bytes Func(4_bytes) */
+ #define NewOSAActiveUPP(userRoutine) (OSAActiveUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppOSAActiveProcInfo, GetCurrentArchitecture())
+ #define DisposeOSAActiveUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeOSAActiveUPP(refCon, userUPP) (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppOSAActiveProcInfo, (refCon))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewOSAActiveProc(userRoutine) NewOSAActiveUPP(userRoutine)
+#define CallOSAActiveProc(userRoutine, refCon) InvokeOSAActiveUPP(refCon, userRoutine)
+EXTERN_API( OSAError )
+OSASetActiveProc (ComponentInstance scriptingComponent,
+ OSAActiveUPP activeProc,
+ long refCon) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0009, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectSetActiveProc, 8);
+ If activeProc is nil, the default activeProc is used.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ */
+EXTERN_API( OSAError )
+OSAGetActiveProc (ComponentInstance scriptingComponent,
+ OSAActiveUPP * activeProc,
+ long * refCon) FIVEWORDINLINE(0x2F3C, 0x0008, 0x000A, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectGetActiveProc, 8);
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ */
+/**************************************************************************
+ OSA Optional Compiling Interface
+**************************************************************************
+ Scripting components that support the Compiling interface have the
+ kOSASupportsCompiling bit set in it's ComponentDescription.
+**************************************************************************/
+EXTERN_API( OSAError )
+OSAScriptingComponentName (ComponentInstance scriptingComponent,
+ AEDesc * resultingScriptingComponentName) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0102, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectScriptingComponentName, 4);
+ Given a scripting component, this routine returns the name of that
+ scripting component in a type that is coercable to text (typeChar).
+ The generic scripting component returns the name of the default
+ scripting component. This name should be sufficient to convey to the
+ user the kind of script (syntax) he is expected to write.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ */
+EXTERN_API( OSAError )
+OSACompile (ComponentInstance scriptingComponent,
+ const AEDesc * sourceData,
+ long modeFlags,
+ OSAID * previousAndResultingScriptID) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0103, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectCompile, 12);
+ Coerces input desc (possibly text) into a script's internal format.
+ Once compiled, the script is ready to run. The modeFlags convey
+ scripting component specific information. The previous script ID
+ (result parameter) is made to refer to the newly compiled script,
+ unless it was originally kOSANullScript. In this case a new script
+ ID is created and used.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errAECoercionFail: sourceData is not compilable
+ errOSAScriptError: sourceData was a bad script (syntax error)
+ errOSAInvalidID: previousAndResultingCompiledScriptID was not
+ valid on input
+
+ ModeFlags:
+ kOSAModePreventGetSource
+ kOSAModeCompileIntoContext
+ kOSAModeAugmentContext
+ kOSAModeNeverInteract
+ kOSAModeCanInteract
+ kOSAModeAlwaysInteract
+ kOSAModeCantSwitchLayer
+ kOSAModeDontReconnect
+ kOSAModeDoRecord
+ */
+EXTERN_API( OSAError )
+OSACopyID (ComponentInstance scriptingComponent,
+ OSAID fromID,
+ OSAID * toID) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0104, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectCopyID, 8);
+ If toID is a reference to kOSANullScript then it is updated to have a
+ new scriptID value. This call can be used to perform undo or revert
+ operations on scripts.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSAInvalidID
+ */
+/**************************************************************************
+ OSA Optional GetSource Interface
+**************************************************************************
+ Scripting components that support the GetSource interface have the
+ kOSASupportsGetSource bit set in it's ComponentDescription.
+**************************************************************************/
+EXTERN_API( OSAError )
+OSAGetSource (ComponentInstance scriptingComponent,
+ OSAID scriptID,
+ DescType desiredType,
+ AEDesc * resultingSourceData) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0201, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectGetSource, 12);
+ This routine causes a compiled script to be output in a form (possibly
+ text) such that it is suitable to be passed back to OSACompile.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSAInvalidID
+ errOSASourceNotAvailable can't get source for this scriptID
+ */
+/**************************************************************************
+ OSA Optional AECoercion Interface
+**************************************************************************
+ Scripting components that support the AECoercion interface have the
+ kOSASupportsAECoercion bit set in it's ComponentDescription.
+**************************************************************************/
+EXTERN_API( OSAError )
+OSACoerceFromDesc (ComponentInstance scriptingComponent,
+ const AEDesc * scriptData,
+ long modeFlags,
+ OSAID * resultingScriptID) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0301, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectCoerceFromDesc, 12);
+ This routine causes script data to be coerced into a script value.
+ If the scriptData is an AppleEvent, then the resultingScriptID is a
+ compiled script ID (mode flags for OSACompile may be used in this case).
+ Other scriptData descriptors create script value IDs.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+
+ ModeFlags:
+ kOSAModePreventGetSource
+ kOSAModeCompileIntoContext
+ kOSAModeNeverInteract
+ kOSAModeCanInteract
+ kOSAModeAlwaysInteract
+ kOSAModeCantSwitchLayer
+ kOSAModeDontReconnect
+ kOSAModeDoRecord
+ */
+EXTERN_API( OSAError )
+OSACoerceToDesc (ComponentInstance scriptingComponent,
+ OSAID scriptID,
+ DescType desiredType,
+ long modeFlags,
+ AEDesc * result) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0302, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectCoerceToDesc, 16);
+ This routine causes a script value to be coerced into any desired form.
+ If the scriptID denotes a compiled script, then it may be coerced to
+ typeAppleEvent.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSAInvalidID
+ */
+/**************************************************************************
+ OSA Optional AESending Interface
+**************************************************************************
+ Scripting components that support the AESending interface have the
+ kOSASupportsAESending bit set in their ComponentDescription.
+**************************************************************************/
+/*
+ Scripting systems will supply default values for these procedures if they
+ are not set by the client:
+*/
+EXTERN_API( OSAError )
+OSASetSendProc (ComponentInstance scriptingComponent,
+ OSASendUPP sendProc,
+ long refCon) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0401, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectSetSendProc, 8);
+ If sendProc is nil, the default sendProc is used.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ */
+EXTERN_API( OSAError )
+OSAGetSendProc (ComponentInstance scriptingComponent,
+ OSASendUPP * sendProc,
+ long * refCon) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0402, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectGetSendProc, 8);
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ */
+EXTERN_API( OSAError )
+OSASetCreateProc (ComponentInstance scriptingComponent,
+ OSACreateAppleEventUPP createProc,
+ long refCon) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0403, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectSetCreateProc, 8);
+ If createProc is nil, the default createProc is used.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ */
+EXTERN_API( OSAError )
+OSAGetCreateProc (ComponentInstance scriptingComponent,
+ OSACreateAppleEventUPP * createProc,
+ long * refCon) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0404, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectGetCreateProc, 8);
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ */
+EXTERN_API( OSAError )
+OSASetDefaultTarget (ComponentInstance scriptingComponent,
+ const AEAddressDesc * target) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0405, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectSetDefaultTarget, 4);
+ This routine sets the default target application for AE sending.
+ It also establishes the default target from which terminologies come.
+ It is effectively like having an AppleScript "tell" statement around
+ the entire program. If this routine is not called, or if the target
+ is a null AEDesc, then the current application is the default target.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ */
+/**************************************************************************
+ OSA Optional Recording Interface
+**************************************************************************
+ Scripting components that support the Recording interface have the
+ kOSASupportsRecording bit set in their ComponentDescription.
+**************************************************************************/
+EXTERN_API( OSAError )
+OSAStartRecording (ComponentInstance scriptingComponent,
+ OSAID * compiledScriptToModifyID) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0501, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectStartRecording, 4);
+ Starts recording. If compiledScriptToModifyID is kOSANullScript, a
+ new script ID is created and returned. If the current application has
+ a handler for the kOSARecordedText event, then kOSARecordedText events
+ are sent to the application containing the text of each AppleEvent
+ recorded.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSAInvalidID
+ errOSARecordingIsAlreadyOn
+ */
+EXTERN_API( OSAError )
+OSAStopRecording (ComponentInstance scriptingComponent,
+ OSAID compiledScriptID) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0502, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectStopRecording, 4);
+ If compiledScriptID is not being recorded into or recording is not
+ currently on, no error is returned.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSAInvalidID
+ */
+/**************************************************************************
+ OSA Optional Convenience Interface
+**************************************************************************
+ Scripting components that support the Convenience interface have the
+ kOSASupportsConvenience bit set in their ComponentDescription.
+**************************************************************************/
+EXTERN_API( OSAError )
+OSALoadExecute (ComponentInstance scriptingComponent,
+ const AEDesc * scriptData,
+ OSAID contextID,
+ long modeFlags,
+ OSAID * resultingScriptValueID) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0601, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectLoadExecute, 16);
+ This routine is effectively equivalent to calling OSALoad followed by
+ OSAExecute. After execution, the compiled source is disposed. Only the
+ resulting value ID is retained.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSABadStorageType: scriptData not for this scripting component
+ errOSACorruptData: data seems to be corrupt
+ errOSADataFormatObsolete script data format is no longer supported
+ errOSADataFormatTooNew script data format is from a newer version
+ errOSAInvalidID
+ errOSAScriptError: the executing script got an error
+
+ ModeFlags:
+ kOSAModeNeverInteract
+ kOSAModeCanInteract
+ kOSAModeAlwaysInteract
+ kOSAModeCantSwitchLayer
+ kOSAModeDontReconnect
+ kOSAModeDoRecord
+ */
+EXTERN_API( OSAError )
+OSACompileExecute (ComponentInstance scriptingComponent,
+ const AEDesc * sourceData,
+ OSAID contextID,
+ long modeFlags,
+ OSAID * resultingScriptValueID) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0602, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectCompileExecute, 16);
+ This routine is effectively equivalent to calling OSACompile followed by
+ OSAExecute. After execution, the compiled source is disposed. Only the
+ resulting value ID is retained.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errAECoercionFail: sourceData is not compilable
+ errOSAScriptError: sourceData was a bad script (syntax error)
+ errOSAInvalidID: previousAndResultingCompiledScriptID was not
+ valid on input
+ errOSAScriptError: the executing script got an error
+
+ ModeFlags:
+ kOSAModeNeverInteract
+ kOSAModeCanInteract
+ kOSAModeAlwaysInteract
+ kOSAModeCantSwitchLayer
+ kOSAModeDontReconnect
+ kOSAModeDoRecord
+ */
+EXTERN_API( OSAError )
+OSADoScript (ComponentInstance scriptingComponent,
+ const AEDesc * sourceData,
+ OSAID contextID,
+ DescType desiredType,
+ long modeFlags,
+ AEDesc * resultingText) FIVEWORDINLINE(0x2F3C, 0x0014, 0x0603, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectDoScript, 20);
+ This routine is effectively equivalent to calling OSACompile followed by
+ OSAExecute and then OSADisplay. After execution, the compiled source
+ and the resulting value are is disposed. Only the resultingText
+ descriptor is retained. If a script error occur during processing, the
+ resultingText gets the error message of the error, and errOSAScriptError
+ is returned. OSAScriptError may still be used to extract more
+ information about the particular error.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errAECoercionFail: sourceData is not compilable or
+ desiredType not supported by scripting component
+ errOSAScriptError: sourceData was a bad script (syntax error)
+ errOSAInvalidID: previousAndResultingCompiledScriptID was not
+ valid on input
+ errOSAScriptError: the executing script got an error
+
+ ModeFlags:
+ kOSAModeNeverInteract
+ kOSAModeCanInteract
+ kOSAModeAlwaysInteract
+ kOSAModeCantSwitchLayer
+ kOSAModeDontReconnect
+ kOSAModeDoRecord
+ kOSAModeDisplayForHumans
+ */
+/**************************************************************************
+ OSA Optional Dialects Interface
+**************************************************************************
+ Scripting components that support the Dialects interface have the
+ kOSASupportsDialects bit set in their ComponentDescription.
+**************************************************************************/
+/*
+ These calls allows an scripting component that supports different dialects
+ to dynamically switch between those dialects. Although this interface is
+ specified, the particular dialect codes are scripting component dependent.
+*/
+EXTERN_API( OSAError )
+OSASetCurrentDialect (ComponentInstance scriptingComponent,
+ short dialectCode) FIVEWORDINLINE(0x2F3C, 0x0002, 0x0701, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectSetCurrentDialect, 2);
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSANoSuchDialect: invalid dialectCode
+ */
+EXTERN_API( OSAError )
+OSAGetCurrentDialect (ComponentInstance scriptingComponent,
+ short * resultingDialectCode) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0702, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectGetCurrentDialect, 4);
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ */
+EXTERN_API( OSAError )
+OSAAvailableDialects (ComponentInstance scriptingComponent,
+ AEDesc * resultingDialectInfoList) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0703, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectAvailableDialects, 4);
+ This call return an AEList containing information about each of the
+ currently available dialects of a scripting component. Each item
+ is an AERecord of typeOSADialectInfo that contains at least the fields
+ keyOSADialectName, keyOSADialectCode, KeyOSADialectLangCode and
+ keyOSADialectScriptCode.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ */
+EXTERN_API( OSAError )
+OSAGetDialectInfo (ComponentInstance scriptingComponent,
+ short dialectCode,
+ OSType selector,
+ AEDesc * resultingDialectInfo) FIVEWORDINLINE(0x2F3C, 0x000A, 0x0704, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectGetDialectInfo, 10);
+ This call gives information about the specified dialect of a scripting
+ component. It returns an AEDesc whose type depends on the selector
+ specified. Available selectors are the same as the field keys for a
+ dialect info record. The type of AEDesc returned is the same as the
+ type of the field that has same key as the selector.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSABadSelector
+ errOSANoSuchDialect: invalid dialectCode
+ */
+EXTERN_API( OSAError )
+OSAAvailableDialectCodeList (ComponentInstance scriptingComponent,
+ AEDesc * resultingDialectCodeList) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0705, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectAvailableDialectCodeList, 4);
+ This is alternative to OSAGetAvailableDialectCodeList. Use this call
+ and OSAGetDialectInfo to get information on dialects.
+ This call return an AEList containing dialect code for each of the
+ currently available dialects of a scripting component. Each dialect
+ code is a short integer of type typeShortInteger.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+
+ Type of a dialect info record containing at least keyOSADialectName
+ and keyOSADialectCode fields.
+
+ keys for dialect info record, also used as selectors to OSAGetDialectInfo.
+
+ Field of a typeOSADialectInfo record of typeChar.
+ Field of a typeOSADialectInfo record of typeShortInteger.
+ Field of a typeOSADialectInfo record of typeShortInteger.
+ Field of a typeOSADialectInfo record of typeShortInteger.
+ */
+/**************************************************************************
+ OSA Optional Event Handling Interface
+**************************************************************************
+ Scripting components that support the Event Handling interface have the
+ kOSASupportsEventHandling bit set in their ComponentDescription.
+**************************************************************************/
+EXTERN_API( OSAError )
+OSASetResumeDispatchProc (ComponentInstance scriptingComponent,
+ AEEventHandlerUPP resumeDispatchProc,
+ long refCon) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0801, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectSetResumeDispatchProc, 8);
+ This function is used to set the ResumeDispatchProc that will be used
+ by OSAExecuteEvent and OSADoEvent if either no event handler can be
+ found in the context, or the context event hander "continues" control
+ onward. The two constants kOSAUseStandardDispatch and kOSANoDispatch
+ may also be passed to this routine indicating that the handler registered
+ in the application with AEInstallEventHandler should be used, or no
+ dispatch should occur, respectively.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ */
+enum {
+ kOSAUseStandardDispatch = kAEUseStandardDispatch
+};
+
+/*
+ Special ResumeDispatchProc constant which may be passed to
+ OSASetResumeDispatchProc indicating that the handler registered
+ in the application with AEInstallEventHandler should be used.
+
+ NOTE: Had to remove the cast (AEEventHandlerUPP). The C compiler
+ doesn't allow pointer types to be assigned to an enum. All
+ constants must be assigned as enums to translate properly to
+ Pascal.
+ */
+enum {
+ kOSANoDispatch = kAENoDispatch
+};
+
+/*
+ Special ResumeDispatchProc constant which may be passed to
+ OSASetResumeDispatchProc indicating that no dispatch should occur.
+
+ NOTE: Had to remove the cast (AEEventHandlerUPP). The C compiler
+ doesn't allow pointer types to be assigned to an enum. All
+ constants must be assigned as enums to translate properly to
+ Pascal.
+ */
+enum {
+ kOSADontUsePhac = 0x0001
+};
+
+/*
+ Special refCon constant that may be given to OSASetResumeDispatchProc
+ only when kOSAUseStandardDispatch is used as the ResumeDispatchProc.
+ This causes the standard dispatch to be performed, except the phac
+ handler is not called. This is useful during tinkerability, when
+ the phac handler is used to lookup a context associated with an event's
+ direct parameter, and call OSAExecuteEvent or OSADoEvent. Failure to
+ bypass the phac handler would result in an infinite loop.
+ */
+EXTERN_API( OSAError )
+OSAGetResumeDispatchProc (ComponentInstance scriptingComponent,
+ AEEventHandlerUPP * resumeDispatchProc,
+ long * refCon) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0802, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectGetResumeDispatchProc, 8);
+ Returns the registered ResumeDispatchProc. If no ResumeDispatchProc has
+ been registered, then kOSAUseStandardDispatch (the default) is returned.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ */
+EXTERN_API( OSAError )
+OSAExecuteEvent (ComponentInstance scriptingComponent,
+ const AppleEvent * theAppleEvent,
+ OSAID contextID,
+ long modeFlags,
+ OSAID * resultingScriptValueID) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0803, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectExecuteEvent, 16);
+ This call is similar to OSAExecute except the initial command to
+ execute comes in the form of an AppleEvent. If the contextID
+ defines any event handlers for that event, they are used to process
+ the event. If no event handler can be found in the context
+ errAEEventNotHandled is returned. If an event handler is found and
+ the hander "continues" control onward, the ResumeDispatchProc
+ (registered with OSASetResumeDispatchProc, above) is called given the
+ AppleEvent. The result is returned as a scriptValueID.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSAInvalidID
+ errOSAScriptError: the executing script got an error
+ errAEEventNotHandled: no handler for event in contextID
+
+ ModeFlags:
+ kOSAModeNeverInteract
+ kOSAModeCanInteract
+ kOSAModeAlwaysInteract
+ kOSAModeCantSwitchLayer
+ kOSAModeDontReconnect
+ kOSAModeDoRecord
+ */
+EXTERN_API( OSAError )
+OSADoEvent (ComponentInstance scriptingComponent,
+ const AppleEvent * theAppleEvent,
+ OSAID contextID,
+ long modeFlags,
+ AppleEvent * reply) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0804, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectDoEvent, 16);
+ This call is similar to OSADoScript except the initial command to
+ execute comes in the form of an AppleEvent, and the result is an
+ AppleEvent reply record. If the contextID defines any event handlers
+ for that event, they are used to process the event. If no event handler
+ can be found in the context errAEEventNotHandled is returned. If an
+ event handler is found and the hander "continues" control onward, the
+ ResumeDispatchProc (registered with OSASetResumeDispatchProc, above) is
+ called given the AppleEvent. The result is returned in the form of an
+ AppleEvent reply descriptor. If at any time the script gets an error, or
+ if the ResumeDispatchProc returns a reply event indicating an error,
+ then the OSADoEvent call itself returns an error reply (i.e. OSADoEvent
+ should never return errOSAScriptError). Any error result returned by
+ the ResumeDispatchProc will be returned by OSADoEvent.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSAInvalidID
+ errAEEventNotHandled: no handler for event in contextID
+
+ ModeFlags:
+ kOSAModeNeverInteract
+ kOSAModeCanInteract
+ kOSAModeAlwaysInteract
+ kOSAModeCantSwitchLayer
+ kOSAModeDontReconnect
+ kOSAModeDoRecord
+ */
+EXTERN_API( OSAError )
+OSAMakeContext (ComponentInstance scriptingComponent,
+ const AEDesc * contextName,
+ OSAID parentContext,
+ OSAID * resultingContextID) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0805, 0x7000, 0xA82A);
+
+/*
+ OSAComponentFunctionInline(kOSASelectMakeContext, 12);
+ Makes a new empty context which may be passed to OSAExecute or
+ OSAExecuteEvent. If contextName is typeNull, an unnamed context is
+ created. If parentContext is kOSANullScript then the resulting context
+ does not inherit bindings from any other context.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSAInvalidID
+ errAECoercionFail: contextName is invalid
+ */
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __OSA__ */
+
diff --git a/include/qt/OSAComp.h b/include/qt/OSAComp.h
new file mode 100644
index 000000000..33f13fed7
--- /dev/null
+++ b/include/qt/OSAComp.h
@@ -0,0 +1,88 @@
+/*
+ File: OSAComp.h
+
+ Contains: AppleScript Component Implementor's Interfaces.
+
+ Version: Technology: AppleScript 1.1
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1992-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __OSACOMP__
+#define __OSACOMP__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __AEDATAMODEL__
+#include "AEDataModel.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/**************************************************************************
+ Types and Constants
+**************************************************************************/
+/**************************************************************************
+ Routines for Associating a Storage Type with a Script Data Handle
+**************************************************************************/
+EXTERN_API( OSErr )
+OSAGetStorageType (AEDataStorage scriptData,
+ DescType * dscType);
+
+EXTERN_API( OSErr )
+OSAAddStorageType (AEDataStorage scriptData,
+ DescType dscType);
+
+EXTERN_API( OSErr )
+OSARemoveStorageType (AEDataStorage scriptData);
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __OSACOMP__ */
+
diff --git a/include/qt/OSAGeneric.h b/include/qt/OSAGeneric.h
new file mode 100644
index 000000000..97c881e27
--- /dev/null
+++ b/include/qt/OSAGeneric.h
@@ -0,0 +1,136 @@
+/*
+ File: OSAGeneric.h
+
+ Contains: AppleScript Generic Component Interfaces.
+
+ Version: Technology: AppleScript 1.1
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1992-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __OSAGENERIC__
+#define __OSAGENERIC__
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+#ifndef __APPLEEVENTS__
+#include "AppleEvents.h"
+#endif
+
+#ifndef __OSA__
+#include "OSA.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* NOTE: This interface defines a "generic scripting component."
+ The Generic Scripting Component allows automatic dispatch to a
+ specific scripting component that conforms to the OSA interface.
+ This component supports OSA, by calling AppleScript or some other
+ scripting component. Additionally it provides access to the default
+ and the user-prefered scripting component.
+*/
+
+
+enum {
+ /* Component version this header file describes */
+ kGenericComponentVersion = 0x0100
+};
+
+enum {
+ kGSSSelectGetDefaultScriptingComponent = 0x1001,
+ kGSSSelectSetDefaultScriptingComponent = 0x1002,
+ kGSSSelectGetScriptingComponent = 0x1003,
+ kGSSSelectGetScriptingComponentFromStored = 0x1004,
+ kGSSSelectGenericToRealID = 0x1005,
+ kGSSSelectRealToGenericID = 0x1006,
+ kGSSSelectOutOfRange = 0x1007
+};
+
+typedef OSType ScriptingComponentSelector;
+typedef OSAID GenericID;
+/* get and set the default scripting component */
+EXTERN_API( OSAError )
+OSAGetDefaultScriptingComponent (ComponentInstance genericScriptingComponent,
+ ScriptingComponentSelector * scriptingSubType) FIVEWORDINLINE(0x2F3C, 0x0004, 0x1001, 0x7000, 0xA82A);
+
+EXTERN_API( OSAError )
+OSASetDefaultScriptingComponent (ComponentInstance genericScriptingComponent,
+ ScriptingComponentSelector scriptingSubType) FIVEWORDINLINE(0x2F3C, 0x0004, 0x1002, 0x7000, 0xA82A);
+
+/* get a scripting component instance from its subtype code */
+EXTERN_API( OSAError )
+OSAGetScriptingComponent (ComponentInstance genericScriptingComponent,
+ ScriptingComponentSelector scriptingSubType,
+ ComponentInstance * scriptingInstance) FIVEWORDINLINE(0x2F3C, 0x0008, 0x1003, 0x7000, 0xA82A);
+
+/* get a scripting component selector (subType) from a stored script */
+EXTERN_API( OSAError )
+OSAGetScriptingComponentFromStored (ComponentInstance genericScriptingComponent,
+ const AEDesc * scriptData,
+ ScriptingComponentSelector * scriptingSubType) FIVEWORDINLINE(0x2F3C, 0x0008, 0x1004, 0x7000, 0xA82A);
+
+/* get a real component instance and script id from a generic id */
+EXTERN_API( OSAError )
+OSAGenericToRealID (ComponentInstance genericScriptingComponent,
+ OSAID * theScriptID,
+ ComponentInstance * theExactComponent) FIVEWORDINLINE(0x2F3C, 0x0008, 0x1005, 0x7000, 0xA82A);
+
+/* get a generic id from a real component instance and script id */
+EXTERN_API( OSAError )
+OSARealToGenericID (ComponentInstance genericScriptingComponent,
+ OSAID * theScriptID,
+ ComponentInstance theExactComponent) FIVEWORDINLINE(0x2F3C, 0x0008, 0x1006, 0x7000, 0xA82A);
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __OSAGENERIC__ */
+
diff --git a/include/qt/OSUtils.h b/include/qt/OSUtils.h
new file mode 100644
index 000000000..2c429ec49
--- /dev/null
+++ b/include/qt/OSUtils.h
@@ -0,0 +1,469 @@
+/*
+ File: OSUtils.h
+
+ Contains: OS Utilities Interfaces.
+
+ Version: Technology: Mac OS 8
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __OSUTILS__
+#define __OSUTILS__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+/* HandToHand and other memory utilties were moved to MacMemory.h */
+#ifndef __MACMEMORY__
+#include "MacMemory.h"
+#endif
+
+/* GetTrapAddress and other trap table utilties were moved to Patches.h */
+#ifndef __PATCHES__
+#include "Patches.h"
+#endif
+
+/* Date and Time utilties were moved to DateTimeUtils.h */
+#ifndef __DATETIMEUTILS__
+#include "DateTimeUtils.h"
+#endif
+
+#if !TARGET_OS_MAC
+#ifndef __ENDIAN__
+#include "Endian.h"
+#endif
+
+#endif /* !TARGET_OS_MAC */
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ useFree = 0,
+ useATalk = 1,
+ useAsync = 2,
+ useExtClk = 3, /*Externally clocked*/
+ useMIDI = 4
+};
+
+enum {
+ false32b = 0, /*24 bit addressing error*/
+ true32b = 1 /*32 bit addressing error*/
+};
+
+enum {
+ /* result types for RelString Call */
+ sortsBefore = -1, /*first string < second string*/
+ sortsEqual = 0, /*first string = second string*/
+ sortsAfter = 1 /*first string > second string*/
+};
+
+enum {
+ dummyType = 0,
+ vType = 1,
+ ioQType = 2,
+ drvQType = 3,
+ evType = 4,
+ fsQType = 5,
+ sIQType = 6,
+ dtQType = 7,
+ nmType = 8
+};
+
+typedef SignedByte QTypes;
+
+struct SysParmType {
+ UInt8 valid;
+ UInt8 aTalkA;
+ UInt8 aTalkB;
+ UInt8 config;
+ short portA;
+ short portB;
+ long alarm;
+ short font;
+ short kbdPrint;
+ short volClik;
+ short misc;
+};
+typedef struct SysParmType SysParmType;
+
+typedef SysParmType * SysPPtr;
+
+struct QElem {
+ struct QElem * qLink;
+ short qType;
+ short qData[1];
+};
+typedef struct QElem QElem;
+typedef QElem * QElemPtr;
+#if TARGET_OS_MAC
+
+struct QHdr {
+ volatile short qFlags;
+ volatile QElemPtr qHead;
+ volatile QElemPtr qTail;
+};
+typedef struct QHdr QHdr;
+typedef QHdr * QHdrPtr;
+#else
+/*
+ QuickTime 3.0
+ this version of QHdr contains the Mutex necessary for
+ non-mac non-interrupt code
+*/
+
+struct QHdr {
+ volatile short qFlags;
+ short pad;
+ long MutexID;
+ volatile QElemPtr qHead;
+ volatile QElemPtr qTail;
+};
+typedef struct QHdr QHdr;
+typedef QHdr * QHdrPtr;
+#endif /* TARGET_OS_MAC */
+
+typedef CALLBACK_API( void , DeferredTaskProcPtr )(long dtParam);
+/*
+ WARNING: DeferredTaskProcPtr uses register based parameters under classic 68k
+ and cannot be written in a high-level language without
+ the help of mixed mode or assembly glue.
+*/
+typedef REGISTER_UPP_TYPE(DeferredTaskProcPtr) DeferredTaskUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(DeferredTaskUPP)
+ NewDeferredTaskUPP (DeferredTaskProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeDeferredTaskUPP (DeferredTaskUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeDeferredTaskUPP (long dtParam,
+ DeferredTaskUPP userUPP);
+
+#else
+ enum { uppDeferredTaskProcInfo = 0x0000B802 }; /* register no_return_value Func(4_bytes:A1) */
+ #define NewDeferredTaskUPP(userRoutine) (DeferredTaskUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDeferredTaskProcInfo, GetCurrentArchitecture())
+ #define DisposeDeferredTaskUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter InvokeDeferredTaskUPP(__A1, __A0)
+ void InvokeDeferredTaskUPP(long dtParam, DeferredTaskUPP userUPP) = 0x4E90;
+ #else
+ #define InvokeDeferredTaskUPP(dtParam, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppDeferredTaskProcInfo, (dtParam))
+ #endif
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewDeferredTaskProc(userRoutine) NewDeferredTaskUPP(userRoutine)
+#define CallDeferredTaskProc(userRoutine, dtParam) InvokeDeferredTaskUPP(dtParam, userRoutine)
+
+struct DeferredTask {
+ volatile QElemPtr qLink;
+ short qType;
+ volatile short dtFlags;
+ DeferredTaskUPP dtAddr;
+ long dtParam;
+ long dtReserved;
+};
+typedef struct DeferredTask DeferredTask;
+typedef DeferredTask * DeferredTaskPtr;
+#if TARGET_OS_MAC
+
+struct MachineLocation {
+ Fract latitude;
+ Fract longitude;
+ union {
+ SInt8 dlsDelta; /* signed byte; daylight savings delta */
+ long gmtDelta; /* use low 24-bits only */
+ } u;
+};
+typedef struct MachineLocation MachineLocation;
+#else
+/*
+ QuickTime 3.0:
+ Alignment of MachineLocation is weird. The union above used for delta
+ tends not to work on non-Mac compilers.
+*/
+
+struct MachineLocation {
+ Fract latitude;
+ Fract longitude;
+ BigEndianLong delta; /* high byte is daylight savings delta, low 24-bits is GMT delta */
+};
+typedef struct MachineLocation MachineLocation;
+#endif /* TARGET_OS_MAC */
+
+EXTERN_API( Boolean )
+IsMetric (void) THREEWORDINLINE(0x3F3C, 0x0004, 0xA9ED);
+
+EXTERN_API( SysPPtr )
+GetSysPPtr (void) THREEWORDINLINE(0x2EBC, 0x0000, 0x01F8);
+
+
+/*
+ NOTE: SysBeep() has been moved to Sound.h.
+ We could not automatically #include Sound.h in this file
+ because Sound.h indirectly #include's OSUtils.h which
+ would make a circular include.
+*/
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 DTInstall(__A0)
+ #endif
+EXTERN_API( OSErr )
+DTInstall (DeferredTaskPtr dtTaskPtr) ONEWORDINLINE(0xA082);
+
+
+
+#if TARGET_CPU_PPC || !TARGET_OS_MAC || TARGET_RT_MAC_MACHO
+#define GetMMUMode() ((SInt8)true32b)
+#define SwapMMUMode(x) (*(SInt8*)(x) = true32b)
+#else
+#if CALL_NOT_IN_CARBON
+EXTERN_API( SInt8 )
+GetMMUMode (void) TWOWORDINLINE(0x1EB8, 0x0CB2);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter SwapMMUMode(__A0)
+ #endif
+EXTERN_API( void )
+SwapMMUMode (SInt8 * mode) THREEWORDINLINE(0x1010, 0xA05D, 0x1080);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter Delay(__A0, __A1)
+ #endif
+EXTERN_API( void )
+Delay (unsigned long numTicks,
+ unsigned long * finalTicks) TWOWORDINLINE(0xA03B, 0x2280);
+
+EXTERN_API( OSErr )
+WriteParam (void);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter Enqueue(__A0, __A1)
+ #endif
+EXTERN_API( void )
+Enqueue (QElemPtr qElement,
+ QHdrPtr qHeader) ONEWORDINLINE(0xA96F);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 Dequeue(__A0, __A1)
+ #endif
+EXTERN_API( OSErr )
+Dequeue (QElemPtr qElement,
+ QHdrPtr qHeader) ONEWORDINLINE(0xA96E);
+
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SetCurrentA5
+ #endif
+EXTERN_API( long )
+SetCurrentA5 (void) THREEWORDINLINE(0x200D, 0x2A78, 0x0904);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SetA5(__D0)
+ #endif
+EXTERN_API( long )
+SetA5 (long newA5) ONEWORDINLINE(0xC18D);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 InitUtil
+ #endif
+EXTERN_API( OSErr )
+InitUtil (void) ONEWORDINLINE(0xA03F);
+
+
+#if TARGET_CPU_PPC
+EXTERN_API( void )
+MakeDataExecutable (void * baseAddress,
+ unsigned long length);
+
+#endif /* TARGET_CPU_PPC */
+
+
+#if TARGET_CPU_68K
+#if CALL_NOT_IN_CARBON
+EXTERN_API( Boolean )
+SwapInstructionCache (Boolean cacheEnable);
+
+EXTERN_API( Boolean )
+SwapDataCache (Boolean cacheEnable);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+FlushInstructionCache (void) TWOWORDINLINE(0x7001, 0xA098);
+
+EXTERN_API( void )
+FlushDataCache (void) TWOWORDINLINE(0x7003, 0xA098);
+
+EXTERN_API( void )
+FlushCodeCache (void) ONEWORDINLINE(0xA0BD);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_CPU_68K */
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 FlushCodeCacheRange(__A0, __A1)
+ #endif
+EXTERN_API( OSErr )
+FlushCodeCacheRange (void * address,
+ unsigned long count) TWOWORDINLINE(0x7009, 0xA098);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter ReadLocation(__A0)
+ #endif
+EXTERN_API( void )
+ReadLocation (MachineLocation * loc) FOURWORDINLINE(0x203C, 0x000C, 0x00E4, 0xA051);
+
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter WriteLocation(__A0)
+ #endif
+EXTERN_API( void )
+WriteLocation (const MachineLocation * loc) FOURWORDINLINE(0x203C, 0x000C, 0x00E4, 0xA052);
+
+
+
+#if OLDROUTINENAMES
+#define IUMetric() IsMetric()
+#endif /* OLDROUTINENAMES */
+
+/*
+ NOTE: SysEnvirons is obsolete. You should be using Gestalt.
+*/
+/* Environs Equates */
+enum {
+ curSysEnvVers = 2 /*Updated to equal latest SysEnvirons version*/
+};
+
+
+struct SysEnvRec {
+ short environsVersion;
+ short machineType;
+ short systemVersion;
+ short processor;
+ Boolean hasFPU;
+ Boolean hasColorQD;
+ short keyBoardType;
+ short atDrvrVersNum;
+ short sysVRefNum;
+};
+typedef struct SysEnvRec SysEnvRec;
+enum {
+ /* Machine Types */
+ envMac = -1,
+ envXL = -2,
+ envMachUnknown = 0,
+ env512KE = 1,
+ envMacPlus = 2,
+ envSE = 3,
+ envMacII = 4,
+ envMacIIx = 5,
+ envMacIIcx = 6,
+ envSE30 = 7,
+ envPortable = 8,
+ envMacIIci = 9,
+ envMacIIfx = 11
+};
+
+enum {
+ /* CPU types */
+ envCPUUnknown = 0,
+ env68000 = 1,
+ env68010 = 2,
+ env68020 = 3,
+ env68030 = 4,
+ env68040 = 5
+};
+
+enum {
+ /* Keyboard types */
+ envUnknownKbd = 0,
+ envMacKbd = 1,
+ envMacAndPad = 2,
+ envMacPlusKbd = 3,
+ envAExtendKbd = 4,
+ envStandADBKbd = 5,
+ envPrtblADBKbd = 6,
+ envPrtblISOKbd = 7,
+ envStdISOADBKbd = 8,
+ envExtISOADBKbd = 9
+};
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SysEnvirons(__D0, __A0)
+ #endif
+EXTERN_API( OSErr )
+SysEnvirons (short versionRequested,
+ SysEnvRec * theWorld) ONEWORDINLINE(0xA090);
+
+
+
+
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __OSUTILS__ */
+
diff --git a/include/qt/OpenTransportKernel.h b/include/qt/OpenTransportKernel.h
new file mode 100644
index 000000000..467545bc1
--- /dev/null
+++ b/include/qt/OpenTransportKernel.h
@@ -0,0 +1,1588 @@
+/*
+ File: OpenTransportKernel.h
+
+ Contains: Definitions for Open Transport kernel code, such as drivers and protocol modules.
+
+ Version: Technology: 2.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1993-2001 by Apple Computer, Inc. and Mentat Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __OPENTRANSPORTKERNEL__
+#define __OPENTRANSPORTKERNEL__
+
+#ifdef OTKERNEL
+#if !OTKERNEL
+#error OpenTransportModule.h can only be used by kernel code.
+#endif /* !OTKERNEL */
+
+#endif /* defined(OTKERNEL) */
+
+#define OTKERNEL 1
+/*
+ We include "OpenTransportProtocol.h", which in turn includes
+ "OpenTransport.h", thereby picking up all the stuff which
+ is shared between client and kernel.
+*/
+#ifndef __OPENTRANSPORTPROTOCOL__
+#include "OpenTransportProtocol.h"
+#endif
+
+#ifndef __NAMEREGISTRY__
+#include "NameRegistry.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+
+#if defined(__MWERKS__) && TARGET_CPU_68K
+ #pragma push
+ #pragma pointers_in_D0
+#endif
+
+/* ***** From the Mentat "mistream.h" ******/
+
+
+/*
+ Parts of "mistream.h" that are shared by the client
+ and the kernel are in "OpenTransportProtocol.h".
+*/
+
+
+
+/** Re-allow a queue to be scheduled for service */
+#define enableok(q) ((q)->q_flag &= ~QNOENB)
+
+/** Prevent a queue from being scheduled */
+#define noenable(q) ((q)->q_flag |= QNOENB)
+
+/** Get pointer to the mate queue */
+#define OTHERQ(q) (((q)->q_flag & QREADR) ? WR(q) : RD(q))
+
+/** Get pointer to the read queue, assumes 'q' is a write queue ptr */
+#define RD(q) (&q[-1])
+
+/** Get pointer to the write queue, assumes 'q' is a read queue ptr */
+#define WR(q) (&q[1])
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( mblk_t *)
+allocb (OTByteCount size,
+ OTInt32 pri);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API_C( void , allocbiProc )(char *arg);
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( mblk_t *)
+allocbi (OTByteCount size,
+ OTInt32 pri,
+ allocbiProc pfv,
+ char * arg,
+ unsigned char * base);
+
+EXTERN_API_C( queue_t *)
+allocq (void);
+
+EXTERN_API_C( OTInt32 )
+adjmsg (mblk_t * mp,
+ OTInt32 len_param);
+
+EXTERN_API_C( queue_t *)
+backq (queue_t * q);
+
+EXTERN_API_C( OTInt32 )
+bcanput (queue_t * q,
+ OTUInt8Param pri);
+
+EXTERN_API_C( OTInt32 )
+bcanputnext (queue_t * q,
+ OTUInt8Param pri);
+
+EXTERN_API_C( OTInt32 )
+bufcall (OTByteCount memNeeded,
+ OTInt32 pri,
+ bufcallp_t proc,
+ long context);
+
+EXTERN_API_C( OTInt32 )
+canput (queue_t * q);
+
+EXTERN_API_C( OTInt32 )
+canputnext (queue_t * q);
+
+EXTERN_API_C( mblk_t *)
+copyb (mblk_t * mp);
+
+EXTERN_API_C( mblk_t *)
+copymsg (mblk_t * mp);
+
+EXTERN_API_C( mblk_t *)
+dupb (mblk_t * mp);
+
+EXTERN_API_C( mblk_t *)
+dupmsg (mblk_t * mp);
+
+EXTERN_API_C( mblk_t *)
+esballoc (unsigned char * base,
+ OTByteCount size,
+ OTInt32 pri,
+ frtn_t * freeInfo);
+
+EXTERN_API_C( mblk_t *)
+esballoca (unsigned char * base,
+ OTByteCount size,
+ OTInt32 pri,
+ frtn_t * freeInfo);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API_C( void , esbbcallProc )(long arg);
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OTInt32 )
+esbbcall (OTInt32 pri,
+ esbbcallProc func,
+ long arg);
+
+EXTERN_API_C( void )
+flushband (queue_t * q,
+ OTUInt8Param pri,
+ OTInt32 flag);
+
+EXTERN_API_C( void )
+flushq (queue_t * q,
+ OTInt32 flag);
+
+EXTERN_API_C( void )
+freeb (mblk_t * mp);
+
+EXTERN_API_C( void )
+freemsg (mblk_t * mp);
+
+EXTERN_API_C( OTInt32 )
+freeq (queue_t * q);
+
+EXTERN_API_C( OTInt32 )
+freezestr (queue_t * q);
+
+EXTERN_API_C( admin_t )
+getadmin (OTUInt16Param mid);
+
+EXTERN_API_C( unsigned short )
+getmid (char * name);
+
+EXTERN_API_C( mblk_t *)
+getq (queue_t * q);
+
+EXTERN_API_C( OTInt32 )
+insq (queue_t * q,
+ mblk_t * emp,
+ mblk_t * nmp);
+
+EXTERN_API_C( void )
+linkb (mblk_t * mp1,
+ mblk_t * mp2);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API_C( void , mpnotifyProc )(char *arg);
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OTInt32 )
+mpnotify (mblk_t * mp,
+ mpnotifyProc pfv,
+ char * arg);
+
+EXTERN_API_C( OTInt32 )
+msgdsize (const mblk_t * mp);
+
+EXTERN_API_C( mblk_t *)
+msgpullup (mblk_t * mp,
+ OTInt32 len);
+
+EXTERN_API_C( OTInt32 )
+pullupmsg (mblk_t * mp,
+ OTInt32 len);
+
+EXTERN_API_C( OTInt32 )
+put (queue_t * q,
+ mblk_t * mp);
+
+EXTERN_API_C( OTInt32 )
+putbq (queue_t * q,
+ mblk_t * mp);
+
+EXTERN_API_C( OTInt32 )
+putctl (queue_t * q,
+ OTInt32 mType);
+
+EXTERN_API_C( OTInt32 )
+putnextctl (queue_t * q,
+ OTInt32 mType);
+
+EXTERN_API_C( OTInt32 )
+putctl1 (queue_t * q,
+ OTInt32 mType,
+ OTInt32 c);
+
+EXTERN_API_C( OTInt32 )
+putnextctl1 (queue_t * q,
+ OTInt32 mType,
+ OTInt32 c);
+
+EXTERN_API_C( OTInt32 )
+putctl2 (queue_t * q,
+ OTInt32 mType,
+ OTInt32 c1,
+ OTInt32 c2);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#ifndef puthere
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OTInt32 )
+puthere (queue_t * q,
+ mblk_t * mp);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* !defined(puthere) */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OTInt32 )
+putnext (queue_t * q,
+ mblk_t * mp);
+
+EXTERN_API_C( OTInt32 )
+putq (queue_t * q,
+ mblk_t * mp);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( void )
+qenable (queue_t * q);
+
+EXTERN_API_C( void )
+qprocson (queue_t * q);
+
+EXTERN_API_C( void )
+qprocsoff (queue_t * q);
+
+EXTERN_API_C( OTInt32 )
+qreply (queue_t * q,
+ mblk_t * mp);
+
+EXTERN_API_C( OTInt32 )
+qsize (queue_t * q);
+
+EXTERN_API_C( mblk_t *)
+rmvb (mblk_t * mp,
+ mblk_t * bp);
+
+EXTERN_API_C( void )
+rmvq (queue_t * q,
+ mblk_t * mp);
+
+/* prototype for strlog in "strlog.h" section, below */
+EXTERN_API_C( OTInt32 )
+strqget (queue_t * q,
+ qfields_t what,
+ OTUInt8Param pri,
+ long * valp);
+
+EXTERN_API_C( OTInt32 )
+strqset (queue_t * q,
+ qfields_t what,
+ OTUInt8Param pri,
+ long val);
+
+EXTERN_API_C( OTInt32 )
+testb (OTByteCount size,
+ OTInt32 pri);
+
+EXTERN_API_C( void )
+unbufcall (OTInt32 id);
+
+EXTERN_API_C( void )
+unfreezestr (queue_t * q,
+ OTInt32 oldpri);
+
+EXTERN_API_C( mblk_t *)
+unlinkb (mblk_t * mp);
+
+/* ***** From the Mentat "strlog.h" ******/
+
+
+EXTERN_API_C( OTInt32 )
+strlog (OTInt32 mid,
+ OTInt32 sid,
+ OTInt32 level,
+ OTUInt32 flags,
+ char * fmt,
+ ...);
+
+/* ***** Printing Functions ******/
+
+#endif /* CALL_NOT_IN_CARBON */
+
+enum {
+ kOTPrintOnly = 0,
+ kOTPrintThenStop = 1
+};
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OTInt32 )
+OTKernelPrintf (OTInt32 toDo,
+ char * fmt,
+ ...);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+enum {
+ CE_CONT = 0, /* Does kOTPrintOnly */
+ CE_NOTE = 0, /* Just print */
+ CE_WARN = 1, /* Does kOTPrintThenStop */
+ CE_PANIC = 2 /* Does System Error 107 */
+};
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( void )
+cmn_err (OTInt32 errType,
+ char * fmt,
+ ...);
+
+EXTERN_API_C( OTInt32 )
+mi_sprintf (char * buf,
+ char * fmt,
+ ...);
+
+/* Create sprintf and printf functions that will work in STREAM modules.*/
+
+
+#define sprintf mi_sprintf
+#define printf OTKernelPrintf
+
+/* ***** FIIK ******/
+
+/* ooo useful header comment please ooo*/
+
+/*
+ Function to convert the "long" value that comes back in some of the
+ netbufs as a result code to the equivalent OSStatus
+*/
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef long OTError;
+
+#define GetEError(v) ((OTUnixErr)(((v) >> 16) & 0xffff))
+#define GetXTIError(v) ((OTXTIErr)((v) & 0xffff))
+#define MakeTPIEError(e) ((OTError)(((((UInt16)(e)) << 16) | TSYSERR)))
+#define MakeDLPIEError(e) ((OTError)(((((UInt16)(e)) << 16) | DL_SYSERR)))
+#define MakeXTIError(xti) ((OTError)(xti))
+#define MakeOTError(xti, e) ((OTError)((xti) | ((UInt16)(e)) << 16))
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+OTErrorToOSStatus (OTError err);
+
+/* ***** STREAMS Plug-in Interface *****/
+
+/*
+ Synchronization level codes. These are supplied to modsw_install and
+ stored in the appropriate tables. sth_osr_open and
+ sth_ipush use these to set up synch queue subordination for new devices
+ and modules.
+*/
+
+#endif /* CALL_NOT_IN_CARBON */
+
+enum {
+ SQLVL_QUEUE = 1,
+ SQLVL_QUEUEPAIR = 2,
+ SQLVL_MODULE = 3,
+ SQLVL_GLOBAL = 4,
+ SQLVL_DEFAULT = 3
+};
+
+/* The install_info structure.*/
+
+
+struct install_info {
+ streamtab * install_str; /* Streamtab pointer. */
+ UInt32 install_flags;
+ UInt32 install_sqlvl; /* Synchronization level. */
+ char * install_buddy; /* Shared writer list buddy */
+ long ref_load; /* Set to 0 */
+ UInt32 ref_count; /* set to 0 */
+};
+typedef struct install_info install_info;
+/* Flags used in the install_flags field*/
+enum {
+ kOTModIsDriver = 0x00000001,
+ kOTModIsModule = 0x00000002,
+ kOTModNoWriter = 0x00000010,
+ kOTModUpperIsTPI = 0x00001000,
+ kOTModUpperIsDLPI = 0x00002000,
+ kOTModLowerIsTPI = 0x00004000,
+ kOTModLowerIsDLPI = 0x00008000,
+ kOTModGlobalContext = 0x00800000, /* This flag says you don't want per-context globals*/
+ kOTModUsesInterrupts = 0x08000000, /* This flag is only valid if kOTModIsDriver is set and the driver is a PCI-card driver using the Name Registry*/
+ kOTModIsComplexDriver = 0x20000000, /* This flag is only valid if kOTModIsDriver is set.*/
+ kOTModIsFilter = 0x40000000 /* This flag is only valid if kOTModIsModule is set.*/
+};
+
+/* Typedef for the GetOTInstallInfo function*/
+
+/*
+ Your module must export this function, and return a pointer to the
+ install_info structure for the module.
+*/
+
+typedef CALLBACK_API_C( install_info *, GetOTInstallInfoProcPtr )(void );
+/* Typedef for the InitStreamModule function*/
+/*
+ Your module can optionally export this function. It will be called
+ whenever your module is about to be loaded into a stream for the
+ first time, or if it is about to be reloaded after having been
+ unloaded. Return false if your module should NOT be loaded.
+ For STREAMS modules, the void* parameter will be NULL. For drivers, it
+ will be the same cookie parameter that was used for registering the module.
+ For PCI card drivers, this will be a pointer to the OTPCIInfo structure,
+ which can also be interpreted as a RegEntryIDPtr.
+*/
+
+typedef CALLBACK_API_C( Boolean , InitStreamModuleProcPtr )(void *portInfo);
+/* Typedef for the TerminateStreamModule function*/
+/*
+ Your module can optionally export this function. It will be called
+ whenever your module has been closed for the last time (i.e. no other
+ outstanding instances of the module exist).
+*/
+
+typedef CALLBACK_API_C( void , TerminateStreamModuleProcPtr )(void *portInfo);
+/* Equates for shared library prefixes*/
+
+ /*
+ * Interface ID for STREAMS Modules for ASLM.
+ */
+#define kOTModuleInterfaceID kOTModulePrefix "StrmMod"
+
+
+/* ***** Majors and Minors ******/
+
+/* Functions for dealing with major and minor device numbers*/
+
+
+typedef UInt16 major_t;
+typedef UInt16 minor_t;
+
+/* major part of a device */
+#define getmajor(x) ((major_t)(((unsigned long)(x)>>16)&0xffff))
+
+/* minor part of a device */
+#define getminor(x) ((minor_t)((x)&0xffff))
+
+/* make a device number */
+#define makedev(x,y) ((dev_t)((((dev_t)(x))<<16) | ((y) & 0xffff)))
+
+#define getemajor getmajor
+#define geteminor getminor
+#define makedevice makedev
+
+#define etoimajor(majnum) (majnum)
+#define itoemajor(majnum,j) (majnum)
+
+/*
+ This is the first minor number that Apple OT drivers use for CLONEOPENs.
+ Minor numbers 0 through 9 are reserved for use by the modules
+ for various control streams. Note that Mentat drivers, which
+ use mi_open_comm, start minor numbers from 5.
+*/
+enum {
+ kFirstMinorNumber = 10
+};
+
+/* ***** Logging Macros ******/
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( void )
+OTStrlog (queue_t * q,
+ OTInt32 lvl,
+ OTInt32 flags,
+ const char * str);
+
+/* These are enums for the level value*/
+
+#endif /* CALL_NOT_IN_CARBON */
+
+enum {
+ kOTLvlFatal = 0,
+ kOTLvlNonfatal = 1,
+ kOTLvlExtFatal = 2,
+ kOTLvlExtNonfatal = 3,
+ kOTLvlUserErr = 4,
+ kOTLvlInfoErr = 5,
+ kOTLvlInfoOnly = 6
+};
+
+
+
+#define STRLOG(q, lvl, flags, str) OTStrlog(q, lvl, flags, str)
+
+#if OTDEBUG
+ #define STRLOG1(q, lvl, flags, str) OTStrlog(q, lvl, flags, str)
+#else
+ #define STRLOG1(q, lvl, flags, str)
+#endif
+
+#if OTDEBUG > 1 || OTDEBUG > 1
+ #define STRLOG2(q, lvl, flags, str) OTStrlog(q, lvl, flags, str)
+#else
+ #define STRLOG2(q, lvl, flags, str)
+#endif
+
+/* ***** TPI Additions ******/
+
+/*
+ Extra OTCommand codes that may appear on your module queue.
+ These are extensions to the TPI specification for Open Transport.
+ T_PRIVATE_REQ is the first available TPI message number for private
+ use by modules (assuming you don't want to be confused by standard
+ TPI messages).
+*/
+
+
+
+enum {
+ T_TIMER_REQ = 80, /* Timer event */
+ T_MIB_REQ = 81, /* Request module's MIB */
+ T_MIB_ACK = 82, /* The module's MIB is available */
+
+ T_PRIVATE_REQ = 90 /* The first private request available */
+};
+
+
+struct T_MIB_req {
+ long PRIM_type; /* Always T_MIB_REQ */
+};
+typedef struct T_MIB_req T_MIB_req;
+
+struct T_MIB_ack {
+ long PRIM_type; /* Always T_MIB_ACK */
+ long MIB_length; /* MIB length */
+ long MIB_offset; /* MIB Offset */
+};
+typedef struct T_MIB_ack T_MIB_ack;
+
+struct T_stream_timer {
+ long PRIM_type; /* Always T_TIMER_REQ */
+ union {
+ long USER_long;
+ void * USER_ptr;
+ } USER_data;
+};
+typedef struct T_stream_timer T_stream_timer;
+/* ***** Kernel Port Stuff ******/
+/*
+ Kernel port record, which is a direct analogue of
+ the OTPortRecord in "OpenTransport.h". Note that
+ when working with TPortRecord's, you're always
+ working with OT's one true copy of the record,
+ whereas when working with OTPortRecord's, you're
+ always working with a copy.
+*/
+
+
+struct TPortRecord {
+ OTLink fLink;
+ char * fPortName;
+ char * fModuleName;
+ char * fResourceInfo;
+ char * fSlotID;
+ struct TPortRecord * fAlias;
+ ItemCount fNumChildren;
+ OTPortRef * fChildPorts;
+ UInt32 fPortFlags;
+ UInt32 fInfoFlags;
+ UInt32 fCapabilities;
+ OTPortRef fRef;
+ streamtab * fStreamtab;
+ void * fContext;
+ void * fExtra;
+};
+typedef struct TPortRecord TPortRecord;
+/* Port utilities*/
+/*
+ These routines can be used by kernel code to register, find and iterate
+ through the various ports on the machine. Do not confuse these with
+ the client-side routines, defined in "OpenTransport.h".
+*/
+
+/*
+ Register a port. The name the port was registered under is returned in
+ the fPortName field. This routine allocates a TPortRecord and
+ copies the supplied OTPortRecord into it.
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+OTRegisterPort (OTPortRecord * portInfo,
+ void * ref);
+
+/*
+ Unregister the port with the given name (If you re-register the
+ port, it may get a different name - use OTChangePortState if
+ that is not desireable). Since a single OTPortRef can be registered
+ with several names, the API needs to use the portName rather than
+ the OTPortRef to disambiguate.
+*/
+EXTERN_API_C( OSStatus )
+OTUnregisterPort (const char * portName,
+ void ** refPtr);
+
+/* Change the state of the port.*/
+EXTERN_API_C( OSStatus )
+OTChangePortState (OTPortRef portRef,
+ OTEventCode theChange,
+ OTResult why);
+
+/* Find the TPortRecord for a given Port Name*/
+EXTERN_API_C( TPortRecord *)
+OTFindPort (const char * portName);
+
+/* Find the "nth" TPortRecord*/
+EXTERN_API_C( TPortRecord *)
+OTGetIndexedPort (OTItemCount index);
+
+/*
+ Find another port that is active and conflicts with
+ the port described by "ref"
+*/
+EXTERN_API_C( TPortRecord *)
+OTFindPortConflict (OTPortRef ref);
+
+/* Other ways of finding the port*/
+EXTERN_API_C( TPortRecord *)
+OTFindPortByRef (OTPortRef ref);
+
+EXTERN_API_C( TPortRecord *)
+OTFindPortByDev (dev_t dev);
+
+/* ***** Port Scanners ******/
+
+/* Shared library definitions*/
+
+/*
+ Prefix for Open Transport port scanners.
+ Your port-scanning ASLM function set must use the prefix kOTPortScannerPrefix.
+*/
+
+#define kOTPortScannerPrefix "ot:pScnr$"
+/*
+ The kOTPortScannerInterfaceID define is what you need to add to your
+ export file for the "interfaceID = " clause.
+*/
+
+
+#define kOTPortScannerInterfaceID kOTKernelPrefix "pScnr"
+#define kOTPseudoPortScannerInterfaceID kOTKernelPrefix "ppScnr"
+#define kOTCompatScannerInterfaceID kOTKernelPrefix "cpScnr,1.0"
+
+#define kOTPortScannerCFMTag kOTKernelPrefix "pScnr"
+#define kOTPseudoPortScannerCFMTag kOTKernelPrefix "ppScnr"
+#define kOTCompatPortScannerCFMTag kOTKernelPrefix "cpScnr"
+
+
+/* OTScanPorts entry point.*/
+
+/* Your port-scanning function must be exported by the name "OTScanPorts".*/
+
+#define kOTScanPortsID "OTScanPorts"
+/* Selectors for the scanType parameter to PortScanProcPtr.*/
+
+#endif /* CALL_NOT_IN_CARBON */
+
+enum {
+ kOTInitialScan = 0,
+ kOTScanAfterSleep = 1
+};
+
+/* PortScanProcPtr is the typedef for the scanning function.*/
+
+typedef CALLBACK_API_C( void , PortScanProcPtr )(UInt32 scanType);
+/*
+ Memory allocation for port persistent data, such as the
+ memory referenced by the ref parameter you pass to
+ OTRegisterPort.
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( void *)
+OTAllocPortMem (OTByteCount size);
+
+EXTERN_API_C( void )
+OTFreePortMem (void * mem);
+
+/* ***** Interrupt Control Functions *****/
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if TARGET_CPU_68K
+/*
+ MPS_INTR_STATE saves the current interrupt state
+ Its definition changes with the definition
+ of mps_intr_enable/disable, so this typedef is
+ also inside the TARGET_CPU_68K conditional.
+*/
+
+typedef UInt8 MPS_INTR_STATE;
+/* Disable interrupts and save the state*/
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter mps_intr_disable(__A0)
+ #endif
+EXTERN_API_C( void )
+mps_intr_disable (MPS_INTR_STATE * oldState) SEVENWORDINLINE(0x40C0, 0xE040, 0x007C, 0x0600, 0x027C, 0xFEFF, 0x1080);
+
+/*
+ move sr,d0
+ asr.w #8,d0
+ ori #$600,sr
+ andi #$FEFF,sr
+ move.b d0,(a0)
+ #if OTDEBUG
+ andi.b #$70,d0
+ cmpi.b #$70,d0
+ bne.s @3
+ DebugBreak
+ #endif
+*/
+
+/* Enable interrupts from the saved state*/
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter mps_intr_enable(__A0)
+ #endif
+EXTERN_API_C( void )
+mps_intr_enable (MPS_INTR_STATE * oldState) THREEWORDINLINE(0x1010, 0xE140, 0x46C0);
+
+/*
+ #if OTDEBUG
+ move sr,d0
+ andi.w #$700,d0
+ cmpi.w #$600,d0
+ beq.s @2
+ DebugBreak
+ #endif
+ move.b (a0),d0
+ #if OTDEBUG
+ andi.b #$70,d0
+ cmpi.b #$70,d0
+ bne.s @3
+ DebugBreak
+ move.b (a0),d0
+ #endif
+ asl.w #8,d0
+ move d0,sr
+*/
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+typedef UInt8 MPS_INTR_STATE;
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( void )
+mps_intr_disable (MPS_INTR_STATE * oldState);
+
+EXTERN_API_C( void )
+mps_intr_enable (MPS_INTR_STATE * oldState);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_CPU_68K */
+
+/* ***** Timer Functions ******/
+enum {
+ kOTMinimumTimerValue = 8 /* 8 milliseconds is the minimum timeout value*/
+};
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( mblk_t *)
+mi_timer_alloc (queue_t * q,
+ OTByteCount size);
+
+EXTERN_API_C( void )
+mi_timer_free (mblk_t * mp);
+
+EXTERN_API_C( void )
+mi_timer (mblk_t * mp,
+ unsigned long milliSeconds);
+
+EXTERN_API_C( Boolean )
+mi_timer_cancel (mblk_t * mp);
+
+EXTERN_API_C( Boolean )
+mi_timer_valid (mblk_t * mp);
+
+EXTERN_API_C( mblk_t *)
+mi_timer_q_switch (mblk_t * mp,
+ queue_t * q,
+ mblk_t * new_mp);
+
+/* ***** Driver Deferred Task Extras ******/
+
+/*
+ This routine is used by a driver at interrupt time to schedule
+ a deferred task to run their interrupt processing code.
+*/
+EXTERN_API_C( Boolean )
+OTScheduleDriverDeferredTask (long dtCookie);
+
+/* ***** Driver Memory Routines ******/
+
+/*
+ These routines are different from the
+ similarly named routines in "OpenTransport.h" because they allocate
+ memory in the OT kernel pool. See Technote oooo "Understanding
+ Open Transport Memory Management" for details.
+*/
+
+/*
+ This is the typedef for a function that will be called when a message
+ created by OTAllocMsg is destroyed.
+*/
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API_C( void , EsbFreeProcPtr )(char *arg);
+/*
+ This function creates a message which points to "size" bytes of data
+ at "buf". When the message is freed, the EsbFreeProcPtr function "func"
+ will be called with the argument "arg".
+ NOTE: This function allows users of your buffer to modify the buffer.
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( mblk_t *)
+OTAllocMsg (void * buf,
+ OTByteCount size,
+ EsbFreeProcPtr func,
+ void * arg);
+
+/*
+ Routines to allocate and free memory in your modules (these are
+ interrupt-time safe!).
+*/
+
+EXTERN_API_C( void *)
+OTAllocMem (OTByteCount size);
+
+EXTERN_API_C( void )
+OTFreeMem (void * mem);
+
+EXTERN_API_C( void *)
+OTReallocMem (void * ptr,
+ OTByteCount newSize);
+
+/*
+ Also, make sure that calling traditional "C" allocation routines
+ will not compile.
+*/
+
+
+#define calloc (DONT_CALL*THIS_FUNCTION)
+#define malloc (DONT_CALL*THIS_FUNCTION)
+#define realloc (DONT_CALL*THIS_FUNCTION)
+#define free (DONT_CALL*THIS_FUNCTION)
+
+/* ***** Kernel Memory Utilities ******/
+
+EXTERN_API_C( OTInt32 )
+mi_bcmp (const char * first,
+ const char * second,
+ OTByteCount nBytes);
+
+/* Standard STREAMS memory utilities.*/
+
+
+#define bcopy(s, d, l) OTMemcpy(d, s, l)
+#define bzero(d, l) OTMemzero(d, (OTByteCount)(l))
+#define bcmp(s, d, l) mi_bcmp(s, d, l)
+
+/*
+ Standard STREAMS bcopy, bzero, & bcmp take char* parameters.
+ The BCOPY, BZERO, and BCMP routines take void* so that we do not have
+ to cast all the pointers.
+*/
+
+
+#define BCOPY(s, d, l) bcopy((const char*)(s), (char*)(d), l)
+#define BZERO(d, l) bzero((char*)(d), l)
+#define BCMP(s, d, l) mi_bcmp((const char*)(s), (const char*)(d), l)
+
+
+/*******************************************************************************
+** Some helpful utilites from Mentat
+********************************************************************************/
+/* Routines to calculate various sizes of STREAM messages*/
+
+
+#define HEAD_SIZE(mp) ((mp)->b_rptr - (mp)->b_datap->db_base)
+#define TAIL_SIZE(mp) ((mp)->b_datap->db_lim - (mp)->b_wptr)
+#define MBLK_SIZE(mp) ((mp)->b_wptr - (mp)->b_rptr)
+#define DBLK_SIZE(mp) ((mp)->b_datap->db_lim - (mp)->b_datap->db_base)
+
+/* Useful macros for STREAMS copy in and out.*/
+
+
+#define MI_COPY_IN 1
+#define MI_COPY_OUT 2
+#define MI_COPY_DIRECTION(mp) \
+ (((UInt8*)&(mp)->b_cont->b_prev)[0])
+#define MI_COPY_COUNT(mp) \
+ (((UInt8*)&(mp)->b_cont->b_prev)[1])
+#define MI_COPY_RVAL(mp) (*(OTInt32 *)&(mp)->b_cont->b_next)
+#define MI_COPY_CASE(dir,cnt) ((OTInt32)(((cnt)<<2)|dir))
+#define MI_COPY_STATE(mp) \
+ ((OTInt32)MI_COPY_CASE(MI_COPY_DIRECTION(mp),MI_COPY_COUNT(mp)))
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API_C( void , OTWriterProcPtr )(queue_t *q, mblk_t *mp);
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( void )
+mps_become_writer (queue_t * q,
+ mblk_t * mp,
+ OTWriterProcPtr proc);
+
+EXTERN_API_C( OTInt32 )
+drv_priv (cred * credp);
+
+EXTERN_API_C( queue_t *)
+mi_allocq (streamtab * st);
+
+EXTERN_API_C( mblk_t *)
+mi_tpi_ack_alloc (mblk_t * mp,
+ OTByteCount size,
+ long primType);
+
+EXTERN_API_C( mblk_t *)
+mi_tpi_conn_con (mblk_t * trailer_mp,
+ char * src,
+ OTByteCount src_length,
+ char * opt,
+ OTByteCount opt_length);
+
+EXTERN_API_C( mblk_t *)
+mi_tpi_conn_ind (mblk_t * trailer_mp,
+ char * src,
+ OTByteCount src_length,
+ char * opt,
+ OTByteCount opt_length,
+ OTInt32 seqnum);
+
+EXTERN_API_C( mblk_t *)
+mi_tpi_conn_req (mblk_t * trailer_mp,
+ char * dest,
+ OTByteCount dest_length,
+ char * opt,
+ OTByteCount opt_length);
+
+EXTERN_API_C( mblk_t *)
+mi_tpi_data_ind (mblk_t * trailer_mp,
+ OTInt32 flags,
+ long ptype);
+
+EXTERN_API_C( mblk_t *)
+mi_tpi_data_req (mblk_t * trailer_mp,
+ OTInt32 flags,
+ long pttype);
+
+EXTERN_API_C( mblk_t *)
+mi_tpi_discon_ind (mblk_t * trailer_mp,
+ OTInt32 reason,
+ OTInt32 seqnum);
+
+EXTERN_API_C( mblk_t *)
+mi_tpi_discon_req (mblk_t * trailer_mp,
+ OTInt32 seqnum);
+
+EXTERN_API_C( mblk_t *)
+mi_tpi_err_ack_alloc (mblk_t * mp,
+ OTInt32 tlierr,
+ OTInt32 unixerr);
+
+EXTERN_API_C( mblk_t *)
+mi_tpi_exdata_ind (mblk_t * trailer_mp,
+ OTInt32 flags,
+ long ptype);
+
+EXTERN_API_C( mblk_t *)
+mi_tpi_exdata_req (mblk_t * trailer_mp,
+ OTInt32 flags,
+ long ptype);
+
+EXTERN_API_C( mblk_t *)
+mi_tpi_info_req (void);
+
+EXTERN_API_C( mblk_t *)
+mi_tpi_ok_ack_alloc (mblk_t * mp);
+
+EXTERN_API_C( mblk_t *)
+mi_tpi_ordrel_ind (void);
+
+EXTERN_API_C( mblk_t *)
+mi_tpi_ordrel_req (void);
+
+EXTERN_API_C( mblk_t *)
+mi_tpi_uderror_ind (char * dest,
+ OTByteCount dest_length,
+ char * opt,
+ OTByteCount opt_length,
+ OTInt32 error);
+
+EXTERN_API_C( mblk_t *)
+mi_tpi_unitdata_ind (mblk_t * trailer_mp,
+ char * src,
+ OTByteCount src_length,
+ char * opt,
+ OTByteCount opt_length);
+
+EXTERN_API_C( mblk_t *)
+mi_tpi_unitdata_req (mblk_t * trailer_mp,
+ char * dst,
+ OTByteCount dst_length,
+ char * opt,
+ OTByteCount opt_length);
+
+EXTERN_API_C( mblk_t *)
+mi_reuse_proto (mblk_t * toReuse,
+ OTByteCount sizeDesired,
+ OTBooleanParam keepOnError);
+
+EXTERN_API_C( mblk_t *)
+mi_reallocb (mblk_t * old_mp,
+ OTByteCount new_size);
+
+EXTERN_API_C( Boolean )
+mi_set_sth_hiwat (queue_t * q,
+ OTByteCount size);
+
+EXTERN_API_C( Boolean )
+mi_set_sth_lowat (queue_t * q,
+ OTByteCount size);
+
+EXTERN_API_C( Boolean )
+mi_set_sth_maxblk (queue_t * q,
+ OTByteCount size);
+
+EXTERN_API_C( Boolean )
+mi_set_sth_wroff (queue_t * q,
+ OTByteCount size);
+
+EXTERN_API_C( UInt8 *)
+mi_offset_param (mblk_t * mp,
+ long offset,
+ long len);
+
+EXTERN_API_C( UInt8 *)
+mi_offset_paramc (mblk_t * mp,
+ long offset,
+ long len);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( char *)
+mi_open_detached (char ** mi_opp_orig,
+ OTByteCount size,
+ dev_t * devp);
+
+EXTERN_API_C( OTInt32 )
+mi_open_comm (char ** mi_opp_orig,
+ OTByteCount size,
+ queue_t * q,
+ dev_t * dev,
+ OTInt32 flag,
+ OTInt32 sflag,
+ cred_t * credp);
+
+EXTERN_API_C( OTInt32 )
+mi_close_comm (char ** mi_opp_orig,
+ queue_t * q);
+
+EXTERN_API_C( void )
+mi_bufcall (queue_t * q,
+ OTByteCount size,
+ OTInt32 pri);
+
+EXTERN_API_C( void )
+mi_detach (queue_t * q,
+ char * ptr);
+
+EXTERN_API_C( void )
+mi_close_detached (char ** mi_opp_orig,
+ char * ptr);
+
+EXTERN_API_C( char *)
+mi_next_ptr (char * ptr);
+
+EXTERN_API_C( void )
+mi_copyin (queue_t * q,
+ mblk_t * mp,
+ char * uaddr,
+ OTByteCount len);
+
+EXTERN_API_C( void )
+mi_copyout (queue_t * q,
+ mblk_t * mp);
+
+EXTERN_API_C( mblk_t *)
+mi_copyout_alloc (queue_t * q,
+ mblk_t * mp,
+ char * uaddr,
+ OTByteCount len);
+
+EXTERN_API_C( void )
+mi_copy_done (queue_t * q,
+ mblk_t * mp,
+ OTInt32 err);
+
+EXTERN_API_C( void )
+mi_copy_set_rval (mblk_t * mp,
+ OTInt32 rval);
+
+EXTERN_API_C( OTInt32 )
+mi_copy_state (queue_t * q,
+ mblk_t * mp,
+ mblk_t ** mpp);
+
+/* ***** PCI-Specific Stuff*/
+
+/* This is the cookie that is passed to your STREAM Module.*/
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct OTPCIInfo {
+ RegEntryID fTheID;
+ void * fConfigurationInfo;
+ ByteCount fConfigurationLength;
+};
+typedef struct OTPCIInfo OTPCIInfo;
+/* Driver Description*/
+/*
+ All PCI card drivers should have the following bits set in their
+ install_info structure:
+
+ o kOTModIsDriver.
+
+ They should NEVER have the kOTModPushAlways or the kOTModIsModule
+ flags set.
+ The kOTModIsLowerMux bits should be set if the driver is a lower
+ multiplexor, although Open Transport does nothing with the information
+ today.
+ The kOTModUpperIsDLPI bit should be set if the driver uses the DLPI message
+ specification. The kOTModUpperIsTPI bit should be set if the driver uses
+ the TPI message specification.
+*/
+
+/*
+ Macro to put together the driverServices.service[x].serviceType field:
+ xxxxxddd dddddddd ffffffff xxxxxxTD
+ where "d" is the device type for Open Transport,
+ the lower two bits are whether the driver is TPI or DLPI,
+ and the "f" bits are the framing option flags.
+ and all other bits should be 0
+*/
+
+
+#define OTPCIServiceType(devType, framingFlags, isTPI, isDLPI) \
+ ((devType << 16) | (((framingFlags) & 0xff) << 8) | (isTPI ? 2 : 0) | (isDLPI ? 1 : 0 ))
+
+/*
+ Typedef for the ValidateHardware function. This function will be
+ called only once, at system boot time, before installing your driver
+ into the Open Transport module registry.
+ The param pointer will is a OTPCIInfo pointer - don't be changing the
+ values there!
+*/
+
+typedef CALLBACK_API_C( OTResult , ValidateHardwareProcPtr )(OTPCIInfo *param);
+/*
+ Your driver can return this value if it loaded correctly
+ but wants to stay resident, presumably because it's hooked
+ itself irrevokably into some other system service.
+*/
+enum {
+ kOTPCINoErrorStayLoaded = 1
+};
+
+/*
+ Some descriptors we use - these should eventually show up
+ in system header files somewhere.
+*/
+
+
+#define kDescriptorProperty "driver-descriptor"
+#define kDriverProperty "driver,AAPL,MacOS,PowerPC"
+#define kDriverPtrProperty "driver-ptr"
+#define kSlotProperty "AAPL,slot-name"
+
+/*
+ Maximum # of services support by Open Transport. If your module
+ exports more than this # of services, Open Transport will not be
+ able to use the module.
+*/
+
+
+enum {
+ kMaxServices = 20
+};
+
+/*******************************************************************************
+** Everything below here is C++ ONLY
+********************************************************************************/
+
+#ifdef __cplusplus
+} // Terminate C definitions
+
+/* -------------------------------------------------------------------------
+ TStreamQueue class
+
+ This class is just a convenient interface to the queue structure
+ ------------------------------------------------------------------------- */
+
+ class TStreamQueue : public queue
+ {
+ public:
+ void EnableQueue();
+ };
+
+ /* -------------------------------------------------------------------------
+ Inline methods for TStreamQueue
+ ------------------------------------------------------------------------- */
+
+ inline void TStreamQueue::EnableQueue()
+ {
+ if ( q_flag & QNOENB )
+ {
+ enableok(this);
+ if ( q_first )
+ qenable(this);
+ }
+ }
+
+/* -------------------------------------------------------------------------
+ Class TStreamMessage
+
+ This class is a C++ interface to the mblk_t structure defined in STREAMS
+ ------------------------------------------------------------------------- */
+ //
+ // The maximum stream buffer size is the largest OTByteCount that
+ // doesn't look negative if interpreted as a signed number
+ //
+ enum
+ {
+ kMaxStreamBufferSize = (((OTByteCount)-1L) >> 1)
+ };
+
+ class TStreamMessage : public msgb
+ {
+ private:
+ void* operator new (OTByteCount) { return NULL; }
+
+ public:
+ void* operator new(OTByteCount, OTByteCount size)
+ { return (TStreamMessage*)allocb(size, 0); }
+ void* operator new(OTByteCount, void* buf, OTByteCount size,
+ EsbFreeProcPtr func, void* arg)
+ { return OTAllocMsg(buf, size, func, arg); }
+ void operator delete(void* ptr)
+ { if ( ptr != NULL ) freemsg((mblk_t*)ptr); }
+
+ void Reset(OTByteCount = 0);
+ void ResetWithLeader(OTByteCount);
+
+ void FreeData();
+ TStreamMessage* RemoveData();
+ void AppendData(TStreamMessage* data);
+
+ OTByteCount GetSize() const;
+ OTByteCount GetDataSize() const;
+ OTByteCount GetMessageDataSize() const;
+ void SetDataSize(OTByteCount);
+
+ void SetType(UInt8);
+ UInt8 GetType() const;
+ TStreamMessage* GetNextBlock() const;
+ TStreamMessage* ReuseMessage(OTByteCount newSize, OTBooleanParam keepOnFailure);
+
+ void SetNextBlock(TStreamMessage*);
+ char* GetDataPointer() const;
+ Boolean IsReuseable(OTByteCount size) const;
+
+ void HideBytesAtFront(OTByteCount);
+ void HideBytesAtEnd(OTByteCount);
+ //
+ // The following functions ignore non-M_DATA blocks.
+ //
+ const TStreamMessage*
+ _MDECL GetBlockAt(OTByteCount& offset) const;
+ const void* _MDECL GetPointerTo(OTByteCount offset, OTByteCount* len) const;
+ const void* _MDECL GetPointerTo(OTByteCount offset, OTByteCount* len, void* bfr) const;
+ //
+ // This function makes a non-shared copy of any initial non-M_DATA block, and
+ // then makes shared copies of the requested data. It only assumes 1 leading
+ // non-M_DATA block, but will skip any other non-M_DATA blocks while
+ // searching for data to copy.
+ //
+ TStreamMessage* _MDECL MakeSharedCopy(OTByteCount offset = 0,
+ OTByteCount len = kMaxStreamBufferSize);
+
+ Boolean _MDECL HasData() const;
+ Boolean _MDECL WriteData(void* buf, OTByteCount len);
+ //
+ // These hide/remove the part of the data already read.
+ //
+ TStreamMessage* _MDECL ReadData(void* buf, OTByteCount* len);
+ OTByteCount _MDECL ReadControl(void* buf, OTByteCount len);
+ };
+
+ /* -------------------------------------------------------------------------
+ Inline methods for TStreamMessage
+ ------------------------------------------------------------------------- */
+
+ inline void TStreamMessage::Reset(OTByteCount size)
+ {
+ b_rptr = b_datap->db_base;
+ b_wptr = b_rptr + size;
+ }
+
+ inline OTByteCount OTLengthWithLeader(OTByteCount size)
+ {
+ return (size + 3) & ~3;
+ }
+
+ inline void TStreamMessage::ResetWithLeader(OTByteCount size)
+ {
+ b_rptr = b_datap->db_lim - OTLengthWithLeader(size);
+ b_wptr = b_rptr + size;
+ }
+
+ inline void TStreamMessage::FreeData()
+ {
+ if ( b_cont )
+ {
+ freemsg(b_cont);
+ b_cont = NULL;
+ }
+ }
+
+ inline TStreamMessage* TStreamMessage::RemoveData()
+ {
+ TStreamMessage* temp = (TStreamMessage*)b_cont;
+ b_cont = NULL;
+ return temp;
+ }
+
+ inline void TStreamMessage::AppendData(TStreamMessage* mp)
+ {
+ linkb(this, mp);
+ }
+
+ inline OTByteCount TStreamMessage::GetSize() const
+ {
+ return b_datap->db_lim - b_datap->db_base;
+ }
+
+ inline OTByteCount TStreamMessage::GetDataSize() const
+ {
+ return b_wptr - b_rptr;
+ }
+
+ inline OTByteCount TStreamMessage::GetMessageDataSize() const
+ {
+ return (b_cont == NULL) ?
+ (b_datap->db_type == M_DATA ? (b_wptr - b_rptr) : 0) : msgdsize(this);
+ }
+
+ inline void TStreamMessage::SetDataSize(OTByteCount size)
+ {
+ b_wptr = b_rptr + size;
+ }
+
+ inline void TStreamMessage::SetType(UInt8 type)
+ {
+ b_datap->db_type = type;
+ }
+
+ inline unsigned char TStreamMessage::GetType() const
+ {
+ return b_datap->db_type;
+ }
+
+ inline TStreamMessage* TStreamMessage::GetNextBlock() const
+ {
+ return (TStreamMessage*)b_cont;
+ }
+
+ inline void TStreamMessage::SetNextBlock(TStreamMessage* mp)
+ {
+ b_cont = (mblk_t*)mp;
+ }
+
+ inline char* TStreamMessage::GetDataPointer() const
+ {
+ return (char*)b_rptr;
+ }
+
+ inline Boolean TStreamMessage::IsReuseable(OTByteCount size) const
+ {
+ return (b_datap->db_ref == 1 && GetSize() >= size);
+ }
+
+ inline void TStreamMessage::HideBytesAtFront(OTByteCount len)
+ {
+ adjmsg(this, len);
+ }
+
+ inline void TStreamMessage::HideBytesAtEnd(OTByteCount len)
+ {
+ adjmsg(this, -len);
+ }
+
+ inline TStreamMessage* TStreamMessage::ReuseMessage(OTByteCount newSize, OTBooleanParam keepOnFailure)
+ {
+ return (TStreamMessage*)mi_reuse_proto(this, newSize, keepOnFailure);
+ }
+
+/* -------------------------------------------------------------------------
+ TTimerMessage class
+
+ This class implements an interface to the STREAM environment timer
+ facilities. A TTimerMessage will be placed on the queue of your choice
+ when it's timer expires.
+ ------------------------------------------------------------------------- */
+
+#if TARGET_CPU_PPC
+ #define TIMER_BUG 1
+#else
+ #define TIMER_BUG 0
+#endif
+
+ class TTimerMessage : public TStreamMessage
+ {
+ #if TIMER_BUG
+ private:
+ #else
+ public:
+ #endif
+ inline void* operator new(OTByteCount, queue_t* q)
+ { return mi_timer_alloc(q, sizeof(T_stream_timer)); }
+ inline void* operator new(OTByteCount, queue_t* q, OTByteCount extra)
+ { return mi_timer_alloc(q, extra + sizeof(T_stream_timer)); }
+
+ inline void operator delete(void* ptr)
+ { if ( ptr != NULL ) mi_timer_free((mblk_t*)ptr); }
+
+ public:
+ Boolean IsValid();
+ TTimerMessage* ChangeQueue(TStreamQueue* newQ, TTimerMessage* newMP);
+ Boolean Cancel();
+ void Schedule(OTTimeout time);
+
+ private:
+ inline void* operator new(OTByteCount)
+ { return 0; }
+ };
+
+ inline TTimerMessage* NewTimerMsg(queue_t* q, OTByteCount extra = 0)
+ {
+ return (TTimerMessage*)mi_timer_alloc(q, sizeof(T_stream_timer) + extra);
+ }
+
+ inline void FreeTimerMsg(TTimerMessage* msg)
+ {
+ mi_timer_free(msg);
+ }
+
+ /* -------------------------------------------------------------------------
+ Inline methods for TStreamTimer
+ ------------------------------------------------------------------------- */
+
+ inline Boolean TTimerMessage::IsValid()
+ {
+ return mi_timer_valid(this);
+ }
+
+ inline TTimerMessage* TTimerMessage::ChangeQueue(TStreamQueue* q, TTimerMessage* newMP)
+ {
+ return( (TTimerMessage*) mi_timer_q_switch(this, q, newMP));
+ }
+
+ inline Boolean TTimerMessage::Cancel()
+ {
+ return mi_timer_cancel(this);
+ }
+
+ inline void TTimerMessage::Schedule(OTTimeout time)
+ {
+ ((T_stream_timer*)b_rptr)->PRIM_type = T_TIMER_REQ;
+ mi_timer(this, (unsigned long)time);
+ }
+
+extern "C" { // resume C definitions
+#endif /* __cplusplus */
+
+
+#if defined(__MWERKS__) && TARGET_CPU_68K
+ #pragma pop
+#endif
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __OPENTRANSPORTKERNEL__ */
+
diff --git a/include/qt/OpenTransportProtocol.h b/include/qt/OpenTransportProtocol.h
new file mode 100644
index 000000000..5c4f9e85e
--- /dev/null
+++ b/include/qt/OpenTransportProtocol.h
@@ -0,0 +1,4123 @@
+/*
+ File: OpenTransportProtocol.h
+
+ Contains: Definitions likely to be used by low-level protocol stack implementation.
+
+ Version: Technology: 2.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1993-2001 by Apple Computer, Inc. and Mentat Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __OPENTRANSPORTPROTOCOL__
+#define __OPENTRANSPORTPROTOCOL__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+
+#if CALL_NOT_IN_CARBON
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+#ifndef __CODEFRAGMENTS__
+#include "CodeFragments.h"
+#endif
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#ifndef __OPENTRANSPORT__
+#include "OpenTransport.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if defined(__MWERKS__) && TARGET_CPU_68K
+ #pragma push
+ #pragma pointers_in_D0
+#endif
+
+/* ***** Setup Default Compiler Variables ******/
+
+/*
+ OTKERNEL is used to indicate whether the code is being built
+ for the kernel environment. It defaults to 0. If you include
+ "OpenTransportKernel.h" before including this file,
+ it will be 1 and you will only be able to see stuff available
+ to kernel code.
+ As we've included "OpenTransport.h" and it defaults this variable
+ to 0 if it's not already been defined, it should always be defined
+ by the time we get here. So we just assert that. Assertions in
+ header files! Cool (-:
+*/
+
+#ifndef OTKERNEL
+#error OpenTransportProtocol.h expects OpenTransport.h to set up OTKERNEL.
+#endif /* !defined(OTKERNEL) */
+
+/* ***** Shared Client Memory ******/
+#if !OTKERNEL
+/*
+ These allocators allocate memory in the shared client pool,
+ which is shared between all clients and is not disposed when
+ a particular client goes away. See DTS Technote ooo
+ "Understanding Open Transport Memory Management" for details.
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( void *)
+OTAllocSharedClientMem (OTByteCount size);
+
+EXTERN_API_C( void )
+OTFreeSharedClientMem (void * mem);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* !OTKERNEL */
+
+/* ***** UNIX Types ******/
+#if CALL_NOT_IN_CARBON
+/*
+ On UNIX, uid_t and gid_t are defined to be big enough
+ to hold a user ID and group ID respectively. As Mac OS
+ has no such concepts, we just define them as UInt32 place
+ holders.
+*/
+typedef UInt32 uid_t;
+typedef UInt32 gid_t;
+/* Similarly, dev_t is a UNIX type for denoting a device number.*/
+typedef UInt32 dev_t;
+/* ***** From the Mentat "strstat.h" ******/
+
+/* module statistics structure */
+
+struct module_stat {
+ long ms_pcnt; /* count of calls to put proc */
+ long ms_scnt; /* count of calls to service proc */
+ long ms_ocnt; /* count of calls to open proc */
+ long ms_ccnt; /* count of calls to close proc */
+ long ms_acnt; /* count of calls to admin proc */
+ char * ms_xptr; /* pointer to private statistics */
+ short ms_xsize; /* length of private statistics buffer */
+};
+typedef struct module_stat module_stat;
+/* ***** From the Mentat "cred.h" ******/
+
+
+struct cred {
+ UInt16 cr_ref; /* reference count on processes using cred structures */
+ UInt16 cr_ngroups; /* number of groups in cr_groups */
+ uid_t cr_uid; /* effective user id */
+ gid_t cr_gid; /* effective group id */
+ uid_t cr_ruid; /* real user id */
+ gid_t cr_rgid; /* real group id */
+ uid_t cr_suid; /* user id saved by exec */
+ gid_t cr_sgid; /* group id saved by exec */
+ gid_t cr_groups[1]; /* supplementary groups list */
+};
+typedef struct cred cred;
+typedef cred cred_t;
+/* Free return structure for esballoc */
+typedef CALLBACK_API_C( void , FreeFuncType )(char *arg);
+
+struct free_rtn {
+ FreeFuncType free_func; /* Routine to call to free buffer */
+ char * free_arg; /* Parameter to free_func */
+};
+typedef struct free_rtn free_rtn;
+
+typedef free_rtn frtn_t;
+/* data descriptor */
+typedef struct datab datab;
+
+union datab_db_f {
+ datab * freep;
+ free_rtn * frtnp;
+};
+typedef union datab_db_f datab_db_f;
+
+struct datab {
+ datab_db_f db_f;
+ unsigned char * db_base; /* first byte of buffer */
+ unsigned char * db_lim; /* last byte+1 of buffer */
+ unsigned char db_ref; /* count of messages pointing to block*/
+ unsigned char db_type; /* message type */
+ unsigned char db_iswhat; /* message status */
+ unsigned char db_filler2; /* for spacing */
+ UInt32 db_size; /* used internally */
+ unsigned char * db_msgaddr; /* used internally */
+ long db_filler;
+};
+
+
+typedef datab dblk_t;
+#define db_freep db_f.freep
+#define db_frtnp db_f.frtnp
+
+/* message block */
+
+struct msgb {
+ struct msgb * b_next; /* next message on queue */
+ struct msgb * b_prev; /* previous message on queue */
+ struct msgb * b_cont; /* next message block of message */
+ unsigned char * b_rptr; /* first unread data byte in buffer */
+ unsigned char * b_wptr; /* first unwritten data byte */
+ datab * b_datap; /* data block */
+ unsigned char b_band; /* message priority */
+ unsigned char b_pad1;
+ unsigned short b_flag;
+#ifdef MSGB_XTRA
+
+ MSGB_XTRA
+
+#endif
+
+};
+typedef struct msgb msgb;
+
+typedef msgb mblk_t;
+/* mblk flags */
+enum {
+ MSGMARK = 0x01, /* last byte of message is tagged */
+ MSGNOLOOP = 0x02, /* don't pass message to write-side of stream */
+ MSGDELIM = 0x04, /* message is delimited */
+ MSGNOGET = 0x08
+};
+
+/* STREAMS environments are expected to define these constants in a public header file.*/
+
+enum {
+ STRCTLSZ = 256, /* Maximum Control buffer size for messages */
+ STRMSGSZ = 8192 /* Maximum # data bytes for messages */
+};
+
+/* Message types */
+enum {
+ QNORM = 0,
+ M_DATA = 0, /* Ordinary data */
+ M_PROTO = 1, /* Internal control info and data */
+ M_BREAK = 0x08, /* Request a driver to send a break */
+ M_PASSFP = 0x09, /* Used to pass a file pointer */
+ M_SIG = 0x0B, /* Requests a signal to be sent */
+ M_DELAY = 0x0C, /* Request a real-time delay */
+ M_CTL = 0x0D, /* For inter-module communication */
+ M_IOCTL = 0x0E, /* Used internally for I_STR requests */
+ M_SETOPTS = 0x10, /* Alters characteristics of Stream head */
+ M_RSE = 0x11 /* Reserved for internal use */
+};
+
+/* MPS private type */
+enum {
+ M_MI = 0x40,
+ M_MI_READ_RESET = 1,
+ M_MI_READ_SEEK = 2,
+ M_MI_READ_END = 4
+};
+
+/* Priority messages types */
+enum {
+ QPCTL = 0x80,
+ M_IOCACK = 0x81, /* Positive ack of previous M_IOCTL */
+ M_IOCNAK = 0x82, /* Previous M_IOCTL failed */
+ M_PCPROTO = 0x83, /* Same as M_PROTO except for priority */
+ M_PCSIG = 0x84, /* Priority signal */
+ M_FLUSH = 0x86, /* Requests modules to flush queues */
+ M_STOP = 0x87, /* Request drivers to stop output */
+ M_START = 0x88, /* Request drivers to start output */
+ M_HANGUP = 0x89, /* Driver can no longer produce data */
+ M_ERROR = 0x8A, /* Reports downstream error condition */
+ M_READ = 0x8B, /* Reports client read at Stream head */
+ M_COPYIN = 0x8C, /* Requests the Stream to copy data in for a module */
+ M_COPYOUT = 0x8D, /* Requests the Stream to copy data out for a module */
+ M_IOCDATA = 0x8E, /* Status from M_COPYIN/M_COPYOUT message */
+ M_PCRSE = 0x90, /* Reserved for internal use */
+ M_STOPI = 0x91, /* Request drivers to stop input */
+ M_STARTI = 0x92, /* Request drivers to start input */
+ M_HPDATA = 0x93 /* MPS-private type; high priority data */
+};
+
+/* Defines for flush messages */
+enum {
+ FLUSHALL = 1,
+ FLUSHDATA = 0
+};
+
+
+enum {
+ NOERROR = -1 /* used in M_ERROR messages */
+};
+
+typedef struct sth_s sth_s;
+typedef struct sqh_s sqh_s;
+typedef struct q_xtra q_xtra;
+#if OTKERNEL
+/*
+ module_info is aligned differently on 68K than
+ on PowerPC. Yucky. I can't defined a conditionalised
+ pad field because a) you can't conditionalise specific
+ fields in the interface definition language used to
+ create Universal Interfaces, and b) lots of code
+ assigns C structured constants to global variables
+ of this type, and these assignments break if you
+ add an extra field to the type. Instead, I
+ set the alignment appropriately before defining the
+ structure. The problem with doing that is that
+ the interface definition language doesn't allow
+ my to set the alignment in the middle of a file,
+ so I have to do this via "pass throughs". This
+ works fine for the well known languages (C, Pascal),
+ but may cause problems for other languages (Java,
+ Asm).
+*/
+#if TARGET_CPU_PPC
+ #pragma options align=power
+#endif
+
+struct module_info {
+ unsigned short mi_idnum; /* module ID number */
+ char * mi_idname; /* module name */
+ long mi_minpsz; /* min pkt size, for developer use */
+ long mi_maxpsz; /* max pkt size, for developer use */
+ unsigned long mi_hiwat; /* hi-water mark, for flow control */
+ unsigned long mi_lowat; /* lo-water mark, for flow control */
+};
+typedef struct module_info module_info;
+typedef module_info * module_infoPtr;
+#if TARGET_CPU_PPC
+ #pragma options align=reset
+#endif
+
+
+typedef struct queue queue;
+typedef CALLBACK_API_C( OTInt32 , admin_t )(void );
+typedef CALLBACK_API_C( void , bufcall_t )(long size);
+typedef CALLBACK_API_C( void , bufcallp_t )(long size);
+typedef CALLBACK_API_C( OTInt32 , closep_t )(queue *q, OTInt32 foo, cred_t *cred);
+typedef CALLBACK_API_C( OTInt32 , old_closep_t )(queue *q);
+typedef CALLBACK_API_C( OTInt32 , openp_t )(queue *q, dev_t *dev, OTInt32 foo, OTInt32 bar, cred_t *cred);
+typedef CALLBACK_API_C( OTInt32 , openOld_t )(queue *q, dev_t dev, OTInt32 foo, OTInt32 bar);
+typedef CALLBACK_API_C( OTInt32 , old_openp_t )(queue *q, dev_t dev, OTInt32 foo, OTInt32 bar);
+typedef CALLBACK_API_C( OTInt32 , closeOld_t )(queue *q);
+typedef CALLBACK_API_C( OTInt32 , putp_t )(queue *q, msgb *mp);
+typedef CALLBACK_API_C( OTInt32 , srvp_t )(queue *q);
+
+struct qinit {
+ putp_t qi_putp; /* put procedure */
+ srvp_t qi_srvp; /* service procedure */
+ openp_t qi_qopen; /* called on each open or a push */
+ closep_t qi_qclose; /* called on last close or a pop */
+ admin_t qi_qadmin; /* reserved for future use */
+ module_info * qi_minfo; /* information structure */
+ module_stat * qi_mstat; /* statistics structure - optional */
+};
+typedef struct qinit qinit;
+/* defines module or driver */
+
+struct streamtab {
+ qinit * st_rdinit; /* defines read QUEUE */
+ qinit * st_wrinit; /* defines write QUEUE */
+ qinit * st_muxrinit; /* for multiplexing drivers only */
+ qinit * st_muxwinit; /* ditto */
+};
+typedef struct streamtab streamtab;
+
+struct qband {
+ struct qband * qb_next; /* next band for this queue */
+ unsigned long qb_count; /* weighted count of characters in this band */
+ msgb * qb_first; /* head of message queue */
+ msgb * qb_last; /* tail of message queue */
+ unsigned long qb_hiwat; /* high water mark */
+ unsigned long qb_lowat; /* low water mark */
+ unsigned short qb_flag; /* ooo.state */
+ short qb_pad1; /* ooo reserved */
+};
+typedef struct qband qband;
+typedef qband qband_t;
+
+union queue_q_u {
+ queue * q_u_link; /* link to scheduling queue */
+ sqh_s * q_u_sqh_parent;
+};
+typedef union queue_q_u queue_q_u;
+
+struct queue {
+ qinit * q_qinfo; /* procedures and limits for queue */
+ msgb * q_first; /* head of message queue */
+ msgb * q_last; /* tail of message queue */
+ struct queue * q_next; /* next queue in Stream */
+ queue_q_u q_u;
+ char * q_ptr; /* to private data structure */
+ unsigned long q_count; /* weighted count of characters on q */
+ long q_minpsz; /* min packet size accepted */
+ long q_maxpsz; /* max packet size accepted */
+ unsigned long q_hiwat; /* high water mark, for flow control */
+ unsigned long q_lowat; /* low water mark */
+ qband * q_bandp; /* band information */
+ unsigned short q_flag; /* ooo queue state */
+ unsigned char q_nband; /* ooo number of bands */
+ unsigned char q_pad1[1]; /* ooo reserved */
+ q_xtra * q_osx; /* Pointer to OS-dependent extra stuff */
+ struct queue * q_ffcp; /* Forward flow control pointer */
+ struct queue * q_bfcp; /* Backward flow control pointer */
+};
+
+
+typedef queue * queuePtr;
+typedef queue queue_t;
+#define q_link q_u.q_u_link
+#define q_sqh_parent q_u.q_u_sqh_parent
+
+/* queue_t flag defines */
+enum {
+ QREADR = 0x01, /* This queue is a read queue */
+ QNOENB = 0x02, /* Don't enable in putq */
+ QFULL = 0x04, /* The queue is full */
+ QWANTR = 0x08, /* The queue should be scheduled in the next putq */
+ QWANTW = 0x10, /* The stream should be back enabled when this queue drains */
+ QUSE = 0x20, /* The queue is allocated and ready for use */
+ QENAB = 0x40, /* The queue is scheduled (on the run queue) */
+ QBACK = 0x80, /* The queue has been back enabled */
+ QOLD = 0x0100, /* Module supports old style opens and closes */
+ QHLIST = 0x0200, /* The Stream head is doing something with this queue (Not supported by MPS) */
+ QWELDED = 0x0400, /* Mentat flag for welded queues */
+ QUNWELDING = 0x0800, /* Queue is scheduled to be unwelded */
+ QPROTECTED = 0x1000, /* Mentat flag for unsafe q access */
+ QEXCOPENCLOSE = 0x2000 /* Queue wants exclusive open/close calls */
+};
+
+/* qband_t flag defines */
+enum {
+ QB_FULL = 0x01, /* The band is full */
+ QB_WANTW = 0x02, /* The stream should be back enabled when this band/queue drains */
+ QB_BACK = 0x04 /* The queue has been back enabled */
+};
+
+#else
+/*
+ Client code views a queue_t as a simple cookie.
+ The real definition lives above and is only available
+ to kernel code.
+*/
+
+struct queue {
+ UInt32 dummy;
+};
+typedef struct queue queue;
+typedef SInt32 queue_t;
+#endif /* OTKERNEL */
+
+/* structure contained in M_COPYIN/M_COPYOUT messages */
+
+typedef unsigned char * caddr_t;
+
+struct copyreq {
+ SInt32 cq_cmd; /* ioctl command (from ioc_cmd) */
+ cred * cq_cr; /* pointer to full credentials */
+ UInt32 cq_id; /* ioctl id (from ioc_id) */
+ caddr_t cq_addr; /* address to copy data to/from */
+ UInt32 cq_size; /* number of bytes to copy */
+ SInt32 cq_flag; /* state */
+ mblk_t * cq_private; /* private state information */
+ long cq_filler[4];
+};
+typedef struct copyreq copyreq;
+#define cq_uid cq_cr->cr_uid
+#define cq_gid cq_cr->cr_gid
+
+
+/* copyreq defines */
+enum {
+ STRCANON = 0x01, /* b_cont data block contains canonical format specifier */
+ RECOPY = 0x02 /* perform I_STR copyin again this time using canonical format specifier */
+};
+
+/* structure contained in M_IOCDATA message block */
+
+struct copyresp {
+ SInt32 cp_cmd; /* ioctl command (from ioc_cmd) */
+ cred * cp_cr; /* pointer to full credentials */
+ UInt32 cp_id; /* ioctl id (from ioc_id) */
+ caddr_t cp_rval; /* status of request; 0 for success; error value for failure */
+ UInt32 cp_pad1;
+ SInt32 cp_pad2;
+ mblk_t * cp_private; /* private state information */
+ long cp_filler[4];
+};
+typedef struct copyresp copyresp;
+#define cp_uid cp_cr->cr_uid
+#define cp_gid cp_cr->cr_gid
+
+/* structure contained in an M_IOCTL message block */
+
+struct iocblk {
+ SInt32 ioc_cmd; /* ioctl command type */
+ cred * ioc_cr; /* pointer to full credentials */
+ UInt32 ioc_id; /* ioctl id */
+ UInt32 ioc_count; /* count of bytes in data field */
+ SInt32 ioc_error; /* error code */
+ SInt32 ioc_rval; /* return value */
+ long ioc_filler[4];
+};
+typedef struct iocblk iocblk;
+#define ioc_uid ioc_cr->cr_uid
+#define ioc_gid ioc_cr->cr_gid
+
+
+
+enum {
+ TRANSPARENT = (unsigned long)0xFFFFFFFF
+};
+
+/* Used in M_IOCTL mblks to muxes (ioc_cmd I_LINK) */
+
+struct linkblk {
+ queue * l_qtop; /* lowest level write queue of upper stream */
+ queue * l_qbot; /* highest level write queue of lower stream */
+ SInt32 l_index; /* system-unique index for lower stream */
+ long l_pad[5];
+};
+typedef struct linkblk linkblk;
+/* structure contained in an M_PASSFP message block */
+
+struct strpfp {
+ unsigned long pass_file_cookie; /* file 'pointer' */
+ unsigned short pass_uid; /* user id of sending stream */
+ unsigned short pass_gid;
+ sth_s * pass_sth; /* Stream head pointer of passed stream */
+};
+typedef struct strpfp strpfp;
+/* structure contained in an M_SETOPTS message block */
+
+struct stroptions {
+ unsigned long so_flags; /* options to set */
+ short so_readopt; /* read option */
+ unsigned short so_wroff; /* write offset */
+ long so_minpsz; /* minimum read packet size */
+ long so_maxpsz; /* maximum read packet size */
+ unsigned long so_hiwat; /* read queue high-water mark */
+ unsigned long so_lowat; /* read queue low-water mark */
+ unsigned char so_band; /* band for water marks */
+ unsigned char so_filler[3]; /* added for alignment */
+ unsigned long so_poll_set; /* poll events to set */
+ unsigned long so_poll_clr; /* poll events to clear */
+};
+typedef struct stroptions stroptions;
+/* definitions for so_flags field */
+enum {
+ SO_ALL = 0x7FFF, /* Update all options */
+ SO_READOPT = 0x0001, /* Set the read mode */
+ SO_WROFF = 0x0002, /* Insert an offset in write M_DATA mblks */
+ SO_MINPSZ = 0x0004, /* Change the min packet size on sth rq */
+ SO_MAXPSZ = 0x0008, /* Change the max packet size on sth rq */
+ SO_HIWAT = 0x0010, /* Change the high water mark on sth rq */
+ SO_LOWAT = 0x0020, /* Change the low water mark */
+ SO_MREADON = 0x0040, /* Request M_READ messages */
+ SO_MREADOFF = 0x0080, /* Don't gen M_READ messages */
+ SO_NDELON = 0x0100, /* old TTY semantics for O_NDELAY reads and writes */
+ SO_NDELOFF = 0x0200, /* STREAMS semantics for O_NDELAY reads and writes */
+ SO_ISTTY = 0x0400, /* Become a controlling tty */
+ SO_ISNTTY = 0x0800, /* No longer a controlling tty */
+ SO_TOSTOP = 0x1000, /* Stop on background writes */
+ SO_TONSTOP = 0x2000, /* Don't stop on background writes */
+ SO_BAND = 0x4000, /* Water marks are for a band */
+ SO_POLL_SET = 0x8000, /* Set events to poll */
+ SO_POLL_CLR = 0x00010000 /* Clear events to poll */
+};
+
+/* Buffer Allocation Priority */
+enum {
+ BPRI_LO = 1,
+ BPRI_MED = 2,
+ BPRI_HI = 3
+};
+
+enum {
+ INFPSZ = -1
+};
+
+
+/** Test whether message is a data message */
+#define datamsg(type) ((type) == M_DATA || (type) == M_PROTO || (type) == M_PCPROTO || (type) == M_DELAY)
+
+enum {
+ CLONEOPEN = 0x02,
+ MODOPEN = 0x01,
+ OPENFAIL = -1
+};
+
+
+/* Enumeration values for strqget and strqset */
+
+typedef SInt32 qfields;
+enum {
+ QHIWAT = 0,
+ QLOWAT = 1,
+ QMAXPSZ = 2,
+ QMINPSZ = 3,
+ QCOUNT = 4,
+ QFIRST = 5,
+ QLAST = 6,
+ QFLAG = 7,
+ QBAD = 8
+};
+
+
+typedef qfields qfields_t;
+#endif /* CALL_NOT_IN_CARBON */
+
+/* ***** From the Mentat "stropts.h" ******/
+
+
+enum {
+ I_NREAD = ((MIOC_STREAMIO << 8) | 1), /* return the number of bytes in 1st msg */
+ I_PUSH = ((MIOC_STREAMIO << 8) | 2), /* push module just below stream head */
+ I_POP = ((MIOC_STREAMIO << 8) | 3), /* pop module below stream head */
+ I_LOOK = ((MIOC_STREAMIO << 8) | 4), /* retrieve name of first stream module */
+ I_FLUSH = ((MIOC_STREAMIO << 8) | 5), /* flush all input and/or output queues */
+ I_SRDOPT = ((MIOC_STREAMIO << 8) | 6), /* set the read mode */
+ I_GRDOPT = ((MIOC_STREAMIO << 8) | 7), /* get the current read mode */
+ I_STR = ((MIOC_STREAMIO << 8) | 8), /* create an internal ioctl message */
+ I_SETSIG = ((MIOC_STREAMIO << 8) | 9), /* request SIGPOLL signal on events */
+ I_GETSIG = ((MIOC_STREAMIO << 8) | 10), /* query the registered events */
+ I_FIND = ((MIOC_STREAMIO << 8) | 11), /* check for module in stream */
+ I_LINK = ((MIOC_STREAMIO << 8) | 12), /* connect stream under mux fd */
+ I_UNLINK = ((MIOC_STREAMIO << 8) | 13), /* disconnect two streams */
+ I_PEEK = ((MIOC_STREAMIO << 8) | 15), /* peek at data on read queue */
+ I_FDINSERT = ((MIOC_STREAMIO << 8) | 16), /* create a message and send downstream */
+ I_SENDFD = ((MIOC_STREAMIO << 8) | 17), /* send an fd to a connected pipe stream */
+ I_RECVFD = ((MIOC_STREAMIO << 8) | 18), /* retrieve a file descriptor */
+ I_FLUSHBAND = ((MIOC_STREAMIO << 8) | 19), /* flush a particular input and/or output band */
+ I_SWROPT = ((MIOC_STREAMIO << 8) | 20), /* set the write mode */
+ I_GWROPT = ((MIOC_STREAMIO << 8) | 21), /* get the current write mode */
+ I_LIST = ((MIOC_STREAMIO << 8) | 22), /* get a list of all modules on a stream */
+ I_ATMARK = ((MIOC_STREAMIO << 8) | 23), /* check to see if the next message is "marked" */
+ I_CKBAND = ((MIOC_STREAMIO << 8) | 24), /* check for a message of a particular band */
+ I_GETBAND = ((MIOC_STREAMIO << 8) | 25), /* get the band of the next message to be read */
+ I_CANPUT = ((MIOC_STREAMIO << 8) | 26), /* check to see if a message may be passed on a stream */
+ I_SETCLTIME = ((MIOC_STREAMIO << 8) | 27), /* set the close timeout wait */
+ I_GETCLTIME = ((MIOC_STREAMIO << 8) | 28), /* get the current close timeout wait */
+ I_PLINK = ((MIOC_STREAMIO << 8) | 29), /* permanently connect a stream under a mux */
+ I_PUNLINK = ((MIOC_STREAMIO << 8) | 30), /* disconnect a permanent link */
+ I_GETMSG = ((MIOC_STREAMIO << 8) | 40), /* getmsg() system call */
+ I_PUTMSG = ((MIOC_STREAMIO << 8) | 41), /* putmsg() system call */
+ I_POLL = ((MIOC_STREAMIO << 8) | 42), /* poll() system call */
+ I_SETDELAY = ((MIOC_STREAMIO << 8) | 43), /* set blocking status */
+ I_GETDELAY = ((MIOC_STREAMIO << 8) | 44), /* get blocking status */
+ I_RUN_QUEUES = ((MIOC_STREAMIO << 8) | 45), /* sacrifice for the greater good */
+ I_GETPMSG = ((MIOC_STREAMIO << 8) | 46), /* getpmsg() system call */
+ I_PUTPMSG = ((MIOC_STREAMIO << 8) | 47), /* putpmsg() system call */
+ I_AUTOPUSH = ((MIOC_STREAMIO << 8) | 48), /* for systems that cannot do the autopush in open */
+ I_PIPE = ((MIOC_STREAMIO << 8) | 49), /* for pipe library call */
+ I_HEAP_REPORT = ((MIOC_STREAMIO << 8) | 50), /* get heap statistics */
+ I_FIFO = ((MIOC_STREAMIO << 8) | 51) /* for fifo library call */
+};
+
+/* priority message request on putmsg() or strpeek */
+enum {
+ RS_HIPRI = 0x01
+};
+
+/* flags for getpmsg and putpmsg */
+enum {
+ MSG_HIPRI = 0x01,
+ MSG_BAND = 0x02, /* Retrieve a message from a particular band */
+ MSG_ANY = 0x04 /* Retrieve a message from any band */
+};
+
+/* return values from getmsg(), 0 indicates all ok */
+enum {
+ MORECTL = 0x01, /* more control info available */
+ MOREDATA = 0x02 /* more data available */
+};
+
+
+enum {
+ FMNAMESZ = 31 /* maximum length of a module or device name */
+};
+
+
+/* Infinite poll wait time */
+enum {
+ INFTIM = (unsigned long)0xFFFFFFFF
+};
+
+/* flush requests */
+enum {
+ FLUSHR = 0x01, /* Flush the read queue */
+ FLUSHW = 0x02, /* Flush the write queue */
+ FLUSHRW = (FLUSHW | FLUSHR) /* Flush both */
+};
+
+enum {
+ FLUSHBAND = 0x40 /* Flush a particular band */
+};
+
+/* I_FLUSHBAND */
+
+struct bandinfo {
+ unsigned char bi_pri; /* Band to flush */
+ char pad1;
+ SInt32 bi_flag; /* One of the above flush requests */
+};
+typedef struct bandinfo bandinfo;
+/* flags for I_ATMARK */
+enum {
+ ANYMARK = 0x01, /* Check if message is marked */
+ LASTMARK = 0x02 /* Check if this is the only message marked */
+};
+
+/* signal event masks */
+enum {
+ S_INPUT = 0x01, /* A non-M_PCPROTO message has arrived */
+ S_HIPRI = 0x02, /* A priority (M_PCPROTO) message is available */
+ S_OUTPUT = 0x04, /* The write queue is no longer full */
+ S_MSG = 0x08, /* A signal message has reached the front of read queue */
+ S_RDNORM = 0x10, /* A non-priority message is available */
+ S_RDBAND = 0x20, /* A banded messsage is available */
+ S_WRNORM = 0x40, /* Same as S_OUTPUT */
+ S_WRBAND = 0x80, /* A priority band exists and is writable */
+ S_ERROR = 0x0100, /* Error message has arrived */
+ S_HANGUP = 0x0200, /* Hangup message has arrived */
+ S_BANDURG = 0x0400 /* Use SIGURG instead of SIGPOLL on S_RDBAND signals */
+};
+
+/* read mode bits for I_S|GRDOPT; choose one of the following */
+enum {
+ RNORM = 0x01, /* byte-stream mode, default */
+ RMSGD = 0x02, /* message-discard mode */
+ RMSGN = 0x04, /* message-nondiscard mode */
+ RFILL = 0x08 /* fill read buffer mode (PSE private) */
+};
+
+/* More read modes, these are bitwise or'ed with the modes above */
+enum {
+ RPROTNORM = 0x10, /* Normal handling of M_PROTO/M_PCPROTO messages, default */
+ RPROTDIS = 0x20, /* Discard M_PROTO/M_PCPROTO message blocks */
+ RPROTDAT = 0x40 /* Convert M_PROTO/M_PCPROTO message blocks into M_DATA */
+};
+
+/* write modes for I_S|GWROPT */
+enum {
+ SNDZERO = 0x01 /* Send a zero-length message downstream on a write of zero bytes */
+};
+
+enum {
+ MUXID_ALL = -1 /* Unlink all lower streams for I_UNLINK and I_PUNLINK */
+};
+
+/*
+ strbuf is moved to "OpenTransport.h" because that header file
+ exports provider routines that take it as a parameter.
+*/
+
+/* structure of ioctl data on I_FDINSERT */
+
+struct strfdinsert {
+ strbuf ctlbuf;
+ strbuf databuf;
+ long flags; /* type of message, 0 or RS_HIPRI */
+ long fildes; /* fd of other stream (FDCELL) */
+ SInt32 offset; /* where to put other stream read qp */
+};
+typedef struct strfdinsert strfdinsert;
+/* I_LIST structures */
+
+struct str_mlist {
+ char l_name[32];
+};
+typedef struct str_mlist str_mlist;
+
+struct str_list {
+ SInt32 sl_nmods; /* number of modules in sl_modlist array */
+ str_mlist * sl_modlist;
+};
+typedef struct str_list str_list;
+/* I_PEEK structure */
+
+struct strpeek {
+ strbuf ctlbuf;
+ strbuf databuf;
+ long flags; /* if RS_HIPRI, get priority messages only */
+};
+typedef struct strpeek strpeek;
+/* structure for getpmsg and putpmsg */
+
+struct strpmsg {
+ strbuf ctlbuf;
+ strbuf databuf;
+ SInt32 band;
+ long flags;
+};
+typedef struct strpmsg strpmsg;
+/* structure of ioctl data on I_RECVFD */
+
+struct strrecvfd {
+ long fd; /* new file descriptor (FDCELL) */
+ unsigned short uid; /* user id of sending stream */
+ unsigned short gid;
+ char fill[8];
+};
+typedef struct strrecvfd strrecvfd;
+/* structure of ioctl data on I_STR */
+
+struct strioctl {
+ SInt32 ic_cmd; /* downstream command */
+ SInt32 ic_timout; /* ACK/NAK timeout */
+ SInt32 ic_len; /* length of data arg */
+ char * ic_dp; /* ptr to data arg */
+};
+typedef struct strioctl strioctl;
+/* ***** From the Mentat "strlog.h" ******/
+
+
+struct log_ctl {
+ short mid;
+ short sid;
+ char level;
+ char pad1;
+ short flags;
+ long ltime;
+ long ttime;
+ SInt32 seq_no;
+};
+typedef struct log_ctl log_ctl;
+enum {
+ SL_FATAL = 0x01, /* Fatal error */
+ SL_NOTIFY = 0x02, /* Notify the system administrator */
+ SL_ERROR = 0x04, /* Pass message to error logger */
+ SL_TRACE = 0x08, /* Pass message to tracer */
+ SL_CONSOLE = 0x00, /* Console messages are disabled */
+ SL_WARN = 0x20, /* Warning */
+ SL_NOTE = 0x40 /* Notice this message */
+};
+
+
+struct trace_ids {
+ short ti_mid;
+ short ti_sid;
+ char ti_level;
+};
+typedef struct trace_ids trace_ids;
+enum {
+ I_TRCLOG = ((MIOC_STRLOG << 8) | 1),
+ I_ERRLOG = ((MIOC_STRLOG << 8) | 2)
+};
+
+enum {
+ LOGMSGSZ = 128
+};
+
+/* ***** From the Mentat "tihdr.h" ******/
+
+#if CALL_NOT_IN_CARBON
+
+/* TPI Primitives*/
+
+
+
+enum {
+ T_BIND_REQ = 101,
+ T_CONN_REQ = 102, /* connection request */
+ T_CONN_RES = 103, /* respond to connection indication */
+ T_DATA_REQ = 104,
+ T_DISCON_REQ = 105,
+ T_EXDATA_REQ = 106,
+ T_INFO_REQ = 107,
+ T_OPTMGMT_REQ = 108,
+ T_ORDREL_REQ = 109,
+ T_UNBIND_REQ = 110,
+ T_UNITDATA_REQ = 111,
+ T_ADDR_REQ = 112, /* Get address request */
+ T_UREQUEST_REQ = 113, /* UnitRequest (transaction) req */
+ T_REQUEST_REQ = 114, /* Request (CO transaction) req */
+ T_UREPLY_REQ = 115, /* UnitRequest (transaction) req */
+ T_REPLY_REQ = 116, /* REPLY (CO transaction) req */
+ T_CANCELREQUEST_REQ = 117, /* Cancel outgoing request */
+ T_CANCELREPLY_REQ = 118, /* Cancel incoming request */
+ T_REGNAME_REQ = 119, /* Request name registration */
+ T_DELNAME_REQ = 120, /* Request delete name registration */
+ T_LKUPNAME_REQ = 121, /* Request name lookup */
+
+ T_BIND_ACK = 122,
+ T_CONN_CON = 123, /* connection confirmation */
+ T_CONN_IND = 124, /* incoming connection indication */
+ T_DATA_IND = 125,
+ T_DISCON_IND = 126,
+ T_ERROR_ACK = 127,
+ T_EXDATA_IND = 128,
+ T_INFO_ACK = 129,
+ T_OK_ACK = 130,
+ T_OPTMGMT_ACK = 131,
+ T_ORDREL_IND = 132,
+ T_UNITDATA_IND = 133,
+ T_UDERROR_IND = 134,
+ T_ADDR_ACK = 135, /* Get address ack */
+ T_UREQUEST_IND = 136, /* UnitRequest (transaction) ind */
+ T_REQUEST_IND = 137, /* Request (CO transaction) ind */
+ T_UREPLY_IND = 138, /* Incoming unit reply */
+ T_REPLY_IND = 139, /* Incoming reply */
+ T_UREPLY_ACK = 140, /* outgoing Unit Reply is complete */
+ T_REPLY_ACK = 141, /* outgoing Reply is complete */
+ T_RESOLVEADDR_REQ = 142,
+ T_RESOLVEADDR_ACK = 143,
+
+ T_LKUPNAME_CON = 146, /* Results of name lookup */
+ T_LKUPNAME_RES = 147, /* Partial results of name lookup */
+ T_REGNAME_ACK = 148, /* Request name registration */
+ T_SEQUENCED_ACK = 149, /* Sequenced version of OK or ERROR ACK */
+
+ T_EVENT_IND = 160 /* Miscellaneous event Indication */
+};
+
+/* State values */
+enum {
+ TS_UNBND = 1,
+ TS_WACK_BREQ = 2,
+ TS_WACK_UREQ = 3,
+ TS_IDLE = 4,
+ TS_WACK_OPTREQ = 5,
+ TS_WACK_CREQ = 6,
+ TS_WCON_CREQ = 7,
+ TS_WRES_CIND = 8,
+ TS_WACK_CRES = 9,
+ TS_DATA_XFER = 10,
+ TS_WIND_ORDREL = 11,
+ TS_WREQ_ORDREL = 12,
+ TS_WACK_DREQ6 = 13,
+ TS_WACK_DREQ7 = 14,
+ TS_WACK_DREQ9 = 15,
+ TS_WACK_DREQ10 = 16,
+ TS_WACK_DREQ11 = 17,
+ TS_WACK_ORDREL = 18,
+ TS_NOSTATES = 19,
+ TS_BAD_STATE = 19
+};
+
+/* Transport events */
+enum {
+ TE_OPENED = 1,
+ TE_BIND = 2,
+ TE_OPTMGMT = 3,
+ TE_UNBIND = 4,
+ TE_CLOSED = 5,
+ TE_CONNECT1 = 6,
+ TE_CONNECT2 = 7,
+ TE_ACCEPT1 = 8,
+ TE_ACCEPT2 = 9,
+ TE_ACCEPT3 = 10,
+ TE_SND = 11,
+ TE_SNDDIS1 = 12,
+ TE_SNDDIS2 = 13,
+ TE_SNDREL = 14,
+ TE_SNDUDATA = 15,
+ TE_LISTEN = 16,
+ TE_RCVCONNECT = 17,
+ TE_RCV = 18,
+ TE_RCVDIS1 = 19,
+ TE_RCVDIS2 = 20,
+ TE_RCVDIS3 = 21,
+ TE_RCVREL = 22,
+ TE_RCVUDATA = 23,
+ TE_RCVUDERR = 24,
+ TE_PASS_CONN = 25,
+ TE_BAD_EVENT = 26
+};
+
+
+struct T_addr_ack {
+ long PRIM_type; /* Always T_ADDR_ACK */
+ long LOCADDR_length;
+ long LOCADDR_offset;
+ long REMADDR_length;
+ long REMADDR_offset;
+};
+typedef struct T_addr_ack T_addr_ack;
+
+struct T_addr_req {
+ long PRIM_type; /* Always T_ADDR_REQ */
+};
+typedef struct T_addr_req T_addr_req;
+
+struct T_bind_ack {
+ long PRIM_type; /* always T_BIND_ACK */
+ long ADDR_length;
+ long ADDR_offset;
+ unsigned long CONIND_number;
+};
+typedef struct T_bind_ack T_bind_ack;
+
+struct T_bind_req {
+ long PRIM_type; /* always T_BIND_REQ */
+ long ADDR_length;
+ long ADDR_offset;
+ unsigned long CONIND_number;
+};
+typedef struct T_bind_req T_bind_req;
+
+struct T_conn_con {
+ long PRIM_type; /* always T_CONN_CON */
+ long RES_length; /* responding address length */
+ long RES_offset;
+ long OPT_length;
+ long OPT_offset;
+};
+typedef struct T_conn_con T_conn_con;
+
+struct T_conn_ind {
+ long PRIM_type; /* always T_CONN_IND */
+ long SRC_length;
+ long SRC_offset;
+ long OPT_length;
+ long OPT_offset;
+ long SEQ_number;
+};
+typedef struct T_conn_ind T_conn_ind;
+
+struct T_conn_req {
+ long PRIM_type; /* always T_CONN_REQ */
+ long DEST_length;
+ long DEST_offset;
+ long OPT_length;
+ long OPT_offset;
+};
+typedef struct T_conn_req T_conn_req;
+
+struct T_conn_res {
+ long PRIM_type; /* always T_CONN_RES */
+ queue * QUEUE_ptr;
+ long OPT_length;
+ long OPT_offset;
+ long SEQ_number;
+};
+typedef struct T_conn_res T_conn_res;
+
+struct T_data_ind {
+ long PRIM_type; /* always T_DATA_IND */
+ long MORE_flag;
+};
+typedef struct T_data_ind T_data_ind;
+
+struct T_data_req {
+ long PRIM_type; /* always T_DATA_REQ */
+ long MORE_flag;
+};
+typedef struct T_data_req T_data_req;
+
+struct T_discon_ind {
+ long PRIM_type; /* always T_DISCON_IND */
+ long DISCON_reason;
+ long SEQ_number;
+};
+typedef struct T_discon_ind T_discon_ind;
+
+struct T_discon_req {
+ long PRIM_type; /* always T_DISCON_REQ */
+ long SEQ_number;
+};
+typedef struct T_discon_req T_discon_req;
+
+struct T_exdata_ind {
+ long PRIM_type; /* always T_EXDATA_IND */
+ long MORE_flag;
+};
+typedef struct T_exdata_ind T_exdata_ind;
+
+struct T_exdata_req {
+ long PRIM_type; /* always T_EXDATA_REQ */
+ long MORE_flag;
+};
+typedef struct T_exdata_req T_exdata_req;
+
+struct T_error_ack {
+ long PRIM_type; /* always T_ERROR_ACK */
+ long ERROR_prim; /* primitive in error */
+ long TLI_error;
+ long UNIX_error;
+};
+typedef struct T_error_ack T_error_ack;
+
+struct T_info_ack {
+ long PRIM_type; /* always T_INFO_ACK */
+ long TSDU_size; /* max TSDU size */
+ long ETSDU_size; /* max ETSDU size */
+ long CDATA_size; /* connect data size */
+ long DDATA_size; /* disconnect data size */
+ long ADDR_size; /* TSAP size */
+ long OPT_size; /* options size */
+ long TIDU_size; /* TIDU size */
+ long SERV_type; /* service type */
+ long CURRENT_state; /* current state */
+ long PROVIDER_flag; /* provider flags (see xti.h for defines) */
+};
+typedef struct T_info_ack T_info_ack;
+/* Provider flags */
+enum {
+ SENDZERO = 0x0001, /* supports 0-length TSDU's */
+ XPG4_1 = 0x0002 /* provider supports recent stuff */
+};
+
+
+struct T_info_req {
+ long PRIM_type; /* always T_INFO_REQ */
+};
+typedef struct T_info_req T_info_req;
+
+struct T_ok_ack {
+ long PRIM_type; /* always T_OK_ACK */
+ long CORRECT_prim;
+};
+typedef struct T_ok_ack T_ok_ack;
+
+struct T_optmgmt_ack {
+ long PRIM_type; /* always T_OPTMGMT_ACK */
+ long OPT_length;
+ long OPT_offset;
+ long MGMT_flags;
+};
+typedef struct T_optmgmt_ack T_optmgmt_ack;
+
+struct T_optmgmt_req {
+ long PRIM_type; /* always T_OPTMGMT_REQ */
+ long OPT_length;
+ long OPT_offset;
+ long MGMT_flags;
+};
+typedef struct T_optmgmt_req T_optmgmt_req;
+
+struct T_ordrel_ind {
+ long PRIM_type; /* always T_ORDREL_IND */
+};
+typedef struct T_ordrel_ind T_ordrel_ind;
+
+struct T_ordrel_req {
+ long PRIM_type; /* always T_ORDREL_REQ */
+};
+typedef struct T_ordrel_req T_ordrel_req;
+
+struct T_unbind_req {
+ long PRIM_type; /* always T_UNBIND_REQ */
+};
+typedef struct T_unbind_req T_unbind_req;
+
+struct T_uderror_ind {
+ long PRIM_type; /* always T_UDERROR_IND */
+ long DEST_length;
+ long DEST_offset;
+ long OPT_length;
+ long OPT_offset;
+ long ERROR_type;
+};
+typedef struct T_uderror_ind T_uderror_ind;
+
+struct T_unitdata_ind {
+ long PRIM_type; /* always T_UNITDATA_IND */
+ long SRC_length;
+ long SRC_offset;
+ long OPT_length;
+ long OPT_offset;
+};
+typedef struct T_unitdata_ind T_unitdata_ind;
+
+struct T_unitdata_req {
+ long PRIM_type; /* always T_UNITDATA_REQ */
+ long DEST_length;
+ long DEST_offset;
+ long OPT_length;
+ long OPT_offset;
+};
+typedef struct T_unitdata_req T_unitdata_req;
+
+struct T_resolveaddr_ack {
+ long PRIM_type; /* always T_RESOLVEADDR_ACK */
+ long SEQ_number;
+ long ADDR_length;
+ long ADDR_offset;
+ long ORIG_client;
+ long ORIG_data;
+ long TLI_error;
+ long UNIX_error;
+};
+typedef struct T_resolveaddr_ack T_resolveaddr_ack;
+
+struct T_resolveaddr_req {
+ long PRIM_type; /* always T_RESOLVEADDR_REQ */
+ long SEQ_number;
+ long ADDR_length;
+ long ADDR_offset;
+ long ORIG_client;
+ long ORIG_data;
+ long MAX_milliseconds;
+};
+typedef struct T_resolveaddr_req T_resolveaddr_req;
+
+struct T_unitreply_ind {
+ long PRIM_type; /* Always T_UREPLY_IND */
+ long SEQ_number;
+ long OPT_length;
+ long OPT_offset;
+ long REP_flags;
+ long TLI_error;
+ long UNIX_error;
+};
+typedef struct T_unitreply_ind T_unitreply_ind;
+
+struct T_unitrequest_ind {
+ long PRIM_type; /* Always T_UREQUEST_IND */
+ long SEQ_number;
+ long SRC_length;
+ long SRC_offset;
+ long OPT_length;
+ long OPT_offset;
+ long REQ_flags;
+};
+typedef struct T_unitrequest_ind T_unitrequest_ind;
+
+struct T_unitrequest_req {
+ long PRIM_type; /* Always T_UREQUEST_REQ */
+ long SEQ_number;
+ long DEST_length;
+ long DEST_offset;
+ long OPT_length;
+ long OPT_offset;
+ long REQ_flags;
+};
+typedef struct T_unitrequest_req T_unitrequest_req;
+
+struct T_unitreply_req {
+ long PRIM_type; /* Always T_UREPLY_REQ */
+ long SEQ_number;
+ long OPT_length;
+ long OPT_offset;
+ long REP_flags;
+};
+typedef struct T_unitreply_req T_unitreply_req;
+
+struct T_unitreply_ack {
+ long PRIM_type; /* Always T_UREPLY_ACK */
+ long SEQ_number;
+ long TLI_error;
+ long UNIX_error;
+};
+typedef struct T_unitreply_ack T_unitreply_ack;
+
+struct T_cancelrequest_req {
+ long PRIM_type; /* Always T_CANCELREQUEST_REQ */
+ long SEQ_number;
+};
+typedef struct T_cancelrequest_req T_cancelrequest_req;
+
+struct T_cancelreply_req {
+ long PRIM_type; /* Always T_CANCELREPLY_REQ */
+ long SEQ_number;
+};
+typedef struct T_cancelreply_req T_cancelreply_req;
+
+struct T_reply_ind {
+ long PRIM_type; /* Always T_REPLY_IND */
+ long SEQ_number;
+ long OPT_length;
+ long OPT_offset;
+ long REP_flags;
+ long TLI_error;
+ long UNIX_error;
+};
+typedef struct T_reply_ind T_reply_ind;
+
+struct T_request_ind {
+ long PRIM_type; /* Always T_REQUEST_IND */
+ long SEQ_number;
+ long OPT_length;
+ long OPT_offset;
+ long REQ_flags;
+};
+typedef struct T_request_ind T_request_ind;
+
+struct T_request_req {
+ long PRIM_type; /* Always T_REQUEST_REQ */
+ long SEQ_number;
+ long OPT_length;
+ long OPT_offset;
+ long REQ_flags;
+};
+typedef struct T_request_req T_request_req;
+
+struct T_reply_req {
+ long PRIM_type; /* Always T_REPLY_REQ */
+ long SEQ_number;
+ long OPT_length;
+ long OPT_offset;
+ long REP_flags;
+};
+typedef struct T_reply_req T_reply_req;
+
+struct T_reply_ack {
+ long PRIM_type; /* Always T_REPLY_ACK */
+ long SEQ_number;
+ long TLI_error;
+ long UNIX_error;
+};
+typedef struct T_reply_ack T_reply_ack;
+
+struct T_regname_req {
+ long PRIM_type; /* Always T_REGNAME_REQ */
+ long SEQ_number; /* Reply is sequence ack */
+ long NAME_length;
+ long NAME_offset;
+ long ADDR_length;
+ long ADDR_offset;
+ long REQ_flags;
+};
+typedef struct T_regname_req T_regname_req;
+
+struct T_regname_ack {
+ long PRIM_type; /* always T_REGNAME_ACK */
+ long SEQ_number;
+ long REG_id;
+ long ADDR_length;
+ long ADDR_offset;
+};
+typedef struct T_regname_ack T_regname_ack;
+
+struct T_delname_req {
+ long PRIM_type; /* Always T_DELNAME_REQ */
+ long SEQ_number; /* Reply is sequence ack */
+ long NAME_length;
+ long NAME_offset;
+};
+typedef struct T_delname_req T_delname_req;
+
+struct T_lkupname_req {
+ long PRIM_type; /* Always T_LKUPNAME_REQ */
+ long SEQ_number; /* Reply is sequence ack */
+ long NAME_length; /* ... or T_LKUPNAME_CON */
+ long NAME_offset;
+ long ADDR_length;
+ long ADDR_offset;
+ long MAX_number;
+ long MAX_milliseconds;
+ long REQ_flags;
+};
+typedef struct T_lkupname_req T_lkupname_req;
+
+struct T_lkupname_con {
+ long PRIM_type; /* Either T_LKUPNAME_CON */
+ long SEQ_number; /* Or T_LKUPNAME_RES */
+ long NAME_length;
+ long NAME_offset;
+ long RSP_count;
+ long RSP_cumcount;
+};
+typedef struct T_lkupname_con T_lkupname_con;
+
+struct T_sequence_ack {
+ long PRIM_type; /* always T_SEQUENCED_ACK */
+ long ORIG_prim; /* original primitive */
+ long SEQ_number;
+ long TLI_error;
+ long UNIX_error;
+};
+typedef struct T_sequence_ack T_sequence_ack;
+
+struct T_event_ind {
+ long PRIM_type; /* always T_EVENT_IND */
+ long EVENT_code;
+ long EVENT_cookie;
+};
+typedef struct T_event_ind T_event_ind;
+
+union T_primitives {
+ long type;
+
+ long primType;
+ T_addr_ack taddrack;
+ T_bind_ack tbindack;
+ T_bind_req tbindreq;
+ T_conn_con tconncon;
+ T_conn_ind tconnind;
+ T_conn_req tconnreq;
+ T_conn_res tconnres;
+ T_data_ind tdataind;
+ T_data_req tdatareq;
+ T_discon_ind tdisconind;
+ T_discon_req tdisconreq;
+ T_exdata_ind texdataind;
+ T_exdata_req texdatareq;
+ T_error_ack terrorack;
+ T_info_ack tinfoack;
+ T_info_req tinforeq;
+ T_ok_ack tokack;
+ T_optmgmt_ack toptmgmtack;
+ T_optmgmt_req toptmgmtreq;
+ T_ordrel_ind tordrelind;
+ T_ordrel_req tordrelreq;
+ T_unbind_req tunbindreq;
+ T_uderror_ind tuderrorind;
+ T_unitdata_ind tunitdataind;
+ T_unitdata_req tunitdatareq;
+ T_unitreply_ind tunitreplyind;
+ T_unitrequest_ind tunitrequestind;
+ T_unitrequest_req tunitrequestreq;
+ T_unitreply_req tunitreplyreq;
+ T_unitreply_ack tunitreplyack;
+ T_reply_ind treplyind;
+ T_request_ind trequestind;
+ T_request_req trequestreq;
+ T_reply_req treplyreq;
+ T_reply_ack treplyack;
+ T_cancelrequest_req tcancelreqreq;
+ T_resolveaddr_req tresolvereq;
+ T_resolveaddr_ack tresolveack;
+ T_regname_req tregnamereq;
+ T_regname_ack tregnameack;
+ T_delname_req tdelnamereq;
+ T_lkupname_req tlkupnamereq;
+ T_lkupname_con tlkupnamecon;
+ T_sequence_ack tsequenceack;
+ T_event_ind teventind;
+};
+typedef union T_primitives T_primitives;
+/* ***** From the Mentat "dlpi.h" ******/
+
+/*
+ This header file has encoded the values so an existing driver
+ or user which was written with the Logical Link Interface(LLI)
+ can migrate to the DLPI interface in a binary compatible manner.
+ Any fields which require a specific format or value are flagged
+ with a comment containing the message LLI compatibility.
+*/
+
+/* DLPI revision definition history*/
+
+enum {
+ DL_CURRENT_VERSION = 0x02, /* current version of dlpi */
+ DL_VERSION_2 = 0x02 /* version of dlpi March 12,1991 */
+};
+
+
+enum {
+ DL_INFO_REQ = 0x00, /* Information Req, LLI compatibility */
+ DL_INFO_ACK = 0x03, /* Information Ack, LLI compatibility */
+ DL_ATTACH_REQ = 0x0B, /* Attach a PPA */
+ DL_DETACH_REQ = 0x0C, /* Detach a PPA */
+ DL_BIND_REQ = 0x01, /* Bind dlsap address, LLI compatibility */
+ DL_BIND_ACK = 0x04, /* Dlsap address bound, LLI compatibility */
+ DL_UNBIND_REQ = 0x02, /* Unbind dlsap address, LLI compatibility */
+ DL_OK_ACK = 0x06, /* Success acknowledgment, LLI compatibility */
+ DL_ERROR_ACK = 0x05, /* Error acknowledgment, LLI compatibility */
+ DL_SUBS_BIND_REQ = 0x1B, /* Bind Subsequent DLSAP address */
+ DL_SUBS_BIND_ACK = 0x1C, /* Subsequent DLSAP address bound */
+ DL_SUBS_UNBIND_REQ = 0x15, /* Subsequent unbind */
+ DL_ENABMULTI_REQ = 0x1D, /* Enable multicast addresses */
+ DL_DISABMULTI_REQ = 0x1E, /* Disable multicast addresses */
+ DL_PROMISCON_REQ = 0x1F, /* Turn on promiscuous mode */
+ DL_PROMISCOFF_REQ = 0x20, /* Turn off promiscuous mode */
+ DL_UNITDATA_REQ = 0x07, /* datagram send request, LLI compatibility */
+ DL_UNITDATA_IND = 0x08, /* datagram receive indication, LLI compatibility */
+ DL_UDERROR_IND = 0x09, /* datagram error indication, LLI compatibility */
+ DL_UDQOS_REQ = 0x0A, /* set QOS for subsequent datagram transmissions */
+ DL_CONNECT_REQ = 0x0D, /* Connect request */
+ DL_CONNECT_IND = 0x0E, /* Incoming connect indication */
+ DL_CONNECT_RES = 0x0F, /* Accept previous connect indication */
+ DL_CONNECT_CON = 0x10, /* Connection established */
+ DL_TOKEN_REQ = 0x11, /* Passoff token request */
+ DL_TOKEN_ACK = 0x12, /* Passoff token ack */
+ DL_DISCONNECT_REQ = 0x13, /* Disconnect request */
+ DL_DISCONNECT_IND = 0x14, /* Disconnect indication */
+ DL_RESET_REQ = 0x17, /* Reset service request */
+ DL_RESET_IND = 0x18, /* Incoming reset indication */
+ DL_RESET_RES = 0x19, /* Complete reset processing */
+ DL_RESET_CON = 0x1A, /* Reset processing complete */
+ DL_DATA_ACK_REQ = 0x21, /* data unit transmission request */
+ DL_DATA_ACK_IND = 0x22, /* Arrival of a command PDU */
+ DL_DATA_ACK_STATUS_IND = 0x23, /* Status indication of DATA_ACK_REQ*/
+ DL_REPLY_REQ = 0x24, /* Request a DLSDU from the remote */
+ DL_REPLY_IND = 0x25, /* Arrival of a command PDU */
+ DL_REPLY_STATUS_IND = 0x26, /* Status indication of REPLY_REQ */
+ DL_REPLY_UPDATE_REQ = 0x27, /* Hold a DLSDU for transmission */
+ DL_REPLY_UPDATE_STATUS_IND = 0x28, /* Status of REPLY_UPDATE req */
+ DL_XID_REQ = 0x29, /* Request to send an XID PDU */
+ DL_XID_IND = 0x2A, /* Arrival of an XID PDU */
+ DL_XID_RES = 0x2B, /* request to send a response XID PDU*/
+ DL_XID_CON = 0x2C, /* Arrival of a response XID PDU */
+ DL_TEST_REQ = 0x2D, /* TEST command request */
+ DL_TEST_IND = 0x2E, /* TEST response indication */
+ DL_TEST_RES = 0x2F, /* TEST response */
+ DL_TEST_CON = 0x30, /* TEST Confirmation */
+ DL_PHYS_ADDR_REQ = 0x31, /* Request to get physical addr */
+ DL_PHYS_ADDR_ACK = 0x32, /* Return physical addr */
+ DL_SET_PHYS_ADDR_REQ = 0x33, /* set physical addr */
+ DL_GET_STATISTICS_REQ = 0x34, /* Request to get statistics */
+ DL_GET_STATISTICS_ACK = 0x35 /* Return statistics */
+};
+
+/* DLPI interface states*/
+enum {
+ DL_UNATTACHED = 0x04, /* PPA not attached */
+ DL_ATTACH_PENDING = 0x05, /* Waiting ack of DL_ATTACH_REQ */
+ DL_DETACH_PENDING = 0x06, /* Waiting ack of DL_DETACH_REQ */
+ DL_UNBOUND = 0x00, /* PPA attached, LLI compatibility */
+ DL_BIND_PENDING = 0x01, /* Waiting ack of DL_BIND_REQ, LLI compatibility */
+ DL_UNBIND_PENDING = 0x02, /* Waiting ack of DL_UNBIND_REQ, LLI compatibility */
+ DL_IDLE = 0x03, /* dlsap bound, awaiting use, LLI compatibility */
+ DL_UDQOS_PENDING = 0x07, /* Waiting ack of DL_UDQOS_REQ */
+ DL_OUTCON_PENDING = 0x08, /* outgoing connection, awaiting DL_CONN_CON */
+ DL_INCON_PENDING = 0x09, /* incoming connection, awaiting DL_CONN_RES */
+ DL_CONN_RES_PENDING = 0x0A, /* Waiting ack of DL_CONNECT_RES */
+ DL_DATAXFER = 0x0B, /* connection-oriented data transfer */
+ DL_USER_RESET_PENDING = 0x0C, /* user initiated reset, awaiting DL_RESET_CON */
+ DL_PROV_RESET_PENDING = 0x0D, /* provider initiated reset, awaiting DL_RESET_RES */
+ DL_RESET_RES_PENDING = 0x0E, /* Waiting ack of DL_RESET_RES */
+ DL_DISCON8_PENDING = 0x0F, /* Waiting ack of DL_DISC_REQ when in DL_OUTCON_PENDING */
+ DL_DISCON9_PENDING = 0x10, /* Waiting ack of DL_DISC_REQ when in DL_INCON_PENDING */
+ DL_DISCON11_PENDING = 0x11, /* Waiting ack of DL_DISC_REQ when in DL_DATAXFER */
+ DL_DISCON12_PENDING = 0x12, /* Waiting ack of DL_DISC_REQ when in DL_USER_RESET_PENDING */
+ DL_DISCON13_PENDING = 0x13, /* Waiting ack of DL_DISC_REQ when in DL_DL_PROV_RESET_PENDING */
+ DL_SUBS_BIND_PND = 0x14, /* Waiting ack of DL_SUBS_BIND_REQ */
+ DL_SUBS_UNBIND_PND = 0x15 /* Waiting ack of DL_SUBS_UNBIND_REQ */
+};
+
+/* DL_ERROR_ACK error return values*/
+
+enum {
+ DL_ACCESS = 0x02, /* Improper permissions for request, LLI compatibility */
+ DL_BADADDR = 0x01, /* DLSAP address in improper format or invalid */
+ DL_BADCORR = 0x05, /* Sequence number not from outstanding DL_CONN_IND */
+ DL_BADDATA = 0x06, /* User data exceeded provider limit */
+ DL_BADPPA = 0x08, /* Specified PPA was invalid */
+ DL_BADPRIM = 0x09, /* Primitive received is not known by DLS provider */
+ DL_BADQOSPARAM = 0x0A, /* QOS parameters contained invalid values */
+ DL_BADQOSTYPE = 0x0B, /* QOS structure type is unknown or unsupported */
+ DL_BADSAP = 0x00, /* Bad LSAP selector, LLI compatibility */
+ DL_BADTOKEN = 0x0C, /* Token used not associated with an active stream */
+ DL_BOUND = 0x0D, /* Attempted second bind with dl_max_conind or */
+ /* dl_conn_mgmt > 0 on same DLSAP or PPA */
+ DL_INITFAILED = 0x0E, /* Physical Link initialization failed */
+ DL_NOADDR = 0x0F, /* Provider couldn't allocate alternate address */
+ DL_NOTINIT = 0x10, /* Physical Link not initialized */
+ DL_OUTSTATE = 0x03, /* Primitive issued in improper state, LLI compatibility */
+ DL_SYSERR = 0x04, /* UNIX system error occurred, LLI compatibility */
+ DL_UNSUPPORTED = 0x07, /* Requested service not supplied by provider */
+ DL_UNDELIVERABLE = 0x11, /* Previous data unit could not be delivered */
+ DL_NOTSUPPORTED = 0x12, /* Primitive is known but not supported by DLS provider */
+ DL_TOOMANY = 0x13, /* limit exceeded */
+ DL_NOTENAB = 0x14, /* Promiscuous mode not enabled */
+ DL_BUSY = 0x15, /* Other streams for a particular PPA in the post-attached state */
+ DL_NOAUTO = 0x16, /* Automatic handling of XID & TEST responses not supported */
+ DL_NOXIDAUTO = 0x17, /* Automatic handling of XID not supported */
+ DL_NOTESTAUTO = 0x18, /* Automatic handling of TEST not supported */
+ DL_XIDAUTO = 0x19, /* Automatic handling of XID response */
+ DL_TESTAUTO = 0x1A, /* AUtomatic handling of TEST response*/
+ DL_PENDING = 0x1B /* pending outstanding connect indications */
+};
+
+/* DLPI media types supported*/
+
+enum {
+ DL_CSMACD = 0x00, /* IEEE 802.3 CSMA/CD network, LLI Compatibility */
+ DL_TPB = 0x01, /* IEEE 802.4 Token Passing Bus, LLI Compatibility */
+ DL_TPR = 0x02, /* IEEE 802.5 Token Passing Ring, LLI Compatibility */
+ DL_METRO = 0x03, /* IEEE 802.6 Metro Net, LLI Compatibility */
+ DL_ETHER = 0x04, /* Ethernet Bus, LLI Compatibility */
+ DL_HDLC = 0x05, /* ISO HDLC protocol support, bit synchronous */
+ DL_CHAR = 0x06, /* Character Synchronous protocol support, eg BISYNC */
+ DL_CTCA = 0x07, /* IBM Channel-to-Channel Adapter */
+ DL_FDDI = 0x08, /* Fiber Distributed data interface */
+ DL_OTHER = 0x09 /* Any other medium not listed above */
+};
+
+/*
+ DLPI provider service supported.
+ These must be allowed to be bitwise-OR for dl_service_mode in
+ DL_INFO_ACK.
+*/
+enum {
+ DL_CODLS = 0x01, /* support connection-oriented service */
+ DL_CLDLS = 0x02, /* support connectionless data link service */
+ DL_ACLDLS = 0x04 /* support acknowledged connectionless service*/
+};
+
+/*
+ DLPI provider style.
+ The DLPI provider style which determines whether a provider
+ requires a DL_ATTACH_REQ to inform the provider which PPA
+ user messages should be sent/received on.
+*/
+
+enum {
+ DL_STYLE1 = 0x0500, /* PPA is implicitly bound by open(2) */
+ DL_STYLE2 = 0x0501 /* PPA must be explicitly bound via DL_ATTACH_REQ */
+};
+
+/* DLPI Originator for Disconnect and Resets*/
+
+enum {
+ DL_PROVIDER = 0x0700,
+ DL_USER = 0x0701
+};
+
+/* DLPI Disconnect Reasons*/
+
+enum {
+ DL_CONREJ_DEST_UNKNOWN = 0x0800,
+ DL_CONREJ_DEST_UNREACH_PERMANENT = 0x0801,
+ DL_CONREJ_DEST_UNREACH_TRANSIENT = 0x0802,
+ DL_CONREJ_QOS_UNAVAIL_PERMANENT = 0x0803,
+ DL_CONREJ_QOS_UNAVAIL_TRANSIENT = 0x0804,
+ DL_CONREJ_PERMANENT_COND = 0x0805,
+ DL_CONREJ_TRANSIENT_COND = 0x0806,
+ DL_DISC_ABNORMAL_CONDITION = 0x0807,
+ DL_DISC_NORMAL_CONDITION = 0x0808,
+ DL_DISC_PERMANENT_CONDITION = 0x0809,
+ DL_DISC_TRANSIENT_CONDITION = 0x080A,
+ DL_DISC_UNSPECIFIED = 0x080B
+};
+
+/* DLPI Reset Reasons*/
+
+enum {
+ DL_RESET_FLOW_CONTROL = 0x0900,
+ DL_RESET_LINK_ERROR = 0x0901,
+ DL_RESET_RESYNCH = 0x0902
+};
+
+/* DLPI status values for acknowledged connectionless data transfer*/
+
+enum {
+ DL_CMD_MASK = 0x0F, /* mask for command portion of status */
+ DL_CMD_OK = 0x00, /* Command Accepted */
+ DL_CMD_RS = 0x01, /* Unimplemented or inactivated service */
+ DL_CMD_UE = 0x05, /* Data Link User interface error */
+ DL_CMD_PE = 0x06, /* Protocol error */
+ DL_CMD_IP = 0x07, /* Permanent implementation dependent error*/
+ DL_CMD_UN = 0x09, /* Resources temporarily unavailable */
+ DL_CMD_IT = 0x0F, /* Temporary implementation dependent error */
+ DL_RSP_MASK = 0xF0, /* mask for response portion of status */
+ DL_RSP_OK = 0x00, /* Response DLSDU present */
+ DL_RSP_RS = 0x10, /* Unimplemented or inactivated service */
+ DL_RSP_NE = 0x30, /* Response DLSDU never submitted */
+ DL_RSP_NR = 0x40, /* Response DLSDU not requested */
+ DL_RSP_UE = 0x50, /* Data Link User interface error */
+ DL_RSP_IP = 0x70, /* Permanent implementation dependent error */
+ DL_RSP_UN = 0x90, /* Resources temporarily unavailable */
+ DL_RSP_IT = 0xF0 /* Temporary implementation dependent error */
+};
+
+/* Service Class values for acknowledged connectionless data transfer*/
+
+enum {
+ DL_RQST_RSP = 0x01, /* Use acknowledge capability in MAC sublayer*/
+ DL_RQST_NORSP = 0x02 /* No acknowledgement service requested */
+};
+
+/* DLPI address type definition*/
+
+enum {
+ DL_FACT_PHYS_ADDR = 0x01, /* factory physical address */
+ DL_CURR_PHYS_ADDR = 0x02 /* current physical address */
+};
+
+/* DLPI flag definitions*/
+
+enum {
+ DL_POLL_FINAL = 0x01 /* if set,indicates poll/final bit set*/
+};
+
+/* XID and TEST responses supported by the provider*/
+
+enum {
+ DL_AUTO_XID = 0x01, /* provider will respond to XID */
+ DL_AUTO_TEST = 0x02 /* provider will respond to TEST */
+};
+
+/* Subsequent bind type*/
+
+enum {
+ DL_PEER_BIND = 0x01, /* subsequent bind on a peer addr */
+ DL_HIERARCHICAL_BIND = 0x02 /* subs_bind on a hierarchical addr*/
+};
+
+/* DLPI promiscuous mode definitions*/
+
+enum {
+ DL_PROMISC_PHYS = 0x01, /* promiscuous mode at phys level */
+ DL_PROMISC_SAP = 0x02, /* promiscous mode at sap level */
+ DL_PROMISC_MULTI = 0x03 /* promiscuous mode for multicast */
+};
+
+/*
+ DLPI Quality Of Service definition for use in QOS structure definitions.
+ The QOS structures are used in connection establishment, DL_INFO_ACK,
+ and setting connectionless QOS values.
+*/
+
+/*
+ Throughput
+
+ This parameter is specified for both directions.
+*/
+
+
+struct dl_through_t {
+ SInt32 dl_target_value; /* desired bits/second desired */
+ SInt32 dl_accept_value; /* min. acceptable bits/second */
+};
+typedef struct dl_through_t dl_through_t;
+/*
+ transit delay specification
+
+ This parameter is specified for both directions.
+ expressed in milliseconds assuming a DLSDU size of 128 octets.
+ The scaling of the value to the current DLSDU size is provider dependent.
+*/
+
+struct dl_transdelay_t {
+ SInt32 dl_target_value; /* desired value of service */
+ SInt32 dl_accept_value; /* min. acceptable value of service */
+};
+typedef struct dl_transdelay_t dl_transdelay_t;
+/*
+ priority specification
+ priority range is 0-100, with 0 being highest value.
+*/
+
+
+struct dl_priority_t {
+ SInt32 dl_min;
+ SInt32 dl_max;
+};
+typedef struct dl_priority_t dl_priority_t;
+/* protection specification*/
+enum {
+ DL_NONE = 0x0B01, /* no protection supplied */
+ DL_MONITOR = 0x0B02, /* protection against passive monitoring */
+ DL_MAXIMUM = 0x0B03 /* protection against modification, replay, addition, or deletion */
+};
+
+
+struct dl_protect_t {
+ SInt32 dl_min;
+ SInt32 dl_max;
+};
+typedef struct dl_protect_t dl_protect_t;
+/*
+ Resilience specification
+ probabilities are scaled by a factor of 10,000 with a time interval
+ of 10,000 seconds.
+*/
+
+struct dl_resilience_t {
+ SInt32 dl_disc_prob; /* probability of provider init DISC */
+ SInt32 dl_reset_prob; /* probability of provider init RESET */
+};
+typedef struct dl_resilience_t dl_resilience_t;
+/*
+ QOS type definition to be used for negotiation with the
+ remote end of a connection, or a connectionless unitdata request.
+ There are two type definitions to handle the negotiation
+ process at connection establishment. The typedef dl_qos_range_t
+ is used to present a range for parameters. This is used
+ in the DL_CONNECT_REQ and DL_CONNECT_IND messages. The typedef
+ dl_qos_sel_t is used to select a specific value for the QOS
+ parameters. This is used in the DL_CONNECT_RES, DL_CONNECT_CON,
+ and DL_INFO_ACK messages to define the selected QOS parameters
+ for a connection.
+
+ NOTE
+ A DataLink provider which has unknown values for any of the fields
+ will use a value of DL_UNKNOWN for all values in the fields.
+
+ NOTE
+ A QOS parameter value of DL_QOS_DONT_CARE informs the DLS
+ provider the user requesting this value doesn't care
+ what the QOS parameter is set to. This value becomes the
+ least possible value in the range of QOS parameters.
+ The order of the QOS parameter range is then:
+
+ DL_QOS_DONT_CARE < 0 < MAXIMUM QOS VALUE
+*/
+enum {
+ DL_UNKNOWN = -1,
+ DL_QOS_DONT_CARE = -2
+};
+
+/*
+ Every QOS structure has the first 4 bytes containing a type
+ field, denoting the definition of the rest of the structure.
+ This is used in the same manner has the dl_primitive variable
+ is in messages.
+
+ The following list is the defined QOS structure type values and structures.
+*/
+enum {
+ DL_QOS_CO_RANGE1 = 0x0101, /* QOS range struct. for Connection modeservice */
+ DL_QOS_CO_SEL1 = 0x0102, /* QOS selection structure */
+ DL_QOS_CL_RANGE1 = 0x0103, /* QOS range struct. for connectionless*/
+ DL_QOS_CL_SEL1 = 0x0104 /* QOS selection for connectionless mode*/
+};
+
+
+struct dl_qos_co_range1_t {
+ UInt32 dl_qos_type;
+ dl_through_t dl_rcv_throughput; /* desired and acceptable*/
+ dl_transdelay_t dl_rcv_trans_delay; /* desired and acceptable*/
+ dl_through_t dl_xmt_throughput;
+ dl_transdelay_t dl_xmt_trans_delay;
+ dl_priority_t dl_priority; /* min and max values */
+ dl_protect_t dl_protection; /* min and max values */
+ SInt32 dl_residual_error;
+ dl_resilience_t dl_resilience;
+};
+typedef struct dl_qos_co_range1_t dl_qos_co_range1_t;
+
+struct dl_qos_co_sel1_t {
+ UInt32 dl_qos_type;
+ SInt32 dl_rcv_throughput;
+ SInt32 dl_rcv_trans_delay;
+ SInt32 dl_xmt_throughput;
+ SInt32 dl_xmt_trans_delay;
+ SInt32 dl_priority;
+ SInt32 dl_protection;
+ SInt32 dl_residual_error;
+ dl_resilience_t dl_resilience;
+};
+typedef struct dl_qos_co_sel1_t dl_qos_co_sel1_t;
+
+struct dl_qos_cl_range1_t {
+ UInt32 dl_qos_type;
+ dl_transdelay_t dl_trans_delay;
+ dl_priority_t dl_priority;
+ dl_protect_t dl_protection;
+ SInt32 dl_residual_error;
+};
+typedef struct dl_qos_cl_range1_t dl_qos_cl_range1_t;
+
+struct dl_qos_cl_sel1_t {
+ UInt32 dl_qos_type;
+ SInt32 dl_trans_delay;
+ SInt32 dl_priority;
+ SInt32 dl_protection;
+ SInt32 dl_residual_error;
+};
+typedef struct dl_qos_cl_sel1_t dl_qos_cl_sel1_t;
+/*
+ DLPI interface primitive definitions.
+
+ Each primitive is sent as a stream message. It is possible that
+ the messages may be viewed as a sequence of bytes that have the
+ following form without any padding. The structure definition
+ of the following messages may have to change depending on the
+ underlying hardware architecture and crossing of a hardware
+ boundary with a different hardware architecture.
+
+ Fields in the primitives having a name of the form
+ dl_reserved cannot be used and have the value of
+ binary zero, no bits turned on.
+
+ Each message has the name defined followed by the
+ stream message type (M_PROTO, M_PCPROTO, M_DATA)
+ */
+/* LOCAL MANAGEMENT SERVICE PRIMITIVES*/
+
+/* DL_INFO_REQ, M_PCPROTO type*/
+
+
+struct dl_info_req_t {
+ UInt32 dl_primitive; /* set to DL_INFO_REQ */
+};
+typedef struct dl_info_req_t dl_info_req_t;
+/* DL_INFO_ACK, M_PCPROTO type*/
+
+struct dl_info_ack_t {
+ UInt32 dl_primitive; /* set to DL_INFO_ACK */
+ UInt32 dl_max_sdu; /* Max bytes in a DLSDU */
+ UInt32 dl_min_sdu; /* Min bytes in a DLSDU */
+ UInt32 dl_addr_length; /* length of DLSAP address */
+ UInt32 dl_mac_type; /* type of medium supported*/
+ UInt32 dl_reserved; /* value set to zero */
+ UInt32 dl_current_state; /* state of DLPI interface */
+ SInt32 dl_sap_length; /* current length of SAP part of dlsap address */
+ UInt32 dl_service_mode; /* CO, CL or ACL */
+ UInt32 dl_qos_length; /* length of qos values */
+ UInt32 dl_qos_offset; /* offset from beg. of block*/
+ UInt32 dl_qos_range_length; /* available range of qos */
+ UInt32 dl_qos_range_offset; /* offset from beg. of block*/
+ UInt32 dl_provider_style; /* style1 or style2 */
+ UInt32 dl_addr_offset; /* offset of the dlsap addr */
+ UInt32 dl_version; /* version number */
+ UInt32 dl_brdcst_addr_length; /* length of broadcast addr */
+ UInt32 dl_brdcst_addr_offset; /* offset from beg. of block*/
+ UInt32 dl_growth; /* set to zero */
+};
+typedef struct dl_info_ack_t dl_info_ack_t;
+/* DL_ATTACH_REQ, M_PROTO type*/
+
+struct dl_attach_req_t {
+ UInt32 dl_primitive; /* set to DL_ATTACH_REQ*/
+ UInt32 dl_ppa; /* id of the PPA */
+};
+typedef struct dl_attach_req_t dl_attach_req_t;
+/* DL_DETACH_REQ, M_PROTO type*/
+
+struct dl_detach_req_t {
+ UInt32 dl_primitive; /* set to DL_DETACH_REQ */
+};
+typedef struct dl_detach_req_t dl_detach_req_t;
+/* DL_BIND_REQ, M_PROTO type*/
+
+struct dl_bind_req_t {
+ UInt32 dl_primitive; /* set to DL_BIND_REQ */
+ UInt32 dl_sap; /* info to identify dlsap addr*/
+ UInt32 dl_max_conind; /* max # of outstanding con_ind*/
+ UInt16 dl_service_mode; /* CO, CL or ACL */
+ UInt16 dl_conn_mgmt; /* if non-zero, is con-mgmt stream*/
+ UInt32 dl_xidtest_flg; /* if set to 1 indicates automatic initiation of test and xid frames */
+};
+typedef struct dl_bind_req_t dl_bind_req_t;
+/* DL_BIND_ACK, M_PCPROTO type*/
+
+struct dl_bind_ack_t {
+ UInt32 dl_primitive; /* DL_BIND_ACK */
+ UInt32 dl_sap; /* DLSAP addr info */
+ UInt32 dl_addr_length; /* length of complete DLSAP addr */
+ UInt32 dl_addr_offset; /* offset from beginning of M_PCPROTO*/
+ UInt32 dl_max_conind; /* allowed max. # of con-ind */
+ UInt32 dl_xidtest_flg; /* responses supported by provider*/
+};
+typedef struct dl_bind_ack_t dl_bind_ack_t;
+/* DL_SUBS_BIND_REQ, M_PROTO type*/
+
+struct dl_subs_bind_req_t {
+ UInt32 dl_primitive; /* DL_SUBS_BIND_REQ */
+ UInt32 dl_subs_sap_offset; /* offset of subs_sap */
+ UInt32 dl_subs_sap_length; /* length of subs_sap */
+ UInt32 dl_subs_bind_class; /* peer or hierarchical */
+};
+typedef struct dl_subs_bind_req_t dl_subs_bind_req_t;
+/* DL_SUBS_BIND_ACK, M_PCPROTO type*/
+
+struct dl_subs_bind_ack_t {
+ UInt32 dl_primitive; /* DL_SUBS_BIND_ACK */
+ UInt32 dl_subs_sap_offset; /* offset of subs_sap */
+ UInt32 dl_subs_sap_length; /* length of subs_sap */
+};
+typedef struct dl_subs_bind_ack_t dl_subs_bind_ack_t;
+/* DL_UNBIND_REQ, M_PROTO type*/
+
+struct dl_unbind_req_t {
+ UInt32 dl_primitive; /* DL_UNBIND_REQ */
+};
+typedef struct dl_unbind_req_t dl_unbind_req_t;
+/* DL_SUBS_UNBIND_REQ, M_PROTO type*/
+
+struct dl_subs_unbind_req_t {
+ UInt32 dl_primitive; /* DL_SUBS_UNBIND_REQ */
+ UInt32 dl_subs_sap_offset; /* offset of subs_sap */
+ UInt32 dl_subs_sap_length; /* length of subs_sap */
+};
+typedef struct dl_subs_unbind_req_t dl_subs_unbind_req_t;
+/* DL_OK_ACK, M_PCPROTO type*/
+
+struct dl_ok_ack_t {
+ UInt32 dl_primitive; /* DL_OK_ACK */
+ UInt32 dl_correct_primitive; /* primitive being acknowledged */
+};
+typedef struct dl_ok_ack_t dl_ok_ack_t;
+/* DL_ERROR_ACK, M_PCPROTO type*/
+
+struct dl_error_ack_t {
+ UInt32 dl_primitive; /* DL_ERROR_ACK */
+ UInt32 dl_error_primitive; /* primitive in error */
+ UInt32 dl_errno; /* DLPI error code */
+ UInt32 dl_unix_errno; /* UNIX system error code */
+};
+typedef struct dl_error_ack_t dl_error_ack_t;
+/* DL_ENABMULTI_REQ, M_PROTO type*/
+
+struct dl_enabmulti_req_t {
+ UInt32 dl_primitive; /* DL_ENABMULTI_REQ */
+ UInt32 dl_addr_length; /* length of multicast address */
+ UInt32 dl_addr_offset; /* offset from beg. of M_PROTO block*/
+};
+typedef struct dl_enabmulti_req_t dl_enabmulti_req_t;
+/* DL_DISABMULTI_REQ, M_PROTO type*/
+
+struct dl_disabmulti_req_t {
+ UInt32 dl_primitive; /* DL_DISABMULTI_REQ */
+ UInt32 dl_addr_length; /* length of multicast address */
+ UInt32 dl_addr_offset; /* offset from beg. of M_PROTO block*/
+};
+typedef struct dl_disabmulti_req_t dl_disabmulti_req_t;
+/* DL_PROMISCON_REQ, M_PROTO type*/
+
+struct dl_promiscon_req_t {
+ UInt32 dl_primitive; /* DL_PROMISCON_REQ */
+ UInt32 dl_level; /* physical,SAP level or ALL multicast*/
+};
+typedef struct dl_promiscon_req_t dl_promiscon_req_t;
+/* DL_PROMISCOFF_REQ, M_PROTO type*/
+
+struct dl_promiscoff_req_t {
+ UInt32 dl_primitive; /* DL_PROMISCOFF_REQ */
+ UInt32 dl_level; /* Physical,SAP level or ALL multicast*/
+};
+typedef struct dl_promiscoff_req_t dl_promiscoff_req_t;
+/* Primitives to get and set the Physical address*/
+/* DL_PHYS_ADDR_REQ, M_PROTO type*/
+
+
+struct dl_phys_addr_req_t {
+ UInt32 dl_primitive; /* DL_PHYS_ADDR_REQ */
+ UInt32 dl_addr_type; /* factory or current physical addr */
+};
+typedef struct dl_phys_addr_req_t dl_phys_addr_req_t;
+/* DL_PHYS_ADDR_ACK, M_PCPROTO type*/
+
+struct dl_phys_addr_ack_t {
+ UInt32 dl_primitive; /* DL_PHYS_ADDR_ACK */
+ UInt32 dl_addr_length; /* length of the physical addr */
+ UInt32 dl_addr_offset; /* offset from beg. of block */
+};
+typedef struct dl_phys_addr_ack_t dl_phys_addr_ack_t;
+/* DL_SET_PHYS_ADDR_REQ, M_PROTO type*/
+
+struct dl_set_phys_addr_req_t {
+ UInt32 dl_primitive; /* DL_SET_PHYS_ADDR_REQ */
+ UInt32 dl_addr_length; /* length of physical addr */
+ UInt32 dl_addr_offset; /* offset from beg. of block */
+};
+typedef struct dl_set_phys_addr_req_t dl_set_phys_addr_req_t;
+/* Primitives to get statistics*/
+/* DL_GET_STATISTICS_REQ, M_PROTO type*/
+
+
+struct dl_get_statistics_req_t {
+ UInt32 dl_primitive; /* DL_GET_STATISTICS_REQ */
+};
+typedef struct dl_get_statistics_req_t dl_get_statistics_req_t;
+/* DL_GET_STATISTICS_ACK, M_PCPROTO type*/
+
+struct dl_get_statistics_ack_t {
+ UInt32 dl_primitive; /* DL_GET_STATISTICS_ACK */
+ UInt32 dl_stat_length; /* length of statistics structure*/
+ UInt32 dl_stat_offset; /* offset from beg. of block */
+};
+typedef struct dl_get_statistics_ack_t dl_get_statistics_ack_t;
+/* CONNECTION-ORIENTED SERVICE PRIMITIVES*/
+
+/* DL_CONNECT_REQ, M_PROTO type*/
+
+
+struct dl_connect_req_t {
+ UInt32 dl_primitive; /* DL_CONNECT_REQ */
+ UInt32 dl_dest_addr_length; /* len. of dlsap addr*/
+ UInt32 dl_dest_addr_offset; /* offset */
+ UInt32 dl_qos_length; /* len. of QOS parm val*/
+ UInt32 dl_qos_offset; /* offset */
+ UInt32 dl_growth; /* set to zero */
+};
+typedef struct dl_connect_req_t dl_connect_req_t;
+/* DL_CONNECT_IND, M_PROTO type*/
+
+struct dl_connect_ind_t {
+ UInt32 dl_primitive; /* DL_CONNECT_IND */
+ UInt32 dl_correlation; /* provider's correlation token*/
+ UInt32 dl_called_addr_length; /* length of called address */
+ UInt32 dl_called_addr_offset; /* offset from beginning of block */
+ UInt32 dl_calling_addr_length; /* length of calling address */
+ UInt32 dl_calling_addr_offset; /* offset from beginning of block */
+ UInt32 dl_qos_length; /* length of qos structure */
+ UInt32 dl_qos_offset; /* offset from beginning of block */
+ UInt32 dl_growth; /* set to zero */
+};
+typedef struct dl_connect_ind_t dl_connect_ind_t;
+/* DL_CONNECT_RES, M_PROTO type*/
+
+struct dl_connect_res_t {
+ UInt32 dl_primitive; /* DL_CONNECT_RES */
+ UInt32 dl_correlation; /* provider's correlation token */
+ UInt32 dl_resp_token; /* token associated with responding stream */
+ UInt32 dl_qos_length; /* length of qos structure */
+ UInt32 dl_qos_offset; /* offset from beginning of block */
+ UInt32 dl_growth; /* set to zero */
+};
+typedef struct dl_connect_res_t dl_connect_res_t;
+/* DL_CONNECT_CON, M_PROTO type*/
+
+struct dl_connect_con_t {
+ UInt32 dl_primitive; /* DL_CONNECT_CON*/
+ UInt32 dl_resp_addr_length; /* length of responder's address */
+ UInt32 dl_resp_addr_offset; /* offset from beginning of block*/
+ UInt32 dl_qos_length; /* length of qos structure */
+ UInt32 dl_qos_offset; /* offset from beginning of block*/
+ UInt32 dl_growth; /* set to zero */
+};
+typedef struct dl_connect_con_t dl_connect_con_t;
+/* DL_TOKEN_REQ, M_PCPROTO type*/
+
+struct dl_token_req_t {
+ UInt32 dl_primitive; /* DL_TOKEN_REQ */
+};
+typedef struct dl_token_req_t dl_token_req_t;
+/* DL_TOKEN_ACK, M_PCPROTO type*/
+
+struct dl_token_ack_t {
+ UInt32 dl_primitive; /* DL_TOKEN_ACK */
+ UInt32 dl_token; /* Connection response token associated with the stream */
+};
+typedef struct dl_token_ack_t dl_token_ack_t;
+/* DL_DISCONNECT_REQ, M_PROTO type*/
+
+struct dl_disconnect_req_t {
+ UInt32 dl_primitive; /* DL_DISCONNECT_REQ */
+ UInt32 dl_reason; /*normal, abnormal, perm. or transient*/
+ UInt32 dl_correlation; /* association with connect_ind */
+};
+typedef struct dl_disconnect_req_t dl_disconnect_req_t;
+/* DL_DISCONNECT_IND, M_PROTO type*/
+
+struct dl_disconnect_ind_t {
+ UInt32 dl_primitive; /* DL_DISCONNECT_IND */
+ UInt32 dl_originator; /* USER or PROVIDER */
+ UInt32 dl_reason; /* permanent or transient */
+ UInt32 dl_correlation; /* association with connect_ind */
+};
+typedef struct dl_disconnect_ind_t dl_disconnect_ind_t;
+/* DL_RESET_REQ, M_PROTO type*/
+
+struct dl_reset_req_t {
+ UInt32 dl_primitive; /* DL_RESET_REQ */
+};
+typedef struct dl_reset_req_t dl_reset_req_t;
+/* DL_RESET_IND, M_PROTO type*/
+
+struct dl_reset_ind_t {
+ UInt32 dl_primitive; /* DL_RESET_IND */
+ UInt32 dl_originator; /* Provider or User */
+ UInt32 dl_reason; /* flow control, link error or resynch*/
+};
+typedef struct dl_reset_ind_t dl_reset_ind_t;
+/* DL_RESET_RES, M_PROTO type*/
+
+struct dl_reset_res_t {
+ UInt32 dl_primitive; /* DL_RESET_RES */
+};
+typedef struct dl_reset_res_t dl_reset_res_t;
+/* DL_RESET_CON, M_PROTO type*/
+
+struct dl_reset_con_t {
+ UInt32 dl_primitive; /* DL_RESET_CON */
+};
+typedef struct dl_reset_con_t dl_reset_con_t;
+/* CONNECTIONLESS SERVICE PRIMITIVES*/
+/* DL_UNITDATA_REQ, M_PROTO type, with M_DATA block(s)*/
+
+
+struct dl_unitdata_req_t {
+ UInt32 dl_primitive; /* DL_UNITDATA_REQ */
+ UInt32 dl_dest_addr_length; /* DLSAP length of dest. user */
+ UInt32 dl_dest_addr_offset; /* offset from beg. of block */
+ dl_priority_t dl_priority; /* priority value */
+};
+typedef struct dl_unitdata_req_t dl_unitdata_req_t;
+/* DL_UNITDATA_IND, M_PROTO type, with M_DATA block(s)*/
+
+struct dl_unitdata_ind_t {
+ UInt32 dl_primitive; /* DL_UNITDATA_IND */
+ UInt32 dl_dest_addr_length; /* DLSAP length of dest. user */
+ UInt32 dl_dest_addr_offset; /* offset from beg. of block */
+ UInt32 dl_src_addr_length; /* DLSAP addr length of sending user*/
+ UInt32 dl_src_addr_offset; /* offset from beg. of block */
+ UInt32 dl_group_address; /* set to one if multicast/broadcast*/
+};
+typedef struct dl_unitdata_ind_t dl_unitdata_ind_t;
+/*
+ DL_UDERROR_IND, M_PROTO type
+ (or M_PCPROTO type if LLI-based provider)
+*/
+
+struct dl_uderror_ind_t {
+ UInt32 dl_primitive; /* DL_UDERROR_IND */
+ UInt32 dl_dest_addr_length; /* Destination DLSAP */
+ UInt32 dl_dest_addr_offset; /* Offset from beg. of block */
+ UInt32 dl_unix_errno; /* unix system error code*/
+ UInt32 dl_errno; /* DLPI error code */
+};
+typedef struct dl_uderror_ind_t dl_uderror_ind_t;
+/* DL_UDQOS_REQ, M_PROTO type*/
+
+struct dl_udqos_req_t {
+ UInt32 dl_primitive; /* DL_UDQOS_REQ */
+ UInt32 dl_qos_length; /* length in bytes of requested qos*/
+ UInt32 dl_qos_offset; /* offset from beg. of block */
+};
+typedef struct dl_udqos_req_t dl_udqos_req_t;
+/* Primitives to handle XID and TEST operations*/
+/* DL_TEST_REQ, M_PROTO type*/
+
+
+struct dl_test_req_t {
+ UInt32 dl_primitive; /* DL_TEST_REQ */
+ UInt32 dl_flag; /* poll/final */
+ UInt32 dl_dest_addr_length; /* DLSAP length of dest. user */
+ UInt32 dl_dest_addr_offset; /* offset from beg. of block */
+};
+typedef struct dl_test_req_t dl_test_req_t;
+/* DL_TEST_IND, M_PROTO type*/
+
+struct dl_test_ind_t {
+ UInt32 dl_primitive; /* DL_TEST_IND */
+ UInt32 dl_flag; /* poll/final */
+ UInt32 dl_dest_addr_length; /* dlsap length of dest. user */
+ UInt32 dl_dest_addr_offset; /* offset from beg. of block */
+ UInt32 dl_src_addr_length; /* dlsap length of source user */
+ UInt32 dl_src_addr_offset; /* offset from beg. of block */
+};
+typedef struct dl_test_ind_t dl_test_ind_t;
+/* DL_TEST_RES, M_PROTO type*/
+
+struct dl_test_res_t {
+ UInt32 dl_primitive; /* DL_TEST_RES */
+ UInt32 dl_flag; /* poll/final */
+ UInt32 dl_dest_addr_length; /* DLSAP length of dest. user */
+ UInt32 dl_dest_addr_offset; /* offset from beg. of block */
+};
+typedef struct dl_test_res_t dl_test_res_t;
+/* DL_TEST_CON, M_PROTO type*/
+
+struct dl_test_con_t {
+ UInt32 dl_primitive; /* DL_TEST_CON */
+ UInt32 dl_flag; /* poll/final */
+ UInt32 dl_dest_addr_length; /* dlsap length of dest. user */
+ UInt32 dl_dest_addr_offset; /* offset from beg. of block */
+ UInt32 dl_src_addr_length; /* dlsap length of source user */
+ UInt32 dl_src_addr_offset; /* offset from beg. of block */
+};
+typedef struct dl_test_con_t dl_test_con_t;
+/* DL_XID_REQ, M_PROTO type*/
+
+struct dl_xid_req_t {
+ UInt32 dl_primitive; /* DL_XID_REQ */
+ UInt32 dl_flag; /* poll/final */
+ UInt32 dl_dest_addr_length; /* dlsap length of dest. user */
+ UInt32 dl_dest_addr_offset; /* offset from beg. of block */
+};
+typedef struct dl_xid_req_t dl_xid_req_t;
+/* DL_XID_IND, M_PROTO type*/
+
+struct dl_xid_ind_t {
+ UInt32 dl_primitive; /* DL_XID_IND */
+ UInt32 dl_flag; /* poll/final */
+ UInt32 dl_dest_addr_length; /* dlsap length of dest. user */
+ UInt32 dl_dest_addr_offset; /* offset from beg. of block */
+ UInt32 dl_src_addr_length; /* dlsap length of source user */
+ UInt32 dl_src_addr_offset; /* offset from beg. of block */
+};
+typedef struct dl_xid_ind_t dl_xid_ind_t;
+/* DL_XID_RES, M_PROTO type*/
+
+struct dl_xid_res_t {
+ UInt32 dl_primitive; /* DL_XID_RES */
+ UInt32 dl_flag; /* poll/final */
+ UInt32 dl_dest_addr_length; /* DLSAP length of dest. user */
+ UInt32 dl_dest_addr_offset; /* offset from beg. of block */
+};
+typedef struct dl_xid_res_t dl_xid_res_t;
+/* DL_XID_CON, M_PROTO type*/
+
+struct dl_xid_con_t {
+ UInt32 dl_primitive; /* DL_XID_CON */
+ UInt32 dl_flag; /* poll/final */
+ UInt32 dl_dest_addr_length; /* dlsap length of dest. user */
+ UInt32 dl_dest_addr_offset; /* offset from beg. of block */
+ UInt32 dl_src_addr_length; /* dlsap length of source user */
+ UInt32 dl_src_addr_offset; /* offset from beg. of block */
+};
+typedef struct dl_xid_con_t dl_xid_con_t;
+/* ACKNOWLEDGED CONNECTIONLESS SERVICE PRIMITIVES*/
+
+/* DL_DATA_ACK_REQ, M_PROTO type*/
+
+
+struct dl_data_ack_req_t {
+ UInt32 dl_primitive; /* DL_DATA_ACK_REQ */
+ UInt32 dl_correlation; /* User's correlation token */
+ UInt32 dl_dest_addr_length; /* length of destination addr */
+ UInt32 dl_dest_addr_offset; /* offset from beginning of block */
+ UInt32 dl_src_addr_length; /* length of source address */
+ UInt32 dl_src_addr_offset; /* offset from beginning of block */
+ UInt32 dl_priority; /* priority */
+ UInt32 dl_service_class; /* DL_RQST_RSP or DL_RQST_NORSP */
+};
+typedef struct dl_data_ack_req_t dl_data_ack_req_t;
+/* DL_DATA_ACK_IND, M_PROTO type*/
+
+struct dl_data_ack_ind_t {
+ UInt32 dl_primitive; /* DL_DATA_ACK_IND */
+ UInt32 dl_dest_addr_length; /* length of destination addr */
+ UInt32 dl_dest_addr_offset; /* offset from beginning of block */
+ UInt32 dl_src_addr_length; /* length of source address */
+ UInt32 dl_src_addr_offset; /* offset from beginning of block */
+ UInt32 dl_priority; /* priority for data unit transm. */
+ UInt32 dl_service_class; /* DL_RQST_RSP or DL_RQST_NORSP */
+};
+typedef struct dl_data_ack_ind_t dl_data_ack_ind_t;
+/* DL_DATA_ACK_STATUS_IND, M_PROTO type*/
+
+struct dl_data_ack_status_ind_t {
+ UInt32 dl_primitive; /* DL_DATA_ACK_STATUS_IND */
+ UInt32 dl_correlation; /* User's correlation token */
+ UInt32 dl_status; /* success or failure of previous req*/
+};
+typedef struct dl_data_ack_status_ind_t dl_data_ack_status_ind_t;
+/* DL_REPLY_REQ, M_PROTO type*/
+
+struct dl_reply_req_t {
+ UInt32 dl_primitive; /* DL_REPLY_REQ */
+ UInt32 dl_correlation; /* User's correlation token */
+ UInt32 dl_dest_addr_length; /* length of destination address */
+ UInt32 dl_dest_addr_offset; /* offset from beginning of block */
+ UInt32 dl_src_addr_length; /* source address length */
+ UInt32 dl_src_addr_offset; /* offset from beginning of block */
+ UInt32 dl_priority; /* priority for data unit transmission*/
+ UInt32 dl_service_class;
+};
+typedef struct dl_reply_req_t dl_reply_req_t;
+/* DL_REPLY_IND, M_PROTO type*/
+
+struct dl_reply_ind_t {
+ UInt32 dl_primitive; /* DL_REPLY_IND */
+ UInt32 dl_dest_addr_length; /* length of destination address */
+ UInt32 dl_dest_addr_offset; /* offset from beginning of block*/
+ UInt32 dl_src_addr_length; /* length of source address */
+ UInt32 dl_src_addr_offset; /* offset from beginning of block */
+ UInt32 dl_priority; /* priority for data unit transmission*/
+ UInt32 dl_service_class; /* DL_RQST_RSP or DL_RQST_NORSP */
+};
+typedef struct dl_reply_ind_t dl_reply_ind_t;
+/* DL_REPLY_STATUS_IND, M_PROTO type*/
+
+struct dl_reply_status_ind_t {
+ UInt32 dl_primitive; /* DL_REPLY_STATUS_IND */
+ UInt32 dl_correlation; /* User's correlation token */
+ UInt32 dl_status; /* success or failure of previous req*/
+};
+typedef struct dl_reply_status_ind_t dl_reply_status_ind_t;
+/* DL_REPLY_UPDATE_REQ, M_PROTO type*/
+
+struct dl_reply_update_req_t {
+ UInt32 dl_primitive; /* DL_REPLY_UPDATE_REQ */
+ UInt32 dl_correlation; /* user's correlation token */
+ UInt32 dl_src_addr_length; /* length of source address */
+ UInt32 dl_src_addr_offset; /* offset from beginning of block */
+};
+typedef struct dl_reply_update_req_t dl_reply_update_req_t;
+/* DL_REPLY_UPDATE_STATUS_IND, M_PROTO type*/
+
+struct dl_reply_update_status_ind_t {
+ UInt32 dl_primitive; /* DL_REPLY_UPDATE_STATUS_IND */
+ UInt32 dl_correlation; /* User's correlation token */
+ UInt32 dl_status; /* success or failure of previous req*/
+};
+typedef struct dl_reply_update_status_ind_t dl_reply_update_status_ind_t;
+
+union DL_primitives {
+ UInt32 dl_primitive;
+ dl_info_req_t info_req;
+ dl_info_ack_t info_ack;
+ dl_attach_req_t attach_req;
+ dl_detach_req_t detach_req;
+ dl_bind_req_t bind_req;
+ dl_bind_ack_t bind_ack;
+ dl_unbind_req_t unbind_req;
+ dl_subs_bind_req_t subs_bind_req;
+ dl_subs_bind_ack_t subs_bind_ack;
+ dl_subs_unbind_req_t subs_unbind_req;
+ dl_ok_ack_t ok_ack;
+ dl_error_ack_t error_ack;
+ dl_connect_req_t connect_req;
+ dl_connect_ind_t connect_ind;
+ dl_connect_res_t connect_res;
+ dl_connect_con_t connect_con;
+ dl_token_req_t token_req;
+ dl_token_ack_t token_ack;
+ dl_disconnect_req_t disconnect_req;
+ dl_disconnect_ind_t disconnect_ind;
+ dl_reset_req_t reset_req;
+ dl_reset_ind_t reset_ind;
+ dl_reset_res_t reset_res;
+ dl_reset_con_t reset_con;
+ dl_unitdata_req_t unitdata_req;
+ dl_unitdata_ind_t unitdata_ind;
+ dl_uderror_ind_t uderror_ind;
+ dl_udqos_req_t udqos_req;
+ dl_enabmulti_req_t enabmulti_req;
+ dl_disabmulti_req_t disabmulti_req;
+ dl_promiscon_req_t promiscon_req;
+ dl_promiscoff_req_t promiscoff_req;
+ dl_phys_addr_req_t physaddr_req;
+ dl_phys_addr_ack_t physaddr_ack;
+ dl_set_phys_addr_req_t set_physaddr_req;
+ dl_get_statistics_req_t get_statistics_req;
+ dl_get_statistics_ack_t get_statistics_ack;
+ dl_test_req_t test_req;
+ dl_test_ind_t test_ind;
+ dl_test_res_t test_res;
+ dl_test_con_t test_con;
+ dl_xid_req_t xid_req;
+ dl_xid_ind_t xid_ind;
+ dl_xid_res_t xid_res;
+ dl_xid_con_t xid_con;
+ dl_data_ack_req_t data_ack_req;
+ dl_data_ack_ind_t data_ack_ind;
+ dl_data_ack_status_ind_t data_ack_status_ind;
+ dl_reply_req_t reply_req;
+ dl_reply_ind_t reply_ind;
+ dl_reply_status_ind_t reply_status_ind;
+ dl_reply_update_req_t reply_update_req;
+ dl_reply_update_status_ind_t reply_update_status_ind;
+};
+typedef union DL_primitives DL_primitives;
+enum {
+ DL_INFO_REQ_SIZE = sizeof(dl_info_req_t),
+ DL_INFO_ACK_SIZE = sizeof(dl_info_ack_t),
+ DL_ATTACH_REQ_SIZE = sizeof(dl_attach_req_t),
+ DL_DETACH_REQ_SIZE = sizeof(dl_detach_req_t),
+ DL_BIND_REQ_SIZE = sizeof(dl_bind_req_t),
+ DL_BIND_ACK_SIZE = sizeof(dl_bind_ack_t),
+ DL_UNBIND_REQ_SIZE = sizeof(dl_unbind_req_t),
+ DL_SUBS_BIND_REQ_SIZE = sizeof(dl_subs_bind_req_t),
+ DL_SUBS_BIND_ACK_SIZE = sizeof(dl_subs_bind_ack_t),
+ DL_SUBS_UNBIND_REQ_SIZE = sizeof(dl_subs_unbind_req_t),
+ DL_OK_ACK_SIZE = sizeof(dl_ok_ack_t),
+ DL_ERROR_ACK_SIZE = sizeof(dl_error_ack_t),
+ DL_CONNECT_REQ_SIZE = sizeof(dl_connect_req_t),
+ DL_CONNECT_IND_SIZE = sizeof(dl_connect_ind_t),
+ DL_CONNECT_RES_SIZE = sizeof(dl_connect_res_t),
+ DL_CONNECT_CON_SIZE = sizeof(dl_connect_con_t),
+ DL_TOKEN_REQ_SIZE = sizeof(dl_token_req_t),
+ DL_TOKEN_ACK_SIZE = sizeof(dl_token_ack_t),
+ DL_DISCONNECT_REQ_SIZE = sizeof(dl_disconnect_req_t),
+ DL_DISCONNECT_IND_SIZE = sizeof(dl_disconnect_ind_t),
+ DL_RESET_REQ_SIZE = sizeof(dl_reset_req_t),
+ DL_RESET_IND_SIZE = sizeof(dl_reset_ind_t),
+ DL_RESET_RES_SIZE = sizeof(dl_reset_res_t),
+ DL_RESET_CON_SIZE = sizeof(dl_reset_con_t),
+ DL_UNITDATA_REQ_SIZE = sizeof(dl_unitdata_req_t),
+ DL_UNITDATA_IND_SIZE = sizeof(dl_unitdata_ind_t),
+ DL_UDERROR_IND_SIZE = sizeof(dl_uderror_ind_t),
+ DL_UDQOS_REQ_SIZE = sizeof(dl_udqos_req_t),
+ DL_ENABMULTI_REQ_SIZE = sizeof(dl_enabmulti_req_t),
+ DL_DISABMULTI_REQ_SIZE = sizeof(dl_disabmulti_req_t),
+ DL_PROMISCON_REQ_SIZE = sizeof(dl_promiscon_req_t),
+ DL_PROMISCOFF_REQ_SIZE = sizeof(dl_promiscoff_req_t),
+ DL_PHYS_ADDR_REQ_SIZE = sizeof(dl_phys_addr_req_t),
+ DL_PHYS_ADDR_ACK_SIZE = sizeof(dl_phys_addr_ack_t),
+ DL_SET_PHYS_ADDR_REQ_SIZE = sizeof(dl_set_phys_addr_req_t),
+ DL_GET_STATISTICS_REQ_SIZE = sizeof(dl_get_statistics_req_t),
+ DL_GET_STATISTICS_ACK_SIZE = sizeof(dl_get_statistics_ack_t),
+ DL_XID_REQ_SIZE = sizeof(dl_xid_req_t),
+ DL_XID_IND_SIZE = sizeof(dl_xid_ind_t),
+ DL_XID_RES_SIZE = sizeof(dl_xid_res_t),
+ DL_XID_CON_SIZE = sizeof(dl_xid_con_t),
+ DL_TEST_REQ_SIZE = sizeof(dl_test_req_t),
+ DL_TEST_IND_SIZE = sizeof(dl_test_ind_t),
+ DL_TEST_RES_SIZE = sizeof(dl_test_res_t),
+ DL_TEST_CON_SIZE = sizeof(dl_test_con_t),
+ DL_DATA_ACK_REQ_SIZE = sizeof(dl_data_ack_req_t),
+ DL_DATA_ACK_IND_SIZE = sizeof(dl_data_ack_ind_t),
+ DL_DATA_ACK_STATUS_IND_SIZE = sizeof(dl_data_ack_status_ind_t),
+ DL_REPLY_REQ_SIZE = sizeof(dl_reply_req_t),
+ DL_REPLY_IND_SIZE = sizeof(dl_reply_ind_t),
+ DL_REPLY_STATUS_IND_SIZE = sizeof(dl_reply_status_ind_t),
+ DL_REPLY_UPDATE_REQ_SIZE = sizeof(dl_reply_update_req_t),
+ DL_REPLY_UPDATE_STATUS_IND_SIZE = sizeof(dl_reply_update_status_ind_t)
+};
+
+enum {
+ DL_IOC_HDR_INFO = ((MIOC_DLPI << 8) | 10) /* Fast path request */
+};
+
+/* ***** From the Mentat "modnames.h" ******/
+
+
+#define MI_AFU_NAME "afu"
+#define MI_AHARP_NAME "ahar"
+#define MI_AHENET_NAME "ahen"
+#define MI_ARP_NAME "arp"
+#define MI_ARPM_NAME "arpm"
+#define MI_COURMUX_NAME "courmux"
+#define MI_CLONE_NAME "clone"
+#define MI_DLB_NAME "dlb"
+#define MI_DLM_NAME "dlm"
+#define MI_DMODD_NAME "disdlpi"
+#define MI_DMODT_NAME "distpi"
+#define MI_DN_NAME "dn"
+#define MI_DNF_NAME "dnf"
+#define MI_DRVE_NAME "drve"
+#define MI_ECHO_NAME "echo"
+#define MI_ENXR_NAME "enxr"
+#define MI_RAWIP_NAME "rawip"
+#define MI_RAWIPM_NAME "rawipm"
+#define MI_HAVOC_NAME "havoc"
+#define MI_HAVOCM_NAME "havocm"
+#define MI_IP_NAME "ip"
+#define MI_IPM_NAME "ipm"
+#define MI_IPX_NAME "ipx"
+#define MI_LOG_NAME "log"
+#define MI_MODE_NAME "mode"
+#define MI_MUX_NAME "mux"
+#define MI_NECHO_NAME "necho"
+#define MI_NPEP_NAME "npep"
+#define MI_NULS_NAME "nuls"
+#define MI_NULZ_NAME "nulz"
+#define MI_PASS_NAME "pass"
+#define MI_PIPEMOD_NAME "pipemod"
+#define MI_SAD_NAME "sad"
+#define MI_SC_NAME "sc"
+#define MI_SOCKMOD_NAME "sockmod"
+#define MI_SPASS_NAME "spass"
+#define MI_SPX_NAME "spx"
+#define MI_STH_NAME "mi_sth"
+#define MI_TCP_NAME "tcp"
+#define MI_TCPM_NAME "tcpm"
+#define MI_TIMOD_NAME "timod"
+#define MI_TIRDWR_NAME "tirdwr"
+#define MI_TMOD_NAME "tmod"
+#define MI_TMUX_NAME "tmux"
+#define MI_TPIT_NAME "tpit"
+#define MI_TRSR_NAME "trsr"
+#define MI_TRXR_NAME "trxr"
+#define MI_UDP_NAME "udp"
+#define MI_UDPM_NAME "udpm"
+#define MI_WELD_NAME "mi_weld"
+#define MI_XDG_NAME "xdg"
+#define MI_XECHO_NAME "xecho"
+#define MI_XF_NAME "xf"
+#define MI_XFIPX_NAME "xfipx"
+#define MI_XFXNS_NAME "xfxns"
+#define MI_XPE_NAME "xpe"
+#define MI_XS_NAME "xs"
+#define MI_XTINDG_NAME "xtindg"
+#define MI_XTINVC_NAME "xtinvc"
+#define MI_XTM_NAME "xtm"
+#define MI_XTMIP_NAME "xtmip"
+
+#define MI_AFU_DEVICE "/dev/afu"
+#define MI_ARP_DEVICE "/dev/arp"
+#define MI_COURMUX_DEVICE "/dev/courmux"
+#define MI_CLONE_DEVICE "/dev/clone"
+#define MI_DLB_DEVICE "/dev/dlb"
+#define MI_DN_DEVICE "/dev/dn"
+#define MI_DNF_DEVICE "/dev/dnf"
+#define MI_DRVE_DEVICE "/dev/drve"
+#define MI_ECHO_DEVICE "/dev/echo"
+#define MI_RAWIP_DEVICE "/dev/rawip"
+#define MI_HAVOC_DEVICE "/dev/havoc"
+#define MI_IP_DEVICE "/dev/ip"
+#define MI_IPX_DEVICE "/dev/ipx"
+#define MI_LOG_DEVICE "/dev/log"
+#define MI_MODE_DEVICE "/dev/mode"
+#define MI_MUX_DEVICE "/dev/mux"
+#define MI_NECHO_DEVICE "/dev/necho"
+#define MI_NPEP_DEVICE "/dev/npep"
+#define MI_NULS_DEVICE "/dev/nuls"
+#define MI_NULZ_DEVICE "/dev/nulz"
+#define MI_SAD_DEVICE "/dev/sad"
+#define MI_SPX_DEVICE "/dev/spx"
+#define MI_TCP_DEVICE "/dev/tcp"
+#define MI_TMUX_DEVICE "/dev/tmux"
+#define MI_TMUX0_DEVICE "/dev/tmux#0"
+#define MI_TMUX1_DEVICE "/dev/tmux#1"
+#define MI_TPIT_DEVICE "/dev/tpit"
+#define MI_UDP_DEVICE "/dev/udp"
+#define MI_XDG_DEVICE "/dev/xdg"
+#define MI_XECHO_DEVICE "/dev/xecho"
+#define MI_XF_DEVICE "/dev/xf"
+#define MI_XPE_DEVICE "/dev/xpe"
+#define MI_XS_DEVICE "/dev/xs"
+#define MI_XTINDG_DEVICE "/dev/xtindg"
+#define MI_XTINVC_DEVICE "/dev/xtinvc"
+
+
+/* Streamtab entries */
+#define MI_AFU_STREAMTAB afuinfo
+#define MI_AHARP_STREAMTAB aharinfo
+#define MI_AHENET_STREAMTAB aheninfo
+#define MI_ARP_STREAMTAB arpinfo
+#define MI_ARPM_STREAMTAB arpminfo
+#define MI_COURMUX_STREAMTAB courmuxinfo
+#define MI_CLONE_STREAMTAB cloneinfo
+#define MI_DLB_STREAMTAB dlbinfo
+#define MI_DLM_STREAMTAB dlminfo
+#define MI_DMODD_STREAMTAB dmoddinfo
+#define MI_DMODT_STREAMTAB dmodtinfo
+#define MI_DN_STREAMTAB dninfo
+#define MI_DNF_STREAMTAB dnfinfo
+#define MI_DRVE_STREAMTAB drveinfo
+#define MI_ECHO_STREAMTAB echoinfo
+#define MI_ENXR_STREAMTAB enxrinfo
+#define MI_HAVOC_STREAMTAB hvcinfo
+#define MI_HAVOCM_STREAMTAB hvcminfo
+#define MI_IP_STREAMTAB ipinfo
+#define MI_IPM_STREAMTAB ipminfo
+#define MI_IPX_STREAMTAB ipxinfo
+#define MI_LOG_STREAMTAB loginfo
+#define MI_MODE_STREAMTAB modeinfo
+#define MI_MUX_STREAMTAB muxinfo
+#define MI_NECHO_STREAMTAB nechoinfo
+#define MI_NPEP_STREAMTAB npepinfo
+#define MI_NULS_STREAMTAB nulsinfo
+#define MI_NULZ_STREAMTAB nulzinfo
+#define MI_PASS_STREAMTAB passinfo
+#define MI_PIPEMOD_STREAMTAB pmodinfo
+#define MI_RAWIP_STREAMTAB rawipinfo
+#define MI_RAWIPM_STREAMTAB rawipminfo
+#define MI_SAD_STREAMTAB sadinfo
+#define MI_SC_STREAMTAB scinfo
+#define MI_SOCKMOD_STREAMTAB sockmodinfo
+#define MI_SPASS_STREAMTAB spassinfo
+#define MI_SPX_STREAMTAB spxinfo
+#define MI_STH_STREAMTAB mi_sthinfo
+#define MI_TCP_STREAMTAB tcpinfo
+#define MI_TCPM_STREAMTAB tcpminfo
+#define MI_TIMOD_STREAMTAB timodinfo
+#define MI_TIRDWR_STREAMTAB tirdwrinfo
+#define MI_TMOD_STREAMTAB tmodinfo
+#define MI_TMUX_STREAMTAB tmuxinfo
+#define MI_TPIT_STREAMTAB tpitinfo
+#define MI_TRSR_STREAMTAB trsrinfo
+#define MI_TRXR_STREAMTAB trxrinfo
+#define MI_UDP_STREAMTAB udpinfo
+#define MI_UDPM_STREAMTAB udpminfo
+#define MI_WELD_STREAMTAB mi_weldinfo
+#define MI_XDG_STREAMTAB xdginfo
+#define MI_XECHO_STREAMTAB xechoinfo
+#define MI_XF_STREAMTAB xfinfo
+#define MI_XFIPX_STREAMTAB xfipxinfo
+#define MI_XFXNS_STREAMTAB xfxnsinfo
+#define MI_XPE_STREAMTAB xpeinfo
+#define MI_XS_STREAMTAB xsinfo
+#define MI_XTINDG_STREAMTAB xtindginfo
+#define MI_XTINVC_STREAMTAB xtinvcinfo
+#define MI_XTM_STREAMTAB xtminfo
+#define MI_XTMIP_STREAMTAB xtmipinfo
+
+
+#define MI_AFU_DEVFLAG afudevflag
+#define MI_AHARP_DEVFLAG ahardevflag
+#define MI_AHENET_DEVFLAG ahendevflag
+#define MI_ARP_DEVFLAG arpdevflag
+#define MI_ARPM_DEVFLAG arpmdevflag
+#define MI_COURMUX_DEVFLAG courmuxdevflag
+#define MI_CLONE_DEVFLAG clonedevflag
+#define MI_DLB_DEVFLAG dlbdevflag
+#define MI_DLM_DEVFLAG dlmdevflag
+#define MI_DMODD_DEVFLAG dmodddevflag
+#define MI_DMODT_DEVFLAG dmodtdevflag
+#define MI_DN_DEVFLAG dndevflag
+#define MI_DNF_DEVFLAG dnfdevflag
+#define MI_DRVE_DEVFLAG drvedevflag
+#define MI_ECHO_DEVFLAG echodevflag
+#define MI_ENXR_DEVFLAG enxrdevflag
+#define MI_HAVOC_DEVFLAG hvcdevflag
+#define MI_HAVOCM_DEVFLAG hvcmdevflag
+#define MI_IP_DEVFLAG ipdevflag
+#define MI_IPM_DEVFLAG ipmdevflag
+#define MI_IPX_DEVFLAG ipxdevflag
+#define MI_LOG_DEVFLAG logdevflag
+#define MI_MODE_DEVFLAG modedevflag
+#define MI_MUX_DEVFLAG muxdevflag
+#define MI_NECHO_DEVFLAG nechodevflag
+#define MI_NPEP_DEVFLAG npepdevflag
+#define MI_NULS_DEVFLAG nulsdevflag
+#define MI_NULZ_DEVFLAG nulzdevflag
+#define MI_PASS_DEVFLAG passdevflag
+#define MI_PIPEMOD_DEVFLAG pipemoddevflag
+#define MI_RAWIP_DEVFLAG rawipdevflag
+#define MI_RAWIPM_DEVFLAG rawipmdevflag
+
+#define MI_SAD_DEVFLAG saddevflag
+#define MI_SC_DEVFLAG scdevflag
+#define MI_SOCKMOD_DEVFLAG sockmoddevflag
+#define MI_SPASS_DEVFLAG spassdevflag
+#define MI_SPX_DEVFLAG spxdevflag
+#define MI_TCP_DEVFLAG tcpdevflag
+#define MI_TCPM_DEVFLAG tcpmdevflag
+#define MI_TIMOD_DEVFLAG timoddevflag
+#define MI_TIRDWR_DEVFLAG tirdwrdevflag
+#define MI_TMOD_DEVFLAG tmoddevflag
+#define MI_TMUX_DEVFLAG tmuxdevflag
+#define MI_TPIT_DEVFLAG tpitdevflag
+#define MI_TRSR_DEVFLAG trsrdevflag
+#define MI_TRXR_DEVFLAG trxrdevflag
+#define MI_UDP_DEVFLAG udpdevflag
+#define MI_UDPM_DEVFLAG udpmdevflag
+#define MI_XDG_DEVFLAG xdgdevflag
+#define MI_XECHO_DEVFLAG xechodevflag
+#define MI_XF_DEVFLAG xfdevflag
+#define MI_XFIPX_DEVFLAG xfipxdevflag
+#define MI_XFXNS_DEVFLAG xfxnsdevflag
+#define MI_XPE_DEVFLAG xpedevflag
+#define MI_XS_DEVFLAG xsdevflag
+#define MI_XTINDG_DEVFLAG xtindgdevflag
+#define MI_XTINVC_DEVFLAG xtinvcdevflag
+#define MI_XTM_DEVFLAG xtmdevflag
+#define MI_XTMIP_DEVFLAG xtmipdevflag
+
+#define MI_AFU_SQLVL SQLVL_QUEUEPAIR
+#define MI_AHARP_SQLVL SQLVL_QUEUE
+#define MI_AHENET_SQLVL SQLVL_QUEUE
+#define MI_ARP_SQLVL SQLVL_MODULE
+#define MI_ARPM_SQLVL SQLVL_MODULE
+#define MI_COURMUX_SQLVL SQLVL_MODULE
+#define MI_CLONE_SQLVL SQLVL_MODULE
+#define MI_DLB_SQLVL SQLVL_QUEUE
+#define MI_DLM_SQLVL SQLVL_QUEUE
+#define MI_DMODD_SQLVL SQLVL_QUEUE
+#define MI_DMODT_SQLVL SQLVL_QUEUE
+#define MI_DN_SQLVL SQLVL_QUEUE
+#define MI_DNF_SQLVL SQLVL_QUEUE
+#define MI_DRVE_SQLVL SQLVL_QUEUEPAIR
+#define MI_ECHO_SQLVL SQLVL_QUEUE
+#define MI_ENXR_SQLVL SQLVL_QUEUE
+#define MI_RAWIP_SQLVL SQLVL_QUEUE
+#define MI_RAWIPM_SQLVL SQLVL_QUEUE
+#define MI_HAVOC_SQLVL SQLVL_QUEUE
+#define MI_HAVOCM_SQLVL SQLVL_QUEUE
+#define MI_IP_SQLVL SQLVL_QUEUEPAIR
+#define MI_IPM_SQLVL SQLVL_QUEUEPAIR
+#define MI_IPX_SQLVL SQLVL_QUEUE
+#define MI_LOG_SQLVL SQLVL_MODULE
+#define MI_MODE_SQLVL SQLVL_QUEUEPAIR
+#define MI_MUX_SQLVL SQLVL_MODULE
+#define MI_NECHO_SQLVL SQLVL_QUEUE
+
+#define MI_NPEP_SQLVL SQLVL_QUEUE
+#define MI_NULS_SQLVL SQLVL_QUEUE
+#define MI_NULZ_SQLVL SQLVL_QUEUE
+#define MI_PASS_SQLVL SQLVL_QUEUE
+#define MI_PIPEMOD_SQLVL SQLVL_QUEUE
+
+#define MI_SAD_SQLVL SQLVL_MODULE
+#define MI_SC_SQLVL SQLVL_QUEUE
+#define MI_SOCKMOD_SQLVL SQLVL_QUEUEPAIR
+#define MI_SPASS_SQLVL SQLVL_QUEUE
+#define MI_SPX_SQLVL SQLVL_QUEUE
+#define MI_TCP_SQLVL SQLVL_QUEUEPAIR
+#define MI_TCPM_SQLVL SQLVL_QUEUEPAIR
+#define MI_TIMOD_SQLVL SQLVL_QUEUEPAIR
+#define MI_TIRDWR_SQLVL SQLVL_QUEUE
+#define MI_TMOD_SQLVL SQLVL_QUEUEPAIR
+#define MI_TMUX_SQLVL SQLVL_MODULE
+#define MI_TPIT_SQLVL SQLVL_MODULE
+#define MI_TRSR_SQLVL SQLVL_MODULE
+#define MI_TRXR_SQLVL SQLVL_QUEUE
+#define MI_UDP_SQLVL SQLVL_QUEUE
+#define MI_UDPM_SQLVL SQLVL_QUEUE
+#define MI_XDG_SQLVL SQLVL_QUEUE
+#define MI_XECHO_SQLVL SQLVL_QUEUE
+#define MI_XF_SQLVL SQLVL_MODULE
+#define MI_XFIPX_SQLVL SQLVL_MODULE
+#define MI_XFXNS_SQLVL SQLVL_MODULE
+#define MI_XPE_SQLVL SQLVL_QUEUE
+#define MI_XS_SQLVL SQLVL_QUEUEPAIR
+#define MI_XTINDG_SQLVL SQLVL_QUEUEPAIR
+#define MI_XTINVC_SQLVL SQLVL_QUEUEPAIR
+#define MI_XTM_SQLVL SQLVL_QUEUEPAIR
+#define MI_XTMIP_SQLVL SQLVL_QUEUEPAIR
+/* ***** Raw Streams ******/
+
+
+/*
+ Flags used in the fType field of OTReadInfo for functions.
+ I've removed the terse and confusing comments in this header
+ file. For a full description, read "Open Transport Advanced
+ Client Programming".
+*/
+
+enum {
+ kOTNoMessagesAvailable = (unsigned long)0xFFFFFFFF,
+ kOTAnyMsgType = (unsigned long)0xFFFFFFFE,
+ kOTDataMsgTypes = (unsigned long)0xFFFFFFFC,
+ kOTMProtoMsgTypes = (unsigned long)0xFFFFFFFB,
+ kOTOnlyMProtoMsgTypes = (unsigned long)0xFFFFFFFA
+};
+
+#if !OTKERNEL
+/* StreamRef is an opaque reference to a raw stream.*/
+
+typedef struct OpaqueStreamRef* StreamRef;
+#define kOTInvalidStreamRef ((StreamRef)0L)
+/* PollRef structure is used with the OTStreamPoll function.*/
+
+struct PollRef {
+ SInt32 filler; /* holds a file descriptor an a UNIX system, replaced by ref (at end of structure) under OT*/
+ SInt16 events;
+ SInt16 revents;
+ StreamRef ref;
+};
+typedef struct PollRef PollRef;
+/* OTReadInfo structure is used with the various functions that read and peek at the stream head.*/
+
+struct OTReadInfo {
+ UInt32 fType;
+ OTCommand fCommand;
+ UInt32 fFiller; /* For compatibility with OT 1.0 and 1.1 */
+ ByteCount fBytes;
+ OSStatus fError;
+};
+typedef struct OTReadInfo OTReadInfo;
+/* Opening and closing raw streams*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( StreamRef )
+OTStreamOpen (const char * name,
+ OTOpenFlags oFlags,
+ OSStatus * errPtr);
+
+EXTERN_API( OSStatus )
+OTAsyncStreamOpen (const char * name,
+ OTOpenFlags oFlags,
+ OTNotifyUPP proc,
+ void * contextPtr);
+
+EXTERN_API( StreamRef )
+OTCreateStream (OTConfigurationRef cfig,
+ OTOpenFlags oFlags,
+ OSStatus * errPtr);
+
+EXTERN_API( OSStatus )
+OTAsyncCreateStream (OTConfigurationRef cfig,
+ OTOpenFlags oFlags,
+ OTNotifyUPP proc,
+ void * contextPtr);
+
+EXTERN_API( OSStatus )
+OTStreamClose (StreamRef strm);
+
+/* Polling a stream for activity*/
+
+EXTERN_API( OTResult )
+OTStreamPoll (PollRef * fds,
+ UInt32 nfds,
+ OTTimeout timeout);
+
+EXTERN_API( OTResult )
+OTAsyncStreamPoll (PollRef * fds,
+ UInt32 nfds,
+ OTTimeout timeout,
+ OTNotifyUPP proc,
+ void * contextPtr);
+
+/* Classic UNIX file descriptor operations*/
+
+EXTERN_API( OTResult )
+OTStreamRead (StreamRef strm,
+ void * buf,
+ OTByteCount len);
+
+EXTERN_API( OTResult )
+OTStreamWrite (StreamRef strm,
+ void * buf,
+ OTByteCount len);
+
+EXTERN_API( OTResult )
+OTStreamIoctl (StreamRef strm,
+ UInt32 cmd,
+ void * data);
+
+EXTERN_API( OTResult )
+OTStreamPipe (StreamRef streamsToPipe[]);
+
+/* there can be only 2!*/
+/* Notifiers and modes of operation*/
+EXTERN_API( OSStatus )
+OTStreamInstallNotifier (StreamRef strm,
+ OTNotifyUPP proc,
+ void * contextPtr);
+
+EXTERN_API( void )
+OTStreamRemoveNotifier (StreamRef strm);
+
+EXTERN_API( OSStatus )
+OTStreamUseSyncIdleEvents (StreamRef strm,
+ Boolean useEvents);
+
+EXTERN_API( void )
+OTStreamSetBlocking (StreamRef strm);
+
+EXTERN_API( void )
+OTStreamSetNonBlocking (StreamRef strm);
+
+EXTERN_API( Boolean )
+OTStreamIsBlocking (StreamRef strm);
+
+EXTERN_API( void )
+OTStreamSetSynchronous (StreamRef strm);
+
+EXTERN_API( void )
+OTStreamSetAsynchronous (StreamRef strm);
+
+EXTERN_API( Boolean )
+OTStreamIsSynchronous (StreamRef strm);
+
+/* STREAMS primitives*/
+
+EXTERN_API( OTResult )
+OTStreamGetMessage (StreamRef strm,
+ strbuf * ctlbuf,
+ strbuf * databuf,
+ OTFlags * flags);
+
+EXTERN_API( OTResult )
+OTStreamGetPriorityMessage (StreamRef strm,
+ strbuf * ctlbuf,
+ strbuf * databuf,
+ OTBand * band,
+ OTFlags * flags);
+
+EXTERN_API( OSStatus )
+OTStreamPutMessage (StreamRef strm,
+ const strbuf * ctlbuf,
+ const strbuf * databuf,
+ OTFlags flags);
+
+EXTERN_API( OSStatus )
+OTStreamPutPriorityMessage (StreamRef strm,
+ const strbuf * ctlbuf,
+ const strbuf * databuf,
+ OTBand band,
+ OTFlags flags);
+
+/* Miscellaneous stuff*/
+
+EXTERN_API( void )
+OTStreamSetControlMask (StreamRef strm,
+ UInt32 mask,
+ Boolean setClear);
+
+/*
+ Opening endpoints and mappers on a Stream - these calls are synchronous, and may
+ only be used at System Task time. Once the stream has been installed into a provider
+ or endpoint, you should not continue to use STREAMS APIs on it
+*/
+
+EXTERN_API( ProviderRef )
+OTOpenProviderOnStream (StreamRef strm,
+ OSStatus * errPtr);
+
+EXTERN_API( EndpointRef )
+OTOpenEndpointOnStream (StreamRef strm,
+ OSStatus * errPtr);
+
+/*
+ To quote an earlier version of this header file:
+
+ Some functions that should only be used if
+ you really know what you're doing.
+*/
+
+EXTERN_API( StreamRef )
+OTRemoveStreamFromProvider (ProviderRef ref);
+
+EXTERN_API( OSStatus )
+OTPeekMessage (StreamRef strm,
+ OTReadInfo * readInfo);
+
+EXTERN_API( OTBuffer *)
+OTReadMessage (StreamRef strm,
+ OTReadInfo * readInfo);
+
+EXTERN_API( void )
+OTPutBackBuffer (StreamRef strm,
+ OTBuffer * buffer);
+
+EXTERN_API( void )
+OTPutBackPartialBuffer (StreamRef strm,
+ OTBufferInfo * readInfo,
+ OTBuffer * buffer);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* !OTKERNEL */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+/* ***** Port Utilities ******/
+#if !OTKERNEL
+/*
+ These types and routines are used during sophisticated
+ port management. High-level clients may get involved
+ for things like request a port to be yielding, but typically
+ this stuff is used by protocol infrastructure.
+*/
+/*
+ OTPortCloseStruct is used when processing the kOTClosePortRequest
+ and kOTYieldPortRequest events.
+*/
+
+
+struct OTPortCloseStruct {
+ OTPortRef fPortRef; /* The port requested to be closed.*/
+ ProviderRef fTheProvider; /* The provider using the port.*/
+ OSStatus fDenyReason; /* Set to a negative number to deny the request*/
+};
+typedef struct OTPortCloseStruct OTPortCloseStruct;
+/* OTClientList structure is used with the OTYieldPortRequest function.*/
+
+struct OTClientList {
+ ItemCount fNumClients;
+ UInt8 fBuffer[4];
+};
+typedef struct OTClientList OTClientList;
+/*
+ Returns a buffer containing all of the clients that refused to yield the port.
+ "size" is the total number of bytes @ buffer, including the fNumClients field.
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+OTYieldPortRequest (ProviderRef ref,
+ OTPortRef portRef,
+ OTClientList * buffer,
+ OTByteCount size);
+
+/* Send a notification to all Open Transport registered clients*/
+EXTERN_API_C( void )
+OTNotifyAllClients (OTEventCode code,
+ OTResult result,
+ void * cookie);
+
+/* Determine if "child" is a child port of "parent"*/
+EXTERN_API_C( Boolean )
+OTIsDependentPort (OTPortRef parent,
+ OTPortRef child);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* !OTKERNEL */
+
+/* ***** Timers ***** */
+/*
+ STREAMS plug-ins code should not use these timers, instead
+ they should use timer messages, ie mi_timer etc.
+*/
+
+#if !OTKERNEL
+
+typedef long OTTimerTask;
+/*
+ Under Carbon, OTCreateTimerTask takes a client context pointer. Applications may pass NULL
+ after calling InitOpenTransport(kInitOTForApplicationMask, ...). Non-applications must always pass a
+ valid client context.
+*/
+EXTERN_API( long )
+OTCreateTimerTaskInContext (OTProcessUPP upp,
+ void * arg,
+ OTClientContextPtr clientContext);
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OTTimerTask )
+OTCreateTimerTask (OTProcessUPP proc,
+ void * arg);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( Boolean )
+OTCancelTimerTask (OTTimerTask timerTask);
+
+EXTERN_API( void )
+OTDestroyTimerTask (OTTimerTask timerTask);
+
+EXTERN_API( Boolean )
+OTScheduleTimerTask (OTTimerTask timerTask,
+ OTTimeout milliSeconds);
+
+#if OTCARBONAPPLICATION
+/* The following macro may be used by applications only.*/
+#define OTCreateTimerTask(upp, arg) OTCreateTimerTaskInContext(upp, arg, NULL)
+#endif /* OTCARBONAPPLICATION */
+
+#endif /* !OTKERNEL */
+
+/* ***** Miscellaneous Helpful Functions ******/
+
+#if !OTKERNEL
+/*
+ These routines allow you to manipulate OT's buffer structures.
+ If you use no-copy receives (described in "OpenTransport.h")
+ you will need some of these routines, and may choose to use others.
+ See "Open Tranport Advanced Client Programming" for documentation.
+*/
+EXTERN_API_C( OTByteCount )
+OTBufferDataSize (OTBuffer * buffer);
+
+EXTERN_API_C( Boolean )
+OTReadBuffer (OTBufferInfo * buffer,
+ void * dest,
+ OTByteCount * len);
+
+EXTERN_API_C( void )
+OTReleaseBuffer (OTBuffer * buffer);
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( Boolean )
+StoreIntoNetbuf (TNetbuf * netBuf,
+ void * source,
+ SInt32 len);
+
+EXTERN_API_C( Boolean )
+StoreMsgIntoNetbuf (TNetbuf * netBuf,
+ OTBuffer * buffer);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* !OTKERNEL */
+
+/* ***** OTConfiguration ******/
+#if CALL_NOT_IN_CARBON
+#if !OTKERNEL
+/*
+ As promised in "OpenTransport.h", here are the routines
+ for advanced operations on configurations.
+*/
+/* Manipulating a configuration*/
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OTConfigurationRef )
+OTCfigNewConfiguration (const char * path);
+
+EXTERN_API_C( void )
+OTCfigDeleteConfiguration (OTConfigurationRef cfig);
+
+EXTERN_API_C( OTConfigurationRef )
+OTCfigCloneConfiguration (OTConfigurationRef cfig);
+
+EXTERN_API_C( OTConfigurationRef )
+OTCfigPushNewSingleChild (OTConfigurationRef cfig,
+ const char * path,
+ OSStatus * errPtr);
+
+EXTERN_API_C( OTConfigurationRef )
+OTCfigPushParent (OTConfigurationRef cfig,
+ const char * path,
+ OSStatus * errPtr);
+
+EXTERN_API_C( OTConfigurationRef )
+OTCfigPushChild (OTConfigurationRef cfig,
+ OTItemCount index,
+ const char * path,
+ OSStatus * errPtr);
+
+EXTERN_API_C( OSStatus )
+OTCfigPopChild (OTConfigurationRef cfig,
+ OTItemCount index);
+
+EXTERN_API_C( OTConfigurationRef )
+OTCfigGetChild (OTConfigurationRef cfig,
+ OTItemCount index);
+
+EXTERN_API_C( OSStatus )
+OTCfigSetPath (OTConfigurationRef cfig,
+ const char * path);
+
+EXTERN_API_C( OTConfigurationRef )
+OTCfigNewChild (OTConfigurationRef cfig,
+ const char * path,
+ OSStatus * errPtr);
+
+EXTERN_API_C( OSStatus )
+OTCfigAddChild (OTConfigurationRef cfig,
+ OTConfigurationRef child);
+
+EXTERN_API_C( OTConfigurationRef )
+OTCfigRemoveChild (OTConfigurationRef cfig,
+ OTItemCount index);
+
+EXTERN_API_C( void )
+OTCfigSetPortRef (OTConfigurationRef cfig,
+ OTPortRef portRef);
+
+EXTERN_API_C( void )
+OTCfigChangeProviderName (OTConfigurationRef cfig,
+ const char * name);
+
+/* Query a configuration*/
+
+EXTERN_API_C( UInt16 )
+OTCfigNumberOfChildren (OTConfigurationRef cfig);
+
+EXTERN_API_C( OTConfigurationRef )
+OTCfigGetParent (OTConfigurationRef cfig);
+
+EXTERN_API_C( TNetbuf *)
+OTCfigGetOptionNetbuf (OTConfigurationRef cfig);
+
+EXTERN_API_C( OTPortRef )
+OTCfigGetPortRef (OTConfigurationRef cfig);
+
+EXTERN_API_C( UInt32 )
+OTCfigGetInstallFlags (OTConfigurationRef cfig);
+
+EXTERN_API_C( const char *)
+OTCfigGetProviderName (OTConfigurationRef cfig);
+
+EXTERN_API_C( Boolean )
+OTCfigIsPort (OTConfigurationRef cfig);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* !OTKERNEL */
+
+/* ***** Configurators ******/
+/*
+ The kOTConfiguratorInterfaceID define is what you need to add to your
+ export file for the "interfaceID = " clause to export a configurator
+ for ASLM. Similarly, kOTConfiguratorCFMTag is used for CFM-based
+ configurators.
+*/
+
+
+#define kOTConfiguratorInterfaceID kOTClientPrefix "cfigMkr"
+#define kOTConfiguratorCFMTag kOTClientPrefix "cfigMkr"
+
+#if !OTKERNEL
+#ifdef __cplusplus
+ class TOTConfigurator;
+ typedef class TOTConfigurator* TOTConfiguratorRef;
+#else
+ typedef struct TOTConfigurator TOTConfigurator;
+ typedef TOTConfigurator* TOTConfiguratorRef;
+#endif
+/*
+ Typedef for the OTCanConfigure function, and the enum for which pass we're doing.
+ The first (kOTSpecificConfigPass) is to give configurators a shot at the configuration
+ before we start allowing the generic configurators to get into the act.
+*/
+enum {
+ kOTSpecificConfigPass = 0,
+ kOTGenericConfigPass = 1
+};
+
+typedef CALLBACK_API_C( Boolean , OTCanConfigureProcPtr )(OTConfigurationRef cfig, UInt32 pass);
+/* Typedef for the function to create and return a configurator object*/
+typedef CALLBACK_API_C( OSStatus , OTCreateConfiguratorProcPtr )(TOTConfiguratorRef *cfigor);
+/*
+ Typedef for the "OTSetupConfigurator" function that your configurator library must export.
+ The enum is for the type of configurator that it is.
+*/
+#define kOTSetupConfiguratorID "OTSetupConfigurator"
+enum {
+ kOTDefaultConfigurator = 0,
+ kOTProtocolFamilyConfigurator = 1,
+ kOTLinkDriverConfigurator = 2
+};
+
+typedef CALLBACK_API_C( OSStatus , OTSetupConfiguratorProcPtr )(OTCanConfigureProcPtr *canConfigure, OTCreateConfiguratorProcPtr *createConfigurator, UInt8 *configuratorType);
+/*
+ Procedure pointer definitions for the three key callbacks associated
+ with a configurator, as established by OTNewConfigurator.
+*/
+typedef CALLBACK_API_C( OSStatus , OTCFConfigureProcPtr )(TOTConfiguratorRef cfigor, OTConfigurationRef cfig);
+typedef CALLBACK_API_C( OSStatus , OTCFCreateStreamProcPtr )(TOTConfiguratorRef cfigor, OTConfigurationRef cfig, OTOpenFlags oFlags, OTNotifyUPP proc, void *contextPtr);
+typedef CALLBACK_API_C( void , OTCFHandleSystemEventProcPtr )(TOTConfiguratorRef cfigor, OTEventCode code, OTResult result, void *cookie);
+/*
+ Determine if this instance of your configurator is the "master"
+ (the one that can create and destroy control streams)
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( Boolean )
+OTIsMasterConfigurator (TOTConfiguratorRef cfigor);
+
+/* Get back the userData you passed in to OTNewConfigurator*/
+EXTERN_API_C( void *)
+OTGetConfiguratorUserData (TOTConfiguratorRef cfigor);
+
+/* Create a configurator object for use by Open Transport*/
+EXTERN_API_C( TOTConfiguratorRef )
+OTNewConfigurator (void * userData,
+ OTCFConfigureProcPtr configure,
+ OTCFCreateStreamProcPtr createStream,
+ OTCFHandleSystemEventProcPtr handleEvent);
+
+/* Delete a configurator object created by OTNewConfigurator*/
+EXTERN_API_C( void )
+OTDeleteConfigurator (TOTConfiguratorRef cfigor);
+
+/*
+ A utility function to send notifications to the user - it takes care of calls
+ from deferred tasks
+*/
+EXTERN_API_C( OSStatus )
+OTNotifyUser (FSSpec * theFile,
+ SInt32 rsrcID,
+ OTItemCount index,
+ char * parm1,
+ char * parm2);
+
+/* Call when the configurator unloads from memory*/
+EXTERN_API_C( void )
+OTConfiguratorUnloaded (TOTConfiguratorRef cfigor);
+
+/*
+ Call to create your control stream if you're not the master
+ configurator. You can also use the state machine function
+ OTSMCreateControlStream(OTStateMachine*, OTConfigurationRef, TOTConfiguratorRef cfigor).
+*/
+EXTERN_API_C( OSStatus )
+OTCreateControlStream (OTConfigurationRef cfig,
+ TOTConfiguratorRef cfigor,
+ OTNotifyUPP proc,
+ void * contextPtr);
+
+/*
+ A helpful function for the configurators to
+ be able to recursively configure the children.
+*/
+EXTERN_API_C( OSStatus )
+OTConfigureChildren (OTConfigurationRef cfig);
+
+/* Allocate a bit in the system-wide control mask for streams.*/
+EXTERN_API_C( UInt32 )
+OTNewControlMask (void);
+
+/* Warning: These 2 APIs is going away*/
+EXTERN_API_C( void )
+OTCloseProvidersByUseCount (SInt32 * useCount,
+ OTResult reason,
+ OTBooleanParam doneDeal);
+
+EXTERN_API_C( void )
+OTCloseProvidersByPortRef (OTPortRef ref,
+ OTResult reason,
+ OTBooleanParam doneDeal);
+
+/* These are the "real" APIs*/
+EXTERN_API_C( void )
+OTCloseProviderByStream (StreamRef ref,
+ OTResult reason,
+ OTBooleanParam doneDeal);
+
+EXTERN_API_C( void )
+OTCloseMatchingProviders (UInt32 mask,
+ OTPortRef port,
+ OTResult reason,
+ OTBooleanParam doneDeal);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* !OTKERNEL */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+/* ***** OTStateMachine ******/
+#if CALL_NOT_IN_CARBON
+/*
+ This utility set allows you to write an asynchronous chain of code that looks
+ somewhat like it is synchronous. This is primarily used for plumbing
+ streams asynchronously, especially in configurators
+*/
+#if !OTKERNEL
+/* Alas, the state machine is only available to client code. Sorry.*/
+
+/*
+ There are 12 or 8 bytes of reserved space at the front of
+ the OTStateMachine structure, depending on whether you're
+ building PowerPC or 68K code.. The OTStateMachineDataPad
+ type compensates for this.
+*/
+
+#if TARGET_CPU_PPC
+typedef UInt8 OTStateMachineDataPad[12];
+#else
+typedef UInt8 OTStateMachineDataPad[8];
+#endif /* TARGET_CPU_PPC */
+
+/*
+ Forward define OTStateMachine so that OTStateProcPtr has
+ access to it.
+*/
+typedef struct OTStateMachine OTStateMachine;
+/*
+ This type is is the required prototype of a state machine
+ entry point.
+*/
+typedef CALLBACK_API( void , OTStateProcPtr )(OTStateMachine *sm);
+/*
+ This type defines a routine that the state machine will
+ call when the top level completes.
+*/
+typedef CALLBACK_API_C( void , OTSMCompleteProcPtr )(void *contextPtr);
+/* And now for the state machine structure itself.*/
+
+struct OTStateMachine {
+ OTStateMachineDataPad fData;
+ void * fCookie;
+ OTEventCode fCode;
+ OTResult fResult;
+#ifdef __cplusplus
+
+ // C++ inline methods on this structure.
+
+
+
+ void* GetClientData();
+
+ Boolean CallStateProc(OTStateProcPtr proc, UInt32 state = 0);
+
+ UInt16 GetState();
+
+ void SetState(UInt32 state);
+
+ void Complete();
+
+ void Complete(OTResult result);
+
+ void Complete(OTResult result, OTEventCode code, void* contextPtr);
+
+ void CompleteToClient();
+
+ void CompleteToClient(OTResult result);
+
+ void CompleteToClient(OTResult result, OTEventCode code, void* contexPtr);
+
+ void PopCallback();
+
+ Boolean CreateStream(OTConfigurationRef cfig, OTOpenFlags flags);
+
+ Boolean OpenStream(const char* name, OTOpenFlags flags);
+
+ Boolean SendIoctl(StreamRef ref, UInt32 type, void* data);
+
+ Boolean SendIoctl(StreamRef ref, UInt32 type, long data);
+
+ Boolean PutMessage(StreamRef ref, strbuf* ctl, strbuf* data, OTFlags flags);
+
+ Boolean GetMessage(StreamRef ref, strbuf* ctl, strbuf* data, OTFlags* flagPtr);
+
+ OSStatus ReturnToCaller();
+
+#endif
+
+};
+
+#define kOTSMBufferSize(callDepth) (80 + (callDepth * 8))
+/*
+ For structSize, pass the size of your structure that you want associated with
+ the state machine. It can later be obtained by calling OTSMGetClientData.
+ For bufSize, use the kOTSMBufferSize macro, plus the size of your structure
+ to create a buffer on the stack. For synchronous calls, the stack buffer will
+ be used (unless you pass in NULL). The callDepth is the depth level of nested
+ calls using OTSMCallStateProc.
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OTStateMachine *)
+OTCreateStateMachine (void * buf,
+ OTByteCount bufSize,
+ OTByteCount structSize,
+ OTNotifyUPP proc,
+ void * contextPtr);
+
+EXTERN_API_C( void )
+OTDestroyStateMachine (OTStateMachine * sm);
+
+/*
+ OTSMCallStateProc used to take a parameter of type UInt16_p,
+ which was defined to be the same as UInt32. In an attempt
+ to reduce the number of wacky types defined by the OT
+ interfaces, we've changed these routines to just take a
+ straight UInt32. You should be warned that the current
+ implementation does not support values outside of the
+ range 0..32767. The same applies to OTSMSetState.
+*/
+
+EXTERN_API_C( Boolean )
+OTSMCallStateProc (OTStateMachine * sm,
+ OTStateProcPtr proc,
+ UInt32 state);
+
+EXTERN_API_C( UInt16 )
+OTSMGetState (OTStateMachine * sm);
+
+EXTERN_API_C( void )
+OTSMSetState (OTStateMachine * sm,
+ UInt32 state);
+
+/* Fill out the fCookie, fCode, and fResult fields before calling!*/
+EXTERN_API_C( void )
+OTSMComplete (OTStateMachine * sm);
+
+EXTERN_API_C( void )
+OTSMPopCallback (OTStateMachine * sm);
+
+EXTERN_API_C( Boolean )
+OTSMWaitForComplete (OTStateMachine * sm);
+
+EXTERN_API_C( Boolean )
+OTSMCreateStream (OTStateMachine * sm,
+ OTConfigurationRef cfig,
+ OTOpenFlags flags);
+
+EXTERN_API_C( Boolean )
+OTSMOpenStream (OTStateMachine * sm,
+ const char * name,
+ OTOpenFlags flags);
+
+EXTERN_API_C( Boolean )
+OTSMIoctl (OTStateMachine * sm,
+ StreamRef strm,
+ UInt32 cmd,
+ long data);
+
+EXTERN_API_C( Boolean )
+OTSMPutMessage (OTStateMachine * sm,
+ StreamRef strm,
+ strbuf * ctlbuf,
+ strbuf * databuf,
+ OTFlags flags);
+
+EXTERN_API_C( Boolean )
+OTSMGetMessage (OTStateMachine * sm,
+ StreamRef strm,
+ strbuf * ctlbuf,
+ strbuf * databuf,
+ OTFlags * flagsPtr);
+
+EXTERN_API_C( OSStatus )
+OTSMReturnToCaller (OTStateMachine * sm);
+
+EXTERN_API_C( void *)
+OTSMGetClientData (OTStateMachine * sm);
+
+EXTERN_API_C( void )
+OTSMInstallCompletionProc (OTStateMachine * sm,
+ OTSMCompleteProcPtr completeProc,
+ void * contextPtr);
+
+EXTERN_API_C( Boolean )
+OTSMCreateControlStream (OTStateMachine * sm,
+ OTConfigurationRef cfig,
+ TOTConfiguratorRef cfigor);
+
+
+#ifdef __cplusplus
+ inline void* OTStateMachine::GetClientData() { return OTSMGetClientData(this); }
+ inline Boolean OTStateMachine::CallStateProc(OTStateProcPtr proc, UInt32 state)
+ { return OTSMCallStateProc(this, proc, state); }
+ inline UInt16 OTStateMachine::GetState() { return OTSMGetState(this); }
+ inline void OTStateMachine::SetState(UInt32 state)
+ { OTSMSetState(this, state); }
+ inline void OTStateMachine::PopCallback() { OTSMPopCallback(this); }
+ inline void OTStateMachine::Complete() { OTSMComplete(this); }
+ inline void OTStateMachine::Complete(OTResult result, OTEventCode code, void* cookie)
+ { fCookie = cookie; fCode = code; fResult = result; Complete(); }
+ inline void OTStateMachine::Complete(OTResult result)
+ { fResult = result; Complete(); }
+ inline void OTStateMachine::CompleteToClient()
+ { PopCallback(); Complete(); }
+ inline void OTStateMachine::CompleteToClient(OTResult result)
+ { fResult = result; CompleteToClient(); }
+
+ inline void OTStateMachine::CompleteToClient(OTResult result, OTEventCode code, void* cookie)
+ { fCookie = cookie; fCode = code; fResult = result; CompleteToClient(); }
+ inline Boolean OTStateMachine::CreateStream(OTConfigurationRef cfig, OTOpenFlags flags)
+ { return OTSMCreateStream(this, cfig, flags); }
+ inline Boolean OTStateMachine::OpenStream(const char* name, OTOpenFlags flags)
+ { return OTSMOpenStream(this, name, flags); }
+ inline Boolean OTStateMachine::SendIoctl(StreamRef ref, UInt32 type, void* data)
+ { return OTSMIoctl(this, ref, type, (long)data); }
+ inline Boolean OTStateMachine::SendIoctl(StreamRef ref, UInt32 type, long data)
+ { return OTSMIoctl(this, ref, type, data); }
+ inline Boolean OTStateMachine::PutMessage(StreamRef ref, struct strbuf* ctl, struct strbuf* data, OTFlags flags)
+ { return OTSMPutMessage(this, ref, ctl, data, flags); }
+ inline Boolean OTStateMachine::GetMessage(StreamRef ref, struct strbuf* ctl, struct strbuf* data, OTFlags* flagPtr)
+ { return OTSMGetMessage(this, ref, ctl, data, flagPtr); }
+ inline OSStatus OTStateMachine::ReturnToCaller()
+ { return OTSMReturnToCaller(this); }
+#endif
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* !OTKERNEL */
+
+/* ***** Autopush Definitions ******/
+/*
+ The autopush functionality for Open Transport is based on the names of
+ devices and modules, rather than on the major number information like
+ SVR4. This is so that autopush information can be set up for modules
+ that are not yet loaded.
+*/
+
+
+/* The name of the STREAMS driver you open and send the ioctls to.*/
+#define kSADModuleName "sad"
+/* Autopush ioctls.*/
+enum {
+ I_SAD_SAP = ((MIOC_SAD << 8) | 1), /* Set autopush information */
+ I_SAD_GAP = ((MIOC_SAD << 8) | 2), /* Get autopush information */
+ I_SAD_VML = ((MIOC_SAD << 8) | 3) /* Validate a list of modules (uses str_list structure) */
+};
+
+/* Maximum number of modules autopushed on a driver.*/
+
+enum {
+ kOTAutopushMax = 8
+};
+
+
+/* ioctl structure used for SAD_SAP and SAD_GAP commands.*/
+
+
+struct OTAutopushInfo {
+ UInt32 sap_cmd;
+ char sap_device_name[32];
+ SInt32 sap_minor;
+ SInt32 sap_lastminor;
+ SInt32 sap_npush;
+ char sap_list[8][32];
+};
+typedef struct OTAutopushInfo OTAutopushInfo;
+/* Command values for sap_cmd field of the above.*/
+enum {
+ kSAP_ONE = 1, /* Configure a single minor device */
+ kSAP_RANGE = 2, /* Configure a range of minor devices */
+ kSAP_ALL = 3, /* Configure all minor devices */
+ kSAP_CLEAR = 4 /* Clear autopush information */
+};
+
+
+/* ***** Configuration Helpers ******/
+
+/*
+ These definitions are used by device driver and port scanner
+ developers to provide a library giving client-side information about
+ the registered ports, such as a user-visible name or an icon.
+*/
+
+/* Configuration helper library prefix*/
+
+/*
+ This prefix is prepended to the string found in the "fResourceInfo"
+ field of the OTPortRecord to build the actual library name of the
+ configuration helper library.
+*/
+
+#define kPortConfigLibPrefix "OTPortCfg$"
+
+/* Get user visible port name entry point.*/
+
+/*
+ This entry point returns the user visible name of the port. If includeSlot
+ is true, a slot distinguishing suffix (eg "slot X") should be added. If
+ includePort is true, a port distinguishing suffix (eg " port X") should be added for
+ multiport cards.
+*/
+
+#define kOTGetUserPortNameID "OTGetUserPortName"
+typedef CALLBACK_API_C( void , OTGetPortNameProcPtr )(OTPortRecord *port, OTBooleanParam includeSlot, OTBooleanParam includePort, Str255 userVisibleName);
+/* Get icon entry point.*/
+/*
+ This entry point returns the location of the icon for the port. Return false if no
+ icon is provided.
+*/
+
+#define kOTGetPortIconID "OTGetPortIcon"
+
+struct OTResourceLocator {
+ FSSpec fFile;
+ UInt16 fResID;
+};
+typedef struct OTResourceLocator OTResourceLocator;
+typedef CALLBACK_API_C( Boolean , OTGetPortIconProcPtr )(OTPortRecord *port, OTResourceLocator *iconLocation);
+/* ***** Application Access to Configuration Helpers ******/
+
+#if !OTKERNEL
+/*
+ These routines are used by clients to get information about ports.
+ The canonical user of these routines is the OT control panel(s),
+ but applications may want to use them as well (to display the list
+ of available Ethernet cards, for example).
+*/
+/* Returns a user friendly name for a port.*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( void )
+OTGetUserPortNameFromPortRef (OTPortRef ref,
+ Str255 friendlyName);
+
+/*
+ Returns the location for the icon familly representing the port.
+ Returns false if the port has no icon.
+*/
+EXTERN_API_C( Boolean )
+OTGetPortIconFromPortRef (OTPortRef ref,
+ OTResourceLocator * iconLocation);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+/* Returns true if the port can be used with the specified protocol.*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( Boolean )
+OTIsPortCompatibleWith (const OTPortRecord * port,
+ char * protocolName);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* !OTKERNEL */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+/* ***** Common Utilities ******/
+/*
+ The utilities defined in this section are available to both client
+ and kernel code. Cool huh? These utilities differ from those
+ provided in "OpenTransport.h" in that they are only available to native
+ architecture clients.
+*/
+
+/* Bitmap functions*/
+
+/* These functions atomically deal with a bitmap that is multiple-bytes long*/
+
+/*
+ Set the first clear bit in "bitMap", starting with bit "startBit",
+ giving up after "numBits". Returns the bit # that was set, or
+ a kOTNotFoundErr if there was no clear bit available
+*/
+EXTERN_API_C( OTResult )
+OTSetFirstClearBit (UInt8 * bitMap,
+ OTByteCount startBit,
+ OTByteCount numBits);
+
+/* Standard clear, set and test bit functions*/
+EXTERN_API_C( Boolean )
+OTClearBit (UInt8 * bitMap,
+ OTByteCount bitNo);
+
+EXTERN_API_C( Boolean )
+OTSetBit (UInt8 * bitMap,
+ OTByteCount bitNo);
+
+EXTERN_API_C( Boolean )
+OTTestBit (UInt8 * bitMap,
+ OTByteCount bitNo);
+
+/* OTHashList*/
+
+/*
+ This implements a simple, but efficient hash list. It is not
+ thread-safe.
+*/
+
+typedef CALLBACK_API_C( UInt32 , OTHashProcPtr )(OTLink *linkToHash);
+typedef CALLBACK_API_C( Boolean , OTHashSearchProcPtr )(const void *ref, OTLink *linkToCheck);
+
+struct OTHashList {
+ OTHashProcPtr fHashProc;
+ ByteCount fHashTableSize;
+ OTLink ** fHashBuckets;
+#ifdef __cplusplus
+
+ // C++ inline methods on this structure.
+
+
+
+ void Add(OTLink* toAdd);
+
+ Boolean RemoveLink(OTLink* toRemove);
+
+ OTLink* Remove(OTHashSearchProcPtr proc, const void* refPtr, UInt32 hashValue);
+
+ Boolean IsInList(OTLink* toFind);
+
+ OTLink* FindLink(OTHashSearchProcPtr proc, const void* refPtr, UInt32 hash);
+
+#endif
+
+};
+typedef struct OTHashList OTHashList;
+/*
+ Return the number of bytes of memory needed to create a hash list
+ of at least "numEntries" entries.
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OTByteCount )
+OTCalculateHashListMemoryNeeds (OTItemCount numEntries);
+
+/*
+ Create an OTHashList from "memory". Return an error if it
+ couldn't be done.
+*/
+EXTERN_API_C( OTResult )
+OTInitHashList (void * memory,
+ OTByteCount numBytes,
+ OTHashProcPtr hashProc);
+
+EXTERN_API_C( void )
+OTAddToHashList (OTHashList * hashList,
+ OTLink * linkToAdd);
+
+EXTERN_API_C( Boolean )
+OTRemoveLinkFromHashList (OTHashList * hashList,
+ OTLink * linkToRemove);
+
+EXTERN_API_C( Boolean )
+OTIsInHashList (OTHashList * hashList,
+ OTLink * link);
+
+EXTERN_API_C( OTLink *)
+OTFindInHashList (OTHashList * hashList,
+ OTHashSearchProcPtr searchProc,
+ const void * refPtr,
+ UInt32 hashValue);
+
+EXTERN_API_C( OTLink *)
+OTRemoveFromHashList (OTHashList * hashList,
+ OTHashSearchProcPtr searchProc,
+ const void * refPtr,
+ UInt32 hashValue);
+
+
+#ifdef __cplusplus
+ // C++ inline methods on this structure.
+
+ inline void OTHashList::Add(OTLink* toAdd) { OTAddToHashList(this, toAdd); }
+
+ inline Boolean OTHashList::RemoveLink(OTLink* toRemove)
+ { return OTRemoveLinkFromHashList(this, toRemove); }
+ inline OTLink* OTHashList::Remove(OTHashSearchProcPtr proc, const void* refPtr, UInt32 hashValue)
+ { return OTRemoveFromHashList(this, proc, refPtr, hashValue); }
+ inline Boolean OTHashList::IsInList(OTLink* toFind)
+ { return OTIsInHashList(this, toFind); }
+ inline OTLink* OTHashList::FindLink(OTHashSearchProcPtr proc, const void* refPtr, UInt32 hash)
+ { return OTFindInHashList(this, proc, refPtr, hash); }
+#endif
+
+/* Random functions*/
+
+/*
+ These implement a very simple random number generator, suitable
+ for protocol implementations but not "cryptographically" random.
+*/
+
+EXTERN_API_C( UInt32 )
+OTGetRandomSeed (void);
+
+EXTERN_API_C( UInt32 )
+OTGetRandomNumber (UInt32 * seed,
+ UInt32 lo,
+ UInt32 hi);
+
+/* Concurrency Control*/
+
+/*
+ OTGate implements a cool concurrency control primitive.
+ You're not going to understand it without reading the documentation!
+ See "Open Transport Advanced Client Programming" for details.
+ WARNING:
+ This structure must be on a 4-byte boundary.
+*/
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API_C( Boolean , OTGateProcPtr )(OTLink *thisLink);
+
+struct OTGate {
+ OTLIFO fLIFO;
+ OTList fList;
+ OTGateProcPtr fProc;
+ SInt32 fNumQueued;
+ SInt32 fInside;
+};
+typedef struct OTGate OTGate;
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( void )
+OTInitGate (OTGate * gate,
+ OTGateProcPtr proc);
+
+EXTERN_API_C( Boolean )
+OTEnterGate (OTGate * gate,
+ OTLink * withLink);
+
+EXTERN_API_C( Boolean )
+OTLeaveGate (OTGate * gate);
+
+/* ***** Shared Library Bonus Extras ******/
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+/*
+ These routines provide addition shared library support beyond
+ that provided by the base shared library mechanism.
+*/
+/*
+ Some flags which can be passed to the "loadFlags" parameter of the
+ various CFM routines. Not all flags can be used with all routines.
+ See "Open Transport Advanced Client Programming" for details.
+*/
+
+enum {
+ kOTGetDataSymbol = 0,
+ kOTGetCodeSymbol = 1,
+ kOTLoadNewCopy = 2,
+ kOTLoadACopy = 4,
+ kOTFindACopy = 8,
+ kOTLibMask = kOTLoadNewCopy | kOTLoadACopy | kOTFindACopy,
+ kOTLoadLibResident = 0x20
+};
+
+/* Finding all matching CFM libraries.*/
+
+/*
+ The routine OTFindCFMLibraries allows you to find all CFM libraries
+ that match specific criteria. The result is placed in a list
+ of CFMLibraryInfo structures. OT allocates those structures using
+ a routine of type OTAllocMemProcPtr that you pass to OTFindCFMLibraries.
+*/
+
+/*
+ A list of CFMLibraryInfo structures is returned by the OTFindCFMLibraries routine.
+ The list is created out of the data that is passed to the function.
+
+ IMPORTANT:
+ Only the first 3 fields are valid when using OT 1.2 and older.
+*/
+
+
+struct CFMLibraryInfo {
+ OTLink link; /* To link them all up on a list */
+ char * libName; /* "C" String which is fragment name */
+ StringPtr intlName; /* Pascal String which is internationalized name */
+ FSSpec * fileSpec; /* location of fragment's file */
+ StringPtr pstring2; /* Secondary string from extended cfrg */
+ StringPtr pstring3; /* Extra info from extended cfrg */
+};
+typedef struct CFMLibraryInfo CFMLibraryInfo;
+/*
+ You must pass a routine of type OTAllocMemProcPtr to OTFindCFMLibraries
+ which it calls to allocate memory for the CFMLibraryInfo structures.
+*/
+typedef CALLBACK_API_C( void *, OTAllocMemProcPtr )(OTByteCount size);
+/* Find CFM libraries of the specified kind and type*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+OTFindCFMLibraries (OSType libKind,
+ const char * libType,
+ OTList * theList,
+ OTAllocMemProcPtr allocator);
+
+/* Loading libraries and connecting to symbols.*/
+
+/* Load a CFM library by name*/
+EXTERN_API_C( OSStatus )
+OTLoadCFMLibrary (const char * libName,
+ UInt32 * connID,
+ UInt32 loadFlags);
+
+/* Load a CFM library and get a named pointer from it*/
+EXTERN_API_C( void *)
+OTGetCFMPointer (const char * libName,
+ const char * entryName,
+ UInt32 * connID,
+ UInt32 loadFlags);
+
+/* Get a named pointer from a CFM library that's already loaded*/
+EXTERN_API_C( void *)
+OTGetCFMSymbol (const char * entryName,
+ UInt32 connID,
+ UInt32 loadFlags);
+
+/* Release a connection to a CFM library*/
+EXTERN_API_C( void )
+OTReleaseCFMConnection (UInt32 * connID);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if !TARGET_CPU_68K
+/*
+ You can call these routines in your CFM initialisation and termination
+ routines to hold or unhold your libraries sections.
+*/
+/*
+ Used in a CFM InitProc, will hold the executable code, if applicable.
+ This can also be the InitProc of the library
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+OTHoldThisCFMLibrary (const CFragInitBlock * initBlock);
+
+/*
+ Used in a CFM terminate proc, will unhold the executable code, if applicable.
+ This can also be the terminate proc of the library
+*/
+EXTERN_API_C( void )
+OTUnholdThisCFMLibrary (void);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* !TARGET_CPU_68K */
+
+/* ASLM Utilities*/
+/* Load an ASLM library*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+OTLoadASLMLibrary (const char * libName);
+
+/* Unload an ASLM library*/
+EXTERN_API_C( void )
+OTUnloadASLMLibrary (const char * libName);
+
+/*
+ This is an ASLM utility routine. You can get it by including
+ "LibraryManagerUtilities.h", but since we only use a few ASLM utilities,
+ we put the prototype here for convenience.
+*/
+
+EXTERN_API_C( void )
+UnloadUnusedLibraries (void);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if !OTKERNEL
+/*******************************************************************************
+** A few C++ objects for C++ fans
+********************************************************************************/
+#if CALL_NOT_IN_CARBON
+
+#ifdef __cplusplus
+} // Terminate C definitions
+
+ class OTConfiguration
+ {
+ public:
+ OTConfigurationRef Clone()
+ { return OTCfigCloneConfiguration(this); }
+ //
+ // The Path for PushChild and PushParent must be a single module
+ //
+ OTConfigurationRef PushChild(const char* path, OSStatus* errPtr)
+ { return OTCfigPushNewSingleChild(this, path, errPtr); }
+ OTConfigurationRef PushParent(const char* path, OSStatus* errPtr)
+ { return OTCfigPushParent(this, path, errPtr); }
+ OTConfigurationRef PushNthChild(OTItemCount index, const char* path,
+ OSStatus* errPtr)
+ { return OTCfigPushChild(this, index, path, errPtr); }
+ OSStatus PopChild(OTItemCount index)
+ { return OTCfigPopChild(this, index); }
+
+ OTConfigurationRef GetChild(OTItemCount index = 0)
+ { return OTCfigGetChild(this, index); }
+ OTConfigurationRef GetParent()
+ { return OTCfigGetParent(this); }
+
+ OSStatus AddChild(OTConfigurationRef child)
+ { return OTCfigAddChild(this, child); }
+
+ OTConfigurationRef NewChild(const char* path, OSStatus* errPtr)
+ { return OTCfigNewChild(this, path, errPtr); }
+
+ OSStatus SetPath(const char* path)
+ { return OTCfigSetPath(this, path); }
+
+ Boolean HasOptions()
+ { return OTCfigGetOptionNetbuf(this)->len != 0; }
+ };
+
+/* -------------------------------------------------------------------------
+ Class TOTConfigurator
+
+ This class is subclassed to do configuration for a protocol or protocol stack.
+ Of course, you can also use OTNewConfigurator to do it from C.
+
+ If you subclass it using C++, you MUST have a UInt32 field as the first
+ field of your object that you do not touch or use.
+ ------------------------------------------------------------------------- */
+
+#if TARGET_CPU_68K && !defined(__SC__) && !defined(THINK_CPLUS)
+ class TOTConfigurator : public SingleObject
+#else
+ class TOTConfigurator
+#endif
+ {
+ #if defined(__SC__) || defined(THINK_CPLUS) || defined(__MRC__)
+ private:
+ virtual void DummyVirtualFunction();
+ #endif
+
+ public:
+ void* operator new(OTByteCount size)
+ { return OTAllocSharedClientMem(size); }
+ void operator delete(void* mem)
+ { OTFreeSharedClientMem(mem); };
+
+ _MDECL TOTConfigurator();
+ virtual ~ _MDECL TOTConfigurator();
+
+ virtual void _MDECL HandleSystemEvent(OTEventCode event, OTResult result,
+ void* cookie) = 0;
+
+ virtual OSStatus _MDECL Configure(OTConfigurationRef) = 0;
+ virtual OSStatus _MDECL CreateStream(OTConfigurationRef, OTOpenFlags,
+ OTNotifyUPP, void* contextPtr) = 0;
+ };
+
+extern "C" { // resume C definitions
+#endif /*__cplusplus*/
+
+#endif /* CALL_NOT_IN_CARBON */
+#endif /* !OTKERNEL */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if defined(__MWERKS__) && TARGET_CPU_68K
+ #pragma pop
+#endif
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __OPENTRANSPORTPROTOCOL__ */
+
diff --git a/include/qt/OpenTransportProviders.h b/include/qt/OpenTransportProviders.h
new file mode 100644
index 000000000..932f9c69e
--- /dev/null
+++ b/include/qt/OpenTransportProviders.h
@@ -0,0 +1,1791 @@
+/*
+ File: OpenTransportProviders.h
+
+ Contains: This file contains provider-specific definitions for various built-in providers.
+
+ Version: Technology: 2.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1993-2001 by Apple Computer, Inc. and Mentat Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __OPENTRANSPORTPROVIDERS__
+#define __OPENTRANSPORTPROVIDERS__
+
+#ifndef __OPENTRANSPORT__
+#include "OpenTransport.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if defined(__MWERKS__) && TARGET_CPU_68K
+ #pragma push
+ #pragma pointers_in_D0
+#endif
+
+
+/* ***** TCP/IP ******/
+
+/* Basic types*/
+
+typedef UInt16 InetPort;
+typedef UInt32 InetHost;
+/* Enums used as address type designations.*/
+#ifndef AF_INET /* might conflict with BSD headers */
+enum {
+ AF_INET = 2, /* Traditonal*/
+ AF_DNS = 42 /* Obviously, the answer to...*/
+};
+
+#else
+enum {
+ AF_DNS = 42 // Obviously, the answer to...
+};
+#endif
+/*
+ Enum which can be used to bind to all IP interfaces
+ rather than a specific one.
+*/
+enum {
+ kOTAnyInetAddress = 0 /* Wildcard*/
+};
+
+/*
+ Define the InetSvcRef type. This type needs special
+ processing because in C++ it's a subclass of TProvider.
+ See the definition of TEndpointRef in "OpenTransport.h"
+ for the logic behind this definition.
+*/
+
+#ifdef __cplusplus
+ typedef class TInternetServices* InetSvcRef;
+#else
+ typedef void* InetSvcRef;
+#endif
+#define kDefaultInternetServicesPath ((OTConfigurationRef)-3L)
+/* Shared library prefixes*/
+
+
+#define kInetVersion "3.1.1"
+#define kInetPrefix "ot:inet$"
+
+/* Module Names*/
+
+
+#define kDNRName "dnr"
+#define kTCPName "tcp"
+#define kUDPName "udp"
+#define kRawIPName "rawip"
+
+/* XTI Options*/
+
+/* Protocol levels*/
+
+enum {
+ INET_IP = 0x00,
+ INET_TCP = 0x06,
+ INET_UDP = 0x11
+};
+
+/* TCP Level Options*/
+
+enum {
+ TCP_NODELAY = 0x01,
+ TCP_MAXSEG = 0x02,
+ TCP_NOTIFY_THRESHOLD = 0x10, /** not a real XTI option */
+ TCP_ABORT_THRESHOLD = 0x11, /** not a real XTI option */
+ TCP_CONN_NOTIFY_THRESHOLD = 0x12, /** not a real XTI option */
+ TCP_CONN_ABORT_THRESHOLD = 0x13, /** not a real XTI option */
+ TCP_OOBINLINE = 0x14, /** not a real XTI option */
+ TCP_URGENT_PTR_TYPE = 0x15, /** not a real XTI option */
+ TCP_KEEPALIVE = 0x0008 /* keepalive defined in OpenTransport.h */
+};
+
+enum {
+ T_GARBAGE = 2
+};
+
+/* UDP Level Options*/
+
+enum {
+ UDP_CHECKSUM = 0x0600,
+ UDP_RX_ICMP = 0x02
+};
+
+/* IP Level Options*/
+enum {
+ kIP_OPTIONS = 0x01,
+ kIP_TOS = 0x02,
+ kIP_TTL = 0x03,
+ kIP_REUSEADDR = 0x04,
+ kIP_DONTROUTE = 0x10,
+ kIP_BROADCAST = 0x20,
+ kIP_REUSEPORT = 0x0200,
+ kIP_HDRINCL = 0x1002,
+ kIP_RCVOPTS = 0x1005,
+ kIP_RCVDSTADDR = 0x1007,
+ kIP_MULTICAST_IF = 0x1010, /* set/get IP multicast interface */
+ kIP_MULTICAST_TTL = 0x1011, /* set/get IP multicast timetolive */
+ kIP_MULTICAST_LOOP = 0x1012, /* set/get IP multicast loopback */
+ kIP_ADD_MEMBERSHIP = 0x1013, /* add an IP group membership */
+ kIP_DROP_MEMBERSHIP = 0x1014, /* drop an IP group membership */
+ kIP_BROADCAST_IFNAME = 0x1015, /* Set interface for broadcasts */
+ kIP_RCVIFADDR = 0x1016 /* Set interface for broadcasts */
+};
+
+/*
+ * The value of some of the following constants may conflict with
+ * the values found in the BSD header netinet/in.h.
+ * Use instead the constant defined in the enum, for example use
+ * kIP_OPTIONS instead of IP_OPTIONS.
+ */
+#ifndef IP_OPTIONS
+enum {
+ IP_OPTIONS = kIP_OPTIONS,
+ IP_TOS = kIP_TOS,
+ IP_TTL = kIP_TTL,
+ IP_REUSEADDR = kIP_REUSEADDR,
+ IP_DONTROUTE = kIP_DONTROUTE,
+ IP_BROADCAST = kIP_BROADCAST,
+ IP_REUSEPORT = kIP_REUSEPORT,
+ IP_HDRINCL = kIP_HDRINCL,
+ IP_RCVOPTS = kIP_RCVOPTS,
+ IP_RCVDSTADDR = kIP_RCVDSTADDR,
+ IP_MULTICAST_IF = kIP_MULTICAST_IF, /* set/get IP multicast interface */
+ IP_MULTICAST_TTL = kIP_MULTICAST_TTL, /* set/get IP multicast timetolive */
+ IP_MULTICAST_LOOP = kIP_MULTICAST_LOOP, /* set/get IP multicast loopback */
+ IP_ADD_MEMBERSHIP = kIP_ADD_MEMBERSHIP, /* add an IP group membership */
+ IP_DROP_MEMBERSHIP = kIP_DROP_MEMBERSHIP, /* drop an IP group membership */
+ IP_BROADCAST_IFNAME = kIP_BROADCAST_IFNAME, /* Set interface for broadcasts */
+ IP_RCVIFADDR = kIP_RCVIFADDR /* Set interface for broadcasts */
+};
+
+#endif
+
+enum {
+ DVMRP_INIT = 100, /* DVMRP-specific setsockopt commands, from ip_mroute.h*/
+ DVMRP_DONE = 101,
+ DVMRP_ADD_VIF = 102,
+ DVMRP_DEL_VIF = 103,
+ DVMRP_ADD_LGRP = 104,
+ DVMRP_DEL_LGRP = 105,
+ DVMRP_ADD_MRT = 106,
+ DVMRP_DEL_MRT = 107
+};
+
+
+/* IP_TOS precdence levels*/
+
+enum {
+ T_ROUTINE = 0,
+ T_PRIORITY = 1,
+ T_IMMEDIATE = 2,
+ T_FLASH = 3,
+ T_OVERRIDEFLASH = 4,
+ T_CRITIC_ECP = 5,
+ T_INETCONTROL = 6,
+ T_NETCONTROL = 7
+};
+
+/* IP_TOS type of service*/
+
+enum {
+ T_NOTOS = 0x00,
+ T_LDELAY = (1 << 4),
+ T_HITHRPT = (1 << 3),
+ T_HIREL = (1 << 2)
+};
+
+#define SET_TOS(prec,tos) (((0x7 & (prec)) << 5) | (0x1c & (tos)))
+/* IP Multicast option structures*/
+
+
+struct TIPAddMulticast {
+ InetHost multicastGroupAddress;
+ InetHost interfaceAddress;
+};
+typedef struct TIPAddMulticast TIPAddMulticast;
+/* Protocol-specific events*/
+enum {
+ T_DNRSTRINGTOADDRCOMPLETE = kPRIVATEEVENT + 1,
+ T_DNRADDRTONAMECOMPLETE = kPRIVATEEVENT + 2,
+ T_DNRSYSINFOCOMPLETE = kPRIVATEEVENT + 3,
+ T_DNRMAILEXCHANGECOMPLETE = kPRIVATEEVENT + 4,
+ T_DNRQUERYCOMPLETE = kPRIVATEEVENT + 5
+};
+
+/* InetAddress*/
+
+
+struct InetAddress {
+ OTAddressType fAddressType; /* always AF_INET*/
+ InetPort fPort; /* Port number */
+ InetHost fHost; /* Host address in net byte order*/
+ UInt8 fUnused[8]; /* Traditional unused bytes*/
+};
+typedef struct InetAddress InetAddress;
+/* Domain Name Resolver (DNR) */
+enum {
+ kMaxHostAddrs = 10,
+ kMaxSysStringLen = 32,
+ kMaxHostNameLen = 255
+};
+
+
+typedef char InetDomainName[256];
+
+struct InetHostInfo {
+ InetDomainName name;
+ InetHost addrs[10];
+};
+typedef struct InetHostInfo InetHostInfo;
+
+struct InetSysInfo {
+ char cpuType[32];
+ char osType[32];
+};
+typedef struct InetSysInfo InetSysInfo;
+
+struct InetMailExchange {
+ UInt16 preference;
+ InetDomainName exchange;
+};
+typedef struct InetMailExchange InetMailExchange;
+
+struct DNSQueryInfo {
+ UInt16 qType;
+ UInt16 qClass;
+ UInt32 ttl;
+ InetDomainName name;
+ UInt16 responseType; /* answer, authority, or additional*/
+ UInt16 resourceLen; /* actual length of array which follows*/
+ char resourceData[4]; /* size varies*/
+};
+typedef struct DNSQueryInfo DNSQueryInfo;
+/* DNSAddress*/
+/*
+ The DNSAddress format is optional and may be used in connects,
+ datagram sends, and resolve address calls. The name takes the
+ format "somewhere.com" or "somewhere.com:portnumber" where
+ the ":portnumber" is optional. The length of this structure
+ is arbitrarily limited to the overall max length of a domain
+ name (255 chars), although a longer one can be use successfully
+ if you use this as a template for doing so. However, the domain name
+ is still limited to 255 characters.
+*/
+
+
+struct DNSAddress {
+ OTAddressType fAddressType; /* always AF_DNS*/
+ InetDomainName fName;
+};
+typedef struct DNSAddress DNSAddress;
+/* InetInterfaceInfo*/
+enum {
+ kDefaultInetInterface = -1
+};
+
+enum {
+ kInetInterfaceInfoVersion = 3
+};
+
+
+struct InetInterfaceInfo {
+ InetHost fAddress;
+ InetHost fNetmask;
+ InetHost fBroadcastAddr;
+ InetHost fDefaultGatewayAddr;
+ InetHost fDNSAddr;
+ UInt16 fVersion;
+ UInt16 fHWAddrLen;
+ UInt8 * fHWAddr;
+ UInt32 fIfMTU;
+ UInt8 * fReservedPtrs[2];
+ InetDomainName fDomainName;
+ UInt32 fIPSecondaryCount;
+ UInt8 fReserved[252];
+};
+typedef struct InetInterfaceInfo InetInterfaceInfo;
+/* InetDHCPOption*/
+enum {
+ kAllDHCPOptions = -1,
+ kDHCPLongOption = 126,
+ kDHCPLongOptionReq = 127
+};
+
+
+struct InetDHCPOption {
+ UInt8 fOptionTag;
+ UInt8 fOptionLen;
+ UInt8 fOptionValue;
+};
+typedef struct InetDHCPOption InetDHCPOption;
+/* TCP/IP Utility Routines*/
+
+EXTERN_API( void )
+OTInitInetAddress (InetAddress * addr,
+ InetPort port,
+ InetHost host);
+
+EXTERN_API( OTByteCount )
+OTInitDNSAddress (DNSAddress * addr,
+ char * str);
+
+EXTERN_API( OSStatus )
+OTInetStringToHost (char * str,
+ InetHost * host);
+
+EXTERN_API( void )
+OTInetHostToString (InetHost host,
+ char * str);
+
+EXTERN_API( OSStatus )
+OTInetGetInterfaceInfo (InetInterfaceInfo * info,
+ SInt32 val);
+
+EXTERN_API( OSStatus )
+OTInetGetSecondaryAddresses (InetHost * addr,
+ UInt32 * count,
+ SInt32 val);
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSStatus )
+OTInetGetDHCPConfigInfo (InetDHCPOption * buf,
+ UInt32 bufSize,
+ SInt32 index,
+ SInt32 opt);
+
+/* InetServices & DNR Calls*/
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if !OTKERNEL
+/*
+ Under Carbon, OTOpenInternetServices routines take a client context pointer. Applications may pass NULL
+ after calling InitOpenTransport(kInitOTForApplicationMask, ...). Non-applications must always pass a
+ valid client context.
+*/
+EXTERN_API( InetSvcRef )
+OTOpenInternetServicesInContext (OTConfigurationRef cfig,
+ OTOpenFlags oflag,
+ OSStatus * err,
+ OTClientContextPtr clientContext);
+
+EXTERN_API( OSStatus )
+OTAsyncOpenInternetServicesInContext (OTConfigurationRef cfig,
+ OTOpenFlags oflag,
+ OTNotifyUPP upp,
+ void * contextPtr,
+ OTClientContextPtr clientContext);
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( InetSvcRef )
+OTOpenInternetServices (OTConfigurationRef cfig,
+ OTOpenFlags oflag,
+ OSStatus * err);
+
+EXTERN_API( OSStatus )
+OTAsyncOpenInternetServices (OTConfigurationRef cfig,
+ OTOpenFlags oflag,
+ OTNotifyProcPtr proc,
+ void * contextPtr);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if TARGET_API_MAC_CARBON
+/* The following macro may be used by applications only.*/
+#define OTOpenInternetServices(cfig, oflags, err) OTOpenInternetServicesInContext(cfig, oflags, err, NULL)
+#define OTAsyncOpenInternetServices(cfig, oflags, proc, contextPtr) OTAsyncOpenInternetServicesInContext(cfig, oflags, proc, contextPtr, NULL)
+#endif /* TARGET_API_MAC_CARBON */
+
+EXTERN_API( OSStatus )
+OTInetStringToAddress (InetSvcRef ref,
+ char * name,
+ InetHostInfo * hinfo);
+
+EXTERN_API( OSStatus )
+OTInetAddressToName (InetSvcRef ref,
+ InetHost addr,
+ InetDomainName name);
+
+EXTERN_API( OSStatus )
+OTInetSysInfo (InetSvcRef ref,
+ char * name,
+ InetSysInfo * sysinfo);
+
+EXTERN_API( OSStatus )
+OTInetMailExchange (InetSvcRef ref,
+ char * name,
+ UInt16 * num,
+ InetMailExchange * mx);
+
+EXTERN_API( OSStatus )
+OTInetQuery (InetSvcRef ref,
+ char * name,
+ UInt16 qClass,
+ UInt16 qType,
+ char * buf,
+ OTByteCount buflen,
+ void ** argv,
+ OTByteCount argvlen,
+ OTFlags flags);
+
+#ifdef __cplusplus
+} // Terminate C definitions
+
+class TInternetServices : public TProvider
+{
+ public:
+ OSStatus StringToAddress(char* name, InetHostInfo* hinfo)
+ { return OTInetStringToAddress(this, name, hinfo); }
+
+ OSStatus AddressToName(InetHost addr, InetDomainName name)
+ { return OTInetAddressToName(this, addr, name); }
+
+ OSStatus SysInfo(char* name, InetSysInfo* sysinfo )
+ { return OTInetSysInfo(this, name, sysinfo); }
+
+ OSStatus MailExchange(char* name, UInt16* num, InetMailExchange* mx)
+ { return OTInetMailExchange(this, name, num, mx); }
+
+ OSStatus Query(char* name, UInt16 qClass, UInt16 qType,
+ char* buf, OTByteCount buflen,
+ void** argv, OTByteCount argvlen,
+ OTFlags flags)
+ { return OTInetQuery(this, name, qClass, qType, buf, buflen, argv, argvlen, flags); }
+};
+
+extern "C" { /* resume C definitions */
+#endif
+#endif /* !OTKERNEL */
+
+/* ***** AppleTalk ******/
+/* Shared library prefixes*/
+
+
+#define kATalkVersion "1.1"
+#define kATalkPrefix "ot:atlk$"
+#define kATBinderID "ot:atbd$"
+
+/*******************************************************************************
+** Module definitions
+********************************************************************************/
+/* XTI Levels*/
+
+enum {
+ ATK_DDP = FOUR_CHAR_CODE('DDP '),
+ ATK_AARP = FOUR_CHAR_CODE('AARP'),
+ ATK_ATP = FOUR_CHAR_CODE('ATP '),
+ ATK_ADSP = FOUR_CHAR_CODE('ADSP'),
+ ATK_ASP = FOUR_CHAR_CODE('ASP '),
+ ATK_PAP = FOUR_CHAR_CODE('PAP '),
+ ATK_NBP = FOUR_CHAR_CODE('NBP '),
+ ATK_ZIP = FOUR_CHAR_CODE('ZIP ')
+};
+
+/* Module Names*/
+
+
+#define kDDPName "ddp"
+#define kATPName "atp"
+#define kADSPName "adsp"
+#define kASPName "asp"
+#define kPAPName "pap"
+#define kNBPName "nbp"
+#define kZIPName "zip"
+#define kLTalkName "ltlk"
+#define kLTalkAName "ltlkA"
+#define kLTalkBName "ltlkB"
+
+/*
+ Protocol-specific Options
+ NOTE:
+ All Protocols support OPT_CHECKSUM (Value is (unsigned long)T_YES/T_NO)
+ ATP supports OPT_RETRYCNT (# Retries, 0 = try once) and
+ OPT_INTERVAL (# Milliseconds to wait)
+*/
+
+enum {
+ DDP_OPT_CHECKSUM = 0x0600,
+ DDP_OPT_SRCADDR = 0x2101, /* DDP UnitDataReq Only - set src address, Value is DDPAddress */
+ ATP_OPT_REPLYCNT = 0x2110, /* AppleTalk - ATP Resp Pkt Ct Type, Value is (unsigned long) pkt count */
+ ATP_OPT_DATALEN = 0x2111, /* AppleTalk - ATP Pkt Data Len Type, Value is (unsigned long) length */
+ ATP_OPT_RELTIMER = 0x2112, /* AppleTalk - ATP Release Timer Type, Value is (unsigned long) timer, (See Inside AppleTalk, second edition */
+ ATP_OPT_TRANID = 0x2113, /* Value is (unsigned long) Boolean, Used to request Transaction ID, Returned with Transaction ID on requests */
+ PAP_OPT_OPENRETRY = 0x2120 /* AppleTalk - PAP OpenConn Retry count, Value is (unsigned long) T_YES/T_NO */
+};
+
+/* Protocol-Specific Events*/
+
+/*
+ If you send the IOCTL: OTIoctl(I_OTGetMiscellaneousEvents, 1),
+ you will receive the T_ATALKxxx events on your endpoint.
+ NOTE: The endpoint does not need to be bound.
+*/
+
+enum {
+ kAppleTalkEvent = kPROTOCOLEVENT | 0x00010000,
+ T_GETMYZONECOMPLETE = kAppleTalkEvent + 1,
+ T_GETLOCALZONESCOMPLETE = kAppleTalkEvent + 2,
+ T_GETZONELISTCOMPLETE = kAppleTalkEvent + 3,
+ T_GETATALKINFOCOMPLETE = kAppleTalkEvent + 4,
+ T_ATALKROUTERDOWNEVENT = kAppleTalkEvent + 51, /* No routers have been seen for a while. If the cookie is NULL, all routers are gone. Otherwise, there is still an ARA router hanging around being used, and only the local cable has been timed out.*/
+ T_ATALKROUTERUPEVENT = kAppleTalkEvent + 52, /* We didn't have a router, but now one has come up. Cookie is NULL for a normal router coming up, non-NULL for an ARA router coming on-line*/
+ T_ATALKZONENAMECHANGEDEVENT = kAppleTalkEvent + 53, /* A Zone name change was issued from the router, so our AppleTalk Zone has changed.*/
+ T_ATALKCONNECTIVITYCHANGEDEVENT = kAppleTalkEvent + 54, /* An ARA connection was established (cookie != NULL), or was disconnected (cookie == NULL)*/
+ T_ATALKINTERNETAVAILABLEEVENT = kAppleTalkEvent + 55, /* A router has appeared, and our address is in the startup range. Cookie is hi/lo of new cable range.*/
+ T_ATALKCABLERANGECHANGEDEVENT = kAppleTalkEvent + 56 /* A router has appeared, and it's incompatible with our current address. Cookie is hi/lo of new cable range.*/
+};
+
+enum {
+ kAllATalkRoutersDown = 0, /* This indicates that all routers are offline*/
+ kLocalATalkRoutersDown = -1L, /* This indicates that all local routers went offline, but an ARA router is still active*/
+ kARARouterDisconnected = -2L /* This indicates that ARA was disconnected, do it's router went offline, and we have no local routers to fall back onto.*/
+};
+
+enum {
+ kARARouterOnline = -1L, /* We had no local routers, but an ARA router is now online.*/
+ kATalkRouterOnline = 0, /* We had no routers, but a local router is now online*/
+ kLocalATalkRouterOnline = -2L /* We have an ARA router, but now we've seen a local router as well*/
+};
+
+#define IsAppleTalkEvent(x) ((x) & 0xffff0000) == kAppleTalkEvent)
+/* Protocol-specific IOCTLs*/
+
+enum {
+ ATALK_IOC_FULLSELFSEND = ((MIOC_ATALK << 8) | 47), /* Turn on/off full self-send (it's automatic for non-backward-compatible links)*/
+ ADSP_IOC_FORWARDRESET = ((MIOC_ATALK << 8) | 60) /* ADSP Forward Reset*/
+};
+
+/* Protocol-specific constants*/
+
+/* ECHO*/
+
+enum {
+ kECHO_TSDU = 585 /* Max. # of data bytes.*/
+};
+
+/* NBP*/
+
+enum {
+ kNBPMaxNameLength = 32,
+ kNBPMaxTypeLength = 32,
+ kNBPMaxZoneLength = 32,
+ kNBPSlushLength = 9, /* Extra space for @, : and a few escape chars*/
+ kNBPMaxEntityLength = (kNBPMaxNameLength + kNBPMaxTypeLength + kNBPMaxZoneLength + 3),
+ kNBPEntityBufferSize = (kNBPMaxNameLength + kNBPMaxTypeLength + kNBPMaxZoneLength + kNBPSlushLength),
+ kNBPWildCard = 0x3D, /* NBP name and type match anything '='*/
+ kNBPImbeddedWildCard = 0xC5, /* NBP name and type match some '*'*/
+ kNBPDefaultZone = 0x2A /* NBP default zone '*'*/
+};
+
+/* ZIP*/
+
+enum {
+ kZIPMaxZoneLength = kNBPMaxZoneLength
+};
+
+enum {
+ kDDPAddressLength = 8, /* value to use in netbuf.len field, Maximum length of AppleTalk address*/
+ kNBPAddressLength = kNBPEntityBufferSize,
+ kAppleTalkAddressLength = kDDPAddressLength + kNBPEntityBufferSize
+};
+
+
+#define OTCopyDDPAddress(addr, dest) \
+ { \
+ ((UInt32*)(dest))[0] = ((UInt32*)(addr))[0]; \
+ ((UInt32*)(dest))[1] = ((UInt32*)(addr))[1]; \
+ }
+
+/*******************************************************************************
+** CLASS TAppleTalkServices
+********************************************************************************/
+#if !OTKERNEL
+/*
+ Define the ATSvcRef type. This type needs special
+ processing because in C++ it's a subclass of TProvider.
+ See the definition of TEndpointRef in "OpenTransport.h"
+ for the logic behind this definition.
+*/
+#ifdef __cplusplus
+ typedef class TAppleTalkServices* ATSvcRef;
+#else
+ typedef void* ATSvcRef;
+#endif
+#define kDefaultAppleTalkServicesPath ((OTConfigurationRef)-3L)
+/*
+ Under Carbon, OpenAppleTalkServices routines take a client context pointer. Applications may pass NULL
+ after calling InitOpenTransport(kInitOTForApplicationMask, ...). Non-applications must always pass a
+ valid client context.
+*/
+EXTERN_API( OSStatus )
+OTAsyncOpenAppleTalkServicesInContext (OTConfigurationRef cfig,
+ OTOpenFlags flags,
+ OTNotifyUPP proc,
+ void * contextPtr,
+ OTClientContextPtr clientContext);
+
+EXTERN_API( ATSvcRef )
+OTOpenAppleTalkServicesInContext (OTConfigurationRef cfig,
+ OTOpenFlags flags,
+ OSStatus * err,
+ OTClientContextPtr clientContext);
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSStatus )
+OTAsyncOpenAppleTalkServices (OTConfigurationRef cfig,
+ OTOpenFlags flags,
+ OTNotifyProcPtr proc,
+ void * contextPtr);
+
+EXTERN_API( ATSvcRef )
+OTOpenAppleTalkServices (OTConfigurationRef cfig,
+ OTOpenFlags flags,
+ OSStatus * err);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if TARGET_API_MAC_CARBON
+/* The following macro may be used by applications only.*/
+#define OTOpenAppleTalkServices(cfig, oflags, err) OTOpenAppleTalkServicesInContext(cfig, oflags, err, NULL)
+#define OTAsyncOpenAppleTalkServices(cfig, oflags, proc, contextPtr) OTAsyncOpenAppleTalkServicesInContext(cfig, oflags, proc, contextPtr, NULL)
+#endif /* TARGET_API_MAC_CARBON */
+
+/* Get the zone associated with the ATSvcRef*/
+EXTERN_API( OSStatus )
+OTATalkGetMyZone (ATSvcRef ref,
+ TNetbuf * zone);
+
+/*
+ Get the list of available zones associated with the local cable
+ of the ATSvcRef
+*/
+EXTERN_API( OSStatus )
+OTATalkGetLocalZones (ATSvcRef ref,
+ TNetbuf * zones);
+
+/* Get the list of all zones on the internet specified by the ATSvcRef*/
+EXTERN_API( OSStatus )
+OTATalkGetZoneList (ATSvcRef ref,
+ TNetbuf * zones);
+
+/* Stores an AppleTalkInfo structure into the TNetbuf (see later in this file)*/
+EXTERN_API( OSStatus )
+OTATalkGetInfo (ATSvcRef ref,
+ TNetbuf * info);
+
+#ifdef __cplusplus
+} // Terminate C definitions
+
+class TAppleTalkServices : public TProvider
+{
+ public:
+ OSStatus GetMyZone(TNetbuf* zone) { return OTATalkGetMyZone(this, zone); }
+ OSStatus GetLocalZones(TNetbuf* zones) { return OTATalkGetLocalZones(this, zones); }
+ OSStatus GetZoneList(TNetbuf* zones) { return OTATalkGetZoneList(this, zones); }
+ OSStatus GetInfo(TNetbuf* info) { return OTATalkGetInfo(this, info); }
+};
+
+extern "C" { /* resume C definitions */
+#endif /* _cplus */
+#endif /* !OTKERNEL */
+
+/* AppleTalk Addressing*/
+/*
+ The NBPEntity structure is used to manipulate NBP names without regard
+ to issues of what kind of "special" characters are in the name.
+
+ When stored as an address in an NBPAddress or DDPNBPAddress, they are
+ stored as a character string, which is currently just ASCII, but in the
+ future may be UniChar, or some other internationalizable scripting set.
+ The string following an NBPAddress or DDPNBPAddress is intended to be
+ suitable for showing to users, whereas NBPEntity is not.
+ WARNING: NBPAddress and DDPNBPAddress structures do not "know" the length
+ of the address. That must have been obtained as part of a Lookup or
+ ResolveAddress call.
+*/
+
+enum {
+ AF_ATALK_FAMILY = 0x0100,
+ AF_ATALK_DDP = 0x0100,
+ AF_ATALK_DDPNBP = AF_ATALK_FAMILY + 1,
+ AF_ATALK_NBP = AF_ATALK_FAMILY + 2,
+ AF_ATALK_MNODE = AF_ATALK_FAMILY + 3
+};
+
+
+struct NBPEntity {
+ UInt8 fEntity[99];
+};
+typedef struct NBPEntity NBPEntity;
+
+struct DDPAddress {
+ OTAddressType fAddressType; /* One of the enums above*/
+ UInt16 fNetwork;
+ UInt8 fNodeID;
+ UInt8 fSocket;
+ UInt8 fDDPType;
+ UInt8 fPad;
+
+#ifdef __cplusplus
+ // C++ inline methods on this structure.
+
+ void Init(const DDPAddress&);
+ void Init(UInt16 net, UInt8 node, UInt8 socket);
+ void Init(UInt16 net, UInt8 node, UInt8 socket, UInt8 type);
+
+ void SetSocket(UInt8);
+ void SetType(UInt8);
+ void SetNode(UInt8);
+ void SetNetwork(UInt16);
+
+ OTByteCount GetAddressLength() const;
+ OTAddressType GetAddressType() const;
+ UInt8 GetSocket() const;
+ UInt8 GetType() const;
+ UInt8 GetNode() const;
+ UInt16 GetNetwork() const;
+
+ Boolean operator==(const DDPAddress&) const;
+ Boolean operator!=(const DDPAddress&) const;
+ void operator=(const DDPAddress&);
+#endif
+
+
+};
+typedef struct DDPAddress DDPAddress;
+
+struct NBPAddress {
+ OTAddressType fAddressType; /* One of the enums above*/
+ UInt8 fNBPNameBuffer[105];
+
+#ifdef __cplusplus
+ // C++ inline methods on this structure.
+
+ OTByteCount Init();
+ OTByteCount Init(const NBPEntity&);
+ OTByteCount Init(const char*);
+ OTByteCount Init(const char*, OTByteCount len);
+ Boolean ExtractEntity(NBPEntity&, OTByteCount len);
+
+ OTAddressType GetAddressType() const;
+#endif
+
+
+};
+typedef struct NBPAddress NBPAddress;
+
+struct DDPNBPAddress {
+ OTAddressType fAddressType; /* One of the enums above*/
+ UInt16 fNetwork;
+ UInt8 fNodeID;
+ UInt8 fSocket;
+ UInt8 fDDPType;
+ UInt8 fPad;
+ UInt8 fNBPNameBuffer[105];
+
+#ifdef __cplusplus
+ // C++ inline methods on this structure.
+
+ void Init(const DDPAddress&);
+ void Init(UInt16 net, UInt8 node, UInt8 socket);
+ void Init(UInt16 net, UInt8 node, UInt8 socket, UInt8 type);
+
+ void SetSocket(UInt8);
+ void SetType(UInt8);
+ void SetNode(UInt8);
+ void SetNetwork(UInt16);
+
+ OTAddressType GetAddressType() const;
+ UInt8 GetSocket() const;
+ UInt8 GetType() const;
+ UInt8 GetNode() const;
+ UInt16 GetNetwork() const;
+
+ Boolean ExtractEntity(NBPEntity&, OTByteCount len);
+ OTByteCount SetNBPEntity(const NBPEntity&);
+ OTByteCount SetNBPEntity(const char*);
+ OTByteCount SetNBPEntity(const char*, OTByteCount len);
+
+ Boolean operator==(const DDPAddress&) const;
+#endif
+
+
+};
+typedef struct DDPNBPAddress DDPNBPAddress;
+/* These are some utility routines for dealing with NBP and DDP addresses. */
+
+/* Functions to initialize the various AppleTalk Address types*/
+EXTERN_API( void )
+OTInitDDPAddress (DDPAddress * addr,
+ UInt16 net,
+ UInt8 node,
+ UInt8 socket,
+ UInt8 ddpType);
+
+EXTERN_API( OTByteCount )
+OTInitNBPAddress (NBPAddress * addr,
+ const char * name);
+
+EXTERN_API( OTByteCount )
+OTInitDDPNBPAddress (DDPNBPAddress * addr,
+ const char * name,
+ UInt16 net,
+ UInt8 node,
+ UInt8 socket,
+ UInt8 ddpType);
+
+/* Compare 2 DDP addresses for equality*/
+EXTERN_API( Boolean )
+OTCompareDDPAddresses (const DDPAddress * addr1,
+ const DDPAddress * addr2);
+
+/* Init an NBPEntity to a NULL name*/
+EXTERN_API( void )
+OTInitNBPEntity (NBPEntity * entity);
+
+/* Get the length an NBPEntity would have when stored as an address*/
+EXTERN_API( OTByteCount )
+OTGetNBPEntityLengthAsAddress (const NBPEntity * entity);
+
+/* Store an NBPEntity into an address buffer*/
+EXTERN_API( OTByteCount )
+OTSetAddressFromNBPEntity (UInt8 * nameBuf,
+ const NBPEntity * entity);
+
+/* Create an address buffer from a string (use -1 for len to use strlen)*/
+EXTERN_API( OTByteCount )
+OTSetAddressFromNBPString (UInt8 * addrBuf,
+ const char * name,
+ SInt32 len);
+
+/*
+ Create an NBPEntity from an address buffer. False is returned if
+ the address was truncated.
+*/
+EXTERN_API( Boolean )
+OTSetNBPEntityFromAddress (NBPEntity * entity,
+ const UInt8 * addrBuf,
+ OTByteCount len);
+
+/* Routines to set a piece of an NBP entity from a character string*/
+EXTERN_API( Boolean )
+OTSetNBPName (NBPEntity * entity,
+ const char * name);
+
+EXTERN_API( Boolean )
+OTSetNBPType (NBPEntity * entity,
+ const char * typeVal);
+
+EXTERN_API( Boolean )
+OTSetNBPZone (NBPEntity * entity,
+ const char * zone);
+
+/* Routines to extract pieces of an NBP entity*/
+EXTERN_API( void )
+OTExtractNBPName (const NBPEntity * entity,
+ char * name);
+
+EXTERN_API( void )
+OTExtractNBPType (const NBPEntity * entity,
+ char * typeVal);
+
+EXTERN_API( void )
+OTExtractNBPZone (const NBPEntity * entity,
+ char * zone);
+
+#ifdef __cplusplus
+
+// Inline methods for DDPAddress
+
+inline void DDPAddress::operator=(const DDPAddress& addr)
+{
+ *(UInt32*)&fAddressType = *(UInt32*)&addr.fAddressType;
+ *(UInt32*)&fNodeID = *(UInt32*)&addr.fNodeID;
+}
+
+inline Boolean DDPAddress::operator==(const DDPAddress& addr) const
+{
+ return OTCompareDDPAddresses(&addr, this);
+}
+
+inline Boolean DDPAddress::operator!=(const DDPAddress& addr) const
+{
+ return !OTCompareDDPAddresses(&addr, this);
+}
+
+inline void DDPAddress::SetSocket(UInt8 socket)
+{
+ fSocket = socket;
+}
+
+inline void DDPAddress::SetNode(UInt8 node)
+{
+ fNodeID = node;
+}
+
+inline void DDPAddress::SetType(UInt8 type)
+{
+ fDDPType = type;
+}
+
+inline void DDPAddress::SetNetwork(UInt16 net)
+{
+ fNetwork = net;
+}
+
+inline OTByteCount DDPAddress::GetAddressLength() const
+{
+ return kDDPAddressLength;
+}
+
+inline OTAddressType DDPAddress::GetAddressType() const
+{
+ return fAddressType;
+}
+
+inline UInt8 DDPAddress::GetSocket() const
+{
+ return fSocket;
+}
+
+inline UInt8 DDPAddress::GetNode() const
+{
+ return fNodeID;
+}
+
+inline UInt8 DDPAddress::GetType() const
+{
+ return fDDPType;
+}
+
+inline UInt16 DDPAddress::GetNetwork() const
+{
+ return fNetwork;
+}
+
+inline void DDPAddress::Init(UInt16 net, UInt8 node,
+ UInt8 socket)
+{
+ fAddressType = AF_ATALK_DDP;
+ SetNetwork(net);
+ SetNode(node);
+ SetSocket(socket);
+ SetType(0);
+}
+
+inline void DDPAddress::Init(UInt16 net, UInt8 node,
+ UInt8 socket, UInt8 type)
+{
+ fAddressType = AF_ATALK_DDP;
+ SetNetwork(net);
+ SetNode(node);
+ SetSocket(socket);
+ SetType(type);
+}
+
+inline void DDPAddress::Init(const DDPAddress& addr)
+{
+ *(UInt32*)&fAddressType = *(UInt32*)&addr.fAddressType;
+ *(UInt32*)&fNodeID = *(UInt32*)&addr.fNodeID;
+}
+
+// Inline methods for NBPAddress
+
+inline OTByteCount NBPAddress::Init()
+{
+ fAddressType = AF_ATALK_NBP;
+ return sizeof(OTAddressType);
+}
+
+inline OTByteCount NBPAddress::Init(const NBPEntity& addr)
+{
+ fAddressType = AF_ATALK_NBP;
+ return sizeof(OTAddressType) + OTSetAddressFromNBPEntity(fNBPNameBuffer, &addr);
+}
+
+inline OTByteCount NBPAddress::Init(const char* name)
+{
+ fAddressType = AF_ATALK_NBP;
+ return sizeof(OTAddressType) + OTSetAddressFromNBPString(fNBPNameBuffer, name, -1);
+}
+
+inline OTByteCount NBPAddress::Init(const char* name, OTByteCount len)
+{
+ fAddressType = AF_ATALK_NBP;
+ return sizeof(OTAddressType) + OTSetAddressFromNBPString(fNBPNameBuffer, name, (SInt32)len);
+}
+
+inline Boolean NBPAddress::ExtractEntity(NBPEntity& entity, OTByteCount len)
+{
+ return OTSetNBPEntityFromAddress(&entity, fNBPNameBuffer, len);
+}
+
+inline OTAddressType NBPAddress::GetAddressType() const
+{
+ return fAddressType;
+}
+
+// Inline methods for DDPNBPAddress
+
+inline Boolean DDPNBPAddress::operator==(const DDPAddress& addr) const
+{
+ return OTCompareDDPAddresses((const DDPAddress*)this, &addr);
+}
+
+inline void DDPNBPAddress::SetSocket(UInt8 socket)
+{
+ fSocket = socket;
+}
+
+inline void DDPNBPAddress::SetNode(UInt8 node)
+{
+ fNodeID = node;
+}
+
+inline void DDPNBPAddress::SetType(UInt8 type)
+{
+ fDDPType = type;
+}
+
+inline void DDPNBPAddress::SetNetwork(UInt16 net)
+{
+ fNetwork = net;
+}
+
+inline OTAddressType DDPNBPAddress::GetAddressType() const
+{
+ return fAddressType;
+}
+
+inline UInt8 DDPNBPAddress::GetSocket() const
+{
+ return fSocket;
+}
+
+inline UInt8 DDPNBPAddress::GetNode() const
+{
+ return fNodeID;
+}
+
+inline UInt8 DDPNBPAddress::GetType() const
+{
+ return fDDPType;
+}
+
+inline UInt16 DDPNBPAddress::GetNetwork() const
+{
+ return fNetwork;
+}
+
+inline void DDPNBPAddress::Init(UInt16 net, UInt8 node,
+ UInt8 socket)
+{
+ fAddressType = AF_ATALK_DDPNBP;
+ SetNetwork(net);
+ SetNode(node);
+ SetSocket(socket);
+ SetType(0);
+}
+
+inline void DDPNBPAddress::Init(UInt16 net, UInt8 node,
+ UInt8 socket, UInt8 type)
+{
+ fAddressType = AF_ATALK_DDPNBP;
+ SetNetwork(net);
+ SetNode(node);
+ SetSocket(socket);
+ SetType(type);
+}
+
+inline void DDPNBPAddress::Init(const DDPAddress& addr)
+{
+ fAddressType = AF_ATALK_DDPNBP;
+ SetNetwork(addr.GetNetwork());
+ SetNode(addr.GetNode());
+ SetSocket(addr.GetSocket());
+ SetType(addr.GetType());
+ fNBPNameBuffer[0] = 0;
+}
+
+inline OTByteCount DDPNBPAddress::SetNBPEntity(const NBPEntity& entity)
+{
+ return OTSetAddressFromNBPEntity(fNBPNameBuffer, &entity) + kDDPAddressLength;
+}
+
+inline OTByteCount DDPNBPAddress::SetNBPEntity(const char* name)
+{
+ return OTSetAddressFromNBPString(fNBPNameBuffer, name, -1) + kDDPAddressLength;
+}
+
+inline OTByteCount DDPNBPAddress::SetNBPEntity(const char* name, OTByteCount len)
+{
+ return OTSetAddressFromNBPString(fNBPNameBuffer, name, (SInt32)len) + kDDPAddressLength;
+}
+
+inline Boolean DDPNBPAddress::ExtractEntity(NBPEntity& entity, OTByteCount len)
+{
+ return OTSetNBPEntityFromAddress(&entity, fNBPNameBuffer, len);
+}
+
+#endif /* __cplusplus */
+/* AppleTalkInfo as used by the OTGetATalkInfo function*/
+
+
+struct AppleTalkInfo {
+ DDPAddress fOurAddress; /* Our DDP address (network # & node)*/
+ DDPAddress fRouterAddress; /* The address of a router on our cable*/
+ UInt16 fCableRange[2]; /* The current cable range*/
+ UInt16 fFlags; /* See below*/
+};
+typedef struct AppleTalkInfo AppleTalkInfo;
+/* For the fFlags field in AppleTalkInfo*/
+enum {
+ kATalkInfoIsExtended = 0x0001, /* This is an extended (phase 2) network*/
+ kATalkInfoHasRouter = 0x0002, /* This cable has a router*/
+ kATalkInfoOneZone = 0x0004 /* This cable has only one zone*/
+};
+
+/* ***** Ethernet ******/
+
+/* Interface option flags*/
+
+/* Ethernet framing options*/
+
+enum {
+ kOTFramingEthernet = 0x01,
+ kOTFramingEthernetIPX = 0x02,
+ kOTFraming8023 = 0x04,
+ kOTFraming8022 = 0x08
+};
+
+/*
+ These are obsolete and will be going away in OT 1.5.
+ Hmmm, OT 1.5 got cancelled. The status of these options
+ is uncertain.
+*/
+
+/* RawMode options*/
+
+enum {
+ kOTRawRcvOn = 0,
+ kOTRawRcvOff = 1,
+ kOTRawRcvOnWithTimeStamp = 2
+};
+
+enum {
+ DL_PROMISC_OFF = 0 /* OPT_SETPROMISCUOUS value*/
+};
+
+/* Module definitions*/
+
+/* Module IDs*/
+
+enum {
+ kT8022ModuleID = 7100,
+ kEnetModuleID = 7101,
+ kTokenRingModuleID = 7102,
+ kFDDIModuleID = 7103
+};
+
+/* Module Names*/
+
+
+#define kEnet8022Name "enet8022x"
+#define kEnetName "enet"
+#define kFastEnetName "fenet"
+#define kTokenRingName "tokn"
+#define kFDDIName "fddi"
+#define kIRTalkName "irtlk"
+#define kSMDSName "smds"
+#define kATMName "atm"
+#define kT8022Name "tpi8022x"
+#define kATMSNAPName "atmsnap"
+#define kFireWireName "firewire"
+#define kFibreChannelName "fibre"
+
+/* Address Family*/
+
+enum {
+ AF_8022 = 8200 /* Our 802.2 generic address family*/
+};
+
+/* XTI Levels*/
+
+enum {
+ LNK_ENET = FOUR_CHAR_CODE('ENET'),
+ LNK_TOKN = FOUR_CHAR_CODE('TOKN'),
+ LNK_FDDI = FOUR_CHAR_CODE('FDDI'),
+ LNK_TPI = FOUR_CHAR_CODE('LTPI')
+};
+
+/* Options*/
+
+enum {
+ OPT_ADDMCAST = 0x1000,
+ OPT_DELMCAST = 0x1001,
+ OPT_RCVPACKETTYPE = 0x1002,
+ OPT_RCVDESTADDR = 0x1003,
+ OPT_SETRAWMODE = 0x1004,
+ OPT_SETPROMISCUOUS = 0x1005
+};
+
+
+typedef UInt32 OTPacketType;
+enum {
+ kETypeStandard = 0,
+ kETypeMulticast = 1,
+ kETypeBroadcast = 2,
+ kETRawPacketBit = (unsigned long)0x80000000,
+ kETTimeStampBit = 0x40000000
+};
+
+/* Link related constants*/
+
+enum {
+ kMulticastLength = 6, /* length of an ENET hardware addressaddress*/
+ k48BitAddrLength = 6,
+ k8022DLSAPLength = 2, /* The protocol type is our DLSAP*/
+ k8022SNAPLength = 5,
+ kEnetAddressLength = k48BitAddrLength + k8022DLSAPLength, /* length of an address field used by the ENET enpoint*/
+ /* = k48BitAddrLength + sizeof(protocol type)*/
+ kSNAPSAP = 0x00AA, /* Special DLSAPS for ENET*/
+ kIPXSAP = 0x00FF,
+ kMax8022SAP = 0x00FE,
+ k8022GlobalSAP = 0x00FF,
+ kMinDIXSAP = 1501,
+ kMaxDIXSAP = 0xFFFF
+};
+
+/* Generic Address Structure*/
+
+
+struct T8022Address {
+ OTAddressType fAddrFamily;
+ UInt8 fHWAddr[6];
+ UInt16 fSAP;
+ UInt8 fSNAP[5];
+};
+typedef struct T8022Address T8022Address;
+enum {
+ k8022BasicAddressLength = sizeof(OTAddressType) + k48BitAddrLength + sizeof(UInt16),
+ k8022SNAPAddressLength = sizeof(OTAddressType) + k48BitAddrLength + sizeof(UInt16) + k8022SNAPLength
+};
+
+/* Some helpful stuff for dealing with 48 bit addresses*/
+
+
+#define OTCompare48BitAddresses(p1, p2) \
+ (*(const UInt32*)((const UInt8*)(p1)) == *(const UInt32*)((const UInt8*)(p2)) && \
+ *(const UInt16*)(((const UInt8*)(p1))+4) == *(const UInt16*)(((const UInt8*)(p2))+4) )
+
+#define OTCopy48BitAddress(p1, p2) \
+ (*(UInt32*)((UInt8*)(p2)) = *(const UInt32*)((const UInt8*)(p1)), \
+ *(UInt16*)(((UInt8*)(p2))+4) = *(const UInt16*)(((const UInt8*)(p1))+4) )
+
+#define OTClear48BitAddress(p1) \
+ (*(UInt32*)((UInt8*)(p1)) = 0, \
+ *(UInt16*)(((UInt8*)(p1))+4) = 0 )
+
+#define OTCompare8022SNAP(p1, p2) \
+ (*(const UInt32*)((const UInt8*)(p1)) == *(const UInt32*)((const UInt8*)(p2)) && \
+ *(((const UInt8*)(p1))+4) == *(((const UInt8*)(p2))+4) )
+
+#define OTCopy8022SNAP(p1, p2) \
+ (*(UInt32*)((UInt8*)(p2)) = *(const UInt32*)((const UInt8*)(p1)), \
+ *(((UInt8*)(p2))+4) = *(((const UInt8*)(p1))+4) )
+
+#define OTIs48BitBroadcastAddress(p1) \
+ (*(UInt32*)((UInt8*)(p1)) == 0xffffffff && \
+ *(UInt16*)(((UInt8*)(p1))+4) == 0xffff )
+
+#define OTSet48BitBroadcastAddress(p1) \
+ (*(UInt32*)((UInt8*)(p1)) = 0xffffffff, \
+ *(UInt16*)(((UInt8*)(p1))+4) = 0xffff )
+
+#define OTIs48BitZeroAddress(p1) \
+ (*(UInt32*)((UInt8*)(p1)) == 0 && \
+ *(UInt16*)(((UInt8*)(p1))+4) == 0 )
+
+/* Link related constants*/
+
+enum {
+ kEnetPacketHeaderLength = (2 * k48BitAddrLength) + k8022DLSAPLength,
+ kEnetTSDU = 1514, /* The TSDU for ethernet.*/
+ kTokenRingTSDU = 4458, /* The TSDU for TokenRing.*/
+ kFDDITSDU = 4458, /* The TSDU for FDDI. */
+ k8022SAPLength = 1,
+ k8022BasicHeaderLength = 3, /* define the length of the header portion of an 802.2 packet.*/
+ /* = SSAP+DSAP+ControlByte*/
+ k8022SNAPHeaderLength = k8022SNAPLength + k8022BasicHeaderLength
+};
+
+/*******************************************************************************
+** Address Types recognized by the Enet DLPI
+********************************************************************************/
+
+typedef UInt32 EAddrType;
+enum {
+ keaStandardAddress = 0,
+ keaMulticast = 1,
+ keaBroadcast = 2,
+ keaBadAddress = 3,
+ keaRawPacketBit = (unsigned long)0x80000000,
+ keaTimeStampBit = 0x40000000
+};
+
+/* Packet Header Structures*/
+
+
+struct EnetPacketHeader {
+ UInt8 fDestAddr[6];
+ UInt8 fSourceAddr[6];
+ UInt16 fProto;
+};
+typedef struct EnetPacketHeader EnetPacketHeader;
+
+struct T8022Header {
+ UInt8 fDSAP;
+ UInt8 fSSAP;
+ UInt8 fCtrl;
+};
+typedef struct T8022Header T8022Header;
+
+struct T8022SNAPHeader {
+ UInt8 fDSAP;
+ UInt8 fSSAP;
+ UInt8 fCtrl;
+ UInt8 fSNAP[5];
+};
+typedef struct T8022SNAPHeader T8022SNAPHeader;
+
+struct T8022FullPacketHeader {
+ EnetPacketHeader fEnetPart;
+ T8022SNAPHeader f8022Part;
+};
+typedef struct T8022FullPacketHeader T8022FullPacketHeader;
+/* Define the lengths of the structures above*/
+enum {
+ kT8022HeaderLength = 3,
+ kT8022SNAPHeaderLength = 3 + k8022SNAPLength,
+ kT8022FullPacketHeaderLength = kEnetPacketHeaderLength + kT8022SNAPHeaderLength
+};
+
+/* ***** Serial ******/
+
+/* Module Definitions*/
+
+/* XTI Level*/
+
+enum {
+ COM_SERIAL = FOUR_CHAR_CODE('SERL')
+};
+
+/* Version Number*/
+
+
+#define kSerialABVersion "1.1.1"
+
+/* Module Names*/
+
+
+#define kSerialABName "serialAB"
+#define kSerialName "serial"
+#define kSerialPortAName "serialA"
+#define kSerialPortBName "serialB"
+
+enum {
+ kSerialABModuleID = 7200
+};
+
+enum {
+ kOTSerialFramingAsync = 0x01, /* Support Async serial mode */
+ kOTSerialFramingHDLC = 0x02, /* Support HDLC synchronous serial mode */
+ kOTSerialFramingSDLC = 0x04, /* Support SDLC synchronous serial mode */
+ kOTSerialFramingAsyncPackets = 0x08 /* Support Async "packet" serial mode */
+};
+
+/* IOCTL Calls for Serial Drivers*/
+
+enum {
+ I_SetSerialDTR = ((MIOC_SRL << 8) | 0), /* Set DTR (0 = off, 1 = on)*/
+ kOTSerialSetDTROff = 0,
+ kOTSerialSetDTROn = 1,
+ I_SetSerialBreak = ((MIOC_SRL << 8) | 1), /* Send a break on the line - kOTSerialSetBreakOff = off, kOTSerialSetBreakOn = on,*/
+ /* Any other number is the number of milliseconds to leave break on, then*/
+ /* auto shutoff*/
+ kOTSerialSetBreakOn = (unsigned long)0xFFFFFFFF,
+ kOTSerialSetBreakOff = 0,
+ I_SetSerialXOffState = ((MIOC_SRL << 8) | 2), /* Force XOFF state - 0 = Unconditionally clear XOFF state, 1 = unconditionally set it*/
+ kOTSerialForceXOffTrue = 1,
+ kOTSerialForceXOffFalse = 0,
+ I_SetSerialXOn = ((MIOC_SRL << 8) | 3), /* Send an XON character, 0 = send only if in XOFF state, 1 = send always*/
+ kOTSerialSendXOnAlways = 1,
+ kOTSerialSendXOnIfXOffTrue = 0,
+ I_SetSerialXOff = ((MIOC_SRL << 8) | 4), /* Send an XOFF character, 0 = send only if in XON state, 1 = send always*/
+ kOTSerialSendXOffAlways = 1,
+ kOTSerialSendXOffIfXOnTrue = 0
+};
+
+/* Option Management for Serial Drivers*/
+
+/*
+ These options are all 4-byte values.
+ BaudRate is the baud rate.
+ DataBits is the number of data bits.
+ StopBits is the number of stop bits times 10.
+ Parity is an enum
+*/
+
+enum {
+ SERIAL_OPT_BAUDRATE = 0x0100, /* UInt32 */
+ SERIAL_OPT_DATABITS = 0x0101, /* UInt32 */
+ SERIAL_OPT_STOPBITS = 0x0102, /* UInt32 10, 15 or 20 for 1, 1.5 or 2 */
+ SERIAL_OPT_PARITY = 0x0103, /* UInt32 */
+ SERIAL_OPT_STATUS = 0x0104, /* UInt32 */
+ /* The "Status" option is a 4-byte value option that is ReadOnly*/
+ /* It returns a bitmap of the current serial status*/
+ SERIAL_OPT_HANDSHAKE = 0x0105, /* UInt32 */
+ /* The "Handshake" option defines what kind of handshaking the serial port*/
+ /* will do for line flow control. The value is a 32-bit value defined by*/
+ /* the function or macro SerialHandshakeData below.*/
+ /* For no handshake, or CTS handshake, the onChar and offChar parameters*/
+ /* are ignored.*/
+ SERIAL_OPT_RCVTIMEOUT = 0x0106, /* The "RcvTimeout" option defines how long the receiver should wait before delivering*/
+ /* less than the RcvLoWat number of characters. If RcvLoWat is 0, then the RcvTimeout*/
+ /* is how long a gap to wait for before delivering characters. This parameter is advisory,*/
+ /* and serial drivers are free to deliver data whenever they deem it convenient. For instance,*/
+ /* many serial drivers will deliver data whenever 64 bytes have been received, since 64 bytes*/
+ /* is the smallest STREAMS buffer size. Keep in mind that timeouts are quantized, so be sure to*/
+ /* look at the return value of the option to determine what it was negotiated to.*/
+ SERIAL_OPT_ERRORCHARACTER = 0x0107, /* This option defines how characters with parity errors are handled.*/
+ /* A 0 value will disable all replacement. A single character value in the low*/
+ /* byte designates the replacement character. When characters are received with a */
+ /* parity error, they are replaced by this specified character. If a valid incoming*/
+ /* character matches the replacement character, then the received character's msb is*/
+ /* cleared. For this situation, the alternate character is used, if specified in bits*/
+ /* 8 through 15 of the option long, with 0xff being place in bits 16 through 23.*/
+ /* Whenever a valid character is received that matches the first replacement character,*/
+ /* it is replaced with this alternate character.*/
+ SERIAL_OPT_EXTCLOCK = 0x0108, /* The "ExtClock" requests an external clock. A 0-value turns off external clocking.*/
+ /* Any other value is a requested divisor for the external clock. Be aware that*/
+ /* not all serial implementations support an external clock, and that not all*/
+ /* requested divisors will be supported if it does support an external clock.*/
+ SERIAL_OPT_BURSTMODE = 0x0109, /* The "BurstMode" option informs the serial driver that it should continue looping,*/
+ /* reading incoming characters, rather than waiting for an interrupt for each character.*/
+ /* This option may not be supported by all Serial driver*/
+ SERIAL_OPT_DUMMY = 0x010A /* placeholder*/
+};
+
+
+typedef UInt32 ParityOptionValues;
+enum {
+ kOTSerialNoParity = 0,
+ kOTSerialOddParity = 1,
+ kOTSerialEvenParity = 2
+};
+
+enum {
+ kOTSerialSwOverRunErr = 0x01,
+ kOTSerialBreakOn = 0x08,
+ kOTSerialParityErr = 0x10,
+ kOTSerialOverrunErr = 0x20,
+ kOTSerialFramingErr = 0x40,
+ kOTSerialXOffSent = 0x00010000,
+ kOTSerialDTRNegated = 0x00020000,
+ kOTSerialCTLHold = 0x00040000,
+ kOTSerialXOffHold = 0x00080000,
+ kOTSerialOutputBreakOn = 0x01000000
+};
+
+enum {
+ kOTSerialXOnOffInputHandshake = 1, /* Want XOn/XOff handshake for incoming characters */
+ kOTSerialXOnOffOutputHandshake = 2, /* Want XOn/XOff handshake for outgoing characters */
+ kOTSerialCTSInputHandshake = 4, /* Want CTS handshake for incoming characters */
+ kOTSerialDTROutputHandshake = 8 /* Want DTR handshake for outoing characters */
+};
+
+
+#ifdef __cplusplus
+
+ inline UInt32 OTSerialHandshakeData(UInt16 type, UInt8 onChar, UInt8 offChar)
+ {
+ return (((UInt32)type) << 16) | (((UInt32)onChar) << 8) | offChar;
+ }
+
+#else
+
+ #define OTSerialHandshakeData(type, onChar, offChar) \
+ ((((UInt32)type) << 16) | (((UInt32)onChar) << 8) | offChar)
+
+#endif
+
+
+#ifdef __cplusplus
+
+inline UInt32 OTSerialSetErrorCharacter(UInt8 rep)
+{
+ return (UInt32)rep & 0x000000ff;
+}
+
+inline UInt32 OTSerialSetErrorCharacterWithAlternate(UInt8 rep, UInt8 alternate)
+{
+ return (((rep & 0xff) | ((alternate & 0xff) << 8)) | 0x80000000L);
+}
+
+#else
+
+#define OTSerialSetErrorCharacter(rep) \
+ ((rep) & 0xff)
+
+#define OTSerialSetErrorCharacterWithAlternate(rep, alternate) \
+ ((((rep) & 0xff) | (((alternate) & 0xff) << 8)) | 0x80000000L)
+
+#endif
+
+/* Default attributes for the serial ports*/
+
+enum {
+ kOTSerialDefaultBaudRate = 19200,
+ kOTSerialDefaultDataBits = 8,
+ kOTSerialDefaultStopBits = 10,
+ kOTSerialDefaultParity = kOTSerialNoParity,
+ kOTSerialDefaultHandshake = 0,
+ kOTSerialDefaultOnChar = ('Q' & 0xFFFFFFBF),
+ kOTSerialDefaultOffChar = ('S' & 0xFFFFFFBF),
+ kOTSerialDefaultSndBufSize = 1024,
+ kOTSerialDefaultRcvBufSize = 1024,
+ kOTSerialDefaultSndLoWat = 96,
+ kOTSerialDefaultRcvLoWat = 1,
+ kOTSerialDefaultRcvTimeout = 10
+};
+
+/* ***** ISDN ******/
+
+/* Module Definitions*/
+
+/* XTI Level*/
+
+enum {
+ COM_ISDN = FOUR_CHAR_CODE('ISDN')
+};
+
+/* Module Names*/
+
+#define kISDNName "isdn"
+enum {
+ kISDNModuleID = 7300
+};
+
+
+/* ISDN framing methods, set using the I_OTSetFramingType IOCTL*/
+
+enum {
+ kOTISDNFramingTransparentSupported = 0x0010, /* Support Transparent mode */
+ kOTISDNFramingHDLCSupported = 0x0020, /* Support HDLC Synchronous mode */
+ kOTISDNFramingV110Supported = 0x0040, /* Support V.110 Asynchronous mode */
+ kOTISDNFramingV14ESupported = 0x0080 /* Support V.14 Asynchronous mode */
+};
+
+/* Miscellaneous equates*/
+
+/* Disconnect reason codes (from Q.931)*/
+
+enum {
+ kOTISDNUnallocatedNumber = 1,
+ kOTISDNNoRouteToSpecifiedTransitNetwork = 2,
+ kOTISDNNoRouteToDestination = 3,
+ kOTISDNChannelUnacceptable = 6,
+ kOTISDNNormal = 16,
+ kOTISDNUserBusy = 17,
+ kOTISDNNoUserResponding = 18,
+ kOTISDNNoAnswerFromUser = 19,
+ kOTISDNCallRejected = 21,
+ kOTISDNNumberChanged = 22,
+ kOTISDNNonSelectedUserClearing = 26,
+ kOTISDNDestinationOutOfOrder = 27,
+ kOTISDNInvalidNumberFormat = 28,
+ kOTISDNFacilityRejected = 29,
+ kOTISDNNormalUnspecified = 31,
+ kOTISDNNoCircuitChannelAvailable = 34,
+ kOTISDNNetworkOutOfOrder = 41,
+ kOTISDNSwitchingEquipmentCongestion = 42,
+ kOTISDNAccessInformationDiscarded = 43,
+ kOTISDNRequestedCircuitChannelNotAvailable = 44,
+ kOTISDNResourceUnavailableUnspecified = 45,
+ kOTISDNQualityOfServiceUnvailable = 49,
+ kOTISDNRequestedFacilityNotSubscribed = 50,
+ kOTISDNBearerCapabilityNotAuthorized = 57,
+ kOTISDNBearerCapabilityNotPresentlyAvailable = 58,
+ kOTISDNCallRestricted = 59,
+ kOTISDNServiceOrOptionNotAvilableUnspecified = 63,
+ kOTISDNBearerCapabilityNotImplemented = 65,
+ kOTISDNRequestedFacilityNotImplemented = 69,
+ kOTISDNOnlyRestrictedDigitalBearer = 70,
+ kOTISDNServiceOrOptionNotImplementedUnspecified = 79,
+ kOTISDNCallIdentityNotUsed = 83,
+ kOTISDNCallIdentityInUse = 84,
+ kOTISDNNoCallSuspended = 85,
+ kOTISDNCallIdentityCleared = 86,
+ kOTISDNIncompatibleDestination = 88,
+ kOTISDNInvalidTransitNetworkSelection = 91,
+ kOTISDNInvalidMessageUnspecified = 95,
+ kOTISDNMandatoryInformationElementIsMissing = 96,
+ kOTISDNMessageTypeNonExistentOrNotImplemented = 97,
+ kOTISDNInterworkingUnspecified = 127
+};
+
+/* OTISDNAddress*/
+
+/*
+ The OTISDNAddress has the following format:
+ "xxxxxx*yy"
+ where 'x' is the phone number and 'y' is the sub address (if available
+ in the network. The characters are coded in ASCII (IA5), and valid
+ characters are: '0'-'9','#','*'.
+ The max length of the each phone number is 21 characters (?) and the max
+ subaddress length is network dependent.
+ When using bonded channels the phone numbers are separated by '&'.
+ The X.25 user data is preceded by '@'.
+*/
+
+#ifndef AF_ISDN /* might conflict with BSD headers */
+enum {
+ AF_ISDN = 0x2000
+};
+
+#endif
+enum {
+ kOTISDNMaxPhoneSize = 32,
+ kOTISDNMaxSubSize = 4
+};
+
+
+struct OTISDNAddress {
+ OTAddressType fAddressType;
+ UInt16 fPhoneLength;
+ char fPhoneNumber[37];
+};
+typedef struct OTISDNAddress OTISDNAddress;
+/* IOCTL Calls for ISDN*/
+/* ISDN shares the same ioctl space as serial.*/
+
+enum {
+ MIOC_ISDN = 'U' /* ISDN ioctl() cmds */
+};
+
+enum {
+ I_OTISDNAlerting = ((MIOC_ISDN << 8) | 100), /* Send or receive an ALERTING message*/
+ I_OTISDNSuspend = ((MIOC_ISDN << 8) | 101), /* Send a SUSPEND message*/
+ /* The parameter is the Call Identity (Maximum 8 octets)*/
+ I_OTISDNSuspendAcknowledge = ((MIOC_ISDN << 8) | 102), /* Receive a SUSPEND ACKNOWLEDGE message*/
+ I_OTISDNSuspendReject = ((MIOC_ISDN << 8) | 103), /* Receive a SUSPEND REJECT message*/
+ I_OTISDNResume = ((MIOC_ISDN << 8) | 104), /* Send a RESUME message*/
+ /* The parameter is the Call Identity (Maximum 8 octets)*/
+ I_OTISDNResumeAcknowledge = ((MIOC_ISDN << 8) | 105), /* Receive a RESUME ACKNOWLEDGE message*/
+ I_OTISDNResumeReject = ((MIOC_ISDN << 8) | 106), /* Receive a RESUME REJECT message*/
+ I_OTISDNFaciltity = ((MIOC_ISDN << 8) | 107) /* Send or receive a FACILITY message*/
+};
+
+/* Connect user data size*/
+
+enum {
+ kOTISDNMaxUserDataSize = 32
+};
+
+/* Option management calls for ISDN*/
+
+enum {
+ ISDN_OPT_COMMTYPE = 0x0200,
+ ISDN_OPT_FRAMINGTYPE = 0x0201,
+ ISDN_OPT_56KADAPTATION = 0x0202
+};
+
+/* For ISDN_OPT_COMMTYPE...*/
+
+enum {
+ kOTISDNTelephoneALaw = 1, /* G.711 A-law */
+ kOTISDNTelephoneMuLaw = 26, /* G.711 .-law */
+ kOTISDNDigital64k = 13, /* unrestricted digital (default) */
+ kOTISDNDigital56k = 37, /* user rate 56Kb/s */
+ kOTISDNVideo64k = 41, /* video terminal at 64Kb/s */
+ kOTISDNVideo56k = 42 /* video terminal at 56Kb/s */
+};
+
+/* For ISDN_OPT_FRAMINGTYPE...*/
+
+enum {
+ kOTISDNFramingTransparent = 0x0010, /* Transparent mode */
+ kOTISDNFramingHDLC = 0x0020, /* HDLC synchronous mode (default) */
+ kOTISDNFramingV110 = 0x0040, /* V.110 asynchronous mode */
+ kOTISDNFramingV14E = 0x0080 /* V.14E asynchronous mode */
+};
+
+/* For ISDN_OPT_56KADAPTATION...*/
+
+enum {
+ kOTISDNNot56KAdaptation = false, /* not 56K Adaptation (default) */
+ kOTISDN56KAdaptation = true /* 56K Adaptation */
+};
+
+/* Default options, you do not need to set these*/
+
+enum {
+ kOTISDNDefaultCommType = kOTISDNDigital64k,
+ kOTISDNDefaultFramingType = kOTISDNFramingHDLC,
+ kOTISDNDefault56KAdaptation = kOTISDNNot56KAdaptation
+};
+
+
+#if defined(__MWERKS__) && TARGET_CPU_68K
+ #pragma pop
+#endif
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __OPENTRANSPORTPROVIDERS__ */
+
diff --git a/include/qt/OpenTransportUNIX.h b/include/qt/OpenTransportUNIX.h
new file mode 100644
index 000000000..1bca12772
--- /dev/null
+++ b/include/qt/OpenTransportUNIX.h
@@ -0,0 +1,485 @@
+/*
+ File: OpenTransportUNIX.h
+
+ Contains: Open Transport client interface file for UNIX compatibility clients.
+
+ Version: Technology: 2.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1993-2001 by Apple Computer, Inc. and Mentat Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __OPENTRANSPORTUNIX__
+#define __OPENTRANSPORTUNIX__
+
+#include "stddef.h"
+#ifndef __OPENTRANSPORTPROTOCOL__
+#include "OpenTransportProtocol.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if defined(__MWERKS__) && TARGET_CPU_68K
+ #pragma push
+ #pragma pointers_in_D0
+#endif
+
+/* ***** Global Variables ******/
+
+extern int t_errno;
+
+/* ***** XTI Structures ******/
+
+/*
+ WARNING:
+ These structures will only work if "int"s are the
+ same size as "size_t", "long", and "UInt32". We left
+ them this way for maximum UNIX compatibility.
+*/
+
+
+struct netbuf {
+ unsigned int maxlen;
+ unsigned int len;
+ char * buf;
+};
+typedef struct netbuf netbuf;
+
+struct t_info {
+ int addr; /* Maximum size of an address */
+ int options; /* Maximum size of options */
+ int tsdu; /* Standard data transmit unit size */
+ int etsdu; /* Expedited data transmit unit size */
+ int connect; /* Maximum data size on connect */
+ int discon; /* Maximum data size on disconnect */
+ unsigned int servtype; /* service type */
+ unsigned int flags; /* Flags (see "OpenTransport.h") */
+};
+typedef struct t_info t_info;
+
+struct t_bind
+{
+ netbuf addr;
+ unsigned int qlen;
+};
+struct t_optmgmt
+{
+ netbuf opt;
+ long flags;
+};
+
+struct t_discon {
+ netbuf udata;
+ int reason;
+ int sequence;
+};
+typedef struct t_discon t_discon;
+
+struct t_call {
+ netbuf addr;
+ netbuf opt;
+ netbuf udata;
+ int sequence;
+};
+typedef struct t_call t_call;
+
+struct t_unitdata {
+ netbuf addr;
+ netbuf opt;
+ netbuf udata;
+};
+typedef struct t_unitdata t_unitdata;
+
+struct t_uderr {
+ netbuf addr;
+ netbuf opt;
+ long error;
+};
+typedef struct t_uderr t_uderr;
+/* -------------------------------------------------------------------------
+ Transaction data structures
+ ------------------------------------------------------------------------- */
+
+struct t_request {
+ netbuf data;
+ netbuf opt;
+ long sequence;
+};
+typedef struct t_request t_request;
+
+struct t_reply {
+ netbuf data;
+ netbuf opt;
+ long sequence;
+};
+typedef struct t_reply t_reply;
+
+struct t_unitrequest {
+ netbuf addr;
+ netbuf opt;
+ netbuf udata;
+ long sequence;
+};
+typedef struct t_unitrequest t_unitrequest;
+
+struct t_unitreply {
+ netbuf opt;
+ netbuf udata;
+ long sequence;
+};
+typedef struct t_unitreply t_unitreply;
+
+struct t_opthdr {
+ unsigned long len; /* total length of option = sizeof(struct t_opthdr) + */
+ /* length of option value in bytes */
+ unsigned long level; /* protocol affected */
+ unsigned long name; /* option name */
+ unsigned long status; /* status value */
+ /* followed by the option value */
+};
+typedef struct t_opthdr t_opthdr;
+/* ***** XTI Interfaces ******/
+#if !OTKERNEL
+#if CALL_NOT_IN_CARBON
+EXTERN_API( int )
+t_accept (int fd,
+ int resfd,
+ t_call * call);
+
+EXTERN_API( char *)
+t_alloc (int fd,
+ int struct_type,
+ int fields);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( int ) t_bind(int fd, struct t_bind* req, struct t_bind* ret);
+EXTERN_API( int )t_optmgmt(int fd, struct t_optmgmt* req, struct t_optmgmt* ret);
+EXTERN_API( int ) t_getprotaddr(int fd, struct t_bind* boundaddr, struct t_bind* peeraddr);
+EXTERN_API( int ) t_resolveaddr(int fd, struct t_bind* reqAddr, struct t_bind* retAddr, OTTimeout timeout);
+#if CALL_NOT_IN_CARBON
+EXTERN_API( int )
+t_close (int fd);
+
+EXTERN_API( int )
+t_connect (int fd,
+ t_call * sndcall,
+ t_call * rcvcall);
+
+EXTERN_API( int )
+t_free (char * ptr,
+ int struct_type);
+
+EXTERN_API( int )
+t_getinfo (int fd,
+ t_info * info);
+
+EXTERN_API( int )
+t_getstate (int fd);
+
+EXTERN_API( int )
+t_listen (int fd,
+ t_call * call);
+
+EXTERN_API( int )
+t_look (int fd);
+
+EXTERN_API( int )
+t_open (char * path,
+ int oflag,
+ t_info * info);
+
+EXTERN_API( int )
+t_blocking (int fd);
+
+EXTERN_API( int )
+t_nonblocking (int fd);
+
+EXTERN_API( int )
+t_rcv (int fd,
+ char * buf,
+ size_t nbytes,
+ int * flags);
+
+EXTERN_API( int )
+t_rcvconnect (int fd,
+ t_call * call);
+
+EXTERN_API( int )
+t_rcvdis (int fd,
+ t_discon * discon);
+
+EXTERN_API( int )
+t_rcvrel (int fd);
+
+EXTERN_API( int )
+t_rcvudata (int fd,
+ t_unitdata * unitdata,
+ int * flags);
+
+EXTERN_API( int )
+t_rcvuderr (int fd,
+ t_uderr * uderr);
+
+EXTERN_API( int )
+t_snd (int fd,
+ char * buf,
+ size_t nbytes,
+ int flags);
+
+EXTERN_API( int )
+t_snddis (int fd,
+ t_call * call);
+
+EXTERN_API( int )
+t_sndrel (int fd);
+
+EXTERN_API( int )
+t_sndudata (int fd,
+ t_unitdata * unitdata);
+
+EXTERN_API( int )
+t_sync (int fd);
+
+EXTERN_API( int )
+t_unbind (int fd);
+
+EXTERN_API( int )
+t_error (char * errmsg);
+
+/* Apple extensions*/
+
+EXTERN_API( int )
+t_isnonblocking (int fd);
+
+EXTERN_API( int )
+t_asynchronous (int fd);
+
+EXTERN_API( int )
+t_synchronous (int fd);
+
+EXTERN_API( int )
+t_issynchronous (int fd);
+
+EXTERN_API( int )
+t_usesyncidleevents (int fd,
+ int useEvents);
+
+/* Not XTI standard functions, but extensions for transaction endpoints */
+
+EXTERN_API( int )
+t_sndrequest (int fd,
+ t_request * req,
+ int flags);
+
+EXTERN_API( int )
+t_rcvreply (int fd,
+ t_reply * rep,
+ int * flags);
+
+EXTERN_API( int )
+t_rcvrequest (int fd,
+ t_request * req,
+ int * flags);
+
+EXTERN_API( int )
+t_sndreply (int fd,
+ t_reply * rep,
+ int flags);
+
+EXTERN_API( int )
+t_cancelrequest (int fd,
+ long sequence);
+
+EXTERN_API( int )
+t_cancelreply (int fd,
+ long sequence);
+
+EXTERN_API( int )
+t_sndurequest (int fd,
+ t_unitrequest * ureq,
+ int flags);
+
+EXTERN_API( int )
+t_rcvureply (int fd,
+ t_unitreply * urep,
+ int * flags);
+
+EXTERN_API( int )
+t_rcvurequest (int fd,
+ t_unitrequest * ureq,
+ int * flags);
+
+EXTERN_API( int )
+t_sndureply (int fd,
+ t_unitreply * urep,
+ int flags);
+
+EXTERN_API( int )
+t_cancelurequest (int fd,
+ long sequence);
+
+EXTERN_API( int )
+t_cancelureply (int fd,
+ long sequence);
+
+EXTERN_API( int )
+t_cancelsynchronouscalls (int fd);
+
+EXTERN_API( int )
+t_installnotifier (int fd,
+ OTNotifyProcPtr proc,
+ void * contextPtr);
+
+EXTERN_API( void )
+t_removenotifier (int fd);
+
+/* STREAMS Primitives*/
+
+EXTERN_API( int )
+getmsg (int fd,
+ strbuf * ctlbuf,
+ strbuf * databuf,
+ int * flagsp);
+
+EXTERN_API( int )
+putmsg (int fd,
+ const strbuf * ctlbuf,
+ const strbuf * databuf,
+ int flags);
+
+EXTERN_API( int )
+getpmsg (int fd,
+ strbuf * ctlbuf,
+ strbuf * databuf,
+ int * bandp,
+ int * flagsp);
+
+EXTERN_API( int )
+putpmsg (int fd,
+ const strbuf * ctlbuf,
+ const strbuf * databuf,
+ int band,
+ int flags);
+
+/* Raw streams operations.*/
+
+EXTERN_API( int )
+stream_installnotifier (int fd,
+ OTNotifyProcPtr proc,
+ void * contextPtr);
+
+EXTERN_API( int )
+stream_blocking (int fd);
+
+EXTERN_API( int )
+stream_nonblocking (int fd);
+
+EXTERN_API( int )
+stream_isblocking (int fd);
+
+EXTERN_API( int )
+stream_synchronous (int fd);
+
+EXTERN_API( int )
+stream_asynchronous (int fd);
+
+EXTERN_API( int )
+stream_issynchronous (int fd);
+
+EXTERN_API( int )
+stream_open (char * path,
+ unsigned long flags);
+
+EXTERN_API( int )
+stream_close (int fd);
+
+EXTERN_API( int )
+stream_read (int fd,
+ void * buf,
+ size_t len);
+
+EXTERN_API( int )
+stream_write (int fd,
+ void * buf,
+ size_t len);
+
+EXTERN_API_C( int )
+stream_ioctl (int fd,
+ unsigned long cmd,
+ ...);
+
+EXTERN_API( int )
+stream_pipe (int * fds);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct pollfd {
+ SInt32 fd;
+ short events;
+ short revents;
+ long _ifd; /* Internal "fd" for the benefit of the kernel */
+};
+typedef struct pollfd pollfd;
+#if CALL_NOT_IN_CARBON
+EXTERN_API( int )
+poll (pollfd * fds,
+ size_t nfds,
+ unsigned long timeout);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* !OTKERNEL */
+
+
+#if defined(__MWERKS__) && TARGET_CPU_68K
+ #pragma pop
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __OPENTRANSPORTUNIX__ */
+
diff --git a/include/qt/PCCard.h b/include/qt/PCCard.h
new file mode 100644
index 000000000..103c5dab0
--- /dev/null
+++ b/include/qt/PCCard.h
@@ -0,0 +1,600 @@
+/*
+ File: PCCard.h
+
+ Contains: PC Card Family Programming interface
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1996-2001 by Apple Computer, Inc. All rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __PCCARD__
+#define __PCCARD__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __NAMEREGISTRY__
+#include "NameRegistry.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ kServiceCategoryPCCard = FOUR_CHAR_CODE('pccd')
+};
+
+
+typedef UInt32 PCCardEvent;
+typedef UInt32 PCCardEventMask;
+typedef UInt32 PCCardClientID;
+typedef UInt32 PCCardTimerID;
+typedef UInt32 PCCardSocket;
+typedef UInt32 PCCardWindowID;
+typedef UInt32 PCCardWindowType;
+typedef UInt32 PCCardWindowSize;
+typedef UInt32 PCCardWindowOffset;
+typedef UInt32 PCCardWindowAlign;
+typedef OptionBits PCCardWindowState;
+typedef UInt32 PCCardAccessSpeed;
+typedef UInt32 PCCardWindowParam;
+typedef UInt32 PCCardPage;
+typedef UInt32 PCCardVoltage;
+/*
+ Several of the client notification bit flags have been REMOVED since the first
+ release of this header. These were unused codes that were either
+ copied directly from PC Card 2.x, or from the PCMCIA standard. In all cases,
+ they were completely unimplemented and would never be sent under PCCard 3.0.
+
+ The removed flags are:
+ kPCCardClientInfoMessage, kPCCardSSUpdatedMessage,
+ and kPCCardFunctionInterruptMessage.
+
+ If your software used any of these flags, you should delete any references
+ to them. These event codes are being recycled for new features.
+*/
+/* Client notification bit flags */
+enum {
+ kPCCardNullMessage = 0x00000000, /* no messages pending (not sent to clients)*/
+ kPCCardInsertionMessage = 0x00000001, /* card has been inserted into the socket*/
+ kPCCardRemovalMessage = 0x00000002, /* card has been removed from the socket- do not touch hardware!*/
+ /* Lock and Unlock may be used for a hardware locking card-cage. */
+ kPCCardLockMessage = 0x00000004, /* card is locked into the socket with a mechanical latch */
+ kPCCardUnlockMessage = 0x00000008, /* card is no longer locked into the socket */
+ /* Ready and Reset are holdovers from PC Card 2.x, but someone might be using them (!?) */
+ kPCCardReadyMessage = 0x00000010, /* card is ready to be accessed -- do not use! this event is never sent! (use kPCCardInsertion instead) */
+ kPCCardResetMessage = 0x00000020, /* physical reset has completed -- do not use! this event is never sent! (use kPCCardResetComplete instead) */
+ /* InsertionRequest and InsertionComplete may be used with certain cages (??) */
+ kPCCardInsertionRequestMessage = 0x00000040, /* request to insert a card using insertion motor */
+ kPCCardInsertionCompleteMessage = 0x00000080, /* insertion motor has finished inserting a card */
+ kPCCardEjectionRequestMessage = 0x00000100, /* user or other client is requesting a card ejection*/
+ kPCCardEjectionCompleteMessage = 0x00000200, /* card ejection succeeded- do not touch hardware! */
+ kPCCardEjectionFailedMessage = 0x00000400, /* eject failure due to electrical/mechanical problems*/
+ kPCCardPMResumeMessage = 0x00000800, /* power management resume */
+ kPCCardPMSuspendMessage = 0x00001000, /* power management suspend */
+ kPCCardPMSuspendRequest = 0x00002000, /* power management sleep request */
+ kPCCardPMSuspendRevoke = 0x00004000, /* power management sleep revoke */
+ kPCCardResetPhysicalMessage = 0x00008000, /* physical reset is about to occur on this card -- this event is never sent! */
+ kPCCardResetRequestMessage = 0x00010000, /* physical reset has been requested by a client*/
+ kPCCardResetCompleteMessage = 0x00020000, /* ResetCard() background reset has completed*/
+ kPCCardBatteryDeadMessage = 0x00040000, /* battery is no longer useable, data will be lost*/
+ kPCCardBatteryLowMessage = 0x00080000, /* battery is weak and should be replaced*/
+ kPCCardWriteProtectMessage = 0x00100000, /* card is now write protected*/
+ kPCCardWriteEnabledMessage = 0x00200000, /* card is now write enabled*/
+ kPCCardDisplayEjectDSATMessage = 0x00400000, /* about to display a DSAT for the user to re-insert a manually ejected card */
+ kPCCardUnexpectedRemovalMessage = 0x02000000, /* card has unexpectedly been manually ejected */
+ /* Unconfigured is a (currently unused) holdover from PC Card 2.x */
+ kPCCardUnconfiguredMessage = 0x04000000, /* a CARD_READY was delivered to all clients and no client */
+ /* requested a configuration for the socket -- this event is never sent under PCCard 3.0! */
+ kPCCardStatusChangedMessage = 0x08000000, /* status change for cards in I/O mode*/
+ kPCCardTimerExpiredMessage = 0x10000000, /* message sent when requested time has expired */
+ kPCCardRequestAttentionMessage = 0x20000000,
+ kPCCardEraseCompleteMessage = 0x40000000,
+ kPCCardRegistrationCompleteMessage = (long)0x80000000, /* notifications available only in PCCard 3.1 and later */
+ kPCCardPMEnabledMessage = 0x00800000 /* power management has been enabled by the user; if appropriate, clients should call PCCardSetPowerLevel(off) */
+};
+
+typedef OptionBits PCCardWindowAttributes;
+/* window state (values of PCCardWindowAttributes) */
+enum {
+ kWSCommon = 0x0001, /* common memory window */
+ kWSAttribute = 0x0002, /* attribute memory window*/
+ kWSIO = 0x0004, /* I/O window*/
+ kWSCardBus = 0x0800, /* CardBus bridge window */
+ kWSTypeMask = 0x0807, /* window type mask*/
+ kWSEnabled = 0x0008, /* window enabled*/
+ kWS8bit = 0x0010, /* 8-bit data width window*/
+ kWS16bit = 0x0020, /* 16-bit data width window*/
+ kWS32bit = 0x0040, /* 32-bit data width window*/
+ kWSAutoSize = 0x0080, /* auto-size data width window*/
+ kWSWidthMask = 0x00F0, /* window data width mask*/
+ kWSProtected = 0x0100, /* window write protected*/
+ kWSPrefetchable = 0x0200, /* bridge window prefetchable*/
+ kWSPageShared = 0x0400, /* page register is shared*/
+ kWSWindowSizeOffset = 0x4000,
+ kWSChangeAccessSpeed = 0x8000 /* Used by CSModifyWindow only */
+};
+
+/* window speed (sample values of PCCardAccessSpeed) for use in PCCardRequestWindow */
+enum {
+ kAccessSpeed600ns = 0x006A,
+ kAccessSpeed500ns = 0x005A,
+ kAccessSpeed400ns = 0x004A,
+ kAccessSpeed300ns = 0x003A,
+ kAccessSpeed250ns = 0x0001,
+ kAccessSpeed200ns = 0x0002,
+ kAccessSpeed150ns = 0x0003,
+ kAccessSpeed100ns = 0x0004
+};
+
+typedef UInt32 PCCardInterfaceType;
+/* InterfaceType bit-mask (values of PCCardInterfaceType) */
+enum {
+ kIFTypeMask = 0x03, /* IO & memory type mask*/
+ kIFCardBus = 0x00, /* if bits 0 & 1 are zero then cardbus interface*/
+ kIFMemory = 0x01, /* if bit 0 set memory IF*/
+ kIFIO = 0x02, /* if bit 1 set IO IF*/
+ kIFReserved = 0x03, /* bits 0 and 1 set is reserved */
+ kIFDMA = 0x08, /* if bit 3 set DMA supported*/
+ kIFVSKey = 0x10, /* if bit 4 set supports low Voltage key*/
+ kIF33VCC = 0x20, /* if bit 5 set socket suports 3.3v*/
+ kIFXXVCC = 0x40, /* if bit 6 set socket supports X.X voltage*/
+ kIFYYVCC = 0x80 /* if bit 7 set socket supports Y.Y voltage*/
+};
+
+typedef UInt32 PCCardCustomInterfaceID;
+/* Custom Interface Identifiers (values of PCCardCustomInterfaceID) */
+enum {
+ kIFCustom_None = 0x00, /* no custom interface ID */
+ kIFCustom_ZOOM = 0x41 /* ZOOM Video Mode custom interface identifier */
+};
+
+typedef OptionBits PCCardConfigOptions;
+/* Bit mask values for PCCardConfigOptions in the configuration calls */
+enum {
+ kEnableIRQSteering = 0x0002,
+ kIRQChangeValid = 0x0004,
+ kVppChangeValid = 0x0010,
+ kEnableDMAChannel = 0x0040,
+ kDMAChangeValid = 0x0080,
+ kVSOverride = 0x0200 /* Bits 10..31 reserved */
+};
+
+/*
+ Configuration Registers Presence Mask for the FCR
+ Used by PCCardConfigPresentMask
+*/
+enum {
+ kConfigOptionPresent = 0x00000001,
+ kConfigStatusPresent = 0x00000002,
+ kPinReplacePresent = 0x00000004,
+ kSocketCopyPresent = 0x00000008,
+ kExtendedStatusPresent = 0x00000010,
+ kIOBase0Present = 0x00000020,
+ kIOBase1Present = 0x00000040,
+ kIOBase2Present = 0x00000080,
+ kIOBase3Present = 0x00000100,
+ kIOLimitPresent = 0x00000200
+};
+
+typedef UInt32 PCCardConfigPresentMask;
+typedef UInt32 PCCardConfigRegisterIndex;
+typedef UInt32 PCCardConfigRegisterOffset;
+
+struct PCCardFunctionConfigReg {
+ Byte configOptionReg;
+ Byte configStatusReg;
+ Byte pinReplaceReg;
+ Byte socketCopyReg;
+ Byte extendedStatusReg;
+ Byte ioBase0;
+ Byte ioBase1;
+ Byte ioBase2;
+ Byte ioBase3;
+ Byte ioLimit;
+};
+typedef struct PCCardFunctionConfigReg PCCardFunctionConfigReg;
+
+typedef OptionBits PCCardSocketStatus;
+/* general socket status bits (values of PCCardSocketStatus) */
+enum {
+ kSTBatteryDead = 0x0001, /* battery dead*/
+ kSTBatteryLow = 0x0002, /* battery low*/
+ kSTBatteryGood = 0x0004, /* battery good*/
+ kSTPower = 0x0008, /* power is applied*/
+ kST16bit = 0x0010, /* 16-bit PC Card present*/
+ kSTCardBus = 0x0020, /* CardBus PC Card present*/
+ kSTMemoryCard = 0x0040, /* memory card present*/
+ kSTIOCard = 0x0080, /* I/O card present*/
+ kSTNotACard = 0x0100, /* unrecognizable PC Card detected*/
+ kSTReady = 0x0200, /* ready*/
+ kSTWriteProtect = 0x0400, /* card is write-protected*/
+ kSTDataLost = 0x0800, /* data may have been lost due to card removal*/
+ kSTRingIndicate = 0x1000, /* ring indicator is active*/
+ kSTReserved = 0xE000
+};
+
+/* Bit mask for PCCardPowerOptions in the power management calls */
+typedef OptionBits PCCardPowerOptions;
+enum {
+ kPCCardPowerOn = 0x00000001,
+ kPCCardPowerOff = 0x00000002,
+ kPCCardLowPower = 0x00000004
+};
+
+typedef OptionBits PCCardAdapterCapabilities;
+typedef UInt32 PCCardAdapterPowerState;
+typedef OptionBits PCCardSCEvents;
+typedef UInt32 PCCardWindow;
+typedef UInt32 PCCardIRQ;
+typedef UInt32 PCCardDMA;
+/* Selectors for PCCardGetGlobalOptions */
+/* The type of the "value" parameter is provided for each selector. */
+typedef UInt32 PCCardOptionSelector;
+enum {
+ kPCCardPowerManagementAttrib = 1 /* value = (Boolean*) enabled */
+};
+
+
+
+/* Types and structures for accessing the PCCard Assigned-Address property.*/
+
+#define kPCCardAssignedAddressProperty "assigned-addresses"
+enum {
+ kPCCardNonRelocatableSpace = 0x80,
+ kPCCardPrefetchableSpace = 0x40,
+ kPCCard16BitSpace = 0x20,
+ kPCCardAddressTypeCodeMask = 0x07,
+ kPCCardConfigSpace = 0,
+ kPCCardIOSpace = 1,
+ kPCCardMemorySpace = 2,
+ kPCCardAttributeMemorySpace = 4
+};
+
+typedef UInt8 PCCardAddressSpaceFlags;
+enum {
+ kPCCardSocketNumberMask = 0xF8,
+ kPCCardFunctionNumberMask = 0x07
+};
+
+typedef UInt8 PCCardSocketFunction;
+typedef UInt8 PCCardBusNumber;
+typedef UInt8 PCCardRegisterNumber;
+/*
+ note: this structure is similar, but not the same as the PCIAssignedAddress structure
+ 16-bit cards use this structure, CardBus cards use PCIAssignedAddress
+*/
+
+struct PCCardAssignedAddress {
+ PCCardAddressSpaceFlags addressSpaceFlags;
+ UInt8 reserved;
+ PCCardSocketFunction socketFunctionNumber;
+ PCCardRegisterNumber registerNumber;
+ UInt32 address;
+ UInt32 size;
+};
+typedef struct PCCardAssignedAddress PCCardAssignedAddress;
+typedef PCCardAssignedAddress * PCCardAssignedAddressPtr;
+#define GetPCCardIsNonRelocatable( AssignedAddressPtr ) ((AssignedAddressPtr)->addressSpaceFlags & kPCCardNonRelocatableSpace)
+#define GetPCCardIsPrefetchable( AssignedAddressPtr ) ((AssignedAddressPtr)->addressSpaceFlags & kPCCardPrefetchableSpace)
+#define GetPCCardIs16BitSpace( AssignedAddressPtr ) ((AssignedAddressPtr)->addressSpaceFlags & kPCCard16BitSpace)
+#define GetPCCardAddressSpaceType( AssignedAddressPtr ) ((AssignedAddressPtr)->addressSpaceFlags & kPCCardAddressTypeCodeMask)
+#define GetPCCardSocketNumber( AssignedAddressPtr ) (((AssignedAddressPtr)->socketFunctionNumber & kPCCardSocketNumberMask) >> 3)
+#define GetPCCardFunctionNumber( AssignedAddressPtr ) ((AssignedAddressPtr)->socketFunctionNumber & kPCCardFunctionNumberMask)
+#define GetPCCardRegisterNumber( AssignedAddressPtr ) ((AssignedAddressPtr)->registerNumber)
+/*----------------------------------------------------------------------
+ Client Support
+----------------------------------------------------------------------*/
+/* Prototype for client callback */
+typedef CALLBACK_API_C( OSStatus , PCCardEventHandler )(PCCardEvent theEvent, PCCardSocket vSocket, UInt32 device, UInt32 info, UInt32 MTDRequest, UInt32 *Buffer, UInt32 misc, UInt32 status, void *clientParam);
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+PCCardRegisterClient (const RegEntryID * deviceRef,
+ PCCardEventMask eventMask,
+ PCCardEventHandler clientCallBack,
+ void * clientParam,
+ PCCardClientID * newClientID);
+
+EXTERN_API_C( OSStatus )
+PCCardDeRegisterClient (PCCardClientID theClientID);
+
+EXTERN_API_C( OSStatus )
+PCCardRegisterTimer (PCCardClientID registeredClientID,
+ PCCardTimerID * lpNewTimerID,
+ long delay);
+
+EXTERN_API_C( void )
+PCCardDeRegisterTimer (PCCardTimerID timerID);
+
+EXTERN_API_C( OSStatus )
+PCCardSetEventMask (PCCardClientID theClientID,
+ PCCardEventMask newEventMask);
+
+EXTERN_API_C( OSStatus )
+PCCardGetEventMask (PCCardClientID theClientID,
+ PCCardEventMask * newEventMask);
+
+EXTERN_API_C( OSStatus )
+PCCardGetCardServicesInfo (ItemCount * socketCount,
+ UInt32 * complianceLevel,
+ UInt32 * version);
+
+EXTERN_API_C( OSStatus )
+PCCardGetSocketRef (PCCardSocket vSocket,
+ RegEntryID * socketRef);
+
+EXTERN_API_C( OSStatus )
+PCCardGetCardRef (PCCardSocket vSocket,
+ RegEntryID * cardRef);
+
+EXTERN_API_C( OSStatus )
+PCCardGetDeviceRef (PCCardSocket vSocket,
+ UInt32 device,
+ RegEntryID * deviceRef);
+
+EXTERN_API_C( OSStatus )
+PCCardGetSocketAndDeviceFromDeviceRef (const RegEntryID * deviceRef,
+ PCCardSocket * vSocket,
+ UInt32 * device);
+
+EXTERN_API_C( OSStatus )
+PCCardGetCardRefFromDeviceRef (const RegEntryID * deviceRef,
+ RegEntryID * cardRef);
+
+
+/*----------------------------------------------------------------------
+ Resource Management
+----------------------------------------------------------------------*/
+EXTERN_API_C( OSStatus )
+PCCardRequestWindow (const RegEntryID * deviceRef,
+ PCCardWindowAttributes windowAttributes,
+ LogicalAddress * windowBase,
+ ByteCount * windowSize,
+ PCCardAccessSpeed * windowSpeed,
+ PCCardWindowOffset * windowOffset,
+ PCCardWindowID * windowID);
+
+EXTERN_API_C( OSStatus )
+PCCardModifyWindow (PCCardWindowID windowID,
+ PCCardWindowAttributes windowAttributes,
+ PCCardAccessSpeed windowSpeed,
+ PCCardWindowOffset windowOffset);
+
+EXTERN_API_C( OSStatus )
+PCCardReleaseWindow (PCCardWindowID windowID);
+
+EXTERN_API_C( OSStatus )
+PCCardInquireWindow (const RegEntryID * deviceRef,
+ PCCardWindowID windowID,
+ PCCardWindowAttributes * windowAttributes,
+ LogicalAddress * windowBase,
+ ByteCount * windowSize,
+ PCCardAccessSpeed * windowSpeed,
+ PCCardWindowOffset * windowOffset);
+
+EXTERN_API_C( OSStatus )
+PCCardGetStatus (const RegEntryID * deviceRef,
+ UInt32 * currentState,
+ UInt32 * changedState,
+ PCCardVoltage * Vcc,
+ PCCardVoltage * Vpp);
+
+EXTERN_API_C( OSStatus )
+PCCardRequestConfiguration (const RegEntryID * deviceRef,
+ PCCardConfigOptions configOptions,
+ PCCardInterfaceType ifType,
+ PCCardCustomInterfaceID ifCustomType,
+ PCCardVoltage vcc,
+ PCCardVoltage vpp,
+ LogicalAddress configRegistersBase,
+ PCCardConfigPresentMask configRegistersPresent,
+ PCCardFunctionConfigReg * configRegisterValues);
+
+EXTERN_API_C( OSStatus )
+PCCardReleaseConfiguration (const RegEntryID * deviceRef);
+
+EXTERN_API_C( OSStatus )
+PCCardModifyConfiguration (const RegEntryID * deviceRef,
+ PCCardConfigOptions configOptions,
+ PCCardVoltage vpp);
+
+EXTERN_API_C( OSStatus )
+PCCardReadConfigurationRegister (const RegEntryID * deviceRef,
+ PCCardConfigRegisterIndex whichRegister,
+ PCCardConfigRegisterOffset offset,
+ UInt8 * value);
+
+EXTERN_API_C( OSStatus )
+PCCardWriteConfigurationRegister (const RegEntryID * deviceRef,
+ PCCardConfigRegisterIndex whichRegister,
+ PCCardConfigRegisterOffset offset,
+ UInt8 value);
+
+EXTERN_API_C( OSStatus )
+PCCardResetFunction (const RegEntryID * deviceRef);
+
+/*----------------------------------------------------------------------
+ Client Utilities
+----------------------------------------------------------------------*/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+typedef UInt8 PCCardTupleKind;
+typedef struct OpaquePCCardTupleIterator* PCCardTupleIterator;
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( PCCardTupleIterator )
+PCCardNewTupleIterator (void);
+
+EXTERN_API_C( OSStatus )
+PCCardDisposeTupleIterator (PCCardTupleIterator tupleIterator);
+
+EXTERN_API_C( OSStatus )
+PCCardGetFirstTuple (const RegEntryID * deviceID,
+ PCCardTupleKind desiredTuple,
+ PCCardTupleIterator tupleIterator,
+ void * dataBuffer,
+ UInt32 * dataBufferSize,
+ PCCardTupleKind * foundTuple,
+ UInt32 * foundTupleDataSize);
+
+EXTERN_API_C( OSStatus )
+PCCardGetNextTuple (const RegEntryID * deviceRef,
+ PCCardTupleKind desiredTuple,
+ PCCardTupleIterator tupleIterator,
+ void * dataBuffer,
+ UInt32 * dataBufferSize,
+ PCCardTupleKind * foundTuple,
+ UInt32 * foundTupleDataSize);
+
+/*----------------------------------------------------------------------
+ Miscellaneous
+----------------------------------------------------------------------*/
+EXTERN_API_C( OSStatus )
+PCCardEject (const RegEntryID * cardRef);
+
+EXTERN_API_C( OSStatus )
+PCCardEnableModemSound (const RegEntryID * cardRef,
+ Boolean enableSound);
+
+EXTERN_API_C( OSStatus )
+PCCardEnableZoomedVideo (const RegEntryID * cardRef,
+ Boolean enableZoomedVideo);
+
+EXTERN_API_C( OSStatus )
+PCCardEnableZoomedVideoSound (const RegEntryID * cardRef,
+ Boolean enableSound);
+
+EXTERN_API_C( OSStatus )
+PCCardSetPowerLevel (const RegEntryID * deviceRef,
+ PCCardPowerOptions powerLevel);
+
+EXTERN_API_C( OSStatus )
+PCCardSetRingIndicate (const RegEntryID * deviceRef,
+ Boolean setRingIndicate);
+
+EXTERN_API_C( OSStatus )
+PCCardGetGlobalOptions (PCCardOptionSelector selector,
+ void * value);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef UInt32 PCCardDevType;
+typedef UInt32 PCCardSubType;
+/* values for PCCardType and PCCardSubType*/
+enum {
+ kPCCardUnknownType = 0,
+ kPCCardMultiFunctionType = 1,
+ kPCCardMemoryType = 2,
+ kPCCardNullSubType = 0, /* Memory sub types */
+ kPCCardRomSubType = 1,
+ kPCCardOTPromSubType = 2,
+ kPCCardEpromSubType = 3,
+ kPCCardEEpromSubType = 4,
+ kPCCardFlashSubType = 5,
+ kPCCardSramSubType = 6,
+ kPCCardDramSubType = 7,
+ kPCCardSerialPortType = 3,
+ kPCCardSerialOnlySubType = 0,
+ kPCCardDataModemSubType = 1,
+ kPCCardFaxModemSubType = 2,
+ kPCCardFaxAndDataModemMask = (kPCCardDataModemSubType | kPCCardFaxModemSubType),
+ kPCCardVoiceEncodingSubType = 4,
+ kPCCardParallelPortType = 4,
+ kPCCardFixedDiskType = 5,
+ kPCCardUnknownFixedDiskType = 0,
+ kPCCardATAInterfaceDiskSubType = 1,
+ kPCCardRotatingDeviceSubType = (0 << 7),
+ kPCCardSiliconDevice = (1 << 7),
+ kPCCardVideoAdaptorType = 6,
+ kPCCardNetworkAdaptorType = 7,
+ kPCCardArcNetSubType = 1, /* network sub types */
+ kPCCardEthernetSubType = 2,
+ kPCCardTokenRingSubType = 3,
+ kPCCardLocalTalkSubType = 4,
+ kPCCardFDDI_CDDISubType = 5,
+ kPCCardATMSubType = 6,
+ kPCCardWirelessSubType = 7,
+ kPCCardAIMSType = 8,
+ kPCCardSCSIType = 9,
+ kPCCardSerialBusType = 10,
+ kPCCardUSBBusSubType = 1,
+ kPCCardFirewireBusSubType = 2
+};
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+PCCardGetCardInfo (const RegEntryID * cardRef,
+ PCCardDevType * cardType,
+ PCCardSubType * cardSubType,
+ StringPtr cardName,
+ StringPtr vendorName);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+enum {
+ kPCCard16HardwareType = FOUR_CHAR_CODE('pc16'),
+ kCardBusHardwareType = FOUR_CHAR_CODE('cdbs')
+};
+
+typedef UInt32 PCCardHardwareType;
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+PCCardGetCardType (const RegEntryID * socketRef,
+ PCCardHardwareType * cardType);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __PCCARD__ */
+
diff --git a/include/qt/PCCardAdapterPlugin.h b/include/qt/PCCardAdapterPlugin.h
new file mode 100644
index 000000000..f0af6f422
--- /dev/null
+++ b/include/qt/PCCardAdapterPlugin.h
@@ -0,0 +1,204 @@
+/*
+ File: PCCardAdapterPlugin.h
+
+ Contains: PC Card Socket Service Plug-In Programming Interface
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1996-2001 by Apple Computer, Inc. and SystemSoft Corporation. All rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __PCCARDADAPTERPLUGIN__
+#define __PCCARDADAPTERPLUGIN__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __NAMEREGISTRY__
+#include "NameRegistry.h"
+#endif
+
+#ifndef __INTERRUPTS__
+#include "Interrupts.h"
+#endif
+
+#ifndef __PCCARD__
+#include "PCCard.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+
+/*------------------------------------------------------------------------------------
+ Types
+------------------------------------------------------------------------------------*/
+/* Interrupt Status Change bits*/
+
+enum {
+ kSCBatteryDead = 0x01, /* Battery Dead Status Change*/
+ kSCBatteryLow = 0x02, /* Battery Warning Status Change*/
+ kSCReady = 0x04, /* Ready Status Change*/
+ kSCCardDetect = 0x08, /* Card Detect Status Change*/
+ kSCCardEjected = 0x10, /* Card Ejected*/
+ kSCStatusChange = 0x20, /* PC Card Status Change Signal Asserted*/
+ kSCRingIndicate = 0x40 /* PC Card Ring Indicate Signal Asserted*/
+};
+
+
+/* IRQ bits */
+enum {
+ kIRQLevelMask = 0x1F,
+ kIRQInvalid = 0x20,
+ kIRQHigh = 0x40,
+ kIRQEnable = 0x80
+};
+
+
+/* bits for adapter characteristics flags*/
+
+enum {
+ SS_ADPT_FLG_IND = 0x01, /* indicators for write-protect, card lock,*/
+ /* battery status, busy status, and XIP*/
+ /* are shared for all sockets*/
+ SS_ADPT_FLG_PWR = 0x02, /* if set indicates that the sockets*/
+ /* share the same power control*/
+ SS_ADPT_FLG_DBW = 0x04, /* all windows on the adapter must use*/
+ /* the same Data Bus Width*/
+ SS_ADPT_FLG_CARDBUS = 0x08, /* all sockets are CardBus PC Card capable*/
+ SS_ADPT_FLG_DMA = 0x10, /* the adapter has DMA capability*/
+ /* bits for adapter power characteristics*/
+ SS_ADPT_FLG_V33 = 0x20, /* adapter supports 3.3 volt power to socket*/
+ SS_ADPT_FLG_V50 = 0x40, /* adapter supports 5.0 volt power to socket*/
+ SS_ADPT_FLG_V12 = 0x80 /* adapter supports 12.0 volt power to socket*/
+};
+
+
+/*------------------------------------------------------------------------------------
+ Calls exported by the Family
+------------------------------------------------------------------------------------*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+CSReportStatusChange (const RegEntryID * adapterRef,
+ PCCardSocket whichSocket,
+ PCCardSCEvents statusChange,
+ PCCardSocketStatus socketStatus);
+
+/*------------------------------------------------------------------------------------
+ Plugin Dispatch Table
+------------------------------------------------------------------------------------*/
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API_C( OSStatus , SSValidateHardwareProc )(const RegEntryID *deviceID);
+typedef CALLBACK_API_C( OSStatus , SSInitializeProc )(const RegEntryID *deviceID, Boolean replacingOldDriver);
+typedef CALLBACK_API_C( OSStatus , SSSuspendProc )(const RegEntryID *deviceID);
+typedef CALLBACK_API_C( OSStatus , SSResumeProc )(const RegEntryID *deviceID);
+typedef CALLBACK_API_C( OSStatus , SSFinalizeProc )(const RegEntryID *deviceID, Boolean beingReplaced);
+typedef CALLBACK_API_C( OSStatus , SSInquireAdapterProc )(ItemCount *numberOfSockets, ItemCount *numberOfWindows, ItemCount *numberOfBridgeWindow, PCCardAdapterCapabilities *capabilities);
+typedef CALLBACK_API_C( OSStatus , SSInquireSocketProc )(PCCardSocket socket, ItemCount *numberOfWindows, PCCardSocketStatus *supportedSocketStatus, PCCardSCEvents *supportedStatusChange);
+typedef CALLBACK_API_C( OSStatus , SSGetSocketProc )(PCCardSocket socket, PCCardVoltage *Vcc, PCCardVoltage *Vpp, PCCardVoltage *Vs, PCCardInterfaceType *socketIF, PCCardCustomInterfaceID *customIFID, PCCardSocketStatus *socketStatus, PCCardSCEvents *SCEventsMask, PCCardIRQ *IRQ, PCCardDMA *DMA);
+typedef CALLBACK_API_C( OSStatus , SSSetSocketProc )(PCCardSocket socket, PCCardVoltage Vcc, PCCardVoltage Vpp, PCCardInterfaceType socketIF, PCCardCustomInterfaceID customIFID, PCCardSocketStatus statusReset, PCCardSCEvents SCEventsMask, PCCardIRQ IRQ, PCCardDMA DMA);
+typedef CALLBACK_API_C( OSStatus , SSResetSocketProc )(PCCardSocket socket);
+typedef CALLBACK_API_C( OSStatus , SSGetStatusProc )(PCCardSocket socket, PCCardSocketStatus *currentStatus, PCCardSocketStatus *changedStatus);
+typedef CALLBACK_API_C( OSStatus , SSInquireWindowProc )(PCCardSocket *socket, PCCardWindow window, PCCardWindowState *windowState, PCCardWindowSize *windowSize, PCCardWindowAlign *windowAlign);
+typedef CALLBACK_API_C( OSStatus , SSGetWindowProc )(PCCardSocket *socket, PCCardWindow window, PCCardWindowState *windowState, PhysicalAddress *startAddress, PCCardWindowSize *windowSize, PCCardWindowOffset *windowOffset, PCCardAccessSpeed *memSpeed);
+typedef CALLBACK_API_C( OSStatus , SSSetWindowProc )(PCCardSocket socket, PCCardWindow window, PCCardWindowState windowState, PhysicalAddress startAddress, PCCardWindowSize windowSize, PCCardWindowOffset windowOffset, PCCardAccessSpeed memSpeed);
+typedef CALLBACK_API_C( OSStatus , SSGetWindowOffsetProc )(PCCardSocket *socket, PCCardWindow window, PCCardWindowState *windowState, PCCardWindowOffset *windowOffset);
+typedef CALLBACK_API_C( OSStatus , SSSetWindowOffsetProc )(PCCardSocket socket, PCCardWindow window, PCCardWindowState windowState, PCCardWindowOffset windowOffset);
+typedef CALLBACK_API_C( OSStatus , SSInquireBridgeWindowProc )(PCCardSocket *socket, PCCardWindow window, PCCardWindowState *windowState, PCCardWindowSize *windowSize, PCCardWindowAlign *windowAlign);
+typedef CALLBACK_API_C( OSStatus , SSGetBridgeWindowProc )(PCCardSocket *socket, PCCardWindow window, PCCardWindowState *windowState, PhysicalAddress *startAddress, PCCardWindowSize *windowSize);
+typedef CALLBACK_API_C( OSStatus , SSSetBridgeWindowProc )(PCCardSocket socket, PCCardWindow window, PCCardWindowState windowState, PhysicalAddress startAddress, PCCardWindowSize windowSize);
+typedef CALLBACK_API_C( OSStatus , SSGetInterruptSetMemberProc )(PCCardSocket socket, InterruptSetMember *interruptSetMember);
+typedef CALLBACK_API_C( OSStatus , SSEjectCardProc )(PCCardSocket socket);
+enum {
+ kServiceTypePCCardAdapter = FOUR_CHAR_CODE('sock'),
+ kPCCardAdapterPluginVersion = 0x00000001,
+ kPCCardAdapterPluginCurrentVersion = kPCCardAdapterPluginVersion
+};
+
+
+struct PCCardAdapterPluginHeader {
+ UInt32 version;
+ UInt32 reserved1;
+ UInt32 reserved2;
+ UInt32 reserved3;
+};
+typedef struct PCCardAdapterPluginHeader PCCardAdapterPluginHeader;
+
+struct PCCardAdapterPluginDispatchTable {
+ PCCardAdapterPluginHeader header;
+
+ SSValidateHardwareProc validateHardware;
+
+ SSInitializeProc initialize;
+ SSSuspendProc suspend;
+ SSResumeProc resume;
+ SSFinalizeProc finalize;
+
+ SSInquireAdapterProc inquireAdapter;
+ SSInquireSocketProc inquireSocket;
+ SSGetSocketProc getSocket;
+ SSSetSocketProc setSocket;
+ SSResetSocketProc resetSocket;
+ SSGetStatusProc getStatus;
+ SSInquireWindowProc inquireWindow;
+ SSGetWindowProc getWindow;
+ SSSetWindowProc setWindow;
+ SSGetWindowOffsetProc getWindowOffset;
+ SSSetWindowOffsetProc setWindowOffset;
+ SSInquireBridgeWindowProc inquireBridgeWindow;
+ SSGetBridgeWindowProc getBridgeWindow;
+ SSSetBridgeWindowProc setBridgeWindow;
+ SSGetInterruptSetMemberProc getInterruptSetMember;
+ SSEjectCardProc ejectCard;
+};
+typedef struct PCCardAdapterPluginDispatchTable PCCardAdapterPluginDispatchTable;
+typedef PCCardAdapterPluginDispatchTable * PCCardAdapterPluginDispatchTablePtr;
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __PCCARDADAPTERPLUGIN__ */
+
diff --git a/include/qt/PCCardEnablerPlugin.h b/include/qt/PCCardEnablerPlugin.h
new file mode 100644
index 000000000..1d0e32b5d
--- /dev/null
+++ b/include/qt/PCCardEnablerPlugin.h
@@ -0,0 +1,541 @@
+/*
+ File: PCCardEnablerPlugin.h
+
+ Contains: Interfacer for PCCard Manager 3.0
+
+ Version: Technology: Mac OS 8.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1997-2001 by Apple Computer, Inc. and SystemSoft Corporation. All rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __PCCARDENABLERPLUGIN__
+#define __PCCARDENABLERPLUGIN__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __NAMEREGISTRY__
+#include "NameRegistry.h"
+#endif
+
+#ifndef __INTERRUPTS__
+#include "Interrupts.h"
+#endif
+
+#ifndef __PCCARD__
+#include "PCCard.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#ifndef __CARDSERVICES__
+/*
+ NOTE: These prototypes conflict with CardServices.*
+ You cannot use both PCCardEnablerPlugin.h and CardServices.h
+
+*/
+
+/* Copyright: (c) 1996 SystemSoft Corporation, all rights reserved. */
+/*------------------------------------------------------------------------------------
+ Card Services calls exported by the Family
+------------------------------------------------------------------------------------*/
+/* Card Services for Card Enablers*/
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+CSGetCardServicesInfo (UInt32 * socketCount,
+ UInt32 * complianceLevel,
+ UInt32 * version);
+
+
+/* Function prototypes for tuples calls */
+
+EXTERN_API_C( OSStatus )
+CSGetFirstTuple (PCCardSocket socket,
+ UInt32 device,
+ PCCardTupleIterator tupleIterator,
+ Byte desiredTuple,
+ void * tupleData,
+ ByteCount * tupleBufferSize,
+ Byte * foundTuple);
+
+EXTERN_API_C( OSStatus )
+CSGetNextTuple (PCCardTupleIterator tupleIterator,
+ Byte desiredTuple,
+ void * tupleData,
+ ByteCount * tupleBufferSize,
+ Byte * foundTuple);
+
+
+/* Function prototypes for window calls*/
+
+EXTERN_API_C( OSStatus )
+CSRequestWindow (PCCardSocket vSocket,
+ UInt32 device,
+ PCCardWindowAttributes windowAttributes,
+ PCCardAccessSpeed windowSpeed,
+ LogicalAddress * windowBase,
+ PCCardWindowSize * windowSize,
+ PCCardWindowOffset * windowOffset,
+ PCCardWindowID * requestedWindow);
+
+EXTERN_API_C( OSStatus )
+CSReleaseWindow (PCCardWindowID windowToRelease);
+
+EXTERN_API_C( OSStatus )
+CSModifyWindow (PCCardWindowID windowToModify,
+ PCCardWindowType windowAttributes,
+ PCCardAccessSpeed memorySpeed,
+ PCCardWindowOffset * windowOffset);
+
+EXTERN_API_C( OSStatus )
+CSGetWindowBaseAddress (PCCardWindowID window,
+ LogicalAddress * baseAddress);
+
+EXTERN_API_C( OSStatus )
+CSInquireWindow (PCCardSocket vSocket,
+ UInt32 device,
+ PCCardWindowID windowID,
+ PCCardWindowAttributes * windowAttributes,
+ PCCardAccessSpeed * windowParam,
+ UInt32 * windowBase,
+ PCCardWindowSize * windowSize,
+ PCCardWindowOffset * windowOffset);
+
+/* Function prototypes for CIS calls*/
+
+EXTERN_API_C( OSStatus )
+CSValidateCIS (PCCardSocket vSocket,
+ UInt32 device,
+ UInt32 * cisChainCount);
+
+EXTERN_API_C( OSStatus )
+CSGetDeviceCount (PCCardSocket vSocket,
+ UInt32 * deviceCount);
+
+
+/* Function prototypes for Status calls*/
+
+EXTERN_API_C( OSStatus )
+CSGetStatus (PCCardSocket vSocket,
+ UInt32 * currentState,
+ UInt32 * changedState,
+ PCCardVoltage * Vcc,
+ PCCardVoltage * Vpp);
+
+
+/* Function prototypes for configuration calls*/
+
+EXTERN_API_C( OSStatus )
+CSRequestConfiguration (PCCardSocket vSocket,
+ UInt32 device,
+ PCCardConfigOptions configOptions,
+ PCCardInterfaceType socketInterface,
+ PCCardCustomInterfaceID customInterface,
+ PCCardVoltage vcc,
+ PCCardVoltage vpp,
+ PCCardIRQ IRQ,
+ PCCardDMA DMA,
+ UInt32 configRegBaseAddress,
+ PCCardConfigPresentMask configRegPresentMask,
+ PCCardFunctionConfigReg * configReg);
+
+EXTERN_API_C( OSStatus )
+CSModifyConfiguration (PCCardSocket vSocket,
+ UInt32 device,
+ PCCardConfigOptions modifyAttributes,
+ PCCardIRQ IRQ,
+ PCCardDMA DMA,
+ PCCardVoltage Vpp);
+
+EXTERN_API_C( OSStatus )
+CSReleaseConfiguration (PCCardSocket vSocket,
+ UInt32 device);
+
+EXTERN_API_C( OSStatus )
+CSSetRingIndicate (PCCardSocket vSocket,
+ Boolean setRingIndicate);
+
+EXTERN_API_C( OSStatus )
+CSResetFunction (PCCardSocket vSocket,
+ UInt32 device);
+
+EXTERN_API_C( OSStatus )
+CSReadConfigurationRegister (PCCardSocket vSocket,
+ UInt32 device,
+ PCCardConfigPresentMask whichRegister,
+ UInt32 configRegBaseAddress,
+ UInt8 * registerValue);
+
+EXTERN_API_C( OSStatus )
+CSWriteConfigurationRegister (PCCardSocket vSocket,
+ UInt32 device,
+ PCCardConfigPresentMask whichRegister,
+ UInt32 configRegBaseAddress,
+ UInt8 registerValue);
+
+/* Function prototypes for Client Support calls*/
+EXTERN_API_C( OSStatus )
+CSRegisterClient (PCCardSocket vSocket,
+ PCCardEventMask eventMask,
+ PCCardEventHandler clientCallBack,
+ void * clientParam,
+ PCCardClientID * newClientID);
+
+EXTERN_API_C( OSStatus )
+CSDeRegisterClient (PCCardClientID theClientID);
+
+EXTERN_API_C( OSStatus )
+CSSetEventMask (PCCardClientID theClientID,
+ PCCardEventMask newEventMask);
+
+EXTERN_API_C( OSStatus )
+CSGetEventMask (PCCardClientID theClientID,
+ PCCardEventMask * newEventMask);
+
+EXTERN_API_C( OSStatus )
+CSRegisterTimer (PCCardClientID registeredClientID,
+ PCCardTimerID * lpNewTimerID,
+ long delay);
+
+EXTERN_API_C( OSStatus )
+CSDeRegisterTimer (PCCardTimerID timerID);
+
+/* Function prototypes for CardBus Config Space access*/
+EXTERN_API_C( OSStatus )
+CSReadCardBusConfigSpace (PCCardSocket vSocket,
+ UInt32 device,
+ UInt32 configOffset,
+ Byte * data,
+ UInt32 dataSize);
+
+EXTERN_API_C( OSStatus )
+CSWriteCardBusConfigSpace (PCCardSocket vSocket,
+ UInt32 device,
+ UInt32 configOffset,
+ Byte * data,
+ UInt32 dataSize);
+
+/*------------------------------------------------------------------------------------
+ Card Enabler Types
+------------------------------------------------------------------------------------*/
+#endif /* CALL_NOT_IN_CARBON */
+
+enum {
+ kUnknownDeviceType = FOUR_CHAR_CODE('unkn'), /* class-code = 0x00 */
+ kSCSIDeviceType = FOUR_CHAR_CODE('scsi'), /* class-code = 0x01, sub-class = 0x00 */
+ kBlockDeviceType = FOUR_CHAR_CODE('blok'), /* class-code = 0x01, sub-class = 0xXX */
+ kNetworkDeviceType = FOUR_CHAR_CODE('netw'), /* class-code = 0x02 */
+ kDisplayDeviceType = FOUR_CHAR_CODE('dspl'), /* class-code = 0x03 */
+ kMultimediaDeviceType = FOUR_CHAR_CODE('mmdv'), /* class-code = 0x04 */
+ kMemoryDeviceType = FOUR_CHAR_CODE('mem '), /* class-code = 0x05 */
+ kBridgeDeviceType = FOUR_CHAR_CODE('brdg'), /* class-code = 0x06 */
+ kCommDeviceType = FOUR_CHAR_CODE('comm'), /* class-code = 0x07 */
+ kPeripheralDeviceType = FOUR_CHAR_CODE('sysp'), /* class-code = 0x08 */
+ kInputDeviceType = FOUR_CHAR_CODE('inpt'), /* class-code = 0x09 */
+ kDockingDeviceType = FOUR_CHAR_CODE('dock'), /* class-code = 0x0A */
+ kProcessorDeviceType = FOUR_CHAR_CODE('proc'), /* class-code = 0x0B */
+ kFirewireBusDeviceType = FOUR_CHAR_CODE('firw'), /* class-code = 0x0C, sub-class = 0x00 */
+ kACCESSBusDeviceType = FOUR_CHAR_CODE('accs'), /* class-code = 0x0C, sub-class = 0x01 */
+ kSSABusDeviceType = FOUR_CHAR_CODE('ssa '), /* class-code = 0x0C, sub-class = 0x02 */
+ kUSBBusDeviceType = FOUR_CHAR_CODE('usb '), /* class-code = 0x0C, sub-class = 0x03 */
+ kFibreBusDeviceType = FOUR_CHAR_CODE('fibr'), /* class-code = 0x0C, sub-class = 0x04 */
+ kByteDeviceType = FOUR_CHAR_CODE('byte'), /* class-code = 0x?? */
+ kSerialDeviceType = FOUR_CHAR_CODE('ser '), /* class-code = 0x?? */
+ kParallelDeviceType = FOUR_CHAR_CODE('parl'), /* class-code = 0x?? */
+ kAIMSDeviceType = FOUR_CHAR_CODE('aims') /* class-code = 0x?? */
+};
+
+typedef OSType PCDeviceType;
+enum {
+ kAttributeType = 0,
+ kMemoryType = 1,
+ kIOType = 2
+};
+
+typedef UInt32 PCCardMemoryType;
+enum {
+ kUnknown = FOUR_CHAR_CODE('unkn'),
+ kPCCard16 = FOUR_CHAR_CODE('pc16'),
+ kCardBus = FOUR_CHAR_CODE('cdbs')
+};
+
+typedef OSType PCCardArchitectureType;
+#define kNodeNameName "name"
+#define k16BitPCCardName "16bitcard"
+#define kCardbusPropertyName "cardbus"
+#define kNodeCompatiblePropertyName "compatible"
+#define kDevice_TypeName "device_type"
+#define kDriverISTPropertyName "driver-ist"
+#define kFCRAccessPropertyName "FCRAccess"
+#define kConfigRegPropertyName "ConfigRegValues"
+#define kNodeTypePropertyName "PCCardNodeType"
+#define kDeviceNumberPropertName "DeviceNumber"
+#define kSocketNumberPropertName "SocketNumber"
+
+/*------------------------------------------------------------------------------------
+ Plugin Dispatch Table
+------------------------------------------------------------------------------------*/
+enum {
+ kServiceTypePCCardEnabler = FOUR_CHAR_CODE('card'),
+ kPCCardEnablerPluginVersion = 0x00000001,
+ kPCCardEnablerPluginCurrentVersion = kPCCardEnablerPluginVersion
+};
+
+/* Card Enabler Entrypoints*/
+typedef CALLBACK_API_C( OSStatus , CEValidateHardwareProc )(const RegEntryID *cardRef);
+typedef CALLBACK_API_C( OSStatus , CEInitializeProc )(const RegEntryID *cardRef, Boolean replacingOld);
+typedef CALLBACK_API_C( OSStatus , CECleanupProc )(const RegEntryID *cardRef, Boolean beingReplaced);
+typedef CALLBACK_API_C( OSStatus , CEPowerManagementProc )(const RegEntryID *lpCardEntry, PCCardPowerOptions powerLevel);
+typedef CALLBACK_API_C( OSStatus , CEHandleEventProc )(const RegEntryID *cardRef, PCCardEvent theEvent);
+typedef CALLBACK_API_C( OSStatus , CEGetCardInfoProc )(const RegEntryID *cardRef, PCCardDevType *cardType, PCCardSubType *cardSubType, StringPtr cardName, StringPtr vendorName);
+typedef CALLBACK_API_C( OSStatus , CEAddCardPropertiesProc )(const RegEntryID *cardRef);
+typedef CALLBACK_API_C( OSStatus , CEGetDeviceCountProc )(const RegEntryID *cardRef, ItemCount *numberOfDevices);
+typedef CALLBACK_API_C( OSStatus , CEGetDeviceNameProc )(UInt32 socketNumber, UInt32 deviceNumber, char *deviceName);
+typedef CALLBACK_API_C( OSStatus , CEGetDeviceCompatibleProc )(const RegEntryID *deviceRef, UInt32 socketNumber, UInt32 deviceNumber, char *name);
+typedef CALLBACK_API_C( OSStatus , CEGetDeviceTypeProc )(const RegEntryID *deviceRef, UInt32 socketNumber, UInt32 deviceNumber, PCDeviceType *lpDeviceType);
+typedef CALLBACK_API_C( OSStatus , CEGetDeviceTypeNameProc )(const RegEntryID *deviceRef, UInt32 socketNumber, UInt32 deviceNumber, char *name);
+typedef CALLBACK_API_C( OSStatus , CEAddDevicePropertiesProc )(const RegEntryID *deviceRef, UInt32 device);
+typedef CALLBACK_API_C( OSStatus , CEConfigureDeviceProc )(const RegEntryID *deviceRef, UInt32 deviceNumber);
+typedef CALLBACK_API_C( OSStatus , CEFinalizeDeviceProc )(UInt32 socket, UInt32 device, const RegEntryID *deviceRef);
+typedef CALLBACK_API_C( OSStatus , CEValidateCISProc )(UInt32 socket, UInt32 device, UInt32 *lpCISChainCount);
+typedef CALLBACK_API_C( OSStatus , CEGetFirstTupleProc )(UInt32 socket, UInt32 device, PCCardTupleIterator lpTupleIterator, Byte desiredTuple, void *lptupleData, UInt32 *lpTupleBufferSize, Byte *lpFoundTuple);
+typedef CALLBACK_API_C( OSStatus , CEGetNextTupleProc )(PCCardTupleIterator lpTupleIterator, Byte desiredTuple, void *lptupleData, UInt32 *lpTupleBufferSize, Byte *lpFoundTuple);
+
+struct PCCardEnablerPluginHeader {
+ UInt32 pluginDispatchTableVersion;
+ UInt32 reserved1;
+ UInt32 reserved2;
+ UInt32 reserved3;
+};
+typedef struct PCCardEnablerPluginHeader PCCardEnablerPluginHeader;
+
+struct PCCardEnablerPluginDispatchTable {
+ PCCardEnablerPluginHeader header;
+
+ /* General functions*/
+ CEValidateHardwareProc validateHardwareProc;
+ CEInitializeProc initializeProc;
+ CECleanupProc cleanUpProc;
+ CEPowerManagementProc setPCCardPowerLevel;
+
+ /* Card functions*/
+ CEHandleEventProc handleEventProc;
+ CEGetCardInfoProc getCardInfoProc;
+ CEAddCardPropertiesProc addCardProperties;
+ CEGetDeviceCountProc getDeviceCount;
+
+ /* Device functions*/
+ CEGetDeviceNameProc getDeviceName;
+ CEGetDeviceCompatibleProc getDeviceCompatibleNames;
+ CEGetDeviceTypeProc getDeviceType;
+ CEGetDeviceTypeNameProc getDeviceTypeName;
+ CEAddDevicePropertiesProc addDeviceProperties;
+ CEConfigureDeviceProc configureDevice;
+ CEFinalizeDeviceProc finalizeDevice;
+
+ /* Card Services Overrides...*/
+ CEValidateCISProc validateCIS;
+ CEGetFirstTupleProc getFirstTuple;
+ CEGetNextTupleProc getNextTuple;
+
+ /* InterruptHandlers...*/
+ InterruptHandler cardInterruptHandlerFunction;
+ InterruptEnabler cardInterruptEnableFunction;
+ InterruptDisabler cardInterruptDisableFunction;
+};
+typedef struct PCCardEnablerPluginDispatchTable PCCardEnablerPluginDispatchTable;
+typedef PCCardEnablerPluginDispatchTable * PCCardEnablerPluginDispatchTablePtr;
+/*------------------------------------------------------------------------------------
+ PC Card Enabler Utility calls exported by the Family
+------------------------------------------------------------------------------------*/
+/* Generic Enabler Entrypoints*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+CEInitializeCard (const RegEntryID * cardRef,
+ Boolean replacingOld);
+
+EXTERN_API_C( OSStatus )
+CEFinalizeCard (const RegEntryID * cardRef,
+ Boolean beingReplaced);
+
+EXTERN_API_C( OSStatus )
+CEPowerManagement (const RegEntryID * lpParentID,
+ PCCardPowerOptions powerLevel);
+
+EXTERN_API_C( OSStatus )
+CEHandleCardEvent (const RegEntryID * cardRef,
+ PCCardEvent lTheCardEvent);
+
+EXTERN_API_C( OSStatus )
+CEGetCardInfo (const RegEntryID * cardRef,
+ PCCardDevType * cardType,
+ PCCardSubType * cardSubType,
+ StringPtr cardName,
+ StringPtr vendorName);
+
+EXTERN_API_C( OSStatus )
+CEAddCardProperties (const RegEntryID * cardRef);
+
+EXTERN_API_C( OSStatus )
+CEGetDeviceCount (const RegEntryID * cardRef,
+ ItemCount * numberOfDevices);
+
+/* device functions*/
+EXTERN_API_C( OSStatus )
+CEGetDeviceName (UInt32 socketNumber,
+ UInt32 deviceNumber,
+ char * deviceName);
+
+EXTERN_API_C( OSStatus )
+CEGetDeviceCompatibleNames (const RegEntryID * deviceRef,
+ UInt32 socketNumber,
+ UInt32 deviceNumber,
+ char * name);
+
+EXTERN_API_C( OSStatus )
+CEGetDeviceType (const RegEntryID * deviceRef,
+ UInt32 socketNumber,
+ UInt32 deviceNumber,
+ PCDeviceType * lpDeviceType);
+
+EXTERN_API_C( OSStatus )
+CEGetDeviceTypeName (const RegEntryID * deviceRef,
+ UInt32 socketNumber,
+ UInt32 deviceNumber,
+ char * name);
+
+EXTERN_API_C( OSStatus )
+CEAddDeviceProperties (const RegEntryID * deviceRef,
+ UInt32 deviceNumber);
+
+EXTERN_API_C( OSStatus )
+CEConfigureDevice (const RegEntryID * deviceRef,
+ UInt32 deviceNumber);
+
+EXTERN_API_C( OSStatus )
+CEFinalizeDevice (UInt32 socket,
+ UInt32 device,
+ const RegEntryID * deviceRef);
+
+
+/* RegEntryID <-> socket number mapping functions*/
+EXTERN_API_C( OSStatus )
+CEGetSocketAndDeviceFromRegEntry (const RegEntryID * lpNode,
+ UInt32 * lpSocket,
+ UInt32 * lpDevice);
+
+EXTERN_API_C( OSStatus )
+CEGetPhysicalSocketNumber (const RegEntryID * socketRef,
+ const RegEntryID * lpDeviceEntry,
+ UInt32 * lpPhysicalSocketNumber);
+
+/* Hardware Validation Utilities*/
+EXTERN_API_C( OSStatus )
+CECompareCISTPL_VERS_1 (const RegEntryID * cardRef,
+ Byte majorVersion,
+ Byte minorVersion,
+ const char * manufacturer,
+ const char * productName,
+ const char * info1,
+ const char * info2,
+ Boolean * identical);
+
+EXTERN_API_C( OSStatus )
+CECompareCISTPL_MANFID (const RegEntryID * cardRef,
+ UInt16 manufacturerCode,
+ UInt16 manufacturerInfo,
+ Boolean * identical);
+
+EXTERN_API_C( OSStatus )
+CECompareMemory (const RegEntryID * cardRef,
+ PCCardMemoryType memType,
+ ByteCount offset,
+ ByteCount length,
+ Byte * dataToCompare,
+ Boolean * identical);
+
+EXTERN_API_C( OSStatus )
+CEValidateCIS (UInt32 socket,
+ UInt32 device,
+ UInt32 * lpCISChainCount);
+
+EXTERN_API_C( InterruptMemberNumber )
+CEDefaultInterruptHandler (InterruptSetMember ISTmember,
+ void * refCon,
+ UInt32 theIntCount);
+
+
+/*------------------------------------------------------------------------------------
+ PC Card Customization Resources
+------------------------------------------------------------------------------------*/
+#endif /* CALL_NOT_IN_CARBON */
+
+enum {
+ kPCCardCustomInfoResType = FOUR_CHAR_CODE('pccd'),
+ kPCCardCustomInfoVersion = 0
+};
+
+
+struct PCCardCustomResource {
+ long version;
+ short customIconID; /* ICN#, etc. resource ID*/
+ short customStringsID; /* STR# resource ID*/
+ short customTypeStringIndex;
+ short customHelpStringIndex;
+ OSType customAction;
+ long customActionParam1;
+ long customActionParam2;
+};
+typedef struct PCCardCustomResource PCCardCustomResource;
+#endif /* !defined(__CARDSERVICES__) */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __PCCARDENABLERPLUGIN__ */
+
diff --git a/include/qt/PCCardTuples.h b/include/qt/PCCardTuples.h
new file mode 100644
index 000000000..39e5978fe
--- /dev/null
+++ b/include/qt/PCCardTuples.h
@@ -0,0 +1,457 @@
+/*
+ File: PCCardTuples.h
+
+ Contains: List of PCMCIA tuple types and definitions of tuple contents.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc. All rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __PCCARDTUPLES__
+#define __PCCARDTUPLES__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ MAX_TUPLE_SIZE = 256
+};
+
+/*------------------------------------------------------------------------
+ Defines for Tuple codes
+------------------------------------------------------------------------*/
+enum {
+ CISTPL_NULL = 0x00,
+ CISTPL_DEVICE = 0x01,
+ CISTPL_LONGLINK_CB = 0x02,
+ CISTPL_INDIRECT = 0x03,
+ CISTPL_CONFIG_CB = 0x04,
+ CISTPL_CFTABLE_ENTRY_CB = 0x05,
+ CISTPL_LONGLINK_MFC = 0x06,
+ CISTPL_BAR = 0x07,
+ CISTPL_CHECKSUM = 0x10,
+ CISTPL_LONGLINK_A = 0x11,
+ CISTPL_LONGLINK_C = 0x12,
+ CISTPL_LINKTARGET = 0x13,
+ CISTPL_NO_LINK = 0x14,
+ CISTPL_VERS_1 = 0x15,
+ CISTPL_ALTSTR = 0x16,
+ CISTPL_DEVICE_A = 0x17,
+ CISTPL_JEDEC_C = 0x18,
+ CISTPL_JEDEC_A = 0x19,
+ CISTPL_CONFIG = 0x1A,
+ CISTPL_CFTABLE_ENTRY = 0x1B,
+ CISTPL_DEVICE_OC = 0x1C,
+ CISTPL_DEVICE_OA = 0x1D,
+ CISTPL_DEVICE_GEO = 0x1E,
+ CISTPL_DEVICE_GEO_A = 0x1F,
+ CISTPL_MANFID = 0x20,
+ CISTPL_FUNCID = 0x21,
+ CISTPL_FUNCE = 0x22,
+ CISTPL_SWIL = 0x23,
+ CISTPL_VERS_2 = 0x40,
+ CISTPL_FORMAT = 0x41,
+ CISTPL_GEOMETRY = 0x42,
+ CISTPL_BYTEORDER = 0x43,
+ CISTPL_DATE = 0x44,
+ CISTPL_BATTERY = 0x45,
+ CISTPL_ORG = 0x46,
+ CISTPL_VENDOR = 0xFE,
+ CISTPL_END = 0xFF
+};
+
+
+/*------------------------------------------------------------------------
+ Tuple Data Block Definitions
+------------------------------------------------------------------------*/
+
+/*------------ Device Information Tuple (01H, 17H) ----------- */
+
+
+struct DeviceIDTuple {
+ Byte TPLDEV_TYPE_WPS_SPEED; /* Device Type Code: 7-4, WPS: 3, Device Speed: 2-0*/
+ Byte deviceData[253];
+};
+typedef struct DeviceIDTuple DeviceIDTuple;
+enum {
+ TPLDEV_TYPE_MASK = 0xF0, /* device type mask for TPLDEV_TYPE_WPS_SPEED*/
+ TPLDEV_TYPE_EXTENDED = 0xE0, /* device type value for extended type*/
+ TPLDEV_WPS_MASK = 0x08, /* write-protect switch mask for TPLDEV_TYPE_WPS_SPEED*/
+ TPLDEV_SPEED_MASK = 0x07, /* device speed mask for TPLDEV_TYPE_WPS_SPEED*/
+ TPLDEV_DSPEED_NULL = 0x00, /* speed for null device type*/
+ TPLDEV_DSPEED_250NS = 0x01, /* 250ns card access time*/
+ TPLDEV_DSPEED_200NS = 0x02, /* 200ns card access time*/
+ TPLDEV_DSPEED_150NS = 0x03, /* 150ns card access time*/
+ TPLDEV_DSPEED_100NS = 0x04, /* 100ns card access time*/
+ TPLDEV_EXTENDED_SPEED = 0x07, /* device speed value for extended speed*/
+ TPLDEV_SPEED_EXPONENT = 0x07, /* extended byte exponent mask*/
+ TPLDEV_SPEED_MANTISSA = 0x78, /* extended byte mantissa mask*/
+ TPLDEV_SPEED_EXTENDED_MASK = 0x80 /* bit set if more extended speed data follows*/
+};
+
+
+/* device ID types*/
+
+enum {
+ DTYPE_NULL = 0,
+ DTYPE_ROM = 1,
+ DTYPE_OTPROM = 2,
+ DTYPE_EPROM = 3,
+ DTYPE_EEPROM = 4,
+ DTYPE_FLASH = 5,
+ DTYPE_SRAM = 6,
+ DTYPE_DRAM = 7,
+ DTYPE_FUNCSPEC = 0x0D,
+ DTYPE_EXTEND = 0x0E
+};
+
+
+/*--------------- Checksum Control Tuple (10H) --------------- */
+
+
+struct ChecksumControlTuple {
+ short TPLCKS_ADDR; /* offset to region to be checksummed, LSB first*/
+ short TPLCKS_LEN; /* length of region to be checksummed, LSB first*/
+ char TPLCKS_CS; /* checksum of the region*/
+ Byte reserved; /* padding*/
+};
+typedef struct ChecksumControlTuple ChecksumControlTuple;
+/*---------------- Long Link Multi-Function Tuple (06H) ------ */
+
+
+struct LongLinkMFCTuple {
+ UInt8 TPLMFC_NUM; /* Number of sets of config registers for individual functions*/
+
+ UInt8 TPLMFC_TAS1; /* CIS target address space for first function (00 = Attr, 01 = Common)*/
+ UInt32 TPLMFC_ADDR1; /* Target address of first CIS, unsigned long, lsb first*/
+
+ UInt8 TPLMFC_TAS2; /* CIS target address space for second function (00 = Attr, 01 = Common)*/
+ UInt8 TPLMFC_ADDR2[4]; /* [MISALIGNED!] Target address of second CIS, unsigned long, lsb first*/
+
+ /* the following fields are of undetermined length and should be calculated at runtime*/
+ /* */
+ /* UInt8 TPLMFC_TASn;*/
+ /* UInt32 TPLMFC_ADDRn;*/
+};
+typedef struct LongLinkMFCTuple LongLinkMFCTuple;
+/*---------------- Long Link Tuple (11H, 12H) ---------------- */
+
+
+struct LongLinkTuple {
+ UInt32 TPLL_ADDR; /* target address, LSB first*/
+};
+typedef struct LongLinkTuple LongLinkTuple;
+/*----------------- Link Target Tuple (13H) ------------------ */
+
+
+struct LinkTargetTuple {
+ Byte TPLL_TAG[3]; /* tag: should be 'C', 'I', 'S'*/
+};
+typedef struct LinkTargetTuple LinkTargetTuple;
+/*---------------- Level 1 Version Tuple (15H) --------------- */
+
+
+struct Level1VersionTuple {
+ Byte TPLLV1_MAJOR; /* major version number (0x04)*/
+ Byte TPLLV1_MINOR; /* minor version number (0x01 for release 2.0 and 2.01)*/
+ Byte TPLLV1_INFO[1]; /* product information string, zero-terminated*/
+};
+typedef struct Level1VersionTuple Level1VersionTuple;
+/*------------- JEDEC Identifier Tuple (18H, 19H) ------------ */
+
+
+struct JEDECDeviceInfo {
+ Byte manufacturerID;
+ Byte manufacturerInfo;
+};
+typedef struct JEDECDeviceInfo JEDECDeviceInfo;
+
+struct JEDECIdentifierTuple {
+ JEDECDeviceInfo device[1];
+};
+typedef struct JEDECIdentifierTuple JEDECIdentifierTuple;
+/*--------- Configuration Tuple (1AH) ---------- */
+
+
+struct ConfigTuple {
+ Byte TPCC_SZ; /* size of fields byte*/
+ Byte TPCC_LAST; /* index number of last config entry*/
+ Byte TPCC_RADR; /* config reg's base addr in reg. space*/
+ Byte reserved; /* padding*/
+
+ /* the following fields are of undetermined length and should be calculated at runtime*/
+ /*UInt32 TPCC_RMSK;*/
+ /*UInt32 TPCC_RSVD;*/
+ /*UInt32 TPCC_SBTPL;*/
+};
+typedef struct ConfigTuple ConfigTuple;
+/* TPCC_RADR field definitions*/
+enum {
+ TPCC_RASZ = 0x03, /* bits 1-0*/
+ TPCC_RMSZ = 0x3C, /* bits 5-2*/
+ TPCC_RFSZ = 0xC0 /* bits 7-6*/
+};
+
+
+/*--------- Device Geometry Tuple (1EH, 1FH) ----------*/
+
+
+struct DeviceGeometry {
+ UInt8 DGTPL_BUS; /* system bus width = 2^(n-1), n>0*/
+ UInt8 DGTPL_EBS; /* erase block size = 2^(n-1), n>0*/
+ UInt8 DGTPL_RBS; /* read block size = 2^(n-1), n>0*/
+ UInt8 DGTPL_WBS; /* write block size = 2^(n-1), n>0*/
+ UInt8 DGTPL_PART; /* partitioning size = 2^(n-1), n>0*/
+ UInt8 DGTPL_HWIL; /* hardware interleave = 2^(n-1), n>0*/
+};
+typedef struct DeviceGeometry DeviceGeometry;
+
+struct DeviceGeometryTuple {
+ DeviceGeometry device[42];
+};
+typedef struct DeviceGeometryTuple DeviceGeometryTuple;
+/*--------- Manufacturer Identification Tuple (20H) ---------- */
+
+
+struct ManufIDTuple {
+ short TPLMID_MANF; /* PCMCIA PC Card manufacturer code*/
+ short TPLMID_CARD; /* manufacturer information (part number and/or revision)*/
+};
+typedef struct ManufIDTuple ManufIDTuple;
+/*----------- Function Identification Tuple (21H) ------------ */
+
+
+struct FunctionIDTuple {
+ Byte TPLFID_FUNCTION; /* PC card function code*/
+ Byte TPLFID_SYSINIT; /* system initialization bit mask*/
+};
+typedef struct FunctionIDTuple FunctionIDTuple;
+/* function codes*/
+enum {
+ TPLFID_MultiFunction = 0,
+ TPLFID_Memory = 1,
+ TPLFID_SerialPort = 2,
+ TPLFID_ParallelPort = 3,
+ TPLFID_FixedDisk = 4,
+ TPLFID_VideoAdapter = 5,
+ TPLFID_NetworkLANAdapter = 6,
+ TPLFID_AIMS = 7,
+ TPLFID_SCSI = 8,
+ TPLFID_Security = 9
+};
+
+
+/*------------ Software Interleave Tuple (23H) --------------- */
+
+
+struct SoftwareInterleaveTuple {
+ char TPLSWIL_INTRLV; /* software interleave*/
+};
+typedef struct SoftwareInterleaveTuple SoftwareInterleaveTuple;
+/*------- Level 2 Version and Information Tuple (40H) -------- */
+
+
+struct Level2VersionTuple {
+ Byte TPLLV2_VERS; /* structure version (0x00)*/
+ Byte TPLLV2_COMPLY; /* level of compliance with the standard (0x00)*/
+ UInt16 TPLLV2_DINDEX; /* byte address of first data byte in card, LSB first*/
+ Byte TPLLV2_RSV6; /* reserved, must be zero*/
+ Byte TPLLV2_RSV7; /* reserved, must be zero*/
+ Byte TPLLV2_VSPEC8; /* vendor specific byte*/
+ Byte TPLLV2_VSPEC9; /* vendor specific byte*/
+ char TPLLV2_NHDR; /* number of copies of CIS present on this device*/
+ char TPLLV2_OEM[1]; /* vendor of software that formatted card, zero-terminated*/
+ char TPLLV2_INFO[1]; /* informational message about the card, zero-terminated*/
+ Byte reserved; /* padding*/
+};
+typedef struct Level2VersionTuple Level2VersionTuple;
+/*-------------------- Format Tuple (41H) -------------------- */
+
+/* additional information for disk type:*/
+
+
+struct FormatDiskTuple {
+ UInt16 TPLFMT_BKSZ; /* block size, or zero if unblocked format*/
+ UInt32 TPLFMT_NBLOCKS; /* number of data blocks in this partition*/
+ UInt32 TPLFMT_EDCLOC; /* location of error detection code, or zero if interleaved*/
+};
+typedef struct FormatDiskTuple FormatDiskTuple;
+/* additional information for disk type:*/
+
+struct FormatMemTuple {
+ Byte TPLFMT_FLAGS; /* various flags*/
+ Byte TPLFMT_RESERVED; /* reserved, set to zero*/
+ UInt32 TPLFMT_ADDRESS; /* physical location at which this memory partion must be mapped*/
+ UInt32 TPLFMT_EDCLOC; /* location of error detection code, or zero if interleaved*/
+};
+typedef struct FormatMemTuple FormatMemTuple;
+
+struct FormatTuple {
+ char TPLFMT_TYPE; /* format type code*/
+ char TPLFMT_EDC; /* error detection method and length of error detection code*/
+ long TPLFMT_OFFSET; /* offset to first data byte in this partition*/
+ long TPLFMT_NBYTES; /* number of data bytes in this partition*/
+ union {
+ FormatDiskTuple TPLFMT_DISK;
+ FormatMemTuple TPLFMT_MEM;
+ } u;
+};
+typedef struct FormatTuple FormatTuple;
+/* format types*/
+enum {
+ TPLFMTTYPE_DISK = 0,
+ TPLFMTTYPE_MEM = 1,
+ TPLFMTTYPE_VS = 0x80
+};
+
+/* error detection types*/
+
+enum {
+ TPLFMTEDC_NONE = 0,
+ TPLFMTEDC_CKSUM = 1,
+ TPLFMTEDC_CRC = 2,
+ TPLFMTEDC_PCC = 3,
+ TPLFMTEDC_VS = 8
+};
+
+/* bits in TPLFMT_FLAGS*/
+
+enum {
+ TPLFMTFLAGS_ADDR = 0,
+ TPLFMTFLAGS_AUTO = 1
+};
+
+
+/*------------------ Geometry Tuple (42H) -------------------- */
+
+
+struct GeometryTuple {
+ char TPLGEO_SPT; /* number of sectors per track*/
+ char TPLGEO_TPC; /* number of tracks per cylinder*/
+ short TPLGEO_NCYL; /* number of cylinders, total*/
+};
+typedef struct GeometryTuple GeometryTuple;
+/*----------------- Byte-Order Tuple (43H) ------------------- */
+
+
+struct ByteOrderTuple {
+ char TPLBYTE_ORDER; /* byte order code*/
+ char TPLBYTE_MAP; /* byte mapping code*/
+};
+typedef struct ByteOrderTuple ByteOrderTuple;
+/* byte order codes*/
+enum {
+ TYPBYTEORD_LOW = 0,
+ TYPBYTEORD_HIGH = 1,
+ TYPBYTEORD_VS = 0x80
+};
+
+/* byte mapping codes*/
+
+enum {
+ TYPBYTEMAP_LOW = 0,
+ TYPBYTEMAP_HIGH = 1,
+ TYPBYTEMAP_VS = 0x80
+};
+
+
+/*---------- Card Initialization Date Tuple (44H) ------------ */
+
+
+struct CardInitDateTuple {
+ UInt16 TPLDATE_TIME; /* hours, minutes, seconds*/
+ UInt16 TPLDATE_DAY; /* year, month, day*/
+};
+typedef struct CardInitDateTuple CardInitDateTuple;
+/*---------- Battery-Replacement Date Tuple (45H) ------------ */
+
+
+struct BatteryReplaceDateTuple {
+ UInt16 TPLBATT_RDAY; /* last replacement date (year, month, day)*/
+ UInt16 TPLBATT_XDAY; /* battery expiration date (year, month, day)*/
+};
+typedef struct BatteryReplaceDateTuple BatteryReplaceDateTuple;
+
+/*---------------------- General Tuple ----------------------- */
+
+
+union TupleBody {
+ DeviceIDTuple deviceID;
+ ChecksumControlTuple checksum;
+ LongLinkTuple link;
+ LinkTargetTuple target;
+ Level1VersionTuple level1;
+ JEDECIdentifierTuple jedecID;
+ ConfigTuple config;
+ DeviceGeometryTuple devGeo;
+ ManufIDTuple manufID;
+ FunctionIDTuple funcID;
+ SoftwareInterleaveTuple swil;
+ Level2VersionTuple level2;
+ FormatTuple format;
+ GeometryTuple geometry;
+ ByteOrderTuple order;
+ CardInitDateTuple initDate;
+ BatteryReplaceDateTuple battDate;
+ Byte tupleData[254];
+};
+typedef union TupleBody TupleBody;
+
+struct Tuple {
+ Byte TPL_CODE;
+ Byte TPL_LINK;
+ TupleBody TPL_BODY;
+};
+typedef struct Tuple Tuple;
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __PCCARDTUPLES__ */
+
diff --git a/include/qt/PCI.h b/include/qt/PCI.h
new file mode 100644
index 000000000..cf3382d8c
--- /dev/null
+++ b/include/qt/PCI.h
@@ -0,0 +1,248 @@
+/*
+ File: PCI.h
+
+ Contains: PCI Bus Interfaces.
+
+ Version: Technology: PowerSurge 1.0.2
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1993-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __PCI__
+#define __PCI__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __NAMEREGISTRY__
+#include "NameRegistry.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* Definitions for the PCI Config Registers*/
+enum {
+ kPCIConfigVendorID = 0x00,
+ kPCIConfigDeviceID = 0x02,
+ kPCIConfigCommand = 0x04,
+ kPCIConfigStatus = 0x06,
+ kPCIConfigRevisionID = 0x08,
+ kPCIConfigClassCode = 0x09,
+ kPCIConfigCacheLineSize = 0x0C,
+ kPCIConfigLatencyTimer = 0x0D,
+ kPCIConfigHeaderType = 0x0E,
+ kPCIConfigBIST = 0x0F,
+ kPCIConfigBaseAddress0 = 0x10,
+ kPCIConfigBaseAddress1 = 0x14,
+ kPCIConfigBaseAddress2 = 0x18,
+ kPCIConfigBaseAddress3 = 0x1C,
+ kPCIConfigBaseAddress4 = 0x20,
+ kPCIConfigBaseAddress5 = 0x24,
+ kPCIConfigCardBusCISPtr = 0x28,
+ kPCIConfigSubSystemVendorID = 0x2C,
+ kPCIConfigSubSystemID = 0x2E,
+ kPCIConfigExpansionROMBase = 0x30,
+ kPCIConfigCapabilitiesPtr = 0x34,
+ kPCIConfigInterruptLine = 0x3C,
+ kPCIConfigInterruptPin = 0x3D,
+ kPCIConfigMinimumGrant = 0x3E,
+ kPCIConfigMaximumLatency = 0x3F
+};
+
+/* Definitions for the Capabilities PCI Config Register*/
+enum {
+ kPCICapabilityIDOffset = 0x00,
+ kPCINextCapabilityOffset = 0x01,
+ kPCIPowerManagementCapability = 0x01,
+ kPCIAGPCapability = 0x02
+};
+
+/* Types and structures for accessing the PCI Assigned-Address property.*/
+
+#define kPCIAssignedAddressProperty "assigned-addresses"
+enum {
+ kPCIRelocatableSpace = 0x80,
+ kPCIPrefetchableSpace = 0x40,
+ kPCIAliasedSpace = 0x20,
+ kPCIAddressTypeCodeMask = 0x03,
+ kPCIConfigSpace = 0,
+ kPCIIOSpace = 1,
+ kPCI32BitMemorySpace = 2,
+ kPCI64BitMemorySpace = 3
+};
+
+typedef UInt8 PCIAddressSpaceFlags;
+enum {
+ kPCIDeviceNumberMask = 0x1F,
+ kPCIFunctionNumberMask = 0x07
+};
+
+typedef UInt8 PCIDeviceFunction;
+typedef UInt8 PCIBusNumber;
+typedef UInt8 PCIRegisterNumber;
+
+struct PCIAssignedAddress {
+ PCIAddressSpaceFlags addressSpaceFlags;
+ PCIBusNumber busNumber;
+ PCIDeviceFunction deviceFunctionNumber;
+ PCIRegisterNumber registerNumber;
+ UnsignedWide address;
+ UnsignedWide size;
+};
+typedef struct PCIAssignedAddress PCIAssignedAddress;
+typedef PCIAssignedAddress * PCIAssignedAddressPtr;
+#define GetPCIIsRelocatable( AssignedAddressPtr ) ((AssignedAddressPtr)->addressSpaceFlags & kPCIRelocatableSpace)
+#define GetPCIIsPrefetchable( AssignedAddressPtr ) ((AssignedAddressPtr)->addressSpaceFlags & kPCIPrefetchableSpace)
+#define GetPCIIsAliased( AssignedAddressPtr ) ((AssignedAddressPtr)->addressSpaceFlags & kPCIAliasedSpace)
+#define GetPCIAddressSpaceType( AssignedAddressPtr ) ((AssignedAddressPtr)->addressSpaceFlags & kPCIAddressTypeCodeMask)
+#define GetPCIBusNumber( AssignedAddressPtr ) ((AssignedAddressPtr)->busNumber)
+#define GetPCIDeviceNumber( AssignedAddressPtr ) (((AssignedAddressPtr)->deviceFunctionNumber >> 3) & kPCIDeviceNumberMask)
+#define GetPCIFunctionNumber( AssignedAddressPtr ) ((AssignedAddressPtr)->deviceFunctionNumber & kPCIFunctionNumberMask)
+#define GetPCIRegisterNumber( AssignedAddressPtr ) ((AssignedAddressPtr)->registerNumber)
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 EndianSwap16Bit(__D0)
+ #endif
+EXTERN_API( UInt16 )
+EndianSwap16Bit (UInt16 data16) ONEWORDINLINE(0xE158);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 EndianSwap32Bit(__D0)
+ #endif
+EXTERN_API( UInt32 )
+EndianSwap32Bit (UInt32 data32) THREEWORDINLINE(0xE158, 0x4840, 0xE158);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+ExpMgrConfigReadByte (RegEntryIDPtr node,
+ LogicalAddress configAddr,
+ UInt8 * valuePtr) THREEWORDINLINE(0x303C, 0x0620, 0xAAF3);
+
+EXTERN_API( OSErr )
+ExpMgrConfigReadWord (RegEntryIDPtr node,
+ LogicalAddress configAddr,
+ UInt16 * valuePtr) THREEWORDINLINE(0x303C, 0x0621, 0xAAF3);
+
+EXTERN_API( OSErr )
+ExpMgrConfigReadLong (RegEntryIDPtr node,
+ LogicalAddress configAddr,
+ UInt32 * valuePtr) THREEWORDINLINE(0x303C, 0x0622, 0xAAF3);
+
+EXTERN_API( OSErr )
+ExpMgrConfigWriteByte (RegEntryIDPtr node,
+ LogicalAddress configAddr,
+ UInt8 value) THREEWORDINLINE(0x303C, 0x0523, 0xAAF3);
+
+EXTERN_API( OSErr )
+ExpMgrConfigWriteWord (RegEntryIDPtr node,
+ LogicalAddress configAddr,
+ UInt16 value) THREEWORDINLINE(0x303C, 0x0524, 0xAAF3);
+
+EXTERN_API( OSErr )
+ExpMgrConfigWriteLong (RegEntryIDPtr node,
+ LogicalAddress configAddr,
+ UInt32 value) THREEWORDINLINE(0x303C, 0x0625, 0xAAF3);
+
+EXTERN_API( OSErr )
+ExpMgrIOReadByte (RegEntryIDPtr node,
+ LogicalAddress ioAddr,
+ UInt8 * valuePtr) THREEWORDINLINE(0x303C, 0x0626, 0xAAF3);
+
+EXTERN_API( OSErr )
+ExpMgrIOReadWord (RegEntryIDPtr node,
+ LogicalAddress ioAddr,
+ UInt16 * valuePtr) THREEWORDINLINE(0x303C, 0x0627, 0xAAF3);
+
+EXTERN_API( OSErr )
+ExpMgrIOReadLong (RegEntryIDPtr node,
+ LogicalAddress ioAddr,
+ UInt32 * valuePtr) THREEWORDINLINE(0x303C, 0x0628, 0xAAF3);
+
+EXTERN_API( OSErr )
+ExpMgrIOWriteByte (RegEntryIDPtr node,
+ LogicalAddress ioAddr,
+ UInt8 value) THREEWORDINLINE(0x303C, 0x0529, 0xAAF3);
+
+EXTERN_API( OSErr )
+ExpMgrIOWriteWord (RegEntryIDPtr node,
+ LogicalAddress ioAddr,
+ UInt16 value) THREEWORDINLINE(0x303C, 0x052A, 0xAAF3);
+
+EXTERN_API( OSErr )
+ExpMgrIOWriteLong (RegEntryIDPtr node,
+ LogicalAddress ioAddr,
+ UInt32 value) THREEWORDINLINE(0x303C, 0x062B, 0xAAF3);
+
+EXTERN_API( OSErr )
+ExpMgrInterruptAcknowledgeReadByte (RegEntryIDPtr entry,
+ UInt8 * valuePtr) THREEWORDINLINE(0x303C, 0x0411, 0xAAF3);
+
+EXTERN_API( OSErr )
+ExpMgrInterruptAcknowledgeReadWord (RegEntryIDPtr entry,
+ UInt16 * valuePtr) THREEWORDINLINE(0x303C, 0x0412, 0xAAF3);
+
+EXTERN_API( OSErr )
+ExpMgrInterruptAcknowledgeReadLong (RegEntryIDPtr entry,
+ UInt32 * valuePtr) THREEWORDINLINE(0x303C, 0x0413, 0xAAF3);
+
+EXTERN_API( OSErr )
+ExpMgrSpecialCycleWriteLong (RegEntryIDPtr entry,
+ UInt32 value) THREEWORDINLINE(0x303C, 0x0419, 0xAAF3);
+
+EXTERN_API( OSErr )
+ExpMgrSpecialCycleBroadcastLong (UInt32 value) THREEWORDINLINE(0x303C, 0x021A, 0xAAF3);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __PCI__ */
+
diff --git a/include/qt/PEFBinaryFormat.h b/include/qt/PEFBinaryFormat.h
new file mode 100644
index 000000000..9bc0a826e
--- /dev/null
+++ b/include/qt/PEFBinaryFormat.h
@@ -0,0 +1,1129 @@
+/*
+ File: PEFBinaryFormat.h
+
+ Contains: PEF Types and Macros
+
+ Version: Technology: Master Interfaces
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1993-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+
+
+#ifndef __PEFBINARYFORMAT__
+#define __PEFBINARYFORMAT__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+
+
+/* -------------------------------------------------------------------------------------------- */
+/* Almost all types are padded for natural alignment. However the PEFExportedSymbol type is */
+/* 10 bytes long, containing two 32 bit fields and one 16 bit field. Arrays of it must be */
+/* packed, so it requires "68K" alignment. Setting this globally to 68K should also help */
+/* ensure consistent treatment across compilers. */
+
+
+
+/* ======================================================================================== */
+/* Overall Structure */
+/* ================= */
+
+
+
+/* -------------------------------------------------------------------------------------------- */
+/* This header contains a complete set of types and macros for dealing with the PEF executable */
+/* format. While some description is provided, this header is not meant as a primary source */
+/* of documentation on PEF. An excellent specification of PEF can be found in the Macintosh */
+/* Runtime Architectures book. This header is primarily a physical format description. Thus */
+/* it depends on as few other headers as possible and structure fields have obvious sizes. */
+/* */
+/* The physical storage for a PEF executable is known as a "container". This refers to just */
+/* the executable itself, not the file etc. E.g. if five DLLs are packaged in a single file's */
+/* data fork, that one data fork has five containers within it. */
+/* */
+/* A PEF container consists of an overall header, followed by one or more section headers, */
+/* followed by the section name table, followed by the contents for the sections. Some kinds */
+/* of sections have specific internal representation. The "loader" section is the most common */
+/* of these special sections. It contains information on the exports, imports, and runtime */
+/* relocations required to prepare the executable. PEF containers are self contained, all */
+/* portions are located via relative offsets. */
+/* */
+/* */
+/* +-------------------------------+ */
+/* | Container Header | 40 bytes */
+/* +-------------------------------+ */
+/* | Section 0 header | 28 bytes each */
+/* |...............................| */
+/* | - - - - | */
+/* |...............................| */
+/* | Section n-1 header | */
+/* +-------------------------------+ */
+/* | Section Name Table | */
+/* +-------------------------------+ */
+/* | Section x raw data | */
+/* +-------------------------------+ */
+/* | - - - - | */
+/* +-------------------------------+ */
+/* | Section y raw data | */
+/* +-------------------------------+ */
+/* */
+/* */
+/* The sections are implicitly numbered from 0 to n according to the order of their headers. */
+/* The headers of the instantiated sections must precede those of the non-instantiated */
+/* sections. The ordering of the raw data is independent of the section header ordering. */
+/* Each section header contains the offset for that section's raw data. */
+
+
+
+/* =========================================================================================== */
+/* Container Header */
+/* ================ */
+
+
+
+
+struct PEFContainerHeader {
+ OSType tag1; /* Must contain 'Joy!'.*/
+ OSType tag2; /* Must contain 'peff'. (Yes, with two 'f's.)*/
+ OSType architecture; /* The ISA for code sections. Constants in CodeFragments.h.*/
+ UInt32 formatVersion; /* The physical format version.*/
+ UInt32 dateTimeStamp; /* Macintosh format creation/modification stamp.*/
+ UInt32 oldDefVersion; /* Old definition version number for the code fragment.*/
+ UInt32 oldImpVersion; /* Old implementation version number for the code fragment.*/
+ UInt32 currentVersion; /* Current version number for the code fragment.*/
+ UInt16 sectionCount; /* Total number of section headers that follow.*/
+ UInt16 instSectionCount; /* Number of instantiated sections.*/
+ UInt32 reservedA; /* Reserved, must be written as zero.*/
+};
+typedef struct PEFContainerHeader PEFContainerHeader;
+enum {
+ kPEFTag1 = FOUR_CHAR_CODE('Joy!'), /* For non-Apple compilers: 0x4A6F7921.*/
+ kPEFTag2 = FOUR_CHAR_CODE('peff'), /* For non-Apple compilers: 0x70656666.*/
+ kPEFVersion = 0x00000001
+};
+
+
+enum {
+ kPEFFirstSectionHeaderOffset = sizeof(PEFContainerHeader)
+};
+
+#define PEFFirstSectionNameOffset(container) \
+ ( kPEFFirstSectionHeaderOffset + ((container)->sectionCount * sizeof ( PEFSectionHeader )) )
+
+
+
+/* =========================================================================================== */
+/* Section Headers */
+/* =============== */
+
+
+
+
+struct PEFSectionHeader {
+ SInt32 nameOffset; /* Offset of name within the section name table, -1 => none.*/
+ UInt32 defaultAddress; /* Default address, affects relocations.*/
+ UInt32 totalLength; /* Fully expanded size in bytes of the section contents.*/
+ UInt32 unpackedLength; /* Size in bytes of the "initialized" part of the contents.*/
+ UInt32 containerLength; /* Size in bytes of the raw data in the container.*/
+ UInt32 containerOffset; /* Offset of section's raw data.*/
+ UInt8 sectionKind; /* Kind of section contents/usage.*/
+ UInt8 shareKind; /* Sharing level, if a writeable section.*/
+ UInt8 alignment; /* Preferred alignment, expressed as log 2.*/
+ UInt8 reservedA; /* Reserved, must be zero.*/
+};
+typedef struct PEFSectionHeader PEFSectionHeader;
+enum {
+ /* Values for the sectionKind field.*/
+ /* Section kind values for instantiated sections.*/
+ kPEFCodeSection = 0, /* Code, presumed pure & position independent.*/
+ kPEFUnpackedDataSection = 1, /* Unpacked writeable data.*/
+ kPEFPackedDataSection = 2, /* Packed writeable data.*/
+ kPEFConstantSection = 3, /* Read-only data.*/
+ kPEFExecDataSection = 6, /* Intermixed code and writeable data.*/
+ /* Section kind values for non-instantiated sections.*/
+ kPEFLoaderSection = 4, /* Loader tables.*/
+ kPEFDebugSection = 5, /* Reserved for future use.*/
+ kPEFExceptionSection = 7, /* Reserved for future use.*/
+ kPEFTracebackSection = 8 /* Reserved for future use.*/
+};
+
+
+enum {
+ /* Values for the shareKind field.*/
+ kPEFProcessShare = 1, /* Shared within a single process.*/
+ kPEFGlobalShare = 4, /* Shared across the entire system.*/
+ kPEFProtectedShare = 5 /* Readable across the entire system, writeable only to privileged code.*/
+};
+
+
+
+
+/* =========================================================================================== */
+/* Packed Data Contents */
+/* ==================== */
+
+
+
+/* -------------------------------------------------------------------------------------------- */
+/* The raw contents of a packed data section are a sequence of byte codes. The basic format */
+/* has a 3 bit opcode followed by a 5 bit count. Additional bytes might be used to contain */
+/* counts larger than 31, and to contain a second or third count. Further additional bytes */
+/* contain actual data values to transfer. */
+/* */
+/* All counts are represented in a variable length manner. A zero in the initial 5 bit count */
+/* indicates the actual value follows. In this case, and for the second and third counts, the */
+/* count is represented as a variable length sequence of bytes. The bytes are stored in big */
+/* endian manner, most significant part first. The high order bit is set in all but the last */
+/* byte. The value is accumulated by shifting the current value up 7 bits and adding in the */
+/* low order 7 bits of the next byte. */
+
+
+enum {
+ /* The packed data opcodes.*/
+ kPEFPkDataZero = 0, /* Zero fill "count" bytes.*/
+ kPEFPkDataBlock = 1, /* Block copy "count" bytes.*/
+ kPEFPkDataRepeat = 2, /* Repeat "count" bytes "count2"+1 times.*/
+ kPEFPkDataRepeatBlock = 3, /* Interleaved repeated and unique data.*/
+ kPEFPkDataRepeatZero = 4 /* Interleaved zero and unique data.*/
+};
+
+
+enum {
+ kPEFPkDataOpcodeShift = 5,
+ kPEFPkDataCount5Mask = 0x1F,
+ kPEFPkDataMaxCount5 = 31,
+ kPEFPkDataVCountShift = 7,
+ kPEFPkDataVCountMask = 0x7F,
+ kPEFPkDataVCountEndMask = 0x80
+};
+
+
+#define PEFPkDataOpcode(byte) ( ((UInt8)(byte)) >> kPEFPkDataOpcodeShift )
+
+#define PEFPkDataCount5(byte) ( ((UInt8)(byte)) & kPEFPkDataCount5Mask )
+
+#define PEFPkDataComposeInstr(opcode,count5) \
+ ( (((UInt8)(opcode)) << kPEFPkDataOpcodeShift) | ((UInt8)(count5)) )
+
+
+
+/* -------------------------------------------------------------------------------------------- */
+/* The following code snippet can be used to input a variable length count. */
+/* */
+/* count = 0; */
+/* do { */
+/* byte = *bytePtr++; */
+/* count = (count << kPEFPkDataVCountShift) | (byte & kPEFPkDataVCountMask); */
+/* } while ( (byte & kPEFPkDataVCountEndMask) != 0 ); */
+/* */
+/* The following code snippet can be used to output a variable length count to a byte array. */
+/* This is more complex than the input code because the chunks are output in big endian order. */
+/* Think about handling values like 0 or 0x030000. */
+/* */
+/* count = 1;. */
+/* tempValue = value >> kPEFPkDataCountShift; */
+/* while ( tempValue != 0 ) { */
+/* count += 1; */
+/* tempValue = tempValue >> kPEFPkDataCountShift; */
+/* } */
+/* */
+/* bytePtr += count; */
+/* tempPtr = bytePtr - 1; */
+/* *tempPtr-- = value; // ! No need to mask, only the low order byte is stored. */
+/* for ( count -= 1; count != 0; count -= 1 ) { */
+/* value = value >> kPEFPkDataCountShift; */
+/* *tempPtr-- = value | kPEFPkDataCountEndMask; */
+/* } */
+
+
+
+/* =========================================================================================== */
+/* Loader Section */
+/* ============== */
+
+
+
+/* -------------------------------------------------------------------------------------------- */
+/* The loader section contains information needed to prepare the code fragment for execution. */
+/* This includes this fragment's exports, the import libraries and the imported symbols from */
+/* each library, and the relocations for the writeable sections. */
+/* */
+/* +-----------------------------------+ <-- containerOffset --------+ */
+/* | Loader Info Header | 56 bytes | */
+/* |-----------------------------------| | */
+/* | Imported Library 0 | 24 bytes each | */
+/* |...................................| | */
+/* | - - - | | */
+/* |...................................| | */
+/* | Imported Library l-1 | | */
+/* |-----------------------------------| | */
+/* | Imported Symbol 0 | 4 bytes each | */
+/* |...................................| | */
+/* | - - - | | */
+/* |...................................| | */
+/* | Imported Symbol i-1 | | */
+/* |-----------------------------------| | */
+/* | Relocation Header 0 | 12 bytes each | */
+/* |...................................| | */
+/* | - - - | | */
+/* |...................................| | */
+/* | Relocation Header r-1 | | */
+/* |-----------------------------------| <-- + relocInstrOffset -----| */
+/* | Relocation Instructions | | */
+/* |-----------------------------------| <-- + loaderStringsOffset --| */
+/* | Loader String Table | | */
+/* |-----------------------------------| <-- + exportHashOffset -----+ */
+/* | Export Hash Slot 0 | 4 bytes each */
+/* |...................................| */
+/* | - - - | */
+/* |...................................| */
+/* | Export Hash Slot h-1 | */
+/* |-----------------------------------| */
+/* | Export Symbol Key 0 | 4 bytes each */
+/* |...................................| */
+/* | - - - | */
+/* |...................................| */
+/* | Export Symbol Key e-1 | */
+/* |-----------------------------------| */
+/* | Export Symbol 0 | 10 bytes each */
+/* |...................................| */
+/* | - - - | */
+/* |...................................| */
+/* | Export Symbol e-1 | */
+/* +-----------------------------------+ */
+
+
+
+
+struct PEFLoaderInfoHeader {
+ SInt32 mainSection; /* Section containing the main symbol, -1 => none.*/
+ UInt32 mainOffset; /* Offset of main symbol.*/
+ SInt32 initSection; /* Section containing the init routine's TVector, -1 => none.*/
+ UInt32 initOffset; /* Offset of the init routine's TVector.*/
+ SInt32 termSection; /* Section containing the term routine's TVector, -1 => none.*/
+ UInt32 termOffset; /* Offset of the term routine's TVector.*/
+ UInt32 importedLibraryCount; /* Number of imported libraries. ('l')*/
+ UInt32 totalImportedSymbolCount; /* Total number of imported symbols. ('i')*/
+ UInt32 relocSectionCount; /* Number of sections with relocations. ('r')*/
+ UInt32 relocInstrOffset; /* Offset of the relocation instructions.*/
+ UInt32 loaderStringsOffset; /* Offset of the loader string table.*/
+ UInt32 exportHashOffset; /* Offset of the export hash table.*/
+ UInt32 exportHashTablePower; /* Export hash table size as log 2. (Log2('h'))*/
+ UInt32 exportedSymbolCount; /* Number of exported symbols. ('e')*/
+};
+typedef struct PEFLoaderInfoHeader PEFLoaderInfoHeader;
+
+
+/* =========================================================================================== */
+/* Imported Libraries */
+/* ------------------ */
+
+
+
+struct PEFImportedLibrary {
+ UInt32 nameOffset; /* Loader string table offset of library's name.*/
+ UInt32 oldImpVersion; /* Oldest compatible implementation version.*/
+ UInt32 currentVersion; /* Current version at build time.*/
+ UInt32 importedSymbolCount; /* Imported symbol count for this library.*/
+ UInt32 firstImportedSymbol; /* Index of first imported symbol from this library.*/
+ UInt8 options; /* Option bits for this library.*/
+ UInt8 reservedA; /* Reserved, must be zero.*/
+ UInt16 reservedB; /* Reserved, must be zero.*/
+};
+typedef struct PEFImportedLibrary PEFImportedLibrary;
+enum {
+ /* Bits for the PEFImportedLibrary options field.*/
+ kPEFWeakImportLibMask = 0x40, /* The imported library is allowed to be missing.*/
+ kPEFInitLibBeforeMask = 0x80 /* The imported library must be initialized first.*/
+};
+
+
+
+
+/* =========================================================================================== */
+/* Imported Symbols */
+/* ---------------- */
+
+
+
+/* -------------------------------------------------------------------------------------------- */
+/* The PEFImportedSymbol type has the following bit field layout. */
+/* */
+/* 3 */
+/* 0 7 8 1 */
+/* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
+/* | symbol class | offset of symbol name in loader string table | */
+/* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
+/* |<-- 8 bits --->|<-- 24 bits ---------------------------------->| */
+
+
+
+
+struct PEFImportedSymbol {
+ UInt32 classAndName;
+};
+typedef struct PEFImportedSymbol PEFImportedSymbol;
+enum {
+ kPEFImpSymClassShift = 24,
+ kPEFImpSymNameOffsetMask = 0x00FFFFFF,
+ kPEFImpSymMaxNameOffset = 0x00FFFFFF /* 16,777,215*/
+};
+
+#define PEFImportedSymbolClass(classAndName) ((UInt8) ((classAndName) >> kPEFImpSymClassShift))
+#define PEFImportedSymbolNameOffset(classAndName) ((classAndName) & kPEFImpSymNameOffsetMask)
+
+#define PEFComposeImportedSymbol(class,nameOffset) \
+ ( ( ((UInt32)(class)) << kPEFImpSymClassShift ) | ( (UInt32)(nameOffset) ) )
+
+enum {
+ /* Imported and exported symbol classes.*/
+ kPEFCodeSymbol = 0x00,
+ kPEFDataSymbol = 0x01,
+ kPEFTVectorSymbol = 0x02,
+ kPEFTOCSymbol = 0x03,
+ kPEFGlueSymbol = 0x04,
+ kPEFUndefinedSymbol = 0x0F,
+ kPEFWeakImportSymMask = 0x80
+};
+
+
+
+
+/* =========================================================================================== */
+/* Exported Symbol Hash Table */
+/* -------------------------- */
+
+
+
+/* -------------------------------------------------------------------------------------------- */
+/* Exported symbols are described in four parts, optimized for speed of lookup. These parts */
+/* are the "export hash table", the "export key table", the "export symbol table", and the */
+/* "export name table". Overall they contain a flattened representation of a fairly normal */
+/* hashed symbol table. */
+/* */
+/* The export hash table is an array of small fixed size elements. The number of elements is */
+/* a power of 2. A 32 bit hash word for a symbol is converted into an index into this array. */
+/* Each hash slot contains a count of the number of exported symbols that map to this slot and */
+/* the index of the first of those symbols in the key and symbol tables. Of course some hash */
+/* slots will have a zero count. */
+/* */
+/* The key and symbol tables are also arrays of fixed size elements, one for each exported */
+/* symbol. Their entries are grouped by hash slot, those elements mapping to the same hash */
+/* slot are contiguous. The key table contains just the full 32 bit hash word for each */
+/* exported symbol. The symbol table contains the offset of the symbol's name in the string */
+/* table and other information about the exported symbol. */
+/* */
+/* To look up an export you take the hashword and compute the hash slot index. You then scan */
+/* the indicated portion of the key table for matching hashwords. If a hashword matches, you */
+/* look at the corresponding symbol table entry to find the full symbol name. If the names */
+/* match the symbol is found. */
+
+
+
+/* -------------------------------------------------------------------------------------------- */
+/* The following function may be used to compute the hash table size. Signed values are used */
+/* just to avoid potential code generation overhead for unsigned division. */
+/* */
+/* UInt8 PEFComputeHashTableExponent ( SInt32 exportCount ) */
+/* { */
+/* SInt32 exponent; */
+/* */
+/* const SInt32 kExponentLimit = 16; // Arbitrary, but must not exceed 30. */
+/* const SInt32 kAverageChainLimit = 10; // Arbitrary, for space/time tradeoff. */
+/* */
+/* for ( exponent = 0; exponent < kExponentLimit; exponent += 1 ) { */
+/* if ( (exportCount / (1 << exponent)) < kAverageChainLimit ) break; */
+/* } */
+/* */
+/* return exponent; */
+/* */
+/* } // PEFComputeHashTableExponent () */
+
+
+
+/* -------------------------------------------------------------------------------------------- */
+/* The PEFExportedSymbolHashSlot type has the following bit field layout. */
+/* */
+/* 1 1 3 */
+/* 0 3 4 1 */
+/* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
+/* | symbol count | index of first export key | */
+/* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
+/* |<-- 14 bits -------------->|<-- 18 bits ---------------------->| */
+
+
+
+
+struct PEFExportedSymbolHashSlot {
+ UInt32 countAndStart;
+};
+typedef struct PEFExportedSymbolHashSlot PEFExportedSymbolHashSlot;
+enum {
+ kPEFHashSlotSymCountShift = 18,
+ kPEFHashSlotFirstKeyMask = 0x0003FFFF,
+ kPEFHashSlotMaxSymbolCount = 0x00003FFF, /* 16,383*/
+ kPEFHashSlotMaxKeyIndex = 0x0003FFFF /* 262,143*/
+};
+
+#define PEFHashTableIndex(fullHashWord,hashTablePower) \
+ ( ( (fullHashWord) ^ ((fullHashWord) >> (hashTablePower)) ) & ((1 << (hashTablePower)) - 1) )
+
+#define PEFHashSlotSymbolCount(countAndStart) ((UInt32) ((countAndStart) >> kPEFHashSlotSymCountShift))
+#define PEFHashSlotFirstKey(countAndStart) ((countAndStart) & kPEFHashSlotFirstKeyMask)
+
+#define PEFComposeExportedSymbolHashSlot(symbolCount,firstKey) \
+ ( ( ((UInt32)(symbolCount)) << kPEFHashSlotSymCountShift ) | ( (UInt32)(firstKey) ) )
+
+
+
+/* =========================================================================================== */
+/* Exported Symbol Hash Key */
+/* ------------------------ */
+
+
+
+
+struct PEFSplitHashWord {
+ UInt16 nameLength;
+ UInt16 hashValue;
+};
+typedef struct PEFSplitHashWord PEFSplitHashWord;
+
+struct PEFExportedSymbolKey {
+ union {
+ UInt32 fullHashWord;
+ PEFSplitHashWord splitHashWord;
+ } u;
+};
+typedef struct PEFExportedSymbolKey PEFExportedSymbolKey;
+enum {
+ kPEFHashLengthShift = 16,
+ kPEFHashValueMask = 0x0000FFFF,
+ kPEFHashMaxLength = 0x0000FFFF /* 65,535*/
+};
+
+#define PEFHashNameLength(fullHashWord) ((UInt32) ((fullHashWord) >> kPEFHashLengthShift))
+#define PEFHashValue(fullHashWord) ((fullHashWord) & kPEFHashValueMask)
+
+#define PEFComposeFullHashWord(nameLength,hashValue) \
+ ( ( ((UInt32)(nameLength)) << kPEFHashLengthShift ) | ( (UInt32)(hashValue) ) )
+
+
+
+/* ---------------------------------------------------------------------------------------------------- */
+/* The following function computes the full 32 bit hash word. */
+/* */
+/* UInt32 PEFComputeHashWord ( BytePtr nameText, // ! First "letter", not length byte. */
+/* UInt32 nameLength ) // ! The text may be zero terminated. */
+/* { */
+/* BytePtr charPtr = nameText; */
+/* SInt32 hashValue = 0; // ! Signed to match old published algorithm. */
+/* UInt32 length = 0; */
+/* UInt32 limit; */
+/* UInt32 result; */
+/* UInt8 currChar; */
+/* */
+/* #define PseudoRotate(x) ( ( (x) << 1 ) - ( (x) >> 16 ) ) */
+/* */
+/* for ( limit = nameLength; limit > 0; limit -= 1 ) { */
+/* currChar = *charPtr++; */
+/* if ( currChar == NULL ) break; */
+/* length += 1; */
+/* hashValue = PseudoRotate ( hashValue ) ^ currChar; */
+/* } */
+/* */
+/* result = (length << kPEFHashLengthShift) | */
+/* ((UInt16) ((hashValue ^ (hashValue >> 16)) & kPEFHashValueMask)); */
+/* */
+/* return result; */
+/* */
+/* } // PEFComputeHashWord () */
+
+
+
+/* =========================================================================================== */
+/* Exported Symbols */
+/* ---------------- */
+
+
+
+
+struct PEFExportedSymbol { /* ! This structure is 10 bytes long and arrays are packed.*/
+ UInt32 classAndName; /* A combination of class and name offset.*/
+ UInt32 symbolValue; /* Typically the symbol's offset within a section.*/
+ SInt16 sectionIndex; /* The index of the section, or pseudo-section, for the symbol.*/
+};
+typedef struct PEFExportedSymbol PEFExportedSymbol;
+
+/* -------------------------------------------------------------------------------------------- */
+/* The classAndName field of the PEFExportedSymbol type has the following bit field layout. */
+/* */
+/* 3 */
+/* 0 7 8 1 */
+/* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
+/* | symbol class | offset of symbol name in loader string table | */
+/* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
+/* |<-- 8 bits --->|<-- 24 bits ---------------------------------->| */
+
+
+enum {
+ kPEFExpSymClassShift = 24,
+ kPEFExpSymNameOffsetMask = 0x00FFFFFF,
+ kPEFExpSymMaxNameOffset = 0x00FFFFFF /* 16,777,215*/
+};
+
+#define PEFExportedSymbolClass(classAndName) ((UInt8) ((classAndName) >> kPEFExpSymClassShift))
+#define PEFExportedSymbolNameOffset(classAndName) ((classAndName) & kPEFExpSymNameOffsetMask)
+
+#define PEFComposeExportedSymbol(class,nameOffset) \
+ ( ( ((UInt32)(class)) << kPEFExpSymClassShift ) | ( (UInt32)(nameOffset) ) )
+
+enum {
+ /* Negative section indices indicate pseudo-sections.*/
+ kPEFAbsoluteExport = -2, /* The symbol value is an absolute address.*/
+ kPEFReexportedImport = -3 /* The symbol value is the index of a reexported import.*/
+};
+
+
+
+
+/* =========================================================================================== */
+/* Loader Relocations */
+/* ================== */
+
+
+
+/* -------------------------------------------------------------------------------------------- */
+/* The relocations for a section are defined by a sequence of instructions for an abstract */
+/* machine that is specifically geared to performing relocations commonly needed for the "CFM" */
+/* code generation model. These instructions occur in 16 bit chunks. Most instructions have */
+/* just a single chunk. Instructions that are larger than 16 bits have an opcode and some of */
+/* the operands in the first chunk, with other operands in following chunks. */
+/* */
+/* ! Note that the multi-chunk relocations have separate "Compose" macros for each chunk. The */
+/* ! macros have the same basic name with a positional suffix of "_1st", "_2nd", etc. */
+
+
+
+
+typedef UInt16 PEFRelocChunk;
+
+struct PEFLoaderRelocationHeader {
+ UInt16 sectionIndex; /* Index of the section to be fixed up.*/
+ UInt16 reservedA; /* Reserved, must be zero.*/
+ UInt32 relocCount; /* Number of 16 bit relocation chunks.*/
+ UInt32 firstRelocOffset; /* Offset of first relocation instruction.*/
+};
+typedef struct PEFLoaderRelocationHeader PEFLoaderRelocationHeader;
+
+/* -------------------------------------------------------------------------------------------- */
+/* ! Note that the relocCount field is the number of 16 bit relocation chunks, i.e. 1/2 the */
+/* ! total number of bytes of relocation instructions. While most relocation instructions are */
+/* ! 16 bits long, some are longer so the number of complete relocation instructions may be */
+/* ! less than the relocCount value. */
+
+
+
+/* ------------------------------------------------------------------------------------ */
+/* The PEFRelocField macro is a utility for extracting relocation instruction fields. */
+
+
+#define PEFRFShift(offset,length) (16 - ((offset) + (length)))
+#define PEFRFMask(length) ((1 << (length)) - 1)
+
+#define PEFRelocField(chunk,offset,length) \
+ ( ( (chunk) >> (16 - ((offset) + (length))) ) & ((1 << (length)) - 1) )
+
+
+
+/* =========================================================================================== */
+/* Basic Relocation Opcodes */
+/* ------------------------ */
+
+
+/* -------------------------------------------------------------------------------------------- */
+/* The number of opcode bits varies from 2 to 7. The enumeration and switch table given here */
+/* are defined in terms of the most significant 7 bits of the first instruction chunk. An */
+/* instruction is decoded by using the most significant 7 bits as an index into the opcode */
+/* table, which in turn contains appropriately masked forms of the most significant 7 bits. */
+/* The macro PEFRelocBasicOpcode assumes a declaration of the form. */
+/* */
+/* UInt8 kPEFRelocBasicOpcodes [kPEFRelocBasicOpcodeRange] = { PEFMaskedBasicOpcodes }; */
+
+
+enum {
+ kPEFRelocBasicOpcodeRange = 128
+};
+
+#define PEFRelocBasicOpcode(firstChunk) (kPEFRelocBasicOpcodes[(firstChunk)>>9])
+
+
+
+/* -------------------------------------------------------------------------------------------- */
+/* The relocation opcodes, clustered by major and minor groups. The instructions within a */
+/* cluster all have the same bit field layout. The enumeration values use the high order 7 */
+/* bits of the relocation instruction. Unused low order bits are set to zero. */
+
+enum {
+ kPEFRelocBySectDWithSkip = 0x00, /* Binary: 00x_xxxx*/
+ kPEFRelocBySectC = 0x20, /* Binary: 010_0000, group is "RelocRun"*/
+ kPEFRelocBySectD = 0x21, /* Binary: 010_0001*/
+ kPEFRelocTVector12 = 0x22, /* Binary: 010_0010*/
+ kPEFRelocTVector8 = 0x23, /* Binary: 010_0011*/
+ kPEFRelocVTable8 = 0x24, /* Binary: 010_0100*/
+ kPEFRelocImportRun = 0x25, /* Binary: 010_0101*/
+ kPEFRelocSmByImport = 0x30, /* Binary: 011_0000, group is "RelocSmIndex"*/
+ kPEFRelocSmSetSectC = 0x31, /* Binary: 011_0001*/
+ kPEFRelocSmSetSectD = 0x32, /* Binary: 011_0010*/
+ kPEFRelocSmBySection = 0x33, /* Binary: 011_0011*/
+ kPEFRelocIncrPosition = 0x40, /* Binary: 100_0xxx*/
+ kPEFRelocSmRepeat = 0x48, /* Binary: 100_1xxx*/
+ kPEFRelocSetPosition = 0x50, /* Binary: 101_000x*/
+ kPEFRelocLgByImport = 0x52, /* Binary: 101_001x*/
+ kPEFRelocLgRepeat = 0x58, /* Binary: 101_100x*/
+ kPEFRelocLgSetOrBySection = 0x5A, /* Binary: 101_101x*/
+ kPEFRelocUndefinedOpcode = 0xFF /* Used in masking table for all undefined values.*/
+};
+
+
+
+/* ---------------------------------------------------------------------------- */
+/* The RelocLgSetOrBySection instruction has an additional 4 bits of subopcode */
+/* beyond the 7 used by the dispatch table. To be precise it has 6 plus 4 but */
+/* the dispatch table ignores the 7th bit, so the subdispatch is on all 4 extra */
+/* subopcode bits. */
+
+enum {
+ kPEFRelocLgBySectionSubopcode = 0x00, /* Binary: 0000*/
+ kPEFRelocLgSetSectCSubopcode = 0x01, /* Binary: 0001*/
+ kPEFRelocLgSetSectDSubopcode = 0x02 /* Binary: 0010*/
+};
+
+#define PEFRelocLgSetOrBySubopcode(chunk) (((chunk) >> 6) & 0x0F)
+
+
+
+/* -------------------------------------------------------------------------------------------- */
+/* The initial values for the opcode "masking" table. This has the enumeration values from */
+/* above with appropriate replications for "don't care" bits. It is almost certainly shorter */
+/* and faster to look up the masked value in a table than to use a branch tree. */
+
+
+#define PEFMaskedBasicOpcodes \
+ \
+ kPEFRelocBySectDWithSkip, kPEFRelocBySectDWithSkip, kPEFRelocBySectDWithSkip, kPEFRelocBySectDWithSkip, /* 0x00 .. 0x03 */ \
+ kPEFRelocBySectDWithSkip, kPEFRelocBySectDWithSkip, kPEFRelocBySectDWithSkip, kPEFRelocBySectDWithSkip, /* 0x04 .. 0x07 */ \
+ kPEFRelocBySectDWithSkip, kPEFRelocBySectDWithSkip, kPEFRelocBySectDWithSkip, kPEFRelocBySectDWithSkip, /* 0x08 .. 0x0B */ \
+ kPEFRelocBySectDWithSkip, kPEFRelocBySectDWithSkip, kPEFRelocBySectDWithSkip, kPEFRelocBySectDWithSkip, /* 0x0C .. 0x0F */ \
+ \
+ kPEFRelocBySectDWithSkip, kPEFRelocBySectDWithSkip, kPEFRelocBySectDWithSkip, kPEFRelocBySectDWithSkip, /* 0x10 .. 0x13 */ \
+ kPEFRelocBySectDWithSkip, kPEFRelocBySectDWithSkip, kPEFRelocBySectDWithSkip, kPEFRelocBySectDWithSkip, /* 0x14 .. 0x17 */ \
+ kPEFRelocBySectDWithSkip, kPEFRelocBySectDWithSkip, kPEFRelocBySectDWithSkip, kPEFRelocBySectDWithSkip, /* 0x18 .. 0x1B */ \
+ kPEFRelocBySectDWithSkip, kPEFRelocBySectDWithSkip, kPEFRelocBySectDWithSkip, kPEFRelocBySectDWithSkip, /* 0x1C .. 0x1F */ \
+ \
+ kPEFRelocBySectC, kPEFRelocBySectD, kPEFRelocTVector12, kPEFRelocTVector8, /* 0x20 .. 0x23 */ \
+ kPEFRelocVTable8, kPEFRelocImportRun, kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, /* 0x24 .. 0x27 */ \
+ \
+ kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, /* 0x28 .. 0x2B */ \
+ kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, /* 0x2C .. 0x2F */ \
+ \
+ kPEFRelocSmByImport, kPEFRelocSmSetSectC, kPEFRelocSmSetSectD, kPEFRelocSmBySection, /* 0x30 .. 0x33 */ \
+ \
+ kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, /* 0x34 .. 0x37 */ \
+ kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, /* 0x38 .. 0x3B */ \
+ kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, /* 0x3C .. 0x3F */ \
+ \
+ kPEFRelocIncrPosition, kPEFRelocIncrPosition, kPEFRelocIncrPosition, kPEFRelocIncrPosition, /* 0x40 .. 0x43 */ \
+ kPEFRelocIncrPosition, kPEFRelocIncrPosition, kPEFRelocIncrPosition, kPEFRelocIncrPosition, /* 0x44 .. 0x47 */ \
+ \
+ kPEFRelocSmRepeat, kPEFRelocSmRepeat, kPEFRelocSmRepeat, kPEFRelocSmRepeat, /* 0x48 .. 0x4B */ \
+ kPEFRelocSmRepeat, kPEFRelocSmRepeat, kPEFRelocSmRepeat, kPEFRelocSmRepeat, /* 0x4C .. 0x4F */ \
+ \
+ kPEFRelocSetPosition, kPEFRelocSetPosition, kPEFRelocLgByImport, kPEFRelocLgByImport, /* 0x50 .. 0x53 */ \
+ \
+ kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, /* 0x54 .. 0x57 */ \
+ \
+ kPEFRelocLgRepeat, kPEFRelocLgRepeat, kPEFRelocLgSetOrBySection, kPEFRelocLgSetOrBySection, /* 0x58 .. 0x5B */ \
+ \
+ kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, /* 0x5C .. 0x5F */ \
+ \
+ kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, /* 0x60 .. 0x63 */ \
+ kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, /* 0x64 .. 0x67 */ \
+ kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, /* 0x68 .. 0x6B */ \
+ kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, /* 0x6C .. 0x6F */ \
+ \
+ kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, /* 0x70 .. 0x73 */ \
+ kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, /* 0x74 .. 0x77 */ \
+ kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, /* 0x78 .. 0x7B */ \
+ kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode, kPEFRelocUndefinedOpcode /* 0x7C .. 0x7F */
+
+
+
+/* =========================================================================================== */
+/* RelocBySectDWithSkip Instruction */
+/* -------------------------------- */
+
+
+
+/* -------------------------------------------------------------------------------------------- */
+/* The "RelocBySectDWithSkip" instruction has the following bit field layout. */
+/* */
+/* 1 1 */
+/* 0 1 2 9 0 5 */
+/* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
+/* |0 0| skip count | rel count | */
+/* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
+/* | 2 |<-- 8 bits --->|<-- 6 --->| */
+/* */
+/* ! Note that the stored skip count and reloc count are the actual values! */
+
+enum {
+ kPEFRelocWithSkipMaxSkipCount = 255,
+ kPEFRelocWithSkipMaxRelocCount = 63
+};
+
+#define PEFRelocWithSkipSkipCount(chunk) PEFRelocField ( (chunk), 2, 8 )
+#define PEFRelocWithSkipRelocCount(chunk) PEFRelocField ( (chunk), 10, 6 )
+
+#define PEFRelocComposeWithSkip(skipCount,relocCount) \
+ ( 0x0000 | (((UInt16)(skipCount)) << 6) | ((UInt16)(relocCount)) )
+
+
+
+/* =========================================================================================== */
+/* RelocRun Group */
+/* -------------- */
+
+
+
+/* -------------------------------------------------------------------------------------------- */
+/* The "RelocRun" group includes the "RelocBySectC", "RelocBySectD", "RelocTVector12", */
+/* "RelocTVector8", "RelocVTable8", and "RelocImportRun" instructions. This group has the */
+/* following bit field layout. */
+/* */
+/* 1 */
+/* 0 2 3 6 7 5 */
+/* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
+/* |0 1 0| subop.| run length | */
+/* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
+/* | 3 |<- 4 ->|<-- 9 bits ----->| */
+/* */
+/* ! Note that the stored run length is the actual value minus 1, but the macros deal with the */
+/* ! actual value! */
+
+enum {
+ kPEFRelocRunMaxRunLength = 512
+};
+
+#define PEFRelocRunSubopcode(chunk) PEFRelocField ( (chunk), 3, 4 )
+#define PEFRelocRunRunLength(chunk) (PEFRelocField ( (chunk), 7, 9 ) + 1)
+
+#define PEFRelocComposeRun(subopcode,runLength) \
+ ( 0x4000 | (((UInt16)(subopcode)) << 9) | ((UInt16)((runLength)-1)) )
+
+#define PEFRelocComposeBySectC(runLength) PEFRelocComposeRun ( 0, (runLength) )
+#define PEFRelocComposeBySectD(runLength) PEFRelocComposeRun ( 1, (runLength) )
+#define PEFRelocComposeTVector12(runLength) PEFRelocComposeRun ( 2, (runLength) )
+#define PEFRelocComposeTVector8(runLength) PEFRelocComposeRun ( 3, (runLength) )
+#define PEFRelocComposeVTable8(runLength) PEFRelocComposeRun ( 4, (runLength) )
+#define PEFRelocComposeImportRun(runLength) PEFRelocComposeRun ( 5, (runLength) )
+
+
+
+/* =========================================================================================== */
+/* RelocSmIndex Group */
+/* ------------------ */
+
+
+
+/* ---------------------------------------------------------------------------------------- */
+/* The "RelocSmIndex" group includes the "RelocSmByImport", "RelocSmSetSectC", */
+/* "RelocSmSetSectD" and "RelocSmBySection" instructions. This group has the following bit */
+/* field layout. */
+/* */
+/* 1 */
+/* 0 2 3 6 7 5 */
+/* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
+/* |0 1 1| subop.| index | */
+/* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
+/* | 3 |<- 4 ->|<-- 9 bits ----->| */
+/* */
+/* ! Note that the stored index is the actual value! */
+
+enum {
+ kPEFRelocSmIndexMaxIndex = 511
+};
+
+#define PEFRelocSmIndexSubopcode(chunk) PEFRelocField ( (chunk), 3, 4 )
+#define PEFRelocSmIndexIndex(chunk) PEFRelocField ( (chunk), 7, 9 )
+
+#define PEFRelocComposeSmIndex(subopcode,index) \
+ ( 0x6000 | (((UInt16)(subopcode)) << 9) | ((UInt16)(index)) )
+
+#define PEFRelocComposeSmByImport(index) PEFRelocComposeSmIndex ( 0, (index) )
+#define PEFRelocComposeSmSetSectC(index) PEFRelocComposeSmIndex ( 1, (index) )
+#define PEFRelocComposeSmSetSectD(index) PEFRelocComposeSmIndex ( 2, (index) )
+#define PEFRelocComposeSmBySection(index) PEFRelocComposeSmIndex ( 3, (index) )
+
+
+
+/* =========================================================================================== */
+/* RelocIncrPosition Instruction */
+/* ----------------------------- */
+
+
+
+/* -------------------------------------------------------------------------------------------- */
+/* The "RelocIncrPosition" instruction has the following bit field layout. */
+/* */
+/* 1 */
+/* 0 3 4 5 */
+/* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
+/* |1 0 0 0| offset | */
+/* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
+/* |<- 4 ->|<-- 12 bits ---------->| */
+/* */
+/* ! Note that the stored offset is the actual value minus 1, but the macros deal with the */
+/* ! actual value! */
+
+enum {
+ kPEFRelocIncrPositionMaxOffset = 4096
+};
+
+#define PEFRelocIncrPositionOffset(chunk) (PEFRelocField ( (chunk), 4, 12 ) + 1)
+
+#define PEFRelocComposeIncrPosition(offset) \
+ ( 0x8000 | ((UInt16)((offset)-1)) )
+
+
+
+/* =========================================================================================== */
+/* RelocSmRepeat Instruction */
+/* ------------------------- */
+
+
+
+/* -------------------------------------------------------------------------------------------- */
+/* The "RelocSmRepeat" instruction has the following bit field layout. */
+/* */
+/* 1 */
+/* 0 3 4 7 8 5 */
+/* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
+/* |1 0 0 1| chnks | repeat count | */
+/* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
+/* |<- 4 ->|<- 4 ->|<-- 8 bits --->| */
+/* */
+/* ! Note that the stored chunk count and repeat count are the actual values minus 1, but the */
+/* ! macros deal with the actual values! */
+
+enum {
+ kPEFRelocSmRepeatMaxChunkCount = 16,
+ kPEFRelocSmRepeatMaxRepeatCount = 256
+};
+
+#define PEFRelocSmRepeatChunkCount(chunk) (PEFRelocField ( (chunk), 4, 4 ) + 1)
+#define PEFRelocSmRepeatRepeatCount(chunk) (PEFRelocField ( (chunk), 8, 8 ) + 1)
+
+#define PEFRelocComposeSmRepeat(chunkCount,repeatCount) \
+ ( 0x9000 | ((((UInt16)(chunkCount))-1) << 8) | (((UInt16)(repeatCount))-1) )
+
+
+
+/* =========================================================================================== */
+/* RelocSetPosition Instruction */
+/* ---------------------------- */
+
+
+
+/* -------------------------------------------------------------------------------------------- */
+/* The "RelocSetPosition" instruction has the following bit field layout. */
+/* */
+/* 1 1 */
+/* 0 5 6 5 0 5 */
+/* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
+/* |1 0 1 0 0 0| offset (high) | | offset (low) | */
+/* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
+/* |<-- 6 ---->|<-- 10 bits ------>| |<-- 16 bits ------------------>| */
+/* */
+/* ! Note that the stored offset is the actual value! */
+
+enum {
+ kPEFRelocSetPosMaxOffset = 0x03FFFFFF /* 67,108,863*/
+};
+
+#define PEFRelocSetPosOffsetHigh(chunk) PEFRelocField ( (chunk), 6, 10 )
+
+#define PEFRelocSetPosFullOffset(firstChunk,secondChunk) \
+ ( ((((UInt32)(firstChunk)) & 0x03FF) << 16) | ((UInt32)(secondChunk)) )
+
+#define PEFRelocComposeSetPosition_1st(fullOffset) \
+ ( 0xA000 | ((UInt16) (((UInt32)(fullOffset)) >> 16) ) )
+#define PEFRelocComposeSetPosition_2nd(fullOffset) \
+ ( (UInt16) ((UInt32)(fullOffset) & 0xFFFF) )
+
+
+
+/* =========================================================================================== */
+/* RelocLgByImport Instruction */
+/* --------------------------- */
+
+
+
+/* -------------------------------------------------------------------------------------------- */
+/* The "RelocLgByImport" instruction has the following bit field layout. */
+/* */
+/* 1 1 */
+/* 0 5 6 5 0 5 */
+/* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
+/* |1 0 1 0 0 1| index (high) | | index (low) | */
+/* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
+/* |<-- 6 ---->|<-- 10 bits ------>| |<-- 16 bits ------------------>| */
+/* */
+/* ! Note that the stored offset is the actual value! */
+
+enum {
+ kPEFRelocLgByImportMaxIndex = 0x03FFFFFF /* 67,108,863*/
+};
+
+#define PEFRelocLgByImportIndexHigh(chunk) PEFRelocField ( (chunk), 6, 10 )
+
+#define PEFRelocLgByImportFullIndex(firstChunk,secondChunk) \
+ ( ((((UInt32)(firstChunk)) & 0x03FF) << 16) | ((UInt32)(secondChunk)) )
+
+#define PEFRelocComposeLgByImport_1st(fullIndex) \
+ ( 0xA400 | ((UInt16) (((UInt32)(fullIndex)) >> 16) ) )
+#define PEFRelocComposeLgByImport_2nd(fullIndex) \
+ ( (UInt16) ((UInt32)(fullIndex) & 0xFFFF) )
+
+
+
+/* =========================================================================================== */
+/* RelocLgRepeat Instruction */
+/* ------------------------- */
+
+
+
+/* -------------------------------------------------------------------------------------------- */
+/* The "RelocLgRepeat" instruction has the following bit field layout. */
+/* */
+/* 1 1 1 */
+/* 0 5 6 9 0 5 0 5 */
+/* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
+/* |1 0 1 1 0 0| chnks | rpt (high)| | repeat count (low) | */
+/* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
+/* |<-- 6 --->|<- 4 ->|<-- 6 --->| |<-- 16 bits ------------------>| */
+/* */
+/* ! Note that the stored chunk count is the actual value minus 1, but the macros deal with */
+/* ! the actual value! The stored repeat count is the actual value! */
+
+enum {
+ kPEFRelocLgRepeatMaxChunkCount = 16,
+ kPEFRelocLgRepeatMaxRepeatCount = 0x003FFFFF /* 4,194,303*/
+};
+
+#define PEFRelocLgRepeatChunkCount(chunk) (PEFRelocField ( (chunk), 6, 4 ) + 1)
+#define PEFRelocLgRepeatRepeatCountHigh(chunk) PEFRelocField ( (chunk), 10, 6 )
+
+#define PEFRelocLgRepeatFullRepeatCount(firstChunk,secondChunk) \
+ ( ((((UInt32)(firstChunk)) & 0x003F) << 16) | ((UInt32)(secondChunk)) )
+
+#define PEFRelocComposeLgRepeat_1st(chunkCount,fullRepeatCount) \
+ ( 0xB000 | ((((UInt16)(chunkCount))-1) << 6) | ((UInt16) (((UInt32)(fullRepeatCount)) >>16 ) ) )
+#define PEFRelocComposeLgRepeat_2nd(chunkCount,fullRepeatCount) \
+ ( (UInt16) ((UInt32)(fullRepeatCount) & 0xFFFF) )
+
+
+
+/* =========================================================================================== */
+/* RelocLgSetOrBySection Group */
+/* --------------------------- */
+
+
+
+/* -------------------------------------------------------------------------------------------- */
+/* The "RelocLgSetOrBySection" instruction is really a group including the "RelocLgBySection", */
+/* "RelocLgSetSectC" and "RelocLgSetSectD" instructions. This group has the following bit */
+/* field layout. */
+/* */
+/* 1 1 1 */
+/* 0 5 6 9 0 5 0 5 */
+/* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
+/* |1 0 1 1 0 1| subop | idx (high)| | index (low) | */
+/* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
+/* |<-- 6 --->|<- 4 ->|<-- 6 --->| |<-- 16 bits ------------------>| */
+/* */
+/* ! Note that the stored index is the actual value! */
+
+enum {
+ kPEFRelocLgSetOrBySectionMaxIndex = 0x003FFFFF /* 4,194,303*/
+};
+
+#define PEFRelocLgSetOrBySectionSubopcode(chunk) PEFRelocField ( (chunk), 6, 4 )
+#define PEFRelocLgSetOrBySectionIndexHigh(chunk) PEFRelocField ( (chunk), 10, 6 )
+
+#define PEFRelocLgSetOrBySectionFullIndex(firstChunk,secondChunk) \
+ ( ((((UInt32)(firstChunk)) & 0x003F) << 16) | ((UInt32)(secondChunk)) )
+
+#define PEFRelocComposeLgSetOrBySection_1st(subopcode,fullIndex) \
+ ( 0xB400 | (((UInt16)(subopcode)) << 6) | ((UInt16) (((UInt32)(fullIndex)) >> 16) ) )
+#define PEFRelocComposeLgSetOrBySection_2nd(subopcode,fullIndex) \
+ ( (UInt16) ((UInt32)(fullIndex) & 0xFFFF) )
+
+#define PEFRelocComposeLgBySection(fullIndex) PEFRelocComposeLgSetOrBySection ( 0x00, (fullIndex) )
+#define PEFRelocComposeLgSetSectC(fullIndex) PEFRelocComposeLgSetOrBySection ( 0x01, (fullIndex) )
+#define PEFRelocComposeLgSetSectD(fullIndex) PEFRelocComposeLgSetOrBySection ( 0x02, (fullIndex) )
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __PEFBINARYFORMAT__ */
+
diff --git a/include/qt/PLStringFuncs.h b/include/qt/PLStringFuncs.h
new file mode 100644
index 000000000..b77c7333c
--- /dev/null
+++ b/include/qt/PLStringFuncs.h
@@ -0,0 +1,122 @@
+/*
+ File: PLStringFuncs.h
+
+ Contains: xxx put contents here xxx
+
+ Version: Technology: xxx put version here xxx
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1999-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __PLSTRINGFUNCS__
+#define __PLSTRINGFUNCS__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+EXTERN_API( short )
+PLstrcmp (ConstStr255Param str1,
+ ConstStr255Param str2);
+
+EXTERN_API( short )
+PLstrncmp (ConstStr255Param str1,
+ ConstStr255Param str2,
+ short num);
+
+EXTERN_API( StringPtr )
+PLstrcpy (StringPtr str1,
+ ConstStr255Param str2);
+
+EXTERN_API( StringPtr )
+PLstrncpy (StringPtr str1,
+ ConstStr255Param str2,
+ short num);
+
+EXTERN_API( StringPtr )
+PLstrcat (StringPtr str1,
+ ConstStr255Param str2);
+
+EXTERN_API( StringPtr )
+PLstrncat (StringPtr str1,
+ ConstStr255Param str2,
+ short num);
+
+EXTERN_API( Ptr )
+PLstrchr (ConstStr255Param str1,
+ short ch1);
+
+EXTERN_API( Ptr )
+PLstrrchr (ConstStr255Param str1,
+ short ch1);
+
+EXTERN_API( Ptr )
+PLstrpbrk (ConstStr255Param str1,
+ ConstStr255Param str2);
+
+EXTERN_API( short )
+PLstrspn (ConstStr255Param str1,
+ ConstStr255Param str2);
+
+EXTERN_API( Ptr )
+PLstrstr (ConstStr255Param str1,
+ ConstStr255Param str2);
+
+EXTERN_API( short )
+PLstrlen (ConstStr255Param str);
+
+EXTERN_API( short )
+PLpos (ConstStr255Param str1,
+ ConstStr255Param str2);
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __PLSTRINGFUNCS__ */
+
diff --git a/include/qt/PPCToolbox.h b/include/qt/PPCToolbox.h
new file mode 100644
index 000000000..0b32e0be1
--- /dev/null
+++ b/include/qt/PPCToolbox.h
@@ -0,0 +1,636 @@
+/*
+ File: PPCToolbox.h
+
+ Contains: Program-Program Communications Toolbox Interfaces.
+
+ Version: Technology: Mac OS 9
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1989-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __PPCTOOLBOX__
+#define __PPCTOOLBOX__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __APPLETALK__
+#include "AppleTalk.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+
+typedef UInt8 PPCServiceType;
+enum {
+ ppcServiceRealTime = 1
+};
+
+
+typedef SInt16 PPCLocationKind;
+enum {
+ ppcNoLocation = 0, /* There is no PPCLocName */
+ ppcNBPLocation = 1, /* Use AppleTalk NBP */
+ ppcNBPTypeLocation = 2, /* Used for specifying a location name type during PPCOpen only */
+ ppcXTIAddrLocation = 3 /* Use TCP/IP or DNS host name address */
+};
+
+
+typedef SInt16 PPCPortKinds;
+enum {
+ ppcByCreatorAndType = 1, /* Port type is specified as colloquial Mac creator and type */
+ ppcByString = 2 /* Port type is in pascal string format */
+};
+
+/* Values returned for request field in PPCInform call */
+
+typedef UInt8 PPCSessionOrigin;
+enum {
+ ppcLocalOrigin = 1, /* session originated from this machine */
+ ppcRemoteOrigin = 2 /* session originated from remote machine */
+};
+
+
+typedef short PPCPortRefNum;
+typedef long PPCSessRefNum;
+
+
+/* The maximum allowed size of a fAddress in PPCXTIAddress */
+enum {
+ kMaxPPCXTIAddress = 95
+};
+
+
+/*
+ The possible types of information found in the fAddressType field of a PPCXTIAddress record
+ Note: These constants are the same as the AF_INET & AF_DNS constants, defined in OpenTptInternet.x
+*/
+
+typedef SInt16 PPCXTIAddressType;
+enum {
+ kINETAddrType = 2, /* An IP address in binary form (type InetHost).*/
+ kDNSAddrType = 42 /* A DNS or dotted-decimal name string (no leading length byte, no NULL termination byte)*/
+};
+
+
+/*
+ This structure specifies a transport independent network address in a
+ form that can be used by Open Transport, or as a XTI/TLI/socket network
+ address in UNIX terminology.
+*/
+
+struct PPCXTIAddress {
+ PPCXTIAddressType fAddressType; /* A constant specifying what kind of network address this is */
+ UInt8 fAddress[96]; /* The contents of the network address (variable length, NULL terminated). */
+};
+typedef struct PPCXTIAddress PPCXTIAddress;
+typedef PPCXTIAddress * PPCXTIAddressPtr;
+
+
+/*
+ This structure is the variant type used in a LocationNameRec when an IP connection
+ is being established for a PPC Toolbox session.
+
+ NOTE: The value of the xtiAddrLen must be the length of the entire PPCXTIAddress structure
+ in the xtiAddr field, and not just the length of the fAddress field of the PPCXTIAddress structure.
+*/
+
+struct PPCAddrRec {
+ UInt8 Reserved[3]; /* reserved - must be initialize to 0 */
+ UInt8 xtiAddrLen; /* size of the xtiAddr field */
+ PPCXTIAddress xtiAddr; /* the transport-independent network address */
+};
+typedef struct PPCAddrRec PPCAddrRec;
+typedef PPCAddrRec * PPCAddrRecPtr;
+
+
+struct LocationNameRec {
+ PPCLocationKind locationKindSelector; /* which variant */
+ union {
+ EntityName nbpEntity; /* NBP name entity */
+ Str32 nbpType; /* just the NBP type string, for PPCOpen */
+ PPCAddrRec xtiType; /* an XTI-type network address record */
+ } u;
+};
+typedef struct LocationNameRec LocationNameRec;
+
+typedef LocationNameRec * LocationNamePtr;
+
+
+struct PPCPortRec {
+ ScriptCode nameScript; /* script of name */
+ Str32Field name; /* name of port as seen in browser */
+ PPCPortKinds portKindSelector; /* which variant */
+ union {
+ Str32 portTypeStr; /* pascal type string */
+ struct {
+ OSType portCreator;
+ OSType portType;
+ } port;
+ } u;
+};
+typedef struct PPCPortRec PPCPortRec;
+
+typedef PPCPortRec * PPCPortPtr;
+
+struct PortInfoRec {
+ SInt8 filler1;
+ Boolean authRequired;
+ PPCPortRec name;
+};
+typedef struct PortInfoRec PortInfoRec;
+
+typedef PortInfoRec * PortInfoPtr;
+typedef PortInfoRec * PortInfoArrayPtr;
+typedef union PPCParamBlockRec PPCParamBlockRec;
+typedef PPCParamBlockRec * PPCParamBlockPtr;
+typedef CALLBACK_API( void , PPCCompProcPtr )(PPCParamBlockPtr pb);
+typedef STACK_UPP_TYPE(PPCCompProcPtr) PPCCompUPP;
+#define PPCHeader \
+ Ptr qLink; /* PPC's Internal Use */\
+ unsigned short csCode; /* Requested PPC command */\
+ unsigned short intUse; /* Internal Use */\
+ Ptr intUsePtr; /* Internal Use */\
+ PPCCompUPP ioCompletion; /* 12 --> Completion Routine */\
+ OSErr ioResult; /* 16 <-- Command Result Code */\
+ unsigned long Reserved[5]; /* Reserved for PPC, Don't use */
+
+
+struct PPCOpenPBRec {
+ Ptr qLink; /* PPC's Internal Use */
+ unsigned short csCode; /* Requested PPC command */
+ unsigned short intUse; /* Internal Use */
+ Ptr intUsePtr; /* Internal Use */
+ PPCCompUPP ioCompletion; /* 12 --> Completion Routine */
+ OSErr ioResult; /* 16 <-- Command Result Code */
+ unsigned long Reserved[5]; /* Reserved for PPC, Don't use */
+ PPCPortRefNum portRefNum; /* 38 <-- Port Reference */
+ long filler1;
+ PPCServiceType serviceType; /* 44 --> Bit field describing the requested port service */
+ UInt8 resFlag; /* Must be set to 0 */
+ PPCPortPtr portName; /* 46 --> PortName for PPC */
+ LocationNamePtr locationName; /* 50 --> If NBP Registration is required */
+ Boolean networkVisible; /* 54 --> make this network visible on network */
+ Boolean nbpRegistered; /* 55 <-- The given location name was registered on the network */
+};
+typedef struct PPCOpenPBRec PPCOpenPBRec;
+
+typedef PPCOpenPBRec * PPCOpenPBPtr;
+
+struct PPCInformPBRec {
+ Ptr qLink; /* PPC's Internal Use */
+ unsigned short csCode; /* Requested PPC command */
+ unsigned short intUse; /* Internal Use */
+ Ptr intUsePtr; /* Internal Use */
+ PPCCompUPP ioCompletion; /* 12 --> Completion Routine */
+ OSErr ioResult; /* 16 <-- Command Result Code */
+ unsigned long Reserved[5]; /* Reserved for PPC, Don't use */
+ PPCPortRefNum portRefNum; /* 38 --> Port Identifier */
+ PPCSessRefNum sessRefNum; /* 40 <-- Session Reference */
+ PPCServiceType serviceType; /* 44 <-- Status Flags for type of session, local, remote */
+ Boolean autoAccept; /* 45 --> if true session will be accepted automatically */
+ PPCPortPtr portName; /* 46 --> Buffer for Source PPCPortRec */
+ LocationNamePtr locationName; /* 50 --> Buffer for Source LocationNameRec */
+ StringPtr userName; /* 54 --> Buffer for Soure user's name trying to link. */
+ unsigned long userData; /* 58 <-- value included in PPCStart's userData */
+ PPCSessionOrigin requestType; /* 62 <-- Local or Network */
+ SInt8 filler;
+};
+typedef struct PPCInformPBRec PPCInformPBRec;
+
+typedef PPCInformPBRec * PPCInformPBPtr;
+
+struct PPCStartPBRec {
+ Ptr qLink; /* PPC's Internal Use */
+ unsigned short csCode; /* Requested PPC command */
+ unsigned short intUse; /* Internal Use */
+ Ptr intUsePtr; /* Internal Use */
+ PPCCompUPP ioCompletion; /* 12 --> Completion Routine */
+ OSErr ioResult; /* 16 <-- Command Result Code */
+ unsigned long Reserved[5]; /* Reserved for PPC, Don't use */
+ PPCPortRefNum portRefNum; /* 38 --> Port Identifier */
+ PPCSessRefNum sessRefNum; /* 40 <-- Session Reference */
+ PPCServiceType serviceType; /* 44 <-- Actual service method (realTime) */
+ UInt8 resFlag; /* 45 --> Must be set to 0 */
+ PPCPortPtr portName; /* 46 --> Destination portName */
+ LocationNamePtr locationName; /* 50 --> NBP or NAS style service location name */
+ unsigned long rejectInfo; /* 54 <-- reason for rejecting the session request */
+ unsigned long userData; /* 58 --> Copied to destination PPCInform parameter block */
+ unsigned long userRefNum; /* 62 --> userRefNum (obtained during login process) */
+};
+typedef struct PPCStartPBRec PPCStartPBRec;
+
+typedef PPCStartPBRec * PPCStartPBPtr;
+
+struct PPCAcceptPBRec {
+ Ptr qLink; /* PPC's Internal Use */
+ unsigned short csCode; /* Requested PPC command */
+ unsigned short intUse; /* Internal Use */
+ Ptr intUsePtr; /* Internal Use */
+ PPCCompUPP ioCompletion; /* 12 --> Completion Routine */
+ OSErr ioResult; /* 16 <-- Command Result Code */
+ unsigned long Reserved[5]; /* Reserved for PPC, Don't use */
+ short filler1;
+ PPCSessRefNum sessRefNum; /* 40 --> Session Reference */
+};
+typedef struct PPCAcceptPBRec PPCAcceptPBRec;
+
+typedef PPCAcceptPBRec * PPCAcceptPBPtr;
+
+struct PPCRejectPBRec {
+ Ptr qLink; /* PPC's Internal Use */
+ unsigned short csCode; /* Requested PPC command */
+ unsigned short intUse; /* Internal Use */
+ Ptr intUsePtr; /* Internal Use */
+ PPCCompUPP ioCompletion; /* 12 --> Completion Routine */
+ OSErr ioResult; /* 16 <-- Command Result Code */
+ unsigned long Reserved[5]; /* Reserved for PPC, Don't use */
+ short filler1;
+ PPCSessRefNum sessRefNum; /* 40 --> Session Reference */
+ short filler2;
+ long filler3;
+ long filler4;
+ unsigned long rejectInfo; /* 54 --> reason for rejecting the session request */
+};
+typedef struct PPCRejectPBRec PPCRejectPBRec;
+
+typedef PPCRejectPBRec * PPCRejectPBPtr;
+
+struct PPCWritePBRec {
+ Ptr qLink; /* PPC's Internal Use */
+ unsigned short csCode; /* Requested PPC command */
+ unsigned short intUse; /* Internal Use */
+ Ptr intUsePtr; /* Internal Use */
+ PPCCompUPP ioCompletion; /* 12 --> Completion Routine */
+ OSErr ioResult; /* 16 <-- Command Result Code */
+ unsigned long Reserved[5]; /* Reserved for PPC, Don't use */
+ short filler1;
+ PPCSessRefNum sessRefNum; /* 40 --> Session Reference */
+ Size bufferLength; /* 44 --> Length of the message buffer */
+ Size actualLength; /* 48 <-- Actual Length Written */
+ Ptr bufferPtr; /* 52 --> Pointer to message buffer */
+ Boolean more; /* 56 --> if more data in this block will be written */
+ SInt8 filler2;
+ unsigned long userData; /* 58 --> Message block userData Uninterpreted by PPC */
+ OSType blockCreator; /* 62 --> Message block creator Uninterpreted by PPC */
+ OSType blockType; /* 66 --> Message block type Uninterpreted by PPC */
+};
+typedef struct PPCWritePBRec PPCWritePBRec;
+
+typedef PPCWritePBRec * PPCWritePBPtr;
+
+struct PPCReadPBRec {
+ Ptr qLink; /* PPC's Internal Use */
+ unsigned short csCode; /* Requested PPC command */
+ unsigned short intUse; /* Internal Use */
+ Ptr intUsePtr; /* Internal Use */
+ PPCCompUPP ioCompletion; /* 12 --> Completion Routine */
+ OSErr ioResult; /* 16 <-- Command Result Code */
+ unsigned long Reserved[5]; /* Reserved for PPC, Don't use */
+ short filler1;
+ PPCSessRefNum sessRefNum; /* 40 --> Session Reference */
+ Size bufferLength; /* 44 --> Length of the message buffer */
+ Size actualLength; /* 48 <-- Actual length read */
+ Ptr bufferPtr; /* 52 --> Pointer to message buffer */
+ Boolean more; /* 56 <-- if true more data in this block to be read */
+ SInt8 filler2;
+ unsigned long userData; /* 58 <-- Message block userData Uninterpreted by PPC */
+ OSType blockCreator; /* 62 <-- Message block creator Uninterpreted by PPC */
+ OSType blockType; /* 66 <-- Message block type Uninterpreted by PPC */
+};
+typedef struct PPCReadPBRec PPCReadPBRec;
+
+typedef PPCReadPBRec * PPCReadPBPtr;
+
+struct PPCEndPBRec {
+ Ptr qLink; /* PPC's Internal Use */
+ unsigned short csCode; /* Requested PPC command */
+ unsigned short intUse; /* Internal Use */
+ Ptr intUsePtr; /* Internal Use */
+ PPCCompUPP ioCompletion; /* 12 --> Completion Routine */
+ OSErr ioResult; /* 16 <-- Command Result Code */
+ unsigned long Reserved[5]; /* Reserved for PPC, Don't use */
+ short filler1;
+ PPCSessRefNum sessRefNum; /* 40 --> Session Reference */
+};
+typedef struct PPCEndPBRec PPCEndPBRec;
+
+typedef PPCEndPBRec * PPCEndPBPtr;
+
+struct PPCClosePBRec {
+ Ptr qLink; /* PPC's Internal Use */
+ unsigned short csCode; /* Requested PPC command */
+ unsigned short intUse; /* Internal Use */
+ Ptr intUsePtr; /* Internal Use */
+ PPCCompUPP ioCompletion; /* 12 --> Completion Routine */
+ OSErr ioResult; /* 16 <-- Command Result Code */
+ unsigned long Reserved[5]; /* Reserved for PPC, Don't use */
+ PPCPortRefNum portRefNum; /* 38 --> Port Identifier */
+};
+typedef struct PPCClosePBRec PPCClosePBRec;
+
+typedef PPCClosePBRec * PPCClosePBPtr;
+
+struct IPCListPortsPBRec {
+ Ptr qLink; /* PPC's Internal Use */
+ unsigned short csCode; /* Requested PPC command */
+ unsigned short intUse; /* Internal Use */
+ Ptr intUsePtr; /* Internal Use */
+ PPCCompUPP ioCompletion; /* 12 --> Completion Routine */
+ OSErr ioResult; /* 16 <-- Command Result Code */
+ unsigned long Reserved[5]; /* Reserved for PPC, Don't use */
+ short filler1;
+ unsigned short startIndex; /* 40 --> Start Index */
+ unsigned short requestCount; /* 42 --> Number of entries to be returned */
+ unsigned short actualCount; /* 44 <-- Actual Number of entries to be returned */
+ PPCPortPtr portName; /* 46 --> PortName Match */
+ LocationNamePtr locationName; /* 50 --> NBP or NAS type name to locate the Port Location */
+ PortInfoArrayPtr bufferPtr; /* 54 --> Pointer to a buffer requestCount*sizeof(PortInfo) bytes big */
+};
+typedef struct IPCListPortsPBRec IPCListPortsPBRec;
+
+typedef IPCListPortsPBRec * IPCListPortsPBPtr;
+
+union PPCParamBlockRec {
+ PPCOpenPBRec openParam;
+ PPCInformPBRec informParam;
+ PPCStartPBRec startParam;
+ PPCAcceptPBRec acceptParam;
+ PPCRejectPBRec rejectParam;
+ PPCWritePBRec writeParam;
+ PPCReadPBRec readParam;
+ PPCEndPBRec endParam;
+ PPCClosePBRec closeParam;
+ IPCListPortsPBRec listPortsParam;
+};
+
+/* PPC Calling Conventions */
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PPCInit
+ #endif
+EXTERN_API( OSErr )
+PPCInit (void) TWOWORDINLINE(0x7000, 0xA0DD);
+
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PPCOpenSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PPCOpenSync (PPCOpenPBPtr pb) TWOWORDINLINE(0x7001, 0xA0DD);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PPCOpenAsync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PPCOpenAsync (PPCOpenPBPtr pb) TWOWORDINLINE(0x7001, 0xA4DD);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PPCInformSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PPCInformSync (PPCInformPBPtr pb) TWOWORDINLINE(0x7003, 0xA0DD);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PPCInformAsync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PPCInformAsync (PPCInformPBPtr pb) TWOWORDINLINE(0x7003, 0xA4DD);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PPCStartSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PPCStartSync (PPCStartPBPtr pb) TWOWORDINLINE(0x7002, 0xA0DD);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PPCStartAsync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PPCStartAsync (PPCStartPBPtr pb) TWOWORDINLINE(0x7002, 0xA4DD);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PPCAcceptSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PPCAcceptSync (PPCAcceptPBPtr pb) TWOWORDINLINE(0x7004, 0xA0DD);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PPCAcceptAsync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PPCAcceptAsync (PPCAcceptPBPtr pb) TWOWORDINLINE(0x7004, 0xA4DD);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PPCRejectSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PPCRejectSync (PPCRejectPBPtr pb) TWOWORDINLINE(0x7005, 0xA0DD);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PPCRejectAsync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PPCRejectAsync (PPCRejectPBPtr pb) TWOWORDINLINE(0x7005, 0xA4DD);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PPCWriteSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PPCWriteSync (PPCWritePBPtr pb) TWOWORDINLINE(0x7006, 0xA0DD);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PPCWriteAsync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PPCWriteAsync (PPCWritePBPtr pb) TWOWORDINLINE(0x7006, 0xA4DD);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PPCReadSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PPCReadSync (PPCReadPBPtr pb) TWOWORDINLINE(0x7007, 0xA0DD);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PPCReadAsync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PPCReadAsync (PPCReadPBPtr pb) TWOWORDINLINE(0x7007, 0xA4DD);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PPCEndSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PPCEndSync (PPCEndPBPtr pb) TWOWORDINLINE(0x7008, 0xA0DD);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PPCEndAsync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PPCEndAsync (PPCEndPBPtr pb) TWOWORDINLINE(0x7008, 0xA4DD);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PPCCloseSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PPCCloseSync (PPCClosePBPtr pb) TWOWORDINLINE(0x7009, 0xA0DD);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PPCCloseAsync(__A0)
+ #endif
+EXTERN_API( OSErr )
+PPCCloseAsync (PPCClosePBPtr pb) TWOWORDINLINE(0x7009, 0xA4DD);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 IPCListPortsSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+IPCListPortsSync (IPCListPortsPBPtr pb) TWOWORDINLINE(0x700A, 0xA0DD);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 IPCListPortsAsync(__A0)
+ #endif
+EXTERN_API( OSErr )
+IPCListPortsAsync (IPCListPortsPBPtr pb) TWOWORDINLINE(0x700A, 0xA4DD);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 IPCKillListPorts(__A0)
+ #endif
+EXTERN_API( OSErr )
+IPCKillListPorts (IPCListPortsPBPtr pb) TWOWORDINLINE(0x700B, 0xA0DD);
+
+EXTERN_API( OSErr )
+DeleteUserIdentity (unsigned long userRef);
+
+EXTERN_API( OSErr )
+GetDefaultUser (unsigned long * userRef,
+ Str32 userName);
+
+EXTERN_API( OSErr )
+StartSecureSession (PPCStartPBPtr pb,
+ Str32 userName,
+ Boolean useDefault,
+ Boolean allowGuest,
+ Boolean * guestSelected,
+ ConstStr255Param prompt);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API( Boolean , PPCFilterProcPtr )(LocationNamePtr name, PortInfoPtr port);
+typedef STACK_UPP_TYPE(PPCFilterProcPtr) PPCFilterUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(PPCCompUPP)
+ NewPPCCompUPP (PPCCompProcPtr userRoutine);
+
+ EXTERN_API(PPCFilterUPP)
+ NewPPCFilterUPP (PPCFilterProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposePPCCompUPP (PPCCompUPP userUPP);
+
+ EXTERN_API(void)
+ DisposePPCFilterUPP (PPCFilterUPP userUPP);
+
+ EXTERN_API(void)
+ InvokePPCCompUPP (PPCParamBlockPtr pb,
+ PPCCompUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokePPCFilterUPP (LocationNamePtr name,
+ PortInfoPtr port,
+ PPCFilterUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppPPCCompProcInfo = 0x000000C0 }; /* pascal no_return_value Func(4_bytes) */
+ enum { uppPPCFilterProcInfo = 0x000003D0 }; /* pascal 1_byte Func(4_bytes, 4_bytes) */
+ #define NewPPCCompUPP(userRoutine) (PPCCompUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPPCCompProcInfo, GetCurrentArchitecture())
+ #define NewPPCFilterUPP(userRoutine) (PPCFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPPCFilterProcInfo, GetCurrentArchitecture())
+ #define DisposePPCCompUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposePPCFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokePPCCompUPP(pb, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppPPCCompProcInfo, (pb))
+ #define InvokePPCFilterUPP(name, port, userUPP) (Boolean)CALL_TWO_PARAMETER_UPP((userUPP), uppPPCFilterProcInfo, (name), (port))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewPPCCompProc(userRoutine) NewPPCCompUPP(userRoutine)
+#define NewPPCFilterProc(userRoutine) NewPPCFilterUPP(userRoutine)
+#define CallPPCCompProc(userRoutine, pb) InvokePPCCompUPP(pb, userRoutine)
+#define CallPPCFilterProc(userRoutine, name, port) InvokePPCFilterUPP(name, port, userRoutine)
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+PPCBrowser (ConstStr255Param prompt,
+ ConstStr255Param applListLabel,
+ Boolean defaultSpecified,
+ LocationNameRec * theLocation,
+ PortInfoRec * thePortInfo,
+ PPCFilterUPP portFilter,
+ ConstStr32Param theLocNBPType) THREEWORDINLINE(0x303C, 0x0D00, 0xA82B);
+
+
+/*
+ The ParamBlock calls without the "Sync" or "Async" suffix are being phased out.
+*/
+#endif /* CALL_NOT_IN_CARBON */
+
+#define PPCOpen(pb, async) ((async) ? PPCOpenAsync(pb) : PPCOpenSync(pb))
+#define PPCInform(pb, async) ((async) ? PPCInformAsync(pb) : PPCInformSync(pb))
+#define PPCStart(pb, async) ((async) ? PPCStartAsync(pb) : PPCStartSync(pb))
+#define PPCAccept(pb, async) ((async) ? PPCAcceptAsync(pb) : PPCAcceptSync(pb))
+#define PPCReject(pb, async) ((async) ? PPCRejectAsync(pb) : PPCRejectSync(pb))
+#define PPCWrite(pb, async) ((async) ? PPCWriteAsync(pb) : PPCWriteSync(pb))
+#define PPCRead(pb, async) ((async) ? PPCReadAsync(pb) : PPCReadSync(pb))
+#define PPCEnd(pb, async) ((async) ? PPCEndAsync(pb) : PPCEndSync(pb))
+#define PPCClose(pb, async) ((async) ? PPCCloseAsync(pb) : PPCCloseSync(pb))
+#define IPCListPorts(pb, async) ((async) ? IPCListPortsAsync(pb) : IPCListPortsSync(pb))
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __PPCTOOLBOX__ */
+
diff --git a/include/qt/Packages.h b/include/qt/Packages.h
new file mode 100644
index 000000000..0de6a30fa
--- /dev/null
+++ b/include/qt/Packages.h
@@ -0,0 +1,88 @@
+/*
+ File: Packages.h
+
+ Contains: Package Manager Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __PACKAGES__
+#define __PACKAGES__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ listMgr = 0, /* list manager */
+ dskInit = 2, /* Disk Initializaton */
+ stdFile = 3, /* Standard File */
+ flPoint = 4, /* Floating-Point Arithmetic */
+ trFunc = 5, /* Transcendental Functions */
+ intUtil = 6, /* International Utilities */
+ bdConv = 7, /* Binary/Decimal Conversion */
+ editionMgr = 11 /* Edition Manager */
+};
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+InitPack (short packID) ONEWORDINLINE(0xA9E5);
+
+EXTERN_API( void )
+InitAllPacks (void) ONEWORDINLINE(0xA9E6);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __PACKAGES__ */
+
diff --git a/include/qt/Palettes.h b/include/qt/Palettes.h
new file mode 100644
index 000000000..6e845e996
--- /dev/null
+++ b/include/qt/Palettes.h
@@ -0,0 +1,251 @@
+/*
+ File: Palettes.h
+
+ Contains: Palette Manager Interfaces.
+
+ Version: Technology: Mac OS 8
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1987-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __PALETTES__
+#define __PALETTES__
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ pmCourteous = 0, /*Record use of color on each device touched.*/
+ pmDithered = 0x0001,
+ pmTolerant = 0x0002, /*render ciRGB if ciTolerance is exceeded by best match.*/
+ pmAnimated = 0x0004, /*reserve an index on each device touched and render ciRGB.*/
+ pmExplicit = 0x0008, /*no reserve, no render, no record; stuff index into port.*/
+ pmWhite = 0x0010,
+ pmBlack = 0x0020,
+ pmInhibitG2 = 0x0100,
+ pmInhibitC2 = 0x0200,
+ pmInhibitG4 = 0x0400,
+ pmInhibitC4 = 0x0800,
+ pmInhibitG8 = 0x1000,
+ pmInhibitC8 = 0x2000, /* NSetPalette Update Constants */
+ pmNoUpdates = 0x8000, /*no updates*/
+ pmBkUpdates = 0xA000, /*background updates only*/
+ pmFgUpdates = 0xC000, /*foreground updates only*/
+ pmAllUpdates = 0xE000 /*all updates*/
+};
+
+
+struct ColorInfo {
+ RGBColor ciRGB; /*true RGB values*/
+ short ciUsage; /*color usage*/
+ short ciTolerance; /*tolerance value*/
+ short ciDataFields[3]; /*private fields*/
+};
+typedef struct ColorInfo ColorInfo;
+typedef ColorInfo * ColorInfoPtr;
+typedef ColorInfoPtr * ColorInfoHandle;
+
+struct Palette {
+ short pmEntries; /*entries in pmTable*/
+ short pmDataFields[7]; /*private fields*/
+ ColorInfo pmInfo[1];
+};
+typedef struct Palette Palette;
+typedef Palette * PalettePtr;
+typedef PalettePtr * PaletteHandle;
+EXTERN_API( void )
+InitPalettes (void) ONEWORDINLINE(0xAA90);
+
+EXTERN_API( PaletteHandle )
+NewPalette (short entries,
+ CTabHandle srcColors,
+ short srcUsage,
+ short srcTolerance) ONEWORDINLINE(0xAA91);
+
+EXTERN_API( PaletteHandle )
+GetNewPalette (short PaletteID) ONEWORDINLINE(0xAA92);
+
+EXTERN_API( void )
+DisposePalette (PaletteHandle srcPalette) ONEWORDINLINE(0xAA93);
+
+EXTERN_API( void )
+ActivatePalette (WindowPtr srcWindow) ONEWORDINLINE(0xAA94);
+
+EXTERN_API( void )
+SetPalette (WindowPtr dstWindow,
+ PaletteHandle srcPalette,
+ Boolean cUpdates) ONEWORDINLINE(0xAA95);
+
+EXTERN_API( void )
+NSetPalette (WindowPtr dstWindow,
+ PaletteHandle srcPalette,
+ short nCUpdates) ONEWORDINLINE(0xAA95);
+
+EXTERN_API( PaletteHandle )
+GetPalette (WindowPtr srcWindow) ONEWORDINLINE(0xAA96);
+
+EXTERN_API( void )
+CopyPalette (PaletteHandle srcPalette,
+ PaletteHandle dstPalette,
+ short srcEntry,
+ short dstEntry,
+ short dstLength) ONEWORDINLINE(0xAAA1);
+
+EXTERN_API( void )
+PmForeColor (short dstEntry) ONEWORDINLINE(0xAA97);
+
+EXTERN_API( void )
+PmBackColor (short dstEntry) ONEWORDINLINE(0xAA98);
+
+EXTERN_API( void )
+AnimateEntry (WindowPtr dstWindow,
+ short dstEntry,
+ const RGBColor * srcRGB) ONEWORDINLINE(0xAA99);
+
+#if TARGET_OS_MAC
+ #define MacAnimatePalette AnimatePalette
+#endif
+EXTERN_API( void )
+MacAnimatePalette (WindowPtr dstWindow,
+ CTabHandle srcCTab,
+ short srcIndex,
+ short dstEntry,
+ short dstLength) ONEWORDINLINE(0xAA9A);
+
+EXTERN_API( void )
+GetEntryColor (PaletteHandle srcPalette,
+ short srcEntry,
+ RGBColor * dstRGB) ONEWORDINLINE(0xAA9B);
+
+EXTERN_API( void )
+SetEntryColor (PaletteHandle dstPalette,
+ short dstEntry,
+ const RGBColor * srcRGB) ONEWORDINLINE(0xAA9C);
+
+EXTERN_API( void )
+GetEntryUsage (PaletteHandle srcPalette,
+ short srcEntry,
+ short * dstUsage,
+ short * dstTolerance) ONEWORDINLINE(0xAA9D);
+
+EXTERN_API( void )
+SetEntryUsage (PaletteHandle dstPalette,
+ short dstEntry,
+ short srcUsage,
+ short srcTolerance) ONEWORDINLINE(0xAA9E);
+
+EXTERN_API( void )
+CTab2Palette (CTabHandle srcCTab,
+ PaletteHandle dstPalette,
+ short srcUsage,
+ short srcTolerance) ONEWORDINLINE(0xAA9F);
+
+EXTERN_API( void )
+Palette2CTab (PaletteHandle srcPalette,
+ CTabHandle dstCTab) ONEWORDINLINE(0xAAA0);
+
+EXTERN_API( long )
+Entry2Index (short entry) TWOWORDINLINE(0x7000, 0xAAA2);
+
+EXTERN_API( void )
+RestoreDeviceClut (GDHandle gd) TWOWORDINLINE(0x7002, 0xAAA2);
+
+#if TARGET_OS_MAC
+ #define MacResizePalette ResizePalette
+#endif
+EXTERN_API( void )
+MacResizePalette (PaletteHandle p,
+ short size) TWOWORDINLINE(0x7003, 0xAAA2);
+
+EXTERN_API( void )
+SaveFore (ColorSpec * c) THREEWORDINLINE(0x303C, 0x040D, 0xAAA2);
+
+EXTERN_API( void )
+SaveBack (ColorSpec * c) THREEWORDINLINE(0x303C, 0x040E, 0xAAA2);
+
+EXTERN_API( void )
+RestoreFore (const ColorSpec * c) THREEWORDINLINE(0x303C, 0x040F, 0xAAA2);
+
+EXTERN_API( void )
+RestoreBack (const ColorSpec * c) THREEWORDINLINE(0x303C, 0x0410, 0xAAA2);
+
+EXTERN_API( OSErr )
+SetDepth (GDHandle gd,
+ short depth,
+ short whichFlags,
+ short flags) THREEWORDINLINE(0x303C, 0x0A13, 0xAAA2);
+
+EXTERN_API( short )
+HasDepth (GDHandle gd,
+ short depth,
+ short whichFlags,
+ short flags) THREEWORDINLINE(0x303C, 0x0A14, 0xAAA2);
+
+EXTERN_API( short )
+PMgrVersion (void) TWOWORDINLINE(0x7015, 0xAAA2);
+
+EXTERN_API( void )
+SetPaletteUpdates (PaletteHandle p,
+ short updates) THREEWORDINLINE(0x303C, 0x0616, 0xAAA2);
+
+EXTERN_API( short )
+GetPaletteUpdates (PaletteHandle p) THREEWORDINLINE(0x303C, 0x0417, 0xAAA2);
+
+EXTERN_API( Boolean )
+GetGray (GDHandle device,
+ const RGBColor * backGround,
+ RGBColor * foreGround) THREEWORDINLINE(0x303C, 0x0C19, 0xAAA2);
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __PALETTES__ */
+
diff --git a/include/qt/Patches.h b/include/qt/Patches.h
new file mode 100644
index 000000000..1e573ce56
--- /dev/null
+++ b/include/qt/Patches.h
@@ -0,0 +1,169 @@
+/*
+ File: Patches.h
+
+ Contains: Patch Manager Interfaces.
+
+ Version: Technology: System 8
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+
+#ifndef __PATCHES__
+#define __PATCHES__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if CALL_NOT_IN_CARBON
+enum {
+ kOSTrapType = 0,
+ kToolboxTrapType = 1
+};
+
+typedef SignedByte TrapType;
+enum {
+ OSTrap = kOSTrapType, /* old name */
+ ToolTrap = kToolboxTrapType /* old name */
+};
+
+/*
+ GetTrapAddress and SetTrapAddress are obsolete and should not
+ be used. Always use NGetTrapAddress and NSetTrapAddress instead.
+ The old routines will not be supported for PowerPC apps.
+*/
+#if TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __A0 GetTrapAddress(__D0)
+ #endif
+EXTERN_API( UniversalProcPtr )
+GetTrapAddress (UInt16 trapNum) ONEWORDINLINE(0xA146);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter SetTrapAddress(__A0, __D0)
+ #endif
+EXTERN_API( void )
+SetTrapAddress (UniversalProcPtr trapAddr,
+ UInt16 trapNum) ONEWORDINLINE(0xA047);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_CPU_68K && !TARGET_RT_MAC_CFM */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( UniversalProcPtr )
+NGetTrapAddress (UInt16 trapNum,
+ TrapType tTyp);
+
+EXTERN_API( void )
+NSetTrapAddress (UniversalProcPtr trapAddr,
+ UInt16 trapNum,
+ TrapType tTyp);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __A0 GetOSTrapAddress(__D0)
+ #endif
+EXTERN_API( UniversalProcPtr )
+GetOSTrapAddress (UInt16 trapNum) ONEWORDINLINE(0xA346);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter SetOSTrapAddress(__A0, __D0)
+ #endif
+EXTERN_API( void )
+SetOSTrapAddress (UniversalProcPtr trapAddr,
+ UInt16 trapNum) ONEWORDINLINE(0xA247);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __A0 GetToolTrapAddress(__D0)
+ #endif
+EXTERN_API( UniversalProcPtr )
+GetToolTrapAddress (UInt16 trapNum) ONEWORDINLINE(0xA746);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter SetToolTrapAddress(__A0, __D0)
+ #endif
+EXTERN_API( void )
+SetToolTrapAddress (UniversalProcPtr trapAddr,
+ UInt16 trapNum) ONEWORDINLINE(0xA647);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __A0 GetToolboxTrapAddress(__D0)
+ #endif
+EXTERN_API( UniversalProcPtr )
+GetToolboxTrapAddress (UInt16 trapNum) ONEWORDINLINE(0xA746);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter SetToolboxTrapAddress(__A0, __D0)
+ #endif
+EXTERN_API( void )
+SetToolboxTrapAddress (UniversalProcPtr trapAddr,
+ UInt16 trapNum) ONEWORDINLINE(0xA647);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if TARGET_CPU_PPC
+#if CALL_NOT_IN_CARBON
+EXTERN_API( UniversalProcHandle )
+GetTrapVector (UInt16 trapNumber);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_CPU_PPC */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __PATCHES__ */
+
diff --git a/include/qt/PictUtils.h b/include/qt/PictUtils.h
new file mode 100644
index 000000000..fe2ee0d01
--- /dev/null
+++ b/include/qt/PictUtils.h
@@ -0,0 +1,276 @@
+/*
+ File: PictUtils.h
+
+ Contains: Picture Utilities Interfaces.
+
+ Version: Technology: Mac OS 8.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1990-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __PICTUTILS__
+#define __PICTUTILS__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __PALETTES__
+#include "Palettes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* verbs for the GetPictInfo, GetPixMapInfo, and NewPictInfo calls */
+enum {
+ returnColorTable = 0x0001,
+ returnPalette = 0x0002,
+ recordComments = 0x0004,
+ recordFontInfo = 0x0008,
+ suppressBlackAndWhite = 0x0010
+};
+
+enum {
+ /* color pick methods */
+ systemMethod = 0, /* system color pick method */
+ popularMethod = 1, /* method that chooses the most popular set of colors */
+ medianMethod = 2 /* method that chooses a good average mix of colors */
+};
+
+enum {
+ /* color bank types */
+ ColorBankIsCustom = -1,
+ ColorBankIsExactAnd555 = 0,
+ ColorBankIs555 = 1
+};
+
+typedef long PictInfoID;
+
+struct CommentSpec {
+ short count; /* number of occurrances of this comment ID */
+ short ID; /* ID for the comment in the picture */
+};
+typedef struct CommentSpec CommentSpec;
+typedef CommentSpec * CommentSpecPtr;
+typedef CommentSpecPtr * CommentSpecHandle;
+
+struct FontSpec {
+ short pictFontID; /* ID of the font in the picture */
+ short sysFontID; /* ID of the same font in the current system file */
+ long size[4]; /* bit array of all the sizes found (1..127) (bit 0 means > 127) */
+ short style; /* combined style of all occurrances of the font */
+ long nameOffset; /* offset into the fontNamesHdl handle for the font's name */
+};
+typedef struct FontSpec FontSpec;
+typedef FontSpec * FontSpecPtr;
+typedef FontSpecPtr * FontSpecHandle;
+
+struct PictInfo {
+ short version; /* this is always zero, for now */
+ long uniqueColors; /* the number of actual colors in the picture(s)/pixmap(s) */
+ PaletteHandle thePalette; /* handle to the palette information */
+ CTabHandle theColorTable; /* handle to the color table */
+ Fixed hRes; /* maximum horizontal resolution for all the pixmaps */
+ Fixed vRes; /* maximum vertical resolution for all the pixmaps */
+ short depth; /* maximum depth for all the pixmaps (in the picture) */
+ Rect sourceRect; /* the picture frame rectangle (this contains the entire picture) */
+ long textCount; /* total number of text strings in the picture */
+ long lineCount; /* total number of lines in the picture */
+ long rectCount; /* total number of rectangles in the picture */
+ long rRectCount; /* total number of round rectangles in the picture */
+ long ovalCount; /* total number of ovals in the picture */
+ long arcCount; /* total number of arcs in the picture */
+ long polyCount; /* total number of polygons in the picture */
+ long regionCount; /* total number of regions in the picture */
+ long bitMapCount; /* total number of bitmaps in the picture */
+ long pixMapCount; /* total number of pixmaps in the picture */
+ long commentCount; /* total number of comments in the picture */
+ long uniqueComments; /* the number of unique comments in the picture */
+ CommentSpecHandle commentHandle; /* handle to all the comment information */
+ long uniqueFonts; /* the number of unique fonts in the picture */
+ FontSpecHandle fontHandle; /* handle to the FontSpec information */
+ Handle fontNamesHandle; /* handle to the font names */
+ long reserved1;
+ long reserved2;
+};
+typedef struct PictInfo PictInfo;
+typedef PictInfo * PictInfoPtr;
+typedef PictInfoPtr * PictInfoHandle;
+typedef CALLBACK_API( OSErr , InitPickMethodProcPtr )(SInt16 colorsRequested, UInt32 *dataRef, SInt16 *colorBankType);
+typedef CALLBACK_API( OSErr , RecordColorsProcPtr )(UInt32 dataRef, RGBColor *colorsArray, SInt32 colorCount, SInt32 *uniqueColors);
+typedef CALLBACK_API( OSErr , CalcColorTableProcPtr )(UInt32 dataRef, SInt16 colorsRequested, void *colorBankPtr, CSpecArray resultPtr);
+typedef CALLBACK_API( OSErr , DisposeColorPickMethodProcPtr )(UInt32 dataRef);
+typedef STACK_UPP_TYPE(InitPickMethodProcPtr) InitPickMethodUPP;
+typedef STACK_UPP_TYPE(RecordColorsProcPtr) RecordColorsUPP;
+typedef STACK_UPP_TYPE(CalcColorTableProcPtr) CalcColorTableUPP;
+typedef STACK_UPP_TYPE(DisposeColorPickMethodProcPtr) DisposeColorPickMethodUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(InitPickMethodUPP)
+ NewInitPickMethodUPP (InitPickMethodProcPtr userRoutine);
+
+ EXTERN_API(RecordColorsUPP)
+ NewRecordColorsUPP (RecordColorsProcPtr userRoutine);
+
+ EXTERN_API(CalcColorTableUPP)
+ NewCalcColorTableUPP (CalcColorTableProcPtr userRoutine);
+
+ EXTERN_API(DisposeColorPickMethodUPP)
+ NewDisposeColorPickMethodUPP (DisposeColorPickMethodProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeInitPickMethodUPP (InitPickMethodUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeRecordColorsUPP (RecordColorsUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeCalcColorTableUPP (CalcColorTableUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeDisposeColorPickMethodUPP (DisposeColorPickMethodUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeInitPickMethodUPP (SInt16 colorsRequested,
+ UInt32 * dataRef,
+ SInt16 * colorBankType,
+ InitPickMethodUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeRecordColorsUPP (UInt32 dataRef,
+ RGBColor * colorsArray,
+ SInt32 colorCount,
+ SInt32 * uniqueColors,
+ RecordColorsUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeCalcColorTableUPP (UInt32 dataRef,
+ SInt16 colorsRequested,
+ void * colorBankPtr,
+ CSpecArray resultPtr,
+ CalcColorTableUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeDisposeColorPickMethodUPP (UInt32 dataRef,
+ DisposeColorPickMethodUPP userUPP);
+
+#else
+ enum { uppInitPickMethodProcInfo = 0x00000FA0 }; /* pascal 2_bytes Func(2_bytes, 4_bytes, 4_bytes) */
+ enum { uppRecordColorsProcInfo = 0x00003FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppCalcColorTableProcInfo = 0x00003EE0 }; /* pascal 2_bytes Func(4_bytes, 2_bytes, 4_bytes, 4_bytes) */
+ enum { uppDisposeColorPickMethodProcInfo = 0x000000E0 }; /* pascal 2_bytes Func(4_bytes) */
+ #define NewInitPickMethodUPP(userRoutine) (InitPickMethodUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppInitPickMethodProcInfo, GetCurrentArchitecture())
+ #define NewRecordColorsUPP(userRoutine) (RecordColorsUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppRecordColorsProcInfo, GetCurrentArchitecture())
+ #define NewCalcColorTableUPP(userRoutine) (CalcColorTableUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCalcColorTableProcInfo, GetCurrentArchitecture())
+ #define NewDisposeColorPickMethodUPP(userRoutine) (DisposeColorPickMethodUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDisposeColorPickMethodProcInfo, GetCurrentArchitecture())
+ #define DisposeInitPickMethodUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeRecordColorsUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeCalcColorTableUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeDisposeColorPickMethodUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeInitPickMethodUPP(colorsRequested, dataRef, colorBankType, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppInitPickMethodProcInfo, (colorsRequested), (dataRef), (colorBankType))
+ #define InvokeRecordColorsUPP(dataRef, colorsArray, colorCount, uniqueColors, userUPP) (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppRecordColorsProcInfo, (dataRef), (colorsArray), (colorCount), (uniqueColors))
+ #define InvokeCalcColorTableUPP(dataRef, colorsRequested, colorBankPtr, resultPtr, userUPP) (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppCalcColorTableProcInfo, (dataRef), (colorsRequested), (colorBankPtr), (resultPtr))
+ #define InvokeDisposeColorPickMethodUPP(dataRef, userUPP) (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppDisposeColorPickMethodProcInfo, (dataRef))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewInitPickMethodProc(userRoutine) NewInitPickMethodUPP(userRoutine)
+#define NewRecordColorsProc(userRoutine) NewRecordColorsUPP(userRoutine)
+#define NewCalcColorTableProc(userRoutine) NewCalcColorTableUPP(userRoutine)
+#define NewDisposeColorPickMethodProc(userRoutine) NewDisposeColorPickMethodUPP(userRoutine)
+#define CallInitPickMethodProc(userRoutine, colorsRequested, dataRef, colorBankType) InvokeInitPickMethodUPP(colorsRequested, dataRef, colorBankType, userRoutine)
+#define CallRecordColorsProc(userRoutine, dataRef, colorsArray, colorCount, uniqueColors) InvokeRecordColorsUPP(dataRef, colorsArray, colorCount, uniqueColors, userRoutine)
+#define CallCalcColorTableProc(userRoutine, dataRef, colorsRequested, colorBankPtr, resultPtr) InvokeCalcColorTableUPP(dataRef, colorsRequested, colorBankPtr, resultPtr, userRoutine)
+#define CallDisposeColorPickMethodProc(userRoutine, dataRef) InvokeDisposeColorPickMethodUPP(dataRef, userRoutine)
+EXTERN_API( OSErr )
+GetPictInfo (PicHandle thePictHandle,
+ PictInfo * thePictInfo,
+ short verb,
+ short colorsRequested,
+ short colorPickMethod,
+ short version) THREEWORDINLINE(0x303C, 0x0800, 0xA831);
+
+EXTERN_API( OSErr )
+GetPixMapInfo (PixMapHandle thePixMapHandle,
+ PictInfo * thePictInfo,
+ short verb,
+ short colorsRequested,
+ short colorPickMethod,
+ short version) THREEWORDINLINE(0x303C, 0x0801, 0xA831);
+
+EXTERN_API( OSErr )
+NewPictInfo (PictInfoID * thePictInfoID,
+ short verb,
+ short colorsRequested,
+ short colorPickMethod,
+ short version) THREEWORDINLINE(0x303C, 0x0602, 0xA831);
+
+EXTERN_API( OSErr )
+RecordPictInfo (PictInfoID thePictInfoID,
+ PicHandle thePictHandle) THREEWORDINLINE(0x303C, 0x0403, 0xA831);
+
+EXTERN_API( OSErr )
+RecordPixMapInfo (PictInfoID thePictInfoID,
+ PixMapHandle thePixMapHandle) THREEWORDINLINE(0x303C, 0x0404, 0xA831);
+
+EXTERN_API( OSErr )
+RetrievePictInfo (PictInfoID thePictInfoID,
+ PictInfo * thePictInfo,
+ short colorsRequested) THREEWORDINLINE(0x303C, 0x0505, 0xA831);
+
+EXTERN_API( OSErr )
+DisposePictInfo (PictInfoID thePictInfoID) THREEWORDINLINE(0x303C, 0x0206, 0xA831);
+
+#if OLDROUTINENAMES
+#define DisposPictInfo(thePictInfoID) DisposePictInfo(thePictInfoID)
+#endif /* OLDROUTINENAMES */
+
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __PICTUTILS__ */
+
diff --git a/include/qt/Power.h b/include/qt/Power.h
new file mode 100644
index 000000000..ff552652a
--- /dev/null
+++ b/include/qt/Power.h
@@ -0,0 +1,1150 @@
+/*
+ File: Power.h
+
+ Contains: Power Manager Interfaces.
+
+ Version: Technology: Mac OS 9
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1990-2001 by Apple Computer, Inc. All rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __POWER__
+#define __POWER__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+#ifndef __MULTIPROCESSING__
+#include "Multiprocessing.h"
+#endif
+
+#ifndef __NAMEREGISTRY__
+#include "NameRegistry.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ /* Bit positions for ModemByte */
+ modemOnBit = 0,
+ ringWakeUpBit = 2,
+ modemInstalledBit = 3,
+ ringDetectBit = 4,
+ modemOnHookBit = 5
+};
+
+enum {
+ /* masks for ModemByte */
+ modemOnMask = 0x01,
+ ringWakeUpMask = 0x04,
+ modemInstalledMask = 0x08,
+ ringDetectMask = 0x10,
+ modemOnHookMask = 0x20
+};
+
+enum {
+ /* bit positions for BatteryByte */
+ chargerConnBit = 0,
+ hiChargeBit = 1,
+ chargeOverFlowBit = 2,
+ batteryDeadBit = 3,
+ batteryLowBit = 4,
+ connChangedBit = 5
+};
+
+enum {
+ /* masks for BatteryByte */
+ chargerConnMask = 0x01,
+ hiChargeMask = 0x02,
+ chargeOverFlowMask = 0x04,
+ batteryDeadMask = 0x08,
+ batteryLowMask = 0x10,
+ connChangedMask = 0x20
+};
+
+enum {
+ /* bit positions for SoundMixerByte */
+ MediaBaySndEnBit = 0,
+ PCISndEnBit = 1,
+ ZVSndEnBit = 2,
+ PCCardSndEnBit = 3
+};
+
+enum {
+ /* masks for SoundMixerByte */
+ MediaBaySndEnMask = 0x01,
+ PCISndEnMask = 0x02,
+ ZVSndEnMask = 0x04,
+ PCCardSndEnMask = 0x08
+};
+
+enum {
+ /* commands to SleepQRec sleepQProc */
+ kSleepRequest = 1,
+ kSleepDemand = 2,
+ kSleepWakeUp = 3,
+ kSleepRevoke = 4,
+ kSleepUnlock = 4,
+ kSleepDeny = 5,
+ kSleepNow = 6,
+ kDozeDemand = 7,
+ kDozeWakeUp = 8,
+ kDozeRequest = 9, /* additional messages for Power Mgr 2.0*/
+ kEnterStandby = 10,
+ kEnterRun = 11,
+ kSuspendRequest = 12,
+ kSuspendDemand = 13,
+ kSuspendRevoke = 14,
+ kSuspendWakeUp = 15,
+ kGetPowerLevel = 16,
+ kSetPowerLevel = 17,
+ kDeviceInitiatedWake = 18,
+ kWakeToDoze = 19,
+ kDozeToFullWakeUp = 20,
+ kGetPowerInfo = 21,
+ kGetWakeOnNetInfo = 22
+};
+
+enum {
+ /* depreciated commands to SleepQRec sleepQProc */
+ sleepRequest = kSleepRequest,
+ sleepDemand = kSleepDemand,
+ sleepWakeUp = kSleepWakeUp,
+ sleepRevoke = kSleepRevoke,
+ sleepUnlock = kSleepUnlock,
+ sleepDeny = kSleepDeny,
+ sleepNow = kSleepNow,
+ dozeDemand = kDozeDemand,
+ dozeWakeUp = kDozeWakeUp,
+ dozeRequest = kDozeRequest,
+ enterStandby = kEnterStandby,
+ enterRun = kEnterRun,
+ suspendRequestMsg = kSuspendRequest,
+ suspendDemandMsg = kSuspendDemand,
+ suspendRevokeMsg = kSuspendRevoke,
+ suspendWakeUpMsg = kSuspendWakeUp,
+ getPowerLevel = kGetPowerLevel,
+ setPowerLevel = kSetPowerLevel
+};
+
+/* Power Handler func messages */
+typedef UInt32 PowerLevel;
+/* Power levels corresponding to PCI Bus Power Management Interface Spec (PMIS) */
+enum {
+ kPMDevicePowerLevel_On = 0, /* fully-powered 'On' state (D0 state) */
+ kPMDevicePowerLevel_D1 = 1, /* not used by Apple system SW */
+ kPMDevicePowerLevel_D2 = 2, /* not used by Apple system SW */
+ kPMDevicePowerLevel_Off = 3 /* main PCI bus power 'Off', but PCI standby power available (D3cold state) */
+};
+
+/* PowerHandlerProc definition */
+typedef CALLBACK_API( OSStatus , PowerHandlerProcPtr )(UInt32 message, void *param, UInt32 refCon, RegEntryID *regEntryID);
+typedef STACK_UPP_TYPE(PowerHandlerProcPtr) PowerHandlerUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(PowerHandlerUPP)
+ NewPowerHandlerUPP (PowerHandlerProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposePowerHandlerUPP (PowerHandlerUPP userUPP);
+
+ EXTERN_API(OSStatus)
+ InvokePowerHandlerUPP (UInt32 message,
+ void * param,
+ UInt32 refCon,
+ RegEntryID * regEntryID,
+ PowerHandlerUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppPowerHandlerProcInfo = 0x00003FF0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewPowerHandlerUPP(userRoutine) (PowerHandlerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPowerHandlerProcInfo, GetCurrentArchitecture())
+ #define DisposePowerHandlerUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokePowerHandlerUPP(message, param, refCon, regEntryID, userUPP) (OSStatus)CALL_FOUR_PARAMETER_UPP((userUPP), uppPowerHandlerProcInfo, (message), (param), (refCon), (regEntryID))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewPowerHandlerProc(userRoutine) NewPowerHandlerUPP(userRoutine)
+#define CallPowerHandlerProc(userRoutine, message, param, refCon, regEntryID) InvokePowerHandlerUPP(message, param, refCon, regEntryID, userRoutine)
+/* DriverPowerCapabilities struct */
+/*
+ The DriverPowerCapabilities structure is used only by PPC native drivers (ndrv).
+ A native driver will export this structure like it currently does now when
+ exporting a DriverDescription structure (e.g. TheDriverDescription).
+ The well-defined export that will be exported must be called: TheDriverPowerCapabilities
+ IMPORTANT NOTE: ALL native drivers that match to their respective PCI
+ slot devices MUST signify to the Power Manager that
+ they can recover their device functionality after
+ waking from Sleep with PCI bus power removed.
+ If ANY PCI slot driver has not been updated and fails
+ to indicate to the Power Manager that it can recover
+ after PCI bus power is restored, then PCI bus power
+ will NOT be removed during Sleep. Without the ability
+ to remove PCI bus power, the ability to switch the main
+ power supply on some CPUs to a very-low power state
+ will be unavailable to the System.
+ The PowerCapsFlags are used to determine:
+ - if a PCI slot device can recover from PCI power removal during Sleep.
+ Drivers should set the 'kDevicePowerCanBeRemovedForSleep' bit if true.
+ *** ALL PCI slot device drivers must set this bit in order ***
+ *** that PCI bus power is allowed to be removed during Sleep. ***
+ - if the driver overrides the device's PCI Config space for determining
+ how much Standby (e.g. 3.3V Aux pin) power is used during Sleep.
+ Drivers should set the 'kDriverSpecifiesStandbyPower' bit only if the
+ device's PCI Config values are known to be corrupted or do not specify
+ the Standby power consumed during D3cold.
+ If 'kDriverSpecifiesStandbyPower' bit is set:
+ - the 'kDeviceCanGeneratePMEDuringSleep' bit should be set if
+ the PCI slot device is able to use standby (3.3V Aux) power
+ to assert the PME signal during Sleep..
+ - the 'powerCapsStandbyPowerMilliWatts' field is used to specify
+ how much Standby power is needed. This value is only used
+ if both the 'kDriverSpecifiesStandbyPower' and
+ 'kDeviceCanGeneratePMEDuringSleep' bits are set.
+ - the method of support chosen by the driver for implementing the Power
+ handler mechanism:
+ If 'kDriverPowerMgtAware' is set, then the driver supports the Power
+ Handler mechanism which exists in the new Power Manager (v2.0 and later).
+ If 'kDriverPowerMgtUnderExpertControl' is set, then the Power Manager
+ will assume that the driver's Expert/Manager will communicate with the
+ driver's Power handler and the 'kDriverHasPowerHandlerExport bit'
+ will be ignored.
+ If 'kDriverHasPowerHandlerExport' is set, then the driver must export
+ a well-defined Power handler entry point called:
+ DoDriverPowerManagement
+ If this bit is not set and the 'kDriverPowerMgtAware' is set, then the
+ device must support Power handling within its DoDriverIO entry point.
+ Drivers that implement a DoDriverIO entry point will receive
+ IO Control and Status selectors that are defined in Devices.h.
+ Drivers that elect to export a "DoDriverPowerManagement" entry point should
+ set up the entry point as follows:
+ OSStatus
+ DoDriverPowerManagement( UInt32 message,
+ PowerLevel *powerLevel,
+ UInt32 refCon,
+ RegEntryIDPtr regEntryID);
+ "DoDriverPowerManagement" entry points have the same parameters and expected
+ behavior as a Power handler that has been explicitly registered via the
+ Driver Services API "AddDevicePowerHandler"; the difference is that,
+ during system startup, the Power Manager will automatically register the
+ "DoDriverPowerManagement" entry point found within each driver.
+*/
+
+/* Used in DriverPowerCapabilities*/
+typedef UInt32 PowerCapsVersion;
+enum {
+ kVersionOnePowerCapabilities = 1
+};
+
+typedef OptionBits PowerCapsFlags;
+enum {
+ kDevicePowerCanBeRemovedForSleep = 0x00000001, /* only remove PCI power when every device has this bit set */
+ kDriverSpecifiesStandbyPower = 0x00000002, /* set when driver overrides PCI device Config values */
+ kDeviceCanGeneratePMEDuringSleep = 0x00000004, /* 3.3V standby power can be used to assert the PME# */
+ kDriverPowerMgtAware = 0x00000008, /* new Power handler mechanism is supported */
+ kDriverPowerMgtUnderExpertControl = 0x00000010, /* Expert or Manager will call the driver's Power handler */
+ kDriverHasPowerHandlerExport = 0x00000020 /* Type of Power handler entry point: only set this bit if the */
+};
+
+/* driver exports a "DevicePowerManagement" entry point */
+/*
+ A device reliability issue arises when a device is subjected to shortened power
+ cycling intervals. The new Power Manager allows a device to specify a minimum
+ value (in seconds) that a device must be powered on before being powered off.
+ The system has a default value of around 5 minutes (300 seconds). If 5 minutes
+ is sufficient for a device, then use the following constant within DriverPowerCapabilities.
+*/
+enum {
+ kUseDefaultWakeTime = 0 /* used when the system's default is sufficient */
+};
+
+/*
+ This structure describes a device's power capabilities as well as general Power Management support.
+ Note: powerCapsMinimumWakeTimeSeconds can be specified as kUseDefaultWakeTime
+ if the system's default time interval - 5 minutes - is sufficient.
+*/
+
+struct DriverPowerCapabilities {
+ PowerCapsVersion powerCapsVersion; /* Version of this data structure */
+ PowerCapsFlags powerCapsFlags; /* Power Management support characteristics */
+ UInt32 powerCapsStandbyPowerMilliWatts; /* Power consumed during PCI bus sleep, 0 if none */
+ UInt32 powerCapsMinimumWakeTimeSeconds; /* Safe time interval between removing and */
+ /* restoring power to this device */
+};
+typedef struct DriverPowerCapabilities DriverPowerCapabilities;
+typedef DriverPowerCapabilities * DriverPowerCapabilitiesPtr;
+/* PCI power management support*/
+enum {
+ kUseDefaultMinimumWakeTime = 0, /* Defaults to 5 minutes*/
+ kPowerSummaryVersion = 1, /* Version of PowerSummary structure.*/
+ kDevicePowerInfoVersion = 1 /* Version of DevicePowerInfo structure.*/
+};
+
+enum {
+ /* PowerSummary flags*/
+ kPCIPowerOffAllowed = (1L << 0) /* PCI power off is allowed.*/
+};
+
+enum {
+ /* DevicePowerInfo flags*/
+ kDevicePCIPowerOffAllowed = (1L << 0), /* PCI power off is allowed for device.*/
+ kDeviceSupportsPMIS = (1L << 1), /* Device supports Power Mgt Interface Spec.*/
+ kDeviceCanAssertPMEDuringSleep = (1L << 2), /* Device can assert PME# during sleep.*/
+ kDeviceUsesCommonLogicPower = (1L << 3), /* Device uses common-logic power*/
+ kDeviceDriverPresent = (1L << 4), /* Driver present for device.*/
+ kDeviceDriverSupportsPowerMgt = (1L << 5) /* Driver installed a power handler.*/
+};
+
+
+struct DevicePowerInfo {
+ UInt32 version; /* Version of this structure.*/
+ RegEntryID regID; /* RegEntryID for device.*/
+ OptionBits flags; /* Flags*/
+ UInt32 minimumWakeTime; /* Minimum seconds before sleeping again.*/
+ UInt32 sleepPowerNeeded; /* Milliwatts needed in the sleep state.*/
+};
+typedef struct DevicePowerInfo DevicePowerInfo;
+
+struct PowerSummary {
+ UInt32 version; /* Version of this structure.*/
+ OptionBits flags; /* Flags*/
+ UInt32 sleepPowerAvailable; /* Milliwatts available during sleep.*/
+ UInt32 sleepPowerNeeded; /* Milliwatts needed during sleep.*/
+ UInt32 minimumWakeTime; /* Minimum seconds before sleeping again.*/
+ ItemCount deviceCount; /* Number of device power info records.*/
+ DevicePowerInfo devices[1]; /* Array of device power info records.*/
+};
+typedef struct PowerSummary PowerSummary;
+enum {
+ /* SleepQRec.sleepQFlags */
+ noCalls = 1,
+ noRequest = 2,
+ slpQType = 16,
+ sleepQType = 16
+};
+
+/* Power Mgt Apple Event types and errors */
+enum {
+ /* power mgt class*/
+ kAEMacPowerMgtEvt = FOUR_CHAR_CODE('pmgt'), /* event ids*/
+ kAEMacToWake = FOUR_CHAR_CODE('wake'),
+ kAEMacLowPowerSaveData = FOUR_CHAR_CODE('pmsd'),
+ kAEMacEmergencySleep = FOUR_CHAR_CODE('emsl'),
+ kAEMacEmergencyShutdown = FOUR_CHAR_CODE('emsd')
+};
+
+
+/*
+ These are result values returned by a Power Handler when queries
+ by the Power Mgr if the device which that Power Handler represents
+ woke the machine.
+*/
+enum {
+ kDeviceDidNotWakeMachine = 0, /* device did NOT wake machine*/
+ kDeviceRequestsFullWake = 1, /* device did wake machine and requests full wakeup*/
+ kDeviceRequestsWakeToDoze = 2 /* device did wake machine and requests partial wakeup*/
+};
+
+/* bits in bitfield returned by PMFeatures */
+enum {
+ hasWakeupTimer = 0, /* 1=wakeup timer is supported */
+ hasSharedModemPort = 1, /* 1=modem port shared by SCC and internal modem */
+ hasProcessorCycling = 2, /* 1=processor cycling is supported */
+ mustProcessorCycle = 3, /* 1=processor cycling should not be turned off */
+ hasReducedSpeed = 4, /* 1=processor can be started up at reduced speed */
+ dynamicSpeedChange = 5, /* 1=processor speed can be switched dynamically */
+ hasSCSIDiskMode = 6, /* 1=SCSI Disk Mode is supported */
+ canGetBatteryTime = 7, /* 1=battery time can be calculated */
+ canWakeupOnRing = 8, /* 1=can wakeup when the modem detects a ring */
+ hasDimmingSupport = 9, /* 1=has dimming support built in (DPMS standby by default) */
+ hasStartupTimer = 10, /* 1=startup timer is supported */
+ hasChargeNotification = 11, /* 1=client can determine of charge connect status change notifications available */
+ hasDimSuspendSupport = 12 /* 1=supports dimming LCD and CRT to DPMS suspend state */
+};
+
+/* more bits in bitfield returned by PMFeatures to be merged with above when time */
+enum {
+ hasWakeOnNetActivity = 13, /* 1=hardware supports wake on network activity */
+ hasWakeOnLid = 14, /* 1=hardware can wake when opened */
+ canPowerOffPCIBus = 15, /* 1=hardware can power off PCI bus during sleep if cards allow */
+ hasDeepSleep = 16, /* 1=hardware supports deep sleep (hibernation) mode */
+ hasSleep = 17 /* 1=hardware supports normal (PowerBook-like) sleep */
+};
+
+/* bits in bitfield returned by GetIntModemInfo and set by SetIntModemState */
+enum {
+ hasInternalModem = 0, /* 1=internal modem installed */
+ intModemRingDetect = 1, /* 1=internal modem has detected a ring */
+ intModemOffHook = 2, /* 1=internal modem is off hook */
+ intModemRingWakeEnb = 3, /* 1=wakeup on ring is enabled */
+ extModemSelected = 4, /* 1=external modem selected */
+ modemSetBit = 15 /* 1=set bit, 0=clear bit (SetIntModemState) */
+};
+
+/* bits in BatteryInfo.flags */
+/* ("chargerConnected" doesn't mean the charger is plugged in) */
+enum {
+ batteryInstalled = 7, /* 1=battery is currently connected */
+ batteryCharging = 6, /* 1=battery is being charged */
+ chargerConnected = 5 /* 1=charger is connected to the PowerBook */
+};
+
+enum {
+ HDPwrQType = 0x4844, /* 'HD' hard disk spindown queue element type */
+ PMgrStateQType = 0x504D /* 'PM' Power Manager state queue element type */
+};
+
+/* client notification bits in PMgrQueueElement.pmNotifyBits */
+enum {
+ pmSleepTimeoutChanged = 0,
+ pmSleepEnableChanged = 1,
+ pmHardDiskTimeoutChanged = 2,
+ pmHardDiskSpindownChanged = 3,
+ pmDimmingTimeoutChanged = 4,
+ pmDimmingEnableChanged = 5,
+ pmDiskModeAddressChanged = 6,
+ pmProcessorCyclingChanged = 7,
+ pmProcessorSpeedChanged = 8,
+ pmWakeupTimerChanged = 9,
+ pmStartupTimerChanged = 10,
+ pmHardDiskPowerRemovedbyUser = 11,
+ pmChargeStatusChanged = 12,
+ pmPowerLevelChanged = 13,
+ pmWakeOnNetActivityChanged = 14
+};
+
+enum {
+ pmSleepTimeoutChangedMask = (1 << pmSleepTimeoutChanged),
+ pmSleepEnableChangedMask = (1 << pmSleepEnableChanged),
+ pmHardDiskTimeoutChangedMask = (1 << pmHardDiskTimeoutChanged),
+ pmHardDiskSpindownChangedMask = (1 << pmHardDiskSpindownChanged),
+ pmDimmingTimeoutChangedMask = (1 << pmDimmingTimeoutChanged),
+ pmDimmingEnableChangedMask = (1 << pmDimmingEnableChanged),
+ pmDiskModeAddressChangedMask = (1 << pmDiskModeAddressChanged),
+ pmProcessorCyclingChangedMask = (1 << pmProcessorCyclingChanged),
+ pmProcessorSpeedChangedMask = (1 << pmProcessorSpeedChanged),
+ pmWakeupTimerChangedMask = (1 << pmWakeupTimerChanged),
+ pmStartupTimerChangedMask = (1 << pmStartupTimerChanged),
+ pmHardDiskPowerRemovedbyUserMask = (1 << pmHardDiskPowerRemovedbyUser),
+ pmChargeStatusChangedMask = (1 << pmChargeStatusChanged),
+ pmPowerLevelChangedMask = (1 << pmPowerLevelChanged),
+ pmWakeOnNetActivityChangedMask = (1 << pmWakeOnNetActivityChanged)
+};
+
+/* System Activity Selectors */
+enum {
+ OverallAct = 0, /* general type of activity */
+ UsrActivity = 1, /* user specific type of activity */
+ NetActivity = 2, /* network specific activity */
+ HDActivity = 3 /* Hard Drive activity */
+};
+
+/* Storage Media sleep mode defines */
+enum {
+ kMediaModeOn = 0, /* Media active (Drive spinning and at full power) */
+ kMediaModeStandBy = 1, /* Media standby (not implemented) */
+ kMediaModeSuspend = 2, /* Media Idle (not implemented) */
+ kMediaModeOff = 3 /* Media Sleep (Drive not spinning and at min power, max recovery time) */
+};
+
+enum {
+ kMediaPowerCSCode = 70
+};
+
+
+/* definitions for HDQueueElement.hdFlags */
+enum {
+ kHDQueuePostBit = 0, /* 1 = call this routine on the second pass */
+ kHDQueuePostMask = (1 << kHDQueuePostBit)
+};
+
+
+struct ActivityInfo {
+ short ActivityType; /* Type of activity to be fetched. Same as UpdateSystemActivity Selectors */
+ unsigned long ActivityTime; /* Time of last activity (in ticks) of specified type. */
+};
+typedef struct ActivityInfo ActivityInfo;
+/* information returned by GetScaledBatteryInfo */
+
+struct BatteryInfo {
+ UInt8 flags; /* misc flags (see below) */
+ UInt8 warningLevel; /* scaled warning level (0-255) */
+ UInt8 reserved; /* reserved for internal use */
+ UInt8 batteryLevel; /* scaled battery level (0-255) */
+};
+typedef struct BatteryInfo BatteryInfo;
+
+typedef SInt8 ModemByte;
+typedef SInt8 BatteryByte;
+typedef SInt8 SoundMixerByte;
+typedef long PMResultCode;
+typedef struct SleepQRec SleepQRec;
+typedef SleepQRec * SleepQRecPtr;
+typedef struct HDQueueElement HDQueueElement;
+typedef struct PMgrQueueElement PMgrQueueElement;
+typedef CALLBACK_API( long , SleepQProcPtr )(long message, SleepQRecPtr qRecPtr);
+/*
+ WARNING: SleepQProcPtr uses register based parameters under classic 68k
+ and cannot be written in a high-level language without
+ the help of mixed mode or assembly glue.
+*/
+typedef CALLBACK_API( void , HDSpindownProcPtr )(HDQueueElement *theElement);
+typedef CALLBACK_API( void , PMgrStateChangeProcPtr )(PMgrQueueElement *theElement, long stateBits);
+typedef REGISTER_UPP_TYPE(SleepQProcPtr) SleepQUPP;
+typedef STACK_UPP_TYPE(HDSpindownProcPtr) HDSpindownUPP;
+typedef STACK_UPP_TYPE(PMgrStateChangeProcPtr) PMgrStateChangeUPP;
+
+struct SleepQRec {
+ SleepQRecPtr sleepQLink; /* pointer to next queue element */
+ short sleepQType; /* queue element type (must be SleepQType) */
+ SleepQUPP sleepQProc; /* pointer to sleep universal proc ptr */
+ short sleepQFlags; /* flags */
+};
+
+
+struct HDQueueElement {
+ struct HDQueueElement * hdQLink; /* pointer to next queue element */
+ short hdQType; /* queue element type (must be HDPwrQType) */
+ short hdFlags; /* miscellaneous flags */
+ HDSpindownUPP hdProc; /* pointer to routine to call */
+ long hdUser; /* user-defined (variable storage, etc.) */
+};
+
+
+struct PMgrQueueElement {
+ struct PMgrQueueElement * pmQLink; /* pointer to next queue element */
+ short pmQType; /* queue element type (must be PMgrStateQType) */
+ short pmFlags; /* miscellaneous flags */
+ long pmNotifyBits; /* bitmap of which changes to be notified for */
+ PMgrStateChangeUPP pmProc; /* pointer to routine to call */
+ long pmUser; /* user-defined (variable storage, etc.) */
+};
+
+
+
+struct BatteryTimeRec {
+ unsigned long expectedBatteryTime; /* estimated battery time remaining (seconds) */
+ unsigned long minimumBatteryTime; /* minimum battery time remaining (seconds) */
+ unsigned long maximumBatteryTime; /* maximum battery time remaining (seconds) */
+ unsigned long timeUntilCharged; /* time until battery is fully charged (seconds)*/
+};
+typedef struct BatteryTimeRec BatteryTimeRec;
+
+
+struct WakeupTime {
+ unsigned long wakeTime; /* wakeup time (same format as current time) */
+ Boolean wakeEnabled; /* 1=enable wakeup timer, 0=disable wakeup timer */
+ SInt8 filler;
+};
+typedef struct WakeupTime WakeupTime;
+
+
+struct StartupTime {
+ unsigned long startTime; /* startup time (same format as current time) */
+ Boolean startEnabled; /* 1=enable startup timer, 0=disable startup timer */
+ SInt8 filler;
+};
+typedef struct StartupTime StartupTime;
+/* PowerSource version*/
+enum {
+ kVersionOnePowerSource = 1
+};
+
+/* PowerSourceAttrs bits*/
+
+enum {
+ bSourceIsBattery = 0, /* power source is battery*/
+ bSourceIsAC = 1, /* power source is AC*/
+ bSourceCanBeCharged = 2, /* power source can be charged*/
+ bSourceIsUPS = 3, /* power source is UPS. NOTE: software should set bSourceIsBattery and bSourceIsAC also, as appropriate*/
+ kSourceIsBatteryMask = (1 << bSourceIsBattery),
+ kSourceIsACMask = (1 << bSourceIsAC),
+ kSourceCanBeChargedMask = (1 << bSourceCanBeCharged),
+ kSourceIsUPSMask = (1 << bSourceIsUPS)
+};
+
+/* PowerSourceFlags bits*/
+
+enum {
+ bSourceIsAvailable = 0, /* power source is installed*/
+ bSourceIsCharging = 1, /* power source being charged*/
+ bChargerIsAttached = 2, /* a charger is connected*/
+ kSourceIsAvailableMask = (1 << bSourceIsAvailable),
+ kSourceIsChargingMask = (1 << bSourceIsCharging),
+ kChargerIsAttachedMask = (1 << bChargerIsAttached)
+};
+
+/* Power Capacity Types*/
+
+enum {
+ kCapacityIsActual = 0, /* current capacity is expessed as actual capacity in same units as max*/
+ kCapacityIsPercentOfMax = 1 /* current capacity is expressed as a percentage of maximumCapacity*/
+};
+
+/* Net Activity Wake Options*/
+enum {
+ kConfigSupportsWakeOnNetBit = 0,
+ kWakeOnNetAdminAccessesBit = 1,
+ kWakeOnAllNetAccessesBit = 2,
+ kUnmountServersBeforeSleepingBit = 3,
+ kConfigSupportsWakeOnNetMask = (1 << kConfigSupportsWakeOnNetBit),
+ kWakeOnNetAdminAccessesMask = (1 << kWakeOnNetAdminAccessesBit),
+ kWakeOnAllNetAccessesMask = (1 << kWakeOnAllNetAccessesBit),
+ kUnmountServersBeforeSleepingMask = (1 << kUnmountServersBeforeSleepingBit)
+};
+
+/* Power Source capacity usage types*/
+enum {
+ kCurrentCapacityIsActualValue = 0, /* currentCapacity is a real value in same units as maxCapacity*/
+ kCurrentCapacityIsPercentOfMax = 1 /* currentCapacity is expressed as a percentage of maxCapacity.*/
+};
+
+
+typedef SInt16 PowerSourceID;
+
+struct PowerSourceParamBlock {
+ PowerSourceID sourceID; /* unique id assigned by Power Mgr*/
+ UInt16 sourceCapacityUsage; /* how currentCapacity is used*/
+ UInt32 sourceVersion; /* version of this record*/
+ OptionBits sourceAttr; /* attribute flags (see below)*/
+ OptionBits sourceState; /* state flags (see below)*/
+ UInt32 currentCapacity; /* current capacity, in*/
+ /* milliwatts*/
+ UInt32 maxCapacity; /* full capacity, in milliwatts*/
+ UInt32 timeRemaining; /* time left to deplete, */
+ /* in milliwatt-hours*/
+ UInt32 timeToFullCharge; /* time to charge, */
+ /* in milliwatt-hours*/
+ UInt32 voltage; /* voltage in millivolts*/
+ SInt32 current; /* current in milliamperes */
+ /* (negative if consuming, */
+ /* positive if charging)*/
+};
+typedef struct PowerSourceParamBlock PowerSourceParamBlock;
+typedef PowerSourceParamBlock * PowerSourceParamBlockPtr;
+EXTERN_API( OSErr )
+DisableWUTime (void);
+
+EXTERN_API( OSErr )
+SetWUTime (long wuTime);
+
+EXTERN_API( OSErr )
+GetWUTime (long * wuTime,
+ Byte * wuFlag);
+
+EXTERN_API( OSErr )
+BatteryStatus (Byte * status,
+ Byte * power);
+
+EXTERN_API( OSErr )
+ModemStatus (Byte * status);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 IdleUpdate
+ #endif
+EXTERN_API( long )
+IdleUpdate (void) ONEWORDINLINE(0xA285);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 GetCPUSpeed
+ #endif
+EXTERN_API( long )
+GetCPUSpeed (void) TWOWORDINLINE(0x70FF, 0xA485);
+
+EXTERN_API( void )
+EnableIdle (void) TWOWORDINLINE(0x7000, 0xA485);
+
+EXTERN_API( void )
+DisableIdle (void) TWOWORDINLINE(0x7001, 0xA485);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter SleepQInstall(__A0)
+ #endif
+EXTERN_API( void )
+SleepQInstall (SleepQRecPtr qRecPtr) ONEWORDINLINE(0xA28A);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter SleepQRemove(__A0)
+ #endif
+EXTERN_API( void )
+SleepQRemove (SleepQRecPtr qRecPtr) ONEWORDINLINE(0xA48A);
+
+EXTERN_API( void )
+AOn (void) TWOWORDINLINE(0x7004, 0xA685);
+
+EXTERN_API( void )
+AOnIgnoreModem (void) TWOWORDINLINE(0x7005, 0xA685);
+
+EXTERN_API( void )
+BOn (void) TWOWORDINLINE(0x7000, 0xA685);
+
+EXTERN_API( void )
+AOff (void) TWOWORDINLINE(0x7084, 0xA685);
+
+EXTERN_API( void )
+BOff (void) TWOWORDINLINE(0x7080, 0xA685);
+
+
+/* Public Power Management API */
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PMSelectorCount
+ #endif
+EXTERN_API( short )
+PMSelectorCount (void) TWOWORDINLINE(0x7000, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PMFeatures
+ #endif
+EXTERN_API( UInt32 )
+PMFeatures (void) TWOWORDINLINE(0x7001, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 GetSleepTimeout
+ #endif
+EXTERN_API( UInt8 )
+GetSleepTimeout (void) TWOWORDINLINE(0x7002, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter SetSleepTimeout(__D0)
+ #endif
+EXTERN_API( void )
+SetSleepTimeout (UInt8 timeout) FOURWORDINLINE(0x4840, 0x303C, 0x0003, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 GetHardDiskTimeout
+ #endif
+EXTERN_API( UInt8 )
+GetHardDiskTimeout (void) TWOWORDINLINE(0x7004, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter SetHardDiskTimeout(__D0)
+ #endif
+EXTERN_API( void )
+SetHardDiskTimeout (UInt8 timeout) FOURWORDINLINE(0x4840, 0x303C, 0x0005, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 HardDiskPowered
+ #endif
+EXTERN_API( Boolean )
+HardDiskPowered (void) TWOWORDINLINE(0x7006, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter SpinDownHardDisk
+ #endif
+EXTERN_API( void )
+SpinDownHardDisk (void) TWOWORDINLINE(0x7007, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 IsSpindownDisabled
+ #endif
+EXTERN_API( Boolean )
+IsSpindownDisabled (void) TWOWORDINLINE(0x7008, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter SetSpindownDisable(__D0)
+ #endif
+EXTERN_API( void )
+SetSpindownDisable (Boolean setDisable) FOURWORDINLINE(0x4840, 0x303C, 0x0009, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 HardDiskQInstall(__A0)
+ #endif
+EXTERN_API( OSErr )
+HardDiskQInstall (HDQueueElement * theElement) TWOWORDINLINE(0x700A, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 HardDiskQRemove(__A0)
+ #endif
+EXTERN_API( OSErr )
+HardDiskQRemove (HDQueueElement * theElement) TWOWORDINLINE(0x700B, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter GetScaledBatteryInfo(__D0, __A0)
+ #endif
+EXTERN_API( void )
+GetScaledBatteryInfo (short whichBattery,
+ BatteryInfo * theInfo) FIVEWORDINLINE(0x4840, 0x303C, 0x000C, 0xA09E, 0x2080);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter AutoSleepControl(__D0)
+ #endif
+EXTERN_API( void )
+AutoSleepControl (Boolean enableSleep) FOURWORDINLINE(0x4840, 0x303C, 0x000D, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 GetIntModemInfo
+ #endif
+EXTERN_API( UInt32 )
+GetIntModemInfo (void) TWOWORDINLINE(0x700E, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter SetIntModemState(__D0)
+ #endif
+EXTERN_API( void )
+SetIntModemState (short theState) FOURWORDINLINE(0x4840, 0x303C, 0x000F, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 MaximumProcessorSpeed
+ #endif
+EXTERN_API( short )
+MaximumProcessorSpeed (void) TWOWORDINLINE(0x7010, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 CurrentProcessorSpeed
+ #endif
+EXTERN_API( short )
+CurrentProcessorSpeed (void) TWOWORDINLINE(0x7011, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 FullProcessorSpeed
+ #endif
+EXTERN_API( Boolean )
+FullProcessorSpeed (void) TWOWORDINLINE(0x7012, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SetProcessorSpeed(__D0)
+ #endif
+EXTERN_API( Boolean )
+SetProcessorSpeed (Boolean fullSpeed) FOURWORDINLINE(0x4840, 0x303C, 0x0013, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 GetSCSIDiskModeAddress
+ #endif
+EXTERN_API( short )
+GetSCSIDiskModeAddress (void) TWOWORDINLINE(0x7014, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter SetSCSIDiskModeAddress(__D0)
+ #endif
+EXTERN_API( void )
+SetSCSIDiskModeAddress (short scsiAddress) FOURWORDINLINE(0x4840, 0x303C, 0x0015, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter GetWakeupTimer(__A0)
+ #endif
+EXTERN_API( void )
+GetWakeupTimer (WakeupTime * theTime) TWOWORDINLINE(0x7016, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter SetWakeupTimer(__A0)
+ #endif
+EXTERN_API( void )
+SetWakeupTimer (WakeupTime * theTime) TWOWORDINLINE(0x7017, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 IsProcessorCyclingEnabled
+ #endif
+EXTERN_API( Boolean )
+IsProcessorCyclingEnabled (void) TWOWORDINLINE(0x7018, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter EnableProcessorCycling(__D0)
+ #endif
+EXTERN_API( void )
+EnableProcessorCycling (Boolean enable) FOURWORDINLINE(0x4840, 0x303C, 0x0019, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 BatteryCount
+ #endif
+EXTERN_API( short )
+BatteryCount (void) TWOWORDINLINE(0x701A, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 GetBatteryVoltage(__D0)
+ #endif
+EXTERN_API( Fixed )
+GetBatteryVoltage (short whichBattery) FOURWORDINLINE(0x4840, 0x303C, 0x001B, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter GetBatteryTimes(__D0, __A0)
+ #endif
+EXTERN_API( void )
+GetBatteryTimes (short whichBattery,
+ BatteryTimeRec * theTimes) FOURWORDINLINE(0x4840, 0x303C, 0x001C, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 GetDimmingTimeout
+ #endif
+EXTERN_API( UInt8 )
+GetDimmingTimeout (void) TWOWORDINLINE(0x701D, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter SetDimmingTimeout(__D0)
+ #endif
+EXTERN_API( void )
+SetDimmingTimeout (UInt8 timeout) FOURWORDINLINE(0x4840, 0x303C, 0x001E, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter DimmingControl(__D0)
+ #endif
+EXTERN_API( void )
+DimmingControl (Boolean enableSleep) FOURWORDINLINE(0x4840, 0x303C, 0x001F, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 IsDimmingControlDisabled
+ #endif
+EXTERN_API( Boolean )
+IsDimmingControlDisabled (void) TWOWORDINLINE(0x7020, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 IsAutoSlpControlDisabled
+ #endif
+EXTERN_API( Boolean )
+IsAutoSlpControlDisabled (void) TWOWORDINLINE(0x7021, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PMgrStateQInstall(__A0)
+ #endif
+EXTERN_API( OSErr )
+PMgrStateQInstall (PMgrQueueElement * theElement) TWOWORDINLINE(0x7022, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PMgrStateQRemove(__A0)
+ #endif
+EXTERN_API( OSErr )
+PMgrStateQRemove (PMgrQueueElement * theElement) TWOWORDINLINE(0x7023, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 UpdateSystemActivity(__D0)
+ #endif
+EXTERN_API( OSErr )
+UpdateSystemActivity (UInt8 activity) FOURWORDINLINE(0x4840, 0x303C, 0x0024, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 DelaySystemIdle
+ #endif
+EXTERN_API( OSErr )
+DelaySystemIdle (void) TWOWORDINLINE(0x7025, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 GetStartupTimer(__A0)
+ #endif
+EXTERN_API( OSErr )
+GetStartupTimer (StartupTime * theTime) TWOWORDINLINE(0x7026, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SetStartupTimer(__A0)
+ #endif
+EXTERN_API( OSErr )
+SetStartupTimer (StartupTime * theTime) TWOWORDINLINE(0x7027, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 GetLastActivity(__A0)
+ #endif
+EXTERN_API( OSErr )
+GetLastActivity (ActivityInfo * theActivity) TWOWORDINLINE(0x7028, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 GetSoundMixerState(__A0)
+ #endif
+EXTERN_API( OSErr )
+GetSoundMixerState (SoundMixerByte * theSoundMixerByte) TWOWORDINLINE(0x7029, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SetSoundMixerState(__A0)
+ #endif
+EXTERN_API( OSErr )
+SetSoundMixerState (SoundMixerByte * theSoundMixerByte) TWOWORDINLINE(0x702A, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 GetDimSuspendState
+ #endif
+EXTERN_API( Boolean )
+GetDimSuspendState (void) TWOWORDINLINE(0x702B, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter SetDimSuspendState(__D0)
+ #endif
+EXTERN_API( void )
+SetDimSuspendState (Boolean dimSuspendState) FOURWORDINLINE(0x4840, 0x303C, 0x002C, 0xA09E);
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 GetCoreProcessorTemperature(__A0)
+ #endif
+EXTERN_API( SInt32 )
+GetCoreProcessorTemperature (MPCpuID inCpuID) TWOWORDINLINE(0x702D, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 GetWakeOnNetworkOptions
+ #endif
+EXTERN_API( OptionBits )
+GetWakeOnNetworkOptions (void) TWOWORDINLINE(0x702E, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter SetWakeOnNetworkOptions(__A0)
+ #endif
+EXTERN_API( void )
+SetWakeOnNetworkOptions (OptionBits inOptions) TWOWORDINLINE(0x702F, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 AddPowerSource(__A0)
+ #endif
+EXTERN_API( OSStatus )
+AddPowerSource (PowerSourceParamBlock * ioPowerSource) TWOWORDINLINE(0x7030, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 RemovePowerSource(__D0)
+ #endif
+EXTERN_API( OSStatus )
+RemovePowerSource (PowerSourceID inSourceID) FOURWORDINLINE(0x4840, 0x303C, 0x0031, 0xA09E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 UpdatePowerSource(__A0)
+ #endif
+EXTERN_API( OSStatus )
+UpdatePowerSource (PowerSourceParamBlock * ioSource) TWOWORDINLINE(0x7032, 0xA09E);
+
+EXTERN_API( Boolean )
+IsServerModeEnabled (void) TWOWORDINLINE(0x7033, 0xA09E);
+
+EXTERN_API( void )
+EnableServerMode (Boolean inEnable) FOURWORDINLINE(0x4840, 0x303C, 0x0034, 0xA09E);
+
+/* Power Handler Management */
+EXTERN_API_C( Boolean )
+IsPCIPowerOffDisabled (void);
+
+EXTERN_API_C( void )
+EnablePCIPowerOff (Boolean inEnable);
+
+EXTERN_API_C( OSStatus )
+AddDevicePowerHandler (RegEntryIDPtr regEntryID,
+ PowerHandlerProcPtr handler,
+ UInt32 refCon,
+ char * deviceType);
+
+EXTERN_API_C( OSStatus )
+RemoveDevicePowerHandler (RegEntryIDPtr regEntryID);
+
+EXTERN_API_C( OSStatus )
+RemoveDevicePowerHandlerForProc (PowerHandlerProcPtr proc);
+
+EXTERN_API_C( OSStatus )
+GetDevicePowerLevel (RegEntryIDPtr regEntryID,
+ PowerLevel * devicePowerLevel);
+
+EXTERN_API_C( OSStatus )
+SetDevicePowerLevel (RegEntryIDPtr regEntryID,
+ PowerLevel devicePowerLevel);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(SleepQUPP)
+ NewSleepQUPP (SleepQProcPtr userRoutine);
+
+ EXTERN_API(HDSpindownUPP)
+ NewHDSpindownUPP (HDSpindownProcPtr userRoutine);
+
+ EXTERN_API(PMgrStateChangeUPP)
+ NewPMgrStateChangeUPP (PMgrStateChangeProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeSleepQUPP (SleepQUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeHDSpindownUPP (HDSpindownUPP userUPP);
+
+ EXTERN_API(void)
+ DisposePMgrStateChangeUPP (PMgrStateChangeUPP userUPP);
+
+ EXTERN_API(long)
+ InvokeSleepQUPP (long message,
+ SleepQRecPtr qRecPtr,
+ SleepQUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeHDSpindownUPP (HDQueueElement * theElement,
+ HDSpindownUPP userUPP);
+
+ EXTERN_API(void)
+ InvokePMgrStateChangeUPP (PMgrQueueElement * theElement,
+ long stateBits,
+ PMgrStateChangeUPP userUPP);
+
+#else
+ enum { uppSleepQProcInfo = 0x00131832 }; /* register 4_bytes:D0 Func(4_bytes:D0, 4_bytes:A0) */
+ enum { uppHDSpindownProcInfo = 0x000000C0 }; /* pascal no_return_value Func(4_bytes) */
+ enum { uppPMgrStateChangeProcInfo = 0x000003C0 }; /* pascal no_return_value Func(4_bytes, 4_bytes) */
+ #define NewSleepQUPP(userRoutine) (SleepQUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSleepQProcInfo, GetCurrentArchitecture())
+ #define NewHDSpindownUPP(userRoutine) (HDSpindownUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppHDSpindownProcInfo, GetCurrentArchitecture())
+ #define NewPMgrStateChangeUPP(userRoutine) (PMgrStateChangeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPMgrStateChangeProcInfo, GetCurrentArchitecture())
+ #define DisposeSleepQUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeHDSpindownUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposePMgrStateChangeUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 InvokeSleepQUPP(__D0, __A0, __A1)
+ long InvokeSleepQUPP(long message, SleepQRecPtr qRecPtr, SleepQUPP userUPP) = 0x4E91;
+ #else
+ #define InvokeSleepQUPP(message, qRecPtr, userUPP) (long)CALL_TWO_PARAMETER_UPP((userUPP), uppSleepQProcInfo, (message), (qRecPtr))
+ #endif
+ #define InvokeHDSpindownUPP(theElement, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppHDSpindownProcInfo, (theElement))
+ #define InvokePMgrStateChangeUPP(theElement, stateBits, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppPMgrStateChangeProcInfo, (theElement), (stateBits))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewSleepQProc(userRoutine) NewSleepQUPP(userRoutine)
+#define NewHDSpindownProc(userRoutine) NewHDSpindownUPP(userRoutine)
+#define NewPMgrStateChangeProc(userRoutine) NewPMgrStateChangeUPP(userRoutine)
+#define CallSleepQProc(userRoutine, message, qRecPtr) InvokeSleepQUPP(message, qRecPtr, userRoutine)
+#define CallHDSpindownProc(userRoutine, theElement) InvokeHDSpindownUPP(theElement, userRoutine)
+#define CallPMgrStateChangeProc(userRoutine, theElement, stateBits) InvokePMgrStateChangeUPP(theElement, stateBits, userRoutine)
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __POWER__ */
+
diff --git a/include/qt/Printing.h b/include/qt/Printing.h
new file mode 100644
index 000000000..3d608350a
--- /dev/null
+++ b/include/qt/Printing.h
@@ -0,0 +1,523 @@
+/*
+ File: Printing.h
+
+ Contains: Print Manager Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __PRINTING__
+#define __PRINTING__
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#ifndef __DIALOGS__
+#include "Dialogs.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ kFirstPageMin = 1, /* min value for first page */
+ kLastPageMax = 32767 /* max value for last page */
+};
+
+enum {
+ iPFMaxPgs = 128,
+ iPrPgFract = 120, /*Page scale factor. ptPgSize (below) is in units of 1/iPrPgFract*/
+ iPrPgFst = 1, /*Page range constants*/
+ iPrPgMax = 9999,
+ iPrRelease = 3, /*Current version number of the code.*/
+ iPrSavPFil = -1,
+ iPrAbort = 0x0080,
+ iPrDevCtl = 7, /*The PrDevCtl Proc's ctl number*/
+ lPrReset = 0x00010000, /*The PrDevCtl Proc's CParam for reset*/
+ lPrLineFeed = 0x00030000,
+ lPrLFStd = 0x0003FFFF, /*The PrDevCtl Proc's CParam for std paper advance*/
+ lPrLFSixth = 0x0003FFFF,
+ lPrPageEnd = 0x00020000, /*The PrDevCtl Proc's CParam for end page*/
+ lPrDocOpen = 0x00010000,
+ lPrPageOpen = 0x00040000,
+ lPrPageClose = 0x00020000,
+ lPrDocClose = 0x00050000,
+ iFMgrCtl = 8, /*The FMgr's Tail-hook Proc's ctl number*/
+ iMscCtl = 9, /*The FMgr's Tail-hook Proc's ctl number*/
+ iPvtCtl = 10 /*The FMgr's Tail-hook Proc's ctl number*/
+};
+
+#define sPrDrvr ".Print"
+/* Error Codes moved to Errors.(hap) */
+enum {
+ pPrGlobals = 0x00000944, /*The PrVars lo mem area:*/
+ bDraftLoop = 0,
+ bSpoolLoop = 1,
+ bUser1Loop = 2,
+ bUser2Loop = 3,
+ fNewRunBit = 2,
+ fHiResOK = 3,
+ fWeOpenedRF = 4, /*Driver constants */
+ iPrBitsCtl = 4,
+ lScreenBits = 0,
+ lPaintBits = 1,
+ lHiScreenBits = 0x00000002, /*The Bitmap Print Proc's Screen Bitmap param*/
+ lHiPaintBits = 0x00000003, /*The Bitmap Print Proc's Paint [sq pix] param*/
+ iPrIOCtl = 5,
+ iPrEvtCtl = 6, /*The PrEvent Proc's ctl number*/
+ lPrEvtAll = 0x0002FFFD, /*The PrEvent Proc's CParam for the entire screen*/
+ lPrEvtTop = 0x0001FFFD, /*The PrEvent Proc's CParam for the top folder*/
+ iPrDrvrRef = -3
+};
+
+enum {
+ getRslDataOp = 4,
+ setRslOp = 5,
+ draftBitsOp = 6,
+ noDraftBitsOp = 7,
+ getRotnOp = 8,
+ NoSuchRsl = 1,
+ OpNotImpl = 2, /*the driver doesn't support this opcode*/
+ RgType1 = 1
+};
+
+enum {
+ feedCut = 0,
+ feedFanfold = 1,
+ feedMechCut = 2,
+ feedOther = 3
+};
+
+typedef SInt8 TFeed;
+enum {
+ scanTB = 0,
+ scanBT = 1,
+ scanLR = 2,
+ scanRL = 3
+};
+
+typedef SInt8 TScan;
+/* A Rect Ptr */
+typedef Rect * TPRect;
+typedef CALLBACK_API( void , PrIdleProcPtr )(void );
+typedef CALLBACK_API( void , PItemProcPtr )(DialogPtr theDialog, short item);
+typedef STACK_UPP_TYPE(PrIdleProcPtr) PrIdleUPP;
+typedef STACK_UPP_TYPE(PItemProcPtr) PItemUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(PrIdleUPP)
+ NewPrIdleUPP (PrIdleProcPtr userRoutine);
+
+ EXTERN_API(PItemUPP)
+ NewPItemUPP (PItemProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposePrIdleUPP (PrIdleUPP userUPP);
+
+ EXTERN_API(void)
+ DisposePItemUPP (PItemUPP userUPP);
+
+ EXTERN_API(void)
+ InvokePrIdleUPP (PrIdleUPP userUPP);
+
+ EXTERN_API(void)
+ InvokePItemUPP (DialogPtr theDialog,
+ short item,
+ PItemUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppPrIdleProcInfo = 0x00000000 }; /* pascal no_return_value Func() */
+ enum { uppPItemProcInfo = 0x000002C0 }; /* pascal no_return_value Func(4_bytes, 2_bytes) */
+ #define NewPrIdleUPP(userRoutine) (PrIdleUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPrIdleProcInfo, GetCurrentArchitecture())
+ #define NewPItemUPP(userRoutine) (PItemUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPItemProcInfo, GetCurrentArchitecture())
+ #define DisposePrIdleUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposePItemUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokePrIdleUPP(userUPP) CALL_ZERO_PARAMETER_UPP((userUPP), uppPrIdleProcInfo)
+ #define InvokePItemUPP(theDialog, item, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppPItemProcInfo, (theDialog), (item))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewPrIdleProc(userRoutine) NewPrIdleUPP(userRoutine)
+#define NewPItemProc(userRoutine) NewPItemUPP(userRoutine)
+#define CallPrIdleProc(userRoutine) InvokePrIdleUPP(userRoutine)
+#define CallPItemProc(userRoutine, theDialog, item) InvokePItemUPP(theDialog, item, userRoutine)
+#if !OPAQUE_TOOLBOX_STRUCTS
+
+struct TPrPort {
+ GrafPort gPort; /*The Printer's graf port.*/
+ QDProcs gProcs; /*..and its procs*/
+ long lGParam1; /*16 bytes for private parameter storage.*/
+ long lGParam2;
+ long lGParam3;
+ long lGParam4;
+ Boolean fOurPtr; /*Whether the PrPort allocation was done by us.*/
+ Boolean fOurBits; /*Whether the BitMap allocation was done by us.*/
+};
+typedef struct TPrPort TPrPort;
+
+typedef TPrPort * TPPrPort;
+#else
+typedef struct OpaqueTPPrPort* TPPrPort;
+#endif /* !OPAQUE_TOOLBOX_STRUCTS */
+
+typedef TPPrPort TPPrPortRef;
+/* Printing Graf Port. All printer imaging, whether spooling, banding, etc, happens "thru" a GrafPort.
+ This is the "PrPeek" record. */
+
+struct TPrInfo {
+ short iDev; /*Font mgr/QuickDraw device code*/
+ short iVRes; /*Resolution of device, in device coordinates*/
+ short iHRes; /*..note: V before H => compatable with Point.*/
+ Rect rPage; /*The page (printable) rectangle in device coordinates.*/
+};
+typedef struct TPrInfo TPrInfo;
+
+typedef TPrInfo * TPPrInfo;
+/* Print Info Record: The parameters needed for page composition. */
+
+struct TPrStl {
+ short wDev;
+ short iPageV;
+ short iPageH;
+ SInt8 bPort;
+ TFeed feed;
+};
+typedef struct TPrStl TPrStl;
+
+typedef TPrStl * TPPrStl;
+
+struct TPrXInfo {
+ short iRowBytes;
+ short iBandV;
+ short iBandH;
+ short iDevBytes;
+ short iBands;
+ SInt8 bPatScale;
+ SInt8 bUlThick;
+ SInt8 bUlOffset;
+ SInt8 bUlShadow;
+ TScan scan;
+ SInt8 bXInfoX;
+};
+typedef struct TPrXInfo TPrXInfo;
+
+typedef TPrXInfo * TPPrXInfo;
+
+struct TPrJob {
+ short iFstPage; /*Page Range.*/
+ short iLstPage;
+ short iCopies; /*No. copies.*/
+ SInt8 bJDocLoop; /*The Doc style: Draft, Spool, .., and ..*/
+ Boolean fFromUsr; /*Printing from an User's App (not PrApp) flag*/
+ PrIdleUPP pIdleProc; /*The Proc called while waiting on IO etc.*/
+ StringPtr pFileName; /*Spool File Name: NIL for default.*/
+ short iFileVol; /*Spool File vol, set to 0 initially*/
+ SInt8 bFileVers; /*Spool File version, set to 0 initially*/
+ SInt8 bJobX; /*An eXtra byte.*/
+};
+typedef struct TPrJob TPrJob;
+
+typedef TPrJob * TPPrJob;
+/* Print Job: Print "form" for a single print request. */
+
+struct TPrint {
+ short iPrVersion; /*(2) Printing software version*/
+ TPrInfo prInfo; /*(14) the PrInfo data associated with the current style.*/
+ Rect rPaper; /*(8) The paper rectangle [offset from rPage]*/
+ TPrStl prStl; /*(8) This print request's style.*/
+ TPrInfo prInfoPT; /*(14) Print Time Imaging metrics*/
+ TPrXInfo prXInfo; /*(16) Print-time (expanded) Print info record.*/
+ TPrJob prJob; /*(20) The Print Job request (82) Total of the above; 120-82 = 38 bytes needed to fill 120*/
+ short printX[19]; /*Spare to fill to 120 bytes!*/
+};
+typedef struct TPrint TPrint;
+
+typedef TPrint * TPPrint;
+typedef TPPrint * THPrint;
+
+struct TPrStatus {
+ short iTotPages; /*Total pages in Print File.*/
+ short iCurPage; /*Current page number*/
+ short iTotCopies; /*Total copies requested*/
+ short iCurCopy; /*Current copy number*/
+ short iTotBands; /*Total bands per page.*/
+ short iCurBand; /*Current band number*/
+ Boolean fPgDirty; /*True if current page has been written to.*/
+ Boolean fImaging; /*Set while in band's DrawPic call.*/
+ THPrint hPrint; /*Handle to the active Printer record*/
+ TPPrPort pPrPort; /*Ptr to the active PrPort*/
+ PicHandle hPic; /*Handle to the active Picture*/
+};
+typedef struct TPrStatus TPrStatus;
+
+typedef TPrStatus * TPPrStatus;
+typedef TPPrStatus TPPrStatusRef;
+
+/* Print Status: Print information during printing. */
+
+struct TPfPgDir {
+ short iPages;
+ long iPgPos[129]; /*ARRAY [0..iPfMaxPgs] OF LONGINT*/
+};
+typedef struct TPfPgDir TPfPgDir;
+
+typedef TPfPgDir * TPPfPgDir;
+typedef TPPfPgDir * THPfPgDir;
+/* PicFile = a TPfHeader followed by n QuickDraw Pics (whose PicSize is invalid!) */
+/* This is the Printing Dialog Record. Only used by folks appending their own
+ DITLs to the print dialogs. Print Dialog: The Dialog Stream object. */
+#if !OPAQUE_TOOLBOX_STRUCTS
+
+struct TPrDlg {
+ DialogRecord Dlg; /*The Dialog window*/
+ ModalFilterUPP pFltrProc; /*The Filter Proc.*/
+ PItemUPP pItemProc; /*The Item evaluating proc.*/
+ THPrint hPrintUsr; /*The user's print record.*/
+ Boolean fDoIt;
+ Boolean fDone;
+ long lUser1; /*Four longs for apps to hang global data.*/
+ long lUser2; /*Plus more stuff needed by the particular*/
+ long lUser3; /*printing dialog.*/
+ long lUser4;
+};
+typedef struct TPrDlg TPrDlg;
+
+typedef TPrDlg * TPPrDlg;
+#else
+typedef struct OpaqueTPPrDlg* TPPrDlg;
+#endif /* !OPAQUE_TOOLBOX_STRUCTS */
+
+typedef TPPrDlg TPPrDlgRef;
+typedef CALLBACK_API( TPPrDlgRef , PDlgInitProcPtr )(THPrint hPrint);
+typedef STACK_UPP_TYPE(PDlgInitProcPtr) PDlgInitUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(PDlgInitUPP)
+ NewPDlgInitUPP (PDlgInitProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposePDlgInitUPP (PDlgInitUPP userUPP);
+
+ EXTERN_API(TPPrDlgRef)
+ InvokePDlgInitUPP (THPrint hPrint,
+ PDlgInitUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppPDlgInitProcInfo = 0x000000F0 }; /* pascal 4_bytes Func(4_bytes) */
+ #define NewPDlgInitUPP(userRoutine) (PDlgInitUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPDlgInitProcInfo, GetCurrentArchitecture())
+ #define DisposePDlgInitUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokePDlgInitUPP(hPrint, userUPP) (TPPrDlgRef)CALL_ONE_PARAMETER_UPP((userUPP), uppPDlgInitProcInfo, (hPrint))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewPDlgInitProc(userRoutine) NewPDlgInitUPP(userRoutine)
+#define CallPDlgInitProc(userRoutine, hPrint) InvokePDlgInitUPP(hPrint, userRoutine)
+
+struct TGnlData {
+ short iOpCode;
+ short iError;
+ long lReserved; /*more fields here depending on call*/
+};
+typedef struct TGnlData TGnlData;
+
+struct TRslRg {
+ short iMin;
+ short iMax;
+};
+typedef struct TRslRg TRslRg;
+
+struct TRslRec {
+ short iXRsl;
+ short iYRsl;
+};
+typedef struct TRslRec TRslRec;
+
+struct TGetRslBlk {
+ short iOpCode;
+ short iError;
+ long lReserved;
+ short iRgType;
+ TRslRg xRslRg;
+ TRslRg yRslRg;
+ short iRslRecCnt;
+ TRslRec rgRslRec[27];
+};
+typedef struct TGetRslBlk TGetRslBlk;
+
+struct TSetRslBlk {
+ short iOpCode;
+ short iError;
+ long lReserved;
+ THPrint hPrint;
+ short iXRsl;
+ short iYRsl;
+};
+typedef struct TSetRslBlk TSetRslBlk;
+
+struct TDftBitsBlk {
+ short iOpCode;
+ short iError;
+ long lReserved;
+ THPrint hPrint;
+};
+typedef struct TDftBitsBlk TDftBitsBlk;
+
+struct TGetRotnBlk {
+ short iOpCode;
+ short iError;
+ long lReserved;
+ THPrint hPrint;
+ Boolean fLandscape;
+ SInt8 bXtra;
+};
+typedef struct TGetRotnBlk TGetRotnBlk;
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+PrPurge (void) FOURWORDINLINE(0x2F3C, 0xA800, 0x0000, 0xA8FD);
+
+EXTERN_API( void )
+PrNoPurge (void) FOURWORDINLINE(0x2F3C, 0xB000, 0x0000, 0xA8FD);
+
+EXTERN_API( void )
+PrOpen (void) FOURWORDINLINE(0x2F3C, 0xC800, 0x0000, 0xA8FD);
+
+EXTERN_API( void )
+PrClose (void) FOURWORDINLINE(0x2F3C, 0xD000, 0x0000, 0xA8FD);
+
+EXTERN_API( void )
+PrintDefault (THPrint hPrint) FOURWORDINLINE(0x2F3C, 0x2004, 0x0480, 0xA8FD);
+
+EXTERN_API( Boolean )
+PrValidate (THPrint hPrint) FOURWORDINLINE(0x2F3C, 0x5204, 0x0498, 0xA8FD);
+
+EXTERN_API( Boolean )
+PrStlDialog (THPrint hPrint) FOURWORDINLINE(0x2F3C, 0x2A04, 0x0484, 0xA8FD);
+
+EXTERN_API( Boolean )
+PrJobDialog (THPrint hPrint) FOURWORDINLINE(0x2F3C, 0x3204, 0x0488, 0xA8FD);
+
+EXTERN_API( TPPrDlgRef )
+PrStlInit (THPrint hPrint) FOURWORDINLINE(0x2F3C, 0x3C04, 0x040C, 0xA8FD);
+
+EXTERN_API( TPPrDlgRef )
+PrJobInit (THPrint hPrint) FOURWORDINLINE(0x2F3C, 0x4404, 0x0410, 0xA8FD);
+
+EXTERN_API( void )
+PrJobMerge (THPrint hPrintSrc,
+ THPrint hPrintDst) FOURWORDINLINE(0x2F3C, 0x5804, 0x089C, 0xA8FD);
+
+EXTERN_API( Boolean )
+PrDlgMain (THPrint hPrint,
+ PDlgInitUPP pDlgInit) FOURWORDINLINE(0x2F3C, 0x4A04, 0x0894, 0xA8FD);
+
+EXTERN_API( TPPrPort )
+PrOpenDoc (THPrint hPrint,
+ TPPrPort pPrPort, /* can be NULL */
+ Ptr pIOBuf) FOURWORDINLINE(0x2F3C, 0x0400, 0x0C00, 0xA8FD);
+
+EXTERN_API( void )
+PrCloseDoc (TPPrPort pPrPort) FOURWORDINLINE(0x2F3C, 0x0800, 0x0484, 0xA8FD);
+
+EXTERN_API( void )
+PrOpenPage (TPPrPort pPrPort,
+ TPRect pPageFrame) FOURWORDINLINE(0x2F3C, 0x1000, 0x0808, 0xA8FD);
+
+EXTERN_API( void )
+PrClosePage (TPPrPort pPrPort) FOURWORDINLINE(0x2F3C, 0x1800, 0x040C, 0xA8FD);
+
+EXTERN_API( void )
+PrPicFile (THPrint hPrint,
+ TPPrPort pPrPort,
+ Ptr pIOBuf,
+ Ptr pDevBuf,
+ TPPrStatus prStatus) FOURWORDINLINE(0x2F3C, 0x6005, 0x1480, 0xA8FD);
+
+EXTERN_API( short )
+PrError (void) FOURWORDINLINE(0x2F3C, 0xBA00, 0x0000, 0xA8FD);
+
+EXTERN_API( void )
+PrSetError (short iErr) FOURWORDINLINE(0x2F3C, 0xC000, 0x0200, 0xA8FD);
+
+EXTERN_API( void )
+PrGeneral (Ptr pData) FOURWORDINLINE(0x2F3C, 0x7007, 0x0480, 0xA8FD);
+
+EXTERN_API( void )
+PrDrvrOpen (void) FOURWORDINLINE(0x2F3C, 0x8000, 0x0000, 0xA8FD);
+
+EXTERN_API( void )
+PrDrvrClose (void) FOURWORDINLINE(0x2F3C, 0x8800, 0x0000, 0xA8FD);
+
+EXTERN_API( void )
+PrCtlCall (short iWhichCtl,
+ long lParam1,
+ long lParam2,
+ long lParam3) FOURWORDINLINE(0x2F3C, 0xA000, 0x0E00, 0xA8FD);
+
+EXTERN_API( Handle )
+PrDrvrDCE (void) FOURWORDINLINE(0x2F3C, 0x9400, 0x0000, 0xA8FD);
+
+EXTERN_API( short )
+PrDrvrVers (void) FOURWORDINLINE(0x2F3C, 0x9A00, 0x0000, 0xA8FD);
+
+EXTERN_API( short )
+PrLoadDriver (void) FOURWORDINLINE(0x2F3C, 0xD800, 0x0000, 0xA8FD);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __PRINTING__ */
+
diff --git a/include/qt/Processes.h b/include/qt/Processes.h
new file mode 100644
index 000000000..44ea33054
--- /dev/null
+++ b/include/qt/Processes.h
@@ -0,0 +1,303 @@
+/*
+ File: Processes.h
+
+ Contains: Process Manager Interfaces.
+
+ Version: Technology: Mac OS 8
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1989-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __PROCESSES__
+#define __PROCESSES__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __EVENTS__
+#include "Events.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* type for unique process identifier */
+
+struct ProcessSerialNumber {
+ unsigned long highLongOfPSN;
+ unsigned long lowLongOfPSN;
+};
+typedef struct ProcessSerialNumber ProcessSerialNumber;
+typedef ProcessSerialNumber * ProcessSerialNumberPtr;
+enum {
+ /* Process identifier - Various reserved process serial numbers */
+ kNoProcess = 0,
+ kSystemProcess = 1,
+ kCurrentProcess = 2
+};
+
+/* Definition of the parameter block passed to _Launch */
+/* Typedef and flags for launchControlFlags field*/
+
+typedef unsigned short LaunchFlags;
+enum {
+ launchContinue = 0x4000,
+ launchNoFileFlags = 0x0800,
+ launchUseMinimum = 0x0400,
+ launchDontSwitch = 0x0200,
+ launchAllow24Bit = 0x0100,
+ launchInhibitDaemon = 0x0080
+};
+
+/* Format for first AppleEvent to pass to new process. The size of the overall
+ buffer variable: the message body immediately follows the messageLength */
+
+struct AppParameters {
+ EventRecord theMsgEvent;
+ unsigned long eventRefCon;
+ unsigned long messageLength;
+};
+typedef struct AppParameters AppParameters;
+typedef AppParameters * AppParametersPtr;
+/* Parameter block to _Launch */
+
+struct LaunchParamBlockRec {
+ unsigned long reserved1;
+ unsigned short reserved2;
+ unsigned short launchBlockID;
+ unsigned long launchEPBLength;
+ unsigned short launchFileFlags;
+ LaunchFlags launchControlFlags;
+ FSSpecPtr launchAppSpec;
+ ProcessSerialNumber launchProcessSN;
+ unsigned long launchPreferredSize;
+ unsigned long launchMinimumSize;
+ unsigned long launchAvailableSize;
+ AppParametersPtr launchAppParameters;
+};
+typedef struct LaunchParamBlockRec LaunchParamBlockRec;
+
+typedef LaunchParamBlockRec * LaunchPBPtr;
+/* Set launchBlockID to extendedBlock to specify that extensions exist.
+ Set launchEPBLength to extendedBlockLen for compatibility.*/
+enum {
+ extendedBlock = 0x4C43, /* 'LC' */
+ extendedBlockLen = sizeof(LaunchParamBlockRec) - 12
+};
+
+enum {
+ /* Definition of the information block returned by GetProcessInformation */
+ modeReserved = 0x01000000,
+ modeControlPanel = 0x00080000,
+ modeLaunchDontSwitch = 0x00040000,
+ modeDeskAccessory = 0x00020000,
+ modeMultiLaunch = 0x00010000,
+ modeNeedSuspendResume = 0x00004000,
+ modeCanBackground = 0x00001000,
+ modeDoesActivateOnFGSwitch = 0x00000800,
+ modeOnlyBackground = 0x00000400,
+ modeGetFrontClicks = 0x00000200,
+ modeGetAppDiedMsg = 0x00000100,
+ mode32BitCompatible = 0x00000080,
+ modeHighLevelEventAware = 0x00000040,
+ modeLocalAndRemoteHLEvents = 0x00000020,
+ modeStationeryAware = 0x00000010,
+ modeUseTextEditServices = 0x00000008,
+ modeDisplayManagerAware = 0x00000004
+};
+
+/* Record returned by GetProcessInformation */
+
+struct ProcessInfoRec {
+ unsigned long processInfoLength;
+ StringPtr processName;
+ ProcessSerialNumber processNumber;
+ unsigned long processType;
+ OSType processSignature;
+ unsigned long processMode;
+ Ptr processLocation;
+ unsigned long processSize;
+ unsigned long processFreeMem;
+ ProcessSerialNumber processLauncher;
+ unsigned long processLaunchDate;
+ unsigned long processActiveTime;
+ FSSpecPtr processAppSpec;
+};
+typedef struct ProcessInfoRec ProcessInfoRec;
+typedef ProcessInfoRec * ProcessInfoRecPtr;
+/* Record corresponding to the SIZE resource definition */
+
+struct SizeResourceRec {
+ unsigned short flags;
+ unsigned long preferredHeapSize;
+ unsigned long minimumHeapSize;
+};
+typedef struct SizeResourceRec SizeResourceRec;
+typedef SizeResourceRec * SizeResourceRecPtr;
+typedef SizeResourceRecPtr * SizeResourceRecHandle;
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 LaunchApplication(__A0)
+ #endif
+EXTERN_API( OSErr )
+LaunchApplication (LaunchPBPtr LaunchParams) ONEWORDINLINE(0xA9F2);
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+LaunchDeskAccessory (const FSSpec * pFileSpec,
+ ConstStr255Param pDAName) THREEWORDINLINE(0x3F3C, 0x0036, 0xA88F);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if TARGET_OS_MAC
+ #define MacGetCurrentProcess GetCurrentProcess
+#endif
+EXTERN_API( OSErr )
+MacGetCurrentProcess (ProcessSerialNumber * PSN) THREEWORDINLINE(0x3F3C, 0x0037, 0xA88F);
+
+EXTERN_API( OSErr )
+GetFrontProcess (ProcessSerialNumber * PSN) FIVEWORDINLINE(0x70FF, 0x2F00, 0x3F3C, 0x0039, 0xA88F);
+
+EXTERN_API( OSErr )
+GetNextProcess (ProcessSerialNumber * PSN) THREEWORDINLINE(0x3F3C, 0x0038, 0xA88F);
+
+EXTERN_API( OSErr )
+GetProcessInformation (const ProcessSerialNumber * PSN,
+ ProcessInfoRec * info) THREEWORDINLINE(0x3F3C, 0x003A, 0xA88F);
+
+EXTERN_API( OSErr )
+SetFrontProcess (const ProcessSerialNumber * PSN) THREEWORDINLINE(0x3F3C, 0x003B, 0xA88F);
+
+EXTERN_API( OSErr )
+WakeUpProcess (const ProcessSerialNumber * PSN) THREEWORDINLINE(0x3F3C, 0x003C, 0xA88F);
+
+EXTERN_API( OSErr )
+SameProcess (const ProcessSerialNumber * PSN1,
+ const ProcessSerialNumber * PSN2,
+ Boolean * result) THREEWORDINLINE(0x3F3C, 0x003D, 0xA88F);
+
+/* ExitToShell was previously in SegLoad.h*/
+EXTERN_API( void )
+ExitToShell (void) ONEWORDINLINE(0xA9F4);
+
+/*
+ LaunchControlPanel is similar to LaunchDeskAccessory, but for Control Panel files instead.
+ It launches a control panel in an application shell maintained by the Process Manager.
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+LaunchControlPanel (const FSSpec * pFileSpec) THREEWORDINLINE(0x3F3C, 0x007B, 0xA88F);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+/* Values of the 'message' parameter to a Control Panel 'cdev' */
+enum {
+ initDev = 0, /*Time for cdev to initialize itself*/
+ hitDev = 1, /*Hit on one of my items*/
+ closeDev = 2, /*Close yourself*/
+ nulDev = 3, /*Null event*/
+ updateDev = 4, /*Update event*/
+ activDev = 5, /*Activate event*/
+ deactivDev = 6, /*Deactivate event*/
+ keyEvtDev = 7, /*Key down/auto key*/
+ macDev = 8, /*Decide whether or not to show up*/
+ undoDev = 9,
+ cutDev = 10,
+ copyDev = 11,
+ pasteDev = 12,
+ clearDev = 13,
+ cursorDev = 14
+};
+
+/* Special values a Control Panel 'cdev' can return */
+enum {
+ cdevGenErr = -1, /*General error; gray cdev w/o alert*/
+ cdevMemErr = 0, /*Memory shortfall; alert user please*/
+ cdevResErr = 1, /*Couldn't get a needed resource; alert*/
+ cdevUnset = 3 /* cdevValue is initialized to this*/
+};
+
+/* Control Panel Default Proc */
+typedef CALLBACK_API( long , ControlPanelDefProcPtr )(short message, short item, short numItems, short cPanelID, EventRecord *theEvent, long cdevValue, DialogPtr cpDialog);
+typedef STACK_UPP_TYPE(ControlPanelDefProcPtr) ControlPanelDefUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(ControlPanelDefUPP)
+ NewControlPanelDefUPP (ControlPanelDefProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeControlPanelDefUPP (ControlPanelDefUPP userUPP);
+
+ EXTERN_API(long)
+ InvokeControlPanelDefUPP (short message,
+ short item,
+ short numItems,
+ short cPanelID,
+ EventRecord * theEvent,
+ long cdevValue,
+ DialogPtr cpDialog,
+ ControlPanelDefUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppControlPanelDefProcInfo = 0x000FEAB0 }; /* pascal 4_bytes Func(2_bytes, 2_bytes, 2_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewControlPanelDefUPP(userRoutine) (ControlPanelDefUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlPanelDefProcInfo, GetCurrentArchitecture())
+ #define DisposeControlPanelDefUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeControlPanelDefUPP(message, item, numItems, cPanelID, theEvent, cdevValue, cpDialog, userUPP) (long)CALL_SEVEN_PARAMETER_UPP((userUPP), uppControlPanelDefProcInfo, (message), (item), (numItems), (cPanelID), (theEvent), (cdevValue), (cpDialog))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewControlPanelDefProc(userRoutine) NewControlPanelDefUPP(userRoutine)
+#define CallControlPanelDefProc(userRoutine, message, item, numItems, cPanelID, theEvent, cdevValue, cpDialog) InvokeControlPanelDefUPP(message, item, numItems, cPanelID, theEvent, cdevValue, cpDialog, userRoutine)
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __PROCESSES__ */
+
diff --git a/include/qt/QD3D.h b/include/qt/QD3D.h
new file mode 100644
index 000000000..df43ae5dd
--- /dev/null
+++ b/include/qt/QD3D.h
@@ -0,0 +1,1233 @@
+/*
+ File: QD3D.h
+
+ Contains: Base types for Quickdraw 3D
+
+ Version: Technology: Quickdraw 3D 1.6
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QD3D__
+#define __QD3D__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+
+#if TARGET_OS_MAC
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#endif /* TARGET_OS_MAC */
+
+
+#define ushort FREDDIE
+#include "stdio.h"
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __QD3D__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __QD3D__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+#if TARGET_OS_MAC
+#define OS_MACINTOSH 1
+#define OS_WIN32 0
+#define OS_UNIX 0
+#define OS_NEXT 0
+#define WINDOW_SYSTEM_MACINTOSH 1
+#define WINDOW_SYSTEM_WIN32 0
+#define WINDOW_SYSTEM_X11 0
+#define WINDOW_SYSTEM_NEXT 0
+#endif /* TARGET_OS_MAC */
+
+#if TARGET_OS_WIN32
+#define OS_MACINTOSH 0
+#define OS_WIN32 1
+#define OS_UNIX 0
+#define OS_NEXT 0
+#define WINDOW_SYSTEM_MACINTOSH 0
+#define WINDOW_SYSTEM_WIN32 1
+#define WINDOW_SYSTEM_X11 0
+#define WINDOW_SYSTEM_NEXT 0
+#endif /* TARGET_OS_WIN32 */
+
+#if TARGET_OS_UNIX
+#define OS_MACINTOSH 0
+#define OS_WIN32 0
+#define WINDOW_SYSTEM_MACINTOSH 0
+#define WINDOW_SYSTEM_WIN32 0
+#if NeXT
+#define OS_UNIX 0
+#define OS_NEXT 1
+#define WINDOW_SYSTEM_X11 0
+#define WINDOW_SYSTEM_NEXT 1
+#else
+#define OS_UNIX 1
+#define OS_NEXT 0
+#define WINDOW_SYSTEM_X11 1
+#define WINDOW_SYSTEM_NEXT 0
+#endif /* NeXT */
+
+#endif /* TARGET_OS_UNIX */
+
+
+/******************************************************************************
+ ** **
+ ** Export Control **
+ ** **
+ *****************************************************************************/
+#if TARGET_OS_WIN32
+ #if defined(WIN32_EXPORTING) /* define when building DLL */
+ #define QD3D_EXPORT __declspec( dllexport )
+ #define QD3D_CALL
+ #define QD3D_CALLBACK
+ #else
+ #define QD3D_EXPORT __declspec( dllimport )
+ #define QD3D_CALL __cdecl
+ #define QD3D_CALLBACK __cdecl
+ #endif /* WIN32_EXPORTING */
+#else
+ #define QD3D_EXPORT
+ #define QD3D_CALL
+ #define QD3D_CALLBACK
+#endif /* TARGET_OS_WIN32 */
+
+
+/******************************************************************************
+ ** **
+ ** NULL definition **
+ ** **
+ *****************************************************************************/
+
+#ifndef NULL
+ #error /* NULL is undefined? */
+#endif /* NULL */
+
+/******************************************************************************
+ ** **
+ ** Objects **
+ ** **
+ *****************************************************************************/
+/*
+ * Everything in QuickDraw 3D is an OBJECT: a bunch of data with a type,
+ * deletion, duplication, and i/o methods.
+ */
+typedef long TQ3ObjectType;
+typedef struct OpaqueTQ3Object* TQ3Object;
+/* */
+/*
+ * There are four subclasses of OBJECT:
+ * an ELEMENT, which is data that is placed in a SET
+ * a SHAREDOBJECT, which is reference-counted data that is shared
+ * VIEWs, which maintain state information for an image
+ * a PICK, which used to query a VIEW
+ */
+typedef TQ3Object TQ3ElementObject;
+typedef TQ3Object TQ3SharedObject;
+typedef TQ3Object TQ3ViewObject;
+typedef TQ3Object TQ3PickObject;
+/*
+ * There are several types of SharedObjects:
+ * RENDERERs, which paint to a drawContext
+ * DRAWCONTEXTs, which are an interface to a device
+ * SETs, which maintains "mathematical sets" of ELEMENTs
+ * FILEs, which maintain state information for a metafile
+ * SHAPEs, which affect the state of the View
+ * SHAPEPARTs, which contain geometry-specific data about a picking hit
+ * CONTROLLERSTATEs, which hold state of the output channels for a CONTROLLER
+ * TRACKERs, which represent a position and orientation in the user interface
+ * STRINGs, which are abstractions of text string data.
+ * STORAGE, which is an abstraction for stream-based data storage (files, memory)
+ * TEXTUREs, for sharing bitmap information for TEXTURESHADERS
+ * VIEWHINTs, which specifies viewing preferences in FILEs
+ */
+typedef TQ3SharedObject TQ3RendererObject;
+typedef TQ3SharedObject TQ3DrawContextObject;
+typedef TQ3SharedObject TQ3SetObject;
+typedef TQ3SharedObject TQ3FileObject;
+typedef TQ3SharedObject TQ3ShapeObject;
+typedef TQ3SharedObject TQ3ShapePartObject;
+typedef TQ3SharedObject TQ3ControllerStateObject;
+typedef TQ3SharedObject TQ3TrackerObject;
+typedef TQ3SharedObject TQ3StringObject;
+typedef TQ3SharedObject TQ3StorageObject;
+typedef TQ3SharedObject TQ3TextureObject;
+typedef TQ3SharedObject TQ3ViewHintsObject;
+/*
+ * There is one types of SET:
+ * ATTRIBUTESETs, which contain ATTRIBUTEs which are inherited
+ */
+typedef TQ3SetObject TQ3AttributeSet;
+/*
+ * There are many types of SHAPEs:
+ * LIGHTs, which affect how the RENDERER draws 3-D cues
+ * CAMERAs, which affects the location and orientation of the RENDERER in space
+ * GROUPs, which may contain any number of SHARED OBJECTS
+ * GEOMETRYs, which are representations of three-dimensional data
+ * SHADERs, which affect how colors are drawn on a geometry
+ * STYLEs, which affect how the RENDERER paints to the DRAWCONTEXT
+ * TRANSFORMs, which affect the coordinate system in the VIEW
+ * REFERENCEs, which are references to objects in FILEs
+ * UNKNOWN, which hold unknown objects read from a metafile.
+ */
+typedef TQ3ShapeObject TQ3GroupObject;
+typedef TQ3ShapeObject TQ3GeometryObject;
+typedef TQ3ShapeObject TQ3ShaderObject;
+typedef TQ3ShapeObject TQ3StyleObject;
+typedef TQ3ShapeObject TQ3TransformObject;
+typedef TQ3ShapeObject TQ3LightObject;
+typedef TQ3ShapeObject TQ3CameraObject;
+typedef TQ3ShapeObject TQ3UnknownObject;
+typedef TQ3ShapeObject TQ3ReferenceObject;
+typedef TQ3ShapeObject TQ3StateOperatorObject;
+/*
+ * For now, there is only one type of SHAPEPARTs:
+ * MESHPARTs, which describe some part of a mesh
+ */
+typedef TQ3ShapePartObject TQ3MeshPartObject;
+/*
+ * There are three types of MESHPARTs:
+ * MESHFACEPARTs, which describe a face of a mesh
+ * MESHEDGEPARTs, which describe a edge of a mesh
+ * MESHVERTEXPARTs, which describe a vertex of a mesh
+ */
+typedef TQ3MeshPartObject TQ3MeshFacePartObject;
+typedef TQ3MeshPartObject TQ3MeshEdgePartObject;
+typedef TQ3MeshPartObject TQ3MeshVertexPartObject;
+/*
+ * A DISPLAY Group can be drawn to a view
+ */
+typedef TQ3GroupObject TQ3DisplayGroupObject;
+/*
+ * There are many types of SHADERs:
+ * SURFACESHADERs, which affect how the surface of a geometry is painted
+ * ILLUMINATIONSHADERs, which affect how lights affect the color of a surface
+ */
+typedef TQ3ShaderObject TQ3SurfaceShaderObject;
+typedef TQ3ShaderObject TQ3IlluminationShaderObject;
+/*
+ * A handle to an object in a group
+ */
+typedef struct OpaqueTQ3GroupPosition* TQ3GroupPosition;
+/*
+ * TQ3ObjectClassNameString is used for the class name of an object
+ */
+enum {
+ kQ3StringMaximumLength = 1024
+};
+
+
+ typedef char TQ3ObjectClassNameString[kQ3StringMaximumLength];
+
+
+/******************************************************************************
+ ** **
+ ** Client/Server Things **
+ ** **
+ *****************************************************************************/
+typedef void * TQ3ControllerRef;
+/******************************************************************************
+ ** **
+ ** Flags and Switches **
+ ** **
+ *****************************************************************************/
+
+enum TQ3Boolean {
+ kQ3False = 0,
+ kQ3True = 1
+};
+typedef enum TQ3Boolean TQ3Boolean;
+
+
+enum TQ3Switch {
+ kQ3Off = 0,
+ kQ3On = 1
+};
+typedef enum TQ3Switch TQ3Switch;
+
+
+enum TQ3Status {
+ kQ3Failure = 0,
+ kQ3Success = 1
+};
+typedef enum TQ3Status TQ3Status;
+
+
+enum TQ3Axis {
+ kQ3AxisX = 0,
+ kQ3AxisY = 1,
+ kQ3AxisZ = 2
+};
+typedef enum TQ3Axis TQ3Axis;
+
+
+enum TQ3PixelType {
+ kQ3PixelTypeRGB32 = 0, /* Alpha:8 (ignored), R:8, G:8, B:8 */
+ kQ3PixelTypeARGB32 = 1, /* Alpha:8, R:8, G:8, B:8 */
+ kQ3PixelTypeRGB16 = 2, /* Alpha:1 (ignored), R:5, G:5, B:5 */
+ kQ3PixelTypeARGB16 = 3, /* Alpha:1, R:5, G:5, B:5 */
+ kQ3PixelTypeRGB16_565 = 4, /* Win32 only: 16 bits/pixel, R:5, G:6, B:5 */
+ kQ3PixelTypeRGB24 = 5 /* Win32 only: 24 bits/pixel, R:8, G:8, B:8 */
+};
+typedef enum TQ3PixelType TQ3PixelType;
+
+
+enum TQ3Endian {
+ kQ3EndianBig = 0,
+ kQ3EndianLittle = 1
+};
+typedef enum TQ3Endian TQ3Endian;
+
+
+enum TQ3EndCapMasks {
+ kQ3EndCapNone = 0,
+ kQ3EndCapMaskTop = 1 << 0,
+ kQ3EndCapMaskBottom = 1 << 1,
+ kQ3EndCapMaskInterior = 1 << 2
+};
+typedef enum TQ3EndCapMasks TQ3EndCapMasks;
+
+typedef unsigned long TQ3EndCap;
+
+ enum {
+ kQ3ArrayIndexNULL = ~0
+ };
+
+
+/******************************************************************************
+ ** **
+ ** Point and Vector Definitions **
+ ** **
+ *****************************************************************************/
+
+struct TQ3Vector2D {
+ float x;
+ float y;
+};
+typedef struct TQ3Vector2D TQ3Vector2D;
+
+struct TQ3Vector3D {
+ float x;
+ float y;
+ float z;
+};
+typedef struct TQ3Vector3D TQ3Vector3D;
+
+struct TQ3Point2D {
+ float x;
+ float y;
+};
+typedef struct TQ3Point2D TQ3Point2D;
+
+struct TQ3Point3D {
+ float x;
+ float y;
+ float z;
+};
+typedef struct TQ3Point3D TQ3Point3D;
+
+struct TQ3RationalPoint4D {
+ float x;
+ float y;
+ float z;
+ float w;
+};
+typedef struct TQ3RationalPoint4D TQ3RationalPoint4D;
+
+struct TQ3RationalPoint3D {
+ float x;
+ float y;
+ float w;
+};
+typedef struct TQ3RationalPoint3D TQ3RationalPoint3D;
+/******************************************************************************
+ ** **
+ ** Quaternion **
+ ** **
+ *****************************************************************************/
+
+struct TQ3Quaternion {
+ float w;
+ float x;
+ float y;
+ float z;
+};
+typedef struct TQ3Quaternion TQ3Quaternion;
+/******************************************************************************
+ ** **
+ ** Ray Definition **
+ ** **
+ *****************************************************************************/
+
+struct TQ3Ray3D {
+ TQ3Point3D origin;
+ TQ3Vector3D direction;
+};
+typedef struct TQ3Ray3D TQ3Ray3D;
+/******************************************************************************
+ ** **
+ ** Parameterization Data Structures **
+ ** **
+ *****************************************************************************/
+
+struct TQ3Param2D {
+ float u;
+ float v;
+};
+typedef struct TQ3Param2D TQ3Param2D;
+
+struct TQ3Param3D {
+ float u;
+ float v;
+ float w;
+};
+typedef struct TQ3Param3D TQ3Param3D;
+
+struct TQ3Tangent2D {
+ TQ3Vector3D uTangent;
+ TQ3Vector3D vTangent;
+};
+typedef struct TQ3Tangent2D TQ3Tangent2D;
+
+struct TQ3Tangent3D {
+ TQ3Vector3D uTangent;
+ TQ3Vector3D vTangent;
+ TQ3Vector3D wTangent;
+};
+typedef struct TQ3Tangent3D TQ3Tangent3D;
+/******************************************************************************
+ ** **
+ ** Polar and Spherical Coordinates **
+ ** **
+ *****************************************************************************/
+
+struct TQ3PolarPoint {
+ float r;
+ float theta;
+};
+typedef struct TQ3PolarPoint TQ3PolarPoint;
+
+struct TQ3SphericalPoint {
+ float rho;
+ float theta;
+ float phi;
+};
+typedef struct TQ3SphericalPoint TQ3SphericalPoint;
+/******************************************************************************
+ ** **
+ ** Color Definition **
+ ** **
+ *****************************************************************************/
+
+struct TQ3ColorRGB {
+ float r;
+ float g;
+ float b;
+};
+typedef struct TQ3ColorRGB TQ3ColorRGB;
+
+struct TQ3ColorARGB {
+ float a;
+ float r;
+ float g;
+ float b;
+};
+typedef struct TQ3ColorARGB TQ3ColorARGB;
+/******************************************************************************
+ ** **
+ ** Vertices **
+ ** **
+ *****************************************************************************/
+
+struct TQ3Vertex3D {
+ TQ3Point3D point;
+ TQ3AttributeSet attributeSet;
+};
+typedef struct TQ3Vertex3D TQ3Vertex3D;
+/******************************************************************************
+ ** **
+ ** Matrices **
+ ** **
+ *****************************************************************************/
+
+struct TQ3Matrix3x3 {
+ float value[3][3];
+};
+typedef struct TQ3Matrix3x3 TQ3Matrix3x3;
+
+struct TQ3Matrix4x4 {
+ float value[4][4];
+};
+typedef struct TQ3Matrix4x4 TQ3Matrix4x4;
+/******************************************************************************
+ ** **
+ ** Bitmap/Pixmap **
+ ** **
+ *****************************************************************************/
+
+struct TQ3Pixmap {
+ void * image;
+ unsigned long width;
+ unsigned long height;
+ unsigned long rowBytes;
+ unsigned long pixelSize; /* MUST be 16 or 32 to use with the Interactive Renderer on Mac OS*/
+ TQ3PixelType pixelType;
+ TQ3Endian bitOrder;
+ TQ3Endian byteOrder;
+};
+typedef struct TQ3Pixmap TQ3Pixmap;
+
+struct TQ3StoragePixmap {
+ TQ3StorageObject image;
+ unsigned long width;
+ unsigned long height;
+ unsigned long rowBytes;
+ unsigned long pixelSize; /* MUST be 16 or 32 to use with the Interactive Renderer on Mac OS*/
+ TQ3PixelType pixelType;
+ TQ3Endian bitOrder;
+ TQ3Endian byteOrder;
+};
+typedef struct TQ3StoragePixmap TQ3StoragePixmap;
+
+struct TQ3Bitmap {
+ unsigned char * image;
+ unsigned long width;
+ unsigned long height;
+ unsigned long rowBytes;
+ TQ3Endian bitOrder;
+};
+typedef struct TQ3Bitmap TQ3Bitmap;
+
+struct TQ3MipmapImage { /* An image for use as a texture mipmap */
+ unsigned long width; /* Width of mipmap, must be power of 2 */
+ unsigned long height; /* Height of mipmap, must be power of 2 */
+ unsigned long rowBytes; /* Rowbytes of mipmap */
+ unsigned long offset; /* Offset from image base to this mipmap */
+};
+typedef struct TQ3MipmapImage TQ3MipmapImage;
+
+struct TQ3Mipmap {
+ TQ3StorageObject image; /* Data containing the texture map and */
+ /* if (useMipmapping==kQ3True) the */
+ /* mipmap data */
+ TQ3Boolean useMipmapping; /* True if mipmapping should be used */
+ /* and all mipmaps have been provided */
+ TQ3PixelType pixelType;
+ TQ3Endian bitOrder;
+ TQ3Endian byteOrder;
+ unsigned long reserved; /* leave NULL for next version */
+ TQ3MipmapImage mipmaps[32]; /* The actual number of mipmaps is determined from the size of the first mipmap */
+};
+typedef struct TQ3Mipmap TQ3Mipmap;
+
+
+
+struct TQ3CompressedPixmap {
+ TQ3StorageObject compressedImage; /* storage obj containing compressed image data */
+
+ TQ3Endian imageDescByteOrder; /* endianness of the data in the imageDesc */
+ TQ3StorageObject imageDesc; /* storage obj containing image description created by Quicktime to store info about compressed image */
+
+ TQ3Boolean makeMipmaps;
+
+ unsigned long width;
+ unsigned long height;
+ unsigned long pixelSize;
+ TQ3PixelType pixelType;
+};
+typedef struct TQ3CompressedPixmap TQ3CompressedPixmap;
+
+/******************************************************************************
+ ** **
+ ** Higher dimension quantities **
+ ** **
+ *****************************************************************************/
+
+struct TQ3Area {
+ TQ3Point2D min;
+ TQ3Point2D max;
+};
+typedef struct TQ3Area TQ3Area;
+
+struct TQ3PlaneEquation {
+ TQ3Vector3D normal;
+ float constant;
+};
+typedef struct TQ3PlaneEquation TQ3PlaneEquation;
+
+struct TQ3BoundingBox {
+ TQ3Point3D min;
+ TQ3Point3D max;
+ TQ3Boolean isEmpty;
+};
+typedef struct TQ3BoundingBox TQ3BoundingBox;
+
+struct TQ3BoundingSphere {
+ TQ3Point3D origin;
+ float radius;
+ TQ3Boolean isEmpty;
+};
+typedef struct TQ3BoundingSphere TQ3BoundingSphere;
+/*
+ * The TQ3ComputeBounds flag passed to StartBoundingBox or StartBoundingSphere
+ * calls in the View. It's a hint to the system as to how it should
+ * compute the bbox of a shape:
+ *
+ * kQ3ComputeBoundsExact:
+ * Vertices of shapes are transformed into world space and
+ * the world space bounding box is computed from them. Slow!
+ *
+ * kQ3ComputeBoundsApproximate:
+ * A local space bounding box is computed from a shape's
+ * vertices. This bbox is then transformed into world space,
+ * and its bounding box is taken as the shape's approximate
+ * bbox. Fast but the bbox is larger than optimal.
+ */
+
+enum TQ3ComputeBounds {
+ kQ3ComputeBoundsExact = 0,
+ kQ3ComputeBoundsApproximate = 1
+};
+typedef enum TQ3ComputeBounds TQ3ComputeBounds;
+
+
+/******************************************************************************
+ ** **
+ ** Object System Types **
+ ** **
+ *****************************************************************************/
+
+typedef struct OpaqueTQ3XObjectClass* TQ3XObjectClass;
+
+typedef unsigned long TQ3XMethodType;
+/*
+ * Object methods
+ */
+#define kQ3XMethodTypeObjectUnregister Q3_METHOD_TYPE('u','n','r','g')
+/*
+ * Return true from the metahandler if this
+ * object can be submitted in a rendering loop
+ */
+#define kQ3XMethodTypeObjectIsDrawable Q3_METHOD_TYPE('i','s','d','r') /* return true from the metahandler if this object can be submitted in a rendering loop */
+typedef CALLBACK_API_C( void , TQ3XFunctionPointer )(void );
+typedef CALLBACK_API_C( TQ3XFunctionPointer , TQ3XMetaHandler )(TQ3XMethodType methodType);
+/*
+ * MetaHandler:
+ * When you give a metahandler to QuickDraw 3D, it is called multiple
+ * times to build method tables, and then is thrown away. You are
+ * guaranteed that your metahandler will never be called again after a
+ * call that was passed a metahandler returns.
+ *
+ * Your metahandler should contain a switch on the methodType passed to it
+ * and should return the corresponding method as an TQ3XFunctionPointer.
+ *
+ * IMPORTANT: A metaHandler MUST always "return" a value. If you are
+ * passed a methodType that you do not understand, ALWAYS return NULL.
+ *
+ * These types here are prototypes of how your functions should look.
+ */
+typedef CALLBACK_API_C( TQ3Status , TQ3XObjectUnregisterMethod )(TQ3XObjectClass objectClass);
+/*
+ * See QD3DIO.h for the IO method types:
+ * ObjectReadData, ObjectTraverse, ObjectWrite
+ */
+
+/******************************************************************************
+ ** **
+ ** Set Types **
+ ** **
+ *****************************************************************************/
+typedef long TQ3ElementType;
+enum {
+ kQ3ElementTypeNone = 0,
+ kQ3ElementTypeUnknown = 32,
+ kQ3ElementTypeSet = 33
+};
+
+
+/*
+ * kQ3ElementTypeUnknown is a TQ3Object.
+ *
+ * Do Q3Set_Add(s, ..., &obj) or Q3Set_Get(s, ..., &obj);
+ *
+ * Note that the object is always referenced when copying around.
+ *
+ * Generally, it is an Unknown object, a Group of Unknown objects, or a
+ * group of other "objects" which have been found in the metafile and
+ * have no attachment method to their parent. Be prepared to handle
+ * any or all of these cases if you actually access the set on a shape.
+ *
+ * kQ3ElementTypeSet is a TQ3SetObject.
+ *
+ * Q3Shape_GetSet(s,&o) is eqivalent to
+ * Q3Shape_GetElement(s, kQ3ElementTypeSet, &o)
+ *
+ * Q3Shape_SetSet(s,o) is eqivalent to
+ * Q3Shape_SetElement(s, kQ3ElementTypeSet, &o)
+ *
+ * Note that the object is always referenced when copying around.
+ *
+ * See the note below about the Set and Shape changes.
+ */
+
+/******************************************************************************
+ ** **
+ ** Object System Macros **
+ ** **
+ *****************************************************************************/
+
+#define Q3_FOUR_CHARACTER_CONSTANT(a,b,c,d) \
+ ((const unsigned long) \
+ ((const unsigned long) (a) << 24) | \
+ ((const unsigned long) (b) << 16) | \
+ ((const unsigned long) (c) << 8) | \
+ ((const unsigned long) (d)))
+
+#define Q3_OBJECT_TYPE(a,b,c,d) \
+ ((TQ3ObjectType) Q3_FOUR_CHARACTER_CONSTANT(a,b,c,d))
+
+#define Q3_METHOD_TYPE(a,b,c,d) \
+ ((TQ3XMethodType) Q3_FOUR_CHARACTER_CONSTANT(a,b,c,d))
+
+/******************************************************************************
+ ** **
+ ** Object Types **
+ ** **
+ *****************************************************************************/
+/*
+ * Note: a call to Q3Foo_GetType will return a value kQ3FooTypeBar
+ * e.g. Q3Shared_GetType(object) returns kQ3SharedTypeShape, etc.
+ */
+
+#define kQ3ObjectTypeInvalid 0L
+#define kQ3ObjectTypeView ((TQ3ObjectType)FOUR_CHAR_CODE('view'))
+#define kQ3ObjectTypeElement ((TQ3ObjectType)FOUR_CHAR_CODE('elmn'))
+ #define kQ3ElementTypeAttribute ((TQ3ObjectType)FOUR_CHAR_CODE('eatt'))
+#define kQ3ObjectTypePick ((TQ3ObjectType)FOUR_CHAR_CODE('pick'))
+ #define kQ3PickTypeWindowPoint ((TQ3ObjectType)FOUR_CHAR_CODE('pkwp'))
+ #define kQ3PickTypeWindowRect ((TQ3ObjectType)FOUR_CHAR_CODE('pkwr'))
+ #define kQ3PickTypeWorldRay ((TQ3ObjectType)FOUR_CHAR_CODE('pkry'))
+#define kQ3ObjectTypeShared ((TQ3ObjectType)FOUR_CHAR_CODE('shrd'))
+ #define kQ3SharedTypeRenderer ((TQ3ObjectType)FOUR_CHAR_CODE('rddr'))
+ #define kQ3RendererTypeWireFrame ((TQ3ObjectType)FOUR_CHAR_CODE('wrfr'))
+ #define kQ3RendererTypeGeneric ((TQ3ObjectType)FOUR_CHAR_CODE('gnrr'))
+ #define kQ3RendererTypeInteractive ((TQ3ObjectType)FOUR_CHAR_CODE('ctwn'))
+ #define kQ3SharedTypeShape ((TQ3ObjectType)FOUR_CHAR_CODE('shap'))
+
+
+ #define kQ3ShapeTypeGeometry ((TQ3ObjectType)FOUR_CHAR_CODE('gmtr'))
+ #define kQ3GeometryTypeBox ((TQ3ObjectType)FOUR_CHAR_CODE('box '))
+ #define kQ3GeometryTypeGeneralPolygon ((TQ3ObjectType)FOUR_CHAR_CODE('gpgn'))
+ #define kQ3GeometryTypeLine ((TQ3ObjectType)FOUR_CHAR_CODE('line'))
+ #define kQ3GeometryTypeMarker ((TQ3ObjectType)FOUR_CHAR_CODE('mrkr'))
+ #define kQ3GeometryTypePixmapMarker ((TQ3ObjectType)FOUR_CHAR_CODE('mrkp'))
+ #define kQ3GeometryTypeMesh ((TQ3ObjectType)FOUR_CHAR_CODE('mesh'))
+ #define kQ3GeometryTypeNURBCurve ((TQ3ObjectType)FOUR_CHAR_CODE('nrbc'))
+ #define kQ3GeometryTypeNURBPatch ((TQ3ObjectType)FOUR_CHAR_CODE('nrbp'))
+ #define kQ3GeometryTypePoint ((TQ3ObjectType)FOUR_CHAR_CODE('pnt '))
+ #define kQ3GeometryTypePolygon ((TQ3ObjectType)FOUR_CHAR_CODE('plyg'))
+ #define kQ3GeometryTypePolyLine ((TQ3ObjectType)FOUR_CHAR_CODE('plyl'))
+ #define kQ3GeometryTypeTriangle ((TQ3ObjectType)FOUR_CHAR_CODE('trng'))
+ #define kQ3GeometryTypeTriGrid ((TQ3ObjectType)FOUR_CHAR_CODE('trig'))
+ #define kQ3GeometryTypeCone ((TQ3ObjectType)FOUR_CHAR_CODE('cone'))
+ #define kQ3GeometryTypeCylinder ((TQ3ObjectType)FOUR_CHAR_CODE('cyln'))
+ #define kQ3GeometryTypeDisk ((TQ3ObjectType)FOUR_CHAR_CODE('disk'))
+ #define kQ3GeometryTypeEllipse ((TQ3ObjectType)FOUR_CHAR_CODE('elps'))
+ #define kQ3GeometryTypeEllipsoid ((TQ3ObjectType)FOUR_CHAR_CODE('elpd'))
+ #define kQ3GeometryTypePolyhedron ((TQ3ObjectType)FOUR_CHAR_CODE('plhd'))
+ #define kQ3GeometryTypeTorus ((TQ3ObjectType)FOUR_CHAR_CODE('tors'))
+ #define kQ3GeometryTypeTriMesh ((TQ3ObjectType)FOUR_CHAR_CODE('tmsh'))
+
+
+ #define kQ3ShapeTypeShader ((TQ3ObjectType)FOUR_CHAR_CODE('shdr'))
+ #define kQ3ShaderTypeSurface ((TQ3ObjectType)FOUR_CHAR_CODE('sush'))
+ #define kQ3SurfaceShaderTypeTexture ((TQ3ObjectType)FOUR_CHAR_CODE('txsu'))
+ #define kQ3ShaderTypeIllumination ((TQ3ObjectType)FOUR_CHAR_CODE('ilsh'))
+ #define kQ3IlluminationTypePhong ((TQ3ObjectType)FOUR_CHAR_CODE('phil'))
+ #define kQ3IlluminationTypeLambert ((TQ3ObjectType)FOUR_CHAR_CODE('lmil'))
+ #define kQ3IlluminationTypeNULL ((TQ3ObjectType)FOUR_CHAR_CODE('nuil'))
+ #define kQ3ShapeTypeStyle ((TQ3ObjectType)FOUR_CHAR_CODE('styl'))
+ #define kQ3StyleTypeBackfacing ((TQ3ObjectType)FOUR_CHAR_CODE('bckf'))
+ #define kQ3StyleTypeInterpolation ((TQ3ObjectType)FOUR_CHAR_CODE('intp'))
+ #define kQ3StyleTypeFill ((TQ3ObjectType)FOUR_CHAR_CODE('fist'))
+ #define kQ3StyleTypePickID ((TQ3ObjectType)FOUR_CHAR_CODE('pkid'))
+ #define kQ3StyleTypeReceiveShadows ((TQ3ObjectType)FOUR_CHAR_CODE('rcsh'))
+ #define kQ3StyleTypeHighlight ((TQ3ObjectType)FOUR_CHAR_CODE('high'))
+ #define kQ3StyleTypeSubdivision ((TQ3ObjectType)FOUR_CHAR_CODE('sbdv'))
+ #define kQ3StyleTypeOrientation ((TQ3ObjectType)FOUR_CHAR_CODE('ofdr'))
+ #define kQ3StyleTypePickParts ((TQ3ObjectType)FOUR_CHAR_CODE('pkpt'))
+ #define kQ3StyleTypeAntiAlias ((TQ3ObjectType)FOUR_CHAR_CODE('anti'))
+ #define kQ3StyleTypeFog ((TQ3ObjectType)FOUR_CHAR_CODE('fogg'))
+
+
+ #define kQ3ShapeTypeTransform ((TQ3ObjectType)FOUR_CHAR_CODE('xfrm'))
+ #define kQ3TransformTypeMatrix ((TQ3ObjectType)FOUR_CHAR_CODE('mtrx'))
+ #define kQ3TransformTypeScale ((TQ3ObjectType)FOUR_CHAR_CODE('scal'))
+ #define kQ3TransformTypeTranslate ((TQ3ObjectType)FOUR_CHAR_CODE('trns'))
+ #define kQ3TransformTypeRotate ((TQ3ObjectType)FOUR_CHAR_CODE('rott'))
+ #define kQ3TransformTypeRotateAboutPoint ((TQ3ObjectType)FOUR_CHAR_CODE('rtap'))
+ #define kQ3TransformTypeRotateAboutAxis ((TQ3ObjectType)FOUR_CHAR_CODE('rtaa'))
+ #define kQ3TransformTypeQuaternion ((TQ3ObjectType)FOUR_CHAR_CODE('qtrn'))
+ #define kQ3TransformTypeReset ((TQ3ObjectType)FOUR_CHAR_CODE('rset'))
+ #define kQ3ShapeTypeLight ((TQ3ObjectType)FOUR_CHAR_CODE('lght'))
+ #define kQ3LightTypeAmbient ((TQ3ObjectType)FOUR_CHAR_CODE('ambn'))
+ #define kQ3LightTypeDirectional ((TQ3ObjectType)FOUR_CHAR_CODE('drct'))
+ #define kQ3LightTypePoint ((TQ3ObjectType)FOUR_CHAR_CODE('pntl'))
+ #define kQ3LightTypeSpot ((TQ3ObjectType)FOUR_CHAR_CODE('spot'))
+
+
+ #define kQ3ShapeTypeCamera ((TQ3ObjectType)FOUR_CHAR_CODE('cmra'))
+ #define kQ3CameraTypeOrthographic ((TQ3ObjectType)FOUR_CHAR_CODE('orth'))
+ #define kQ3CameraTypeViewPlane ((TQ3ObjectType)FOUR_CHAR_CODE('vwpl'))
+ #define kQ3CameraTypeViewAngleAspect ((TQ3ObjectType)FOUR_CHAR_CODE('vana'))
+ #define kQ3ShapeTypeStateOperator ((TQ3ObjectType)FOUR_CHAR_CODE('stop'))
+ #define kQ3StateOperatorTypePush ((TQ3ObjectType)FOUR_CHAR_CODE('push'))
+ #define kQ3StateOperatorTypePop ((TQ3ObjectType)FOUR_CHAR_CODE('pop '))
+ #define kQ3ShapeTypeGroup ((TQ3ObjectType)FOUR_CHAR_CODE('grup'))
+ #define kQ3GroupTypeDisplay ((TQ3ObjectType)FOUR_CHAR_CODE('dspg'))
+ #define kQ3DisplayGroupTypeOrdered ((TQ3ObjectType)FOUR_CHAR_CODE('ordg'))
+ #define kQ3DisplayGroupTypeIOProxy ((TQ3ObjectType)FOUR_CHAR_CODE('iopx'))
+ #define kQ3GroupTypeLight ((TQ3ObjectType)FOUR_CHAR_CODE('lghg'))
+ #define kQ3GroupTypeInfo ((TQ3ObjectType)FOUR_CHAR_CODE('info'))
+
+
+ #define kQ3ShapeTypeUnknown ((TQ3ObjectType)FOUR_CHAR_CODE('unkn'))
+ #define kQ3UnknownTypeText ((TQ3ObjectType)FOUR_CHAR_CODE('uktx'))
+ #define kQ3UnknownTypeBinary ((TQ3ObjectType)FOUR_CHAR_CODE('ukbn'))
+ #define kQ3ShapeTypeReference ((TQ3ObjectType)FOUR_CHAR_CODE('rfrn'))
+ #define kQ3ReferenceTypeExternal ((TQ3ObjectType)FOUR_CHAR_CODE('rfex'))
+ #define kQ3SharedTypeSet ((TQ3ObjectType)FOUR_CHAR_CODE('set '))
+ #define kQ3SetTypeAttribute ((TQ3ObjectType)FOUR_CHAR_CODE('attr'))
+ #define kQ3SharedTypeDrawContext ((TQ3ObjectType)FOUR_CHAR_CODE('dctx'))
+ #define kQ3DrawContextTypePixmap ((TQ3ObjectType)FOUR_CHAR_CODE('dpxp'))
+ #define kQ3DrawContextTypeMacintosh ((TQ3ObjectType)FOUR_CHAR_CODE('dmac'))
+ #define kQ3DrawContextTypeWin32DC ((TQ3ObjectType)FOUR_CHAR_CODE('dw32'))
+ #define kQ3DrawContextTypeDDSurface ((TQ3ObjectType)FOUR_CHAR_CODE('ddds'))
+ #define kQ3DrawContextTypeX11 ((TQ3ObjectType)FOUR_CHAR_CODE('dx11'))
+ #define kQ3SharedTypeTexture ((TQ3ObjectType)FOUR_CHAR_CODE('txtr'))
+ #define kQ3TextureTypePixmap ((TQ3ObjectType)FOUR_CHAR_CODE('txpm'))
+ #define kQ3TextureTypeMipmap ((TQ3ObjectType)FOUR_CHAR_CODE('txmm'))
+ #define kQ3TextureTypeCompressedPixmap ((TQ3ObjectType)FOUR_CHAR_CODE('txcp'))
+
+
+ #define kQ3SharedTypeFile ((TQ3ObjectType)FOUR_CHAR_CODE('file'))
+ #define kQ3SharedTypeStorage ((TQ3ObjectType)FOUR_CHAR_CODE('strg'))
+ #define kQ3StorageTypeMemory ((TQ3ObjectType)FOUR_CHAR_CODE('mems'))
+ #define kQ3MemoryStorageTypeHandle ((TQ3ObjectType)FOUR_CHAR_CODE('hndl'))
+ #define kQ3StorageTypeUnix ((TQ3ObjectType)FOUR_CHAR_CODE('uxst'))
+ #define kQ3UnixStorageTypePath ((TQ3ObjectType)FOUR_CHAR_CODE('unix'))
+ #define kQ3StorageTypeMacintosh ((TQ3ObjectType)FOUR_CHAR_CODE('macn'))
+ #define kQ3MacintoshStorageTypeFSSpec ((TQ3ObjectType)FOUR_CHAR_CODE('macp'))
+ #define kQ3StorageTypeWin32 ((TQ3ObjectType)FOUR_CHAR_CODE('wist'))
+ #define kQ3SharedTypeString ((TQ3ObjectType)FOUR_CHAR_CODE('strn'))
+ #define kQ3StringTypeCString ((TQ3ObjectType)FOUR_CHAR_CODE('strc'))
+ #define kQ3SharedTypeShapePart ((TQ3ObjectType)FOUR_CHAR_CODE('sprt'))
+ #define kQ3ShapePartTypeMeshPart ((TQ3ObjectType)FOUR_CHAR_CODE('spmh'))
+ #define kQ3MeshPartTypeMeshFacePart ((TQ3ObjectType)FOUR_CHAR_CODE('mfac'))
+ #define kQ3MeshPartTypeMeshEdgePart ((TQ3ObjectType)FOUR_CHAR_CODE('medg'))
+ #define kQ3MeshPartTypeMeshVertexPart ((TQ3ObjectType)FOUR_CHAR_CODE('mvtx'))
+ #define kQ3SharedTypeControllerState ((TQ3ObjectType)FOUR_CHAR_CODE('ctst'))
+ #define kQ3SharedTypeTracker ((TQ3ObjectType)FOUR_CHAR_CODE('trkr'))
+ #define kQ3SharedTypeViewHints ((TQ3ObjectType)FOUR_CHAR_CODE('vwhn'))
+ #define kQ3SharedTypeEndGroup ((TQ3ObjectType)FOUR_CHAR_CODE('endg'))
+
+/******************************************************************************
+ ** **
+ ** QuickDraw 3D System Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3Status )
+Q3Initialize (void);
+
+EXTERN_API_C( TQ3Status )
+Q3Exit (void);
+
+EXTERN_API_C( TQ3Boolean )
+Q3IsInitialized (void);
+
+EXTERN_API_C( TQ3Status )
+Q3GetVersion (unsigned long * majorRevision,
+ unsigned long * minorRevision);
+
+/*
+ * Q3GetReleaseVersion returns the release version number,
+ * in the format of the first four bytes of a 'vers' resource
+ * (e.g. 0x01518000 ==> 1.5.1 release).
+ */
+EXTERN_API_C( TQ3Status )
+Q3GetReleaseVersion (unsigned long * releaseRevision);
+
+
+/******************************************************************************
+ ** **
+ ** ObjectClass Routines **
+ ** **
+ *****************************************************************************/
+/*
+ * New object system calls to query the object system.
+ *
+ * These comments to move to the stubs file before final release, they
+ * are here for documentation for developers using early seeds.
+ */
+/*
+ * Given a class name as a string return the associated class type for the
+ * class, may return kQ3Failure if the string representing the class is
+ * invalid.
+ */
+EXTERN_API_C( TQ3Status )
+Q3ObjectHierarchy_GetTypeFromString (TQ3ObjectClassNameString objectClassString,
+ TQ3ObjectType * objectClassType);
+
+/*
+ * Given a class type as return the associated string for the class name,
+ * may return kQ3Failure if the type representing the class is invalid.
+ */
+EXTERN_API_C( TQ3Status )
+Q3ObjectHierarchy_GetStringFromType (TQ3ObjectType objectClassType,
+ TQ3ObjectClassNameString objectClassString);
+
+/*
+ * Return true if the class with this type is registered, false if not
+ */
+EXTERN_API_C( TQ3Boolean )
+Q3ObjectHierarchy_IsTypeRegistered (TQ3ObjectType objectClassType);
+
+/*
+ * Return true if the class with this name is registered, false if not
+ */
+EXTERN_API_C( TQ3Boolean )
+Q3ObjectHierarchy_IsNameRegistered (const char * objectClassName);
+
+/*
+ * TQ3SubClassData is used when querying the object system for
+ * the subclasses of a particular parent type:
+ */
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct TQ3SubClassData {
+ unsigned long numClasses; /* the # of subclass types found for a parent class */
+ TQ3ObjectType * classTypes; /* an array containing the class types */
+};
+typedef struct TQ3SubClassData TQ3SubClassData;
+/*
+ * Given a parent type and an instance of the TQ3SubClassData struct fill
+ * it in with the number and class types of all of the subclasses immediately
+ * below the parent in the class hierarchy. Return kQ3Success to indicate no
+ * errors occurred, else kQ3Failure.
+ *
+ * NOTE: This function will allocate memory for the classTypes array. Be
+ * sure to call Q3ObjectClass_EmptySubClassData to free this memory up.
+ */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3Status )
+Q3ObjectHierarchy_GetSubClassData (TQ3ObjectType objectClassType,
+ TQ3SubClassData * subClassData);
+
+/*
+ * Given an instance of the TQ3SubClassData struct free all memory allocated
+ * by the Q3ObjectClass_GetSubClassData call.
+ *
+ * NOTE: This call MUST be made after a call to Q3ObjectClass_GetSubClassData
+ * to avoid memory leaks.
+ */
+EXTERN_API_C( TQ3Status )
+Q3ObjectHierarchy_EmptySubClassData (TQ3SubClassData * subClassData);
+
+
+/******************************************************************************
+ ** **
+ ** Object Routines **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Status )
+Q3Object_Dispose (TQ3Object object);
+
+EXTERN_API_C( TQ3Object )
+Q3Object_Duplicate (TQ3Object object);
+
+EXTERN_API_C( TQ3Status )
+Q3Object_Submit (TQ3Object object,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Boolean )
+Q3Object_IsDrawable (TQ3Object object);
+
+EXTERN_API_C( TQ3Boolean )
+Q3Object_IsWritable (TQ3Object object,
+ TQ3FileObject theFile);
+
+
+/******************************************************************************
+ ** **
+ ** Object Type Routines **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3ObjectType )
+Q3Object_GetType (TQ3Object object);
+
+EXTERN_API_C( TQ3ObjectType )
+Q3Object_GetLeafType (TQ3Object object);
+
+EXTERN_API_C( TQ3Boolean )
+Q3Object_IsType (TQ3Object object,
+ TQ3ObjectType theType);
+
+
+/******************************************************************************
+ ** **
+ ** Shared Object Routines **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3ObjectType )
+Q3Shared_GetType (TQ3SharedObject sharedObject);
+
+EXTERN_API_C( TQ3SharedObject )
+Q3Shared_GetReference (TQ3SharedObject sharedObject);
+
+/*
+ * Q3Shared_IsReferenced
+ * Returns kQ3True if there is more than one reference to sharedObject.
+ * Returns kQ3False if there is ONE reference to sharedObject.
+ *
+ * This call is intended to allow applications and plug-in objects to delete
+ * objects of which they hold THE ONLY REFERENCE. This is useful when
+ * caching objects, etc.
+ *
+ * Although many may be tempted, DO NOT DO THIS:
+ * while (Q3Shared_IsReferenced(foo)) { Q3Object_Dispose(foo); }
+ *
+ * Your application will crash and no one will buy it. Chapter 11 is
+ * never fun (unless you short the stock). Thanks.
+ */
+EXTERN_API_C( TQ3Boolean )
+Q3Shared_IsReferenced (TQ3SharedObject sharedObject);
+
+/*
+ * Q3Shared_GetEditIndex
+ * Returns the "serial number" of sharedObject. Usefuly for caching
+ * object information. Returns 0 on error.
+ *
+ * Hold onto this number to determine if an object has changed since you
+ * last built your caches... To validate, do:
+ *
+ * if (Q3Shared_GetEditIndex(foo) == oldFooEditIndex) {
+ * // Cache is valid
+ * } else {
+ * // Cache is invalid
+ * RebuildSomeSortOfCache(foo);
+ * oldFooEditIndex = Q3Shared_GetEditIndex(foo);
+ * }
+ */
+EXTERN_API_C( unsigned long )
+Q3Shared_GetEditIndex (TQ3SharedObject sharedObject);
+
+/*
+ * Q3Shared_Edited
+ * Bumps the "serial number" of sharedObject to a different value. This
+ * call is intended to be used solely from a plug-in object which is
+ * shared. Call this whenever your private instance data changes.
+ *
+ * Returns kQ3Failure iff sharedObject is not a shared object, OR
+ * QuickDraw 3D isn't initialized.
+ */
+EXTERN_API_C( TQ3Status )
+Q3Shared_Edited (TQ3SharedObject sharedObject);
+
+
+/******************************************************************************
+ ** **
+ ** Shape Routines **
+ ** **
+ *****************************************************************************/
+/*
+ * QuickDraw 3D 1.5 Note:
+ *
+ * Shapes and Sets are now (sort of) polymorphic.
+ *
+ * You may call Q3Shape_Foo or Q3Set_Foo on a shape or a set.
+ * The following calls are identical, in implementation:
+ *
+ * Q3Shape_GetElement = Q3Set_Get
+ * Q3Shape_AddElement = Q3Set_Add
+ * Q3Shape_ContainsElement = Q3Set_Contains
+ * Q3Shape_GetNextElementType = Q3Set_GetNextElementType
+ * Q3Shape_EmptyElements = Q3Set_Empty
+ * Q3Shape_ClearElement = Q3Set_Clear
+ *
+ * All of these calls accept a shape or a set as their first parameter.
+ *
+ * The Q3Shape_GetSet and Q3ShapeSetSet calls are implemented via a new
+ * element type kQ3ElementTypeSet. See the note above about
+ * kQ3ElementTypeSet;
+ *
+ * It is important to note that the new Q3Shape_...Element... calls do not
+ * create a set on a shape and then add the element to it. This data is
+ * attached directly to the shape. Therefore, it is possible for an element
+ * to exist on a shape without a set existing on it as well.
+ *
+ * In your application, if you attach an element to a shape like this:
+ * (this isn't checking for errors for simplicity)
+ *
+ * set = Q3Set_New();
+ * Q3Set_AddElement(set, kMyElemType, &data);
+ * Q3Shape_SetSet(shape, set);
+ *
+ * You should retrieve it in the same manner:
+ *
+ * Q3Shape_GetSet(shape, &set);
+ * if (Q3Set_Contains(set, kMyElemType) == kTrue) {
+ * Q3Set_Get(set, kMyElemType, &data);
+ * }
+ *
+ * Similarly, if you attach data to a shape with the new calls:
+ *
+ * Q3Shape_AddElement(shape, kMyElemType, &data);
+ *
+ * You should retrieve it in the same manner:
+ *
+ * if (Q3Shape_ContainsElement(set, kMyElemType) == kTrue) {
+ * Q3Shape_GetElement(set, kMyElemType, &data);
+ * }
+ *
+ * This really becomes an issue when dealing with version 1.0 and version 1.1
+ * metafiles.
+ *
+ * When attempting to find a particular element on a shape, you should
+ * first check with Q3Shape_GetNextElementType or Q3Shape_GetElement, then,
+ * Q3Shape_GetSet(s, &set) (or Q3Shape_GetElement(s, kQ3ElementTypeSet, &set))
+ * and then Q3Shape_GetElement(set, ...).
+ *
+ * In terms of implementation, Q3Shape_SetSet and Q3Shape_GetSet should only be
+ * used for sets of information that are shared among multiple shapes.
+ *
+ * Q3Shape_AddElement, Q3Shape_GetElement, etc. calls should only be used
+ * for elements that are unique for a particular shape.
+ *
+ */
+EXTERN_API_C( TQ3ObjectType )
+Q3Shape_GetType (TQ3ShapeObject shape);
+
+EXTERN_API_C( TQ3Status )
+Q3Shape_GetSet (TQ3ShapeObject shape,
+ TQ3SetObject * theSet);
+
+EXTERN_API_C( TQ3Status )
+Q3Shape_SetSet (TQ3ShapeObject shape,
+ TQ3SetObject theSet);
+
+EXTERN_API_C( TQ3Status )
+Q3Shape_AddElement (TQ3ShapeObject shape,
+ TQ3ElementType theType,
+ const void * data);
+
+EXTERN_API_C( TQ3Status )
+Q3Shape_GetElement (TQ3ShapeObject shape,
+ TQ3ElementType theType,
+ void * data);
+
+EXTERN_API_C( TQ3Boolean )
+Q3Shape_ContainsElement (TQ3ShapeObject shape,
+ TQ3ElementType theType);
+
+EXTERN_API_C( TQ3Status )
+Q3Shape_GetNextElementType (TQ3ShapeObject shape,
+ TQ3ElementType * theType);
+
+EXTERN_API_C( TQ3Status )
+Q3Shape_EmptyElements (TQ3ShapeObject shape);
+
+EXTERN_API_C( TQ3Status )
+Q3Shape_ClearElement (TQ3ShapeObject shape,
+ TQ3ElementType theType);
+
+
+/******************************************************************************
+ ** **
+ ** Color Table Routines **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Status )
+Q3Bitmap_Empty (TQ3Bitmap * bitmap);
+
+EXTERN_API_C( unsigned long )
+Q3Bitmap_GetImageSize (unsigned long width,
+ unsigned long height);
+
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __QD3D__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__QD3D__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QD3D__ */
+
diff --git a/include/qt/QD3DAcceleration.h b/include/qt/QD3DAcceleration.h
new file mode 100644
index 000000000..d2b36ab21
--- /dev/null
+++ b/include/qt/QD3DAcceleration.h
@@ -0,0 +1,142 @@
+/*
+ File: QD3DAcceleration.h
+
+ Contains: Header file for low-level 3D driver API
+
+ Version: Technology: Quickdraw 3D 1.6
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QD3DACCELERATION__
+#define __QD3DACCELERATION__
+
+#ifndef __QD3D__
+#include "QD3D.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __QD3DACCELERATION__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __QD3DACCELERATION__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+/******************************************************************************
+ ** **
+ ** Vendor ID definitions **
+ ** **
+ *****************************************************************************/
+/*
+ * If kQAVendor_BestChoice is used, the system chooses the "best" drawing engine
+ * available for the target device. This should be used for the default.
+ */
+enum {
+ kQAVendor_BestChoice = -1
+};
+
+/*
+ * The other definitions (kQAVendor_Apple, etc.) identify specific vendors
+ * of drawing engines. When a vendor ID is used in conjunction with a
+ * vendor-defined engine ID, a specific drawing engine can be selected.
+ */
+enum {
+ kQAVendor_Apple = 0,
+ kQAVendor_ATI = 1,
+ kQAVendor_Radius = 2,
+ kQAVendor_DesignMark = 3,
+ kQAVendor_Matrox = 4,
+ kQAVendor_Yarc = 5,
+ kQAVendor_DiamondMM = 6,
+ kQAVendor_3DLabs = 7,
+ kQAVendor_D3DAdaptor = 8,
+ kQAVendor_IXMicro = 9,
+ kQAVendor_NumberNine = 10,
+ kQAVendor_MicroConversions = 11,
+ kQAVendor_PurpleShark = 12,
+ kQAVendor_VillageTronic = 14
+};
+
+/******************************************************************************
+ ** **
+ ** Apple's engine ID definitions **
+ ** **
+ *****************************************************************************/
+enum {
+ kQAEngine_AppleSW = 0, /* Default software rasterizer*/
+ kQAEngine_AppleHW = -1, /* Apple accelerator*/
+ kQAEngine_AppleHW2 = 1, /* Another Apple accelerator*/
+ kQAEngine_AppleHW3 = 2 /* Another Apple accelerator*/
+};
+
+
+
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __QD3DACCELERATION__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__QD3DACCELERATION__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QD3DACCELERATION__ */
+
diff --git a/include/qt/QD3DCamera.h b/include/qt/QD3DCamera.h
new file mode 100644
index 000000000..7de484e14
--- /dev/null
+++ b/include/qt/QD3DCamera.h
@@ -0,0 +1,396 @@
+/*
+ File: QD3DCamera.h
+
+ Contains: Generic camera routines
+
+ Version: Technology: Quickdraw 3D 1.6
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QD3DCAMERA__
+#define __QD3DCAMERA__
+
+#ifndef __QD3D__
+#include "QD3D.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __QD3DCAMERA__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __QD3DCAMERA__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+/******************************************************************************
+ ** **
+ ** Data Structure Definitions **
+ ** **
+ *****************************************************************************/
+/*
+ * The placement of the camera.
+ */
+
+struct TQ3CameraPlacement {
+ TQ3Point3D cameraLocation; /* Location point of the camera */
+ TQ3Point3D pointOfInterest; /* Point of interest */
+ TQ3Vector3D upVector; /* "up" vector */
+};
+typedef struct TQ3CameraPlacement TQ3CameraPlacement;
+/*
+ * The range of the camera.
+ */
+
+struct TQ3CameraRange {
+ float hither; /* Hither plane, measured from "from" towards "to" */
+ float yon; /* Yon plane, measured from "from" towards "to" */
+};
+typedef struct TQ3CameraRange TQ3CameraRange;
+/*
+ * Viewport specification. Origin is (-1, 1), and corresponds to the
+ * upper left-hand corner; width and height maximum is (2.0, 2.0),
+ * corresponding to the lower left-hand corner of the window. The
+ * TQ3Viewport specifies a part of the viewPlane that gets displayed
+ * on the window that is to be drawn.
+ * Normally, it is set with an origin of (-1.0, 1.0), and a width and
+ * height of both 2.0, specifying that the entire window is to be
+ * drawn. If, for example, an exposure event of the window exposed
+ * the right half of the window, you would set the origin to (0, 1),
+ * and the width and height to (1.0) and (2.0), respectively.
+ *
+ */
+
+struct TQ3CameraViewPort {
+ TQ3Point2D origin;
+ float width;
+ float height;
+};
+typedef struct TQ3CameraViewPort TQ3CameraViewPort;
+
+struct TQ3CameraData {
+ TQ3CameraPlacement placement;
+ TQ3CameraRange range;
+ TQ3CameraViewPort viewPort;
+};
+typedef struct TQ3CameraData TQ3CameraData;
+/*
+ * An orthographic camera.
+ *
+ * The lens characteristics are set with the dimensions of a
+ * rectangular viewPort in the frame of the camera.
+ */
+
+struct TQ3OrthographicCameraData {
+ TQ3CameraData cameraData;
+ float left;
+ float top;
+ float right;
+ float bottom;
+};
+typedef struct TQ3OrthographicCameraData TQ3OrthographicCameraData;
+/*
+ * A perspective camera specified in terms of an arbitrary view plane.
+ *
+ * This is most useful when setting the camera to look at a particular
+ * object. The viewPlane is set to distance from the camera to the object.
+ * The halfWidth is set to half the width of the cross section of the object,
+ * and the halfHeight equal to the halfWidth divided by the aspect ratio
+ * of the viewPort.
+ *
+ * This is the only perspective camera with specifications for off-axis
+ * viewing, which is desirable for scrolling.
+ */
+
+struct TQ3ViewPlaneCameraData {
+ TQ3CameraData cameraData;
+ float viewPlane;
+ float halfWidthAtViewPlane;
+ float halfHeightAtViewPlane;
+ float centerXOnViewPlane;
+ float centerYOnViewPlane;
+};
+typedef struct TQ3ViewPlaneCameraData TQ3ViewPlaneCameraData;
+/*
+ * A view angle aspect camera is a perspective camera specified in
+ * terms of the minimum view angle and the aspect ratio of X to Y.
+ *
+ */
+
+struct TQ3ViewAngleAspectCameraData {
+ TQ3CameraData cameraData;
+ float fov;
+ float aspectRatioXToY;
+};
+typedef struct TQ3ViewAngleAspectCameraData TQ3ViewAngleAspectCameraData;
+/******************************************************************************
+ ** **
+ ** Generic Camera routines **
+ ** **
+ *****************************************************************************/
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3ObjectType )
+Q3Camera_GetType (TQ3CameraObject camera);
+
+EXTERN_API_C( TQ3Status )
+Q3Camera_SetData (TQ3CameraObject camera,
+ const TQ3CameraData * cameraData);
+
+EXTERN_API_C( TQ3Status )
+Q3Camera_GetData (TQ3CameraObject camera,
+ TQ3CameraData * cameraData);
+
+EXTERN_API_C( TQ3Status )
+Q3Camera_SetPlacement (TQ3CameraObject camera,
+ const TQ3CameraPlacement * placement);
+
+EXTERN_API_C( TQ3Status )
+Q3Camera_GetPlacement (TQ3CameraObject camera,
+ TQ3CameraPlacement * placement);
+
+EXTERN_API_C( TQ3Status )
+Q3Camera_SetRange (TQ3CameraObject camera,
+ const TQ3CameraRange * range);
+
+EXTERN_API_C( TQ3Status )
+Q3Camera_GetRange (TQ3CameraObject camera,
+ TQ3CameraRange * range);
+
+EXTERN_API_C( TQ3Status )
+Q3Camera_SetViewPort (TQ3CameraObject camera,
+ const TQ3CameraViewPort * viewPort);
+
+EXTERN_API_C( TQ3Status )
+Q3Camera_GetViewPort (TQ3CameraObject camera,
+ TQ3CameraViewPort * viewPort);
+
+EXTERN_API_C( TQ3Status )
+Q3Camera_GetWorldToView (TQ3CameraObject camera,
+ TQ3Matrix4x4 * worldToView);
+
+EXTERN_API_C( TQ3Status )
+Q3Camera_GetWorldToFrustum (TQ3CameraObject camera,
+ TQ3Matrix4x4 * worldToFrustum);
+
+EXTERN_API_C( TQ3Status )
+Q3Camera_GetViewToFrustum (TQ3CameraObject camera,
+ TQ3Matrix4x4 * viewToFrustum);
+
+
+/******************************************************************************
+ ** **
+ ** Specific Camera Routines **
+ ** **
+ *****************************************************************************/
+/******************************************************************************
+ ** **
+ ** Orthographic Camera **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3CameraObject )
+Q3OrthographicCamera_New (const TQ3OrthographicCameraData * orthographicData);
+
+EXTERN_API_C( TQ3Status )
+Q3OrthographicCamera_GetData (TQ3CameraObject camera,
+ TQ3OrthographicCameraData * cameraData);
+
+EXTERN_API_C( TQ3Status )
+Q3OrthographicCamera_SetData (TQ3CameraObject camera,
+ const TQ3OrthographicCameraData * cameraData);
+
+EXTERN_API_C( TQ3Status )
+Q3OrthographicCamera_SetLeft (TQ3CameraObject camera,
+ float left);
+
+EXTERN_API_C( TQ3Status )
+Q3OrthographicCamera_GetLeft (TQ3CameraObject camera,
+ float * left);
+
+EXTERN_API_C( TQ3Status )
+Q3OrthographicCamera_SetTop (TQ3CameraObject camera,
+ float top);
+
+EXTERN_API_C( TQ3Status )
+Q3OrthographicCamera_GetTop (TQ3CameraObject camera,
+ float * top);
+
+EXTERN_API_C( TQ3Status )
+Q3OrthographicCamera_SetRight (TQ3CameraObject camera,
+ float right);
+
+EXTERN_API_C( TQ3Status )
+Q3OrthographicCamera_GetRight (TQ3CameraObject camera,
+ float * right);
+
+EXTERN_API_C( TQ3Status )
+Q3OrthographicCamera_SetBottom (TQ3CameraObject camera,
+ float bottom);
+
+EXTERN_API_C( TQ3Status )
+Q3OrthographicCamera_GetBottom (TQ3CameraObject camera,
+ float * bottom);
+
+
+/******************************************************************************
+ ** **
+ ** ViewPlane Camera **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3CameraObject )
+Q3ViewPlaneCamera_New (const TQ3ViewPlaneCameraData * cameraData);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewPlaneCamera_GetData (TQ3CameraObject camera,
+ TQ3ViewPlaneCameraData * cameraData);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewPlaneCamera_SetData (TQ3CameraObject camera,
+ const TQ3ViewPlaneCameraData * cameraData);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewPlaneCamera_SetViewPlane (TQ3CameraObject camera,
+ float viewPlane);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewPlaneCamera_GetViewPlane (TQ3CameraObject camera,
+ float * viewPlane);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewPlaneCamera_SetHalfWidth (TQ3CameraObject camera,
+ float halfWidthAtViewPlane);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewPlaneCamera_GetHalfWidth (TQ3CameraObject camera,
+ float * halfWidthAtViewPlane);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewPlaneCamera_SetHalfHeight (TQ3CameraObject camera,
+ float halfHeightAtViewPlane);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewPlaneCamera_GetHalfHeight (TQ3CameraObject camera,
+ float * halfHeightAtViewPlane);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewPlaneCamera_SetCenterX (TQ3CameraObject camera,
+ float centerXOnViewPlane);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewPlaneCamera_GetCenterX (TQ3CameraObject camera,
+ float * centerXOnViewPlane);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewPlaneCamera_SetCenterY (TQ3CameraObject camera,
+ float centerYOnViewPlane);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewPlaneCamera_GetCenterY (TQ3CameraObject camera,
+ float * centerYOnViewPlane);
+
+
+/******************************************************************************
+ ** **
+ ** View Angle Aspect Camera **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3CameraObject )
+Q3ViewAngleAspectCamera_New (const TQ3ViewAngleAspectCameraData * cameraData);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewAngleAspectCamera_SetData (TQ3CameraObject camera,
+ const TQ3ViewAngleAspectCameraData * cameraData);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewAngleAspectCamera_GetData (TQ3CameraObject camera,
+ TQ3ViewAngleAspectCameraData * cameraData);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewAngleAspectCamera_SetFOV (TQ3CameraObject camera,
+ float fov);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewAngleAspectCamera_GetFOV (TQ3CameraObject camera,
+ float * fov);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewAngleAspectCamera_SetAspectRatio (TQ3CameraObject camera,
+ float aspectRatioXToY);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewAngleAspectCamera_GetAspectRatio (TQ3CameraObject camera,
+ float * aspectRatioXToY);
+
+
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __QD3DCAMERA__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__QD3DCAMERA__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QD3DCAMERA__ */
+
diff --git a/include/qt/QD3DController.h b/include/qt/QD3DController.h
new file mode 100644
index 000000000..3246617ae
--- /dev/null
+++ b/include/qt/QD3DController.h
@@ -0,0 +1,367 @@
+/*
+ File: QD3DController.h
+
+ Contains: Q3Controller methods
+
+ Version: Technology: Quickdraw 3D 1.6
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QD3DCONTROLLER__
+#define __QD3DCONTROLLER__
+
+#ifndef __QD3D__
+#include "QD3D.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __QD3DCONTROLLER__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __QD3DCONTROLLER__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+/******************************************************************************
+ ** **
+ ** Type Definitions **
+ ** **
+ *****************************************************************************/
+#define kQ3ControllerSetChannelMaxDataSize 256
+typedef CALLBACK_API_C( TQ3Status , TQ3ChannelGetMethod )(TQ3ControllerRef controllerRef, unsigned long channel, void *data, unsigned long *dataSize);
+typedef CALLBACK_API_C( TQ3Status , TQ3ChannelSetMethod )(TQ3ControllerRef controllerRef, unsigned long channel, const void *data, unsigned long dataSize);
+
+struct TQ3ControllerData {
+ char * signature;
+ unsigned long valueCount;
+ unsigned long channelCount;
+ TQ3ChannelGetMethod channelGetMethod;
+ TQ3ChannelSetMethod channelSetMethod;
+};
+typedef struct TQ3ControllerData TQ3ControllerData;
+/******************************************************************************
+ ** **
+ ** Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3Status )
+Q3Controller_GetListChanged (TQ3Boolean * listChanged,
+ unsigned long * serialNumber);
+
+EXTERN_API_C( TQ3Status )
+Q3Controller_Next (TQ3ControllerRef controllerRef,
+ TQ3ControllerRef * nextControllerRef);
+
+EXTERN_API_C( TQ3ControllerRef )
+Q3Controller_New (const TQ3ControllerData * controllerData);
+
+EXTERN_API_C( TQ3Status )
+Q3Controller_Decommission (TQ3ControllerRef controllerRef);
+
+EXTERN_API_C( TQ3Status )
+Q3Controller_SetActivation (TQ3ControllerRef controllerRef,
+ TQ3Boolean active);
+
+EXTERN_API_C( TQ3Status )
+Q3Controller_GetActivation (TQ3ControllerRef controllerRef,
+ TQ3Boolean * active);
+
+EXTERN_API_C( TQ3Status )
+Q3Controller_GetSignature (TQ3ControllerRef controllerRef,
+ char * signature,
+ unsigned long numChars);
+
+EXTERN_API_C( TQ3Status )
+Q3Controller_SetChannel (TQ3ControllerRef controllerRef,
+ unsigned long channel,
+ const void * data,
+ unsigned long dataSize);
+
+EXTERN_API_C( TQ3Status )
+Q3Controller_GetChannel (TQ3ControllerRef controllerRef,
+ unsigned long channel,
+ void * data,
+ unsigned long * dataSize);
+
+EXTERN_API_C( TQ3Status )
+Q3Controller_GetValueCount (TQ3ControllerRef controllerRef,
+ unsigned long * valueCount);
+
+EXTERN_API_C( TQ3Status )
+Q3Controller_SetTracker (TQ3ControllerRef controllerRef,
+ TQ3TrackerObject tracker);
+
+EXTERN_API_C( TQ3Status )
+Q3Controller_HasTracker (TQ3ControllerRef controllerRef,
+ TQ3Boolean * hasTracker);
+
+EXTERN_API_C( TQ3Status )
+Q3Controller_Track2DCursor (TQ3ControllerRef controllerRef,
+ TQ3Boolean * track2DCursor);
+
+EXTERN_API_C( TQ3Status )
+Q3Controller_Track3DCursor (TQ3ControllerRef controllerRef,
+ TQ3Boolean * track3DCursor);
+
+EXTERN_API_C( TQ3Status )
+Q3Controller_GetButtons (TQ3ControllerRef controllerRef,
+ unsigned long * buttons);
+
+EXTERN_API_C( TQ3Status )
+Q3Controller_SetButtons (TQ3ControllerRef controllerRef,
+ unsigned long buttons);
+
+EXTERN_API_C( TQ3Status )
+Q3Controller_GetTrackerPosition (TQ3ControllerRef controllerRef,
+ TQ3Point3D * position);
+
+EXTERN_API_C( TQ3Status )
+Q3Controller_SetTrackerPosition (TQ3ControllerRef controllerRef,
+ const TQ3Point3D * position);
+
+EXTERN_API_C( TQ3Status )
+Q3Controller_MoveTrackerPosition (TQ3ControllerRef controllerRef,
+ const TQ3Vector3D * delta);
+
+EXTERN_API_C( TQ3Status )
+Q3Controller_GetTrackerOrientation (TQ3ControllerRef controllerRef,
+ TQ3Quaternion * orientation);
+
+EXTERN_API_C( TQ3Status )
+Q3Controller_SetTrackerOrientation (TQ3ControllerRef controllerRef,
+ const TQ3Quaternion * orientation);
+
+EXTERN_API_C( TQ3Status )
+Q3Controller_MoveTrackerOrientation (TQ3ControllerRef controllerRef,
+ const TQ3Quaternion * delta);
+
+EXTERN_API_C( TQ3Status )
+Q3Controller_GetValues (TQ3ControllerRef controllerRef,
+ unsigned long valueCount,
+ float * values,
+ TQ3Boolean * changed,
+ unsigned long * serialNumber);
+
+EXTERN_API_C( TQ3Status )
+Q3Controller_SetValues (TQ3ControllerRef controllerRef,
+ const float * values,
+ unsigned long valueCount);
+
+
+/******************************************************************************
+ ** **
+ ** Routines **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3ControllerStateObject )
+Q3ControllerState_New (TQ3ControllerRef controllerRef);
+
+EXTERN_API_C( TQ3Status )
+Q3ControllerState_SaveAndReset (TQ3ControllerStateObject controllerStateObject);
+
+EXTERN_API_C( TQ3Status )
+Q3ControllerState_Restore (TQ3ControllerStateObject controllerStateObject);
+
+
+/******************************************************************************
+ ** **
+ ** Type Definitions **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API_C( TQ3Status , TQ3TrackerNotifyFunc )(TQ3TrackerObject trackerObject, TQ3ControllerRef controllerRef);
+/******************************************************************************
+ ** **
+ ** Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3TrackerObject )
+Q3Tracker_New (TQ3TrackerNotifyFunc notifyFunc);
+
+EXTERN_API_C( TQ3Status )
+Q3Tracker_SetNotifyThresholds (TQ3TrackerObject trackerObject,
+ float positionThresh,
+ float orientationThresh);
+
+EXTERN_API_C( TQ3Status )
+Q3Tracker_GetNotifyThresholds (TQ3TrackerObject trackerObject,
+ float * positionThresh,
+ float * orientationThresh);
+
+EXTERN_API_C( TQ3Status )
+Q3Tracker_SetActivation (TQ3TrackerObject trackerObject,
+ TQ3Boolean active);
+
+EXTERN_API_C( TQ3Status )
+Q3Tracker_GetActivation (TQ3TrackerObject trackerObject,
+ TQ3Boolean * active);
+
+EXTERN_API_C( TQ3Status )
+Q3Tracker_GetButtons (TQ3TrackerObject trackerObject,
+ unsigned long * buttons);
+
+EXTERN_API_C( TQ3Status )
+Q3Tracker_ChangeButtons (TQ3TrackerObject trackerObject,
+ TQ3ControllerRef controllerRef,
+ unsigned long buttons,
+ unsigned long buttonMask);
+
+EXTERN_API_C( TQ3Status )
+Q3Tracker_GetPosition (TQ3TrackerObject trackerObject,
+ TQ3Point3D * position,
+ TQ3Vector3D * delta,
+ TQ3Boolean * changed,
+ unsigned long * serialNumber);
+
+EXTERN_API_C( TQ3Status )
+Q3Tracker_SetPosition (TQ3TrackerObject trackerObject,
+ TQ3ControllerRef controllerRef,
+ const TQ3Point3D * position);
+
+EXTERN_API_C( TQ3Status )
+Q3Tracker_MovePosition (TQ3TrackerObject trackerObject,
+ TQ3ControllerRef controllerRef,
+ const TQ3Vector3D * delta);
+
+EXTERN_API_C( TQ3Status )
+Q3Tracker_GetOrientation (TQ3TrackerObject trackerObject,
+ TQ3Quaternion * orientation,
+ TQ3Quaternion * delta,
+ TQ3Boolean * changed,
+ unsigned long * serialNumber);
+
+EXTERN_API_C( TQ3Status )
+Q3Tracker_SetOrientation (TQ3TrackerObject trackerObject,
+ TQ3ControllerRef controllerRef,
+ const TQ3Quaternion * orientation);
+
+EXTERN_API_C( TQ3Status )
+Q3Tracker_MoveOrientation (TQ3TrackerObject trackerObject,
+ TQ3ControllerRef controllerRef,
+ const TQ3Quaternion * delta);
+
+EXTERN_API_C( TQ3Status )
+Q3Tracker_SetEventCoordinates (TQ3TrackerObject trackerObject,
+ unsigned long timeStamp,
+ unsigned long buttons,
+ const TQ3Point3D * position,
+ const TQ3Quaternion * orientation);
+
+EXTERN_API_C( TQ3Status )
+Q3Tracker_GetEventCoordinates (TQ3TrackerObject trackerObject,
+ unsigned long timeStamp,
+ unsigned long * buttons,
+ TQ3Point3D * position,
+ TQ3Quaternion * orientation);
+
+/******************************************************************************
+ ** **
+ ** Types **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API_C( void , TQ3CursorTrackerNotifyFunc )(void );
+/******************************************************************************
+ ** **
+ ** Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3Status )
+Q3CursorTracker_PrepareTracking (void);
+
+EXTERN_API_C( TQ3Status )
+Q3CursorTracker_SetTrackDeltas (TQ3Boolean trackDeltas);
+
+EXTERN_API_C( TQ3Status )
+Q3CursorTracker_GetAndClearDeltas (float * depth,
+ TQ3Quaternion * orientation,
+ TQ3Boolean * hasOrientation,
+ TQ3Boolean * changed,
+ unsigned long * serialNumber);
+
+EXTERN_API_C( TQ3Status )
+Q3CursorTracker_SetNotifyFunc (TQ3CursorTrackerNotifyFunc notifyFunc);
+
+EXTERN_API_C( TQ3Status )
+Q3CursorTracker_GetNotifyFunc (TQ3CursorTrackerNotifyFunc * notifyFunc);
+
+
+
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __QD3DCONTROLLER__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__QD3DCONTROLLER__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QD3DCONTROLLER__ */
+
diff --git a/include/qt/QD3DCustomElements.h b/include/qt/QD3DCustomElements.h
new file mode 100644
index 000000000..4a2fa7593
--- /dev/null
+++ b/include/qt/QD3DCustomElements.h
@@ -0,0 +1,190 @@
+/*
+ File: QD3DCustomElements.h
+
+ Contains: Custom QuickTime Elements in QuickDraw 3D
+
+ Version: Technology: Quickdraw 3D 1.6
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QD3DCUSTOMELEMENTS__
+#define __QD3DCUSTOMELEMENTS__
+
+#ifndef __QD3D__
+#include "QD3D.h"
+#endif
+
+#ifndef __MOVIES__
+#include "Movies.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __QD3DCUSTOMELEMENTS__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __QD3DCUSTOMELEMENTS__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+
+/******************************************************************************
+ ** **
+ ** Name Data Structure Definitions **
+ ** **
+ *****************************************************************************/
+#define CEcNameElementName "Apple Computer, Inc.:NameElement"
+
+
+/******************************************************************************
+ ** **
+ ** Custom Name Element Functions **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3Status )
+CENameElement_SetData (TQ3Object object,
+ const char * name);
+
+EXTERN_API_C( TQ3Status )
+CENameElement_GetData (TQ3Object object,
+ char ** name);
+
+EXTERN_API_C( TQ3Status )
+CENameElement_EmptyData (char ** name);
+
+
+/******************************************************************************
+ ** **
+ ** URL Data Structure Definitions **
+ ** **
+ *****************************************************************************/
+#define CEcUrlElementName "Apple Computer, Inc.:URLElement"
+#endif /* CALL_NOT_IN_CARBON */
+
+
+enum TCEUrlOptions {
+ kCEUrlOptionNone = 0,
+ kCEUrlOptionUseMap = 1
+};
+typedef enum TCEUrlOptions TCEUrlOptions;
+
+
+struct TCEUrlData {
+ char * url;
+ char * description;
+ TCEUrlOptions options;
+};
+typedef struct TCEUrlData TCEUrlData;
+/******************************************************************************
+ ** **
+ ** Custom URL Element Functions **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3Status )
+CEUrlElement_SetData (TQ3Object object,
+ TCEUrlData * urlData);
+
+EXTERN_API_C( TQ3Status )
+CEUrlElement_GetData (TQ3Object object,
+ TCEUrlData ** urlData);
+
+EXTERN_API_C( TQ3Status )
+CEUrlElement_EmptyData (TCEUrlData ** urlData);
+
+/******************************************************************************
+ ** **
+ ** Wire Data Definitions **
+ ** **
+ *****************************************************************************/
+#define CEcWireElementName "Apple Computer, Inc.:WireElement"
+
+/******************************************************************************
+ ** **
+ ** Wire Custom Element Functions **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Status )
+CEWireElement_SetData (TQ3Object object,
+ QTAtomContainer wireData);
+
+EXTERN_API_C( TQ3Status )
+CEWireElement_GetData (TQ3Object object,
+ QTAtomContainer * wireData);
+
+EXTERN_API_C( TQ3Status )
+CEWireElement_EmptyData (QTAtomContainer * wireData);
+
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __QD3DCUSTOMELEMENTS__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__QD3DCUSTOMELEMENTS__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QD3DCUSTOMELEMENTS__ */
+
diff --git a/include/qt/QD3DDrawContext.h b/include/qt/QD3DDrawContext.h
new file mode 100644
index 000000000..b80e58f2f
--- /dev/null
+++ b/include/qt/QD3DDrawContext.h
@@ -0,0 +1,545 @@
+/*
+ File: QD3DDrawContext.h
+
+ Contains: Draw context class types and routines
+
+ Version: Technology: Quickdraw 3D 1.6
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QD3DDRAWCONTEXT__
+#define __QD3DDRAWCONTEXT__
+
+#ifndef __QD3D__
+#include "QD3D.h"
+#endif
+
+
+#if TARGET_OS_MAC
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#ifndef __FIXMATH__
+#include "FixMath.h"
+#endif
+
+#ifndef __GXTYPES__
+#include "GXTypes.h"
+#endif
+
+#endif /* TARGET_OS_MAC */
+
+
+#if TARGET_OS_UNIX
+ #include "X11/Xlib.h"
+ #include "X11/Xutil.h"
+#endif /* TARGET_OS_WIN32 */
+
+
+#if TARGET_OS_WIN32
+ /******************************************************************************
+ * **
+ * ABOUT QD3D_NO_DIRECTDRAW: (Win32 Only) **
+ * **
+ * NOTE: Define QD3D_NO_DIRECTDRAW for your application makefile/project **
+ * only if you don't need Q3DDSurfaceDrawContext support and don't **
+ * have access to ddraw.h. **
+ * **
+ *****************************************************************************/
+ #include "windows.h"
+ #if !defined(QD3D_NO_DIRECTDRAW)
+ #include "ddraw.h"
+ #endif /* !QD3D_NO_DIRECTDRAW */
+#endif /* TARGET_OS_WIN32 */
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __QD3DDRAWCONTEXT__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __QD3DDRAWCONTEXT__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+/******************************************************************************
+ ** **
+ ** DrawContext Data Structures **
+ ** **
+ *****************************************************************************/
+
+enum TQ3DrawContextClearImageMethod {
+ kQ3ClearMethodNone = 0,
+ kQ3ClearMethodWithColor = 1
+};
+typedef enum TQ3DrawContextClearImageMethod TQ3DrawContextClearImageMethod;
+
+
+
+struct TQ3DrawContextData {
+ TQ3DrawContextClearImageMethod clearImageMethod;
+ TQ3ColorARGB clearImageColor;
+ TQ3Area pane;
+ TQ3Boolean paneState;
+ TQ3Bitmap mask;
+ TQ3Boolean maskState;
+ TQ3Boolean doubleBufferState;
+};
+typedef struct TQ3DrawContextData TQ3DrawContextData;
+/******************************************************************************
+ ** **
+ ** DrawContext Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3ObjectType )
+Q3DrawContext_GetType (TQ3DrawContextObject drawContext);
+
+EXTERN_API_C( TQ3Status )
+Q3DrawContext_SetData (TQ3DrawContextObject context,
+ const TQ3DrawContextData * contextData);
+
+EXTERN_API_C( TQ3Status )
+Q3DrawContext_GetData (TQ3DrawContextObject context,
+ TQ3DrawContextData * contextData);
+
+EXTERN_API_C( TQ3Status )
+Q3DrawContext_SetClearImageColor (TQ3DrawContextObject context,
+ const TQ3ColorARGB * color);
+
+EXTERN_API_C( TQ3Status )
+Q3DrawContext_GetClearImageColor (TQ3DrawContextObject context,
+ TQ3ColorARGB * color);
+
+EXTERN_API_C( TQ3Status )
+Q3DrawContext_SetPane (TQ3DrawContextObject context,
+ const TQ3Area * pane);
+
+EXTERN_API_C( TQ3Status )
+Q3DrawContext_GetPane (TQ3DrawContextObject context,
+ TQ3Area * pane);
+
+EXTERN_API_C( TQ3Status )
+Q3DrawContext_SetPaneState (TQ3DrawContextObject context,
+ TQ3Boolean state);
+
+EXTERN_API_C( TQ3Status )
+Q3DrawContext_GetPaneState (TQ3DrawContextObject context,
+ TQ3Boolean * state);
+
+EXTERN_API_C( TQ3Status )
+Q3DrawContext_SetClearImageMethod (TQ3DrawContextObject context,
+ TQ3DrawContextClearImageMethod method);
+
+EXTERN_API_C( TQ3Status )
+Q3DrawContext_GetClearImageMethod (TQ3DrawContextObject context,
+ TQ3DrawContextClearImageMethod * method);
+
+EXTERN_API_C( TQ3Status )
+Q3DrawContext_SetMask (TQ3DrawContextObject context,
+ const TQ3Bitmap * mask);
+
+EXTERN_API_C( TQ3Status )
+Q3DrawContext_GetMask (TQ3DrawContextObject context,
+ TQ3Bitmap * mask);
+
+EXTERN_API_C( TQ3Status )
+Q3DrawContext_SetMaskState (TQ3DrawContextObject context,
+ TQ3Boolean state);
+
+EXTERN_API_C( TQ3Status )
+Q3DrawContext_GetMaskState (TQ3DrawContextObject context,
+ TQ3Boolean * state);
+
+EXTERN_API_C( TQ3Status )
+Q3DrawContext_SetDoubleBufferState (TQ3DrawContextObject context,
+ TQ3Boolean state);
+
+EXTERN_API_C( TQ3Status )
+Q3DrawContext_GetDoubleBufferState (TQ3DrawContextObject context,
+ TQ3Boolean * state);
+
+
+/******************************************************************************
+ ** **
+ ** Pixmap Data Structure **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct TQ3PixmapDrawContextData {
+ TQ3DrawContextData drawContextData;
+ TQ3Pixmap pixmap;
+};
+typedef struct TQ3PixmapDrawContextData TQ3PixmapDrawContextData;
+/******************************************************************************
+ ** **
+ ** Pixmap DrawContext Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3DrawContextObject )
+Q3PixmapDrawContext_New (const TQ3PixmapDrawContextData * contextData);
+
+EXTERN_API_C( TQ3Status )
+Q3PixmapDrawContext_SetPixmap (TQ3DrawContextObject drawContext,
+ const TQ3Pixmap * pixmap);
+
+EXTERN_API_C( TQ3Status )
+Q3PixmapDrawContext_GetPixmap (TQ3DrawContextObject drawContext,
+ TQ3Pixmap * pixmap);
+
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if TARGET_OS_MAC
+/******************************************************************************
+ ** **
+ ** Macintosh DrawContext Data Structures **
+ ** **
+ *****************************************************************************/
+
+enum TQ3MacDrawContext2DLibrary {
+ kQ3Mac2DLibraryNone = 0,
+ kQ3Mac2DLibraryQuickDraw = 1,
+ kQ3Mac2DLibraryQuickDrawGX = 2
+};
+typedef enum TQ3MacDrawContext2DLibrary TQ3MacDrawContext2DLibrary;
+
+
+
+struct TQ3MacDrawContextData {
+ TQ3DrawContextData drawContextData;
+ CWindowPtr window;
+ TQ3MacDrawContext2DLibrary library;
+ gxViewPort viewPort;
+ CGrafPtr grafPort;
+};
+typedef struct TQ3MacDrawContextData TQ3MacDrawContextData;
+/******************************************************************************
+ ** **
+ ** Macintosh DrawContext Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3DrawContextObject )
+Q3MacDrawContext_New (const TQ3MacDrawContextData * drawContextData);
+
+EXTERN_API_C( TQ3Status )
+Q3MacDrawContext_SetWindow (TQ3DrawContextObject drawContext,
+ CWindowPtr window);
+
+EXTERN_API_C( TQ3Status )
+Q3MacDrawContext_GetWindow (TQ3DrawContextObject drawContext,
+ CWindowPtr * window);
+
+EXTERN_API_C( TQ3Status )
+Q3MacDrawContext_SetGXViewPort (TQ3DrawContextObject drawContext,
+ gxViewPort viewPort);
+
+EXTERN_API_C( TQ3Status )
+Q3MacDrawContext_GetGXViewPort (TQ3DrawContextObject drawContext,
+ gxViewPort * viewPort);
+
+EXTERN_API_C( TQ3Status )
+Q3MacDrawContext_SetGrafPort (TQ3DrawContextObject drawContext,
+ CGrafPtr grafPort);
+
+EXTERN_API_C( TQ3Status )
+Q3MacDrawContext_GetGrafPort (TQ3DrawContextObject drawContext,
+ CGrafPtr * grafPort);
+
+EXTERN_API_C( TQ3Status )
+Q3MacDrawContext_Set2DLibrary (TQ3DrawContextObject drawContext,
+ TQ3MacDrawContext2DLibrary library);
+
+EXTERN_API_C( TQ3Status )
+Q3MacDrawContext_Get2DLibrary (TQ3DrawContextObject drawContext,
+ TQ3MacDrawContext2DLibrary * library);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_OS_MAC */
+
+#if TARGET_OS_UNIX
+/******************************************************************************
+ ** **
+ ** X/Windows DrawContext Data Structures **
+ ** **
+ *****************************************************************************/
+typedef struct OpaqueTQ3XBufferObject* TQ3XBufferObject;
+
+struct TQ3XColormapData {
+ long baseEntry;
+ long maxRed;
+ long maxGreen;
+ long maxBlue;
+ long multRed;
+ long multGreen;
+ long multBlue;
+};
+typedef struct TQ3XColormapData TQ3XColormapData;
+
+struct TQ3XDrawContextData {
+ TQ3DrawContextData contextData;
+ Display * display;
+ Drawable drawable;
+ Visual * visual;
+ Colormap cmap;
+ TQ3XColormapData * colorMapData;
+};
+typedef struct TQ3XDrawContextData TQ3XDrawContextData;
+/******************************************************************************
+ ** **
+ ** X/Windows DrawContext Routines **
+ ** **
+ *****************************************************************************/
+#ifdef XDC_OLD
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3DrawContextObject )
+Q3XDrawContext_New (void);
+
+EXTERN_API_C( void )
+Q3XDrawContext_Set (TQ3DrawContextObject drawContext,
+ unsigned long flag,
+ void * data);
+
+EXTERN_API_C( void )
+Q3XDrawContext_Get (TQ3DrawContextObject drawContext,
+ unsigned long flag,
+ void * data);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* defined(XDC_OLD) */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3XBufferObject )
+Q3XBuffers_New (Display * dpy,
+ unsigned long numBuffers,
+ Window window);
+
+EXTERN_API_C( void )
+Q3XBuffers_Swap (Display * dpy,
+ TQ3XBufferObject buffers);
+
+EXTERN_API_C( XVisualInfo *)
+Q3X_GetVisualInfo (Display * dpy,
+ Screen * screen);
+
+
+EXTERN_API_C( TQ3DrawContextObject )
+Q3XDrawContext_New (const TQ3XDrawContextData * xContextData);
+
+EXTERN_API_C( TQ3Status )
+Q3XDrawContext_SetDisplay (TQ3DrawContextObject drawContext,
+ const Display * display);
+
+EXTERN_API_C( TQ3Status )
+Q3XDrawContext_GetDisplay (TQ3DrawContextObject drawContext,
+ Display ** display);
+
+EXTERN_API_C( TQ3Status )
+Q3XDrawContext_SetDrawable (TQ3DrawContextObject drawContext,
+ Drawable drawable);
+
+EXTERN_API_C( TQ3Status )
+Q3XDrawContext_GetDrawable (TQ3DrawContextObject drawContext,
+ Drawable * drawable);
+
+EXTERN_API_C( TQ3Status )
+Q3XDrawContext_SetVisual (TQ3DrawContextObject drawContext,
+ const Visual * visual);
+
+EXTERN_API_C( TQ3Status )
+Q3XDrawContext_GetVisual (TQ3DrawContextObject drawContext,
+ Visual ** visual);
+
+EXTERN_API_C( TQ3Status )
+Q3XDrawContext_SetColormap (TQ3DrawContextObject drawContext,
+ Colormap colormap);
+
+EXTERN_API_C( TQ3Status )
+Q3XDrawContext_GetColormap (TQ3DrawContextObject drawContext,
+ Colormap * colormap);
+
+EXTERN_API_C( TQ3Status )
+Q3XDrawContext_SetColormapData (TQ3DrawContextObject drawContext,
+ const TQ3XColormapData * colormapData);
+
+EXTERN_API_C( TQ3Status )
+Q3XDrawContext_GetColormapData (TQ3DrawContextObject drawContext,
+ TQ3XColormapData * colormapData);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_OS_UNIX */
+
+#if TARGET_OS_WIN32
+/******************************************************************************
+ ** **
+ ** Win32 DrawContext Data Structures **
+ ** **
+ *****************************************************************************/
+
+struct TQ3Win32DCDrawContextData {
+ TQ3DrawContextData drawContextData;
+ HDC hdc;
+};
+typedef struct TQ3Win32DCDrawContextData TQ3Win32DCDrawContextData;
+#ifndef QD3D_NO_DIRECTDRAW
+
+enum TQ3DirectDrawObjectSelector {
+ kQ3DirectDrawObject = 1,
+ kQ3DirectDrawObject2 = 2
+};
+typedef enum TQ3DirectDrawObjectSelector TQ3DirectDrawObjectSelector;
+
+
+enum TQ3DirectDrawSurfaceSelector {
+ kQ3DirectDrawSurface = 1,
+ kQ3DirectDrawSurface2 = 2
+};
+typedef enum TQ3DirectDrawSurfaceSelector TQ3DirectDrawSurfaceSelector;
+
+
+struct TQ3DDSurfaceDescriptor {
+ TQ3DirectDrawObjectSelector objectSelector;
+ union
+ {
+ LPDIRECTDRAW lpDirectDraw;
+ LPDIRECTDRAW2 lpDirectDraw2;
+ };
+
+ TQ3DirectDrawSurfaceSelector surfaceSelector;
+ union
+ {
+ LPDIRECTDRAWSURFACE lpDirectDrawSurface;
+ LPDIRECTDRAWSURFACE2 lpDirectDrawSurface2;
+ };
+};
+typedef struct TQ3DDSurfaceDescriptor TQ3DDSurfaceDescriptor;
+
+struct TQ3DDSurfaceDrawContextData {
+ TQ3DrawContextData drawContextData;
+ TQ3DDSurfaceDescriptor ddSurfaceDescriptor;
+};
+typedef struct TQ3DDSurfaceDrawContextData TQ3DDSurfaceDrawContextData;
+
+#endif /* !defined(QD3D_NO_DIRECTDRAW) */
+
+/******************************************************************************
+ ** **
+ ** Win32DC DrawContext Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3DrawContextObject )
+Q3Win32DCDrawContext_New (const TQ3Win32DCDrawContextData * drawContextData);
+
+EXTERN_API_C( TQ3Status )
+Q3Win32DCDrawContext_SetDC (TQ3DrawContextObject drawContext,
+ HDC newHDC);
+
+EXTERN_API_C( TQ3Status )
+Q3Win32DCDrawContext_GetDC (TQ3DrawContextObject drawContext,
+ HDC * curHDC);
+
+/******************************************************************************
+ ** **
+ ** DDSurface DrawContext Routines **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+#ifndef QD3D_NO_DIRECTDRAW
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3DrawContextObject )
+Q3DDSurfaceDrawContext_New (const TQ3DDSurfaceDrawContextData * drawContextData);
+
+EXTERN_API_C( TQ3Status )
+Q3DDSurfaceDrawContext_SetDirectDrawSurface (TQ3DrawContextObject drawContext,
+ const TQ3DDSurfaceDescriptor * ddSurfaceDescriptor);
+
+EXTERN_API_C( TQ3Status )
+Q3DDSurfaceDrawContext_GetDirectDrawSurface (TQ3DrawContextObject drawContext,
+ TQ3DDSurfaceDescriptor * ddSurfaceDescriptor);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* !defined(QD3D_NO_DIRECTDRAW) */
+
+#endif /* TARGET_OS_WIN32 */
+
+
+
+
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __QD3DDRAWCONTEXT__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__QD3DDRAWCONTEXT__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QD3DDRAWCONTEXT__ */
+
diff --git a/include/qt/QD3DErrors.h b/include/qt/QD3DErrors.h
new file mode 100644
index 000000000..2dd84040d
--- /dev/null
+++ b/include/qt/QD3DErrors.h
@@ -0,0 +1,349 @@
+/*
+ File: QD3DErrors.h
+
+ Contains: Error API and error codes
+
+ Version: Technology: Quickdraw 3D 1.6
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QD3DERRORS__
+#define __QD3DERRORS__
+
+#ifndef __QD3D__
+#include "QD3D.h"
+#endif
+
+
+#if TARGET_OS_MAC
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#endif /* TARGET_OS_MAC */
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __QD3DERRORS__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __QD3DERRORS__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+/******************************************************************************
+ ** **
+ ** Error Types and Codes **
+ ** **
+ *****************************************************************************/
+
+enum TQ3Error {
+ kQ3ErrorNone = 0, /* Fatal Errors */
+ kQ3ErrorInternalError = -28500,
+ kQ3ErrorNoRecovery = -28499,
+ kQ3ErrorLastFatalError = -28498, /* System Errors */
+ kQ3ErrorNotInitialized = -28490,
+ kQ3ErrorAlreadyInitialized = -28489,
+ kQ3ErrorUnimplemented = -28488,
+ kQ3ErrorRegistrationFailed = -28487, /* OS Errors */
+ kQ3ErrorUnixError = -28486,
+ kQ3ErrorMacintoshError = -28485,
+ kQ3ErrorX11Error = -28484, /* Memory Errors */
+ kQ3ErrorMemoryLeak = -28483,
+ kQ3ErrorOutOfMemory = -28482, /* Parameter errors */
+ kQ3ErrorNULLParameter = -28481,
+ kQ3ErrorParameterOutOfRange = -28480,
+ kQ3ErrorInvalidParameter = -28479,
+ kQ3ErrorInvalidData = -28478,
+ kQ3ErrorAcceleratorAlreadySet = -28477,
+ kQ3ErrorVector3DNotUnitLength = -28476,
+ kQ3ErrorVector3DZeroLength = -28475, /* Object Errors */
+ kQ3ErrorInvalidObject = -28474,
+ kQ3ErrorInvalidObjectClass = -28473,
+ kQ3ErrorInvalidObjectType = -28472,
+ kQ3ErrorInvalidObjectName = -28471,
+ kQ3ErrorObjectClassInUse = -28470,
+ kQ3ErrorAccessRestricted = -28469,
+ kQ3ErrorMetaHandlerRequired = -28468,
+ kQ3ErrorNeedRequiredMethods = -28467,
+ kQ3ErrorNoSubClassType = -28466,
+ kQ3ErrorUnknownElementType = -28465,
+ kQ3ErrorNotSupported = -28464, /* Extension Errors */
+ kQ3ErrorNoExtensionsFolder = -28463,
+ kQ3ErrorExtensionError = -28462,
+ kQ3ErrorPrivateExtensionError = -28461, /* Geometry Errors */
+ kQ3ErrorDegenerateGeometry = -28460,
+ kQ3ErrorGeometryInsufficientNumberOfPoints = -28459, /* IO Errors */
+ kQ3ErrorNoStorageSetForFile = -28458,
+ kQ3ErrorEndOfFile = -28457,
+ kQ3ErrorFileCancelled = -28456,
+ kQ3ErrorInvalidMetafile = -28455,
+ kQ3ErrorInvalidMetafilePrimitive = -28454,
+ kQ3ErrorInvalidMetafileLabel = -28453,
+ kQ3ErrorInvalidMetafileObject = -28452,
+ kQ3ErrorInvalidMetafileSubObject = -28451,
+ kQ3ErrorInvalidSubObjectForObject = -28450,
+ kQ3ErrorUnresolvableReference = -28449,
+ kQ3ErrorUnknownObject = -28448,
+ kQ3ErrorStorageInUse = -28447,
+ kQ3ErrorStorageAlreadyOpen = -28446,
+ kQ3ErrorStorageNotOpen = -28445,
+ kQ3ErrorStorageIsOpen = -28444,
+ kQ3ErrorFileAlreadyOpen = -28443,
+ kQ3ErrorFileNotOpen = -28442,
+ kQ3ErrorFileIsOpen = -28441,
+ kQ3ErrorBeginWriteAlreadyCalled = -28440,
+ kQ3ErrorBeginWriteNotCalled = -28439,
+ kQ3ErrorEndWriteNotCalled = -28438,
+ kQ3ErrorReadStateInactive = -28437,
+ kQ3ErrorStateUnavailable = -28436,
+ kQ3ErrorWriteStateInactive = -28435,
+ kQ3ErrorSizeNotLongAligned = -28434,
+ kQ3ErrorFileModeRestriction = -28433,
+ kQ3ErrorInvalidHexString = -28432,
+ kQ3ErrorWroteMoreThanSize = -28431,
+ kQ3ErrorWroteLessThanSize = -28430,
+ kQ3ErrorReadLessThanSize = -28429,
+ kQ3ErrorReadMoreThanSize = -28428,
+ kQ3ErrorNoBeginGroup = -28427,
+ kQ3ErrorSizeMismatch = -28426,
+ kQ3ErrorStringExceedsMaximumLength = -28425,
+ kQ3ErrorValueExceedsMaximumSize = -28424,
+ kQ3ErrorNonUniqueLabel = -28423,
+ kQ3ErrorEndOfContainer = -28422,
+ kQ3ErrorUnmatchedEndGroup = -28421,
+ kQ3ErrorFileVersionExists = -28420, /* View errors */
+ kQ3ErrorViewNotStarted = -28419,
+ kQ3ErrorViewIsStarted = -28418,
+ kQ3ErrorRendererNotSet = -28417,
+ kQ3ErrorRenderingIsActive = -28416,
+ kQ3ErrorImmediateModeUnderflow = -28415,
+ kQ3ErrorDisplayNotSet = -28414,
+ kQ3ErrorCameraNotSet = -28413,
+ kQ3ErrorDrawContextNotSet = -28412,
+ kQ3ErrorNonInvertibleMatrix = -28411,
+ kQ3ErrorRenderingNotStarted = -28410,
+ kQ3ErrorPickingNotStarted = -28409,
+ kQ3ErrorBoundsNotStarted = -28408,
+ kQ3ErrorDataNotAvailable = -28407,
+ kQ3ErrorNothingToPop = -28406, /* Renderer Errors */
+ kQ3ErrorUnknownStudioType = -28405,
+ kQ3ErrorAlreadyRendering = -28404,
+ kQ3ErrorStartGroupRange = -28403,
+ kQ3ErrorUnsupportedGeometryType = -28402,
+ kQ3ErrorInvalidGeometryType = -28401,
+ kQ3ErrorUnsupportedFunctionality = -28400, /* Group Errors */
+ kQ3ErrorInvalidPositionForGroup = -28399,
+ kQ3ErrorInvalidObjectForGroup = -28398,
+ kQ3ErrorInvalidObjectForPosition = -28397, /* Transform Errors */
+ kQ3ErrorScaleOfZero = -28396, /* String Errors */
+ kQ3ErrorBadStringType = -28395, /* Attribute Errors */
+ kQ3ErrorAttributeNotContained = -28394,
+ kQ3ErrorAttributeInvalidType = -28393, /* Camera Errors */
+ kQ3ErrorInvalidCameraValues = -28392, /* DrawContext Errors */
+ kQ3ErrorBadDrawContextType = -28391,
+ kQ3ErrorBadDrawContextFlag = -28390,
+ kQ3ErrorBadDrawContext = -28389,
+ kQ3ErrorUnsupportedPixelDepth = -28388, /* Controller Errors */
+ kQ3ErrorController = -28387, /* Tracker Errors */
+ kQ3ErrorTracker = -28386, /* Another OS Error */
+ kQ3ErrorWin32Error = -28385, /* Object Errors */
+ kQ3ErrorTypeAlreadyExistsAndHasSubclasses = -28384,
+ kQ3ErrorTypeAlreadyExistsAndOtherClassesDependOnIt = -28383,
+ kQ3ErrorTypeAlreadyExistsAndHasObjectInstances = -28382, /* submit loop errors: if you ever get one of these check the previous*/
+ /* error posted, it may be kQ3ErrorOutOfMemory. If so you *may* be able*/
+ /* to recover by freeing up some memory and trying again*/
+ kQ3ErrorPickingLoopFailed = -28381,
+ kQ3ErrorRenderingLoopFailed = -28380,
+ kQ3ErrorWritingLoopFailed = -28379,
+ kQ3ErrorBoundingLoopFailed = -28378
+};
+typedef enum TQ3Error TQ3Error;
+
+
+enum TQ3Warning {
+ kQ3WarningNone = 0, /* General System */
+ kQ3WarningInternalException = -28300, /* Object Warnings */
+ kQ3WarningNoObjectSupportForDuplicateMethod = -28299,
+ kQ3WarningNoObjectSupportForDrawMethod = -28298,
+ kQ3WarningNoObjectSupportForWriteMethod = -28297,
+ kQ3WarningNoObjectSupportForReadMethod = -28296,
+ kQ3WarningUnknownElementType = -28295,
+ kQ3WarningTypeAndMethodAlreadyDefined = -28294,
+ kQ3WarningTypeIsOutOfRange = -28293,
+ kQ3WarningTypeHasNotBeenRegistered = -28292, /* Parameter Warnings */
+ kQ3WarningVector3DNotUnitLength = -28291, /* IO Warnings */
+ kQ3WarningInvalidSubObjectForObject = -28290,
+ kQ3WarningInvalidHexString = -28289,
+ kQ3WarningUnknownObject = -28288,
+ kQ3WarningInvalidMetafileObject = -28287,
+ kQ3WarningUnmatchedBeginGroup = -28286,
+ kQ3WarningUnmatchedEndGroup = -28285,
+ kQ3WarningInvalidTableOfContents = -28284,
+ kQ3WarningUnresolvableReference = -28283,
+ kQ3WarningNoAttachMethod = -28282,
+ kQ3WarningInconsistentData = -28281,
+ kQ3WarningReadLessThanSize = -28280,
+ kQ3WarningFilePointerResolutionFailed = -28279,
+ kQ3WarningFilePointerRedefined = -28278,
+ kQ3WarningStringExceedsMaximumLength = -28277, /* Memory Warnings */
+ kQ3WarningLowMemory = -28276,
+ kQ3WarningPossibleMemoryLeak = -28275, /* View Warnings */
+ kQ3WarningViewTraversalInProgress = -28274,
+ kQ3WarningNonInvertibleMatrix = -28273, /* Quaternion Warning */
+ kQ3WarningQuaternionEntriesAreZero = -28272, /* Renderer Warning */
+ kQ3WarningFunctionalityNotSupported = -28271, /* DrawContext Warning */
+ kQ3WarningInvalidPaneDimensions = -28270, /* Pick Warning */
+ kQ3WarningPickParamOutside = -28269, /* Scale Warnings */
+ kQ3WarningScaleEntriesAllZero = -28268,
+ kQ3WarningScaleContainsNegativeEntries = -28267, /* Generic Warnings */
+ kQ3WarningParameterOutOfRange = -28266, /* Extension Warnings */
+ kQ3WarningExtensionNotLoading = -28265, /* Object Warnings */
+ kQ3WarningTypeAlreadyRegistered = -28264,
+ kQ3WarningTypeSameVersionAlreadyRegistered = -28263,
+ kQ3WarningTypeNewerVersionAlreadyRegistered = -28262, /* Invalid Group Object */
+ kQ3WarningInvalidObjectInGroupMetafile = -28261
+};
+typedef enum TQ3Warning TQ3Warning;
+
+
+
+enum TQ3Notice {
+ kQ3NoticeNone = 0,
+ kQ3NoticeDataAlreadyEmpty = -28100,
+ kQ3NoticeMethodNotSupported = -28099,
+ kQ3NoticeObjectAlreadySet = -28098,
+ kQ3NoticeParameterOutOfRange = -28097,
+ kQ3NoticeFileAliasWasChanged = -28096,
+ kQ3NoticeMeshVertexHasNoComponent = -28095,
+ kQ3NoticeMeshInvalidVertexFacePair = -28094,
+ kQ3NoticeMeshEdgeVertexDoNotCorrespond = -28093,
+ kQ3NoticeMeshEdgeIsNotBoundary = -28092,
+ kQ3NoticeDrawContextNotSetUsingInternalDefaults = -28091,
+ kQ3NoticeInvalidAttenuationTypeUsingInternalDefaults = -28090,
+ kQ3NoticeBrightnessGreaterThanOne = -28089,
+ kQ3NoticeScaleContainsZeroEntries = -28088,
+ kQ3NoticeSystemAlreadyInitialized = -28087,
+ kQ3NoticeViewSyncCalledAgain = -28086,
+ kQ3NoticeFileCancelled = -28085
+};
+typedef enum TQ3Notice TQ3Notice;
+
+typedef CALLBACK_API_C( void , TQ3ErrorMethod )(TQ3Error firstError, TQ3Error lastError, long reference);
+typedef CALLBACK_API_C( void , TQ3WarningMethod )(TQ3Warning firstWarning, TQ3Warning lastWarning, long reference);
+typedef CALLBACK_API_C( void , TQ3NoticeMethod )(TQ3Notice firstNotice, TQ3Notice lastNotice, long reference);
+/******************************************************************************
+ ** **
+ ** Error Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3Status )
+Q3Error_Register (TQ3ErrorMethod errorPost,
+ long reference);
+
+EXTERN_API_C( TQ3Status )
+Q3Warning_Register (TQ3WarningMethod warningPost,
+ long reference);
+
+EXTERN_API_C( TQ3Status )
+Q3Notice_Register (TQ3NoticeMethod noticePost,
+ long reference);
+
+/*
+ * Getting error codes -
+ * Clears error type on next entry into system (except all of these
+ * error calls), and returns the last error, and optionally the
+ * first error. The parameter to these "_Get" calls may be NULL.
+ */
+EXTERN_API_C( TQ3Error )
+Q3Error_Get (TQ3Error * firstError);
+
+EXTERN_API_C( TQ3Boolean )
+Q3Error_IsFatalError (TQ3Error error);
+
+EXTERN_API_C( TQ3Warning )
+Q3Warning_Get (TQ3Warning * firstWarning);
+
+EXTERN_API_C( TQ3Notice )
+Q3Notice_Get (TQ3Notice * firstNotice);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if TARGET_OS_MAC
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSErr )
+Q3MacintoshError_Get (OSErr * firstMacErr);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_OS_MAC */
+
+
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __QD3DERRORS__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__QD3DERRORS__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QD3DERRORS__ */
+
diff --git a/include/qt/QD3DExtension.h b/include/qt/QD3DExtension.h
new file mode 100644
index 000000000..8e7d68496
--- /dev/null
+++ b/include/qt/QD3DExtension.h
@@ -0,0 +1,373 @@
+/*
+ File: QD3DExtension.h
+
+ Contains: QuickDraw 3D Plug-in Architecture Interface File.
+
+ Version: Technology: Quickdraw 3D 1.6
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QD3DEXTENSION__
+#define __QD3DEXTENSION__
+
+#ifndef __QD3D__
+#include "QD3D.h"
+#endif
+
+#ifndef __QD3DERRORS__
+#include "QD3DErrors.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __QD3DEXTENSION__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __QD3DEXTENSION__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+/******************************************************************************
+ ** **
+ ** Constants **
+ ** **
+ *****************************************************************************/
+#if TARGET_OS_MAC
+enum {
+ kQ3XExtensionMacCreatorType = FOUR_CHAR_CODE('Q3XT'),
+ kQ3XExtensionMacFileType = FOUR_CHAR_CODE('shlb')
+};
+
+#endif /* TARGET_OS_MAC */
+
+
+/******************************************************************************
+ ** **
+ ** Macros **
+ ** **
+ *****************************************************************************/
+
+/*
+ * Use this Macro to pack the version number for your class. This would most
+ * likely get used in the kQ3XMethodTypeObjectClassVersion to return the
+ * version for your class. This method is set up in your meta handler.
+ */
+
+#define Q3_OBJECT_CLASS_VERSION(major, minor) \
+ (unsigned long) (((major) << 16) | (minor))
+
+/*
+ * Convenience macros to unpack a version number, accessing the major and the
+ * minor version numbers
+ */
+#define Q3_OBJECT_CLASS_GET_MAJOR_VERSION(version) \
+ (unsigned long) ((version) >> 16)
+
+#define Q3_OBJECT_CLASS_GET_MINOR_VERSION(version) \
+ (unsigned long) ((version) & 0x0000ffff)
+
+
+/******************************************************************************
+ ** **
+ ** Object Method types **
+ ** **
+ *****************************************************************************/
+enum {
+ kQ3XMethodTypeObjectClassVersion = FOUR_CHAR_CODE('vrsn')
+};
+
+typedef unsigned long TQ3XObjectClassVersion;
+enum {
+ kQ3XMethodTypeObjectClassRegister = FOUR_CHAR_CODE('rgst')
+};
+
+typedef CALLBACK_API_C( TQ3Status , TQ3XObjectClassRegisterMethod )(TQ3XObjectClass objectClass, void *classPrivate);
+enum {
+ kQ3XMethodTypeObjectClassReplace = FOUR_CHAR_CODE('rgrp')
+};
+
+typedef CALLBACK_API_C( void , TQ3XObjectClassReplaceMethod )(TQ3XObjectClass oldObjectClass, void *oldClassPrivate, TQ3XObjectClass newObjectClass, void *newClassPrivate);
+enum {
+ kQ3XMethodTypeObjectClassUnregister = FOUR_CHAR_CODE('unrg')
+};
+
+typedef CALLBACK_API_C( void , TQ3XObjectClassUnregisterMethod )(TQ3XObjectClass objectClass, void *classPrivate);
+enum {
+ kQ3XMethodTypeObjectNew = FOUR_CHAR_CODE('newo')
+};
+
+typedef CALLBACK_API_C( TQ3Status , TQ3XObjectNewMethod )(TQ3Object object, void *privateData, void *parameters);
+enum {
+ kQ3XMethodTypeObjectDelete = FOUR_CHAR_CODE('dlte')
+};
+
+typedef CALLBACK_API_C( void , TQ3XObjectDeleteMethod )(TQ3Object object, void *privateData);
+enum {
+ kQ3XMethodTypeObjectDuplicate = FOUR_CHAR_CODE('dupl')
+};
+
+typedef CALLBACK_API_C( TQ3Status , TQ3XObjectDuplicateMethod )(TQ3Object fromObject, const void *fromPrivateData, TQ3Object toObject, const void *toPrivateData);
+typedef CALLBACK_API_C( TQ3Status , TQ3XSharedLibraryRegister )(void );
+/******************************************************************************
+ ** **
+ ** Object Hierarchy Registration **
+ ** **
+ *****************************************************************************/
+/*
+ * Q3XObjectHierarchy_RegisterClass
+ *
+ * Register an object class in the QuickDraw 3D hierarchy.
+ *
+ * parentType - an existing type in the hierarchy, or 0 to subclass
+ * TQ3Object
+ * objectType - the new object class type, used in the binary
+ * metafile. This is assigned at run time and returned
+ * to you.
+ * objectName - the new object name, used in the text metafile
+ * metaHandler - a TQ3XMetaHandler (may be NULL for some classes)
+ * which returns non-virtual methods
+ * virtualMetaHandler - a TQ3XMetaHandler (may be NULL as well) which returns
+ * virtual methods a child would inherit
+ * methodsSize - the size of the class data needed (see
+ * GetClassPrivate calls below)
+ * instanceSize - the size of the object instance data needed (see
+ * GetPrivate calls below)
+ */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3XObjectClass )
+Q3XObjectHierarchy_RegisterClass (TQ3ObjectType parentType,
+ TQ3ObjectType * objectType,
+ char * objectName,
+ TQ3XMetaHandler metaHandler,
+ TQ3XMetaHandler virtualMetaHandler,
+ unsigned long methodsSize,
+ unsigned long instanceSize);
+
+/*
+ * Q3XObjectHierarchy_UnregisterClass
+ *
+ * Returns kQ3Failure if the objectClass still has objects
+ * around; the class remains registered.
+ */
+EXTERN_API_C( TQ3Status )
+Q3XObjectHierarchy_UnregisterClass (TQ3XObjectClass objectClass);
+
+/*
+ * Q3XObjectHierarchy_GetMethod
+ *
+ * For use in TQ3XObjectClassRegisterMethod call
+ */
+EXTERN_API_C( TQ3XFunctionPointer )
+Q3XObjectClass_GetMethod (TQ3XObjectClass objectClass,
+ TQ3XMethodType methodType);
+
+/*
+ * Q3XObjectHierarchy_NewObject
+ *
+ * To create a new object. Parameters is passed into the
+ * TQ3XObjectNewMethod as the "parameters" parameter.
+ */
+EXTERN_API_C( TQ3Object )
+Q3XObjectHierarchy_NewObject (TQ3XObjectClass objectClass,
+ void * parameters);
+
+/*
+ * Q3XObjectClass_GetLeafType
+ *
+ * Return the leaf type of a class.
+ */
+EXTERN_API_C( TQ3ObjectType )
+Q3XObjectClass_GetLeafType (TQ3XObjectClass objectClass);
+
+/*
+ * Q3XObjectClass_GetVersion
+ * This routine obtains the the version of a class, referenced by an
+ * object class type. Functions for getting the type are in QD3D.h,
+ * if you have the class name.
+ */
+EXTERN_API_C( TQ3Status )
+Q3XObjectHierarchy_GetClassVersion (TQ3ObjectType objectClassType,
+ TQ3XObjectClassVersion * version);
+
+/*
+ * Q3XObjectClass_GetType
+ *
+ * This can be used to get the type, given a reference
+ * to a class. This is most useful in the instance where you register a
+ * an element/attribute and need to get the type. When you register an
+ * element, QD3D will take the type you pass in and modify it (to avoid
+ * namespace clashes). Many object system calls require an object type
+ * so this API call allows you to get the type from the class referernce
+ * that you will ordinarily store when you register the class.
+ */
+EXTERN_API_C( TQ3Status )
+Q3XObjectClass_GetType (TQ3XObjectClass objectClass,
+ TQ3ObjectType * theType);
+
+
+EXTERN_API_C( TQ3XObjectClass )
+Q3XObjectHierarchy_FindClassByType (TQ3ObjectType theType);
+
+
+
+/*
+ * Q3XObjectClass_GetPrivate
+ *
+ * Return a pointer to private instance data, a block of instanceSize bytes,
+ * from the Q3XObjectHierarchy_RegisterClass call.
+ *
+ * If instanceSize was zero, NULL is always returned.
+ */
+EXTERN_API_C( void *)
+Q3XObjectClass_GetPrivate (TQ3XObjectClass objectClass,
+ TQ3Object targetObject);
+
+/*
+ * Return the "TQ3XObjectClass" of an object
+ */
+EXTERN_API_C( TQ3XObjectClass )
+Q3XObject_GetClass (TQ3Object object);
+
+
+
+/******************************************************************************
+ ** **
+ ** Shared Library Registration Entry Point **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct TQ3XSharedLibraryInfo {
+ TQ3XSharedLibraryRegister registerFunction;
+ unsigned long sharedLibrary;
+};
+typedef struct TQ3XSharedLibraryInfo TQ3XSharedLibraryInfo;
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3Status )
+Q3XSharedLibrary_Register (TQ3XSharedLibraryInfo * sharedLibraryInfo);
+
+EXTERN_API_C( TQ3Status )
+Q3XSharedLibrary_Unregister (unsigned long sharedLibrary);
+
+
+/******************************************************************************
+ ** **
+ ** Posting Errors **
+ ** **
+ ** You may only call these functions from within an extension **
+ ** **
+ *****************************************************************************/
+/*
+ * Q3XError_Post
+ *
+ * Post a QuickDraw 3D Error from an extension.
+ */
+EXTERN_API_C( void )
+Q3XError_Post (TQ3Error error);
+
+/*
+ * Q3XWarning_Post
+ *
+ * Post a QuickDraw 3D Warning, from an extension. Note the warning code you
+ * pass into this routine must already be defined in the table above.
+ */
+EXTERN_API_C( void )
+Q3XWarning_Post (TQ3Warning warning);
+
+/*
+ * Q3XNotice_Post
+ *
+ * Post a QuickDraw 3D Notice, from an extension. Note the notice code you
+ * pass into this routine must already be defined in the table above.
+ */
+EXTERN_API_C( void )
+Q3XNotice_Post (TQ3Notice notice);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if TARGET_OS_MAC
+/*
+ * Q3XMacintoshError_Post
+ *
+ * Post the QuickDraw 3D Error, kQ3ErrorMacintoshError, and the Macintosh
+ * OSErr macOSErr. (Retrieved with Q3MacintoshError_Get)
+ */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( void )
+Q3XMacintoshError_Post (OSErr macOSErr);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_OS_MAC */
+
+
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __QD3DEXTENSION__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__QD3DEXTENSION__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QD3DEXTENSION__ */
+
diff --git a/include/qt/QD3DGeometry.h b/include/qt/QD3DGeometry.h
new file mode 100644
index 000000000..4b29e05e0
--- /dev/null
+++ b/include/qt/QD3DGeometry.h
@@ -0,0 +1,2191 @@
+/*
+ File: QD3DGeometry.h
+
+ Contains: Q3Geometry methods
+
+ Version: Technology: Quickdraw 3D 1.6
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QD3DGEOMETRY__
+#define __QD3DGEOMETRY__
+
+#ifndef __QD3D__
+#include "QD3D.h"
+#endif
+
+
+#ifndef __QD3DSET__
+#include "QD3DSet.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __QD3DGEOMETRY__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __QD3DGEOMETRY__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+/******************************************************************************
+ ** **
+ ** Geometry Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3ObjectType )
+Q3Geometry_GetType (TQ3GeometryObject geometry);
+
+EXTERN_API_C( TQ3Status )
+Q3Geometry_GetAttributeSet (TQ3GeometryObject geometry,
+ TQ3AttributeSet * attributeSet);
+
+EXTERN_API_C( TQ3Status )
+Q3Geometry_SetAttributeSet (TQ3GeometryObject geometry,
+ TQ3AttributeSet attributeSet);
+
+EXTERN_API_C( TQ3Status )
+Q3Geometry_Submit (TQ3GeometryObject geometry,
+ TQ3ViewObject view);
+
+
+
+/******************************************************************************
+ ** **
+ ** Box Data Structure Definitions **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct TQ3BoxData {
+ TQ3Point3D origin;
+ TQ3Vector3D orientation;
+ TQ3Vector3D majorAxis;
+ TQ3Vector3D minorAxis;
+ TQ3AttributeSet * faceAttributeSet; /* Ordering : Left, right, */
+ /* front, back, */
+ /* top, bottom */
+ TQ3AttributeSet boxAttributeSet;
+};
+typedef struct TQ3BoxData TQ3BoxData;
+/******************************************************************************
+ ** **
+ ** Box Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3GeometryObject )
+Q3Box_New (const TQ3BoxData * boxData);
+
+EXTERN_API_C( TQ3Status )
+Q3Box_Submit (const TQ3BoxData * boxData,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3Box_SetData (TQ3GeometryObject box,
+ const TQ3BoxData * boxData);
+
+EXTERN_API_C( TQ3Status )
+Q3Box_GetData (TQ3GeometryObject box,
+ TQ3BoxData * boxData);
+
+EXTERN_API_C( TQ3Status )
+Q3Box_EmptyData (TQ3BoxData * boxData);
+
+EXTERN_API_C( TQ3Status )
+Q3Box_SetOrigin (TQ3GeometryObject box,
+ const TQ3Point3D * origin);
+
+EXTERN_API_C( TQ3Status )
+Q3Box_SetOrientation (TQ3GeometryObject box,
+ const TQ3Vector3D * orientation);
+
+EXTERN_API_C( TQ3Status )
+Q3Box_SetMajorAxis (TQ3GeometryObject box,
+ const TQ3Vector3D * majorAxis);
+
+EXTERN_API_C( TQ3Status )
+Q3Box_SetMinorAxis (TQ3GeometryObject box,
+ const TQ3Vector3D * minorAxis);
+
+EXTERN_API_C( TQ3Status )
+Q3Box_GetOrigin (TQ3GeometryObject box,
+ TQ3Point3D * origin);
+
+EXTERN_API_C( TQ3Status )
+Q3Box_GetOrientation (TQ3GeometryObject box,
+ TQ3Vector3D * orientation);
+
+EXTERN_API_C( TQ3Status )
+Q3Box_GetMajorAxis (TQ3GeometryObject box,
+ TQ3Vector3D * majorAxis);
+
+EXTERN_API_C( TQ3Status )
+Q3Box_GetMinorAxis (TQ3GeometryObject box,
+ TQ3Vector3D * minorAxis);
+
+EXTERN_API_C( TQ3Status )
+Q3Box_GetFaceAttributeSet (TQ3GeometryObject box,
+ unsigned long faceIndex,
+ TQ3AttributeSet * faceAttributeSet);
+
+EXTERN_API_C( TQ3Status )
+Q3Box_SetFaceAttributeSet (TQ3GeometryObject box,
+ unsigned long faceIndex,
+ TQ3AttributeSet faceAttributeSet);
+
+
+
+/******************************************************************************
+ ** **
+ ** Cone Data Structure Definitions **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct TQ3ConeData {
+ TQ3Point3D origin;
+ TQ3Vector3D orientation;
+ TQ3Vector3D majorRadius;
+ TQ3Vector3D minorRadius;
+ float uMin;
+ float uMax;
+ float vMin;
+ float vMax;
+ TQ3EndCap caps;
+ TQ3AttributeSet interiorAttributeSet;
+ TQ3AttributeSet faceAttributeSet;
+ TQ3AttributeSet bottomAttributeSet;
+ TQ3AttributeSet coneAttributeSet;
+};
+typedef struct TQ3ConeData TQ3ConeData;
+/******************************************************************************
+ ** **
+ ** Cone Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3GeometryObject )
+Q3Cone_New (const TQ3ConeData * coneData);
+
+EXTERN_API_C( TQ3Status )
+Q3Cone_Submit (const TQ3ConeData * coneData,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3Cone_SetData (TQ3GeometryObject cone,
+ const TQ3ConeData * coneData);
+
+EXTERN_API_C( TQ3Status )
+Q3Cone_GetData (TQ3GeometryObject cone,
+ TQ3ConeData * coneData);
+
+EXTERN_API_C( TQ3Status )
+Q3Cone_SetOrigin (TQ3GeometryObject cone,
+ const TQ3Point3D * origin);
+
+EXTERN_API_C( TQ3Status )
+Q3Cone_SetOrientation (TQ3GeometryObject cone,
+ const TQ3Vector3D * orientation);
+
+EXTERN_API_C( TQ3Status )
+Q3Cone_SetMajorRadius (TQ3GeometryObject cone,
+ const TQ3Vector3D * majorRadius);
+
+EXTERN_API_C( TQ3Status )
+Q3Cone_SetMinorRadius (TQ3GeometryObject cone,
+ const TQ3Vector3D * minorRadius);
+
+EXTERN_API_C( TQ3Status )
+Q3Cone_GetOrigin (TQ3GeometryObject cone,
+ TQ3Point3D * origin);
+
+EXTERN_API_C( TQ3Status )
+Q3Cone_GetOrientation (TQ3GeometryObject cone,
+ TQ3Vector3D * orientation);
+
+EXTERN_API_C( TQ3Status )
+Q3Cone_GetMajorRadius (TQ3GeometryObject cone,
+ TQ3Vector3D * majorRadius);
+
+EXTERN_API_C( TQ3Status )
+Q3Cone_GetMinorRadius (TQ3GeometryObject cone,
+ TQ3Vector3D * minorRadius);
+
+EXTERN_API_C( TQ3Status )
+Q3Cone_SetCaps (TQ3GeometryObject cone,
+ TQ3EndCap caps);
+
+EXTERN_API_C( TQ3Status )
+Q3Cone_GetCaps (TQ3GeometryObject cone,
+ TQ3EndCap * caps);
+
+EXTERN_API_C( TQ3Status )
+Q3Cone_SetBottomAttributeSet (TQ3GeometryObject cone,
+ TQ3AttributeSet bottomAttributeSet);
+
+EXTERN_API_C( TQ3Status )
+Q3Cone_GetBottomAttributeSet (TQ3GeometryObject cone,
+ TQ3AttributeSet * bottomAttributeSet);
+
+EXTERN_API_C( TQ3Status )
+Q3Cone_SetFaceAttributeSet (TQ3GeometryObject cone,
+ TQ3AttributeSet faceAttributeSet);
+
+EXTERN_API_C( TQ3Status )
+Q3Cone_GetFaceAttributeSet (TQ3GeometryObject cone,
+ TQ3AttributeSet * faceAttributeSet);
+
+EXTERN_API_C( TQ3Status )
+Q3Cone_EmptyData (TQ3ConeData * coneData);
+
+
+
+
+/******************************************************************************
+ ** **
+ ** Cylinder Data Structure Definitions **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct TQ3CylinderData {
+ TQ3Point3D origin;
+ TQ3Vector3D orientation;
+ TQ3Vector3D majorRadius;
+ TQ3Vector3D minorRadius;
+ float uMin;
+ float uMax;
+ float vMin;
+ float vMax;
+ TQ3EndCap caps;
+ TQ3AttributeSet interiorAttributeSet;
+ TQ3AttributeSet topAttributeSet;
+ TQ3AttributeSet faceAttributeSet;
+ TQ3AttributeSet bottomAttributeSet;
+ TQ3AttributeSet cylinderAttributeSet;
+};
+typedef struct TQ3CylinderData TQ3CylinderData;
+/******************************************************************************
+ ** **
+ ** Cylinder Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3GeometryObject )
+Q3Cylinder_New (const TQ3CylinderData * cylinderData);
+
+EXTERN_API_C( TQ3Status )
+Q3Cylinder_Submit (const TQ3CylinderData * cylinderData,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3Cylinder_SetData (TQ3GeometryObject cylinder,
+ const TQ3CylinderData * cylinderData);
+
+EXTERN_API_C( TQ3Status )
+Q3Cylinder_GetData (TQ3GeometryObject cylinder,
+ TQ3CylinderData * cylinderData);
+
+EXTERN_API_C( TQ3Status )
+Q3Cylinder_SetOrigin (TQ3GeometryObject cylinder,
+ const TQ3Point3D * origin);
+
+EXTERN_API_C( TQ3Status )
+Q3Cylinder_SetOrientation (TQ3GeometryObject cylinder,
+ const TQ3Vector3D * orientation);
+
+EXTERN_API_C( TQ3Status )
+Q3Cylinder_SetMajorRadius (TQ3GeometryObject cylinder,
+ const TQ3Vector3D * majorRadius);
+
+EXTERN_API_C( TQ3Status )
+Q3Cylinder_SetMinorRadius (TQ3GeometryObject cylinder,
+ const TQ3Vector3D * minorRadius);
+
+EXTERN_API_C( TQ3Status )
+Q3Cylinder_GetOrigin (TQ3GeometryObject cylinder,
+ TQ3Point3D * origin);
+
+EXTERN_API_C( TQ3Status )
+Q3Cylinder_GetOrientation (TQ3GeometryObject cylinder,
+ TQ3Vector3D * orientation);
+
+EXTERN_API_C( TQ3Status )
+Q3Cylinder_GetMajorRadius (TQ3GeometryObject cylinder,
+ TQ3Vector3D * majorRadius);
+
+EXTERN_API_C( TQ3Status )
+Q3Cylinder_GetMinorRadius (TQ3GeometryObject cylinder,
+ TQ3Vector3D * minorRadius);
+
+
+EXTERN_API_C( TQ3Status )
+Q3Cylinder_SetCaps (TQ3GeometryObject cylinder,
+ TQ3EndCap caps);
+
+EXTERN_API_C( TQ3Status )
+Q3Cylinder_GetCaps (TQ3GeometryObject cylinder,
+ TQ3EndCap * caps);
+
+
+EXTERN_API_C( TQ3Status )
+Q3Cylinder_SetTopAttributeSet (TQ3GeometryObject cylinder,
+ TQ3AttributeSet topAttributeSet);
+
+EXTERN_API_C( TQ3Status )
+Q3Cylinder_GetTopAttributeSet (TQ3GeometryObject cylinder,
+ TQ3AttributeSet * topAttributeSet);
+
+EXTERN_API_C( TQ3Status )
+Q3Cylinder_SetBottomAttributeSet (TQ3GeometryObject cylinder,
+ TQ3AttributeSet bottomAttributeSet);
+
+EXTERN_API_C( TQ3Status )
+Q3Cylinder_GetBottomAttributeSet (TQ3GeometryObject cylinder,
+ TQ3AttributeSet * bottomAttributeSet);
+
+EXTERN_API_C( TQ3Status )
+Q3Cylinder_SetFaceAttributeSet (TQ3GeometryObject cylinder,
+ TQ3AttributeSet faceAttributeSet);
+
+EXTERN_API_C( TQ3Status )
+Q3Cylinder_GetFaceAttributeSet (TQ3GeometryObject cylinder,
+ TQ3AttributeSet * faceAttributeSet);
+
+EXTERN_API_C( TQ3Status )
+Q3Cylinder_EmptyData (TQ3CylinderData * cylinderData);
+
+
+
+
+/******************************************************************************
+ ** **
+ ** Disk Data Structure Definitions **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct TQ3DiskData {
+ TQ3Point3D origin;
+ TQ3Vector3D majorRadius;
+ TQ3Vector3D minorRadius;
+ float uMin;
+ float uMax;
+ float vMin;
+ float vMax;
+ TQ3AttributeSet diskAttributeSet;
+};
+typedef struct TQ3DiskData TQ3DiskData;
+/******************************************************************************
+ ** **
+ ** Disk Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3GeometryObject )
+Q3Disk_New (const TQ3DiskData * diskData);
+
+EXTERN_API_C( TQ3Status )
+Q3Disk_Submit (const TQ3DiskData * diskData,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3Disk_SetData (TQ3GeometryObject disk,
+ const TQ3DiskData * diskData);
+
+EXTERN_API_C( TQ3Status )
+Q3Disk_GetData (TQ3GeometryObject disk,
+ TQ3DiskData * diskData);
+
+EXTERN_API_C( TQ3Status )
+Q3Disk_SetOrigin (TQ3GeometryObject disk,
+ const TQ3Point3D * origin);
+
+EXTERN_API_C( TQ3Status )
+Q3Disk_SetMajorRadius (TQ3GeometryObject disk,
+ const TQ3Vector3D * majorRadius);
+
+EXTERN_API_C( TQ3Status )
+Q3Disk_SetMinorRadius (TQ3GeometryObject disk,
+ const TQ3Vector3D * minorRadius);
+
+EXTERN_API_C( TQ3Status )
+Q3Disk_GetOrigin (TQ3GeometryObject disk,
+ TQ3Point3D * origin);
+
+EXTERN_API_C( TQ3Status )
+Q3Disk_GetMajorRadius (TQ3GeometryObject disk,
+ TQ3Vector3D * majorRadius);
+
+EXTERN_API_C( TQ3Status )
+Q3Disk_GetMinorRadius (TQ3GeometryObject disk,
+ TQ3Vector3D * minorRadius);
+
+
+EXTERN_API_C( TQ3Status )
+Q3Disk_EmptyData (TQ3DiskData * diskData);
+
+
+
+
+/******************************************************************************
+ ** **
+ ** Ellipse Data Structure Definitions **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct TQ3EllipseData {
+ TQ3Point3D origin;
+ TQ3Vector3D majorRadius;
+ TQ3Vector3D minorRadius;
+ float uMin;
+ float uMax;
+ TQ3AttributeSet ellipseAttributeSet;
+};
+typedef struct TQ3EllipseData TQ3EllipseData;
+/******************************************************************************
+ ** **
+ ** Ellipse Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3GeometryObject )
+Q3Ellipse_New (const TQ3EllipseData * ellipseData);
+
+EXTERN_API_C( TQ3Status )
+Q3Ellipse_Submit (const TQ3EllipseData * ellipseData,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3Ellipse_SetData (TQ3GeometryObject ellipse,
+ const TQ3EllipseData * ellipseData);
+
+EXTERN_API_C( TQ3Status )
+Q3Ellipse_GetData (TQ3GeometryObject ellipse,
+ TQ3EllipseData * ellipseData);
+
+EXTERN_API_C( TQ3Status )
+Q3Ellipse_SetOrigin (TQ3GeometryObject ellipse,
+ const TQ3Point3D * origin);
+
+EXTERN_API_C( TQ3Status )
+Q3Ellipse_SetMajorRadius (TQ3GeometryObject ellipse,
+ const TQ3Vector3D * majorRadius);
+
+EXTERN_API_C( TQ3Status )
+Q3Ellipse_SetMinorRadius (TQ3GeometryObject ellipse,
+ const TQ3Vector3D * minorRadius);
+
+EXTERN_API_C( TQ3Status )
+Q3Ellipse_GetOrigin (TQ3GeometryObject ellipse,
+ TQ3Point3D * origin);
+
+EXTERN_API_C( TQ3Status )
+Q3Ellipse_GetMajorRadius (TQ3GeometryObject ellipse,
+ TQ3Vector3D * majorRadius);
+
+EXTERN_API_C( TQ3Status )
+Q3Ellipse_GetMinorRadius (TQ3GeometryObject ellipse,
+ TQ3Vector3D * minorRadius);
+
+
+EXTERN_API_C( TQ3Status )
+Q3Ellipse_EmptyData (TQ3EllipseData * ellipseData);
+
+
+
+
+/******************************************************************************
+ ** **
+ ** Ellipsoid Data structures **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct TQ3EllipsoidData {
+ TQ3Point3D origin;
+ TQ3Vector3D orientation;
+ TQ3Vector3D majorRadius;
+ TQ3Vector3D minorRadius;
+ float uMin;
+ float uMax;
+ float vMin;
+ float vMax;
+ TQ3EndCap caps;
+ TQ3AttributeSet interiorAttributeSet;
+ TQ3AttributeSet ellipsoidAttributeSet;
+};
+typedef struct TQ3EllipsoidData TQ3EllipsoidData;
+/******************************************************************************
+ ** **
+ ** Ellipsoid Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3GeometryObject )
+Q3Ellipsoid_New (const TQ3EllipsoidData * ellipsoidData);
+
+EXTERN_API_C( TQ3Status )
+Q3Ellipsoid_Submit (const TQ3EllipsoidData * ellipsoidData,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3Ellipsoid_SetData (TQ3GeometryObject ellipsoid,
+ const TQ3EllipsoidData * ellipsoidData);
+
+EXTERN_API_C( TQ3Status )
+Q3Ellipsoid_GetData (TQ3GeometryObject ellipsoid,
+ TQ3EllipsoidData * ellipsoidData);
+
+EXTERN_API_C( TQ3Status )
+Q3Ellipsoid_SetOrigin (TQ3GeometryObject ellipsoid,
+ const TQ3Point3D * origin);
+
+EXTERN_API_C( TQ3Status )
+Q3Ellipsoid_SetOrientation (TQ3GeometryObject ellipsoid,
+ const TQ3Vector3D * orientation);
+
+EXTERN_API_C( TQ3Status )
+Q3Ellipsoid_SetMajorRadius (TQ3GeometryObject ellipsoid,
+ const TQ3Vector3D * majorRadius);
+
+EXTERN_API_C( TQ3Status )
+Q3Ellipsoid_SetMinorRadius (TQ3GeometryObject ellipsoid,
+ const TQ3Vector3D * minorRadius);
+
+EXTERN_API_C( TQ3Status )
+Q3Ellipsoid_GetOrigin (TQ3GeometryObject ellipsoid,
+ TQ3Point3D * origin);
+
+EXTERN_API_C( TQ3Status )
+Q3Ellipsoid_GetOrientation (TQ3GeometryObject ellipsoid,
+ TQ3Vector3D * orientation);
+
+EXTERN_API_C( TQ3Status )
+Q3Ellipsoid_GetMajorRadius (TQ3GeometryObject ellipsoid,
+ TQ3Vector3D * majorRadius);
+
+EXTERN_API_C( TQ3Status )
+Q3Ellipsoid_GetMinorRadius (TQ3GeometryObject ellipsoid,
+ TQ3Vector3D * minorRadius);
+
+EXTERN_API_C( TQ3Status )
+Q3Ellipsoid_EmptyData (TQ3EllipsoidData * ellipsoidData);
+
+
+
+
+/******************************************************************************
+ ** **
+ ** General Polygon Data Structure Definitions **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+enum TQ3GeneralPolygonShapeHint {
+ kQ3GeneralPolygonShapeHintComplex = 0,
+ kQ3GeneralPolygonShapeHintConcave = 1,
+ kQ3GeneralPolygonShapeHintConvex = 2
+};
+typedef enum TQ3GeneralPolygonShapeHint TQ3GeneralPolygonShapeHint;
+
+
+struct TQ3GeneralPolygonContourData {
+ unsigned long numVertices;
+ TQ3Vertex3D * vertices;
+};
+typedef struct TQ3GeneralPolygonContourData TQ3GeneralPolygonContourData;
+
+struct TQ3GeneralPolygonData {
+ unsigned long numContours;
+ TQ3GeneralPolygonContourData * contours;
+ TQ3GeneralPolygonShapeHint shapeHint;
+ TQ3AttributeSet generalPolygonAttributeSet;
+};
+typedef struct TQ3GeneralPolygonData TQ3GeneralPolygonData;
+/******************************************************************************
+ ** **
+ ** General polygon Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3GeometryObject )
+Q3GeneralPolygon_New (const TQ3GeneralPolygonData * generalPolygonData);
+
+EXTERN_API_C( TQ3Status )
+Q3GeneralPolygon_Submit (const TQ3GeneralPolygonData * generalPolygonData,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3GeneralPolygon_SetData (TQ3GeometryObject generalPolygon,
+ const TQ3GeneralPolygonData * generalPolygonData);
+
+EXTERN_API_C( TQ3Status )
+Q3GeneralPolygon_GetData (TQ3GeometryObject polygon,
+ TQ3GeneralPolygonData * generalPolygonData);
+
+EXTERN_API_C( TQ3Status )
+Q3GeneralPolygon_EmptyData (TQ3GeneralPolygonData * generalPolygonData);
+
+EXTERN_API_C( TQ3Status )
+Q3GeneralPolygon_GetVertexPosition (TQ3GeometryObject generalPolygon,
+ unsigned long contourIndex,
+ unsigned long pointIndex,
+ TQ3Point3D * position);
+
+EXTERN_API_C( TQ3Status )
+Q3GeneralPolygon_SetVertexPosition (TQ3GeometryObject generalPolygon,
+ unsigned long contourIndex,
+ unsigned long pointIndex,
+ const TQ3Point3D * position);
+
+EXTERN_API_C( TQ3Status )
+Q3GeneralPolygon_GetVertexAttributeSet (TQ3GeometryObject generalPolygon,
+ unsigned long contourIndex,
+ unsigned long pointIndex,
+ TQ3AttributeSet * attributeSet);
+
+EXTERN_API_C( TQ3Status )
+Q3GeneralPolygon_SetVertexAttributeSet (TQ3GeometryObject generalPolygon,
+ unsigned long contourIndex,
+ unsigned long pointIndex,
+ TQ3AttributeSet attributeSet);
+
+EXTERN_API_C( TQ3Status )
+Q3GeneralPolygon_SetShapeHint (TQ3GeometryObject generalPolygon,
+ TQ3GeneralPolygonShapeHint shapeHint);
+
+EXTERN_API_C( TQ3Status )
+Q3GeneralPolygon_GetShapeHint (TQ3GeometryObject generalPolygon,
+ TQ3GeneralPolygonShapeHint * shapeHint);
+
+
+
+
+/******************************************************************************
+ ** **
+ ** Line Data Structure Definitions **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct TQ3LineData {
+ TQ3Vertex3D vertices[2];
+ TQ3AttributeSet lineAttributeSet;
+};
+typedef struct TQ3LineData TQ3LineData;
+/******************************************************************************
+ ** **
+ ** Line Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3GeometryObject )
+Q3Line_New (const TQ3LineData * lineData);
+
+EXTERN_API_C( TQ3Status )
+Q3Line_Submit (const TQ3LineData * lineData,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3Line_GetData (TQ3GeometryObject line,
+ TQ3LineData * lineData);
+
+EXTERN_API_C( TQ3Status )
+Q3Line_SetData (TQ3GeometryObject line,
+ const TQ3LineData * lineData);
+
+EXTERN_API_C( TQ3Status )
+Q3Line_GetVertexPosition (TQ3GeometryObject line,
+ unsigned long index,
+ TQ3Point3D * position);
+
+EXTERN_API_C( TQ3Status )
+Q3Line_SetVertexPosition (TQ3GeometryObject line,
+ unsigned long index,
+ const TQ3Point3D * position);
+
+EXTERN_API_C( TQ3Status )
+Q3Line_GetVertexAttributeSet (TQ3GeometryObject line,
+ unsigned long index,
+ TQ3AttributeSet * attributeSet);
+
+EXTERN_API_C( TQ3Status )
+Q3Line_SetVertexAttributeSet (TQ3GeometryObject line,
+ unsigned long index,
+ TQ3AttributeSet attributeSet);
+
+EXTERN_API_C( TQ3Status )
+Q3Line_EmptyData (TQ3LineData * lineData);
+
+
+
+
+/******************************************************************************
+ ** **
+ ** Marker Data Structure Definitions **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct TQ3MarkerData {
+ TQ3Point3D location;
+ long xOffset;
+ long yOffset;
+ TQ3Bitmap bitmap;
+ TQ3AttributeSet markerAttributeSet;
+};
+typedef struct TQ3MarkerData TQ3MarkerData;
+/******************************************************************************
+ ** **
+ ** Marker Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3GeometryObject )
+Q3Marker_New (const TQ3MarkerData * markerData);
+
+EXTERN_API_C( TQ3Status )
+Q3Marker_Submit (const TQ3MarkerData * markerData,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3Marker_SetData (TQ3GeometryObject geometry,
+ const TQ3MarkerData * markerData);
+
+EXTERN_API_C( TQ3Status )
+Q3Marker_GetData (TQ3GeometryObject geometry,
+ TQ3MarkerData * markerData);
+
+EXTERN_API_C( TQ3Status )
+Q3Marker_EmptyData (TQ3MarkerData * markerData);
+
+EXTERN_API_C( TQ3Status )
+Q3Marker_GetPosition (TQ3GeometryObject marker,
+ TQ3Point3D * location);
+
+EXTERN_API_C( TQ3Status )
+Q3Marker_SetPosition (TQ3GeometryObject marker,
+ const TQ3Point3D * location);
+
+EXTERN_API_C( TQ3Status )
+Q3Marker_GetXOffset (TQ3GeometryObject marker,
+ long * xOffset);
+
+EXTERN_API_C( TQ3Status )
+Q3Marker_SetXOffset (TQ3GeometryObject marker,
+ long xOffset);
+
+EXTERN_API_C( TQ3Status )
+Q3Marker_GetYOffset (TQ3GeometryObject marker,
+ long * yOffset);
+
+EXTERN_API_C( TQ3Status )
+Q3Marker_SetYOffset (TQ3GeometryObject marker,
+ long yOffset);
+
+EXTERN_API_C( TQ3Status )
+Q3Marker_GetBitmap (TQ3GeometryObject marker,
+ TQ3Bitmap * bitmap);
+
+EXTERN_API_C( TQ3Status )
+Q3Marker_SetBitmap (TQ3GeometryObject marker,
+ const TQ3Bitmap * bitmap);
+
+
+
+
+/******************************************************************************
+ ** **
+ ** Mesh Data Structure Definitions **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef struct OpaqueTQ3MeshComponent* TQ3MeshComponent;
+typedef struct OpaqueTQ3MeshVertex* TQ3MeshVertex;
+typedef struct OpaqueTQ3MeshFace* TQ3MeshFace;
+typedef struct OpaqueTQ3MeshEdge* TQ3MeshEdge;
+typedef struct OpaqueTQ3MeshContour* TQ3MeshContour;
+/******************************************************************************
+ ** **
+ ** Mesh Routines **
+ ** **
+ *****************************************************************************/
+/*
+ * Constructors
+ */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3GeometryObject )
+Q3Mesh_New (void);
+
+EXTERN_API_C( TQ3MeshVertex )
+Q3Mesh_VertexNew (TQ3GeometryObject mesh,
+ const TQ3Vertex3D * vertex);
+
+EXTERN_API_C( TQ3MeshFace )
+Q3Mesh_FaceNew (TQ3GeometryObject mesh,
+ unsigned long numVertices,
+ const TQ3MeshVertex * vertices,
+ TQ3AttributeSet attributeSet);
+
+/*
+ * Destructors
+ */
+EXTERN_API_C( TQ3Status )
+Q3Mesh_VertexDelete (TQ3GeometryObject mesh,
+ TQ3MeshVertex vertex);
+
+EXTERN_API_C( TQ3Status )
+Q3Mesh_FaceDelete (TQ3GeometryObject mesh,
+ TQ3MeshFace face);
+
+/*
+ * Methods
+ */
+EXTERN_API_C( TQ3Status )
+Q3Mesh_DelayUpdates (TQ3GeometryObject mesh);
+
+EXTERN_API_C( TQ3Status )
+Q3Mesh_ResumeUpdates (TQ3GeometryObject mesh);
+
+EXTERN_API_C( TQ3MeshContour )
+Q3Mesh_FaceToContour (TQ3GeometryObject mesh,
+ TQ3MeshFace containerFace,
+ TQ3MeshFace face);
+
+EXTERN_API_C( TQ3MeshFace )
+Q3Mesh_ContourToFace (TQ3GeometryObject mesh,
+ TQ3MeshContour contour);
+
+/*
+ * Mesh
+ */
+EXTERN_API_C( TQ3Status )
+Q3Mesh_GetNumComponents (TQ3GeometryObject mesh,
+ unsigned long * numComponents);
+
+EXTERN_API_C( TQ3Status )
+Q3Mesh_GetNumEdges (TQ3GeometryObject mesh,
+ unsigned long * numEdges);
+
+EXTERN_API_C( TQ3Status )
+Q3Mesh_GetNumVertices (TQ3GeometryObject mesh,
+ unsigned long * numVertices);
+
+EXTERN_API_C( TQ3Status )
+Q3Mesh_GetNumFaces (TQ3GeometryObject mesh,
+ unsigned long * numFaces);
+
+EXTERN_API_C( TQ3Status )
+Q3Mesh_GetNumCorners (TQ3GeometryObject mesh,
+ unsigned long * numCorners);
+
+EXTERN_API_C( TQ3Status )
+Q3Mesh_GetOrientable (TQ3GeometryObject mesh,
+ TQ3Boolean * orientable);
+
+/*
+ * Component
+ */
+EXTERN_API_C( TQ3Status )
+Q3Mesh_GetComponentNumVertices (TQ3GeometryObject mesh,
+ TQ3MeshComponent component,
+ unsigned long * numVertices);
+
+EXTERN_API_C( TQ3Status )
+Q3Mesh_GetComponentNumEdges (TQ3GeometryObject mesh,
+ TQ3MeshComponent component,
+ unsigned long * numEdges);
+
+EXTERN_API_C( TQ3Status )
+Q3Mesh_GetComponentBoundingBox (TQ3GeometryObject mesh,
+ TQ3MeshComponent component,
+ TQ3BoundingBox * boundingBox);
+
+EXTERN_API_C( TQ3Status )
+Q3Mesh_GetComponentOrientable (TQ3GeometryObject mesh,
+ TQ3MeshComponent component,
+ TQ3Boolean * orientable);
+
+/*
+ * Vertex
+ */
+EXTERN_API_C( TQ3Status )
+Q3Mesh_GetVertexCoordinates (TQ3GeometryObject mesh,
+ TQ3MeshVertex vertex,
+ TQ3Point3D * coordinates);
+
+EXTERN_API_C( TQ3Status )
+Q3Mesh_GetVertexIndex (TQ3GeometryObject mesh,
+ TQ3MeshVertex vertex,
+ unsigned long * index);
+
+EXTERN_API_C( TQ3Status )
+Q3Mesh_GetVertexOnBoundary (TQ3GeometryObject mesh,
+ TQ3MeshVertex vertex,
+ TQ3Boolean * onBoundary);
+
+EXTERN_API_C( TQ3Status )
+Q3Mesh_GetVertexComponent (TQ3GeometryObject mesh,
+ TQ3MeshVertex vertex,
+ TQ3MeshComponent * component);
+
+EXTERN_API_C( TQ3Status )
+Q3Mesh_GetVertexAttributeSet (TQ3GeometryObject mesh,
+ TQ3MeshVertex vertex,
+ TQ3AttributeSet * attributeSet);
+
+
+EXTERN_API_C( TQ3Status )
+Q3Mesh_SetVertexCoordinates (TQ3GeometryObject mesh,
+ TQ3MeshVertex vertex,
+ const TQ3Point3D * coordinates);
+
+EXTERN_API_C( TQ3Status )
+Q3Mesh_SetVertexAttributeSet (TQ3GeometryObject mesh,
+ TQ3MeshVertex vertex,
+ TQ3AttributeSet attributeSet);
+
+
+/*
+ * Face
+ */
+EXTERN_API_C( TQ3Status )
+Q3Mesh_GetFaceNumVertices (TQ3GeometryObject mesh,
+ TQ3MeshFace face,
+ unsigned long * numVertices);
+
+EXTERN_API_C( TQ3Status )
+Q3Mesh_GetFacePlaneEquation (TQ3GeometryObject mesh,
+ TQ3MeshFace face,
+ TQ3PlaneEquation * planeEquation);
+
+EXTERN_API_C( TQ3Status )
+Q3Mesh_GetFaceNumContours (TQ3GeometryObject mesh,
+ TQ3MeshFace face,
+ unsigned long * numContours);
+
+EXTERN_API_C( TQ3Status )
+Q3Mesh_GetFaceIndex (TQ3GeometryObject mesh,
+ TQ3MeshFace face,
+ unsigned long * index);
+
+EXTERN_API_C( TQ3Status )
+Q3Mesh_GetFaceComponent (TQ3GeometryObject mesh,
+ TQ3MeshFace face,
+ TQ3MeshComponent * component);
+
+EXTERN_API_C( TQ3Status )
+Q3Mesh_GetFaceAttributeSet (TQ3GeometryObject mesh,
+ TQ3MeshFace face,
+ TQ3AttributeSet * attributeSet);
+
+
+EXTERN_API_C( TQ3Status )
+Q3Mesh_SetFaceAttributeSet (TQ3GeometryObject mesh,
+ TQ3MeshFace face,
+ TQ3AttributeSet attributeSet);
+
+/*
+ * Edge
+ */
+EXTERN_API_C( TQ3Status )
+Q3Mesh_GetEdgeVertices (TQ3GeometryObject mesh,
+ TQ3MeshEdge edge,
+ TQ3MeshVertex * vertex1,
+ TQ3MeshVertex * vertex2);
+
+EXTERN_API_C( TQ3Status )
+Q3Mesh_GetEdgeFaces (TQ3GeometryObject mesh,
+ TQ3MeshEdge edge,
+ TQ3MeshFace * face1,
+ TQ3MeshFace * face2);
+
+EXTERN_API_C( TQ3Status )
+Q3Mesh_GetEdgeOnBoundary (TQ3GeometryObject mesh,
+ TQ3MeshEdge edge,
+ TQ3Boolean * onBoundary);
+
+EXTERN_API_C( TQ3Status )
+Q3Mesh_GetEdgeComponent (TQ3GeometryObject mesh,
+ TQ3MeshEdge edge,
+ TQ3MeshComponent * component);
+
+EXTERN_API_C( TQ3Status )
+Q3Mesh_GetEdgeAttributeSet (TQ3GeometryObject mesh,
+ TQ3MeshEdge edge,
+ TQ3AttributeSet * attributeSet);
+
+
+EXTERN_API_C( TQ3Status )
+Q3Mesh_SetEdgeAttributeSet (TQ3GeometryObject mesh,
+ TQ3MeshEdge edge,
+ TQ3AttributeSet attributeSet);
+
+/*
+ * Contour
+ */
+EXTERN_API_C( TQ3Status )
+Q3Mesh_GetContourFace (TQ3GeometryObject mesh,
+ TQ3MeshContour contour,
+ TQ3MeshFace * face);
+
+EXTERN_API_C( TQ3Status )
+Q3Mesh_GetContourNumVertices (TQ3GeometryObject mesh,
+ TQ3MeshContour contour,
+ unsigned long * numVertices);
+
+/*
+ * Corner
+ */
+EXTERN_API_C( TQ3Status )
+Q3Mesh_GetCornerAttributeSet (TQ3GeometryObject mesh,
+ TQ3MeshVertex vertex,
+ TQ3MeshFace face,
+ TQ3AttributeSet * attributeSet);
+
+EXTERN_API_C( TQ3Status )
+Q3Mesh_SetCornerAttributeSet (TQ3GeometryObject mesh,
+ TQ3MeshVertex vertex,
+ TQ3MeshFace face,
+ TQ3AttributeSet attributeSet);
+
+
+/*
+ * Public Mesh Iterators
+ */
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct TQ3MeshIterator {
+ void * var1;
+ void * var2;
+ void * var3;
+ struct {
+ void * field1;
+ char field2[4];
+ } var4;
+};
+typedef struct TQ3MeshIterator TQ3MeshIterator;
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3MeshComponent )
+Q3Mesh_FirstMeshComponent (TQ3GeometryObject mesh,
+ TQ3MeshIterator * iterator);
+
+EXTERN_API_C( TQ3MeshComponent )
+Q3Mesh_NextMeshComponent (TQ3MeshIterator * iterator);
+
+EXTERN_API_C( TQ3MeshVertex )
+Q3Mesh_FirstComponentVertex (TQ3MeshComponent component,
+ TQ3MeshIterator * iterator);
+
+EXTERN_API_C( TQ3MeshVertex )
+Q3Mesh_NextComponentVertex (TQ3MeshIterator * iterator);
+
+EXTERN_API_C( TQ3MeshEdge )
+Q3Mesh_FirstComponentEdge (TQ3MeshComponent component,
+ TQ3MeshIterator * iterator);
+
+EXTERN_API_C( TQ3MeshEdge )
+Q3Mesh_NextComponentEdge (TQ3MeshIterator * iterator);
+
+EXTERN_API_C( TQ3MeshVertex )
+Q3Mesh_FirstMeshVertex (TQ3GeometryObject mesh,
+ TQ3MeshIterator * iterator);
+
+EXTERN_API_C( TQ3MeshVertex )
+Q3Mesh_NextMeshVertex (TQ3MeshIterator * iterator);
+
+EXTERN_API_C( TQ3MeshFace )
+Q3Mesh_FirstMeshFace (TQ3GeometryObject mesh,
+ TQ3MeshIterator * iterator);
+
+EXTERN_API_C( TQ3MeshFace )
+Q3Mesh_NextMeshFace (TQ3MeshIterator * iterator);
+
+EXTERN_API_C( TQ3MeshEdge )
+Q3Mesh_FirstMeshEdge (TQ3GeometryObject mesh,
+ TQ3MeshIterator * iterator);
+
+EXTERN_API_C( TQ3MeshEdge )
+Q3Mesh_NextMeshEdge (TQ3MeshIterator * iterator);
+
+EXTERN_API_C( TQ3MeshEdge )
+Q3Mesh_FirstVertexEdge (TQ3MeshVertex vertex,
+ TQ3MeshIterator * iterator);
+
+EXTERN_API_C( TQ3MeshEdge )
+Q3Mesh_NextVertexEdge (TQ3MeshIterator * iterator);
+
+EXTERN_API_C( TQ3MeshVertex )
+Q3Mesh_FirstVertexVertex (TQ3MeshVertex vertex,
+ TQ3MeshIterator * iterator);
+
+EXTERN_API_C( TQ3MeshVertex )
+Q3Mesh_NextVertexVertex (TQ3MeshIterator * iterator);
+
+EXTERN_API_C( TQ3MeshFace )
+Q3Mesh_FirstVertexFace (TQ3MeshVertex vertex,
+ TQ3MeshIterator * iterator);
+
+EXTERN_API_C( TQ3MeshFace )
+Q3Mesh_NextVertexFace (TQ3MeshIterator * iterator);
+
+EXTERN_API_C( TQ3MeshEdge )
+Q3Mesh_FirstFaceEdge (TQ3MeshFace face,
+ TQ3MeshIterator * iterator);
+
+EXTERN_API_C( TQ3MeshEdge )
+Q3Mesh_NextFaceEdge (TQ3MeshIterator * iterator);
+
+EXTERN_API_C( TQ3MeshVertex )
+Q3Mesh_FirstFaceVertex (TQ3MeshFace face,
+ TQ3MeshIterator * iterator);
+
+EXTERN_API_C( TQ3MeshVertex )
+Q3Mesh_NextFaceVertex (TQ3MeshIterator * iterator);
+
+EXTERN_API_C( TQ3MeshFace )
+Q3Mesh_FirstFaceFace (TQ3MeshFace face,
+ TQ3MeshIterator * iterator);
+
+EXTERN_API_C( TQ3MeshFace )
+Q3Mesh_NextFaceFace (TQ3MeshIterator * iterator);
+
+EXTERN_API_C( TQ3MeshContour )
+Q3Mesh_FirstFaceContour (TQ3MeshFace face,
+ TQ3MeshIterator * iterator);
+
+EXTERN_API_C( TQ3MeshContour )
+Q3Mesh_NextFaceContour (TQ3MeshIterator * iterator);
+
+EXTERN_API_C( TQ3MeshEdge )
+Q3Mesh_FirstContourEdge (TQ3MeshContour contour,
+ TQ3MeshIterator * iterator);
+
+EXTERN_API_C( TQ3MeshEdge )
+Q3Mesh_NextContourEdge (TQ3MeshIterator * iterator);
+
+EXTERN_API_C( TQ3MeshVertex )
+Q3Mesh_FirstContourVertex (TQ3MeshContour contour,
+ TQ3MeshIterator * iterator);
+
+EXTERN_API_C( TQ3MeshVertex )
+Q3Mesh_NextContourVertex (TQ3MeshIterator * iterator);
+
+EXTERN_API_C( TQ3MeshFace )
+Q3Mesh_FirstContourFace (TQ3MeshContour contour,
+ TQ3MeshIterator * iterator);
+
+EXTERN_API_C( TQ3MeshFace )
+Q3Mesh_NextContourFace (TQ3MeshIterator * iterator);
+
+
+#define Q3ForEachMeshComponent(m,c,i) \
+ for ( (c) = Q3Mesh_FirstMeshComponent((m),(i)); \
+ (c); \
+ (c) = Q3Mesh_NextMeshComponent((i)) )
+
+#define Q3ForEachComponentVertex(c,v,i) \
+ for ( (v) = Q3Mesh_FirstComponentVertex((c),(i)); \
+ (v); \
+ (v) = Q3Mesh_NextComponentVertex((i)) )
+
+#define Q3ForEachComponentEdge(c,e,i) \
+ for ( (e) = Q3Mesh_FirstComponentEdge((c),(i)); \
+ (e); \
+ (e) = Q3Mesh_NextComponentEdge((i)) )
+
+#define Q3ForEachMeshVertex(m,v,i) \
+ for ( (v) = Q3Mesh_FirstMeshVertex((m),(i)); \
+ (v); \
+ (v) = Q3Mesh_NextMeshVertex((i)) )
+
+#define Q3ForEachMeshFace(m,f,i) \
+ for ( (f) = Q3Mesh_FirstMeshFace((m),(i)); \
+ (f); \
+ (f) = Q3Mesh_NextMeshFace((i)) )
+
+#define Q3ForEachMeshEdge(m,e,i) \
+ for ( (e) = Q3Mesh_FirstMeshEdge((m),(i)); \
+ (e); \
+ (e) = Q3Mesh_NextMeshEdge((i)) )
+
+#define Q3ForEachVertexEdge(v,e,i) \
+ for ( (e) = Q3Mesh_FirstVertexEdge((v),(i)); \
+ (e); \
+ (e) = Q3Mesh_NextVertexEdge((i)) )
+
+
+#define Q3ForEachVertexVertex(v,n,i) \
+ for ( (n) = Q3Mesh_FirstVertexVertex((v),(i)); \
+ (n); \
+ (n) = Q3Mesh_NextVertexVertex((i)) )
+
+#define Q3ForEachVertexFace(v,f,i) \
+ for ( (f) = Q3Mesh_FirstVertexFace((v),(i)); \
+ (f); \
+ (f) = Q3Mesh_NextVertexFace((i)) )
+
+#define Q3ForEachFaceEdge(f,e,i) \
+ for ( (e) = Q3Mesh_FirstFaceEdge((f),(i)); \
+ (e); \
+ (e) = Q3Mesh_NextFaceEdge((i)) )
+
+#define Q3ForEachFaceVertex(f,v,i) \
+ for ( (v) = Q3Mesh_FirstFaceVertex((f),(i)); \
+ (v); \
+ (v) = Q3Mesh_NextFaceVertex((i)) )
+
+#define Q3ForEachFaceFace(f,n,i) \
+ for ( (n) = Q3Mesh_FirstFaceFace((f),(i)); \
+ (n); \
+ (n) = Q3Mesh_NextFaceFace((i)) )
+
+#define Q3ForEachFaceContour(f,h,i) \
+ for ( (h) = Q3Mesh_FirstFaceContour((f),(i)); \
+ (h); \
+ (h) = Q3Mesh_NextFaceContour((i)) )
+
+#define Q3ForEachContourEdge(h,e,i) \
+ for ( (e) = Q3Mesh_FirstContourEdge((h),(i)); \
+ (e); \
+ (e) = Q3Mesh_NextContourEdge((i)) )
+
+#define Q3ForEachContourVertex(h,v,i) \
+ for ( (v) = Q3Mesh_FirstContourVertex((h),(i)); \
+ (v); \
+ (v) = Q3Mesh_NextContourVertex((i)) )
+
+#define Q3ForEachContourFace(h,f,i) \
+ for ( (f) = Q3Mesh_FirstContourFace((h),(i)); \
+ (f); \
+ (f) = Q3Mesh_NextContourFace((i)) )
+
+
+
+/******************************************************************************
+ ** **
+ ** Maximum order for NURB Curves **
+ ** **
+ *****************************************************************************/
+#define kQ3NURBCurveMaxOrder 16
+
+/******************************************************************************
+ ** **
+ ** NURB Data Structure Definitions **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct TQ3NURBCurveData {
+ unsigned long order;
+ unsigned long numPoints;
+ TQ3RationalPoint4D * controlPoints;
+ float * knots;
+ TQ3AttributeSet curveAttributeSet;
+};
+typedef struct TQ3NURBCurveData TQ3NURBCurveData;
+/******************************************************************************
+ ** **
+ ** NURB Curve Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3GeometryObject )
+Q3NURBCurve_New (const TQ3NURBCurveData * curveData);
+
+EXTERN_API_C( TQ3Status )
+Q3NURBCurve_Submit (const TQ3NURBCurveData * curveData,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3NURBCurve_SetData (TQ3GeometryObject curve,
+ const TQ3NURBCurveData * nurbCurveData);
+
+EXTERN_API_C( TQ3Status )
+Q3NURBCurve_GetData (TQ3GeometryObject curve,
+ TQ3NURBCurveData * nurbCurveData);
+
+EXTERN_API_C( TQ3Status )
+Q3NURBCurve_EmptyData (TQ3NURBCurveData * nurbCurveData);
+
+EXTERN_API_C( TQ3Status )
+Q3NURBCurve_SetControlPoint (TQ3GeometryObject curve,
+ unsigned long pointIndex,
+ const TQ3RationalPoint4D * point4D);
+
+EXTERN_API_C( TQ3Status )
+Q3NURBCurve_GetControlPoint (TQ3GeometryObject curve,
+ unsigned long pointIndex,
+ TQ3RationalPoint4D * point4D);
+
+EXTERN_API_C( TQ3Status )
+Q3NURBCurve_SetKnot (TQ3GeometryObject curve,
+ unsigned long knotIndex,
+ float knotValue);
+
+EXTERN_API_C( TQ3Status )
+Q3NURBCurve_GetKnot (TQ3GeometryObject curve,
+ unsigned long knotIndex,
+ float * knotValue);
+
+
+/******************************************************************************
+ ** **
+ ** Maximum NURB Patch Order **
+ ** **
+ *****************************************************************************/
+#define kQ3NURBPatchMaxOrder 11
+/******************************************************************************
+ ** **
+ ** NURB Patch Data Structure Definitions **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct TQ3NURBPatchTrimCurveData {
+ unsigned long order;
+ unsigned long numPoints;
+ TQ3RationalPoint3D * controlPoints;
+ float * knots;
+};
+typedef struct TQ3NURBPatchTrimCurveData TQ3NURBPatchTrimCurveData;
+
+struct TQ3NURBPatchTrimLoopData {
+ unsigned long numTrimCurves;
+ TQ3NURBPatchTrimCurveData * trimCurves;
+};
+typedef struct TQ3NURBPatchTrimLoopData TQ3NURBPatchTrimLoopData;
+
+struct TQ3NURBPatchData {
+ unsigned long uOrder;
+ unsigned long vOrder;
+ unsigned long numRows;
+ unsigned long numColumns;
+ TQ3RationalPoint4D * controlPoints;
+ float * uKnots;
+ float * vKnots;
+ unsigned long numTrimLoops;
+ TQ3NURBPatchTrimLoopData * trimLoops;
+ TQ3AttributeSet patchAttributeSet;
+};
+typedef struct TQ3NURBPatchData TQ3NURBPatchData;
+/******************************************************************************
+ ** **
+ ** NURB Patch Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3GeometryObject )
+Q3NURBPatch_New (const TQ3NURBPatchData * nurbPatchData);
+
+EXTERN_API_C( TQ3Status )
+Q3NURBPatch_Submit (const TQ3NURBPatchData * nurbPatchData,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3NURBPatch_SetData (TQ3GeometryObject nurbPatch,
+ const TQ3NURBPatchData * nurbPatchData);
+
+EXTERN_API_C( TQ3Status )
+Q3NURBPatch_GetData (TQ3GeometryObject nurbPatch,
+ TQ3NURBPatchData * nurbPatchData);
+
+EXTERN_API_C( TQ3Status )
+Q3NURBPatch_SetControlPoint (TQ3GeometryObject nurbPatch,
+ unsigned long rowIndex,
+ unsigned long columnIndex,
+ const TQ3RationalPoint4D * point4D);
+
+EXTERN_API_C( TQ3Status )
+Q3NURBPatch_GetControlPoint (TQ3GeometryObject nurbPatch,
+ unsigned long rowIndex,
+ unsigned long columnIndex,
+ TQ3RationalPoint4D * point4D);
+
+EXTERN_API_C( TQ3Status )
+Q3NURBPatch_SetUKnot (TQ3GeometryObject nurbPatch,
+ unsigned long knotIndex,
+ float knotValue);
+
+EXTERN_API_C( TQ3Status )
+Q3NURBPatch_SetVKnot (TQ3GeometryObject nurbPatch,
+ unsigned long knotIndex,
+ float knotValue);
+
+EXTERN_API_C( TQ3Status )
+Q3NURBPatch_GetUKnot (TQ3GeometryObject nurbPatch,
+ unsigned long knotIndex,
+ float * knotValue);
+
+EXTERN_API_C( TQ3Status )
+Q3NURBPatch_GetVKnot (TQ3GeometryObject nurbPatch,
+ unsigned long knotIndex,
+ float * knotValue);
+
+EXTERN_API_C( TQ3Status )
+Q3NURBPatch_EmptyData (TQ3NURBPatchData * nurbPatchData);
+
+
+
+
+/******************************************************************************
+ ** **
+ ** Pixmap Marker Data Structure Definitions **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct TQ3PixmapMarkerData {
+ TQ3Point3D position;
+ long xOffset;
+ long yOffset;
+ TQ3StoragePixmap pixmap;
+ TQ3AttributeSet pixmapMarkerAttributeSet;
+};
+typedef struct TQ3PixmapMarkerData TQ3PixmapMarkerData;
+/******************************************************************************
+ ** **
+ ** Pixmap Marker Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3GeometryObject )
+Q3PixmapMarker_New (const TQ3PixmapMarkerData * pixmapMarkerData);
+
+EXTERN_API_C( TQ3Status )
+Q3PixmapMarker_Submit (const TQ3PixmapMarkerData * pixmapMarkerData,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3PixmapMarker_SetData (TQ3GeometryObject geometry,
+ const TQ3PixmapMarkerData * pixmapMarkerData);
+
+EXTERN_API_C( TQ3Status )
+Q3PixmapMarker_GetData (TQ3GeometryObject geometry,
+ TQ3PixmapMarkerData * pixmapMarkerData);
+
+EXTERN_API_C( TQ3Status )
+Q3PixmapMarker_EmptyData (TQ3PixmapMarkerData * pixmapMarkerData);
+
+EXTERN_API_C( TQ3Status )
+Q3PixmapMarker_GetPosition (TQ3GeometryObject pixmapMarker,
+ TQ3Point3D * position);
+
+EXTERN_API_C( TQ3Status )
+Q3PixmapMarker_SetPosition (TQ3GeometryObject pixmapMarker,
+ const TQ3Point3D * position);
+
+EXTERN_API_C( TQ3Status )
+Q3PixmapMarker_GetXOffset (TQ3GeometryObject pixmapMarker,
+ long * xOffset);
+
+EXTERN_API_C( TQ3Status )
+Q3PixmapMarker_SetXOffset (TQ3GeometryObject pixmapMarker,
+ long xOffset);
+
+EXTERN_API_C( TQ3Status )
+Q3PixmapMarker_GetYOffset (TQ3GeometryObject pixmapMarker,
+ long * yOffset);
+
+EXTERN_API_C( TQ3Status )
+Q3PixmapMarker_SetYOffset (TQ3GeometryObject pixmapMarker,
+ long yOffset);
+
+EXTERN_API_C( TQ3Status )
+Q3PixmapMarker_GetPixmap (TQ3GeometryObject pixmapMarker,
+ TQ3StoragePixmap * pixmap);
+
+EXTERN_API_C( TQ3Status )
+Q3PixmapMarker_SetPixmap (TQ3GeometryObject pixmapMarker,
+ const TQ3StoragePixmap * pixmap);
+
+
+
+
+/******************************************************************************
+ ** **
+ ** Point Data Structure Definitions **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct TQ3PointData {
+ TQ3Point3D point;
+ TQ3AttributeSet pointAttributeSet;
+};
+typedef struct TQ3PointData TQ3PointData;
+/******************************************************************************
+ ** **
+ ** Point Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3GeometryObject )
+Q3Point_New (const TQ3PointData * pointData);
+
+EXTERN_API_C( TQ3Status )
+Q3Point_Submit (const TQ3PointData * pointData,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3Point_GetData (TQ3GeometryObject point,
+ TQ3PointData * pointData);
+
+EXTERN_API_C( TQ3Status )
+Q3Point_SetData (TQ3GeometryObject point,
+ const TQ3PointData * pointData);
+
+EXTERN_API_C( TQ3Status )
+Q3Point_EmptyData (TQ3PointData * pointData);
+
+EXTERN_API_C( TQ3Status )
+Q3Point_SetPosition (TQ3GeometryObject point,
+ const TQ3Point3D * position);
+
+EXTERN_API_C( TQ3Status )
+Q3Point_GetPosition (TQ3GeometryObject point,
+ TQ3Point3D * position);
+
+
+
+
+/******************************************************************************
+ ** **
+ ** Polygon Data Structure Definitions **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct TQ3PolygonData {
+ unsigned long numVertices;
+ TQ3Vertex3D * vertices;
+ TQ3AttributeSet polygonAttributeSet;
+};
+typedef struct TQ3PolygonData TQ3PolygonData;
+/******************************************************************************
+ ** **
+ ** Polygon Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3GeometryObject )
+Q3Polygon_New (const TQ3PolygonData * polygonData);
+
+EXTERN_API_C( TQ3Status )
+Q3Polygon_Submit (const TQ3PolygonData * polygonData,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3Polygon_SetData (TQ3GeometryObject polygon,
+ const TQ3PolygonData * polygonData);
+
+EXTERN_API_C( TQ3Status )
+Q3Polygon_GetData (TQ3GeometryObject polygon,
+ TQ3PolygonData * polygonData);
+
+EXTERN_API_C( TQ3Status )
+Q3Polygon_EmptyData (TQ3PolygonData * polygonData);
+
+EXTERN_API_C( TQ3Status )
+Q3Polygon_GetVertexPosition (TQ3GeometryObject polygon,
+ unsigned long index,
+ TQ3Point3D * point);
+
+EXTERN_API_C( TQ3Status )
+Q3Polygon_SetVertexPosition (TQ3GeometryObject polygon,
+ unsigned long index,
+ const TQ3Point3D * point);
+
+EXTERN_API_C( TQ3Status )
+Q3Polygon_GetVertexAttributeSet (TQ3GeometryObject polygon,
+ unsigned long index,
+ TQ3AttributeSet * attributeSet);
+
+EXTERN_API_C( TQ3Status )
+Q3Polygon_SetVertexAttributeSet (TQ3GeometryObject polygon,
+ unsigned long index,
+ TQ3AttributeSet attributeSet);
+
+
+
+
+/******************************************************************************
+ ** **
+ ** Polyhedron Data Structure Definitions **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+enum TQ3PolyhedronEdgeMasks {
+ kQ3PolyhedronEdgeNone = 0,
+ kQ3PolyhedronEdge01 = 1 << 0,
+ kQ3PolyhedronEdge12 = 1 << 1,
+ kQ3PolyhedronEdge20 = 1 << 2,
+ kQ3PolyhedronEdgeAll = kQ3PolyhedronEdge01 | kQ3PolyhedronEdge12 | kQ3PolyhedronEdge20
+};
+typedef enum TQ3PolyhedronEdgeMasks TQ3PolyhedronEdgeMasks;
+
+
+typedef unsigned long TQ3PolyhedronEdge;
+
+struct TQ3PolyhedronEdgeData {
+ unsigned long vertexIndices[2];
+ unsigned long triangleIndices[2];
+ TQ3AttributeSet edgeAttributeSet;
+};
+typedef struct TQ3PolyhedronEdgeData TQ3PolyhedronEdgeData;
+
+struct TQ3PolyhedronTriangleData {
+ unsigned long vertexIndices[3];
+ TQ3PolyhedronEdge edgeFlag;
+ TQ3AttributeSet triangleAttributeSet;
+};
+typedef struct TQ3PolyhedronTriangleData TQ3PolyhedronTriangleData;
+
+struct TQ3PolyhedronData {
+ unsigned long numVertices;
+ TQ3Vertex3D * vertices;
+ unsigned long numEdges;
+ TQ3PolyhedronEdgeData * edges;
+ unsigned long numTriangles;
+ TQ3PolyhedronTriangleData * triangles;
+ TQ3AttributeSet polyhedronAttributeSet;
+};
+typedef struct TQ3PolyhedronData TQ3PolyhedronData;
+/******************************************************************************
+ ** **
+ ** Polyhedron Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3GeometryObject )
+Q3Polyhedron_New (const TQ3PolyhedronData * polyhedronData);
+
+EXTERN_API_C( TQ3Status )
+Q3Polyhedron_Submit (const TQ3PolyhedronData * polyhedronData,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3Polyhedron_SetData (TQ3GeometryObject polyhedron,
+ const TQ3PolyhedronData * polyhedronData);
+
+EXTERN_API_C( TQ3Status )
+Q3Polyhedron_GetData (TQ3GeometryObject polyhedron,
+ TQ3PolyhedronData * polyhedronData);
+
+EXTERN_API_C( TQ3Status )
+Q3Polyhedron_EmptyData (TQ3PolyhedronData * polyhedronData);
+
+EXTERN_API_C( TQ3Status )
+Q3Polyhedron_SetVertexPosition (TQ3GeometryObject polyhedron,
+ unsigned long index,
+ const TQ3Point3D * point);
+
+EXTERN_API_C( TQ3Status )
+Q3Polyhedron_GetVertexPosition (TQ3GeometryObject polyhedron,
+ unsigned long index,
+ TQ3Point3D * point);
+
+EXTERN_API_C( TQ3Status )
+Q3Polyhedron_SetVertexAttributeSet (TQ3GeometryObject polyhedron,
+ unsigned long index,
+ TQ3AttributeSet attributeSet);
+
+EXTERN_API_C( TQ3Status )
+Q3Polyhedron_GetVertexAttributeSet (TQ3GeometryObject polyhedron,
+ unsigned long index,
+ TQ3AttributeSet * attributeSet);
+
+EXTERN_API_C( TQ3Status )
+Q3Polyhedron_GetTriangleData (TQ3GeometryObject polyhedron,
+ unsigned long triangleIndex,
+ TQ3PolyhedronTriangleData * triangleData);
+
+EXTERN_API_C( TQ3Status )
+Q3Polyhedron_SetTriangleData (TQ3GeometryObject polyhedron,
+ unsigned long triangleIndex,
+ const TQ3PolyhedronTriangleData * triangleData);
+
+EXTERN_API_C( TQ3Status )
+Q3Polyhedron_GetEdgeData (TQ3GeometryObject polyhedron,
+ unsigned long edgeIndex,
+ TQ3PolyhedronEdgeData * edgeData);
+
+EXTERN_API_C( TQ3Status )
+Q3Polyhedron_SetEdgeData (TQ3GeometryObject polyhedron,
+ unsigned long edgeIndex,
+ const TQ3PolyhedronEdgeData * edgeData);
+
+
+
+
+/******************************************************************************
+ ** **
+ ** PolyLine Data Structure Definitions **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct TQ3PolyLineData {
+ unsigned long numVertices;
+ TQ3Vertex3D * vertices;
+ TQ3AttributeSet * segmentAttributeSet;
+ TQ3AttributeSet polyLineAttributeSet;
+};
+typedef struct TQ3PolyLineData TQ3PolyLineData;
+/******************************************************************************
+ ** **
+ ** PolyLine Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3GeometryObject )
+Q3PolyLine_New (const TQ3PolyLineData * polylineData);
+
+EXTERN_API_C( TQ3Status )
+Q3PolyLine_Submit (const TQ3PolyLineData * polyLineData,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3PolyLine_SetData (TQ3GeometryObject polyLine,
+ const TQ3PolyLineData * polyLineData);
+
+EXTERN_API_C( TQ3Status )
+Q3PolyLine_GetData (TQ3GeometryObject polyLine,
+ TQ3PolyLineData * polyLineData);
+
+EXTERN_API_C( TQ3Status )
+Q3PolyLine_EmptyData (TQ3PolyLineData * polyLineData);
+
+EXTERN_API_C( TQ3Status )
+Q3PolyLine_GetVertexPosition (TQ3GeometryObject polyLine,
+ unsigned long index,
+ TQ3Point3D * position);
+
+EXTERN_API_C( TQ3Status )
+Q3PolyLine_SetVertexPosition (TQ3GeometryObject polyLine,
+ unsigned long index,
+ const TQ3Point3D * position);
+
+EXTERN_API_C( TQ3Status )
+Q3PolyLine_GetVertexAttributeSet (TQ3GeometryObject polyLine,
+ unsigned long index,
+ TQ3AttributeSet * attributeSet);
+
+EXTERN_API_C( TQ3Status )
+Q3PolyLine_SetVertexAttributeSet (TQ3GeometryObject polyLine,
+ unsigned long index,
+ TQ3AttributeSet attributeSet);
+
+EXTERN_API_C( TQ3Status )
+Q3PolyLine_GetSegmentAttributeSet (TQ3GeometryObject polyLine,
+ unsigned long index,
+ TQ3AttributeSet * attributeSet);
+
+EXTERN_API_C( TQ3Status )
+Q3PolyLine_SetSegmentAttributeSet (TQ3GeometryObject polyLine,
+ unsigned long index,
+ TQ3AttributeSet attributeSet);
+
+
+
+
+
+/******************************************************************************
+ ** **
+ ** Torus Data Structure Definitions **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct TQ3TorusData {
+ TQ3Point3D origin;
+ TQ3Vector3D orientation;
+ TQ3Vector3D majorRadius;
+ TQ3Vector3D minorRadius;
+ float ratio;
+ float uMin;
+ float uMax;
+ float vMin;
+ float vMax;
+ TQ3EndCap caps;
+ TQ3AttributeSet interiorAttributeSet;
+ TQ3AttributeSet torusAttributeSet;
+};
+typedef struct TQ3TorusData TQ3TorusData;
+/******************************************************************************
+ ** **
+ ** Torus Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3GeometryObject )
+Q3Torus_New (const TQ3TorusData * torusData);
+
+EXTERN_API_C( TQ3Status )
+Q3Torus_Submit (const TQ3TorusData * torusData,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3Torus_SetData (TQ3GeometryObject torus,
+ const TQ3TorusData * torusData);
+
+EXTERN_API_C( TQ3Status )
+Q3Torus_GetData (TQ3GeometryObject torus,
+ TQ3TorusData * torusData);
+
+EXTERN_API_C( TQ3Status )
+Q3Torus_SetOrigin (TQ3GeometryObject torus,
+ const TQ3Point3D * origin);
+
+EXTERN_API_C( TQ3Status )
+Q3Torus_SetOrientation (TQ3GeometryObject torus,
+ const TQ3Vector3D * orientation);
+
+EXTERN_API_C( TQ3Status )
+Q3Torus_SetMajorRadius (TQ3GeometryObject torus,
+ const TQ3Vector3D * majorRadius);
+
+EXTERN_API_C( TQ3Status )
+Q3Torus_SetMinorRadius (TQ3GeometryObject torus,
+ const TQ3Vector3D * minorRadius);
+
+EXTERN_API_C( TQ3Status )
+Q3Torus_SetRatio (TQ3GeometryObject torus,
+ float ratio);
+
+EXTERN_API_C( TQ3Status )
+Q3Torus_GetOrigin (TQ3GeometryObject torus,
+ TQ3Point3D * origin);
+
+EXTERN_API_C( TQ3Status )
+Q3Torus_GetOrientation (TQ3GeometryObject torus,
+ TQ3Vector3D * orientation);
+
+EXTERN_API_C( TQ3Status )
+Q3Torus_GetMajorRadius (TQ3GeometryObject torus,
+ TQ3Vector3D * majorRadius);
+
+EXTERN_API_C( TQ3Status )
+Q3Torus_GetMinorRadius (TQ3GeometryObject torus,
+ TQ3Vector3D * minorRadius);
+
+EXTERN_API_C( TQ3Status )
+Q3Torus_GetRatio (TQ3GeometryObject torus,
+ float * ratio);
+
+EXTERN_API_C( TQ3Status )
+Q3Torus_EmptyData (TQ3TorusData * torusData);
+
+
+
+
+/******************************************************************************
+ ** **
+ ** Triangle Data Structure Definitions **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct TQ3TriangleData {
+ TQ3Vertex3D vertices[3];
+ TQ3AttributeSet triangleAttributeSet;
+};
+typedef struct TQ3TriangleData TQ3TriangleData;
+/******************************************************************************
+ ** **
+ ** Triangle Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3GeometryObject )
+Q3Triangle_New (const TQ3TriangleData * triangleData);
+
+EXTERN_API_C( TQ3Status )
+Q3Triangle_Submit (const TQ3TriangleData * triangleData,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3Triangle_SetData (TQ3GeometryObject triangle,
+ const TQ3TriangleData * triangleData);
+
+EXTERN_API_C( TQ3Status )
+Q3Triangle_GetData (TQ3GeometryObject triangle,
+ TQ3TriangleData * triangleData);
+
+EXTERN_API_C( TQ3Status )
+Q3Triangle_EmptyData (TQ3TriangleData * triangleData);
+
+EXTERN_API_C( TQ3Status )
+Q3Triangle_GetVertexPosition (TQ3GeometryObject triangle,
+ unsigned long index,
+ TQ3Point3D * point);
+
+EXTERN_API_C( TQ3Status )
+Q3Triangle_SetVertexPosition (TQ3GeometryObject triangle,
+ unsigned long index,
+ const TQ3Point3D * point);
+
+EXTERN_API_C( TQ3Status )
+Q3Triangle_GetVertexAttributeSet (TQ3GeometryObject triangle,
+ unsigned long index,
+ TQ3AttributeSet * attributeSet);
+
+EXTERN_API_C( TQ3Status )
+Q3Triangle_SetVertexAttributeSet (TQ3GeometryObject triangle,
+ unsigned long index,
+ TQ3AttributeSet attributeSet);
+
+
+
+
+/******************************************************************************
+ ** **
+ ** TriGrid Data Structure Definitions **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct TQ3TriGridData {
+ unsigned long numRows;
+ unsigned long numColumns;
+ TQ3Vertex3D * vertices;
+ TQ3AttributeSet * facetAttributeSet;
+ TQ3AttributeSet triGridAttributeSet;
+};
+typedef struct TQ3TriGridData TQ3TriGridData;
+/******************************************************************************
+ ** **
+ ** TriGrid Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3GeometryObject )
+Q3TriGrid_New (const TQ3TriGridData * triGridData);
+
+EXTERN_API_C( TQ3Status )
+Q3TriGrid_Submit (const TQ3TriGridData * triGridData,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3TriGrid_SetData (TQ3GeometryObject triGrid,
+ const TQ3TriGridData * triGridData);
+
+EXTERN_API_C( TQ3Status )
+Q3TriGrid_GetData (TQ3GeometryObject triGrid,
+ TQ3TriGridData * triGridData);
+
+EXTERN_API_C( TQ3Status )
+Q3TriGrid_EmptyData (TQ3TriGridData * triGridData);
+
+EXTERN_API_C( TQ3Status )
+Q3TriGrid_GetVertexPosition (TQ3GeometryObject triGrid,
+ unsigned long rowIndex,
+ unsigned long columnIndex,
+ TQ3Point3D * position);
+
+EXTERN_API_C( TQ3Status )
+Q3TriGrid_SetVertexPosition (TQ3GeometryObject triGrid,
+ unsigned long rowIndex,
+ unsigned long columnIndex,
+ const TQ3Point3D * position);
+
+EXTERN_API_C( TQ3Status )
+Q3TriGrid_GetVertexAttributeSet (TQ3GeometryObject triGrid,
+ unsigned long rowIndex,
+ unsigned long columnIndex,
+ TQ3AttributeSet * attributeSet);
+
+EXTERN_API_C( TQ3Status )
+Q3TriGrid_SetVertexAttributeSet (TQ3GeometryObject triGrid,
+ unsigned long rowIndex,
+ unsigned long columnIndex,
+ TQ3AttributeSet attributeSet);
+
+EXTERN_API_C( TQ3Status )
+Q3TriGrid_GetFacetAttributeSet (TQ3GeometryObject triGrid,
+ unsigned long faceIndex,
+ TQ3AttributeSet * facetAttributeSet);
+
+EXTERN_API_C( TQ3Status )
+Q3TriGrid_SetFacetAttributeSet (TQ3GeometryObject triGrid,
+ unsigned long faceIndex,
+ TQ3AttributeSet facetAttributeSet);
+
+
+
+
+/******************************************************************************
+ ** **
+ ** TriMesh Data Structure Definitions **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct TQ3TriMeshTriangleData {
+ unsigned long pointIndices[3];
+};
+typedef struct TQ3TriMeshTriangleData TQ3TriMeshTriangleData;
+
+struct TQ3TriMeshEdgeData {
+ unsigned long pointIndices[2];
+ unsigned long triangleIndices[2];
+};
+typedef struct TQ3TriMeshEdgeData TQ3TriMeshEdgeData;
+
+struct TQ3TriMeshAttributeData {
+ TQ3AttributeType attributeType; /* The type of attribute */
+ void * data; /* Pointer to the contiguous */
+ /* attribute data. */
+ char * attributeUseArray; /* This is only used with custom */
+ /* attributes */
+};
+typedef struct TQ3TriMeshAttributeData TQ3TriMeshAttributeData;
+
+struct TQ3TriMeshData {
+ TQ3AttributeSet triMeshAttributeSet;
+
+ unsigned long numTriangles;
+ TQ3TriMeshTriangleData * triangles;
+
+ unsigned long numTriangleAttributeTypes;
+ TQ3TriMeshAttributeData * triangleAttributeTypes;
+
+ unsigned long numEdges;
+ TQ3TriMeshEdgeData * edges;
+
+ unsigned long numEdgeAttributeTypes;
+ TQ3TriMeshAttributeData * edgeAttributeTypes;
+
+ unsigned long numPoints;
+ TQ3Point3D * points;
+
+ unsigned long numVertexAttributeTypes;
+ TQ3TriMeshAttributeData * vertexAttributeTypes;
+
+ TQ3BoundingBox bBox;
+};
+typedef struct TQ3TriMeshData TQ3TriMeshData;
+/******************************************************************************
+ ** **
+ ** TriMesh Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3GeometryObject )
+Q3TriMesh_New (const TQ3TriMeshData * triMeshData);
+
+EXTERN_API_C( TQ3Status )
+Q3TriMesh_Submit (const TQ3TriMeshData * triMeshData,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3TriMesh_SetData (TQ3GeometryObject triMesh,
+ const TQ3TriMeshData * triMeshData);
+
+EXTERN_API_C( TQ3Status )
+Q3TriMesh_GetData (TQ3GeometryObject triMesh,
+ TQ3TriMeshData * triMeshData);
+
+EXTERN_API_C( TQ3Status )
+Q3TriMesh_EmptyData (TQ3TriMeshData * triMeshData);
+
+
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __QD3DGEOMETRY__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__QD3DGEOMETRY__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QD3DGEOMETRY__ */
+
diff --git a/include/qt/QD3DGroup.h b/include/qt/QD3DGroup.h
new file mode 100644
index 000000000..1b793a82a
--- /dev/null
+++ b/include/qt/QD3DGroup.h
@@ -0,0 +1,520 @@
+/*
+ File: QD3DGroup.h
+
+ Contains: Q3Group methods
+
+ Version: Technology: Quickdraw 3D 1.6
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QD3DGROUP__
+#define __QD3DGROUP__
+
+#ifndef __QD3D__
+#include "QD3D.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __QD3DGROUP__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __QD3DGROUP__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+/******************************************************************************
+ ** **
+ ** Group Typedefs **
+ ** **
+ *****************************************************************************/
+/*
+ * These flags affect how a group is traversed
+ * They apply to when a group is "drawn", "picked", "bounded", "written"
+ */
+
+enum TQ3DisplayGroupStateMasks {
+ kQ3DisplayGroupStateNone = 0,
+ kQ3DisplayGroupStateMaskIsDrawn = 1 << 0,
+ kQ3DisplayGroupStateMaskIsInline = 1 << 1,
+ kQ3DisplayGroupStateMaskUseBoundingBox = 1 << 2,
+ kQ3DisplayGroupStateMaskUseBoundingSphere = 1 << 3,
+ kQ3DisplayGroupStateMaskIsPicked = 1 << 4,
+ kQ3DisplayGroupStateMaskIsWritten = 1 << 5
+};
+typedef enum TQ3DisplayGroupStateMasks TQ3DisplayGroupStateMasks;
+
+typedef unsigned long TQ3DisplayGroupState;
+
+
+/******************************************************************************
+ ** **
+ ** Group Routines (apply to all groups) **
+ ** **
+ *****************************************************************************/
+/* May contain any shared object */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3GroupObject )
+Q3Group_New (void);
+
+EXTERN_API_C( TQ3ObjectType )
+Q3Group_GetType (TQ3GroupObject group);
+
+EXTERN_API_C( TQ3GroupPosition )
+Q3Group_AddObject (TQ3GroupObject group,
+ TQ3Object object);
+
+EXTERN_API_C( TQ3GroupPosition )
+Q3Group_AddObjectBefore (TQ3GroupObject group,
+ TQ3GroupPosition position,
+ TQ3Object object);
+
+EXTERN_API_C( TQ3GroupPosition )
+Q3Group_AddObjectAfter (TQ3GroupObject group,
+ TQ3GroupPosition position,
+ TQ3Object object);
+
+EXTERN_API_C( TQ3Status )
+Q3Group_GetPositionObject (TQ3GroupObject group,
+ TQ3GroupPosition position,
+ TQ3Object * object);
+
+EXTERN_API_C( TQ3Status )
+Q3Group_SetPositionObject (TQ3GroupObject group,
+ TQ3GroupPosition position,
+ TQ3Object object);
+
+EXTERN_API_C( TQ3Object )
+Q3Group_RemovePosition (TQ3GroupObject group,
+ TQ3GroupPosition position);
+
+EXTERN_API_C( TQ3Status )
+Q3Group_GetFirstPosition (TQ3GroupObject group,
+ TQ3GroupPosition * position);
+
+EXTERN_API_C( TQ3Status )
+Q3Group_GetLastPosition (TQ3GroupObject group,
+ TQ3GroupPosition * position);
+
+EXTERN_API_C( TQ3Status )
+Q3Group_GetNextPosition (TQ3GroupObject group,
+ TQ3GroupPosition * position);
+
+EXTERN_API_C( TQ3Status )
+Q3Group_GetPreviousPosition (TQ3GroupObject group,
+ TQ3GroupPosition * position);
+
+EXTERN_API_C( TQ3Status )
+Q3Group_CountObjects (TQ3GroupObject group,
+ unsigned long * nObjects);
+
+EXTERN_API_C( TQ3Status )
+Q3Group_EmptyObjects (TQ3GroupObject group);
+
+/*
+ * Typed Access
+ */
+EXTERN_API_C( TQ3Status )
+Q3Group_GetFirstPositionOfType (TQ3GroupObject group,
+ TQ3ObjectType isType,
+ TQ3GroupPosition * position);
+
+EXTERN_API_C( TQ3Status )
+Q3Group_GetLastPositionOfType (TQ3GroupObject group,
+ TQ3ObjectType isType,
+ TQ3GroupPosition * position);
+
+EXTERN_API_C( TQ3Status )
+Q3Group_GetNextPositionOfType (TQ3GroupObject group,
+ TQ3ObjectType isType,
+ TQ3GroupPosition * position);
+
+EXTERN_API_C( TQ3Status )
+Q3Group_GetPreviousPositionOfType (TQ3GroupObject group,
+ TQ3ObjectType isType,
+ TQ3GroupPosition * position);
+
+EXTERN_API_C( TQ3Status )
+Q3Group_CountObjectsOfType (TQ3GroupObject group,
+ TQ3ObjectType isType,
+ unsigned long * nObjects);
+
+EXTERN_API_C( TQ3Status )
+Q3Group_EmptyObjectsOfType (TQ3GroupObject group,
+ TQ3ObjectType isType);
+
+/*
+ * Determine position of objects in a group
+ */
+EXTERN_API_C( TQ3Status )
+Q3Group_GetFirstObjectPosition (TQ3GroupObject group,
+ TQ3Object object,
+ TQ3GroupPosition * position);
+
+EXTERN_API_C( TQ3Status )
+Q3Group_GetLastObjectPosition (TQ3GroupObject group,
+ TQ3Object object,
+ TQ3GroupPosition * position);
+
+EXTERN_API_C( TQ3Status )
+Q3Group_GetNextObjectPosition (TQ3GroupObject group,
+ TQ3Object object,
+ TQ3GroupPosition * position);
+
+EXTERN_API_C( TQ3Status )
+Q3Group_GetPreviousObjectPosition (TQ3GroupObject group,
+ TQ3Object object,
+ TQ3GroupPosition * position);
+
+
+/******************************************************************************
+ ** **
+ ** Group Subclasses **
+ ** **
+ *****************************************************************************/
+/* Must contain only lights */
+EXTERN_API_C( TQ3GroupObject )
+Q3LightGroup_New (void);
+
+/* Must contain only strings */
+EXTERN_API_C( TQ3GroupObject )
+Q3InfoGroup_New (void);
+
+/******************************************************************************
+ ** **
+ ** Display Group Routines **
+ ** **
+ *****************************************************************************/
+/* May contain only drawables */
+EXTERN_API_C( TQ3GroupObject )
+Q3DisplayGroup_New (void);
+
+EXTERN_API_C( TQ3ObjectType )
+Q3DisplayGroup_GetType (TQ3GroupObject group);
+
+EXTERN_API_C( TQ3Status )
+Q3DisplayGroup_GetState (TQ3GroupObject group,
+ TQ3DisplayGroupState * state);
+
+EXTERN_API_C( TQ3Status )
+Q3DisplayGroup_SetState (TQ3GroupObject group,
+ TQ3DisplayGroupState state);
+
+EXTERN_API_C( TQ3Status )
+Q3DisplayGroup_Submit (TQ3GroupObject group,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3DisplayGroup_SetAndUseBoundingBox (TQ3GroupObject group,
+ TQ3BoundingBox * bBox);
+
+EXTERN_API_C( TQ3Status )
+Q3DisplayGroup_GetBoundingBox (TQ3GroupObject group,
+ TQ3BoundingBox * bBox);
+
+EXTERN_API_C( TQ3Status )
+Q3DisplayGroup_RemoveBoundingBox (TQ3GroupObject group);
+
+EXTERN_API_C( TQ3Status )
+Q3DisplayGroup_CalcAndUseBoundingBox (TQ3GroupObject group,
+ TQ3ComputeBounds computeBounds,
+ TQ3ViewObject view);
+
+
+/******************************************************************************
+ ** **
+ ** Ordered Display Group **
+ ** **
+ ** Ordered display groups keep objects in order by the type of object: **
+ ** **
+ ** 1 kQ3ShapeTypeTransform **
+ ** 2 kQ3ShapeTypeStyle **
+ ** 3 kQ3SetTypeAttribute **
+ ** 4 kQ3ShapeTypeShader **
+ ** 5 kQ3ShapeTypeCamera **
+ ** 6 kQ3ShapeTypeLight **
+ ** 7 kQ3ShapeTypeGeometry **
+ ** 8 kQ3ShapeTypeGroup **
+ ** 9 kQ3ShapeTypeUnknown **
+ ** **
+ ** Within a type, you are responsible for keeping things in order. **
+ ** **
+ ** You may access and/or manipulate the group using the above types **
+ ** (fast), or you may use any parent or leaf class types (slower). **
+ ** **
+ ** Additional types will be added as functionality grows. **
+ ** **
+ ** The group calls which access by type are much faster for ordered **
+ ** display group for the types above. **
+ ** **
+ ** N.B. Lights and Cameras in groups are a no-op when drawn and will **
+ ** post an error with the debug libraries. **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3GroupObject )
+Q3OrderedDisplayGroup_New (void);
+
+/******************************************************************************
+ ** **
+ ** IO Proxy Display Group **
+ ** **
+ ** IO Proxy display groups are used to place more than one **
+ ** representation of an object in a metafile. For example, if you know **
+ ** another program does not understand NURBPatches but does understand **
+ ** Meshes, you may place a mesh and a NURB Patch in an IO Proxy Group, **
+ ** and the reading program will select the desired representation. **
+ ** **
+ ** Objects in an IO Proxy Display Group are placed in their preferencial**
+ ** order, with the FIRST object being the MOST preferred, the LAST **
+ ** object the least preferred. **
+ ** **
+ ** The behavior of an IO Proxy Display Group is that when drawn/picked/ **
+ ** bounded, the first object in the group that is not "Unknown" is used,**
+ ** and the other objects ignored. **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3GroupObject )
+Q3IOProxyDisplayGroup_New (void);
+
+/******************************************************************************
+ ** **
+ ** Group Extension Definitions **
+ ** **
+ *****************************************************************************/
+/*
+ * Searching methods - OPTIONAL
+ */
+#endif /* CALL_NOT_IN_CARBON */
+
+enum {
+ kQ3XMethodType_GroupAcceptObject = FOUR_CHAR_CODE('gaco')
+};
+
+typedef CALLBACK_API_C( TQ3Boolean , TQ3XGroupAcceptObjectMethod )(TQ3GroupObject group, TQ3Object object);
+enum {
+ kQ3XMethodType_GroupAddObject = FOUR_CHAR_CODE('gado')
+};
+
+typedef CALLBACK_API_C( TQ3GroupPosition , TQ3XGroupAddObjectMethod )(TQ3GroupObject group, TQ3Object object);
+enum {
+ kQ3XMethodType_GroupAddObjectBefore = FOUR_CHAR_CODE('gaob')
+};
+
+typedef CALLBACK_API_C( TQ3GroupPosition , TQ3XGroupAddObjectBeforeMethod )(TQ3GroupObject group, TQ3GroupPosition position, TQ3Object object);
+enum {
+ kQ3XMethodType_GroupAddObjectAfter = FOUR_CHAR_CODE('gaoa')
+};
+
+typedef CALLBACK_API_C( TQ3GroupPosition , TQ3XGroupAddObjectAfterMethod )(TQ3GroupObject group, TQ3GroupPosition position, TQ3Object object);
+enum {
+ kQ3XMethodType_GroupSetPositionObject = FOUR_CHAR_CODE('gspo')
+};
+
+typedef CALLBACK_API_C( TQ3Status , TQ3XGroupSetPositionObjectMethod )(TQ3GroupObject group, TQ3GroupPosition gPos, TQ3Object obj);
+enum {
+ kQ3XMethodType_GroupRemovePosition = FOUR_CHAR_CODE('grmp')
+};
+
+typedef CALLBACK_API_C( TQ3Object , TQ3XGroupRemovePositionMethod )(TQ3GroupObject group, TQ3GroupPosition position);
+
+
+/*
+ * Searching methods - OPTIONAL - default uses above methods
+ */
+enum {
+ kQ3XMethodType_GroupGetFirstPositionOfType = FOUR_CHAR_CODE('gfrt')
+};
+
+typedef CALLBACK_API_C( TQ3Status , TQ3XGroupGetFirstPositionOfTypeMethod )(TQ3GroupObject group, TQ3ObjectType isType, TQ3GroupPosition *gPos);
+enum {
+ kQ3XMethodType_GroupGetLastPositionOfType = FOUR_CHAR_CODE('glst')
+};
+
+typedef CALLBACK_API_C( TQ3Status , TQ3XGroupGetLastPositionOfTypeMethod )(TQ3GroupObject group, TQ3ObjectType isType, TQ3GroupPosition *gPos);
+enum {
+ kQ3XMethodType_GroupGetNextPositionOfType = FOUR_CHAR_CODE('gnxt')
+};
+
+typedef CALLBACK_API_C( TQ3Status , TQ3XGroupGetNextPositionOfTypeMethod )(TQ3GroupObject group, TQ3ObjectType isType, TQ3GroupPosition *gPos);
+enum {
+ kQ3XMethodType_GroupGetPrevPositionOfType = FOUR_CHAR_CODE('gpvt')
+};
+
+typedef CALLBACK_API_C( TQ3Status , TQ3XGroupGetPrevPositionOfTypeMethod )(TQ3GroupObject group, TQ3ObjectType isType, TQ3GroupPosition *gPos);
+enum {
+ kQ3XMethodType_GroupCountObjectsOfType = FOUR_CHAR_CODE('gcnt')
+};
+
+typedef CALLBACK_API_C( TQ3Status , TQ3XGroupCountObjectsOfTypeMethod )(TQ3GroupObject group, TQ3ObjectType isType, unsigned long *nObjects);
+enum {
+ kQ3XMethodType_GroupEmptyObjectsOfType = FOUR_CHAR_CODE('geot')
+};
+
+typedef CALLBACK_API_C( TQ3Status , TQ3XGroupEmptyObjectsOfTypeMethod )(TQ3GroupObject group, TQ3ObjectType isType);
+enum {
+ kQ3XMethodType_GroupGetFirstObjectPosition = FOUR_CHAR_CODE('gfop')
+};
+
+typedef CALLBACK_API_C( TQ3Status , TQ3XGroupGetFirstObjectPositionMethod )(TQ3GroupObject group, TQ3Object object, TQ3GroupPosition *gPos);
+enum {
+ kQ3XMethodType_GroupGetLastObjectPosition = FOUR_CHAR_CODE('glop')
+};
+
+typedef CALLBACK_API_C( TQ3Status , TQ3XGroupGetLastObjectPositionMethod )(TQ3GroupObject group, TQ3Object object, TQ3GroupPosition *gPos);
+enum {
+ kQ3XMethodType_GroupGetNextObjectPosition = FOUR_CHAR_CODE('gnop')
+};
+
+typedef CALLBACK_API_C( TQ3Status , TQ3XGroupGetNextObjectPositionMethod )(TQ3GroupObject group, TQ3Object object, TQ3GroupPosition *gPos);
+enum {
+ kQ3XMethodType_GroupGetPrevObjectPosition = FOUR_CHAR_CODE('gpop')
+};
+
+typedef CALLBACK_API_C( TQ3Status , TQ3XGroupGetPrevObjectPositionMethod )(TQ3GroupObject group, TQ3Object object, TQ3GroupPosition *gPos);
+
+
+/*
+ * Group Position Methods
+ */
+enum {
+ kQ3XMethodType_GroupPositionSize = FOUR_CHAR_CODE('ggpz')
+};
+
+typedef unsigned long TQ3XMethodTypeGroupPositionSize;
+enum {
+ kQ3XMethodType_GroupPositionNew = FOUR_CHAR_CODE('ggpn')
+};
+
+typedef CALLBACK_API_C( TQ3Status , TQ3XGroupPositionNewMethod )(void *gPos, TQ3Object object, const void *initData);
+enum {
+ kQ3XMethodType_GroupPositionCopy = FOUR_CHAR_CODE('ggpc')
+};
+
+typedef CALLBACK_API_C( TQ3Status , TQ3XGroupPositionCopyMethod )(void *srcGPos, void *dstGPos);
+enum {
+ kQ3XMethodType_GroupPositionDelete = FOUR_CHAR_CODE('ggpd')
+};
+
+typedef CALLBACK_API_C( void , TQ3XGroupPositionDeleteMethod )(void *gPos);
+
+
+/*
+ * View Drawing Helpers
+ *
+ * TQ3XGroupStartIterateMethod
+ *
+ * Pass back *object = NULL to NOT call EndIterate iterate
+ * Pass back *object != NULL to draw object
+ * (other side will pass it to EndIterate for deletion!)
+ *
+ * *iterator is uninitialized, use for iteration state. Caller should
+ * ignore it.
+ *
+ * TQ3XGroupEndIterateMethod
+ *
+ * *object is previous object, dispose it or play with it.
+ * Pass back NULL when last iteration has occurred
+ * *iterator is previous value, use for iteration state Caller should
+ * ignore it.
+ */
+enum {
+ kQ3XMethodType_GroupStartIterate = FOUR_CHAR_CODE('gstd')
+};
+
+typedef CALLBACK_API_C( TQ3Status , TQ3XGroupStartIterateMethod )(TQ3GroupObject group, TQ3GroupPosition *iterator, TQ3Object *object, TQ3ViewObject view);
+enum {
+ kQ3XMethodType_GroupEndIterate = FOUR_CHAR_CODE('gitd')
+};
+
+typedef CALLBACK_API_C( TQ3Status , TQ3XGroupEndIterateMethod )(TQ3GroupObject group, TQ3GroupPosition *iterator, TQ3Object *object, TQ3ViewObject view);
+
+
+/*
+ * IO Helpers
+ *
+ * TQ3XGroupEndReadMethod
+ * Called when a group has been completely read. Group should perform
+ * validation and clean up any reading caches.
+ */
+enum {
+ kQ3XMethodType_GroupEndRead = FOUR_CHAR_CODE('gerd')
+};
+
+typedef CALLBACK_API_C( TQ3Status , TQ3XGroupEndReadMethod )(TQ3GroupObject group);
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( void *)
+Q3XGroup_GetPositionPrivate (TQ3GroupObject group,
+ TQ3GroupPosition position);
+
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __QD3DGROUP__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__QD3DGROUP__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QD3DGROUP__ */
+
diff --git a/include/qt/QD3DIO.h b/include/qt/QD3DIO.h
new file mode 100644
index 000000000..ff28f66dd
--- /dev/null
+++ b/include/qt/QD3DIO.h
@@ -0,0 +1,847 @@
+/*
+ File: QD3DIO.h
+
+ Contains: QuickDraw 3D IO API
+
+ Version: Technology: Quickdraw 3D 1.6
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QD3DIO__
+#define __QD3DIO__
+
+#ifndef __QD3D__
+#include "QD3D.h"
+#endif
+
+
+#ifndef __QD3DDRAWCONTEXT__
+#include "QD3DDrawContext.h"
+#endif
+
+#ifndef __QD3DVIEW__
+#include "QD3DView.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __QD3DIO__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __QD3DIO__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+/******************************************************************************
+ ** **
+ ** Basic Types **
+ ** **
+ *****************************************************************************/
+typedef unsigned char TQ3Uns8;
+typedef signed char TQ3Int8;
+typedef unsigned short TQ3Uns16;
+typedef signed short TQ3Int16;
+typedef unsigned long TQ3Uns32;
+typedef signed long TQ3Int32;
+#if TARGET_RT_BIG_ENDIAN
+
+struct TQ3Uns64 {
+ unsigned long hi;
+ unsigned long lo;
+};
+typedef struct TQ3Uns64 TQ3Uns64;
+
+struct TQ3Int64 {
+ signed long hi;
+ unsigned long lo;
+};
+typedef struct TQ3Int64 TQ3Int64;
+#else
+
+struct TQ3Uns64 {
+ unsigned long lo;
+ unsigned long hi;
+};
+typedef struct TQ3Uns64 TQ3Uns64;
+
+struct TQ3Int64 {
+ unsigned long lo;
+ signed long hi;
+};
+typedef struct TQ3Int64 TQ3Int64;
+#endif /* TARGET_RT_BIG_ENDIAN */
+
+
+typedef float TQ3Float32;
+typedef double TQ3Float64;
+typedef TQ3Uns32 TQ3Size;
+/******************************************************************************
+ ** **
+ ** File Types **
+ ** **
+ *****************************************************************************/
+
+enum TQ3FileModeMasks {
+ kQ3FileModeNormal = 0,
+ kQ3FileModeStream = 1 << 0,
+ kQ3FileModeDatabase = 1 << 1,
+ kQ3FileModeText = 1 << 2
+};
+typedef enum TQ3FileModeMasks TQ3FileModeMasks;
+
+typedef unsigned long TQ3FileMode;
+/******************************************************************************
+ ** **
+ ** Method Types **
+ ** **
+ *****************************************************************************/
+/*
+ * IO Methods
+ *
+ * The IO system treats all objects as groups of typed information.
+ * When you register your element or attribute, the "elementType" is the
+ * binary type of your object, the "elementName" the ascii type.
+ *
+ * All objects in the metafile are made up of a "root" or parent object which
+ * defines the instantiated object type. You may define the format of your
+ * data any way you wish as long as you use the primitives types above and the
+ * routines below.
+ *
+ * Root Objects are often appended with additional child objects, called
+ * subobjects. You may append your object with other QuickDraw 3D objects.
+ *
+ * Writing is straightforward: an object traverses itself any other objects
+ * that make it up, then writes its own data. Writing uses two methods:
+ * TQ3XObjectTraverseMethod and TQ3XObjectWriteMethod.
+ *
+ * The TQ3XObjectTraverseMethod method should:
+ * + First, Determine if the data should be written
+ * - if you don't want to write out your object after examining your
+ * data, return kQ3Success in your Traverse method without calling
+ * any other submit calls.
+ * + Next, calculate the size of your object on disk
+ * + Gather whatever state from the view you need to preserve
+ * - you may access the view state NOW, as the state of the
+ * view duing your TQ3XObjectWriteMethod will not be valid. You may
+ * pass a temporary buffer to your write method.
+ * + Submit your view write data using Q3View_SubmitWriteData
+ * - note that you MUST call this before any other "_Submit" call.
+ * - you may pass in a "deleteMethod" for your data. This method
+ * will be called whether or not your write method succeeds or fails.
+ * + Submit your subobjects to the view
+ *
+ * The TQ3XObjectWriteMethod method should:
+ * + Write your data format to the file using the primitives routines below.
+ * - If you passed a "deleteMethod" in your Q3View_SubmitWriteData, that
+ * method will be called upon exit of your write method.
+ *
+ * Reading is less straightforward because your root object and
+ * any subobjects must be read inside of your TQ3XObjectReadDataMethod. There
+ * is an implicit state contained in the file while reading, which you must
+ * be aware of. When you first enter the read method, you must physically
+ * read in your data format using the primitives routines until
+ *
+ * Q3File_IsEndOfData(file) == kQ3True
+ *
+ * Generally, your data format should be self-descriptive such that you do not
+ * need to call Q3File_IsEndOfData to determine if you are done reading.
+ * However, this call is useful for determining zero-sized object or
+ * determining the end of an object's data.
+ *
+ * Once you have read in all the data, you may collect subobjects. A metafile
+ * object ONLY has subobjects if it is in a container. The call
+ *
+ * Q3File_IsEndOfContainer(file)
+ *
+ * returns kQ3False if subobjects exist, and kQ3True if subobjects do not
+ * exist.
+ *
+ * At this point, you may use
+ *
+ * Q3File_GetNextObjectType
+ * Q3File_IsNextObjectOfType
+ * Q3File_ReadObject
+ * Q3File_SkipObject
+ *
+ * to iterate through the subobjects until Q3File_IsEndOfContainer(file)
+ * is kQ3True.
+ *
+ */
+
+/*
+ * IO Methods
+ */
+enum {
+ kQ3XMethodTypeObjectFileVersion = FOUR_CHAR_CODE('vers'), /* version */
+ kQ3XMethodTypeObjectTraverse = FOUR_CHAR_CODE('trvs'), /* byte count */
+ kQ3XMethodTypeObjectTraverseData = FOUR_CHAR_CODE('trvd'), /* byte count */
+ kQ3XMethodTypeObjectWrite = FOUR_CHAR_CODE('writ'), /* Dump info to file */
+ kQ3XMethodTypeObjectReadData = FOUR_CHAR_CODE('rddt'), /* Read info from file into buffer or, attach read data to parent */
+ kQ3XMethodTypeObjectRead = FOUR_CHAR_CODE('read'),
+ kQ3XMethodTypeObjectAttach = FOUR_CHAR_CODE('attc')
+};
+
+/*
+ * TQ3XObjectTraverseMethod
+ *
+ * For "elements" (meaning "attributes, too), you will be passed NULL for
+ * object. Sorry, custom objects will be available in the next major revision.
+ *
+ * The "data" is a pointer to your internal element data.
+ *
+ * The view is the current traversal view.
+ */
+typedef CALLBACK_API_C( TQ3Status , TQ3XObjectTraverseMethod )(TQ3Object object, void *data, TQ3ViewObject view);
+/*
+ * TQ3XObjectTraverseDataMethod
+ */
+typedef CALLBACK_API_C( TQ3Status , TQ3XObjectTraverseDataMethod )(TQ3Object object, void *data, TQ3ViewObject view);
+/*
+ * TQ3XObjectWriteMethod
+ */
+typedef CALLBACK_API_C( TQ3Status , TQ3XObjectWriteMethod )(const void *object, TQ3FileObject theFile);
+/*
+ * Custom object writing
+ */
+typedef CALLBACK_API_C( void , TQ3XDataDeleteMethod )(void *data);
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3Status )
+Q3XView_SubmitWriteData (TQ3ViewObject view,
+ TQ3Size size,
+ void * data,
+ TQ3XDataDeleteMethod deleteData);
+
+EXTERN_API_C( TQ3Status )
+Q3XView_SubmitSubObjectData (TQ3ViewObject view,
+ TQ3XObjectClass objectClass,
+ unsigned long size,
+ void * data,
+ TQ3XDataDeleteMethod deleteData);
+
+/*
+ * TQ3XObjectReadMethod
+ */
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API_C( TQ3Object , TQ3XObjectReadMethod )(TQ3FileObject theFile);
+/*
+ * TQ3XObjectReadDataMethod
+ *
+ * For "elements" (meaning "attributes", too), you must allocate stack space
+ * and call Q3Set_Add on "parentObject", which is an TQ3SetObject.
+ *
+ * Otherwise, parentObject is whatever object your element is a subobject of...
+ */
+typedef CALLBACK_API_C( TQ3Status , TQ3XObjectReadDataMethod )(TQ3Object parentObject, TQ3FileObject theFile);
+/*
+ * TQ3XObjectAttachMethod
+ */
+typedef CALLBACK_API_C( TQ3Status , TQ3XObjectAttachMethod )(TQ3Object childObject, TQ3Object parentObject);
+
+
+/******************************************************************************
+ ** **
+ ** Versioning **
+ ** **
+ *****************************************************************************/
+
+#define Q3FileVersion(majorVersion, minorVersion) (TQ3FileVersion) \
+ ((((TQ3Uns32) majorVersion & 0xFFFF) << 16) | ((TQ3Uns32) minorVersion & 0xFFFF))
+
+typedef unsigned long TQ3FileVersion;
+#define kQ3FileVersionCurrent Q3FileVersion(1,6)
+
+/******************************************************************************
+ ** **
+ ** File Routines **
+ ** **
+ *****************************************************************************/
+/*
+ * Creation and accessors
+ */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3FileObject )
+Q3File_New (void);
+
+EXTERN_API_C( TQ3Status )
+Q3File_GetStorage (TQ3FileObject theFile,
+ TQ3StorageObject * storage);
+
+EXTERN_API_C( TQ3Status )
+Q3File_SetStorage (TQ3FileObject theFile,
+ TQ3StorageObject storage);
+
+/*
+ * Opening, and accessing "open" state, closing/cancelling
+ */
+EXTERN_API_C( TQ3Status )
+Q3File_OpenRead (TQ3FileObject theFile,
+ TQ3FileMode * mode);
+
+EXTERN_API_C( TQ3Status )
+Q3File_OpenWrite (TQ3FileObject theFile,
+ TQ3FileMode mode);
+
+EXTERN_API_C( TQ3Status )
+Q3File_IsOpen (TQ3FileObject theFile,
+ TQ3Boolean * isOpen);
+
+EXTERN_API_C( TQ3Status )
+Q3File_GetMode (TQ3FileObject theFile,
+ TQ3FileMode * mode);
+
+EXTERN_API_C( TQ3Status )
+Q3File_GetVersion (TQ3FileObject theFile,
+ TQ3FileVersion * version);
+
+EXTERN_API_C( TQ3Status )
+Q3File_Close (TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3File_Cancel (TQ3FileObject theFile);
+
+/*
+ * Writing (Application)
+ */
+EXTERN_API_C( TQ3Status )
+Q3View_StartWriting (TQ3ViewObject view,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3ViewStatus )
+Q3View_EndWriting (TQ3ViewObject view);
+
+/*
+ * Reading (Application)
+ */
+EXTERN_API_C( TQ3ObjectType )
+Q3File_GetNextObjectType (TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Boolean )
+Q3File_IsNextObjectOfType (TQ3FileObject theFile,
+ TQ3ObjectType ofType);
+
+EXTERN_API_C( TQ3Object )
+Q3File_ReadObject (TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3File_SkipObject (TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Boolean )
+Q3File_IsEndOfData (TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Boolean )
+Q3File_IsEndOfContainer (TQ3FileObject theFile,
+ TQ3Object rootObject);
+
+EXTERN_API_C( TQ3Boolean )
+Q3File_IsEndOfFile (TQ3FileObject theFile);
+
+/*
+ * External file references
+ */
+EXTERN_API_C( TQ3Status )
+Q3File_MarkAsExternalReference (TQ3FileObject theFile,
+ TQ3SharedObject sharedObject);
+
+EXTERN_API_C( TQ3GroupObject )
+Q3File_GetExternalReferences (TQ3FileObject theFile);
+
+/*
+ * Tracking editing in read-in objects with custom elements
+ */
+EXTERN_API_C( TQ3Status )
+Q3Shared_ClearEditTracking (TQ3SharedObject sharedObject);
+
+EXTERN_API_C( TQ3Boolean )
+Q3Shared_GetEditTrackingState (TQ3SharedObject sharedObject);
+
+/*
+ * Reading objects inside a group one-by-one
+ */
+#endif /* CALL_NOT_IN_CARBON */
+
+
+enum TQ3FileReadGroupStateMasks {
+ kQ3FileReadWholeGroup = 0,
+ kQ3FileReadObjectsInGroup = 1 << 0,
+ kQ3FileCurrentlyInsideGroup = 1 << 1
+};
+typedef enum TQ3FileReadGroupStateMasks TQ3FileReadGroupStateMasks;
+
+typedef unsigned long TQ3FileReadGroupState;
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3Status )
+Q3File_SetReadInGroup (TQ3FileObject theFile,
+ TQ3FileReadGroupState readGroupState);
+
+EXTERN_API_C( TQ3Status )
+Q3File_GetReadInGroup (TQ3FileObject theFile,
+ TQ3FileReadGroupState * readGroupState);
+
+
+/*
+ * Idling
+ */
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API_C( TQ3Status , TQ3FileIdleMethod )(TQ3FileObject theFile, const void *idlerData);
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3Status )
+Q3File_SetIdleMethod (TQ3FileObject theFile,
+ TQ3FileIdleMethod idle,
+ const void * idleData);
+
+
+/******************************************************************************
+ ** **
+ ** Primitives Routines **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Status )
+Q3NewLine_Write (TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Uns8_Read (TQ3Uns8 * data,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Uns8_Write (TQ3Uns8 data,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Uns16_Read (TQ3Uns16 * data,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Uns16_Write (TQ3Uns16 data,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Uns32_Read (TQ3Uns32 * data,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Uns32_Write (TQ3Uns32 data,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Int8_Read (TQ3Int8 * data,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Int8_Write (TQ3Int8 data,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Int16_Read (TQ3Int16 * data,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Int16_Write (TQ3Int16 data,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Int32_Read (TQ3Int32 * data,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Int32_Write (TQ3Int32 data,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Uns64_Read (TQ3Uns64 * data,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Uns64_Write (TQ3Uns64 data,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Int64_Read (TQ3Int64 * data,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Int64_Write (TQ3Int64 data,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Float32_Read (TQ3Float32 * data,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Float32_Write (TQ3Float32 data,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Float64_Read (TQ3Float64 * data,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Float64_Write (TQ3Float64 data,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Size )
+Q3Size_Pad (TQ3Size size);
+
+/*
+ * Pass a pointer to a buffer of kQ3StringMaximumLength bytes
+ */
+EXTERN_API_C( TQ3Status )
+Q3String_Read (char * data,
+ unsigned long * length,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3String_Write (const char * data,
+ TQ3FileObject theFile);
+
+/*
+ * This call will read Q3Size_Pad(size) bytes,
+ * but only place size bytes into data.
+ */
+EXTERN_API_C( TQ3Status )
+Q3RawData_Read (unsigned char * data,
+ unsigned long size,
+ TQ3FileObject theFile);
+
+/*
+ * This call will write Q3Size_Pad(size) bytes,
+ * adding 0's to pad to the nearest 4 byte boundary.
+ */
+EXTERN_API_C( TQ3Status )
+Q3RawData_Write (const unsigned char * data,
+ unsigned long size,
+ TQ3FileObject theFile);
+
+/******************************************************************************
+ ** **
+ ** Convenient Primitives Routines **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Status )
+Q3Point2D_Read (TQ3Point2D * point2D,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Point2D_Write (const TQ3Point2D * point2D,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Point3D_Read (TQ3Point3D * point3D,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Point3D_Write (const TQ3Point3D * point3D,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3RationalPoint3D_Read (TQ3RationalPoint3D * point3D,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3RationalPoint3D_Write (const TQ3RationalPoint3D * point3D,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3RationalPoint4D_Read (TQ3RationalPoint4D * point4D,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3RationalPoint4D_Write (const TQ3RationalPoint4D * point4D,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Vector2D_Read (TQ3Vector2D * vector2D,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Vector2D_Write (const TQ3Vector2D * vector2D,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Vector3D_Read (TQ3Vector3D * vector3D,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Vector3D_Write (const TQ3Vector3D * vector3D,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Matrix4x4_Read (TQ3Matrix4x4 * matrix4x4,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Matrix4x4_Write (const TQ3Matrix4x4 * matrix4x4,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Tangent2D_Read (TQ3Tangent2D * tangent2D,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Tangent2D_Write (const TQ3Tangent2D * tangent2D,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Tangent3D_Read (TQ3Tangent3D * tangent3D,
+ TQ3FileObject theFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Tangent3D_Write (const TQ3Tangent3D * tangent3D,
+ TQ3FileObject theFile);
+
+/* This call affects only text Files - it is a no-op in binary files */
+EXTERN_API_C( TQ3Status )
+Q3Comment_Write (char * comment,
+ TQ3FileObject theFile);
+
+/******************************************************************************
+ ** **
+ ** Unknown Object **
+ ** **
+ ** Unknown objects are generated when reading files which contain **
+ ** custom data which has not been registered in the current **
+ ** instantiation of QuickDraw 3D. **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3ObjectType )
+Q3Unknown_GetType (TQ3UnknownObject unknownObject);
+
+EXTERN_API_C( TQ3Status )
+Q3Unknown_GetDirtyState (TQ3UnknownObject unknownObject,
+ TQ3Boolean * isDirty);
+
+EXTERN_API_C( TQ3Status )
+Q3Unknown_SetDirtyState (TQ3UnknownObject unknownObject,
+ TQ3Boolean isDirty);
+
+
+/******************************************************************************
+ ** **
+ ** Unknown Text Routines **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct TQ3UnknownTextData {
+ char * objectName; /* '\0' terminated */
+ char * contents; /* '\0' terminated */
+};
+typedef struct TQ3UnknownTextData TQ3UnknownTextData;
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3Status )
+Q3UnknownText_GetData (TQ3UnknownObject unknownObject,
+ TQ3UnknownTextData * unknownTextData);
+
+EXTERN_API_C( TQ3Status )
+Q3UnknownText_EmptyData (TQ3UnknownTextData * unknownTextData);
+
+
+/******************************************************************************
+ ** **
+ ** Unknown Binary Routines **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct TQ3UnknownBinaryData {
+ TQ3ObjectType objectType;
+ unsigned long size;
+ TQ3Endian byteOrder;
+ char * contents;
+};
+typedef struct TQ3UnknownBinaryData TQ3UnknownBinaryData;
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3Status )
+Q3UnknownBinary_GetData (TQ3UnknownObject unknownObject,
+ TQ3UnknownBinaryData * unknownBinaryData);
+
+EXTERN_API_C( TQ3Status )
+Q3UnknownBinary_EmptyData (TQ3UnknownBinaryData * unknownBinaryData);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3Status )
+Q3UnknownBinary_GetTypeString (TQ3UnknownObject unknownObject,
+ char ** typeString);
+
+EXTERN_API_C( TQ3Status )
+Q3UnknownBinary_EmptyTypeString (char ** typeString);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+/******************************************************************************
+ ** **
+ ** ViewHints routines **
+ ** **
+ ** ViewHints are an object in a metafile to give you some hints on how **
+ ** to render a scene. You may create a view with any of the objects **
+ ** retrieved from it, or you can just throw it away. **
+ ** **
+ ** To write a view hints to a file, create a view hints object from a **
+ ** view and write the view hints. **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3ViewHintsObject )
+Q3ViewHints_New (TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewHints_SetRenderer (TQ3ViewHintsObject viewHints,
+ TQ3RendererObject renderer);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewHints_GetRenderer (TQ3ViewHintsObject viewHints,
+ TQ3RendererObject * renderer);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewHints_SetCamera (TQ3ViewHintsObject viewHints,
+ TQ3CameraObject camera);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewHints_GetCamera (TQ3ViewHintsObject viewHints,
+ TQ3CameraObject * camera);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewHints_SetLightGroup (TQ3ViewHintsObject viewHints,
+ TQ3GroupObject lightGroup);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewHints_GetLightGroup (TQ3ViewHintsObject viewHints,
+ TQ3GroupObject * lightGroup);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewHints_SetAttributeSet (TQ3ViewHintsObject viewHints,
+ TQ3AttributeSet attributeSet);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewHints_GetAttributeSet (TQ3ViewHintsObject viewHints,
+ TQ3AttributeSet * attributeSet);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewHints_SetDimensionsState (TQ3ViewHintsObject viewHints,
+ TQ3Boolean isValid);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewHints_GetDimensionsState (TQ3ViewHintsObject viewHints,
+ TQ3Boolean * isValid);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewHints_SetDimensions (TQ3ViewHintsObject viewHints,
+ unsigned long width,
+ unsigned long height);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewHints_GetDimensions (TQ3ViewHintsObject viewHints,
+ unsigned long * width,
+ unsigned long * height);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewHints_SetMaskState (TQ3ViewHintsObject viewHints,
+ TQ3Boolean isValid);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewHints_GetMaskState (TQ3ViewHintsObject viewHints,
+ TQ3Boolean * isValid);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewHints_SetMask (TQ3ViewHintsObject viewHints,
+ const TQ3Bitmap * mask);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewHints_GetMask (TQ3ViewHintsObject viewHints,
+ TQ3Bitmap * mask);
+
+/* Call Q3Bitmap_Empty when done with the mask */
+EXTERN_API_C( TQ3Status )
+Q3ViewHints_SetClearImageMethod (TQ3ViewHintsObject viewHints,
+ TQ3DrawContextClearImageMethod clearMethod);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewHints_GetClearImageMethod (TQ3ViewHintsObject viewHints,
+ TQ3DrawContextClearImageMethod * clearMethod);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewHints_SetClearImageColor (TQ3ViewHintsObject viewHints,
+ const TQ3ColorARGB * color);
+
+EXTERN_API_C( TQ3Status )
+Q3ViewHints_GetClearImageColor (TQ3ViewHintsObject viewHints,
+ TQ3ColorARGB * color);
+
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __QD3DIO__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__QD3DIO__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QD3DIO__ */
+
diff --git a/include/qt/QD3DLight.h b/include/qt/QD3DLight.h
new file mode 100644
index 000000000..46ac29524
--- /dev/null
+++ b/include/qt/QD3DLight.h
@@ -0,0 +1,371 @@
+/*
+ File: QD3DLight.h
+
+ Contains: Generic light routines
+
+ Version: Technology: Quickdraw 3D 1.6
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QD3DLIGHT__
+#define __QD3DLIGHT__
+
+#ifndef __QD3D__
+#include "QD3D.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __QD3DLIGHT__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __QD3DLIGHT__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+/******************************************************************************
+ ** **
+ ** Enum Definitions **
+ ** **
+ *****************************************************************************/
+
+enum TQ3AttenuationType {
+ kQ3AttenuationTypeNone = 0,
+ kQ3AttenuationTypeInverseDistance = 1,
+ kQ3AttenuationTypeInverseDistanceSquared = 2
+};
+typedef enum TQ3AttenuationType TQ3AttenuationType;
+
+
+
+enum TQ3FallOffType {
+ kQ3FallOffTypeNone = 0,
+ kQ3FallOffTypeLinear = 1,
+ kQ3FallOffTypeExponential = 2,
+ kQ3FallOffTypeCosine = 3
+};
+typedef enum TQ3FallOffType TQ3FallOffType;
+
+
+/******************************************************************************
+ ** **
+ ** Data Structure Definitions **
+ ** **
+ *****************************************************************************/
+
+struct TQ3LightData {
+ TQ3Boolean isOn;
+ float brightness;
+ TQ3ColorRGB color;
+};
+typedef struct TQ3LightData TQ3LightData;
+
+struct TQ3DirectionalLightData {
+ TQ3LightData lightData;
+ TQ3Boolean castsShadows;
+ TQ3Vector3D direction;
+};
+typedef struct TQ3DirectionalLightData TQ3DirectionalLightData;
+
+struct TQ3PointLightData {
+ TQ3LightData lightData;
+ TQ3Boolean castsShadows;
+ TQ3AttenuationType attenuation;
+ TQ3Point3D location;
+};
+typedef struct TQ3PointLightData TQ3PointLightData;
+
+struct TQ3SpotLightData {
+ TQ3LightData lightData;
+ TQ3Boolean castsShadows;
+ TQ3AttenuationType attenuation;
+ TQ3Point3D location;
+ TQ3Vector3D direction;
+ float hotAngle;
+ float outerAngle;
+ TQ3FallOffType fallOff;
+};
+typedef struct TQ3SpotLightData TQ3SpotLightData;
+/******************************************************************************
+ ** **
+ ** Light routines (apply to all TQ3LightObjects) **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3ObjectType )
+Q3Light_GetType (TQ3LightObject light);
+
+EXTERN_API_C( TQ3Status )
+Q3Light_GetState (TQ3LightObject light,
+ TQ3Boolean * isOn);
+
+EXTERN_API_C( TQ3Status )
+Q3Light_GetBrightness (TQ3LightObject light,
+ float * brightness);
+
+EXTERN_API_C( TQ3Status )
+Q3Light_GetColor (TQ3LightObject light,
+ TQ3ColorRGB * color);
+
+EXTERN_API_C( TQ3Status )
+Q3Light_SetState (TQ3LightObject light,
+ TQ3Boolean isOn);
+
+EXTERN_API_C( TQ3Status )
+Q3Light_SetBrightness (TQ3LightObject light,
+ float brightness);
+
+EXTERN_API_C( TQ3Status )
+Q3Light_SetColor (TQ3LightObject light,
+ const TQ3ColorRGB * color);
+
+EXTERN_API_C( TQ3Status )
+Q3Light_GetData (TQ3LightObject light,
+ TQ3LightData * lightData);
+
+EXTERN_API_C( TQ3Status )
+Q3Light_SetData (TQ3LightObject light,
+ const TQ3LightData * lightData);
+
+
+/******************************************************************************
+ ** **
+ ** Specific Light Routines **
+ ** **
+ *****************************************************************************/
+/******************************************************************************
+ ** **
+ ** Ambient Light **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3LightObject )
+Q3AmbientLight_New (const TQ3LightData * lightData);
+
+EXTERN_API_C( TQ3Status )
+Q3AmbientLight_GetData (TQ3LightObject light,
+ TQ3LightData * lightData);
+
+EXTERN_API_C( TQ3Status )
+Q3AmbientLight_SetData (TQ3LightObject light,
+ const TQ3LightData * lightData);
+
+
+/******************************************************************************
+ ** **
+ ** Directional Light **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3LightObject )
+Q3DirectionalLight_New (const TQ3DirectionalLightData * directionalLightData);
+
+EXTERN_API_C( TQ3Status )
+Q3DirectionalLight_GetCastShadowsState (TQ3LightObject light,
+ TQ3Boolean * castsShadows);
+
+EXTERN_API_C( TQ3Status )
+Q3DirectionalLight_GetDirection (TQ3LightObject light,
+ TQ3Vector3D * direction);
+
+EXTERN_API_C( TQ3Status )
+Q3DirectionalLight_SetCastShadowsState (TQ3LightObject light,
+ TQ3Boolean castsShadows);
+
+EXTERN_API_C( TQ3Status )
+Q3DirectionalLight_SetDirection (TQ3LightObject light,
+ const TQ3Vector3D * direction);
+
+EXTERN_API_C( TQ3Status )
+Q3DirectionalLight_GetData (TQ3LightObject light,
+ TQ3DirectionalLightData * directionalLightData);
+
+EXTERN_API_C( TQ3Status )
+Q3DirectionalLight_SetData (TQ3LightObject light,
+ const TQ3DirectionalLightData * directionalLightData);
+
+
+/******************************************************************************
+ ** **
+ ** Point Light **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3LightObject )
+Q3PointLight_New (const TQ3PointLightData * pointLightData);
+
+EXTERN_API_C( TQ3Status )
+Q3PointLight_GetCastShadowsState (TQ3LightObject light,
+ TQ3Boolean * castsShadows);
+
+EXTERN_API_C( TQ3Status )
+Q3PointLight_GetAttenuation (TQ3LightObject light,
+ TQ3AttenuationType * attenuation);
+
+EXTERN_API_C( TQ3Status )
+Q3PointLight_GetLocation (TQ3LightObject light,
+ TQ3Point3D * location);
+
+EXTERN_API_C( TQ3Status )
+Q3PointLight_GetData (TQ3LightObject light,
+ TQ3PointLightData * pointLightData);
+
+EXTERN_API_C( TQ3Status )
+Q3PointLight_SetCastShadowsState (TQ3LightObject light,
+ TQ3Boolean castsShadows);
+
+EXTERN_API_C( TQ3Status )
+Q3PointLight_SetAttenuation (TQ3LightObject light,
+ TQ3AttenuationType attenuation);
+
+EXTERN_API_C( TQ3Status )
+Q3PointLight_SetLocation (TQ3LightObject light,
+ const TQ3Point3D * location);
+
+EXTERN_API_C( TQ3Status )
+Q3PointLight_SetData (TQ3LightObject light,
+ const TQ3PointLightData * pointLightData);
+
+
+/******************************************************************************
+ ** **
+ ** Spot Light **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3LightObject )
+Q3SpotLight_New (const TQ3SpotLightData * spotLightData);
+
+EXTERN_API_C( TQ3Status )
+Q3SpotLight_GetCastShadowsState (TQ3LightObject light,
+ TQ3Boolean * castsShadows);
+
+EXTERN_API_C( TQ3Status )
+Q3SpotLight_GetAttenuation (TQ3LightObject light,
+ TQ3AttenuationType * attenuation);
+
+EXTERN_API_C( TQ3Status )
+Q3SpotLight_GetLocation (TQ3LightObject light,
+ TQ3Point3D * location);
+
+EXTERN_API_C( TQ3Status )
+Q3SpotLight_GetDirection (TQ3LightObject light,
+ TQ3Vector3D * direction);
+
+EXTERN_API_C( TQ3Status )
+Q3SpotLight_GetHotAngle (TQ3LightObject light,
+ float * hotAngle);
+
+EXTERN_API_C( TQ3Status )
+Q3SpotLight_GetOuterAngle (TQ3LightObject light,
+ float * outerAngle);
+
+EXTERN_API_C( TQ3Status )
+Q3SpotLight_GetFallOff (TQ3LightObject light,
+ TQ3FallOffType * fallOff);
+
+EXTERN_API_C( TQ3Status )
+Q3SpotLight_GetData (TQ3LightObject light,
+ TQ3SpotLightData * spotLightData);
+
+EXTERN_API_C( TQ3Status )
+Q3SpotLight_SetCastShadowsState (TQ3LightObject light,
+ TQ3Boolean castsShadows);
+
+EXTERN_API_C( TQ3Status )
+Q3SpotLight_SetAttenuation (TQ3LightObject light,
+ TQ3AttenuationType attenuation);
+
+EXTERN_API_C( TQ3Status )
+Q3SpotLight_SetLocation (TQ3LightObject light,
+ const TQ3Point3D * location);
+
+EXTERN_API_C( TQ3Status )
+Q3SpotLight_SetDirection (TQ3LightObject light,
+ const TQ3Vector3D * direction);
+
+EXTERN_API_C( TQ3Status )
+Q3SpotLight_SetHotAngle (TQ3LightObject light,
+ float hotAngle);
+
+EXTERN_API_C( TQ3Status )
+Q3SpotLight_SetOuterAngle (TQ3LightObject light,
+ float outerAngle);
+
+EXTERN_API_C( TQ3Status )
+Q3SpotLight_SetFallOff (TQ3LightObject light,
+ TQ3FallOffType fallOff);
+
+EXTERN_API_C( TQ3Status )
+Q3SpotLight_SetData (TQ3LightObject light,
+ const TQ3SpotLightData * spotLightData);
+
+
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __QD3DLIGHT__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__QD3DLIGHT__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QD3DLIGHT__ */
+
diff --git a/include/qt/QD3DMath.h b/include/qt/QD3DMath.h
new file mode 100644
index 000000000..2aea3e183
--- /dev/null
+++ b/include/qt/QD3DMath.h
@@ -0,0 +1,921 @@
+/*
+ File: QD3DMath.h
+
+ Contains: Math & matrix routines and definitions.
+
+ Version: Technology: Quickdraw 3D 1.6
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QD3DMATH__
+#define __QD3DMATH__
+
+#ifndef __QD3D__
+#include "QD3D.h"
+#endif
+
+
+#include "float.h"
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __QD3DMATH__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __QD3DMATH__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+/******************************************************************************
+ ** **
+ ** Constant Definitions **
+ ** **
+ *****************************************************************************/
+/*
+ * Real zero definition
+ */
+
+#ifdef FLT_EPSILON
+ #define kQ3RealZero (FLT_EPSILON)
+#else
+ #define kQ3RealZero ((float)1.19209290e-07)
+#endif
+
+#ifdef FLT_MAX
+ #define kQ3MaxFloat (FLT_MAX)
+#else
+ #define kQ3MaxFloat ((float)3.40282347e+38)
+#endif
+
+/*
+ * Values of PI
+ */
+#define kQ3Pi ((float)3.1415926535898)
+#define kQ32Pi ((float)(2.0 * 3.1415926535898))
+#define kQ3PiOver2 ((float)(3.1415926535898 / 2.0))
+#define kQ33PiOver2 ((float)(3.0 * 3.1415926535898 / 2.0))
+
+
+/******************************************************************************
+ ** **
+ ** Miscellaneous Functions **
+ ** **
+ *****************************************************************************/
+#define Q3Math_DegreesToRadians(x) ((float)((x) * kQ3Pi / 180.0f))
+#define Q3Math_RadiansToDegrees(x) ((float)((x) * 180.0f / kQ3Pi))
+#define Q3Math_Min(x,y) ((x) <= (y) ? (x) : (y))
+#define Q3Math_Max(x,y) ((x) >= (y) ? (x) : (y))
+
+/******************************************************************************
+ ** **
+ ** Point and Vector Creation **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3Point2D *)
+Q3Point2D_Set (TQ3Point2D * point2D,
+ float x,
+ float y);
+
+EXTERN_API_C( TQ3Param2D *)
+Q3Param2D_Set (TQ3Param2D * param2D,
+ float u,
+ float v);
+
+EXTERN_API_C( TQ3Point3D *)
+Q3Point3D_Set (TQ3Point3D * point3D,
+ float x,
+ float y,
+ float z);
+
+EXTERN_API_C( TQ3RationalPoint3D *)
+Q3RationalPoint3D_Set (TQ3RationalPoint3D * point3D,
+ float x,
+ float y,
+ float w);
+
+EXTERN_API_C( TQ3RationalPoint4D *)
+Q3RationalPoint4D_Set (TQ3RationalPoint4D * point4D,
+ float x,
+ float y,
+ float z,
+ float w);
+
+EXTERN_API_C( TQ3Vector2D *)
+Q3Vector2D_Set (TQ3Vector2D * vector2D,
+ float x,
+ float y);
+
+EXTERN_API_C( TQ3Vector3D *)
+Q3Vector3D_Set (TQ3Vector3D * vector3D,
+ float x,
+ float y,
+ float z);
+
+EXTERN_API_C( TQ3PolarPoint *)
+Q3PolarPoint_Set (TQ3PolarPoint * polarPoint,
+ float r,
+ float theta);
+
+EXTERN_API_C( TQ3SphericalPoint *)
+Q3SphericalPoint_Set (TQ3SphericalPoint * sphericalPoint,
+ float rho,
+ float theta,
+ float phi);
+
+
+/******************************************************************************
+ ** **
+ ** Point and Vector Dimension Conversion **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Point3D *)
+Q3Point2D_To3D (const TQ3Point2D * point2D,
+ TQ3Point3D * result);
+
+EXTERN_API_C( TQ3Point2D *)
+Q3RationalPoint3D_To2D (const TQ3RationalPoint3D * point3D,
+ TQ3Point2D * result);
+
+EXTERN_API_C( TQ3RationalPoint4D *)
+Q3Point3D_To4D (const TQ3Point3D * point3D,
+ TQ3RationalPoint4D * result);
+
+EXTERN_API_C( TQ3Point3D *)
+Q3RationalPoint4D_To3D (const TQ3RationalPoint4D * point4D,
+ TQ3Point3D * result);
+
+EXTERN_API_C( TQ3Vector3D *)
+Q3Vector2D_To3D (const TQ3Vector2D * vector2D,
+ TQ3Vector3D * result);
+
+EXTERN_API_C( TQ3Vector2D *)
+Q3Vector3D_To2D (const TQ3Vector3D * vector3D,
+ TQ3Vector2D * result);
+
+
+/******************************************************************************
+ ** **
+ ** Point Subtraction **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Vector2D *)
+Q3Point2D_Subtract (const TQ3Point2D * p1,
+ const TQ3Point2D * p2,
+ TQ3Vector2D * result);
+
+EXTERN_API_C( TQ3Vector2D *)
+Q3Param2D_Subtract (const TQ3Param2D * p1,
+ const TQ3Param2D * p2,
+ TQ3Vector2D * result);
+
+EXTERN_API_C( TQ3Vector3D *)
+Q3Point3D_Subtract (const TQ3Point3D * p1,
+ const TQ3Point3D * p2,
+ TQ3Vector3D * result);
+
+
+/******************************************************************************
+ ** **
+ ** Point Distance **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( float )
+Q3Point2D_Distance (const TQ3Point2D * p1,
+ const TQ3Point2D * p2);
+
+EXTERN_API_C( float )
+Q3Point2D_DistanceSquared (const TQ3Point2D * p1,
+ const TQ3Point2D * p2);
+
+
+EXTERN_API_C( float )
+Q3Param2D_Distance (const TQ3Param2D * p1,
+ const TQ3Param2D * p2);
+
+EXTERN_API_C( float )
+Q3Param2D_DistanceSquared (const TQ3Param2D * p1,
+ const TQ3Param2D * p2);
+
+
+EXTERN_API_C( float )
+Q3RationalPoint3D_Distance (const TQ3RationalPoint3D * p1,
+ const TQ3RationalPoint3D * p2);
+
+EXTERN_API_C( float )
+Q3RationalPoint3D_DistanceSquared (const TQ3RationalPoint3D * p1,
+ const TQ3RationalPoint3D * p2);
+
+
+EXTERN_API_C( float )
+Q3Point3D_Distance (const TQ3Point3D * p1,
+ const TQ3Point3D * p2);
+
+EXTERN_API_C( float )
+Q3Point3D_DistanceSquared (const TQ3Point3D * p1,
+ const TQ3Point3D * p2);
+
+
+EXTERN_API_C( float )
+Q3RationalPoint4D_Distance (const TQ3RationalPoint4D * p1,
+ const TQ3RationalPoint4D * p2);
+
+EXTERN_API_C( float )
+Q3RationalPoint4D_DistanceSquared (const TQ3RationalPoint4D * p1,
+ const TQ3RationalPoint4D * p2);
+
+
+/******************************************************************************
+ ** **
+ ** Point Relative Ratio **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Point2D *)
+Q3Point2D_RRatio (const TQ3Point2D * p1,
+ const TQ3Point2D * p2,
+ float r1,
+ float r2,
+ TQ3Point2D * result);
+
+EXTERN_API_C( TQ3Param2D *)
+Q3Param2D_RRatio (const TQ3Param2D * p1,
+ const TQ3Param2D * p2,
+ float r1,
+ float r2,
+ TQ3Param2D * result);
+
+EXTERN_API_C( TQ3Point3D *)
+Q3Point3D_RRatio (const TQ3Point3D * p1,
+ const TQ3Point3D * p2,
+ float r1,
+ float r2,
+ TQ3Point3D * result);
+
+EXTERN_API_C( TQ3RationalPoint4D *)
+Q3RationalPoint4D_RRatio (const TQ3RationalPoint4D * p1,
+ const TQ3RationalPoint4D * p2,
+ float r1,
+ float r2,
+ TQ3RationalPoint4D * result);
+
+
+/******************************************************************************
+ ** **
+ ** Point / Vector Addition & Subtraction **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Point2D *)
+Q3Point2D_Vector2D_Add (const TQ3Point2D * point2D,
+ const TQ3Vector2D * vector2D,
+ TQ3Point2D * result);
+
+EXTERN_API_C( TQ3Param2D *)
+Q3Param2D_Vector2D_Add (const TQ3Param2D * param2D,
+ const TQ3Vector2D * vector2D,
+ TQ3Param2D * result);
+
+EXTERN_API_C( TQ3Point3D *)
+Q3Point3D_Vector3D_Add (const TQ3Point3D * point3D,
+ const TQ3Vector3D * vector3D,
+ TQ3Point3D * result);
+
+EXTERN_API_C( TQ3Point2D *)
+Q3Point2D_Vector2D_Subtract (const TQ3Point2D * point2D,
+ const TQ3Vector2D * vector2D,
+ TQ3Point2D * result);
+
+EXTERN_API_C( TQ3Param2D *)
+Q3Param2D_Vector2D_Subtract (const TQ3Param2D * param2D,
+ const TQ3Vector2D * vector2D,
+ TQ3Param2D * result);
+
+EXTERN_API_C( TQ3Point3D *)
+Q3Point3D_Vector3D_Subtract (const TQ3Point3D * point3D,
+ const TQ3Vector3D * vector3D,
+ TQ3Point3D * result);
+
+
+/******************************************************************************
+ ** **
+ ** Vector Scale **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Vector2D *)
+Q3Vector2D_Scale (const TQ3Vector2D * vector2D,
+ float scalar,
+ TQ3Vector2D * result);
+
+EXTERN_API_C( TQ3Vector3D *)
+Q3Vector3D_Scale (const TQ3Vector3D * vector3D,
+ float scalar,
+ TQ3Vector3D * result);
+
+
+/******************************************************************************
+ ** **
+ ** Vector Length **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( float )
+Q3Vector2D_Length (const TQ3Vector2D * vector2D);
+
+EXTERN_API_C( float )
+Q3Vector3D_Length (const TQ3Vector3D * vector3D);
+
+
+/******************************************************************************
+ ** **
+ ** Vector Normalize **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Vector2D *)
+Q3Vector2D_Normalize (const TQ3Vector2D * vector2D,
+ TQ3Vector2D * result);
+
+EXTERN_API_C( TQ3Vector3D *)
+Q3Vector3D_Normalize (const TQ3Vector3D * vector3D,
+ TQ3Vector3D * result);
+
+
+/******************************************************************************
+ ** **
+ ** Vector/Vector Addition and Subtraction **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Vector2D *)
+Q3Vector2D_Add (const TQ3Vector2D * v1,
+ const TQ3Vector2D * v2,
+ TQ3Vector2D * result);
+
+EXTERN_API_C( TQ3Vector3D *)
+Q3Vector3D_Add (const TQ3Vector3D * v1,
+ const TQ3Vector3D * v2,
+ TQ3Vector3D * result);
+
+
+EXTERN_API_C( TQ3Vector2D *)
+Q3Vector2D_Subtract (const TQ3Vector2D * v1,
+ const TQ3Vector2D * v2,
+ TQ3Vector2D * result);
+
+EXTERN_API_C( TQ3Vector3D *)
+Q3Vector3D_Subtract (const TQ3Vector3D * v1,
+ const TQ3Vector3D * v2,
+ TQ3Vector3D * result);
+
+
+/******************************************************************************
+ ** **
+ ** Cross Product **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( float )
+Q3Vector2D_Cross (const TQ3Vector2D * v1,
+ const TQ3Vector2D * v2);
+
+EXTERN_API_C( TQ3Vector3D *)
+Q3Vector3D_Cross (const TQ3Vector3D * v1,
+ const TQ3Vector3D * v2,
+ TQ3Vector3D * result);
+
+EXTERN_API_C( TQ3Vector3D *)
+Q3Point3D_CrossProductTri (const TQ3Point3D * point1,
+ const TQ3Point3D * point2,
+ const TQ3Point3D * point3,
+ TQ3Vector3D * crossVector);
+
+
+/******************************************************************************
+ ** **
+ ** Dot Product **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( float )
+Q3Vector2D_Dot (const TQ3Vector2D * v1,
+ const TQ3Vector2D * v2);
+
+EXTERN_API_C( float )
+Q3Vector3D_Dot (const TQ3Vector3D * v1,
+ const TQ3Vector3D * v2);
+
+
+/******************************************************************************
+ ** **
+ ** Point and Vector Transformation **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Vector2D *)
+Q3Vector2D_Transform (const TQ3Vector2D * vector2D,
+ const TQ3Matrix3x3 * matrix3x3,
+ TQ3Vector2D * result);
+
+EXTERN_API_C( TQ3Vector3D *)
+Q3Vector3D_Transform (const TQ3Vector3D * vector3D,
+ const TQ3Matrix4x4 * matrix4x4,
+ TQ3Vector3D * result);
+
+EXTERN_API_C( TQ3Point2D *)
+Q3Point2D_Transform (const TQ3Point2D * point2D,
+ const TQ3Matrix3x3 * matrix3x3,
+ TQ3Point2D * result);
+
+EXTERN_API_C( TQ3Param2D *)
+Q3Param2D_Transform (const TQ3Param2D * param2D,
+ const TQ3Matrix3x3 * matrix3x3,
+ TQ3Param2D * result);
+
+EXTERN_API_C( TQ3Point3D *)
+Q3Point3D_Transform (const TQ3Point3D * point3D,
+ const TQ3Matrix4x4 * matrix4x4,
+ TQ3Point3D * result);
+
+EXTERN_API_C( TQ3RationalPoint4D *)
+Q3RationalPoint4D_Transform (const TQ3RationalPoint4D * point4D,
+ const TQ3Matrix4x4 * matrix4x4,
+ TQ3RationalPoint4D * result);
+
+EXTERN_API_C( TQ3Status )
+Q3Point3D_To3DTransformArray (const TQ3Point3D * inPoint3D,
+ const TQ3Matrix4x4 * matrix,
+ TQ3Point3D * outPoint3D,
+ long numPoints,
+ unsigned long inStructSize,
+ unsigned long outStructSize);
+
+EXTERN_API_C( TQ3Status )
+Q3Point3D_To4DTransformArray (const TQ3Point3D * inPoint3D,
+ const TQ3Matrix4x4 * matrix,
+ TQ3RationalPoint4D * outPoint4D,
+ long numPoints,
+ unsigned long inStructSize,
+ unsigned long outStructSize);
+
+EXTERN_API_C( TQ3Status )
+Q3RationalPoint4D_To4DTransformArray (const TQ3RationalPoint4D * inPoint4D,
+ const TQ3Matrix4x4 * matrix,
+ TQ3RationalPoint4D * outPoint4D,
+ long numPoints,
+ unsigned long inStructSize,
+ unsigned long outStructSize);
+
+
+/******************************************************************************
+ ** **
+ ** Vector Negation **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Vector2D *)
+Q3Vector2D_Negate (const TQ3Vector2D * vector2D,
+ TQ3Vector2D * result);
+
+EXTERN_API_C( TQ3Vector3D *)
+Q3Vector3D_Negate (const TQ3Vector3D * vector3D,
+ TQ3Vector3D * result);
+
+
+/******************************************************************************
+ ** **
+ ** Point conversion from cartesian to polar **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3PolarPoint *)
+Q3Point2D_ToPolar (const TQ3Point2D * point2D,
+ TQ3PolarPoint * result);
+
+EXTERN_API_C( TQ3Point2D *)
+Q3PolarPoint_ToPoint2D (const TQ3PolarPoint * polarPoint,
+ TQ3Point2D * result);
+
+EXTERN_API_C( TQ3SphericalPoint *)
+Q3Point3D_ToSpherical (const TQ3Point3D * point3D,
+ TQ3SphericalPoint * result);
+
+EXTERN_API_C( TQ3Point3D *)
+Q3SphericalPoint_ToPoint3D (const TQ3SphericalPoint * sphericalPoint,
+ TQ3Point3D * result);
+
+
+/******************************************************************************
+ ** **
+ ** Point Affine Combinations **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Point2D *)
+Q3Point2D_AffineComb (const TQ3Point2D * points2D,
+ const float * weights,
+ unsigned long nPoints,
+ TQ3Point2D * result);
+
+EXTERN_API_C( TQ3Param2D *)
+Q3Param2D_AffineComb (const TQ3Param2D * params2D,
+ const float * weights,
+ unsigned long nPoints,
+ TQ3Param2D * result);
+
+EXTERN_API_C( TQ3RationalPoint3D *)
+Q3RationalPoint3D_AffineComb (const TQ3RationalPoint3D * points3D,
+ const float * weights,
+ unsigned long numPoints,
+ TQ3RationalPoint3D * result);
+
+EXTERN_API_C( TQ3Point3D *)
+Q3Point3D_AffineComb (const TQ3Point3D * points3D,
+ const float * weights,
+ unsigned long numPoints,
+ TQ3Point3D * result);
+
+EXTERN_API_C( TQ3RationalPoint4D *)
+Q3RationalPoint4D_AffineComb (const TQ3RationalPoint4D * points4D,
+ const float * weights,
+ unsigned long numPoints,
+ TQ3RationalPoint4D * result);
+
+
+/******************************************************************************
+ ** **
+ ** Matrix Functions **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Matrix3x3 *)
+Q3Matrix3x3_Copy (const TQ3Matrix3x3 * matrix3x3,
+ TQ3Matrix3x3 * result);
+
+EXTERN_API_C( TQ3Matrix4x4 *)
+Q3Matrix4x4_Copy (const TQ3Matrix4x4 * matrix4x4,
+ TQ3Matrix4x4 * result);
+
+
+EXTERN_API_C( TQ3Matrix3x3 *)
+Q3Matrix3x3_SetIdentity (TQ3Matrix3x3 * matrix3x3);
+
+EXTERN_API_C( TQ3Matrix4x4 *)
+Q3Matrix4x4_SetIdentity (TQ3Matrix4x4 * matrix4x4);
+
+
+EXTERN_API_C( TQ3Matrix3x3 *)
+Q3Matrix3x3_Transpose (const TQ3Matrix3x3 * matrix3x3,
+ TQ3Matrix3x3 * result);
+
+EXTERN_API_C( TQ3Matrix4x4 *)
+Q3Matrix4x4_Transpose (const TQ3Matrix4x4 * matrix4x4,
+ TQ3Matrix4x4 * result);
+
+
+EXTERN_API_C( TQ3Matrix3x3 *)
+Q3Matrix3x3_Invert (const TQ3Matrix3x3 * matrix3x3,
+ TQ3Matrix3x3 * result);
+
+EXTERN_API_C( TQ3Matrix4x4 *)
+Q3Matrix4x4_Invert (const TQ3Matrix4x4 * matrix4x4,
+ TQ3Matrix4x4 * result);
+
+
+EXTERN_API_C( TQ3Matrix3x3 *)
+Q3Matrix3x3_Adjoint (const TQ3Matrix3x3 * matrix3x3,
+ TQ3Matrix3x3 * result);
+
+
+EXTERN_API_C( TQ3Matrix3x3 *)
+Q3Matrix3x3_Multiply (const TQ3Matrix3x3 * matrixA,
+ const TQ3Matrix3x3 * matrixB,
+ TQ3Matrix3x3 * result);
+
+EXTERN_API_C( TQ3Matrix4x4 *)
+Q3Matrix4x4_Multiply (const TQ3Matrix4x4 * matrixA,
+ const TQ3Matrix4x4 * matrixB,
+ TQ3Matrix4x4 * result);
+
+
+EXTERN_API_C( TQ3Matrix3x3 *)
+Q3Matrix3x3_SetTranslate (TQ3Matrix3x3 * matrix3x3,
+ float xTrans,
+ float yTrans);
+
+EXTERN_API_C( TQ3Matrix3x3 *)
+Q3Matrix3x3_SetScale (TQ3Matrix3x3 * matrix3x3,
+ float xScale,
+ float yScale);
+
+
+EXTERN_API_C( TQ3Matrix3x3 *)
+Q3Matrix3x3_SetRotateAboutPoint (TQ3Matrix3x3 * matrix3x3,
+ const TQ3Point2D * origin,
+ float angle);
+
+EXTERN_API_C( TQ3Matrix4x4 *)
+Q3Matrix4x4_SetTranslate (TQ3Matrix4x4 * matrix4x4,
+ float xTrans,
+ float yTrans,
+ float zTrans);
+
+EXTERN_API_C( TQ3Matrix4x4 *)
+Q3Matrix4x4_SetScale (TQ3Matrix4x4 * matrix4x4,
+ float xScale,
+ float yScale,
+ float zScale);
+
+
+EXTERN_API_C( TQ3Matrix4x4 *)
+Q3Matrix4x4_SetRotateAboutPoint (TQ3Matrix4x4 * matrix4x4,
+ const TQ3Point3D * origin,
+ float xAngle,
+ float yAngle,
+ float zAngle);
+
+EXTERN_API_C( TQ3Matrix4x4 *)
+Q3Matrix4x4_SetRotateAboutAxis (TQ3Matrix4x4 * matrix4x4,
+ const TQ3Point3D * origin,
+ const TQ3Vector3D * orientation,
+ float angle);
+
+EXTERN_API_C( TQ3Matrix4x4 *)
+Q3Matrix4x4_SetRotate_X (TQ3Matrix4x4 * matrix4x4,
+ float angle);
+
+EXTERN_API_C( TQ3Matrix4x4 *)
+Q3Matrix4x4_SetRotate_Y (TQ3Matrix4x4 * matrix4x4,
+ float angle);
+
+EXTERN_API_C( TQ3Matrix4x4 *)
+Q3Matrix4x4_SetRotate_Z (TQ3Matrix4x4 * matrix4x4,
+ float angle);
+
+EXTERN_API_C( TQ3Matrix4x4 *)
+Q3Matrix4x4_SetRotate_XYZ (TQ3Matrix4x4 * matrix4x4,
+ float xAngle,
+ float yAngle,
+ float zAngle);
+
+EXTERN_API_C( TQ3Matrix4x4 *)
+Q3Matrix4x4_SetRotateVectorToVector (TQ3Matrix4x4 * matrix4x4,
+ const TQ3Vector3D * v1,
+ const TQ3Vector3D * v2);
+
+EXTERN_API_C( TQ3Matrix4x4 *)
+Q3Matrix4x4_SetQuaternion (TQ3Matrix4x4 * matrix,
+ const TQ3Quaternion * quaternion);
+
+EXTERN_API_C( float )
+Q3Matrix3x3_Determinant (const TQ3Matrix3x3 * matrix3x3);
+
+EXTERN_API_C( float )
+Q3Matrix4x4_Determinant (const TQ3Matrix4x4 * matrix4x4);
+
+
+/******************************************************************************
+ ** **
+ ** Quaternion Routines **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Quaternion *)
+Q3Quaternion_Set (TQ3Quaternion * quaternion,
+ float w,
+ float x,
+ float y,
+ float z);
+
+EXTERN_API_C( TQ3Quaternion *)
+Q3Quaternion_SetIdentity (TQ3Quaternion * quaternion);
+
+EXTERN_API_C( TQ3Quaternion *)
+Q3Quaternion_Copy (const TQ3Quaternion * quaternion,
+ TQ3Quaternion * result);
+
+EXTERN_API_C( TQ3Boolean )
+Q3Quaternion_IsIdentity (const TQ3Quaternion * quaternion);
+
+EXTERN_API_C( TQ3Quaternion *)
+Q3Quaternion_Invert (const TQ3Quaternion * quaternion,
+ TQ3Quaternion * result);
+
+EXTERN_API_C( TQ3Quaternion *)
+Q3Quaternion_Normalize (const TQ3Quaternion * quaternion,
+ TQ3Quaternion * result);
+
+EXTERN_API_C( float )
+Q3Quaternion_Dot (const TQ3Quaternion * q1,
+ const TQ3Quaternion * q2);
+
+EXTERN_API_C( TQ3Quaternion *)
+Q3Quaternion_Multiply (const TQ3Quaternion * q1,
+ const TQ3Quaternion * q2,
+ TQ3Quaternion * result);
+
+EXTERN_API_C( TQ3Quaternion *)
+Q3Quaternion_SetRotateAboutAxis (TQ3Quaternion * quaternion,
+ const TQ3Vector3D * axis,
+ float angle);
+
+EXTERN_API_C( TQ3Quaternion *)
+Q3Quaternion_SetRotate_XYZ (TQ3Quaternion * quaternion,
+ float xAngle,
+ float yAngle,
+ float zAngle);
+
+EXTERN_API_C( TQ3Quaternion *)
+Q3Quaternion_SetRotate_X (TQ3Quaternion * quaternion,
+ float angle);
+
+EXTERN_API_C( TQ3Quaternion *)
+Q3Quaternion_SetRotate_Y (TQ3Quaternion * quaternion,
+ float angle);
+
+EXTERN_API_C( TQ3Quaternion *)
+Q3Quaternion_SetRotate_Z (TQ3Quaternion * quaternion,
+ float angle);
+
+
+EXTERN_API_C( TQ3Quaternion *)
+Q3Quaternion_SetMatrix (TQ3Quaternion * quaternion,
+ const TQ3Matrix4x4 * matrix);
+
+EXTERN_API_C( TQ3Quaternion *)
+Q3Quaternion_SetRotateVectorToVector (TQ3Quaternion * quaternion,
+ const TQ3Vector3D * v1,
+ const TQ3Vector3D * v2);
+
+EXTERN_API_C( TQ3Quaternion *)
+Q3Quaternion_MatchReflection (const TQ3Quaternion * q1,
+ const TQ3Quaternion * q2,
+ TQ3Quaternion * result);
+
+EXTERN_API_C( TQ3Quaternion *)
+Q3Quaternion_InterpolateFast (const TQ3Quaternion * q1,
+ const TQ3Quaternion * q2,
+ float t,
+ TQ3Quaternion * result);
+
+EXTERN_API_C( TQ3Quaternion *)
+Q3Quaternion_InterpolateLinear (const TQ3Quaternion * q1,
+ const TQ3Quaternion * q2,
+ float t,
+ TQ3Quaternion * result);
+
+EXTERN_API_C( TQ3Vector3D *)
+Q3Vector3D_TransformQuaternion (const TQ3Vector3D * vector3D,
+ const TQ3Quaternion * quaternion,
+ TQ3Vector3D * result);
+
+EXTERN_API_C( TQ3Point3D *)
+Q3Point3D_TransformQuaternion (const TQ3Point3D * point3D,
+ const TQ3Quaternion * quaternion,
+ TQ3Point3D * result);
+
+
+/******************************************************************************
+ ** **
+ ** Volume Routines **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3BoundingBox *)
+Q3BoundingBox_Copy (const TQ3BoundingBox * src,
+ TQ3BoundingBox * dest);
+
+EXTERN_API_C( TQ3BoundingBox *)
+Q3BoundingBox_Union (const TQ3BoundingBox * v1,
+ const TQ3BoundingBox * v2,
+ TQ3BoundingBox * result);
+
+EXTERN_API_C( TQ3BoundingBox *)
+Q3BoundingBox_Set (TQ3BoundingBox * bBox,
+ const TQ3Point3D * min,
+ const TQ3Point3D * max,
+ TQ3Boolean isEmpty);
+
+EXTERN_API_C( TQ3BoundingBox *)
+Q3BoundingBox_UnionPoint3D (const TQ3BoundingBox * bBox,
+ const TQ3Point3D * point3D,
+ TQ3BoundingBox * result);
+
+EXTERN_API_C( TQ3BoundingBox *)
+Q3BoundingBox_UnionRationalPoint4D (const TQ3BoundingBox * bBox,
+ const TQ3RationalPoint4D * point4D,
+ TQ3BoundingBox * result);
+
+EXTERN_API_C( TQ3BoundingBox *)
+Q3BoundingBox_SetFromPoints3D (TQ3BoundingBox * bBox,
+ const TQ3Point3D * points3D,
+ unsigned long numPoints,
+ unsigned long structSize);
+
+EXTERN_API_C( TQ3BoundingBox *)
+Q3BoundingBox_SetFromRationalPoints4D (TQ3BoundingBox * bBox,
+ const TQ3RationalPoint4D * points4D,
+ unsigned long numPoints,
+ unsigned long structSize);
+
+
+/******************************************************************************
+ ** **
+ ** Sphere Routines **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3BoundingSphere *)
+Q3BoundingSphere_Copy (const TQ3BoundingSphere * src,
+ TQ3BoundingSphere * dest);
+
+EXTERN_API_C( TQ3BoundingSphere *)
+Q3BoundingSphere_Union (const TQ3BoundingSphere * s1,
+ const TQ3BoundingSphere * s2,
+ TQ3BoundingSphere * result);
+
+EXTERN_API_C( TQ3BoundingSphere *)
+Q3BoundingSphere_Set (TQ3BoundingSphere * bSphere,
+ const TQ3Point3D * origin,
+ float radius,
+ TQ3Boolean isEmpty);
+
+EXTERN_API_C( TQ3BoundingSphere *)
+Q3BoundingSphere_UnionPoint3D (const TQ3BoundingSphere * bSphere,
+ const TQ3Point3D * point3D,
+ TQ3BoundingSphere * result);
+
+EXTERN_API_C( TQ3BoundingSphere *)
+Q3BoundingSphere_UnionRationalPoint4D (const TQ3BoundingSphere * bSphere,
+ const TQ3RationalPoint4D * point4D,
+ TQ3BoundingSphere * result);
+
+
+EXTERN_API_C( TQ3BoundingSphere *)
+Q3BoundingSphere_SetFromPoints3D (TQ3BoundingSphere * bSphere,
+ const TQ3Point3D * points3D,
+ unsigned long numPoints,
+ unsigned long structSize);
+
+EXTERN_API_C( TQ3BoundingSphere *)
+Q3BoundingSphere_SetFromRationalPoints4D (TQ3BoundingSphere * bSphere,
+ const TQ3RationalPoint4D * points4D,
+ unsigned long numPoints,
+ unsigned long structSize);
+
+
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __QD3DMATH__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__QD3DMATH__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QD3DMATH__ */
+
diff --git a/include/qt/QD3DPick.h b/include/qt/QD3DPick.h
new file mode 100644
index 000000000..35aa6fd54
--- /dev/null
+++ b/include/qt/QD3DPick.h
@@ -0,0 +1,354 @@
+/*
+ File: QD3DPick.h
+
+ Contains: Q3Pick methods
+
+ Version: Technology: Quickdraw 3D 1.6
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QD3DPICK__
+#define __QD3DPICK__
+
+#ifndef __QD3D__
+#include "QD3D.h"
+#endif
+
+
+#ifndef __QD3DSTYLE__
+#include "QD3DStyle.h"
+#endif
+
+#ifndef __QD3DGEOMETRY__
+#include "QD3DGeometry.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __QD3DPICK__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __QD3DPICK__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+/*****************************************************************************
+ ** **
+ ** Mask bits for hit information **
+ ** **
+ *****************************************************************************/
+
+enum TQ3PickDetailMasks {
+ kQ3PickDetailNone = 0,
+ kQ3PickDetailMaskPickID = 1 << 0,
+ kQ3PickDetailMaskPath = 1 << 1,
+ kQ3PickDetailMaskObject = 1 << 2,
+ kQ3PickDetailMaskLocalToWorldMatrix = 1 << 3,
+ kQ3PickDetailMaskXYZ = 1 << 4,
+ kQ3PickDetailMaskDistance = 1 << 5,
+ kQ3PickDetailMaskNormal = 1 << 6,
+ kQ3PickDetailMaskShapePart = 1 << 7,
+ kQ3PickDetailMaskPickPart = 1 << 8,
+ kQ3PickDetailMaskUV = 1 << 9
+};
+typedef enum TQ3PickDetailMasks TQ3PickDetailMasks;
+
+typedef unsigned long TQ3PickDetail;
+/******************************************************************************
+ ** **
+ ** Hitlist sorting **
+ ** **
+ *****************************************************************************/
+
+enum TQ3PickSort {
+ kQ3PickSortNone = 0,
+ kQ3PickSortNearToFar = 1,
+ kQ3PickSortFarToNear = 2
+};
+typedef enum TQ3PickSort TQ3PickSort;
+
+
+/******************************************************************************
+ ** **
+ ** Data structures to set up the pick object **
+ ** **
+ *****************************************************************************/
+#define kQ3ReturnAllHits 0
+
+struct TQ3PickData {
+ TQ3PickSort sort;
+ TQ3PickDetail mask;
+ unsigned long numHitsToReturn;
+};
+typedef struct TQ3PickData TQ3PickData;
+
+struct TQ3WindowPointPickData {
+ TQ3PickData data;
+ TQ3Point2D point;
+ float vertexTolerance;
+ float edgeTolerance;
+};
+typedef struct TQ3WindowPointPickData TQ3WindowPointPickData;
+
+struct TQ3WindowRectPickData {
+ TQ3PickData data;
+ TQ3Area rect;
+};
+typedef struct TQ3WindowRectPickData TQ3WindowRectPickData;
+
+struct TQ3WorldRayPickData {
+ TQ3PickData data;
+ TQ3Ray3D ray;
+ float vertexTolerance;
+ float edgeTolerance;
+};
+typedef struct TQ3WorldRayPickData TQ3WorldRayPickData;
+
+/******************************************************************************
+ ** **
+ ** Hit data **
+ ** **
+ *****************************************************************************/
+
+struct TQ3HitPath {
+ TQ3GroupObject rootGroup;
+ unsigned long depth;
+ TQ3GroupPosition * positions;
+};
+typedef struct TQ3HitPath TQ3HitPath;
+/******************************************************************************
+ ** **
+ ** Pick class methods **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3ObjectType )
+Q3Pick_GetType (TQ3PickObject pick);
+
+EXTERN_API_C( TQ3Status )
+Q3Pick_GetData (TQ3PickObject pick,
+ TQ3PickData * data);
+
+EXTERN_API_C( TQ3Status )
+Q3Pick_SetData (TQ3PickObject pick,
+ const TQ3PickData * data);
+
+EXTERN_API_C( TQ3Status )
+Q3Pick_GetVertexTolerance (TQ3PickObject pick,
+ float * vertexTolerance);
+
+EXTERN_API_C( TQ3Status )
+Q3Pick_GetEdgeTolerance (TQ3PickObject pick,
+ float * edgeTolerance);
+
+EXTERN_API_C( TQ3Status )
+Q3Pick_SetVertexTolerance (TQ3PickObject pick,
+ float vertexTolerance);
+
+EXTERN_API_C( TQ3Status )
+Q3Pick_SetEdgeTolerance (TQ3PickObject pick,
+ float edgeTolerance);
+
+EXTERN_API_C( TQ3Status )
+Q3Pick_GetNumHits (TQ3PickObject pick,
+ unsigned long * numHits);
+
+EXTERN_API_C( TQ3Status )
+Q3Pick_EmptyHitList (TQ3PickObject pick);
+
+EXTERN_API_C( TQ3Status )
+Q3Pick_GetPickDetailValidMask (TQ3PickObject pick,
+ unsigned long index,
+ TQ3PickDetail * pickDetailValidMask);
+
+EXTERN_API_C( TQ3Status )
+Q3Pick_GetPickDetailData (TQ3PickObject pick,
+ unsigned long index,
+ TQ3PickDetail pickDetailValue,
+ void * detailData);
+
+EXTERN_API_C( TQ3Status )
+Q3HitPath_EmptyData (TQ3HitPath * hitPath);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+/******************************************************************************
+ ** **
+ ** Window point pick methods **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3PickObject )
+Q3WindowPointPick_New (const TQ3WindowPointPickData * data);
+
+EXTERN_API_C( TQ3Status )
+Q3WindowPointPick_GetPoint (TQ3PickObject pick,
+ TQ3Point2D * point);
+
+EXTERN_API_C( TQ3Status )
+Q3WindowPointPick_SetPoint (TQ3PickObject pick,
+ const TQ3Point2D * point);
+
+EXTERN_API_C( TQ3Status )
+Q3WindowPointPick_GetData (TQ3PickObject pick,
+ TQ3WindowPointPickData * data);
+
+EXTERN_API_C( TQ3Status )
+Q3WindowPointPick_SetData (TQ3PickObject pick,
+ const TQ3WindowPointPickData * data);
+
+
+/******************************************************************************
+ ** **
+ ** Window rect pick methods **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3PickObject )
+Q3WindowRectPick_New (const TQ3WindowRectPickData * data);
+
+EXTERN_API_C( TQ3Status )
+Q3WindowRectPick_GetRect (TQ3PickObject pick,
+ TQ3Area * rect);
+
+EXTERN_API_C( TQ3Status )
+Q3WindowRectPick_SetRect (TQ3PickObject pick,
+ const TQ3Area * rect);
+
+EXTERN_API_C( TQ3Status )
+Q3WindowRectPick_GetData (TQ3PickObject pick,
+ TQ3WindowRectPickData * data);
+
+EXTERN_API_C( TQ3Status )
+Q3WindowRectPick_SetData (TQ3PickObject pick,
+ const TQ3WindowRectPickData * data);
+
+
+/******************************************************************************
+ ** **
+ ** World ray pick methods **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3PickObject )
+Q3WorldRayPick_New (const TQ3WorldRayPickData * data);
+
+EXTERN_API_C( TQ3Status )
+Q3WorldRayPick_GetRay (TQ3PickObject pick,
+ TQ3Ray3D * ray);
+
+EXTERN_API_C( TQ3Status )
+Q3WorldRayPick_SetRay (TQ3PickObject pick,
+ const TQ3Ray3D * ray);
+
+EXTERN_API_C( TQ3Status )
+Q3WorldRayPick_GetData (TQ3PickObject pick,
+ TQ3WorldRayPickData * data);
+
+EXTERN_API_C( TQ3Status )
+Q3WorldRayPick_SetData (TQ3PickObject pick,
+ const TQ3WorldRayPickData * data);
+
+
+
+/******************************************************************************
+ ** **
+ ** Shape Part methods **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3ObjectType )
+Q3ShapePart_GetType (TQ3ShapePartObject shapePartObject);
+
+EXTERN_API_C( TQ3ObjectType )
+Q3MeshPart_GetType (TQ3MeshPartObject meshPartObject);
+
+EXTERN_API_C( TQ3Status )
+Q3ShapePart_GetShape (TQ3ShapePartObject shapePartObject,
+ TQ3ShapeObject * shapeObject);
+
+EXTERN_API_C( TQ3Status )
+Q3MeshPart_GetComponent (TQ3MeshPartObject meshPartObject,
+ TQ3MeshComponent * component);
+
+EXTERN_API_C( TQ3Status )
+Q3MeshFacePart_GetFace (TQ3MeshFacePartObject meshFacePartObject,
+ TQ3MeshFace * face);
+
+EXTERN_API_C( TQ3Status )
+Q3MeshEdgePart_GetEdge (TQ3MeshEdgePartObject meshEdgePartObject,
+ TQ3MeshEdge * edge);
+
+EXTERN_API_C( TQ3Status )
+Q3MeshVertexPart_GetVertex (TQ3MeshVertexPartObject meshVertexPartObject,
+ TQ3MeshVertex * vertex);
+
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __QD3DPICK__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__QD3DPICK__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QD3DPICK__ */
+
diff --git a/include/qt/QD3DRenderer.h b/include/qt/QD3DRenderer.h
new file mode 100644
index 000000000..25bd835a9
--- /dev/null
+++ b/include/qt/QD3DRenderer.h
@@ -0,0 +1,1298 @@
+/*
+ File: QD3DRenderer.h
+
+ Contains: Q3Renderer types and routines
+
+ Version: Technology: Quickdraw 3D 1.6
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QD3DRENDERER__
+#define __QD3DRENDERER__
+
+#ifndef __QD3D__
+#include "QD3D.h"
+#endif
+
+#ifndef __QD3DSET__
+#include "QD3DSet.h"
+#endif
+
+#ifndef __QD3DVIEW__
+#include "QD3DView.h"
+#endif
+
+#ifndef __RAVE__
+#include "RAVE.h"
+#endif
+
+
+#if TARGET_OS_MAC
+#ifndef __EVENTS__
+#include "Events.h"
+#endif
+
+#endif /* TARGET_OS_MAC */
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __QD3DRENDERER__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __QD3DRENDERER__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+/******************************************************************************
+ ** **
+ ** User Interface Things **
+ ** **
+ *****************************************************************************/
+#if TARGET_OS_MAC
+/*
+ * A callback to an application's event handling code. This is needed to
+ * support movable modal dialogs. The dialog's event filter calls this
+ * callback with events it does not handle.
+ * If an application handles the event it should return kQ3True.
+ * If the application does not handle the event it must return kQ3False and
+ * the dialog's event filter will pass the event to the system unhandled.
+ */
+typedef CALLBACK_API_C( TQ3Boolean , TQ3MacOSDialogEventHandler )(const EventRecord *event);
+
+struct TQ3DialogAnchor {
+ TQ3MacOSDialogEventHandler clientEventHandler;
+};
+typedef struct TQ3DialogAnchor TQ3DialogAnchor;
+#endif /* TARGET_OS_MAC */
+
+#if TARGET_OS_WIN32
+
+struct TQ3DialogAnchor {
+ HWND ownerWindow;
+};
+typedef struct TQ3DialogAnchor TQ3DialogAnchor;
+#endif /* TARGET_OS_WIN32 */
+
+#if TARGET_OS_UNIX
+
+struct TQ3DialogAnchor {
+ void * notUsed; /* place holder */
+};
+typedef struct TQ3DialogAnchor TQ3DialogAnchor;
+#endif /* TARGET_OS_UNIX */
+
+/******************************************************************************
+ ** **
+ ** Renderer Functions **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3RendererObject )
+Q3Renderer_NewFromType (TQ3ObjectType rendererObjectType);
+
+EXTERN_API_C( TQ3ObjectType )
+Q3Renderer_GetType (TQ3RendererObject renderer);
+
+
+/* Q3Renderer_Flush has been replaced by Q3View_Flush */
+/* Q3Renderer_Sync has been replaced by Q3View_Sync */
+#endif /* CALL_NOT_IN_CARBON */
+
+
+/*
+ * Q3Renderer_IsInteractive
+ * Determine if this renderer is intended to be used interactively.
+ */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3Boolean )
+Q3Renderer_IsInteractive (TQ3RendererObject renderer);
+
+
+/*
+ * Q3Renderer_HasModalConfigure
+ * Determine if this renderer has a modal settings dialog.
+ *
+ * Q3Renderer_ModalConfigure
+ * Have the renderer pop up a modal dialog box to configure its settings.
+ * dialogAnchor - is platform specific data passed by the client to support
+ * movable modal dialogs.
+ * MacOS: this is a callback to the calling application's event handler.
+ * The renderer calls this function with events not handled by the
+ * settings dialog. This is necessary in order to support movable modal
+ * dialogs. An application's event handler must return kQ3True if it
+ * handles the event passed to the callback or kQ3False if not.
+ * An application which doesn't want to support a movable modal configure
+ * dialog should pass NULL for the clientEventHandler of TQ3DialogAnchor.
+ * Win32: this is the HWND of the owning window (typically an application's
+ * main window).
+ * canceled - returns a boolean inditacating that the user canceled the
+ * dialog.
+ *
+ */
+EXTERN_API_C( TQ3Boolean )
+Q3Renderer_HasModalConfigure (TQ3RendererObject renderer);
+
+EXTERN_API_C( TQ3Status )
+Q3Renderer_ModalConfigure (TQ3RendererObject renderer,
+ TQ3DialogAnchor dialogAnchor,
+ TQ3Boolean * canceled);
+
+/*
+ * Q3RendererClass_GetNickNameString
+ * Allows an application to get a renderers name string, the
+ * renderer is responsible for storing this in a localizable format
+ * for example as a resource. This string can then be used to provide
+ * a selection mechanism for an application (for example in a menu).
+ *
+ * If this call returns nil in the supplied string, then the App may
+ * choose to use the class name for the renderer. You should always
+ * try to get the name string before using the class name, since the
+ * class name is not localizable.
+ */
+EXTERN_API_C( TQ3Status )
+Q3RendererClass_GetNickNameString (TQ3ObjectType rendererClassType,
+ TQ3ObjectClassNameString rendererClassString);
+
+
+/*
+ * Q3Renderer_GetConfigurationData
+ * Allows an application to collect private renderer configuration data
+ * which it will then save. For example in a preference file or in a
+ * style template. An application should tag this data with the
+ * Renderer's object name.
+ *
+ * if dataBuffer is NULL actualDataSize returns the required size in
+ * bytes of a data buffer large enough to store private data.
+ *
+ * bufferSize is the actual size of the memory block pointed to by
+ * dataBuffer
+ *
+ * actualDataSize - on return the actual number of bytes written to the
+ * buffer or if dataBuffer is NULL the required size of dataBuffer
+ *
+ */
+EXTERN_API_C( TQ3Status )
+Q3Renderer_GetConfigurationData (TQ3RendererObject renderer,
+ unsigned char * dataBuffer,
+ unsigned long bufferSize,
+ unsigned long * actualDataSize);
+
+EXTERN_API_C( TQ3Status )
+Q3Renderer_SetConfigurationData (TQ3RendererObject renderer,
+ unsigned char * dataBuffer,
+ unsigned long bufferSize);
+
+
+
+/******************************************************************************
+ ** **
+ ** Interactive Renderer Specific Functions **
+ ** **
+ *****************************************************************************/
+/* CSG IDs attribute */
+#define kQ3AttributeTypeConstructiveSolidGeometryID Q3_OBJECT_TYPE('c','s','g','i')
+/* Object IDs, to be applied as attributes on geometries */
+#endif /* CALL_NOT_IN_CARBON */
+
+#define kQ3SolidGeometryObjNone (-1)
+#define kQ3SolidGeometryObjA 0
+#define kQ3SolidGeometryObjB 1
+#define kQ3SolidGeometryObjC 2
+#define kQ3SolidGeometryObjD 3
+#define kQ3SolidGeometryObjE 4
+/* Possible CSG equations */
+
+enum TQ3CSGEquation {
+ kQ3CSGEquationAandB = (long)0x88888888,
+ kQ3CSGEquationAandnotB = 0x22222222,
+ kQ3CSGEquationAanBonCad = 0x2F222F22,
+ kQ3CSGEquationnotAandB = 0x44444444,
+ kQ3CSGEquationnAaBorCanB = 0x74747474
+};
+typedef enum TQ3CSGEquation TQ3CSGEquation;
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3Status )
+Q3InteractiveRenderer_SetCSGEquation (TQ3RendererObject renderer,
+ TQ3CSGEquation equation);
+
+EXTERN_API_C( TQ3Status )
+Q3InteractiveRenderer_GetCSGEquation (TQ3RendererObject renderer,
+ TQ3CSGEquation * equation);
+
+EXTERN_API_C( TQ3Status )
+Q3InteractiveRenderer_SetPreferences (TQ3RendererObject renderer,
+ long vendorID,
+ long engineID);
+
+EXTERN_API_C( TQ3Status )
+Q3InteractiveRenderer_GetPreferences (TQ3RendererObject renderer,
+ long * vendorID,
+ long * engineID);
+
+EXTERN_API_C( TQ3Status )
+Q3InteractiveRenderer_SetDoubleBufferBypass (TQ3RendererObject renderer,
+ TQ3Boolean bypass);
+
+EXTERN_API_C( TQ3Status )
+Q3InteractiveRenderer_GetDoubleBufferBypass (TQ3RendererObject renderer,
+ TQ3Boolean * bypass);
+
+EXTERN_API_C( TQ3Status )
+Q3InteractiveRenderer_SetRAVEContextHints (TQ3RendererObject renderer,
+ unsigned long RAVEContextHints);
+
+EXTERN_API_C( TQ3Status )
+Q3InteractiveRenderer_GetRAVEContextHints (TQ3RendererObject renderer,
+ unsigned long * RAVEContextHints);
+
+EXTERN_API_C( TQ3Status )
+Q3InteractiveRenderer_SetRAVETextureFilter (TQ3RendererObject renderer,
+ unsigned long RAVEtextureFilterValue);
+
+EXTERN_API_C( TQ3Status )
+Q3InteractiveRenderer_GetRAVETextureFilter (TQ3RendererObject renderer,
+ unsigned long * RAVEtextureFilterValue);
+
+EXTERN_API_C( TQ3Status )
+Q3InteractiveRenderer_CountRAVEDrawContexts (TQ3RendererObject renderer,
+ unsigned long * numRAVEContexts);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API_C( void , TQ3RaveDestroyCallback )(TQ3RendererObject renderer);
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3Status )
+Q3InteractiveRenderer_GetRAVEDrawContexts (TQ3RendererObject renderer,
+ TQADrawContext ** raveDrawContextList,
+ TQAEngine ** raveDrawingEnginesList,
+ unsigned long * numRAVEContexts,
+ TQ3RaveDestroyCallback raveDestroyCallback);
+
+
+
+
+/******************************************************************************
+ ** **
+ ** Renderer View Tools **
+ ** **
+ ** You may only call these methods from a plug-in **
+ ** **
+ *****************************************************************************/
+/*
+ * Call by a renderer to call the user "idle" method, with progress
+ * information.
+ *
+ * Pass in (view, 0, n) on first call
+ * Pass in (view, 1..n-1, n) during rendering
+ * Pass in (view, n, n) upon completion
+ *
+ * Note: The user must have supplied an idleProgress method with
+ * Q3XView_SetIdleProgressMethod. Otherwise, the generic idle method is
+ * called with no progress data. e.g. the Q3View_SetIdleMethod method
+ * is called instead. (current and final are ignored, essentially.)
+ *
+ * Returns kQ3Failure if rendering is cancelled.
+ */
+EXTERN_API_C( TQ3Status )
+Q3XView_IdleProgress (TQ3ViewObject view,
+ unsigned long current,
+ unsigned long completed);
+
+/*
+ * Called by an asynchronous renderer when it completes a frame.
+ */
+EXTERN_API_C( TQ3Status )
+Q3XView_EndFrame (TQ3ViewObject view);
+
+
+/******************************************************************************
+ ** **
+ ** Renderer AttributeSet Tools **
+ ** **
+ ** You may only call these methods from a plug-in **
+ ** **
+ *****************************************************************************/
+/*
+ * Faster access to geometry attribute sets.
+ *
+ * Returns pointer to INTERNAL data structure for elements and attributes
+ * in an attributeSet, or NULL if no attribute exists.
+ *
+ * For attributes of type kQ3AttributeType..., the internal data structure
+ * is identical to the data structure used in Q3AttributeSet_Add.
+ */
+EXTERN_API_C( void *)
+Q3XAttributeSet_GetPointer (TQ3AttributeSet attributeSet,
+ TQ3AttributeType attributeType);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+enum {
+ kQ3XAttributeMaskNone = 0L,
+ kQ3XAttributeMaskSurfaceUV = 1 << (kQ3AttributeTypeSurfaceUV - 1),
+ kQ3XAttributeMaskShadingUV = 1 << (kQ3AttributeTypeShadingUV - 1),
+ kQ3XAttributeMaskNormal = 1 << (kQ3AttributeTypeNormal - 1),
+ kQ3XAttributeMaskAmbientCoefficient = 1 << (kQ3AttributeTypeAmbientCoefficient - 1),
+ kQ3XAttributeMaskDiffuseColor = 1 << (kQ3AttributeTypeDiffuseColor - 1),
+ kQ3XAttributeMaskSpecularColor = 1 << (kQ3AttributeTypeSpecularColor - 1),
+ kQ3XAttributeMaskSpecularControl = 1 << (kQ3AttributeTypeSpecularControl - 1),
+ kQ3XAttributeMaskTransparencyColor = 1 << (kQ3AttributeTypeTransparencyColor - 1),
+ kQ3XAttributeMaskSurfaceTangent = 1 << (kQ3AttributeTypeSurfaceTangent - 1),
+ kQ3XAttributeMaskHighlightState = 1 << (kQ3AttributeTypeHighlightState - 1),
+ kQ3XAttributeMaskSurfaceShader = 1 << (kQ3AttributeTypeSurfaceShader - 1),
+ kQ3XAttributeMaskCustomAttribute = (long)0x80000000,
+ kQ3XAttributeMaskAll = 0x800007FF,
+ kQ3XAttributeMaskInherited = 0x03FF,
+ kQ3XAttributeMaskInterpolated = kQ3XAttributeMaskSurfaceUV | kQ3XAttributeMaskShadingUV | kQ3XAttributeMaskNormal | kQ3XAttributeMaskAmbientCoefficient | kQ3XAttributeMaskDiffuseColor | kQ3XAttributeMaskSpecularColor | kQ3XAttributeMaskSpecularControl | kQ3XAttributeMaskTransparencyColor | kQ3XAttributeMaskSurfaceTangent
+};
+
+
+typedef unsigned long TQ3XAttributeMask;
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3XAttributeMask )
+Q3XAttributeSet_GetMask (TQ3AttributeSet attributeSet);
+
+
+/******************************************************************************
+ ** **
+ ** Renderer Draw Context Tools **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef struct OpaqueTQ3XDrawRegion* TQ3XDrawRegion;
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3Status )
+Q3XDrawContext_GetDrawRegion (TQ3DrawContextObject drawContext,
+ TQ3XDrawRegion * drawRegion);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+enum TQ3XDrawContextValidationMasks {
+ kQ3XDrawContextValidationClearFlags = 0x00000000,
+ kQ3XDrawContextValidationDoubleBuffer = 1 << 0,
+ kQ3XDrawContextValidationShader = 1 << 1,
+ kQ3XDrawContextValidationClearFunction = 1 << 2,
+ kQ3XDrawContextValidationActiveBuffer = 1 << 3,
+ kQ3XDrawContextValidationInternalOffScreen = 1 << 4,
+ kQ3XDrawContextValidationPane = 1 << 5,
+ kQ3XDrawContextValidationMask = 1 << 6,
+ kQ3XDrawContextValidationDevice = 1 << 7,
+ kQ3XDrawContextValidationWindow = 1 << 8,
+ kQ3XDrawContextValidationWindowSize = 1 << 9,
+ kQ3XDrawContextValidationWindowClip = 1 << 10,
+ kQ3XDrawContextValidationWindowPosition = 1 << 11,
+ kQ3XDrawContextValidationPlatformAttributes = 1 << 12,
+ kQ3XDrawContextValidationForegroundShader = 1 << 13,
+ kQ3XDrawContextValidationBackgroundShader = 1 << 14,
+ kQ3XDrawContextValidationColorPalette = 1 << 15,
+ kQ3XDrawContextValidationAll = (long)0xFFFFFFFF
+};
+typedef enum TQ3XDrawContextValidationMasks TQ3XDrawContextValidationMasks;
+
+typedef unsigned long TQ3XDrawContextValidation;
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3Status )
+Q3XDrawContext_ClearValidationFlags (TQ3DrawContextObject drawContext);
+
+EXTERN_API_C( TQ3Status )
+Q3XDrawContext_GetValidationFlags (TQ3DrawContextObject drawContext,
+ TQ3XDrawContextValidation * validationFlags);
+
+
+/******************************************************************************
+ ** **
+ ** Renderer Draw Region Tools **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+enum TQ3XDevicePixelType {
+ /* These do not indicate byte ordering */
+ kQ3XDevicePixelTypeInvalid = 0, /* Unknown, un-initialized type */
+ kQ3XDevicePixelTypeRGB32 = 1, /* Alpha:8 (ignored), R:8, G:8, B:8 */
+ kQ3XDevicePixelTypeARGB32 = 2, /* Alpha:8, R:8, G:8, B:8 */
+ kQ3XDevicePixelTypeRGB24 = 3, /* 24 bits/pixel, R:8, G:8, B:8 */
+ kQ3XDevicePixelTypeRGB16 = 4, /* Alpha:1 (ignored), R:5, G:5, B:5 */
+ kQ3XDevicePixelTypeARGB16 = 5, /* Alpha:1, R:5, G:5, B:5 */
+ kQ3XDevicePixelTypeRGB16_565 = 6, /* 16 bits/pixel, R:5, G:6, B:5 */
+ kQ3XDevicePixelTypeIndexed8 = 7, /* 8-bit color table index */
+ kQ3XDevicePixelTypeIndexed4 = 8, /* 4-bit color table index */
+ kQ3XDevicePixelTypeIndexed2 = 9, /* 2-bit color table index */
+ kQ3XDevicePixelTypeIndexed1 = 10 /* 1-bit color table index */
+};
+typedef enum TQ3XDevicePixelType TQ3XDevicePixelType;
+
+
+enum TQ3XClipMaskState {
+ kQ3XClipMaskFullyExposed = 0,
+ kQ3XClipMaskPartiallyExposed = 1,
+ kQ3XClipMaskNotExposed = 2
+};
+typedef enum TQ3XClipMaskState TQ3XClipMaskState;
+
+
+struct TQ3XColorDescriptor {
+ unsigned long redShift;
+ unsigned long redMask;
+ unsigned long greenShift;
+ unsigned long greenMask;
+ unsigned long blueShift;
+ unsigned long blueMask;
+ unsigned long alphaShift;
+ unsigned long alphaMask;
+};
+typedef struct TQ3XColorDescriptor TQ3XColorDescriptor;
+
+struct TQ3XDrawRegionDescriptor {
+ unsigned long width;
+ unsigned long height;
+ unsigned long rowBytes;
+ unsigned long pixelSize;
+ TQ3XDevicePixelType pixelType;
+ TQ3XColorDescriptor colorDescriptor;
+ TQ3Endian bitOrder;
+ TQ3Endian byteOrder;
+ TQ3Bitmap * clipMask;
+};
+typedef struct TQ3XDrawRegionDescriptor TQ3XDrawRegionDescriptor;
+
+enum TQ3XDrawRegionServicesMasks {
+ kQ3XDrawRegionServicesNoneFlag = 0L,
+ kQ3XDrawRegionServicesClearFlag = 1 << 0,
+ kQ3XDrawRegionServicesDontLockDDSurfaceFlag = 1 << 1
+};
+typedef enum TQ3XDrawRegionServicesMasks TQ3XDrawRegionServicesMasks;
+
+
+typedef unsigned long TQ3XDrawRegionServices;
+typedef CALLBACK_API_C( void , TQ3XDrawRegionRendererPrivateDeleteMethod )(void *rendererPrivate);
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3Status )
+Q3XDrawRegion_GetDeviceScaleX (TQ3XDrawRegion drawRegion,
+ float * deviceScaleX);
+
+EXTERN_API_C( TQ3Status )
+Q3XDrawRegion_GetDeviceScaleY (TQ3XDrawRegion drawRegion,
+ float * deviceScaleY);
+
+
+EXTERN_API_C( TQ3Status )
+Q3XDrawRegion_GetDeviceOffsetX (TQ3XDrawRegion drawRegion,
+ float * deviceOffsetX);
+
+EXTERN_API_C( TQ3Status )
+Q3XDrawRegion_GetDeviceOffsetY (TQ3XDrawRegion drawRegion,
+ float * deviceOffsetX);
+
+
+EXTERN_API_C( TQ3Status )
+Q3XDrawRegion_GetWindowScaleX (TQ3XDrawRegion drawRegion,
+ float * windowScaleX);
+
+EXTERN_API_C( TQ3Status )
+Q3XDrawRegion_GetWindowScaleY (TQ3XDrawRegion drawRegion,
+ float * windowScaleY);
+
+
+EXTERN_API_C( TQ3Status )
+Q3XDrawRegion_GetWindowOffsetX (TQ3XDrawRegion drawRegion,
+ float * windowOffsetX);
+
+EXTERN_API_C( TQ3Status )
+Q3XDrawRegion_GetWindowOffsetY (TQ3XDrawRegion drawRegion,
+ float * windowOffsetY);
+
+EXTERN_API_C( TQ3Status )
+Q3XDrawRegion_IsActive (TQ3XDrawRegion drawRegion,
+ TQ3Boolean * isActive);
+
+
+EXTERN_API_C( TQ3Status )
+Q3XDrawRegion_GetNextRegion (TQ3XDrawRegion drawRegion,
+ TQ3XDrawRegion * nextDrawRegion);
+
+/*
+ * One of the next two functions must be called before using a draw region
+ */
+/*
+ * Use this Start function if double buffering/image access services from the
+ * Draw Context are not needed, you may still request clear for example
+ */
+EXTERN_API_C( TQ3Status )
+Q3XDrawRegion_Start (TQ3XDrawRegion drawRegion,
+ TQ3XDrawRegionServices services,
+ TQ3XDrawRegionDescriptor ** descriptor);
+
+/*
+ * Use this Start function if double buffering or image access services from
+ * the Draw Context are needed.
+ */
+EXTERN_API_C( TQ3Status )
+Q3XDrawRegion_StartAccessToImageBuffer (TQ3XDrawRegion drawRegion,
+ TQ3XDrawRegionServices services,
+ TQ3XDrawRegionDescriptor ** descriptor,
+ void ** image);
+
+/*
+ * This function is used to indicate that access to a DrawRegion is ended.
+ */
+EXTERN_API_C( TQ3Status )
+Q3XDrawRegion_End (TQ3XDrawRegion drawRegion);
+
+EXTERN_API_C( TQ3Status )
+Q3XDrawRegion_GetDeviceTransform (TQ3XDrawRegion drawRegion,
+ TQ3Matrix4x4 ** deviceTransform);
+
+EXTERN_API_C( TQ3Status )
+Q3XDrawRegion_GetClipFlags (TQ3XDrawRegion drawRegion,
+ TQ3XClipMaskState * clipMaskState);
+
+EXTERN_API_C( TQ3Status )
+Q3XDrawRegion_GetClipMask (TQ3XDrawRegion drawRegion,
+ TQ3Bitmap ** clipMask);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if TARGET_OS_MAC
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3Status )
+Q3XDrawRegion_GetClipRegion (TQ3XDrawRegion drawRegion,
+ RgnHandle * rgnHandle);
+
+EXTERN_API_C( TQ3Status )
+Q3XDrawRegion_GetGDHandle (TQ3XDrawRegion drawRegion,
+ GDHandle * gdHandle);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_OS_MAC */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3Status )
+Q3XDrawRegion_GetRendererPrivate (TQ3XDrawRegion drawRegion,
+ void ** rendererPrivate);
+
+EXTERN_API_C( TQ3Status )
+Q3XDrawRegion_SetRendererPrivate (TQ3XDrawRegion drawRegion,
+ const void * rendererPrivate,
+ TQ3XDrawRegionRendererPrivateDeleteMethod deleteMethod);
+
+EXTERN_API_C( TQ3Status )
+Q3XDrawRegion_SetUseDefaultRendererFlag (TQ3XDrawRegion drawRegion,
+ TQ3Boolean flag);
+
+EXTERN_API_C( TQ3Status )
+Q3XDrawRegion_GetUseDefaultRendererFlag (TQ3XDrawRegion drawRegion,
+ TQ3Boolean * useDefaultRenderingFlag);
+
+
+
+/******************************************************************************
+ ** **
+ ** Renderer Class Methods **
+ ** **
+ *****************************************************************************/
+/*
+ * Methods from Object
+ * kQ3XMethodTypeObjectClassRegister
+ * kQ3XMethodTypeObjectClassUnregister
+ * kQ3XMethodTypeObjectNew
+ * kQ3XMethodTypeObjectDelete
+ * kQ3XMethodTypeObjectRead
+ * kQ3XMethodTypeObjectTraverse
+ * kQ3XMethodTypeObjectWrite
+ *
+ * Methods from Shared
+ * kQ3MethodTypeSharedEdited
+ *
+ * Renderer Methods
+ *
+ * The renderer methods should be implemented according to the type
+ * of renderer being written.
+ *
+ * For the purposes of documentation, there are two basic types of
+ * renderers:
+ *
+ * Interactive
+ * Interactive Renderer
+ * WireFrame Renderer
+ *
+ * Deferred
+ * a ray-tracer
+ * painter's algorithm renderer (cached in a BSP triangle tree)
+ * an artistic renderer (simulates a pencil drawing, etc.)
+ *
+ * The main difference is how each renderer handles incoming state and
+ * geometry.
+ *
+ * An interactive renderer immediately transforms, culls, and shades
+ * incoming geometry and performs rasterization. For example, in a
+ * single-buffered WireFrame renderer, you will see a new triangle
+ * immediately after Q3Triangle_Draw (if it's visible, of course).
+ *
+ * A deferred renderer caches the view state and each geometry,
+ * converting into any internal queue of drawing commands. Rasterization
+ * is not actually performed until all data has been submitted.
+ *
+ * For example, a ray-tracer may not rasterize anything until the
+ * end of the rendering loop, or until an EndFrame call is made.
+ */
+
+/******************************************************************************
+ ** **
+ ** Renderer User Interface Methods **
+ ** **
+ *****************************************************************************/
+/*
+ * kQ3XMethodTypeRendererIsInteractive
+ *
+ * There is no actual method with this - the metahandler simply returns
+ * "(TQ3XFunctionPointer)kQ3True" for this "method" if the renderer is
+ * intended to be used in interactive settings, and
+ * "(TQ3XFunctionPointer)kQ3False" otherwise.
+ *
+ * If neither value is specified in the metahandler, the renderer
+ * is *assumed to be non-interactive*!!!
+ *
+ * OPTIONAL
+ */
+#endif /* CALL_NOT_IN_CARBON */
+
+enum {
+ kQ3XMethodTypeRendererIsInteractive = FOUR_CHAR_CODE('isin')
+};
+
+
+/*
+ * TQ3XRendererModalConfigureMethod
+ *
+ * This method should pop up a modal dialog to edit the renderer settings
+ * found in the renderer private.
+ *
+ * dialogAnchor - is platform specific data passed by the client to support
+ * movable modal dialogs.
+ * MacOS: this is a callback to the calling application's event handler.
+ * The renderer calls this function with events not handled by the
+ * settings dialog. This is necessary in order to support movable modal
+ * dialogs. An application's event handler must return kQ3True if it
+ * handles the event passed to the callback or kQ3False if not.
+ * An application which doesn't want to support a movable modal configure
+ * dialog should pass NULL for the clientEventHandler of TQ3DialogAnchor.
+ * A renderer should implement a non-movable style dialog in that case.
+ * Win32: this is the HWND of the owning window (typically an application's
+ * main window). (Win32 application modal dialogs are always movable.)
+ * canceled - returns a boolean inditacating that the user canceled the
+ * dialog.
+ *
+ * OPTIONAL
+ */
+enum {
+ kQ3XMethodTypeRendererModalConfigure = FOUR_CHAR_CODE('rdmc')
+};
+
+typedef CALLBACK_API_C( TQ3Status , TQ3XRendererModalConfigureMethod )(TQ3RendererObject renderer, TQ3DialogAnchor dialogAnchor, TQ3Boolean *canceled, void *rendererPrivate);
+/*
+ * kQ3XMethodTypeRendererGetNickNameString
+ *
+ * Allows an application to collect the name of the renderer for
+ * display in a user interface item such as a menu.
+ *
+ * If dataBuffer is NULL actualDataSize returns the required size in
+ * bytes of a data buffer large enough to store the renderer name.
+ *
+ * bufferSize is the actual size of the memory block pointed to by
+ * dataBuffer
+ *
+ * actualDataSize - on return the actual number of bytes written to the
+ * buffer or if dataBuffer is NULL the required size of dataBuffer
+ *
+ * OPTIONAL
+ */
+enum {
+ kQ3XMethodTypeRendererGetNickNameString = FOUR_CHAR_CODE('rdns')
+};
+
+typedef CALLBACK_API_C( TQ3Status , TQ3XRendererGetNickNameStringMethod )(unsigned char *dataBuffer, unsigned long bufferSize, unsigned long *actualDataSize);
+/*
+ * kQ3XMethodTypeRendererGetConfigurationData
+ *
+ * Allows an application to collect private configuration data from the
+ * renderer which it will then save. For example in a preference file,
+ * a registry key (on Windows) or in a style template. An application
+ * should tag this data with the renderer's object name.
+ *
+ * If dataBuffer is NULL actualDataSize returns the required size in
+ * bytes of a data buffer large enough to store private data.
+ *
+ * bufferSize is the actual size of the memory block pointed to by
+ * dataBuffer
+ *
+ * actualDataSize - on return the actual number of bytes written to the
+ * buffer or if dataBuffer is NULL the required size of dataBuffer
+ *
+ * OPTIONAL
+ */
+enum {
+ kQ3XMethodTypeRendererGetConfigurationData = FOUR_CHAR_CODE('rdgp')
+};
+
+typedef CALLBACK_API_C( TQ3Status , TQ3XRendererGetConfigurationDataMethod )(TQ3RendererObject renderer, unsigned char *dataBuffer, unsigned long bufferSize, unsigned long *actualDataSize, void *rendererPrivate);
+/*
+ * TQ3XRendererSetConfigurationDataMethod
+ *
+ * Allows an application to pass private configuration data which has
+ * previously been obtained from a renderer via
+ * Q3Renderer_GetConfigurationData. For example in a preference file or
+ * in a style template. An application should tag this data with the
+ * renderer's object name.
+ *
+ * bufferSize is the actual size of the memory block pointed to by
+ * dataBuffer
+ *
+ * OPTIONAL
+ */
+enum {
+ kQ3XMethodTypeRendererSetConfigurationData = FOUR_CHAR_CODE('rdsp')
+};
+
+typedef CALLBACK_API_C( TQ3Status , TQ3XRendererSetConfigurationDataMethod )(TQ3RendererObject renderer, unsigned char *dataBuffer, unsigned long bufferSize, void *rendererPrivate);
+/******************************************************************************
+ ** **
+ ** Renderer Drawing State Methods **
+ ** **
+ *****************************************************************************/
+/*
+ * TQ3RendererStartFrame
+ *
+ * The StartFrame method is called first at Q3View_StartRendering
+ * and should:
+ * - initialize any renderer state to defaults
+ * - extract any and all useful data from the drawContext
+ *
+ * If your renderer passed in kQ3RendererFlagClearBuffer at
+ * registration, then it should also:
+ * - clear the drawContext
+ *
+ * When clearing, your renderer may opt to:
+ * - NOT clear anything (if you touch every pixel, for example)
+ * - to clear with your own routine, or
+ * - to use the draw context default clear method by calling
+ * Q3DrawContext_Clear. Q3DrawContext_Clear takes advantage of
+ * any available hardware in the system for clearing.
+ *
+ * This call also signals the start of all default submit commands from
+ * the view. The renderer will receive updates for the default view
+ * state via its Update methods before StartPass is called.
+ *
+ * REQUIRED
+ */
+enum {
+ kQ3XMethodTypeRendererStartFrame = FOUR_CHAR_CODE('rdcl')
+};
+
+typedef CALLBACK_API_C( TQ3Status , TQ3XRendererStartFrameMethod )(TQ3ViewObject view, void *rendererPrivate, TQ3DrawContextObject drawContext);
+/*
+ * kQ3XMethodTypeRendererStartPass
+ * TQ3XRendererStartPassMethod
+ *
+ * The StartPass method is called during Q3View_StartRendering but after
+ * the StartFrame command. It should:
+ * - collect camera and light information
+ *
+ * If your renderer supports deferred camera transformation, camera is the
+ * main camera which will be submitted in the hierarchy somewhere. It
+ * is never NULL.
+ *
+ * If your renderer does not support deferred camera transformation, camera
+ * is the transformed camera.
+ *
+ * If your renderer supports deferred light transformation, lights will be
+ * NULL, and will be submitted to your light draw methods instead.
+ *
+ * This call signals the end of the default update state, and the start of
+ * submit commands from the user to the view.
+ *
+ * REQUIRED
+ */
+enum {
+ kQ3XMethodTypeRendererStartPass = FOUR_CHAR_CODE('rdst')
+};
+
+typedef CALLBACK_API_C( TQ3Status , TQ3XRendererStartPassMethod )(TQ3ViewObject view, void *rendererPrivate, TQ3CameraObject camera, TQ3GroupObject lightGroup);
+/*
+ * kQ3XMethodTypeRendererFlushFrame
+ * TQ3XRendererFlushFrameMethod
+ *
+ * This call is only implemented by asynchronous renderers.
+ *
+ * The FlushFrame method is called between the StartPass and EndPass
+ * methods and is called when the user wishes to flush any asynchronous
+ * drawing tasks (which draw to the drawcontext), but does not want
+ * to block.
+ *
+ * The result of this call is that an image should "eventually" appear
+ * asynchronously.
+ *
+ * For asynchronous rendering, this call is non-blocking.
+ *
+ * An interactive renderer should ensure that all received
+ * geometries are drawn in the image.
+ *
+ * An interactive renderer that talks to hardware should force
+ * the hardware to generate an image.
+ *
+ * A deferred renderer should exhibit a similar behaviour,
+ * though it is not required. A deferred renderer should spawn
+ * a process that generates a partial image from the currently
+ * accumulated drawing state.
+ *
+ * However, for renderers such as ray-tracers which generally are
+ * quite compute-intensive, FlushFrame is not required and is a no-op.
+ *
+ * OPTIONAL
+ */
+enum {
+ kQ3XMethodTypeRendererFlushFrame = FOUR_CHAR_CODE('rdfl')
+};
+
+typedef CALLBACK_API_C( TQ3Status , TQ3XRendererFlushFrameMethod )(TQ3ViewObject view, void *rendererPrivate, TQ3DrawContextObject drawContext);
+/*
+ * kQ3XMethodTypeRendererEndPass
+ * TQ3XRendererEndPassMethod
+ *
+ * The EndPass method is called at Q3View_EndRendering and signals
+ * the end of submit commands to the view.
+ *
+ * If an error occurs, the renderer should call Q3XError_Post and
+ * return kQ3ViewStatusError.
+ *
+ * If a renderer requires another pass on the renderering data,
+ * it should return kQ3ViewStatusRetraverse.
+ *
+ * If rendering was cancelled, this function will not be called
+ * and the view will handle returning kQ3ViewStatusCancelled;
+ *
+ * Otherwise, your renderer should begin completing the process of
+ * generating the image in the drawcontext. If you have buffered
+ * any drawing data, flush it. RendererEnd should have a similar
+ * effect as RendererFlushFrame.
+ *
+ * If the renderer is synchronous:
+ * - complete rendering of the entire frame
+ * if the renderer supports kQ3RendererClassSupportDoubleBuffer
+ * - Update the front buffer
+ * else
+ * - DrawContext will update the front buffer after returning
+ *
+ * If the renderer is asynchronous
+ * - spawn rendering thread for entire frame
+ * if the renderer supports kQ3RendererClassSupportDoubleBuffer,
+ * - you must eventually update the front buffer asynchronously
+ * else
+ * - you must eventually update the back buffer asynchronously
+ *
+ * REQUIRED
+ */
+enum {
+ kQ3XMethodTypeRendererEndPass = FOUR_CHAR_CODE('rded')
+};
+
+typedef CALLBACK_API_C( TQ3ViewStatus , TQ3XRendererEndPassMethod )(TQ3ViewObject view, void *rendererPrivate);
+/*
+ * kQ3XMethodTypeRendererEndFrame
+ * TQ3XRendererEndFrame
+ *
+ * This call is only implemented by asynchronous renderers.
+ *
+ * The EndFrame method is called from Q3View_Sync, which is
+ * called after Q3View_EndRendering and signals that the user
+ * wishes to see the completed image and is willing to block.
+ *
+ * If your renderer supports kQ3RendererFlagDoubleBuffer
+ * - update the front buffer completely
+ * else
+ * - update the back buffer completely
+ *
+ * This call is equivalent in functionality to RendererFlushFrame
+ * but blocks until the image is completed.
+ *
+ * If no method is supplied, the default is a no-op.
+ *
+ * NOTE: Registering a method of this type indicates that your renderer will
+ * be rendering after Q3View_EndRendering has been called.
+ *
+ * OPTIONAL
+ */
+enum {
+ kQ3XMethodTypeRendererEndFrame = FOUR_CHAR_CODE('rdsy')
+};
+
+typedef CALLBACK_API_C( TQ3Status , TQ3XRendererEndFrameMethod )(TQ3ViewObject view, void *rendererPrivate, TQ3DrawContextObject drawContext);
+/*
+ * The RendererCancel method is called after Q3View_StartRendering
+ * and signals the termination of all rendering operations.
+ *
+ * A renderer should clean up any cached data, and cancel all
+ * rendering operations.
+ *
+ * If called before Q3View_EndRendering, the RendererEnd method
+ * is NOT called.
+ *
+ * If called after Q3View_EndRendering, the renderer should kill
+ * any threads and terminate any further rendering.
+ *
+ * REQUIRED
+ */
+enum {
+ kQ3XMethodTypeRendererCancel = FOUR_CHAR_CODE('rdab')
+};
+
+typedef CALLBACK_API_C( void , TQ3XRendererCancelMethod )(TQ3ViewObject view, void *rendererPrivate);
+/******************************************************************************
+ ** **
+ ** Renderer DrawContext Methods **
+ ** **
+ *****************************************************************************/
+/*
+ * kQ3XMethodTypeRendererPush
+ * TQ3XRendererPushMethod
+ *
+ * kQ3XMethodTypeRendererPop
+ * TQ3XRendererPopMethod
+ *
+ * These methods are called whenever the graphics state in the view
+ * is pushed or popped. The user may isolate state by calling:
+ *
+ * Q3Attribute_Submit(kQ3AttributeTypeDiffuseColor, &red, view);
+ * Q3Attribute_Submit(kQ3AttributeTypeTransparencyColor, &blue, view);
+ * Q3Attribute_Submit(kQ3AttributeTypeSpecularColor, &white, view);
+ * Q3Box_Submit(&unitBox, view);
+ * Q3TranslateTransform_Submit(&unitVector, view);
+ * Q3Push_Submit(view);
+ * Q3Attribute_Submit(kQ3AttributeTypeDiffuseColor, &blue, view);
+ * Q3Attribute_Submit(kQ3AttributeTypeTransparencyColor, &green, view);
+ * Q3Box_Submit(&unitBox, view);
+ * Q3Pop_Submit(view);
+ * Q3TranslateTransform_Submit(&unitVector, view);
+ * Q3Box_Submit(&unitBox, view);
+ *
+ * or by submitting a display group which pushes and pops.
+ *
+ * If you support RendererPush and RendererPop in your renderer:
+ * - you must maintain your drawing state as a stack, as well.
+ * - you will not be updated with the popped state after
+ * RendererPop is called.
+ *
+ * If you do not support Push and Pop in your renderer:
+ * - you may maintain a single copy of the drawing state.
+ * - you will be updated with changed fields after the view stack is
+ * popped.
+ *
+ * A renderer that supports Push and Pop gets called in the following
+ * sequence (from example above):
+ *
+ * RendererUpdateAttributeDiffuseColor(&red,...)
+ * RendererUpdateAttributeTransparencyColor(&blue,...)
+ * RendererUpdateAttributeSpecularColor(&white,...)
+ * RendererUpdateMatrixLocalToWorld(...)
+ * RendererSubmitGeometryBox(...)
+ * RendererPush(...)
+ * RendererUpdateAttributeDiffuseColor(&blue,...)
+ * RendererUpdateAttributeTransparencyColor(&green,...)
+ * RendererSubmitGeometryBox(...)
+ * RendererPop(...)
+ * RendererUpdateMatrixLocalToWorld(...)
+ * RendererSubmitGeometryBox(...)
+ *
+ * A renderer that does not supports Push and Pop gets called in the
+ * following sequence:
+ *
+ * RendererUpdateAttributeDiffuseColor(&red,...)
+ * RendererUpdateAttributeTransparencyColor(&blue,...)
+ * RendererUpdateAttributeSpecularColor(&white,...)
+ * RendererUpdateMatrixLocalToWorld(...)
+ * RendererSubmitGeometryBox(...)
+ * RendererUpdateAttributeDiffuseColor(&blue,...)
+ * RendererUpdateAttributeTransparencyColor(&green,...)
+ * RendererSubmitGeometryBox(...)
+ * RendererUpdateAttributeDiffuseColor(&red,...)
+ * RendererUpdateAttributeTransparencyColor(&blue,...)
+ * RendererUpdateMatrixLocalToWorld(...)
+ * RendererSubmitGeometryBox(...)
+ *
+ */
+enum {
+ kQ3XMethodTypeRendererPush = FOUR_CHAR_CODE('rdps')
+};
+
+typedef CALLBACK_API_C( TQ3Status , TQ3XRendererPushMethod )(TQ3ViewObject view, void *rendererPrivate);
+enum {
+ kQ3XMethodTypeRendererPop = FOUR_CHAR_CODE('rdpo')
+};
+
+typedef CALLBACK_API_C( TQ3Status , TQ3XRendererPopMethod )(TQ3ViewObject view, void *rendererPrivate);
+/******************************************************************************
+ ** **
+ ** Renderer Cull Methods **
+ ** **
+ *****************************************************************************/
+/*
+ * kQ3XMethodTypeRendererIsBoundingBoxVisible
+ * TQ3XRendererIsBoundingBoxVisibleMethod
+ *
+ * This method is called to cull complex groups and geometries
+ * given their bounding box in local space.
+ *
+ * It should transform the local-space bounding box coordinates to
+ * frustum space and return a TQ3Boolean return value indicating
+ * whether the box appears within the viewing frustum.
+ *
+ * If no method is supplied, the default behavior is to return
+ * kQ3True.
+ *
+ */
+enum {
+ kQ3XMethodTypeRendererIsBoundingBoxVisible = FOUR_CHAR_CODE('rdbx')
+};
+
+typedef CALLBACK_API_C( TQ3Boolean , TQ3XRendererIsBoundingBoxVisibleMethod )(TQ3ViewObject view, void *rendererPrivate, const TQ3BoundingBox *bBox);
+
+/******************************************************************************
+ ** **
+ ** Renderer Object Support Methods **
+ ** **
+ *****************************************************************************/
+/*
+ * Drawing methods (Geometry, Camera, Lights)
+ *
+ */
+/*
+ * Geometry MetaHandler
+ *
+ * This metaHandler is required to support
+ *
+ * kQ3GeometryTypeTriangle
+ * kQ3GeometryTypeLine
+ * kQ3GeometryTypePoint
+ * kQ3GeometryTypeMarker
+ * kQ3GeometryTypePixmapMarker
+ *
+ * REQUIRED
+ */
+enum {
+ kQ3XMethodTypeRendererSubmitGeometryMetaHandler = FOUR_CHAR_CODE('rdgm')
+};
+
+typedef CALLBACK_API_C( TQ3XFunctionPointer , TQ3XRendererSubmitGeometryMetaHandlerMethod )(TQ3ObjectType geometryType);
+/*
+ * The TQ3XRendererSubmitGeometryMetaHandlerMethod switches on geometryType
+ * of kQ3GeometryTypeFoo and returns methods of type:
+ */
+typedef CALLBACK_API_C( TQ3Status , TQ3XRendererSubmitGeometryMethod )(TQ3ViewObject view, void *rendererPrivate, TQ3GeometryObject geometry, const void *publicData);
+/*
+ * Camera MetaHandler
+ *
+ * This metaHandler, if supplied, indicates that your renderer
+ * handles deferred transformation of the main camera within a scene.
+ *
+ * If not supplied, or an unsupported camera is used, the view will do
+ * the transformation for the renderer and pass in a camera in the
+ * StartPass method.
+ *
+ * OPTIONAL
+ */
+enum {
+ kQ3XMethodTypeRendererSubmitCameraMetaHandler = FOUR_CHAR_CODE('rdcm')
+};
+
+typedef CALLBACK_API_C( TQ3XFunctionPointer , TQ3XRendererSubmitCameraMetaHandlerMethod )(TQ3ObjectType cameraType);
+/*
+ * The TQ3XRendererSubmitCameraMetaHandlerMethod switches on cameraType
+ * of kQ3CameraTypeFoo and returns methods of type:
+ */
+typedef CALLBACK_API_C( TQ3Status , TQ3XRendererSubmitCameraMethod )(TQ3ViewObject view, void *rendererPrivate, TQ3CameraObject camera, const void *publicData);
+/*
+ * Light MetaHandler
+ *
+ * This metaHandler, if supplied, indicates that your renderer
+ * handles deferred transformation of lights within a scene.
+ *
+ * If an unsupported light is encountered, it is ignored.
+ *
+ * OPTIONAL
+ */
+enum {
+ kQ3XMethodTypeRendererSubmitLightMetaHandler = FOUR_CHAR_CODE('rdlg')
+};
+
+typedef CALLBACK_API_C( TQ3XFunctionPointer , TQ3XRendererSubmitLightMetaHandlerMethod )(TQ3ObjectType lightType);
+/*
+ * The TQ3XRendererSubmitLightMetaHandlerMethod switches on lightType
+ * of kQ3LightTypeFoo and returns methods of type:
+ */
+typedef CALLBACK_API_C( TQ3Status , TQ3XRendererSubmitLightMethod )(TQ3ViewObject view, void *rendererPrivate, TQ3LightObject light, const void *publicData);
+/*
+ *
+ * Update methods
+ *
+ * They are called whenever the state has changed. If the renderer supports
+ * the RendererPush and RendererPop methods, it must maintain its own state
+ * stack. Updates are not called for changed data when the view stack is
+ * popped.
+ *
+ * See the comments for the RendererPush and RendererPop methods above
+ * for an example of how data is updated.
+ *
+ */
+/*
+ * Style
+ */
+enum {
+ kQ3XMethodTypeRendererUpdateStyleMetaHandler = FOUR_CHAR_CODE('rdyu')
+};
+
+typedef CALLBACK_API_C( TQ3XFunctionPointer , TQ3XRendererUpdateStyleMetaHandlerMethod )(TQ3ObjectType styleType);
+/*
+ * The TQ3XRendererUpdateStyleMetaHandlerMethod switches on styleType
+ * of kQ3StyleTypeFoo and returns methods of type:
+ */
+typedef CALLBACK_API_C( TQ3Status , TQ3XRendererUpdateStyleMethod )(TQ3ViewObject view, void *rendererPrivate, const void *publicData);
+/*
+ * Attributes
+ */
+enum {
+ kQ3XMethodTypeRendererUpdateAttributeMetaHandler = FOUR_CHAR_CODE('rdau')
+};
+
+typedef CALLBACK_API_C( TQ3XFunctionPointer , TQ3XRendererUpdateAttributeMetaHandlerMethod )(TQ3AttributeType attributeType);
+/*
+ * The TQ3XRendererUpdateStyleMetaHandlerMethod switches on attributeType
+ * of kQ3AttributeTypeFoo and returns methods of type:
+ */
+typedef CALLBACK_API_C( TQ3Status , TQ3XRendererUpdateAttributeMethod )(TQ3ViewObject view, void *rendererPrivate, const void *publicData);
+/*
+ * Shaders
+ */
+enum {
+ kQ3XMethodTypeRendererUpdateShaderMetaHandler = FOUR_CHAR_CODE('rdsu')
+};
+
+typedef CALLBACK_API_C( TQ3XFunctionPointer , TQ3XRendererUpdateShaderMetaHandlerMethod )(TQ3ObjectType shaderType);
+/*
+ * The TQ3XRendererUpdateShaderMetaHandlerMethod switches on shaderType
+ * of kQ3ShaderTypeFoo and returns methods of type:
+ */
+typedef CALLBACK_API_C( TQ3Status , TQ3XRendererUpdateShaderMethod )(TQ3ViewObject view, void *rendererPrivate, TQ3Object *shaderObject);
+/*
+ * Matrices
+ */
+enum {
+ kQ3XMethodTypeRendererUpdateMatrixMetaHandler = FOUR_CHAR_CODE('rdxu')
+};
+
+typedef TQ3XMetaHandler TQ3XRendererUpdateMatrixMetaHandlerMethod;
+/*
+ * The TQ3XRendererUpdateShaderMetaHandlerMethod switches on methods
+ * of the form kQ3MethodTypeRendererUpdateMatrixFoo:
+ */
+enum {
+ kQ3XMethodTypeRendererUpdateMatrixLocalToWorld = FOUR_CHAR_CODE('ulwx')
+};
+
+enum {
+ kQ3XMethodTypeRendererUpdateMatrixLocalToWorldInverse = FOUR_CHAR_CODE('ulwi')
+};
+
+enum {
+ kQ3XMethodTypeRendererUpdateMatrixLocalToWorldInverseTranspose = FOUR_CHAR_CODE('ulwt')
+};
+
+enum {
+ kQ3XMethodTypeRendererUpdateMatrixLocalToCamera = FOUR_CHAR_CODE('ulcx')
+};
+
+enum {
+ kQ3XMethodTypeRendererUpdateMatrixLocalToFrustum = FOUR_CHAR_CODE('ulfx')
+};
+
+enum {
+ kQ3XMethodTypeRendererUpdateMatrixWorldToFrustum = FOUR_CHAR_CODE('uwfx')
+};
+
+/*
+ * and returns methods of type:
+ */
+typedef CALLBACK_API_C( TQ3Status , TQ3XRendererUpdateMatrixMethod )(TQ3ViewObject view, void *rendererPrivate, const TQ3Matrix4x4 *matrix);
+
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __QD3DRENDERER__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__QD3DRENDERER__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QD3DRENDERER__ */
+
diff --git a/include/qt/QD3DSet.h b/include/qt/QD3DSet.h
new file mode 100644
index 000000000..e74b6ff0c
--- /dev/null
+++ b/include/qt/QD3DSet.h
@@ -0,0 +1,342 @@
+/*
+ File: QD3DSet.h
+
+ Contains: Q3Set types and routines
+
+ Version: Technology: Quickdraw 3D 1.6
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QD3DSET__
+#define __QD3DSET__
+
+#ifndef __QD3D__
+#include "QD3D.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __QD3DSET__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __QD3DSET__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+/******************************************************************************
+ ** **
+ ** Set Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3SetObject )
+Q3Set_New (void);
+
+EXTERN_API_C( TQ3ObjectType )
+Q3Set_GetType (TQ3SetObject theSet);
+
+EXTERN_API_C( TQ3Status )
+Q3Set_Add (TQ3SetObject theSet,
+ TQ3ElementType theType,
+ const void * data);
+
+EXTERN_API_C( TQ3Status )
+Q3Set_Get (TQ3SetObject theSet,
+ TQ3ElementType theType,
+ void * data);
+
+EXTERN_API_C( TQ3Boolean )
+Q3Set_Contains (TQ3SetObject theSet,
+ TQ3ElementType theType);
+
+EXTERN_API_C( TQ3Status )
+Q3Set_Clear (TQ3SetObject theSet,
+ TQ3ElementType theType);
+
+EXTERN_API_C( TQ3Status )
+Q3Set_Empty (TQ3SetObject target);
+
+/*
+ * Iterating through all elements in a set
+ *
+ * Pass in kQ3ElementTypeNone to get first type
+ * kQ3ElementTypeNone is returned when end of list is reached
+ */
+EXTERN_API_C( TQ3Status )
+Q3Set_GetNextElementType (TQ3SetObject theSet,
+ TQ3ElementType * theType);
+
+
+/******************************************************************************
+ ** **
+ ** Attribute Types **
+ ** **
+ *****************************************************************************/
+/*
+ * For the data types listed below, pass in a pointer to it in the _Add
+ * and _Get calls.
+ *
+ * For surface shader attributes, reference counts are incremented on
+ * the _Add and _Get
+ */
+#endif /* CALL_NOT_IN_CARBON */
+
+
+enum TQ3AttributeTypes {
+ /* Data Type */
+ kQ3AttributeTypeNone = 0, /* --------- */
+ kQ3AttributeTypeSurfaceUV = 1, /* TQ3Param2D */
+ kQ3AttributeTypeShadingUV = 2, /* TQ3Param2D */
+ kQ3AttributeTypeNormal = 3, /* TQ3Vector3D */
+ kQ3AttributeTypeAmbientCoefficient = 4, /* float */
+ kQ3AttributeTypeDiffuseColor = 5, /* TQ3ColorRGB */
+ kQ3AttributeTypeSpecularColor = 6, /* TQ3ColorRGB */
+ kQ3AttributeTypeSpecularControl = 7, /* float */
+ kQ3AttributeTypeTransparencyColor = 8, /* TQ3ColorRGB */
+ kQ3AttributeTypeSurfaceTangent = 9, /* TQ3Tangent2D */
+ kQ3AttributeTypeHighlightState = 10, /* TQ3Switch */
+ kQ3AttributeTypeSurfaceShader = 11, /* TQ3SurfaceShaderObject */
+ kQ3AttributeTypeNumTypes = 12
+};
+typedef enum TQ3AttributeTypes TQ3AttributeTypes;
+
+typedef TQ3ElementType TQ3AttributeType;
+/******************************************************************************
+ ** **
+ ** Attribute Drawing **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3Status )
+Q3Attribute_Submit (TQ3AttributeType attributeType,
+ const void * data,
+ TQ3ViewObject view);
+
+
+/******************************************************************************
+ ** **
+ ** AttributeSet Routines **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3AttributeSet )
+Q3AttributeSet_New (void);
+
+EXTERN_API_C( TQ3Status )
+Q3AttributeSet_Add (TQ3AttributeSet attributeSet,
+ TQ3AttributeType theType,
+ const void * data);
+
+EXTERN_API_C( TQ3Boolean )
+Q3AttributeSet_Contains (TQ3AttributeSet attributeSet,
+ TQ3AttributeType attributeType);
+
+EXTERN_API_C( TQ3Status )
+Q3AttributeSet_Get (TQ3AttributeSet attributeSet,
+ TQ3AttributeType theType,
+ void * data);
+
+EXTERN_API_C( TQ3Status )
+Q3AttributeSet_Clear (TQ3AttributeSet attributeSet,
+ TQ3AttributeType theType);
+
+EXTERN_API_C( TQ3Status )
+Q3AttributeSet_Empty (TQ3AttributeSet target);
+
+/*
+ * Q3AttributeSet_GetNextAttributeType
+ *
+ * Pass in kQ3AttributeTypeNone to get first type
+ * kQ3AttributeTypeNone is returned when end of list is reached
+ */
+EXTERN_API_C( TQ3Status )
+Q3AttributeSet_GetNextAttributeType (TQ3AttributeSet source,
+ TQ3AttributeType * theType);
+
+EXTERN_API_C( TQ3Status )
+Q3AttributeSet_Submit (TQ3AttributeSet attributeSet,
+ TQ3ViewObject view);
+
+/*
+ * Inherit from parent->child into result
+ * Result attributes are:
+ * all child attributes + all parent attributes NOT in the child
+ */
+EXTERN_API_C( TQ3Status )
+Q3AttributeSet_Inherit (TQ3AttributeSet parent,
+ TQ3AttributeSet child,
+ TQ3AttributeSet result);
+
+
+/******************************************************************************
+ ** **
+ ** Custom Element Registration **
+ ** **
+ *****************************************************************************/
+/*
+ * Element Methods -
+ *
+ * When you create a custom element, you control what structures are
+ * passed around the API. For example, you may allow the Q3Set_Add call
+ * take one type of argument, store your element internally in some
+ * abstract data type, and have the Q3Set_Get call take a different
+ * argument.
+ *
+ * For example:
+ *
+ * There are four calls which at some point will copy an element:
+ *
+ * Q3Set_Add (copied from Application memory to QuickDraw3D memory)
+ * Q3Set_Get (copied from QuickDraw3D memory to Application memory)
+ * Q3Object_Duplicate (all elements are copied internally)
+ * Q3AttributeSet_Inherit (all elements are copied internally)
+ *
+ * Either CopyAdd or CopyReplace is called during the "_Add" call.
+ * - CopyAdd is destructive and should assume "toElement" is garbage
+ * - CopyReplace is replacing an existing element.
+ *
+ * CopyGet is called during the "_Get" call.
+ *
+ * CopyDuplicate is called to duplicate an element's internal structure.
+ *
+ * Attributes Methods -
+ *
+ * For copying data while Inheriting. Element methods are used
+ * at all other times.
+ *
+ * CopyInherit is called to duplicate an element's internal structure
+ * during inheritance. You should make this as fast as possible.
+ * (for example, if your custom element contains objects, you
+ * should do a Q3Shared_GetReference instead of a Q3Object_Duplicate)
+ *
+ * The ElementDelete method will be called for all of your elements
+ * copied around via CopyAdd, CopyReplace, CopyDuplicate, and
+ * CopyInherit.
+ * If CopyGet allocates any memory in it's destination, it is up to the
+ * application to delete it on its side.
+ */
+#endif /* CALL_NOT_IN_CARBON */
+
+#define kQ3XMethodTypeElementCopyAdd Q3_METHOD_TYPE('e','c','p','a')
+#define kQ3XMethodTypeElementCopyReplace Q3_METHOD_TYPE('e','c','p','r')
+#define kQ3XMethodTypeElementCopyGet Q3_METHOD_TYPE('e','c','p','g')
+#define kQ3XMethodTypeElementCopyDuplicate Q3_METHOD_TYPE('e','c','p','d')
+#define kQ3XMethodTypeElementDelete Q3_METHOD_TYPE('e','d','e','l')
+typedef CALLBACK_API_C( TQ3Status , TQ3XElementCopyAddMethod )(const void *fromAPIElement, void *toInternalElement);
+typedef CALLBACK_API_C( TQ3Status , TQ3XElementCopyReplaceMethod )(const void *fromAPIElement, void *ontoInternalElement);
+typedef CALLBACK_API_C( TQ3Status , TQ3XElementCopyGetMethod )(const void *fromInternalElement, void *toAPIElement);
+typedef CALLBACK_API_C( TQ3Status , TQ3XElementCopyDuplicateMethod )(const void *fromInternalElement, void *toInternalElement);
+typedef CALLBACK_API_C( TQ3Status , TQ3XElementDeleteMethod )(void *internalElement);
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3XObjectClass )
+Q3XElementClass_Register (TQ3ElementType * elementType,
+ const char * name,
+ unsigned long sizeOfElement,
+ TQ3XMetaHandler metaHandler);
+
+EXTERN_API_C( TQ3Status )
+Q3XElementType_GetElementSize (TQ3ElementType elementType,
+ unsigned long * sizeOfElement);
+
+
+/******************************************************************************
+ ** **
+ ** Custom Attribute Registration **
+ ** **
+ *****************************************************************************/
+#define kQ3XMethodTypeAttributeInherit Q3_METHOD_TYPE('i','n','h','t')
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef TQ3Boolean TQ3XAttributeInheritMethod;
+/* return kQ3True or kQ3False in your metahandler */
+#define kQ3XMethodTypeAttributeCopyInherit Q3_METHOD_TYPE('a','c','p','i')
+typedef CALLBACK_API_C( TQ3Status , TQ3XAttributeCopyInheritMethod )(const void *fromInternalAttribute, void *toInternalAttribute);
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3XObjectClass )
+Q3XAttributeClass_Register (TQ3AttributeType * attributeType,
+ const char * creatorName,
+ unsigned long sizeOfElement,
+ TQ3XMetaHandler metaHandler);
+
+/*
+ * Version 1.5
+ */
+#define kQ3XMethodTypeAttributeDefault Q3_METHOD_TYPE('a','s','d','f')
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API_C( TQ3Status , TQ3XAttributeDefaultMethod )(void *internalElement);
+#define kQ3XMethodTypeAttributeIsDefault Q3_METHOD_TYPE('a','i','d','f')
+typedef CALLBACK_API_C( TQ3Boolean , TQ3XAttributeIsDefaultMethod )(void *internalElement);
+
+
+
+
+
+
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __QD3DSET__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__QD3DSET__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QD3DSET__ */
+
diff --git a/include/qt/QD3DShader.h b/include/qt/QD3DShader.h
new file mode 100644
index 000000000..6d3f76f33
--- /dev/null
+++ b/include/qt/QD3DShader.h
@@ -0,0 +1,330 @@
+/*
+ File: QD3DShader.h
+
+ Contains: QuickDraw 3D Shader / Color Routines
+
+ Version: Technology: Quickdraw 3D 1.6
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QD3DSHADER__
+#define __QD3DSHADER__
+
+#ifndef __QD3D__
+#include "QD3D.h"
+#endif
+
+#ifndef __MOVIES__
+#include "Movies.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __QD3DSHADER__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __QD3DSHADER__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+/******************************************************************************
+ ** **
+ ** RGB Color routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3ColorRGB *)
+Q3ColorRGB_Set (TQ3ColorRGB * color,
+ float r,
+ float g,
+ float b);
+
+EXTERN_API_C( TQ3ColorARGB *)
+Q3ColorARGB_Set (TQ3ColorARGB * color,
+ float a,
+ float r,
+ float g,
+ float b);
+
+EXTERN_API_C( TQ3ColorRGB *)
+Q3ColorRGB_Add (const TQ3ColorRGB * c1,
+ const TQ3ColorRGB * c2,
+ TQ3ColorRGB * result);
+
+EXTERN_API_C( TQ3ColorRGB *)
+Q3ColorRGB_Subtract (const TQ3ColorRGB * c1,
+ const TQ3ColorRGB * c2,
+ TQ3ColorRGB * result);
+
+EXTERN_API_C( TQ3ColorRGB *)
+Q3ColorRGB_Scale (const TQ3ColorRGB * color,
+ float scale,
+ TQ3ColorRGB * result);
+
+EXTERN_API_C( TQ3ColorRGB *)
+Q3ColorRGB_Clamp (const TQ3ColorRGB * color,
+ TQ3ColorRGB * result);
+
+EXTERN_API_C( TQ3ColorRGB *)
+Q3ColorRGB_Lerp (const TQ3ColorRGB * first,
+ const TQ3ColorRGB * last,
+ float alpha,
+ TQ3ColorRGB * result);
+
+EXTERN_API_C( TQ3ColorRGB *)
+Q3ColorRGB_Accumulate (const TQ3ColorRGB * src,
+ TQ3ColorRGB * result);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( float *)
+Q3ColorRGB_Luminance (const TQ3ColorRGB * color,
+ float * luminance);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+/******************************************************************************
+ ** **
+ ** Shader Types **
+ ** **
+ *****************************************************************************/
+
+enum TQ3ShaderUVBoundary {
+ kQ3ShaderUVBoundaryWrap = 0,
+ kQ3ShaderUVBoundaryClamp = 1
+};
+typedef enum TQ3ShaderUVBoundary TQ3ShaderUVBoundary;
+
+
+/******************************************************************************
+ ** **
+ ** Shader Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3ObjectType )
+Q3Shader_GetType (TQ3ShaderObject shader);
+
+EXTERN_API_C( TQ3Status )
+Q3Shader_Submit (TQ3ShaderObject shader,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3Shader_SetUVTransform (TQ3ShaderObject shader,
+ const TQ3Matrix3x3 * uvTransform);
+
+EXTERN_API_C( TQ3Status )
+Q3Shader_GetUVTransform (TQ3ShaderObject shader,
+ TQ3Matrix3x3 * uvTransform);
+
+EXTERN_API_C( TQ3Status )
+Q3Shader_SetUBoundary (TQ3ShaderObject shader,
+ TQ3ShaderUVBoundary uBoundary);
+
+EXTERN_API_C( TQ3Status )
+Q3Shader_SetVBoundary (TQ3ShaderObject shader,
+ TQ3ShaderUVBoundary vBoundary);
+
+EXTERN_API_C( TQ3Status )
+Q3Shader_GetUBoundary (TQ3ShaderObject shader,
+ TQ3ShaderUVBoundary * uBoundary);
+
+EXTERN_API_C( TQ3Status )
+Q3Shader_GetVBoundary (TQ3ShaderObject shader,
+ TQ3ShaderUVBoundary * vBoundary);
+
+
+/******************************************************************************
+ ** **
+ ** Illumination Shader Classes **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3ObjectType )
+Q3IlluminationShader_GetType (TQ3ShaderObject shader);
+
+EXTERN_API_C( TQ3ShaderObject )
+Q3PhongIllumination_New (void);
+
+EXTERN_API_C( TQ3ShaderObject )
+Q3LambertIllumination_New (void);
+
+EXTERN_API_C( TQ3ShaderObject )
+Q3NULLIllumination_New (void);
+
+
+/******************************************************************************
+ ** **
+ ** Surface Shader **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3ObjectType )
+Q3SurfaceShader_GetType (TQ3SurfaceShaderObject shader);
+
+
+/******************************************************************************
+ ** **
+ ** Texture Shader **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3ShaderObject )
+Q3TextureShader_New (TQ3TextureObject texture);
+
+EXTERN_API_C( TQ3Status )
+Q3TextureShader_GetTexture (TQ3ShaderObject shader,
+ TQ3TextureObject * texture);
+
+EXTERN_API_C( TQ3Status )
+Q3TextureShader_SetTexture (TQ3ShaderObject shader,
+ TQ3TextureObject texture);
+
+
+/******************************************************************************
+ ** **
+ ** Texture Objects **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3ObjectType )
+Q3Texture_GetType (TQ3TextureObject texture);
+
+EXTERN_API_C( TQ3Status )
+Q3Texture_GetWidth (TQ3TextureObject texture,
+ unsigned long * width);
+
+EXTERN_API_C( TQ3Status )
+Q3Texture_GetHeight (TQ3TextureObject texture,
+ unsigned long * height);
+
+
+/******************************************************************************
+ ** **
+ ** Pixmap Texture **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3TextureObject )
+Q3PixmapTexture_New (const TQ3StoragePixmap * pixmap);
+
+EXTERN_API_C( TQ3Status )
+Q3PixmapTexture_GetPixmap (TQ3TextureObject texture,
+ TQ3StoragePixmap * pixmap);
+
+EXTERN_API_C( TQ3Status )
+Q3PixmapTexture_SetPixmap (TQ3TextureObject texture,
+ const TQ3StoragePixmap * pixmap);
+
+
+/******************************************************************************
+ ** **
+ ** Mipmap Texture **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3TextureObject )
+Q3MipmapTexture_New (const TQ3Mipmap * mipmap);
+
+EXTERN_API_C( TQ3Status )
+Q3MipmapTexture_GetMipmap (TQ3TextureObject texture,
+ TQ3Mipmap * mipmap);
+
+EXTERN_API_C( TQ3Status )
+Q3MipmapTexture_SetMipmap (TQ3TextureObject texture,
+ const TQ3Mipmap * mipmap);
+
+/******************************************************************************
+ ** **
+ ** Compressed Pixmap Texture **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3TextureObject )
+Q3CompressedPixmapTexture_New (const TQ3CompressedPixmap * compressedPixmap);
+
+EXTERN_API_C( TQ3Status )
+Q3CompressedPixmapTexture_GetCompressedPixmap (TQ3TextureObject texture,
+ TQ3CompressedPixmap * compressedPixmap);
+
+EXTERN_API_C( TQ3Status )
+Q3CompressedPixmapTexture_SetCompressedPixmap (TQ3TextureObject texture,
+ const TQ3CompressedPixmap * compressedPixmap);
+
+EXTERN_API_C( TQ3Status )
+Q3CompressedPixmapTexture_CompressImage (TQ3CompressedPixmap * compressedPixmap,
+ PixMapHandle sourcePixMap,
+ CodecType codecType,
+ CodecComponent codecComponent,
+ short codedDepth,
+ CodecQ codecQuality);
+
+
+
+
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __QD3DSHADER__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__QD3DSHADER__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QD3DSHADER__ */
+
diff --git a/include/qt/QD3DStorage.h b/include/qt/QD3DStorage.h
new file mode 100644
index 000000000..0f5a65fa6
--- /dev/null
+++ b/include/qt/QD3DStorage.h
@@ -0,0 +1,313 @@
+/*
+ File: QD3DStorage.h
+
+ Contains: Abstraction to deal with various types of stream-based storage devices
+
+ Version: Technology: Quickdraw 3D 1.6
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QD3DSTORAGE__
+#define __QD3DSTORAGE__
+
+#ifndef __QD3D__
+#include "QD3D.h"
+#endif
+
+
+#if TARGET_OS_MAC
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+#endif /* TARGET_OS_MAC */
+
+
+#if TARGET_OS_WIN32
+ #include "windows.h"
+#endif /* TARGET_OS_WIN32 */
+
+#include "stdio.h"
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __QD3DSTORAGE__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __QD3DSTORAGE__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+/******************************************************************************
+ ** **
+ ** Storage Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3ObjectType )
+Q3Storage_GetType (TQ3StorageObject storage);
+
+EXTERN_API_C( TQ3Status )
+Q3Storage_GetSize (TQ3StorageObject storage,
+ unsigned long * size);
+
+/*
+ * Reads "dataSize" bytes starting at offset in storage, copying into data.
+ * sizeRead returns the number of bytes filled in.
+ *
+ * You may assume if *sizeRead < dataSize, then EOF is at offset + *sizeRead
+ */
+EXTERN_API_C( TQ3Status )
+Q3Storage_GetData (TQ3StorageObject storage,
+ unsigned long offset,
+ unsigned long dataSize,
+ unsigned char * data,
+ unsigned long * sizeRead);
+
+/*
+ * Write "dataSize" bytes starting at offset in storage, copying from data.
+ * sizeWritten returns the number of bytes filled in.
+ *
+ * You may assume if *sizeRead < dataSize, then EOF is at offset + *sizeWritten
+ */
+EXTERN_API_C( TQ3Status )
+Q3Storage_SetData (TQ3StorageObject storage,
+ unsigned long offset,
+ unsigned long dataSize,
+ const unsigned char * data,
+ unsigned long * sizeWritten);
+
+/******************************************************************************
+ ** **
+ ** Memory Storage Prototypes **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3ObjectType )
+Q3MemoryStorage_GetType (TQ3StorageObject storage);
+
+/*
+ * These calls COPY the buffer into QD3D space
+ */
+EXTERN_API_C( TQ3StorageObject )
+Q3MemoryStorage_New (const unsigned char * buffer,
+ unsigned long validSize);
+
+EXTERN_API_C( TQ3Status )
+Q3MemoryStorage_Set (TQ3StorageObject storage,
+ const unsigned char * buffer,
+ unsigned long validSize);
+
+/*
+ * These calls use the pointer given - you must dispose it when you're through
+ */
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3StorageObject )
+Q3MemoryStorage_NewBuffer (unsigned char * buffer,
+ unsigned long validSize,
+ unsigned long bufferSize);
+
+EXTERN_API_C( TQ3Status )
+Q3MemoryStorage_SetBuffer (TQ3StorageObject storage,
+ unsigned char * buffer,
+ unsigned long validSize,
+ unsigned long bufferSize);
+
+EXTERN_API_C( TQ3Status )
+Q3MemoryStorage_GetBuffer (TQ3StorageObject storage,
+ unsigned char ** buffer,
+ unsigned long * validSize,
+ unsigned long * bufferSize);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if TARGET_OS_MAC
+/******************************************************************************
+ ** **
+ ** Macintosh Handles Prototypes **
+ ** **
+ *****************************************************************************/
+/* Handle Storage is a subclass of Memory Storage */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3StorageObject )
+Q3HandleStorage_New (Handle handle,
+ unsigned long validSize);
+
+EXTERN_API_C( TQ3Status )
+Q3HandleStorage_Set (TQ3StorageObject storage,
+ Handle handle,
+ unsigned long validSize);
+
+EXTERN_API_C( TQ3Status )
+Q3HandleStorage_Get (TQ3StorageObject storage,
+ Handle * handle,
+ unsigned long * validSize);
+
+/******************************************************************************
+ ** **
+ ** Macintosh Storage Prototypes **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3StorageObject )
+Q3MacintoshStorage_New (short fsRefNum);
+
+/* Note: This storage is assumed open */
+EXTERN_API_C( TQ3Status )
+Q3MacintoshStorage_Set (TQ3StorageObject storage,
+ short fsRefNum);
+
+EXTERN_API_C( TQ3Status )
+Q3MacintoshStorage_Get (TQ3StorageObject storage,
+ short * fsRefNum);
+
+EXTERN_API_C( TQ3ObjectType )
+Q3MacintoshStorage_GetType (TQ3StorageObject storage);
+
+
+/******************************************************************************
+ ** **
+ ** Macintosh FSSpec Storage Prototypes **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3StorageObject )
+Q3FSSpecStorage_New (const FSSpec * fs);
+
+EXTERN_API_C( TQ3Status )
+Q3FSSpecStorage_Set (TQ3StorageObject storage,
+ const FSSpec * fs);
+
+EXTERN_API_C( TQ3Status )
+Q3FSSpecStorage_Get (TQ3StorageObject storage,
+ FSSpec * fs);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_OS_MAC */
+
+#if TARGET_OS_WIN32
+/******************************************************************************
+ ** **
+ ** Win32 HANDLE Storage Prototypes **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3StorageObject )
+Q3Win32Storage_New (HANDLE hFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Win32Storage_Set (TQ3StorageObject storage,
+ HANDLE hFile);
+
+EXTERN_API_C( TQ3Status )
+Q3Win32Storage_Get (TQ3StorageObject storage,
+ HANDLE * hFile);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_OS_WIN32 */
+
+
+/******************************************************************************
+ ** **
+ ** Unix Prototypes **
+ ** The Unix Storage prototypes have been obsoleted. **
+ ** **
+ *****************************************************************************/
+
+
+/******************************************************************************
+ ** **
+ ** Unix Path Prototypes **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3StorageObject )
+Q3UnixPathStorage_New (const char * pathName);
+
+/* C string */
+EXTERN_API_C( TQ3Status )
+Q3UnixPathStorage_Set (TQ3StorageObject storage,
+ const char * pathName);
+
+/* C string */
+EXTERN_API_C( TQ3Status )
+Q3UnixPathStorage_Get (TQ3StorageObject storage,
+ char * pathName);
+
+/* pathName is a buffer */
+
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __QD3DSTORAGE__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__QD3DSTORAGE__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QD3DSTORAGE__ */
+
diff --git a/include/qt/QD3DString.h b/include/qt/QD3DString.h
new file mode 100644
index 000000000..a2af643bb
--- /dev/null
+++ b/include/qt/QD3DString.h
@@ -0,0 +1,132 @@
+/*
+ File: QD3DString.h
+
+ Contains: Q3CString methods
+
+ Version: Technology: Quickdraw 3D 1.6
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QD3DSTRING__
+#define __QD3DSTRING__
+
+#ifndef __QD3D__
+#include "QD3D.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __QD3DSTRING__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __QD3DSTRING__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+/******************************************************************************
+ ** **
+ ** String Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3ObjectType )
+Q3String_GetType (TQ3StringObject stringObj);
+
+
+/******************************************************************************
+ ** **
+ ** C String Routines **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3StringObject )
+Q3CString_New (const char * str);
+
+EXTERN_API_C( TQ3Status )
+Q3CString_GetLength (TQ3StringObject stringObj,
+ unsigned long * length);
+
+EXTERN_API_C( TQ3Status )
+Q3CString_SetString (TQ3StringObject stringObj,
+ const char * str);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3Status )
+Q3CString_GetString (TQ3StringObject stringObj,
+ char ** str);
+
+EXTERN_API_C( TQ3Status )
+Q3CString_EmptyData (char ** str);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __QD3DSTRING__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__QD3DSTRING__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QD3DSTRING__ */
+
diff --git a/include/qt/QD3DStyle.h b/include/qt/QD3DStyle.h
new file mode 100644
index 000000000..b6e1573bd
--- /dev/null
+++ b/include/qt/QD3DStyle.h
@@ -0,0 +1,459 @@
+/*
+ File: QD3DStyle.h
+
+ Contains: Q3Style types and routines
+
+ Version: Technology: Quickdraw 3D 1.6
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QD3DSTYLE__
+#define __QD3DSTYLE__
+
+#ifndef __QD3D__
+#include "QD3D.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __QD3DSTYLE__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __QD3DSTYLE__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+/******************************************************************************
+ ** **
+ ** Style Base Class Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3ObjectType )
+Q3Style_GetType (TQ3StyleObject style);
+
+EXTERN_API_C( TQ3Status )
+Q3Style_Submit (TQ3StyleObject style,
+ TQ3ViewObject view);
+
+
+/******************************************************************************
+ ** **
+ ** Subdivision **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+enum TQ3SubdivisionMethod {
+ kQ3SubdivisionMethodConstant = 0,
+ kQ3SubdivisionMethodWorldSpace = 1,
+ kQ3SubdivisionMethodScreenSpace = 2
+};
+typedef enum TQ3SubdivisionMethod TQ3SubdivisionMethod;
+
+
+
+struct TQ3SubdivisionStyleData {
+ TQ3SubdivisionMethod method;
+ float c1;
+ float c2;
+};
+typedef struct TQ3SubdivisionStyleData TQ3SubdivisionStyleData;
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3StyleObject )
+Q3SubdivisionStyle_New (const TQ3SubdivisionStyleData * data);
+
+EXTERN_API_C( TQ3Status )
+Q3SubdivisionStyle_Submit (const TQ3SubdivisionStyleData * data,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3SubdivisionStyle_SetData (TQ3StyleObject subdiv,
+ const TQ3SubdivisionStyleData * data);
+
+EXTERN_API_C( TQ3Status )
+Q3SubdivisionStyle_GetData (TQ3StyleObject subdiv,
+ TQ3SubdivisionStyleData * data);
+
+
+/******************************************************************************
+ ** **
+ ** Pick ID **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3StyleObject )
+Q3PickIDStyle_New (unsigned long id);
+
+EXTERN_API_C( TQ3Status )
+Q3PickIDStyle_Submit (unsigned long id,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3PickIDStyle_Get (TQ3StyleObject pickIDObject,
+ unsigned long * id);
+
+EXTERN_API_C( TQ3Status )
+Q3PickIDStyle_Set (TQ3StyleObject pickIDObject,
+ unsigned long id);
+
+
+/******************************************************************************
+ ** **
+ ** Pick Parts **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+enum TQ3PickPartsMasks {
+ kQ3PickPartsObject = 0,
+ kQ3PickPartsMaskFace = 1 << 0,
+ kQ3PickPartsMaskEdge = 1 << 1,
+ kQ3PickPartsMaskVertex = 1 << 2
+};
+typedef enum TQ3PickPartsMasks TQ3PickPartsMasks;
+
+
+typedef unsigned long TQ3PickParts;
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3StyleObject )
+Q3PickPartsStyle_New (TQ3PickParts parts);
+
+EXTERN_API_C( TQ3Status )
+Q3PickPartsStyle_Submit (TQ3PickParts parts,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3PickPartsStyle_Get (TQ3StyleObject pickPartsObject,
+ TQ3PickParts * parts);
+
+EXTERN_API_C( TQ3Status )
+Q3PickPartsStyle_Set (TQ3StyleObject pickPartsObject,
+ TQ3PickParts parts);
+
+
+/******************************************************************************
+ ** **
+ ** Receive Shadows **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3StyleObject )
+Q3ReceiveShadowsStyle_New (TQ3Boolean receives);
+
+EXTERN_API_C( TQ3Status )
+Q3ReceiveShadowsStyle_Submit (TQ3Boolean receives,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3ReceiveShadowsStyle_Get (TQ3StyleObject styleObject,
+ TQ3Boolean * receives);
+
+EXTERN_API_C( TQ3Status )
+Q3ReceiveShadowsStyle_Set (TQ3StyleObject styleObject,
+ TQ3Boolean receives);
+
+
+/******************************************************************************
+ ** **
+ ** Fill Styles **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+enum TQ3FillStyle {
+ kQ3FillStyleFilled = 0,
+ kQ3FillStyleEdges = 1,
+ kQ3FillStylePoints = 2
+};
+typedef enum TQ3FillStyle TQ3FillStyle;
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3StyleObject )
+Q3FillStyle_New (TQ3FillStyle fillStyle);
+
+EXTERN_API_C( TQ3Status )
+Q3FillStyle_Submit (TQ3FillStyle fillStyle,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3FillStyle_Get (TQ3StyleObject styleObject,
+ TQ3FillStyle * fillStyle);
+
+EXTERN_API_C( TQ3Status )
+Q3FillStyle_Set (TQ3StyleObject styleObject,
+ TQ3FillStyle fillStyle);
+
+
+/******************************************************************************
+ ** **
+ ** Backfacing Styles **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+enum TQ3BackfacingStyle {
+ kQ3BackfacingStyleBoth = 0,
+ kQ3BackfacingStyleRemove = 1,
+ kQ3BackfacingStyleFlip = 2
+};
+typedef enum TQ3BackfacingStyle TQ3BackfacingStyle;
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3StyleObject )
+Q3BackfacingStyle_New (TQ3BackfacingStyle backfacingStyle);
+
+EXTERN_API_C( TQ3Status )
+Q3BackfacingStyle_Submit (TQ3BackfacingStyle backfacingStyle,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3BackfacingStyle_Get (TQ3StyleObject backfacingObject,
+ TQ3BackfacingStyle * backfacingStyle);
+
+EXTERN_API_C( TQ3Status )
+Q3BackfacingStyle_Set (TQ3StyleObject backfacingObject,
+ TQ3BackfacingStyle backfacingStyle);
+
+
+/******************************************************************************
+ ** **
+ ** Interpolation Types **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+enum TQ3InterpolationStyle {
+ kQ3InterpolationStyleNone = 0,
+ kQ3InterpolationStyleVertex = 1,
+ kQ3InterpolationStylePixel = 2
+};
+typedef enum TQ3InterpolationStyle TQ3InterpolationStyle;
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3StyleObject )
+Q3InterpolationStyle_New (TQ3InterpolationStyle interpolationStyle);
+
+EXTERN_API_C( TQ3Status )
+Q3InterpolationStyle_Submit (TQ3InterpolationStyle interpolationStyle,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3InterpolationStyle_Get (TQ3StyleObject interpolationObject,
+ TQ3InterpolationStyle * interpolationStyle);
+
+EXTERN_API_C( TQ3Status )
+Q3InterpolationStyle_Set (TQ3StyleObject interpolationObject,
+ TQ3InterpolationStyle interpolationStyle);
+
+
+/******************************************************************************
+ ** **
+ ** Highlight Style **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3StyleObject )
+Q3HighlightStyle_New (TQ3AttributeSet highlightAttribute);
+
+EXTERN_API_C( TQ3Status )
+Q3HighlightStyle_Submit (TQ3AttributeSet highlightAttribute,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3HighlightStyle_Get (TQ3StyleObject highlight,
+ TQ3AttributeSet * highlightAttribute);
+
+EXTERN_API_C( TQ3Status )
+Q3HighlightStyle_Set (TQ3StyleObject highlight,
+ TQ3AttributeSet highlightAttribute);
+
+
+/******************************************************************************
+ ** **
+ ** FrontFacing Direction Styles **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+enum TQ3OrientationStyle {
+ kQ3OrientationStyleCounterClockwise = 0,
+ kQ3OrientationStyleClockwise = 1
+};
+typedef enum TQ3OrientationStyle TQ3OrientationStyle;
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3StyleObject )
+Q3OrientationStyle_New (TQ3OrientationStyle frontFacingDirection);
+
+EXTERN_API_C( TQ3Status )
+Q3OrientationStyle_Submit (TQ3OrientationStyle frontFacingDirection,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3OrientationStyle_Get (TQ3StyleObject frontFacingDirectionObject,
+ TQ3OrientationStyle * frontFacingDirection);
+
+EXTERN_API_C( TQ3Status )
+Q3OrientationStyle_Set (TQ3StyleObject frontFacingDirectionObject,
+ TQ3OrientationStyle frontFacingDirection);
+
+
+/******************************************************************************
+ ** **
+ ** AntiAlias Style **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+enum TQ3AntiAliasModeMasks {
+ kQ3AntiAliasModeMaskEdges = 1 << 0,
+ kQ3AntiAliasModeMaskFilled = 1 << 1
+};
+typedef enum TQ3AntiAliasModeMasks TQ3AntiAliasModeMasks;
+
+typedef unsigned long TQ3AntiAliasMode;
+
+struct TQ3AntiAliasStyleData {
+ TQ3Switch state;
+ TQ3AntiAliasMode mode;
+ float quality;
+};
+typedef struct TQ3AntiAliasStyleData TQ3AntiAliasStyleData;
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3StyleObject )
+Q3AntiAliasStyle_New (const TQ3AntiAliasStyleData * data);
+
+EXTERN_API_C( TQ3Status )
+Q3AntiAliasStyle_Submit (const TQ3AntiAliasStyleData * data,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3AntiAliasStyle_GetData (TQ3StyleObject styleObject,
+ TQ3AntiAliasStyleData * data);
+
+EXTERN_API_C( TQ3Status )
+Q3AntiAliasStyle_SetData (TQ3StyleObject styleObject,
+ const TQ3AntiAliasStyleData * data);
+
+
+/******************************************************************************
+ ** **
+ ** Fog Style **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+enum TQ3FogMode {
+ kQ3FogModeLinear = 0,
+ kQ3FogModeExponential = 1,
+ kQ3FogModeExponentialSquared = 2,
+ kQ3FogModeAlpha = 3
+};
+typedef enum TQ3FogMode TQ3FogMode;
+
+
+struct TQ3FogStyleData {
+ TQ3Switch state;
+ TQ3FogMode mode;
+ float fogStart;
+ float fogEnd;
+ float density;
+ TQ3ColorARGB color;
+};
+typedef struct TQ3FogStyleData TQ3FogStyleData;
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3StyleObject )
+Q3FogStyle_New (const TQ3FogStyleData * data);
+
+EXTERN_API_C( TQ3Status )
+Q3FogStyle_Submit (const TQ3FogStyleData * data,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3FogStyle_GetData (TQ3StyleObject styleObject,
+ TQ3FogStyleData * data);
+
+EXTERN_API_C( TQ3Status )
+Q3FogStyle_SetData (TQ3StyleObject styleObject,
+ const TQ3FogStyleData * data);
+
+
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __QD3DSTYLE__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__QD3DSTYLE__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QD3DSTYLE__ */
+
diff --git a/include/qt/QD3DTransform.h b/include/qt/QD3DTransform.h
new file mode 100644
index 000000000..f8a513a0a
--- /dev/null
+++ b/include/qt/QD3DTransform.h
@@ -0,0 +1,387 @@
+/*
+ File: QD3DTransform.h
+
+ Contains: Q3Transform routines
+
+ Version: Technology: Quickdraw 3D 1.6
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QD3DTRANSFORM__
+#define __QD3DTRANSFORM__
+
+#ifndef __QD3D__
+#include "QD3D.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __QD3DTRANSFORM__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __QD3DTRANSFORM__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+/******************************************************************************
+ ** **
+ ** Transform Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3ObjectType )
+Q3Transform_GetType (TQ3TransformObject transform);
+
+EXTERN_API_C( TQ3Matrix4x4 *)
+Q3Transform_GetMatrix (TQ3TransformObject transform,
+ TQ3Matrix4x4 * matrix);
+
+EXTERN_API_C( TQ3Status )
+Q3Transform_Submit (TQ3TransformObject transform,
+ TQ3ViewObject view);
+
+
+/******************************************************************************
+ ** **
+ ** MatrixTransform Routines **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3TransformObject )
+Q3MatrixTransform_New (const TQ3Matrix4x4 * matrix);
+
+EXTERN_API_C( TQ3Status )
+Q3MatrixTransform_Submit (const TQ3Matrix4x4 * matrix,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3MatrixTransform_Set (TQ3TransformObject transform,
+ const TQ3Matrix4x4 * matrix);
+
+EXTERN_API_C( TQ3Status )
+Q3MatrixTransform_Get (TQ3TransformObject transform,
+ TQ3Matrix4x4 * matrix);
+
+
+/******************************************************************************
+ ** **
+ ** RotateTransform Data **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct TQ3RotateTransformData {
+ TQ3Axis axis;
+ float radians;
+};
+typedef struct TQ3RotateTransformData TQ3RotateTransformData;
+/******************************************************************************
+ ** **
+ ** RotateTransform Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3TransformObject )
+Q3RotateTransform_New (const TQ3RotateTransformData * data);
+
+
+EXTERN_API_C( TQ3Status )
+Q3RotateTransform_Submit (const TQ3RotateTransformData * data,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3RotateTransform_SetData (TQ3TransformObject transform,
+ const TQ3RotateTransformData * data);
+
+EXTERN_API_C( TQ3Status )
+Q3RotateTransform_GetData (TQ3TransformObject transform,
+ TQ3RotateTransformData * data);
+
+EXTERN_API_C( TQ3Status )
+Q3RotateTransform_SetAxis (TQ3TransformObject transform,
+ TQ3Axis axis);
+
+EXTERN_API_C( TQ3Status )
+Q3RotateTransform_SetAngle (TQ3TransformObject transform,
+ float radians);
+
+EXTERN_API_C( TQ3Status )
+Q3RotateTransform_GetAxis (TQ3TransformObject renderable,
+ TQ3Axis * axis);
+
+EXTERN_API_C( TQ3Status )
+Q3RotateTransform_GetAngle (TQ3TransformObject transform,
+ float * radians);
+
+
+/******************************************************************************
+ ** **
+ ** RotateAboutPointTransform Data **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct TQ3RotateAboutPointTransformData {
+ TQ3Axis axis;
+ float radians;
+ TQ3Point3D about;
+};
+typedef struct TQ3RotateAboutPointTransformData TQ3RotateAboutPointTransformData;
+/******************************************************************************
+ ** **
+ ** RotateAboutPointTransform Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3TransformObject )
+Q3RotateAboutPointTransform_New (const TQ3RotateAboutPointTransformData * data);
+
+EXTERN_API_C( TQ3Status )
+Q3RotateAboutPointTransform_Submit (const TQ3RotateAboutPointTransformData * data,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3RotateAboutPointTransform_SetData (TQ3TransformObject transform,
+ const TQ3RotateAboutPointTransformData * data);
+
+EXTERN_API_C( TQ3Status )
+Q3RotateAboutPointTransform_GetData (TQ3TransformObject transform,
+ TQ3RotateAboutPointTransformData * data);
+
+EXTERN_API_C( TQ3Status )
+Q3RotateAboutPointTransform_SetAxis (TQ3TransformObject transform,
+ TQ3Axis axis);
+
+EXTERN_API_C( TQ3Status )
+Q3RotateAboutPointTransform_GetAxis (TQ3TransformObject transform,
+ TQ3Axis * axis);
+
+
+EXTERN_API_C( TQ3Status )
+Q3RotateAboutPointTransform_SetAngle (TQ3TransformObject transform,
+ float radians);
+
+EXTERN_API_C( TQ3Status )
+Q3RotateAboutPointTransform_GetAngle (TQ3TransformObject transform,
+ float * radians);
+
+
+EXTERN_API_C( TQ3Status )
+Q3RotateAboutPointTransform_SetAboutPoint (TQ3TransformObject transform,
+ const TQ3Point3D * about);
+
+EXTERN_API_C( TQ3Status )
+Q3RotateAboutPointTransform_GetAboutPoint (TQ3TransformObject transform,
+ TQ3Point3D * about);
+
+
+/******************************************************************************
+ ** **
+ ** RotateAboutAxisTransform Data **
+ ** **
+ *****************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct TQ3RotateAboutAxisTransformData {
+ TQ3Point3D origin;
+ TQ3Vector3D orientation;
+ float radians;
+};
+typedef struct TQ3RotateAboutAxisTransformData TQ3RotateAboutAxisTransformData;
+/******************************************************************************
+ ** **
+ ** RotateAboutAxisTransform Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3TransformObject )
+Q3RotateAboutAxisTransform_New (const TQ3RotateAboutAxisTransformData * data);
+
+EXTERN_API_C( TQ3Status )
+Q3RotateAboutAxisTransform_Submit (const TQ3RotateAboutAxisTransformData * data,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3RotateAboutAxisTransform_SetData (TQ3TransformObject transform,
+ const TQ3RotateAboutAxisTransformData * data);
+
+EXTERN_API_C( TQ3Status )
+Q3RotateAboutAxisTransform_GetData (TQ3TransformObject transform,
+ TQ3RotateAboutAxisTransformData * data);
+
+
+EXTERN_API_C( TQ3Status )
+Q3RotateAboutAxisTransform_SetOrientation (TQ3TransformObject transform,
+ const TQ3Vector3D * axis);
+
+EXTERN_API_C( TQ3Status )
+Q3RotateAboutAxisTransform_GetOrientation (TQ3TransformObject transform,
+ TQ3Vector3D * axis);
+
+
+EXTERN_API_C( TQ3Status )
+Q3RotateAboutAxisTransform_SetAngle (TQ3TransformObject transform,
+ float radians);
+
+EXTERN_API_C( TQ3Status )
+Q3RotateAboutAxisTransform_GetAngle (TQ3TransformObject transform,
+ float * radians);
+
+
+EXTERN_API_C( TQ3Status )
+Q3RotateAboutAxisTransform_SetOrigin (TQ3TransformObject transform,
+ const TQ3Point3D * origin);
+
+EXTERN_API_C( TQ3Status )
+Q3RotateAboutAxisTransform_GetOrigin (TQ3TransformObject transform,
+ TQ3Point3D * origin);
+
+
+/******************************************************************************
+ ** **
+ ** ScaleTransform Routines **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3TransformObject )
+Q3ScaleTransform_New (const TQ3Vector3D * scale);
+
+EXTERN_API_C( TQ3Status )
+Q3ScaleTransform_Submit (const TQ3Vector3D * scale,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3ScaleTransform_Set (TQ3TransformObject transform,
+ const TQ3Vector3D * scale);
+
+EXTERN_API_C( TQ3Status )
+Q3ScaleTransform_Get (TQ3TransformObject transform,
+ TQ3Vector3D * scale);
+
+
+/******************************************************************************
+ ** **
+ ** TranslateTransform Routines **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3TransformObject )
+Q3TranslateTransform_New (const TQ3Vector3D * translate);
+
+EXTERN_API_C( TQ3Status )
+Q3TranslateTransform_Submit (const TQ3Vector3D * translate,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3TranslateTransform_Set (TQ3TransformObject transform,
+ const TQ3Vector3D * translate);
+
+EXTERN_API_C( TQ3Status )
+Q3TranslateTransform_Get (TQ3TransformObject transform,
+ TQ3Vector3D * translate);
+
+/******************************************************************************
+ ** **
+ ** QuaternionTransform Routines **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3TransformObject )
+Q3QuaternionTransform_New (const TQ3Quaternion * quaternion);
+
+EXTERN_API_C( TQ3Status )
+Q3QuaternionTransform_Submit (const TQ3Quaternion * quaternion,
+ TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3QuaternionTransform_Set (TQ3TransformObject transform,
+ const TQ3Quaternion * quaternion);
+
+EXTERN_API_C( TQ3Status )
+Q3QuaternionTransform_Get (TQ3TransformObject transform,
+ TQ3Quaternion * quaternion);
+
+
+/******************************************************************************
+ ** **
+ ** ResetTransform Routines **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3TransformObject )
+Q3ResetTransform_New (void);
+
+EXTERN_API_C( TQ3Status )
+Q3ResetTransform_Submit (TQ3ViewObject view);
+
+
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __QD3DTRANSFORM__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__QD3DTRANSFORM__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QD3DTRANSFORM__ */
+
diff --git a/include/qt/QD3DView.h b/include/qt/QD3DView.h
new file mode 100644
index 000000000..48abd0d4c
--- /dev/null
+++ b/include/qt/QD3DView.h
@@ -0,0 +1,491 @@
+/*
+ File: QD3DView.h
+
+ Contains: View types and routines
+
+ Version: Technology: Quickdraw 3D 1.6
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QD3DVIEW__
+#define __QD3DVIEW__
+
+#ifndef __QD3D__
+#include "QD3D.h"
+#endif
+
+
+#ifndef __QD3DSTYLE__
+#include "QD3DStyle.h"
+#endif
+
+#ifndef __QD3DSET__
+#include "QD3DSet.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __QD3DVIEW__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __QD3DVIEW__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+/******************************************************************************
+ ** **
+ ** View Type Definitions **
+ ** **
+ *****************************************************************************/
+
+enum TQ3ViewStatus {
+ kQ3ViewStatusDone = 0,
+ kQ3ViewStatusRetraverse = 1,
+ kQ3ViewStatusError = 2,
+ kQ3ViewStatusCancelled = 3
+};
+typedef enum TQ3ViewStatus TQ3ViewStatus;
+
+
+/******************************************************************************
+ ** **
+ ** Default Attribute Set **
+ ** **
+ *****************************************************************************/
+#define kQ3ViewDefaultAmbientCoefficient 1.0
+#define kQ3ViewDefaultDiffuseColor 1.0, 1.0, 1.0
+#define kQ3ViewDefaultSpecularColor 0.5, 0.5, 0.5
+#define kQ3ViewDefaultSpecularControl 4.0
+#define kQ3ViewDefaultTransparency 1.0, 1.0, 1.0
+#define kQ3ViewDefaultHighlightState kQ3Off
+#define kQ3ViewDefaultHighlightColor 1.0, 0.0, 0.0
+#define kQ3ViewDefaultSubdivisionMethod kQ3SubdivisionMethodScreenSpace
+#define kQ3ViewDefaultSubdivisionC1 20.0
+#define kQ3ViewDefaultSubdivisionC2 20.0
+
+/******************************************************************************
+ ** **
+ ** View Routines **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3ViewObject )
+Q3View_New (void);
+
+EXTERN_API_C( TQ3Status )
+Q3View_Cancel (TQ3ViewObject view);
+
+/******************************************************************************
+ ** **
+ ** View Rendering routines **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Status )
+Q3View_SetRendererByType (TQ3ViewObject view,
+ TQ3ObjectType theType);
+
+EXTERN_API_C( TQ3Status )
+Q3View_SetRenderer (TQ3ViewObject view,
+ TQ3RendererObject renderer);
+
+EXTERN_API_C( TQ3Status )
+Q3View_GetRenderer (TQ3ViewObject view,
+ TQ3RendererObject * renderer);
+
+EXTERN_API_C( TQ3Status )
+Q3View_StartRendering (TQ3ViewObject view);
+
+EXTERN_API_C( TQ3ViewStatus )
+Q3View_EndRendering (TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3View_Flush (TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3View_Sync (TQ3ViewObject view);
+
+
+/******************************************************************************
+ ** **
+ ** View/Bounds/Pick routines **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Status )
+Q3View_StartBoundingBox (TQ3ViewObject view,
+ TQ3ComputeBounds computeBounds);
+
+EXTERN_API_C( TQ3ViewStatus )
+Q3View_EndBoundingBox (TQ3ViewObject view,
+ TQ3BoundingBox * result);
+
+EXTERN_API_C( TQ3Status )
+Q3View_StartBoundingSphere (TQ3ViewObject view,
+ TQ3ComputeBounds computeBounds);
+
+EXTERN_API_C( TQ3ViewStatus )
+Q3View_EndBoundingSphere (TQ3ViewObject view,
+ TQ3BoundingSphere * result);
+
+EXTERN_API_C( TQ3Status )
+Q3View_StartPicking (TQ3ViewObject view,
+ TQ3PickObject pick);
+
+EXTERN_API_C( TQ3ViewStatus )
+Q3View_EndPicking (TQ3ViewObject view);
+
+
+/******************************************************************************
+ ** **
+ ** View/Camera routines **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Status )
+Q3View_GetCamera (TQ3ViewObject view,
+ TQ3CameraObject * camera);
+
+EXTERN_API_C( TQ3Status )
+Q3View_SetCamera (TQ3ViewObject view,
+ TQ3CameraObject camera);
+
+
+/******************************************************************************
+ ** **
+ ** View/Lights routines **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Status )
+Q3View_SetLightGroup (TQ3ViewObject view,
+ TQ3GroupObject lightGroup);
+
+EXTERN_API_C( TQ3Status )
+Q3View_GetLightGroup (TQ3ViewObject view,
+ TQ3GroupObject * lightGroup);
+
+
+/******************************************************************************
+ ** **
+ ** Idle Method **
+ ** **
+ *****************************************************************************/
+/*
+ * The idle methods allow the application to register callback routines
+ * which will be called by the view during especially long operations.
+ *
+ * The idle methods may also be used to interrupt long renderings or
+ * traversals. Inside the idler callback the application can check for
+ * Command-Period, Control-C or clicking a "Cancel" button or whatever else
+ * may be used to let the user interrupt rendering.
+ *
+ * It is NOT LEGAL to call QD3D routines inside an idler callback.
+ *
+ * Return kQ3Failure to cancel rendering, kQ3Success to continue. Don't
+ * bother posting an error.
+ *
+ * Q3View_SetIdleMethod registers a callback that can be called
+ * by the system during rendering. Unfortunately there is no way yet
+ * to set timer intervals when you want to be called. Basically, it is
+ * up to the application's idler callback to check clocks to see if you
+ * were called back only a millisecond ago or an hour ago!
+ *
+ * Q3View_SetIdleProgressMethod registers a callback that also gives
+ * progress information. This information is supplied by the renderer, and
+ * may or may not be based on real time.
+ *
+ * If a renderer doesn't support the progress method, your method will be
+ * called with current == 0 and completed == 0.
+ *
+ * Otherwise, you are GUARANTEED to get called at least 2 or more times:
+ *
+ * ONCE idleMethod(view, 0, n) -> Initialize, Show Dialog
+ * zero or more idleMethod(view, 1..n-1, n) -> Update progress
+ * ONCE idleMethod(view, n, n) -> Exit, Hide Dialog
+ *
+ * "current" is guaranteed to be less than or equal to "completed"
+ * "completed" may change values, but current/complete always indicates
+ * the degree of completion.
+ *
+ * The calling conventions aid in managing any data associated with a
+ * progress user interface indicator.
+ */
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API_C( TQ3Status , TQ3ViewIdleMethod )(TQ3ViewObject view, const void *idlerData);
+typedef CALLBACK_API_C( TQ3Status , TQ3ViewIdleProgressMethod )(TQ3ViewObject view, const void *idlerData, unsigned long current, unsigned long completed);
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3Status )
+Q3View_SetIdleMethod (TQ3ViewObject view,
+ TQ3ViewIdleMethod idleMethod,
+ const void * idleData);
+
+EXTERN_API_C( TQ3Status )
+Q3View_SetIdleProgressMethod (TQ3ViewObject view,
+ TQ3ViewIdleProgressMethod idleMethod,
+ const void * idleData);
+
+
+/******************************************************************************
+ ** **
+ ** EndFrame Method **
+ ** **
+ *****************************************************************************/
+/*
+ * The end frame method is an alternate way of determining when an
+ * asynchronous renderer has completed rendering a frame. It differs from
+ * Q3View_Sync in that notification of the frame completion is the opposite
+ * direction.
+ *
+ * With Q3View_Sync the application asks a renderer to finish rendering
+ * a frame, and blocks until the frame is complete.
+ *
+ * With the EndFrame method, the renderer tells the application that is has
+ * completed a frame.
+ *
+ * If "Q3View_Sync" is called BEFORE this method has been called, this
+ * method will NOT be called ever.
+ *
+ * If "Q3View_Sync" is called AFTER this method has been called, the
+ * call will return immediately (as the frame has already been completed).
+ */
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef CALLBACK_API_C( void , TQ3ViewEndFrameMethod )(TQ3ViewObject view, void *endFrameData);
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3Status )
+Q3View_SetEndFrameMethod (TQ3ViewObject view,
+ TQ3ViewEndFrameMethod endFrame,
+ void * endFrameData);
+
+
+/******************************************************************************
+ ** **
+ ** Push/Pop routines **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Status )
+Q3Push_Submit (TQ3ViewObject view);
+
+EXTERN_API_C( TQ3Status )
+Q3Pop_Submit (TQ3ViewObject view);
+
+EXTERN_API_C( TQ3StateOperatorObject )
+Q3Push_New (void);
+
+EXTERN_API_C( TQ3StateOperatorObject )
+Q3Pop_New (void);
+
+EXTERN_API_C( TQ3Status )
+Q3StateOperator_Submit (TQ3StateOperatorObject stateOperator,
+ TQ3ViewObject view);
+
+
+/******************************************************************************
+ ** **
+ ** Check if bounding box is visible in the viewing frustum. Transforms **
+ ** the bbox by the current local_to_world transformation matrix and **
+ ** does a clip test to see if it lies in the viewing frustum. **
+ ** This can be used by applications to cull out large chunks of scenes **
+ ** that are not going to be visible. **
+ ** **
+ ** The default implementation is to always return kQ3True. Renderers **
+ ** may override this routine however to do the checking. **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Boolean )
+Q3View_IsBoundingBoxVisible (TQ3ViewObject view,
+ const TQ3BoundingBox * bbox);
+
+
+/******************************************************************************
+ ** **
+ ** Allows display groups to be culled if they are assigned bounding **
+ ** boxes. **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Status )
+Q3View_AllowAllGroupCulling (TQ3ViewObject view,
+ TQ3Boolean allowCulling);
+
+
+
+/******************************************************************************
+ ** **
+ ** DrawContext routines **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Status )
+Q3View_SetDrawContext (TQ3ViewObject view,
+ TQ3DrawContextObject drawContext);
+
+EXTERN_API_C( TQ3Status )
+Q3View_GetDrawContext (TQ3ViewObject view,
+ TQ3DrawContextObject * drawContext);
+
+
+/******************************************************************************
+ ** **
+ ** Graphics State routines **
+ ** **
+ ** The graphics state routines can only be called while rendering (ie. in **
+ ** between calls to start and end rendering calls). If they are called **
+ ** outside of a rendering loop, they will return with error. **
+ ** **
+ *****************************************************************************/
+/******************************************************************************
+ ** **
+ ** Transform routines **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Status )
+Q3View_GetLocalToWorldMatrixState (TQ3ViewObject view,
+ TQ3Matrix4x4 * matrix);
+
+EXTERN_API_C( TQ3Status )
+Q3View_GetWorldToFrustumMatrixState (TQ3ViewObject view,
+ TQ3Matrix4x4 * matrix);
+
+EXTERN_API_C( TQ3Status )
+Q3View_GetFrustumToWindowMatrixState (TQ3ViewObject view,
+ TQ3Matrix4x4 * matrix);
+
+
+/******************************************************************************
+ ** **
+ ** Style state routines **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Status )
+Q3View_GetBackfacingStyleState (TQ3ViewObject view,
+ TQ3BackfacingStyle * backfacingStyle);
+
+EXTERN_API_C( TQ3Status )
+Q3View_GetInterpolationStyleState (TQ3ViewObject view,
+ TQ3InterpolationStyle * interpolationType);
+
+EXTERN_API_C( TQ3Status )
+Q3View_GetFillStyleState (TQ3ViewObject view,
+ TQ3FillStyle * fillStyle);
+
+EXTERN_API_C( TQ3Status )
+Q3View_GetHighlightStyleState (TQ3ViewObject view,
+ TQ3AttributeSet * highlightStyle);
+
+EXTERN_API_C( TQ3Status )
+Q3View_GetSubdivisionStyleState (TQ3ViewObject view,
+ TQ3SubdivisionStyleData * subdivisionStyle);
+
+EXTERN_API_C( TQ3Status )
+Q3View_GetOrientationStyleState (TQ3ViewObject view,
+ TQ3OrientationStyle * fontFacingDirectionStyle);
+
+EXTERN_API_C( TQ3Status )
+Q3View_GetReceiveShadowsStyleState (TQ3ViewObject view,
+ TQ3Boolean * receives);
+
+EXTERN_API_C( TQ3Status )
+Q3View_GetPickIDStyleState (TQ3ViewObject view,
+ unsigned long * pickIDStyle);
+
+EXTERN_API_C( TQ3Status )
+Q3View_GetPickPartsStyleState (TQ3ViewObject view,
+ TQ3PickParts * pickPartsStyle);
+
+EXTERN_API_C( TQ3Status )
+Q3View_GetAntiAliasStyleState (TQ3ViewObject view,
+ TQ3AntiAliasStyleData * antiAliasData);
+
+
+/******************************************************************************
+ ** **
+ ** Attribute state routines **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Status )
+Q3View_GetDefaultAttributeSet (TQ3ViewObject view,
+ TQ3AttributeSet * attributeSet);
+
+EXTERN_API_C( TQ3Status )
+Q3View_SetDefaultAttributeSet (TQ3ViewObject view,
+ TQ3AttributeSet attributeSet);
+
+
+EXTERN_API_C( TQ3Status )
+Q3View_GetAttributeSetState (TQ3ViewObject view,
+ TQ3AttributeSet * attributeSet);
+
+EXTERN_API_C( TQ3Status )
+Q3View_GetAttributeState (TQ3ViewObject view,
+ TQ3AttributeType attributeType,
+ void * data);
+
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __QD3DVIEW__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__QD3DVIEW__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QD3DVIEW__ */
+
diff --git a/include/qt/QD3DViewer.h b/include/qt/QD3DViewer.h
new file mode 100644
index 000000000..78849c85e
--- /dev/null
+++ b/include/qt/QD3DViewer.h
@@ -0,0 +1,541 @@
+/*
+ File: QD3DViewer.h
+
+ Contains: MacOS Viewer Controller Interface File.
+
+ Version: Technology: Quickdraw 3D 1.6
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QD3DVIEWER__
+#define __QD3DVIEWER__
+
+#ifndef __QD3D__
+#include "QD3D.h"
+#endif
+
+#ifndef __QD3DGROUP__
+#include "QD3DGroup.h"
+#endif
+
+
+#if TARGET_OS_MAC
+#ifndef __EVENTS__
+#include "Events.h"
+#endif
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#endif /* TARGET_OS_MAC */
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __QD3DVIEWER__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __QD3DVIEWER__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+typedef void * TQ3ViewerObject;
+
+typedef CALLBACK_API_C( TQ3Status , TQ3ViewerWindowResizeCallbackMethod )(TQ3ViewerObject theViewer, const void *data);
+typedef CALLBACK_API_C( TQ3Status , TQ3ViewerPaneResizeNotifyCallbackMethod )(TQ3ViewerObject theViewer, const void *data);
+
+#if TARGET_OS_MAC
+typedef CALLBACK_API_C( OSErr , TQ3ViewerDrawingCallbackMethod )(TQ3ViewerObject theViewer, const void *data);
+
+enum {
+ kQ3ViewerShowBadge = 1 << 0,
+ kQ3ViewerActive = 1 << 1,
+ kQ3ViewerControllerVisible = 1 << 2,
+ kQ3ViewerDrawFrame = 1 << 3,
+ kQ3ViewerDraggingOff = 1 << 4,
+ kQ3ViewerButtonCamera = 1 << 5,
+ kQ3ViewerButtonTruck = 1 << 6,
+ kQ3ViewerButtonOrbit = 1 << 7,
+ kQ3ViewerButtonZoom = 1 << 8,
+ kQ3ViewerButtonDolly = 1 << 9,
+ kQ3ViewerButtonReset = 1 << 10,
+ kQ3ViewerOutputTextMode = 1 << 11,
+ kQ3ViewerDragMode = 1 << 12,
+ kQ3ViewerDrawGrowBox = 1 << 13,
+ kQ3ViewerDrawDragBorder = 1 << 14,
+ kQ3ViewerDraggingInOff = 1 << 15,
+ kQ3ViewerDraggingOutOff = 1 << 16,
+ kQ3ViewerButtonOptions = 1 << 17,
+ kQ3ViewerPaneGrowBox = 1 << 18,
+ kQ3ViewerDefault = 1 << 31
+};
+
+enum {
+ kQ3ViewerEmpty = 0,
+ kQ3ViewerHasModel = 1 << 0,
+ kQ3ViewerHasUndo = 1 << 1
+};
+
+
+enum TQ3ViewerCameraView {
+ kQ3ViewerCameraRestore = 0,
+ kQ3ViewerCameraFit = 1,
+ kQ3ViewerCameraFront = 2,
+ kQ3ViewerCameraBack = 3,
+ kQ3ViewerCameraLeft = 4,
+ kQ3ViewerCameraRight = 5,
+ kQ3ViewerCameraTop = 6,
+ kQ3ViewerCameraBottom = 7
+};
+typedef enum TQ3ViewerCameraView TQ3ViewerCameraView;
+
+
+
+
+/******************************************************************************
+ ** **
+ ** Return viewer version number **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSErr )
+Q3ViewerGetVersion (unsigned long * majorRevision,
+ unsigned long * minorRevision);
+
+
+/******************************************************************************
+ ** **
+ ** Return viewer release version number **
+ ** (in 'vers' format - e.g. 0x01518000 ==> 1.5.1 release) **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( OSErr )
+Q3ViewerGetReleaseVersion (unsigned long * releaseRevision);
+
+
+/******************************************************************************
+ ** **
+ ** Creation and destruction **
+ ** Note that this is not a QuickDraw 3D object **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3ViewerObject )
+Q3ViewerNew (CGrafPtr port,
+ Rect * rect,
+ unsigned long flags);
+
+EXTERN_API_C( OSErr )
+Q3ViewerDispose (TQ3ViewerObject theViewer);
+
+
+/******************************************************************************
+ ** **
+ ** Functions to attach data to a viewer **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( OSErr )
+Q3ViewerUseFile (TQ3ViewerObject theViewer,
+ long refNum);
+
+EXTERN_API_C( OSErr )
+Q3ViewerUseData (TQ3ViewerObject theViewer,
+ void * data,
+ long size);
+
+
+/******************************************************************************
+ ** **
+ ** Functions to write data out from the Viewer **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( OSErr )
+Q3ViewerWriteFile (TQ3ViewerObject theViewer,
+ long refNum);
+
+EXTERN_API_C( unsigned long )
+Q3ViewerWriteData (TQ3ViewerObject theViewer,
+ Handle data);
+
+
+/******************************************************************************
+ ** **
+ ** Use this function to force the Viewer to re-draw **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( OSErr )
+Q3ViewerDraw (TQ3ViewerObject theViewer);
+
+EXTERN_API_C( OSErr )
+Q3ViewerDrawContent (TQ3ViewerObject theViewer);
+
+EXTERN_API_C( OSErr )
+Q3ViewerDrawControlStrip (TQ3ViewerObject theViewer);
+
+
+/******************************************************************************
+ ** **
+ ** Function used by the Viewer to filter and handle events **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( Boolean )
+Q3ViewerEvent (TQ3ViewerObject theViewer,
+ EventRecord * evt);
+
+
+/******************************************************************************
+ ** **
+ ** This function returns a PICT of the contents of the **
+ ** Viewer's window. The application should dispose the PICT. **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( PicHandle )
+Q3ViewerGetPict (TQ3ViewerObject theViewer);
+
+
+/******************************************************************************
+ ** **
+ ** Calls for dealing with Buttons **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( OSErr )
+Q3ViewerGetButtonRect (TQ3ViewerObject theViewer,
+ unsigned long button,
+ Rect * rect);
+
+EXTERN_API_C( unsigned long )
+Q3ViewerGetCurrentButton (TQ3ViewerObject theViewer);
+
+EXTERN_API_C( OSErr )
+Q3ViewerSetCurrentButton (TQ3ViewerObject theViewer,
+ unsigned long button);
+
+
+/******************************************************************************
+ ** **
+ ** Functions to set/get the group to be displayed by the Viewer. **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( OSErr )
+Q3ViewerUseGroup (TQ3ViewerObject theViewer,
+ TQ3GroupObject group);
+
+EXTERN_API_C( TQ3GroupObject )
+Q3ViewerGetGroup (TQ3ViewerObject theViewer);
+
+
+/******************************************************************************
+ ** **
+ ** Functions to set/get the color used to clear the window **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( OSErr )
+Q3ViewerSetBackgroundColor (TQ3ViewerObject theViewer,
+ TQ3ColorARGB * color);
+
+EXTERN_API_C( OSErr )
+Q3ViewerGetBackgroundColor (TQ3ViewerObject theViewer,
+ TQ3ColorARGB * color);
+
+
+/******************************************************************************
+ ** **
+ ** Getting/Setting a Viewer's View object. **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3ViewObject )
+Q3ViewerGetView (TQ3ViewerObject theViewer);
+
+EXTERN_API_C( OSErr )
+Q3ViewerRestoreView (TQ3ViewerObject theViewer);
+
+
+/******************************************************************************
+ ** **
+ ** Calls for setting/getting viewer flags **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( OSErr )
+Q3ViewerSetFlags (TQ3ViewerObject theViewer,
+ unsigned long flags);
+
+EXTERN_API_C( unsigned long )
+Q3ViewerGetFlags (TQ3ViewerObject theViewer);
+
+
+/******************************************************************************
+ ** **
+ ** Calls related to bounds/dimensions. Bounds is the size of **
+ ** the window. Dimensions can either be the Rect from the ViewHints **
+ ** or the current dimensions of the window (if you do a Set). **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( OSErr )
+Q3ViewerSetBounds (TQ3ViewerObject theViewer,
+ Rect * bounds);
+
+EXTERN_API_C( OSErr )
+Q3ViewerGetBounds (TQ3ViewerObject theViewer,
+ Rect * bounds);
+
+EXTERN_API_C( OSErr )
+Q3ViewerSetDimension (TQ3ViewerObject theViewer,
+ unsigned long width,
+ unsigned long height);
+
+EXTERN_API_C( OSErr )
+Q3ViewerGetDimension (TQ3ViewerObject theViewer,
+ unsigned long * width,
+ unsigned long * height);
+
+EXTERN_API_C( OSErr )
+Q3ViewerGetMinimumDimension (TQ3ViewerObject theViewer,
+ unsigned long * width,
+ unsigned long * height);
+
+
+/******************************************************************************
+ ** **
+ ** Port related calls **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( OSErr )
+Q3ViewerSetPort (TQ3ViewerObject theViewer,
+ CGrafPtr port);
+
+EXTERN_API_C( CGrafPtr )
+Q3ViewerGetPort (TQ3ViewerObject theViewer);
+
+
+/******************************************************************************
+ ** **
+ ** Adjust Cursor should be called from idle loop to allow the Viewer **
+ ** to change the cursor according to the cursor position/object under **
+ ** the cursor. **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( Boolean )
+Q3ViewerAdjustCursor (TQ3ViewerObject theViewer,
+ Point * pt);
+
+EXTERN_API_C( OSErr )
+Q3ViewerCursorChanged (TQ3ViewerObject theViewer);
+
+
+/******************************************************************************
+ ** **
+ ** Returns the state of the viewer. See the constant defined at the **
+ ** top of this file. **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( unsigned long )
+Q3ViewerGetState (TQ3ViewerObject theViewer);
+
+
+/******************************************************************************
+ ** **
+ ** Clipboard utilities **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( OSErr )
+Q3ViewerClear (TQ3ViewerObject theViewer);
+
+EXTERN_API_C( OSErr )
+Q3ViewerCut (TQ3ViewerObject theViewer);
+
+EXTERN_API_C( OSErr )
+Q3ViewerCopy (TQ3ViewerObject theViewer);
+
+EXTERN_API_C( OSErr )
+Q3ViewerPaste (TQ3ViewerObject theViewer);
+
+
+/******************************************************************************
+ ** **
+ ** New Event Model **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( Boolean )
+Q3ViewerMouseDown (TQ3ViewerObject theViewer,
+ long x,
+ long y);
+
+EXTERN_API_C( Boolean )
+Q3ViewerContinueTracking (TQ3ViewerObject theViewer,
+ long x,
+ long y);
+
+EXTERN_API_C( Boolean )
+Q3ViewerMouseUp (TQ3ViewerObject theViewer,
+ long x,
+ long y);
+
+EXTERN_API_C( Boolean )
+Q3ViewerHandleKeyEvent (TQ3ViewerObject theViewer,
+ EventRecord * evt);
+
+
+/******************************************************************************
+ ** **
+ ** CallBacks **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( OSErr )
+Q3ViewerSetDrawingCallbackMethod (TQ3ViewerObject theViewer,
+ TQ3ViewerDrawingCallbackMethod callbackMethod,
+ const void * data);
+
+EXTERN_API_C( OSErr )
+Q3ViewerSetWindowResizeCallback (TQ3ViewerObject theViewer,
+ TQ3ViewerWindowResizeCallbackMethod windowResizeCallbackMethod,
+ const void * data);
+
+EXTERN_API_C( OSErr )
+Q3ViewerSetPaneResizeNotifyCallback (TQ3ViewerObject theViewer,
+ TQ3ViewerPaneResizeNotifyCallbackMethod paneResizeNotifyCallbackMethod,
+ const void * data);
+
+
+/******************************************************************************
+ ** **
+ ** Undo **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( OSErr )
+Q3ViewerUndo (TQ3ViewerObject theViewer);
+
+EXTERN_API_C( Boolean )
+Q3ViewerGetUndoString (TQ3ViewerObject theViewer,
+ char * str,
+ unsigned long * cnt);
+
+
+/******************************************************************************
+ ** **
+ ** Camera Support **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( OSErr )
+Q3ViewerGetCameraCount (TQ3ViewerObject theViewer,
+ unsigned long * cnt);
+
+EXTERN_API_C( OSErr )
+Q3ViewerSetCameraByNumber (TQ3ViewerObject theViewer,
+ unsigned long cameraNo);
+
+EXTERN_API_C( OSErr )
+Q3ViewerSetCameraByView (TQ3ViewerObject theViewer,
+ TQ3ViewerCameraView viewType);
+
+
+/******************************************************************************
+ ** **
+ ** Pop-up Button Options **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( OSErr )
+Q3ViewerSetRendererType (TQ3ViewerObject theViewer,
+ TQ3ObjectType rendererType);
+
+EXTERN_API_C( OSErr )
+Q3ViewerGetRendererType (TQ3ViewerObject theViewer,
+ TQ3ObjectType * rendererType);
+
+EXTERN_API_C( OSErr )
+Q3ViewerChangeBrightness (TQ3ViewerObject theViewer,
+ float brightness);
+
+EXTERN_API_C( OSErr )
+Q3ViewerSetRemoveBackfaces (TQ3ViewerObject theViewer,
+ TQ3Boolean remove);
+
+EXTERN_API_C( OSErr )
+Q3ViewerGetRemoveBackfaces (TQ3ViewerObject theViewer,
+ TQ3Boolean * remove);
+
+EXTERN_API_C( OSErr )
+Q3ViewerSetPhongShading (TQ3ViewerObject theViewer,
+ TQ3Boolean phong);
+
+EXTERN_API_C( OSErr )
+Q3ViewerGetPhongShading (TQ3ViewerObject theViewer,
+ TQ3Boolean * phong);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_OS_MAC */
+
+
+
+
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __QD3DVIEWER__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__QD3DVIEWER__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QD3DVIEWER__ */
+
diff --git a/include/qt/QD3DWinViewer.h b/include/qt/QD3DWinViewer.h
new file mode 100644
index 000000000..cc452ce9e
--- /dev/null
+++ b/include/qt/QD3DWinViewer.h
@@ -0,0 +1,515 @@
+/*
+ File: QD3DWinViewer.h
+
+ Contains: Win32 Viewer Controller Interface File.
+
+ Version: Technology: Quickdraw 3D 1.6
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QD3DWINVIEWER__
+#define __QD3DWINVIEWER__
+
+#ifndef __QD3D__
+#include "QD3D.h"
+#endif
+
+#ifndef __QD3DGROUP__
+#include "QD3DGroup.h"
+#endif
+
+
+
+#if TARGET_OS_WIN32
+#include "windows.h"
+#endif
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __QD3DWINVIEWER__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __QD3DWINVIEWER__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+#if TARGET_OS_WIN32
+typedef void * TQ3ViewerObject;
+typedef CALLBACK_API_C( TQ3Status , TQ3ViewerDrawingCallbackMethod )(TQ3ViewerObject theViewer, const void *data);
+typedef CALLBACK_API_C( TQ3Status , TQ3ViewerWindowResizeCallbackMethod )(TQ3ViewerObject theViewer, const void *data);
+typedef CALLBACK_API_C( TQ3Status , TQ3ViewerPaneResizeNotifyCallbackMethod )(TQ3ViewerObject theViewer, const void *data);
+enum {
+ kQ3ViewerShowBadge = 1 << 0,
+ kQ3ViewerActive = 1 << 1,
+ kQ3ViewerControllerVisible = 1 << 2,
+ kQ3ViewerButtonCamera = 1 << 3,
+ kQ3ViewerButtonTruck = 1 << 4,
+ kQ3ViewerButtonOrbit = 1 << 5,
+ kQ3ViewerButtonZoom = 1 << 6,
+ kQ3ViewerButtonDolly = 1 << 7,
+ kQ3ViewerButtonReset = 1 << 8,
+ kQ3ViewerButtonNone = 1 << 9,
+ kQ3ViewerOutputTextMode = 1 << 10,
+ kQ3ViewerDraggingInOff = 1 << 11,
+ kQ3ViewerButtonOptions = 1 << 12,
+ kQ3ViewerPaneGrowBox = 1 << 13,
+ kQ3ViewerDefault = 1 << 15
+};
+
+
+enum {
+ kQ3ViewerEmpty = 0,
+ kQ3ViewerHasModel = 1 << 0,
+ kQ3ViewerHasUndo = 1 << 1
+};
+
+
+enum TQ3ViewerCameraView {
+ kQ3ViewerCameraRestore = 0,
+ kQ3ViewerCameraFit = 1,
+ kQ3ViewerCameraFront = 2,
+ kQ3ViewerCameraBack = 3,
+ kQ3ViewerCameraLeft = 4,
+ kQ3ViewerCameraRight = 5,
+ kQ3ViewerCameraTop = 6,
+ kQ3ViewerCameraBottom = 7
+};
+typedef enum TQ3ViewerCameraView TQ3ViewerCameraView;
+
+
+/******************************************************************************
+ ** **
+ ** WM_NOTIFY structures **
+ ** **
+ *****************************************************************************/
+
+struct TQ3ViewerDropFiles {
+ NMHDR nmhdr;
+ HANDLE hDrop;
+};
+typedef struct TQ3ViewerDropFiles TQ3ViewerDropFiles;
+
+struct TQ3ViewerSetView {
+ NMHDR nmhdr;
+ TQ3ViewerCameraView view;
+};
+typedef struct TQ3ViewerSetView TQ3ViewerSetView;
+
+struct TQ3ViewerSetViewNumber {
+ NMHDR nmhdr;
+ unsigned long number;
+};
+typedef struct TQ3ViewerSetViewNumber TQ3ViewerSetViewNumber;
+
+struct TQ3ViewerButtonSet {
+ NMHDR nmhdr;
+ unsigned long button;
+};
+typedef struct TQ3ViewerButtonSet TQ3ViewerButtonSet;
+/******************************************************************************
+ ** **
+ ** WM_NOTIFY defines **
+ ** **
+ *****************************************************************************/
+
+#define Q3VNM_DROPFILES 0x5000
+#define Q3VNM_CANUNDO 0x5001
+#define Q3VNM_DRAWCOMPLETE 0x5002
+#define Q3VNM_SETVIEW 0x5003
+#define Q3VNM_SETVIEWNUMBER 0x5004
+#define Q3VNM_BUTTONSET 0x5005
+#define Q3VNM_BADGEHIT 0x5006
+
+/******************************************************************************
+ ** **
+ ** Win32 Window Class Name **
+ ** Can be passed as a parameter to CreateWindow or CreateWindowEx **
+ ** **
+ *****************************************************************************/
+#define kQ3ViewerClassName "QD3DViewerWindow"
+
+/******************************************************************************
+ ** **
+ ** Win32 Clipboard type **
+ ** **
+ *****************************************************************************/
+#define kQ3ViewerClipboardFormat "QuickDraw 3D Metafile"
+/******************************************************************************
+ ** **
+ ** Return viewer version number **
+ ** **
+ *****************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQ3Status )
+Q3WinViewerGetVersion (unsigned long * majorRevision,
+ unsigned long * minorRevision);
+
+
+/******************************************************************************
+ ** **
+ ** Return viewer release version number **
+ ** (in 'vers' format - e.g. 0x01518000 ==> 1.5.1 release) **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Status )
+Q3WinViewerGetReleaseVersion (unsigned long * releaseRevision);
+
+
+/******************************************************************************
+ ** **
+ ** Creation and destruction **
+ ** Note that this is not a QuickDraw 3D object **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3ViewerObject )
+Q3WinViewerNew (HWND window,
+ const RECT * rect,
+ unsigned long flags);
+
+EXTERN_API_C( TQ3Status )
+Q3WinViewerDispose (TQ3ViewerObject viewer);
+
+
+/******************************************************************************
+ ** **
+ ** Functions to attach data to a WinViewer **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Status )
+Q3WinViewerUseFile (TQ3ViewerObject viewer,
+ HANDLE fileHandle);
+
+EXTERN_API_C( TQ3Status )
+Q3WinViewerUseData (TQ3ViewerObject viewer,
+ void * data,
+ unsigned long size);
+
+
+/******************************************************************************
+ ** **
+ ** Functions to write data out from the WinViewer **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Status )
+Q3WinViewerWriteFile (TQ3ViewerObject viewer,
+ HANDLE fileHandle);
+
+EXTERN_API_C( TQ3Status )
+Q3WinViewerWriteData (TQ3ViewerObject viewer,
+ void * data,
+ unsigned long dataSize,
+ unsigned long * actualDataSize);
+
+
+/******************************************************************************
+ ** **
+ ** Use this function to force the WinViewer to re-draw **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Status )
+Q3WinViewerDraw (TQ3ViewerObject viewer);
+
+EXTERN_API_C( TQ3Status )
+Q3WinViewerDrawContent (TQ3ViewerObject viewer);
+
+EXTERN_API_C( TQ3Status )
+Q3WinViewerDrawControlStrip (TQ3ViewerObject viewer);
+
+
+/******************************************************************************
+ ** **
+ ** Function used by the WinViewer to filter and handle events **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( BOOL )
+Q3WinViewerMouseDown (TQ3ViewerObject viewer,
+ long x,
+ long y);
+
+EXTERN_API_C( BOOL )
+Q3WinViewerContinueTracking (TQ3ViewerObject viewer,
+ long x,
+ long y);
+
+EXTERN_API_C( BOOL )
+Q3WinViewerMouseUp (TQ3ViewerObject viewer,
+ long x,
+ long y);
+
+
+/******************************************************************************
+ ** **
+ ** This function returns a Bitmap of the contents of the **
+ ** WinViewer's window. The application should dispose the Bitmap. **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( HBITMAP )
+Q3WinViewerGetBitmap (TQ3ViewerObject viewer);
+
+
+/******************************************************************************
+ ** **
+ ** Calls for dealing with Buttons **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Status )
+Q3WinViewerGetButtonRect (TQ3ViewerObject viewer,
+ unsigned long button,
+ RECT * rectangle);
+
+EXTERN_API_C( unsigned long )
+Q3WinViewerGetCurrentButton (TQ3ViewerObject viewer);
+
+EXTERN_API_C( TQ3Status )
+Q3WinViewerSetCurrentButton (TQ3ViewerObject viewer,
+ unsigned long button);
+
+
+/******************************************************************************
+ ** **
+ ** Functions to set/get the group to be displayed by the WinViewer. **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Status )
+Q3WinViewerUseGroup (TQ3ViewerObject viewer,
+ TQ3GroupObject group);
+
+EXTERN_API_C( TQ3GroupObject )
+Q3WinViewerGetGroup (TQ3ViewerObject viewer);
+
+
+/******************************************************************************
+ ** **
+ ** Functions to set/get the color used to clear the window **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Status )
+Q3WinViewerSetBackgroundColor (TQ3ViewerObject viewer,
+ TQ3ColorARGB * color);
+
+EXTERN_API_C( TQ3Status )
+Q3WinViewerGetBackgroundColor (TQ3ViewerObject viewer,
+ TQ3ColorARGB * color);
+
+
+/******************************************************************************
+ ** **
+ ** Getting/Setting a WinViewer's View object. **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3ViewObject )
+Q3WinViewerGetView (TQ3ViewerObject viewer);
+
+EXTERN_API_C( TQ3Status )
+Q3WinViewerRestoreView (TQ3ViewerObject viewer);
+
+
+/******************************************************************************
+ ** **
+ ** Calls for setting/getting WinViewer flags **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Status )
+Q3WinViewerSetFlags (TQ3ViewerObject viewer,
+ unsigned long flags);
+
+EXTERN_API_C( unsigned long )
+Q3WinViewerGetFlags (TQ3ViewerObject viewer);
+
+
+/******************************************************************************
+ ** **
+ ** Calls related to bounds/dimensions. Bounds is the size of **
+ ** the window. Dimensions can either be the Rect from the ViewHints **
+ ** or the current dimensions of the window (if you do a Set). **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Status )
+Q3WinViewerSetBounds (TQ3ViewerObject viewer,
+ RECT * bounds);
+
+EXTERN_API_C( TQ3Status )
+Q3WinViewerGetBounds (TQ3ViewerObject viewer,
+ RECT * bounds);
+
+EXTERN_API_C( TQ3Status )
+Q3WinViewerSetDimension (TQ3ViewerObject viewer,
+ unsigned long width,
+ unsigned long height);
+
+EXTERN_API_C( TQ3Status )
+Q3WinViewerGetDimension (TQ3ViewerObject viewer,
+ unsigned long * width,
+ unsigned long * height);
+
+EXTERN_API_C( TQ3Status )
+Q3WinViewerGetMinimumDimension (TQ3ViewerObject viewer,
+ unsigned long * width,
+ unsigned long * height);
+
+
+/******************************************************************************
+ ** **
+ ** Window related calls **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Status )
+Q3WinViewerSetWindow (TQ3ViewerObject viewer,
+ HWND window);
+
+EXTERN_API_C( HWND )
+Q3WinViewerGetWindow (TQ3ViewerObject viewer);
+
+EXTERN_API_C( TQ3ViewerObject )
+Q3WinViewerGetViewer (HWND theWindow);
+
+EXTERN_API_C( HWND )
+Q3WinViewerGetControlStrip (TQ3ViewerObject viewer);
+
+
+/******************************************************************************
+ ** **
+ ** Adjust Cursor provided for compatibility with Mac Viewer **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Boolean )
+Q3WinViewerAdjustCursor (TQ3ViewerObject viewer,
+ long x,
+ long y);
+
+EXTERN_API_C( TQ3Status )
+Q3WinViewerCursorChanged (TQ3ViewerObject viewer);
+
+
+/******************************************************************************
+ ** **
+ ** Returns the state of the WinViewer. See the constant defined at the **
+ ** top of this file. **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( unsigned long )
+Q3WinViewerGetState (TQ3ViewerObject viewer);
+
+
+/******************************************************************************
+ ** **
+ ** Clipboard utilities **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Status )
+Q3WinViewerClear (TQ3ViewerObject viewer);
+
+EXTERN_API_C( TQ3Status )
+Q3WinViewerCut (TQ3ViewerObject viewer);
+
+EXTERN_API_C( TQ3Status )
+Q3WinViewerCopy (TQ3ViewerObject viewer);
+
+EXTERN_API_C( TQ3Status )
+Q3WinViewerPaste (TQ3ViewerObject viewer);
+
+
+/******************************************************************************
+ ** **
+ ** Undo **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Status )
+Q3WinViewerUndo (TQ3ViewerObject viewer);
+
+EXTERN_API_C( TQ3Boolean )
+Q3WinViewerGetUndoString (TQ3ViewerObject viewer,
+ char * theString,
+ unsigned long stringSize,
+ unsigned long * actualSize);
+
+
+/******************************************************************************
+ ** **
+ ** New Camera Stuff **
+ ** **
+ *****************************************************************************/
+EXTERN_API_C( TQ3Status )
+Q3WinViewerGetCameraCount (TQ3ViewerObject viewer,
+ unsigned long * count);
+
+EXTERN_API_C( TQ3Status )
+Q3WinViewerSetCameraNumber (TQ3ViewerObject viewer,
+ unsigned long cameraNo);
+
+EXTERN_API_C( TQ3Status )
+Q3WinViewerSetCameraView (TQ3ViewerObject viewer,
+ TQ3ViewerCameraView viewType);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_OS_WIN32 */
+
+
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __QD3DWINVIEWER__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__QD3DWINVIEWER__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QD3DWINVIEWER__ */
+
diff --git a/include/qt/QDOffscreen.h b/include/qt/QDOffscreen.h
new file mode 100644
index 000000000..8a1df95d3
--- /dev/null
+++ b/include/qt/QDOffscreen.h
@@ -0,0 +1,256 @@
+/*
+ File: QDOffscreen.h
+
+ Contains: Quickdraw Offscreen GWorld Interfaces.
+
+ Version: Technology: Mac OS 8
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QDOFFSCREEN__
+#define __QDOFFSCREEN__
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ pixPurgeBit = 0,
+ noNewDeviceBit = 1,
+ useTempMemBit = 2,
+ keepLocalBit = 3,
+ useDistantHdwrMemBit = 4,
+ useLocalHdwrMemBit = 5,
+ pixelsPurgeableBit = 6,
+ pixelsLockedBit = 7,
+ mapPixBit = 16,
+ newDepthBit = 17,
+ alignPixBit = 18,
+ newRowBytesBit = 19,
+ reallocPixBit = 20,
+ clipPixBit = 28,
+ stretchPixBit = 29,
+ ditherPixBit = 30,
+ gwFlagErrBit = 31
+};
+
+enum {
+ pixPurge = 1L << pixPurgeBit,
+ noNewDevice = 1L << noNewDeviceBit,
+ useTempMem = 1L << useTempMemBit,
+ keepLocal = 1L << keepLocalBit,
+ useDistantHdwrMem = 1L << useDistantHdwrMemBit,
+ useLocalHdwrMem = 1L << useLocalHdwrMemBit,
+ pixelsPurgeable = 1L << pixelsPurgeableBit,
+ pixelsLocked = 1L << pixelsLockedBit,
+ kAllocDirectDrawSurface = 1L << 14,
+ mapPix = 1L << mapPixBit,
+ newDepth = 1L << newDepthBit,
+ alignPix = 1L << alignPixBit,
+ newRowBytes = 1L << newRowBytesBit,
+ reallocPix = 1L << reallocPixBit,
+ clipPix = 1L << clipPixBit,
+ stretchPix = 1L << stretchPixBit,
+ ditherPix = 1L << ditherPixBit,
+ gwFlagErr = 1L << gwFlagErrBit
+};
+
+typedef unsigned long GWorldFlags;
+/* Type definition of a GWorldPtr */
+typedef CGrafPtr GWorldPtr;
+EXTERN_API( QDErr )
+NewGWorld (GWorldPtr * offscreenGWorld,
+ short PixelDepth,
+ const Rect * boundsRect,
+ CTabHandle cTable, /* can be NULL */
+ GDHandle aGDevice, /* can be NULL */
+ GWorldFlags flags) FOURWORDINLINE(0x203C, 0x0016, 0x0000, 0xAB1D);
+
+/* GDevice attribute bits for Carbon and QuickTime 3.0*/
+enum {
+ deviceIsIndirect = (1L << 0),
+ deviceNeedsLock = (1L << 1),
+ deviceIsStatic = (1L << 2),
+ deviceIsExternalBuffer = (1L << 3),
+ deviceIsDDSurface = (1L << 4),
+ deviceIsDCISurface = (1L << 5),
+ deviceIsGDISurface = (1L << 6),
+ deviceIsAScreen = (1L << 7),
+ deviceIsOverlaySurface = (1L << 8)
+};
+
+#if TARGET_OS_WIN32
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void *)
+GetGDeviceSurface (GDHandle gdh);
+
+EXTERN_API( unsigned long )
+GetGDeviceAttributes (GDHandle gdh);
+
+/* to allocate non-mac-rgb GWorlds use QTNewGWorld (ImageCompression.h) */
+EXTERN_API( QDErr )
+NewGWorldFromHBITMAP (GWorldPtr * offscreenGWorld,
+ CTabHandle cTable,
+ GDHandle aGDevice,
+ GWorldFlags flags,
+ void * newHBITMAP,
+ void * newHDC);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_OS_WIN32 */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( QDErr )
+NewGWorldFromPtr (GWorldPtr * offscreenGWorld,
+ unsigned long PixelFormat,
+ const Rect * boundsRect,
+ CTabHandle cTable,
+ GDHandle aGDevice,
+ GWorldFlags flags,
+ Ptr newBuffer,
+ long rowBytes);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( Boolean )
+LockPixels (PixMapHandle pm) FOURWORDINLINE(0x203C, 0x0004, 0x0001, 0xAB1D);
+
+EXTERN_API( void )
+UnlockPixels (PixMapHandle pm) FOURWORDINLINE(0x203C, 0x0004, 0x0002, 0xAB1D);
+
+EXTERN_API( GWorldFlags )
+UpdateGWorld (GWorldPtr * offscreenGWorld,
+ short pixelDepth,
+ const Rect * boundsRect,
+ CTabHandle cTable,
+ GDHandle aGDevice, /* can be NULL */
+ GWorldFlags flags) FOURWORDINLINE(0x203C, 0x0016, 0x0003, 0xAB1D);
+
+EXTERN_API( void )
+DisposeGWorld (GWorldPtr offscreenGWorld) FOURWORDINLINE(0x203C, 0x0004, 0x0004, 0xAB1D);
+
+EXTERN_API( void )
+GetGWorld (CGrafPtr * port,
+ GDHandle * gdh) FOURWORDINLINE(0x203C, 0x0008, 0x0005, 0xAB1D);
+
+EXTERN_API( void )
+SetGWorld (CGrafPtr port,
+ GDHandle gdh) FOURWORDINLINE(0x203C, 0x0008, 0x0006, 0xAB1D);
+
+EXTERN_API( void )
+CTabChanged (CTabHandle ctab) FOURWORDINLINE(0x203C, 0x0004, 0x0007, 0xAB1D);
+
+EXTERN_API( void )
+PixPatChanged (PixPatHandle ppat) FOURWORDINLINE(0x203C, 0x0004, 0x0008, 0xAB1D);
+
+EXTERN_API( void )
+PortChanged (GrafPtr port) FOURWORDINLINE(0x203C, 0x0004, 0x0009, 0xAB1D);
+
+EXTERN_API( void )
+GDeviceChanged (GDHandle gdh) FOURWORDINLINE(0x203C, 0x0004, 0x000A, 0xAB1D);
+
+EXTERN_API( void )
+AllowPurgePixels (PixMapHandle pm) FOURWORDINLINE(0x203C, 0x0004, 0x000B, 0xAB1D);
+
+EXTERN_API( void )
+NoPurgePixels (PixMapHandle pm) FOURWORDINLINE(0x203C, 0x0004, 0x000C, 0xAB1D);
+
+EXTERN_API( GWorldFlags )
+GetPixelsState (PixMapHandle pm) FOURWORDINLINE(0x203C, 0x0004, 0x000D, 0xAB1D);
+
+EXTERN_API( void )
+SetPixelsState (PixMapHandle pm,
+ GWorldFlags state) FOURWORDINLINE(0x203C, 0x0008, 0x000E, 0xAB1D);
+
+EXTERN_API( Ptr )
+GetPixBaseAddr (PixMapHandle pm) FOURWORDINLINE(0x203C, 0x0004, 0x000F, 0xAB1D);
+
+EXTERN_API( long )
+GetPixRowBytes (PixMapHandle pm) FOURWORDINLINE(0x203C, 0x0004, 0x0018, 0xAB1D);
+
+EXTERN_API( QDErr )
+NewScreenBuffer (const Rect * globalRect,
+ Boolean purgeable,
+ GDHandle * gdh,
+ PixMapHandle * offscreenPixMap) FOURWORDINLINE(0x203C, 0x000E, 0x0010, 0xAB1D);
+
+EXTERN_API( void )
+DisposeScreenBuffer (PixMapHandle offscreenPixMap) FOURWORDINLINE(0x203C, 0x0004, 0x0011, 0xAB1D);
+
+EXTERN_API( GDHandle )
+GetGWorldDevice (GWorldPtr offscreenGWorld) FOURWORDINLINE(0x203C, 0x0004, 0x0012, 0xAB1D);
+
+EXTERN_API( Boolean )
+QDDone (GrafPtr port) FOURWORDINLINE(0x203C, 0x0004, 0x0013, 0xAB1D);
+
+EXTERN_API( long )
+OffscreenVersion (void) TWOWORDINLINE(0x7014, 0xAB1D);
+
+EXTERN_API( QDErr )
+NewTempScreenBuffer (const Rect * globalRect,
+ Boolean purgeable,
+ GDHandle * gdh,
+ PixMapHandle * offscreenPixMap) FOURWORDINLINE(0x203C, 0x000E, 0x0015, 0xAB1D);
+
+EXTERN_API( Boolean )
+PixMap32Bit (PixMapHandle pmHandle) FOURWORDINLINE(0x203C, 0x0004, 0x0016, 0xAB1D);
+
+EXTERN_API( PixMapHandle )
+GetGWorldPixMap (GWorldPtr offscreenGWorld) FOURWORDINLINE(0x203C, 0x0004, 0x0017, 0xAB1D);
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QDOFFSCREEN__ */
+
diff --git a/include/qt/QTContentRestrictions.h b/include/qt/QTContentRestrictions.h
new file mode 100644
index 000000000..729a2429c
--- /dev/null
+++ b/include/qt/QTContentRestrictions.h
@@ -0,0 +1,82 @@
+/*
+ File: QTContentRestrictions.h
+
+ Contains: QuickTime Interfaces.
+
+ Version: Technology: QuickTime 6.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1990-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+/*****
+ Content Restrictions
+*****/
+#ifndef __QTCONTENTRESTRICTIONS__
+#define __QTCONTENTRESTRICTIONS__
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ kQTRestrictionClassSave = FOUR_CHAR_CODE('save'),
+ kQTRestrictionSaveDontAddMovieResource = (1L << 0),
+ kQTRestrictionSaveDontFlatten = (1L << 1),
+ kQTRestrictionSaveDontExport = (1L << 2),
+ kQTRestrictionSaveDontExtract = (1L << 3), /* don't allow any form of extraction of content*/
+ kQTRestrictionClassEdit = FOUR_CHAR_CODE('edit'),
+ kQTRestrictionEditDontCopy = (1L << 0), /* disable copy */
+ kQTRestrictionEditDontCut = (1L << 1), /* disable cut */
+ kQTRestrictionEditDontPaste = (1L << 2), /* disable paste */
+ kQTRestrictionEditDontClear = (1L << 3), /* disable clear*/
+ kQTRestrictionEditDontModify = (1L << 4), /* don't allow modification of content*/
+ kQTRestrictionEditDontExtract = (1L << 5) /* don't allow any form of extraction of content*/
+};
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QTCONTENTRESTRICTIONS__ */
+
diff --git a/include/qt/QTML.h b/include/qt/QTML.h
new file mode 100644
index 000000000..7ffe38e01
--- /dev/null
+++ b/include/qt/QTML.h
@@ -0,0 +1,309 @@
+/*
+ File: QTML.h
+
+ Contains: QuickTime Cross-platform specific interfaces
+
+ Version: Technology: QuickTime 4.1
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1997-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QTML__
+#define __QTML__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MACMEMORY__
+#include "MacMemory.h"
+#endif
+
+#ifndef __MACWINDOWS__
+#include "MacWindows.h"
+#endif
+
+#ifndef __OSUTILS__
+#include "OSUtils.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+EXTERN_API( void )
+QTMLYieldCPU (void);
+
+/* QTMLYieldCPUTime flags*/
+enum {
+ kQTMLHandlePortEvents = (1L << 0) /* ask for event handling during the yield*/
+};
+
+EXTERN_API( void )
+QTMLYieldCPUTime (long milliSeconds,
+ unsigned long flags);
+
+typedef struct OpaqueQTMLMutex* QTMLMutex;
+#if !(TARGET_OS_MAC && TARGET_API_MAC_OS8)
+typedef struct OpaqueQTMLSyncVar* QTMLSyncVar;
+typedef QTMLSyncVar * QTMLSyncVarPtr;
+/* InitializeQTML flags*/
+enum {
+ kInitializeQTMLNoSoundFlag = (1L << 0), /* flag for requesting no sound when calling InitializeQTML*/
+ kInitializeQTMLUseGDIFlag = (1L << 1), /* flag for requesting GDI when calling InitializeQTML*/
+ kInitializeQTMLDisableDirectSound = (1L << 2), /* disables QTML's use of DirectSound*/
+ kInitializeQTMLUseExclusiveFullScreenModeFlag = (1L << 3), /* later than QTML 3.0: qtml starts up in exclusive full screen mode*/
+ kInitializeQTMLDisableDDClippers = (1L << 4) /* flag for requesting QTML not to use DirectDraw clipper objects; QTML 5.0 and later*/
+};
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+InitializeQTML (long flag);
+
+EXTERN_API( void )
+TerminateQTML (void);
+
+
+/* CreatePortAssociation flags*/
+#endif /* CALL_NOT_IN_CARBON */
+
+enum {
+ kQTMLNoIdleEvents = (1L << 1) /* ask for a non-auto-idled port to be created*/
+};
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( GrafPtr )
+CreatePortAssociation (void * theWnd,
+ Ptr storage,
+ long flags);
+
+EXTERN_API( void )
+DestroyPortAssociation (CGrafPtr cgp);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( void )
+QTMLGrabMutex (QTMLMutex mu);
+
+EXTERN_API( Boolean )
+QTMLTryGrabMutex (QTMLMutex mu);
+
+EXTERN_API( void )
+QTMLReturnMutex (QTMLMutex mu);
+
+EXTERN_API( QTMLMutex )
+QTMLCreateMutex (void);
+
+EXTERN_API( void )
+QTMLDestroyMutex (QTMLMutex mu);
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( QTMLSyncVarPtr )
+QTMLCreateSyncVar (void);
+
+EXTERN_API( void )
+QTMLDestroySyncVar (QTMLSyncVarPtr p);
+
+EXTERN_API( long )
+QTMLTestAndSetSyncVar (QTMLSyncVarPtr sync);
+
+EXTERN_API( void )
+QTMLWaitAndSetSyncVar (QTMLSyncVarPtr sync);
+
+EXTERN_API( void )
+QTMLResetSyncVar (QTMLSyncVarPtr sync);
+
+
+EXTERN_API( void )
+InitializeQHdr (QHdr * qhdr);
+
+EXTERN_API( void )
+TerminateQHdr (QHdr * qhdr);
+
+
+EXTERN_API( void )
+QTMLAcquireWindowList (void);
+
+EXTERN_API( void )
+QTMLReleaseWindowList (void);
+
+/*
+ These routines are here to support "interrupt level" code
+ These are dangerous routines, only use if you know what you are doing.
+*/
+
+EXTERN_API( long )
+QTMLRegisterInterruptSafeThread (unsigned long threadID,
+ void * threadInfo);
+
+EXTERN_API( long )
+QTMLUnregisterInterruptSafeThread (unsigned long threadID);
+
+
+EXTERN_API( long )
+NativeEventToMacEvent (void * nativeEvent,
+ EventRecord * macEvent);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if TARGET_OS_WIN32
+#if CALL_NOT_IN_CARBON
+EXTERN_API( long )
+WinEventToMacEvent (void * winMsg,
+ EventRecord * macEvent);
+
+#define WinEventToMacEvent NativeEventToMacEvent
+EXTERN_API( Boolean )
+IsTaskBarVisible (void);
+
+EXTERN_API( void )
+ShowHideTaskBar (Boolean showIt);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+enum {
+ kDDSurfaceLocked = (1L << 0),
+ kDDSurfaceStatic = (1L << 1)
+};
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+QTGetDDObject (void ** lpDDObject);
+
+EXTERN_API( OSErr )
+QTSetDDObject (void * lpNewDDObject);
+
+EXTERN_API( OSErr )
+QTSetDDPrimarySurface (void * lpNewDDSurface,
+ unsigned long flags);
+
+
+EXTERN_API( OSErr )
+QTMLGetVolumeRootPath (char * fullPath,
+ char * volumeRootPath,
+ unsigned long volumeRootLen);
+
+
+EXTERN_API( void )
+QTMLSetWindowWndProc (WindowRef theWindow,
+ void * windowProc);
+
+EXTERN_API( void *)
+QTMLGetWindowWndProc (WindowRef theWindow);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_OS_WIN32 */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+QTMLGetCanonicalPathName (char * inName,
+ char * outName,
+ unsigned long outLen);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+enum {
+ kFullNativePath = 0,
+ kFileNameOnly = (1 << 0),
+ kDirectoryPathOnly = (1 << 1),
+ kUFSFullPathName = (1 << 2),
+ kTryVDIMask = (1 << 3), /* Used in NativePathNameToFSSpec to specify to search VDI mountpoints*/
+ kFullPathSpecifiedMask = (1 << 4) /* the passed in name is a fully qualified full path*/
+};
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+FSSpecToNativePathName (const FSSpec * inFile,
+ char * outName,
+ unsigned long outLen,
+ long flags);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+enum {
+ kErrorIfFileNotFound = 1L << 31
+};
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+NativePathNameToFSSpec (char * inName,
+ FSSpec * outFile,
+ long flags);
+
+EXTERN_API( OSErr )
+QTGetAliasInfo (AliasHandle alias,
+ AliasInfoType index,
+ char * outBuf,
+ long bufLen,
+ long * outLen,
+ unsigned long flags);
+
+/*%if QUICKTIME_ONLY*/
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+
+#define QTMLGrabMutex(MU)
+#define QTMLTryGrabMutex(MU) true
+#define QTMLReturnMutex(MU)
+#define QTMLCreateMutex() ((struct OpaqueQTMLMutex*) 1) /* nonzero, since zero indicates creation failure */
+#define QTMLDestroyMutex(MU)
+
+/*%endif*/
+
+#endif /* !(TARGET_OS_MAC && TARGET_API_MAC_OS8) */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QTML__ */
+
diff --git a/include/qt/QTSMovie.h b/include/qt/QTSMovie.h
new file mode 100644
index 000000000..2ca8c13e6
--- /dev/null
+++ b/include/qt/QTSMovie.h
@@ -0,0 +1,205 @@
+/*
+ File: QTSMovie.h
+
+ Contains: QuickTime Interfaces.
+
+ Version: Technology: QuickTime 6.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1990-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QTSMOVIE__
+#define __QTSMOVIE__
+
+#ifndef __COMPONENTS__
+#include "Components.h"
+#endif
+
+#ifndef __MOVIES__
+#include "Movies.h"
+#endif
+
+#ifndef __QUICKTIMESTREAMING__
+#include "QuickTimeStreaming.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ kQTSStreamMediaType = FOUR_CHAR_CODE('strm')
+};
+
+
+struct QTSSampleDescription {
+ long descSize;
+ long dataFormat;
+ long resvd1; /* set to 0*/
+ short resvd2; /* set to 0*/
+ short dataRefIndex;
+ UInt32 version;
+ UInt32 resvd3; /* set to 0*/
+ SInt32 flags;
+ /* qt atoms follow:*/
+ /* long size, long type, some data*/
+ /* repeat as necessary*/
+};
+typedef struct QTSSampleDescription QTSSampleDescription;
+typedef QTSSampleDescription * QTSSampleDescriptionPtr;
+typedef QTSSampleDescriptionPtr * QTSSampleDescriptionHandle;
+enum {
+ kQTSSampleDescriptionVersion1 = 1L
+};
+
+enum {
+ kQTSDefaultMediaTimeScale = 600L
+};
+
+/* sample description flags*/
+enum {
+ kQTSSampleDescPassSampleDataAsHandleFlag = 0x00000001
+};
+
+
+/*============================================================================
+ Stream Media Handler
+============================================================================*/
+/*-----------------------------------------
+ Info Selectors
+-----------------------------------------*/
+/* all indexes start at 1 */
+
+enum {
+ kQTSMediaPresentationInfo = FOUR_CHAR_CODE('pres'), /* QTSMediaPresentationParams* */
+ kQTSMediaNotificationInfo = FOUR_CHAR_CODE('noti'), /* QTSMediaNotificationParams* */
+ kQTSMediaTotalDataRateInfo = FOUR_CHAR_CODE('dtrt'), /* UInt32*, bits/sec */
+ kQTSMediaLostPercentInfo = FOUR_CHAR_CODE('lspc'), /* Fixed* */
+ kQTSMediaNumStreamsInfo = FOUR_CHAR_CODE('nstr'), /* UInt32* */
+ kQTSMediaIndSampleDescriptionInfo = FOUR_CHAR_CODE('isdc') /* QTSMediaIndSampleDescriptionParams* */
+};
+
+
+
+struct QTSMediaPresentationParams {
+ QTSPresentation presentationID;
+};
+typedef struct QTSMediaPresentationParams QTSMediaPresentationParams;
+
+struct QTSMediaNotificationParams {
+ QTSNotificationUPP notificationProc;
+ void * notificationRefCon;
+ SInt32 flags;
+};
+typedef struct QTSMediaNotificationParams QTSMediaNotificationParams;
+
+struct QTSMediaIndSampleDescriptionParams {
+ SInt32 index;
+ OSType returnedMediaType;
+ SampleDescriptionHandle returnedSampleDescription;
+};
+typedef struct QTSMediaIndSampleDescriptionParams QTSMediaIndSampleDescriptionParams;
+/*-----------------------------------------
+ QTS Media Handler Selectors
+-----------------------------------------*/
+enum {
+ kQTSMediaSetInfoSelect = 0x0100,
+ kQTSMediaGetInfoSelect = 0x0101,
+ kQTSMediaSetIndStreamInfoSelect = 0x0102,
+ kQTSMediaGetIndStreamInfoSelect = 0x0103
+};
+
+/*-----------------------------------------
+ QTS Media Handler functions
+-----------------------------------------*/
+EXTERN_API( ComponentResult )
+QTSMediaSetInfo (MediaHandler mh,
+ OSType inSelector,
+ void * ioParams) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0100, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTSMediaGetInfo (MediaHandler mh,
+ OSType inSelector,
+ void * ioParams) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0101, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTSMediaSetIndStreamInfo (MediaHandler mh,
+ SInt32 inIndex,
+ OSType inSelector,
+ void * ioParams) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0102, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTSMediaGetIndStreamInfo (MediaHandler mh,
+ SInt32 inIndex,
+ OSType inSelector,
+ void * ioParams) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0103, 0x7000, 0xA82A);
+
+
+/*============================================================================
+ Hint Media Handler
+============================================================================*/
+enum {
+ kQTSHintMediaType = FOUR_CHAR_CODE('hint')
+};
+
+enum {
+ kQTSHintTrackReference = FOUR_CHAR_CODE('hint')
+};
+
+
+
+
+
+/* MixedMode ProcInfo constants for component calls */
+enum {
+ uppQTSMediaSetInfoProcInfo = 0x00000FF0,
+ uppQTSMediaGetInfoProcInfo = 0x00000FF0,
+ uppQTSMediaSetIndStreamInfoProcInfo = 0x00003FF0,
+ uppQTSMediaGetIndStreamInfoProcInfo = 0x00003FF0
+};
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QTSMOVIE__ */
+
diff --git a/include/qt/QTStreamingComponents.h b/include/qt/QTStreamingComponents.h
new file mode 100644
index 000000000..4b73cbd53
--- /dev/null
+++ b/include/qt/QTStreamingComponents.h
@@ -0,0 +1,1536 @@
+/*
+ File: QTStreamingComponents.h
+
+ Contains: QuickTime Interfaces.
+
+ Version: Technology: QuickTime 6.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1990-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QTSTREAMINGCOMPONENTS__
+#define __QTSTREAMINGCOMPONENTS__
+
+#ifndef __COMPONENTS__
+#include "Components.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+#ifndef __MOVIES__
+#include "Movies.h"
+#endif
+
+#ifndef __QUICKTIMESTREAMING__
+#include "QuickTimeStreaming.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*============================================================================
+ Stream Sourcer
+============================================================================*/
+enum {
+ kQTSSourcerType = FOUR_CHAR_CODE('srcr')
+};
+
+typedef ComponentInstance QTSSourcer;
+enum {
+ kQTSSGChannelSourcerType = FOUR_CHAR_CODE('sgch'),
+ kQTSMovieTrackSourcerType = FOUR_CHAR_CODE('trak'),
+ kQTSPushDataSourcerType = FOUR_CHAR_CODE('push')
+};
+
+/* flags for sourcer data */
+enum {
+ kQTSSourcerDataFlag_SyncSample = 0x00000001,
+ kQTSPushDataSourcerFlag_SampleTimeIsValid = (long)0x80000000
+};
+
+
+enum {
+ kQTSSourcerInitParamsVersion1 = 1
+};
+
+
+struct QTSSourcerInitParams {
+ SInt32 version;
+ SInt32 flags;
+ OSType dataType;
+ void * data;
+ UInt32 dataLength;
+};
+typedef struct QTSSourcerInitParams QTSSourcerInitParams;
+EXTERN_API_C( OSErr )
+QTSNewSourcer (void * params,
+ const QTSSourcerInitParams * inInitParams,
+ SInt32 inFlags,
+ ComponentInstance * outSourcer);
+
+/* info selectors for sourcers - get and set */
+enum {
+ kQTSInfo_Track = FOUR_CHAR_CODE('trak'), /* QTSTrackParams* */
+ kQTSInfo_Loop = FOUR_CHAR_CODE('loop'), /* QTSLoopParams* */
+ kQTSInfo_SourcerTiming = FOUR_CHAR_CODE('stim'), /* QTSSourcerTimingParams* */
+ kQTSInfo_TargetFrameRate = FOUR_CHAR_CODE('tfps'), /* Fixed * in frames per second */
+ kQTSInfo_PushData = FOUR_CHAR_CODE('push'), /* QTSPushDataParams* */
+ kQTSInfo_SourcerCallbackProc = FOUR_CHAR_CODE('scbp'), /* QTSSourcerCallbackProcParams* */
+ kQTSInfo_TargetDataRate = FOUR_CHAR_CODE('tdrt'), /* UInt32 * in bytes per second */
+ kQTSInfo_AudioAutoGainOnOff = FOUR_CHAR_CODE('agc '), /* Boolean* - error if unavailable*/
+ kQTSInfo_AudioGain = FOUR_CHAR_CODE('gain'), /* Fixed* kFixed1 is unity gain */
+ kQTSInfo_CroppedInputRect = FOUR_CHAR_CODE('crpr'), /* Rect* - defined relative to kQTSInfo_FullInputRect below */
+ kQTSInfo_SpatialSettings = FOUR_CHAR_CODE('sptl'), /* pointer to SCSpatialSettings struct*/
+ kQTSInfo_TemporalSettings = FOUR_CHAR_CODE('tprl'), /* pointer to SCTemporalSettings struct*/
+ kQTSInfo_DataRateSettings = FOUR_CHAR_CODE('drat'), /* pointer to SCDataRateSettings struct*/
+ kQTSInfo_CodecFlags = FOUR_CHAR_CODE('cflg'), /* pointer to CodecFlags*/
+ kQTSInfo_CodecSettings = FOUR_CHAR_CODE('cdec'), /* pointer to Handle*/
+ kQTSInfo_ForceKeyValue = FOUR_CHAR_CODE('ksim'), /* pointer to long*/
+ kQTSInfo_SoundSampleRate = FOUR_CHAR_CODE('ssrt'), /* pointer to UnsignedFixed*/
+ kQTSInfo_SoundSampleSize = FOUR_CHAR_CODE('ssss'), /* pointer to short*/
+ kQTSInfo_SoundChannelCount = FOUR_CHAR_CODE('sscc'), /* pointer to short*/
+ kQTSInfo_SoundCompression = FOUR_CHAR_CODE('ssct'), /* pointer to OSType*/
+ kQTSInfo_CompressionList = FOUR_CHAR_CODE('ctyl'), /* pointer to OSType Handle*/
+ kQTSInfo_VideoHue = FOUR_CHAR_CODE('hue '), /* UInt16* */
+ kQTSInfo_VideoSaturation = FOUR_CHAR_CODE('satr'), /* UInt16* */
+ kQTSInfo_VideoContrast = FOUR_CHAR_CODE('trst'), /* UInt16* */
+ kQTSInfo_VideoBrightness = FOUR_CHAR_CODE('brit'), /* UInt16* */
+ kQTSInfo_VideoSharpness = FOUR_CHAR_CODE('shrp'), /* UInt16* */
+ kQTSInfo_TimeScale = FOUR_CHAR_CODE('scal'), /* UInt32* */
+ kQTSInfo_SGChannelDeviceName = FOUR_CHAR_CODE('innm'), /* Handle* */
+ kQTSInfo_SGChannelDeviceList = FOUR_CHAR_CODE('srdl'), /* SGDeviceList* */
+ kQTSInfo_SGChannelDeviceInput = FOUR_CHAR_CODE('sdii'), /* short* */
+ kQTSInfo_SGChannelSettings = FOUR_CHAR_CODE('sesg'), /* QTSSGChannelSettingsParams */
+ kQTSInfo_PreviewWhileRecordingMode = FOUR_CHAR_CODE('srpr'), /* Boolean* */
+ kQTSInfo_CompressionParams = FOUR_CHAR_CODE('sccp') /* QTAtomContainer* */
+};
+
+/* info selectors for sourcers - get only*/
+enum {
+ kQTSInfo_SGChannel = FOUR_CHAR_CODE('sgch'), /* SGChannel* */
+ kQTSInfo_SGChannelInputName = FOUR_CHAR_CODE('srnm'), /* Handle* */
+ kQTSInfo_FullInputRect = FOUR_CHAR_CODE('fulr') /* Rect* */
+};
+
+/* loop flags */
+enum {
+ kQTSLoopFlag_Loop = 0x00000001
+};
+
+enum {
+ kQTSLoopParamsVersion1 = 1
+};
+
+
+struct QTSLoopParams {
+ SInt32 version;
+ SInt32 flags;
+ SInt32 loopFlags;
+ SInt32 flagsMask;
+ SInt32 numLoops;
+};
+typedef struct QTSLoopParams QTSLoopParams;
+enum {
+ kQTSTrackParamsVersion1 = 1
+};
+
+
+struct QTSTrackParams {
+ SInt32 version;
+ SInt32 flags;
+ Track track;
+ TimeValue64 trackStartOffset; /* to start other than at the beginning otherwise set to 0*/
+ TimeValue64 duration; /* to limit the duration otherwise set to 0*/
+ QTSLoopParams * loopParams; /* set to NULL if not using; default is no looping */
+};
+typedef struct QTSTrackParams QTSTrackParams;
+enum {
+ kQTSSourcerTimingParamsVersion1 = 1
+};
+
+
+struct QTSSourcerTimingParams {
+ SInt32 version;
+ SInt32 flags;
+ TimeScale timeScale;
+ TimeValue64 presentationStartTime;
+ TimeValue64 presentationEndTime;
+ TimeValue64 presentationCurrentTime;
+ TimeValue64 localStartTime;
+ TimeValue64 localEndTime;
+ TimeValue64 localCurrentTime;
+};
+typedef struct QTSSourcerTimingParams QTSSourcerTimingParams;
+enum {
+ kQTSPushDataParamsVersion1 = 1
+};
+
+enum {
+ kQTSPushDataFlag_SampleTimeIsValid = 0x00000001,
+ kQTSPushDataFlag_DurationIsValid = 0x00000002
+};
+
+
+struct QTSPushDataParams {
+ SInt32 version;
+ SInt32 flags;
+ SampleDescriptionHandle sampleDescription; /* caller owns the handle */
+ UInt32 sampleDescSeed;
+ TimeValue64 sampleTime; /* also set flag if you set this */
+ TimeValue64 duration; /* also set flag if you set this */
+ UInt32 dataLength;
+ void * dataPtr; /* this does not have to be a real macintosh Ptr */
+};
+typedef struct QTSPushDataParams QTSPushDataParams;
+enum {
+ kQTSSourcerCallbackProcParamsVersion1 = 1
+};
+
+
+
+struct QTSSourcerCallbackProcParams {
+ SInt32 version;
+ SInt32 flags;
+ QTSNotificationUPP proc;
+ void * refCon;
+};
+typedef struct QTSSourcerCallbackProcParams QTSSourcerCallbackProcParams;
+/* track sourcer callback selectors*/
+enum {
+ kQTSSourcerCallback_Done = FOUR_CHAR_CODE('done') /* QTSSourcerDoneParams* */
+};
+
+
+/* push data sourcer callback selectors*/
+enum {
+ kQTSPushDataSourcerCallback_HasCharacteristic = 0x050D, /* QTSPushDataHasCharacteristicParams* */
+ kQTSPushDataSourcerCallback_SetInfo = 0x0507, /* QTSPushDataInfoParams* */
+ kQTSPushDataSourcerCallback_GetInfo = 0x0508 /* QTSPushDataInfoParams* */
+};
+
+
+struct QTSPushDataHasCharacteristicParams {
+ SInt32 version;
+ SInt32 flags;
+ OSType characteristic;
+ Boolean returnedHasIt;
+ char reserved1;
+ char reserved2;
+ char reserved3;
+};
+typedef struct QTSPushDataHasCharacteristicParams QTSPushDataHasCharacteristicParams;
+
+struct QTSPushDataInfoParams {
+ SInt32 version;
+ SInt32 flags;
+ OSType selector;
+ void * ioParams;
+};
+typedef struct QTSPushDataInfoParams QTSPushDataInfoParams;
+enum {
+ kQTSSourcerDoneParamsVersion1 = 1
+};
+
+
+struct QTSSourcerDoneParams {
+ SInt32 version;
+ SInt32 flags;
+ ComponentInstance sourcer;
+};
+typedef struct QTSSourcerDoneParams QTSSourcerDoneParams;
+
+struct QTSSGChannelSettingsParams {
+ UserData settings;
+ SInt32 flags;
+};
+typedef struct QTSSGChannelSettingsParams QTSSGChannelSettingsParams;
+
+
+
+
+/*-----------------------------------------
+ Stream Sourcer Selectors
+-----------------------------------------*/
+enum {
+ kQTSSourcerInitializeSelect = 0x0500,
+ kQTSSourcerSetEnableSelect = 0x0503,
+ kQTSSourcerGetEnableSelect = 0x0504,
+ kQTSSourcerSetInfoSelect = 0x0507,
+ kQTSSourcerGetInfoSelect = 0x0508,
+ kQTSSourcerSetTimeScaleSelect = 0x050E,
+ kQTSSourcerGetTimeScaleSelect = 0x050F,
+ kQTSSourcerIdleSelect = 0x0516
+};
+
+/*-----------------------------------------
+ Stream Sourcer Prototypes
+-----------------------------------------*/
+EXTERN_API( ComponentResult )
+QTSSourcerInitialize (QTSSourcer inSourcer,
+ const QTSSourcerInitParams * inInitParams) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0500, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTSSourcerIdle (QTSSourcer inSourcer,
+ const TimeValue64 * inTime,
+ SInt32 inFlags,
+ SInt32 * outFlags) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0516, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTSSourcerSetEnable (QTSSourcer inSourcer,
+ Boolean inEnableMode,
+ SInt32 inFlags) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0503, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTSSourcerGetEnable (QTSSourcer inSourcer,
+ Boolean * outEnableMode,
+ SInt32 inFlags) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0504, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTSSourcerSetTimeScale (QTSSourcer inSourcer,
+ TimeScale inTimeScale) FIVEWORDINLINE(0x2F3C, 0x0004, 0x050E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTSSourcerGetTimeScale (QTSSourcer inSourcer,
+ TimeScale * outTimeScale) FIVEWORDINLINE(0x2F3C, 0x0004, 0x050F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTSSourcerSetInfo (QTSSourcer inSourcer,
+ OSType inSelector,
+ void * ioParams) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0507, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTSSourcerGetInfo (QTSSourcer inSourcer,
+ OSType inSelector,
+ void * ioParams) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0508, 0x7000, 0xA82A);
+
+
+enum {
+ kQTSInfo_InputDeviceName = FOUR_CHAR_CODE('innm'), /* Handle* */
+ kQTSInfo_InputSourceName = FOUR_CHAR_CODE('srnm') /* Handle* */
+};
+
+
+
+
+/*============================================================================
+ Stream Handler
+============================================================================*/
+
+/*
+ Server edits are only valid for the current chunk
+*/
+
+struct SHServerEditParameters {
+ UInt32 version;
+ Fixed editRate;
+ TimeValue64 dataStartTime_mediaAxis;
+ TimeValue64 dataEndTime_mediaAxis;
+};
+typedef struct SHServerEditParameters SHServerEditParameters;
+enum {
+ kSHNoChunkDispatchFlags = 0,
+ kSHChunkFlagSyncSample = 1 << 2,
+ kSHChunkFlagDataLoss = 1 << 4,
+ kSHChunkFlagExtended = 1 << 5
+};
+
+
+struct SHChunkRecord {
+ UInt32 version;
+ long reserved1;
+ SInt32 flags;
+ UInt32 dataSize;
+ UInt8 * dataPtr;
+ long reserved2;
+ long reserved3;
+ TimeValue64 presentationTime;
+
+ long reserved4;
+ long reserved5;
+ const SHServerEditParameters * serverEditParameters;
+ long reserved6;
+ long reserved7;
+};
+typedef struct SHChunkRecord SHChunkRecord;
+enum {
+ kSHNumExtendedDataLongs = 10
+};
+
+enum {
+ kSHExtendedChunkFlag_HasSampleCount = 1 << 0,
+ kSHExtendedChunkFlag_HasFrameLengths = 1 << 1
+};
+
+
+struct SHExtendedChunkRecord {
+ SHChunkRecord chunk;
+ SInt32 extendedFlags;
+ SInt32 extendedData[10];
+};
+typedef struct SHExtendedChunkRecord SHExtendedChunkRecord;
+
+/*============================================================================
+ RTP Components
+============================================================================*/
+
+typedef UInt32 RTPSSRC;
+enum {
+ kRTPInvalidSSRC = 0
+};
+
+
+/* RTP standard content encodings for audio */
+enum {
+ kRTPPayload_PCMU = 0, /* 8kHz PCM mu-law mono */
+ kRTPPayload_1016 = 1, /* 8kHz CELP (Fed Std 1016) mono */
+ kRTPPayload_G721 = 2, /* 8kHz G.721 ADPCM mono */
+ kRTPPayload_GSM = 3, /* 8kHz GSM mono */
+ kRTPPayload_G723 = 4, /* 8kHz G.723 ADPCM mono */
+ kRTPPayload_DVI_8 = 5, /* 8kHz Intel DVI ADPCM mono */
+ kRTPPayload_DVI_16 = 6, /* 16kHz Intel DVI ADPCM mono */
+ kRTPPayload_LPC = 7, /* 8kHz LPC */
+ kRTPPayload_PCMA = 8, /* 8kHz PCM a-law mono */
+ kRTPPayload_L16_44_2 = 10, /* 44.1kHz 16-bit linear stereo */
+ kRTPPayload_L16_44_1 = 11, /* 44.1kHz 16-bit linear mono */
+ kRTPPayload_PureVoice = 12, /* 8kHz PureVoice mono (QCELP) */
+ kRTPPayload_MPEGAUDIO = 14, /* MPEG I and II audio */
+ kRTPPayload_DVI_11 = 16, /* 11kHz Intel DVI ADPCM mono */
+ kRTPPayload_DVI_22 = 17 /* 22kHz Intel DVI ADPCM mono */
+};
+
+/* RTP standard content encodings for video */
+enum {
+ kRTPPayload_CELLB = 25, /* Sun CellB */
+ kRTPPayload_JPEG = 26, /* JPEG */
+ kRTPPayload_CUSEEME = 27, /* Cornell CU-SeeMe */
+ kRTPPayload_NV = 28, /* Xerox PARC nv */
+ kRTPPayload_PICWIN = 29, /* BBN Picture Window */
+ kRTPPayload_CPV = 30, /* Bolter CPV */
+ kRTPPayload_H261 = 31, /* CCITT H.261 */
+ kRTPPayload_MPEGVIDEO = 32, /* MPEG I and II video */
+ kRTPPayload_H263 = 34 /* CCITT H.263 */
+};
+
+/* Other RTP standard content encodings */
+enum {
+ kRTPPayload_MPEG2T = 33 /* MPEG 2 Transport */
+};
+
+/* Dynamic encodings */
+enum {
+ kRTPPayload_FirstDynamic = 96,
+ kRTPPayload_LastDynamic = 127,
+ kRTPPayload_Unknown = 0xFF
+};
+
+
+
+/*
+-----------------------------------------
+ RTP Info selectors
+-----------------------------------------
+*/
+/* ----- these are get and set ----- */
+enum {
+ kRTPInfo_SSRC = FOUR_CHAR_CODE('ssrc'), /* UInt32* */
+ kRTPInfo_NextSeqNum = FOUR_CHAR_CODE('rnsn') /* UInt16* */
+};
+
+/*-----------------------------------------
+ RTP Statistics
+-----------------------------------------*/
+enum {
+ kRTPTotalReceivedPktsStat = FOUR_CHAR_CODE('trcp'),
+ kRTPTotalLostPktsStat = FOUR_CHAR_CODE('tlsp'),
+ kRTPTotalProcessedPktsStat = FOUR_CHAR_CODE('tprp'),
+ kRTPTotalDroppedPktsStat = FOUR_CHAR_CODE('tdrp'),
+ kRTPBadHeaderDroppedPktsStat = FOUR_CHAR_CODE('bhdp'),
+ kRTPOurHeaderDroppedPktsStat = FOUR_CHAR_CODE('ohdp'),
+ kRTPNotReceivingSenderDroppedPktsStat = FOUR_CHAR_CODE('nsdp'),
+ kRTPNotProcessingDroppedPktsStat = FOUR_CHAR_CODE('npdp'),
+ kRTPBadSeqDroppedPktsStat = FOUR_CHAR_CODE('bsdp'),
+ kRTPArriveTooLatePktsStat = FOUR_CHAR_CODE('artl'),
+ kRTPWaitForSeqDroppedPktsStat = FOUR_CHAR_CODE('wsdp'),
+ kRTPBadStateDroppedPktsStat = FOUR_CHAR_CODE('stdp'),
+ kRTPBadPayloadDroppedPktsStat = FOUR_CHAR_CODE('bpdp'),
+ kRTPNoTimeScaleDroppedPktsStat = FOUR_CHAR_CODE('ntdp'),
+ kRTPDupSeqNumDroppedPktsStat = FOUR_CHAR_CODE('dsdp'),
+ kRTPLostPktsPercentStat = FOUR_CHAR_CODE('lspp'),
+ kRTPDroppedPktsPercentStat = FOUR_CHAR_CODE('dppp'),
+ kRTPTotalUnprocessedPktsPercentStat = FOUR_CHAR_CODE('tupp'),
+ kRTPRTCPDataRateStat = FOUR_CHAR_CODE('rrcd'),
+ kRTPPayloadIDStat = FOUR_CHAR_CODE('rpid'),
+ kRTPPayloadNameStat = FOUR_CHAR_CODE('rpnm'),
+ kRTPNumPktsInQueueStat = FOUR_CHAR_CODE('rnpq'),
+ kRTPTotalPktsInQueueStat = FOUR_CHAR_CODE('rtpq'),
+ kRTPTotalOutOfOrderPktsStat = FOUR_CHAR_CODE('rtoo'),
+ kRTPRetransmissionStat = FOUR_CHAR_CODE('rrtx')
+};
+
+
+/*-----------------------------------------
+ Payload Info
+-----------------------------------------*/
+enum {
+ kRTPPayloadSpeedTag = FOUR_CHAR_CODE('sped'), /* 0-255, 255 is fastest*/
+ kRTPPayloadLossRecoveryTag = FOUR_CHAR_CODE('loss'), /* 0-255, 0 can't handle any loss, 128 can handle 50% packet loss*/
+ kRTPPayloadConformanceTag = FOUR_CHAR_CODE('conf') /* more than one of these can be present*/
+};
+
+
+
+struct RTPPayloadCharacteristic {
+ OSType tag;
+ long value;
+};
+typedef struct RTPPayloadCharacteristic RTPPayloadCharacteristic;
+/*
+ pass RTPPayloadSortRequest to QTSFindMediaPacketizer or QTSFindMediaPacketizerForTrack.
+ define the characteristics to sort by. tag is key to sort on. value is positive for ascending
+ sort (low value first), negative for descending sort (high value first).
+*/
+
+struct RTPPayloadSortRequest {
+ long characteristicCount;
+ RTPPayloadCharacteristic characteristic[1]; /* tag is key to sort on, value is + for ascending, - for descending*/
+};
+typedef struct RTPPayloadSortRequest RTPPayloadSortRequest;
+typedef RTPPayloadSortRequest * RTPPayloadSortRequestPtr;
+/* flags for RTPPayloadInfo */
+enum {
+ kRTPPayloadTypeStaticFlag = 0x00000001,
+ kRTPPayloadTypeDynamicFlag = 0x00000002
+};
+
+
+struct RTPPayloadInfo {
+ long payloadFlags;
+ UInt8 payloadID;
+ char reserved1;
+ char reserved2;
+ char reserved3;
+ char payloadName[1];
+};
+typedef struct RTPPayloadInfo RTPPayloadInfo;
+typedef RTPPayloadInfo * RTPPayloadInfoPtr;
+typedef RTPPayloadInfoPtr * RTPPayloadInfoHandle;
+/*============================================================================
+ RTP Reassembler
+============================================================================*/
+
+typedef ComponentInstance RTPReassembler;
+enum {
+ kRTPReassemblerType = FOUR_CHAR_CODE('rtpr')
+};
+
+enum {
+ kRTPBaseReassemblerType = FOUR_CHAR_CODE('gnrc'),
+ kRTP261ReassemblerType = FOUR_CHAR_CODE('h261'),
+ kRTP263ReassemblerType = FOUR_CHAR_CODE('h263'),
+ kRTP263PlusReassemblerType = FOUR_CHAR_CODE('263+'),
+ kRTPAudioReassemblerType = FOUR_CHAR_CODE('soun'),
+ kRTPQTReassemblerType = FOUR_CHAR_CODE('qtim'),
+ kRTPPureVoiceReassemblerType = FOUR_CHAR_CODE('Qclp'),
+ kRTPJPEGReassemblerType = FOUR_CHAR_CODE('jpeg'),
+ kRTPQDesign2ReassemblerType = FOUR_CHAR_CODE('QDM2'),
+ kRTPSorensonReassemblerType = FOUR_CHAR_CODE('SVQ1'),
+ kRTPMP3ReassemblerType = FOUR_CHAR_CODE('mp3 '),
+ kRTPMPEG4AudioReassemblerType = FOUR_CHAR_CODE('mp4a'),
+ kRTPMPEG4VideoReassemblerType = FOUR_CHAR_CODE('mp4v')
+};
+
+
+struct RTPRssmInitParams {
+ RTPSSRC ssrc;
+ UInt8 payloadType;
+ UInt8 reserved1;
+ UInt8 reserved2;
+ UInt8 reserved3;
+ TimeBase timeBase;
+ TimeScale timeScale;
+};
+typedef struct RTPRssmInitParams RTPRssmInitParams;
+
+struct RTPDescParams {
+ QTAtomContainer container;
+ QTAtom presentationParentAtom;
+ QTAtom streamParentAtom;
+};
+typedef struct RTPDescParams RTPDescParams;
+
+struct RTPRssmMoreInitParams {
+ RTPRssmInitParams initParams;
+ SInt32 version;
+ RTPDescParams desc;
+};
+typedef struct RTPRssmMoreInitParams RTPRssmMoreInitParams;
+enum {
+ kRTPRssmMoreInitParamsVersion1 = 1
+};
+
+
+/* get/set info selectors*/
+enum {
+ kRTPRssmInfo_MoreInitParams = FOUR_CHAR_CODE('rrmi')
+};
+
+
+
+struct RTPRssmPacket {
+ struct RTPRssmPacket * next;
+ struct RTPRssmPacket * prev;
+ QTSStreamBuffer * streamBuffer;
+ Boolean paramsFilledIn;
+ UInt8 reserved;
+ UInt16 sequenceNum;
+ UInt32 transportHeaderLength; /* filled in by base*/
+ UInt32 payloadHeaderLength; /* derived adjusts this */
+ UInt32 dataLength;
+ SHServerEditParameters serverEditParams;
+ TimeValue64 timeStamp; /* lower 32 bits is original rtp timestamp*/
+ SInt32 chunkFlags; /* these are or'd together*/
+ SInt32 flags;
+
+};
+typedef struct RTPRssmPacket RTPRssmPacket;
+/* flags for RTPRssmPacket struct*/
+enum {
+ kRTPRssmPacketHasMarkerBitSet = 0x00000001,
+ kRTPRssmPacketHasServerEditFlag = 0x00010000
+};
+
+/* flags for RTPRssmSendStreamBufferRange*/
+enum {
+ kRTPRssmCanRefStreamBuffer = 0x00000001
+};
+
+/* flags for RTPRssmSendPacketList*/
+enum {
+ kRTPRssmLostSomePackets = 0x00000001
+};
+
+/* flags for RTPRssmSetFlags*/
+enum {
+ kRTPRssmEveryPacketAChunkFlag = 0x00000001,
+ kRTPRssmQueueAndUseMarkerBitFlag = 0x00000002,
+ kRTPRssmTrackLostPacketsFlag = 0x00010000,
+ kRTPRssmNoReorderingRequiredFlag = 0x00020000
+};
+
+
+
+struct RTPSendStreamBufferRangeParams {
+ QTSStreamBuffer * streamBuffer;
+ TimeValue64 presentationTime;
+ UInt32 chunkStartPosition;
+ UInt32 numDataBytes;
+ SInt32 chunkFlags;
+ SInt32 flags;
+ const SHServerEditParameters * serverEditParams; /* NULL if no edit*/
+};
+typedef struct RTPSendStreamBufferRangeParams RTPSendStreamBufferRangeParams;
+/* characteristics*/
+enum {
+ kRTPCharacteristic_RequiresOrderedPackets = FOUR_CHAR_CODE('rrop'),
+ kRTPCharacteristic_TimeStampsNotMonoIncreasing = FOUR_CHAR_CODE('tsmi')
+};
+
+
+enum {
+ kRTPReassemblerInfoResType = FOUR_CHAR_CODE('rsmi')
+};
+
+
+struct RTPReassemblerInfo {
+ long characteristicCount;
+ RTPPayloadCharacteristic characteristic[1];
+
+ /* after the last characteristic, the payload name (defined by the MediaPacketizerPayloadInfo*/
+ /* structure) is present. */
+};
+typedef struct RTPReassemblerInfo RTPReassemblerInfo;
+typedef RTPReassemblerInfo * RTPReassemblerInfoPtr;
+typedef RTPReassemblerInfoPtr * RTPReassemblerInfoHandle;
+#define RTPReassemblerInfoToPayloadInfo(_rsmi) ((RTPPayloadInfoPtr)(&((_rsmi)->characteristic[(_rsmi)->characteristicCount])))
+/* RTPReassemblerInfoElement structs are padded to 32 bits */
+enum {
+ kRTPReassemblerInfoPadUpToBytes = 4
+};
+
+
+EXTERN_API_C( OSErr )
+QTSFindReassemblerForPayloadID (UInt8 inPayloadID,
+ RTPPayloadSortRequest * inSortInfo,
+ QTAtomContainer * outReassemblerList);
+
+EXTERN_API_C( OSErr )
+QTSFindReassemblerForPayloadName (const char * inPayloadName,
+ RTPPayloadSortRequest * inSortInfo,
+ QTAtomContainer * outReassemblerList);
+
+/*-----------------------------------------
+ RTP Reassembler Selectors
+-----------------------------------------*/
+enum {
+ kRTPRssmSetCapabilitiesSelect = 0x0100,
+ kRTPRssmGetCapabilitiesSelect = 0x0101,
+ kRTPRssmSetPayloadHeaderLengthSelect = 0x0102,
+ kRTPRssmGetPayloadHeaderLengthSelect = 0x0103,
+ kRTPRssmSetTimeScaleSelect = 0x0104,
+ kRTPRssmGetTimeScaleSelect = 0x0105,
+ kRTPRssmNewStreamHandlerSelect = 0x0106,
+ kRTPRssmSetStreamHandlerSelect = 0x0107,
+ kRTPRssmGetStreamHandlerSelect = 0x0108,
+ kRTPRssmSendStreamHandlerChangedSelect = 0x0109,
+ kRTPRssmSetSampleDescriptionSelect = 0x010A,
+ kRTPRssmGetChunkAndIncrRefCountSelect = 0x010D,
+ kRTPRssmSendChunkAndDecrRefCountSelect = 0x010E,
+ kRTPRssmSendLostChunkSelect = 0x010F,
+ kRTPRssmSendStreamBufferRangeSelect = 0x0110,
+ kRTPRssmClearCachedPackets = 0x0111,
+ kRTPRssmFillPacketListParamsSelect = 0x0113,
+ kRTPRssmReleasePacketListSelect = 0x0114,
+ kRTPRssmIncrChunkRefCountSelect = 0x0115,
+ kRTPRssmDecrChunkRefCountSelect = 0x0116,
+ kRTPRssmGetExtChunkAndIncrRefCountSelect = 0x0117,
+ kRTPRssmInitializeSelect = 0x0500,
+ kRTPRssmHandleNewPacketSelect = 0x0501,
+ kRTPRssmComputeChunkSizeSelect = 0x0502,
+ kRTPRssmAdjustPacketParamsSelect = 0x0503,
+ kRTPRssmCopyDataToChunkSelect = 0x0504,
+ kRTPRssmSendPacketListSelect = 0x0505,
+ kRTPRssmGetTimeScaleFromPacketSelect = 0x0506,
+ kRTPRssmSetInfoSelect = 0x0509,
+ kRTPRssmGetInfoSelect = 0x050A,
+ kRTPRssmHasCharacteristicSelect = 0x050B,
+ kRTPRssmResetSelect = 0x050C
+};
+
+/*-----------------------------------------
+ RTP Reassembler functions - base to derived
+-----------------------------------------*/
+
+EXTERN_API( ComponentResult )
+RTPRssmInitialize (RTPReassembler rtpr,
+ RTPRssmInitParams * inInitParams) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0500, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPRssmHandleNewPacket (RTPReassembler rtpr,
+ QTSStreamBuffer * inStreamBuffer,
+ SInt32 inNumWraparounds) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0501, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPRssmComputeChunkSize (RTPReassembler rtpr,
+ RTPRssmPacket * inPacketListHead,
+ SInt32 inFlags,
+ UInt32 * outChunkDataSize) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0502, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPRssmAdjustPacketParams (RTPReassembler rtpr,
+ RTPRssmPacket * inPacket,
+ SInt32 inFlags) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0503, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPRssmCopyDataToChunk (RTPReassembler rtpr,
+ RTPRssmPacket * inPacketListHead,
+ UInt32 inMaxChunkDataSize,
+ SHChunkRecord * inChunk,
+ SInt32 inFlags) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0504, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPRssmSendPacketList (RTPReassembler rtpr,
+ RTPRssmPacket * inPacketListHead,
+ const TimeValue64 * inLastChunkPresentationTime,
+ SInt32 inFlags) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0505, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPRssmGetTimeScaleFromPacket (RTPReassembler rtpr,
+ QTSStreamBuffer * inStreamBuffer,
+ TimeScale * outTimeScale) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0506, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPRssmSetInfo (RTPReassembler rtpr,
+ OSType inSelector,
+ void * ioParams) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0509, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPRssmGetInfo (RTPReassembler rtpr,
+ OSType inSelector,
+ void * ioParams) FIVEWORDINLINE(0x2F3C, 0x0008, 0x050A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPRssmHasCharacteristic (RTPReassembler rtpr,
+ OSType inCharacteristic,
+ Boolean * outHasIt) FIVEWORDINLINE(0x2F3C, 0x0008, 0x050B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPRssmReset (RTPReassembler rtpr,
+ SInt32 inFlags) FIVEWORDINLINE(0x2F3C, 0x0004, 0x050C, 0x7000, 0xA82A);
+
+/*-----------------------------------------
+ RTP Reassembler functions - derived to base
+-----------------------------------------*/
+/* ----- setup*/
+EXTERN_API( ComponentResult )
+RTPRssmSetCapabilities (RTPReassembler rtpr,
+ SInt32 inFlags,
+ SInt32 inFlagsMask) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0100, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPRssmGetCapabilities (RTPReassembler rtpr,
+ SInt32 * outFlags) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0101, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPRssmSetPayloadHeaderLength (RTPReassembler rtpr,
+ UInt32 inPayloadHeaderLength) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0102, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPRssmGetPayloadHeaderLength (RTPReassembler rtpr,
+ UInt32 * outPayloadHeaderLength) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0103, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPRssmSetTimeScale (RTPReassembler rtpr,
+ TimeScale inSHTimeScale) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0104, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPRssmGetTimeScale (RTPReassembler rtpr,
+ TimeScale * outSHTimeScale) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0105, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPRssmNewStreamHandler (RTPReassembler rtpr,
+ OSType inSHType,
+ SampleDescriptionHandle inSampleDescription,
+ TimeScale inSHTimeScale,
+ ComponentInstance * outHandler) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0106, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPRssmSetStreamHandler (RTPReassembler rtpr,
+ ComponentInstance inStreamHandler) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0107, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPRssmGetStreamHandler (RTPReassembler rtpr,
+ ComponentInstance * outStreamHandler) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0108, 0x7000, 0xA82A);
+
+
+EXTERN_API( ComponentResult )
+RTPRssmSendStreamHandlerChanged (RTPReassembler rtpr) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0109, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPRssmSetSampleDescription (RTPReassembler rtpr,
+ SampleDescriptionHandle inSampleDescription) FIVEWORDINLINE(0x2F3C, 0x0004, 0x010A, 0x7000, 0xA82A);
+
+/* ----- manually sending chunks*/
+EXTERN_API( ComponentResult )
+RTPRssmGetChunkAndIncrRefCount (RTPReassembler rtpr,
+ UInt32 inChunkDataSize,
+ const TimeValue64 * inChunkPresentationTime,
+ SHChunkRecord ** outChunk) FIVEWORDINLINE(0x2F3C, 0x000C, 0x010D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPRssmGetExtChunkAndIncrRefCount (RTPReassembler rtpr,
+ UInt32 inChunkDataSize,
+ const TimeValue64 * inChunkPresentationTime,
+ SInt32 inFlags,
+ SHExtendedChunkRecord ** outChunk) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0117, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPRssmSendChunkAndDecrRefCount (RTPReassembler rtpr,
+ SHChunkRecord * inChunk,
+ const SHServerEditParameters * inServerEdit) FIVEWORDINLINE(0x2F3C, 0x0008, 0x010E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPRssmSendLostChunk (RTPReassembler rtpr,
+ const TimeValue64 * inChunkPresentationTime) FIVEWORDINLINE(0x2F3C, 0x0004, 0x010F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPRssmSendStreamBufferRange (RTPReassembler rtpr,
+ RTPSendStreamBufferRangeParams * inParams) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0110, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPRssmClearCachedPackets (RTPReassembler rtpr,
+ SInt32 inFlags) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0111, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPRssmFillPacketListParams (RTPReassembler rtpr,
+ RTPRssmPacket * inPacketListHead,
+ SInt32 inNumWraparounds,
+ SInt32 inFlags) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0113, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPRssmReleasePacketList (RTPReassembler rtpr,
+ RTPRssmPacket * inPacketListHead) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0114, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPRssmIncrChunkRefCount (RTPReassembler rtpr,
+ SHChunkRecord * inChunk) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0115, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPRssmDecrChunkRefCount (RTPReassembler rtpr,
+ SHChunkRecord * inChunk) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0116, 0x7000, 0xA82A);
+
+/*============================================================================
+ RTP Media Packetizer
+============================================================================*/
+enum {
+ kRTPMediaPacketizerType = FOUR_CHAR_CODE('rtpm')
+};
+
+
+typedef ComponentInstance RTPMediaPacketizer;
+enum {
+ kRTPBaseMediaPacketizerType = FOUR_CHAR_CODE('gnrc'),
+ kRTP261MediaPacketizerType = FOUR_CHAR_CODE('h261'),
+ kRTP263PlusMediaPacketizerType = FOUR_CHAR_CODE('263+'),
+ kRTPAudioMediaPacketizerType = FOUR_CHAR_CODE('soun'),
+ kRTPQTMediaPacketizerType = FOUR_CHAR_CODE('qtim'),
+ kRTPPureVoiceMediaPacketizerType = FOUR_CHAR_CODE('Qclp'),
+ kRTPJPEGMediaPacketizerType = FOUR_CHAR_CODE('jpeg'),
+ kRTPQDesign2MediaPacketizerType = FOUR_CHAR_CODE('QDM2'),
+ kRTPSorensonMediaPacketizerType = FOUR_CHAR_CODE('SVQ1'),
+ kRTPMP3MediaPacketizerType = FOUR_CHAR_CODE('mp3 '),
+ kRTPMPEG4AudioMediaPacketizerType = FOUR_CHAR_CODE('mp4a'),
+ kRTPMPEG4VideoMediaPacketizerType = FOUR_CHAR_CODE('mp4v')
+};
+
+typedef UInt32 RTPMPSampleRef;
+typedef CALLBACK_API( void , RTPMPDataReleaseProcPtr )(UInt8 *inData, void *inRefCon);
+typedef STACK_UPP_TYPE(RTPMPDataReleaseProcPtr) RTPMPDataReleaseUPP;
+enum {
+ kMediaPacketizerCanPackEditRate = 1 << 0,
+ kMediaPacketizerCanPackLayer = 1 << 1,
+ kMediaPacketizerCanPackVolume = 1 << 2,
+ kMediaPacketizerCanPackBalance = 1 << 3,
+ kMediaPacketizerCanPackGraphicsMode = 1 << 4,
+ kMediaPacketizerCanPackEmptyEdit = 1 << 5
+};
+
+
+
+struct MediaPacketizerRequirements {
+ OSType mediaType; /* media type supported (0 for all)*/
+ OSType dataFormat; /* data format (e.g., compression) supported (0 for all)*/
+ UInt32 capabilityFlags; /* ability to handle non-standard track characteristics*/
+ UInt8 canPackMatrixType; /* can pack any matrix type up to this (identityMatrixType for identity only)*/
+ UInt8 reserved1;
+ UInt8 reserved2;
+ UInt8 reserved3;
+};
+typedef struct MediaPacketizerRequirements MediaPacketizerRequirements;
+typedef MediaPacketizerRequirements * MediaPacketizerRequirementsPtr;
+
+struct MediaPacketizerInfo {
+ OSType mediaType; /* media type supported (0 for all)*/
+ OSType dataFormat; /* data format (e.g., compression) supported (0 for all)*/
+ OSType vendor; /* manufacturer of this packetizer (e.g., 'appl' for Apple)*/
+ UInt32 capabilityFlags; /* ability to handle non-standard track characteristics*/
+ UInt8 canPackMatrixType; /* can pack any matrix type up to this (identityMatrixType for identity only)*/
+ UInt8 reserved1;
+ UInt8 reserved2;
+ UInt8 reserved3;
+ long characteristicCount;
+ RTPPayloadCharacteristic characteristic[1];
+
+ /* after the last characteristic, the payload name (defined by the RTPPayloadInfo*/
+ /* structure) is present. */
+};
+typedef struct MediaPacketizerInfo MediaPacketizerInfo;
+typedef MediaPacketizerInfo * MediaPacketizerInfoPtr;
+typedef MediaPacketizerInfoPtr * MediaPacketizerInfoHandle;
+#define MediaPacketizerInfoToPayloadInfo(_mpi) ((RTPPayloadInfoPtr)(&((_mpi)->characteristic[(_mpi)->characteristicCount])))
+/* MediaPacketizerInfo structs are padded to 32 bits */
+enum {
+ kMediaPacketizerInfoPadUpToBytes = 4
+};
+
+enum {
+ kRTPMediaPacketizerInfoRezType = FOUR_CHAR_CODE('pcki')
+};
+
+
+EXTERN_API_C( OSErr )
+QTSFindMediaPacketizer (MediaPacketizerRequirementsPtr inPacketizerinfo,
+ SampleDescriptionHandle inSampleDescription,
+ RTPPayloadSortRequestPtr inSortInfo,
+ QTAtomContainer * outPacketizerList);
+
+EXTERN_API_C( OSErr )
+QTSFindMediaPacketizerForTrack (Track inTrack,
+ long inSampleDescriptionIndex,
+ RTPPayloadSortRequestPtr inSortInfo,
+ QTAtomContainer * outPacketizerList);
+
+EXTERN_API_C( OSErr )
+QTSFindMediaPacketizerForPayloadID (long payloadID,
+ RTPPayloadSortRequestPtr inSortInfo,
+ QTAtomContainer * outPacketizerList);
+
+EXTERN_API_C( OSErr )
+QTSFindMediaPacketizerForPayloadName (const char * payloadName,
+ RTPPayloadSortRequestPtr inSortInfo,
+ QTAtomContainer * outPacketizerList);
+
+/* flags for RTPMPInitialize*/
+enum {
+ kRTPMPRealtimeModeFlag = 0x00000001
+};
+
+/* flags for RTPMPSampleDataParams*/
+enum {
+ kRTPMPSyncSampleFlag = 0x00000001,
+ kRTPMPRespectDurationFlag = 0x00000002
+};
+
+
+struct RTPMPSampleDataParams {
+ UInt32 version;
+ UInt32 timeStamp;
+ UInt32 duration; /* 0 = unknown duration*/
+ UInt32 playOffset;
+ Fixed playRate;
+ SInt32 flags;
+ UInt32 sampleDescSeed;
+ Handle sampleDescription;
+ RTPMPSampleRef sampleRef;
+ UInt32 dataLength;
+ const UInt8 * data;
+ RTPMPDataReleaseUPP releaseProc;
+ void * refCon;
+};
+typedef struct RTPMPSampleDataParams RTPMPSampleDataParams;
+/* out flags for idle, RTPMPSetSampleData, and RTPMPFlush*/
+enum {
+ kRTPMPStillProcessingData = 0x00000001 /* not done with data you've got*/
+};
+
+
+struct RTPMPPayloadTypeParams {
+ UInt32 flags;
+ UInt32 payloadNumber;
+ short nameLength; /* in: size of payloadName buffer (counting null terminator) -- this will be reset to needed length and paramErr returned if too small */
+ char * payloadName; /* caller must provide buffer */
+};
+typedef struct RTPMPPayloadTypeParams RTPMPPayloadTypeParams;
+/*-----------------------------------------
+ RTP Media Packetizer Info selectors
+-----------------------------------------*/
+/* info selectors - get only */
+enum {
+ kRTPMPPayloadTypeInfo = FOUR_CHAR_CODE('rtpp'), /* RTPMPPayloadTypeParams* */
+ kRTPMPRTPTimeScaleInfo = FOUR_CHAR_CODE('rtpt'), /* TimeScale* */
+ kRTPMPRequiredSampleDescriptionInfo = FOUR_CHAR_CODE('sdsc'), /* SampleDescriptionHandle* */
+ kRTPMPMinPayloadSize = FOUR_CHAR_CODE('mins'), /* UInt32* in bytes, does not include rtp header; default is 0 */
+ kRTPMPMinPacketDuration = FOUR_CHAR_CODE('mind'), /* UInt3* in milliseconds; default is no min required */
+ kRTPMPSuggestedRepeatPktCountInfo = FOUR_CHAR_CODE('srpc'), /* UInt32* */
+ kRTPMPSuggestedRepeatPktSpacingInfo = FOUR_CHAR_CODE('srps'), /* UInt32* in milliseconds */
+ kRTPMPMaxPartialSampleSizeInfo = FOUR_CHAR_CODE('mpss'), /* UInt32* in bytes */
+ kRTPMPPreferredBufferDelayInfo = FOUR_CHAR_CODE('prbd'), /* UInt32* in milliseconds */
+ kRTPMPPayloadNameInfo = FOUR_CHAR_CODE('name'), /* StringPtr */
+ kRTPInfo_FormatString = FOUR_CHAR_CODE('fmtp') /* char **, caller allocates ptr, callee disposes */
+};
+
+/*-----------------------------------------
+ RTP Media Packetizer Characteristics
+-----------------------------------------*/
+/* also supports relevant ones in Movies.h and QTSToolbox.h */
+enum {
+ kRTPMPNoSampleDataRequiredCharacteristic = FOUR_CHAR_CODE('nsdr'),
+ kRTPMPHasUserSettingsDialogCharacteristic = FOUR_CHAR_CODE('sdlg'),
+ kRTPMPPrefersReliableTransportCharacteristic = FOUR_CHAR_CODE('rely'),
+ kRTPMPRequiresOutOfBandDimensionsCharacteristic = FOUR_CHAR_CODE('robd'),
+ kRTPMPReadsPartialSamplesCharacteristic = FOUR_CHAR_CODE('rpsp')
+};
+
+/*-----------------------------------------
+ RTP Media Packetizer selectors
+-----------------------------------------*/
+enum {
+ kRTPMPInitializeSelect = 0x0500,
+ kRTPMPPreflightMediaSelect = 0x0501,
+ kRTPMPIdleSelect = 0x0502,
+ kRTPMPSetSampleDataSelect = 0x0503,
+ kRTPMPFlushSelect = 0x0504,
+ kRTPMPResetSelect = 0x0505,
+ kRTPMPSetInfoSelect = 0x0506,
+ kRTPMPGetInfoSelect = 0x0507,
+ kRTPMPSetTimeScaleSelect = 0x0508,
+ kRTPMPGetTimeScaleSelect = 0x0509,
+ kRTPMPSetTimeBaseSelect = 0x050A,
+ kRTPMPGetTimeBaseSelect = 0x050B,
+ kRTPMPHasCharacteristicSelect = 0x050C,
+ kRTPMPSetPacketBuilderSelect = 0x050E,
+ kRTPMPGetPacketBuilderSelect = 0x050F,
+ kRTPMPSetMediaTypeSelect = 0x0510,
+ kRTPMPGetMediaTypeSelect = 0x0511,
+ kRTPMPSetMaxPacketSizeSelect = 0x0512,
+ kRTPMPGetMaxPacketSizeSelect = 0x0513,
+ kRTPMPSetMaxPacketDurationSelect = 0x0514,
+ kRTPMPGetMaxPacketDurationSelect = 0x0515, /* for export component and apps who want to*/
+ /* access dialogs for Media-specific settings*/
+ /* (such as Pure Voice interleave factor)*/
+ kRTPMPDoUserDialogSelect = 0x0516,
+ kRTPMPSetSettingsFromAtomContainerAtAtomSelect = 0x0517,
+ kRTPMPGetSettingsIntoAtomContainerAtAtomSelect = 0x0518,
+ kRTPMPGetSettingsAsTextSelect = 0x0519,
+ kRTPMPGetSettingsSelect = 0x051A,
+ kRTPMPSetSettingsSelect = 0x051B
+};
+
+/*-----------------------------------------
+ RTP Media Packetizer functions
+-----------------------------------------*/
+
+EXTERN_API( ComponentResult )
+RTPMPInitialize (RTPMediaPacketizer rtpm,
+ SInt32 inFlags) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0500, 0x7000, 0xA82A);
+
+/* return noErr if you can handle this media */
+EXTERN_API( ComponentResult )
+RTPMPPreflightMedia (RTPMediaPacketizer rtpm,
+ OSType inMediaType,
+ SampleDescriptionHandle inSampleDescription) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0501, 0x7000, 0xA82A);
+
+/*
+ do work here if you need to - give up time periodically
+ if you're doing time consuming operations
+*/
+EXTERN_API( ComponentResult )
+RTPMPIdle (RTPMediaPacketizer rtpm,
+ SInt32 inFlags,
+ SInt32 * outFlags) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0502, 0x7000, 0xA82A);
+
+/*
+ caller owns the RTPMPSampleDataParams struct
+ media Packetizer must copy any fields of the struct it wants to keep
+ media Packetizer must call release proc when done with the data
+ you can do the processing work here if it does not take up too
+ much cpu time - otherwise do it in idle
+*/
+EXTERN_API( ComponentResult )
+RTPMPSetSampleData (RTPMediaPacketizer rtpm,
+ const RTPMPSampleDataParams * inSampleData,
+ SInt32 * outFlags) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0503, 0x7000, 0xA82A);
+
+/*
+ send everything you have buffered - you will get idles while
+ you set the kRTPMPStillProcessingData flag here and in idle
+*/
+EXTERN_API( ComponentResult )
+RTPMPFlush (RTPMediaPacketizer rtpm,
+ SInt32 inFlags,
+ SInt32 * outFlags) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0504, 0x7000, 0xA82A);
+
+/*
+ dispose of anything buffered and get rid of state
+ do not send the buffered data (because presumably
+ there is no connection for you to send on)
+ state should be the same as if you were just initialized
+*/
+EXTERN_API( ComponentResult )
+RTPMPReset (RTPMediaPacketizer rtpm,
+ SInt32 inFlags) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0505, 0x7000, 0xA82A);
+
+/*-----------------------------------------
+ RTP Media Packetizer get / set functions
+-----------------------------------------*/
+EXTERN_API( ComponentResult )
+RTPMPSetInfo (RTPMediaPacketizer rtpm,
+ OSType inSelector,
+ const void * ioParams) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0506, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPMPGetInfo (RTPMediaPacketizer rtpm,
+ OSType inSelector,
+ void * ioParams) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0507, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPMPSetTimeScale (RTPMediaPacketizer rtpm,
+ TimeScale inTimeScale) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0508, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPMPGetTimeScale (RTPMediaPacketizer rtpm,
+ TimeScale * outTimeScale) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0509, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPMPSetTimeBase (RTPMediaPacketizer rtpm,
+ TimeBase inTimeBase) FIVEWORDINLINE(0x2F3C, 0x0004, 0x050A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPMPGetTimeBase (RTPMediaPacketizer rtpm,
+ TimeBase * outTimeBase) FIVEWORDINLINE(0x2F3C, 0x0004, 0x050B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPMPHasCharacteristic (RTPMediaPacketizer rtpm,
+ OSType inSelector,
+ Boolean * outHasIt) FIVEWORDINLINE(0x2F3C, 0x0008, 0x050C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPMPSetPacketBuilder (RTPMediaPacketizer rtpm,
+ ComponentInstance inPacketBuilder) FIVEWORDINLINE(0x2F3C, 0x0004, 0x050E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPMPGetPacketBuilder (RTPMediaPacketizer rtpm,
+ ComponentInstance * outPacketBuilder) FIVEWORDINLINE(0x2F3C, 0x0004, 0x050F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPMPSetMediaType (RTPMediaPacketizer rtpm,
+ OSType inMediaType) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0510, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPMPGetMediaType (RTPMediaPacketizer rtpm,
+ OSType * outMediaType) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0511, 0x7000, 0xA82A);
+
+/* size is in bytes*/
+EXTERN_API( ComponentResult )
+RTPMPSetMaxPacketSize (RTPMediaPacketizer rtpm,
+ UInt32 inMaxPacketSize) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0512, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPMPGetMaxPacketSize (RTPMediaPacketizer rtpm,
+ UInt32 * outMaxPacketSize) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0513, 0x7000, 0xA82A);
+
+/* duration is in milliseconds*/
+EXTERN_API( ComponentResult )
+RTPMPSetMaxPacketDuration (RTPMediaPacketizer rtpm,
+ UInt32 inMaxPacketDuration) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0514, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPMPGetMaxPacketDuration (RTPMediaPacketizer rtpm,
+ UInt32 * outMaxPacketDuration) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0515, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPMPDoUserDialog (RTPMediaPacketizer rtpm,
+ ModalFilterUPP inFilterUPP,
+ Boolean * canceled) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0516, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPMPSetSettingsFromAtomContainerAtAtom (RTPMediaPacketizer rtpm,
+ QTAtomContainer inContainer,
+ QTAtom inParentAtom) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0517, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPMPGetSettingsIntoAtomContainerAtAtom (RTPMediaPacketizer rtpm,
+ QTAtomContainer inOutContainer,
+ QTAtom inParentAtom) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0518, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPMPGetSettingsAsText (RTPMediaPacketizer rtpm,
+ Handle * text) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0519, 0x7000, 0xA82A);
+
+
+EXTERN_API( ComponentResult )
+RTPMPGetSettings (RTPMediaPacketizer rtpm,
+ QTAtomContainer * outSettings,
+ SInt32 inFlags) FIVEWORDINLINE(0x2F3C, 0x0008, 0x051A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPMPSetSettings (RTPMediaPacketizer rtpm,
+ QTAtomSpecPtr inSettings,
+ SInt32 inFlags) FIVEWORDINLINE(0x2F3C, 0x0008, 0x051B, 0x7000, 0xA82A);
+
+/*============================================================================
+ RTP Packet Builder
+============================================================================*/
+enum {
+ kRTPPacketBuilderType = FOUR_CHAR_CODE('rtpb')
+};
+
+
+typedef ComponentInstance RTPPacketBuilder;
+typedef struct OpaqueRTPPacketGroupRef* RTPPacketGroupRef;
+typedef struct OpaqueRTPPacketRef* RTPPacketRef;
+typedef struct OpaqueRTPPacketRepeatedDataRef* RTPPacketRepeatedDataRef;
+/* flags for RTPPBBegin/EndPacket, RTPPBBegin/EndPacketGroup*/
+enum {
+ kRTPPBSetMarkerFlag = 0x00000001,
+ kRTPPBRepeatPacketFlag = 0x00000002,
+ kRTPPBSyncSampleFlag = 0x00010000,
+ kRTPPBBFrameFlag = 0x00020000,
+ kRTPPBDontSendFlag = 0x10000000 /* when set in EndPacketGroup, will not add group*/
+};
+
+enum {
+ kRTPPBUnknownPacketMediaDataLength = 0
+};
+
+/* flags for RTPPBGetSampleData*/
+enum {
+ kRTPPBEndOfDataFlag = 0x00000001
+};
+
+
+typedef CALLBACK_API( void , RTPPBCallbackProcPtr )(OSType inSelector, void *ioParams, void *inRefCon);
+typedef STACK_UPP_TYPE(RTPPBCallbackProcPtr) RTPPBCallbackUPP;
+/*-----------------------------------------
+ RTP Packet Builder selectors
+-----------------------------------------*/
+enum {
+ kRTPPBBeginPacketGroupSelect = 0x0500,
+ kRTPPBEndPacketGroupSelect = 0x0501,
+ kRTPPBBeginPacketSelect = 0x0502,
+ kRTPPBEndPacketSelect = 0x0503,
+ kRTPPBAddPacketLiteralDataSelect = 0x0504,
+ kRTPPBAddPacketSampleDataSelect = 0x0505,
+ kRTPPBAddPacketRepeatedDataSelect = 0x0506,
+ kRTPPBReleaseRepeatedDataSelect = 0x0507,
+ kRTPPBSetPacketSequenceNumberSelect = 0x0508,
+ kRTPPBGetPacketSequenceNumberSelect = 0x0509,
+ kRTPPBSetCallbackSelect = 0x050A,
+ kRTPPBGetCallbackSelect = 0x050B,
+ kRTPPBSetInfoSelect = 0x050C,
+ kRTPPBGetInfoSelect = 0x050D,
+ kRTPPBSetPacketTimeStampOffsetSelect = 0x050E,
+ kRTPPBGetPacketTimeStampOffsetSelect = 0x050F,
+ kRTPPBAddPacketSampleData64Select = 0x0510,
+ kRTPPBGetSampleDataSelect = 0x0511,
+ kRTPPBAddRepeatPacketSelect = 0x0512
+};
+
+/*-----------------------------------------
+ RTP Packet Builder functions
+-----------------------------------------*/
+EXTERN_API( ComponentResult )
+RTPPBBeginPacketGroup (RTPPacketBuilder rtpb,
+ SInt32 inFlags,
+ UInt32 inTimeStamp,
+ RTPPacketGroupRef * outPacketGroup) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0500, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPPBEndPacketGroup (RTPPacketBuilder rtpb,
+ SInt32 inFlags,
+ RTPPacketGroupRef inPacketGroup) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0501, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPPBBeginPacket (RTPPacketBuilder rtpb,
+ SInt32 inFlags,
+ RTPPacketGroupRef inPacketGroup,
+ UInt32 inPacketMediaDataLength,
+ RTPPacketRef * outPacket) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0502, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPPBEndPacket (RTPPacketBuilder rtpb,
+ SInt32 inFlags,
+ RTPPacketGroupRef inPacketGroup,
+ RTPPacketRef inPacket,
+ UInt32 inTransmissionTimeOffset,
+ UInt32 inDuration) FIVEWORDINLINE(0x2F3C, 0x0014, 0x0503, 0x7000, 0xA82A);
+
+/*
+ non-NULL RTPPacketRepeatedDataRef means this data will be repeated later
+ pb must return a repeated data ref
+*/
+EXTERN_API( ComponentResult )
+RTPPBAddPacketLiteralData (RTPPacketBuilder rtpb,
+ SInt32 inFlags,
+ RTPPacketGroupRef inPacketGroup,
+ RTPPacketRef inPacket,
+ UInt8 * inData,
+ UInt32 inDataLength,
+ RTPPacketRepeatedDataRef * outDataRef) FIVEWORDINLINE(0x2F3C, 0x0018, 0x0504, 0x7000, 0xA82A);
+
+/*
+ non-NULL RTPPacketRepeatedDataRef means this data will be repeated later
+ pb must return a repeated data ref
+*/
+EXTERN_API( ComponentResult )
+RTPPBAddPacketSampleData (RTPPacketBuilder rtpb,
+ SInt32 inFlags,
+ RTPPacketGroupRef inPacketGroup,
+ RTPPacketRef inPacket,
+ RTPMPSampleDataParams * inSampleDataParams,
+ UInt32 inSampleOffset,
+ UInt32 inSampleDataLength,
+ RTPPacketRepeatedDataRef * outDataRef) FIVEWORDINLINE(0x2F3C, 0x001C, 0x0505, 0x7000, 0xA82A);
+
+/*
+ non-NULL RTPPacketRepeatedDataRef means this data will be repeated later
+ pb must return a repeated data ref
+*/
+EXTERN_API( ComponentResult )
+RTPPBAddPacketSampleData64 (RTPPacketBuilder rtpb,
+ SInt32 inFlags,
+ RTPPacketGroupRef inPacketGroup,
+ RTPPacketRef inPacket,
+ RTPMPSampleDataParams * inSampleDataParams,
+ const UInt64 * inSampleOffset,
+ UInt32 inSampleDataLength,
+ RTPPacketRepeatedDataRef * outDataRef) FIVEWORDINLINE(0x2F3C, 0x001C, 0x0510, 0x7000, 0xA82A);
+
+/*
+ call to add the repeated data using the ref you got from
+ RTPPBAddPacketLiteralData or RTPPBAddPacketSampleData
+*/
+EXTERN_API( ComponentResult )
+RTPPBAddPacketRepeatedData (RTPPacketBuilder rtpb,
+ SInt32 inFlags,
+ RTPPacketGroupRef inPacketGroup,
+ RTPPacketRef inPacket,
+ RTPPacketRepeatedDataRef inDataRef) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0506, 0x7000, 0xA82A);
+
+/* call when done with repeated data*/
+EXTERN_API( ComponentResult )
+RTPPBReleaseRepeatedData (RTPPacketBuilder rtpb,
+ RTPPacketRepeatedDataRef inDataRef) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0507, 0x7000, 0xA82A);
+
+/*
+ seq number is just relative seq number
+ don't call if you don't care when seq # is used
+*/
+EXTERN_API( ComponentResult )
+RTPPBSetPacketSequenceNumber (RTPPacketBuilder rtpb,
+ SInt32 inFlags,
+ RTPPacketGroupRef inPacketGroup,
+ RTPPacketRef inPacket,
+ UInt32 inSequenceNumber) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0508, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPPBGetPacketSequenceNumber (RTPPacketBuilder rtpb,
+ SInt32 inFlags,
+ RTPPacketGroupRef inPacketGroup,
+ RTPPacketRef inPacket,
+ UInt32 * outSequenceNumber) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0509, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPPBSetPacketTimeStampOffset (RTPPacketBuilder rtpb,
+ SInt32 inFlags,
+ RTPPacketGroupRef inPacketGroup,
+ RTPPacketRef inPacket,
+ SInt32 inTimeStampOffset) FIVEWORDINLINE(0x2F3C, 0x0010, 0x050E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPPBGetPacketTimeStampOffset (RTPPacketBuilder rtpb,
+ SInt32 inFlags,
+ RTPPacketGroupRef inPacketGroup,
+ RTPPacketRef inPacket,
+ SInt32 * outTimeStampOffset) FIVEWORDINLINE(0x2F3C, 0x0010, 0x050F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPPBAddRepeatPacket (RTPPacketBuilder rtpb,
+ SInt32 inFlags,
+ RTPPacketGroupRef inPacketGroup,
+ RTPPacketRef inPacket,
+ TimeValue inTransmissionOffset,
+ UInt32 inSequenceNumber) FIVEWORDINLINE(0x2F3C, 0x0014, 0x0512, 0x7000, 0xA82A);
+
+/*
+ used for communicating with the caller of the media packetizers if needed
+ NOT used for communicating with the media packetizers themselves
+*/
+EXTERN_API( ComponentResult )
+RTPPBSetCallback (RTPPacketBuilder rtpb,
+ RTPPBCallbackUPP inCallback,
+ void * inRefCon) FIVEWORDINLINE(0x2F3C, 0x0008, 0x050A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPPBGetCallback (RTPPacketBuilder rtpb,
+ RTPPBCallbackUPP * outCallback,
+ void ** outRefCon) FIVEWORDINLINE(0x2F3C, 0x0008, 0x050B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPPBSetInfo (RTPPacketBuilder rtpb,
+ OSType inSelector,
+ void * ioParams) FIVEWORDINLINE(0x2F3C, 0x0008, 0x050C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPPBGetInfo (RTPPacketBuilder rtpb,
+ OSType inSelector,
+ void * ioParams) FIVEWORDINLINE(0x2F3C, 0x0008, 0x050D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+RTPPBGetSampleData (RTPPacketBuilder rtpb,
+ RTPMPSampleDataParams * inParams,
+ const UInt64 * inStartOffset,
+ UInt8 * outDataBuffer,
+ UInt32 inBytesToRead,
+ UInt32 * outBytesRead,
+ SInt32 * outFlags) FIVEWORDINLINE(0x2F3C, 0x0018, 0x0511, 0x7000, 0xA82A);
+
+
+/* UPP call backs */
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(RTPMPDataReleaseUPP)
+ NewRTPMPDataReleaseUPP (RTPMPDataReleaseProcPtr userRoutine);
+
+ EXTERN_API(RTPPBCallbackUPP)
+ NewRTPPBCallbackUPP (RTPPBCallbackProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeRTPMPDataReleaseUPP (RTPMPDataReleaseUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeRTPPBCallbackUPP (RTPPBCallbackUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeRTPMPDataReleaseUPP (UInt8 * inData,
+ void * inRefCon,
+ RTPMPDataReleaseUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeRTPPBCallbackUPP (OSType inSelector,
+ void * ioParams,
+ void * inRefCon,
+ RTPPBCallbackUPP userUPP);
+
+#else
+ enum { uppRTPMPDataReleaseProcInfo = 0x000003C0 }; /* pascal no_return_value Func(4_bytes, 4_bytes) */
+ enum { uppRTPPBCallbackProcInfo = 0x00000FC0 }; /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes) */
+ #define NewRTPMPDataReleaseUPP(userRoutine) (RTPMPDataReleaseUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppRTPMPDataReleaseProcInfo, GetCurrentArchitecture())
+ #define NewRTPPBCallbackUPP(userRoutine) (RTPPBCallbackUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppRTPPBCallbackProcInfo, GetCurrentArchitecture())
+ #define DisposeRTPMPDataReleaseUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeRTPPBCallbackUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeRTPMPDataReleaseUPP(inData, inRefCon, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppRTPMPDataReleaseProcInfo, (inData), (inRefCon))
+ #define InvokeRTPPBCallbackUPP(inSelector, ioParams, inRefCon, userUPP) CALL_THREE_PARAMETER_UPP((userUPP), uppRTPPBCallbackProcInfo, (inSelector), (ioParams), (inRefCon))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewRTPMPDataReleaseProc(userRoutine) NewRTPMPDataReleaseUPP(userRoutine)
+#define NewRTPPBCallbackProc(userRoutine) NewRTPPBCallbackUPP(userRoutine)
+#define CallRTPMPDataReleaseProc(userRoutine, inData, inRefCon) InvokeRTPMPDataReleaseUPP(inData, inRefCon, userRoutine)
+#define CallRTPPBCallbackProc(userRoutine, inSelector, ioParams, inRefCon) InvokeRTPPBCallbackUPP(inSelector, ioParams, inRefCon, userRoutine)
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QTSTREAMINGCOMPONENTS__ */
+
diff --git a/include/qt/QuickTimeComponents.h b/include/qt/QuickTimeComponents.h
new file mode 100644
index 000000000..01cf50942
--- /dev/null
+++ b/include/qt/QuickTimeComponents.h
@@ -0,0 +1,5317 @@
+/*
+ File: QuickTimeComponents.h
+
+ Contains: QuickTime Interfaces.
+
+ Version: Technology: QuickTime 6.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1990-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QUICKTIMECOMPONENTS__
+#define __QUICKTIMECOMPONENTS__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+#ifndef __COMPONENTS__
+#include "Components.h"
+#endif
+
+#ifndef __IMAGECOMPRESSION__
+#include "ImageCompression.h"
+#endif
+
+#ifndef __MOVIES__
+#include "Movies.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#ifndef __VIDEO__
+#include "Video.h"
+#endif
+
+#ifndef __SOUND__
+#include "Sound.h"
+#endif
+
+#ifndef __QUICKTIMEMUSIC__
+#include "QuickTimeMusic.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ clockComponentType = FOUR_CHAR_CODE('clok'),
+ systemTickClock = FOUR_CHAR_CODE('tick'), /* subtype: 60ths since boot */
+ systemSecondClock = FOUR_CHAR_CODE('seco'), /* subtype: seconds since 1904 */
+ systemMillisecondClock = FOUR_CHAR_CODE('mill'), /* subtype: 1000ths since boot */
+ systemMicrosecondClock = FOUR_CHAR_CODE('micr') /* subtype: 1000000ths since boot */
+};
+
+enum {
+ kClockRateIsLinear = 1,
+ kClockImplementsCallBacks = 2,
+ kClockCanHandleIntermittentSound = 4 /* sound clocks only */
+};
+
+#if OLDROUTINENAMES
+#define GetClockTime(aClock, out) ClockGetTime(aClock, out)
+#endif
+/** These are Clock procedures **/
+EXTERN_API( ComponentResult )
+ClockGetTime (ComponentInstance aClock,
+ TimeRecord * out) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0001, 0x7000, 0xA82A);
+
+
+EXTERN_API( QTCallBack )
+ClockNewCallBack (ComponentInstance aClock,
+ TimeBase tb,
+ short callBackType) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0002, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ClockDisposeCallBack (ComponentInstance aClock,
+ QTCallBack cb) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0003, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ClockCallMeWhen (ComponentInstance aClock,
+ QTCallBack cb,
+ long param1,
+ long param2,
+ long param3) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0004, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ClockCancelCallBack (ComponentInstance aClock,
+ QTCallBack cb) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0005, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ClockRateChanged (ComponentInstance aClock,
+ QTCallBack cb) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0006, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ClockTimeChanged (ComponentInstance aClock,
+ QTCallBack cb) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0007, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ClockSetTimeBase (ComponentInstance aClock,
+ TimeBase tb) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0008, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ClockStartStopChanged (ComponentInstance aClock,
+ QTCallBack cb,
+ Boolean startChanged,
+ Boolean stopChanged) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0009, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ClockGetRate (ComponentInstance aClock,
+ Fixed * rate) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000A, 0x7000, 0xA82A);
+
+
+
+
+enum {
+ StandardCompressionType = FOUR_CHAR_CODE('scdi'),
+ StandardCompressionSubType = FOUR_CHAR_CODE('imag'),
+ StandardCompressionSubTypeSound = FOUR_CHAR_CODE('soun')
+};
+
+
+typedef CALLBACK_API( Boolean , SCModalFilterProcPtr )(DialogRef theDialog, EventRecord *theEvent, short *itemHit, long refcon);
+typedef CALLBACK_API( short , SCModalHookProcPtr )(DialogRef theDialog, short itemHit, void *params, long refcon);
+typedef STACK_UPP_TYPE(SCModalFilterProcPtr) SCModalFilterUPP;
+typedef STACK_UPP_TYPE(SCModalHookProcPtr) SCModalHookUPP;
+/* Preference flags.*/
+enum {
+ scListEveryCodec = 1L << 1,
+ scAllowZeroFrameRate = 1L << 2,
+ scAllowZeroKeyFrameRate = 1L << 3,
+ scShowBestDepth = 1L << 4,
+ scUseMovableModal = 1L << 5,
+ scDisableFrameRateItem = 1L << 6,
+ scShowDataRateAsKilobits = 1L << 7
+};
+
+
+/* Possible test flags for setting test image.*/
+enum {
+ scPreferCropping = 1 << 0,
+ scPreferScaling = 1 << 1,
+ scPreferScalingAndCropping = scPreferScaling | scPreferCropping,
+ scDontDetermineSettingsFromTestImage = 1 << 2
+};
+
+
+/* Dimensions of the image preview box.*/
+enum {
+ scTestImageWidth = 80,
+ scTestImageHeight = 80
+};
+
+/* Possible items returned by hookProc.*/
+enum {
+ scOKItem = 1,
+ scCancelItem = 2,
+ scCustomItem = 3
+};
+
+/* Result returned when user cancelled.*/
+enum {
+ scUserCancelled = 1
+};
+
+
+
+/* Component selectors*/
+enum {
+ scPositionRect = 2,
+ scPositionDialog = 3,
+ scSetTestImagePictHandle = 4,
+ scSetTestImagePictFile = 5,
+ scSetTestImagePixMap = 6,
+ scGetBestDeviceRect = 7,
+ scRequestImageSettings = 10,
+ scCompressImage = 11,
+ scCompressPicture = 12,
+ scCompressPictureFile = 13,
+ scRequestSequenceSettings = 14,
+ scCompressSequenceBegin = 15,
+ scCompressSequenceFrame = 16,
+ scCompressSequenceEnd = 17,
+ scDefaultPictHandleSettings = 18,
+ scDefaultPictFileSettings = 19,
+ scDefaultPixMapSettings = 20,
+ scGetInfo = 21,
+ scSetInfo = 22,
+ scNewGWorld = 23
+};
+
+/* Get/SetInfo structures.*/
+
+
+struct SCSpatialSettings {
+ CodecType codecType;
+ CodecComponent codec;
+ short depth;
+ CodecQ spatialQuality;
+};
+typedef struct SCSpatialSettings SCSpatialSettings;
+
+struct SCTemporalSettings {
+ CodecQ temporalQuality;
+ Fixed frameRate;
+ long keyFrameRate;
+};
+typedef struct SCTemporalSettings SCTemporalSettings;
+
+struct SCDataRateSettings {
+ long dataRate;
+ long frameDuration;
+ CodecQ minSpatialQuality;
+ CodecQ minTemporalQuality;
+};
+typedef struct SCDataRateSettings SCDataRateSettings;
+
+struct SCExtendedProcs {
+ SCModalFilterUPP filterProc;
+ SCModalHookUPP hookProc;
+ long refcon;
+ Str31 customName;
+};
+typedef struct SCExtendedProcs SCExtendedProcs;
+/* Get/SetInfo selectors*/
+enum {
+ scSpatialSettingsType = FOUR_CHAR_CODE('sptl'), /* pointer to SCSpatialSettings struct*/
+ scTemporalSettingsType = FOUR_CHAR_CODE('tprl'), /* pointer to SCTemporalSettings struct*/
+ scDataRateSettingsType = FOUR_CHAR_CODE('drat'), /* pointer to SCDataRateSettings struct*/
+ scColorTableType = FOUR_CHAR_CODE('clut'), /* pointer to CTabHandle*/
+ scProgressProcType = FOUR_CHAR_CODE('prog'), /* pointer to ProgressRecord struct*/
+ scExtendedProcsType = FOUR_CHAR_CODE('xprc'), /* pointer to SCExtendedProcs struct*/
+ scPreferenceFlagsType = FOUR_CHAR_CODE('pref'), /* pointer to long*/
+ scSettingsStateType = FOUR_CHAR_CODE('ssta'), /* pointer to Handle*/
+ scSequenceIDType = FOUR_CHAR_CODE('sequ'), /* pointer to ImageSequence*/
+ scWindowPositionType = FOUR_CHAR_CODE('wndw'), /* pointer to Point*/
+ scCodecFlagsType = FOUR_CHAR_CODE('cflg'), /* pointer to CodecFlags*/
+ scCodecSettingsType = FOUR_CHAR_CODE('cdec'), /* pointer to Handle*/
+ scForceKeyValueType = FOUR_CHAR_CODE('ksim'), /* pointer to long*/
+ scSoundSampleRateType = FOUR_CHAR_CODE('ssrt'), /* pointer to UnsignedFixed*/
+ scSoundSampleSizeType = FOUR_CHAR_CODE('ssss'), /* pointer to short*/
+ scSoundChannelCountType = FOUR_CHAR_CODE('sscc'), /* pointer to short*/
+ scSoundCompressionType = FOUR_CHAR_CODE('ssct'), /* pointer to OSType*/
+ scCompressionListType = FOUR_CHAR_CODE('ctyl'), /* pointer to OSType Handle*/
+ scCodecManufacturerType = FOUR_CHAR_CODE('cmfr'), /* pointer to OSType*/
+ scSoundVBRCompressionOK = FOUR_CHAR_CODE('cvbr'), /* pointer to Boolean*/
+ scSoundInputSampleRateType = FOUR_CHAR_CODE('ssir'), /* pointer to UnsignedFixed*/
+ scSoundSampleRateChangeOK = FOUR_CHAR_CODE('rcok'), /* pointer to Boolean*/
+ scAvailableCompressionListType = FOUR_CHAR_CODE('avai') /* pointer to OSType Handle*/
+};
+
+/* scTypeNotFoundErr returned by Get/SetInfo when type cannot be found.*/
+
+
+
+struct SCParams {
+ long flags;
+ CodecType theCodecType;
+ CodecComponent theCodec;
+ CodecQ spatialQuality;
+ CodecQ temporalQuality;
+ short depth;
+ Fixed frameRate;
+ long keyFrameRate;
+ long reserved1;
+ long reserved2;
+};
+typedef struct SCParams SCParams;
+enum {
+ scGetCompression = 1,
+ scShowMotionSettings = 1L << 0,
+ scSettingsChangedItem = -1
+};
+
+enum {
+ scCompressFlagIgnoreIdenticalFrames = 1
+};
+
+/* QTAtomTypes for atoms found in settings atom containers*/
+enum {
+ kQTSettingsVideo = FOUR_CHAR_CODE('vide'), /* Container for video/image compression related atoms (Get/SetInfo selectors)*/
+ kQTSettingsSound = FOUR_CHAR_CODE('soun'), /* Container for sound compression related atoms (Get/SetInfo selectors)*/
+ kQTSettingsComponentVersion = FOUR_CHAR_CODE('vers') /* . Version of component that wrote settings (QTSettingsVersionAtomRecord)*/
+};
+
+/* Format of 'vers' atom found in settings atom containers*/
+
+struct QTSettingsVersionAtomRecord {
+ long componentVersion; /* standard compression component version*/
+ short flags; /* low bit is 1 if little endian platform, 0 if big endian platform*/
+ short reserved; /* should be 0*/
+};
+typedef struct QTSettingsVersionAtomRecord QTSettingsVersionAtomRecord;
+#define SCGetCompression(ci, params, where) SCGetCompressionExtended(ci,params,where,0,0,0,0)
+/** These are Progress procedures **/
+EXTERN_API( ComponentResult )
+SCGetCompressionExtended (ComponentInstance ci,
+ SCParams * params,
+ Point where,
+ SCModalFilterUPP filterProc,
+ SCModalHookUPP hookProc,
+ long refcon,
+ StringPtr customName) FIVEWORDINLINE(0x2F3C, 0x0018, 0x0001, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SCPositionRect (ComponentInstance ci,
+ Rect * rp,
+ Point * where) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0002, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SCPositionDialog (ComponentInstance ci,
+ short id,
+ Point * where) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0003, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SCSetTestImagePictHandle (ComponentInstance ci,
+ PicHandle testPict,
+ Rect * testRect,
+ short testFlags) FIVEWORDINLINE(0x2F3C, 0x000A, 0x0004, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SCSetTestImagePictFile (ComponentInstance ci,
+ short testFileRef,
+ Rect * testRect,
+ short testFlags) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0005, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SCSetTestImagePixMap (ComponentInstance ci,
+ PixMapHandle testPixMap,
+ Rect * testRect,
+ short testFlags) FIVEWORDINLINE(0x2F3C, 0x000A, 0x0006, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SCGetBestDeviceRect (ComponentInstance ci,
+ Rect * r) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0007, 0x7000, 0xA82A);
+
+
+EXTERN_API( ComponentResult )
+SCRequestImageSettings (ComponentInstance ci) FIVEWORDINLINE(0x2F3C, 0x0000, 0x000A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SCCompressImage (ComponentInstance ci,
+ PixMapHandle src,
+ const Rect * srcRect,
+ ImageDescriptionHandle * desc,
+ Handle * data) FIVEWORDINLINE(0x2F3C, 0x0010, 0x000B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SCCompressPicture (ComponentInstance ci,
+ PicHandle srcPicture,
+ PicHandle dstPicture) FIVEWORDINLINE(0x2F3C, 0x0008, 0x000C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SCCompressPictureFile (ComponentInstance ci,
+ short srcRefNum,
+ short dstRefNum) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SCRequestSequenceSettings (ComponentInstance ci) FIVEWORDINLINE(0x2F3C, 0x0000, 0x000E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SCCompressSequenceBegin (ComponentInstance ci,
+ PixMapHandle src,
+ const Rect * srcRect,
+ ImageDescriptionHandle * desc) FIVEWORDINLINE(0x2F3C, 0x000C, 0x000F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SCCompressSequenceFrame (ComponentInstance ci,
+ PixMapHandle src,
+ const Rect * srcRect,
+ Handle * data,
+ long * dataSize,
+ short * notSyncFlag) FIVEWORDINLINE(0x2F3C, 0x0014, 0x0010, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SCCompressSequenceEnd (ComponentInstance ci) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0011, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SCDefaultPictHandleSettings (ComponentInstance ci,
+ PicHandle srcPicture,
+ short motion) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0012, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SCDefaultPictFileSettings (ComponentInstance ci,
+ short srcRef,
+ short motion) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0013, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SCDefaultPixMapSettings (ComponentInstance ci,
+ PixMapHandle src,
+ short motion) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0014, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SCGetInfo (ComponentInstance ci,
+ OSType infoType,
+ void * info) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0015, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SCSetInfo (ComponentInstance ci,
+ OSType infoType,
+ void * info) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0016, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SCNewGWorld (ComponentInstance ci,
+ GWorldPtr * gwp,
+ Rect * rp,
+ GWorldFlags flags) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0017, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SCSetCompressFlags (ComponentInstance ci,
+ long flags) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0018, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SCGetCompressFlags (ComponentInstance ci,
+ long * flags) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0019, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SCGetSettingsAsText (ComponentInstance ci,
+ Handle * text) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SCGetSettingsAsAtomContainer (ComponentInstance ci,
+ QTAtomContainer * settings) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SCSetSettingsFromAtomContainer (ComponentInstance ci,
+ QTAtomContainer settings) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001C, 0x7000, 0xA82A);
+
+/* Note: if you're using SCCompressSequenceFrameAsync with a scForceKeyValue setting, you must call SCAsyncIdle occasionally at main task time. */
+EXTERN_API( ComponentResult )
+SCCompressSequenceFrameAsync (ComponentInstance ci,
+ PixMapHandle src,
+ const Rect * srcRect,
+ Handle * data,
+ long * dataSize,
+ short * notSyncFlag,
+ ICMCompletionProcRecordPtr asyncCompletionProc) FIVEWORDINLINE(0x2F3C, 0x0018, 0x001D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SCAsyncIdle (ComponentInstance ci) FIVEWORDINLINE(0x2F3C, 0x0000, 0x001E, 0x7000, 0xA82A);
+
+
+
+
+enum {
+ TweenComponentType = FOUR_CHAR_CODE('twen')
+};
+
+
+typedef ComponentInstance TweenerComponent;
+EXTERN_API( ComponentResult )
+TweenerInitialize (TweenerComponent tc,
+ QTAtomContainer container,
+ QTAtom tweenAtom,
+ QTAtom dataAtom) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0001, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TweenerDoTween (TweenerComponent tc,
+ TweenRecord * tr) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0002, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TweenerReset (TweenerComponent tc) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0003, 0x7000, 0xA82A);
+
+
+
+enum {
+ TCSourceRefNameType = FOUR_CHAR_CODE('name')
+};
+
+enum {
+ tcDropFrame = 1 << 0,
+ tc24HourMax = 1 << 1,
+ tcNegTimesOK = 1 << 2,
+ tcCounter = 1 << 3
+};
+
+
+struct TimeCodeDef {
+ long flags; /* drop-frame, etc.*/
+ TimeScale fTimeScale; /* time scale of frameDuration (eg. 2997)*/
+ TimeValue frameDuration; /* duration of each frame (eg. 100)*/
+ UInt8 numFrames; /* frames/sec for timecode (eg. 30) OR frames/tick for counter mode*/
+ UInt8 padding; /* unused padding byte*/
+};
+typedef struct TimeCodeDef TimeCodeDef;
+enum {
+ tctNegFlag = 0x80 /* negative bit is in minutes*/
+};
+
+
+struct TimeCodeTime {
+ UInt8 hours;
+ UInt8 minutes;
+ UInt8 seconds;
+ UInt8 frames;
+};
+typedef struct TimeCodeTime TimeCodeTime;
+
+struct TimeCodeCounter {
+ long counter;
+};
+typedef struct TimeCodeCounter TimeCodeCounter;
+
+union TimeCodeRecord {
+ TimeCodeTime t;
+ TimeCodeCounter c;
+};
+typedef union TimeCodeRecord TimeCodeRecord;
+
+struct TimeCodeDescription {
+ long descSize; /* standard sample description header*/
+ long dataFormat;
+ long resvd1;
+ short resvd2;
+ short dataRefIndex;
+ long flags; /* timecode specific stuff*/
+ TimeCodeDef timeCodeDef;
+ long srcRef[1];
+};
+typedef struct TimeCodeDescription TimeCodeDescription;
+typedef TimeCodeDescription * TimeCodeDescriptionPtr;
+typedef TimeCodeDescriptionPtr * TimeCodeDescriptionHandle;
+enum {
+ tcdfShowTimeCode = 1 << 0
+};
+
+
+
+struct TCTextOptions {
+ short txFont;
+ short txFace;
+ short txSize;
+ short pad; /* let's make it longword aligned - thanks.. */
+ RGBColor foreColor;
+ RGBColor backColor;
+};
+typedef struct TCTextOptions TCTextOptions;
+typedef TCTextOptions * TCTextOptionsPtr;
+EXTERN_API( HandlerError )
+TCGetCurrentTimeCode (MediaHandler mh,
+ long * frameNum,
+ TimeCodeDef * tcdef,
+ TimeCodeRecord * tcrec,
+ UserData * srcRefH) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0101, 0x7000, 0xA82A);
+
+EXTERN_API( HandlerError )
+TCGetTimeCodeAtTime (MediaHandler mh,
+ TimeValue mediaTime,
+ long * frameNum,
+ TimeCodeDef * tcdef,
+ TimeCodeRecord * tcdata,
+ UserData * srcRefH) FIVEWORDINLINE(0x2F3C, 0x0014, 0x0102, 0x7000, 0xA82A);
+
+EXTERN_API( HandlerError )
+TCTimeCodeToString (MediaHandler mh,
+ TimeCodeDef * tcdef,
+ TimeCodeRecord * tcrec,
+ StringPtr tcStr) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0103, 0x7000, 0xA82A);
+
+EXTERN_API( HandlerError )
+TCTimeCodeToFrameNumber (MediaHandler mh,
+ TimeCodeDef * tcdef,
+ TimeCodeRecord * tcrec,
+ long * frameNumber) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0104, 0x7000, 0xA82A);
+
+EXTERN_API( HandlerError )
+TCFrameNumberToTimeCode (MediaHandler mh,
+ long frameNumber,
+ TimeCodeDef * tcdef,
+ TimeCodeRecord * tcrec) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0105, 0x7000, 0xA82A);
+
+EXTERN_API( HandlerError )
+TCGetSourceRef (MediaHandler mh,
+ TimeCodeDescriptionHandle tcdH,
+ UserData * srefH) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0106, 0x7000, 0xA82A);
+
+EXTERN_API( HandlerError )
+TCSetSourceRef (MediaHandler mh,
+ TimeCodeDescriptionHandle tcdH,
+ UserData srefH) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0107, 0x7000, 0xA82A);
+
+EXTERN_API( HandlerError )
+TCSetTimeCodeFlags (MediaHandler mh,
+ long flags,
+ long flagsMask) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0108, 0x7000, 0xA82A);
+
+EXTERN_API( HandlerError )
+TCGetTimeCodeFlags (MediaHandler mh,
+ long * flags) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0109, 0x7000, 0xA82A);
+
+EXTERN_API( HandlerError )
+TCSetDisplayOptions (MediaHandler mh,
+ TCTextOptionsPtr textOptions) FIVEWORDINLINE(0x2F3C, 0x0004, 0x010A, 0x7000, 0xA82A);
+
+EXTERN_API( HandlerError )
+TCGetDisplayOptions (MediaHandler mh,
+ TCTextOptionsPtr textOptions) FIVEWORDINLINE(0x2F3C, 0x0004, 0x010B, 0x7000, 0xA82A);
+
+
+
+
+typedef ComponentInstance MovieImportComponent;
+typedef ComponentInstance MovieExportComponent;
+enum {
+ MovieImportType = FOUR_CHAR_CODE('eat '),
+ MovieExportType = FOUR_CHAR_CODE('spit')
+};
+
+enum {
+ canMovieImportHandles = 1 << 0,
+ canMovieImportFiles = 1 << 1,
+ hasMovieImportUserInterface = 1 << 2,
+ canMovieExportHandles = 1 << 3,
+ canMovieExportFiles = 1 << 4,
+ hasMovieExportUserInterface = 1 << 5,
+ movieImporterIsXMLBased = 1 << 5,
+ dontAutoFileMovieImport = 1 << 6,
+ canMovieExportAuxDataHandle = 1 << 7,
+ canMovieImportValidateHandles = 1 << 8,
+ canMovieImportValidateFile = 1 << 9,
+ dontRegisterWithEasyOpen = 1 << 10,
+ canMovieImportInPlace = 1 << 11,
+ movieImportSubTypeIsFileExtension = 1 << 12,
+ canMovieImportPartial = 1 << 13,
+ hasMovieImportMIMEList = 1 << 14,
+ canMovieImportAvoidBlocking = 1 << 15,
+ canMovieExportFromProcedures = 1 << 15,
+ canMovieExportValidateMovie = 1L << 16,
+ movieImportMustGetDestinationMediaType = 1L << 16,
+ movieExportNeedsResourceFork = 1L << 17,
+ canMovieImportDataReferences = 1L << 18,
+ movieExportMustGetSourceMediaType = 1L << 19,
+ canMovieImportWithIdle = 1L << 20,
+ canMovieImportValidateDataReferences = 1L << 21,
+ reservedForUseByGraphicsImporters = 1L << 23
+};
+
+enum {
+ movieImportCreateTrack = 1,
+ movieImportInParallel = 2,
+ movieImportMustUseTrack = 4,
+ movieImportWithIdle = 16
+};
+
+enum {
+ movieImportResultUsedMultipleTracks = 8,
+ movieImportResultNeedIdles = 32,
+ movieImportResultComplete = 64
+};
+
+enum {
+ kMovieExportTextOnly = 0,
+ kMovieExportAbsoluteTime = 1,
+ kMovieExportRelativeTime = 2
+};
+
+enum {
+ kMIDIImportSilenceBefore = 1 << 0,
+ kMIDIImportSilenceAfter = 1 << 1,
+ kMIDIImport20Playable = 1 << 2,
+ kMIDIImportWantLyrics = 1 << 3
+};
+
+
+enum {
+ kQTMediaConfigResourceType = FOUR_CHAR_CODE('mcfg'),
+ kQTMediaConfigResourceVersion = 2,
+ kQTMediaGroupResourceType = FOUR_CHAR_CODE('mgrp'),
+ kQTMediaGroupResourceVersion = 1,
+ kQTBrowserInfoResourceType = FOUR_CHAR_CODE('brws'),
+ kQTBrowserInfoResourceVersion = 1
+};
+
+
+enum {
+ kQTMediaMIMEInfoHasChanged = (1L << 1), /* the MIME type(s) is(are) new or has changed since the last time */
+ /* someone asked about it */
+ kQTMediaFileInfoHasChanged = (1L << 2), /* the file extension(s) is(are) new or has changed since the last time */
+ /* anyone asked about it */
+ kQTMediaConfigCanUseApp = (1L << 18), /* this MIME type can be configured to use app */
+ kQTMediaConfigCanUsePlugin = (1L << 19), /* this MIME type can be configured to use plug-in */
+ kQTMediaConfigUNUSED = (1L << 20), /* currently unused */
+ kQTMediaConfigBinaryFile = (1L << 23), /* file should be transfered in binary mode */
+ kQTMediaConfigTextFile = 0, /* not a bit, defined for clarity */
+ kQTMediaConfigMacintoshFile = (1L << 24), /* file's resource fork is significant */
+ kQTMediaConfigAssociateByDefault = (1L << 27), /* take this file association by default */
+ kQTMediaConfigUseAppByDefault = (1L << 28), /* use the app by default for this MIME type */
+ kQTMediaConfigUsePluginByDefault = (1L << 29), /* use the plug-in by default for this MIME type */
+ kQTMediaConfigDefaultsMask = (kQTMediaConfigUseAppByDefault | kQTMediaConfigUsePluginByDefault),
+ kQTMediaConfigDefaultsShift = 12, /* ((flags & kQTMediaConfigDefaultsMask) >> kQTMediaConfigDefaultsShift) to get default setting */
+ kQTMediaConfigHasFileHasQTAtoms = (1L << 30) /* the file has a "QuickTime like" file format */
+};
+
+
+/* mime type group constants for groupID field of 'mcfg' resource*/
+enum {
+ kQTMediaConfigStreamGroupID = FOUR_CHAR_CODE('strm'),
+ kQTMediaConfigInteractiveGroupID = FOUR_CHAR_CODE('intr'),
+ kQTMediaConfigVideoGroupID = FOUR_CHAR_CODE('eyes'),
+ kQTMediaConfigAudioGroupID = FOUR_CHAR_CODE('ears'),
+ kQTMediaConfigMPEGGroupID = FOUR_CHAR_CODE('mpeg'),
+ kQTMediaConfigMP3GroupID = FOUR_CHAR_CODE('mp3 '),
+ kQTMediaConfigImageGroupID = FOUR_CHAR_CODE('ogle'),
+ kQTMediaConfigMiscGroupID = FOUR_CHAR_CODE('misc')
+};
+
+/* file type group constants for groupID field of 'mcfg' resource*/
+enum {
+ kQTMediaInfoNetGroup = FOUR_CHAR_CODE('net '),
+ kQTMediaInfoWinGroup = FOUR_CHAR_CODE('win '),
+ kQTMediaInfoMacGroup = FOUR_CHAR_CODE('mac '),
+ kQTMediaInfoMiscGroup = 0x3F3F3F3F /* '????'*/
+};
+
+
+
+enum {
+ kMimeInfoMimeTypeTag = FOUR_CHAR_CODE('mime'),
+ kMimeInfoFileExtensionTag = FOUR_CHAR_CODE('ext '),
+ kMimeInfoDescriptionTag = FOUR_CHAR_CODE('desc'),
+ kMimeInfoGroupTag = FOUR_CHAR_CODE('grop'),
+ kMimeInfoDoNotOverrideExistingFileTypeAssociation = FOUR_CHAR_CODE('nofa')
+};
+
+enum {
+ kQTFileTypeAIFF = FOUR_CHAR_CODE('AIFF'),
+ kQTFileTypeAIFC = FOUR_CHAR_CODE('AIFC'),
+ kQTFileTypeDVC = FOUR_CHAR_CODE('dvc!'),
+ kQTFileTypeMIDI = FOUR_CHAR_CODE('Midi'),
+ kQTFileTypePicture = FOUR_CHAR_CODE('PICT'),
+ kQTFileTypeMovie = FOUR_CHAR_CODE('MooV'),
+ kQTFileTypeText = FOUR_CHAR_CODE('TEXT'),
+ kQTFileTypeWave = FOUR_CHAR_CODE('WAVE'),
+ kQTFileTypeSystemSevenSound = FOUR_CHAR_CODE('sfil'),
+ kQTFileTypeMuLaw = FOUR_CHAR_CODE('ULAW'),
+ kQTFileTypeAVI = FOUR_CHAR_CODE('VfW '),
+ kQTFileTypeSoundDesignerII = FOUR_CHAR_CODE('Sd2f'),
+ kQTFileTypeAudioCDTrack = FOUR_CHAR_CODE('trak'),
+ kQTFileTypePICS = FOUR_CHAR_CODE('PICS'),
+ kQTFileTypeGIF = FOUR_CHAR_CODE('GIFf'),
+ kQTFileTypePNG = FOUR_CHAR_CODE('PNGf'),
+ kQTFileTypeTIFF = FOUR_CHAR_CODE('TIFF'),
+ kQTFileTypePhotoShop = FOUR_CHAR_CODE('8BPS'),
+ kQTFileTypeSGIImage = FOUR_CHAR_CODE('.SGI'),
+ kQTFileTypeBMP = FOUR_CHAR_CODE('BMPf'),
+ kQTFileTypeJPEG = FOUR_CHAR_CODE('JPEG'),
+ kQTFileTypeJFIF = FOUR_CHAR_CODE('JPEG'),
+ kQTFileTypeMacPaint = FOUR_CHAR_CODE('PNTG'),
+ kQTFileTypeTargaImage = FOUR_CHAR_CODE('TPIC'),
+ kQTFileTypeQuickDrawGXPicture = FOUR_CHAR_CODE('qdgx'),
+ kQTFileTypeQuickTimeImage = FOUR_CHAR_CODE('qtif'),
+ kQTFileType3DMF = FOUR_CHAR_CODE('3DMF'),
+ kQTFileTypeFLC = FOUR_CHAR_CODE('FLC '),
+ kQTFileTypeFlash = FOUR_CHAR_CODE('SWFL'),
+ kQTFileTypeFlashPix = FOUR_CHAR_CODE('FPix'),
+ kQTFileTypeMP4 = FOUR_CHAR_CODE('mpg4')
+};
+
+/* QTAtomTypes for atoms in import/export settings containers*/
+enum {
+ kQTSettingsDVExportNTSC = FOUR_CHAR_CODE('dvcv'), /* True is export as NTSC, false is export as PAL. (Boolean)*/
+ kQTSettingsDVExportLockedAudio = FOUR_CHAR_CODE('lock'), /* True if audio locked to video. (Boolean)*/
+ kQTSettingsEffect = FOUR_CHAR_CODE('effe'), /* Parent atom whose contents are atoms of an effects description*/
+ kQTSettingsGraphicsFileImportSequence = FOUR_CHAR_CODE('sequ'), /* Parent atom of graphic file movie import component*/
+ kQTSettingsGraphicsFileImportSequenceEnabled = FOUR_CHAR_CODE('enab'), /* . If true, import numbered image sequence (Boolean)*/
+ kQTSettingsMovieExportEnableVideo = FOUR_CHAR_CODE('envi'), /* Enable exporting of video track (Boolean)*/
+ kQTSettingsMovieExportEnableSound = FOUR_CHAR_CODE('enso'), /* Enable exporting of sound track (Boolean)*/
+ kQTSettingsMovieExportSaveOptions = FOUR_CHAR_CODE('save'), /* Parent atom of save options*/
+ kQTSettingsMovieExportSaveForInternet = FOUR_CHAR_CODE('fast'), /* . Save for Internet*/
+ kQTSettingsMovieExportSaveCompressedMovie = FOUR_CHAR_CODE('cmpm'), /* . Save compressed movie resource*/
+ kQTSettingsMIDI = FOUR_CHAR_CODE('MIDI'), /* MIDI import related container*/
+ kQTSettingsMIDISettingFlags = FOUR_CHAR_CODE('sttg'), /* . MIDI import settings (UInt32)*/
+ kQTSettingsText = FOUR_CHAR_CODE('text'), /* Text related container*/
+ kQTSettingsTextDescription = FOUR_CHAR_CODE('desc'), /* . Text import settings (TextDescription record)*/
+ kQTSettingsTextSize = FOUR_CHAR_CODE('size'), /* . Width/height to create during import (FixedPoint)*/
+ kQTSettingsTextSettingFlags = FOUR_CHAR_CODE('sttg'), /* . Text export settings (UInt32)*/
+ kQTSettingsTextTimeFraction = FOUR_CHAR_CODE('timf'), /* . Movie time fraction for export (UInt32)*/
+ kQTSettingsTime = FOUR_CHAR_CODE('time'), /* Time related container*/
+ kQTSettingsTimeDuration = FOUR_CHAR_CODE('dura'), /* . Time related container*/
+ kQTSettingsAudioCDTrack = FOUR_CHAR_CODE('trak'), /* Audio CD track related container*/
+ kQTSettingsAudioCDTrackRateShift = FOUR_CHAR_CODE('rshf'), /* . Rate shift to be performed (SInt16)*/
+ kQTSettingsDVExportDVFormat = FOUR_CHAR_CODE('dvcf') /* Exported DV Format, DV('dv ') or DVCPRO('dvp '). (OSType)*/
+};
+
+
+
+
+
+struct MovieExportGetDataParams {
+ long recordSize;
+
+ long trackID;
+
+ TimeScale sourceTimeScale;
+ TimeValue requestedTime;
+ TimeValue actualTime;
+
+ Ptr dataPtr;
+ long dataSize;
+
+ SampleDescriptionHandle desc;
+ OSType descType;
+ long descSeed;
+
+ long requestedSampleCount;
+ long actualSampleCount;
+ TimeValue durationPerSample;
+ long sampleFlags;
+};
+typedef struct MovieExportGetDataParams MovieExportGetDataParams;
+typedef CALLBACK_API( OSErr , MovieExportGetDataProcPtr )(void *refCon, MovieExportGetDataParams *params);
+typedef CALLBACK_API( OSErr , MovieExportGetPropertyProcPtr )(void *refcon, long trackID, OSType propertyType, void *propertyValue);
+enum {
+ kQTPresetsListResourceType = FOUR_CHAR_CODE('stg#'),
+ kQTPresetsPlatformListResourceType = FOUR_CHAR_CODE('stgp')
+};
+
+enum {
+ kQTPresetInfoIsDivider = 1
+};
+
+
+struct QTPresetInfo {
+ OSType presetKey; /* unique key for this preset in presetsArray */
+ UInt32 presetFlags; /* flags about this preset */
+ OSType settingsResourceType; /* resource type of settings resource */
+ SInt16 settingsResourceID; /* resource id of settings resource */
+ SInt16 padding1;
+ SInt16 nameStringListID; /* name string list resource id */
+ SInt16 nameStringIndex; /* name string index */
+ SInt16 infoStringListID; /* info string list resource id */
+ SInt16 infoStringIndex; /* info string index */
+};
+typedef struct QTPresetInfo QTPresetInfo;
+
+struct QTPresetListRecord {
+ UInt32 flags; /* flags for whole list */
+ UInt32 count; /* number of elements in presetsArray */
+ UInt32 reserved;
+ QTPresetInfo presetsArray[1]; /* info about each preset */
+};
+typedef struct QTPresetListRecord QTPresetListRecord;
+enum {
+ kQTMovieExportSourceInfoResourceType = FOUR_CHAR_CODE('src#'),
+ kQTMovieExportSourceInfoIsMediaType = 1L << 0,
+ kQTMovieExportSourceInfoIsMediaCharacteristic = 1L << 1,
+ kQTMovieExportSourceInfoIsSourceType = 1L << 2
+};
+
+
+struct QTMovieExportSourceInfo {
+ OSType mediaType; /* Media type of source */
+ UInt16 minCount; /* min number of sources of this kind required, zero if none required */
+ UInt16 maxCount; /* max number of sources of this kind allowed, -1 if unlimited allowed */
+ long flags; /* reserved for flags */
+};
+typedef struct QTMovieExportSourceInfo QTMovieExportSourceInfo;
+
+struct QTMovieExportSourceRecord {
+ long count;
+ long reserved;
+ QTMovieExportSourceInfo sourceArray[1];
+};
+typedef struct QTMovieExportSourceRecord QTMovieExportSourceRecord;
+typedef STACK_UPP_TYPE(MovieExportGetDataProcPtr) MovieExportGetDataUPP;
+typedef STACK_UPP_TYPE(MovieExportGetPropertyProcPtr) MovieExportGetPropertyUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(SCModalFilterUPP)
+ NewSCModalFilterUPP (SCModalFilterProcPtr userRoutine);
+
+ EXTERN_API(SCModalHookUPP)
+ NewSCModalHookUPP (SCModalHookProcPtr userRoutine);
+
+ EXTERN_API(MovieExportGetDataUPP)
+ NewMovieExportGetDataUPP (MovieExportGetDataProcPtr userRoutine);
+
+ EXTERN_API(MovieExportGetPropertyUPP)
+ NewMovieExportGetPropertyUPP (MovieExportGetPropertyProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeSCModalFilterUPP (SCModalFilterUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeSCModalHookUPP (SCModalHookUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeMovieExportGetDataUPP (MovieExportGetDataUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeMovieExportGetPropertyUPP (MovieExportGetPropertyUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeSCModalFilterUPP (DialogRef theDialog,
+ EventRecord * theEvent,
+ short * itemHit,
+ long refcon,
+ SCModalFilterUPP userUPP);
+
+ EXTERN_API(short)
+ InvokeSCModalHookUPP (DialogRef theDialog,
+ short itemHit,
+ void * params,
+ long refcon,
+ SCModalHookUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeMovieExportGetDataUPP (void * refCon,
+ MovieExportGetDataParams * params,
+ MovieExportGetDataUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeMovieExportGetPropertyUPP (void * refcon,
+ long trackID,
+ OSType propertyType,
+ void * propertyValue,
+ MovieExportGetPropertyUPP userUPP);
+
+#else
+ enum { uppSCModalFilterProcInfo = 0x00003FD0 }; /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppSCModalHookProcInfo = 0x00003EE0 }; /* pascal 2_bytes Func(4_bytes, 2_bytes, 4_bytes, 4_bytes) */
+ enum { uppMovieExportGetDataProcInfo = 0x000003E0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes) */
+ enum { uppMovieExportGetPropertyProcInfo = 0x00003FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewSCModalFilterUPP(userRoutine) (SCModalFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSCModalFilterProcInfo, GetCurrentArchitecture())
+ #define NewSCModalHookUPP(userRoutine) (SCModalHookUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSCModalHookProcInfo, GetCurrentArchitecture())
+ #define NewMovieExportGetDataUPP(userRoutine) (MovieExportGetDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMovieExportGetDataProcInfo, GetCurrentArchitecture())
+ #define NewMovieExportGetPropertyUPP(userRoutine) (MovieExportGetPropertyUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMovieExportGetPropertyProcInfo, GetCurrentArchitecture())
+ #define DisposeSCModalFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeSCModalHookUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeMovieExportGetDataUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeMovieExportGetPropertyUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeSCModalFilterUPP(theDialog, theEvent, itemHit, refcon, userUPP) (Boolean)CALL_FOUR_PARAMETER_UPP((userUPP), uppSCModalFilterProcInfo, (theDialog), (theEvent), (itemHit), (refcon))
+ #define InvokeSCModalHookUPP(theDialog, itemHit, params, refcon, userUPP) (short)CALL_FOUR_PARAMETER_UPP((userUPP), uppSCModalHookProcInfo, (theDialog), (itemHit), (params), (refcon))
+ #define InvokeMovieExportGetDataUPP(refCon, params, userUPP) (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppMovieExportGetDataProcInfo, (refCon), (params))
+ #define InvokeMovieExportGetPropertyUPP(refcon, trackID, propertyType, propertyValue, userUPP) (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppMovieExportGetPropertyProcInfo, (refcon), (trackID), (propertyType), (propertyValue))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewSCModalFilterProc(userRoutine) NewSCModalFilterUPP(userRoutine)
+#define NewSCModalHookProc(userRoutine) NewSCModalHookUPP(userRoutine)
+#define NewMovieExportGetDataProc(userRoutine) NewMovieExportGetDataUPP(userRoutine)
+#define NewMovieExportGetPropertyProc(userRoutine) NewMovieExportGetPropertyUPP(userRoutine)
+#define CallSCModalFilterProc(userRoutine, theDialog, theEvent, itemHit, refcon) InvokeSCModalFilterUPP(theDialog, theEvent, itemHit, refcon, userRoutine)
+#define CallSCModalHookProc(userRoutine, theDialog, itemHit, params, refcon) InvokeSCModalHookUPP(theDialog, itemHit, params, refcon, userRoutine)
+#define CallMovieExportGetDataProc(userRoutine, refCon, params) InvokeMovieExportGetDataUPP(refCon, params, userRoutine)
+#define CallMovieExportGetPropertyProc(userRoutine, refcon, trackID, propertyType, propertyValue) InvokeMovieExportGetPropertyUPP(refcon, trackID, propertyType, propertyValue, userRoutine)
+EXTERN_API( ComponentResult )
+MovieImportHandle (MovieImportComponent ci,
+ Handle dataH,
+ Movie theMovie,
+ Track targetTrack,
+ Track * usedTrack,
+ TimeValue atTime,
+ TimeValue * addedDuration,
+ long inFlags,
+ long * outFlags) FIVEWORDINLINE(0x2F3C, 0x0020, 0x0001, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieImportFile (MovieImportComponent ci,
+ const FSSpec * theFile,
+ Movie theMovie,
+ Track targetTrack,
+ Track * usedTrack,
+ TimeValue atTime,
+ TimeValue * addedDuration,
+ long inFlags,
+ long * outFlags) FIVEWORDINLINE(0x2F3C, 0x0020, 0x0002, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieImportSetSampleDuration (MovieImportComponent ci,
+ TimeValue duration,
+ TimeScale scale) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0003, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieImportSetSampleDescription (MovieImportComponent ci,
+ SampleDescriptionHandle desc,
+ OSType mediaType) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0004, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieImportSetMediaFile (MovieImportComponent ci,
+ AliasHandle alias) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0005, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieImportSetDimensions (MovieImportComponent ci,
+ Fixed width,
+ Fixed height) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0006, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieImportSetChunkSize (MovieImportComponent ci,
+ long chunkSize) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0007, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieImportSetProgressProc (MovieImportComponent ci,
+ MovieProgressUPP proc,
+ long refcon) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0008, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieImportSetAuxiliaryData (MovieImportComponent ci,
+ Handle data,
+ OSType handleType) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0009, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieImportSetFromScrap (MovieImportComponent ci,
+ Boolean fromScrap) FIVEWORDINLINE(0x2F3C, 0x0002, 0x000A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieImportDoUserDialog (MovieImportComponent ci,
+ const FSSpec * theFile,
+ Handle theData,
+ Boolean * canceled) FIVEWORDINLINE(0x2F3C, 0x000C, 0x000B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieImportSetDuration (MovieImportComponent ci,
+ TimeValue duration) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieImportGetAuxiliaryDataType (MovieImportComponent ci,
+ OSType * auxType) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieImportValidate (MovieImportComponent ci,
+ const FSSpec * theFile,
+ Handle theData,
+ Boolean * valid) FIVEWORDINLINE(0x2F3C, 0x000C, 0x000E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieImportGetFileType (MovieImportComponent ci,
+ OSType * fileType) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieImportDataRef (MovieImportComponent ci,
+ Handle dataRef,
+ OSType dataRefType,
+ Movie theMovie,
+ Track targetTrack,
+ Track * usedTrack,
+ TimeValue atTime,
+ TimeValue * addedDuration,
+ long inFlags,
+ long * outFlags) FIVEWORDINLINE(0x2F3C, 0x0024, 0x0010, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieImportGetSampleDescription (MovieImportComponent ci,
+ SampleDescriptionHandle * desc,
+ OSType * mediaType) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0011, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieImportGetMIMETypeList (MovieImportComponent ci,
+ QTAtomContainer * mimeInfo) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0012, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieImportSetOffsetAndLimit (MovieImportComponent ci,
+ unsigned long offset,
+ unsigned long limit) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0013, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieImportGetSettingsAsAtomContainer (MovieImportComponent ci,
+ QTAtomContainer * settings) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0014, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieImportSetSettingsFromAtomContainer (MovieImportComponent ci,
+ QTAtomContainer settings) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0015, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieImportSetOffsetAndLimit64 (MovieImportComponent ci,
+ const wide * offset,
+ const wide * limit) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0016, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieImportIdle (MovieImportComponent ci,
+ long inFlags,
+ long * outFlags) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0017, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieImportValidateDataRef (MovieImportComponent ci,
+ Handle dataRef,
+ OSType dataRefType,
+ UInt8 * valid) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0018, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieImportGetLoadState (MovieImportComponent ci,
+ long * importerLoadState) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0019, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieImportGetMaxLoadedTime (MovieImportComponent ci,
+ TimeValue * time) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieImportEstimateCompletionTime (MovieImportComponent ci,
+ TimeRecord * time) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieImportSetDontBlock (MovieImportComponent ci,
+ Boolean dontBlock) FIVEWORDINLINE(0x2F3C, 0x0002, 0x001C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieImportGetDontBlock (MovieImportComponent ci,
+ Boolean * willBlock) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieImportSetIdleManager (MovieImportComponent ci,
+ IdleManager im) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieImportSetNewMovieFlags (MovieImportComponent ci,
+ long newMovieFlags) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieImportGetDestinationMediaType (MovieImportComponent ci,
+ OSType * mediaType) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0020, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieExportToHandle (MovieExportComponent ci,
+ Handle dataH,
+ Movie theMovie,
+ Track onlyThisTrack,
+ TimeValue startTime,
+ TimeValue duration) FIVEWORDINLINE(0x2F3C, 0x0014, 0x0080, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieExportToFile (MovieExportComponent ci,
+ const FSSpec * theFile,
+ Movie theMovie,
+ Track onlyThisTrack,
+ TimeValue startTime,
+ TimeValue duration) FIVEWORDINLINE(0x2F3C, 0x0014, 0x0081, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieExportGetAuxiliaryData (MovieExportComponent ci,
+ Handle dataH,
+ OSType * handleType) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0083, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieExportSetProgressProc (MovieExportComponent ci,
+ MovieProgressUPP proc,
+ long refcon) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0084, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieExportSetSampleDescription (MovieExportComponent ci,
+ SampleDescriptionHandle desc,
+ OSType mediaType) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0085, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieExportDoUserDialog (MovieExportComponent ci,
+ Movie theMovie,
+ Track onlyThisTrack,
+ TimeValue startTime,
+ TimeValue duration,
+ Boolean * canceled) FIVEWORDINLINE(0x2F3C, 0x0014, 0x0086, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieExportGetCreatorType (MovieExportComponent ci,
+ OSType * creator) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0087, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieExportToDataRef (MovieExportComponent ci,
+ Handle dataRef,
+ OSType dataRefType,
+ Movie theMovie,
+ Track onlyThisTrack,
+ TimeValue startTime,
+ TimeValue duration) FIVEWORDINLINE(0x2F3C, 0x0018, 0x0088, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieExportFromProceduresToDataRef (MovieExportComponent ci,
+ Handle dataRef,
+ OSType dataRefType) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0089, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieExportAddDataSource (MovieExportComponent ci,
+ OSType trackType,
+ TimeScale scale,
+ long * trackID,
+ MovieExportGetPropertyUPP getPropertyProc,
+ MovieExportGetDataUPP getDataProc,
+ void * refCon) FIVEWORDINLINE(0x2F3C, 0x0018, 0x008A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieExportValidate (MovieExportComponent ci,
+ Movie theMovie,
+ Track onlyThisTrack,
+ Boolean * valid) FIVEWORDINLINE(0x2F3C, 0x000C, 0x008B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieExportGetSettingsAsAtomContainer (MovieExportComponent ci,
+ QTAtomContainer * settings) FIVEWORDINLINE(0x2F3C, 0x0004, 0x008C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieExportSetSettingsFromAtomContainer (MovieExportComponent ci,
+ QTAtomContainer settings) FIVEWORDINLINE(0x2F3C, 0x0004, 0x008D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieExportGetFileNameExtension (MovieExportComponent ci,
+ OSType * extension) FIVEWORDINLINE(0x2F3C, 0x0004, 0x008E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieExportGetShortFileTypeString (MovieExportComponent ci,
+ Str255 typeString) FIVEWORDINLINE(0x2F3C, 0x0004, 0x008F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieExportGetSourceMediaType (MovieExportComponent ci,
+ OSType * mediaType) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0090, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieExportSetGetMoviePropertyProc (MovieExportComponent ci,
+ MovieExportGetPropertyUPP getPropertyProc,
+ void * refCon) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0091, 0x7000, 0xA82A);
+
+/* Text Export Display Info data structure*/
+
+struct TextDisplayData {
+ long displayFlags;
+ long textJustification;
+ RGBColor bgColor;
+ Rect textBox;
+
+ short beginHilite;
+ short endHilite;
+ RGBColor hiliteColor;
+ Boolean doHiliteColor;
+ SInt8 filler;
+ TimeValue scrollDelayDur;
+ Point dropShadowOffset;
+ short dropShadowTransparency;
+};
+typedef struct TextDisplayData TextDisplayData;
+
+typedef ComponentInstance TextExportComponent;
+typedef ComponentInstance GraphicImageMovieImportComponent;
+EXTERN_API( ComponentResult )
+TextExportGetDisplayData (TextExportComponent ci,
+ TextDisplayData * textDisplay) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0100, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TextExportGetTimeFraction (TextExportComponent ci,
+ long * movieTimeFraction) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0101, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TextExportSetTimeFraction (TextExportComponent ci,
+ long movieTimeFraction) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0102, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TextExportGetSettings (TextExportComponent ci,
+ long * setting) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0103, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TextExportSetSettings (TextExportComponent ci,
+ long setting) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0104, 0x7000, 0xA82A);
+
+
+EXTERN_API( ComponentResult )
+MIDIImportGetSettings (TextExportComponent ci,
+ long * setting) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0100, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MIDIImportSetSettings (TextExportComponent ci,
+ long setting) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0101, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieExportNewGetDataAndPropertiesProcs (MovieExportComponent ci,
+ OSType trackType,
+ TimeScale * scale,
+ Movie theMovie,
+ Track theTrack,
+ TimeValue startTime,
+ TimeValue duration,
+ MovieExportGetPropertyUPP * getPropertyProc,
+ MovieExportGetDataUPP * getDataProc,
+ void ** refCon) FIVEWORDINLINE(0x2F3C, 0x0024, 0x0100, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MovieExportDisposeGetDataAndPropertiesProcs (MovieExportComponent ci,
+ MovieExportGetPropertyUPP getPropertyProc,
+ MovieExportGetDataUPP getDataProc,
+ void * refCon) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0101, 0x7000, 0xA82A);
+
+enum {
+ movieExportUseConfiguredSettings = FOUR_CHAR_CODE('ucfg'), /* pointer to Boolean*/
+ movieExportWidth = FOUR_CHAR_CODE('wdth'), /* pointer to Fixed*/
+ movieExportHeight = FOUR_CHAR_CODE('hegt'), /* pointer to Fixed*/
+ movieExportDuration = FOUR_CHAR_CODE('dura'), /* pointer to TimeRecord*/
+ movieExportVideoFilter = FOUR_CHAR_CODE('iflt'), /* pointer to QTAtomContainer*/
+ movieExportTimeScale = FOUR_CHAR_CODE('tmsc') /* pointer to TimeScale*/
+};
+
+EXTERN_API( ComponentResult )
+GraphicsImageImportSetSequenceEnabled (GraphicImageMovieImportComponent ci,
+ Boolean enable) FIVEWORDINLINE(0x2F3C, 0x0002, 0x0100, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GraphicsImageImportGetSequenceEnabled (GraphicImageMovieImportComponent ci,
+ Boolean * enable) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0101, 0x7000, 0xA82A);
+
+
+
+
+
+
+/*----------------------------'brws' o browser prefs configuration info ------------------------*/
+enum {
+ kQTBrowserInfoCanUseSystemFolderPlugin = (1L << 0) /* Mac browser can use plug-in from System "Internet Plug-ins" folder */
+};
+
+
+
+
+enum {
+ kQTPreFlightOpenComponent = (1L << 1) /* Open component as preflight check*/
+};
+
+
+struct ComponentPreflightFlags {
+ long flags;
+};
+typedef struct ComponentPreflightFlags ComponentPreflightFlags;
+
+
+
+
+
+/***************
+
+ File Preview Components
+
+***************/
+
+typedef ComponentInstance pnotComponent;
+enum {
+ pnotComponentWantsEvents = 1,
+ pnotComponentNeedsNoCache = 2
+};
+
+enum {
+ ShowFilePreviewComponentType = FOUR_CHAR_CODE('pnot'),
+ CreateFilePreviewComponentType = FOUR_CHAR_CODE('pmak')
+};
+
+EXTERN_API( ComponentResult )
+PreviewShowData (pnotComponent p,
+ OSType dataType,
+ Handle data,
+ const Rect * inHere) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0001, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+PreviewMakePreview (pnotComponent p,
+ OSType * previewType,
+ Handle * previewResult,
+ const FSSpec * sourceFile,
+ ICMProgressProcRecordPtr progress) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0002, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+PreviewMakePreviewReference (pnotComponent p,
+ OSType * previewType,
+ short * resID,
+ const FSSpec * sourceFile) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0003, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+PreviewEvent (pnotComponent p,
+ EventRecord * e,
+ Boolean * handledEvent) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0004, 0x7000, 0xA82A);
+
+
+
+typedef ComponentInstance DataCompressorComponent;
+typedef ComponentInstance DataDecompressorComponent;
+typedef ComponentInstance DataCodecComponent;
+enum {
+ DataCompressorComponentType = FOUR_CHAR_CODE('dcom'),
+ DataDecompressorComponentType = FOUR_CHAR_CODE('ddec'),
+ AppleDataCompressorSubType = FOUR_CHAR_CODE('adec'),
+ zlibDataCompressorSubType = FOUR_CHAR_CODE('zlib')
+};
+
+
+/** These are DataCodec procedures **/
+EXTERN_API( ComponentResult )
+DataCodecDecompress (DataCodecComponent dc,
+ void * srcData,
+ UInt32 srcSize,
+ void * dstData,
+ UInt32 dstBufferSize) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0001, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataCodecGetCompressBufferSize (DataCodecComponent dc,
+ UInt32 srcSize,
+ UInt32 * dstSize) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0002, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataCodecCompress (DataCodecComponent dc,
+ void * srcData,
+ UInt32 srcSize,
+ void * dstData,
+ UInt32 dstBufferSize,
+ UInt32 * actualDstSize,
+ UInt32 * decompressSlop) FIVEWORDINLINE(0x2F3C, 0x0018, 0x0003, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataCodecBeginInterruptSafe (DataCodecComponent dc,
+ unsigned long maxSrcSize) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0004, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataCodecEndInterruptSafe (DataCodecComponent dc) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0005, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataCodecDecompressPartial (DataCodecComponent dc,
+ void ** next_in,
+ unsigned long * avail_in,
+ unsigned long * total_in,
+ void ** next_out,
+ unsigned long * avail_out,
+ unsigned long * total_out,
+ Boolean * didFinish) FIVEWORDINLINE(0x2F3C, 0x001C, 0x0006, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataCodecCompressPartial (DataCodecComponent dc,
+ void ** next_in,
+ unsigned long * avail_in,
+ unsigned long * total_in,
+ void ** next_out,
+ unsigned long * avail_out,
+ unsigned long * total_out,
+ Boolean tryToFinish,
+ Boolean * didFinish) FIVEWORDINLINE(0x2F3C, 0x001E, 0x0007, 0x7000, 0xA82A);
+
+
+
+
+typedef CALLBACK_API( void , DataHCompletionProcPtr )(Ptr request, long refcon, OSErr err);
+typedef STACK_UPP_TYPE(DataHCompletionProcPtr) DataHCompletionUPP;
+
+enum {
+ kDataHCanRead = 1L << 0,
+ kDataHSpecialRead = 1L << 1,
+ kDataHSpecialReadFile = 1L << 2,
+ kDataHCanWrite = 1L << 3,
+ kDataHSpecialWrite = 1 << 4,
+ kDataHSpecialWriteFile = 1 << 5,
+ kDataHCanStreamingWrite = 1 << 6,
+ kDataHMustCheckDataRef = 1 << 7
+};
+
+/* Data reference records for specific data ref types*/
+
+struct HandleDataRefRecord {
+ Handle dataHndl;
+};
+typedef struct HandleDataRefRecord HandleDataRefRecord;
+
+typedef HandleDataRefRecord * HandleDataRefPtr;
+typedef HandleDataRefPtr * HandleDataRef;
+
+struct PointerDataRefRecord {
+ void * data;
+ Size dataLength;
+};
+typedef struct PointerDataRefRecord PointerDataRefRecord;
+
+typedef PointerDataRefRecord * PointerDataRefPtr;
+typedef PointerDataRefPtr * PointerDataRef;
+/* Data reference extensions*/
+enum {
+ kDataRefExtensionChokeSpeed = FOUR_CHAR_CODE('chok'),
+ kDataRefExtensionFileName = FOUR_CHAR_CODE('fnam'),
+ kDataRefExtensionMIMEType = FOUR_CHAR_CODE('mime'),
+ kDataRefExtensionMacOSFileType = FOUR_CHAR_CODE('ftyp'),
+ kDataRefExtensionInitializationData = FOUR_CHAR_CODE('data'),
+ kDataRefExtensionQuickTimeMediaType = FOUR_CHAR_CODE('mtyp')
+};
+
+enum {
+ kDataHChokeToMovieDataRate = 1 << 0, /* param is 0*/
+ kDataHChokeToParam = 1 << 1 /* param is bytes per second*/
+};
+
+
+struct DataHChokeAtomRecord {
+ long flags; /* one of kDataHChokeTo constants*/
+ long param;
+};
+typedef struct DataHChokeAtomRecord DataHChokeAtomRecord;
+
+
+struct DataHVolumeListRecord {
+ short vRefNum;
+ long flags;
+};
+typedef struct DataHVolumeListRecord DataHVolumeListRecord;
+
+typedef DataHVolumeListRecord * DataHVolumeListPtr;
+typedef DataHVolumeListPtr * DataHVolumeList;
+enum {
+ kDataHExtendedSchedule = FOUR_CHAR_CODE('xtnd')
+};
+
+
+struct DataHScheduleRecord {
+ TimeRecord timeNeededBy;
+ long extendedID; /* always is kDataHExtendedSchedule*/
+ long extendedVers; /* always set to 0*/
+ Fixed priority; /* 100.0 or more means must have. lower numbers...*/
+};
+typedef struct DataHScheduleRecord DataHScheduleRecord;
+
+typedef DataHScheduleRecord * DataHSchedulePtr;
+/* Flags for DataHGetInfoFlags*/
+enum {
+ kDataHInfoFlagNeverStreams = 1 << 0, /* set if this data handler doesn't stream*/
+ kDataHInfoFlagCanUpdateDataRefs = 1 << 1, /* set if this data handler might update data reference*/
+ kDataHInfoFlagNeedsNetworkBandwidth = 1 << 2 /* set if this data handler may need to occupy the network*/
+};
+
+
+/* Types for DataHGetFileTypeOrdering*/
+enum {
+ kDataHFileTypeMacOSFileType = FOUR_CHAR_CODE('ftyp'),
+ kDataHFileTypeExtension = FOUR_CHAR_CODE('fext'),
+ kDataHFileTypeMIME = FOUR_CHAR_CODE('mime')
+};
+
+typedef OSType * DataHFileTypeOrderingPtr;
+typedef DataHFileTypeOrderingPtr * DataHFileTypeOrderingHandle;
+
+EXTERN_API( ComponentResult )
+DataHGetData (DataHandler dh,
+ Handle h,
+ long hOffset,
+ long offset,
+ long size) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0002, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHPutData (DataHandler dh,
+ Handle h,
+ long hOffset,
+ long * offset,
+ long size) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0003, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHFlushData (DataHandler dh) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0004, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHOpenForWrite (DataHandler dh) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0005, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHCloseForWrite (DataHandler dh) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0006, 0x7000, 0xA82A);
+
+
+EXTERN_API( ComponentResult )
+DataHOpenForRead (DataHandler dh) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0008, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHCloseForRead (DataHandler dh) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0009, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHSetDataRef (DataHandler dh,
+ Handle dataRef) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHGetDataRef (DataHandler dh,
+ Handle * dataRef) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHCompareDataRef (DataHandler dh,
+ Handle dataRef,
+ Boolean * equal) FIVEWORDINLINE(0x2F3C, 0x0008, 0x000C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHTask (DataHandler dh) FIVEWORDINLINE(0x2F3C, 0x0000, 0x000D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHScheduleData (DataHandler dh,
+ Ptr PlaceToPutDataPtr,
+ long FileOffset,
+ long DataSize,
+ long RefCon,
+ DataHSchedulePtr scheduleRec,
+ DataHCompletionUPP CompletionRtn) FIVEWORDINLINE(0x2F3C, 0x0018, 0x000E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHFinishData (DataHandler dh,
+ Ptr PlaceToPutDataPtr,
+ Boolean Cancel) FIVEWORDINLINE(0x2F3C, 0x0006, 0x000F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHFlushCache (DataHandler dh) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0010, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHResolveDataRef (DataHandler dh,
+ Handle theDataRef,
+ Boolean * wasChanged,
+ Boolean userInterfaceAllowed) FIVEWORDINLINE(0x2F3C, 0x000A, 0x0011, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHGetFileSize (DataHandler dh,
+ long * fileSize) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0012, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHCanUseDataRef (DataHandler dh,
+ Handle dataRef,
+ long * useFlags) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0013, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHGetVolumeList (DataHandler dh,
+ DataHVolumeList * volumeList) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0014, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHWrite (DataHandler dh,
+ Ptr data,
+ long offset,
+ long size,
+ DataHCompletionUPP completion,
+ long refCon) FIVEWORDINLINE(0x2F3C, 0x0014, 0x0015, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHPreextend (DataHandler dh,
+ unsigned long maxToAdd,
+ unsigned long * spaceAdded) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0016, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHSetFileSize (DataHandler dh,
+ long fileSize) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0017, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHGetFreeSpace (DataHandler dh,
+ unsigned long * freeSize) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0018, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHCreateFile (DataHandler dh,
+ OSType creator,
+ Boolean deleteExisting) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0019, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHGetPreferredBlockSize (DataHandler dh,
+ long * blockSize) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHGetDeviceIndex (DataHandler dh,
+ long * deviceIndex) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHIsStreamingDataHandler (DataHandler dh,
+ Boolean * yes) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHGetDataInBuffer (DataHandler dh,
+ long startOffset,
+ long * size) FIVEWORDINLINE(0x2F3C, 0x0008, 0x001D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHGetScheduleAheadTime (DataHandler dh,
+ long * millisecs) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHSetCacheSizeLimit (DataHandler dh,
+ Size cacheSizeLimit) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHGetCacheSizeLimit (DataHandler dh,
+ Size * cacheSizeLimit) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0020, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHGetMovie (DataHandler dh,
+ Movie * theMovie,
+ short * id) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0021, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHAddMovie (DataHandler dh,
+ Movie theMovie,
+ short * id) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0022, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHUpdateMovie (DataHandler dh,
+ Movie theMovie,
+ short id) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0023, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHDoesBuffer (DataHandler dh,
+ Boolean * buffersReads,
+ Boolean * buffersWrites) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0024, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHGetFileName (DataHandler dh,
+ Str255 str) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0025, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHGetAvailableFileSize (DataHandler dh,
+ long * fileSize) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0026, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHGetMacOSFileType (DataHandler dh,
+ OSType * fileType) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0027, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHGetMIMEType (DataHandler dh,
+ Str255 mimeType) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0028, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHSetDataRefWithAnchor (DataHandler dh,
+ Handle anchorDataRef,
+ OSType dataRefType,
+ Handle dataRef) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0029, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHGetDataRefWithAnchor (DataHandler dh,
+ Handle anchorDataRef,
+ OSType dataRefType,
+ Handle * dataRef) FIVEWORDINLINE(0x2F3C, 0x000C, 0x002A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHSetMacOSFileType (DataHandler dh,
+ OSType fileType) FIVEWORDINLINE(0x2F3C, 0x0004, 0x002B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHSetTimeBase (DataHandler dh,
+ TimeBase tb) FIVEWORDINLINE(0x2F3C, 0x0004, 0x002C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHGetInfoFlags (DataHandler dh,
+ UInt32 * flags) FIVEWORDINLINE(0x2F3C, 0x0004, 0x002D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHScheduleData64 (DataHandler dh,
+ Ptr PlaceToPutDataPtr,
+ const wide * FileOffset,
+ long DataSize,
+ long RefCon,
+ DataHSchedulePtr scheduleRec,
+ DataHCompletionUPP CompletionRtn) FIVEWORDINLINE(0x2F3C, 0x0018, 0x002E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHWrite64 (DataHandler dh,
+ Ptr data,
+ const wide * offset,
+ long size,
+ DataHCompletionUPP completion,
+ long refCon) FIVEWORDINLINE(0x2F3C, 0x0014, 0x002F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHGetFileSize64 (DataHandler dh,
+ wide * fileSize) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0030, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHPreextend64 (DataHandler dh,
+ const wide * maxToAdd,
+ wide * spaceAdded) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0031, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHSetFileSize64 (DataHandler dh,
+ const wide * fileSize) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0032, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHGetFreeSpace64 (DataHandler dh,
+ wide * freeSize) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0033, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHAppend64 (DataHandler dh,
+ void * data,
+ wide * fileOffset,
+ unsigned long size) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0034, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHReadAsync (DataHandler dh,
+ void * dataPtr,
+ UInt32 dataSize,
+ const wide * dataOffset,
+ DataHCompletionUPP completion,
+ long refCon) FIVEWORDINLINE(0x2F3C, 0x0014, 0x0035, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHPollRead (DataHandler dh,
+ void * dataPtr,
+ UInt32 * dataSizeSoFar) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0036, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHGetDataAvailability (DataHandler dh,
+ long offset,
+ long len,
+ long * missing_offset,
+ long * missing_len) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0037, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHGetFileSizeAsync (DataHandler dh,
+ wide * fileSize,
+ DataHCompletionUPP completionRtn,
+ long refCon) FIVEWORDINLINE(0x2F3C, 0x000C, 0x003A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHGetDataRefAsType (DataHandler dh,
+ OSType requestedType,
+ Handle * dataRef) FIVEWORDINLINE(0x2F3C, 0x0008, 0x003B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHSetDataRefExtension (DataHandler dh,
+ Handle extension,
+ OSType idType) FIVEWORDINLINE(0x2F3C, 0x0008, 0x003C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHGetDataRefExtension (DataHandler dh,
+ Handle * extension,
+ OSType idType) FIVEWORDINLINE(0x2F3C, 0x0008, 0x003D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHGetMovieWithFlags (DataHandler dh,
+ Movie * theMovie,
+ short * id,
+ short flags) FIVEWORDINLINE(0x2F3C, 0x000A, 0x003E, 0x7000, 0xA82A);
+
+
+EXTERN_API( ComponentResult )
+DataHGetFileTypeOrdering (DataHandler dh,
+ DataHFileTypeOrderingHandle * orderingListHandle) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0040, 0x7000, 0xA82A);
+
+/* flags for DataHCreateFileWithFlags*/
+enum {
+ kDataHCreateFileButDontCreateResFile = (1L << 0)
+};
+
+EXTERN_API( ComponentResult )
+DataHCreateFileWithFlags (DataHandler dh,
+ OSType creator,
+ Boolean deleteExisting,
+ UInt32 flags) FIVEWORDINLINE(0x2F3C, 0x000A, 0x0041, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHGetMIMETypeAsync (DataHandler dh,
+ Str255 mimeType,
+ DataHCompletionUPP completionRtn,
+ long refCon) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0042, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHGetInfo (DataHandler dh,
+ OSType what,
+ void * info) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0043, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHSetIdleManager (DataHandler dh,
+ IdleManager im) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0044, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHDeleteFile (DataHandler dh) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0045, 0x7000, 0xA82A);
+
+enum {
+ kDataHMovieUsageDoAppendMDAT = 1L << 0 /* if set, datahandler should append wide and mdat atoms in append call*/
+};
+
+EXTERN_API( ComponentResult )
+DataHSetMovieUsageFlags (DataHandler dh,
+ long flags) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0046, 0x7000, 0xA82A);
+
+
+enum {
+ kDataHTempUseSameDirectory = 1L << 0, /* temp data ref should be in same directory as current data ref (vs. in temporary directory)*/
+ kDataHTempUseSameVolume = 1L << 1, /* temp data ref should be on same volume as current data ref (vs. find "best" volume)*/
+ kDataHTempCreateFile = 1L << 2, /* create the file*/
+ kDataHTempOpenFile = 1L << 3 /* open temporary file for write (kDataHTempCreateFile must be passed, too)*/
+};
+
+EXTERN_API( ComponentResult )
+DataHUseTemporaryDataRef (DataHandler dh,
+ long inFlags) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0047, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHGetTemporaryDataRefCapabilities (DataHandler dh,
+ long * outUnderstoodFlags) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0048, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHRenameFile (DataHandler dh,
+ Handle newDataRef) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0049, 0x7000, 0xA82A);
+
+
+EXTERN_API( ComponentResult )
+DataHPlaybackHints (DataHandler dh,
+ long flags,
+ unsigned long minFileOffset,
+ unsigned long maxFileOffset,
+ long bytesPerSecond) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0103, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DataHPlaybackHints64 (DataHandler dh,
+ long flags,
+ const wide * minFileOffset,
+ const wide * maxFileOffset,
+ long bytesPerSecond) FIVEWORDINLINE(0x2F3C, 0x0010, 0x010E, 0x7000, 0xA82A);
+
+/* Symbolic constants for DataHGetDataRate*/
+enum {
+ kDataHGetDataRateInfiniteRate = 0x7FFFFFFF /* all the data arrived instantaneously*/
+};
+
+EXTERN_API( ComponentResult )
+DataHGetDataRate (DataHandler dh,
+ long flags,
+ long * bytesPerSecond) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0110, 0x7000, 0xA82A);
+
+/* Flags for DataHSetTimeHints*/
+enum {
+ kDataHSetTimeHintsSkipBandwidthRequest = 1 << 0 /* set if this data handler should use the network without requesting bandwidth*/
+};
+
+EXTERN_API( ComponentResult )
+DataHSetTimeHints (DataHandler dh,
+ long flags,
+ long bandwidthPriority,
+ TimeScale scale,
+ TimeValue minTime,
+ TimeValue maxTime) FIVEWORDINLINE(0x2F3C, 0x0014, 0x0111, 0x7000, 0xA82A);
+
+
+
+
+
+/* Standard type for video digitizers */
+enum {
+ videoDigitizerComponentType = FOUR_CHAR_CODE('vdig'),
+ vdigInterfaceRev = 2
+};
+
+/* Input Format Standards */
+enum {
+ ntscIn = 0, /* current input format */
+ currentIn = 0, /* ntsc input format */
+ palIn = 1, /* pal input format */
+ secamIn = 2, /* secam input format */
+ ntscReallyIn = 3 /* ntsc input format */
+};
+
+/* Input Formats */
+enum {
+ compositeIn = 0, /* input is composite format */
+ sVideoIn = 1, /* input is sVideo format */
+ rgbComponentIn = 2, /* input is rgb component format */
+ rgbComponentSyncIn = 3, /* input is rgb component format (sync on green?)*/
+ yuvComponentIn = 4, /* input is yuv component format */
+ yuvComponentSyncIn = 5, /* input is yuv component format (sync on green?) */
+ tvTunerIn = 6,
+ sdiIn = 7
+};
+
+
+/* Video Digitizer PlayThru States */
+enum {
+ vdPlayThruOff = 0,
+ vdPlayThruOn = 1
+};
+
+/* Input Color Space Modes */
+enum {
+ vdDigitizerBW = 0, /* black and white */
+ vdDigitizerRGB = 1 /* rgb color */
+};
+
+/* Phase Lock Loop Modes */
+enum {
+ vdBroadcastMode = 0, /* Broadcast / Laser Disk video mode */
+ vdVTRMode = 1 /* VCR / Magnetic media mode */
+};
+
+/* Field Select Options */
+enum {
+ vdUseAnyField = 0, /* Digitizers choice on field use */
+ vdUseOddField = 1, /* Use odd field for half size vert and smaller */
+ vdUseEvenField = 2 /* Use even field for half size vert and smaller */
+};
+
+/* vdig types */
+enum {
+ vdTypeBasic = 0, /* basic, no clipping */
+ vdTypeAlpha = 1, /* supports clipping with alpha channel */
+ vdTypeMask = 2, /* supports clipping with mask plane */
+ vdTypeKey = 3 /* supports clipping with key color(s) */
+};
+
+
+
+/* Digitizer Input Capability/Current Flags */
+enum {
+ digiInDoesNTSC = 1L << 0, /* digitizer supports NTSC input format */
+ digiInDoesPAL = 1L << 1, /* digitizer supports PAL input format */
+ digiInDoesSECAM = 1L << 2, /* digitizer supports SECAM input format */
+ digiInDoesGenLock = 1L << 7, /* digitizer does genlock */
+ digiInDoesComposite = 1L << 8, /* digitizer supports composite input type */
+ digiInDoesSVideo = 1L << 9, /* digitizer supports S-Video input type */
+ digiInDoesComponent = 1L << 10, /* digitizer supports component = rgb, input type */
+ digiInVTR_Broadcast = 1L << 11, /* digitizer can differentiate between the two */
+ digiInDoesColor = 1L << 12, /* digitizer supports color */
+ digiInDoesBW = 1L << 13, /* digitizer supports black & white */
+ /* Digitizer Input Current Flags = these are valid only during active operating conditions, */
+ digiInSignalLock = 1L << 31 /* digitizer detects input signal is locked, this bit = horiz lock || vertical lock */
+};
+
+
+/* Digitizer Output Capability/Current Flags */
+enum {
+ digiOutDoes1 = 1L << 0, /* digitizer supports 1 bit pixels */
+ digiOutDoes2 = 1L << 1, /* digitizer supports 2 bit pixels */
+ digiOutDoes4 = 1L << 2, /* digitizer supports 4 bit pixels */
+ digiOutDoes8 = 1L << 3, /* digitizer supports 8 bit pixels */
+ digiOutDoes16 = 1L << 4, /* digitizer supports 16 bit pixels */
+ digiOutDoes32 = 1L << 5, /* digitizer supports 32 bit pixels */
+ digiOutDoesDither = 1L << 6, /* digitizer dithers in indexed modes */
+ digiOutDoesStretch = 1L << 7, /* digitizer can arbitrarily stretch */
+ digiOutDoesShrink = 1L << 8, /* digitizer can arbitrarily shrink */
+ digiOutDoesMask = 1L << 9, /* digitizer can mask to clipping regions */
+ digiOutDoesDouble = 1L << 11, /* digitizer can stretch to exactly double size */
+ digiOutDoesQuad = 1L << 12, /* digitizer can stretch exactly quadruple size */
+ digiOutDoesQuarter = 1L << 13, /* digitizer can shrink to exactly quarter size */
+ digiOutDoesSixteenth = 1L << 14, /* digitizer can shrink to exactly sixteenth size */
+ digiOutDoesRotate = 1L << 15, /* digitizer supports rotate transformations */
+ digiOutDoesHorizFlip = 1L << 16, /* digitizer supports horizontal flips Sx < 0 */
+ digiOutDoesVertFlip = 1L << 17, /* digitizer supports vertical flips Sy < 0 */
+ digiOutDoesSkew = 1L << 18, /* digitizer supports skew = shear,twist, */
+ digiOutDoesBlend = 1L << 19,
+ digiOutDoesWarp = 1L << 20,
+ digiOutDoesHW_DMA = 1L << 21, /* digitizer not constrained to local device */
+ digiOutDoesHWPlayThru = 1L << 22, /* digitizer doesn't need time to play thru */
+ digiOutDoesILUT = 1L << 23, /* digitizer does inverse LUT for index modes */
+ digiOutDoesKeyColor = 1L << 24, /* digitizer does key color functions too */
+ digiOutDoesAsyncGrabs = 1L << 25, /* digitizer supports async grabs */
+ digiOutDoesUnreadableScreenBits = 1L << 26, /* playthru doesn't generate readable bits on screen*/
+ digiOutDoesCompress = 1L << 27, /* supports alternate output data types */
+ digiOutDoesCompressOnly = 1L << 28, /* can't provide raw frames anywhere */
+ digiOutDoesPlayThruDuringCompress = 1L << 29, /* digi can do playthru while providing compressed data */
+ digiOutDoesCompressPartiallyVisible = 1L << 30, /* digi doesn't need all bits visible on screen to do hardware compress */
+ digiOutDoesNotNeedCopyOfCompressData = 1L << 31 /* digi doesn't need any bufferization when providing compressed data */
+};
+
+/* Types */
+typedef ComponentInstance VideoDigitizerComponent;
+typedef ComponentResult VideoDigitizerError;
+
+struct DigitizerInfo {
+ short vdigType;
+ long inputCapabilityFlags;
+ long outputCapabilityFlags;
+ long inputCurrentFlags;
+ long outputCurrentFlags;
+ short slot; /* temporary for connection purposes */
+ GDHandle gdh; /* temporary for digitizers that have preferred screen */
+ GDHandle maskgdh; /* temporary for digitizers that have mask planes */
+ short minDestHeight; /* Smallest resizable height */
+ short minDestWidth; /* Smallest resizable width */
+ short maxDestHeight; /* Largest resizable height */
+ short maxDestWidth; /* Largest resizable width */
+ short blendLevels; /* Number of blend levels supported (2 if 1 bit mask) */
+ long reserved; /* reserved */
+};
+typedef struct DigitizerInfo DigitizerInfo;
+
+struct VdigType {
+ long digType;
+ long reserved;
+};
+typedef struct VdigType VdigType;
+
+struct VdigTypeList {
+ short count;
+ VdigType list[1];
+};
+typedef struct VdigTypeList VdigTypeList;
+
+struct VdigBufferRec {
+ PixMapHandle dest;
+ Point location;
+ long reserved;
+};
+typedef struct VdigBufferRec VdigBufferRec;
+
+struct VdigBufferRecList {
+ short count;
+ MatrixRecordPtr matrix;
+ RgnHandle mask;
+ VdigBufferRec list[1];
+};
+typedef struct VdigBufferRecList VdigBufferRecList;
+typedef VdigBufferRecList * VdigBufferRecListPtr;
+typedef VdigBufferRecListPtr * VdigBufferRecListHandle;
+typedef CALLBACK_API( void , VdigIntProcPtr )(long flags, long refcon);
+typedef STACK_UPP_TYPE(VdigIntProcPtr) VdigIntUPP;
+
+struct VDCompressionList {
+ CodecComponent codec;
+ CodecType cType;
+ Str63 typeName;
+ Str63 name;
+ long formatFlags;
+ long compressFlags;
+ long reserved;
+};
+typedef struct VDCompressionList VDCompressionList;
+typedef VDCompressionList * VDCompressionListPtr;
+typedef VDCompressionListPtr * VDCompressionListHandle;
+enum {
+ dmaDepth1 = 1,
+ dmaDepth2 = 2,
+ dmaDepth4 = 4,
+ dmaDepth8 = 8,
+ dmaDepth16 = 16,
+ dmaDepth32 = 32,
+ dmaDepth2Gray = 64,
+ dmaDepth4Gray = 128,
+ dmaDepth8Gray = 256
+};
+
+enum {
+ kVDIGControlledFrameRate = -1
+};
+
+
+EXTERN_API( VideoDigitizerError )
+VDGetMaxSrcRect (VideoDigitizerComponent ci,
+ short inputStd,
+ Rect * maxSrcRect) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0001, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetActiveSrcRect (VideoDigitizerComponent ci,
+ short inputStd,
+ Rect * activeSrcRect) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0002, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDSetDigitizerRect (VideoDigitizerComponent ci,
+ Rect * digitizerRect) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0003, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetDigitizerRect (VideoDigitizerComponent ci,
+ Rect * digitizerRect) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0004, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetVBlankRect (VideoDigitizerComponent ci,
+ short inputStd,
+ Rect * vBlankRect) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0005, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetMaskPixMap (VideoDigitizerComponent ci,
+ PixMapHandle maskPixMap) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0006, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetPlayThruDestination (VideoDigitizerComponent ci,
+ PixMapHandle * dest,
+ Rect * destRect,
+ MatrixRecord * m,
+ RgnHandle * mask) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0008, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDUseThisCLUT (VideoDigitizerComponent ci,
+ CTabHandle colorTableHandle) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0009, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDSetInputGammaValue (VideoDigitizerComponent ci,
+ Fixed channel1,
+ Fixed channel2,
+ Fixed channel3) FIVEWORDINLINE(0x2F3C, 0x000C, 0x000A, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetInputGammaValue (VideoDigitizerComponent ci,
+ Fixed * channel1,
+ Fixed * channel2,
+ Fixed * channel3) FIVEWORDINLINE(0x2F3C, 0x000C, 0x000B, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDSetBrightness (VideoDigitizerComponent ci,
+ unsigned short * brightness) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000C, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetBrightness (VideoDigitizerComponent ci,
+ unsigned short * brightness) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000D, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDSetContrast (VideoDigitizerComponent ci,
+ unsigned short * contrast) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000E, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDSetHue (VideoDigitizerComponent ci,
+ unsigned short * hue) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000F, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDSetSharpness (VideoDigitizerComponent ci,
+ unsigned short * sharpness) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0010, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDSetSaturation (VideoDigitizerComponent ci,
+ unsigned short * saturation) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0011, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetContrast (VideoDigitizerComponent ci,
+ unsigned short * contrast) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0012, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetHue (VideoDigitizerComponent ci,
+ unsigned short * hue) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0013, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetSharpness (VideoDigitizerComponent ci,
+ unsigned short * sharpness) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0014, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetSaturation (VideoDigitizerComponent ci,
+ unsigned short * saturation) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0015, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGrabOneFrame (VideoDigitizerComponent ci) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0016, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetMaxAuxBuffer (VideoDigitizerComponent ci,
+ PixMapHandle * pm,
+ Rect * r) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0017, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetDigitizerInfo (VideoDigitizerComponent ci,
+ DigitizerInfo * info) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0019, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetCurrentFlags (VideoDigitizerComponent ci,
+ long * inputCurrentFlag,
+ long * outputCurrentFlag) FIVEWORDINLINE(0x2F3C, 0x0008, 0x001A, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDSetKeyColor (VideoDigitizerComponent ci,
+ long index) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001B, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetKeyColor (VideoDigitizerComponent ci,
+ long * index) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001C, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDAddKeyColor (VideoDigitizerComponent ci,
+ long * index) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001D, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetNextKeyColor (VideoDigitizerComponent ci,
+ long index) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001E, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDSetKeyColorRange (VideoDigitizerComponent ci,
+ RGBColor * minRGB,
+ RGBColor * maxRGB) FIVEWORDINLINE(0x2F3C, 0x0008, 0x001F, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetKeyColorRange (VideoDigitizerComponent ci,
+ RGBColor * minRGB,
+ RGBColor * maxRGB) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0020, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDSetDigitizerUserInterrupt (VideoDigitizerComponent ci,
+ long flags,
+ VdigIntUPP userInterruptProc,
+ long refcon) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0021, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDSetInputColorSpaceMode (VideoDigitizerComponent ci,
+ short colorSpaceMode) FIVEWORDINLINE(0x2F3C, 0x0002, 0x0022, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetInputColorSpaceMode (VideoDigitizerComponent ci,
+ short * colorSpaceMode) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0023, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDSetClipState (VideoDigitizerComponent ci,
+ short clipEnable) FIVEWORDINLINE(0x2F3C, 0x0002, 0x0024, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetClipState (VideoDigitizerComponent ci,
+ short * clipEnable) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0025, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDSetClipRgn (VideoDigitizerComponent ci,
+ RgnHandle clipRegion) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0026, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDClearClipRgn (VideoDigitizerComponent ci,
+ RgnHandle clipRegion) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0027, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetCLUTInUse (VideoDigitizerComponent ci,
+ CTabHandle * colorTableHandle) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0028, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDSetPLLFilterType (VideoDigitizerComponent ci,
+ short pllType) FIVEWORDINLINE(0x2F3C, 0x0002, 0x0029, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetPLLFilterType (VideoDigitizerComponent ci,
+ short * pllType) FIVEWORDINLINE(0x2F3C, 0x0004, 0x002A, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetMaskandValue (VideoDigitizerComponent ci,
+ unsigned short blendLevel,
+ long * mask,
+ long * value) FIVEWORDINLINE(0x2F3C, 0x000A, 0x002B, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDSetMasterBlendLevel (VideoDigitizerComponent ci,
+ unsigned short * blendLevel) FIVEWORDINLINE(0x2F3C, 0x0004, 0x002C, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDSetPlayThruDestination (VideoDigitizerComponent ci,
+ PixMapHandle dest,
+ RectPtr destRect,
+ MatrixRecordPtr m,
+ RgnHandle mask) FIVEWORDINLINE(0x2F3C, 0x0010, 0x002D, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDSetPlayThruOnOff (VideoDigitizerComponent ci,
+ short state) FIVEWORDINLINE(0x2F3C, 0x0002, 0x002E, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDSetFieldPreference (VideoDigitizerComponent ci,
+ short fieldFlag) FIVEWORDINLINE(0x2F3C, 0x0002, 0x002F, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetFieldPreference (VideoDigitizerComponent ci,
+ short * fieldFlag) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0030, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDPreflightDestination (VideoDigitizerComponent ci,
+ Rect * digitizerRect,
+ PixMap ** dest,
+ RectPtr destRect,
+ MatrixRecordPtr m) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0032, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDPreflightGlobalRect (VideoDigitizerComponent ci,
+ GrafPtr theWindow,
+ Rect * globalRect) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0033, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDSetPlayThruGlobalRect (VideoDigitizerComponent ci,
+ GrafPtr theWindow,
+ Rect * globalRect) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0034, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDSetInputGammaRecord (VideoDigitizerComponent ci,
+ VDGamRecPtr inputGammaPtr) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0035, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetInputGammaRecord (VideoDigitizerComponent ci,
+ VDGamRecPtr * inputGammaPtr) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0036, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDSetBlackLevelValue (VideoDigitizerComponent ci,
+ unsigned short * blackLevel) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0037, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetBlackLevelValue (VideoDigitizerComponent ci,
+ unsigned short * blackLevel) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0038, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDSetWhiteLevelValue (VideoDigitizerComponent ci,
+ unsigned short * whiteLevel) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0039, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetWhiteLevelValue (VideoDigitizerComponent ci,
+ unsigned short * whiteLevel) FIVEWORDINLINE(0x2F3C, 0x0004, 0x003A, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetVideoDefaults (VideoDigitizerComponent ci,
+ unsigned short * blackLevel,
+ unsigned short * whiteLevel,
+ unsigned short * brightness,
+ unsigned short * hue,
+ unsigned short * saturation,
+ unsigned short * contrast,
+ unsigned short * sharpness) FIVEWORDINLINE(0x2F3C, 0x001C, 0x003B, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetNumberOfInputs (VideoDigitizerComponent ci,
+ short * inputs) FIVEWORDINLINE(0x2F3C, 0x0004, 0x003C, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetInputFormat (VideoDigitizerComponent ci,
+ short input,
+ short * format) FIVEWORDINLINE(0x2F3C, 0x0006, 0x003D, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDSetInput (VideoDigitizerComponent ci,
+ short input) FIVEWORDINLINE(0x2F3C, 0x0002, 0x003E, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetInput (VideoDigitizerComponent ci,
+ short * input) FIVEWORDINLINE(0x2F3C, 0x0004, 0x003F, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDSetInputStandard (VideoDigitizerComponent ci,
+ short inputStandard) FIVEWORDINLINE(0x2F3C, 0x0002, 0x0040, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDSetupBuffers (VideoDigitizerComponent ci,
+ VdigBufferRecListHandle bufferList) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0041, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGrabOneFrameAsync (VideoDigitizerComponent ci,
+ short buffer) FIVEWORDINLINE(0x2F3C, 0x0002, 0x0042, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDDone (VideoDigitizerComponent ci,
+ short buffer) FIVEWORDINLINE(0x2F3C, 0x0002, 0x0043, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDSetCompression (VideoDigitizerComponent ci,
+ OSType compressType,
+ short depth,
+ Rect * bounds,
+ CodecQ spatialQuality,
+ CodecQ temporalQuality,
+ long keyFrameRate) FIVEWORDINLINE(0x2F3C, 0x0016, 0x0044, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDCompressOneFrameAsync (VideoDigitizerComponent ci) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0045, 0x7000, 0xA82A);
+
+/* Note that UInt8* queuedFrameCount replaces Boolean* done. 0(==false) still means no frames, and 1(==true) one,
+ but if more than one are available the number should be returned here. The value 2 previously meant more than one frame,
+ so some VDIGs may return 2 even if more than 2 are available, and some will still return 1 as they are using the original definition */
+EXTERN_API( VideoDigitizerError )
+VDCompressDone (VideoDigitizerComponent ci,
+ UInt8 * queuedFrameCount,
+ Ptr * theData,
+ long * dataSize,
+ UInt8 * similarity,
+ TimeRecord * t) FIVEWORDINLINE(0x2F3C, 0x0014, 0x0046, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDReleaseCompressBuffer (VideoDigitizerComponent ci,
+ Ptr bufferAddr) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0047, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetImageDescription (VideoDigitizerComponent ci,
+ ImageDescriptionHandle desc) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0048, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDResetCompressSequence (VideoDigitizerComponent ci) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0049, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDSetCompressionOnOff (VideoDigitizerComponent ci,
+ Boolean state) FIVEWORDINLINE(0x2F3C, 0x0002, 0x004A, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetCompressionTypes (VideoDigitizerComponent ci,
+ VDCompressionListHandle h) FIVEWORDINLINE(0x2F3C, 0x0004, 0x004B, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDSetTimeBase (VideoDigitizerComponent ci,
+ TimeBase t) FIVEWORDINLINE(0x2F3C, 0x0004, 0x004C, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDSetFrameRate (VideoDigitizerComponent ci,
+ Fixed framesPerSecond) FIVEWORDINLINE(0x2F3C, 0x0004, 0x004D, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetDataRate (VideoDigitizerComponent ci,
+ long * milliSecPerFrame,
+ Fixed * framesPerSecond,
+ long * bytesPerSecond) FIVEWORDINLINE(0x2F3C, 0x000C, 0x004E, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetSoundInputDriver (VideoDigitizerComponent ci,
+ Str255 soundDriverName) FIVEWORDINLINE(0x2F3C, 0x0004, 0x004F, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetDMADepths (VideoDigitizerComponent ci,
+ long * depthArray,
+ long * preferredDepth) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0050, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetPreferredTimeScale (VideoDigitizerComponent ci,
+ TimeScale * preferred) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0051, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDReleaseAsyncBuffers (VideoDigitizerComponent ci) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0052, 0x7000, 0xA82A);
+
+/* 83 is reserved for compatibility reasons */
+EXTERN_API( VideoDigitizerError )
+VDSetDataRate (VideoDigitizerComponent ci,
+ long bytesPerSecond) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0054, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetTimeCode (VideoDigitizerComponent ci,
+ TimeRecord * atTime,
+ void * timeCodeFormat,
+ void * timeCodeTime) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0055, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDUseSafeBuffers (VideoDigitizerComponent ci,
+ Boolean useSafeBuffers) FIVEWORDINLINE(0x2F3C, 0x0002, 0x0056, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetSoundInputSource (VideoDigitizerComponent ci,
+ long videoInput,
+ long * soundInput) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0057, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetCompressionTime (VideoDigitizerComponent ci,
+ OSType compressionType,
+ short depth,
+ Rect * srcRect,
+ CodecQ * spatialQuality,
+ CodecQ * temporalQuality,
+ unsigned long * compressTime) FIVEWORDINLINE(0x2F3C, 0x0016, 0x0058, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDSetPreferredPacketSize (VideoDigitizerComponent ci,
+ long preferredPacketSizeInBytes) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0059, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDSetPreferredImageDimensions (VideoDigitizerComponent ci,
+ long width,
+ long height) FIVEWORDINLINE(0x2F3C, 0x0008, 0x005A, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetPreferredImageDimensions (VideoDigitizerComponent ci,
+ long * width,
+ long * height) FIVEWORDINLINE(0x2F3C, 0x0008, 0x005B, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDGetInputName (VideoDigitizerComponent ci,
+ long videoInput,
+ Str255 name) FIVEWORDINLINE(0x2F3C, 0x0008, 0x005C, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDSetDestinationPort (VideoDigitizerComponent ci,
+ CGrafPtr destPort) FIVEWORDINLINE(0x2F3C, 0x0004, 0x005D, 0x7000, 0xA82A);
+
+/*
+ The following call is designed to give the VDIG a little more control over how it is presented to the User, to clarify the
+ distinction between Devices and Inputs. Historically, the assumption has been that there is one component registered per device
+ and the component name is displayed. This change lets a component choose its name after registration.
+ vdDeviceFlagShowInputsAsDevices is meant for components that register once and support multiple devices
+ The UI is clearer if these are presented as device rather than inputs,
+ and this allows a VDIG to present itself this way without huge restructuring
+ vdDeviceFlagHideDevice is for the kind of VDIG that registers itself, and then can register a further VDIG for each device.
+ If no hardware is available, returning this flag will omit it from the list.
+ This call being made is also a good time to check for hardware and register further VDIG components if needed,
+ allowing for lazy initialization when the Application needs to find a VDIG rather than on every launch or replug.
+*/
+
+enum {
+ vdDeviceFlagShowInputsAsDevices = (1 << 0), /* Tell the Panel to promote Inputs to Devices*/
+ vdDeviceFlagHideDevice = (1 << 1) /* Omit this Device entirely from the list*/
+};
+
+EXTERN_API( VideoDigitizerError )
+VDGetDeviceNameAndFlags (VideoDigitizerComponent ci,
+ Str255 outName,
+ UInt32 * outNameFlags) FIVEWORDINLINE(0x2F3C, 0x0008, 0x005E, 0x7000, 0xA82A);
+
+enum {
+ vdFlagCaptureStarting = (1 << 0), /* Capture is about to start; allocate bandwidth */
+ vdFlagCaptureStopping = (1 << 1), /* Capture is about to stop; stop queuing frames*/
+ vdFlagCaptureIsForPreview = (1 << 2), /* Capture is just to screen for preview purposes*/
+ vdFlagCaptureIsForRecord = (1 << 3), /* Capture is going to be recorded*/
+ vdFlagCaptureLowLatency = (1 << 4), /* Fresh frames are more important than delivering every frame - don't queue too much*/
+ vdFlagCaptureAlwaysUseTimeBase = (1 << 5), /* Use the timebase for every frame; don't worry about making durations uniform*/
+ vdFlagCaptureSetSettingsBegin = (1 << 6), /* A series of calls are about to be made to restore settings.*/
+ vdFlagCaptureSetSettingsEnd = (1 << 7) /* Finished restoring settings; any set calls after this are from the app or UI*/
+};
+
+EXTERN_API( VideoDigitizerError )
+VDCaptureStateChanging (VideoDigitizerComponent ci,
+ UInt32 inStateFlags) FIVEWORDINLINE(0x2F3C, 0x0004, 0x005F, 0x7000, 0xA82A);
+
+/*
+ These UniqueID calls are so that the VDIG can give the SG information enabling it to restore a particular
+ configuration - choose a particular device and input from those available.
+ For example, restoring the specific camera for a set of several hot-plugged FireWire cameras
+ the caller can pass nil if it is not interested in one of the IDs
+ returning 0 in an ID means you don't have one
+*/
+
+EXTERN_API( VideoDigitizerError )
+VDGetUniqueIDs (VideoDigitizerComponent ci,
+ UInt64 * outDeviceID,
+ UInt64 * outInputID) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0060, 0x7000, 0xA82A);
+
+/*
+ Note this is a 'Select' not a 'Set' - the assumption is that the Unique ID is a function of the hardware
+ and not modifiable by the calling application. Either a nil pointer or 0 an the ID means don't care.
+ return vdDontHaveThatUniqueIDErr if your device doesn't have a match.
+*/
+
+EXTERN_API( VideoDigitizerError )
+VDSelectUniqueIDs (VideoDigitizerComponent ci,
+ const UInt64 * inDeviceID,
+ const UInt64 * inInputID) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0061, 0x7000, 0xA82A);
+
+
+/*
+ IIDC (Instrumentation & Industrial Digital Camera) Video Digitizers
+ Video Digitizers of subtype vdSubtypeIIDC support FireWire cameras which conform to the
+ "IIDC 1394-based Digital Camera Specification."
+*/
+
+enum {
+ vdSubtypeIIDC = FOUR_CHAR_CODE('iidc') /* Subtype for IIDC 1394-Digital Camera video digitizer*/
+};
+
+/*
+ vdIIDCAtomTypeFeature
+ Parent node for the QTAtoms which describe a given feature.
+*/
+enum {
+ vdIIDCAtomTypeFeature = FOUR_CHAR_CODE('feat')
+};
+
+/*
+ vdIIDCAtomTypeFeatureAtomTypeAndID
+ This atom describes the feature's OSType/group/name and QTAtomType & QTAtomID needed to retrieve its settings.
+ The contents of this atom is a VDIIDCFeatureAtomTypeAndID structure.
+*/
+enum {
+ vdIIDCAtomTypeFeatureAtomTypeAndID = FOUR_CHAR_CODE('t&id'),
+ vdIIDCAtomIDFeatureAtomTypeAndID = 1
+};
+
+
+struct VDIIDCFeatureAtomTypeAndID {
+ OSType feature; /* OSType of feature*/
+ OSType group; /* OSType of group that feature is categorized into*/
+ Str255 name; /* Name of this feature*/
+ QTAtomType atomType; /* Atom type which contains feature's settings*/
+ QTAtomID atomID; /* Atom ID which contains feature's settings*/
+};
+typedef struct VDIIDCFeatureAtomTypeAndID VDIIDCFeatureAtomTypeAndID;
+/* IIDC Feature OSTypes*/
+enum {
+ vdIIDCFeatureHue = FOUR_CHAR_CODE('hue '), /* Feature's settings handled by VDIIDCFeatureSettings*/
+ vdIIDCFeatureSaturation = FOUR_CHAR_CODE('satu'), /* Feature's settings handled by VDIIDCFeatureSettings*/
+ vdIIDCFeatureContrast = FOUR_CHAR_CODE('ctst'), /* Feature's settings handled by VDIIDCFeatureSettings*/
+ vdIIDCFeatureSharpness = FOUR_CHAR_CODE('shrp'), /* Feature's settings handled by VDIIDCFeatureSettings*/
+ vdIIDCFeatureBlackLevel = FOUR_CHAR_CODE('blvl'), /* Feature's settings handled by VDIIDCFeatureSettings*/
+ vdIIDCFeatureGain = FOUR_CHAR_CODE('gain'), /* Feature's settings handled by VDIIDCFeatureSettings*/
+ vdIIDCFeatureIris = FOUR_CHAR_CODE('iris'), /* Feature's settings handled by VDIIDCFeatureSettings*/
+ vdIIDCFeatureShutter = FOUR_CHAR_CODE('shtr'), /* Feature's settings handled by VDIIDCFeatureSettings*/
+ vdIIDCFeatureExposure = FOUR_CHAR_CODE('xpsr'), /* Feature's settings handled by VDIIDCFeatureSettings*/
+ vdIIDCFeatureWhiteBalanceU = FOUR_CHAR_CODE('whbu'), /* Feature's settings handled by VDIIDCFeatureSettings*/
+ vdIIDCFeatureWhiteBalanceV = FOUR_CHAR_CODE('whbv'), /* Feature's settings handled by VDIIDCFeatureSettings*/
+ vdIIDCFeatureGamma = FOUR_CHAR_CODE('gmma'), /* Feature's settings handled by VDIIDCFeatureSettings*/
+ vdIIDCFeatureTemperature = FOUR_CHAR_CODE('temp'), /* Feature's settings handled by VDIIDCFeatureSettings*/
+ vdIIDCFeatureZoom = FOUR_CHAR_CODE('zoom'), /* Feature's settings handled by VDIIDCFeatureSettings*/
+ vdIIDCFeatureFocus = FOUR_CHAR_CODE('fcus'), /* Feature's settings handled by VDIIDCFeatureSettings*/
+ vdIIDCFeaturePan = FOUR_CHAR_CODE('pan '), /* Feature's settings handled by VDIIDCFeatureSettings*/
+ vdIIDCFeatureTilt = FOUR_CHAR_CODE('tilt'), /* Feature's settings handled by VDIIDCFeatureSettings*/
+ vdIIDCFeatureOpticalFilter = FOUR_CHAR_CODE('opft'), /* Feature's settings handled by VDIIDCFeatureSettings*/
+ vdIIDCFeatureTrigger = FOUR_CHAR_CODE('trgr'), /* Trigger's setttings handled by VDIIDCTriggerSettings*/
+ vdIIDCFeatureCaptureSize = FOUR_CHAR_CODE('cpsz'), /* Feature's settings is not defined*/
+ vdIIDCFeatureCaptureQuality = FOUR_CHAR_CODE('cpql') /* Feature's settings is not defined*/
+};
+
+/* IIDC Group OSTypes that features are categorized into*/
+enum {
+ vdIIDCGroupImage = FOUR_CHAR_CODE('imag'), /* Feature related to camera's image*/
+ vdIIDCGroupColor = FOUR_CHAR_CODE('colr'), /* Feature related to camera's color control*/
+ vdIIDCGroupMechanics = FOUR_CHAR_CODE('mech'), /* Feature related to camera's mechanics*/
+ vdIIDCGroupTrigger = FOUR_CHAR_CODE('trig') /* Feature related to camera's trigger*/
+};
+
+/*
+ vdIIDCAtomTypeFeatureSettings
+ This atom describes the settings for the majority of features.
+ The contents of this atom is a VDIIDCFeatureSettings structure.
+*/
+enum {
+ vdIIDCAtomTypeFeatureSettings = FOUR_CHAR_CODE('fstg'),
+ vdIIDCAtomIDFeatureSettings = 1
+};
+
+
+struct VDIIDCFeatureCapabilities {
+ UInt32 flags;
+ UInt16 rawMinimum;
+ UInt16 rawMaximum;
+ QTFloatSingle absoluteMinimum;
+ QTFloatSingle absoluteMaximum;
+};
+typedef struct VDIIDCFeatureCapabilities VDIIDCFeatureCapabilities;
+
+struct VDIIDCFeatureState {
+ UInt32 flags;
+ QTFloatSingle value;
+};
+typedef struct VDIIDCFeatureState VDIIDCFeatureState;
+
+struct VDIIDCFeatureSettings {
+ VDIIDCFeatureCapabilities capabilities;
+ VDIIDCFeatureState state;
+};
+typedef struct VDIIDCFeatureSettings VDIIDCFeatureSettings;
+/*
+ Flags for use in VDIIDCFeatureCapabilities.flags & VDIIDCFeatureState.flags
+ When indicating capabilities, the flag being set indicates that the feature can be put into the given state.
+ When indicating/setting state, the flag represents the current/desired state.
+ Note that certain combinations of flags are valid for cababilities (i.e. vdIIDCFeatureFlagOn | vdIIDCFeatureFlagOff)
+ but are mutally exclusive for state.
+*/
+enum {
+ vdIIDCFeatureFlagOn = (1 << 0),
+ vdIIDCFeatureFlagOff = (1 << 1),
+ vdIIDCFeatureFlagManual = (1 << 2),
+ vdIIDCFeatureFlagAuto = (1 << 3),
+ vdIIDCFeatureFlagTune = (1 << 4),
+ vdIIDCFeatureFlagRawControl = (1 << 5),
+ vdIIDCFeatureFlagAbsoluteControl = (1 << 6)
+};
+
+/*
+ vdIIDCAtomTypeTriggerSettings
+ This atom describes the settings for the trigger feature.
+ The contents of this atom is a VDIIDCTriggerSettings structure.
+*/
+enum {
+ vdIIDCAtomTypeTriggerSettings = FOUR_CHAR_CODE('tstg'),
+ vdIIDCAtomIDTriggerSettings = 1
+};
+
+
+struct VDIIDCTriggerCapabilities {
+ UInt32 flags;
+ QTFloatSingle absoluteMinimum;
+ QTFloatSingle absoluteMaximum;
+};
+typedef struct VDIIDCTriggerCapabilities VDIIDCTriggerCapabilities;
+
+struct VDIIDCTriggerState {
+ UInt32 flags;
+ UInt16 mode2TransitionCount;
+ UInt16 mode3FrameRateMultiplier;
+ QTFloatSingle absoluteValue;
+};
+typedef struct VDIIDCTriggerState VDIIDCTriggerState;
+
+struct VDIIDCTriggerSettings {
+ VDIIDCTriggerCapabilities capabilities;
+ VDIIDCTriggerState state;
+};
+typedef struct VDIIDCTriggerSettings VDIIDCTriggerSettings;
+/*
+ Flags for use in VDIIDCTriggerCapabilities.flags & VDIIDCTriggerState.flags
+ When indicating capabilities, the flag being set indicates that the trigger can be put into the given state.
+ When indicating/setting state, the flag represents the current/desired state.
+ Note that certain combinations of flags are valid for cababilities (i.e. vdIIDCTriggerFlagOn | vdIIDCTriggerFlagOff)
+ but are mutally exclusive for state.
+*/
+enum {
+ vdIIDCTriggerFlagOn = (1 << 0),
+ vdIIDCTriggerFlagOff = (1 << 1),
+ vdIIDCTriggerFlagActiveHigh = (1 << 2),
+ vdIIDCTriggerFlagActiveLow = (1 << 3),
+ vdIIDCTriggerFlagMode0 = (1 << 4),
+ vdIIDCTriggerFlagMode1 = (1 << 5),
+ vdIIDCTriggerFlagMode2 = (1 << 6),
+ vdIIDCTriggerFlagMode3 = (1 << 7),
+ vdIIDCTriggerFlagRawControl = (1 << 8),
+ vdIIDCTriggerFlagAbsoluteControl = (1 << 9)
+};
+
+/*
+ VDIIDC calls are additional calls for IIDC digitizers (vdSubtypeIIDC)
+ These calls are only valid for video digitizers of subtype vdSubtypeIIDC.
+*/
+EXTERN_API( VideoDigitizerError )
+VDIIDCGetFeatures (VideoDigitizerComponent ci,
+ QTAtomContainer * container) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0200, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDIIDCSetFeatures (VideoDigitizerComponent ci,
+ QTAtomContainer container) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0201, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDIIDCGetDefaultFeatures (VideoDigitizerComponent ci,
+ QTAtomContainer * container) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0202, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDIIDCGetCSRData (VideoDigitizerComponent ci,
+ Boolean offsetFromRegisterBase,
+ UInt32 offset,
+ UInt32 * data) FIVEWORDINLINE(0x2F3C, 0x000A, 0x0203, 0x7000, 0xA82A);
+
+EXTERN_API( VideoDigitizerError )
+VDIIDCSetCSRData (VideoDigitizerComponent ci,
+ Boolean offsetFromRegisterBase,
+ UInt32 offset,
+ UInt32 data) FIVEWORDINLINE(0x2F3C, 0x000A, 0x0204, 0x7000, 0xA82A);
+
+
+
+enum {
+ xmlParseComponentType = FOUR_CHAR_CODE('pars'),
+ xmlParseComponentSubType = FOUR_CHAR_CODE('xml ')
+};
+
+enum {
+ xmlIdentifierInvalid = 0,
+ xmlIdentifierUnrecognized = (long)0xFFFFFFFF,
+ xmlContentTypeInvalid = 0,
+ xmlContentTypeElement = 1,
+ xmlContentTypeCharData = 2
+};
+
+enum {
+ elementFlagAlwaysSelfContained = 1L << 0, /* Element doesn't have contents or closing tag even if it doesn't end with />, as in the HTML <img> tag*/
+ elementFlagPreserveWhiteSpace = 1L << 1, /* Preserve whitespace in content, default is to remove it */
+ xmlParseFlagAllowUppercase = 1L << 0, /* Entities and attributes do not have to be lowercase (strict XML), but can be upper or mixed case as in HTML*/
+ xmlParseFlagAllowUnquotedAttributeValues = 1L << 1, /* Attributes values do not have to be enclosed in quotes (strict XML), but can be left unquoted if they contain no spaces*/
+ xmlParseFlagEventParseOnly = 1L << 2 /* Do event parsing only*/
+};
+
+enum {
+ attributeValueKindCharString = 0,
+ attributeValueKindInteger = 1L << 0, /* Number*/
+ attributeValueKindPercent = 1L << 1, /* Number or percent*/
+ attributeValueKindBoolean = 1L << 2, /* "true" or "false"*/
+ attributeValueKindOnOff = 1L << 3, /* "on" or "off"*/
+ attributeValueKindColor = 1L << 4, /* Either "#rrggbb" or a color name*/
+ attributeValueKindEnum = 1L << 5, /* one of a number of strings; the enum strings are passed as a zero-separated, double-zero-terminated C string in the attributeKindValueInfo param*/
+ attributeValueKindCaseSensEnum = 1L << 6, /* one of a number of strings; the enum strings are passed as for attributeValueKindEnum, but the values are case-sensitive*/
+ MAX_ATTRIBUTE_VALUE_KIND = attributeValueKindCaseSensEnum
+};
+
+enum {
+ nameSpaceIDNone = 0
+};
+
+/* A Parsed XML attribute value, one of number/percent, boolean/on-off, color, or enumerated type*/
+
+union XMLAttributeValue {
+ SInt32 number; /* The value when valueKind is attributeValueKindInteger or attributeValueKindPercent*/
+ Boolean boolean; /* The value when valueKind is attributeValueKindBoolean or attributeValueKindOnOff*/
+ RGBColor color; /* The value when valueKind is attributeValueKindColor*/
+ UInt32 enumType; /* The value when valueKind is attributeValueKindEnum*/
+};
+typedef union XMLAttributeValue XMLAttributeValue;
+/* An XML attribute-value pair*/
+
+struct XMLAttribute {
+ UInt32 identifier; /* Tokenized identifier, if the attribute name was recognized by the parser*/
+ char * name; /* Attribute name, Only present if identifier == xmlIdentifierUnrecognized*/
+ long valueKind; /* Type of parsed value, if the value was recognized and parsed; otherwise, attributeValueKindCharString*/
+ XMLAttributeValue value; /* Parsed attribute value*/
+ char * valueStr; /* Always present*/
+};
+typedef struct XMLAttribute XMLAttribute;
+typedef XMLAttribute * XMLAttributePtr;
+/* Forward struct declarations for recursively-defined tree structure*/
+typedef struct XMLContent XMLContent;
+
+typedef XMLContent * XMLContentPtr;
+/*
+ An XML Element, i.e.
+ <element attr="value" attr="value" ...> [contents] </element>
+ or
+ <element attr="value" attr="value" .../>
+*/
+
+struct XMLElement {
+ UInt32 identifier; /* Tokenized identifier, if the element name was recognized by the parser*/
+ char * name; /* Element name, only present if identifier == xmlIdentifierUnrecognized*/
+ XMLAttributePtr attributes; /* Array of attributes, terminated with an attribute with identifier == xmlIdentifierInvalid*/
+ XMLContentPtr contents; /* Array of contents, terminated with a content with kind == xmlIdentifierInvalid*/
+};
+typedef struct XMLElement XMLElement;
+typedef XMLElement * XMLElementPtr;
+/*
+ The content of an XML element is a series of parts, each of which may be either another element
+ or simply character data.
+*/
+
+union XMLElementContent {
+ XMLElement element; /* The contents when the content kind is xmlContentTypeElement*/
+ char * charData; /* The contents when the content kind is xmlContentTypeCharData*/
+};
+typedef union XMLElementContent XMLElementContent;
+
+struct XMLContent {
+ UInt32 kind;
+ XMLElementContent actualContent;
+};
+
+
+struct XMLDocRecord {
+ void * xmlDataStorage; /* opaque storage*/
+ XMLElement rootElement;
+};
+typedef struct XMLDocRecord XMLDocRecord;
+
+typedef XMLDocRecord * XMLDoc;
+/*callback routines for event parsing*/
+typedef CALLBACK_API( ComponentResult , StartDocumentHandler )(long refcon);
+typedef CALLBACK_API( ComponentResult , EndDocumentHandler )(long refcon);
+typedef CALLBACK_API( ComponentResult , StartElementHandler )(const char *name, const char *const atts[], long refcon);
+typedef CALLBACK_API( ComponentResult , EndElementHandler )(const char *name, long refcon);
+typedef CALLBACK_API( ComponentResult , CharDataHandler )(const char *charData, long refcon);
+typedef CALLBACK_API( ComponentResult , PreprocessInstructionHandler )(const char *name, const char *const atts[], long refcon);
+typedef CALLBACK_API( ComponentResult , CommentHandler )(const char *comment, long refcon);
+typedef CALLBACK_API( ComponentResult , CDataHandler )(const char *cdata, long refcon);
+typedef STACK_UPP_TYPE(StartDocumentHandler) StartDocumentHandlerUPP;
+typedef STACK_UPP_TYPE(EndDocumentHandler) EndDocumentHandlerUPP;
+typedef STACK_UPP_TYPE(StartElementHandler) StartElementHandlerUPP;
+typedef STACK_UPP_TYPE(EndElementHandler) EndElementHandlerUPP;
+typedef STACK_UPP_TYPE(CharDataHandler) CharDataHandlerUPP;
+typedef STACK_UPP_TYPE(PreprocessInstructionHandler) PreprocessInstructionHandlerUPP;
+typedef STACK_UPP_TYPE(CommentHandler) CommentHandlerUPP;
+typedef STACK_UPP_TYPE(CDataHandler) CDataHandlerUPP;
+/* Parses the XML file pointed to by dataRef, returning a XMLDoc parse tree*/
+EXTERN_API( ComponentResult )
+XMLParseDataRef (ComponentInstance aParser,
+ Handle dataRef,
+ OSType dataRefType,
+ long parseFlags,
+ XMLDoc * document) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0001, 0x7000, 0xA82A);
+
+/* Parses the XML file pointed to by fileSpec, returning a XMLDoc parse tree*/
+EXTERN_API( ComponentResult )
+XMLParseFile (ComponentInstance aParser,
+ ConstFSSpecPtr fileSpec,
+ long parseFlags,
+ XMLDoc * document) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0002, 0x7000, 0xA82A);
+
+/* Disposes of a XMLDoc parse tree*/
+EXTERN_API( ComponentResult )
+XMLParseDisposeXMLDoc (ComponentInstance aParser,
+ XMLDoc document) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0003, 0x7000, 0xA82A);
+
+/*
+ Returns a more detailed description of the error and the line in which it occurred, if a
+ file failed to parse properly.
+*/
+EXTERN_API( ComponentResult )
+XMLParseGetDetailedParseError (ComponentInstance aParser,
+ long * errorLine,
+ StringPtr errDesc) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0004, 0x7000, 0xA82A);
+
+/*
+ Tell the parser of an element to be recognized. The tokenized element unique identifier is
+ passed in *elementID, unless *elementID is zero, whereupon a unique ID is generated and returned.
+ Thus, a valid element identifier can never be zero.
+*/
+EXTERN_API( ComponentResult )
+XMLParseAddElement (ComponentInstance aParser,
+ char * elementName,
+ UInt32 nameSpaceID,
+ UInt32 * elementID,
+ long elementFlags) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0005, 0x7000, 0xA82A);
+
+/*
+ Tells the parser of an attribute for the specified element. The tokenized attribute unique
+ ID is passed in *attributeID, unless *attributeID is zero, whereupon a unique ID is generated and
+ returned. Thus, a valid attribute identifier can never be zero.
+*/
+EXTERN_API( ComponentResult )
+XMLParseAddAttribute (ComponentInstance aParser,
+ UInt32 elementID,
+ UInt32 nameSpaceID,
+ char * attributeName,
+ UInt32 * attributeID) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0006, 0x7000, 0xA82A);
+
+/*
+ Tells the parser of several attributes for the specified element. The attributes are passed
+ as a zero-delimited, double-zero-terminated C string in attributeNames, and the attribute
+ IDs are passed in on attributeIDs as an array; if any attributeIDs are zero, unique IDs
+ are generated for those and returned
+*/
+EXTERN_API( ComponentResult )
+XMLParseAddMultipleAttributes (ComponentInstance aParser,
+ UInt32 elementID,
+ UInt32 * nameSpaceIDs,
+ char * attributeNames,
+ UInt32 * attributeIDs) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0007, 0x7000, 0xA82A);
+
+/*
+ Tells the parser of an attribute, which may have a particular type of value, for the
+ specified element. Params are as in XMLParseAddAttribute, plus all the kinds of values
+ the attribute may have are passed in attributeValueKind, and optional additional information
+ required to tokenize the particular kind of attribute is passed in attributeValueKindInfo
+*/
+EXTERN_API( ComponentResult )
+XMLParseAddAttributeAndValue (ComponentInstance aParser,
+ UInt32 elementID,
+ UInt32 nameSpaceID,
+ char * attributeName,
+ UInt32 * attributeID,
+ UInt32 attributeValueKind,
+ void * attributeValueKindInfo) FIVEWORDINLINE(0x2F3C, 0x0018, 0x0008, 0x7000, 0xA82A);
+
+/*
+ Tells the parser of several attributes, which may have a particular type of value, for the
+ specified element. Params are as in XMLParseAddMultipleAttributes, plus all the kinds of values
+ the attributes may have are passed in attributeValueKinds, and optional additional information
+ required to tokenize the particular kind of attributes is passed in attributeValueKindInfos
+*/
+EXTERN_API( ComponentResult )
+XMLParseAddMultipleAttributesAndValues (ComponentInstance aParser,
+ UInt32 elementID,
+ UInt32 * nameSpaceIDs,
+ char * attributeNames,
+ UInt32 * attributeIDs,
+ UInt32 * attributeValueKinds,
+ void ** attributeValueKindInfos) FIVEWORDINLINE(0x2F3C, 0x0018, 0x0009, 0x7000, 0xA82A);
+
+/*
+ Tells the parser that the particular attribute may have an additional kind of
+ value, as specified by attributeValueKind and attributeValueKindInfo
+*/
+EXTERN_API( ComponentResult )
+XMLParseAddAttributeValueKind (ComponentInstance aParser,
+ UInt32 elementID,
+ UInt32 attributeID,
+ UInt32 attributeValueKind,
+ void * attributeValueKindInfo) FIVEWORDINLINE(0x2F3C, 0x0010, 0x000A, 0x7000, 0xA82A);
+
+/*
+ Tell the parser of a namespace to be recognized. The tokenized namespace unique identifier is
+ passed in *nameSpaceID, unless *nameSpaceID is zero, whereupon a unique ID is generated and returned.
+ Thus, a valid nameSpaceID identifier can never be zero.
+*/
+EXTERN_API( ComponentResult )
+XMLParseAddNameSpace (ComponentInstance aParser,
+ char * nameSpaceURL,
+ UInt32 * nameSpaceID) FIVEWORDINLINE(0x2F3C, 0x0008, 0x000B, 0x7000, 0xA82A);
+
+/* Specifies the offset and limit for reading from the dataref to be used when parsing*/
+EXTERN_API( ComponentResult )
+XMLParseSetOffsetAndLimit (ComponentInstance aParser,
+ UInt32 offset,
+ UInt32 limit) FIVEWORDINLINE(0x2F3C, 0x0008, 0x000C, 0x7000, 0xA82A);
+
+/* Set the event parse refcon*/
+EXTERN_API( ComponentResult )
+XMLParseSetEventParseRefCon (ComponentInstance aParser,
+ long refcon) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000D, 0x7000, 0xA82A);
+
+/* Set the start document handler UPP for event parsing*/
+EXTERN_API( ComponentResult )
+XMLParseSetStartDocumentHandler (ComponentInstance aParser,
+ StartDocumentHandlerUPP startDocument) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000E, 0x7000, 0xA82A);
+
+/* Set the end document handler UPP for event parsing*/
+EXTERN_API( ComponentResult )
+XMLParseSetEndDocumentHandler (ComponentInstance aParser,
+ EndDocumentHandlerUPP endDocument) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000F, 0x7000, 0xA82A);
+
+/* Set the start element handler UPP for event parsing*/
+EXTERN_API( ComponentResult )
+XMLParseSetStartElementHandler (ComponentInstance aParser,
+ StartElementHandlerUPP startElement) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0010, 0x7000, 0xA82A);
+
+/* Set the end element handler UPP for event parsing*/
+EXTERN_API( ComponentResult )
+XMLParseSetEndElementHandler (ComponentInstance aParser,
+ EndElementHandlerUPP endElement) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0011, 0x7000, 0xA82A);
+
+/* Set the character data handler UPP for event parsing*/
+EXTERN_API( ComponentResult )
+XMLParseSetCharDataHandler (ComponentInstance aParser,
+ CharDataHandlerUPP charData) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0012, 0x7000, 0xA82A);
+
+/* Set the preprocess instruction handler UPP for event parsing*/
+EXTERN_API( ComponentResult )
+XMLParseSetPreprocessInstructionHandler (ComponentInstance aParser,
+ PreprocessInstructionHandlerUPP preprocessInstruction) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0013, 0x7000, 0xA82A);
+
+/* Set the comment handler UPP for event parsing*/
+EXTERN_API( ComponentResult )
+XMLParseSetCommentHandler (ComponentInstance aParser,
+ CommentHandlerUPP comment) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0014, 0x7000, 0xA82A);
+
+/* Set the cdata handler UPP for event parsing*/
+EXTERN_API( ComponentResult )
+XMLParseSetCDataHandler (ComponentInstance aParser,
+ CDataHandlerUPP cdata) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0015, 0x7000, 0xA82A);
+
+/*
+ Helper Macros
+
+ These macros allow you to easily add entities and attributes to the parser
+ in an error free manner when the identifiers are defined in a particular manner.
+ For these to work, you must define the identifiers as follows:
+
+ For entities, they must be defined as element_elementName, as in:
+
+ enum
+ {
+ element_xml = 1, // "xml"
+ element_head, // "head"
+ element_body // "body"
+ };
+
+ If the element name has characters that are illegal in an identifier,
+ some of the macros support that, but the identifier must not contain
+ the illegal characters:
+
+ enum
+ {
+ element_rootlayout // "root-layout"
+ }
+
+ For attribute names, similar rules apply except that they must be defined
+ as attr_attributeName, as in:
+
+ enum
+ {
+ attr_src = 1, // "src"
+ attr_href,
+ attr_width,
+ attr_height
+ }
+
+ Finally, the existence of local variables elementID and attributeID is required.
+*/
+/*
+ Adds the specified element to the parser, i.e. XML_ADD_ELEMENT(head) adds the element "head" with
+ a unique identifier of element_head
+*/
+
+#define XML_ADD_ELEMENT_NS(elementName,nameSpaceID) elementID = GLUE2(element_,elementName); XMLParseAddElement(xmlParser, #elementName, nameSpaceID, &elementID, 0)
+#define XML_ADD_ELEMENT(elementName) XML_ADD_ELEMENT_NS(elementName,nameSpaceIDNone)
+
+/*
+ Adds the specified element to the parser, not using the same string to generate the identifier and
+ the element name. Use for element names that contain characters which are illegal in identifiers,
+ i.e XML_ADD_COMPLEX_ELEMENT("root-layout",rootlayout) adds the element "root-layout" with a unique
+ identifier of element_rootlayout
+*/
+
+#define XML_ADD_COMPLEX_ELEMENT_NS(elementName,elemID,nameSpaceID) elementID = GLUE2(element_,elemID); XMLParseAddElement(xmlParser, #elementName, nameSpaceID, &elementID, 0)
+#define XML_ADD_COMPLEX_ELEMENT(elementName,elemID) XML_ADD_COMPLEX_ELEMENT_NS(elementName,elemID,nameSpaceIDNone)
+
+/*
+ Adds the specified attribute to the current element in the parser, i.e. XML_ADD_ATTRIBUTE(src)
+ adds the attribute "src" to the current element, and identifies it by attr_src
+*/
+
+#define XML_ADD_ATTRIBUTE_NS(attrName,nameSpaceID) attributeID = GLUE2(attr_,attrName); XMLParseAddAttribute(xmlParser, elementID, nameSpaceID, #attrName, &attributeID);
+#define XML_ADD_ATTRIBUTE(attrName) XML_ADD_ATTRIBUTE_NS(attrName,nameSpaceIDNone)
+
+/*
+ Adds the specified attribute to the current element in the parser, i.e. XML_ADD_ATTRIBUTE(element_img, src)
+ adds the attribute "src" to the element_img element, and identifies it by attr_src
+ Adds the specified attribute to the current element in the parser, not using the same string to
+ generate the identifier and the element name. Use for attribute names that contain characters which
+ are illegal in identifiers, i.e XML_ADD_COMPLEX_ATTRIBUTE("http-equiv",httpequiv) adds the element
+ "http-equiv" with a unique identifier of attr_httpequiv
+*/
+
+#define XML_ADD_COMPLEX_ATTRIBUTE_NS(attrName,attrID,nameSpaceID) attributeID = GLUE2(attr_,attrID); XMLParseAddAttribute(xmlParser, elementID, nameSpaceID, #attrName, &attributeID);
+#define XML_ADD_COMPLEX_ATTRIBUTE(attrName,attrID) XML_ADD_COMPLEX_ATTRIBUTE_NS(attrName,attrID,nameSpaceIDNone)
+
+
+#define XML_ADD_ATTRIBUTE_AND_VALUE_NS(attrName,valueKind,valueKindInfo,nameSpaceID) attributeID = GLUE2(attr_,attrName); XMLParseAddAttributeAndValue(xmlParser, elementID, nameSpaceID, #attrName, &attributeID, valueKind, valueKindInfo);
+#define XML_ADD_ATTRIBUTE_AND_VALUE(attrName,valueKind,valueKindInfo) XML_ADD_ATTRIBUTE_AND_VALUE_NS(attrName,valueKind,valueKindInfo,nameSpaceIDNone)
+
+
+#define XML_ADD_COMPLEX_ATTRIBUTE_AND_VALUE_NS(attrName,attrID,valueKind,valueKindInfo,nameSpaceID) attributeID = GLUE2(attr_,attrID); XMLParseAddAttributeAndValue(xmlParser, elementID, nameSpaceID, #attrName, &attributeID, valueKind, valueKindInfo);
+#define XML_ADD_COMPLEX_ATTRIBUTE_AND_VALUE(attrName,attrID,valueKind,valueKindInfo) XML_ADD_COMPLEX_ATTRIBUTE_AND_VALUE_NS(attrName,attrID,valueKind,valueKindInfo,nameSpaceIDNone)
+
+
+
+
+
+
+/*
+ General Sequence Grab stuff
+*/
+typedef ComponentInstance SeqGrabComponent;
+typedef ComponentInstance SGChannel;
+enum {
+ SeqGrabComponentType = FOUR_CHAR_CODE('barg'),
+ SeqGrabChannelType = FOUR_CHAR_CODE('sgch'),
+ SeqGrabPanelType = FOUR_CHAR_CODE('sgpn'),
+ SeqGrabCompressionPanelType = FOUR_CHAR_CODE('cmpr'),
+ SeqGrabSourcePanelType = FOUR_CHAR_CODE('sour')
+};
+
+enum {
+ seqGrabToDisk = 1,
+ seqGrabToMemory = 2,
+ seqGrabDontUseTempMemory = 4,
+ seqGrabAppendToFile = 8,
+ seqGrabDontAddMovieResource = 16,
+ seqGrabDontMakeMovie = 32,
+ seqGrabPreExtendFile = 64,
+ seqGrabDataProcIsInterruptSafe = 128,
+ seqGrabDataProcDoesOverlappingReads = 256
+};
+
+typedef unsigned long SeqGrabDataOutputEnum;
+enum {
+ seqGrabRecord = 1,
+ seqGrabPreview = 2,
+ seqGrabPlayDuringRecord = 4,
+ seqGrabLowLatencyCapture = 8, /* return the freshest frame possible, for live work (videoconferencing, live broadcast, live image processing) */
+ seqGrabAlwaysUseTimeBase = 16 /* Tell VDIGs to use TimebaseTime always, rather than creating uniform frame durations, for more accurate live sync with audio */
+};
+
+typedef unsigned long SeqGrabUsageEnum;
+enum {
+ seqGrabHasBounds = 1,
+ seqGrabHasVolume = 2,
+ seqGrabHasDiscreteSamples = 4,
+ seqGrabDoNotBufferizeData = 8,
+ seqGrabCanMoveWindowWhileRecording = 16
+};
+
+typedef unsigned long SeqGrabChannelInfoEnum;
+
+struct SGOutputRecord {
+ long data[1];
+};
+typedef struct SGOutputRecord SGOutputRecord;
+
+typedef SGOutputRecord * SGOutput;
+
+struct SeqGrabFrameInfo {
+ long frameOffset;
+ long frameTime;
+ long frameSize;
+ SGChannel frameChannel;
+ long frameRefCon;
+};
+typedef struct SeqGrabFrameInfo SeqGrabFrameInfo;
+typedef SeqGrabFrameInfo * SeqGrabFrameInfoPtr;
+
+struct SeqGrabExtendedFrameInfo {
+ wide frameOffset;
+ long frameTime;
+ long frameSize;
+ SGChannel frameChannel;
+ long frameRefCon;
+ SGOutput frameOutput;
+};
+typedef struct SeqGrabExtendedFrameInfo SeqGrabExtendedFrameInfo;
+typedef SeqGrabExtendedFrameInfo * SeqGrabExtendedFrameInfoPtr;
+enum {
+ grabPictOffScreen = 1,
+ grabPictIgnoreClip = 2,
+ grabPictCurrentImage = 4
+};
+
+enum {
+ sgFlagControlledGrab = (1 << 0),
+ sgFlagAllowNonRGBPixMaps = (1 << 1)
+};
+
+typedef CALLBACK_API( OSErr , SGDataProcPtr )(SGChannel c, Ptr p, long len, long *offset, long chRefCon, TimeValue time, short writeType, long refCon);
+typedef STACK_UPP_TYPE(SGDataProcPtr) SGDataUPP;
+
+struct SGDeviceInputName {
+ Str63 name;
+ Handle icon;
+ long flags;
+ long reserved; /* zero*/
+};
+typedef struct SGDeviceInputName SGDeviceInputName;
+enum {
+ sgDeviceInputNameFlagInputUnavailable = (1 << 0)
+};
+
+
+struct SGDeviceInputListRecord {
+ short count;
+ short selectedIndex;
+ long reserved; /* zero*/
+ SGDeviceInputName entry[1];
+};
+typedef struct SGDeviceInputListRecord SGDeviceInputListRecord;
+
+typedef SGDeviceInputListRecord * SGDeviceInputListPtr;
+typedef SGDeviceInputListPtr * SGDeviceInputList;
+
+struct SGDeviceName {
+ Str63 name;
+ Handle icon;
+ long flags;
+ long refCon;
+ SGDeviceInputList inputs; /* list of inputs; formerly reserved to 0*/
+};
+typedef struct SGDeviceName SGDeviceName;
+enum {
+ sgDeviceNameFlagDeviceUnavailable = (1 << 0),
+ sgDeviceNameFlagShowInputsAsDevices = (1 << 1)
+};
+
+
+struct SGDeviceListRecord {
+ short count;
+ short selectedIndex;
+ long reserved; /* zero*/
+ SGDeviceName entry[1];
+};
+typedef struct SGDeviceListRecord SGDeviceListRecord;
+
+typedef SGDeviceListRecord * SGDeviceListPtr;
+typedef SGDeviceListPtr * SGDeviceList;
+enum {
+ sgDeviceListWithIcons = (1 << 0),
+ sgDeviceListDontCheckAvailability = (1 << 1),
+ sgDeviceListIncludeInputs = (1 << 2)
+};
+
+enum {
+ seqGrabWriteAppend = 0,
+ seqGrabWriteReserve = 1,
+ seqGrabWriteFill = 2
+};
+
+enum {
+ seqGrabUnpause = 0,
+ seqGrabPause = 1,
+ seqGrabPauseForMenu = 3
+};
+
+enum {
+ channelFlagDontOpenResFile = 2,
+ channelFlagHasDependency = 4
+};
+
+typedef CALLBACK_API( Boolean , SGModalFilterProcPtr )(DialogRef theDialog, const EventRecord *theEvent, short *itemHit, long refCon);
+typedef STACK_UPP_TYPE(SGModalFilterProcPtr) SGModalFilterUPP;
+enum {
+ sgPanelFlagForPanel = 1
+};
+
+enum {
+ seqGrabSettingsPreviewOnly = 1
+};
+
+enum {
+ channelPlayNormal = 0,
+ channelPlayFast = 1,
+ channelPlayHighQuality = 2,
+ channelPlayAllData = 4
+};
+
+
+EXTERN_API( ComponentResult )
+SGInitialize (SeqGrabComponent s) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0001, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetDataOutput (SeqGrabComponent s,
+ const FSSpec * movieFile,
+ long whereFlags) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0002, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetDataOutput (SeqGrabComponent s,
+ FSSpec * movieFile,
+ long * whereFlags) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0003, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetGWorld (SeqGrabComponent s,
+ CGrafPtr gp,
+ GDHandle gd) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0004, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetGWorld (SeqGrabComponent s,
+ CGrafPtr * gp,
+ GDHandle * gd) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0005, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGNewChannel (SeqGrabComponent s,
+ OSType channelType,
+ SGChannel * ref) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0006, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGDisposeChannel (SeqGrabComponent s,
+ SGChannel c) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0007, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGStartPreview (SeqGrabComponent s) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0010, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGStartRecord (SeqGrabComponent s) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0011, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGIdle (SeqGrabComponent s) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0012, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGStop (SeqGrabComponent s) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0013, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGPause (SeqGrabComponent s,
+ Byte pause) FIVEWORDINLINE(0x2F3C, 0x0002, 0x0014, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGPrepare (SeqGrabComponent s,
+ Boolean prepareForPreview,
+ Boolean prepareForRecord) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0015, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGRelease (SeqGrabComponent s) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0016, 0x7000, 0xA82A);
+
+EXTERN_API( Movie )
+SGGetMovie (SeqGrabComponent s) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0017, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetMaximumRecordTime (SeqGrabComponent s,
+ unsigned long ticks) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0018, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetMaximumRecordTime (SeqGrabComponent s,
+ unsigned long * ticks) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0019, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetStorageSpaceRemaining (SeqGrabComponent s,
+ unsigned long * bytes) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetTimeRemaining (SeqGrabComponent s,
+ long * ticksLeft) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGrabPict (SeqGrabComponent s,
+ PicHandle * p,
+ const Rect * bounds,
+ short offscreenDepth,
+ long grabPictFlags) FIVEWORDINLINE(0x2F3C, 0x000E, 0x001C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetLastMovieResID (SeqGrabComponent s,
+ short * resID) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetFlags (SeqGrabComponent s,
+ long sgFlags) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetFlags (SeqGrabComponent s,
+ long * sgFlags) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetDataProc (SeqGrabComponent s,
+ SGDataUPP proc,
+ long refCon) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0020, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGNewChannelFromComponent (SeqGrabComponent s,
+ SGChannel * newChannel,
+ Component sgChannelComponent) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0021, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGDisposeDeviceList (SeqGrabComponent s,
+ SGDeviceList list) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0022, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGAppendDeviceListToMenu (SeqGrabComponent s,
+ SGDeviceList list,
+ MenuRef mh) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0023, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetSettings (SeqGrabComponent s,
+ UserData ud,
+ long flags) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0024, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetSettings (SeqGrabComponent s,
+ UserData * ud,
+ long flags) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0025, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetIndChannel (SeqGrabComponent s,
+ short index,
+ SGChannel * ref,
+ OSType * chanType) FIVEWORDINLINE(0x2F3C, 0x000A, 0x0026, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGUpdate (SeqGrabComponent s,
+ RgnHandle updateRgn) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0027, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetPause (SeqGrabComponent s,
+ Byte * paused) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0028, 0x7000, 0xA82A);
+
+typedef const Component * ConstComponentListPtr;
+EXTERN_API( ComponentResult )
+SGSettingsDialog (SeqGrabComponent s,
+ SGChannel c,
+ short numPanels,
+ ConstComponentListPtr panelList,
+ long flags,
+ SGModalFilterUPP proc,
+ long procRefNum) FIVEWORDINLINE(0x2F3C, 0x0016, 0x0029, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetAlignmentProc (SeqGrabComponent s,
+ ICMAlignmentProcRecordPtr alignmentProc) FIVEWORDINLINE(0x2F3C, 0x0004, 0x002A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetChannelSettings (SeqGrabComponent s,
+ SGChannel c,
+ UserData ud,
+ long flags) FIVEWORDINLINE(0x2F3C, 0x000C, 0x002B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetChannelSettings (SeqGrabComponent s,
+ SGChannel c,
+ UserData * ud,
+ long flags) FIVEWORDINLINE(0x2F3C, 0x000C, 0x002C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetMode (SeqGrabComponent s,
+ Boolean * previewMode,
+ Boolean * recordMode) FIVEWORDINLINE(0x2F3C, 0x0008, 0x002D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetDataRef (SeqGrabComponent s,
+ Handle dataRef,
+ OSType dataRefType,
+ long whereFlags) FIVEWORDINLINE(0x2F3C, 0x000C, 0x002E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetDataRef (SeqGrabComponent s,
+ Handle * dataRef,
+ OSType * dataRefType,
+ long * whereFlags) FIVEWORDINLINE(0x2F3C, 0x000C, 0x002F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGNewOutput (SeqGrabComponent s,
+ Handle dataRef,
+ OSType dataRefType,
+ long whereFlags,
+ SGOutput * sgOut) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0030, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGDisposeOutput (SeqGrabComponent s,
+ SGOutput sgOut) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0031, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetOutputFlags (SeqGrabComponent s,
+ SGOutput sgOut,
+ long whereFlags) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0032, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetChannelOutput (SeqGrabComponent s,
+ SGChannel c,
+ SGOutput sgOut) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0033, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetDataOutputStorageSpaceRemaining (SeqGrabComponent s,
+ SGOutput sgOut,
+ unsigned long * space) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0034, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGHandleUpdateEvent (SeqGrabComponent s,
+ const EventRecord * event,
+ Boolean * handled) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0035, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetOutputNextOutput (SeqGrabComponent s,
+ SGOutput sgOut,
+ SGOutput nextOut) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0036, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetOutputNextOutput (SeqGrabComponent s,
+ SGOutput sgOut,
+ SGOutput * nextOut) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0037, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetOutputMaximumOffset (SeqGrabComponent s,
+ SGOutput sgOut,
+ const wide * maxOffset) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0038, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetOutputMaximumOffset (SeqGrabComponent s,
+ SGOutput sgOut,
+ wide * maxOffset) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0039, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetOutputDataReference (SeqGrabComponent s,
+ SGOutput sgOut,
+ Handle * dataRef,
+ OSType * dataRefType) FIVEWORDINLINE(0x2F3C, 0x000C, 0x003A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGWriteExtendedMovieData (SeqGrabComponent s,
+ SGChannel c,
+ Ptr p,
+ long len,
+ wide * offset,
+ SGOutput * sgOut) FIVEWORDINLINE(0x2F3C, 0x0014, 0x003B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetStorageSpaceRemaining64 (SeqGrabComponent s,
+ wide * bytes) FIVEWORDINLINE(0x2F3C, 0x0004, 0x003C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetDataOutputStorageSpaceRemaining64 (SeqGrabComponent s,
+ SGOutput sgOut,
+ wide * space) FIVEWORDINLINE(0x2F3C, 0x0008, 0x003D, 0x7000, 0xA82A);
+
+/*
+ calls from Channel to seqGrab
+*/
+EXTERN_API( ComponentResult )
+SGWriteMovieData (SeqGrabComponent s,
+ SGChannel c,
+ Ptr p,
+ long len,
+ long * offset) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0100, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGAddFrameReference (SeqGrabComponent s,
+ SeqGrabFrameInfoPtr frameInfo) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0101, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetNextFrameReference (SeqGrabComponent s,
+ SeqGrabFrameInfoPtr frameInfo,
+ TimeValue * frameDuration,
+ long * frameNumber) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0102, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetTimeBase (SeqGrabComponent s,
+ TimeBase * tb) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0103, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSortDeviceList (SeqGrabComponent s,
+ SGDeviceList list) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0104, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGAddMovieData (SeqGrabComponent s,
+ SGChannel c,
+ Ptr p,
+ long len,
+ long * offset,
+ long chRefCon,
+ TimeValue time,
+ short writeType) FIVEWORDINLINE(0x2F3C, 0x001A, 0x0105, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGChangedSource (SeqGrabComponent s,
+ SGChannel c) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0106, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGAddExtendedFrameReference (SeqGrabComponent s,
+ SeqGrabExtendedFrameInfoPtr frameInfo) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0107, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetNextExtendedFrameReference (SeqGrabComponent s,
+ SeqGrabExtendedFrameInfoPtr frameInfo,
+ TimeValue * frameDuration,
+ long * frameNumber) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0108, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGAddExtendedMovieData (SeqGrabComponent s,
+ SGChannel c,
+ Ptr p,
+ long len,
+ wide * offset,
+ long chRefCon,
+ TimeValue time,
+ short writeType,
+ SGOutput * whichOutput) FIVEWORDINLINE(0x2F3C, 0x001E, 0x0109, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGAddOutputDataRefToMedia (SeqGrabComponent s,
+ SGOutput sgOut,
+ Media theMedia,
+ SampleDescriptionHandle desc) FIVEWORDINLINE(0x2F3C, 0x000C, 0x010A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetSettingsSummary (SeqGrabComponent s,
+ Handle summaryText) FIVEWORDINLINE(0x2F3C, 0x0004, 0x010B, 0x7000, 0xA82A);
+
+
+
+/*** Sequence Grab CHANNEL Component Stuff ***/
+
+EXTERN_API( ComponentResult )
+SGSetChannelUsage (SGChannel c,
+ long usage) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0080, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetChannelUsage (SGChannel c,
+ long * usage) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0081, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetChannelBounds (SGChannel c,
+ const Rect * bounds) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0082, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetChannelBounds (SGChannel c,
+ Rect * bounds) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0083, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetChannelVolume (SGChannel c,
+ short volume) FIVEWORDINLINE(0x2F3C, 0x0002, 0x0084, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetChannelVolume (SGChannel c,
+ short * volume) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0085, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetChannelInfo (SGChannel c,
+ long * channelInfo) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0086, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetChannelPlayFlags (SGChannel c,
+ long playFlags) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0087, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetChannelPlayFlags (SGChannel c,
+ long * playFlags) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0088, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetChannelMaxFrames (SGChannel c,
+ long frameCount) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0089, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetChannelMaxFrames (SGChannel c,
+ long * frameCount) FIVEWORDINLINE(0x2F3C, 0x0004, 0x008A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetChannelRefCon (SGChannel c,
+ long refCon) FIVEWORDINLINE(0x2F3C, 0x0004, 0x008B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetChannelClip (SGChannel c,
+ RgnHandle theClip) FIVEWORDINLINE(0x2F3C, 0x0004, 0x008C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetChannelClip (SGChannel c,
+ RgnHandle * theClip) FIVEWORDINLINE(0x2F3C, 0x0004, 0x008D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetChannelSampleDescription (SGChannel c,
+ Handle sampleDesc) FIVEWORDINLINE(0x2F3C, 0x0004, 0x008E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetChannelDeviceList (SGChannel c,
+ long selectionFlags,
+ SGDeviceList * list) FIVEWORDINLINE(0x2F3C, 0x0008, 0x008F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetChannelDevice (SGChannel c,
+ StringPtr name) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0090, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetChannelMatrix (SGChannel c,
+ const MatrixRecord * m) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0091, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetChannelMatrix (SGChannel c,
+ MatrixRecord * m) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0092, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetChannelTimeScale (SGChannel c,
+ TimeScale * scale) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0093, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGChannelPutPicture (SGChannel c) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0094, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGChannelSetRequestedDataRate (SGChannel c,
+ long bytesPerSecond) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0095, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGChannelGetRequestedDataRate (SGChannel c,
+ long * bytesPerSecond) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0096, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGChannelSetDataSourceName (SGChannel c,
+ ConstStr255Param name,
+ ScriptCode scriptTag) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0097, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGChannelGetDataSourceName (SGChannel c,
+ Str255 name,
+ ScriptCode * scriptTag) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0098, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGChannelSetCodecSettings (SGChannel c,
+ Handle settings) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0099, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGChannelGetCodecSettings (SGChannel c,
+ Handle * settings) FIVEWORDINLINE(0x2F3C, 0x0004, 0x009A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetChannelTimeBase (SGChannel c,
+ TimeBase * tb) FIVEWORDINLINE(0x2F3C, 0x0004, 0x009B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetChannelRefCon (SGChannel c,
+ long * refCon) FIVEWORDINLINE(0x2F3C, 0x0004, 0x009C, 0x7000, 0xA82A);
+
+/* A utility call to find out the current device and input names, instead of having to call GetDeviceList and walk it yourself */
+EXTERN_API( ComponentResult )
+SGGetChannelDeviceAndInputNames (SGChannel c,
+ Str255 outDeviceName,
+ Str255 outInputName,
+ short * outInputNumber) FIVEWORDINLINE(0x2F3C, 0x000C, 0x009D, 0x7000, 0xA82A);
+
+/* A media format independent call for this. Inputs start at 0 here (Sound starts at 1, VDIGs at 0 in direct calls) */
+EXTERN_API( ComponentResult )
+SGSetChannelDeviceInput (SGChannel c,
+ short inInputNumber) FIVEWORDINLINE(0x2F3C, 0x0002, 0x009E, 0x7000, 0xA82A);
+
+/* A call to bracket SetSettings related calls, to give downstream components an opportunity to deal with the entire
+ settings change in one go */
+enum {
+ sgSetSettingsBegin = (1 << 0), /* SGSetSettings related set calls about to start*/
+ sgSetSettingsEnd = (1 << 1) /* Finished SGSetSettings calls. Get ready to use the new settings*/
+};
+
+EXTERN_API( ComponentResult )
+SGSetChannelSettingsStateChanging (SGChannel c,
+ UInt32 inFlags) FIVEWORDINLINE(0x2F3C, 0x0004, 0x009F, 0x7000, 0xA82A);
+
+/*
+ calls from seqGrab to Channel
+*/
+EXTERN_API( ComponentResult )
+SGInitChannel (SGChannel c,
+ SeqGrabComponent owner) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0180, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGWriteSamples (SGChannel c,
+ Movie m,
+ AliasHandle theFile) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0181, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetDataRate (SGChannel c,
+ long * bytesPerSecond) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0182, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGAlignChannelRect (SGChannel c,
+ Rect * r) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0183, 0x7000, 0xA82A);
+
+/*
+ Dorky dialog panel calls
+*/
+EXTERN_API( ComponentResult )
+SGPanelGetDitl (SeqGrabComponent s,
+ Handle * ditl) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0200, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGPanelGetTitle (SeqGrabComponent s,
+ Str255 title) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0201, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGPanelCanRun (SeqGrabComponent s,
+ SGChannel c) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0202, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGPanelInstall (SeqGrabComponent s,
+ SGChannel c,
+ DialogRef d,
+ short itemOffset) FIVEWORDINLINE(0x2F3C, 0x000A, 0x0203, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGPanelEvent (SeqGrabComponent s,
+ SGChannel c,
+ DialogRef d,
+ short itemOffset,
+ const EventRecord * theEvent,
+ short * itemHit,
+ Boolean * handled) FIVEWORDINLINE(0x2F3C, 0x0016, 0x0204, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGPanelItem (SeqGrabComponent s,
+ SGChannel c,
+ DialogRef d,
+ short itemOffset,
+ short itemNum) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0205, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGPanelRemove (SeqGrabComponent s,
+ SGChannel c,
+ DialogRef d,
+ short itemOffset) FIVEWORDINLINE(0x2F3C, 0x000A, 0x0206, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGPanelSetGrabber (SeqGrabComponent s,
+ SeqGrabComponent sg) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0207, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGPanelSetResFile (SeqGrabComponent s,
+ short resRef) FIVEWORDINLINE(0x2F3C, 0x0002, 0x0208, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGPanelGetSettings (SeqGrabComponent s,
+ SGChannel c,
+ UserData * ud,
+ long flags) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0209, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGPanelSetSettings (SeqGrabComponent s,
+ SGChannel c,
+ UserData ud,
+ long flags) FIVEWORDINLINE(0x2F3C, 0x000C, 0x020A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGPanelValidateInput (SeqGrabComponent s,
+ Boolean * ok) FIVEWORDINLINE(0x2F3C, 0x0004, 0x020B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGPanelSetEventFilter (SeqGrabComponent s,
+ SGModalFilterUPP proc,
+ long refCon) FIVEWORDINLINE(0x2F3C, 0x0008, 0x020C, 0x7000, 0xA82A);
+
+/*
+ SGPanelGetDITLForSize is used to retrieve user interface elements that fit within a specified size
+ panel. The component should return badComponentSelector for sizes it does not support. The component
+ is required to support kSGSmallestDITLSize, and it is recommended to support kSGLargestDITLSize.
+
+ If SGPanelGetDITLForSize is unimplemented entirely, the panel is assumed to not have resizable UI elements.
+*/
+enum {
+ kSGSmallestDITLSize = -1, /* requestedSize h and v set to this to retrieve small size*/
+ kSGLargestDITLSize = -2 /* requestedSize h and v set to this to retrieve large size*/
+};
+
+EXTERN_API( ComponentResult )
+SGPanelGetDITLForSize (SeqGrabComponent s,
+ Handle * ditl,
+ Point * requestedSize) FIVEWORDINLINE(0x2F3C, 0x0008, 0x020D, 0x7000, 0xA82A);
+
+
+/*** Sequence Grab VIDEO CHANNEL Component Stuff ***/
+/*
+ Video stuff
+*/
+
+struct SGCompressInfo {
+ Ptr buffer;
+ unsigned long bufferSize;
+ UInt8 similarity;
+ UInt8 reserved;
+};
+typedef struct SGCompressInfo SGCompressInfo;
+typedef CALLBACK_API( ComponentResult , SGGrabBottleProcPtr )(SGChannel c, short bufferNum, long refCon);
+typedef CALLBACK_API( ComponentResult , SGGrabCompleteBottleProcPtr )(SGChannel c, short bufferNum, Boolean *done, long refCon);
+typedef CALLBACK_API( ComponentResult , SGDisplayBottleProcPtr )(SGChannel c, short bufferNum, MatrixRecord *mp, RgnHandle clipRgn, long refCon);
+typedef CALLBACK_API( ComponentResult , SGCompressBottleProcPtr )(SGChannel c, short bufferNum, long refCon);
+typedef CALLBACK_API( ComponentResult , SGCompressCompleteBottleProcPtr )(SGChannel c, short bufferNum, Boolean *done, SGCompressInfo *ci, long refCon);
+typedef CALLBACK_API( ComponentResult , SGAddFrameBottleProcPtr )(SGChannel c, short bufferNum, TimeValue atTime, TimeScale scale, const SGCompressInfo *ci, long refCon);
+typedef CALLBACK_API( ComponentResult , SGTransferFrameBottleProcPtr )(SGChannel c, short bufferNum, MatrixRecord *mp, RgnHandle clipRgn, long refCon);
+/* Note that UInt8 *queuedFrameCount replaces Boolean *done. 0(==false) still means no frames, and 1(==true) one,
+ but if more than one are available the number should be returned here. The value 2 previously meant more than one frame,
+ so some VDIGs may return 2 even if more than 2 are available, and some will still return 1 as they are using the original definition. */
+typedef CALLBACK_API( ComponentResult , SGGrabCompressCompleteBottleProcPtr )(SGChannel c, UInt8 *queuedFrameCount, SGCompressInfo *ci, TimeRecord *t, long refCon);
+typedef CALLBACK_API( ComponentResult , SGDisplayCompressBottleProcPtr )(SGChannel c, Ptr dataPtr, ImageDescriptionHandle desc, MatrixRecord *mp, RgnHandle clipRgn, long refCon);
+typedef STACK_UPP_TYPE(SGGrabBottleProcPtr) SGGrabBottleUPP;
+typedef STACK_UPP_TYPE(SGGrabCompleteBottleProcPtr) SGGrabCompleteBottleUPP;
+typedef STACK_UPP_TYPE(SGDisplayBottleProcPtr) SGDisplayBottleUPP;
+typedef STACK_UPP_TYPE(SGCompressBottleProcPtr) SGCompressBottleUPP;
+typedef STACK_UPP_TYPE(SGCompressCompleteBottleProcPtr) SGCompressCompleteBottleUPP;
+typedef STACK_UPP_TYPE(SGAddFrameBottleProcPtr) SGAddFrameBottleUPP;
+typedef STACK_UPP_TYPE(SGTransferFrameBottleProcPtr) SGTransferFrameBottleUPP;
+typedef STACK_UPP_TYPE(SGGrabCompressCompleteBottleProcPtr) SGGrabCompressCompleteBottleUPP;
+typedef STACK_UPP_TYPE(SGDisplayCompressBottleProcPtr) SGDisplayCompressBottleUPP;
+
+struct VideoBottles {
+ short procCount;
+ SGGrabBottleUPP grabProc;
+ SGGrabCompleteBottleUPP grabCompleteProc;
+ SGDisplayBottleUPP displayProc;
+ SGCompressBottleUPP compressProc;
+ SGCompressCompleteBottleUPP compressCompleteProc;
+ SGAddFrameBottleUPP addFrameProc;
+ SGTransferFrameBottleUPP transferFrameProc;
+ SGGrabCompressCompleteBottleUPP grabCompressCompleteProc;
+ SGDisplayCompressBottleUPP displayCompressProc;
+};
+typedef struct VideoBottles VideoBottles;
+EXTERN_API( ComponentResult )
+SGGetSrcVideoBounds (SGChannel c,
+ Rect * r) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0100, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetVideoRect (SGChannel c,
+ const Rect * r) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0101, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetVideoRect (SGChannel c,
+ Rect * r) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0102, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetVideoCompressorType (SGChannel c,
+ OSType * compressorType) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0103, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetVideoCompressorType (SGChannel c,
+ OSType compressorType) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0104, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetVideoCompressor (SGChannel c,
+ short depth,
+ CompressorComponent compressor,
+ CodecQ spatialQuality,
+ CodecQ temporalQuality,
+ long keyFrameRate) FIVEWORDINLINE(0x2F3C, 0x0012, 0x0105, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetVideoCompressor (SGChannel c,
+ short * depth,
+ CompressorComponent * compressor,
+ CodecQ * spatialQuality,
+ CodecQ * temporalQuality,
+ long * keyFrameRate) FIVEWORDINLINE(0x2F3C, 0x0014, 0x0106, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentInstance )
+SGGetVideoDigitizerComponent (SGChannel c) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0107, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetVideoDigitizerComponent (SGChannel c,
+ ComponentInstance vdig) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0108, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGVideoDigitizerChanged (SGChannel c) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0109, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetVideoBottlenecks (SGChannel c,
+ VideoBottles * vb) FIVEWORDINLINE(0x2F3C, 0x0004, 0x010A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetVideoBottlenecks (SGChannel c,
+ VideoBottles * vb) FIVEWORDINLINE(0x2F3C, 0x0004, 0x010B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGrabFrame (SGChannel c,
+ short bufferNum) FIVEWORDINLINE(0x2F3C, 0x0002, 0x010C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGrabFrameComplete (SGChannel c,
+ short bufferNum,
+ Boolean * done) FIVEWORDINLINE(0x2F3C, 0x0006, 0x010D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGDisplayFrame (SGChannel c,
+ short bufferNum,
+ const MatrixRecord * mp,
+ RgnHandle clipRgn) FIVEWORDINLINE(0x2F3C, 0x000A, 0x010E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGCompressFrame (SGChannel c,
+ short bufferNum) FIVEWORDINLINE(0x2F3C, 0x0002, 0x010F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGCompressFrameComplete (SGChannel c,
+ short bufferNum,
+ Boolean * done,
+ SGCompressInfo * ci) FIVEWORDINLINE(0x2F3C, 0x000A, 0x0110, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGAddFrame (SGChannel c,
+ short bufferNum,
+ TimeValue atTime,
+ TimeScale scale,
+ const SGCompressInfo * ci) FIVEWORDINLINE(0x2F3C, 0x000E, 0x0111, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGTransferFrameForCompress (SGChannel c,
+ short bufferNum,
+ const MatrixRecord * mp,
+ RgnHandle clipRgn) FIVEWORDINLINE(0x2F3C, 0x000A, 0x0112, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetCompressBuffer (SGChannel c,
+ short depth,
+ const Rect * compressSize) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0113, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetCompressBuffer (SGChannel c,
+ short * depth,
+ Rect * compressSize) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0114, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetBufferInfo (SGChannel c,
+ short bufferNum,
+ PixMapHandle * bufferPM,
+ Rect * bufferRect,
+ GWorldPtr * compressBuffer,
+ Rect * compressBufferRect) FIVEWORDINLINE(0x2F3C, 0x0012, 0x0115, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetUseScreenBuffer (SGChannel c,
+ Boolean useScreenBuffer) FIVEWORDINLINE(0x2F3C, 0x0002, 0x0116, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetUseScreenBuffer (SGChannel c,
+ Boolean * useScreenBuffer) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0117, 0x7000, 0xA82A);
+
+/* Note that UInt8 *queuedFrameCount replaces Boolean *done. 0(==false) still means no frames, and 1(==true) one,
+ but if more than one are available the number should be returned here. The value 2 previously meant more than one frame,
+ so some VDIGs may return 2 even if more than 2 are available, and some will still return 1 as they are using the original definition. */
+EXTERN_API( ComponentResult )
+SGGrabCompressComplete (SGChannel c,
+ UInt8 * queuedFrameCount,
+ SGCompressInfo * ci,
+ TimeRecord * tr) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0118, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGDisplayCompress (SGChannel c,
+ Ptr dataPtr,
+ ImageDescriptionHandle desc,
+ MatrixRecord * mp,
+ RgnHandle clipRgn) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0119, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetFrameRate (SGChannel c,
+ Fixed frameRate) FIVEWORDINLINE(0x2F3C, 0x0004, 0x011A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetFrameRate (SGChannel c,
+ Fixed * frameRate) FIVEWORDINLINE(0x2F3C, 0x0004, 0x011B, 0x7000, 0xA82A);
+
+
+EXTERN_API( ComponentResult )
+SGSetPreferredPacketSize (SGChannel c,
+ long preferredPacketSizeInBytes) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0121, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetPreferredPacketSize (SGChannel c,
+ long * preferredPacketSizeInBytes) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0122, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetUserVideoCompressorList (SGChannel c,
+ Handle compressorTypes) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0123, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetUserVideoCompressorList (SGChannel c,
+ Handle * compressorTypes) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0124, 0x7000, 0xA82A);
+
+/*** Sequence Grab SOUND CHANNEL Component Stuff ***/
+
+/*
+ Sound stuff
+*/
+EXTERN_API( ComponentResult )
+SGSetSoundInputDriver (SGChannel c,
+ ConstStr255Param driverName) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0100, 0x7000, 0xA82A);
+
+EXTERN_API( long )
+SGGetSoundInputDriver (SGChannel c) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0101, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSoundInputDriverChanged (SGChannel c) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0102, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetSoundRecordChunkSize (SGChannel c,
+ long seconds) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0103, 0x7000, 0xA82A);
+
+EXTERN_API( long )
+SGGetSoundRecordChunkSize (SGChannel c) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0104, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetSoundInputRate (SGChannel c,
+ Fixed rate) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0105, 0x7000, 0xA82A);
+
+EXTERN_API( Fixed )
+SGGetSoundInputRate (SGChannel c) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0106, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetSoundInputParameters (SGChannel c,
+ short sampleSize,
+ short numChannels,
+ OSType compressionType) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0107, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetSoundInputParameters (SGChannel c,
+ short * sampleSize,
+ short * numChannels,
+ OSType * compressionType) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0108, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetAdditionalSoundRates (SGChannel c,
+ Handle rates) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0109, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetAdditionalSoundRates (SGChannel c,
+ Handle * rates) FIVEWORDINLINE(0x2F3C, 0x0004, 0x010A, 0x7000, 0xA82A);
+
+/*
+ Text stuff
+*/
+EXTERN_API( ComponentResult )
+SGSetFontName (SGChannel c,
+ StringPtr pstr) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0100, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetFontSize (SGChannel c,
+ short fontSize) FIVEWORDINLINE(0x2F3C, 0x0002, 0x0101, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetTextForeColor (SGChannel c,
+ RGBColor * theColor) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0102, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetTextBackColor (SGChannel c,
+ RGBColor * theColor) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0103, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetJustification (SGChannel c,
+ short just) FIVEWORDINLINE(0x2F3C, 0x0002, 0x0104, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGGetTextReturnToSpaceValue (SGChannel c,
+ short * rettospace) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0105, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetTextReturnToSpaceValue (SGChannel c,
+ short rettospace) FIVEWORDINLINE(0x2F3C, 0x0002, 0x0106, 0x7000, 0xA82A);
+
+/*
+ Music stuff
+*/
+EXTERN_API( ComponentResult )
+SGGetInstrument (SGChannel c,
+ ToneDescription * td) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0100, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SGSetInstrument (SGChannel c,
+ ToneDescription * td) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0101, 0x7000, 0xA82A);
+
+
+enum {
+ sgChannelAtom = FOUR_CHAR_CODE('chan'),
+ sgChannelSettingsAtom = FOUR_CHAR_CODE('ctom'),
+ sgChannelDescription = FOUR_CHAR_CODE('cdsc'),
+ sgChannelSettings = FOUR_CHAR_CODE('cset')
+};
+
+enum {
+ sgDeviceNameType = FOUR_CHAR_CODE('name'),
+ sgDeviceDisplayNameType = FOUR_CHAR_CODE('dnam'),
+ sgDeviceUIDType = FOUR_CHAR_CODE('duid'),
+ sgInputUIDType = FOUR_CHAR_CODE('iuid'),
+ sgUsageType = FOUR_CHAR_CODE('use '),
+ sgPlayFlagsType = FOUR_CHAR_CODE('plyf'),
+ sgClipType = FOUR_CHAR_CODE('clip'),
+ sgMatrixType = FOUR_CHAR_CODE('mtrx'),
+ sgVolumeType = FOUR_CHAR_CODE('volu')
+};
+
+enum {
+ sgPanelSettingsAtom = FOUR_CHAR_CODE('ptom'),
+ sgPanelDescription = FOUR_CHAR_CODE('pdsc'),
+ sgPanelSettings = FOUR_CHAR_CODE('pset')
+};
+
+enum {
+ sgcSoundCompressionType = FOUR_CHAR_CODE('scmp'),
+ sgcSoundCodecSettingsType = FOUR_CHAR_CODE('cdec'),
+ sgcSoundSampleRateType = FOUR_CHAR_CODE('srat'),
+ sgcSoundChannelCountType = FOUR_CHAR_CODE('schn'),
+ sgcSoundSampleSizeType = FOUR_CHAR_CODE('ssiz'),
+ sgcSoundInputType = FOUR_CHAR_CODE('sinp'),
+ sgcSoundGainType = FOUR_CHAR_CODE('gain')
+};
+
+enum {
+ sgcVideoHueType = FOUR_CHAR_CODE('hue '),
+ sgcVideoSaturationType = FOUR_CHAR_CODE('satr'),
+ sgcVideoContrastType = FOUR_CHAR_CODE('trst'),
+ sgcVideoSharpnessType = FOUR_CHAR_CODE('shrp'),
+ sgcVideoBrigtnessType = FOUR_CHAR_CODE('brit'),
+ sgcVideoBlackLevelType = FOUR_CHAR_CODE('blkl'),
+ sgcVideoWhiteLevelType = FOUR_CHAR_CODE('whtl'),
+ sgcVideoInputType = FOUR_CHAR_CODE('vinp'),
+ sgcVideoFormatType = FOUR_CHAR_CODE('vstd'),
+ sgcVideoFilterType = FOUR_CHAR_CODE('vflt'),
+ sgcVideoRectType = FOUR_CHAR_CODE('vrct'),
+ sgcVideoDigitizerType = FOUR_CHAR_CODE('vdig')
+};
+
+
+
+
+
+typedef ComponentInstance QTVideoOutputComponent;
+/* Component type and subtype enumerations*/
+enum {
+ QTVideoOutputComponentType = FOUR_CHAR_CODE('vout'),
+ QTVideoOutputComponentBaseSubType = FOUR_CHAR_CODE('base')
+};
+
+
+/* QTVideoOutput Component flags*/
+
+enum {
+ kQTVideoOutputDontDisplayToUser = 1L << 0
+};
+
+/* Display mode atom types*/
+
+enum {
+ kQTVODisplayModeItem = FOUR_CHAR_CODE('qdmi'),
+ kQTVODimensions = FOUR_CHAR_CODE('dimn'), /* atom contains two longs - pixel count - width, height*/
+ kQTVOResolution = FOUR_CHAR_CODE('resl'), /* atom contains two Fixed - hRes, vRes in dpi*/
+ kQTVORefreshRate = FOUR_CHAR_CODE('refr'), /* atom contains one Fixed - refresh rate in Hz*/
+ kQTVOPixelType = FOUR_CHAR_CODE('pixl'), /* atom contains one OSType - pixel format of mode*/
+ kQTVOName = FOUR_CHAR_CODE('name'), /* atom contains string (no length byte) - name of mode for display to user*/
+ kQTVODecompressors = FOUR_CHAR_CODE('deco'), /* atom contains other atoms indicating supported decompressors*/
+ /* kQTVODecompressors sub-atoms*/
+ kQTVODecompressorType = FOUR_CHAR_CODE('dety'), /* atom contains one OSType - decompressor type code*/
+ kQTVODecompressorContinuous = FOUR_CHAR_CODE('cont'), /* atom contains one Boolean - true if this type is displayed continuously*/
+ kQTVODecompressorComponent = FOUR_CHAR_CODE('cmpt') /* atom contains one Component - component id of decompressor*/
+};
+
+/** These are QTVideoOutput procedures **/
+EXTERN_API( ComponentResult )
+QTVideoOutputGetDisplayModeList (QTVideoOutputComponent vo,
+ QTAtomContainer * outputs) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0001, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTVideoOutputGetCurrentClientName (QTVideoOutputComponent vo,
+ Str255 str) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0002, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTVideoOutputSetClientName (QTVideoOutputComponent vo,
+ ConstStr255Param str) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0003, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTVideoOutputGetClientName (QTVideoOutputComponent vo,
+ Str255 str) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0004, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTVideoOutputBegin (QTVideoOutputComponent vo) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0005, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTVideoOutputEnd (QTVideoOutputComponent vo) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0006, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTVideoOutputSetDisplayMode (QTVideoOutputComponent vo,
+ long displayModeID) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0007, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTVideoOutputGetDisplayMode (QTVideoOutputComponent vo,
+ long * displayModeID) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0008, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTVideoOutputCustomConfigureDisplay (QTVideoOutputComponent vo,
+ ModalFilterUPP filter) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0009, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTVideoOutputSaveState (QTVideoOutputComponent vo,
+ QTAtomContainer * state) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTVideoOutputRestoreState (QTVideoOutputComponent vo,
+ QTAtomContainer state) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTVideoOutputGetGWorld (QTVideoOutputComponent vo,
+ GWorldPtr * gw) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTVideoOutputGetGWorldParameters (QTVideoOutputComponent vo,
+ Ptr * baseAddr,
+ long * rowBytes,
+ CTabHandle * colorTable) FIVEWORDINLINE(0x2F3C, 0x000C, 0x000D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTVideoOutputGetIndSoundOutput (QTVideoOutputComponent vo,
+ long index,
+ Component * outputComponent) FIVEWORDINLINE(0x2F3C, 0x0008, 0x000E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTVideoOutputGetClock (QTVideoOutputComponent vo,
+ ComponentInstance * clock) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTVideoOutputSetEchoPort (QTVideoOutputComponent vo,
+ CGrafPtr echoPort) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0010, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTVideoOutputGetIndImageDecompressor (QTVideoOutputComponent vo,
+ long index,
+ Component * codec) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0011, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTVideoOutputBaseSetEchoPort (QTVideoOutputComponent vo,
+ CGrafPtr echoPort) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0012, 0x7000, 0xA82A);
+
+
+/* UPP call backs */
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(DataHCompletionUPP)
+ NewDataHCompletionUPP (DataHCompletionProcPtr userRoutine);
+
+ EXTERN_API(VdigIntUPP)
+ NewVdigIntUPP (VdigIntProcPtr userRoutine);
+
+ EXTERN_API(StartDocumentHandlerUPP)
+ NewStartDocumentHandlerUPP (StartDocumentHandler userRoutine);
+
+ EXTERN_API(EndDocumentHandlerUPP)
+ NewEndDocumentHandlerUPP (EndDocumentHandler userRoutine);
+
+ EXTERN_API(StartElementHandlerUPP)
+ NewStartElementHandlerUPP (StartElementHandler userRoutine);
+
+ EXTERN_API(EndElementHandlerUPP)
+ NewEndElementHandlerUPP (EndElementHandler userRoutine);
+
+ EXTERN_API(CharDataHandlerUPP)
+ NewCharDataHandlerUPP (CharDataHandler userRoutine);
+
+ EXTERN_API(PreprocessInstructionHandlerUPP)
+ NewPreprocessInstructionHandlerUPP (PreprocessInstructionHandler userRoutine);
+
+ EXTERN_API(CommentHandlerUPP)
+ NewCommentHandlerUPP (CommentHandler userRoutine);
+
+ EXTERN_API(CDataHandlerUPP)
+ NewCDataHandlerUPP (CDataHandler userRoutine);
+
+ EXTERN_API(SGDataUPP)
+ NewSGDataUPP (SGDataProcPtr userRoutine);
+
+ EXTERN_API(SGModalFilterUPP)
+ NewSGModalFilterUPP (SGModalFilterProcPtr userRoutine);
+
+ EXTERN_API(SGGrabBottleUPP)
+ NewSGGrabBottleUPP (SGGrabBottleProcPtr userRoutine);
+
+ EXTERN_API(SGGrabCompleteBottleUPP)
+ NewSGGrabCompleteBottleUPP (SGGrabCompleteBottleProcPtr userRoutine);
+
+ EXTERN_API(SGDisplayBottleUPP)
+ NewSGDisplayBottleUPP (SGDisplayBottleProcPtr userRoutine);
+
+ EXTERN_API(SGCompressBottleUPP)
+ NewSGCompressBottleUPP (SGCompressBottleProcPtr userRoutine);
+
+ EXTERN_API(SGCompressCompleteBottleUPP)
+ NewSGCompressCompleteBottleUPP (SGCompressCompleteBottleProcPtr userRoutine);
+
+ EXTERN_API(SGAddFrameBottleUPP)
+ NewSGAddFrameBottleUPP (SGAddFrameBottleProcPtr userRoutine);
+
+ EXTERN_API(SGTransferFrameBottleUPP)
+ NewSGTransferFrameBottleUPP (SGTransferFrameBottleProcPtr userRoutine);
+
+ EXTERN_API(SGGrabCompressCompleteBottleUPP)
+ NewSGGrabCompressCompleteBottleUPP (SGGrabCompressCompleteBottleProcPtr userRoutine);
+
+ EXTERN_API(SGDisplayCompressBottleUPP)
+ NewSGDisplayCompressBottleUPP (SGDisplayCompressBottleProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeDataHCompletionUPP (DataHCompletionUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeVdigIntUPP (VdigIntUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeStartDocumentHandlerUPP (StartDocumentHandlerUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeEndDocumentHandlerUPP (EndDocumentHandlerUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeStartElementHandlerUPP (StartElementHandlerUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeEndElementHandlerUPP (EndElementHandlerUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeCharDataHandlerUPP (CharDataHandlerUPP userUPP);
+
+ EXTERN_API(void)
+ DisposePreprocessInstructionHandlerUPP (PreprocessInstructionHandlerUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeCommentHandlerUPP (CommentHandlerUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeCDataHandlerUPP (CDataHandlerUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeSGDataUPP (SGDataUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeSGModalFilterUPP (SGModalFilterUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeSGGrabBottleUPP (SGGrabBottleUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeSGGrabCompleteBottleUPP (SGGrabCompleteBottleUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeSGDisplayBottleUPP (SGDisplayBottleUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeSGCompressBottleUPP (SGCompressBottleUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeSGCompressCompleteBottleUPP (SGCompressCompleteBottleUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeSGAddFrameBottleUPP (SGAddFrameBottleUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeSGTransferFrameBottleUPP (SGTransferFrameBottleUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeSGGrabCompressCompleteBottleUPP (SGGrabCompressCompleteBottleUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeSGDisplayCompressBottleUPP (SGDisplayCompressBottleUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeDataHCompletionUPP (Ptr request,
+ long refcon,
+ OSErr err,
+ DataHCompletionUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeVdigIntUPP (long flags,
+ long refcon,
+ VdigIntUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokeStartDocumentHandlerUPP (long refcon,
+ StartDocumentHandlerUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokeEndDocumentHandlerUPP (long refcon,
+ EndDocumentHandlerUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokeStartElementHandlerUPP (const char * name,
+ const char *const atts[],
+ long refcon,
+ StartElementHandlerUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokeEndElementHandlerUPP (const char * name,
+ long refcon,
+ EndElementHandlerUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokeCharDataHandlerUPP (const char * charData,
+ long refcon,
+ CharDataHandlerUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokePreprocessInstructionHandlerUPP (const char * name,
+ const char *const atts[],
+ long refcon,
+ PreprocessInstructionHandlerUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokeCommentHandlerUPP (const char * comment,
+ long refcon,
+ CommentHandlerUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokeCDataHandlerUPP (const char * cdata,
+ long refcon,
+ CDataHandlerUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeSGDataUPP (SGChannel c,
+ Ptr p,
+ long len,
+ long * offset,
+ long chRefCon,
+ TimeValue time,
+ short writeType,
+ long refCon,
+ SGDataUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeSGModalFilterUPP (DialogRef theDialog,
+ const EventRecord * theEvent,
+ short * itemHit,
+ long refCon,
+ SGModalFilterUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokeSGGrabBottleUPP (SGChannel c,
+ short bufferNum,
+ long refCon,
+ SGGrabBottleUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokeSGGrabCompleteBottleUPP (SGChannel c,
+ short bufferNum,
+ Boolean * done,
+ long refCon,
+ SGGrabCompleteBottleUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokeSGDisplayBottleUPP (SGChannel c,
+ short bufferNum,
+ MatrixRecord * mp,
+ RgnHandle clipRgn,
+ long refCon,
+ SGDisplayBottleUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokeSGCompressBottleUPP (SGChannel c,
+ short bufferNum,
+ long refCon,
+ SGCompressBottleUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokeSGCompressCompleteBottleUPP (SGChannel c,
+ short bufferNum,
+ Boolean * done,
+ SGCompressInfo * ci,
+ long refCon,
+ SGCompressCompleteBottleUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokeSGAddFrameBottleUPP (SGChannel c,
+ short bufferNum,
+ TimeValue atTime,
+ TimeScale scale,
+ const SGCompressInfo * ci,
+ long refCon,
+ SGAddFrameBottleUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokeSGTransferFrameBottleUPP (SGChannel c,
+ short bufferNum,
+ MatrixRecord * mp,
+ RgnHandle clipRgn,
+ long refCon,
+ SGTransferFrameBottleUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokeSGGrabCompressCompleteBottleUPP (SGChannel c,
+ UInt8 * queuedFrameCount,
+ SGCompressInfo * ci,
+ TimeRecord * t,
+ long refCon,
+ SGGrabCompressCompleteBottleUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokeSGDisplayCompressBottleUPP (SGChannel c,
+ Ptr dataPtr,
+ ImageDescriptionHandle desc,
+ MatrixRecord * mp,
+ RgnHandle clipRgn,
+ long refCon,
+ SGDisplayCompressBottleUPP userUPP);
+
+#else
+ enum { uppDataHCompletionProcInfo = 0x00000BC0 }; /* pascal no_return_value Func(4_bytes, 4_bytes, 2_bytes) */
+ enum { uppVdigIntProcInfo = 0x000003C0 }; /* pascal no_return_value Func(4_bytes, 4_bytes) */
+ enum { uppStartDocumentHandlerProcInfo = 0x000000F0 }; /* pascal 4_bytes Func(4_bytes) */
+ enum { uppEndDocumentHandlerProcInfo = 0x000000F0 }; /* pascal 4_bytes Func(4_bytes) */
+ enum { uppStartElementHandlerProcInfo = 0x00000FF0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppEndElementHandlerProcInfo = 0x000003F0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes) */
+ enum { uppCharDataHandlerProcInfo = 0x000003F0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes) */
+ enum { uppPreprocessInstructionHandlerProcInfo = 0x00000FF0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppCommentHandlerProcInfo = 0x000003F0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes) */
+ enum { uppCDataHandlerProcInfo = 0x000003F0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes) */
+ enum { uppSGDataProcInfo = 0x003BFFE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 2_bytes, 4_bytes) */
+ enum { uppSGModalFilterProcInfo = 0x00003FD0 }; /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppSGGrabBottleProcInfo = 0x00000EF0 }; /* pascal 4_bytes Func(4_bytes, 2_bytes, 4_bytes) */
+ enum { uppSGGrabCompleteBottleProcInfo = 0x00003EF0 }; /* pascal 4_bytes Func(4_bytes, 2_bytes, 4_bytes, 4_bytes) */
+ enum { uppSGDisplayBottleProcInfo = 0x0000FEF0 }; /* pascal 4_bytes Func(4_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppSGCompressBottleProcInfo = 0x00000EF0 }; /* pascal 4_bytes Func(4_bytes, 2_bytes, 4_bytes) */
+ enum { uppSGCompressCompleteBottleProcInfo = 0x0000FEF0 }; /* pascal 4_bytes Func(4_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppSGAddFrameBottleProcInfo = 0x0003FEF0 }; /* pascal 4_bytes Func(4_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppSGTransferFrameBottleProcInfo = 0x0000FEF0 }; /* pascal 4_bytes Func(4_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppSGGrabCompressCompleteBottleProcInfo = 0x0000FFF0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppSGDisplayCompressBottleProcInfo = 0x0003FFF0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewDataHCompletionUPP(userRoutine) (DataHCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDataHCompletionProcInfo, GetCurrentArchitecture())
+ #define NewVdigIntUPP(userRoutine) (VdigIntUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppVdigIntProcInfo, GetCurrentArchitecture())
+ #define NewStartDocumentHandlerUPP(userRoutine) (StartDocumentHandlerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppStartDocumentHandlerProcInfo, GetCurrentArchitecture())
+ #define NewEndDocumentHandlerUPP(userRoutine) (EndDocumentHandlerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppEndDocumentHandlerProcInfo, GetCurrentArchitecture())
+ #define NewStartElementHandlerUPP(userRoutine) (StartElementHandlerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppStartElementHandlerProcInfo, GetCurrentArchitecture())
+ #define NewEndElementHandlerUPP(userRoutine) (EndElementHandlerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppEndElementHandlerProcInfo, GetCurrentArchitecture())
+ #define NewCharDataHandlerUPP(userRoutine) (CharDataHandlerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCharDataHandlerProcInfo, GetCurrentArchitecture())
+ #define NewPreprocessInstructionHandlerUPP(userRoutine) (PreprocessInstructionHandlerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPreprocessInstructionHandlerProcInfo, GetCurrentArchitecture())
+ #define NewCommentHandlerUPP(userRoutine) (CommentHandlerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCommentHandlerProcInfo, GetCurrentArchitecture())
+ #define NewCDataHandlerUPP(userRoutine) (CDataHandlerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCDataHandlerProcInfo, GetCurrentArchitecture())
+ #define NewSGDataUPP(userRoutine) (SGDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSGDataProcInfo, GetCurrentArchitecture())
+ #define NewSGModalFilterUPP(userRoutine) (SGModalFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSGModalFilterProcInfo, GetCurrentArchitecture())
+ #define NewSGGrabBottleUPP(userRoutine) (SGGrabBottleUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSGGrabBottleProcInfo, GetCurrentArchitecture())
+ #define NewSGGrabCompleteBottleUPP(userRoutine) (SGGrabCompleteBottleUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSGGrabCompleteBottleProcInfo, GetCurrentArchitecture())
+ #define NewSGDisplayBottleUPP(userRoutine) (SGDisplayBottleUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSGDisplayBottleProcInfo, GetCurrentArchitecture())
+ #define NewSGCompressBottleUPP(userRoutine) (SGCompressBottleUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSGCompressBottleProcInfo, GetCurrentArchitecture())
+ #define NewSGCompressCompleteBottleUPP(userRoutine) (SGCompressCompleteBottleUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSGCompressCompleteBottleProcInfo, GetCurrentArchitecture())
+ #define NewSGAddFrameBottleUPP(userRoutine) (SGAddFrameBottleUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSGAddFrameBottleProcInfo, GetCurrentArchitecture())
+ #define NewSGTransferFrameBottleUPP(userRoutine) (SGTransferFrameBottleUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSGTransferFrameBottleProcInfo, GetCurrentArchitecture())
+ #define NewSGGrabCompressCompleteBottleUPP(userRoutine) (SGGrabCompressCompleteBottleUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSGGrabCompressCompleteBottleProcInfo, GetCurrentArchitecture())
+ #define NewSGDisplayCompressBottleUPP(userRoutine) (SGDisplayCompressBottleUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSGDisplayCompressBottleProcInfo, GetCurrentArchitecture())
+ #define DisposeDataHCompletionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeVdigIntUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeStartDocumentHandlerUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeEndDocumentHandlerUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeStartElementHandlerUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeEndElementHandlerUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeCharDataHandlerUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposePreprocessInstructionHandlerUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeCommentHandlerUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeCDataHandlerUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeSGDataUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeSGModalFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeSGGrabBottleUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeSGGrabCompleteBottleUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeSGDisplayBottleUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeSGCompressBottleUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeSGCompressCompleteBottleUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeSGAddFrameBottleUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeSGTransferFrameBottleUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeSGGrabCompressCompleteBottleUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeSGDisplayCompressBottleUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeDataHCompletionUPP(request, refcon, err, userUPP) CALL_THREE_PARAMETER_UPP((userUPP), uppDataHCompletionProcInfo, (request), (refcon), (err))
+ #define InvokeVdigIntUPP(flags, refcon, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppVdigIntProcInfo, (flags), (refcon))
+ #define InvokeStartDocumentHandlerUPP(refcon, userUPP) (ComponentResult)CALL_ONE_PARAMETER_UPP((userUPP), uppStartDocumentHandlerProcInfo, (refcon))
+ #define InvokeEndDocumentHandlerUPP(refcon, userUPP) (ComponentResult)CALL_ONE_PARAMETER_UPP((userUPP), uppEndDocumentHandlerProcInfo, (refcon))
+ #define InvokeStartElementHandlerUPP(name, atts, refcon, userUPP) (ComponentResult)CALL_THREE_PARAMETER_UPP((userUPP), uppStartElementHandlerProcInfo, (name), (atts), (refcon))
+ #define InvokeEndElementHandlerUPP(name, refcon, userUPP) (ComponentResult)CALL_TWO_PARAMETER_UPP((userUPP), uppEndElementHandlerProcInfo, (name), (refcon))
+ #define InvokeCharDataHandlerUPP(charData, refcon, userUPP) (ComponentResult)CALL_TWO_PARAMETER_UPP((userUPP), uppCharDataHandlerProcInfo, (charData), (refcon))
+ #define InvokePreprocessInstructionHandlerUPP(name, atts, refcon, userUPP) (ComponentResult)CALL_THREE_PARAMETER_UPP((userUPP), uppPreprocessInstructionHandlerProcInfo, (name), (atts), (refcon))
+ #define InvokeCommentHandlerUPP(comment, refcon, userUPP) (ComponentResult)CALL_TWO_PARAMETER_UPP((userUPP), uppCommentHandlerProcInfo, (comment), (refcon))
+ #define InvokeCDataHandlerUPP(cdata, refcon, userUPP) (ComponentResult)CALL_TWO_PARAMETER_UPP((userUPP), uppCDataHandlerProcInfo, (cdata), (refcon))
+ #define InvokeSGDataUPP(c, p, len, offset, chRefCon, time, writeType, refCon, userUPP) (OSErr)CALL_EIGHT_PARAMETER_UPP((userUPP), uppSGDataProcInfo, (c), (p), (len), (offset), (chRefCon), (time), (writeType), (refCon))
+ #define InvokeSGModalFilterUPP(theDialog, theEvent, itemHit, refCon, userUPP) (Boolean)CALL_FOUR_PARAMETER_UPP((userUPP), uppSGModalFilterProcInfo, (theDialog), (theEvent), (itemHit), (refCon))
+ #define InvokeSGGrabBottleUPP(c, bufferNum, refCon, userUPP) (ComponentResult)CALL_THREE_PARAMETER_UPP((userUPP), uppSGGrabBottleProcInfo, (c), (bufferNum), (refCon))
+ #define InvokeSGGrabCompleteBottleUPP(c, bufferNum, done, refCon, userUPP) (ComponentResult)CALL_FOUR_PARAMETER_UPP((userUPP), uppSGGrabCompleteBottleProcInfo, (c), (bufferNum), (done), (refCon))
+ #define InvokeSGDisplayBottleUPP(c, bufferNum, mp, clipRgn, refCon, userUPP) (ComponentResult)CALL_FIVE_PARAMETER_UPP((userUPP), uppSGDisplayBottleProcInfo, (c), (bufferNum), (mp), (clipRgn), (refCon))
+ #define InvokeSGCompressBottleUPP(c, bufferNum, refCon, userUPP) (ComponentResult)CALL_THREE_PARAMETER_UPP((userUPP), uppSGCompressBottleProcInfo, (c), (bufferNum), (refCon))
+ #define InvokeSGCompressCompleteBottleUPP(c, bufferNum, done, ci, refCon, userUPP) (ComponentResult)CALL_FIVE_PARAMETER_UPP((userUPP), uppSGCompressCompleteBottleProcInfo, (c), (bufferNum), (done), (ci), (refCon))
+ #define InvokeSGAddFrameBottleUPP(c, bufferNum, atTime, scale, ci, refCon, userUPP) (ComponentResult)CALL_SIX_PARAMETER_UPP((userUPP), uppSGAddFrameBottleProcInfo, (c), (bufferNum), (atTime), (scale), (ci), (refCon))
+ #define InvokeSGTransferFrameBottleUPP(c, bufferNum, mp, clipRgn, refCon, userUPP) (ComponentResult)CALL_FIVE_PARAMETER_UPP((userUPP), uppSGTransferFrameBottleProcInfo, (c), (bufferNum), (mp), (clipRgn), (refCon))
+ #define InvokeSGGrabCompressCompleteBottleUPP(c, queuedFrameCount, ci, t, refCon, userUPP) (ComponentResult)CALL_FIVE_PARAMETER_UPP((userUPP), uppSGGrabCompressCompleteBottleProcInfo, (c), (queuedFrameCount), (ci), (t), (refCon))
+ #define InvokeSGDisplayCompressBottleUPP(c, dataPtr, desc, mp, clipRgn, refCon, userUPP) (ComponentResult)CALL_SIX_PARAMETER_UPP((userUPP), uppSGDisplayCompressBottleProcInfo, (c), (dataPtr), (desc), (mp), (clipRgn), (refCon))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewDataHCompletionProc(userRoutine) NewDataHCompletionUPP(userRoutine)
+#define NewVdigIntProc(userRoutine) NewVdigIntUPP(userRoutine)
+#define NewStartDocumentHandlerProc(userRoutine) NewStartDocumentHandlerUPP(userRoutine)
+#define NewEndDocumentHandlerProc(userRoutine) NewEndDocumentHandlerUPP(userRoutine)
+#define NewStartElementHandlerProc(userRoutine) NewStartElementHandlerUPP(userRoutine)
+#define NewEndElementHandlerProc(userRoutine) NewEndElementHandlerUPP(userRoutine)
+#define NewCharDataHandlerProc(userRoutine) NewCharDataHandlerUPP(userRoutine)
+#define NewPreprocessInstructionHandlerProc(userRoutine) NewPreprocessInstructionHandlerUPP(userRoutine)
+#define NewCommentHandlerProc(userRoutine) NewCommentHandlerUPP(userRoutine)
+#define NewCDataHandlerProc(userRoutine) NewCDataHandlerUPP(userRoutine)
+#define NewSGDataProc(userRoutine) NewSGDataUPP(userRoutine)
+#define NewSGModalFilterProc(userRoutine) NewSGModalFilterUPP(userRoutine)
+#define NewSGGrabBottleProc(userRoutine) NewSGGrabBottleUPP(userRoutine)
+#define NewSGGrabCompleteBottleProc(userRoutine) NewSGGrabCompleteBottleUPP(userRoutine)
+#define NewSGDisplayBottleProc(userRoutine) NewSGDisplayBottleUPP(userRoutine)
+#define NewSGCompressBottleProc(userRoutine) NewSGCompressBottleUPP(userRoutine)
+#define NewSGCompressCompleteBottleProc(userRoutine) NewSGCompressCompleteBottleUPP(userRoutine)
+#define NewSGAddFrameBottleProc(userRoutine) NewSGAddFrameBottleUPP(userRoutine)
+#define NewSGTransferFrameBottleProc(userRoutine) NewSGTransferFrameBottleUPP(userRoutine)
+#define NewSGGrabCompressCompleteBottleProc(userRoutine) NewSGGrabCompressCompleteBottleUPP(userRoutine)
+#define NewSGDisplayCompressBottleProc(userRoutine) NewSGDisplayCompressBottleUPP(userRoutine)
+#define CallDataHCompletionProc(userRoutine, request, refcon, err) InvokeDataHCompletionUPP(request, refcon, err, userRoutine)
+#define CallVdigIntProc(userRoutine, flags, refcon) InvokeVdigIntUPP(flags, refcon, userRoutine)
+#define CallStartDocumentHandlerProc(userRoutine, refcon) InvokeStartDocumentHandlerUPP(refcon, userRoutine)
+#define CallEndDocumentHandlerProc(userRoutine, refcon) InvokeEndDocumentHandlerUPP(refcon, userRoutine)
+#define CallStartElementHandlerProc(userRoutine, name, atts, refcon) InvokeStartElementHandlerUPP(name, atts, refcon, userRoutine)
+#define CallEndElementHandlerProc(userRoutine, name, refcon) InvokeEndElementHandlerUPP(name, refcon, userRoutine)
+#define CallCharDataHandlerProc(userRoutine, charData, refcon) InvokeCharDataHandlerUPP(charData, refcon, userRoutine)
+#define CallPreprocessInstructionHandlerProc(userRoutine, name, atts, refcon) InvokePreprocessInstructionHandlerUPP(name, atts, refcon, userRoutine)
+#define CallCommentHandlerProc(userRoutine, comment, refcon) InvokeCommentHandlerUPP(comment, refcon, userRoutine)
+#define CallCDataHandlerProc(userRoutine, cdata, refcon) InvokeCDataHandlerUPP(cdata, refcon, userRoutine)
+#define CallSGDataProc(userRoutine, c, p, len, offset, chRefCon, time, writeType, refCon) InvokeSGDataUPP(c, p, len, offset, chRefCon, time, writeType, refCon, userRoutine)
+#define CallSGModalFilterProc(userRoutine, theDialog, theEvent, itemHit, refCon) InvokeSGModalFilterUPP(theDialog, theEvent, itemHit, refCon, userRoutine)
+#define CallSGGrabBottleProc(userRoutine, c, bufferNum, refCon) InvokeSGGrabBottleUPP(c, bufferNum, refCon, userRoutine)
+#define CallSGGrabCompleteBottleProc(userRoutine, c, bufferNum, done, refCon) InvokeSGGrabCompleteBottleUPP(c, bufferNum, done, refCon, userRoutine)
+#define CallSGDisplayBottleProc(userRoutine, c, bufferNum, mp, clipRgn, refCon) InvokeSGDisplayBottleUPP(c, bufferNum, mp, clipRgn, refCon, userRoutine)
+#define CallSGCompressBottleProc(userRoutine, c, bufferNum, refCon) InvokeSGCompressBottleUPP(c, bufferNum, refCon, userRoutine)
+#define CallSGCompressCompleteBottleProc(userRoutine, c, bufferNum, done, ci, refCon) InvokeSGCompressCompleteBottleUPP(c, bufferNum, done, ci, refCon, userRoutine)
+#define CallSGAddFrameBottleProc(userRoutine, c, bufferNum, atTime, scale, ci, refCon) InvokeSGAddFrameBottleUPP(c, bufferNum, atTime, scale, ci, refCon, userRoutine)
+#define CallSGTransferFrameBottleProc(userRoutine, c, bufferNum, mp, clipRgn, refCon) InvokeSGTransferFrameBottleUPP(c, bufferNum, mp, clipRgn, refCon, userRoutine)
+#define CallSGGrabCompressCompleteBottleProc(userRoutine, c, queuedFrameCount, ci, t, refCon) InvokeSGGrabCompressCompleteBottleUPP(c, queuedFrameCount, ci, t, refCon, userRoutine)
+#define CallSGDisplayCompressBottleProc(userRoutine, c, dataPtr, desc, mp, clipRgn, refCon) InvokeSGDisplayCompressBottleUPP(c, dataPtr, desc, mp, clipRgn, refCon, userRoutine)
+
+/* selectors for component calls */
+enum {
+ kClockGetTimeSelect = 0x0001,
+ kClockNewCallBackSelect = 0x0002,
+ kClockDisposeCallBackSelect = 0x0003,
+ kClockCallMeWhenSelect = 0x0004,
+ kClockCancelCallBackSelect = 0x0005,
+ kClockRateChangedSelect = 0x0006,
+ kClockTimeChangedSelect = 0x0007,
+ kClockSetTimeBaseSelect = 0x0008,
+ kClockStartStopChangedSelect = 0x0009,
+ kClockGetRateSelect = 0x000A,
+ kSCGetCompressionExtendedSelect = 0x0001,
+ kSCPositionRectSelect = 0x0002,
+ kSCPositionDialogSelect = 0x0003,
+ kSCSetTestImagePictHandleSelect = 0x0004,
+ kSCSetTestImagePictFileSelect = 0x0005,
+ kSCSetTestImagePixMapSelect = 0x0006,
+ kSCGetBestDeviceRectSelect = 0x0007,
+ kSCRequestImageSettingsSelect = 0x000A,
+ kSCCompressImageSelect = 0x000B,
+ kSCCompressPictureSelect = 0x000C,
+ kSCCompressPictureFileSelect = 0x000D,
+ kSCRequestSequenceSettingsSelect = 0x000E,
+ kSCCompressSequenceBeginSelect = 0x000F,
+ kSCCompressSequenceFrameSelect = 0x0010,
+ kSCCompressSequenceEndSelect = 0x0011,
+ kSCDefaultPictHandleSettingsSelect = 0x0012,
+ kSCDefaultPictFileSettingsSelect = 0x0013,
+ kSCDefaultPixMapSettingsSelect = 0x0014,
+ kSCGetInfoSelect = 0x0015,
+ kSCSetInfoSelect = 0x0016,
+ kSCNewGWorldSelect = 0x0017,
+ kSCSetCompressFlagsSelect = 0x0018,
+ kSCGetCompressFlagsSelect = 0x0019,
+ kSCGetSettingsAsTextSelect = 0x001A,
+ kSCGetSettingsAsAtomContainerSelect = 0x001B,
+ kSCSetSettingsFromAtomContainerSelect = 0x001C,
+ kSCCompressSequenceFrameAsyncSelect = 0x001D,
+ kSCAsyncIdleSelect = 0x001E,
+ kTweenerInitializeSelect = 0x0001,
+ kTweenerDoTweenSelect = 0x0002,
+ kTweenerResetSelect = 0x0003,
+ kTCGetCurrentTimeCodeSelect = 0x0101,
+ kTCGetTimeCodeAtTimeSelect = 0x0102,
+ kTCTimeCodeToStringSelect = 0x0103,
+ kTCTimeCodeToFrameNumberSelect = 0x0104,
+ kTCFrameNumberToTimeCodeSelect = 0x0105,
+ kTCGetSourceRefSelect = 0x0106,
+ kTCSetSourceRefSelect = 0x0107,
+ kTCSetTimeCodeFlagsSelect = 0x0108,
+ kTCGetTimeCodeFlagsSelect = 0x0109,
+ kTCSetDisplayOptionsSelect = 0x010A,
+ kTCGetDisplayOptionsSelect = 0x010B,
+ kMovieImportHandleSelect = 0x0001,
+ kMovieImportFileSelect = 0x0002,
+ kMovieImportSetSampleDurationSelect = 0x0003,
+ kMovieImportSetSampleDescriptionSelect = 0x0004,
+ kMovieImportSetMediaFileSelect = 0x0005,
+ kMovieImportSetDimensionsSelect = 0x0006,
+ kMovieImportSetChunkSizeSelect = 0x0007,
+ kMovieImportSetProgressProcSelect = 0x0008,
+ kMovieImportSetAuxiliaryDataSelect = 0x0009,
+ kMovieImportSetFromScrapSelect = 0x000A,
+ kMovieImportDoUserDialogSelect = 0x000B,
+ kMovieImportSetDurationSelect = 0x000C,
+ kMovieImportGetAuxiliaryDataTypeSelect = 0x000D,
+ kMovieImportValidateSelect = 0x000E,
+ kMovieImportGetFileTypeSelect = 0x000F,
+ kMovieImportDataRefSelect = 0x0010,
+ kMovieImportGetSampleDescriptionSelect = 0x0011,
+ kMovieImportGetMIMETypeListSelect = 0x0012,
+ kMovieImportSetOffsetAndLimitSelect = 0x0013,
+ kMovieImportGetSettingsAsAtomContainerSelect = 0x0014,
+ kMovieImportSetSettingsFromAtomContainerSelect = 0x0015,
+ kMovieImportSetOffsetAndLimit64Select = 0x0016,
+ kMovieImportIdleSelect = 0x0017,
+ kMovieImportValidateDataRefSelect = 0x0018,
+ kMovieImportGetLoadStateSelect = 0x0019,
+ kMovieImportGetMaxLoadedTimeSelect = 0x001A,
+ kMovieImportEstimateCompletionTimeSelect = 0x001B,
+ kMovieImportSetDontBlockSelect = 0x001C,
+ kMovieImportGetDontBlockSelect = 0x001D,
+ kMovieImportSetIdleManagerSelect = 0x001E,
+ kMovieImportSetNewMovieFlagsSelect = 0x001F,
+ kMovieImportGetDestinationMediaTypeSelect = 0x0020,
+ kMovieExportToHandleSelect = 0x0080,
+ kMovieExportToFileSelect = 0x0081,
+ kMovieExportGetAuxiliaryDataSelect = 0x0083,
+ kMovieExportSetProgressProcSelect = 0x0084,
+ kMovieExportSetSampleDescriptionSelect = 0x0085,
+ kMovieExportDoUserDialogSelect = 0x0086,
+ kMovieExportGetCreatorTypeSelect = 0x0087,
+ kMovieExportToDataRefSelect = 0x0088,
+ kMovieExportFromProceduresToDataRefSelect = 0x0089,
+ kMovieExportAddDataSourceSelect = 0x008A,
+ kMovieExportValidateSelect = 0x008B,
+ kMovieExportGetSettingsAsAtomContainerSelect = 0x008C,
+ kMovieExportSetSettingsFromAtomContainerSelect = 0x008D,
+ kMovieExportGetFileNameExtensionSelect = 0x008E,
+ kMovieExportGetShortFileTypeStringSelect = 0x008F,
+ kMovieExportGetSourceMediaTypeSelect = 0x0090,
+ kMovieExportSetGetMoviePropertyProcSelect = 0x0091,
+ kTextExportGetDisplayDataSelect = 0x0100,
+ kTextExportGetTimeFractionSelect = 0x0101,
+ kTextExportSetTimeFractionSelect = 0x0102,
+ kTextExportGetSettingsSelect = 0x0103,
+ kTextExportSetSettingsSelect = 0x0104,
+ kMIDIImportGetSettingsSelect = 0x0100,
+ kMIDIImportSetSettingsSelect = 0x0101,
+ kMovieExportNewGetDataAndPropertiesProcsSelect = 0x0100,
+ kMovieExportDisposeGetDataAndPropertiesProcsSelect = 0x0101,
+ kGraphicsImageImportSetSequenceEnabledSelect = 0x0100,
+ kGraphicsImageImportGetSequenceEnabledSelect = 0x0101,
+ kPreviewShowDataSelect = 0x0001,
+ kPreviewMakePreviewSelect = 0x0002,
+ kPreviewMakePreviewReferenceSelect = 0x0003,
+ kPreviewEventSelect = 0x0004,
+ kDataCodecDecompressSelect = 0x0001,
+ kDataCodecGetCompressBufferSizeSelect = 0x0002,
+ kDataCodecCompressSelect = 0x0003,
+ kDataCodecBeginInterruptSafeSelect = 0x0004,
+ kDataCodecEndInterruptSafeSelect = 0x0005,
+ kDataCodecDecompressPartialSelect = 0x0006,
+ kDataCodecCompressPartialSelect = 0x0007,
+ kDataHGetDataSelect = 0x0002,
+ kDataHPutDataSelect = 0x0003,
+ kDataHFlushDataSelect = 0x0004,
+ kDataHOpenForWriteSelect = 0x0005,
+ kDataHCloseForWriteSelect = 0x0006,
+ kDataHOpenForReadSelect = 0x0008,
+ kDataHCloseForReadSelect = 0x0009,
+ kDataHSetDataRefSelect = 0x000A,
+ kDataHGetDataRefSelect = 0x000B,
+ kDataHCompareDataRefSelect = 0x000C,
+ kDataHTaskSelect = 0x000D,
+ kDataHScheduleDataSelect = 0x000E,
+ kDataHFinishDataSelect = 0x000F,
+ kDataHFlushCacheSelect = 0x0010,
+ kDataHResolveDataRefSelect = 0x0011,
+ kDataHGetFileSizeSelect = 0x0012,
+ kDataHCanUseDataRefSelect = 0x0013,
+ kDataHGetVolumeListSelect = 0x0014,
+ kDataHWriteSelect = 0x0015,
+ kDataHPreextendSelect = 0x0016,
+ kDataHSetFileSizeSelect = 0x0017,
+ kDataHGetFreeSpaceSelect = 0x0018,
+ kDataHCreateFileSelect = 0x0019,
+ kDataHGetPreferredBlockSizeSelect = 0x001A,
+ kDataHGetDeviceIndexSelect = 0x001B,
+ kDataHIsStreamingDataHandlerSelect = 0x001C,
+ kDataHGetDataInBufferSelect = 0x001D,
+ kDataHGetScheduleAheadTimeSelect = 0x001E,
+ kDataHSetCacheSizeLimitSelect = 0x001F,
+ kDataHGetCacheSizeLimitSelect = 0x0020,
+ kDataHGetMovieSelect = 0x0021,
+ kDataHAddMovieSelect = 0x0022,
+ kDataHUpdateMovieSelect = 0x0023,
+ kDataHDoesBufferSelect = 0x0024,
+ kDataHGetFileNameSelect = 0x0025,
+ kDataHGetAvailableFileSizeSelect = 0x0026,
+ kDataHGetMacOSFileTypeSelect = 0x0027,
+ kDataHGetMIMETypeSelect = 0x0028,
+ kDataHSetDataRefWithAnchorSelect = 0x0029,
+ kDataHGetDataRefWithAnchorSelect = 0x002A,
+ kDataHSetMacOSFileTypeSelect = 0x002B,
+ kDataHSetTimeBaseSelect = 0x002C,
+ kDataHGetInfoFlagsSelect = 0x002D,
+ kDataHScheduleData64Select = 0x002E,
+ kDataHWrite64Select = 0x002F,
+ kDataHGetFileSize64Select = 0x0030,
+ kDataHPreextend64Select = 0x0031,
+ kDataHSetFileSize64Select = 0x0032,
+ kDataHGetFreeSpace64Select = 0x0033,
+ kDataHAppend64Select = 0x0034,
+ kDataHReadAsyncSelect = 0x0035,
+ kDataHPollReadSelect = 0x0036,
+ kDataHGetDataAvailabilitySelect = 0x0037,
+ kDataHGetFileSizeAsyncSelect = 0x003A,
+ kDataHGetDataRefAsTypeSelect = 0x003B,
+ kDataHSetDataRefExtensionSelect = 0x003C,
+ kDataHGetDataRefExtensionSelect = 0x003D,
+ kDataHGetMovieWithFlagsSelect = 0x003E,
+ kDataHGetFileTypeOrderingSelect = 0x0040,
+ kDataHCreateFileWithFlagsSelect = 0x0041,
+ kDataHGetMIMETypeAsyncSelect = 0x0042,
+ kDataHGetInfoSelect = 0x0043,
+ kDataHSetIdleManagerSelect = 0x0044,
+ kDataHDeleteFileSelect = 0x0045,
+ kDataHSetMovieUsageFlagsSelect = 0x0046,
+ kDataHUseTemporaryDataRefSelect = 0x0047,
+ kDataHGetTemporaryDataRefCapabilitiesSelect = 0x0048,
+ kDataHRenameFileSelect = 0x0049,
+ kDataHPlaybackHintsSelect = 0x0103,
+ kDataHPlaybackHints64Select = 0x010E,
+ kDataHGetDataRateSelect = 0x0110,
+ kDataHSetTimeHintsSelect = 0x0111,
+ kVDGetMaxSrcRectSelect = 0x0001,
+ kVDGetActiveSrcRectSelect = 0x0002,
+ kVDSetDigitizerRectSelect = 0x0003,
+ kVDGetDigitizerRectSelect = 0x0004,
+ kVDGetVBlankRectSelect = 0x0005,
+ kVDGetMaskPixMapSelect = 0x0006,
+ kVDGetPlayThruDestinationSelect = 0x0008,
+ kVDUseThisCLUTSelect = 0x0009,
+ kVDSetInputGammaValueSelect = 0x000A,
+ kVDGetInputGammaValueSelect = 0x000B,
+ kVDSetBrightnessSelect = 0x000C,
+ kVDGetBrightnessSelect = 0x000D,
+ kVDSetContrastSelect = 0x000E,
+ kVDSetHueSelect = 0x000F,
+ kVDSetSharpnessSelect = 0x0010,
+ kVDSetSaturationSelect = 0x0011,
+ kVDGetContrastSelect = 0x0012,
+ kVDGetHueSelect = 0x0013,
+ kVDGetSharpnessSelect = 0x0014,
+ kVDGetSaturationSelect = 0x0015,
+ kVDGrabOneFrameSelect = 0x0016,
+ kVDGetMaxAuxBufferSelect = 0x0017,
+ kVDGetDigitizerInfoSelect = 0x0019,
+ kVDGetCurrentFlagsSelect = 0x001A,
+ kVDSetKeyColorSelect = 0x001B,
+ kVDGetKeyColorSelect = 0x001C,
+ kVDAddKeyColorSelect = 0x001D,
+ kVDGetNextKeyColorSelect = 0x001E,
+ kVDSetKeyColorRangeSelect = 0x001F,
+ kVDGetKeyColorRangeSelect = 0x0020,
+ kVDSetDigitizerUserInterruptSelect = 0x0021,
+ kVDSetInputColorSpaceModeSelect = 0x0022,
+ kVDGetInputColorSpaceModeSelect = 0x0023,
+ kVDSetClipStateSelect = 0x0024,
+ kVDGetClipStateSelect = 0x0025,
+ kVDSetClipRgnSelect = 0x0026,
+ kVDClearClipRgnSelect = 0x0027,
+ kVDGetCLUTInUseSelect = 0x0028,
+ kVDSetPLLFilterTypeSelect = 0x0029,
+ kVDGetPLLFilterTypeSelect = 0x002A,
+ kVDGetMaskandValueSelect = 0x002B,
+ kVDSetMasterBlendLevelSelect = 0x002C,
+ kVDSetPlayThruDestinationSelect = 0x002D,
+ kVDSetPlayThruOnOffSelect = 0x002E,
+ kVDSetFieldPreferenceSelect = 0x002F,
+ kVDGetFieldPreferenceSelect = 0x0030,
+ kVDPreflightDestinationSelect = 0x0032,
+ kVDPreflightGlobalRectSelect = 0x0033,
+ kVDSetPlayThruGlobalRectSelect = 0x0034,
+ kVDSetInputGammaRecordSelect = 0x0035,
+ kVDGetInputGammaRecordSelect = 0x0036,
+ kVDSetBlackLevelValueSelect = 0x0037,
+ kVDGetBlackLevelValueSelect = 0x0038,
+ kVDSetWhiteLevelValueSelect = 0x0039,
+ kVDGetWhiteLevelValueSelect = 0x003A,
+ kVDGetVideoDefaultsSelect = 0x003B,
+ kVDGetNumberOfInputsSelect = 0x003C,
+ kVDGetInputFormatSelect = 0x003D,
+ kVDSetInputSelect = 0x003E,
+ kVDGetInputSelect = 0x003F,
+ kVDSetInputStandardSelect = 0x0040,
+ kVDSetupBuffersSelect = 0x0041,
+ kVDGrabOneFrameAsyncSelect = 0x0042,
+ kVDDoneSelect = 0x0043,
+ kVDSetCompressionSelect = 0x0044,
+ kVDCompressOneFrameAsyncSelect = 0x0045,
+ kVDCompressDoneSelect = 0x0046,
+ kVDReleaseCompressBufferSelect = 0x0047,
+ kVDGetImageDescriptionSelect = 0x0048,
+ kVDResetCompressSequenceSelect = 0x0049,
+ kVDSetCompressionOnOffSelect = 0x004A,
+ kVDGetCompressionTypesSelect = 0x004B,
+ kVDSetTimeBaseSelect = 0x004C,
+ kVDSetFrameRateSelect = 0x004D,
+ kVDGetDataRateSelect = 0x004E,
+ kVDGetSoundInputDriverSelect = 0x004F,
+ kVDGetDMADepthsSelect = 0x0050,
+ kVDGetPreferredTimeScaleSelect = 0x0051,
+ kVDReleaseAsyncBuffersSelect = 0x0052,
+ kVDSetDataRateSelect = 0x0054,
+ kVDGetTimeCodeSelect = 0x0055,
+ kVDUseSafeBuffersSelect = 0x0056,
+ kVDGetSoundInputSourceSelect = 0x0057,
+ kVDGetCompressionTimeSelect = 0x0058,
+ kVDSetPreferredPacketSizeSelect = 0x0059,
+ kVDSetPreferredImageDimensionsSelect = 0x005A,
+ kVDGetPreferredImageDimensionsSelect = 0x005B,
+ kVDGetInputNameSelect = 0x005C,
+ kVDSetDestinationPortSelect = 0x005D,
+ kVDGetDeviceNameAndFlagsSelect = 0x005E,
+ kVDCaptureStateChangingSelect = 0x005F,
+ kVDGetUniqueIDsSelect = 0x0060,
+ kVDSelectUniqueIDsSelect = 0x0061,
+ kVDIIDCGetFeaturesSelect = 0x0200,
+ kVDIIDCSetFeaturesSelect = 0x0201,
+ kVDIIDCGetDefaultFeaturesSelect = 0x0202,
+ kVDIIDCGetCSRDataSelect = 0x0203,
+ kVDIIDCSetCSRDataSelect = 0x0204,
+ kXMLParseDataRefSelect = 0x0001,
+ kXMLParseFileSelect = 0x0002,
+ kXMLParseDisposeXMLDocSelect = 0x0003,
+ kXMLParseGetDetailedParseErrorSelect = 0x0004,
+ kXMLParseAddElementSelect = 0x0005,
+ kXMLParseAddAttributeSelect = 0x0006,
+ kXMLParseAddMultipleAttributesSelect = 0x0007,
+ kXMLParseAddAttributeAndValueSelect = 0x0008,
+ kXMLParseAddMultipleAttributesAndValuesSelect = 0x0009,
+ kXMLParseAddAttributeValueKindSelect = 0x000A,
+ kXMLParseAddNameSpaceSelect = 0x000B,
+ kXMLParseSetOffsetAndLimitSelect = 0x000C,
+ kXMLParseSetEventParseRefConSelect = 0x000D,
+ kXMLParseSetStartDocumentHandlerSelect = 0x000E,
+ kXMLParseSetEndDocumentHandlerSelect = 0x000F,
+ kXMLParseSetStartElementHandlerSelect = 0x0010,
+ kXMLParseSetEndElementHandlerSelect = 0x0011,
+ kXMLParseSetCharDataHandlerSelect = 0x0012,
+ kXMLParseSetPreprocessInstructionHandlerSelect = 0x0013,
+ kXMLParseSetCommentHandlerSelect = 0x0014,
+ kXMLParseSetCDataHandlerSelect = 0x0015,
+ kSGInitializeSelect = 0x0001,
+ kSGSetDataOutputSelect = 0x0002,
+ kSGGetDataOutputSelect = 0x0003,
+ kSGSetGWorldSelect = 0x0004,
+ kSGGetGWorldSelect = 0x0005,
+ kSGNewChannelSelect = 0x0006,
+ kSGDisposeChannelSelect = 0x0007,
+ kSGStartPreviewSelect = 0x0010,
+ kSGStartRecordSelect = 0x0011,
+ kSGIdleSelect = 0x0012,
+ kSGStopSelect = 0x0013,
+ kSGPauseSelect = 0x0014,
+ kSGPrepareSelect = 0x0015,
+ kSGReleaseSelect = 0x0016,
+ kSGGetMovieSelect = 0x0017,
+ kSGSetMaximumRecordTimeSelect = 0x0018,
+ kSGGetMaximumRecordTimeSelect = 0x0019,
+ kSGGetStorageSpaceRemainingSelect = 0x001A,
+ kSGGetTimeRemainingSelect = 0x001B,
+ kSGGrabPictSelect = 0x001C,
+ kSGGetLastMovieResIDSelect = 0x001D,
+ kSGSetFlagsSelect = 0x001E,
+ kSGGetFlagsSelect = 0x001F,
+ kSGSetDataProcSelect = 0x0020,
+ kSGNewChannelFromComponentSelect = 0x0021,
+ kSGDisposeDeviceListSelect = 0x0022,
+ kSGAppendDeviceListToMenuSelect = 0x0023,
+ kSGSetSettingsSelect = 0x0024,
+ kSGGetSettingsSelect = 0x0025,
+ kSGGetIndChannelSelect = 0x0026,
+ kSGUpdateSelect = 0x0027,
+ kSGGetPauseSelect = 0x0028,
+ kSGSettingsDialogSelect = 0x0029,
+ kSGGetAlignmentProcSelect = 0x002A,
+ kSGSetChannelSettingsSelect = 0x002B,
+ kSGGetChannelSettingsSelect = 0x002C,
+ kSGGetModeSelect = 0x002D,
+ kSGSetDataRefSelect = 0x002E,
+ kSGGetDataRefSelect = 0x002F,
+ kSGNewOutputSelect = 0x0030,
+ kSGDisposeOutputSelect = 0x0031,
+ kSGSetOutputFlagsSelect = 0x0032,
+ kSGSetChannelOutputSelect = 0x0033,
+ kSGGetDataOutputStorageSpaceRemainingSelect = 0x0034,
+ kSGHandleUpdateEventSelect = 0x0035,
+ kSGSetOutputNextOutputSelect = 0x0036,
+ kSGGetOutputNextOutputSelect = 0x0037,
+ kSGSetOutputMaximumOffsetSelect = 0x0038,
+ kSGGetOutputMaximumOffsetSelect = 0x0039,
+ kSGGetOutputDataReferenceSelect = 0x003A,
+ kSGWriteExtendedMovieDataSelect = 0x003B,
+ kSGGetStorageSpaceRemaining64Select = 0x003C,
+ kSGGetDataOutputStorageSpaceRemaining64Select = 0x003D,
+ kSGWriteMovieDataSelect = 0x0100,
+ kSGAddFrameReferenceSelect = 0x0101,
+ kSGGetNextFrameReferenceSelect = 0x0102,
+ kSGGetTimeBaseSelect = 0x0103,
+ kSGSortDeviceListSelect = 0x0104,
+ kSGAddMovieDataSelect = 0x0105,
+ kSGChangedSourceSelect = 0x0106,
+ kSGAddExtendedFrameReferenceSelect = 0x0107,
+ kSGGetNextExtendedFrameReferenceSelect = 0x0108,
+ kSGAddExtendedMovieDataSelect = 0x0109,
+ kSGAddOutputDataRefToMediaSelect = 0x010A,
+ kSGSetSettingsSummarySelect = 0x010B,
+ kSGSetChannelUsageSelect = 0x0080,
+ kSGGetChannelUsageSelect = 0x0081,
+ kSGSetChannelBoundsSelect = 0x0082,
+ kSGGetChannelBoundsSelect = 0x0083,
+ kSGSetChannelVolumeSelect = 0x0084,
+ kSGGetChannelVolumeSelect = 0x0085,
+ kSGGetChannelInfoSelect = 0x0086,
+ kSGSetChannelPlayFlagsSelect = 0x0087,
+ kSGGetChannelPlayFlagsSelect = 0x0088,
+ kSGSetChannelMaxFramesSelect = 0x0089,
+ kSGGetChannelMaxFramesSelect = 0x008A,
+ kSGSetChannelRefConSelect = 0x008B,
+ kSGSetChannelClipSelect = 0x008C,
+ kSGGetChannelClipSelect = 0x008D,
+ kSGGetChannelSampleDescriptionSelect = 0x008E,
+ kSGGetChannelDeviceListSelect = 0x008F,
+ kSGSetChannelDeviceSelect = 0x0090,
+ kSGSetChannelMatrixSelect = 0x0091,
+ kSGGetChannelMatrixSelect = 0x0092,
+ kSGGetChannelTimeScaleSelect = 0x0093,
+ kSGChannelPutPictureSelect = 0x0094,
+ kSGChannelSetRequestedDataRateSelect = 0x0095,
+ kSGChannelGetRequestedDataRateSelect = 0x0096,
+ kSGChannelSetDataSourceNameSelect = 0x0097,
+ kSGChannelGetDataSourceNameSelect = 0x0098,
+ kSGChannelSetCodecSettingsSelect = 0x0099,
+ kSGChannelGetCodecSettingsSelect = 0x009A,
+ kSGGetChannelTimeBaseSelect = 0x009B,
+ kSGGetChannelRefConSelect = 0x009C,
+ kSGGetChannelDeviceAndInputNamesSelect = 0x009D,
+ kSGSetChannelDeviceInputSelect = 0x009E,
+ kSGSetChannelSettingsStateChangingSelect = 0x009F,
+ kSGInitChannelSelect = 0x0180,
+ kSGWriteSamplesSelect = 0x0181,
+ kSGGetDataRateSelect = 0x0182,
+ kSGAlignChannelRectSelect = 0x0183,
+ kSGPanelGetDitlSelect = 0x0200,
+ kSGPanelGetTitleSelect = 0x0201,
+ kSGPanelCanRunSelect = 0x0202,
+ kSGPanelInstallSelect = 0x0203,
+ kSGPanelEventSelect = 0x0204,
+ kSGPanelItemSelect = 0x0205,
+ kSGPanelRemoveSelect = 0x0206,
+ kSGPanelSetGrabberSelect = 0x0207,
+ kSGPanelSetResFileSelect = 0x0208,
+ kSGPanelGetSettingsSelect = 0x0209,
+ kSGPanelSetSettingsSelect = 0x020A,
+ kSGPanelValidateInputSelect = 0x020B,
+ kSGPanelSetEventFilterSelect = 0x020C,
+ kSGPanelGetDITLForSizeSelect = 0x020D,
+ kSGGetSrcVideoBoundsSelect = 0x0100,
+ kSGSetVideoRectSelect = 0x0101,
+ kSGGetVideoRectSelect = 0x0102,
+ kSGGetVideoCompressorTypeSelect = 0x0103,
+ kSGSetVideoCompressorTypeSelect = 0x0104,
+ kSGSetVideoCompressorSelect = 0x0105,
+ kSGGetVideoCompressorSelect = 0x0106,
+ kSGGetVideoDigitizerComponentSelect = 0x0107,
+ kSGSetVideoDigitizerComponentSelect = 0x0108,
+ kSGVideoDigitizerChangedSelect = 0x0109,
+ kSGSetVideoBottlenecksSelect = 0x010A,
+ kSGGetVideoBottlenecksSelect = 0x010B,
+ kSGGrabFrameSelect = 0x010C,
+ kSGGrabFrameCompleteSelect = 0x010D,
+ kSGDisplayFrameSelect = 0x010E,
+ kSGCompressFrameSelect = 0x010F,
+ kSGCompressFrameCompleteSelect = 0x0110,
+ kSGAddFrameSelect = 0x0111,
+ kSGTransferFrameForCompressSelect = 0x0112,
+ kSGSetCompressBufferSelect = 0x0113,
+ kSGGetCompressBufferSelect = 0x0114,
+ kSGGetBufferInfoSelect = 0x0115,
+ kSGSetUseScreenBufferSelect = 0x0116,
+ kSGGetUseScreenBufferSelect = 0x0117,
+ kSGGrabCompressCompleteSelect = 0x0118,
+ kSGDisplayCompressSelect = 0x0119,
+ kSGSetFrameRateSelect = 0x011A,
+ kSGGetFrameRateSelect = 0x011B,
+ kSGSetPreferredPacketSizeSelect = 0x0121,
+ kSGGetPreferredPacketSizeSelect = 0x0122,
+ kSGSetUserVideoCompressorListSelect = 0x0123,
+ kSGGetUserVideoCompressorListSelect = 0x0124,
+ kSGSetSoundInputDriverSelect = 0x0100,
+ kSGGetSoundInputDriverSelect = 0x0101,
+ kSGSoundInputDriverChangedSelect = 0x0102,
+ kSGSetSoundRecordChunkSizeSelect = 0x0103,
+ kSGGetSoundRecordChunkSizeSelect = 0x0104,
+ kSGSetSoundInputRateSelect = 0x0105,
+ kSGGetSoundInputRateSelect = 0x0106,
+ kSGSetSoundInputParametersSelect = 0x0107,
+ kSGGetSoundInputParametersSelect = 0x0108,
+ kSGSetAdditionalSoundRatesSelect = 0x0109,
+ kSGGetAdditionalSoundRatesSelect = 0x010A,
+ kSGSetFontNameSelect = 0x0100,
+ kSGSetFontSizeSelect = 0x0101,
+ kSGSetTextForeColorSelect = 0x0102,
+ kSGSetTextBackColorSelect = 0x0103,
+ kSGSetJustificationSelect = 0x0104,
+ kSGGetTextReturnToSpaceValueSelect = 0x0105,
+ kSGSetTextReturnToSpaceValueSelect = 0x0106,
+ kSGGetInstrumentSelect = 0x0100,
+ kSGSetInstrumentSelect = 0x0101,
+ kQTVideoOutputGetDisplayModeListSelect = 0x0001,
+ kQTVideoOutputGetCurrentClientNameSelect = 0x0002,
+ kQTVideoOutputSetClientNameSelect = 0x0003,
+ kQTVideoOutputGetClientNameSelect = 0x0004,
+ kQTVideoOutputBeginSelect = 0x0005,
+ kQTVideoOutputEndSelect = 0x0006,
+ kQTVideoOutputSetDisplayModeSelect = 0x0007,
+ kQTVideoOutputGetDisplayModeSelect = 0x0008,
+ kQTVideoOutputCustomConfigureDisplaySelect = 0x0009,
+ kQTVideoOutputSaveStateSelect = 0x000A,
+ kQTVideoOutputRestoreStateSelect = 0x000B,
+ kQTVideoOutputGetGWorldSelect = 0x000C,
+ kQTVideoOutputGetGWorldParametersSelect = 0x000D,
+ kQTVideoOutputGetIndSoundOutputSelect = 0x000E,
+ kQTVideoOutputGetClockSelect = 0x000F,
+ kQTVideoOutputSetEchoPortSelect = 0x0010,
+ kQTVideoOutputGetIndImageDecompressorSelect = 0x0011,
+ kQTVideoOutputBaseSetEchoPortSelect = 0x0012
+};
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QUICKTIMECOMPONENTS__ */
+
diff --git a/include/qt/QuickTimeMusic.h b/include/qt/QuickTimeMusic.h
new file mode 100644
index 000000000..cff1acd27
--- /dev/null
+++ b/include/qt/QuickTimeMusic.h
@@ -0,0 +1,2154 @@
+/*
+ File: QuickTimeMusic.h
+
+ Contains: QuickTime Interfaces.
+
+ Version: Technology: QuickTime 6.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1990-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QUICKTIMEMUSIC__
+#define __QUICKTIMEMUSIC__
+
+#ifndef __COMPONENTS__
+#include "Components.h"
+#endif
+
+#ifndef __IMAGECOMPRESSION__
+#include "ImageCompression.h"
+#endif
+
+#ifndef __MOVIES__
+#include "Movies.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#ifndef __VIDEO__
+#include "Video.h"
+#endif
+
+#ifndef __MACMEMORY__
+#include "MacMemory.h"
+#endif
+
+#ifndef __SOUND__
+#include "Sound.h"
+#endif
+
+#ifndef __ENDIAN__
+#include "Endian.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ kaiToneDescType = FOUR_CHAR_CODE('tone'),
+ kaiNoteRequestInfoType = FOUR_CHAR_CODE('ntrq'),
+ kaiKnobListType = FOUR_CHAR_CODE('knbl'),
+ kaiKeyRangeInfoType = FOUR_CHAR_CODE('sinf'),
+ kaiSampleDescType = FOUR_CHAR_CODE('sdsc'),
+ kaiSampleInfoType = FOUR_CHAR_CODE('smin'),
+ kaiSampleDataType = FOUR_CHAR_CODE('sdat'),
+ kaiSampleDataQUIDType = FOUR_CHAR_CODE('quid'),
+ kaiInstInfoType = FOUR_CHAR_CODE('iinf'),
+ kaiPictType = FOUR_CHAR_CODE('pict'),
+ kaiWriterType = FOUR_CHAR_CODE('©wrt'),
+ kaiCopyrightType = FOUR_CHAR_CODE('©cpy'),
+ kaiOtherStrType = FOUR_CHAR_CODE('str '),
+ kaiInstrumentRefType = FOUR_CHAR_CODE('iref'),
+ kaiInstGMQualityType = FOUR_CHAR_CODE('qual'),
+ kaiLibraryInfoType = FOUR_CHAR_CODE('linf'),
+ kaiLibraryDescType = FOUR_CHAR_CODE('ldsc')
+};
+
+
+struct InstLibDescRec {
+ Str31 libIDName;
+};
+typedef struct InstLibDescRec InstLibDescRec;
+
+struct InstKnobRec {
+ BigEndianLong number;
+ BigEndianLong value;
+};
+typedef struct InstKnobRec InstKnobRec;
+enum {
+ kInstKnobMissingUnknown = 0,
+ kInstKnobMissingDefault = (1 << 0)
+};
+
+
+struct InstKnobList {
+ BigEndianLong knobCount;
+ BigEndianLong knobFlags;
+ InstKnobRec knob[1];
+};
+typedef struct InstKnobList InstKnobList;
+enum {
+ kMusicLoopTypeNormal = 0,
+ kMusicLoopTypePalindrome = 1 /* back & forth*/
+};
+
+enum {
+ instSamplePreProcessFlag = 1 << 0
+};
+
+
+struct InstSampleDescRec {
+ BigEndianOSType dataFormat;
+ BigEndianShort numChannels;
+ BigEndianShort sampleSize;
+ BigEndianUnsignedFixed sampleRate;
+ BigEndianShort sampleDataID;
+ BigEndianLong offset; /* offset within SampleData - this could be just for internal use*/
+ BigEndianLong numSamples; /* this could also just be for internal use, we'll see*/
+
+ BigEndianLong loopType;
+ BigEndianLong loopStart;
+ BigEndianLong loopEnd;
+
+ BigEndianLong pitchNormal;
+ BigEndianLong pitchLow;
+ BigEndianLong pitchHigh;
+};
+typedef struct InstSampleDescRec InstSampleDescRec;
+
+typedef Handle AtomicInstrument;
+typedef Ptr AtomicInstrumentPtr;
+enum {
+ kQTMIDIComponentType = FOUR_CHAR_CODE('midi')
+};
+
+enum {
+ kOMSComponentSubType = FOUR_CHAR_CODE('OMS '),
+ kFMSComponentSubType = FOUR_CHAR_CODE('FMS '),
+ kMIDIManagerComponentSubType = FOUR_CHAR_CODE('mmgr'),
+ kOSXMIDIComponentSubType = FOUR_CHAR_CODE('osxm')
+};
+
+typedef ComponentInstance QTMIDIComponent;
+enum {
+ kMusicPacketPortLost = 1, /* received when application loses the default input port */
+ kMusicPacketPortFound = 2, /* received when application gets it back out from under someone else's claim */
+ kMusicPacketTimeGap = 3 /* data[0] = number of milliseconds to keep the MIDI line silent */
+};
+
+enum {
+ kAppleSysexID = 0x11, /* apple sysex is followed by 2-byte command. 0001 is the command for samplesize */
+ kAppleSysexCmdSampleSize = 0x0001, /* 21 bit number in 3 midi bytes follows sysex ID and 2 cmd bytes */
+ kAppleSysexCmdSampleBreak = 0x0002, /* specifies that the sample should break right here */
+ kAppleSysexCmdAtomicInstrument = 0x0010, /* contents of atomic instrument handle */
+ kAppleSysexCmdDeveloper = 0x7F00 /* F0 11 7F 00 ww xx yy zz ... F7 is available for non-Apple developers, where wxyz is unique app signature with 8th bit cleared, unique to developer, and 00 and 7f are reserved */
+};
+
+
+struct MusicMIDIPacket {
+ unsigned short length;
+ unsigned long reserved; /* if length zero, then reserved = above enum */
+ UInt8 data[249];
+};
+typedef struct MusicMIDIPacket MusicMIDIPacket;
+typedef CALLBACK_API( ComponentResult , MusicMIDISendProcPtr )(ComponentInstance self, long refCon, MusicMIDIPacket *mmp);
+typedef CALLBACK_API( ComponentResult , MusicMIDIReadHookProcPtr )(MusicMIDIPacket *mp, long myRefCon);
+typedef STACK_UPP_TYPE(MusicMIDISendProcPtr) MusicMIDISendUPP;
+typedef STACK_UPP_TYPE(MusicMIDIReadHookProcPtr) MusicMIDIReadHookUPP;
+enum {
+ kSynthesizerConnectionFMS = 1, /* this connection imported from FMS */
+ kSynthesizerConnectionMMgr = 2, /* this connection imported from the MIDI Mgr */
+ kSynthesizerConnectionOMS = 4, /* this connection imported from OMS */
+ kSynthesizerConnectionQT = 8, /* this connection is a QuickTime-only port */
+ kSynthesizerConnectionOSXMIDI = 16, /* this connection is an OS X CoreMIDI port */
+ /* lowest five bits are mutually exclusive; combinations reserved for future use.*/
+ kSynthesizerConnectionUnavailable = 256 /* port exists, but cannot be used just now */
+};
+
+/*
+ The sampleBankFile field of this structure can be used to pass in a pointer to an FSSpec
+ that represents a SoundFont 2 or DLS file (otherwise set it to NULL ).
+
+ You then pass in a structure with this field set (all other fields should be zero) to
+ NARegisterMusicDevice:
+ - with synthType as kSoftSynthComponentSubType
+ - with name being used to return to the application the "name" of the synth
+ that should be used in the synthesiserName field of the ToneDescription structure
+ and is also used to retrieve a particular MusicComponent with the
+ NAGetRegisteredMusicDevice call
+
+ This call will create a MusicComponent of kSoftSynthComponentSubType, with the specified
+ sound bank as the sample data source.
+*/
+
+struct SynthesizerConnections {
+ OSType clientID;
+ OSType inputPortID; /* terminology death: this port is used to SEND to the midi synth */
+ OSType outputPortID; /* terminology death: this port receives from a keyboard or other control device */
+ long midiChannel; /* The system channel; others are configurable (or the nubus slot number) */
+ long flags;
+ long unique; /* unique id may be used instead of index, to getinfo and unregister calls */
+ FSSpecPtr sampleBankFile; /* see notes above */
+ long reserved2; /* should be zero */
+};
+typedef struct SynthesizerConnections SynthesizerConnections;
+
+struct QTMIDIPort {
+ SynthesizerConnections portConnections;
+ Str63 portName;
+};
+typedef struct QTMIDIPort QTMIDIPort;
+
+struct QTMIDIPortList {
+ short portCount;
+ QTMIDIPort port[1];
+};
+typedef struct QTMIDIPortList QTMIDIPortList;
+typedef QTMIDIPortList * QTMIDIPortListPtr;
+typedef QTMIDIPortListPtr * QTMIDIPortListHandle;
+EXTERN_API( ComponentResult )
+QTMIDIGetMIDIPorts (QTMIDIComponent ci,
+ QTMIDIPortListHandle * inputPorts,
+ QTMIDIPortListHandle * outputPorts) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0001, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTMIDIUseSendPort (QTMIDIComponent ci,
+ long portIndex,
+ long inUse) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0002, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTMIDISendMIDI (QTMIDIComponent ci,
+ long portIndex,
+ MusicMIDIPacket * mp) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0003, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+QTMIDIUseReceivePort (QTMIDIComponent ci,
+ long portIndex,
+ MusicMIDIReadHookUPP readHook,
+ long refCon) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0004, 0x7000, 0xA82A);
+
+
+
+enum {
+ kMusicComponentType = FOUR_CHAR_CODE('musi'),
+ kInstrumentComponentType = FOUR_CHAR_CODE('inst')
+};
+
+enum {
+ kSoftSynthComponentSubType = FOUR_CHAR_CODE('ss '),
+ kGMSynthComponentSubType = FOUR_CHAR_CODE('gm ')
+};
+
+
+
+typedef ComponentInstance MusicComponent;
+/* MusicSynthesizerFlags*/
+enum {
+ kSynthesizerDynamicVoice = 1 << 0, /* can assign voices on the fly (else, polyphony is very important */
+ kSynthesizerUsesMIDIPort = 1 << 1, /* must be patched through MIDI Manager */
+ kSynthesizerMicrotone = 1 << 2, /* can play microtonal scales */
+ kSynthesizerHasSamples = 1 << 3, /* synthesizer has some use for sampled data */
+ kSynthesizerMixedDrums = 1 << 4, /* any part can play drum parts, total = instrument parts */
+ kSynthesizerSoftware = 1 << 5, /* implemented in main CPU software == uses cpu cycles */
+ kSynthesizerHardware = 1 << 6, /* is a hardware device (such as nubus, or maybe DSP?) */
+ kSynthesizerDynamicChannel = 1 << 7, /* can move any part to any channel or disable each part. (else we assume it lives on all channels in masks) */
+ kSynthesizerHogsSystemChannel = 1 << 8, /* can be channelwise dynamic, but always responds on its system channel */
+ kSynthesizerHasSystemChannel = 1 << 9, /* has some "system channel" notion to distinguish it from multiple instances of the same device (GM devices dont) */
+ kSynthesizerSlowSetPart = 1 << 10, /* SetPart() and SetPartInstrumentNumber() calls do not have rapid response, may glitch notes */
+ kSynthesizerOffline = 1 << 12, /* can enter an offline synthesis mode */
+ kSynthesizerGM = 1 << 14, /* synth is a GM device */
+ kSynthesizerDLS = 1 << 15, /* synth supports DLS level 1 */
+ kSynthesizerSoundLocalization = 1 << 16 /* synth supports extremely baroque, nonstandard, and proprietary "apple game sprockets" localization parameter set */
+};
+
+/*
+ * Note that these controller numbers
+ * are _not_ identical to the MIDI controller numbers.
+ * These are _signed_ 8.8 values, and the LSB's are
+ * always sent to a MIDI device. Controllers 32-63 are
+ * reserved (for MIDI, they are LSB's for 0-31, but we
+ * always send both).
+ *
+ * The full range, therefore, is -128.00 to 127.7f.
+ *
+ * _Excepting_ _volume_, all controls default to zero.
+ *
+ * Pitch bend is specified in fractional semitones! No
+ * more "pitch bend range" nonsense. You can bend as far
+ * as you want, any time you want.
+ */
+typedef SInt32 MusicController;
+enum {
+ kControllerModulationWheel = 1,
+ kControllerBreath = 2,
+ kControllerFoot = 4,
+ kControllerPortamentoTime = 5, /* time in 8.8 seconds, portamento on/off is omitted, 0 time = 'off' */
+ kControllerVolume = 7, /* main volume control */
+ kControllerBalance = 8,
+ kControllerPan = 10, /* 0 - "default", 1 - n: positioned in output 1-n (incl fractions) */
+ kControllerExpression = 11, /* secondary volume control */
+ kControllerLever1 = 16, /* general purpose controllers */
+ kControllerLever2 = 17, /* general purpose controllers */
+ kControllerLever3 = 18, /* general purpose controllers */
+ kControllerLever4 = 19, /* general purpose controllers */
+ kControllerLever5 = 80, /* general purpose controllers */
+ kControllerLever6 = 81, /* general purpose controllers */
+ kControllerLever7 = 82, /* general purpose controllers */
+ kControllerLever8 = 83, /* general purpose controllers */
+ kControllerPitchBend = 32, /* positive & negative semitones, with 8 bits fraction, same units as transpose controllers*/
+ kControllerAfterTouch = 33, /* aka channel pressure */
+ kControllerPartTranspose = 40, /* identical to pitchbend, for overall part xpose */
+ kControllerTuneTranspose = 41, /* another pitchbend, for "song global" pitch offset */
+ kControllerPartVolume = 42, /* another volume control, passed right down from note allocator part volume */
+ kControllerTuneVolume = 43, /* another volume control, used for "song global" volume - since we share one synthesizer across multiple tuneplayers*/
+ kControllerSustain = 64, /* boolean - positive for on, 0 or negative off */
+ kControllerPortamento = 65, /* boolean*/
+ kControllerSostenuto = 66, /* boolean */
+ kControllerSoftPedal = 67, /* boolean */
+ kControllerReverb = 91,
+ kControllerTremolo = 92,
+ kControllerChorus = 93,
+ kControllerCeleste = 94,
+ kControllerPhaser = 95,
+ kControllerEditPart = 113, /* last 16 controllers 113-128 and above are global controllers which respond on part zero */
+ kControllerMasterTune = 114,
+ kControllerMasterTranspose = 114, /* preferred*/
+ kControllerMasterVolume = 115,
+ kControllerMasterCPULoad = 116,
+ kControllerMasterPolyphony = 117,
+ kControllerMasterFeatures = 118
+};
+
+
+/* ID's of knobs supported by the QuickTime Music Synthesizer built into QuickTime*/
+
+enum {
+ kQTMSKnobStartID = 0x02000000,
+ kQTMSKnobVolumeAttackTimeID = 0x02000001,
+ kQTMSKnobVolumeDecayTimeID = 0x02000002,
+ kQTMSKnobVolumeSustainLevelID = 0x02000003,
+ kQTMSKnobVolumeRelease1RateID = 0x02000004,
+ kQTMSKnobVolumeDecayKeyScalingID = 0x02000005,
+ kQTMSKnobVolumeReleaseTimeID = 0x02000006,
+ kQTMSKnobVolumeLFODelayID = 0x02000007,
+ kQTMSKnobVolumeLFORampTimeID = 0x02000008,
+ kQTMSKnobVolumeLFOPeriodID = 0x02000009,
+ kQTMSKnobVolumeLFOShapeID = 0x0200000A,
+ kQTMSKnobVolumeLFODepthID = 0x0200000B,
+ kQTMSKnobVolumeOverallID = 0x0200000C,
+ kQTMSKnobVolumeVelocity127ID = 0x0200000D,
+ kQTMSKnobVolumeVelocity96ID = 0x0200000E,
+ kQTMSKnobVolumeVelocity64ID = 0x0200000F,
+ kQTMSKnobVolumeVelocity32ID = 0x02000010,
+ kQTMSKnobVolumeVelocity16ID = 0x02000011, /* Pitch related knobs*/
+ kQTMSKnobPitchTransposeID = 0x02000012,
+ kQTMSKnobPitchLFODelayID = 0x02000013,
+ kQTMSKnobPitchLFORampTimeID = 0x02000014,
+ kQTMSKnobPitchLFOPeriodID = 0x02000015,
+ kQTMSKnobPitchLFOShapeID = 0x02000016,
+ kQTMSKnobPitchLFODepthID = 0x02000017,
+ kQTMSKnobPitchLFOQuantizeID = 0x02000018, /* Stereo related knobs*/
+ kQTMSKnobStereoDefaultPanID = 0x02000019,
+ kQTMSKnobStereoPositionKeyScalingID = 0x0200001A,
+ kQTMSKnobPitchLFOOffsetID = 0x0200001B,
+ kQTMSKnobExclusionGroupID = 0x0200001C, /* Misc knobs, late additions*/
+ kQTMSKnobSustainTimeID = 0x0200001D,
+ kQTMSKnobSustainInfiniteID = 0x0200001E,
+ kQTMSKnobVolumeLFOStereoID = 0x0200001F,
+ kQTMSKnobVelocityLowID = 0x02000020,
+ kQTMSKnobVelocityHighID = 0x02000021,
+ kQTMSKnobVelocitySensitivityID = 0x02000022,
+ kQTMSKnobPitchSensitivityID = 0x02000023,
+ kQTMSKnobVolumeLFODepthFromWheelID = 0x02000024,
+ kQTMSKnobPitchLFODepthFromWheelID = 0x02000025, /* Volume Env again*/
+ kQTMSKnobVolumeExpOptionsID = 0x02000026, /* Env1*/
+ kQTMSKnobEnv1AttackTimeID = 0x02000027,
+ kQTMSKnobEnv1DecayTimeID = 0x02000028,
+ kQTMSKnobEnv1SustainLevelID = 0x02000029,
+ kQTMSKnobEnv1SustainTimeID = 0x0200002A,
+ kQTMSKnobEnv1SustainInfiniteID = 0x0200002B,
+ kQTMSKnobEnv1ReleaseTimeID = 0x0200002C,
+ kQTMSKnobEnv1ExpOptionsID = 0x0200002D, /* Env2*/
+ kQTMSKnobEnv2AttackTimeID = 0x0200002E,
+ kQTMSKnobEnv2DecayTimeID = 0x0200002F,
+ kQTMSKnobEnv2SustainLevelID = 0x02000030,
+ kQTMSKnobEnv2SustainTimeID = 0x02000031,
+ kQTMSKnobEnv2SustainInfiniteID = 0x02000032,
+ kQTMSKnobEnv2ReleaseTimeID = 0x02000033,
+ kQTMSKnobEnv2ExpOptionsID = 0x02000034, /* Pitch Env*/
+ kQTMSKnobPitchEnvelopeID = 0x02000035,
+ kQTMSKnobPitchEnvelopeDepthID = 0x02000036, /* Filter*/
+ kQTMSKnobFilterKeyFollowID = 0x02000037,
+ kQTMSKnobFilterTransposeID = 0x02000038,
+ kQTMSKnobFilterQID = 0x02000039,
+ kQTMSKnobFilterFrequencyEnvelopeID = 0x0200003A,
+ kQTMSKnobFilterFrequencyEnvelopeDepthID = 0x0200003B,
+ kQTMSKnobFilterQEnvelopeID = 0x0200003C,
+ kQTMSKnobFilterQEnvelopeDepthID = 0x0200003D, /* Reverb Threshhold*/
+ kQTMSKnobReverbThresholdID = 0x0200003E,
+ kQTMSKnobVolumeAttackVelScalingID = 0x0200003F,
+ kQTMSKnobLastIDPlus1 = 0x02000040
+};
+
+
+
+
+enum {
+ kControllerMaximum = 0x00007FFF, /* +01111111.11111111 */
+ kControllerMinimum = (long)0xFFFF8000 /* -10000000.00000000 */
+};
+
+
+struct SynthesizerDescription {
+ OSType synthesizerType; /* synthesizer type (must be same as component subtype) */
+ Str31 name; /* text name of synthesizer type */
+ unsigned long flags; /* from the above enum */
+ unsigned long voiceCount; /* maximum polyphony */
+
+ unsigned long partCount; /* maximum multi-timbrality (and midi channels) */
+ unsigned long instrumentCount; /* non gm, built in (rom) instruments only */
+ unsigned long modifiableInstrumentCount; /* plus n-more are user modifiable */
+ unsigned long channelMask; /* (midi device only) which channels device always uses */
+
+ unsigned long drumPartCount; /* maximum multi-timbrality of drum parts */
+ unsigned long drumCount; /* non gm, built in (rom) drumkits only */
+ unsigned long modifiableDrumCount; /* plus n-more are user modifiable */
+ unsigned long drumChannelMask; /* (midi device only) which channels device always uses */
+
+ unsigned long outputCount; /* number of audio outputs (usually two) */
+ unsigned long latency; /* response time in .Sec */
+
+ unsigned long controllers[4]; /* array of 128 bits */
+ unsigned long gmInstruments[4]; /* array of 128 bits */
+ unsigned long gmDrums[4]; /* array of 128 bits */
+};
+typedef struct SynthesizerDescription SynthesizerDescription;
+enum {
+ kVoiceCountDynamic = -1 /* constant to use to specify dynamic voicing */
+};
+
+
+
+struct ToneDescription {
+ BigEndianOSType synthesizerType; /* synthesizer type */
+ Str31 synthesizerName; /* name of instantiation of synth */
+ Str31 instrumentName; /* preferred name for human use */
+ BigEndianLong instrumentNumber; /* inst-number used if synth-name matches */
+ BigEndianLong gmNumber; /* Best matching general MIDI number */
+};
+typedef struct ToneDescription ToneDescription;
+enum {
+ kFirstGMInstrument = 0x00000001,
+ kLastGMInstrument = 0x00000080,
+ kFirstGSInstrument = 0x00000081,
+ kLastGSInstrument = 0x00003FFF,
+ kFirstDrumkit = 0x00004000, /* (first value is "no drum". instrument numbers from 16384->16384+128 are drumkits, and for GM they are _defined_ drumkits! */
+ kLastDrumkit = 0x00004080,
+ kFirstROMInstrument = 0x00008000,
+ kLastROMInstrument = 0x0000FFFF,
+ kFirstUserInstrument = 0x00010000,
+ kLastUserInstrument = 0x0001FFFF
+};
+
+/* InstrumentMatch*/
+enum {
+ kInstrumentMatchSynthesizerType = 1,
+ kInstrumentMatchSynthesizerName = 2,
+ kInstrumentMatchName = 4,
+ kInstrumentMatchNumber = 8,
+ kInstrumentMatchGMNumber = 16,
+ kInstrumentMatchGSNumber = 32
+};
+
+/* KnobFlags*/
+enum {
+ kKnobBasic = 8, /* knob shows up in certain simplified lists of knobs */
+ kKnobReadOnly = 16, /* knob value cannot be changed by user or with a SetKnob call */
+ kKnobInterruptUnsafe = 32, /* only alter this knob from foreground task time (may access toolbox) */
+ kKnobKeyrangeOverride = 64, /* knob can be overridden within a single keyrange (software synth only) */
+ kKnobGroupStart = 128, /* knob is first in some logical group of knobs */
+ kKnobFixedPoint8 = 1024,
+ kKnobFixedPoint16 = 2048, /* One of these may be used at a time. */
+ kKnobTypeNumber = 0 << 12,
+ kKnobTypeGroupName = 1 << 12, /* "knob" is really a group name for display purposes */
+ kKnobTypeBoolean = 2 << 12, /* if range is greater than 1, its a multi-checkbox field */
+ kKnobTypeNote = 3 << 12, /* knob range is equivalent to MIDI keys */
+ kKnobTypePan = 4 << 12, /* range goes left/right (lose this? ) */
+ kKnobTypeInstrument = 5 << 12, /* knob value = reference to another instrument number */
+ kKnobTypeSetting = 6 << 12, /* knob value is 1 of n different things (eg, fm algorithms) popup menu */
+ kKnobTypeMilliseconds = 7 << 12, /* knob is a millisecond time range */
+ kKnobTypePercentage = 8 << 12, /* knob range is displayed as a Percentage */
+ kKnobTypeHertz = 9 << 12, /* knob represents frequency */
+ kKnobTypeButton = 10 << 12 /* momentary trigger push button */
+};
+
+
+enum {
+ kUnknownKnobValue = 0x7FFFFFFF, /* a knob with this value means, we don't know it. */
+ kDefaultKnobValue = 0x7FFFFFFE /* used to SET a knob to its default value. */
+};
+
+
+struct KnobDescription {
+ Str63 name;
+ long lowValue;
+ long highValue;
+ long defaultValue; /* a default instrument is made of all default values */
+ long flags;
+ long knobID;
+};
+typedef struct KnobDescription KnobDescription;
+
+struct GCInstrumentData {
+ ToneDescription tone;
+ long knobCount;
+ long knob[1];
+};
+typedef struct GCInstrumentData GCInstrumentData;
+typedef GCInstrumentData * GCInstrumentDataPtr;
+typedef GCInstrumentDataPtr * GCInstrumentDataHandle;
+
+struct InstrumentAboutInfo {
+ PicHandle p;
+ Str255 author;
+ Str255 copyright;
+ Str255 other;
+};
+typedef struct InstrumentAboutInfo InstrumentAboutInfo;
+
+enum {
+ notImplementedMusicErr = (0x80000000 | (0xFFFF & (notImplementedMusicOSErr))),
+ cantSendToSynthesizerErr = (0x80000000 | (0xFFFF & (cantSendToSynthesizerOSErr))),
+ cantReceiveFromSynthesizerErr = (0x80000000 | (0xFFFF & (cantReceiveFromSynthesizerOSErr))),
+ illegalVoiceAllocationErr = (0x80000000 | (0xFFFF & (illegalVoiceAllocationOSErr))),
+ illegalPartErr = (0x80000000 | (0xFFFF & (illegalPartOSErr))),
+ illegalChannelErr = (0x80000000 | (0xFFFF & (illegalChannelOSErr))),
+ illegalKnobErr = (0x80000000 | (0xFFFF & (illegalKnobOSErr))),
+ illegalKnobValueErr = (0x80000000 | (0xFFFF & (illegalKnobValueOSErr))),
+ illegalInstrumentErr = (0x80000000 | (0xFFFF & (illegalInstrumentOSErr))),
+ illegalControllerErr = (0x80000000 | (0xFFFF & (illegalControllerOSErr))),
+ midiManagerAbsentErr = (0x80000000 | (0xFFFF & (midiManagerAbsentOSErr))),
+ synthesizerNotRespondingErr = (0x80000000 | (0xFFFF & (synthesizerNotRespondingOSErr))),
+ synthesizerErr = (0x80000000 | (0xFFFF & (synthesizerOSErr))),
+ illegalNoteChannelErr = (0x80000000 | (0xFFFF & (illegalNoteChannelOSErr))),
+ noteChannelNotAllocatedErr = (0x80000000 | (0xFFFF & (noteChannelNotAllocatedOSErr))),
+ tunePlayerFullErr = (0x80000000 | (0xFFFF & (tunePlayerFullOSErr))),
+ tuneParseErr = (0x80000000 | (0xFFFF & (tuneParseOSErr)))
+};
+
+enum {
+ kGetAtomicInstNoExpandedSamples = 1 << 0,
+ kGetAtomicInstNoOriginalSamples = 1 << 1,
+ kGetAtomicInstNoSamples = kGetAtomicInstNoExpandedSamples | kGetAtomicInstNoOriginalSamples,
+ kGetAtomicInstNoKnobList = 1 << 2,
+ kGetAtomicInstNoInstrumentInfo = 1 << 3,
+ kGetAtomicInstOriginalKnobList = 1 << 4,
+ kGetAtomicInstAllKnobs = 1 << 5 /* return even those that are set to default*/
+};
+
+/*
+ For non-gm instruments, instrument number of tone description == 0
+ If you want to speed up while running, slam the inst num with what Get instrument number returns
+ All missing knobs are slammed to the default value
+*/
+enum {
+ kSetAtomicInstKeepOriginalInstrument = 1 << 0,
+ kSetAtomicInstShareAcrossParts = 1 << 1, /* inst disappears when app goes away*/
+ kSetAtomicInstCallerTosses = 1 << 2, /* the caller isn't keeping a copy around (for NASetAtomicInstrument)*/
+ kSetAtomicInstCallerGuarantees = 1 << 3, /* the caller guarantees a copy is around*/
+ kSetAtomicInstInterruptSafe = 1 << 4, /* dont move memory at this time (but process at next task time)*/
+ kSetAtomicInstDontPreprocess = 1 << 7 /* perform no further preprocessing because either 1)you know the instrument is digitally clean, or 2) you got it from a GetPartAtomic*/
+};
+
+enum {
+ kInstrumentNamesModifiable = 1,
+ kInstrumentNamesBoth = 2
+};
+
+/*
+ * Structures specific to the GenericMusicComponent
+ */
+
+enum {
+ kGenericMusicComponentSubtype = FOUR_CHAR_CODE('gene')
+};
+
+
+struct GenericKnobDescription {
+ KnobDescription kd;
+ long hw1; /* driver defined */
+ long hw2; /* driver defined */
+ long hw3; /* driver defined */
+ long settingsID; /* resource ID list for boolean and popup names */
+};
+typedef struct GenericKnobDescription GenericKnobDescription;
+
+struct GenericKnobDescriptionList {
+ long knobCount;
+ GenericKnobDescription knob[1];
+};
+typedef struct GenericKnobDescriptionList GenericKnobDescriptionList;
+typedef GenericKnobDescriptionList * GenericKnobDescriptionListPtr;
+typedef GenericKnobDescriptionListPtr * GenericKnobDescriptionListHandle;
+/* knobTypes for MusicDerivedSetKnob */
+enum {
+ kGenericMusicKnob = 1,
+ kGenericMusicInstrumentKnob = 2,
+ kGenericMusicDrumKnob = 3,
+ kGenericMusicGlobalController = 4
+};
+
+
+
+enum {
+ kGenericMusicResFirst = 0,
+ kGenericMusicResMiscStringList = 1, /* STR# 1: synth name, 2:about author,3:aboutcopyright,4:aboutother */
+ kGenericMusicResMiscLongList = 2, /* Long various params, see list below */
+ kGenericMusicResInstrumentList = 3, /* NmLs of names and shorts, categories prefixed by 'oo' */
+ kGenericMusicResDrumList = 4, /* NmLs of names and shorts */
+ kGenericMusicResInstrumentKnobDescriptionList = 5, /* Knob */
+ kGenericMusicResDrumKnobDescriptionList = 6, /* Knob */
+ kGenericMusicResKnobDescriptionList = 7, /* Knob */
+ kGenericMusicResBitsLongList = 8, /* Long back to back bitmaps of controllers, gminstruments, and drums */
+ kGenericMusicResModifiableInstrumentHW = 9, /* Shrt same as the hw shorts trailing the instrument names, a shortlist */
+ kGenericMusicResGMTranslation = 10, /* Long 128 long entries, 1 for each gm inst, of local instrument numbers 1-n (not hw numbers) */
+ kGenericMusicResROMInstrumentData = 11, /* knob lists for ROM instruments, so the knob values may be known */
+ kGenericMusicResAboutPICT = 12, /* picture for aboutlist. must be present for GetAbout call to work */
+ kGenericMusicResLast = 13
+};
+
+/* elements of the misc long list */
+enum {
+ kGenericMusicMiscLongFirst = 0,
+ kGenericMusicMiscLongVoiceCount = 1,
+ kGenericMusicMiscLongPartCount = 2,
+ kGenericMusicMiscLongModifiableInstrumentCount = 3,
+ kGenericMusicMiscLongChannelMask = 4,
+ kGenericMusicMiscLongDrumPartCount = 5,
+ kGenericMusicMiscLongModifiableDrumCount = 6,
+ kGenericMusicMiscLongDrumChannelMask = 7,
+ kGenericMusicMiscLongOutputCount = 8,
+ kGenericMusicMiscLongLatency = 9,
+ kGenericMusicMiscLongFlags = 10,
+ kGenericMusicMiscLongFirstGMHW = 11, /* number to add to locate GM main instruments */
+ kGenericMusicMiscLongFirstGMDrumHW = 12, /* number to add to locate GM drumkits */
+ kGenericMusicMiscLongFirstUserHW = 13, /* First hw number of user instruments (presumed sequential) */
+ kGenericMusicMiscLongLast = 14
+};
+
+
+struct GCPart {
+ long hwInstrumentNumber; /* internal number of recalled instrument */
+ short controller[128]; /* current values for all controllers */
+ long volume; /* ctrl 7 is special case */
+ long polyphony;
+ long midiChannel; /* 1-16 if in use */
+ GCInstrumentData id; /* ToneDescription & knoblist, uncertain length */
+};
+typedef struct GCPart GCPart;
+/*
+ * Calls specific to the GenericMusicComponent
+ */
+enum {
+ kMusicGenericRange = 0x0100,
+ kMusicDerivedRange = 0x0200
+};
+
+/*
+ * Flags in GenericMusicConfigure call
+ */
+enum {
+ kGenericMusicDoMIDI = 1 << 0, /* implement normal MIDI messages for note, controllers, and program changes 0-127 */
+ kGenericMusicBank0 = 1 << 1, /* implement instrument bank changes on controller 0 */
+ kGenericMusicBank32 = 1 << 2, /* implement instrument bank changes on controller 32 */
+ kGenericMusicErsatzMIDI = 1 << 3, /* construct MIDI packets, but send them to the derived component */
+ kGenericMusicCallKnobs = 1 << 4, /* call the derived component with special knob format call */
+ kGenericMusicCallParts = 1 << 5, /* call the derived component with special part format call */
+ kGenericMusicCallInstrument = 1 << 6, /* call MusicDerivedSetInstrument for MusicSetInstrument calls */
+ kGenericMusicCallNumber = 1 << 7, /* call MusicDerivedSetPartInstrumentNumber for MusicSetPartInstrumentNumber calls, & don't send any C0 or bank stuff */
+ kGenericMusicCallROMInstrument = 1 << 8, /* call MusicSetInstrument for MusicSetPartInstrumentNumber for "ROM" instruments, passing params from the ROMi resource */
+ kGenericMusicAllDefaults = 1 << 9 /* indicates that when a new instrument is recalled, all knobs are reset to DEFAULT settings. True for GS modules */
+};
+
+
+
+
+
+typedef CALLBACK_API( ComponentResult , MusicOfflineDataProcPtr )(Ptr SoundData, long numBytes, long myRefCon);
+typedef STACK_UPP_TYPE(MusicOfflineDataProcPtr) MusicOfflineDataUPP;
+
+struct OfflineSampleType {
+ unsigned long numChannels; /*number of channels, ie mono = 1*/
+ UnsignedFixed sampleRate; /*sample rate in Apples Fixed point representation*/
+ unsigned short sampleSize; /*number of bits in sample*/
+};
+typedef struct OfflineSampleType OfflineSampleType;
+
+struct InstrumentInfoRecord {
+ long instrumentNumber; /* instrument number (if 0, name is a catagory)*/
+ long flags; /* show in picker, etc.*/
+ long toneNameIndex; /* index in toneNames (1 based)*/
+ long itxtNameAtomID; /* index in itxtNames (itxt/name by index)*/
+};
+typedef struct InstrumentInfoRecord InstrumentInfoRecord;
+
+struct InstrumentInfoList {
+ long recordCount;
+ Handle toneNames; /* name from tone description*/
+ QTAtomContainer itxtNames; /* itxt/name atoms for instruments*/
+ InstrumentInfoRecord info[1];
+};
+typedef struct InstrumentInfoList InstrumentInfoList;
+typedef InstrumentInfoList * InstrumentInfoListPtr;
+typedef InstrumentInfoListPtr * InstrumentInfoListHandle;
+EXTERN_API( ComponentResult )
+MusicGetDescription (MusicComponent mc,
+ SynthesizerDescription * sd) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0001, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicGetPart (MusicComponent mc,
+ long part,
+ long * midiChannel,
+ long * polyphony) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0002, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicSetPart (MusicComponent mc,
+ long part,
+ long midiChannel,
+ long polyphony) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0003, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicSetPartInstrumentNumber (MusicComponent mc,
+ long part,
+ long instrumentNumber) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0004, 0x7000, 0xA82A);
+
+#if OLDROUTINENAMES
+#define MusicSetInstrumentNumber(ci,part,instrumentNumber) MusicSetPartInstrumentNumber(ci, part,instrumentNumber)
+#endif
+
+EXTERN_API( ComponentResult )
+MusicGetPartInstrumentNumber (MusicComponent mc,
+ long part) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0005, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicStorePartInstrument (MusicComponent mc,
+ long part,
+ long instrumentNumber) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0006, 0x7000, 0xA82A);
+
+
+EXTERN_API( ComponentResult )
+MusicGetPartAtomicInstrument (MusicComponent mc,
+ long part,
+ AtomicInstrument * ai,
+ long flags) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0009, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicSetPartAtomicInstrument (MusicComponent mc,
+ long part,
+ AtomicInstrumentPtr aiP,
+ long flags) FIVEWORDINLINE(0x2F3C, 0x000C, 0x000A, 0x7000, 0xA82A);
+
+
+/* Obsolete calls*/
+EXTERN_API( ComponentResult )
+MusicGetInstrumentKnobDescriptionObsolete (MusicComponent mc,
+ long knobIndex,
+ void * mkd) FIVEWORDINLINE(0x2F3C, 0x0008, 0x000D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicGetDrumKnobDescriptionObsolete (MusicComponent mc,
+ long knobIndex,
+ void * mkd) FIVEWORDINLINE(0x2F3C, 0x0008, 0x000E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicGetKnobDescriptionObsolete (MusicComponent mc,
+ long knobIndex,
+ void * mkd) FIVEWORDINLINE(0x2F3C, 0x0008, 0x000F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicGetPartKnob (MusicComponent mc,
+ long part,
+ long knobID) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0010, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicSetPartKnob (MusicComponent mc,
+ long part,
+ long knobID,
+ long knobValue) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0011, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicGetKnob (MusicComponent mc,
+ long knobID) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0012, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicSetKnob (MusicComponent mc,
+ long knobID,
+ long knobValue) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0013, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicGetPartName (MusicComponent mc,
+ long part,
+ StringPtr name) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0014, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicSetPartName (MusicComponent mc,
+ long part,
+ StringPtr name) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0015, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicFindTone (MusicComponent mc,
+ ToneDescription * td,
+ long * libraryIndexOut,
+ unsigned long * fit) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0016, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicPlayNote (MusicComponent mc,
+ long part,
+ long pitch,
+ long velocity) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0017, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicResetPart (MusicComponent mc,
+ long part) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0018, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicSetPartController (MusicComponent mc,
+ long part,
+ MusicController controllerNumber,
+ long controllerValue) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0019, 0x7000, 0xA82A);
+
+#if OLDROUTINENAMES
+#define MusicSetController(ci,part,controllerNumber,controllerValue) MusicSetPartController(ci, part,controllerNumber,controllerValue)
+#endif
+
+EXTERN_API( ComponentResult )
+MusicGetPartController (MusicComponent mc,
+ long part,
+ MusicController controllerNumber) FIVEWORDINLINE(0x2F3C, 0x0008, 0x001A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicGetMIDIProc (MusicComponent mc,
+ MusicMIDISendUPP * midiSendProc,
+ long * refCon) FIVEWORDINLINE(0x2F3C, 0x0008, 0x001B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicSetMIDIProc (MusicComponent mc,
+ MusicMIDISendUPP midiSendProc,
+ long refCon) FIVEWORDINLINE(0x2F3C, 0x0008, 0x001C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicGetInstrumentNames (MusicComponent mc,
+ long modifiableInstruments,
+ Handle * instrumentNames,
+ Handle * instrumentCategoryLasts,
+ Handle * instrumentCategoryNames) FIVEWORDINLINE(0x2F3C, 0x0010, 0x001D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicGetDrumNames (MusicComponent mc,
+ long modifiableInstruments,
+ Handle * instrumentNumbers,
+ Handle * instrumentNames) FIVEWORDINLINE(0x2F3C, 0x000C, 0x001E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicGetMasterTune (MusicComponent mc) FIVEWORDINLINE(0x2F3C, 0x0000, 0x001F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicSetMasterTune (MusicComponent mc,
+ long masterTune) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0020, 0x7000, 0xA82A);
+
+
+EXTERN_API( ComponentResult )
+MusicGetInstrumentAboutInfo (MusicComponent mc,
+ long part,
+ InstrumentAboutInfo * iai) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0022, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicGetDeviceConnection (MusicComponent mc,
+ long index,
+ long * id1,
+ long * id2) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0023, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicUseDeviceConnection (MusicComponent mc,
+ long id1,
+ long id2) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0024, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicGetKnobSettingStrings (MusicComponent mc,
+ long knobIndex,
+ long isGlobal,
+ Handle * settingsNames,
+ Handle * settingsCategoryLasts,
+ Handle * settingsCategoryNames) FIVEWORDINLINE(0x2F3C, 0x0014, 0x0025, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicGetMIDIPorts (MusicComponent mc,
+ long * inputPortCount,
+ long * outputPortCount) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0026, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicSendMIDI (MusicComponent mc,
+ long portIndex,
+ MusicMIDIPacket * mp) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0027, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicReceiveMIDI (MusicComponent mc,
+ MusicMIDIReadHookUPP readHook,
+ long refCon) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0028, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicStartOffline (MusicComponent mc,
+ unsigned long * numChannels,
+ UnsignedFixed * sampleRate,
+ unsigned short * sampleSize,
+ MusicOfflineDataUPP dataProc,
+ long dataProcRefCon) FIVEWORDINLINE(0x2F3C, 0x0014, 0x0029, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicSetOfflineTimeTo (MusicComponent mc,
+ long newTimeStamp) FIVEWORDINLINE(0x2F3C, 0x0004, 0x002A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicGetInstrumentKnobDescription (MusicComponent mc,
+ long knobIndex,
+ KnobDescription * mkd) FIVEWORDINLINE(0x2F3C, 0x0008, 0x002B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicGetDrumKnobDescription (MusicComponent mc,
+ long knobIndex,
+ KnobDescription * mkd) FIVEWORDINLINE(0x2F3C, 0x0008, 0x002C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicGetKnobDescription (MusicComponent mc,
+ long knobIndex,
+ KnobDescription * mkd) FIVEWORDINLINE(0x2F3C, 0x0008, 0x002D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicGetInfoText (MusicComponent mc,
+ long selector,
+ Handle * textH,
+ Handle * styleH) FIVEWORDINLINE(0x2F3C, 0x000C, 0x002E, 0x7000, 0xA82A);
+
+enum {
+ kGetInstrumentInfoNoBuiltIn = 1 << 0,
+ kGetInstrumentInfoMidiUserInst = 1 << 1,
+ kGetInstrumentInfoNoIText = 1 << 2
+};
+
+EXTERN_API( ComponentResult )
+MusicGetInstrumentInfo (MusicComponent mc,
+ long getInstrumentInfoFlags,
+ InstrumentInfoListHandle * infoListH) FIVEWORDINLINE(0x2F3C, 0x0008, 0x002F, 0x7000, 0xA82A);
+
+
+
+
+EXTERN_API( ComponentResult )
+MusicTask (MusicComponent mc) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0031, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicSetPartInstrumentNumberInterruptSafe (MusicComponent mc,
+ long part,
+ long instrumentNumber) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0032, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicSetPartSoundLocalization (MusicComponent mc,
+ long part,
+ Handle data) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0033, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicGenericConfigure (MusicComponent mc,
+ long mode,
+ long flags,
+ long baseResID) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0100, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicGenericGetPart (MusicComponent mc,
+ long partNumber,
+ GCPart ** part) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0101, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicGenericGetKnobList (MusicComponent mc,
+ long knobType,
+ GenericKnobDescriptionListHandle * gkdlH) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0102, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicGenericSetResourceNumbers (MusicComponent mc,
+ Handle resourceIDH) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0103, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicDerivedMIDISend (MusicComponent mc,
+ MusicMIDIPacket * packet) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0200, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicDerivedSetKnob (MusicComponent mc,
+ long knobType,
+ long knobNumber,
+ long knobValue,
+ long partNumber,
+ GCPart * p,
+ GenericKnobDescription * gkd) FIVEWORDINLINE(0x2F3C, 0x0018, 0x0201, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicDerivedSetPart (MusicComponent mc,
+ long partNumber,
+ GCPart * p) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0202, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicDerivedSetInstrument (MusicComponent mc,
+ long partNumber,
+ GCPart * p) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0203, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicDerivedSetPartInstrumentNumber (MusicComponent mc,
+ long partNumber,
+ GCPart * p) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0204, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicDerivedSetMIDI (MusicComponent mc,
+ MusicMIDISendUPP midiProc,
+ long refcon,
+ long midiChannel) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0205, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicDerivedStorePartInstrument (MusicComponent mc,
+ long partNumber,
+ GCPart * p,
+ long instrumentNumber) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0206, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicDerivedOpenResFile (MusicComponent mc) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0207, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+MusicDerivedCloseResFile (MusicComponent mc,
+ short resRefNum) FIVEWORDINLINE(0x2F3C, 0x0002, 0x0208, 0x7000, 0xA82A);
+
+
+
+
+
+
+/* Mask bit for returned value by InstrumentFind.*/
+enum {
+ kInstrumentExactMatch = 0x00020000,
+ kInstrumentRecommendedSubstitute = 0x00010000,
+ kInstrumentQualityField = (long)0xFF000000,
+ kInstrumentRoland8BitQuality = 0x05000000
+};
+
+
+typedef InstrumentAboutInfo * InstrumentAboutInfoPtr;
+typedef InstrumentAboutInfoPtr * InstrumentAboutInfoHandle;
+
+struct GMInstrumentInfo {
+ long cmpInstID;
+ long gmInstNum;
+ long instMatch;
+};
+typedef struct GMInstrumentInfo GMInstrumentInfo;
+typedef GMInstrumentInfo * GMInstrumentInfoPtr;
+typedef GMInstrumentInfoPtr * GMInstrumentInfoHandle;
+
+struct nonGMInstrumentInfoRecord {
+ long cmpInstID; /* if 0, category name*/
+ long flags; /* match, show in picker*/
+ long toneNameIndex; /* index in toneNames (1 based)*/
+ long itxtNameAtomID; /* index in itxtNames (itxt/name by index)*/
+};
+typedef struct nonGMInstrumentInfoRecord nonGMInstrumentInfoRecord;
+
+struct nonGMInstrumentInfo {
+ long recordCount;
+ Handle toneNames; /* name from tone description*/
+ QTAtomContainer itxtNames; /* itext/name atoms for instruments*/
+ nonGMInstrumentInfoRecord instInfo[1];
+};
+typedef struct nonGMInstrumentInfo nonGMInstrumentInfo;
+typedef nonGMInstrumentInfo * nonGMInstrumentInfoPtr;
+typedef nonGMInstrumentInfoPtr * nonGMInstrumentInfoHandle;
+
+struct InstCompInfo {
+ long infoSize; /* size of this record*/
+ Str31 InstrumentLibraryName;
+ QTAtomContainer InstrumentLibraryITxt; /* itext/name atoms for instruments*/
+ long GMinstrumentCount;
+ GMInstrumentInfoHandle GMinstrumentInfo;
+ long GMdrumCount;
+ GMInstrumentInfoHandle GMdrumInfo;
+ long nonGMinstrumentCount;
+ nonGMInstrumentInfoHandle nonGMinstrumentInfo;
+};
+typedef struct InstCompInfo InstCompInfo;
+typedef InstCompInfo * InstCompInfoPtr;
+typedef InstCompInfoPtr * InstCompInfoHandle;
+EXTERN_API( ComponentResult )
+InstrumentGetInst (ComponentInstance ci,
+ long instID,
+ AtomicInstrument * atomicInst,
+ long flags) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0001, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+InstrumentGetInfo (ComponentInstance ci,
+ long getInstrumentInfoFlags,
+ InstCompInfoHandle * instInfo) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0002, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+InstrumentInitialize (ComponentInstance ci,
+ long initFormat,
+ void * initParams) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0003, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+InstrumentOpenComponentResFile (ComponentInstance ci,
+ short * resFile) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0004, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+InstrumentCloseComponentResFile (ComponentInstance ci,
+ short resFile) FIVEWORDINLINE(0x2F3C, 0x0002, 0x0005, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+InstrumentGetComponentRefCon (ComponentInstance ci,
+ void ** refCon) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0006, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+InstrumentSetComponentRefCon (ComponentInstance ci,
+ void * refCon) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0007, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+InstrumentGetSynthesizerType (ComponentInstance ci,
+ OSType * synthesizerType) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0008, 0x7000, 0xA82A);
+
+
+
+/*--------------------------
+ Types
+--------------------------*/
+enum {
+ kNoteRequestNoGM = 1, /* dont degrade to a GM synth */
+ kNoteRequestNoSynthType = 2, /* dont degrade to another synth of same type but different name */
+ kNoteRequestSynthMustMatch = 4 /* synthType must be a match, including kGMSynthComponentSubType */
+};
+
+
+enum {
+ kNoteRequestSpecifyMIDIChannel = 0x80
+};
+
+
+typedef ComponentInstance NoteAllocator;
+/*
+ The midiChannelAssignment field of this structure is used to assign a MIDI channel
+ when a NoteChannel is created from a NoteRequest.
+ A value of 0 indicates a MIDI channel has *not* been assigned
+ A value of (kNoteRequestSpecifyMIDIChannel | 1->16) is a MIDI channel assignment
+*/
+typedef UInt8 NoteRequestMIDIChannel;
+
+struct NoteRequestInfo {
+ UInt8 flags; /* 1: dont accept GM match, 2: dont accept same-synth-type match */
+ NoteRequestMIDIChannel midiChannelAssignment; /* (kNoteRequestSpecifyMIDIChannel | 1->16) as MIDI Channel assignement or zero - see notes above */
+ BigEndianShort polyphony; /* Maximum number of voices */
+ BigEndianFixed typicalPolyphony; /* Hint for level mixing */
+};
+typedef struct NoteRequestInfo NoteRequestInfo;
+
+struct NoteRequest {
+ NoteRequestInfo info;
+ ToneDescription tone;
+};
+typedef struct NoteRequest NoteRequest;
+typedef struct OpaqueNoteChannel* NoteChannel;
+
+
+enum {
+ kPickDontMix = 1, /* dont mix instruments with drum sounds */
+ kPickSameSynth = 2, /* only allow the same device that went in, to come out */
+ kPickUserInsts = 4, /* show user insts in addition to ROM voices */
+ kPickEditAllowEdit = 8, /* lets user switch over to edit mode */
+ kPickEditAllowPick = 16, /* lets the user switch over to pick mode */
+ kPickEditSynthGlobal = 32, /* edit the global knobs of the synth */
+ kPickEditControllers = 64 /* edit the controllers of the notechannel */
+};
+
+
+enum {
+ kNoteAllocatorComponentType = FOUR_CHAR_CODE('nota')
+};
+
+
+/*--------------------------------
+ Note Allocator Prototypes
+--------------------------------*/
+EXTERN_API( ComponentResult )
+NARegisterMusicDevice (NoteAllocator na,
+ OSType synthType,
+ Str31 name,
+ SynthesizerConnections * connections) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0000, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+NAUnregisterMusicDevice (NoteAllocator na,
+ long index) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0001, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+NAGetRegisteredMusicDevice (NoteAllocator na,
+ long index,
+ OSType * synthType,
+ Str31 name,
+ SynthesizerConnections * connections,
+ MusicComponent * mc) FIVEWORDINLINE(0x2F3C, 0x0014, 0x0002, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+NASaveMusicConfiguration (NoteAllocator na) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0003, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+NANewNoteChannel (NoteAllocator na,
+ NoteRequest * noteRequest,
+ NoteChannel * outChannel) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0004, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+NADisposeNoteChannel (NoteAllocator na,
+ NoteChannel noteChannel) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0005, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+NAGetNoteChannelInfo (NoteAllocator na,
+ NoteChannel noteChannel,
+ long * index,
+ long * part) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0006, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+NAPrerollNoteChannel (NoteAllocator na,
+ NoteChannel noteChannel) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0007, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+NAUnrollNoteChannel (NoteAllocator na,
+ NoteChannel noteChannel) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0008, 0x7000, 0xA82A);
+
+
+EXTERN_API( ComponentResult )
+NASetNoteChannelVolume (NoteAllocator na,
+ NoteChannel noteChannel,
+ Fixed volume) FIVEWORDINLINE(0x2F3C, 0x0008, 0x000B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+NAResetNoteChannel (NoteAllocator na,
+ NoteChannel noteChannel) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+NAPlayNote (NoteAllocator na,
+ NoteChannel noteChannel,
+ long pitch,
+ long velocity) FIVEWORDINLINE(0x2F3C, 0x000C, 0x000D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+NASetController (NoteAllocator na,
+ NoteChannel noteChannel,
+ long controllerNumber,
+ long controllerValue) FIVEWORDINLINE(0x2F3C, 0x000C, 0x000E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+NASetKnob (NoteAllocator na,
+ NoteChannel noteChannel,
+ long knobNumber,
+ long knobValue) FIVEWORDINLINE(0x2F3C, 0x000C, 0x000F, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+NAFindNoteChannelTone (NoteAllocator na,
+ NoteChannel noteChannel,
+ ToneDescription * td,
+ long * instrumentNumber) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0010, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+NASetInstrumentNumber (NoteAllocator na,
+ NoteChannel noteChannel,
+ long instrumentNumber) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0011, 0x7000, 0xA82A);
+
+
+
+#if OLDROUTINENAMES
+#define NASetNoteChannelInstrument(ci, noteChannel,instrumentNumber ) NASetInstrumentNumber(ci, noteChannel,instrumentNumber)
+#define NASetInstrument(ci, noteChannel,instrumentNumber ) NASetInstrumentNumber(ci, noteChannel,instrumentNumber)
+#endif
+EXTERN_API( ComponentResult )
+NAPickInstrument (NoteAllocator na,
+ ModalFilterUPP filterProc,
+ StringPtr prompt,
+ ToneDescription * sd,
+ unsigned long flags,
+ long refCon,
+ long reserved1,
+ long reserved2) FIVEWORDINLINE(0x2F3C, 0x001C, 0x0012, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+NAPickArrangement (NoteAllocator na,
+ ModalFilterUPP filterProc,
+ StringPtr prompt,
+ long zero1,
+ long zero2,
+ Track t,
+ StringPtr songName) FIVEWORDINLINE(0x2F3C, 0x0018, 0x0013, 0x7000, 0xA82A);
+
+
+EXTERN_API( ComponentResult )
+NASetDefaultMIDIInput (NoteAllocator na,
+ SynthesizerConnections * sc) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0015, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+NAGetDefaultMIDIInput (NoteAllocator na,
+ SynthesizerConnections * sc) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0016, 0x7000, 0xA82A);
+
+
+EXTERN_API( ComponentResult )
+NAUseDefaultMIDIInput (NoteAllocator na,
+ MusicMIDIReadHookUPP readHook,
+ long refCon,
+ unsigned long flags) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0019, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+NALoseDefaultMIDIInput (NoteAllocator na) FIVEWORDINLINE(0x2F3C, 0x0000, 0x001A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+NAStuffToneDescription (NoteAllocator na,
+ long gmNumber,
+ ToneDescription * td) FIVEWORDINLINE(0x2F3C, 0x0008, 0x001B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+NACopyrightDialog (NoteAllocator na,
+ PicHandle p,
+ StringPtr author,
+ StringPtr copyright,
+ StringPtr other,
+ StringPtr title,
+ ModalFilterUPP filterProc,
+ long refCon) FIVEWORDINLINE(0x2F3C, 0x001C, 0x001C, 0x7000, 0xA82A);
+
+
+/*
+ kNADummyOneSelect = 29
+ kNADummyTwoSelect = 30
+*/
+
+EXTERN_API( ComponentResult )
+NAGetIndNoteChannel (NoteAllocator na,
+ long index,
+ NoteChannel * nc,
+ long * seed) FIVEWORDINLINE(0x2F3C, 0x000C, 0x001F, 0x7000, 0xA82A);
+
+
+EXTERN_API( ComponentResult )
+NAGetMIDIPorts (NoteAllocator na,
+ QTMIDIPortListHandle * inputPorts,
+ QTMIDIPortListHandle * outputPorts) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0021, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+NAGetNoteRequest (NoteAllocator na,
+ NoteChannel noteChannel,
+ NoteRequest * nrOut) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0022, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+NASendMIDI (NoteAllocator na,
+ NoteChannel noteChannel,
+ MusicMIDIPacket * mp) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0023, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+NAPickEditInstrument (NoteAllocator na,
+ ModalFilterUPP filterProc,
+ StringPtr prompt,
+ long refCon,
+ NoteChannel nc,
+ AtomicInstrument ai,
+ long flags) FIVEWORDINLINE(0x2F3C, 0x0018, 0x0024, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+NANewNoteChannelFromAtomicInstrument (NoteAllocator na,
+ AtomicInstrumentPtr instrument,
+ long flags,
+ NoteChannel * outChannel) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0025, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+NASetAtomicInstrument (NoteAllocator na,
+ NoteChannel noteChannel,
+ AtomicInstrumentPtr instrument,
+ long flags) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0026, 0x7000, 0xA82A);
+
+
+
+EXTERN_API( ComponentResult )
+NAGetKnob (NoteAllocator na,
+ NoteChannel noteChannel,
+ long knobNumber,
+ long * knobValue) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0028, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+NATask (NoteAllocator na) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0029, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+NASetNoteChannelBalance (NoteAllocator na,
+ NoteChannel noteChannel,
+ long balance) FIVEWORDINLINE(0x2F3C, 0x0008, 0x002A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+NASetInstrumentNumberInterruptSafe (NoteAllocator na,
+ NoteChannel noteChannel,
+ long instrumentNumber) FIVEWORDINLINE(0x2F3C, 0x0008, 0x002B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+NASetNoteChannelSoundLocalization (NoteAllocator na,
+ NoteChannel noteChannel,
+ Handle data) FIVEWORDINLINE(0x2F3C, 0x0008, 0x002C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+NAGetController (NoteAllocator na,
+ NoteChannel noteChannel,
+ long controllerNumber,
+ long * controllerValue) FIVEWORDINLINE(0x2F3C, 0x000C, 0x002D, 0x7000, 0xA82A);
+
+
+
+
+
+enum {
+ kTuneQueueDepth = 8 /* Deepest you can queue tune segments */
+};
+
+
+
+struct TuneStatus {
+ unsigned long * tune; /* currently playing tune */
+ unsigned long * tunePtr; /* position within currently playing piece */
+ TimeValue time; /* current tune time */
+ short queueCount; /* how many pieces queued up? */
+ short queueSpots; /* How many more tunepieces can be queued */
+ TimeValue queueTime; /* How much time is queued up? (can be very inaccurate) */
+ long reserved[3];
+};
+typedef struct TuneStatus TuneStatus;
+typedef CALLBACK_API( void , TuneCallBackProcPtr )(const TuneStatus *status, long refCon);
+typedef CALLBACK_API( void , TunePlayCallBackProcPtr )(unsigned long *event, long seed, long refCon);
+typedef STACK_UPP_TYPE(TuneCallBackProcPtr) TuneCallBackUPP;
+typedef STACK_UPP_TYPE(TunePlayCallBackProcPtr) TunePlayCallBackUPP;
+
+typedef ComponentInstance TunePlayer;
+enum {
+ kTunePlayerComponentType = FOUR_CHAR_CODE('tune')
+};
+
+
+EXTERN_API( ComponentResult )
+TuneSetHeader (TunePlayer tp,
+ unsigned long * header) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0004, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TuneGetTimeBase (TunePlayer tp,
+ TimeBase * tb) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0005, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TuneSetTimeScale (TunePlayer tp,
+ TimeScale scale) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0006, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TuneGetTimeScale (TunePlayer tp,
+ TimeScale * scale) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0007, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TuneGetIndexedNoteChannel (TunePlayer tp,
+ long i,
+ NoteChannel * nc) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0008, 0x7000, 0xA82A);
+
+
+/* Values for when to start. */
+enum {
+ kTuneStartNow = 1, /* start after buffer is implied */
+ kTuneDontClipNotes = 2, /* allow notes to finish their durations outside sample */
+ kTuneExcludeEdgeNotes = 4, /* dont play notes that start at end of tune */
+ kTuneQuickStart = 8, /* Leave all the controllers where they are, ignore start time */
+ kTuneLoopUntil = 16, /* loop a queued tune if there's nothing else in the queue*/
+ kTunePlayDifference = 32, /* by default, the tune difference is skipped*/
+ kTunePlayConcurrent = 64, /* dont block the next tune sequence with this one*/
+ kTuneStartNewMaster = 16384
+};
+
+EXTERN_API( ComponentResult )
+TuneQueue (TunePlayer tp,
+ unsigned long * tune,
+ Fixed tuneRate,
+ unsigned long tuneStartPosition,
+ unsigned long tuneStopPosition,
+ unsigned long queueFlags,
+ TuneCallBackUPP callBackProc,
+ long refCon) FIVEWORDINLINE(0x2F3C, 0x001C, 0x000A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TuneInstant (TunePlayer tp,
+ unsigned long * tune,
+ unsigned long tunePosition) FIVEWORDINLINE(0x2F3C, 0x0008, 0x000B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TuneGetStatus (TunePlayer tp,
+ TuneStatus * status) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000C, 0x7000, 0xA82A);
+
+/* Values for stopping. */
+enum {
+ kTuneStopFade = 1, /* do a quick, synchronous fadeout */
+ kTuneStopSustain = 2, /* don't silece notes */
+ kTuneStopInstant = 4, /* silence notes fast (else, decay them) */
+ kTuneStopReleaseChannels = 8 /* afterwards, let the channels go */
+};
+
+EXTERN_API( ComponentResult )
+TuneStop (TunePlayer tp,
+ long stopFlags) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000D, 0x7000, 0xA82A);
+
+
+EXTERN_API( ComponentResult )
+TuneSetVolume (TunePlayer tp,
+ Fixed volume) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0010, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TuneGetVolume (TunePlayer tp) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0011, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TunePreroll (TunePlayer tp) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0012, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TuneUnroll (TunePlayer tp) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0013, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TuneSetNoteChannels (TunePlayer tp,
+ unsigned long count,
+ NoteChannel * noteChannelList,
+ TunePlayCallBackUPP playCallBackProc,
+ long refCon) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0014, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TuneSetPartTranspose (TunePlayer tp,
+ unsigned long part,
+ long transpose,
+ long velocityShift) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0015, 0x7000, 0xA82A);
+
+
+EXTERN_API( NoteAllocator )
+TuneGetNoteAllocator (TunePlayer tp) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0017, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TuneSetSofter (TunePlayer tp,
+ long softer) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0018, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TuneTask (TunePlayer tp) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0019, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TuneSetBalance (TunePlayer tp,
+ long balance) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001A, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TuneSetSoundLocalization (TunePlayer tp,
+ Handle data) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TuneSetHeaderWithSize (TunePlayer tp,
+ unsigned long * header,
+ unsigned long size) FIVEWORDINLINE(0x2F3C, 0x0008, 0x001C, 0x7000, 0xA82A);
+
+/* flags for part mix. */
+enum {
+ kTuneMixMute = 1, /* disable a part */
+ kTuneMixSolo = 2 /* if any parts soloed, play only soloed parts */
+};
+
+
+EXTERN_API( ComponentResult )
+TuneSetPartMix (TunePlayer tp,
+ unsigned long partNumber,
+ long volume,
+ long balance,
+ long mixFlags) FIVEWORDINLINE(0x2F3C, 0x0010, 0x001D, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TuneGetPartMix (TunePlayer tp,
+ unsigned long partNumber,
+ long * volumeOut,
+ long * balanceOut,
+ long * mixFlagsOut) FIVEWORDINLINE(0x2F3C, 0x0010, 0x001E, 0x7000, 0xA82A);
+
+
+
+
+
+typedef unsigned long MusicOpWord;
+typedef MusicOpWord * MusicOpWordPtr;
+/* QuickTime Music Track Event Formats:
+
+ At this time, QuickTime music tracks support 5 different event types -- REST events,
+ short NOTE events, short CONTROL events, short GENERAL events, Long NOTE events,
+ long CONTROL events, and variable GENERAL events.
+
+ o REST Event (4 bytes/event):
+
+ (0 0 0) (5-bit UNUSED) (24-bit Rest Duration)
+
+ o.Short NOTE Events (4 bytes/event):
+
+ (0 0 1) (5-bit Part) (6-bit Pitch) (7-bit Volume) (11-bit Duration)
+
+ where: Pitch is offset by 32 (Actual pitch = pitch field + 32)
+
+ o.Short CONTROL Events (4 bytes/event):
+
+ (0 1 0) (5-bit Part) (8-bit Controller) (1-bit UNUSED) (1-bit Sign) (7-bit MSB) (7-bit LSB)
+ ( or 15-bit Signed Value)
+ o Short GENERAL Event (4 bytes/event):
+
+ (0 1 1) (1-bit UNUSED) (12-bit Sub-Type) (16-bit Value)
+
+ o Long NOTE Events (8 bytes/event):
+
+ (1 0 0 1) (12-bit Part) (1-bit UNUSED) (7-bit Pitch) (1-bit UNUSED) (7-bit Volume)
+ (1 0) (8-bit UNUSED) (22-bit Duration)
+
+ o.Long CONTROL Event (8 bytes/event):
+
+ (1 0 1 0) (12-bit Part) (16-bit Value MSB)
+ (1 0) (14-bit Controller) (16-bit Value LSB)
+
+ o.Long KNOB Event (8 bytes/event):
+
+ (1 0 1 1) (12-bit Sub-Type) (16-bit Value MSB)
+ (1 0) (14-bit KNOB) (16-bit Value LSB)
+
+ o.Variable GENERAL Length Events (N bytes/event):
+
+ (1 1 1 1) (12-bit Sub-Type) (16-bit Length)
+ :
+ (32-bit Data values)
+ :
+ (1 1) (14-bit UNUSED) (16-bit Length)
+
+ where: Length field is the number of LONG words in the record.
+ Lengths include the first and last long words (Minimum length = 2)
+
+ The following event type values have not been used yet and are reserved for
+ future expansion:
+
+ o (1 0 0 0) (8 bytes/event)
+ o (1 1 0 0) (N bytes/event)
+ o (1 1 0 1) (N bytes/event)
+ o (1 1 1 0) (N bytes/event)
+
+ For all events, the following generalizations apply:
+
+ - All duration values are specified in Millisecond units.
+ - Pitch values are intended to map directly to the MIDI key numbers.
+ - Controllers from 0 to 127 correspond to the standard MIDI controllers.
+ Controllers greater than 127 correspond to other controls (i.e., Pitch Bend,
+ Key Pressure, and Channel Pressure).
+*/
+
+/* Defines for the implemented music event data fields*/
+enum {
+ kRestEventType = 0x00000000, /* lower 3-bits */
+ kNoteEventType = 0x00000001, /* lower 3-bits */
+ kControlEventType = 0x00000002, /* lower 3-bits */
+ kMarkerEventType = 0x00000003, /* lower 3-bits */
+ kUndefined1EventType = 0x00000008, /* 4-bits */
+ kXNoteEventType = 0x00000009, /* 4-bits */
+ kXControlEventType = 0x0000000A, /* 4-bits */
+ kKnobEventType = 0x0000000B, /* 4-bits */
+ kUndefined2EventType = 0x0000000C, /* 4-bits */
+ kUndefined3EventType = 0x0000000D, /* 4-bits */
+ kUndefined4EventType = 0x0000000E, /* 4-bits */
+ kGeneralEventType = 0x0000000F, /* 4-bits */
+ kXEventLengthBits = 0x00000002, /* 2 bits: indicates 8-byte event record */
+ kGeneralEventLengthBits = 0x00000003, /* 2 bits: indicates variable length event record */
+ kEventLen = 1L, /* length of events in long words */
+ kXEventLen = 2L,
+ kRestEventLen = kEventLen, /* length of events in long words */
+ kNoteEventLen = kEventLen,
+ kControlEventLen = kEventLen,
+ kMarkerEventLen = kEventLen,
+ kXNoteEventLen = kXEventLen,
+ kXControlEventLen = kXEventLen,
+ kGeneralEventLen = kXEventLen, /* 2 or more, however */
+ /* Universal Event Defines*/
+ kEventLengthFieldPos = 30, /* by looking at these two bits of the 1st or last word */
+ kEventLengthFieldWidth = 2, /* of an event you can determine the event length */
+ /* length field: 0 & 1 => 1 long; 2 => 2 longs; 3 => variable length */
+ kEventTypeFieldPos = 29, /* event type field for short events */
+ kEventTypeFieldWidth = 3, /* short type is 3 bits */
+ kXEventTypeFieldPos = 28, /* event type field for extended events */
+ kXEventTypeFieldWidth = 4, /* extended type is 4 bits */
+ kEventPartFieldPos = 24,
+ kEventPartFieldWidth = 5,
+ kXEventPartFieldPos = 16, /* in the 1st long word */
+ kXEventPartFieldWidth = 12, /* Rest Events*/
+ kRestEventDurationFieldPos = 0,
+ kRestEventDurationFieldWidth = 24,
+ kRestEventDurationMax = ((1L << kRestEventDurationFieldWidth) - 1), /* Note Events*/
+ kNoteEventPitchFieldPos = 18,
+ kNoteEventPitchFieldWidth = 6,
+ kNoteEventPitchOffset = 32, /* add to value in pitch field to get actual pitch */
+ kNoteEventVolumeFieldPos = 11,
+ kNoteEventVolumeFieldWidth = 7,
+ kNoteEventVolumeOffset = 0, /* add to value in volume field to get actual volume */
+ kNoteEventDurationFieldPos = 0,
+ kNoteEventDurationFieldWidth = 11,
+ kNoteEventDurationMax = ((1L << kNoteEventDurationFieldWidth) - 1),
+ kXNoteEventPitchFieldPos = 0, /* in the 1st long word */
+ kXNoteEventPitchFieldWidth = 16,
+ kXNoteEventDurationFieldPos = 0, /* in the 2nd long word */
+ kXNoteEventDurationFieldWidth = 22,
+ kXNoteEventDurationMax = ((1L << kXNoteEventDurationFieldWidth) - 1),
+ kXNoteEventVolumeFieldPos = 22, /* in the 2nd long word */
+ kXNoteEventVolumeFieldWidth = 7, /* Control Events*/
+ kControlEventControllerFieldPos = 16,
+ kControlEventControllerFieldWidth = 8,
+ kControlEventValueFieldPos = 0,
+ kControlEventValueFieldWidth = 16,
+ kXControlEventControllerFieldPos = 0, /* in the 2nd long word */
+ kXControlEventControllerFieldWidth = 16,
+ kXControlEventValueFieldPos = 0, /* in the 1st long word */
+ kXControlEventValueFieldWidth = 16, /* Knob Events*/
+ kKnobEventValueHighFieldPos = 0, /* 1st long word */
+ kKnobEventValueHighFieldWidth = 16,
+ kKnobEventKnobFieldPos = 16, /* 2nd long word */
+ kKnobEventKnobFieldWidth = 14,
+ kKnobEventValueLowFieldPos = 0, /* 2nd long word */
+ kKnobEventValueLowFieldWidth = 16, /* Marker Events*/
+ kMarkerEventSubtypeFieldPos = 16,
+ kMarkerEventSubtypeFieldWidth = 8,
+ kMarkerEventValueFieldPos = 0,
+ kMarkerEventValueFieldWidth = 16, /* General Events*/
+ kGeneralEventSubtypeFieldPos = 16, /* in the last long word */
+ kGeneralEventSubtypeFieldWidth = 14,
+ kGeneralEventLengthFieldPos = 0, /* in the 1st & last long words */
+ kGeneralEventLengthFieldWidth = 16
+};
+
+#if TARGET_RT_LITTLE_ENDIAN
+enum {
+ kEndMarkerValue = 0x00000060
+};
+
+#else
+enum {
+ kEndMarkerValue = 0x60000000
+};
+
+#endif /* TARGET_RT_LITTLE_ENDIAN */
+
+/* macros for extracting various fields from the QuickTime event records*/
+
+#define qtma_MASK(bitWidth) ((1L << (bitWidth)) - 1)
+#define qtma_EXT(val, pos, width) ((EndianU32_BtoN(val) >> (pos)) & qtma_MASK(width))
+#define qtma_EventLengthForward(xP,ulen) \
+ { \
+ unsigned long _ext; \
+ unsigned long *lP = (unsigned long *)(xP); \
+ _ext = qtma_EXT(*lP, kEventLengthFieldPos, kEventLengthFieldWidth); \
+ if (_ext != 3) { \
+ ulen = (_ext < 2) ? 1 : 2; \
+ } else { \
+ ulen = (unsigned short)qtma_EXT(*lP, kGeneralEventLengthFieldPos, kGeneralEventLengthFieldWidth); \
+ if (ulen < 2) { \
+ ulen = lP[1]; \
+ } \
+ } \
+ }
+#define qtma_EventLengthBackward(xP,ulen) \
+ { \
+ unsigned long _ext; \
+ unsigned long *lP = (unsigned long *)(xP); \
+ _ext = qtma_EXT(*lP, kEventLengthFieldPos, kEventLengthFieldWidth); \
+ if (_ext != 3) { \
+ ulen = (_ext < 2) ? 1 : 2; \
+ } else { \
+ ulen = (unsigned short)qtma_EXT(*lP, kGeneralEventLengthFieldPos, kGeneralEventLengthFieldWidth); \
+ if (ulen < 2) { \
+ ulen = lP[-1]; \
+ } \
+ } \
+ }
+#define qtma_EventType(x) ((qtma_EXT(x, kEventTypeFieldPos, kEventTypeFieldWidth) > 3) ? qtma_EXT(x, kXEventTypeFieldPos, kXEventTypeFieldWidth) : qtma_EXT(x, kEventTypeFieldPos, kEventTypeFieldWidth))
+#define qtma_RestDuration(x) (qtma_EXT(x, kRestEventDurationFieldPos, kRestEventDurationFieldWidth))
+#define qtma_Part(x) (qtma_EXT(x, kEventPartFieldPos, kEventPartFieldWidth))
+#define qtma_XPart(m, l) (qtma_EXT(m, kXEventPartFieldPos, kXEventPartFieldWidth))
+#define qtma_NotePitch(x) (qtma_EXT(x, kNoteEventPitchFieldPos, kNoteEventPitchFieldWidth) + kNoteEventPitchOffset)
+#define qtma_NoteVolume(x) (qtma_EXT(x, kNoteEventVolumeFieldPos, kNoteEventVolumeFieldWidth) + kNoteEventVolumeOffset)
+#define qtma_NoteDuration(x) (qtma_EXT(x, kNoteEventDurationFieldPos, kNoteEventDurationFieldWidth))
+#define qtma_NoteVelocity qtma_NoteVolume
+#define qtma_XNotePitch(m, l) (qtma_EXT(m, kXNoteEventPitchFieldPos, kXNoteEventPitchFieldWidth))
+#define qtma_XNoteVolume(m, l) (qtma_EXT(l, kXNoteEventVolumeFieldPos, kXNoteEventVolumeFieldWidth))
+#define qtma_XNoteDuration(m, l) (qtma_EXT(l, kXNoteEventDurationFieldPos, kXNoteEventDurationFieldWidth))
+#define qtma_XNoteVelocity qtma_XNoteVolume
+#define qtma_ControlController(x) (qtma_EXT(x, kControlEventControllerFieldPos, kControlEventControllerFieldWidth))
+#define qtma_ControlValue(x) (qtma_EXT(x, kControlEventValueFieldPos, kControlEventValueFieldWidth))
+#define qtma_XControlController(m, l) (qtma_EXT(l, kXControlEventControllerFieldPos, kXControlEventControllerFieldWidth))
+#define qtma_XControlValue(m, l) (qtma_EXT(m, kXControlEventValueFieldPos, kXControlEventValueFieldWidth))
+#define qtma_MarkerSubtype(x) (qtma_EXT(x,kMarkerEventSubtypeFieldPos,kMarkerEventSubtypeFieldWidth))
+#define qtma_MarkerValue(x) (qtma_EXT(x, kMarkerEventValueFieldPos, kMarkerEventValueFieldWidth))
+
+#define qtma_KnobValue(m,l) ((qtma_EXT(m,kKnobEventValueHighFieldPos,kKnobEventValueHighFieldWidth) << 16) \
+ | (qtma_EXT(l,kKnobEventValueLowFieldPos,kKnobEventValueLowFieldWidth)))
+
+#define qtma_KnobKnob(m,l) (qtma_EXT(l,kKnobEventKnobFieldPos,kKnobEventKnobFieldWidth))
+#define qtma_GeneralSubtype(m,l) (qtma_EXT(l,kGeneralEventSubtypeFieldPos,kGeneralEventSubtypeFieldWidth))
+#define qtma_GeneralLength(m,l) (qtma_EXT(m,kGeneralEventLengthFieldPos,kGeneralEventLengthFieldWidth))
+#define qtma_StuffRestEvent(x, duration) ( \
+ x = (kRestEventType << kEventTypeFieldPos) \
+ | ((long)(duration) << kRestEventDurationFieldPos), \
+ x = EndianU32_NtoB(x) )
+#define qtma_StuffNoteEvent(x, part, pitch, volume, duration) ( \
+ x = (kNoteEventType << kEventTypeFieldPos) \
+ | ((long)(part) << kEventPartFieldPos) \
+ | (((long)(pitch) - kNoteEventPitchOffset) << kNoteEventPitchFieldPos) \
+ | (((long)(volume) - kNoteEventVolumeOffset) << kNoteEventVolumeFieldPos) \
+ | ((long)(duration) << kNoteEventDurationFieldPos), \
+ x = EndianU32_NtoB(x) )
+#define qtma_StuffControlEvent(x, part, control, value) ( \
+ x = (kControlEventType << kEventTypeFieldPos) \
+ | ((long)(part) << kEventPartFieldPos) \
+ | ((long)(control) << kControlEventControllerFieldPos)\
+ | ((long)((value) & qtma_MASK(kControlEventValueFieldWidth)) << kControlEventValueFieldPos), \
+ x = EndianU32_NtoB(x) )
+#define qtma_StuffMarkerEvent(x, markerType, markerValue) ( \
+ x = (kMarkerEventType << kEventTypeFieldPos) \
+ | ((long)(markerType) << kMarkerEventSubtypeFieldPos) \
+ | ((long)(markerValue) << kMarkerEventValueFieldPos), \
+ x = EndianU32_NtoB(x) )
+#define qtma_StuffXNoteEvent(w1, w2, part, pitch, volume, duration) ( \
+ w1 = (kXNoteEventType << kXEventTypeFieldPos) \
+ | ((long)(part) << kXEventPartFieldPos) \
+ | ((long)(pitch) << kXNoteEventPitchFieldPos), \
+ w1 = EndianU32_NtoB(w1), \
+ w2 = (kXEventLengthBits << kEventLengthFieldPos) \
+ | ((long)(duration) << kXNoteEventDurationFieldPos) \
+ | ((long)(volume) << kXNoteEventVolumeFieldPos), \
+ w2 = EndianU32_NtoB(w2) )
+#define qtma_StuffXControlEvent(w1, w2, part, control, value) ( \
+ w1 = (kXControlEventType << kXEventTypeFieldPos) \
+ | ((long)(part) << kXEventPartFieldPos) \
+ | ((long)((value) & qtma_MASK(kXControlEventValueFieldWidth)) << kXControlEventValueFieldPos), \
+ w1 = EndianU32_NtoB(w1), \
+ w2 = (kXEventLengthBits << kEventLengthFieldPos) \
+ | ((long)(control) << kXControlEventControllerFieldPos), \
+ w2 = EndianU32_NtoB(w2) )
+#define qtma_StuffKnobEvent(w1, w2, part, knob, value) ( \
+ w1 = (kKnobEventType << kXEventTypeFieldPos) \
+ | ((long)(part) << kXEventPartFieldPos) \
+ | ((long)(value >> 16) << kKnobEventValueLowFieldPos), \
+ w1 = EndianU32_NtoB(w1), \
+ w2 = (kXEventLengthBits << kEventLengthFieldPos) \
+ | ((long)(knob) << kKnobEventKnobFieldPos) \
+ | ((long)(value & 0xFFFF) << kKnobEventValueLowFieldPos), \
+ w2 = EndianU32_NtoB(w2) )
+#define qtma_StuffGeneralEvent(w1,w2,part,subType,length) ( \
+ w1 = (kGeneralEventType << kXEventTypeFieldPos) \
+ | ((long)(part) << kXEventPartFieldPos) \
+ | ((long)(length) << kGeneralEventLengthFieldPos), \
+ w1 = EndianU32_NtoB(w1), \
+ w2 = (kGeneralEventLengthBits << kEventLengthFieldPos) \
+ | ((long)(subType) << kGeneralEventSubtypeFieldPos) \
+ | ((long)(length) << kGeneralEventLengthFieldPos), \
+ w2 = EndianU32_NtoB(w2) )
+#define qtma_NeedXGeneralEvent(length) (((unsigned long)(length)) > (unsigned long)0xffff)
+
+/* General Event Defined Types*/
+enum {
+ kGeneralEventNoteRequest = 1, /* Encapsulates NoteRequest data structure */
+ kGeneralEventPartKey = 4,
+ kGeneralEventTuneDifference = 5, /* Contains a standard sequence, with end marker, for the tune difference of a sequence piece (halts QuickTime 2.0 Music) */
+ kGeneralEventAtomicInstrument = 6, /* Encapsulates AtomicInstrument record */
+ kGeneralEventKnob = 7, /* knobID/knobValue pairs; smallest event is 4 longs */
+ kGeneralEventMIDIChannel = 8, /* used in tune header, one longword identifies the midi channel it originally came from */
+ kGeneralEventPartChange = 9, /* used in tune sequence, one longword identifies the tune part which can now take over this part's note channel (similar to program change) (halts QuickTime 2.0 Music)*/
+ kGeneralEventNoOp = 10, /* guaranteed to do nothing and be ignored. (halts QuickTime 2.0 Music) */
+ kGeneralEventUsedNotes = 11, /* four longwords specifying which midi notes are actually used, 0..127 msb to lsb */
+ kGeneralEventPartMix = 12 /* three longwords: Fixed volume, long balance, long flags */
+};
+
+/* Marker Event Defined Types // marker is 60 ee vv vv in hex, where e = event type, and v = value*/
+enum {
+ kMarkerEventEnd = 0, /* marker type 0 means: value 0 - stop, value != 0 - ignore*/
+ kMarkerEventBeat = 1, /* value 0 = single beat; anything else is 65536ths-of-a-beat (quarter note)*/
+ kMarkerEventTempo = 2 /* value same as beat marker, but indicates that a tempo event should be computed (based on where the next beat or tempo marker is) and emitted upon export*/
+};
+
+enum {
+ kCurrentlyNativeEndian = 1,
+ kCurrentlyNotNativeEndian = 2
+};
+
+/* UPP call backs */
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(MusicMIDISendUPP)
+ NewMusicMIDISendUPP (MusicMIDISendProcPtr userRoutine);
+
+ EXTERN_API(MusicMIDIReadHookUPP)
+ NewMusicMIDIReadHookUPP (MusicMIDIReadHookProcPtr userRoutine);
+
+ EXTERN_API(MusicOfflineDataUPP)
+ NewMusicOfflineDataUPP (MusicOfflineDataProcPtr userRoutine);
+
+ EXTERN_API(TuneCallBackUPP)
+ NewTuneCallBackUPP (TuneCallBackProcPtr userRoutine);
+
+ EXTERN_API(TunePlayCallBackUPP)
+ NewTunePlayCallBackUPP (TunePlayCallBackProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeMusicMIDISendUPP (MusicMIDISendUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeMusicMIDIReadHookUPP (MusicMIDIReadHookUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeMusicOfflineDataUPP (MusicOfflineDataUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeTuneCallBackUPP (TuneCallBackUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeTunePlayCallBackUPP (TunePlayCallBackUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokeMusicMIDISendUPP (ComponentInstance self,
+ long refCon,
+ MusicMIDIPacket * mmp,
+ MusicMIDISendUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokeMusicMIDIReadHookUPP (MusicMIDIPacket * mp,
+ long myRefCon,
+ MusicMIDIReadHookUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokeMusicOfflineDataUPP (Ptr SoundData,
+ long numBytes,
+ long myRefCon,
+ MusicOfflineDataUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeTuneCallBackUPP (const TuneStatus * status,
+ long refCon,
+ TuneCallBackUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeTunePlayCallBackUPP (unsigned long * event,
+ long seed,
+ long refCon,
+ TunePlayCallBackUPP userUPP);
+
+#else
+ enum { uppMusicMIDISendProcInfo = 0x00000FF0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppMusicMIDIReadHookProcInfo = 0x000003F0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes) */
+ enum { uppMusicOfflineDataProcInfo = 0x00000FF0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppTuneCallBackProcInfo = 0x000003C0 }; /* pascal no_return_value Func(4_bytes, 4_bytes) */
+ enum { uppTunePlayCallBackProcInfo = 0x00000FC0 }; /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes) */
+ #define NewMusicMIDISendUPP(userRoutine) (MusicMIDISendUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMusicMIDISendProcInfo, GetCurrentArchitecture())
+ #define NewMusicMIDIReadHookUPP(userRoutine) (MusicMIDIReadHookUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMusicMIDIReadHookProcInfo, GetCurrentArchitecture())
+ #define NewMusicOfflineDataUPP(userRoutine) (MusicOfflineDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMusicOfflineDataProcInfo, GetCurrentArchitecture())
+ #define NewTuneCallBackUPP(userRoutine) (TuneCallBackUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTuneCallBackProcInfo, GetCurrentArchitecture())
+ #define NewTunePlayCallBackUPP(userRoutine) (TunePlayCallBackUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTunePlayCallBackProcInfo, GetCurrentArchitecture())
+ #define DisposeMusicMIDISendUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeMusicMIDIReadHookUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeMusicOfflineDataUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeTuneCallBackUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeTunePlayCallBackUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeMusicMIDISendUPP(self, refCon, mmp, userUPP) (ComponentResult)CALL_THREE_PARAMETER_UPP((userUPP), uppMusicMIDISendProcInfo, (self), (refCon), (mmp))
+ #define InvokeMusicMIDIReadHookUPP(mp, myRefCon, userUPP) (ComponentResult)CALL_TWO_PARAMETER_UPP((userUPP), uppMusicMIDIReadHookProcInfo, (mp), (myRefCon))
+ #define InvokeMusicOfflineDataUPP(SoundData, numBytes, myRefCon, userUPP) (ComponentResult)CALL_THREE_PARAMETER_UPP((userUPP), uppMusicOfflineDataProcInfo, (SoundData), (numBytes), (myRefCon))
+ #define InvokeTuneCallBackUPP(status, refCon, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppTuneCallBackProcInfo, (status), (refCon))
+ #define InvokeTunePlayCallBackUPP(event, seed, refCon, userUPP) CALL_THREE_PARAMETER_UPP((userUPP), uppTunePlayCallBackProcInfo, (event), (seed), (refCon))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewMusicMIDISendProc(userRoutine) NewMusicMIDISendUPP(userRoutine)
+#define NewMusicMIDIReadHookProc(userRoutine) NewMusicMIDIReadHookUPP(userRoutine)
+#define NewMusicOfflineDataProc(userRoutine) NewMusicOfflineDataUPP(userRoutine)
+#define NewTuneCallBackProc(userRoutine) NewTuneCallBackUPP(userRoutine)
+#define NewTunePlayCallBackProc(userRoutine) NewTunePlayCallBackUPP(userRoutine)
+#define CallMusicMIDISendProc(userRoutine, self, refCon, mmp) InvokeMusicMIDISendUPP(self, refCon, mmp, userRoutine)
+#define CallMusicMIDIReadHookProc(userRoutine, mp, myRefCon) InvokeMusicMIDIReadHookUPP(mp, myRefCon, userRoutine)
+#define CallMusicOfflineDataProc(userRoutine, SoundData, numBytes, myRefCon) InvokeMusicOfflineDataUPP(SoundData, numBytes, myRefCon, userRoutine)
+#define CallTuneCallBackProc(userRoutine, status, refCon) InvokeTuneCallBackUPP(status, refCon, userRoutine)
+#define CallTunePlayCallBackProc(userRoutine, event, seed, refCon) InvokeTunePlayCallBackUPP(event, seed, refCon, userRoutine)
+
+/* selectors for component calls */
+enum {
+ kQTMIDIGetMIDIPortsSelect = 0x0001,
+ kQTMIDIUseSendPortSelect = 0x0002,
+ kQTMIDISendMIDISelect = 0x0003,
+ kQTMIDIUseReceivePortSelect = 0x0004,
+ kMusicGetDescriptionSelect = 0x0001,
+ kMusicGetPartSelect = 0x0002,
+ kMusicSetPartSelect = 0x0003,
+ kMusicSetPartInstrumentNumberSelect = 0x0004,
+ kMusicGetPartInstrumentNumberSelect = 0x0005,
+ kMusicStorePartInstrumentSelect = 0x0006,
+ kMusicGetPartAtomicInstrumentSelect = 0x0009,
+ kMusicSetPartAtomicInstrumentSelect = 0x000A,
+ kMusicGetInstrumentKnobDescriptionObsoleteSelect = 0x000D,
+ kMusicGetDrumKnobDescriptionObsoleteSelect = 0x000E,
+ kMusicGetKnobDescriptionObsoleteSelect = 0x000F,
+ kMusicGetPartKnobSelect = 0x0010,
+ kMusicSetPartKnobSelect = 0x0011,
+ kMusicGetKnobSelect = 0x0012,
+ kMusicSetKnobSelect = 0x0013,
+ kMusicGetPartNameSelect = 0x0014,
+ kMusicSetPartNameSelect = 0x0015,
+ kMusicFindToneSelect = 0x0016,
+ kMusicPlayNoteSelect = 0x0017,
+ kMusicResetPartSelect = 0x0018,
+ kMusicSetPartControllerSelect = 0x0019,
+ kMusicGetPartControllerSelect = 0x001A,
+ kMusicGetMIDIProcSelect = 0x001B,
+ kMusicSetMIDIProcSelect = 0x001C,
+ kMusicGetInstrumentNamesSelect = 0x001D,
+ kMusicGetDrumNamesSelect = 0x001E,
+ kMusicGetMasterTuneSelect = 0x001F,
+ kMusicSetMasterTuneSelect = 0x0020,
+ kMusicGetInstrumentAboutInfoSelect = 0x0022,
+ kMusicGetDeviceConnectionSelect = 0x0023,
+ kMusicUseDeviceConnectionSelect = 0x0024,
+ kMusicGetKnobSettingStringsSelect = 0x0025,
+ kMusicGetMIDIPortsSelect = 0x0026,
+ kMusicSendMIDISelect = 0x0027,
+ kMusicReceiveMIDISelect = 0x0028,
+ kMusicStartOfflineSelect = 0x0029,
+ kMusicSetOfflineTimeToSelect = 0x002A,
+ kMusicGetInstrumentKnobDescriptionSelect = 0x002B,
+ kMusicGetDrumKnobDescriptionSelect = 0x002C,
+ kMusicGetKnobDescriptionSelect = 0x002D,
+ kMusicGetInfoTextSelect = 0x002E,
+ kMusicGetInstrumentInfoSelect = 0x002F,
+ kMusicTaskSelect = 0x0031,
+ kMusicSetPartInstrumentNumberInterruptSafeSelect = 0x0032,
+ kMusicSetPartSoundLocalizationSelect = 0x0033,
+ kMusicGenericConfigureSelect = 0x0100,
+ kMusicGenericGetPartSelect = 0x0101,
+ kMusicGenericGetKnobListSelect = 0x0102,
+ kMusicGenericSetResourceNumbersSelect = 0x0103,
+ kMusicDerivedMIDISendSelect = 0x0200,
+ kMusicDerivedSetKnobSelect = 0x0201,
+ kMusicDerivedSetPartSelect = 0x0202,
+ kMusicDerivedSetInstrumentSelect = 0x0203,
+ kMusicDerivedSetPartInstrumentNumberSelect = 0x0204,
+ kMusicDerivedSetMIDISelect = 0x0205,
+ kMusicDerivedStorePartInstrumentSelect = 0x0206,
+ kMusicDerivedOpenResFileSelect = 0x0207,
+ kMusicDerivedCloseResFileSelect = 0x0208,
+ kInstrumentGetInstSelect = 0x0001,
+ kInstrumentGetInfoSelect = 0x0002,
+ kInstrumentInitializeSelect = 0x0003,
+ kInstrumentOpenComponentResFileSelect = 0x0004,
+ kInstrumentCloseComponentResFileSelect = 0x0005,
+ kInstrumentGetComponentRefConSelect = 0x0006,
+ kInstrumentSetComponentRefConSelect = 0x0007,
+ kInstrumentGetSynthesizerTypeSelect = 0x0008,
+ kNARegisterMusicDeviceSelect = 0x0000,
+ kNAUnregisterMusicDeviceSelect = 0x0001,
+ kNAGetRegisteredMusicDeviceSelect = 0x0002,
+ kNASaveMusicConfigurationSelect = 0x0003,
+ kNANewNoteChannelSelect = 0x0004,
+ kNADisposeNoteChannelSelect = 0x0005,
+ kNAGetNoteChannelInfoSelect = 0x0006,
+ kNAPrerollNoteChannelSelect = 0x0007,
+ kNAUnrollNoteChannelSelect = 0x0008,
+ kNASetNoteChannelVolumeSelect = 0x000B,
+ kNAResetNoteChannelSelect = 0x000C,
+ kNAPlayNoteSelect = 0x000D,
+ kNASetControllerSelect = 0x000E,
+ kNASetKnobSelect = 0x000F,
+ kNAFindNoteChannelToneSelect = 0x0010,
+ kNASetInstrumentNumberSelect = 0x0011,
+ kNAPickInstrumentSelect = 0x0012,
+ kNAPickArrangementSelect = 0x0013,
+ kNASetDefaultMIDIInputSelect = 0x0015,
+ kNAGetDefaultMIDIInputSelect = 0x0016,
+ kNAUseDefaultMIDIInputSelect = 0x0019,
+ kNALoseDefaultMIDIInputSelect = 0x001A,
+ kNAStuffToneDescriptionSelect = 0x001B,
+ kNACopyrightDialogSelect = 0x001C,
+ kNAGetIndNoteChannelSelect = 0x001F,
+ kNAGetMIDIPortsSelect = 0x0021,
+ kNAGetNoteRequestSelect = 0x0022,
+ kNASendMIDISelect = 0x0023,
+ kNAPickEditInstrumentSelect = 0x0024,
+ kNANewNoteChannelFromAtomicInstrumentSelect = 0x0025,
+ kNASetAtomicInstrumentSelect = 0x0026,
+ kNAGetKnobSelect = 0x0028,
+ kNATaskSelect = 0x0029,
+ kNASetNoteChannelBalanceSelect = 0x002A,
+ kNASetInstrumentNumberInterruptSafeSelect = 0x002B,
+ kNASetNoteChannelSoundLocalizationSelect = 0x002C,
+ kNAGetControllerSelect = 0x002D,
+ kTuneSetHeaderSelect = 0x0004,
+ kTuneGetTimeBaseSelect = 0x0005,
+ kTuneSetTimeScaleSelect = 0x0006,
+ kTuneGetTimeScaleSelect = 0x0007,
+ kTuneGetIndexedNoteChannelSelect = 0x0008,
+ kTuneQueueSelect = 0x000A,
+ kTuneInstantSelect = 0x000B,
+ kTuneGetStatusSelect = 0x000C,
+ kTuneStopSelect = 0x000D,
+ kTuneSetVolumeSelect = 0x0010,
+ kTuneGetVolumeSelect = 0x0011,
+ kTunePrerollSelect = 0x0012,
+ kTuneUnrollSelect = 0x0013,
+ kTuneSetNoteChannelsSelect = 0x0014,
+ kTuneSetPartTransposeSelect = 0x0015,
+ kTuneGetNoteAllocatorSelect = 0x0017,
+ kTuneSetSofterSelect = 0x0018,
+ kTuneTaskSelect = 0x0019,
+ kTuneSetBalanceSelect = 0x001A,
+ kTuneSetSoundLocalizationSelect = 0x001B,
+ kTuneSetHeaderWithSizeSelect = 0x001C,
+ kTuneSetPartMixSelect = 0x001D,
+ kTuneGetPartMixSelect = 0x001E
+};
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QUICKTIMEMUSIC__ */
+
diff --git a/include/qt/QuickTimeStreaming.h b/include/qt/QuickTimeStreaming.h
new file mode 100644
index 000000000..ad8e468e1
--- /dev/null
+++ b/include/qt/QuickTimeStreaming.h
@@ -0,0 +1,1557 @@
+/*
+ File: QuickTimeStreaming.h
+
+ Contains: QuickTime Interfaces.
+
+ Version: Technology: QuickTime 6.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1990-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QUICKTIMESTREAMING__
+#define __QUICKTIMESTREAMING__
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#ifndef __COMPONENTS__
+#include "Components.h"
+#endif
+
+#ifndef __MOVIES__
+#include "Movies.h"
+#endif
+
+#ifndef __QUICKTIMECOMPONENTS__
+#include "QuickTimeComponents.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ kQTSInfiniteDuration = 0x7FFFFFFF,
+ kQTSUnknownDuration = 0x00000000,
+ kQTSNormalForwardRate = 0x00010000,
+ kQTSStoppedRate = 0x00000000
+};
+
+
+struct QTSPresentationRecord {
+ long data[1];
+};
+typedef struct QTSPresentationRecord QTSPresentationRecord;
+
+typedef QTSPresentationRecord * QTSPresentation;
+
+struct QTSStreamRecord {
+ long data[1];
+};
+typedef struct QTSStreamRecord QTSStreamRecord;
+
+typedef QTSStreamRecord * QTSStream;
+
+struct QTSEditEntry {
+ TimeValue64 presentationDuration;
+ TimeValue64 streamStartTime;
+ Fixed streamRate;
+};
+typedef struct QTSEditEntry QTSEditEntry;
+
+struct QTSEditList {
+ SInt32 numEdits;
+ QTSEditEntry edits[1];
+};
+typedef struct QTSEditList QTSEditList;
+typedef QTSEditList * QTSEditListPtr;
+typedef QTSEditListPtr * QTSEditListHandle;
+#define kQTSInvalidPresentation (QTSPresentation)0L
+#define kQTSAllPresentations (QTSPresentation)0L
+#define kQTSInvalidStream (QTSStream)0L
+#define kQTSAllStreams (QTSStream)0L
+typedef CALLBACK_API( ComponentResult , QTSNotificationProcPtr )(ComponentResult inErr, OSType inNotificationType, void *inNotificationParams, void *inRefCon);
+typedef STACK_UPP_TYPE(QTSNotificationProcPtr) QTSNotificationUPP;
+/*-----------------------------------------
+ Get / Set Info
+-----------------------------------------*/
+enum {
+ kQTSGetURLLink = FOUR_CHAR_CODE('gull') /* QTSGetURLLinkRecord* */
+};
+
+/* get and set */
+enum {
+ kQTSTargetBufferDurationInfo = FOUR_CHAR_CODE('bufr'), /* Fixed* in seconds; expected, not actual */
+ kQTSDurationInfo = FOUR_CHAR_CODE('dura'), /* QTSDurationAtom* */
+ kQTSSoundLevelMeteringEnabledInfo = FOUR_CHAR_CODE('mtrn'), /* Boolean* */
+ kQTSSoundLevelMeterInfo = FOUR_CHAR_CODE('levm'), /* LevelMeterInfoPtr */
+ kQTSSourceTrackIDInfo = FOUR_CHAR_CODE('otid'), /* UInt32* */
+ kQTSSourceLayerInfo = FOUR_CHAR_CODE('olyr'), /* UInt16* */
+ kQTSSourceLanguageInfo = FOUR_CHAR_CODE('olng'), /* UInt16* */
+ kQTSSourceTrackFlagsInfo = FOUR_CHAR_CODE('otfl'), /* SInt32* */
+ kQTSSourceDimensionsInfo = FOUR_CHAR_CODE('odim'), /* QTSDimensionParams* */
+ kQTSSourceVolumesInfo = FOUR_CHAR_CODE('ovol'), /* QTSVolumesParams* */
+ kQTSSourceMatrixInfo = FOUR_CHAR_CODE('omat'), /* MatrixRecord* */
+ kQTSSourceClipRectInfo = FOUR_CHAR_CODE('oclp'), /* Rect* */
+ kQTSSourceGraphicsModeInfo = FOUR_CHAR_CODE('ogrm'), /* QTSGraphicsModeParams* */
+ kQTSSourceScaleInfo = FOUR_CHAR_CODE('oscl'), /* Point* */
+ kQTSSourceBoundingRectInfo = FOUR_CHAR_CODE('orct'), /* Rect* */
+ kQTSSourceUserDataInfo = FOUR_CHAR_CODE('oudt'), /* UserData */
+ kQTSSourceInputMapInfo = FOUR_CHAR_CODE('oimp'), /* QTAtomContainer */
+ kQTSInfo_DataProc = FOUR_CHAR_CODE('datp'), /* QTSDataProcParams* */
+ kQTSInfo_SendDataExtras = FOUR_CHAR_CODE('dext'), /* QTSSendDataExtrasParams* */
+ kQTSInfo_HintTrackID = FOUR_CHAR_CODE('htid'), /* long* */
+ kQTSInfo_URL = FOUR_CHAR_CODE('url '), /* Handle*, cstring in handle */
+ kQTSInfo_Authentication = FOUR_CHAR_CODE('auup'), /* QTSAuthenticationParams */
+ kQTSInfo_MediaPacketizer = FOUR_CHAR_CODE('rmpk') /* ComponentInstance */
+};
+
+/* get only */
+enum {
+ kQTSStatisticsInfo = FOUR_CHAR_CODE('stat'), /* QTSStatisticsParams* */
+ kQTSMinStatusDimensionsInfo = FOUR_CHAR_CODE('mstd'), /* QTSDimensionParams* */
+ kQTSNormalStatusDimensionsInfo = FOUR_CHAR_CODE('nstd'), /* QTSDimensionParams* */
+ kQTSTotalDataRateInfo = FOUR_CHAR_CODE('drtt'), /* UInt32*, add to what's there */
+ kQTSTotalDataRateInInfo = FOUR_CHAR_CODE('drti'), /* UInt32*, add to what's there */
+ kQTSTotalDataRateOutInfo = FOUR_CHAR_CODE('drto'), /* UInt32*, add to what's there */
+ kQTSLostPercentInfo = FOUR_CHAR_CODE('lpct'), /* QTSLostPercentParams*, add to what's there */
+ kQTSNumViewersInfo = FOUR_CHAR_CODE('nviw'), /* UInt32* */
+ kQTSMediaTypeInfo = FOUR_CHAR_CODE('mtyp'), /* OSType* */
+ kQTSNameInfo = FOUR_CHAR_CODE('name'), /* QTSNameParams* */
+ kQTSCanHandleSendDataType = FOUR_CHAR_CODE('chsd'), /* QTSCanHandleSendDataTypeParams* */
+ kQTSAnnotationsInfo = FOUR_CHAR_CODE('meta'), /* QTAtomContainer */
+ kQTSRemainingBufferTimeInfo = FOUR_CHAR_CODE('btms'), /* UInt32* remaining buffer time before playback, in microseconds */
+ kQTSInfo_SettingsText = FOUR_CHAR_CODE('sttx'), /* QTSSettingsTextParams* */
+ kQTSInfo_AverageFrameRate = FOUR_CHAR_CODE('fps ') /* UnsignedFixed* */
+};
+
+
+
+struct QTSAuthenticationParams {
+ SInt32 flags;
+ const char * userID; /* caller disposes of pointer*/
+ const char * password; /* caller disposes of pointer*/
+};
+typedef struct QTSAuthenticationParams QTSAuthenticationParams;
+enum {
+ kQTSTargetBufferDurationTimeScale = 1000
+};
+
+
+struct QTSPanelFilterParams {
+ SInt32 version;
+ QTSStream inStream;
+ OSType inPanelType;
+ OSType inPanelSubType;
+ QTAtomSpec details;
+};
+typedef struct QTSPanelFilterParams QTSPanelFilterParams;
+/* return true to keep this panel*/
+typedef CALLBACK_API( Boolean , QTSPanelFilterProcPtr )(QTSPanelFilterParams *inParams, void *inRefCon);
+typedef STACK_UPP_TYPE(QTSPanelFilterProcPtr) QTSPanelFilterUPP;
+enum {
+ kQTSSettingsTextSummary = FOUR_CHAR_CODE('set1'),
+ kQTSSettingsTextDetails = FOUR_CHAR_CODE('setd')
+};
+
+
+struct QTSSettingsTextParams {
+ SInt32 flags; /* None yet defined*/
+ OSType inSettingsSelector; /* which kind of setting you want from enum above*/
+ Handle outSettingsAsText; /* QTS allocates; Caller disposes*/
+ QTSPanelFilterUPP inPanelFilterProc; /* To get a subset filter with this */
+ void * inPanelFilterProcRefCon;
+};
+typedef struct QTSSettingsTextParams QTSSettingsTextParams;
+
+struct QTSCanHandleSendDataTypeParams {
+ SInt32 modifierTypeOrInputID;
+ Boolean isModifierType;
+ Boolean returnedCanHandleSendDataType; /* callee sets to true if it can handle it*/
+};
+typedef struct QTSCanHandleSendDataTypeParams QTSCanHandleSendDataTypeParams;
+
+struct QTSNameParams {
+ SInt32 maxNameLength;
+ SInt32 requestedLanguage;
+ SInt32 returnedActualLanguage;
+ unsigned char * returnedName; /* pascal string; caller supplies*/
+};
+typedef struct QTSNameParams QTSNameParams;
+
+struct QTSLostPercentParams {
+ UInt32 receivedPkts;
+ UInt32 lostPkts;
+ Fixed percent;
+};
+typedef struct QTSLostPercentParams QTSLostPercentParams;
+
+struct QTSDimensionParams {
+ Fixed width;
+ Fixed height;
+};
+typedef struct QTSDimensionParams QTSDimensionParams;
+
+struct QTSVolumesParams {
+ SInt16 leftVolume;
+ SInt16 rightVolume;
+};
+typedef struct QTSVolumesParams QTSVolumesParams;
+
+struct QTSGraphicsModeParams {
+ SInt16 graphicsMode;
+ RGBColor opColor;
+};
+typedef struct QTSGraphicsModeParams QTSGraphicsModeParams;
+
+struct QTSGetURLLinkRecord {
+ Point displayWhere;
+ Handle returnedURLLink;
+};
+typedef struct QTSGetURLLinkRecord QTSGetURLLinkRecord;
+enum {
+ kQTSDataProcParamsVersion1 = 1
+};
+
+enum {
+ kQTSDataProcType_MediaSample = FOUR_CHAR_CODE('mdia'),
+ kQTSDataProcType_HintSample = FOUR_CHAR_CODE('hint')
+};
+
+
+struct QTSDataProcParams {
+ SInt32 version;
+ SInt32 flags;
+ QTSStream stream;
+ OSType procType;
+ QTSNotificationUPP proc;
+ void * procRefCon;
+};
+typedef struct QTSDataProcParams QTSDataProcParams;
+enum {
+ kQTSDataProcSelector_SampleData = FOUR_CHAR_CODE('samp'),
+ kQTSDataProcSelector_UserData = FOUR_CHAR_CODE('user')
+};
+
+enum {
+ kQTSSampleDataCallbackParamsVersion1 = 1
+};
+
+
+struct QTSSampleDataCallbackParams {
+ SInt32 version;
+ SInt32 flags;
+ QTSStream stream;
+ OSType procType;
+ OSType mediaType;
+ TimeScale mediaTimeScale;
+ SampleDescriptionHandle sampleDesc;
+ UInt32 sampleDescSeed;
+ TimeValue64 sampleTime;
+ TimeValue64 duration; /* could be 0 */
+ SInt32 sampleFlags;
+ UInt32 dataLength;
+ const void * data;
+};
+typedef struct QTSSampleDataCallbackParams QTSSampleDataCallbackParams;
+enum {
+ kQTSUserDataCallbackParamsVersion1 = 1
+};
+
+
+struct QTSUserDataCallbackParams {
+ SInt32 version;
+ SInt32 flags;
+ QTSStream stream;
+ OSType procType;
+ OSType userDataType;
+ Handle userDataHandle; /* caller must make copy if it wants to keep the data around*/
+};
+typedef struct QTSUserDataCallbackParams QTSUserDataCallbackParams;
+enum {
+ kQTSSendDataExtrasParamsVersion1 = 1
+};
+
+
+struct QTSSendDataExtrasParams {
+ SInt32 version;
+ SInt32 flags;
+ OSType procType;
+};
+typedef struct QTSSendDataExtrasParams QTSSendDataExtrasParams;
+typedef CALLBACK_API( Boolean , QTSModalFilterProcPtr )(DialogPtr inDialog, const EventRecord *inEvent, SInt16 *ioItemHit, void *inRefCon);
+typedef STACK_UPP_TYPE(QTSModalFilterProcPtr) QTSModalFilterUPP;
+/*-----------------------------------------
+ Characteristics
+-----------------------------------------*/
+/* characteristics in Movies.h work here too */
+enum {
+ kQTSSupportsPerStreamControlCharacteristic = FOUR_CHAR_CODE('psct')
+};
+
+
+struct QTSVideoParams {
+ Fixed width;
+ Fixed height;
+ MatrixRecord matrix;
+ CGrafPtr gWorld;
+ GDHandle gdHandle;
+ RgnHandle clip;
+ short graphicsMode;
+ RGBColor opColor;
+};
+typedef struct QTSVideoParams QTSVideoParams;
+
+struct QTSAudioParams {
+ SInt16 leftVolume;
+ SInt16 rightVolume;
+ SInt16 bassLevel;
+ SInt16 trebleLevel;
+ short frequencyBandsCount;
+ void * frequencyBands;
+ Boolean levelMeteringEnabled;
+};
+typedef struct QTSAudioParams QTSAudioParams;
+
+struct QTSMediaParams {
+ QTSVideoParams v;
+ QTSAudioParams a;
+};
+typedef struct QTSMediaParams QTSMediaParams;
+enum {
+ kQTSMustDraw = 1 << 3,
+ kQTSAtEnd = 1 << 4,
+ kQTSPreflightDraw = 1 << 5,
+ kQTSSyncDrawing = 1 << 6
+};
+
+/* media task result flags */
+enum {
+ kQTSDidDraw = 1 << 0,
+ kQTSNeedsToDraw = 1 << 2,
+ kQTSDrawAgain = 1 << 3,
+ kQTSPartialDraw = 1 << 4
+};
+
+/*============================================================================
+ Notifications
+============================================================================*/
+/* ------ notification types ------ */
+enum {
+ kQTSNullNotification = FOUR_CHAR_CODE('null'), /* NULL */
+ kQTSErrorNotification = FOUR_CHAR_CODE('err '), /* QTSErrorParams*, optional */
+ kQTSNewPresDetectedNotification = FOUR_CHAR_CODE('newp'), /* QTSNewPresDetectedParams* */
+ kQTSPresBeginChangingNotification = FOUR_CHAR_CODE('prcb'), /* NULL */
+ kQTSPresDoneChangingNotification = FOUR_CHAR_CODE('prcd'), /* NULL */
+ kQTSPresentationChangedNotification = FOUR_CHAR_CODE('prch'), /* NULL */
+ kQTSNewStreamNotification = FOUR_CHAR_CODE('stnw'), /* QTSNewStreamParams* */
+ kQTSStreamBeginChangingNotification = FOUR_CHAR_CODE('stcb'), /* QTSStream */
+ kQTSStreamDoneChangingNotification = FOUR_CHAR_CODE('stcd'), /* QTSStream */
+ kQTSStreamChangedNotification = FOUR_CHAR_CODE('stch'), /* QTSStreamChangedParams* */
+ kQTSStreamGoneNotification = FOUR_CHAR_CODE('stgn'), /* QTSStreamGoneParams* */
+ kQTSPreviewAckNotification = FOUR_CHAR_CODE('pvak'), /* QTSStream */
+ kQTSPrerollAckNotification = FOUR_CHAR_CODE('pack'), /* QTSStream */
+ kQTSStartAckNotification = FOUR_CHAR_CODE('sack'), /* QTSStream */
+ kQTSStopAckNotification = FOUR_CHAR_CODE('xack'), /* QTSStream */
+ kQTSStatusNotification = FOUR_CHAR_CODE('stat'), /* QTSStatusParams* */
+ kQTSURLNotification = FOUR_CHAR_CODE('url '), /* QTSURLParams* */
+ kQTSDurationNotification = FOUR_CHAR_CODE('dura'), /* QTSDurationAtom* */
+ kQTSNewPresentationNotification = FOUR_CHAR_CODE('nprs'), /* QTSPresentation */
+ kQTSPresentationGoneNotification = FOUR_CHAR_CODE('xprs'), /* QTSPresentation */
+ kQTSPresentationDoneNotification = FOUR_CHAR_CODE('pdon'), /* NULL */
+ kQTSBandwidthAlertNotification = FOUR_CHAR_CODE('bwal'), /* QTSBandwidthAlertParams* */
+ kQTSAnnotationsChangedNotification = FOUR_CHAR_CODE('meta') /* NULL */
+};
+
+
+/* flags for QTSErrorParams */
+enum {
+ kQTSFatalErrorFlag = 0x00000001
+};
+
+
+struct QTSErrorParams {
+ const char * errorString;
+ SInt32 flags;
+};
+typedef struct QTSErrorParams QTSErrorParams;
+
+struct QTSNewPresDetectedParams {
+ void * data;
+};
+typedef struct QTSNewPresDetectedParams QTSNewPresDetectedParams;
+
+struct QTSNewStreamParams {
+ QTSStream stream;
+};
+typedef struct QTSNewStreamParams QTSNewStreamParams;
+
+struct QTSStreamChangedParams {
+ QTSStream stream;
+ ComponentInstance mediaComponent; /* could be NULL */
+};
+typedef struct QTSStreamChangedParams QTSStreamChangedParams;
+
+struct QTSStreamGoneParams {
+ QTSStream stream;
+};
+typedef struct QTSStreamGoneParams QTSStreamGoneParams;
+
+struct QTSStatusParams {
+ UInt32 status;
+ const char * statusString;
+ UInt32 detailedStatus;
+ const char * detailedStatusString;
+};
+typedef struct QTSStatusParams QTSStatusParams;
+
+struct QTSInfoParams {
+ OSType infoType;
+ void * infoParams;
+};
+typedef struct QTSInfoParams QTSInfoParams;
+
+struct QTSURLParams {
+ UInt32 urlLength;
+ const char * url;
+};
+typedef struct QTSURLParams QTSURLParams;
+enum {
+ kQTSBandwidthAlertNeedToStop = 1 << 0,
+ kQTSBandwidthAlertRestartAt = 1 << 1
+};
+
+
+struct QTSBandwidthAlertParams {
+ SInt32 flags;
+ TimeValue restartAt; /* new field in QT 4.1*/
+ void * reserved;
+};
+typedef struct QTSBandwidthAlertParams QTSBandwidthAlertParams;
+/*============================================================================
+ Presentation
+============================================================================*/
+/*-----------------------------------------
+ Flags
+-----------------------------------------*/
+/* flags for NewPresentationFromData */
+enum {
+ kQTSAutoModeFlag = 0x00000001,
+ kQTSDontShowStatusFlag = 0x00000008,
+ kQTSSendMediaFlag = 0x00010000,
+ kQTSReceiveMediaFlag = 0x00020000
+};
+
+
+struct QTSNewPresentationParams {
+ OSType dataType;
+ const void * data;
+ UInt32 dataLength;
+ QTSEditListHandle editList;
+ SInt32 flags;
+ TimeScale timeScale; /* set to 0 for default timescale */
+ QTSMediaParams * mediaParams;
+ QTSNotificationUPP notificationProc;
+ void * notificationRefCon;
+};
+typedef struct QTSNewPresentationParams QTSNewPresentationParams;
+
+struct QTSPresParams {
+ UInt32 version;
+ QTSEditListHandle editList;
+ SInt32 flags;
+ TimeScale timeScale; /* set to 0 for default timescale */
+ QTSMediaParams * mediaParams;
+ QTSNotificationUPP notificationProc;
+ void * notificationRefCon;
+};
+typedef struct QTSPresParams QTSPresParams;
+enum {
+ kQTSPresParamsVersion1 = 1
+};
+
+
+
+
+struct QTSPresIdleParams {
+ QTSStream stream;
+ TimeValue64 movieTimeToDisplay;
+ SInt32 flagsIn;
+ SInt32 flagsOut;
+};
+typedef struct QTSPresIdleParams QTSPresIdleParams;
+
+enum {
+ kQTSExportFlag_ShowDialog = 0x00000001
+};
+
+enum {
+ kQTSExportParamsVersion1 = 1
+};
+
+
+struct QTSExportParams {
+ SInt32 version;
+ OSType exportType;
+ void * exportExtraData;
+ OSType destinationContainerType;
+ void * destinationContainerData;
+ void * destinationContainerExtras;
+ SInt32 flagsIn;
+ SInt32 flagsOut;
+ QTSModalFilterUPP filterProc;
+ void * filterProcRefCon;
+ Component exportComponent; /* NULL unless you want to override */
+};
+typedef struct QTSExportParams QTSExportParams;
+/*-----------------------------------------
+ Toolbox Init/Close
+-----------------------------------------*/
+/* all "apps" must call this */
+EXTERN_API_C( OSErr )
+InitializeQTS (void);
+
+EXTERN_API_C( OSErr )
+TerminateQTS (void);
+
+/*-----------------------------------------
+ Presentation Functions
+-----------------------------------------*/
+EXTERN_API_C( OSErr )
+QTSNewPresentation (const QTSNewPresentationParams * inParams,
+ QTSPresentation * outPresentation);
+
+EXTERN_API_C( OSErr )
+QTSNewPresentationFromData (OSType inDataType,
+ const void * inData,
+ const SInt64 * inDataLength,
+ const QTSPresParams * inPresParams,
+ QTSPresentation * outPresentation);
+
+EXTERN_API_C( OSErr )
+QTSNewPresentationFromFile (const FSSpec * inFileSpec,
+ const QTSPresParams * inPresParams,
+ QTSPresentation * outPresentation);
+
+EXTERN_API_C( OSErr )
+QTSNewPresentationFromDataRef (Handle inDataRef,
+ OSType inDataRefType,
+ const QTSPresParams * inPresParams,
+ QTSPresentation * outPresentation);
+
+EXTERN_API_C( OSErr )
+QTSDisposePresentation (QTSPresentation inPresentation,
+ SInt32 inFlags);
+
+EXTERN_API_C( OSErr )
+QTSPresExport (QTSPresentation inPresentation,
+ QTSStream inStream,
+ QTSExportParams * inExportParams);
+
+EXTERN_API_C( void )
+QTSPresIdle (QTSPresentation inPresentation,
+ QTSPresIdleParams * ioParams);
+
+EXTERN_API_C( OSErr )
+QTSPresInvalidateRegion (QTSPresentation inPresentation,
+ RgnHandle inRegion);
+
+/*-----------------------------------------
+ Presentation Configuration
+-----------------------------------------*/
+EXTERN_API_C( OSErr )
+QTSPresSetFlags (QTSPresentation inPresentation,
+ SInt32 inFlags,
+ SInt32 inFlagsMask);
+
+EXTERN_API_C( OSErr )
+QTSPresGetFlags (QTSPresentation inPresentation,
+ SInt32 * outFlags);
+
+EXTERN_API_C( OSErr )
+QTSPresGetTimeBase (QTSPresentation inPresentation,
+ TimeBase * outTimeBase);
+
+EXTERN_API_C( OSErr )
+QTSPresGetTimeScale (QTSPresentation inPresentation,
+ TimeScale * outTimeScale);
+
+EXTERN_API_C( OSErr )
+QTSPresSetInfo (QTSPresentation inPresentation,
+ QTSStream inStream,
+ OSType inSelector,
+ void * ioParam);
+
+EXTERN_API_C( OSErr )
+QTSPresGetInfo (QTSPresentation inPresentation,
+ QTSStream inStream,
+ OSType inSelector,
+ void * ioParam);
+
+EXTERN_API_C( OSErr )
+QTSPresHasCharacteristic (QTSPresentation inPresentation,
+ QTSStream inStream,
+ OSType inCharacteristic,
+ Boolean * outHasIt);
+
+EXTERN_API_C( OSErr )
+QTSPresSetNotificationProc (QTSPresentation inPresentation,
+ QTSNotificationUPP inNotificationProc,
+ void * inRefCon);
+
+EXTERN_API_C( OSErr )
+QTSPresGetNotificationProc (QTSPresentation inPresentation,
+ QTSNotificationUPP * outNotificationProc,
+ void ** outRefCon);
+
+/*-----------------------------------------
+ Presentation Control
+-----------------------------------------*/
+EXTERN_API_C( OSErr )
+QTSPresPreview (QTSPresentation inPresentation,
+ QTSStream inStream,
+ const TimeValue64 * inTimeValue,
+ Fixed inRate,
+ SInt32 inFlags);
+
+EXTERN_API_C( OSErr )
+QTSPresPreroll (QTSPresentation inPresentation,
+ QTSStream inStream,
+ UInt32 inTimeValue,
+ Fixed inRate,
+ SInt32 inFlags);
+
+EXTERN_API_C( OSErr )
+QTSPresPreroll64 (QTSPresentation inPresentation,
+ QTSStream inStream,
+ const TimeValue64 * inPrerollTime,
+ Fixed inRate,
+ SInt32 inFlags);
+
+EXTERN_API_C( OSErr )
+QTSPresStart (QTSPresentation inPresentation,
+ QTSStream inStream,
+ SInt32 inFlags);
+
+EXTERN_API_C( OSErr )
+QTSPresSkipTo (QTSPresentation inPresentation,
+ UInt32 inTimeValue);
+
+EXTERN_API_C( OSErr )
+QTSPresSkipTo64 (QTSPresentation inPresentation,
+ const TimeValue64 * inTimeValue);
+
+EXTERN_API_C( OSErr )
+QTSPresStop (QTSPresentation inPresentation,
+ QTSStream inStream,
+ SInt32 inFlags);
+
+/*============================================================================
+ Streams
+============================================================================*/
+/*-----------------------------------------
+ Stream Functions
+-----------------------------------------*/
+EXTERN_API_C( OSErr )
+QTSPresNewStream (QTSPresentation inPresentation,
+ OSType inDataType,
+ const void * inData,
+ UInt32 inDataLength,
+ SInt32 inFlags,
+ QTSStream * outStream);
+
+EXTERN_API_C( OSErr )
+QTSDisposeStream (QTSStream inStream,
+ SInt32 inFlags);
+
+EXTERN_API_C( UInt32 )
+QTSPresGetNumStreams (QTSPresentation inPresentation);
+
+EXTERN_API_C( QTSStream )
+QTSPresGetIndStream (QTSPresentation inPresentation,
+ UInt32 inIndex);
+
+EXTERN_API_C( QTSPresentation )
+QTSGetStreamPresentation (QTSStream inStream);
+
+EXTERN_API_C( OSErr )
+QTSPresSetPreferredRate (QTSPresentation inPresentation,
+ Fixed inRate,
+ SInt32 inFlags);
+
+EXTERN_API_C( OSErr )
+QTSPresGetPreferredRate (QTSPresentation inPresentation,
+ Fixed * outRate);
+
+EXTERN_API_C( OSErr )
+QTSPresSetEnable (QTSPresentation inPresentation,
+ QTSStream inStream,
+ Boolean inEnableMode);
+
+EXTERN_API_C( OSErr )
+QTSPresGetEnable (QTSPresentation inPresentation,
+ QTSStream inStream,
+ Boolean * outEnableMode);
+
+EXTERN_API_C( OSErr )
+QTSPresSetPresenting (QTSPresentation inPresentation,
+ QTSStream inStream,
+ Boolean inPresentingMode);
+
+EXTERN_API_C( OSErr )
+QTSPresGetPresenting (QTSPresentation inPresentation,
+ QTSStream inStream,
+ Boolean * outPresentingMode);
+
+EXTERN_API_C( OSErr )
+QTSPresSetActiveSegment (QTSPresentation inPresentation,
+ QTSStream inStream,
+ const TimeValue64 * inStartTime,
+ const TimeValue64 * inDuration);
+
+EXTERN_API_C( OSErr )
+QTSPresGetActiveSegment (QTSPresentation inPresentation,
+ QTSStream inStream,
+ TimeValue64 * outStartTime,
+ TimeValue64 * outDuration);
+
+EXTERN_API_C( OSErr )
+QTSPresSetPlayHints (QTSPresentation inPresentation,
+ QTSStream inStream,
+ SInt32 inFlags,
+ SInt32 inFlagsMask);
+
+EXTERN_API_C( OSErr )
+QTSPresGetPlayHints (QTSPresentation inPresentation,
+ QTSStream inStream,
+ SInt32 * outFlags);
+
+/*-----------------------------------------
+ Stream Spatial Functions
+-----------------------------------------*/
+EXTERN_API_C( OSErr )
+QTSPresSetGWorld (QTSPresentation inPresentation,
+ QTSStream inStream,
+ CGrafPtr inGWorld,
+ GDHandle inGDHandle);
+
+EXTERN_API_C( OSErr )
+QTSPresGetGWorld (QTSPresentation inPresentation,
+ QTSStream inStream,
+ CGrafPtr * outGWorld,
+ GDHandle * outGDHandle);
+
+EXTERN_API_C( OSErr )
+QTSPresSetClip (QTSPresentation inPresentation,
+ QTSStream inStream,
+ RgnHandle inClip);
+
+EXTERN_API_C( OSErr )
+QTSPresGetClip (QTSPresentation inPresentation,
+ QTSStream inStream,
+ RgnHandle * outClip);
+
+EXTERN_API_C( OSErr )
+QTSPresSetMatrix (QTSPresentation inPresentation,
+ QTSStream inStream,
+ const MatrixRecord * inMatrix);
+
+EXTERN_API_C( OSErr )
+QTSPresGetMatrix (QTSPresentation inPresentation,
+ QTSStream inStream,
+ MatrixRecord * outMatrix);
+
+EXTERN_API_C( OSErr )
+QTSPresSetDimensions (QTSPresentation inPresentation,
+ QTSStream inStream,
+ Fixed inWidth,
+ Fixed inHeight);
+
+EXTERN_API_C( OSErr )
+QTSPresGetDimensions (QTSPresentation inPresentation,
+ QTSStream inStream,
+ Fixed * outWidth,
+ Fixed * outHeight);
+
+EXTERN_API_C( OSErr )
+QTSPresSetGraphicsMode (QTSPresentation inPresentation,
+ QTSStream inStream,
+ short inMode,
+ const RGBColor * inOpColor);
+
+EXTERN_API_C( OSErr )
+QTSPresGetGraphicsMode (QTSPresentation inPresentation,
+ QTSStream inStream,
+ short * outMode,
+ RGBColor * outOpColor);
+
+EXTERN_API_C( OSErr )
+QTSPresGetPicture (QTSPresentation inPresentation,
+ QTSStream inStream,
+ PicHandle * outPicture);
+
+/*-----------------------------------------
+ Stream Sound Functions
+-----------------------------------------*/
+EXTERN_API_C( OSErr )
+QTSPresSetVolumes (QTSPresentation inPresentation,
+ QTSStream inStream,
+ short inLeftVolume,
+ short inRightVolume);
+
+EXTERN_API_C( OSErr )
+QTSPresGetVolumes (QTSPresentation inPresentation,
+ QTSStream inStream,
+ short * outLeftVolume,
+ short * outRightVolume);
+
+/*-----------------------------------------
+ Sourcing
+-----------------------------------------*/
+EXTERN_API_C( OSErr )
+QTSPresGetSettingsAsText (QTSPresentation inPresentation,
+ QTSStream inStream,
+ SInt32 inFlags,
+ OSType inSettingsType,
+ Handle * outText,
+ QTSPanelFilterUPP inPanelFilterProc,
+ void * inPanelFilterProcRefCon);
+
+EXTERN_API_C( OSErr )
+QTSPresSettingsDialog (QTSPresentation inPresentation,
+ QTSStream inStream,
+ SInt32 inFlags,
+ QTSModalFilterUPP inFilterProc,
+ void * inFilterProcRefCon);
+
+EXTERN_API_C( OSErr )
+QTSPresSettingsDialogWithFilters (QTSPresentation inPresentation,
+ QTSStream inStream,
+ SInt32 inFlags,
+ QTSModalFilterUPP inFilterProc,
+ void * inFilterProcRefCon,
+ QTSPanelFilterUPP inPanelFilterProc,
+ void * inPanelFilterProcRefCon);
+
+EXTERN_API_C( OSErr )
+QTSPresSetSettings (QTSPresentation inPresentation,
+ QTSStream inStream,
+ QTAtomSpecPtr inSettings,
+ SInt32 inFlags);
+
+EXTERN_API_C( OSErr )
+QTSPresGetSettings (QTSPresentation inPresentation,
+ QTSStream inStream,
+ QTAtomContainer * outSettings,
+ SInt32 inFlags);
+
+EXTERN_API_C( OSErr )
+QTSPresAddSourcer (QTSPresentation inPresentation,
+ QTSStream inStream,
+ ComponentInstance inSourcer,
+ SInt32 inFlags);
+
+EXTERN_API_C( OSErr )
+QTSPresRemoveSourcer (QTSPresentation inPresentation,
+ QTSStream inStream,
+ ComponentInstance inSourcer,
+ SInt32 inFlags);
+
+EXTERN_API_C( UInt32 )
+QTSPresGetNumSourcers (QTSPresentation inPresentation,
+ QTSStream inStream);
+
+EXTERN_API_C( OSErr )
+QTSPresGetIndSourcer (QTSPresentation inPresentation,
+ QTSStream inStream,
+ UInt32 inIndex,
+ ComponentInstance * outSourcer);
+
+/*============================================================================
+ Misc
+============================================================================*/
+/* flags for Get/SetNetworkAppName */
+enum {
+ kQTSNetworkAppNameIsFullNameFlag = 0x00000001
+};
+
+EXTERN_API_C( OSErr )
+QTSSetNetworkAppName (const char * inAppName,
+ SInt32 inFlags);
+
+EXTERN_API_C( OSErr )
+QTSGetNetworkAppName (SInt32 inFlags,
+ char ** outCStringPtr);
+
+/*-----------------------------------------
+ Statistics Utilities
+-----------------------------------------*/
+
+struct QTSStatHelperRecord {
+ long data[1];
+};
+typedef struct QTSStatHelperRecord QTSStatHelperRecord;
+
+typedef QTSStatHelperRecord * QTSStatHelper;
+enum {
+ kQTSInvalidStatHelper = 0L
+};
+
+/* flags for QTSStatHelperNextParams */
+enum {
+ kQTSStatHelperReturnPascalStringsFlag = 0x00000001
+};
+
+
+struct QTSStatHelperNextParams {
+ SInt32 flags;
+ OSType returnedStatisticsType;
+ QTSStream returnedStream;
+ UInt32 maxStatNameLength;
+ char * returnedStatName; /* NULL if you don't want it*/
+ UInt32 maxStatStringLength;
+ char * returnedStatString; /* NULL if you don't want it*/
+ UInt32 maxStatUnitLength;
+ char * returnedStatUnit; /* NULL if you don't want it*/
+};
+typedef struct QTSStatHelperNextParams QTSStatHelperNextParams;
+
+struct QTSStatisticsParams {
+ OSType statisticsType;
+ QTAtomContainer container;
+ QTAtom parentAtom;
+ SInt32 flags;
+};
+typedef struct QTSStatisticsParams QTSStatisticsParams;
+/* general statistics types */
+enum {
+ kQTSAllStatisticsType = FOUR_CHAR_CODE('all '),
+ kQTSShortStatisticsType = FOUR_CHAR_CODE('shrt'),
+ kQTSSummaryStatisticsType = FOUR_CHAR_CODE('summ')
+};
+
+/* statistics flags */
+enum {
+ kQTSGetNameStatisticsFlag = 0x00000001,
+ kQTSDontGetDataStatisticsFlag = 0x00000002,
+ kQTSUpdateAtomsStatisticsFlag = 0x00000004,
+ kQTSGetUnitsStatisticsFlag = 0x00000008,
+ kQTSUpdateAllIfNecessaryStatisticsFlag = 0x00010000
+};
+
+/* statistics atom types */
+enum {
+ kQTSStatisticsStreamAtomType = FOUR_CHAR_CODE('strm'),
+ kQTSStatisticsNameAtomType = FOUR_CHAR_CODE('name'), /* chars only, no length or terminator */
+ kQTSStatisticsDataFormatAtomType = FOUR_CHAR_CODE('frmt'), /* OSType */
+ kQTSStatisticsDataAtomType = FOUR_CHAR_CODE('data'),
+ kQTSStatisticsUnitsAtomType = FOUR_CHAR_CODE('unit'), /* OSType */
+ kQTSStatisticsUnitsNameAtomType = FOUR_CHAR_CODE('unin') /* chars only, no length or terminator */
+};
+
+/* statistics data formats */
+enum {
+ kQTSStatisticsSInt32DataFormat = FOUR_CHAR_CODE('si32'),
+ kQTSStatisticsUInt32DataFormat = FOUR_CHAR_CODE('ui32'),
+ kQTSStatisticsSInt16DataFormat = FOUR_CHAR_CODE('si16'),
+ kQTSStatisticsUInt16DataFormat = FOUR_CHAR_CODE('ui16'),
+ kQTSStatisticsFixedDataFormat = FOUR_CHAR_CODE('fixd'),
+ kQTSStatisticsUnsignedFixedDataFormat = FOUR_CHAR_CODE('ufix'),
+ kQTSStatisticsStringDataFormat = FOUR_CHAR_CODE('strg'),
+ kQTSStatisticsOSTypeDataFormat = FOUR_CHAR_CODE('ostp'),
+ kQTSStatisticsRectDataFormat = FOUR_CHAR_CODE('rect'),
+ kQTSStatisticsPointDataFormat = FOUR_CHAR_CODE('pont')
+};
+
+/* statistics units types */
+enum {
+ kQTSStatisticsNoUnitsType = 0,
+ kQTSStatisticsPercentUnitsType = FOUR_CHAR_CODE('pcnt'),
+ kQTSStatisticsBitsPerSecUnitsType = FOUR_CHAR_CODE('bps '),
+ kQTSStatisticsFramesPerSecUnitsType = FOUR_CHAR_CODE('fps ')
+};
+
+/* specific statistics types */
+enum {
+ kQTSTotalDataRateStat = FOUR_CHAR_CODE('drtt'),
+ kQTSTotalDataRateInStat = FOUR_CHAR_CODE('drti'),
+ kQTSTotalDataRateOutStat = FOUR_CHAR_CODE('drto'),
+ kQTSNetworkIDStringStat = FOUR_CHAR_CODE('nids')
+};
+
+EXTERN_API_C( OSErr )
+QTSNewStatHelper (QTSPresentation inPresentation,
+ QTSStream inStream,
+ OSType inStatType,
+ SInt32 inFlags,
+ QTSStatHelper * outStatHelper);
+
+EXTERN_API_C( OSErr )
+QTSDisposeStatHelper (QTSStatHelper inStatHelper);
+
+EXTERN_API_C( OSErr )
+QTSStatHelperGetStats (QTSStatHelper inStatHelper);
+
+EXTERN_API_C( OSErr )
+QTSStatHelperResetIter (QTSStatHelper inStatHelper);
+
+EXTERN_API_C( Boolean )
+QTSStatHelperNext (QTSStatHelper inStatHelper,
+ QTSStatHelperNextParams * ioParams);
+
+EXTERN_API_C( UInt32 )
+QTSStatHelperGetNumStats (QTSStatHelper inStatHelper);
+
+/* used by components to put statistics into the atom container */
+EXTERN_API_C( OSErr )
+QTSGetOrMakeStatAtomForStream (QTAtomContainer inContainer,
+ QTSStream inStream,
+ QTAtom * outParentAtom);
+
+EXTERN_API_C( OSErr )
+QTSInsertStatistic (QTAtomContainer inContainer,
+ QTAtom inParentAtom,
+ OSType inStatType,
+ void * inStatData,
+ UInt32 inStatDataLength,
+ OSType inStatDataFormat,
+ SInt32 inFlags);
+
+EXTERN_API_C( OSErr )
+QTSInsertStatisticName (QTAtomContainer inContainer,
+ QTAtom inParentAtom,
+ OSType inStatType,
+ const char * inStatName,
+ UInt32 inStatNameLength);
+
+EXTERN_API_C( OSErr )
+QTSInsertStatisticUnits (QTAtomContainer inContainer,
+ QTAtom inParentAtom,
+ OSType inStatType,
+ OSType inUnitsType,
+ const char * inUnitsName,
+ UInt32 inUnitsNameLength);
+
+/*============================================================================
+ Data Formats
+============================================================================*/
+/*-----------------------------------------
+ Data Types
+-----------------------------------------*/
+/* universal data types */
+enum {
+ kQTSNullDataType = FOUR_CHAR_CODE('NULL'),
+ kQTSUnknownDataType = FOUR_CHAR_CODE('huh?'),
+ kQTSAtomContainerDataType = FOUR_CHAR_CODE('qtac'), /* QTAtomContainer */
+ kQTSAtomDataType = FOUR_CHAR_CODE('qtat'), /* QTSAtomContainerDataStruct* */
+ kQTSAliasDataType = FOUR_CHAR_CODE('alis'),
+ kQTSFileDataType = FOUR_CHAR_CODE('fspc'), /* FSSpec* */
+ kQTSFileSpecDataType = FOUR_CHAR_CODE('fspc'), /* FSSpec* */
+ kQTSHandleDataType = FOUR_CHAR_CODE('hndl'), /* Handle* */
+ kQTSDataRefDataType = FOUR_CHAR_CODE('dref') /* DataReferencePtr */
+};
+
+/* these data types are specific to presentations */
+enum {
+ kQTSRTSPDataType = FOUR_CHAR_CODE('rtsp'),
+ kQTSSDPDataType = FOUR_CHAR_CODE('sdp ')
+};
+
+/*-----------------------------------------
+ Atom IDs
+-----------------------------------------*/
+enum {
+ kQTSAtomType_Presentation = FOUR_CHAR_CODE('pres'),
+ kQTSAtomType_PresentationHeader = FOUR_CHAR_CODE('phdr'), /* QTSPresentationHeaderAtom */
+ kQTSAtomType_MediaStream = FOUR_CHAR_CODE('mstr'),
+ kQTSAtomType_MediaStreamHeader = FOUR_CHAR_CODE('mshd'), /* QTSMediaStreamHeaderAtom */
+ kQTSAtomType_MediaDescriptionText = FOUR_CHAR_CODE('mdes'), /* chars, no length */
+ kQTSAtomType_ClipRect = FOUR_CHAR_CODE('clip'), /* QTSClipRectAtom */
+ kQTSAtomType_Duration = FOUR_CHAR_CODE('dura'), /* QTSDurationAtom */
+ kQTSAtomType_BufferTime = FOUR_CHAR_CODE('bufr') /* QTSBufferTimeAtom */
+};
+
+
+struct QTSAtomContainerDataStruct {
+ QTAtomContainer container;
+ QTAtom parentAtom;
+};
+typedef struct QTSAtomContainerDataStruct QTSAtomContainerDataStruct;
+/* flags for QTSPresentationHeaderAtom */
+enum {
+ kQTSPresHeaderTypeIsData = 0x00000100,
+ kQTSPresHeaderDataIsHandle = 0x00000200
+};
+
+
+struct QTSPresentationHeaderAtom {
+ SInt32 versionAndFlags;
+ OSType conductorOrDataType;
+ OSType dataAtomType; /* where the data really is*/
+};
+typedef struct QTSPresentationHeaderAtom QTSPresentationHeaderAtom;
+
+struct QTSMediaStreamHeaderAtom {
+ SInt32 versionAndFlags;
+ OSType mediaTransportType;
+ OSType mediaTransportDataAID; /* where the data really is*/
+};
+typedef struct QTSMediaStreamHeaderAtom QTSMediaStreamHeaderAtom;
+
+struct QTSBufferTimeAtom {
+ SInt32 versionAndFlags;
+ Fixed bufferTime;
+};
+typedef struct QTSBufferTimeAtom QTSBufferTimeAtom;
+
+struct QTSDurationAtom {
+ SInt32 versionAndFlags;
+ TimeScale timeScale;
+ TimeValue64 duration;
+};
+typedef struct QTSDurationAtom QTSDurationAtom;
+
+struct QTSClipRectAtom {
+ SInt32 versionAndFlags;
+ Rect clipRect;
+};
+typedef struct QTSClipRectAtom QTSClipRectAtom;
+enum {
+ kQTSEmptyEditStreamStartTime = -1
+};
+
+
+typedef UInt32 QTSStatus;
+enum {
+ kQTSNullStatus = 0,
+ kQTSUninitializedStatus = 1,
+ kQTSConnectingStatus = 2,
+ kQTSOpeningConnectionDetailedStatus = 3,
+ kQTSMadeConnectionDetailedStatus = 4,
+ kQTSNegotiatingStatus = 5,
+ kQTSGettingDescriptionDetailedStatus = 6,
+ kQTSGotDescriptionDetailedStatus = 7,
+ kQTSSentSetupCmdDetailedStatus = 8,
+ kQTSReceivedSetupResponseDetailedStatus = 9,
+ kQTSSentPlayCmdDetailedStatus = 10,
+ kQTSReceivedPlayResponseDetailedStatus = 11,
+ kQTSBufferingStatus = 12,
+ kQTSPlayingStatus = 13,
+ kQTSPausedStatus = 14,
+ kQTSAutoConfiguringStatus = 15,
+ kQTSDownloadingStatus = 16,
+ kQTSBufferingWithTimeStatus = 17,
+ kQTSWaitingDisconnectStatus = 100
+};
+
+/*-----------------------------------------
+ QuickTime Preferences Types
+-----------------------------------------*/
+enum {
+ kQTSConnectionPrefsType = FOUR_CHAR_CODE('stcm'), /* root atom that all other atoms are contained in*/
+ /* kQTSNotUsedForProxyPrefsType = 'nopr', // comma-delimited list of URLs that are never used for proxies*/
+ kQTSConnectionMethodPrefsType = FOUR_CHAR_CODE('mthd'), /* connection method (OSType that matches one of the following three)*/
+ kQTSDirectConnectPrefsType = FOUR_CHAR_CODE('drct'), /* used if direct connect (QTSDirectConnectPrefsRecord)*/
+ /* kQTSRTSPProxyPrefsType = 'rtsp', // used if RTSP Proxy (QTSProxyPrefsRecord)*/
+ kQTSSOCKSPrefsType = FOUR_CHAR_CODE('sock') /* used if SOCKS Proxy (QTSProxyPrefsRecord)*/
+};
+
+enum {
+ kQTSDirectConnectHTTPProtocol = FOUR_CHAR_CODE('http'),
+ kQTSDirectConnectRTSPProtocol = FOUR_CHAR_CODE('rtsp')
+};
+
+
+struct QTSDirectConnectPrefsRecord {
+ UInt32 tcpPortID;
+ OSType protocol;
+};
+typedef struct QTSDirectConnectPrefsRecord QTSDirectConnectPrefsRecord;
+
+struct QTSProxyPrefsRecord {
+ Str255 serverNameStr;
+ UInt32 portID;
+};
+typedef struct QTSProxyPrefsRecord QTSProxyPrefsRecord;
+#define kQTSTransAndProxyPrefsVersNum 2 /* prefs atom format version */
+enum {
+ kConnectionActive = (1L << 0),
+ kConnectionUseSystemPref = (1L << 1)
+};
+
+
+struct QTSTransportPref {
+ OSType protocol; /* udp, http, tcp, etc*/
+ SInt32 portID; /* port to use for this connection type*/
+ UInt32 flags; /* connection flags*/
+ UInt32 seed; /* seed value last time this setting was read from system prefs*/
+};
+typedef struct QTSTransportPref QTSTransportPref;
+enum {
+ kProxyActive = (1L << 0),
+ kProxyUseSystemPref = (1L << 1)
+};
+
+
+struct QTSProxyPref {
+ UInt32 flags; /* proxy flags*/
+ SInt32 portID; /* port to use for this connection type*/
+ UInt32 seed; /* seed value last time this setting was read from system prefs*/
+ Str255 serverNameStr; /* proxy server url*/
+};
+typedef struct QTSProxyPref QTSProxyPref;
+enum {
+ kNoProxyUseSystemPref = (1L << 0)
+};
+
+
+struct QTSNoProxyPref {
+ UInt32 flags; /* no-proxy flags*/
+ UInt32 seed; /* seed value last time this setting was read from system prefs*/
+ char urlList[1]; /* NULL terminated, comma delimited list of urls*/
+};
+typedef struct QTSNoProxyPref QTSNoProxyPref;
+enum {
+ kQTSInstantOnFlag_Enable = (1L << 0), /* instant on is enabled (read/write)*/
+ kQTSInstantOnFlag_Permitted = (1L << 1) /* instant on is possible (read only)*/
+};
+
+
+
+struct QTSInstantOnPref {
+ SInt32 flags; /* flags*/
+ SInt32 factor; /* 0-100; default is 50*/
+};
+typedef struct QTSInstantOnPref QTSInstantOnPref;
+enum {
+ kQTSTransAndProxyAtomType = FOUR_CHAR_CODE('strp'), /* transport/proxy prefs root atom*/
+ kQTSConnectionPrefsVersion = FOUR_CHAR_CODE('vers'), /* prefs format version*/
+ kQTSTransportPrefsAtomType = FOUR_CHAR_CODE('trns'), /* tranport prefs root atom*/
+ kQTSConnectionAtomType = FOUR_CHAR_CODE('conn'), /* connection prefs atom type, one for each transport type*/
+ kQTSUDPTransportType = FOUR_CHAR_CODE('udp '), /* udp transport prefs*/
+ kQTSHTTPTransportType = FOUR_CHAR_CODE('http'), /* http transport prefs*/
+ kQTSTCPTransportType = FOUR_CHAR_CODE('tcp '), /* tcp transport prefs */
+ kQTSProxyPrefsAtomType = FOUR_CHAR_CODE('prxy'), /* proxy prefs root atom*/
+ kQTSHTTPProxyPrefsType = FOUR_CHAR_CODE('http'), /* http proxy settings*/
+ kQTSRTSPProxyPrefsType = FOUR_CHAR_CODE('rtsp'), /* rtsp proxy settings*/
+ kQTSSOCKSProxyPrefsType = FOUR_CHAR_CODE('sock'), /* socks proxy settings*/
+ kQTSProxyUserInfoPrefsType = FOUR_CHAR_CODE('user'), /* proxy username/password root atom*/
+ kQTSDontProxyPrefsAtomType = FOUR_CHAR_CODE('nopr'), /* no-proxy prefs root atom*/
+ kQTSDontProxyDataType = FOUR_CHAR_CODE('data'), /* no proxy settings*/
+ kQTSInstantOnPrefsAtomType = FOUR_CHAR_CODE('inon') /* instant on prefs*/
+};
+
+EXTERN_API_C( OSErr )
+QTSPrefsAddProxySetting (OSType proxyType,
+ SInt32 portID,
+ UInt32 flags,
+ UInt32 seed,
+ Str255 srvrURL);
+
+EXTERN_API_C( OSErr )
+QTSPrefsFindProxyByType (OSType proxyType,
+ UInt32 flags,
+ UInt32 flagsMask,
+ QTSProxyPref ** proxyHndl,
+ SInt16 * count);
+
+EXTERN_API_C( OSErr )
+QTSPrefsAddConnectionSetting (OSType protocol,
+ SInt32 portID,
+ UInt32 flags,
+ UInt32 seed);
+
+EXTERN_API_C( OSErr )
+QTSPrefsFindConnectionByType (OSType protocol,
+ UInt32 flags,
+ UInt32 flagsMask,
+ QTSTransportPref ** connectionHndl,
+ SInt16 * count);
+
+EXTERN_API_C( OSErr )
+QTSPrefsGetActiveConnection (OSType protocol,
+ QTSTransportPref * connectInfo);
+
+EXTERN_API_C( OSErr )
+QTSPrefsGetNoProxyURLs (QTSNoProxyPref ** noProxyHndl);
+
+EXTERN_API_C( OSErr )
+QTSPrefsSetNoProxyURLs (char * urls,
+ UInt32 flags,
+ UInt32 seed);
+
+EXTERN_API_C( OSErr )
+QTSPrefsAddProxyUserInfo (OSType proxyType,
+ SInt32 flags,
+ SInt32 flagsMask,
+ StringPtr username,
+ StringPtr password);
+
+EXTERN_API_C( OSErr )
+QTSPrefsFindProxyUserInfoByType (OSType proxyType,
+ SInt32 flags,
+ SInt32 flagsMask,
+ StringPtr username,
+ StringPtr password);
+
+EXTERN_API_C( OSErr )
+QTSPrefsGetInstantOnSettings (QTSInstantOnPref * outPref,
+ SInt32 inFlags);
+
+EXTERN_API_C( OSErr )
+QTSPrefsSetInstantOnSettings (QTSInstantOnPref * inPref,
+ SInt32 inFlags);
+
+
+
+/*============================================================================
+ Memory Management Services
+============================================================================*/
+/*
+ These routines allocate normal pointers and handles,
+ but do the correct checking, etc.
+ Dispose using the normal DisposePtr and DisposeHandle
+ Call these routines for one time memory allocations.
+ You do not need to set any hints to use these calls.
+*/
+
+EXTERN_API_C( Ptr )
+QTSNewPtr (UInt32 inByteCount,
+ SInt32 inFlags,
+ SInt32 * outFlags);
+
+EXTERN_API_C( Handle )
+QTSNewHandle (UInt32 inByteCount,
+ SInt32 inFlags,
+ SInt32 * outFlags);
+
+#define QTSNewPtrClear(_s) QTSNewPtr((_s), kQTSMemAllocClearMem, NULL)
+#define QTSNewHandleClear(_s) QTSNewHandle((_s), kQTSMemAllocClearMem, NULL)
+/* flags in*/
+enum {
+ kQTSMemAllocClearMem = 0x00000001,
+ kQTSMemAllocDontUseTempMem = 0x00000002,
+ kQTSMemAllocTryTempMemFirst = 0x00000004,
+ kQTSMemAllocDontUseSystemMem = 0x00000008,
+ kQTSMemAllocTrySystemMemFirst = 0x00000010,
+ kQTSMemAllocHoldMemory = 0x00001000,
+ kQTSMemAllocIsInterruptTime = 0x01010000 /* currently not supported for alloc*/
+};
+
+/* flags out*/
+enum {
+ kQTSMemAllocAllocatedInTempMem = 0x00000001,
+ kQTSMemAllocAllocatedInSystemMem = 0x00000002
+};
+
+typedef struct OpaqueQTSMemPtr* QTSMemPtr;
+/*
+ These routines are for buffers that will be recirculated
+ you must use QTReleaseMemPtr instead of DisposePtr
+ QTSReleaseMemPtr can be used at interrupt time
+ but QTSAllocMemPtr currently cannot
+*/
+EXTERN_API_C( QTSMemPtr )
+QTSAllocMemPtr (UInt32 inByteCount,
+ SInt32 inFlags);
+
+EXTERN_API_C( void )
+QTSReleaseMemPtr (QTSMemPtr inMemPtr,
+ SInt32 inFlags);
+
+
+/*============================================================================
+ Buffer Management Services
+============================================================================*/
+
+enum {
+ kQTSStreamBufferVersion1 = 1
+};
+
+
+struct QTSStreamBuffer {
+ struct QTSStreamBuffer * reserved1;
+ struct QTSStreamBuffer * reserved2;
+ struct QTSStreamBuffer * next; /* next message block in a message */
+ unsigned char * rptr; /* first byte with real data in the DataBuffer */
+ unsigned char * wptr; /* last+1 byte with real data in the DataBuffer */
+ SInt32 version;
+ UInt32 metadata[4]; /* usage defined by message sender */
+ SInt32 flags; /* reserved */
+ long reserved3;
+ long reserved4;
+ long reserved5;
+
+ UInt32 moreMeta[8];
+};
+typedef struct QTSStreamBuffer QTSStreamBuffer;
+/* flags for QTSDuplicateMessage*/
+enum {
+ kQTSDuplicateBufferFlag_CopyData = 0x00000001,
+ kQTSDuplicateBufferFlag_FlattenMessage = 0x00000002
+};
+
+
+EXTERN_API_C( OSErr )
+QTSNewStreamBuffer (UInt32 inDataSize,
+ SInt32 inFlags,
+ QTSStreamBuffer ** outStreamBuffer);
+
+EXTERN_API_C( void )
+QTSFreeMessage (QTSStreamBuffer * inMessage);
+
+/*
+ kQTSDuplicateBufferFlag_CopyData - forces a copy of the data itself
+ kQTSCopyBufferFlag_FlattenMessage - copies the data if it needs to be flattened
+ QTSDuplicateMessage never frees the old message
+*/
+EXTERN_API_C( OSErr )
+QTSDuplicateMessage (QTSStreamBuffer * inMessage,
+ SInt32 inFlags,
+ QTSStreamBuffer ** outDuplicatedMessage);
+
+EXTERN_API_C( UInt32 )
+QTSMessageLength (QTSStreamBuffer * inMessage);
+
+EXTERN_API_C( void )
+QTSStreamBufferDataInfo (QTSStreamBuffer * inStreamBuffer,
+ unsigned char ** outDataStart,
+ UInt32 * outDataMaxLength);
+
+/* ---- old calls (don't use these)*/
+
+EXTERN_API_C( QTSStreamBuffer *)
+QTSAllocBuffer (SInt32 inSize);
+
+EXTERN_API_C( QTSStreamBuffer *)
+QTSDupMessage (QTSStreamBuffer * inMessage);
+
+EXTERN_API_C( QTSStreamBuffer *)
+QTSCopyMessage (QTSStreamBuffer * inMessage);
+
+EXTERN_API_C( QTSStreamBuffer *)
+QTSFlattenMessage (QTSStreamBuffer * inMessage);
+
+
+
+/*============================================================================
+ Misc
+============================================================================*/
+EXTERN_API_C( Boolean )
+QTSGetErrorString (SInt32 inErrorCode,
+ UInt32 inMaxErrorStringLength,
+ char * outErrorString,
+ SInt32 inFlags);
+
+EXTERN_API_C( OSErr )
+QTSInitializeMediaParams (QTSMediaParams * inMediaParams);
+
+
+
+/* UPP call backs */
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(QTSNotificationUPP)
+ NewQTSNotificationUPP (QTSNotificationProcPtr userRoutine);
+
+ EXTERN_API(QTSPanelFilterUPP)
+ NewQTSPanelFilterUPP (QTSPanelFilterProcPtr userRoutine);
+
+ EXTERN_API(QTSModalFilterUPP)
+ NewQTSModalFilterUPP (QTSModalFilterProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeQTSNotificationUPP (QTSNotificationUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeQTSPanelFilterUPP (QTSPanelFilterUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeQTSModalFilterUPP (QTSModalFilterUPP userUPP);
+
+ EXTERN_API(ComponentResult)
+ InvokeQTSNotificationUPP (ComponentResult inErr,
+ OSType inNotificationType,
+ void * inNotificationParams,
+ void * inRefCon,
+ QTSNotificationUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeQTSPanelFilterUPP (QTSPanelFilterParams * inParams,
+ void * inRefCon,
+ QTSPanelFilterUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeQTSModalFilterUPP (DialogPtr inDialog,
+ const EventRecord * inEvent,
+ SInt16 * ioItemHit,
+ void * inRefCon,
+ QTSModalFilterUPP userUPP);
+
+#else
+ enum { uppQTSNotificationProcInfo = 0x00003FF0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppQTSPanelFilterProcInfo = 0x000003D0 }; /* pascal 1_byte Func(4_bytes, 4_bytes) */
+ enum { uppQTSModalFilterProcInfo = 0x00003FD0 }; /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewQTSNotificationUPP(userRoutine) (QTSNotificationUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTSNotificationProcInfo, GetCurrentArchitecture())
+ #define NewQTSPanelFilterUPP(userRoutine) (QTSPanelFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTSPanelFilterProcInfo, GetCurrentArchitecture())
+ #define NewQTSModalFilterUPP(userRoutine) (QTSModalFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTSModalFilterProcInfo, GetCurrentArchitecture())
+ #define DisposeQTSNotificationUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeQTSPanelFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeQTSModalFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeQTSNotificationUPP(inErr, inNotificationType, inNotificationParams, inRefCon, userUPP) (ComponentResult)CALL_FOUR_PARAMETER_UPP((userUPP), uppQTSNotificationProcInfo, (inErr), (inNotificationType), (inNotificationParams), (inRefCon))
+ #define InvokeQTSPanelFilterUPP(inParams, inRefCon, userUPP) (Boolean)CALL_TWO_PARAMETER_UPP((userUPP), uppQTSPanelFilterProcInfo, (inParams), (inRefCon))
+ #define InvokeQTSModalFilterUPP(inDialog, inEvent, ioItemHit, inRefCon, userUPP) (Boolean)CALL_FOUR_PARAMETER_UPP((userUPP), uppQTSModalFilterProcInfo, (inDialog), (inEvent), (ioItemHit), (inRefCon))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewQTSNotificationProc(userRoutine) NewQTSNotificationUPP(userRoutine)
+#define NewQTSPanelFilterProc(userRoutine) NewQTSPanelFilterUPP(userRoutine)
+#define NewQTSModalFilterProc(userRoutine) NewQTSModalFilterUPP(userRoutine)
+#define CallQTSNotificationProc(userRoutine, inErr, inNotificationType, inNotificationParams, inRefCon) InvokeQTSNotificationUPP(inErr, inNotificationType, inNotificationParams, inRefCon, userRoutine)
+#define CallQTSPanelFilterProc(userRoutine, inParams, inRefCon) InvokeQTSPanelFilterUPP(inParams, inRefCon, userRoutine)
+#define CallQTSModalFilterProc(userRoutine, inDialog, inEvent, ioItemHit, inRefCon) InvokeQTSModalFilterUPP(inDialog, inEvent, ioItemHit, inRefCon, userRoutine)
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QUICKTIMESTREAMING__ */
+
diff --git a/include/qt/QuickTimeVR.h b/include/qt/QuickTimeVR.h
new file mode 100644
index 000000000..4d4d26f54
--- /dev/null
+++ b/include/qt/QuickTimeVR.h
@@ -0,0 +1,1171 @@
+/*
+ File: QuickTimeVR.h
+
+ Contains: QuickTime VR interfaces
+
+ Version: Technology: QuickTime VR 5.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1997-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QUICKTIMEVR__
+#define __QUICKTIMEVR__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __DIALOGS__
+#include "Dialogs.h"
+#endif
+
+#ifndef __MOVIES__
+#include "Movies.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+typedef struct OpaqueQTVRInstance* QTVRInstance;
+
+/* Released API Version numbers */
+#define kQTVRAPIMajorVersion05 (0x05)
+#define kQTVRAPIMajorVersion02 (0x02)
+#define kQTVRAPIMinorVersion00 (0x00)
+#define kQTVRAPIMinorVersion01 (0x01)
+#define kQTVRAPIMinorVersion10 (0x10)
+#define kQTVRAPIMinorVersion20 (0x20)
+
+/* Version numbers for the API described in this header */
+#define kQTVRAPIMajorVersion kQTVRAPIMajorVersion05
+#define kQTVRAPIMinorVersion kQTVRAPIMinorVersion00
+
+
+enum {
+ kQTVRControllerSubType = FOUR_CHAR_CODE('ctyp'),
+ kQTVRQTVRType = FOUR_CHAR_CODE('qtvr'),
+ kQTVRPanoramaType = FOUR_CHAR_CODE('pano'),
+ kQTVRObjectType = FOUR_CHAR_CODE('obje'),
+ kQTVROldPanoType = FOUR_CHAR_CODE('STpn'), /* Used in QTVR 1.0 release*/
+ kQTVROldObjectType = FOUR_CHAR_CODE('stna') /* Used in QTVR 1.0 release*/
+};
+
+#if TARGET_OS_MAC && !TARGET_API_MAC_OSX
+#define kQTVRUnknownType '????' /* Unknown node type */
+#else
+#define kQTVRUnknownType '\?\?\?\?' /* Unknown node type */
+#endif /* TARGET_OS_MAC && !TARGET_API_MAC_OSX */
+
+/* QTVR hot spot types*/
+enum {
+ kQTVRHotSpotLinkType = FOUR_CHAR_CODE('link'),
+ kQTVRHotSpotURLType = FOUR_CHAR_CODE('url '),
+ kQTVRHotSpotUndefinedType = FOUR_CHAR_CODE('undf')
+};
+
+/* Special Values for nodeID in QTVRGoToNodeID*/
+enum {
+ kQTVRCurrentNode = 0,
+ kQTVRPreviousNode = (long)0x80000000,
+ kQTVRDefaultNode = (long)0x80000001
+};
+
+/* Panorama correction modes used for the kQTVRImagingCorrection imaging property*/
+enum {
+ kQTVRNoCorrection = 0,
+ kQTVRPartialCorrection = 1,
+ kQTVRFullCorrection = 2
+};
+
+/* Imaging Modes used by QTVRSetImagingProperty, QTVRGetImagingProperty, QTVRUpdate, QTVRBeginUpdate*/
+
+typedef UInt32 QTVRImagingMode;
+enum {
+ kQTVRStatic = 1,
+ kQTVRMotion = 2,
+ kQTVRCurrentMode = 0, /* Special Value for QTVRUpdate*/
+ kQTVRAllModes = 100 /* Special value for QTVRSetProperty*/
+};
+
+/* Imaging Properties used by QTVRSetImagingProperty, QTVRGetImagingProperty*/
+enum {
+ kQTVRImagingCorrection = 1,
+ kQTVRImagingQuality = 2,
+ kQTVRImagingDirectDraw = 3,
+ kQTVRImagingCurrentMode = 100 /* Get Only*/
+};
+
+/* OR the above with kImagingDefaultValue to get/set the default value*/
+enum {
+ kImagingDefaultValue = (long)0x80000000
+};
+
+/* Transition Types used by QTVRSetTransitionProperty, QTVREnableTransition*/
+enum {
+ kQTVRTransitionSwing = 1
+};
+
+/* Transition Properties QTVRSetTransitionProperty*/
+enum {
+ kQTVRTransitionSpeed = 1,
+ kQTVRTransitionDirection = 2
+};
+
+/* Constraint values used to construct value returned by GetConstraintStatus*/
+enum {
+ kQTVRUnconstrained = 0L,
+ kQTVRCantPanLeft = 1L << 0,
+ kQTVRCantPanRight = 1L << 1,
+ kQTVRCantPanUp = 1L << 2,
+ kQTVRCantPanDown = 1L << 3,
+ kQTVRCantZoomIn = 1L << 4,
+ kQTVRCantZoomOut = 1L << 5,
+ kQTVRCantTranslateLeft = 1L << 6,
+ kQTVRCantTranslateRight = 1L << 7,
+ kQTVRCantTranslateUp = 1L << 8,
+ kQTVRCantTranslateDown = 1L << 9
+};
+
+/* Object-only mouse mode values used to construct value returned by QTVRGetCurrentMouseMode*/
+enum {
+ kQTVRPanning = 1L << 0, /* standard objects, "object only" controllers*/
+ kQTVRTranslating = 1L << 1, /* all objects*/
+ kQTVRZooming = 1L << 2, /* all objects*/
+ kQTVRScrolling = 1L << 3, /* standard object arrow scrollers and joystick object*/
+ kQTVRSelecting = 1L << 4 /* object absolute controller*/
+};
+
+/* Properties for use with QTVRSetInteractionProperty/GetInteractionProperty*/
+enum {
+ kQTVRInteractionMouseClickHysteresis = 1, /* pixels within which the mouse is considered not to have moved (UInt16)*/
+ kQTVRInteractionMouseClickTimeout = 2, /* ticks after which a mouse click times out and turns into panning (UInt32)*/
+ kQTVRInteractionPanTiltSpeed = 3, /* control the relative pan/tilt speed from 1 (slowest) to 10 (fastest). (UInt32) Default is 5;*/
+ kQTVRInteractionZoomSpeed = 4, /* control the relative zooming speed from 1 (slowest) to 10 (fastest). (UInt32) Default is 5;*/
+ kQTVRInteractionTranslateOnMouseDown = 101, /* Holding MouseDown with this setting translates zoomed object movies (Boolean)*/
+ kQTVRInteractionMouseMotionScale = 102, /* The maximum angle of rotation caused by dragging across the display window. (* float)*/
+ kQTVRInteractionNudgeMode = 103 /* A QTVRNudgeMode: rotate, translate, or the same as the current mouse mode. Requires QTVR 2.1*/
+};
+
+/* OR the above with kQTVRInteractionDefaultValue to get/set the default value*/
+enum {
+ kQTVRInteractionDefaultValue = (long)0x80000000
+};
+
+
+/* Geometry constants used in QTVRSetBackBufferPrefs, QTVRGetBackBufferSettings, QTVRGetBackBufferMemInfo*/
+enum {
+ kQTVRUseMovieGeometry = 0,
+ kQTVRVerticalCylinder = FOUR_CHAR_CODE('vcyl'),
+ kQTVRHorizontalCylinder = FOUR_CHAR_CODE('hcyl'),
+ kQTVRCube = FOUR_CHAR_CODE('cube')
+};
+
+/* Resolution constants used in QTVRSetBackBufferPrefs, QTVRGetBackBufferSettings, QTVRGetBackBufferMemInfo*/
+enum {
+ kQTVRDefaultRes = 0,
+ kQTVRFullRes = 1L << 0,
+ kQTVRHalfRes = 1L << 1,
+ kQTVRQuarterRes = 1L << 2
+};
+
+/* QTVR-specific pixelFormat constants used in QTVRSetBackBufferPrefs, QTVRGetBackBufferSettings, QTVRGetBackBufferMemInfo*/
+enum {
+ kQTVRUseMovieDepth = 0
+};
+
+/* Cache Size Pref constants used in QTVRSetBackBufferPrefs, QTVRGetBackBufferSettings*/
+enum {
+ kQTVRMinimumCache = -1,
+ kQTVRSuggestedCache = 0,
+ kQTVRFullCache = 1
+};
+
+/* Angular units used by QTVRSetAngularUnits*/
+
+typedef UInt32 QTVRAngularUnits;
+enum {
+ kQTVRDegrees = 0,
+ kQTVRRadians = 1
+};
+
+/* Values for enableFlag parameter in QTVREnableHotSpot*/
+enum {
+ kQTVRHotSpotID = 0,
+ kQTVRHotSpotType = 1,
+ kQTVRAllHotSpots = 2
+};
+
+/* Values for viewParameter for QTVRSet/GetViewParameter*/
+enum {
+ kQTVRPanAngle = 0x0100, /* default units; &float, &float*/
+ kQTVRTiltAngle = 0x0101, /* default units; &float, &float*/
+ kQTVRFieldOfViewAngle = 0x0103, /* default units; &float, &float*/
+ kQTVRViewCenter = 0x0104, /* pixels (per object movies); &QTVRFloatPoint, &QTVRFloatPoint*/
+ kQTVRHotSpotsVisible = 0x0200 /* Boolean, &Boolean*/
+};
+
+/* Values for flagsIn for QTVRSet/GetViewParameter*/
+enum {
+ kQTVRValueIsRelative = 1L << 0, /* Is the value absolute or relative to the current value?*/
+ kQTVRValueIsRate = 1L << 1, /* Is the value absolute or a rate of change to be applied?*/
+ kQTVRValueIsUserPrefRelative = 1L << 2 /* Is the value a percentage of the user rate pref?*/
+};
+
+/* Values for kind parameter in QTVRGet/SetConstraints, QTVRGetViewingLimits*/
+enum {
+ kQTVRPan = 0,
+ kQTVRTilt = 1,
+ kQTVRFieldOfView = 2,
+ kQTVRViewCenterH = 4, /* WrapAndConstrain only*/
+ kQTVRViewCenterV = 5 /* WrapAndConstrain only*/
+};
+
+/* Values for setting parameter in QTVRSetAnimationSetting, QTVRGetAnimationSetting*/
+
+typedef UInt32 QTVRObjectAnimationSetting;
+enum {
+ /* View Frame Animation Settings*/
+ kQTVRPalindromeViewFrames = 1,
+ kQTVRStartFirstViewFrame = 2,
+ kQTVRDontLoopViewFrames = 3,
+ kQTVRPlayEveryViewFrame = 4, /* Requires QTVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10)*/
+ /* View Animation Settings*/
+ kQTVRSyncViewToFrameRate = 16,
+ kQTVRPalindromeViews = 17,
+ kQTVRPlayStreamingViews = 18 /* Requires QTVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10)*/
+};
+
+
+typedef UInt32 QTVRControlSetting;
+enum {
+ kQTVRWrapPan = 1,
+ kQTVRWrapTilt = 2,
+ kQTVRCanZoom = 3,
+ kQTVRReverseHControl = 4,
+ kQTVRReverseVControl = 5,
+ kQTVRSwapHVControl = 6,
+ kQTVRTranslation = 7
+};
+
+
+typedef UInt32 QTVRViewStateType;
+enum {
+ kQTVRDefault = 0,
+ kQTVRCurrent = 2,
+ kQTVRMouseDown = 3
+};
+
+
+typedef UInt32 QTVRNudgeControl;
+enum {
+ kQTVRRight = 0,
+ kQTVRUpRight = 45,
+ kQTVRUp = 90,
+ kQTVRUpLeft = 135,
+ kQTVRLeft = 180,
+ kQTVRDownLeft = 225,
+ kQTVRDown = 270,
+ kQTVRDownRight = 315
+};
+
+
+typedef UInt32 QTVRNudgeMode;
+enum {
+ kQTVRNudgeRotate = 0,
+ kQTVRNudgeTranslate = 1,
+ kQTVRNudgeSameAsMouse = 2
+};
+
+
+/* Flags to control elements of the QTVR control bar (set via mcActionSetFlags) */
+enum {
+ mcFlagQTVRSuppressBackBtn = 1L << 16,
+ mcFlagQTVRSuppressZoomBtns = 1L << 17,
+ mcFlagQTVRSuppressHotSpotBtn = 1L << 18,
+ mcFlagQTVRSuppressTranslateBtn = 1L << 19,
+ mcFlagQTVRSuppressHelpText = 1L << 20,
+ mcFlagQTVRSuppressHotSpotNames = 1L << 21,
+ mcFlagQTVRExplicitFlagSet = 1L << 31 /* bits 0->30 should be interpreted as "explicit on" for the corresponding suppression bits*/
+};
+
+/* Cursor types used in type field of QTVRCursorRecord*/
+enum {
+ kQTVRUseDefaultCursor = 0,
+ kQTVRStdCursorType = 1,
+ kQTVRColorCursorType = 2
+};
+
+/* Values for flags parameter in QTVRMouseOverHotSpot callback*/
+enum {
+ kQTVRHotSpotEnter = 0,
+ kQTVRHotSpotWithin = 1,
+ kQTVRHotSpotLeave = 2
+};
+
+/* Values for flags parameter in QTVRSetPrescreenImagingCompleteProc*/
+enum {
+ kQTVRPreScreenEveryIdle = 1L << 0 /* Requires QTVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10)*/
+};
+
+/* Values for flags field of areasOfInterest in QTVRSetBackBufferImagingProc*/
+enum {
+ kQTVRBackBufferEveryUpdate = 1L << 0,
+ kQTVRBackBufferEveryIdle = 1L << 1,
+ kQTVRBackBufferAlwaysRefresh = 1L << 2,
+ kQTVRBackBufferHorizontal = 1L << 3 /* Requires that backbuffer proc be long-rowBytes aware (gestaltQDHasLongRowBytes)*/
+};
+
+/* Values for flagsIn parameter in QTVRBackBufferImaging callback*/
+enum {
+ kQTVRBackBufferRectVisible = 1L << 0,
+ kQTVRBackBufferWasRefreshed = 1L << 1
+};
+
+/* Values for flagsOut parameter in QTVRBackBufferImaging callback*/
+enum {
+ kQTVRBackBufferFlagDidDraw = 1L << 0,
+ kQTVRBackBufferFlagLastFlag = 1L << 31
+};
+
+/* QTVRCursorRecord used in QTVRReplaceCursor*/
+
+struct QTVRCursorRecord {
+ UInt16 theType; /* field was previously named "type"*/
+ SInt16 rsrcID;
+ Handle handle;
+};
+typedef struct QTVRCursorRecord QTVRCursorRecord;
+
+struct QTVRFloatPoint {
+ float x;
+ float y;
+};
+typedef struct QTVRFloatPoint QTVRFloatPoint;
+/* Struct used for areasOfInterest parameter in QTVRSetBackBufferImagingProc*/
+
+struct QTVRAreaOfInterest {
+ float panAngle;
+ float tiltAngle;
+ float width;
+ float height;
+ UInt32 flags;
+};
+typedef struct QTVRAreaOfInterest QTVRAreaOfInterest;
+/*
+ =================================================================================================
+ Callback routines
+ -------------------------------------------------------------------------------------------------
+*/
+
+typedef CALLBACK_API( OSErr , QTVRLeavingNodeProcPtr )(QTVRInstance qtvr, UInt32 fromNodeID, UInt32 toNodeID, Boolean *cancel, SInt32 refCon);
+typedef CALLBACK_API( OSErr , QTVREnteringNodeProcPtr )(QTVRInstance qtvr, UInt32 nodeID, SInt32 refCon);
+typedef CALLBACK_API( OSErr , QTVRMouseOverHotSpotProcPtr )(QTVRInstance qtvr, UInt32 hotSpotID, UInt32 flags, SInt32 refCon);
+typedef CALLBACK_API( OSErr , QTVRImagingCompleteProcPtr )(QTVRInstance qtvr, SInt32 refCon);
+typedef CALLBACK_API( OSErr , QTVRBackBufferImagingProcPtr )(QTVRInstance qtvr, Rect *drawRect, UInt16 areaIndex, UInt32 flagsIn, UInt32 *flagsOut, SInt32 refCon);
+typedef STACK_UPP_TYPE(QTVRLeavingNodeProcPtr) QTVRLeavingNodeUPP;
+typedef STACK_UPP_TYPE(QTVREnteringNodeProcPtr) QTVREnteringNodeUPP;
+typedef STACK_UPP_TYPE(QTVRMouseOverHotSpotProcPtr) QTVRMouseOverHotSpotUPP;
+typedef STACK_UPP_TYPE(QTVRImagingCompleteProcPtr) QTVRImagingCompleteUPP;
+typedef STACK_UPP_TYPE(QTVRBackBufferImagingProcPtr) QTVRBackBufferImagingUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(QTVRLeavingNodeUPP)
+ NewQTVRLeavingNodeUPP (QTVRLeavingNodeProcPtr userRoutine);
+
+ EXTERN_API(QTVREnteringNodeUPP)
+ NewQTVREnteringNodeUPP (QTVREnteringNodeProcPtr userRoutine);
+
+ EXTERN_API(QTVRMouseOverHotSpotUPP)
+ NewQTVRMouseOverHotSpotUPP (QTVRMouseOverHotSpotProcPtr userRoutine);
+
+ EXTERN_API(QTVRImagingCompleteUPP)
+ NewQTVRImagingCompleteUPP (QTVRImagingCompleteProcPtr userRoutine);
+
+ EXTERN_API(QTVRBackBufferImagingUPP)
+ NewQTVRBackBufferImagingUPP (QTVRBackBufferImagingProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeQTVRLeavingNodeUPP (QTVRLeavingNodeUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeQTVREnteringNodeUPP (QTVREnteringNodeUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeQTVRMouseOverHotSpotUPP (QTVRMouseOverHotSpotUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeQTVRImagingCompleteUPP (QTVRImagingCompleteUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeQTVRBackBufferImagingUPP (QTVRBackBufferImagingUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeQTVRLeavingNodeUPP (QTVRInstance qtvr,
+ UInt32 fromNodeID,
+ UInt32 toNodeID,
+ Boolean * cancel,
+ SInt32 refCon,
+ QTVRLeavingNodeUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeQTVREnteringNodeUPP (QTVRInstance qtvr,
+ UInt32 nodeID,
+ SInt32 refCon,
+ QTVREnteringNodeUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeQTVRMouseOverHotSpotUPP (QTVRInstance qtvr,
+ UInt32 hotSpotID,
+ UInt32 flags,
+ SInt32 refCon,
+ QTVRMouseOverHotSpotUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeQTVRImagingCompleteUPP (QTVRInstance qtvr,
+ SInt32 refCon,
+ QTVRImagingCompleteUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeQTVRBackBufferImagingUPP (QTVRInstance qtvr,
+ Rect * drawRect,
+ UInt16 areaIndex,
+ UInt32 flagsIn,
+ UInt32 * flagsOut,
+ SInt32 refCon,
+ QTVRBackBufferImagingUPP userUPP);
+
+#else
+ enum { uppQTVRLeavingNodeProcInfo = 0x0000FFE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppQTVREnteringNodeProcInfo = 0x00000FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppQTVRMouseOverHotSpotProcInfo = 0x00003FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppQTVRImagingCompleteProcInfo = 0x000003E0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes) */
+ enum { uppQTVRBackBufferImagingProcInfo = 0x0003FBE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewQTVRLeavingNodeUPP(userRoutine) (QTVRLeavingNodeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTVRLeavingNodeProcInfo, GetCurrentArchitecture())
+ #define NewQTVREnteringNodeUPP(userRoutine) (QTVREnteringNodeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTVREnteringNodeProcInfo, GetCurrentArchitecture())
+ #define NewQTVRMouseOverHotSpotUPP(userRoutine) (QTVRMouseOverHotSpotUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTVRMouseOverHotSpotProcInfo, GetCurrentArchitecture())
+ #define NewQTVRImagingCompleteUPP(userRoutine) (QTVRImagingCompleteUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTVRImagingCompleteProcInfo, GetCurrentArchitecture())
+ #define NewQTVRBackBufferImagingUPP(userRoutine) (QTVRBackBufferImagingUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTVRBackBufferImagingProcInfo, GetCurrentArchitecture())
+ #define DisposeQTVRLeavingNodeUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeQTVREnteringNodeUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeQTVRMouseOverHotSpotUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeQTVRImagingCompleteUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeQTVRBackBufferImagingUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeQTVRLeavingNodeUPP(qtvr, fromNodeID, toNodeID, cancel, refCon, userUPP) (OSErr)CALL_FIVE_PARAMETER_UPP((userUPP), uppQTVRLeavingNodeProcInfo, (qtvr), (fromNodeID), (toNodeID), (cancel), (refCon))
+ #define InvokeQTVREnteringNodeUPP(qtvr, nodeID, refCon, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppQTVREnteringNodeProcInfo, (qtvr), (nodeID), (refCon))
+ #define InvokeQTVRMouseOverHotSpotUPP(qtvr, hotSpotID, flags, refCon, userUPP) (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppQTVRMouseOverHotSpotProcInfo, (qtvr), (hotSpotID), (flags), (refCon))
+ #define InvokeQTVRImagingCompleteUPP(qtvr, refCon, userUPP) (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppQTVRImagingCompleteProcInfo, (qtvr), (refCon))
+ #define InvokeQTVRBackBufferImagingUPP(qtvr, drawRect, areaIndex, flagsIn, flagsOut, refCon, userUPP) (OSErr)CALL_SIX_PARAMETER_UPP((userUPP), uppQTVRBackBufferImagingProcInfo, (qtvr), (drawRect), (areaIndex), (flagsIn), (flagsOut), (refCon))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewQTVRLeavingNodeProc(userRoutine) NewQTVRLeavingNodeUPP(userRoutine)
+#define NewQTVREnteringNodeProc(userRoutine) NewQTVREnteringNodeUPP(userRoutine)
+#define NewQTVRMouseOverHotSpotProc(userRoutine) NewQTVRMouseOverHotSpotUPP(userRoutine)
+#define NewQTVRImagingCompleteProc(userRoutine) NewQTVRImagingCompleteUPP(userRoutine)
+#define NewQTVRBackBufferImagingProc(userRoutine) NewQTVRBackBufferImagingUPP(userRoutine)
+#define CallQTVRLeavingNodeProc(userRoutine, qtvr, fromNodeID, toNodeID, cancel, refCon) InvokeQTVRLeavingNodeUPP(qtvr, fromNodeID, toNodeID, cancel, refCon, userRoutine)
+#define CallQTVREnteringNodeProc(userRoutine, qtvr, nodeID, refCon) InvokeQTVREnteringNodeUPP(qtvr, nodeID, refCon, userRoutine)
+#define CallQTVRMouseOverHotSpotProc(userRoutine, qtvr, hotSpotID, flags, refCon) InvokeQTVRMouseOverHotSpotUPP(qtvr, hotSpotID, flags, refCon, userRoutine)
+#define CallQTVRImagingCompleteProc(userRoutine, qtvr, refCon) InvokeQTVRImagingCompleteUPP(qtvr, refCon, userRoutine)
+#define CallQTVRBackBufferImagingProc(userRoutine, qtvr, drawRect, areaIndex, flagsIn, flagsOut, refCon) InvokeQTVRBackBufferImagingUPP(qtvr, drawRect, areaIndex, flagsIn, flagsOut, refCon, userRoutine)
+/*
+ =================================================================================================
+ QTVR Intercept Struct, Callback, Routine Descriptors
+ -------------------------------------------------------------------------------------------------
+*/
+
+
+typedef UInt32 QTVRProcSelector;
+enum {
+ kQTVRSetPanAngleSelector = 0x2000,
+ kQTVRSetTiltAngleSelector = 0x2001,
+ kQTVRSetFieldOfViewSelector = 0x2002,
+ kQTVRSetViewCenterSelector = 0x2003,
+ kQTVRMouseEnterSelector = 0x2004,
+ kQTVRMouseWithinSelector = 0x2005,
+ kQTVRMouseLeaveSelector = 0x2006,
+ kQTVRMouseDownSelector = 0x2007,
+ kQTVRMouseStillDownSelector = 0x2008,
+ kQTVRMouseUpSelector = 0x2009,
+ kQTVRTriggerHotSpotSelector = 0x200A,
+ kQTVRGetHotSpotTypeSelector = 0x200B, /* Requires QTVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10)*/
+ kQTVRSetViewParameterSelector = 0x200C, /* Requires QTVR 5.0 (kQTVRAPIMajorVersion05 + kQTVRAPIMinorVersion00)*/
+ kQTVRGetViewParameterSelector = 0x200D /* Requires QTVR 5.0 (kQTVRAPIMajorVersion05 + kQTVRAPIMinorVersion00)*/
+};
+
+
+struct QTVRInterceptRecord {
+ SInt32 reserved1;
+ SInt32 selector;
+
+ SInt32 reserved2;
+ SInt32 reserved3;
+
+ SInt32 paramCount;
+ void * parameter[6];
+};
+typedef struct QTVRInterceptRecord QTVRInterceptRecord;
+
+typedef QTVRInterceptRecord * QTVRInterceptPtr;
+/* Prototype for Intercept Proc callback*/
+typedef CALLBACK_API( void , QTVRInterceptProcPtr )(QTVRInstance qtvr, QTVRInterceptPtr qtvrMsg, SInt32 refCon, Boolean *cancel);
+typedef STACK_UPP_TYPE(QTVRInterceptProcPtr) QTVRInterceptUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(QTVRInterceptUPP)
+ NewQTVRInterceptUPP (QTVRInterceptProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeQTVRInterceptUPP (QTVRInterceptUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeQTVRInterceptUPP (QTVRInstance qtvr,
+ QTVRInterceptPtr qtvrMsg,
+ SInt32 refCon,
+ Boolean * cancel,
+ QTVRInterceptUPP userUPP);
+
+#else
+ enum { uppQTVRInterceptProcInfo = 0x00003FC0 }; /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewQTVRInterceptUPP(userRoutine) (QTVRInterceptUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTVRInterceptProcInfo, GetCurrentArchitecture())
+ #define DisposeQTVRInterceptUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeQTVRInterceptUPP(qtvr, qtvrMsg, refCon, cancel, userUPP) CALL_FOUR_PARAMETER_UPP((userUPP), uppQTVRInterceptProcInfo, (qtvr), (qtvrMsg), (refCon), (cancel))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewQTVRInterceptProc(userRoutine) NewQTVRInterceptUPP(userRoutine)
+#define CallQTVRInterceptProc(userRoutine, qtvr, qtvrMsg, refCon, cancel) InvokeQTVRInterceptUPP(qtvr, qtvrMsg, refCon, cancel, userRoutine)
+/*
+ =================================================================================================
+ Initialization QTVR calls
+ -------------------------------------------------------------------------------------------------
+ Requires QTVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10) and only work on Non-Macintosh platforms
+*/
+#if !TARGET_OS_MAC
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSErr )
+InitializeQTVR (void);
+
+EXTERN_API_C( OSErr )
+TerminateQTVR (void);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* !TARGET_OS_MAC */
+
+/*
+ =================================================================================================
+ General QTVR calls
+ -------------------------------------------------------------------------------------------------
+*/
+EXTERN_API_C( Track )
+QTVRGetQTVRTrack (Movie theMovie,
+ SInt32 index);
+
+EXTERN_API_C( OSErr )
+QTVRGetQTVRInstance (QTVRInstance * qtvr,
+ Track qtvrTrack,
+ MovieController mc);
+
+/*
+ =================================================================================================
+ Viewing Angles and Zooming
+ -------------------------------------------------------------------------------------------------
+*/
+
+/* QTVRSetViewParameter requires QTVR 5.0 (kQTVRAPIMajorVersion05 + kQTVRAPIMinorVersion00)*/
+EXTERN_API_C( OSErr )
+QTVRSetViewParameter (QTVRInstance qtvr,
+ UInt32 viewParameter,
+ void * value,
+ UInt32 flagsIn);
+
+/* QTVRGetViewParameter requires QTVR 5.0 (kQTVRAPIMajorVersion05 + kQTVRAPIMinorVersion00)*/
+EXTERN_API_C( OSErr )
+QTVRGetViewParameter (QTVRInstance qtvr,
+ UInt32 viewParameter,
+ void * value,
+ UInt32 flagsIn,
+ UInt32 * flagsOut);
+
+EXTERN_API_C( OSErr )
+QTVRSetPanAngle (QTVRInstance qtvr,
+ float panAngle);
+
+EXTERN_API_C( float )
+QTVRGetPanAngle (QTVRInstance qtvr);
+
+EXTERN_API_C( OSErr )
+QTVRSetTiltAngle (QTVRInstance qtvr,
+ float tiltAngle);
+
+EXTERN_API_C( float )
+QTVRGetTiltAngle (QTVRInstance qtvr);
+
+EXTERN_API_C( OSErr )
+QTVRSetFieldOfView (QTVRInstance qtvr,
+ float fieldOfView);
+
+EXTERN_API_C( float )
+QTVRGetFieldOfView (QTVRInstance qtvr);
+
+EXTERN_API_C( OSErr )
+QTVRShowDefaultView (QTVRInstance qtvr);
+
+/* Object Specific*/
+EXTERN_API_C( OSErr )
+QTVRSetViewCenter (QTVRInstance qtvr,
+ const QTVRFloatPoint * viewCenter);
+
+EXTERN_API_C( OSErr )
+QTVRGetViewCenter (QTVRInstance qtvr,
+ QTVRFloatPoint * viewCenter);
+
+EXTERN_API_C( OSErr )
+QTVRNudge (QTVRInstance qtvr,
+ QTVRNudgeControl direction);
+
+/* QTVRInteractionNudge requires QTVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10)*/
+EXTERN_API_C( OSErr )
+QTVRInteractionNudge (QTVRInstance qtvr,
+ QTVRNudgeControl direction);
+
+/*
+ =================================================================================================
+ Scene and Node Location Information
+ -------------------------------------------------------------------------------------------------
+*/
+
+EXTERN_API_C( OSErr )
+QTVRGetVRWorld (QTVRInstance qtvr,
+ QTAtomContainer * VRWorld);
+
+EXTERN_API_C( OSErr )
+QTVRGetNodeInfo (QTVRInstance qtvr,
+ UInt32 nodeID,
+ QTAtomContainer * nodeInfo);
+
+EXTERN_API_C( OSErr )
+QTVRGoToNodeID (QTVRInstance qtvr,
+ UInt32 nodeID);
+
+EXTERN_API_C( UInt32 )
+QTVRGetCurrentNodeID (QTVRInstance qtvr);
+
+EXTERN_API_C( OSType )
+QTVRGetNodeType (QTVRInstance qtvr,
+ UInt32 nodeID);
+
+/*
+ =================================================================================================
+ Hot Spot related calls
+ -------------------------------------------------------------------------------------------------
+*/
+
+EXTERN_API_C( OSErr )
+QTVRPtToHotSpotID (QTVRInstance qtvr,
+ Point pt,
+ UInt32 * hotSpotID);
+
+/* QTVRGetHotSpotType requires QTVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10)*/
+EXTERN_API_C( OSErr )
+QTVRGetHotSpotType (QTVRInstance qtvr,
+ UInt32 hotSpotID,
+ OSType * hotSpotType);
+
+EXTERN_API_C( OSErr )
+QTVRTriggerHotSpot (QTVRInstance qtvr,
+ UInt32 hotSpotID,
+ QTAtomContainer nodeInfo,
+ QTAtom selectedAtom);
+
+EXTERN_API_C( OSErr )
+QTVRSetMouseOverHotSpotProc (QTVRInstance qtvr,
+ QTVRMouseOverHotSpotUPP mouseOverHotSpotProc,
+ SInt32 refCon,
+ UInt32 flags);
+
+EXTERN_API_C( OSErr )
+QTVREnableHotSpot (QTVRInstance qtvr,
+ UInt32 enableFlag,
+ UInt32 hotSpotValue,
+ Boolean enable);
+
+EXTERN_API_C( UInt32 )
+QTVRGetVisibleHotSpots (QTVRInstance qtvr,
+ Handle hotSpots);
+
+EXTERN_API_C( OSErr )
+QTVRGetHotSpotRegion (QTVRInstance qtvr,
+ UInt32 hotSpotID,
+ RgnHandle hotSpotRegion);
+
+/*
+ =================================================================================================
+ Event & Cursor Handling Calls
+ -------------------------------------------------------------------------------------------------
+*/
+
+EXTERN_API_C( OSErr )
+QTVRSetMouseOverTracking (QTVRInstance qtvr,
+ Boolean enable);
+
+EXTERN_API_C( Boolean )
+QTVRGetMouseOverTracking (QTVRInstance qtvr);
+
+EXTERN_API_C( OSErr )
+QTVRSetMouseDownTracking (QTVRInstance qtvr,
+ Boolean enable);
+
+EXTERN_API_C( Boolean )
+QTVRGetMouseDownTracking (QTVRInstance qtvr);
+
+EXTERN_API_C( OSErr )
+QTVRMouseEnter (QTVRInstance qtvr,
+ Point pt,
+ UInt32 * hotSpotID,
+ WindowRef w);
+
+EXTERN_API_C( OSErr )
+QTVRMouseWithin (QTVRInstance qtvr,
+ Point pt,
+ UInt32 * hotSpotID,
+ WindowRef w);
+
+EXTERN_API_C( OSErr )
+QTVRMouseLeave (QTVRInstance qtvr,
+ Point pt,
+ WindowRef w);
+
+EXTERN_API_C( OSErr )
+QTVRMouseDown (QTVRInstance qtvr,
+ Point pt,
+ UInt32 when,
+ UInt16 modifiers,
+ UInt32 * hotSpotID,
+ WindowRef w);
+
+EXTERN_API_C( OSErr )
+QTVRMouseStillDown (QTVRInstance qtvr,
+ Point pt,
+ UInt32 * hotSpotID,
+ WindowRef w);
+
+EXTERN_API_C( OSErr )
+QTVRMouseUp (QTVRInstance qtvr,
+ Point pt,
+ UInt32 * hotSpotID,
+ WindowRef w);
+
+/* These require QTVR 2.01 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion01)*/
+EXTERN_API_C( OSErr )
+QTVRMouseStillDownExtended (QTVRInstance qtvr,
+ Point pt,
+ UInt32 * hotSpotID,
+ WindowRef w,
+ UInt32 when,
+ UInt16 modifiers);
+
+EXTERN_API_C( OSErr )
+QTVRMouseUpExtended (QTVRInstance qtvr,
+ Point pt,
+ UInt32 * hotSpotID,
+ WindowRef w,
+ UInt32 when,
+ UInt16 modifiers);
+
+/*
+ =================================================================================================
+ Intercept Routines
+ -------------------------------------------------------------------------------------------------
+*/
+
+EXTERN_API_C( OSErr )
+QTVRInstallInterceptProc (QTVRInstance qtvr,
+ QTVRProcSelector selector,
+ QTVRInterceptUPP interceptProc,
+ SInt32 refCon,
+ UInt32 flags);
+
+EXTERN_API_C( OSErr )
+QTVRCallInterceptedProc (QTVRInstance qtvr,
+ QTVRInterceptRecord * qtvrMsg);
+
+/*
+ =================================================================================================
+ Object Movie Specific Calls
+ -------------------------------------------------------------------------------------------------
+ QTVRGetCurrentMouseMode requires QTRVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10)
+*/
+EXTERN_API_C( UInt32 )
+QTVRGetCurrentMouseMode (QTVRInstance qtvr);
+
+EXTERN_API_C( OSErr )
+QTVRSetFrameRate (QTVRInstance qtvr,
+ float rate);
+
+EXTERN_API_C( float )
+QTVRGetFrameRate (QTVRInstance qtvr);
+
+EXTERN_API_C( OSErr )
+QTVRSetViewRate (QTVRInstance qtvr,
+ float rate);
+
+EXTERN_API_C( float )
+QTVRGetViewRate (QTVRInstance qtvr);
+
+EXTERN_API_C( OSErr )
+QTVRSetViewCurrentTime (QTVRInstance qtvr,
+ TimeValue time);
+
+EXTERN_API_C( TimeValue )
+QTVRGetViewCurrentTime (QTVRInstance qtvr);
+
+EXTERN_API_C( TimeValue )
+QTVRGetCurrentViewDuration (QTVRInstance qtvr);
+
+/*
+ =================================================================================================
+ View State Calls - QTVR Object Only
+ -------------------------------------------------------------------------------------------------
+*/
+
+EXTERN_API_C( OSErr )
+QTVRSetViewState (QTVRInstance qtvr,
+ QTVRViewStateType viewStateType,
+ UInt16 state);
+
+EXTERN_API_C( OSErr )
+QTVRGetViewState (QTVRInstance qtvr,
+ QTVRViewStateType viewStateType,
+ UInt16 * state);
+
+EXTERN_API_C( UInt16 )
+QTVRGetViewStateCount (QTVRInstance qtvr);
+
+EXTERN_API_C( OSErr )
+QTVRSetAnimationSetting (QTVRInstance qtvr,
+ QTVRObjectAnimationSetting setting,
+ Boolean enable);
+
+EXTERN_API_C( OSErr )
+QTVRGetAnimationSetting (QTVRInstance qtvr,
+ QTVRObjectAnimationSetting setting,
+ Boolean * enable);
+
+EXTERN_API_C( OSErr )
+QTVRSetControlSetting (QTVRInstance qtvr,
+ QTVRControlSetting setting,
+ Boolean enable);
+
+EXTERN_API_C( OSErr )
+QTVRGetControlSetting (QTVRInstance qtvr,
+ QTVRControlSetting setting,
+ Boolean * enable);
+
+EXTERN_API_C( OSErr )
+QTVREnableFrameAnimation (QTVRInstance qtvr,
+ Boolean enable);
+
+EXTERN_API_C( Boolean )
+QTVRGetFrameAnimation (QTVRInstance qtvr);
+
+EXTERN_API_C( OSErr )
+QTVREnableViewAnimation (QTVRInstance qtvr,
+ Boolean enable);
+
+EXTERN_API_C( Boolean )
+QTVRGetViewAnimation (QTVRInstance qtvr);
+
+
+/*
+ =================================================================================================
+ Imaging Characteristics
+ -------------------------------------------------------------------------------------------------
+*/
+
+EXTERN_API_C( OSErr )
+QTVRSetVisible (QTVRInstance qtvr,
+ Boolean visible);
+
+EXTERN_API_C( Boolean )
+QTVRGetVisible (QTVRInstance qtvr);
+
+EXTERN_API_C( OSErr )
+QTVRSetImagingProperty (QTVRInstance qtvr,
+ QTVRImagingMode imagingMode,
+ UInt32 imagingProperty,
+ SInt32 propertyValue);
+
+EXTERN_API_C( OSErr )
+QTVRGetImagingProperty (QTVRInstance qtvr,
+ QTVRImagingMode imagingMode,
+ UInt32 imagingProperty,
+ SInt32 * propertyValue);
+
+EXTERN_API_C( OSErr )
+QTVRUpdate (QTVRInstance qtvr,
+ QTVRImagingMode imagingMode);
+
+EXTERN_API_C( OSErr )
+QTVRBeginUpdateStream (QTVRInstance qtvr,
+ QTVRImagingMode imagingMode);
+
+EXTERN_API_C( OSErr )
+QTVREndUpdateStream (QTVRInstance qtvr);
+
+EXTERN_API_C( OSErr )
+QTVRSetTransitionProperty (QTVRInstance qtvr,
+ UInt32 transitionType,
+ UInt32 transitionProperty,
+ SInt32 transitionValue);
+
+EXTERN_API_C( OSErr )
+QTVREnableTransition (QTVRInstance qtvr,
+ UInt32 transitionType,
+ Boolean enable);
+
+/*
+ =================================================================================================
+ Basic Conversion and Math Routines
+ -------------------------------------------------------------------------------------------------
+*/
+
+EXTERN_API_C( OSErr )
+QTVRSetAngularUnits (QTVRInstance qtvr,
+ QTVRAngularUnits units);
+
+EXTERN_API_C( QTVRAngularUnits )
+QTVRGetAngularUnits (QTVRInstance qtvr);
+
+/* Pano specific routines*/
+EXTERN_API_C( OSErr )
+QTVRPtToAngles (QTVRInstance qtvr,
+ Point pt,
+ float * panAngle,
+ float * tiltAngle);
+
+EXTERN_API_C( OSErr )
+QTVRCoordToAngles (QTVRInstance qtvr,
+ QTVRFloatPoint * coord,
+ float * panAngle,
+ float * tiltAngle);
+
+EXTERN_API_C( OSErr )
+QTVRAnglesToCoord (QTVRInstance qtvr,
+ float panAngle,
+ float tiltAngle,
+ QTVRFloatPoint * coord);
+
+/* Object specific routines*/
+EXTERN_API_C( short )
+QTVRPanToColumn (QTVRInstance qtvr,
+ float panAngle);
+
+/* zero based */
+EXTERN_API_C( float )
+QTVRColumnToPan (QTVRInstance qtvr,
+ short column);
+
+/* zero based */
+EXTERN_API_C( short )
+QTVRTiltToRow (QTVRInstance qtvr,
+ float tiltAngle);
+
+/* zero based */
+EXTERN_API_C( float )
+QTVRRowToTilt (QTVRInstance qtvr,
+ short row);
+
+/* zero based */
+EXTERN_API_C( OSErr )
+QTVRWrapAndConstrain (QTVRInstance qtvr,
+ short kind,
+ float value,
+ float * result);
+
+
+/*
+ =================================================================================================
+ Interaction Routines
+ -------------------------------------------------------------------------------------------------
+*/
+
+EXTERN_API_C( OSErr )
+QTVRSetEnteringNodeProc (QTVRInstance qtvr,
+ QTVREnteringNodeUPP enteringNodeProc,
+ SInt32 refCon,
+ UInt32 flags);
+
+EXTERN_API_C( OSErr )
+QTVRSetLeavingNodeProc (QTVRInstance qtvr,
+ QTVRLeavingNodeUPP leavingNodeProc,
+ SInt32 refCon,
+ UInt32 flags);
+
+EXTERN_API_C( OSErr )
+QTVRSetInteractionProperty (QTVRInstance qtvr,
+ UInt32 property,
+ void * value);
+
+EXTERN_API_C( OSErr )
+QTVRGetInteractionProperty (QTVRInstance qtvr,
+ UInt32 property,
+ void * value);
+
+EXTERN_API_C( OSErr )
+QTVRReplaceCursor (QTVRInstance qtvr,
+ QTVRCursorRecord * cursRecord);
+
+/*
+ =================================================================================================
+ Viewing Limits and Constraints
+ -------------------------------------------------------------------------------------------------
+*/
+
+EXTERN_API_C( OSErr )
+QTVRGetViewingLimits (QTVRInstance qtvr,
+ UInt16 kind,
+ float * minValue,
+ float * maxValue);
+
+EXTERN_API_C( UInt32 )
+QTVRGetConstraintStatus (QTVRInstance qtvr);
+
+EXTERN_API_C( OSErr )
+QTVRGetConstraints (QTVRInstance qtvr,
+ UInt16 kind,
+ float * minValue,
+ float * maxValue);
+
+EXTERN_API_C( OSErr )
+QTVRSetConstraints (QTVRInstance qtvr,
+ UInt16 kind,
+ float minValue,
+ float maxValue);
+
+
+/*
+ =================================================================================================
+ Back Buffer Memory Management
+ -------------------------------------------------------------------------------------------------
+*/
+
+EXTERN_API_C( OSErr )
+QTVRGetAvailableResolutions (QTVRInstance qtvr,
+ UInt16 * resolutionsMask);
+
+/* These require QTVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10)*/
+EXTERN_API_C( OSErr )
+QTVRGetBackBufferMemInfo (QTVRInstance qtvr,
+ UInt32 geometry,
+ UInt16 resolution,
+ UInt32 cachePixelFormat,
+ SInt32 * minCacheBytes,
+ SInt32 * suggestedCacheBytes,
+ SInt32 * fullCacheBytes);
+
+EXTERN_API_C( OSErr )
+QTVRGetBackBufferSettings (QTVRInstance qtvr,
+ UInt32 * geometry,
+ UInt16 * resolution,
+ UInt32 * cachePixelFormat,
+ SInt16 * cacheSize);
+
+EXTERN_API_C( OSErr )
+QTVRSetBackBufferPrefs (QTVRInstance qtvr,
+ UInt32 geometry,
+ UInt16 resolution,
+ UInt32 cachePixelFormat,
+ SInt16 cacheSize);
+
+/*
+ =================================================================================================
+ Buffer Access
+ -------------------------------------------------------------------------------------------------
+*/
+
+EXTERN_API_C( OSErr )
+QTVRSetPrescreenImagingCompleteProc (QTVRInstance qtvr,
+ QTVRImagingCompleteUPP imagingCompleteProc,
+ SInt32 refCon,
+ UInt32 flags);
+
+EXTERN_API_C( OSErr )
+QTVRSetBackBufferImagingProc (QTVRInstance qtvr,
+ QTVRBackBufferImagingUPP backBufferImagingProc,
+ UInt16 numAreas,
+ QTVRAreaOfInterest areasOfInterest[],
+ SInt32 refCon);
+
+EXTERN_API_C( OSErr )
+QTVRRefreshBackBuffer (QTVRInstance qtvr,
+ UInt32 flags);
+
+
+
+/*
+ =================================================================================================
+ Old Names
+ -------------------------------------------------------------------------------------------------
+*/
+#if OLDROUTINENAMES
+typedef QTVRCursorRecord CursorRecord;
+typedef QTVRAreaOfInterest AreaOfInterest;
+typedef QTVRFloatPoint FloatPoint;
+typedef QTVRLeavingNodeProcPtr LeavingNodeProcPtr;
+typedef QTVRLeavingNodeUPP LeavingNodeUPP;
+typedef QTVREnteringNodeProcPtr EnteringNodeProcPtr;
+typedef QTVREnteringNodeUPP EnteringNodeUPP;
+typedef QTVRMouseOverHotSpotProcPtr MouseOverHotSpotProcPtr;
+typedef QTVRMouseOverHotSpotUPP MouseOverHotSpotUPP;
+typedef QTVRImagingCompleteProcPtr ImagingCompleteProcPtr;
+typedef QTVRImagingCompleteUPP ImagingCompleteUPP;
+typedef QTVRBackBufferImagingProcPtr BackBufferImagingProcPtr;
+typedef QTVRBackBufferImagingUPP BackBufferImagingUPP;
+#endif /* OLDROUTINENAMES */
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QUICKTIMEVR__ */
+
diff --git a/include/qt/QuickTimeVRFormat.h b/include/qt/QuickTimeVRFormat.h
new file mode 100644
index 000000000..bdc9894a5
--- /dev/null
+++ b/include/qt/QuickTimeVRFormat.h
@@ -0,0 +1,552 @@
+/*
+ File: QuickTimeVRFormat.h
+
+ Contains: QuickTime VR interfaces
+
+ Version: Technology: QuickTime VR 5.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1997-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QUICKTIMEVRFORMAT__
+#define __QUICKTIMEVRFORMAT__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __DIALOGS__
+#include "Dialogs.h"
+#endif
+
+#ifndef __MOVIES__
+#include "Movies.h"
+#endif
+
+#ifndef __QUICKTIMEVR__
+#include "QuickTimeVR.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+
+/* File Format Version numbers */
+#define kQTVRMajorVersion (2)
+#define kQTVRMinorVersion (0)
+
+/* User data type for the Movie Controller type specifier*/
+enum {
+ kQTControllerType = kQTVRControllerSubType, /* Atom & ID of where our*/
+ kQTControllerID = 1 /* ...controller name is stored*/
+};
+
+/* VRWorld atom types*/
+enum {
+ kQTVRWorldHeaderAtomType = FOUR_CHAR_CODE('vrsc'),
+ kQTVRImagingParentAtomType = FOUR_CHAR_CODE('imgp'),
+ kQTVRPanoImagingAtomType = FOUR_CHAR_CODE('impn'),
+ kQTVRObjectImagingAtomType = FOUR_CHAR_CODE('imob'),
+ kQTVRNodeParentAtomType = FOUR_CHAR_CODE('vrnp'),
+ kQTVRNodeIDAtomType = FOUR_CHAR_CODE('vrni'),
+ kQTVRNodeLocationAtomType = FOUR_CHAR_CODE('nloc'),
+ kQTVRCursorParentAtomType = FOUR_CHAR_CODE('vrcp'), /* New with 2.1*/
+ kQTVRCursorAtomType = FOUR_CHAR_CODE('CURS'), /* New with 2.1*/
+ kQTVRColorCursorAtomType = FOUR_CHAR_CODE('crsr') /* New with 2.1*/
+};
+
+/* NodeInfo atom types*/
+enum {
+ kQTVRNodeHeaderAtomType = FOUR_CHAR_CODE('ndhd'),
+ kQTVRHotSpotParentAtomType = FOUR_CHAR_CODE('hspa'),
+ kQTVRHotSpotAtomType = FOUR_CHAR_CODE('hots'),
+ kQTVRHotSpotInfoAtomType = FOUR_CHAR_CODE('hsin'),
+ kQTVRLinkInfoAtomType = FOUR_CHAR_CODE('link')
+};
+
+/* Miscellaneous atom types*/
+enum {
+ kQTVRStringAtomType = FOUR_CHAR_CODE('vrsg'),
+ kQTVRStringEncodingAtomType = FOUR_CHAR_CODE('vrse'), /* New with 2.1*/
+ kQTVRPanoSampleDataAtomType = FOUR_CHAR_CODE('pdat'),
+ kQTVRObjectInfoAtomType = FOUR_CHAR_CODE('obji'),
+ kQTVRImageTrackRefAtomType = FOUR_CHAR_CODE('imtr'), /* Parent is kQTVRObjectInfoAtomType. Required if track ref is not 1 as required by 2.0 format.*/
+ kQTVRHotSpotTrackRefAtomType = FOUR_CHAR_CODE('hstr'), /* Parent is kQTVRObjectInfoAtomType. Required if track ref is not 1 as required by 2.0 format.*/
+ kQTVRAngleRangeAtomType = FOUR_CHAR_CODE('arng'),
+ kQTVRTrackRefArrayAtomType = FOUR_CHAR_CODE('tref'),
+ kQTVRPanConstraintAtomType = FOUR_CHAR_CODE('pcon'),
+ kQTVRTiltConstraintAtomType = FOUR_CHAR_CODE('tcon'),
+ kQTVRFOVConstraintAtomType = FOUR_CHAR_CODE('fcon'),
+ kQTVRCubicViewAtomType = FOUR_CHAR_CODE('cuvw'), /* New with 5.0*/
+ kQTVRCubicFaceDataAtomType = FOUR_CHAR_CODE('cufa') /* New with 5.0*/
+};
+
+enum {
+ kQTVRObjectInfoAtomID = 1,
+ kQTVRObjectImageTrackRefAtomID = 1, /* New with 2.1, it adds a track reference to select between multiple image tracks*/
+ kQTVRObjectHotSpotTrackRefAtomID = 1 /* New with 2.1, it adds a track reference to select between multiple hotspot tracks*/
+};
+
+/* Track reference types*/
+enum {
+ kQTVRImageTrackRefType = FOUR_CHAR_CODE('imgt'),
+ kQTVRHotSpotTrackRefType = FOUR_CHAR_CODE('hott')
+};
+
+/* Old hot spot types*/
+enum {
+ kQTVRHotSpotNavigableType = FOUR_CHAR_CODE('navg')
+};
+
+/* Valid bits used in QTVRLinkHotSpotAtom*/
+enum {
+ kQTVRValidPan = 1L << 0,
+ kQTVRValidTilt = 1L << 1,
+ kQTVRValidFOV = 1L << 2,
+ kQTVRValidViewCenter = 1L << 3
+};
+
+
+/* Values for flags field in QTVRPanoSampleAtom*/
+enum {
+ kQTVRPanoFlagHorizontal = 1L << 0,
+ kQTVRPanoFlagLast = 1L << 31
+};
+
+
+/* Values for locationFlags field in QTVRNodeLocationAtom*/
+enum {
+ kQTVRSameFile = 0
+};
+
+
+/* Header for QTVR track's Sample Description record (vrWorld atom container is appended)*/
+
+struct QTVRSampleDescription {
+ UInt32 descSize; /* total size of the QTVRSampleDescription*/
+ UInt32 descType; /* must be 'qtvr'*/
+
+ UInt32 reserved1; /* must be zero*/
+ UInt16 reserved2; /* must be zero*/
+ UInt16 dataRefIndex; /* must be zero*/
+
+ UInt32 data; /* Will be extended to hold vrWorld QTAtomContainer*/
+
+};
+typedef struct QTVRSampleDescription QTVRSampleDescription;
+typedef QTVRSampleDescription * QTVRSampleDescriptionPtr;
+typedef QTVRSampleDescriptionPtr * QTVRSampleDescriptionHandle;
+/*
+ =================================================================================================
+ Definitions and structures used in the VRWorld QTAtomContainer
+ -------------------------------------------------------------------------------------------------
+*/
+
+
+struct QTVRStringAtom {
+ UInt16 stringUsage;
+ UInt16 stringLength;
+ unsigned char theString[4]; /* field previously named "string"*/
+};
+typedef struct QTVRStringAtom QTVRStringAtom;
+typedef QTVRStringAtom * QTVRStringAtomPtr;
+
+
+struct QTVRWorldHeaderAtom {
+ UInt16 majorVersion;
+ UInt16 minorVersion;
+
+ QTAtomID nameAtomID;
+ UInt32 defaultNodeID;
+ UInt32 vrWorldFlags;
+
+ UInt32 reserved1;
+ UInt32 reserved2;
+};
+typedef struct QTVRWorldHeaderAtom QTVRWorldHeaderAtom;
+typedef QTVRWorldHeaderAtom * QTVRWorldHeaderAtomPtr;
+
+/* Valid bits used in QTVRPanoImagingAtom*/
+enum {
+ kQTVRValidCorrection = 1L << 0,
+ kQTVRValidQuality = 1L << 1,
+ kQTVRValidDirectDraw = 1L << 2,
+ kQTVRValidFirstExtraProperty = 1L << 3
+};
+
+
+struct QTVRPanoImagingAtom {
+ UInt16 majorVersion;
+ UInt16 minorVersion;
+
+ UInt32 imagingMode;
+ UInt32 imagingValidFlags;
+
+ UInt32 correction;
+ UInt32 quality;
+ UInt32 directDraw;
+ UInt32 imagingProperties[6]; /* for future properties*/
+
+ UInt32 reserved1;
+ UInt32 reserved2;
+};
+typedef struct QTVRPanoImagingAtom QTVRPanoImagingAtom;
+typedef QTVRPanoImagingAtom * QTVRPanoImagingAtomPtr;
+
+struct QTVRNodeLocationAtom {
+ UInt16 majorVersion;
+ UInt16 minorVersion;
+
+ OSType nodeType;
+ UInt32 locationFlags;
+ UInt32 locationData;
+
+ UInt32 reserved1;
+ UInt32 reserved2;
+};
+typedef struct QTVRNodeLocationAtom QTVRNodeLocationAtom;
+typedef QTVRNodeLocationAtom * QTVRNodeLocationAtomPtr;
+/*
+ =================================================================================================
+ Definitions and structures used in the Nodeinfo QTAtomContainer
+ -------------------------------------------------------------------------------------------------
+*/
+
+
+struct QTVRNodeHeaderAtom {
+ UInt16 majorVersion;
+ UInt16 minorVersion;
+
+ OSType nodeType;
+ QTAtomID nodeID;
+ QTAtomID nameAtomID;
+ QTAtomID commentAtomID;
+
+ UInt32 reserved1;
+ UInt32 reserved2;
+};
+typedef struct QTVRNodeHeaderAtom QTVRNodeHeaderAtom;
+typedef QTVRNodeHeaderAtom * QTVRNodeHeaderAtomPtr;
+
+struct QTVRAngleRangeAtom {
+ Float32 minimumAngle;
+ Float32 maximumAngle;
+};
+typedef struct QTVRAngleRangeAtom QTVRAngleRangeAtom;
+typedef QTVRAngleRangeAtom * QTVRAngleRangeAtomPtr;
+
+struct QTVRHotSpotInfoAtom {
+ UInt16 majorVersion;
+ UInt16 minorVersion;
+
+ OSType hotSpotType;
+ QTAtomID nameAtomID;
+ QTAtomID commentAtomID;
+
+ SInt32 cursorID[3];
+
+ /* canonical view for this hot spot*/
+ Float32 bestPan;
+ Float32 bestTilt;
+ Float32 bestFOV;
+ QTVRFloatPoint bestViewCenter;
+
+ /* Bounding box for this hot spot*/
+ Rect hotSpotRect;
+
+ UInt32 flags;
+ UInt32 reserved1;
+ UInt32 reserved2;
+};
+typedef struct QTVRHotSpotInfoAtom QTVRHotSpotInfoAtom;
+typedef QTVRHotSpotInfoAtom * QTVRHotSpotInfoAtomPtr;
+
+struct QTVRLinkHotSpotAtom {
+ UInt16 majorVersion;
+ UInt16 minorVersion;
+
+ UInt32 toNodeID;
+
+ UInt32 fromValidFlags;
+ Float32 fromPan;
+ Float32 fromTilt;
+ Float32 fromFOV;
+ QTVRFloatPoint fromViewCenter;
+
+ UInt32 toValidFlags;
+ Float32 toPan;
+ Float32 toTilt;
+ Float32 toFOV;
+ QTVRFloatPoint toViewCenter;
+
+ Float32 distance;
+
+ UInt32 flags;
+ UInt32 reserved1;
+ UInt32 reserved2;
+};
+typedef struct QTVRLinkHotSpotAtom QTVRLinkHotSpotAtom;
+typedef QTVRLinkHotSpotAtom * QTVRLinkHotSpotAtomPtr;
+/*
+ =================================================================================================
+ Definitions and structures used in Panorama and Object tracks
+ -------------------------------------------------------------------------------------------------
+*/
+
+
+struct QTVRPanoSampleAtom {
+ UInt16 majorVersion;
+ UInt16 minorVersion;
+
+ UInt32 imageRefTrackIndex; /* track reference index of the full res image track*/
+ UInt32 hotSpotRefTrackIndex; /* track reference index of the full res hot spot track*/
+
+ Float32 minPan;
+ Float32 maxPan;
+ Float32 minTilt;
+ Float32 maxTilt;
+ Float32 minFieldOfView;
+ Float32 maxFieldOfView;
+
+ Float32 defaultPan;
+ Float32 defaultTilt;
+ Float32 defaultFieldOfView;
+
+ /* Info for highest res version of image track*/
+ UInt32 imageSizeX; /* pixel width of the panorama (e.g. 768)*/
+ UInt32 imageSizeY; /* pixel height of the panorama (e.g. 2496)*/
+ UInt16 imageNumFramesX; /* diced frames wide (e.g. 1)*/
+ UInt16 imageNumFramesY; /* diced frames high (e.g. 24)*/
+
+ /* Info for highest res version of hotSpot track*/
+ UInt32 hotSpotSizeX; /* pixel width of the hot spot panorama (e.g. 768)*/
+ UInt32 hotSpotSizeY; /* pixel height of the hot spot panorama (e.g. 2496)*/
+ UInt16 hotSpotNumFramesX; /* diced frames wide (e.g. 1)*/
+ UInt16 hotSpotNumFramesY; /* diced frames high (e.g. 24)*/
+
+ UInt32 flags;
+ OSType panoType;
+ UInt32 reserved2;
+
+};
+typedef struct QTVRPanoSampleAtom QTVRPanoSampleAtom;
+typedef QTVRPanoSampleAtom * QTVRPanoSampleAtomPtr;
+/*
+ View atom for cubes (since same fields in QTVRPanoSampleAtom are set to special
+ values for backwards compatibility and hence are ignored by the cubic engine)
+*/
+
+struct QTVRCubicViewAtom {
+ Float32 minPan;
+ Float32 maxPan;
+ Float32 minTilt;
+ Float32 maxTilt;
+ Float32 minFieldOfView;
+ Float32 maxFieldOfView;
+
+ Float32 defaultPan;
+ Float32 defaultTilt;
+ Float32 defaultFieldOfView;
+};
+typedef struct QTVRCubicViewAtom QTVRCubicViewAtom;
+typedef QTVRCubicViewAtom * QTVRCubicViewAtomPtr;
+
+struct QTVRCubicFaceData {
+ Float32 orientation[4]; /* WXYZ quaternion of absolute orientation*/
+ Float32 center[2]; /* Center of image relative to center of projection (default = (0,0)) in normalized units*/
+ Float32 aspect; /* aspect>1 => tall pixels; aspect <1 => squat pixels (default = 1)*/
+ Float32 skew; /* skew x by y (default = 0)*/
+};
+typedef struct QTVRCubicFaceData QTVRCubicFaceData;
+typedef QTVRCubicFaceData * QTVRCubicFaceDataPtr;
+/* Special resolution values for the Image Track Reference Atoms. Use only one value per track reference.*/
+enum {
+ kQTVRFullTrackRes = kQTVRFullRes,
+ kQTVRHalfTrackRes = kQTVRHalfRes,
+ kQTVRQuarterTrackRes = kQTVRQuarterRes,
+ kQTVRPreviewTrackRes = 0x8000
+};
+
+
+struct QTVRTrackRefEntry {
+ UInt32 trackRefType;
+ UInt16 trackResolution;
+ UInt32 trackRefIndex;
+};
+typedef struct QTVRTrackRefEntry QTVRTrackRefEntry;
+/*
+ =================================================================================================
+ Object File format 2.0
+ -------------------------------------------------------------------------------------------------
+*/
+enum {
+ kQTVRObjectAnimateViewFramesOn = (1L << 0),
+ kQTVRObjectPalindromeViewFramesOn = (1L << 1),
+ kQTVRObjectStartFirstViewFrameOn = (1L << 2),
+ kQTVRObjectAnimateViewsOn = (1L << 3),
+ kQTVRObjectPalindromeViewsOn = (1L << 4),
+ kQTVRObjectSyncViewToFrameRate = (1L << 5),
+ kQTVRObjectDontLoopViewFramesOn = (1L << 6),
+ kQTVRObjectPlayEveryViewFrameOn = (1L << 7),
+ kQTVRObjectStreamingViewsOn = (1L << 8)
+};
+
+enum {
+ kQTVRObjectWrapPanOn = (1L << 0),
+ kQTVRObjectWrapTiltOn = (1L << 1),
+ kQTVRObjectCanZoomOn = (1L << 2),
+ kQTVRObjectReverseHControlOn = (1L << 3),
+ kQTVRObjectReverseVControlOn = (1L << 4),
+ kQTVRObjectSwapHVControlOn = (1L << 5),
+ kQTVRObjectTranslationOn = (1L << 6)
+};
+
+enum {
+ kGrabberScrollerUI = 1, /* "Object" */
+ kOldJoyStickUI = 2, /* "1.0 Object as Scene" */
+ kJoystickUI = 3, /* "Object In Scene"*/
+ kGrabberUI = 4, /* "Grabber only"*/
+ kAbsoluteUI = 5 /* "Absolute pointer"*/
+};
+
+
+
+struct QTVRObjectSampleAtom {
+ UInt16 majorVersion; /* kQTVRMajorVersion*/
+ UInt16 minorVersion; /* kQTVRMinorVersion*/
+ UInt16 movieType; /* ObjectUITypes*/
+ UInt16 viewStateCount; /* The number of view states 1 based*/
+ UInt16 defaultViewState; /* The default view state number. The number must be 1 to viewStateCount*/
+ UInt16 mouseDownViewState; /* The mouse down view state. The number must be 1 to viewStateCount*/
+ UInt32 viewDuration; /* The duration of each view including all animation frames in a view*/
+ UInt32 columns; /* Number of columns in movie*/
+ UInt32 rows; /* Number rows in movie*/
+ Float32 mouseMotionScale; /* 180.0 for kStandardObject or kQTVRObjectInScene, actual degrees for kOldNavigableMovieScene.*/
+ Float32 minPan; /* Start horizontal pan angle in degrees*/
+ Float32 maxPan; /* End horizontal pan angle in degrees*/
+ Float32 defaultPan; /* Initial horizontal pan angle in degrees (poster view)*/
+ Float32 minTilt; /* Start vertical pan angle in degrees*/
+ Float32 maxTilt; /* End vertical pan angle in degrees*/
+ Float32 defaultTilt; /* Initial vertical pan angle in degrees (poster view) */
+ Float32 minFieldOfView; /* minimum field of view setting (appears as the maximum zoom effect) must be >= 1*/
+ Float32 fieldOfView; /* the field of view range must be >= 1*/
+ Float32 defaultFieldOfView; /* must be in minFieldOfView and maxFieldOfView range inclusive*/
+ Float32 defaultViewCenterH;
+ Float32 defaultViewCenterV;
+
+ Float32 viewRate;
+ Float32 frameRate;
+ UInt32 animationSettings; /* 32 reserved bit fields*/
+ UInt32 controlSettings; /* 32 reserved bit fields*/
+
+};
+typedef struct QTVRObjectSampleAtom QTVRObjectSampleAtom;
+typedef QTVRObjectSampleAtom * QTVRObjectSampleAtomPtr;
+/*
+ =================================================================================================
+ QuickTime VR Authoring Components
+ -------------------------------------------------------------------------------------------------
+*/
+
+/*
+ ComponentDescription constants for QTVR Export components
+ (componentType = MovieExportType; componentSubType = MovieFileType)
+*/
+enum {
+ kQTVRFlattenerManufacturer = FOUR_CHAR_CODE('vrwe'), /* aka QTVRFlattenerType*/
+ kQTVRSplitterManufacturer = FOUR_CHAR_CODE('vrsp'),
+ kQTVRObjExporterManufacturer = FOUR_CHAR_CODE('vrob')
+};
+
+/* QuickTime VR Flattener atom types*/
+enum {
+ kQTVRFlattenerSettingsParentAtomType = FOUR_CHAR_CODE('VRWe'), /* parent of settings atoms (other than compression)*/
+ kQTVRFlattenerPreviewResAtomType = FOUR_CHAR_CODE('PRes'), /* preview resolution Int16*/
+ kQTVRFlattenerImportSpecAtomType = FOUR_CHAR_CODE('ISpe'), /* import file spec FSSpec*/
+ kQTVRFlattenerCreatePreviewAtomType = FOUR_CHAR_CODE('Prev'), /* Boolean*/
+ kQTVRFlattenerImportPreviewAtomType = FOUR_CHAR_CODE('IPre'), /* Boolean*/
+ kQTVRFlattenerBlurPreviewAtomType = FOUR_CHAR_CODE('Blur') /* Boolean*/
+};
+
+/* QuickTime VR Splitter atom types*/
+enum {
+ kQTVRSplitterSettingsParentAtomType = FOUR_CHAR_CODE('VRSp'), /* parent of settings atoms (other than compression)*/
+ kQTVRSplitterGenerateHTMLAtomType = FOUR_CHAR_CODE('Ghtm'), /* Boolean*/
+ kQTVRSplitterOverwriteFilesAtomType = FOUR_CHAR_CODE('Owfi'), /* Boolean*/
+ kQTVRSplitterUseFlattenerAtomType = FOUR_CHAR_CODE('Usef'), /* Boolean*/
+ kQTVRSplitterShowControllerAtomType = FOUR_CHAR_CODE('Shco'), /* Boolean*/
+ kQTVRSplitterTargetMyselfAtomType = FOUR_CHAR_CODE('Tgtm') /* Boolean*/
+};
+
+/* QuickTime VR Object Exporter atom types*/
+enum {
+ kQTVRObjExporterSettingsBlockSize = FOUR_CHAR_CODE('bsiz'), /* block size for compression*/
+ kQTVRObjExporterSettingsTargetSize = FOUR_CHAR_CODE('tsiz') /* target file size*/
+};
+
+
+
+#if OLDROUTINENAMES
+
+typedef QTVRStringAtom VRStringAtom;
+typedef QTVRWorldHeaderAtom VRWorldHeaderAtom;
+typedef QTVRPanoImagingAtom VRPanoImagingAtom;
+typedef QTVRNodeLocationAtom VRNodeLocationAtom;
+typedef QTVRNodeHeaderAtom VRNodeHeaderAtom;
+typedef QTVRAngleRangeAtom VRAngleRangeAtom;
+typedef QTVRHotSpotInfoAtom VRHotSpotInfoAtom;
+typedef QTVRLinkHotSpotAtom VRLinkHotSpotAtom;
+typedef QTVRPanoSampleAtom VRPanoSampleAtom;
+typedef QTVRTrackRefEntry VRTrackRefEntry;
+typedef QTVRObjectSampleAtom VRObjectSampleAtom;
+#endif /* OLDROUTINENAMES */
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QUICKTIMEVRFORMAT__ */
+
diff --git a/include/qt/Quickdraw.h b/include/qt/Quickdraw.h
new file mode 100644
index 000000000..00034fd58
--- /dev/null
+++ b/include/qt/Quickdraw.h
@@ -0,0 +1,2744 @@
+/*
+ File: Quickdraw.h
+
+ Contains: Interface to Quickdraw Graphics
+
+ Version: Technology: Mac OS 9
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QUICKDRAW__
+#define __QUICKDRAW__
+
+#ifndef __COMPONENTS__
+#include "Components.h"
+#endif
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+#ifndef __QUICKDRAWTEXT__
+#include "QuickdrawText.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ invalColReq = -1 /*invalid color table request*/
+};
+
+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
+};
+
+enum {
+ italicBit = 1,
+ ulineBit = 2,
+ outlineBit = 3,
+ shadowBit = 4,
+ condenseBit = 5,
+ extendBit = 6
+};
+
+enum {
+ /* QuickDraw color separation constants */
+ normalBit = 0, /*normal screen mapping*/
+ inverseBit = 1, /*inverse screen mapping*/
+ redBit = 4, /*RGB additive mapping*/
+ greenBit = 3,
+ blueBit = 2,
+ cyanBit = 8, /*CMYBk subtractive mapping*/
+ magentaBit = 7,
+ yellowBit = 6,
+ blackBit = 5
+};
+
+enum {
+ blackColor = 33, /*colors expressed in these mappings*/
+ whiteColor = 30,
+ redColor = 205,
+ greenColor = 341,
+ blueColor = 409,
+ cyanColor = 273,
+ magentaColor = 137,
+ yellowColor = 69
+};
+
+enum {
+ picLParen = 0, /*standard picture comments*/
+ picRParen = 1,
+ clutType = 0, /*0 if lookup table*/
+ fixedType = 1, /*1 if fixed table*/
+ directType = 2, /*2 if direct values*/
+ gdDevType = 0 /*0 = monochrome 1 = color*/
+};
+
+enum {
+ interlacedDevice = 2, /* 1 if single pixel lines look bad */
+ roundedDevice = 5, /* 1 if device has been "rounded" into the GrayRgn */
+ hasAuxMenuBar = 6, /* 1 if device has an aux menu bar on it */
+ burstDevice = 7,
+ ext32Device = 8,
+ ramInit = 10, /*1 if initialized from 'scrn' resource*/
+ mainScreen = 11, /* 1 if main screen */
+ allInit = 12, /* 1 if all devices initialized */
+ screenDevice = 13, /*1 if screen device [not used]*/
+ noDriver = 14, /* 1 if no driver for this GDevice */
+ screenActive = 15, /*1 if in use*/
+ hiliteBit = 7, /*flag bit in HiliteMode (lowMem flag)*/
+ pHiliteBit = 0, /*flag bit in HiliteMode used with BitClr procedure*/
+ defQDColors = 127, /*resource ID of clut for default QDColors*/
+ /* pixel type */
+ RGBDirect = 16, /* 16 & 32 bits/pixel pixelType value */
+ /* pmVersion values */
+ baseAddr32 = 4 /*pixmap base address is 32-bit address*/
+};
+
+
+enum {
+ sysPatListID = 0,
+ iBeamCursor = 1,
+ crossCursor = 2,
+ plusCursor = 3,
+ watchCursor = 4
+};
+
+enum {
+ kQDGrafVerbFrame = 0,
+ kQDGrafVerbPaint = 1,
+ kQDGrafVerbErase = 2,
+ kQDGrafVerbInvert = 3,
+ kQDGrafVerbFill = 4
+};
+
+#if OLDROUTINENAMES
+enum {
+ frame = kQDGrafVerbFrame,
+ paint = kQDGrafVerbPaint,
+ erase = kQDGrafVerbErase,
+ invert = kQDGrafVerbInvert,
+ fill = kQDGrafVerbFill
+};
+
+#endif /* OLDROUTINENAMES */
+
+typedef SInt8 GrafVerb;
+enum {
+ chunky = 0,
+ chunkyPlanar = 1,
+ planar = 2
+};
+
+typedef SInt8 PixelType;
+typedef short Bits16[16];
+
+/*************** IMPORTANT NOTE REGARDING Pattern **************************************
+ Patterns were originally defined as:
+
+ C: typedef unsigned char Pattern[8];
+ Pascal: Pattern = PACKED ARRAY [0..7] OF 0..255;
+
+ The old array definition of Pattern would cause 68000 based CPU's to crash in certain circum-
+ stances. The new struct definition is safe, but may require source code changes to compile.
+
+*********************************************************************************************/
+
+struct Pattern {
+ UInt8 pat[8];
+};
+typedef struct Pattern Pattern;
+/*
+ ConstPatternParam is no longer needed. It was first created when Pattern was an array.
+ Now that Pattern is a struct, it is more straight forward to just add the "const" qualifier
+ on the parameter type (e.g. "const Pattern * pat" instead of "ConstPatternParam pat").
+*/
+
+typedef const Pattern * ConstPatternParam;
+typedef Pattern * PatPtr;
+typedef PatPtr * PatHandle;
+typedef SignedByte QDByte;
+typedef QDByte * QDPtr;
+typedef QDPtr * QDHandle;
+typedef short QDErr;
+enum {
+ singleDevicesBit = 0,
+ dontMatchSeedsBit = 1,
+ allDevicesBit = 2
+};
+
+enum {
+ singleDevices = 1 << singleDevicesBit,
+ dontMatchSeeds = 1 << dontMatchSeedsBit,
+ allDevices = 1 << allDevicesBit
+};
+
+typedef unsigned long DeviceLoopFlags;
+/*
+ PrinterStatusOpcode. For communication with downloading and printing services.
+*/
+typedef SInt32 PrinterStatusOpcode;
+enum {
+ kPrinterFontStatus = 0,
+ kPrinterScalingStatus = 1
+};
+
+
+struct PrinterFontStatus {
+ SInt32 oResult;
+ SInt16 iFondID;
+ Style iStyle;
+};
+typedef struct PrinterFontStatus PrinterFontStatus;
+
+struct PrinterScalingStatus {
+ Point oScalingFactors;
+};
+typedef struct PrinterScalingStatus PrinterScalingStatus;
+
+struct BitMap {
+ Ptr baseAddr;
+ short rowBytes;
+ Rect bounds;
+};
+typedef struct BitMap BitMap;
+typedef BitMap * BitMapPtr;
+typedef BitMapPtr * BitMapHandle;
+
+struct Cursor {
+ Bits16 data;
+ Bits16 mask;
+ Point hotSpot;
+};
+typedef struct Cursor Cursor;
+
+typedef Cursor * CursPtr;
+typedef CursPtr * CursHandle;
+
+struct PenState {
+ Point pnLoc;
+ Point pnSize;
+ short pnMode;
+ Pattern pnPat;
+};
+typedef struct PenState PenState;
+#if !OPAQUE_TOOLBOX_STRUCTS
+
+struct MacRegion {
+ unsigned short rgnSize; /*size in bytes*/
+ Rect rgnBBox; /*enclosing rectangle*/
+};
+typedef struct MacRegion MacRegion;
+/*
+ The type name "Region" has a name space collision on Win32.
+ Use MacRegion to be cross-platfrom safe.
+*/
+#if TARGET_OS_MAC
+
+typedef MacRegion Region;
+#endif /* TARGET_OS_MAC */
+
+typedef MacRegion * RgnPtr;
+typedef RgnPtr * RgnHandle;
+#else
+typedef struct OpaqueRgnHandle* RgnHandle;
+#endif /* !OPAQUE_TOOLBOX_STRUCTS */
+
+
+struct Picture {
+ short picSize;
+ Rect picFrame;
+};
+typedef struct Picture Picture;
+
+typedef Picture * PicPtr;
+typedef PicPtr * PicHandle;
+
+struct MacPolygon {
+ short polySize;
+ Rect polyBBox;
+ Point polyPoints[1];
+};
+typedef struct MacPolygon MacPolygon;
+/*
+ The type name "Polygon" has a name space collision on Win32.
+ Use MacPolygon to be cross-platfrom safe.
+*/
+#if TARGET_OS_MAC
+
+typedef MacPolygon Polygon;
+#endif /* TARGET_OS_MAC */
+
+typedef MacPolygon * PolyPtr;
+typedef PolyPtr * PolyHandle;
+typedef CALLBACK_API( void , QDTextProcPtr )(short byteCount, Ptr textBuf, Point numer, Point denom);
+typedef CALLBACK_API( void , QDLineProcPtr )(Point newPt);
+typedef CALLBACK_API( void , QDRectProcPtr )(GrafVerb verb, Rect *r);
+typedef CALLBACK_API( void , QDRRectProcPtr )(GrafVerb verb, Rect *r, short ovalWidth, short ovalHeight);
+typedef CALLBACK_API( void , QDOvalProcPtr )(GrafVerb verb, Rect *r);
+typedef CALLBACK_API( void , QDArcProcPtr )(GrafVerb verb, Rect *r, short startAngle, short arcAngle);
+typedef CALLBACK_API( void , QDPolyProcPtr )(GrafVerb verb, PolyHandle poly);
+typedef CALLBACK_API( void , QDRgnProcPtr )(GrafVerb verb, RgnHandle rgn);
+typedef CALLBACK_API( void , QDBitsProcPtr )(BitMap *srcBits, Rect *srcRect, Rect *dstRect, short mode, RgnHandle maskRgn);
+typedef CALLBACK_API( void , QDCommentProcPtr )(short kind, short dataSize, Handle dataHandle);
+typedef CALLBACK_API( short , QDTxMeasProcPtr )(short byteCount, Ptr textAddr, Point *numer, Point *denom, FontInfo *info);
+typedef CALLBACK_API( void , QDGetPicProcPtr )(Ptr dataPtr, short byteCount);
+typedef CALLBACK_API( void , QDPutPicProcPtr )(Ptr dataPtr, short byteCount);
+typedef CALLBACK_API( void , QDOpcodeProcPtr )(Rect *fromRect, Rect *toRect, short opcode, short version);
+typedef CALLBACK_API_C( OSStatus , QDStdGlyphsProcPtr )(void *dataStream, ByteCount size);
+typedef CALLBACK_API( void , QDJShieldCursorProcPtr )(short left, short top, short right, short bottom);
+typedef STACK_UPP_TYPE(QDTextProcPtr) QDTextUPP;
+typedef STACK_UPP_TYPE(QDLineProcPtr) QDLineUPP;
+typedef STACK_UPP_TYPE(QDRectProcPtr) QDRectUPP;
+typedef STACK_UPP_TYPE(QDRRectProcPtr) QDRRectUPP;
+typedef STACK_UPP_TYPE(QDOvalProcPtr) QDOvalUPP;
+typedef STACK_UPP_TYPE(QDArcProcPtr) QDArcUPP;
+typedef STACK_UPP_TYPE(QDPolyProcPtr) QDPolyUPP;
+typedef STACK_UPP_TYPE(QDRgnProcPtr) QDRgnUPP;
+typedef STACK_UPP_TYPE(QDBitsProcPtr) QDBitsUPP;
+typedef STACK_UPP_TYPE(QDCommentProcPtr) QDCommentUPP;
+typedef STACK_UPP_TYPE(QDTxMeasProcPtr) QDTxMeasUPP;
+typedef STACK_UPP_TYPE(QDGetPicProcPtr) QDGetPicUPP;
+typedef STACK_UPP_TYPE(QDPutPicProcPtr) QDPutPicUPP;
+typedef STACK_UPP_TYPE(QDOpcodeProcPtr) QDOpcodeUPP;
+typedef STACK_UPP_TYPE(QDStdGlyphsProcPtr) QDStdGlyphsUPP;
+typedef STACK_UPP_TYPE(QDJShieldCursorProcPtr) QDJShieldCursorUPP;
+
+struct QDProcs {
+ QDTextUPP textProc;
+ QDLineUPP lineProc;
+ QDRectUPP rectProc;
+ QDRRectUPP rRectProc;
+ QDOvalUPP ovalProc;
+ QDArcUPP arcProc;
+ QDPolyUPP polyProc;
+ QDRgnUPP rgnProc;
+ QDBitsUPP bitsProc;
+ QDCommentUPP commentProc;
+ QDTxMeasUPP txMeasProc;
+ QDGetPicUPP getPicProc;
+ QDPutPicUPP putPicProc;
+};
+typedef struct QDProcs QDProcs;
+typedef QDProcs * QDProcsPtr;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(QDTextUPP)
+ NewQDTextUPP (QDTextProcPtr userRoutine);
+
+ EXTERN_API(QDLineUPP)
+ NewQDLineUPP (QDLineProcPtr userRoutine);
+
+ EXTERN_API(QDRectUPP)
+ NewQDRectUPP (QDRectProcPtr userRoutine);
+
+ EXTERN_API(QDRRectUPP)
+ NewQDRRectUPP (QDRRectProcPtr userRoutine);
+
+ EXTERN_API(QDOvalUPP)
+ NewQDOvalUPP (QDOvalProcPtr userRoutine);
+
+ EXTERN_API(QDArcUPP)
+ NewQDArcUPP (QDArcProcPtr userRoutine);
+
+ EXTERN_API(QDPolyUPP)
+ NewQDPolyUPP (QDPolyProcPtr userRoutine);
+
+ EXTERN_API(QDRgnUPP)
+ NewQDRgnUPP (QDRgnProcPtr userRoutine);
+
+ EXTERN_API(QDBitsUPP)
+ NewQDBitsUPP (QDBitsProcPtr userRoutine);
+
+ EXTERN_API(QDCommentUPP)
+ NewQDCommentUPP (QDCommentProcPtr userRoutine);
+
+ EXTERN_API(QDTxMeasUPP)
+ NewQDTxMeasUPP (QDTxMeasProcPtr userRoutine);
+
+ EXTERN_API(QDGetPicUPP)
+ NewQDGetPicUPP (QDGetPicProcPtr userRoutine);
+
+ EXTERN_API(QDPutPicUPP)
+ NewQDPutPicUPP (QDPutPicProcPtr userRoutine);
+
+ EXTERN_API(QDOpcodeUPP)
+ NewQDOpcodeUPP (QDOpcodeProcPtr userRoutine);
+
+ EXTERN_API(QDStdGlyphsUPP)
+ NewQDStdGlyphsUPP (QDStdGlyphsProcPtr userRoutine);
+
+ EXTERN_API(QDJShieldCursorUPP)
+ NewQDJShieldCursorUPP (QDJShieldCursorProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeQDTextUPP (QDTextUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeQDLineUPP (QDLineUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeQDRectUPP (QDRectUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeQDRRectUPP (QDRRectUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeQDOvalUPP (QDOvalUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeQDArcUPP (QDArcUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeQDPolyUPP (QDPolyUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeQDRgnUPP (QDRgnUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeQDBitsUPP (QDBitsUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeQDCommentUPP (QDCommentUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeQDTxMeasUPP (QDTxMeasUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeQDGetPicUPP (QDGetPicUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeQDPutPicUPP (QDPutPicUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeQDOpcodeUPP (QDOpcodeUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeQDStdGlyphsUPP (QDStdGlyphsUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeQDJShieldCursorUPP (QDJShieldCursorUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeQDTextUPP (short byteCount,
+ Ptr textBuf,
+ Point numer,
+ Point denom,
+ QDTextUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeQDLineUPP (Point newPt,
+ QDLineUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeQDRectUPP (GrafVerb verb,
+ Rect * r,
+ QDRectUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeQDRRectUPP (GrafVerb verb,
+ Rect * r,
+ short ovalWidth,
+ short ovalHeight,
+ QDRRectUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeQDOvalUPP (GrafVerb verb,
+ Rect * r,
+ QDOvalUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeQDArcUPP (GrafVerb verb,
+ Rect * r,
+ short startAngle,
+ short arcAngle,
+ QDArcUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeQDPolyUPP (GrafVerb verb,
+ PolyHandle poly,
+ QDPolyUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeQDRgnUPP (GrafVerb verb,
+ RgnHandle rgn,
+ QDRgnUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeQDBitsUPP (BitMap * srcBits,
+ Rect * srcRect,
+ Rect * dstRect,
+ short mode,
+ RgnHandle maskRgn,
+ QDBitsUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeQDCommentUPP (short kind,
+ short dataSize,
+ Handle dataHandle,
+ QDCommentUPP userUPP);
+
+ EXTERN_API(short)
+ InvokeQDTxMeasUPP (short byteCount,
+ Ptr textAddr,
+ Point * numer,
+ Point * denom,
+ FontInfo * info,
+ QDTxMeasUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeQDGetPicUPP (Ptr dataPtr,
+ short byteCount,
+ QDGetPicUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeQDPutPicUPP (Ptr dataPtr,
+ short byteCount,
+ QDPutPicUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeQDOpcodeUPP (Rect * fromRect,
+ Rect * toRect,
+ short opcode,
+ short version,
+ QDOpcodeUPP userUPP);
+
+ EXTERN_API(OSStatus)
+ InvokeQDStdGlyphsUPP (void * dataStream,
+ ByteCount size,
+ QDStdGlyphsUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeQDJShieldCursorUPP (short left,
+ short top,
+ short right,
+ short bottom,
+ QDJShieldCursorUPP userUPP);
+
+#else
+ enum { uppQDTextProcInfo = 0x00003F80 }; /* pascal no_return_value Func(2_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppQDLineProcInfo = 0x000000C0 }; /* pascal no_return_value Func(4_bytes) */
+ enum { uppQDRectProcInfo = 0x00000340 }; /* pascal no_return_value Func(1_byte, 4_bytes) */
+ enum { uppQDRRectProcInfo = 0x00002B40 }; /* pascal no_return_value Func(1_byte, 4_bytes, 2_bytes, 2_bytes) */
+ enum { uppQDOvalProcInfo = 0x00000340 }; /* pascal no_return_value Func(1_byte, 4_bytes) */
+ enum { uppQDArcProcInfo = 0x00002B40 }; /* pascal no_return_value Func(1_byte, 4_bytes, 2_bytes, 2_bytes) */
+ enum { uppQDPolyProcInfo = 0x00000340 }; /* pascal no_return_value Func(1_byte, 4_bytes) */
+ enum { uppQDRgnProcInfo = 0x00000340 }; /* pascal no_return_value Func(1_byte, 4_bytes) */
+ enum { uppQDBitsProcInfo = 0x0000EFC0 }; /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes, 2_bytes, 4_bytes) */
+ enum { uppQDCommentProcInfo = 0x00000E80 }; /* pascal no_return_value Func(2_bytes, 2_bytes, 4_bytes) */
+ enum { uppQDTxMeasProcInfo = 0x0000FFA0 }; /* pascal 2_bytes Func(2_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppQDGetPicProcInfo = 0x000002C0 }; /* pascal no_return_value Func(4_bytes, 2_bytes) */
+ enum { uppQDPutPicProcInfo = 0x000002C0 }; /* pascal no_return_value Func(4_bytes, 2_bytes) */
+ enum { uppQDOpcodeProcInfo = 0x00002BC0 }; /* pascal no_return_value Func(4_bytes, 4_bytes, 2_bytes, 2_bytes) */
+ enum { uppQDStdGlyphsProcInfo = 0x000003F1 }; /* 4_bytes Func(4_bytes, 4_bytes) */
+ enum { uppQDJShieldCursorProcInfo = 0x00002A80 }; /* pascal no_return_value Func(2_bytes, 2_bytes, 2_bytes, 2_bytes) */
+ #define NewQDTextUPP(userRoutine) (QDTextUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDTextProcInfo, GetCurrentArchitecture())
+ #define NewQDLineUPP(userRoutine) (QDLineUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDLineProcInfo, GetCurrentArchitecture())
+ #define NewQDRectUPP(userRoutine) (QDRectUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDRectProcInfo, GetCurrentArchitecture())
+ #define NewQDRRectUPP(userRoutine) (QDRRectUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDRRectProcInfo, GetCurrentArchitecture())
+ #define NewQDOvalUPP(userRoutine) (QDOvalUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDOvalProcInfo, GetCurrentArchitecture())
+ #define NewQDArcUPP(userRoutine) (QDArcUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDArcProcInfo, GetCurrentArchitecture())
+ #define NewQDPolyUPP(userRoutine) (QDPolyUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDPolyProcInfo, GetCurrentArchitecture())
+ #define NewQDRgnUPP(userRoutine) (QDRgnUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDRgnProcInfo, GetCurrentArchitecture())
+ #define NewQDBitsUPP(userRoutine) (QDBitsUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDBitsProcInfo, GetCurrentArchitecture())
+ #define NewQDCommentUPP(userRoutine) (QDCommentUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDCommentProcInfo, GetCurrentArchitecture())
+ #define NewQDTxMeasUPP(userRoutine) (QDTxMeasUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDTxMeasProcInfo, GetCurrentArchitecture())
+ #define NewQDGetPicUPP(userRoutine) (QDGetPicUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDGetPicProcInfo, GetCurrentArchitecture())
+ #define NewQDPutPicUPP(userRoutine) (QDPutPicUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDPutPicProcInfo, GetCurrentArchitecture())
+ #define NewQDOpcodeUPP(userRoutine) (QDOpcodeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDOpcodeProcInfo, GetCurrentArchitecture())
+ #define NewQDStdGlyphsUPP(userRoutine) (QDStdGlyphsUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDStdGlyphsProcInfo, GetCurrentArchitecture())
+ #define NewQDJShieldCursorUPP(userRoutine) (QDJShieldCursorUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDJShieldCursorProcInfo, GetCurrentArchitecture())
+ #define DisposeQDTextUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeQDLineUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeQDRectUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeQDRRectUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeQDOvalUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeQDArcUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeQDPolyUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeQDRgnUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeQDBitsUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeQDCommentUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeQDTxMeasUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeQDGetPicUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeQDPutPicUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeQDOpcodeUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeQDStdGlyphsUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeQDJShieldCursorUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeQDTextUPP(byteCount, textBuf, numer, denom, userUPP) CALL_FOUR_PARAMETER_UPP((userUPP), uppQDTextProcInfo, (byteCount), (textBuf), (numer), (denom))
+ #define InvokeQDLineUPP(newPt, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppQDLineProcInfo, (newPt))
+ #define InvokeQDRectUPP(verb, r, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppQDRectProcInfo, (verb), (r))
+ #define InvokeQDRRectUPP(verb, r, ovalWidth, ovalHeight, userUPP) CALL_FOUR_PARAMETER_UPP((userUPP), uppQDRRectProcInfo, (verb), (r), (ovalWidth), (ovalHeight))
+ #define InvokeQDOvalUPP(verb, r, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppQDOvalProcInfo, (verb), (r))
+ #define InvokeQDArcUPP(verb, r, startAngle, arcAngle, userUPP) CALL_FOUR_PARAMETER_UPP((userUPP), uppQDArcProcInfo, (verb), (r), (startAngle), (arcAngle))
+ #define InvokeQDPolyUPP(verb, poly, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppQDPolyProcInfo, (verb), (poly))
+ #define InvokeQDRgnUPP(verb, rgn, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppQDRgnProcInfo, (verb), (rgn))
+ #define InvokeQDBitsUPP(srcBits, srcRect, dstRect, mode, maskRgn, userUPP) CALL_FIVE_PARAMETER_UPP((userUPP), uppQDBitsProcInfo, (srcBits), (srcRect), (dstRect), (mode), (maskRgn))
+ #define InvokeQDCommentUPP(kind, dataSize, dataHandle, userUPP) CALL_THREE_PARAMETER_UPP((userUPP), uppQDCommentProcInfo, (kind), (dataSize), (dataHandle))
+ #define InvokeQDTxMeasUPP(byteCount, textAddr, numer, denom, info, userUPP) (short)CALL_FIVE_PARAMETER_UPP((userUPP), uppQDTxMeasProcInfo, (byteCount), (textAddr), (numer), (denom), (info))
+ #define InvokeQDGetPicUPP(dataPtr, byteCount, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppQDGetPicProcInfo, (dataPtr), (byteCount))
+ #define InvokeQDPutPicUPP(dataPtr, byteCount, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppQDPutPicProcInfo, (dataPtr), (byteCount))
+ #define InvokeQDOpcodeUPP(fromRect, toRect, opcode, version, userUPP) CALL_FOUR_PARAMETER_UPP((userUPP), uppQDOpcodeProcInfo, (fromRect), (toRect), (opcode), (version))
+ #define InvokeQDStdGlyphsUPP(dataStream, size, userUPP) (OSStatus)CALL_TWO_PARAMETER_UPP((userUPP), uppQDStdGlyphsProcInfo, (dataStream), (size))
+ #define InvokeQDJShieldCursorUPP(left, top, right, bottom, userUPP) CALL_FOUR_PARAMETER_UPP((userUPP), uppQDJShieldCursorProcInfo, (left), (top), (right), (bottom))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewQDTextProc(userRoutine) NewQDTextUPP(userRoutine)
+#define NewQDLineProc(userRoutine) NewQDLineUPP(userRoutine)
+#define NewQDRectProc(userRoutine) NewQDRectUPP(userRoutine)
+#define NewQDRRectProc(userRoutine) NewQDRRectUPP(userRoutine)
+#define NewQDOvalProc(userRoutine) NewQDOvalUPP(userRoutine)
+#define NewQDArcProc(userRoutine) NewQDArcUPP(userRoutine)
+#define NewQDPolyProc(userRoutine) NewQDPolyUPP(userRoutine)
+#define NewQDRgnProc(userRoutine) NewQDRgnUPP(userRoutine)
+#define NewQDBitsProc(userRoutine) NewQDBitsUPP(userRoutine)
+#define NewQDCommentProc(userRoutine) NewQDCommentUPP(userRoutine)
+#define NewQDTxMeasProc(userRoutine) NewQDTxMeasUPP(userRoutine)
+#define NewQDGetPicProc(userRoutine) NewQDGetPicUPP(userRoutine)
+#define NewQDPutPicProc(userRoutine) NewQDPutPicUPP(userRoutine)
+#define NewQDOpcodeProc(userRoutine) NewQDOpcodeUPP(userRoutine)
+#define NewQDStdGlyphsProc(userRoutine) NewQDStdGlyphsUPP(userRoutine)
+#define NewQDJShieldCursorProc(userRoutine) NewQDJShieldCursorUPP(userRoutine)
+#define CallQDTextProc(userRoutine, byteCount, textBuf, numer, denom) InvokeQDTextUPP(byteCount, textBuf, numer, denom, userRoutine)
+#define CallQDLineProc(userRoutine, newPt) InvokeQDLineUPP(newPt, userRoutine)
+#define CallQDRectProc(userRoutine, verb, r) InvokeQDRectUPP(verb, r, userRoutine)
+#define CallQDRRectProc(userRoutine, verb, r, ovalWidth, ovalHeight) InvokeQDRRectUPP(verb, r, ovalWidth, ovalHeight, userRoutine)
+#define CallQDOvalProc(userRoutine, verb, r) InvokeQDOvalUPP(verb, r, userRoutine)
+#define CallQDArcProc(userRoutine, verb, r, startAngle, arcAngle) InvokeQDArcUPP(verb, r, startAngle, arcAngle, userRoutine)
+#define CallQDPolyProc(userRoutine, verb, poly) InvokeQDPolyUPP(verb, poly, userRoutine)
+#define CallQDRgnProc(userRoutine, verb, rgn) InvokeQDRgnUPP(verb, rgn, userRoutine)
+#define CallQDBitsProc(userRoutine, srcBits, srcRect, dstRect, mode, maskRgn) InvokeQDBitsUPP(srcBits, srcRect, dstRect, mode, maskRgn, userRoutine)
+#define CallQDCommentProc(userRoutine, kind, dataSize, dataHandle) InvokeQDCommentUPP(kind, dataSize, dataHandle, userRoutine)
+#define CallQDTxMeasProc(userRoutine, byteCount, textAddr, numer, denom, info) InvokeQDTxMeasUPP(byteCount, textAddr, numer, denom, info, userRoutine)
+#define CallQDGetPicProc(userRoutine, dataPtr, byteCount) InvokeQDGetPicUPP(dataPtr, byteCount, userRoutine)
+#define CallQDPutPicProc(userRoutine, dataPtr, byteCount) InvokeQDPutPicUPP(dataPtr, byteCount, userRoutine)
+#define CallQDOpcodeProc(userRoutine, fromRect, toRect, opcode, version) InvokeQDOpcodeUPP(fromRect, toRect, opcode, version, userRoutine)
+#define CallQDStdGlyphsProc(userRoutine, dataStream, size) InvokeQDStdGlyphsUPP(dataStream, size, userRoutine)
+#define CallQDJShieldCursorProc(userRoutine, left, top, right, bottom) InvokeQDJShieldCursorUPP(left, top, right, bottom, userRoutine)
+#if !OPAQUE_TOOLBOX_STRUCTS
+
+struct GrafPort {
+ short device;
+ BitMap portBits;
+ Rect portRect;
+ RgnHandle visRgn;
+ RgnHandle clipRgn;
+ Pattern bkPat;
+ Pattern fillPat;
+ Point pnLoc;
+ Point pnSize;
+ short pnMode;
+ Pattern pnPat;
+ short pnVis;
+ 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;
+ long fgColor;
+ long bkColor;
+ short colrBit;
+ short patStretch;
+ Handle picSave;
+ Handle rgnSave;
+ Handle polySave;
+ QDProcsPtr grafProcs;
+};
+typedef struct GrafPort GrafPort;
+
+typedef GrafPort * GrafPtr;
+/*
+ * This set of definitions "belongs" in Windows.
+ * But, there is a circularity in the headers where Windows includes Controls and
+ * Controls includes Windows. To break the circle, the information
+ * needed by Controls is moved from Windows to Quickdraw.
+ */
+typedef GrafPtr WindowPtr;
+typedef WindowPtr DialogPtr;
+#else
+typedef struct OpaqueWindowPtr* WindowPtr;
+typedef struct OpaqueDialogPtr* DialogPtr;
+typedef struct OpaqueGrafPtr* GrafPtr;
+#endif /* !OPAQUE_TOOLBOX_STRUCTS */
+
+typedef WindowPtr WindowRef;
+/* DragConstraint constants to pass to DragGray,DragTheRgn, or ConstrainedDragRgn*/
+typedef UInt16 DragConstraint;
+enum {
+ kNoConstraint = 0,
+ kVerticalConstraint = 1,
+ kHorizontalConstraint = 2
+};
+
+
+typedef CALLBACK_API( void , DragGrayRgnProcPtr )(void );
+/*
+ * Here ends the list of things that "belong" in Windows.
+ */
+
+
+
+struct RGBColor {
+ unsigned short red; /*magnitude of red component*/
+ unsigned short green; /*magnitude of green component*/
+ unsigned short blue; /*magnitude of blue component*/
+};
+typedef struct RGBColor RGBColor;
+typedef RGBColor * RGBColorPtr;
+typedef RGBColorPtr * RGBColorHdl;
+typedef CALLBACK_API( Boolean , ColorSearchProcPtr )(RGBColor *rgb, long *position);
+typedef CALLBACK_API( Boolean , ColorComplementProcPtr )(RGBColor *rgb);
+typedef STACK_UPP_TYPE(DragGrayRgnProcPtr) DragGrayRgnUPP;
+typedef STACK_UPP_TYPE(ColorSearchProcPtr) ColorSearchUPP;
+typedef STACK_UPP_TYPE(ColorComplementProcPtr) ColorComplementUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(DragGrayRgnUPP)
+ NewDragGrayRgnUPP (DragGrayRgnProcPtr userRoutine);
+
+ EXTERN_API(ColorSearchUPP)
+ NewColorSearchUPP (ColorSearchProcPtr userRoutine);
+
+ EXTERN_API(ColorComplementUPP)
+ NewColorComplementUPP (ColorComplementProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeDragGrayRgnUPP (DragGrayRgnUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeColorSearchUPP (ColorSearchUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeColorComplementUPP (ColorComplementUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeDragGrayRgnUPP (DragGrayRgnUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeColorSearchUPP (RGBColor * rgb,
+ long * position,
+ ColorSearchUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeColorComplementUPP (RGBColor * rgb,
+ ColorComplementUPP userUPP);
+
+#else
+ enum { uppDragGrayRgnProcInfo = 0x00000000 }; /* pascal no_return_value Func() */
+ enum { uppColorSearchProcInfo = 0x000003D0 }; /* pascal 1_byte Func(4_bytes, 4_bytes) */
+ enum { uppColorComplementProcInfo = 0x000000D0 }; /* pascal 1_byte Func(4_bytes) */
+ #define NewDragGrayRgnUPP(userRoutine) (DragGrayRgnUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDragGrayRgnProcInfo, GetCurrentArchitecture())
+ #define NewColorSearchUPP(userRoutine) (ColorSearchUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppColorSearchProcInfo, GetCurrentArchitecture())
+ #define NewColorComplementUPP(userRoutine) (ColorComplementUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppColorComplementProcInfo, GetCurrentArchitecture())
+ #define DisposeDragGrayRgnUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeColorSearchUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeColorComplementUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeDragGrayRgnUPP(userUPP) CALL_ZERO_PARAMETER_UPP((userUPP), uppDragGrayRgnProcInfo)
+ #define InvokeColorSearchUPP(rgb, position, userUPP) (Boolean)CALL_TWO_PARAMETER_UPP((userUPP), uppColorSearchProcInfo, (rgb), (position))
+ #define InvokeColorComplementUPP(rgb, userUPP) (Boolean)CALL_ONE_PARAMETER_UPP((userUPP), uppColorComplementProcInfo, (rgb))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewDragGrayRgnProc(userRoutine) NewDragGrayRgnUPP(userRoutine)
+#define NewColorSearchProc(userRoutine) NewColorSearchUPP(userRoutine)
+#define NewColorComplementProc(userRoutine) NewColorComplementUPP(userRoutine)
+#define CallDragGrayRgnProc(userRoutine) InvokeDragGrayRgnUPP(userRoutine)
+#define CallColorSearchProc(userRoutine, rgb, position) InvokeColorSearchUPP(rgb, position, userRoutine)
+#define CallColorComplementProc(userRoutine, rgb) InvokeColorComplementUPP(rgb, userRoutine)
+
+struct ColorSpec {
+ short value; /*index or other value*/
+ RGBColor rgb; /*true color*/
+};
+typedef struct ColorSpec ColorSpec;
+typedef ColorSpec * ColorSpecPtr;
+
+typedef ColorSpec CSpecArray[1];
+
+struct ColorTable {
+ long ctSeed; /*unique identifier for table*/
+ short ctFlags; /*high bit: 0 = PixMap; 1 = device*/
+ short ctSize; /*number of entries in CTTable*/
+ CSpecArray ctTable; /*array [0..0] of ColorSpec*/
+};
+typedef struct ColorTable ColorTable;
+
+typedef ColorTable * CTabPtr;
+typedef CTabPtr * CTabHandle;
+
+struct xColorSpec {
+ short value; /*index or other value*/
+ RGBColor rgb; /*true color*/
+ short xalpha;
+};
+typedef struct xColorSpec xColorSpec;
+typedef xColorSpec * xColorSpecPtr;
+
+typedef xColorSpec xCSpecArray[1];
+
+struct MatchRec {
+ unsigned short red;
+ unsigned short green;
+ unsigned short blue;
+ long matchData;
+};
+typedef struct MatchRec MatchRec;
+/*
+ QuickTime 3.0 makes PixMap data structure available on non-Mac OS's.
+ In order to implement PixMap in these alternate environments, the PixMap
+ had to be extended. The pmReserved field was changed to pmExt which is
+ a Handle to extra info. The planeBytes field was changed to pixelFormat.
+
+ In OS X, Quickdraw also uses the new PixMap data structure.
+*/
+#ifndef OLDPIXMAPSTRUCT
+#if TARGET_OS_MAC && TARGET_API_MAC_OS8
+#define OLDPIXMAPSTRUCT 1
+#else
+#define OLDPIXMAPSTRUCT 0
+#endif /* TARGET_OS_MAC && TARGET_API_MAC_OS8 */
+
+#endif /* !defined(OLDPIXMAPSTRUCT) */
+
+
+#if OLDPIXMAPSTRUCT
+ #define GETPIXMAPPIXELFORMAT(pm) ( (pm)->pixelSize )
+#else
+ #define GETPIXMAPPIXELFORMAT(pm) ( ((pm)->pixelFormat != 0) ? (pm)->pixelFormat : (pm)->pixelSize )
+#endif
+
+
+#if TARGET_OS_MAC && !TARGET_RT_LITTLE_ENDIAN
+ #define NON_MAC_PIXEL_FORMATS 0
+#else
+ #define NON_MAC_PIXEL_FORMATS 1
+#endif
+
+/* pixel formats*/
+enum {
+ k1MonochromePixelFormat = 0x00000001, /* 1 bit indexed*/
+ k2IndexedPixelFormat = 0x00000002, /* 2 bit indexed*/
+ k4IndexedPixelFormat = 0x00000004, /* 4 bit indexed*/
+ k8IndexedPixelFormat = 0x00000008, /* 8 bit indexed*/
+ k16BE555PixelFormat = 0x00000010, /* 16 bit BE rgb 555 (Mac)*/
+ k24RGBPixelFormat = 0x00000018, /* 24 bit rgb */
+ k32ARGBPixelFormat = 0x00000020, /* 32 bit argb (Mac)*/
+ k1IndexedGrayPixelFormat = 0x00000021, /* 1 bit indexed gray*/
+ k2IndexedGrayPixelFormat = 0x00000022, /* 2 bit indexed gray*/
+ k4IndexedGrayPixelFormat = 0x00000024, /* 4 bit indexed gray*/
+ k8IndexedGrayPixelFormat = 0x00000028 /* 8 bit indexed gray*/
+};
+
+
+/* values for PixMap.pixelFormat*/
+enum {
+ k16LE555PixelFormat = FOUR_CHAR_CODE('L555'), /* 16 bit LE rgb 555 (PC)*/
+ k16LE5551PixelFormat = FOUR_CHAR_CODE('5551'), /* 16 bit LE rgb 5551*/
+ k16BE565PixelFormat = FOUR_CHAR_CODE('B565'), /* 16 bit BE rgb 565*/
+ k16LE565PixelFormat = FOUR_CHAR_CODE('L565'), /* 16 bit LE rgb 565*/
+ k24BGRPixelFormat = FOUR_CHAR_CODE('24BG'), /* 24 bit bgr */
+ k32BGRAPixelFormat = FOUR_CHAR_CODE('BGRA'), /* 32 bit bgra (Matrox)*/
+ k32ABGRPixelFormat = FOUR_CHAR_CODE('ABGR'), /* 32 bit abgr */
+ k32RGBAPixelFormat = FOUR_CHAR_CODE('RGBA'), /* 32 bit rgba */
+ kYUVSPixelFormat = FOUR_CHAR_CODE('yuvs'), /* YUV 4:2:2 byte ordering 16-unsigned = 'YUY2'*/
+ kYUVUPixelFormat = FOUR_CHAR_CODE('yuvu'), /* YUV 4:2:2 byte ordering 16-signed*/
+ kYVU9PixelFormat = FOUR_CHAR_CODE('YVU9'), /* YVU9 Planar 9*/
+ kYUV411PixelFormat = FOUR_CHAR_CODE('Y411'), /* YUV 4:1:1 Interleaved 16*/
+ kYVYU422PixelFormat = FOUR_CHAR_CODE('YVYU'), /* YVYU 4:2:2 byte ordering 16*/
+ kUYVY422PixelFormat = FOUR_CHAR_CODE('UYVY'), /* UYVY 4:2:2 byte ordering 16*/
+ kYUV211PixelFormat = FOUR_CHAR_CODE('Y211'), /* YUV 2:1:1 Packed 8*/
+ k2vuyPixelFormat = FOUR_CHAR_CODE('2vuy') /* UYVY 4:2:2 byte ordering 16*/
+};
+
+#if !OLDPIXMAPSTRUCT
+
+struct PixMapExtension {
+ long extSize; /*size of struct, duh!*/
+ unsigned long pmBits; /*pixmap attributes bitfield*/
+ void * pmGD; /*this is a GDHandle*/
+ long pmSeed;
+ Fixed gammaLevel; /*pixmap gammalevel*/
+ Fixed requestedGammaLevel;
+ unsigned long reserved2;
+ long longRowBytes; /*used when rowBytes > 16382*/
+ unsigned long signature;
+ Handle baseAddrHandle;
+};
+typedef struct PixMapExtension PixMapExtension;
+
+typedef PixMapExtension * PixMapExtPtr;
+typedef PixMapExtPtr * PixMapExtHandle;
+#endif /* !OLDPIXMAPSTRUCT */
+
+
+struct PixMap {
+ Ptr baseAddr; /*pointer to pixels*/
+ short rowBytes; /*offset to next line*/
+ Rect bounds; /*encloses bitmap*/
+ short pmVersion; /*pixMap version number*/
+ short packType; /*defines packing format*/
+ long packSize; /*length of pixel data*/
+ Fixed hRes; /*horiz. resolution (ppi)*/
+ Fixed vRes; /*vert. resolution (ppi)*/
+ short pixelType; /*defines pixel type*/
+ short pixelSize; /*# bits in pixel*/
+ short cmpCount; /*# components in pixel*/
+ short cmpSize; /*# bits per component*/
+#if OLDPIXMAPSTRUCT
+ long planeBytes; /*offset to next plane*/
+ CTabHandle pmTable; /*color map for this pixMap*/
+ long pmReserved;
+#else
+ OSType pixelFormat; /*fourCharCode representation*/
+ CTabHandle pmTable; /*color map for this pixMap*/
+ PixMapExtHandle pmExt; /*Handle to pixMap extension*/
+#endif
+};
+typedef struct PixMap PixMap;
+typedef PixMap * PixMapPtr;
+typedef PixMapPtr * PixMapHandle;
+
+struct PixPat {
+ short patType; /*type of pattern*/
+ PixMapHandle patMap; /*the pattern's pixMap*/
+ Handle patData; /*pixmap's data*/
+ Handle patXData; /*expanded Pattern data*/
+ short patXValid; /*flags whether expanded Pattern valid*/
+ Handle patXMap; /*Handle to expanded Pattern data*/
+ Pattern pat1Data; /*old-Style pattern/RGB color*/
+};
+typedef struct PixPat PixPat;
+typedef PixPat * PixPatPtr;
+typedef PixPatPtr * PixPatHandle;
+
+struct CCrsr {
+ short crsrType; /*type of cursor*/
+ PixMapHandle crsrMap; /*the cursor's pixmap*/
+ Handle crsrData; /*cursor's data*/
+ Handle crsrXData; /*expanded cursor data*/
+ short crsrXValid; /*depth of expanded data (0 if none)*/
+ Handle crsrXHandle; /*future use*/
+ Bits16 crsr1Data; /*one-bit cursor*/
+ Bits16 crsrMask; /*cursor's mask*/
+ Point crsrHotSpot; /*cursor's hotspot*/
+ long crsrXTable; /*private*/
+ long crsrID; /*private*/
+};
+typedef struct CCrsr CCrsr;
+typedef CCrsr * CCrsrPtr;
+typedef CCrsrPtr * CCrsrHandle;
+
+struct GammaTbl {
+ short gVersion; /*gamma version number*/
+ short gType; /*gamma data type*/
+ short gFormulaSize; /*Formula data size*/
+ short gChanCnt; /*number of channels of data*/
+ short gDataCnt; /*number of values/channel*/
+ short gDataWidth; /*bits/corrected value (data packed to next larger byte size)*/
+ short gFormulaData[1]; /*data for formulas followed by gamma values*/
+};
+typedef struct GammaTbl GammaTbl;
+typedef GammaTbl * GammaTblPtr;
+typedef GammaTblPtr * GammaTblHandle;
+
+struct ITab {
+ long iTabSeed; /*copy of CTSeed from source CTable*/
+ short iTabRes; /*bits/channel resolution of iTable*/
+ Byte iTTable[1]; /*byte colortable index values*/
+};
+typedef struct ITab ITab;
+typedef ITab * ITabPtr;
+typedef ITabPtr * ITabHandle;
+
+struct SProcRec {
+ Handle nxtSrch; /*SProcHndl Handle to next SProcRec*/
+ ColorSearchUPP srchProc; /*search procedure proc ptr*/
+};
+typedef struct SProcRec SProcRec;
+
+typedef SProcRec * SProcPtr;
+typedef SProcPtr * SProcHndl;
+
+struct CProcRec {
+ Handle nxtComp; /*CProcHndl Handle to next CProcRec*/
+ ColorComplementUPP compProc; /*complement procedure proc ptr*/
+};
+typedef struct CProcRec CProcRec;
+
+typedef CProcRec * CProcPtr;
+typedef CProcPtr * CProcHndl;
+/*
+ QuickTime 3.0 makes GDevice data structure available on non-Mac OS's.
+ In order to implement GDevice in these alternate environments, the GDevice
+ had to be extended. The gdReserved field was changed to gdExt which is
+ a Handle to extra info.
+*/
+#ifndef OLDGDEVICESTRUCT
+#if TARGET_OS_MAC && TARGET_API_MAC_OS8
+#define OLDGDEVICESTRUCT 1
+#else
+#define OLDGDEVICESTRUCT 0
+#endif /* TARGET_OS_MAC && TARGET_API_MAC_OS8 */
+
+#endif /* !defined(OLDGDEVICESTRUCT) */
+
+typedef struct GDevice GDevice;
+typedef GDevice * GDPtr;
+typedef GDPtr * GDHandle;
+
+struct GDevice {
+ short gdRefNum; /*driver's unit number*/
+ short gdID; /*client ID for search procs*/
+ short gdType; /*fixed/CLUT/direct*/
+ ITabHandle gdITable; /*Handle to inverse lookup table*/
+ short gdResPref; /*preferred resolution of GDITable*/
+ SProcHndl gdSearchProc; /*search proc list head*/
+ CProcHndl gdCompProc; /*complement proc list*/
+ short gdFlags; /*grafDevice flags word*/
+ PixMapHandle gdPMap; /*describing pixMap*/
+ long gdRefCon; /*reference value*/
+ GDHandle gdNextGD; /*GDHandle Handle of next gDevice*/
+ Rect gdRect; /* device's bounds in global coordinates*/
+ long gdMode; /*device's current mode*/
+ short gdCCBytes; /*depth of expanded cursor data*/
+ short gdCCDepth; /*depth of expanded cursor data*/
+ Handle gdCCXData; /*Handle to cursor's expanded data*/
+ Handle gdCCXMask; /*Handle to cursor's expanded mask*/
+#if OLDGDEVICESTRUCT
+ long gdReserved; /*future use. MUST BE 0*/
+#else
+ Handle gdExt; /*QuickTime 3.0 private info*/
+#endif
+};
+
+
+struct GrafVars {
+ RGBColor rgbOpColor; /*color for addPin subPin and average*/
+ RGBColor rgbHiliteColor; /*color for hiliting*/
+ Handle pmFgColor; /*palette Handle for foreground color*/
+ short pmFgIndex; /*index value for foreground*/
+ Handle pmBkColor; /*palette Handle for background color*/
+ short pmBkIndex; /*index value for background*/
+ short pmFlags; /*flags for Palette Manager*/
+};
+typedef struct GrafVars GrafVars;
+
+typedef GrafVars * GVarPtr;
+typedef GVarPtr * GVarHandle;
+
+#if OPAQUE_TOOLBOX_STRUCTS
+typedef GrafPtr CGrafPtr;
+#else
+typedef struct CGrafPort CGrafPort;
+typedef CGrafPort * CGrafPtr;
+#endif /* OPAQUE_TOOLBOX_STRUCTS */
+
+typedef CALLBACK_API_C( OSStatus , QDPrinterStatusProcPtr )(PrinterStatusOpcode opcode, CGrafPtr currentPort, void *printerStatus);
+typedef STACK_UPP_TYPE(QDPrinterStatusProcPtr) QDPrinterStatusUPP;
+
+
+struct CQDProcs {
+ QDTextUPP textProc;
+ QDLineUPP lineProc;
+ QDRectUPP rectProc;
+ QDRRectUPP rRectProc;
+ QDOvalUPP ovalProc;
+ QDArcUPP arcProc;
+ QDPolyUPP polyProc;
+ QDRgnUPP rgnProc;
+ QDBitsUPP bitsProc;
+ QDCommentUPP commentProc;
+ QDTxMeasUPP txMeasProc;
+ QDGetPicUPP getPicProc;
+ QDPutPicUPP putPicProc;
+ QDOpcodeUPP opcodeProc;
+ UniversalProcPtr newProc1; /* this is the StdPix bottleneck -- see ImageCompression.h */
+ QDStdGlyphsUPP glyphsProc; /* was newProc2; now used in Unicode text drawing */
+ QDPrinterStatusUPP printerStatusProc; /* was newProc3; now used to communicate status between Printing code and System imaging code */
+ UniversalProcPtr newProc4;
+ UniversalProcPtr newProc5;
+ UniversalProcPtr newProc6;
+};
+typedef struct CQDProcs CQDProcs;
+typedef CQDProcs * CQDProcsPtr;
+#if !OPAQUE_TOOLBOX_STRUCTS
+
+struct CGrafPort {
+ short device;
+ PixMapHandle portPixMap; /*port's pixel map*/
+ short portVersion; /*high 2 bits always set*/
+ Handle grafVars; /*Handle to more fields*/
+ short chExtra; /*character extra*/
+ short pnLocHFrac; /*pen fraction*/
+ Rect portRect;
+ RgnHandle visRgn;
+ RgnHandle clipRgn;
+ PixPatHandle bkPixPat; /*background pattern*/
+ RGBColor rgbFgColor; /*RGB components of fg*/
+ RGBColor rgbBkColor; /*RGB components of bk*/
+ Point pnLoc;
+ Point pnSize;
+ short pnMode;
+ PixPatHandle pnPixPat; /*pen's pattern*/
+ PixPatHandle fillPixPat; /*fill pattern*/
+ short pnVis;
+ 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;
+ long fgColor;
+ long bkColor;
+ short colrBit;
+ short patStretch;
+ Handle picSave;
+ Handle rgnSave;
+ Handle polySave;
+ CQDProcsPtr grafProcs;
+};
+
+#endif /* !OPAQUE_TOOLBOX_STRUCTS */
+
+#if OPAQUE_TOOLBOX_STRUCTS
+
+typedef WindowPtr CWindowPtr;
+#else
+typedef CGrafPtr CWindowPtr;
+#endif /* OPAQUE_TOOLBOX_STRUCTS */
+
+
+struct ReqListRec {
+ short reqLSize; /*request list size*/
+ short reqLData[1]; /*request list data*/
+};
+typedef struct ReqListRec ReqListRec;
+
+struct OpenCPicParams {
+ Rect srcRect;
+ Fixed hRes;
+ Fixed vRes;
+ short version;
+ short reserved1;
+ long reserved2;
+};
+typedef struct OpenCPicParams OpenCPicParams;
+enum {
+ kCursorImageMajorVersion = 0x0001,
+ kCursorImageMinorVersion = 0x0000
+};
+
+
+struct CursorImageRec {
+ UInt16 majorVersion;
+ UInt16 minorVersion;
+ PixMapHandle cursorPixMap;
+ BitMapHandle cursorBitMask;
+};
+typedef struct CursorImageRec CursorImageRec;
+
+typedef CursorImageRec * CursorImagePtr;
+typedef CALLBACK_API( void , DeviceLoopDrawingProcPtr )(short depth, short deviceFlags, GDHandle targetDevice, long userData);
+typedef STACK_UPP_TYPE(DeviceLoopDrawingProcPtr) DeviceLoopDrawingUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(QDPrinterStatusUPP)
+ NewQDPrinterStatusUPP (QDPrinterStatusProcPtr userRoutine);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ EXTERN_API(DeviceLoopDrawingUPP)
+ NewDeviceLoopDrawingUPP (DeviceLoopDrawingProcPtr userRoutine);
+
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(void)
+ DisposeQDPrinterStatusUPP (QDPrinterStatusUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ EXTERN_API(void)
+ DisposeDeviceLoopDrawingUPP (DeviceLoopDrawingUPP userUPP);
+
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(OSStatus)
+ InvokeQDPrinterStatusUPP (PrinterStatusOpcode opcode,
+ CGrafPtr currentPort,
+ void * printerStatus,
+ QDPrinterStatusUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ EXTERN_API(void)
+ InvokeDeviceLoopDrawingUPP (short depth,
+ short deviceFlags,
+ GDHandle targetDevice,
+ long userData,
+ DeviceLoopDrawingUPP userUPP);
+
+#else
+ enum { uppQDPrinterStatusProcInfo = 0x00000FF1 }; /* 4_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppDeviceLoopDrawingProcInfo = 0x00003E80 }; /* pascal no_return_value Func(2_bytes, 2_bytes, 4_bytes, 4_bytes) */
+ #define NewQDPrinterStatusUPP(userRoutine) (QDPrinterStatusUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDPrinterStatusProcInfo, GetCurrentArchitecture())
+ #define NewDeviceLoopDrawingUPP(userRoutine) (DeviceLoopDrawingUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDeviceLoopDrawingProcInfo, GetCurrentArchitecture())
+ #define DisposeQDPrinterStatusUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeDeviceLoopDrawingUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeQDPrinterStatusUPP(opcode, currentPort, printerStatus, userUPP) (OSStatus)CALL_THREE_PARAMETER_UPP((userUPP), uppQDPrinterStatusProcInfo, (opcode), (currentPort), (printerStatus))
+ #define InvokeDeviceLoopDrawingUPP(depth, deviceFlags, targetDevice, userData, userUPP) CALL_FOUR_PARAMETER_UPP((userUPP), uppDeviceLoopDrawingProcInfo, (depth), (deviceFlags), (targetDevice), (userData))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewQDPrinterStatusProc(userRoutine) NewQDPrinterStatusUPP(userRoutine)
+#define NewDeviceLoopDrawingProc(userRoutine) NewDeviceLoopDrawingUPP(userRoutine)
+#define CallQDPrinterStatusProc(userRoutine, opcode, currentPort, printerStatus) InvokeQDPrinterStatusUPP(opcode, currentPort, printerStatus, userRoutine)
+#define CallDeviceLoopDrawingProc(userRoutine, depth, deviceFlags, targetDevice, userData) InvokeDeviceLoopDrawingUPP(depth, deviceFlags, targetDevice, userData, userRoutine)
+#if !OPAQUE_TOOLBOX_STRUCTS
+/* In Carbon, use the QDGlobals accessors such as GetQDGlobalsThePort() */
+
+struct QDGlobals {
+ char privates[76];
+ long randSeed;
+ BitMap screenBits;
+ Cursor arrow;
+ Pattern dkGray;
+ Pattern ltGray;
+ Pattern gray;
+ Pattern black;
+ Pattern white;
+ GrafPtr thePort;
+};
+typedef struct QDGlobals QDGlobals;
+typedef QDGlobals * QDGlobalsPtr;
+typedef QDGlobalsPtr * QDGlobalsHdl;
+extern QDGlobals qd;
+
+#endif /* !OPAQUE_TOOLBOX_STRUCTS */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+InitGraf (void * globalPtr) ONEWORDINLINE(0xA86E);
+
+EXTERN_API( void )
+OpenPort (GrafPtr port) ONEWORDINLINE(0xA86F);
+
+EXTERN_API( void )
+InitPort (GrafPtr port) ONEWORDINLINE(0xA86D);
+
+EXTERN_API( void )
+ClosePort (GrafPtr port) ONEWORDINLINE(0xA87D);
+
+/*
+ These are Carbon only routines. They do nothing at all on
+ Mac OS 8, but work flawlessly on Mac OS X.
+*/
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( OSErr )
+LockPortBits (GrafPtr port);
+
+EXTERN_API( OSErr )
+UnlockPortBits (GrafPtr port);
+
+/* Break a region up into rectangles.*/
+
+enum {
+ kQDParseRegionFromTop = (1 << 0),
+ kQDParseRegionFromBottom = (1 << 1),
+ kQDParseRegionFromLeft = (1 << 2),
+ kQDParseRegionFromRight = (1 << 3),
+ kQDParseRegionFromTopLeft = kQDParseRegionFromTop | kQDParseRegionFromLeft,
+ kQDParseRegionFromBottomRight = kQDParseRegionFromBottom | kQDParseRegionFromRight
+};
+
+
+typedef SInt32 QDRegionParseDirection;
+enum {
+ kQDRegionToRectsMsgInit = 1,
+ kQDRegionToRectsMsgParse = 2,
+ kQDRegionToRectsMsgTerminate = 3
+};
+
+typedef CALLBACK_API_C( OSStatus , RegionToRectsProcPtr )(UInt16 message, RgnHandle rgn, const Rect *rect, void *refCon);
+typedef STACK_UPP_TYPE(RegionToRectsProcPtr) RegionToRectsUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(RegionToRectsUPP)
+ NewRegionToRectsUPP (RegionToRectsProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeRegionToRectsUPP (RegionToRectsUPP userUPP);
+
+ EXTERN_API(OSStatus)
+ InvokeRegionToRectsUPP (UInt16 message,
+ RgnHandle rgn,
+ const Rect * rect,
+ void * refCon,
+ RegionToRectsUPP userUPP);
+
+#else
+ enum { uppRegionToRectsProcInfo = 0x00003FB1 }; /* 4_bytes Func(2_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewRegionToRectsUPP(userRoutine) (RegionToRectsUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppRegionToRectsProcInfo, GetCurrentArchitecture())
+ #define DisposeRegionToRectsUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeRegionToRectsUPP(message, rgn, rect, refCon, userUPP) (OSStatus)CALL_FOUR_PARAMETER_UPP((userUPP), uppRegionToRectsProcInfo, (message), (rgn), (rect), (refCon))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewRegionToRectsProc(userRoutine) NewRegionToRectsUPP(userRoutine)
+#define CallRegionToRectsProc(userRoutine, message, rgn, rect, refCon) InvokeRegionToRectsUPP(message, rgn, rect, refCon, userRoutine)
+EXTERN_API_C( OSStatus )
+QDRegionToRects (RgnHandle rgn,
+ QDRegionParseDirection dir,
+ RegionToRectsUPP proc,
+ void * userData);
+
+#if !TARGET_OS_MAC || TARGET_API_MAC_OSX
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+UpdatePort (GrafPtr port);
+
+EXTERN_API( void *)
+GetPortNativeWindow (GrafPtr macPort);
+
+EXTERN_API( GrafPtr )
+GetNativeWindowPort (void * nativeWindow);
+
+EXTERN_API( void *)
+MacRegionToNativeRegion (RgnHandle macRegion);
+
+EXTERN_API( RgnHandle )
+NativeRegionToMacRegion (void * nativeRegion);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* !TARGET_OS_MAC || TARGET_API_MAC_OSX */
+
+#if TARGET_OS_WIN32
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void *)
+GetPortHWND (GrafPtr port);
+
+EXTERN_API( GrafPtr )
+GetHWNDPort (void * theHWND);
+
+#define GetPortHWND(port) (HWND)GetPortNativeWindow(port)
+#define GetHWNDPort(theHWND) GetNativeWindowPort(theHWND)
+EXTERN_API( void *)
+GetPortHDC (GrafPtr port);
+
+EXTERN_API( void *)
+GetPortHBITMAP (GrafPtr port);
+
+EXTERN_API( void *)
+GetPortHPALETTE (GrafPtr port);
+
+EXTERN_API( void *)
+GetPortHFONT (GrafPtr port);
+
+EXTERN_API( void *)
+GetDIBFromPICT (PicHandle hPict);
+
+EXTERN_API( PicHandle )
+GetPICTFromDIB (void * h);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_OS_WIN32 */
+
+#if TARGET_OS_MAC
+ #define MacSetPort SetPort
+#endif
+EXTERN_API( void )
+MacSetPort (GrafPtr port) ONEWORDINLINE(0xA873);
+
+EXTERN_API( void )
+GetPort (GrafPtr * port) ONEWORDINLINE(0xA874);
+
+EXTERN_API( void )
+GrafDevice (short device) ONEWORDINLINE(0xA872);
+
+EXTERN_API( void )
+SetPortBits (const BitMap * bm) ONEWORDINLINE(0xA875);
+
+EXTERN_API( void )
+PortSize (short width,
+ short height) ONEWORDINLINE(0xA876);
+
+EXTERN_API( void )
+MovePortTo (short leftGlobal,
+ short topGlobal) ONEWORDINLINE(0xA877);
+
+EXTERN_API( void )
+SetOrigin (short h,
+ short v) ONEWORDINLINE(0xA878);
+
+EXTERN_API( void )
+SetClip (RgnHandle rgn) ONEWORDINLINE(0xA879);
+
+EXTERN_API( void )
+GetClip (RgnHandle rgn) ONEWORDINLINE(0xA87A);
+
+EXTERN_API( void )
+ClipRect (const Rect * r) ONEWORDINLINE(0xA87B);
+
+EXTERN_API( void )
+BackPat (const Pattern * pat) ONEWORDINLINE(0xA87C);
+
+EXTERN_API( void )
+InitCursor (void) ONEWORDINLINE(0xA850);
+
+#if TARGET_OS_MAC
+ #define MacSetCursor SetCursor
+#endif
+EXTERN_API( void )
+MacSetCursor (const Cursor * crsr) ONEWORDINLINE(0xA851);
+
+EXTERN_API( void )
+HideCursor (void) ONEWORDINLINE(0xA852);
+
+#if TARGET_OS_MAC
+ #define MacShowCursor ShowCursor
+#endif
+EXTERN_API( void )
+MacShowCursor (void) ONEWORDINLINE(0xA853);
+
+EXTERN_API( void )
+ObscureCursor (void) ONEWORDINLINE(0xA856);
+
+EXTERN_API( void )
+HidePen (void) ONEWORDINLINE(0xA896);
+
+EXTERN_API( void )
+ShowPen (void) ONEWORDINLINE(0xA897);
+
+EXTERN_API( void )
+GetPen (Point * pt) ONEWORDINLINE(0xA89A);
+
+EXTERN_API( void )
+GetPenState (PenState * pnState) ONEWORDINLINE(0xA898);
+
+EXTERN_API( void )
+SetPenState (const PenState * pnState) ONEWORDINLINE(0xA899);
+
+EXTERN_API( void )
+PenSize (short width,
+ short height) ONEWORDINLINE(0xA89B);
+
+EXTERN_API( void )
+PenMode (short mode) ONEWORDINLINE(0xA89C);
+
+EXTERN_API( void )
+PenPat (const Pattern * pat) ONEWORDINLINE(0xA89D);
+
+EXTERN_API( void )
+PenNormal (void) ONEWORDINLINE(0xA89E);
+
+EXTERN_API( void )
+MoveTo (short h,
+ short v) ONEWORDINLINE(0xA893);
+
+EXTERN_API( void )
+Move (short dh,
+ short dv) ONEWORDINLINE(0xA894);
+
+#if TARGET_OS_MAC
+ #define MacLineTo LineTo
+#endif
+EXTERN_API( void )
+MacLineTo (short h,
+ short v) ONEWORDINLINE(0xA891);
+
+EXTERN_API( void )
+Line (short dh,
+ short dv) ONEWORDINLINE(0xA892);
+
+EXTERN_API( void )
+ForeColor (long color) ONEWORDINLINE(0xA862);
+
+EXTERN_API( void )
+BackColor (long color) ONEWORDINLINE(0xA863);
+
+EXTERN_API( void )
+ColorBit (short whichBit) ONEWORDINLINE(0xA864);
+
+#if TARGET_OS_MAC
+ #define MacSetRect SetRect
+#endif
+EXTERN_API( void )
+MacSetRect (Rect * r,
+ short left,
+ short top,
+ short right,
+ short bottom) ONEWORDINLINE(0xA8A7);
+
+#if TARGET_OS_MAC
+ #define MacOffsetRect OffsetRect
+#endif
+EXTERN_API( void )
+MacOffsetRect (Rect * r,
+ short dh,
+ short dv) ONEWORDINLINE(0xA8A8);
+
+#if TARGET_OS_MAC
+ #define MacInsetRect InsetRect
+#endif
+EXTERN_API( void )
+MacInsetRect (Rect * r,
+ short dh,
+ short dv) ONEWORDINLINE(0xA8A9);
+
+EXTERN_API( Boolean )
+SectRect (const Rect * src1,
+ const Rect * src2,
+ Rect * dstRect) ONEWORDINLINE(0xA8AA);
+
+#if TARGET_OS_MAC
+ #define MacUnionRect UnionRect
+#endif
+EXTERN_API( void )
+MacUnionRect (const Rect * src1,
+ const Rect * src2,
+ Rect * dstRect) ONEWORDINLINE(0xA8AB);
+
+#if TARGET_OS_MAC
+ #define MacEqualRect EqualRect
+#endif
+EXTERN_API( Boolean )
+MacEqualRect (const Rect * rect1,
+ const Rect * rect2) ONEWORDINLINE(0xA8A6);
+
+EXTERN_API( Boolean )
+EmptyRect (const Rect * r) ONEWORDINLINE(0xA8AE);
+
+#if TARGET_OS_MAC
+ #define MacFrameRect FrameRect
+#endif
+EXTERN_API( void )
+MacFrameRect (const Rect * r) ONEWORDINLINE(0xA8A1);
+
+EXTERN_API( void )
+PaintRect (const Rect * r) ONEWORDINLINE(0xA8A2);
+
+EXTERN_API( void )
+EraseRect (const Rect * r) ONEWORDINLINE(0xA8A3);
+
+#if TARGET_OS_MAC
+ #define MacInvertRect InvertRect
+#endif
+EXTERN_API( void )
+MacInvertRect (const Rect * r) ONEWORDINLINE(0xA8A4);
+
+#if TARGET_OS_MAC
+ #define MacFillRect FillRect
+#endif
+EXTERN_API( void )
+MacFillRect (const Rect * r,
+ const Pattern * pat) ONEWORDINLINE(0xA8A5);
+
+EXTERN_API( void )
+FrameOval (const Rect * r) ONEWORDINLINE(0xA8B7);
+
+EXTERN_API( void )
+PaintOval (const Rect * r) ONEWORDINLINE(0xA8B8);
+
+EXTERN_API( void )
+EraseOval (const Rect * r) ONEWORDINLINE(0xA8B9);
+
+EXTERN_API( void )
+InvertOval (const Rect * r) ONEWORDINLINE(0xA8BA);
+
+EXTERN_API( void )
+FillOval (const Rect * r,
+ const Pattern * pat) ONEWORDINLINE(0xA8BB);
+
+EXTERN_API( void )
+FrameRoundRect (const Rect * r,
+ short ovalWidth,
+ short ovalHeight) ONEWORDINLINE(0xA8B0);
+
+EXTERN_API( void )
+PaintRoundRect (const Rect * r,
+ short ovalWidth,
+ short ovalHeight) ONEWORDINLINE(0xA8B1);
+
+EXTERN_API( void )
+EraseRoundRect (const Rect * r,
+ short ovalWidth,
+ short ovalHeight) ONEWORDINLINE(0xA8B2);
+
+EXTERN_API( void )
+InvertRoundRect (const Rect * r,
+ short ovalWidth,
+ short ovalHeight) ONEWORDINLINE(0xA8B3);
+
+EXTERN_API( void )
+FillRoundRect (const Rect * r,
+ short ovalWidth,
+ short ovalHeight,
+ const Pattern * pat) ONEWORDINLINE(0xA8B4);
+
+EXTERN_API( void )
+FrameArc (const Rect * r,
+ short startAngle,
+ short arcAngle) ONEWORDINLINE(0xA8BE);
+
+EXTERN_API( void )
+PaintArc (const Rect * r,
+ short startAngle,
+ short arcAngle) ONEWORDINLINE(0xA8BF);
+
+EXTERN_API( void )
+EraseArc (const Rect * r,
+ short startAngle,
+ short arcAngle) ONEWORDINLINE(0xA8C0);
+
+EXTERN_API( void )
+InvertArc (const Rect * r,
+ short startAngle,
+ short arcAngle) ONEWORDINLINE(0xA8C1);
+
+EXTERN_API( void )
+FillArc (const Rect * r,
+ short startAngle,
+ short arcAngle,
+ const Pattern * pat) ONEWORDINLINE(0xA8C2);
+
+EXTERN_API( RgnHandle )
+NewRgn (void) ONEWORDINLINE(0xA8D8);
+
+EXTERN_API( void )
+OpenRgn (void) ONEWORDINLINE(0xA8DA);
+
+EXTERN_API( void )
+CloseRgn (RgnHandle dstRgn) ONEWORDINLINE(0xA8DB);
+
+EXTERN_API( OSErr )
+BitMapToRegion (RgnHandle region,
+ const BitMap * bMap) ONEWORDINLINE(0xA8D7);
+
+EXTERN_API( void )
+DisposeRgn (RgnHandle rgn) ONEWORDINLINE(0xA8D9);
+
+#if TARGET_OS_MAC
+ #define MacCopyRgn CopyRgn
+#endif
+EXTERN_API( void )
+MacCopyRgn (RgnHandle srcRgn,
+ RgnHandle dstRgn) ONEWORDINLINE(0xA8DC);
+
+EXTERN_API( void )
+SetEmptyRgn (RgnHandle rgn) ONEWORDINLINE(0xA8DD);
+
+#if TARGET_OS_MAC
+ #define MacSetRectRgn SetRectRgn
+#endif
+EXTERN_API( void )
+MacSetRectRgn (RgnHandle rgn,
+ short left,
+ short top,
+ short right,
+ short bottom) ONEWORDINLINE(0xA8DE);
+
+EXTERN_API( void )
+RectRgn (RgnHandle rgn,
+ const Rect * r) ONEWORDINLINE(0xA8DF);
+
+#if TARGET_OS_MAC
+ #define MacOffsetRgn OffsetRgn
+#endif
+EXTERN_API( void )
+MacOffsetRgn (RgnHandle rgn,
+ short dh,
+ short dv) ONEWORDINLINE(0xA8E0);
+
+EXTERN_API( void )
+InsetRgn (RgnHandle rgn,
+ short dh,
+ short dv) ONEWORDINLINE(0xA8E1);
+
+EXTERN_API( void )
+SectRgn (RgnHandle srcRgnA,
+ RgnHandle srcRgnB,
+ RgnHandle dstRgn) ONEWORDINLINE(0xA8E4);
+
+#if TARGET_OS_MAC
+ #define MacUnionRgn UnionRgn
+#endif
+EXTERN_API( void )
+MacUnionRgn (RgnHandle srcRgnA,
+ RgnHandle srcRgnB,
+ RgnHandle dstRgn) ONEWORDINLINE(0xA8E5);
+
+EXTERN_API( void )
+DiffRgn (RgnHandle srcRgnA,
+ RgnHandle srcRgnB,
+ RgnHandle dstRgn) ONEWORDINLINE(0xA8E6);
+
+#if TARGET_OS_MAC
+ #define MacXorRgn XorRgn
+#endif
+EXTERN_API( void )
+MacXorRgn (RgnHandle srcRgnA,
+ RgnHandle srcRgnB,
+ RgnHandle dstRgn) ONEWORDINLINE(0xA8E7);
+
+EXTERN_API( Boolean )
+RectInRgn (const Rect * r,
+ RgnHandle rgn) ONEWORDINLINE(0xA8E9);
+
+#if TARGET_OS_MAC
+ #define MacEqualRgn EqualRgn
+#endif
+EXTERN_API( Boolean )
+MacEqualRgn (RgnHandle rgnA,
+ RgnHandle rgnB) ONEWORDINLINE(0xA8E3);
+
+EXTERN_API( Boolean )
+EmptyRgn (RgnHandle rgn) ONEWORDINLINE(0xA8E2);
+
+#if TARGET_OS_MAC
+ #define MacFrameRgn FrameRgn
+#endif
+EXTERN_API( void )
+MacFrameRgn (RgnHandle rgn) ONEWORDINLINE(0xA8D2);
+
+#if TARGET_OS_MAC
+ #define MacPaintRgn PaintRgn
+#endif
+EXTERN_API( void )
+MacPaintRgn (RgnHandle rgn) ONEWORDINLINE(0xA8D3);
+
+EXTERN_API( void )
+EraseRgn (RgnHandle rgn) ONEWORDINLINE(0xA8D4);
+
+#if TARGET_OS_MAC
+ #define MacInvertRgn InvertRgn
+#endif
+EXTERN_API( void )
+MacInvertRgn (RgnHandle rgn) ONEWORDINLINE(0xA8D5);
+
+#if TARGET_OS_MAC
+ #define MacFillRgn FillRgn
+#endif
+EXTERN_API( void )
+MacFillRgn (RgnHandle rgn,
+ const Pattern * pat) ONEWORDINLINE(0xA8D6);
+
+EXTERN_API( void )
+ScrollRect (const Rect * r,
+ short dh,
+ short dv,
+ RgnHandle updateRgn) ONEWORDINLINE(0xA8EF);
+
+EXTERN_API( void )
+CopyBits (const BitMap * srcBits,
+ const BitMap * dstBits,
+ const Rect * srcRect,
+ const Rect * dstRect,
+ short mode,
+ RgnHandle maskRgn) /* can be NULL */ ONEWORDINLINE(0xA8EC);
+
+EXTERN_API( void )
+SeedFill (const void * srcPtr,
+ void * dstPtr,
+ short srcRow,
+ short dstRow,
+ short height,
+ short words,
+ short seedH,
+ short seedV) ONEWORDINLINE(0xA839);
+
+EXTERN_API( void )
+CalcMask (const void * srcPtr,
+ void * dstPtr,
+ short srcRow,
+ short dstRow,
+ short height,
+ short words) ONEWORDINLINE(0xA838);
+
+EXTERN_API( void )
+CopyMask (const BitMap * srcBits,
+ const BitMap * maskBits,
+ const BitMap * dstBits,
+ const Rect * srcRect,
+ const Rect * maskRect,
+ const Rect * dstRect) ONEWORDINLINE(0xA817);
+
+EXTERN_API( PicHandle )
+OpenPicture (const Rect * picFrame) ONEWORDINLINE(0xA8F3);
+
+EXTERN_API( void )
+PicComment (short kind,
+ short dataSize,
+ Handle dataHandle) ONEWORDINLINE(0xA8F2);
+
+EXTERN_API( void )
+ClosePicture (void) ONEWORDINLINE(0xA8F4);
+
+EXTERN_API( void )
+DrawPicture (PicHandle myPicture,
+ const Rect * dstRect) ONEWORDINLINE(0xA8F6);
+
+EXTERN_API( void )
+KillPicture (PicHandle myPicture) ONEWORDINLINE(0xA8F5);
+
+EXTERN_API( PolyHandle )
+OpenPoly (void) ONEWORDINLINE(0xA8CB);
+
+EXTERN_API( void )
+ClosePoly (void) ONEWORDINLINE(0xA8CC);
+
+EXTERN_API( void )
+KillPoly (PolyHandle poly) ONEWORDINLINE(0xA8CD);
+
+EXTERN_API( void )
+OffsetPoly (PolyHandle poly,
+ short dh,
+ short dv) ONEWORDINLINE(0xA8CE);
+
+EXTERN_API( void )
+FramePoly (PolyHandle poly) ONEWORDINLINE(0xA8C6);
+
+EXTERN_API( void )
+PaintPoly (PolyHandle poly) ONEWORDINLINE(0xA8C7);
+
+EXTERN_API( void )
+ErasePoly (PolyHandle poly) ONEWORDINLINE(0xA8C8);
+
+EXTERN_API( void )
+InvertPoly (PolyHandle poly) ONEWORDINLINE(0xA8C9);
+
+EXTERN_API( void )
+FillPoly (PolyHandle poly,
+ const Pattern * pat) ONEWORDINLINE(0xA8CA);
+
+EXTERN_API( void )
+SetPt (Point * pt,
+ short h,
+ short v) ONEWORDINLINE(0xA880);
+
+EXTERN_API( void )
+LocalToGlobal (Point * pt) ONEWORDINLINE(0xA870);
+
+EXTERN_API( void )
+GlobalToLocal (Point * pt) ONEWORDINLINE(0xA871);
+
+EXTERN_API( short )
+Random (void) ONEWORDINLINE(0xA861);
+
+EXTERN_API( void )
+StuffHex (void * thingPtr,
+ ConstStr255Param s) ONEWORDINLINE(0xA866);
+
+#if TARGET_OS_MAC
+ #define MacGetPixel GetPixel
+#endif
+EXTERN_API( Boolean )
+MacGetPixel (short h,
+ short v) ONEWORDINLINE(0xA865);
+
+EXTERN_API( void )
+ScalePt (Point * pt,
+ const Rect * srcRect,
+ const Rect * dstRect) ONEWORDINLINE(0xA8F8);
+
+EXTERN_API( void )
+MapPt (Point * pt,
+ const Rect * srcRect,
+ const Rect * dstRect) ONEWORDINLINE(0xA8F9);
+
+EXTERN_API( void )
+MapRect (Rect * r,
+ const Rect * srcRect,
+ const Rect * dstRect) ONEWORDINLINE(0xA8FA);
+
+EXTERN_API( void )
+MapRgn (RgnHandle rgn,
+ const Rect * srcRect,
+ const Rect * dstRect) ONEWORDINLINE(0xA8FB);
+
+EXTERN_API( void )
+MapPoly (PolyHandle poly,
+ const Rect * srcRect,
+ const Rect * dstRect) ONEWORDINLINE(0xA8FC);
+
+EXTERN_API( void )
+SetStdProcs (QDProcs * procs) ONEWORDINLINE(0xA8EA);
+
+EXTERN_API( void )
+StdRect (GrafVerb verb,
+ const Rect * r) ONEWORDINLINE(0xA8A0);
+
+EXTERN_API( void )
+StdRRect (GrafVerb verb,
+ const Rect * r,
+ short ovalWidth,
+ short ovalHeight) ONEWORDINLINE(0xA8AF);
+
+EXTERN_API( void )
+StdOval (GrafVerb verb,
+ const Rect * r) ONEWORDINLINE(0xA8B6);
+
+EXTERN_API( void )
+StdArc (GrafVerb verb,
+ const Rect * r,
+ short startAngle,
+ short arcAngle) ONEWORDINLINE(0xA8BD);
+
+EXTERN_API( void )
+StdPoly (GrafVerb verb,
+ PolyHandle poly) ONEWORDINLINE(0xA8C5);
+
+EXTERN_API( void )
+StdRgn (GrafVerb verb,
+ RgnHandle rgn) ONEWORDINLINE(0xA8D1);
+
+EXTERN_API( void )
+StdBits (const BitMap * srcBits,
+ const Rect * srcRect,
+ const Rect * dstRect,
+ short mode,
+ RgnHandle maskRgn) ONEWORDINLINE(0xA8EB);
+
+EXTERN_API( void )
+StdComment (short kind,
+ short dataSize,
+ Handle dataHandle) ONEWORDINLINE(0xA8F1);
+
+EXTERN_API( void )
+StdGetPic (void * dataPtr,
+ short byteCount) ONEWORDINLINE(0xA8EE);
+
+EXTERN_API( void )
+StdPutPic (const void * dataPtr,
+ short byteCount) ONEWORDINLINE(0xA8F0);
+
+EXTERN_API( void )
+StdOpcode (const Rect * fromRect,
+ const Rect * toRect,
+ UInt16 opcode,
+ SInt16 version) ONEWORDINLINE(0xABF8);
+
+EXTERN_API( void )
+AddPt (Point src,
+ Point * dst) ONEWORDINLINE(0xA87E);
+
+EXTERN_API( Boolean )
+EqualPt (Point pt1,
+ Point pt2) ONEWORDINLINE(0xA881);
+
+#if TARGET_OS_MAC
+ #define MacPtInRect PtInRect
+#endif
+EXTERN_API( Boolean )
+MacPtInRect (Point pt,
+ const Rect * r) ONEWORDINLINE(0xA8AD);
+
+EXTERN_API( void )
+Pt2Rect (Point pt1,
+ Point pt2,
+ Rect * dstRect) ONEWORDINLINE(0xA8AC);
+
+EXTERN_API( void )
+PtToAngle (const Rect * r,
+ Point pt,
+ short * angle) ONEWORDINLINE(0xA8C3);
+
+EXTERN_API( void )
+SubPt (Point src,
+ Point * dst) ONEWORDINLINE(0xA87F);
+
+EXTERN_API( Boolean )
+PtInRgn (Point pt,
+ RgnHandle rgn) ONEWORDINLINE(0xA8E8);
+
+EXTERN_API( void )
+StdLine (Point newPt) ONEWORDINLINE(0xA890);
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+OpenCPort (CGrafPtr port) ONEWORDINLINE(0xAA00);
+
+EXTERN_API( void )
+InitCPort (CGrafPtr port) ONEWORDINLINE(0xAA01);
+
+EXTERN_API( void )
+CloseCPort (CGrafPtr port) ONEWORDINLINE(0xAA02);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( PixMapHandle )
+NewPixMap (void) ONEWORDINLINE(0xAA03);
+
+EXTERN_API( void )
+DisposePixMap (PixMapHandle pm) ONEWORDINLINE(0xAA04);
+
+EXTERN_API( void )
+CopyPixMap (PixMapHandle srcPM,
+ PixMapHandle dstPM) ONEWORDINLINE(0xAA05);
+
+EXTERN_API( PixPatHandle )
+NewPixPat (void) ONEWORDINLINE(0xAA07);
+
+EXTERN_API( void )
+DisposePixPat (PixPatHandle pp) ONEWORDINLINE(0xAA08);
+
+EXTERN_API( void )
+CopyPixPat (PixPatHandle srcPP,
+ PixPatHandle dstPP) ONEWORDINLINE(0xAA09);
+
+EXTERN_API( void )
+PenPixPat (PixPatHandle pp) ONEWORDINLINE(0xAA0A);
+
+EXTERN_API( void )
+BackPixPat (PixPatHandle pp) ONEWORDINLINE(0xAA0B);
+
+EXTERN_API( PixPatHandle )
+GetPixPat (short patID) ONEWORDINLINE(0xAA0C);
+
+EXTERN_API( void )
+MakeRGBPat (PixPatHandle pp,
+ const RGBColor * myColor) ONEWORDINLINE(0xAA0D);
+
+EXTERN_API( void )
+FillCRect (const Rect * r,
+ PixPatHandle pp) ONEWORDINLINE(0xAA0E);
+
+EXTERN_API( void )
+FillCOval (const Rect * r,
+ PixPatHandle pp) ONEWORDINLINE(0xAA0F);
+
+EXTERN_API( void )
+FillCRoundRect (const Rect * r,
+ short ovalWidth,
+ short ovalHeight,
+ PixPatHandle pp) ONEWORDINLINE(0xAA10);
+
+EXTERN_API( void )
+FillCArc (const Rect * r,
+ short startAngle,
+ short arcAngle,
+ PixPatHandle pp) ONEWORDINLINE(0xAA11);
+
+EXTERN_API( void )
+FillCRgn (RgnHandle rgn,
+ PixPatHandle pp) ONEWORDINLINE(0xAA12);
+
+EXTERN_API( void )
+FillCPoly (PolyHandle poly,
+ PixPatHandle pp) ONEWORDINLINE(0xAA13);
+
+EXTERN_API( void )
+RGBForeColor (const RGBColor * color) ONEWORDINLINE(0xAA14);
+
+EXTERN_API( void )
+RGBBackColor (const RGBColor * color) ONEWORDINLINE(0xAA15);
+
+EXTERN_API( void )
+SetCPixel (short h,
+ short v,
+ const RGBColor * cPix) ONEWORDINLINE(0xAA16);
+
+EXTERN_API( void )
+SetPortPix (PixMapHandle pm) ONEWORDINLINE(0xAA06);
+
+EXTERN_API( void )
+GetCPixel (short h,
+ short v,
+ RGBColor * cPix) ONEWORDINLINE(0xAA17);
+
+EXTERN_API( void )
+GetForeColor (RGBColor * color) ONEWORDINLINE(0xAA19);
+
+EXTERN_API( void )
+GetBackColor (RGBColor * color) ONEWORDINLINE(0xAA1A);
+
+EXTERN_API( void )
+SeedCFill (const BitMap * srcBits,
+ const BitMap * dstBits,
+ const Rect * srcRect,
+ const Rect * dstRect,
+ short seedH,
+ short seedV,
+ ColorSearchUPP matchProc,
+ long matchData) ONEWORDINLINE(0xAA50);
+
+EXTERN_API( void )
+CalcCMask (const BitMap * srcBits,
+ const BitMap * dstBits,
+ const Rect * srcRect,
+ const Rect * dstRect,
+ const RGBColor * seedRGB,
+ ColorSearchUPP matchProc,
+ long matchData) ONEWORDINLINE(0xAA4F);
+
+EXTERN_API( PicHandle )
+OpenCPicture (const OpenCPicParams * newHeader) ONEWORDINLINE(0xAA20);
+
+EXTERN_API( void )
+OpColor (const RGBColor * color) ONEWORDINLINE(0xAA21);
+
+EXTERN_API( void )
+HiliteColor (const RGBColor * color) ONEWORDINLINE(0xAA22);
+
+EXTERN_API( void )
+DisposeCTable (CTabHandle cTable) ONEWORDINLINE(0xAA24);
+
+EXTERN_API( CTabHandle )
+GetCTable (short ctID) ONEWORDINLINE(0xAA18);
+
+EXTERN_API( CCrsrHandle )
+GetCCursor (short crsrID) ONEWORDINLINE(0xAA1B);
+
+EXTERN_API( void )
+SetCCursor (CCrsrHandle cCrsr) ONEWORDINLINE(0xAA1C);
+
+EXTERN_API( void )
+AllocCursor (void) ONEWORDINLINE(0xAA1D);
+
+EXTERN_API( void )
+DisposeCCursor (CCrsrHandle cCrsr) ONEWORDINLINE(0xAA26);
+
+/* GetCIcon(), PlotCIcon(), and DisposeCIcon() moved to Icons.h*/
+
+EXTERN_API( void )
+SetStdCProcs (CQDProcs * procs) ONEWORDINLINE(0xAA4E);
+
+EXTERN_API( GDHandle )
+GetMaxDevice (const Rect * globalRect) ONEWORDINLINE(0xAA27);
+
+EXTERN_API( long )
+GetCTSeed (void) ONEWORDINLINE(0xAA28);
+
+EXTERN_API( GDHandle )
+GetDeviceList (void) ONEWORDINLINE(0xAA29);
+
+EXTERN_API( GDHandle )
+GetMainDevice (void) ONEWORDINLINE(0xAA2A);
+
+EXTERN_API( GDHandle )
+GetNextDevice (GDHandle curDevice) ONEWORDINLINE(0xAA2B);
+
+EXTERN_API( Boolean )
+TestDeviceAttribute (GDHandle gdh,
+ short attribute) ONEWORDINLINE(0xAA2C);
+
+EXTERN_API( void )
+SetDeviceAttribute (GDHandle gdh,
+ short attribute,
+ Boolean value) ONEWORDINLINE(0xAA2D);
+
+EXTERN_API( void )
+InitGDevice (short qdRefNum,
+ long mode,
+ GDHandle gdh) ONEWORDINLINE(0xAA2E);
+
+EXTERN_API( GDHandle )
+NewGDevice (short refNum,
+ long mode) ONEWORDINLINE(0xAA2F);
+
+EXTERN_API( void )
+DisposeGDevice (GDHandle gdh) ONEWORDINLINE(0xAA30);
+
+EXTERN_API( void )
+SetGDevice (GDHandle gd) ONEWORDINLINE(0xAA31);
+
+EXTERN_API( GDHandle )
+GetGDevice (void) ONEWORDINLINE(0xAA32);
+
+EXTERN_API( long )
+Color2Index (const RGBColor * myColor) ONEWORDINLINE(0xAA33);
+
+EXTERN_API( void )
+Index2Color (long index,
+ RGBColor * aColor) ONEWORDINLINE(0xAA34);
+
+EXTERN_API( void )
+InvertColor (RGBColor * myColor) ONEWORDINLINE(0xAA35);
+
+EXTERN_API( Boolean )
+RealColor (const RGBColor * color) ONEWORDINLINE(0xAA36);
+
+EXTERN_API( void )
+GetSubTable (CTabHandle myColors,
+ short iTabRes,
+ CTabHandle targetTbl) ONEWORDINLINE(0xAA37);
+
+EXTERN_API( void )
+MakeITable (CTabHandle cTabH,
+ ITabHandle iTabH,
+ short res) ONEWORDINLINE(0xAA39);
+
+EXTERN_API( void )
+AddSearch (ColorSearchUPP searchProc) ONEWORDINLINE(0xAA3A);
+
+EXTERN_API( void )
+AddComp (ColorComplementUPP compProc) ONEWORDINLINE(0xAA3B);
+
+EXTERN_API( void )
+DelSearch (ColorSearchUPP searchProc) ONEWORDINLINE(0xAA4C);
+
+EXTERN_API( void )
+DelComp (ColorComplementUPP compProc) ONEWORDINLINE(0xAA4D);
+
+EXTERN_API( void )
+SetClientID (short id) ONEWORDINLINE(0xAA3C);
+
+EXTERN_API( void )
+ProtectEntry (short index,
+ Boolean protect) ONEWORDINLINE(0xAA3D);
+
+EXTERN_API( void )
+ReserveEntry (short index,
+ Boolean reserve) ONEWORDINLINE(0xAA3E);
+
+EXTERN_API( void )
+SetEntries (short start,
+ short count,
+ CSpecArray aTable) ONEWORDINLINE(0xAA3F);
+
+EXTERN_API( void )
+SaveEntries (CTabHandle srcTable,
+ CTabHandle resultTable,
+ ReqListRec * selection) ONEWORDINLINE(0xAA49);
+
+EXTERN_API( void )
+RestoreEntries (CTabHandle srcTable,
+ CTabHandle dstTable,
+ ReqListRec * selection) ONEWORDINLINE(0xAA4A);
+
+EXTERN_API( short )
+QDError (void) ONEWORDINLINE(0xAA40);
+
+EXTERN_API( void )
+CopyDeepMask (const BitMap * srcBits,
+ const BitMap * maskBits,
+ const BitMap * dstBits,
+ const Rect * srcRect,
+ const Rect * maskRect,
+ const Rect * dstRect,
+ short mode,
+ RgnHandle maskRgn) /* can be NULL */ ONEWORDINLINE(0xAA51);
+
+EXTERN_API( void )
+DeviceLoop (RgnHandle drawingRgn,
+ DeviceLoopDrawingUPP drawingProc,
+ long userData,
+ DeviceLoopFlags flags) ONEWORDINLINE(0xABCA);
+
+
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __A0 GetMaskTable
+ #endif
+EXTERN_API( Ptr )
+GetMaskTable (void) ONEWORDINLINE(0xA836);
+
+
+EXTERN_API( PatHandle )
+GetPattern (short patternID) ONEWORDINLINE(0xA9B8);
+
+#if TARGET_OS_MAC
+ #define MacGetCursor GetCursor
+#endif
+EXTERN_API( CursHandle )
+MacGetCursor (short cursorID) ONEWORDINLINE(0xA9B9);
+
+EXTERN_API( PicHandle )
+GetPicture (short pictureID) ONEWORDINLINE(0xA9BC);
+
+EXTERN_API( long )
+DeltaPoint (Point ptA,
+ Point ptB) ONEWORDINLINE(0xA94F);
+
+EXTERN_API( void )
+ShieldCursor (const Rect * shieldRect,
+ Point offsetPt) ONEWORDINLINE(0xA855);
+
+EXTERN_API( void )
+ScreenRes (short * scrnHRes,
+ short * scrnVRes) SIXWORDINLINE(0x225F, 0x32B8, 0x0102, 0x225F, 0x32B8, 0x0104);
+
+EXTERN_API( void )
+GetIndPattern (Pattern * thePat,
+ short patternListID,
+ short index);
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( Boolean )
+ptinrect (const Point * pt,
+ const Rect * r);
+
+EXTERN_API_C( void )
+pt2rect (const Point * pt1,
+ const Point * pt2,
+ Rect * destRect);
+
+EXTERN_API_C( void )
+pttoangle (const Rect * r,
+ const Point * pt,
+ short * angle);
+
+EXTERN_API_C( Boolean )
+ptinrgn (const Point * pt,
+ RgnHandle rgn);
+
+EXTERN_API_C( void )
+addpt (const Point * src,
+ Point * dst);
+
+EXTERN_API_C( void )
+subpt (const Point * src,
+ Point * dst);
+
+EXTERN_API_C( Boolean )
+equalpt (const Point * pt1,
+ const Point * pt2);
+
+EXTERN_API_C( void )
+stuffhex (void * thingPtr,
+ const char * s);
+
+EXTERN_API_C( void )
+stdline (const Point * newPt);
+
+EXTERN_API_C( void )
+shieldcursor (const Rect * shieldRect,
+ Point * offsetPt);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API_C( long )
+deltapoint (Point * ptA,
+ Point * ptB);
+
+#if OLDROUTINENAMES
+#define DisposPixMap(pm) DisposePixMap(pm)
+#define DisposPixPat(pp) DisposePixPat(pp)
+#define DisposCTable(cTable) DisposeCTable(cTable)
+#define DisposCCursor(cCrsr) DisposeCCursor(cCrsr)
+#define DisposGDevice(gdh) DisposeGDevice(gdh)
+#endif /* OLDROUTINENAMES */
+
+/*
+ From ToolUtils.i
+*/
+EXTERN_API( void )
+PackBits (Ptr * srcPtr,
+ Ptr * dstPtr,
+ short srcBytes) ONEWORDINLINE(0xA8CF);
+
+EXTERN_API( void )
+UnpackBits (Ptr * srcPtr,
+ Ptr * dstPtr,
+ short dstBytes) ONEWORDINLINE(0xA8D0);
+
+EXTERN_API( Fixed )
+SlopeFromAngle (short angle) ONEWORDINLINE(0xA8BC);
+
+EXTERN_API( short )
+AngleFromSlope (Fixed slope) ONEWORDINLINE(0xA8C4);
+
+/* New transfer modes */
+enum {
+ colorXorXFer = 52,
+ noiseXFer = 53,
+ customXFer = 54
+};
+
+/* Custom XFer flags */
+enum {
+ kXFer1PixelAtATime = 0x00000001, /* 1 pixel passed to custom XFer proc*/
+ kXFerConvertPixelToRGB32 = 0x00000002 /* All color depths converted to 32 bit RGB*/
+};
+
+
+struct CustomXFerRec {
+ UInt32 version;
+ void * srcPixels;
+ void * destPixels;
+ void * resultPixels;
+ UInt32 refCon;
+ UInt32 pixelSize;
+ UInt32 pixelCount;
+ Point firstPixelHV;
+ Rect destBounds;
+};
+typedef struct CustomXFerRec CustomXFerRec;
+typedef CustomXFerRec * CustomXFerRecPtr;
+typedef CALLBACK_API( void , CustomXFerProcPtr )(CustomXFerRecPtr info);
+EXTERN_API( OSErr )
+GetPortCustomXFerProc (CGrafPtr port,
+ CustomXFerProcPtr * proc,
+ UInt32 * flags,
+ UInt32 * refCon) FOURWORDINLINE(0x203C, 0x0010, 0x0019, 0xAB1D);
+
+EXTERN_API( OSErr )
+SetPortCustomXFerProc (CGrafPtr port,
+ CustomXFerProcPtr proc,
+ UInt32 flags,
+ UInt32 refCon) FOURWORDINLINE(0x203C, 0x0010, 0x001A, 0xAB1D);
+
+
+enum {
+ kCursorComponentsVersion = 0x00010001
+};
+
+enum {
+ kCursorComponentType = FOUR_CHAR_CODE('curs')
+};
+
+/* Cursor Component capabilities flags */
+enum {
+ cursorDoesAnimate = 1L << 0,
+ cursorDoesHardware = 1L << 1,
+ cursorDoesUnreadableScreenBits = 1L << 2
+};
+
+/* Cursor Component output mode flags */
+enum {
+ kRenderCursorInHardware = 1L << 0,
+ kRenderCursorInSoftware = 1L << 1
+};
+
+/* Cursor Component Info */
+
+struct CursorInfo {
+ long version; /* use kCursorComponentsVersion */
+ long capabilities;
+ long animateDuration; /* approximate time between animate tickles */
+ Rect bounds;
+ Point hotspot;
+ long reserved; /* must set to zero */
+
+};
+typedef struct CursorInfo CursorInfo;
+/* Cursor Component Selectors */
+enum {
+ kCursorComponentInit = 0x0001,
+ kCursorComponentGetInfo = 0x0002,
+ kCursorComponentSetOutputMode = 0x0003,
+ kCursorComponentSetData = 0x0004,
+ kCursorComponentReconfigure = 0x0005,
+ kCursorComponentDraw = 0x0006,
+ kCursorComponentErase = 0x0007,
+ kCursorComponentMove = 0x0008,
+ kCursorComponentAnimate = 0x0009,
+ kCursorComponentLastReserved = 0x0050
+};
+
+EXTERN_API( OSErr )
+OpenCursorComponent (Component c,
+ ComponentInstance * ci) FOURWORDINLINE(0x203C, 0x0008, 0x000B, 0xABE0);
+
+EXTERN_API( OSErr )
+CloseCursorComponent (ComponentInstance ci) FOURWORDINLINE(0x203C, 0x0004, 0x000C, 0xABE0);
+
+EXTERN_API( OSErr )
+SetCursorComponent (ComponentInstance ci) FOURWORDINLINE(0x203C, 0x0004, 0x000D, 0xABE0);
+
+EXTERN_API( OSErr )
+CursorComponentChanged (ComponentInstance ci) FOURWORDINLINE(0x203C, 0x0004, 0x000E, 0xABE0);
+
+EXTERN_API( OSErr )
+CursorComponentSetData (ComponentInstance ci,
+ long data) FOURWORDINLINE(0x203C, 0x0008, 0x000F, 0xABE0);
+
+
+#if ACCESSOR_CALLS_ARE_FUNCTIONS
+/* GrafPort */
+/* Getters */
+EXTERN_API( PixMapHandle )
+GetPortPixMap (CGrafPtr port);
+
+EXTERN_API( Rect *)
+GetPortBounds (CGrafPtr port,
+ Rect * rect);
+
+EXTERN_API( RGBColor *)
+GetPortForeColor (CGrafPtr port,
+ RGBColor * foreColor);
+
+EXTERN_API( RGBColor *)
+GetPortBackColor (CGrafPtr port,
+ RGBColor * backColor);
+
+EXTERN_API( RGBColor *)
+GetPortOpColor (CGrafPtr port,
+ RGBColor * opColor);
+
+EXTERN_API( RGBColor *)
+GetPortHiliteColor (CGrafPtr port,
+ RGBColor * hiliteColor);
+
+EXTERN_API( CQDProcsPtr )
+GetPortGrafProcs (CGrafPtr port);
+
+EXTERN_API( short )
+GetPortTextFont (CGrafPtr port);
+
+EXTERN_API( Style )
+GetPortTextFace (CGrafPtr port);
+
+EXTERN_API( short )
+GetPortTextMode (CGrafPtr port);
+
+EXTERN_API( short )
+GetPortTextSize (CGrafPtr port);
+
+EXTERN_API( short )
+GetPortChExtra (CGrafPtr port);
+
+EXTERN_API( short )
+GetPortFracHPenLocation (CGrafPtr port);
+
+EXTERN_API( Fixed )
+GetPortSpExtra (CGrafPtr port);
+
+EXTERN_API( short )
+GetPortPenVisibility (CGrafPtr port);
+
+EXTERN_API( RgnHandle )
+GetPortVisibleRegion (CGrafPtr port,
+ RgnHandle visRgn);
+
+EXTERN_API( RgnHandle )
+GetPortClipRegion (CGrafPtr port,
+ RgnHandle clipRgn);
+
+EXTERN_API( PixPatHandle )
+GetPortBackPixPat (CGrafPtr port,
+ PixPatHandle backPattern);
+
+EXTERN_API( PixPatHandle )
+GetPortPenPixPat (CGrafPtr port,
+ PixPatHandle penPattern);
+
+EXTERN_API( PixPatHandle )
+GetPortFillPixPat (CGrafPtr port,
+ PixPatHandle fillPattern);
+
+EXTERN_API( Point *)
+GetPortPenSize (CGrafPtr port,
+ Point * penSize);
+
+EXTERN_API( SInt32 )
+GetPortPenMode (CGrafPtr port);
+
+EXTERN_API( Point *)
+GetPortPenLocation (CGrafPtr port,
+ Point * penLocation);
+
+EXTERN_API( Boolean )
+IsPortRegionBeingDefined (CGrafPtr port);
+
+EXTERN_API( Boolean )
+IsPortPictureBeingDefined (CGrafPtr port);
+
+EXTERN_API( Boolean )
+IsPortOffscreen (CGrafPtr port);
+
+/* Setters */
+EXTERN_API( void )
+SetPortBounds (CGrafPtr port,
+ const Rect * rect);
+
+EXTERN_API( void )
+SetPortOpColor (CGrafPtr port,
+ const RGBColor * opColor);
+
+EXTERN_API( void )
+SetPortGrafProcs (CGrafPtr port,
+ CQDProcs * procs);
+
+EXTERN_API( void )
+SetPortVisibleRegion (CGrafPtr port,
+ RgnHandle visRgn);
+
+EXTERN_API( void )
+SetPortClipRegion (CGrafPtr port,
+ RgnHandle clipRgn);
+
+EXTERN_API( void )
+SetPortPenPixPat (CGrafPtr port,
+ PixPatHandle penPattern);
+
+EXTERN_API( void )
+SetPortBackPixPat (CGrafPtr port,
+ PixPatHandle backPattern);
+
+EXTERN_API( void )
+SetPortPenSize (CGrafPtr port,
+ Point penSize);
+
+EXTERN_API( void )
+SetPortPenMode (CGrafPtr port,
+ SInt32 penMode);
+
+EXTERN_API( void )
+SetPortFracHPenLocation (CGrafPtr port,
+ short pnLocHFrac);
+
+/* PixMap */
+EXTERN_API( Rect *)
+GetPixBounds (PixMapHandle pixMap,
+ Rect * bounds);
+
+EXTERN_API( short )
+GetPixDepth (PixMapHandle pixMap);
+
+/* QDGlobals */
+/* Getters */
+EXTERN_API( long )
+GetQDGlobalsRandomSeed (void);
+
+EXTERN_API( BitMap *)
+GetQDGlobalsScreenBits (BitMap * screenBits);
+
+EXTERN_API( Cursor *)
+GetQDGlobalsArrow (Cursor * arrow);
+
+EXTERN_API( Pattern *)
+GetQDGlobalsDarkGray (Pattern * dkGray);
+
+EXTERN_API( Pattern *)
+GetQDGlobalsLightGray (Pattern * ltGray);
+
+EXTERN_API( Pattern *)
+GetQDGlobalsGray (Pattern * gray);
+
+EXTERN_API( Pattern *)
+GetQDGlobalsBlack (Pattern * black);
+
+EXTERN_API( Pattern *)
+GetQDGlobalsWhite (Pattern * white);
+
+EXTERN_API( CGrafPtr )
+GetQDGlobalsThePort (void);
+
+/* Setters */
+EXTERN_API( void )
+SetQDGlobalsRandomSeed (long randomSeed);
+
+EXTERN_API( void )
+SetQDGlobalsArrow (const Cursor * arrow);
+
+/* Regions */
+EXTERN_API( Rect *)
+GetRegionBounds (RgnHandle region,
+ Rect * bounds);
+
+EXTERN_API( Boolean )
+IsRegionRectangular (RgnHandle region);
+
+/* Utilities */
+/* To prevent upward dependencies, GetPortWindow is defined in Window Manager interface: */
+/* pascal WindowPtr GetPortWindow(CGrafPtr port); */
+/* NewPtr/OpenCPort doesn't work with opaque structures */
+EXTERN_API( CGrafPtr )
+CreateNewPort (void);
+
+EXTERN_API( void )
+DisposePort (CGrafPtr port);
+
+#endif /* ACCESSOR_CALLS_ARE_FUNCTIONS */
+
+/*
+ Routines available on Mac OS X to flush buffered window ports...
+ These calls do nothing on Mac OS 8/9. QDIsPortBuffered will always return false there.
+*/
+
+EXTERN_API( Boolean )
+QDIsPortBuffered (CGrafPtr port);
+
+EXTERN_API( Boolean )
+QDIsPortBufferDirty (CGrafPtr port);
+
+EXTERN_API( void )
+QDFlushPortBuffer (CGrafPtr port,
+ RgnHandle region);
+
+
+
+
+
+
+
+
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QUICKDRAW__ */
+
diff --git a/include/qt/QuickdrawText.h b/include/qt/QuickdrawText.h
new file mode 100644
index 000000000..e1f3e5329
--- /dev/null
+++ b/include/qt/QuickdrawText.h
@@ -0,0 +1,353 @@
+/*
+ File: QuickdrawText.h
+
+ Contains: Quickdraw Text Interfaces.
+
+ Version: Technology: Mac OS 8.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1983-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __QUICKDRAWTEXT__
+#define __QUICKDRAWTEXT__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* new CGrafPort bottleneck ("newProc2") function, used in Unicode Text drawing */
+EXTERN_API_C( OSStatus )
+StandardGlyphs (void * dataStream,
+ ByteCount size);
+
+
+enum {
+ /* CharToPixel directions */
+ leftCaret = 0, /*Place caret for left block*/
+ rightCaret = -1, /*Place caret for right block*/
+ kHilite = 1 /*Direction is SysDirection*/
+};
+
+enum {
+ smLeftCaret = 0, /*Place caret for left block - obsolete */
+ smRightCaret = -1, /*Place caret for right block - obsolete */
+ smHilite = 1 /*Direction is TESysJust - obsolete */
+};
+
+enum {
+ /*Constants for styleRunPosition argument in PortionLine, DrawJustified, MeasureJustified, CharToPixel, and PixelToChar.*/
+ onlyStyleRun = 0, /* This is the only style run on the line */
+ leftStyleRun = 1, /* This is leftmost of multiple style runs on the line */
+ rightStyleRun = 2, /* This is rightmost of multiple style runs on the line */
+ middleStyleRun = 3, /* There are multiple style runs on the line and this is neither the leftmost nor the rightmost. */
+ smOnlyStyleRun = 0, /* obsolete */
+ smLeftStyleRun = 1, /* obsolete */
+ smRightStyleRun = 2, /* obsolete */
+ smMiddleStyleRun = 3 /* obsolete */
+};
+
+/* type for styleRunPosition parameter in PixelToChar etc. */
+typedef short JustStyleCode;
+/*QuickTime3.0*/
+enum {
+ /* Constants for txFlags (which used to be the pad field after txFace) */
+ tfAntiAlias = 1 << 0,
+ tfUnicode = 1 << 1
+};
+
+
+
+struct FontInfo {
+ short ascent;
+ short descent;
+ short widMax;
+ short leading;
+};
+typedef struct FontInfo FontInfo;
+
+typedef short FormatOrder[1];
+typedef FormatOrder * FormatOrderPtr;
+/* FormatStatus was moved to TextUtils.i */
+
+struct OffPair {
+ short offFirst;
+ short offSecond;
+};
+typedef struct OffPair OffPair;
+
+typedef OffPair OffsetTable[3];
+typedef CALLBACK_API( Boolean , StyleRunDirectionProcPtr )(short styleRunIndex, void *dirParam);
+typedef STACK_UPP_TYPE(StyleRunDirectionProcPtr) StyleRunDirectionUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(StyleRunDirectionUPP)
+ NewStyleRunDirectionUPP (StyleRunDirectionProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeStyleRunDirectionUPP (StyleRunDirectionUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeStyleRunDirectionUPP (short styleRunIndex,
+ void * dirParam,
+ StyleRunDirectionUPP userUPP);
+
+#else
+ enum { uppStyleRunDirectionProcInfo = 0x00000390 }; /* pascal 1_byte Func(2_bytes, 4_bytes) */
+ #define NewStyleRunDirectionUPP(userRoutine) (StyleRunDirectionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppStyleRunDirectionProcInfo, GetCurrentArchitecture())
+ #define DisposeStyleRunDirectionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeStyleRunDirectionUPP(styleRunIndex, dirParam, userUPP) (Boolean)CALL_TWO_PARAMETER_UPP((userUPP), uppStyleRunDirectionProcInfo, (styleRunIndex), (dirParam))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewStyleRunDirectionProc(userRoutine) NewStyleRunDirectionUPP(userRoutine)
+#define CallStyleRunDirectionProc(userRoutine, styleRunIndex, dirParam) InvokeStyleRunDirectionUPP(styleRunIndex, dirParam, userRoutine)
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( short )
+Pixel2Char (Ptr textBuf,
+ short textLen,
+ short slop,
+ short pixelWidth,
+ Boolean * leadingEdge) FOURWORDINLINE(0x2F3C, 0x820E, 0x0014, 0xA8B5);
+
+EXTERN_API( short )
+Char2Pixel (Ptr textBuf,
+ short textLen,
+ short slop,
+ short offset,
+ short direction) FOURWORDINLINE(0x2F3C, 0x820C, 0x0016, 0xA8B5);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( short )
+PixelToChar (Ptr textBuf,
+ long textLength,
+ Fixed slop,
+ Fixed pixelWidth,
+ Boolean * leadingEdge,
+ Fixed * widthRemaining,
+ JustStyleCode styleRunPosition,
+ Point numer,
+ Point denom) FOURWORDINLINE(0x2F3C, 0x8222, 0x002E, 0xA8B5);
+
+EXTERN_API( short )
+CharToPixel (Ptr textBuf,
+ long textLength,
+ Fixed slop,
+ long offset,
+ short direction,
+ JustStyleCode styleRunPosition,
+ Point numer,
+ Point denom) FOURWORDINLINE(0x2F3C, 0x821C, 0x0030, 0xA8B5);
+
+EXTERN_API( void )
+DrawJustified (Ptr textPtr,
+ long textLength,
+ Fixed slop,
+ JustStyleCode styleRunPosition,
+ Point numer,
+ Point denom) FOURWORDINLINE(0x2F3C, 0x8016, 0x0032, 0xA8B5);
+
+EXTERN_API( void )
+MeasureJustified (Ptr textPtr,
+ long textLength,
+ Fixed slop,
+ Ptr charLocs,
+ JustStyleCode styleRunPosition,
+ Point numer,
+ Point denom) FOURWORDINLINE(0x2F3C, 0x801A, 0x0034, 0xA8B5);
+
+EXTERN_API( Fixed )
+PortionLine (Ptr textPtr,
+ long textLen,
+ JustStyleCode styleRunPosition,
+ Point numer,
+ Point denom) FOURWORDINLINE(0x2F3C, 0x8412, 0x0036, 0xA8B5);
+
+EXTERN_API( void )
+HiliteText (Ptr textPtr,
+ short textLength,
+ short firstOffset,
+ short secondOffset,
+ OffsetTable offsets) FOURWORDINLINE(0x2F3C, 0x800E, 0x001C, 0xA8B5);
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+DrawJust (Ptr textPtr,
+ short textLength,
+ short slop) FOURWORDINLINE(0x2F3C, 0x8008, 0x001E, 0xA8B5);
+
+EXTERN_API( void )
+MeasureJust (Ptr textPtr,
+ short textLength,
+ short slop,
+ Ptr charLocs) FOURWORDINLINE(0x2F3C, 0x800C, 0x0020, 0xA8B5);
+
+EXTERN_API( Fixed )
+PortionText (Ptr textPtr,
+ long textLength) FOURWORDINLINE(0x2F3C, 0x8408, 0x0024, 0xA8B5);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( long )
+VisibleLength (Ptr textPtr,
+ long textLength) FOURWORDINLINE(0x2F3C, 0x8408, 0x0028, 0xA8B5);
+
+EXTERN_API( void )
+GetFormatOrder (FormatOrderPtr ordering,
+ short firstFormat,
+ short lastFormat,
+ Boolean lineRight,
+ StyleRunDirectionUPP rlDirProc,
+ Ptr dirParam) FOURWORDINLINE(0x2F3C, 0x8012, 0xFFFC, 0xA8B5);
+
+EXTERN_API( void )
+TextFont (short font) ONEWORDINLINE(0xA887);
+
+EXTERN_API( void )
+TextFace (StyleParameter face) ONEWORDINLINE(0xA888);
+
+EXTERN_API( void )
+TextMode (short mode) ONEWORDINLINE(0xA889);
+
+EXTERN_API( void )
+TextSize (short size) ONEWORDINLINE(0xA88A);
+
+EXTERN_API( void )
+SpaceExtra (Fixed extra) ONEWORDINLINE(0xA88E);
+
+EXTERN_API( void )
+DrawChar (CharParameter ch) ONEWORDINLINE(0xA883);
+
+EXTERN_API( void )
+DrawString (ConstStr255Param s) ONEWORDINLINE(0xA884);
+
+#if TARGET_OS_MAC
+ #define MacDrawText DrawText
+#endif
+EXTERN_API( void )
+MacDrawText (const void * textBuf,
+ short firstByte,
+ short byteCount) ONEWORDINLINE(0xA885);
+
+EXTERN_API( short )
+CharWidth (CharParameter ch) ONEWORDINLINE(0xA88D);
+
+EXTERN_API( short )
+StringWidth (ConstStr255Param s) ONEWORDINLINE(0xA88C);
+
+EXTERN_API( short )
+TextWidth (const void * textBuf,
+ short firstByte,
+ short byteCount) ONEWORDINLINE(0xA886);
+
+EXTERN_API( void )
+MeasureText (short count,
+ const void * textAddr,
+ void * charLocs) ONEWORDINLINE(0xA837);
+
+EXTERN_API( void )
+GetFontInfo (FontInfo * info) ONEWORDINLINE(0xA88B);
+
+EXTERN_API( void )
+CharExtra (Fixed extra) ONEWORDINLINE(0xAA23);
+
+EXTERN_API( void )
+StdText (short count,
+ const void * textAddr,
+ Point numer,
+ Point denom) ONEWORDINLINE(0xA882);
+
+EXTERN_API( short )
+StdTxMeas (short byteCount,
+ const void * textAddr,
+ Point * numer,
+ Point * denom,
+ FontInfo * info) ONEWORDINLINE(0xA8ED);
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( void )
+drawstring (const char * s);
+
+EXTERN_API_C( short )
+stringwidth (const char * s);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API_C( void )
+stdtext (short count,
+ const void * textAddr,
+ const Point * numer,
+ const Point * denom);
+
+#if OLDROUTINENAMES
+#define NPixel2Char(textBuf, textLen, slop, pixelWidth, leadingEdge, widthRemaining, styleRunPosition, numer, denom) \
+ PixelToChar(textBuf, textLen, slop, pixelWidth, leadingEdge, widthRemaining, styleRunPosition, numer, denom)
+#define NChar2Pixel(textBuf, textLen, slop, offset, direction, styleRunPosition, numer, denom) \
+ CharToPixel(textBuf, textLen, slop, offset, direction, styleRunPosition, numer, denom)
+#define NDrawJust(textPtr, textLength, slop, styleRunPosition, numer, denom) \
+ DrawJustified(textPtr, textLength, slop, styleRunPosition, numer, denom)
+#define NMeasureJust(textPtr, textLength, slop, charLocs, styleRunPosition, numer, denom) \
+ MeasureJustified(textPtr, textLength, slop, charLocs, styleRunPosition, numer, denom)
+#define NPortionText(textPtr, textLen, styleRunPosition, numer, denom)\
+ PortionLine(textPtr, textLen, styleRunPosition, numer, denom)
+#endif /* OLDROUTINENAMES */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __QUICKDRAWTEXT__ */
+
diff --git a/include/qt/RAVE.h b/include/qt/RAVE.h
new file mode 100644
index 000000000..ec71a3c41
--- /dev/null
+++ b/include/qt/RAVE.h
@@ -0,0 +1,1540 @@
+/*
+ File: RAVE.h
+
+ Contains: Interface for RAVE (Renderer Acceleration Virtual Engine)
+
+ Version: Technology: Quickdraw 3D 1.6
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __RAVE__
+#define __RAVE__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+
+#if TARGET_OS_MAC
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#ifndef __QDOFFSCREEN__
+#include "QDOffscreen.h"
+#endif
+
+
+#endif /* TARGET_OS_MAC */
+
+#if TARGET_OS_WIN32
+#include "windows.h"
+#ifndef RAVE_NO_DIRECTDRAW
+#include "ddraw.h"
+#endif /* !defined(RAVE_NO_DIRECTDRAW) */
+
+#endif /* TARGET_OS_WIN32 */
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __RAVE__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __RAVE__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+#define RAVE_OBSOLETE 0
+
+/******************************************************************************
+ *
+ * Platform macros.
+ * This sets kQAPlatform to one of kQAMacOS, kQAWin32, or kQAGeneric.
+ * kQAPlatform controls platform-specific compilation switches and types.
+ *
+ *****************************************************************************/
+
+#if !defined(kQAMacOS)
+#define kQAMacOS 1 /* Target is MacOS */
+#endif
+
+#if !defined(kQAGeneric)
+#define kQAGeneric 2 /* Target is generic platform */
+#endif
+
+#if !defined(kQAWin32)
+#define kQAWin32 3 /* Target is Win32 */
+#endif
+
+#if defined(_WIN32) || defined(_WINDOWS)
+ #define kQAPlatform kQAWin32
+#elif !defined(kQAPlatform)
+ #define kQAPlatform kQAMacOS
+#endif
+
+
+/******************************************************************************
+ *
+ * Export Control
+ *
+ *****************************************************************************/
+#if defined(_MSC_VER)
+ /* Microsoft Visual C */
+ #if defined(WIN32_RAVEEXPORTING)
+ /* define when building DLL */
+ #define RAVE_EXPORT __declspec( dllexport )
+ #define RAVE_CALL
+ #define RAVE_CALLBACK
+ #else
+ #define RAVE_EXPORT __declspec( dllimport )
+ #define RAVE_CALL __cdecl
+ #define RAVE_CALLBACK __cdecl
+ #endif
+ /* WIN32_RAVEEXPORTING */
+#else
+ #define RAVE_EXPORT
+ #define RAVE_CALL
+ #define RAVE_CALLBACK
+#endif
+/* _MSC_VER */
+
+/******************************************************************************
+ *
+ * Platform dependent datatypes: TQAImagePixelType, TQADevice, TQAClip, and TQARect.
+ *
+ *****************************************************************************/
+
+enum TQAImagePixelType {
+ kQAPixel_Alpha1 = 0, /* 1 bit/pixel alpha */
+ kQAPixel_RGB16 = 1, /* 16 bits/pixel, R=14:10, G=9:5, B=4:0 */
+ kQAPixel_ARGB16 = 2, /* 16 bits/pixel, A=15, R=14:10, G=9:5, B=4:0 */
+ kQAPixel_RGB32 = 3, /* 32 bits/pixel, R=23:16, G=15:8, B=7:0 */
+ kQAPixel_ARGB32 = 4, /* 32 bits/pixel, A=31:24, R=23:16, G=15:8, B=7:0 */
+ kQAPixel_CL4 = 5, /* 4 bit color look up table, always big endian, ie high 4 bits effect left pixel */
+ kQAPixel_CL8 = 6, /* 8 bit color look up table */
+ kQAPixel_RGB16_565 = 7, /* Win32 ONLY 16 bits/pixel, no alpha, R:5, G:6, B:5 */
+ kQAPixel_RGB24 = 8, /* Win32 ONLY 24 bits/pixel, no alpha, R:8, G:8, B:8 */
+ kQAPixel_RGB8_332 = 9, /* 8 bits/pixel, R=7:5, G = 4:2, B = 1:0 */
+ kQAPixel_ARGB16_4444 = 10, /* 16 bits/pixel, A=15:12, R=11:8, G=7:4, B=3:0 */
+ kQAPixel_ACL16_88 = 11, /* 16 bits/pixel, A=15:8, CL=7:0, 8 bit alpha + 8 bit color lookup */
+ kQAPixel_I8 = 12, /* 8 bits/pixel, I=7:0, intensity map (grayscale) */
+ kQAPixel_AI16_88 = 13, /* 16 bits/pixel, A=15:8, I=7:0, intensity map (grayscale) */
+ kQAPixel_YUVS = 14, /* 16 bits/pixel, QD's kYUVSPixelFormat (4:2:2, YUYV ordering, unsigned UV) */
+ kQAPixel_YUVU = 15, /* 16 bits/pixel, QD's kYUVUPixelFormat (4:2:2, YUYV ordering, signed UV) */
+ kQAPixel_YVYU422 = 16, /* 16 bits/pixel, QD's kYVYU422PixelFormat (4:2:2, YVYU ordering, unsigned UV) */
+ kQAPixel_UYVY422 = 17 /* 16 bits/pixel, QD's kUYVY422PixelFormat (4:2:2, UYVY ordering, unsigned UV) */
+};
+typedef enum TQAImagePixelType TQAImagePixelType;
+
+
+enum TQAColorTableType {
+ kQAColorTable_CL8_RGB32 = 0, /* 256 entry, 32 bit/pixel, R=23:16, G=15:8, B=7:0 */
+ kQAColorTable_CL4_RGB32 = 1 /* 16 entry, 32 bit/pixel, R=23:16, G=15:8, B=7:0 */
+};
+typedef enum TQAColorTableType TQAColorTableType;
+
+/* Selects target device type */
+
+enum TQADeviceType {
+ kQADeviceMemory = 0, /* Memory draw context */
+ kQADeviceGDevice = 1, /* Macintosh GDevice draw context */
+ kQADeviceWin32DC = 2, /* Win32 DC */
+ kQADeviceDDSurface = 3 /* Win32 DirectDraw Surface */
+};
+typedef enum TQADeviceType TQADeviceType;
+
+/* Generic memory pixmap device */
+
+struct TQADeviceMemory {
+ long rowBytes; /* Rowbytes */
+ TQAImagePixelType pixelType; /* Depth, color space, etc. */
+ long width; /* Width in pixels */
+ long height; /* Height in pixels */
+ void * baseAddr; /* Base address of pixmap */
+};
+typedef struct TQADeviceMemory TQADeviceMemory;
+/* Offscreen Device */
+
+struct TQADeviceOffscreen {
+ TQAImagePixelType pixelType; /* Depth, color space, etc. */
+};
+typedef struct TQADeviceOffscreen TQADeviceOffscreen;
+/* Selects target clip type */
+
+enum TQAClipType {
+ kQAClipRgn = 0, /* Macintosh clipRgn with serial number */
+ kQAClipWin32Rgn = 1 /* Win32 clip region */
+};
+typedef enum TQAClipType TQAClipType;
+
+
+struct TQARect {
+ long left;
+ long right;
+ long top;
+ long bottom;
+};
+typedef struct TQARect TQARect;
+#if TARGET_OS_MAC
+
+union TQAPlatformDevice {
+ TQADeviceMemory memoryDevice;
+ GDHandle gDevice;
+};
+typedef union TQAPlatformDevice TQAPlatformDevice;
+
+union TQAPlatformClip {
+ RgnHandle clipRgn;
+};
+typedef union TQAPlatformClip TQAPlatformClip;
+typedef CALLBACK_API( void , TQADrawNotificationProcPtr )(short left, short top, short right, short bottom, long refCon);
+
+typedef long TQADrawNotificationProcRefNum;
+/* used to unregister your proc */
+#elif TARGET_OS_WIN32
+
+#if !defined(RAVE_NO_DIRECTDRAW)
+
+ enum TQADirectDrawObjectSelector
+ {
+ kQADirectDrawObject = 1,
+ kQADirectDrawObject2 = 2
+ };
+ typedef enum TQADirectDrawObjectSelector TQADirectDrawObjectSelector;
+
+ enum TQADirectDrawSurfaceSelector
+ {
+ kQADirectDrawSurface = 1,
+ kQADirectDrawSurface2 = 2
+ };
+ typedef enum TQADirectDrawSurfaceSelector TQADirectDrawSurfaceSelector;
+
+#endif /* !RAVE_NO_DIRECTDRAW */
+
+ union TQAPlatformDevice
+ {
+ TQADeviceMemory memoryDevice;
+ HDC hdc;
+#if !defined(RAVE_NO_DIRECTDRAW)
+ struct
+ {
+ TQADirectDrawObjectSelector objectSelector;
+ union
+ {
+ LPDIRECTDRAW lpDirectDraw;
+ LPDIRECTDRAW2 lpDirectDraw2;
+ };
+
+ TQADirectDrawSurfaceSelector surfaceSelector;
+ union
+ {
+ LPDIRECTDRAWSURFACE lpDirectDrawSurface;
+ LPDIRECTDRAWSURFACE2 lpDirectDrawSurface2;
+ };
+ };
+#endif /* RAVE_NO_DIRECTDRAW */
+ };
+ typedef union TQAPlatformDevice TQAPlatformDevice;
+
+ union TQAPlatformClip
+ {
+ HRGN clipRgn;
+ };
+ typedef union TQAPlatformClip TQAPlatformClip;
+
+#else
+/*
+ * Generic platform supports memory device only. TQARect is generic. TQAClip is ???.
+ */
+
+union TQAPlatformDevice {
+ TQADeviceMemory memoryDevice;
+};
+typedef union TQAPlatformDevice TQAPlatformDevice;
+
+union TQAPlatformClip {
+ void * region; /* ??? */
+};
+typedef union TQAPlatformClip TQAPlatformClip;
+#endif /* */
+
+
+struct TQADevice {
+ TQADeviceType deviceType;
+ TQAPlatformDevice device;
+};
+typedef struct TQADevice TQADevice;
+
+struct TQAClip {
+ TQAClipType clipType;
+ TQAPlatformClip clip;
+};
+typedef struct TQAClip TQAClip;
+/******************************************************************************
+ *
+ * Basic data types.
+ *
+ *****************************************************************************/
+
+/* Pointer to a drawing engine */
+typedef struct TQAEngine TQAEngine;
+/* Pointer to an allocated texture */
+typedef struct TQATexture TQATexture;
+/* Pointer to an allocated bitmap */
+typedef struct TQABitmap TQABitmap;
+/* Engine's private draw context pointer */
+typedef struct TQADrawPrivate TQADrawPrivate;
+/* An engine specific color table structure */
+typedef struct TQAColorTable TQAColorTable;
+/* A single triangle element for QADrawTriMesh */
+
+struct TQAIndexedTriangle {
+ unsigned long triangleFlags; /* Triangle flags, see kQATriFlags_ */
+ unsigned long vertices[3]; /* Indices into a vertex array */
+};
+typedef struct TQAIndexedTriangle TQAIndexedTriangle;
+/* An image for use as texture or bitmap */
+
+struct TQAImage {
+ long width; /* Width of pixmap */
+ long height; /* Height of pixmap */
+ long rowBytes; /* Rowbytes of pixmap */
+ void * pixmap; /* Pixmap */
+};
+typedef struct TQAImage TQAImage;
+/* a pixel buffer */
+
+typedef TQADeviceMemory TQAPixelBuffer;
+/* a zbuffer */
+
+struct TQAZBuffer {
+ long width; /* Width of pixmap */
+ long height; /* Height of pixmap */
+ long rowBytes; /* Rowbytes of pixmap */
+ void * zbuffer; /* pointer to the zbuffer data */
+ long zDepth; /* bit depth of zbuffer (16,24,32...) */
+ long isBigEndian; /* true if zbuffer values are in big-endian format, false if little-endian */
+};
+typedef struct TQAZBuffer TQAZBuffer;
+/* Standard error type */
+
+enum TQAError {
+ kQANoErr = 0, /* No error */
+ kQAError = 1, /* Generic error flag */
+ kQAOutOfMemory = 2, /* Insufficient memory */
+ kQANotSupported = 3, /* Requested feature is not supported */
+ kQAOutOfDate = 4, /* A newer drawing engine was registered */
+ kQAParamErr = 5, /* Error in passed parameters */
+ kQAGestaltUnknown = 6, /* Requested gestalt type isn't available */
+ kQADisplayModeUnsupported = 7, /* Engine cannot render to the display in its current , */
+ /* mode, but could if it were in some other mode */
+ kQAOutOfVideoMemory = 8 /* There is not enough VRAM to support the desired context dimensions */
+};
+typedef enum TQAError TQAError;
+
+/* TQABoolean */
+
+typedef unsigned char TQABoolean;
+/************************************************************************************************
+ *
+ * Vertex data types.
+ *
+ ***********************************************************************************************/
+/*
+ * TQAVGouraud is used for Gouraud shading. Each vertex specifies position, color and Z.
+ *
+ * Alpha is always treated as indicating transparency. Drawing engines which don't
+ * support Z-sorted rendering use the back-to-front transparency blending functions
+ * shown below. (ARGBsrc are the source (new) values, ARGBdest are the destination
+ * (previous) pixel values.)
+ *
+ * Premultiplied Interpolated
+ *
+ * A = 1 - (1 - Asrc) * (1 - Adest) A = 1 - (1 - Asrc) * (1 - Adest)
+ * R = (1 - Asrc) * Rdest + Rsrc R = (1 - Asrc) * Rdest + Asrc * Rsrc
+ * G = (1 - Asrc) * Gdest + Gsrc G = (1 - Asrc) * Gdest + Asrc * Gsrc
+ * B = (1 - Asrc) * Bdest + Bsrc B = (1 - Asrc) * Bdest + Asrc * Bsrc
+ *
+ * Note that the use of other blending modes to implement antialiasing is performed
+ * automatically by the drawing engine when the kQATag_Antialias variable !=
+ * kQAAntiAlias_Fast. The driving software should continue to use the alpha fields
+ * for transparency even when antialiasing is being used (the drawing engine will
+ * resolve the multiple blending requirements as best as it can).
+ *
+ * Drawing engines which perform front-to-back Z-sorted rendering should replace
+ * the blending function shown above with the equivalent front-to-back formula.
+ */
+
+struct TQAVGouraud {
+ float x; /* X pixel coordinate, 0.0 <= x < width */
+ float y; /* Y pixel coordinate, 0.0 <= y < height */
+ float z; /* Z coordinate, 0.0 <= z <= 1.0 */
+ float invW; /* 1 / w; required only when kQAPerspectiveZ_On is set */
+
+ float r; /* Red, 0.0 <= r <= 1.0 */
+ float g; /* Green, 0.0 <= g <= 1.0 */
+ float b; /* Blue, 0.0 <= b <= 1.0 */
+ float a; /* Alpha, 0.0 <= a <= 1.0, 1.0 is opaque */
+};
+typedef struct TQAVGouraud TQAVGouraud;
+/*
+ * TQAVTexture is used for texture mapping. The texture mapping operation
+ * is controlled by the kQATag_TextureOp variable, which is a mask of
+ * kQATextureOp_None/Modulate/Highlight/Decal. Below is pseudo-code for the
+ * texture shading operation:
+ *
+ * texPix = TextureLookup (uq/q, vq/q);
+ * if (kQATextureOp_Decal)
+ * {
+ * texPix.r = texPix.a * texPix.r + (1 - texPix.a) * r;
+ * texPix.g = texPix.a * texPix.g + (1 - texPix.a) * g;
+ * texPix.b = texPix.a * texPix.b + (1 - texPix.a) * b;
+ * texPix.a = a;
+ * }
+ * else
+ * {
+ * texPix.a = texPix.a * a;
+ * }
+ * if (kQATextureOp_Modulate)
+ * {
+ * texPix.r *= kd_r; // Clamped to prevent overflow
+ * texPix.g *= kd_g; // Clamped to prevent overflow
+ * texPix.b *= kd_b; // Clamped to prevent overflow
+ * }
+ * if (kQATextureOp_Highlight)
+ * {
+ * texPix.r += ks_r; // Clamped to prevent overflow
+ * texPix.g += ks_g; // Clamped to prevent overflow
+ * texPix.b += ks_b; // Clamped to prevent overflow
+ * }
+ *
+ * After computation of texPix, transparency blending (as shown
+ * above for TQAVGouraud) is performed.
+ */
+
+struct TQAVTexture {
+ float x; /* X pixel coordinate, 0.0 <= x < width */
+ float y; /* Y pixel coordinate, 0.0 <= y < height */
+ float z; /* Z coordinate, 0.0 <= z <= 1.0 */
+ float invW; /* 1 / w (always required) */
+
+ /* rgb are used only when kQATextureOp_Decal is set. a is always required */
+
+ float r; /* Red, 0.0 <= r <= 1.0 */
+ float g; /* Green, 0.0 <= g <= 1.0 */
+ float b; /* Blue, 0.0 <= b <= 1.0 */
+ float a; /* Alpha, 0.0 <= a <= 1.0, 1.0 is opaque */
+
+ /* uOverW and vOverW are required by all modes */
+
+ float uOverW; /* u / w */
+ float vOverW; /* v / w */
+
+ /* kd_r/g/b are used only when kQATextureOp_Modulate is set */
+
+ float kd_r; /* Scale factor for texture red, 0.0 <= kd_r */
+ float kd_g; /* Scale factor for texture green, 0.0 <= kd_g */
+ float kd_b; /* Scale factor for texture blue, 0.0 <= kd_b */
+
+ /* ks_r/g/b are used only when kQATextureOp_Highlight is set */
+
+ float ks_r; /* Red specular highlight, 0.0 <= ks_r <= 1.0 */
+ float ks_g; /* Green specular highlight, 0.0 <= ks_g <= 1.0 */
+ float ks_b; /* Blue specular highlight, 0.0 <= ks_b <= 1.0 */
+};
+typedef struct TQAVTexture TQAVTexture;
+/*
+* TQAVMultiTexture allows you to specify the uv and invW values
+* for secondary textures. This data is submitted with the
+* QASubmitMultiTextureParams() call.
+*/
+
+struct TQAVMultiTexture {
+ float invW;
+ float uOverW;
+ float vOverW;
+};
+typedef struct TQAVMultiTexture TQAVMultiTexture;
+
+/************************************************************************************************
+ *
+ * Constants used for the state variables.
+ *
+ ***********************************************************************************************/
+/*
+ * kQATag_xxx is used to select a state variable when calling QASetFloat(), QASetInt(),
+ * QAGetFloat() and QAGetInt(). The kQATag values are split into three separate enumerated
+ * types: TQATagInt, TQATagPtr and TQATagFloat. TQATagInt is used for the QASet/GetInt()
+ * functions, TQATagPtr is used for the QASet/GetPtr() functions, and TQATagFloat is used for
+ * the QASet/GetFloat() functions. (This is so that a compiler that typechecks enums can flag
+ * a float/int tag mismatch during compile.)
+ *
+ * -=- All tag values must be unique even across all three types. -=-
+ *
+ * These variables are required by all drawing engines:
+ * kQATag_ZFunction (Int) One of kQAZFunction_xxx
+ * kQATag_ColorBG_a (Float) Background color alpha
+ * kQATag_ColorBG_r (Float) Background color red
+ * kQATag_ColorBG_g (Float) Background color green
+ * kQATag_ColorBG_b (Float) Background color blue
+ * kQATag_Width (Float) Line and point width (pixels)
+ * kQATag_ZMinOffset (Float) Min offset to Z to guarantee visibility (Read only!)
+ * kQATag_ZMinScale (Float) Min scale to Z to guarantee visibility (Read only!)
+
+ * These variables are used for optional features:
+ * kQATag_Antialias (Int) One of kQAAntiAlias_xxx
+ * kQATag_Blend (Int) One of kQABlend_xxx
+ * kQATag_PerspectiveZ (Int) One of kQAPerspectiveZ_xxx
+ * kQATag_TextureFilter (Int) One of kQATextureFilter_xxx
+ * kQATag_TextureOp (Int) Mask of kQATextureOp_xxx
+ * kQATag_Texture (Ptr) Pointer to current TQATexture
+ * kQATag_CSGTag (Int) One of kQACSGTag_xxx
+ * kQATag_CSGEquation (Int) 32 bit CSG truth table
+ * kQATag_FogMode (Int) One of kQAFogMode_xxxx
+ * kQATag_FogColor_a (Float) Fog color alpha
+ * kQATag_FogColor_r (Float) Fog color red
+ * kQATag_FogColor_g (Float) Fog color green
+ * kQATag_FogColor_b (Float) Fog color blue
+ * kQATag_FogStart (Float) Fog start
+ * kQATag_FogEnd (Float) Fog end
+ * kQATag_FogDensity (Float) Fog density
+ * kQATag_FogMaxDepth (Float) Maximun value for 1.0 / invW
+ * kQATag_MipmapBias (Float) The mipmap page bias factor
+ * kQATag_ChannelMask (Int) one of kQAChannelMask_xxx
+ * kQATag_ZBufferMask (Int) one of kQAZBufferMask_xxx
+ * kQATag_ZSortedHint (Int) 1 = depth sort transparent triangles, 0 = do not sort.
+ * kQATag_Chromakey_r (Float) chroma key red
+ * kQATag_Chromakey_g (Float) chroma key green
+ * kQATag_Chromakey_b (Float) chroma key blue
+ * kQATag_ChromakeyEnable (Int) 1 = enable chroma keying, 0 = disable chroma keying
+ * kQATag_AlphaTestFunc (Int) one of kQAAlphaTest_xxx
+ * kQATag_AlphaTestRef (Float) from 0 to 1
+ * kQATag_DontSwap (Int) 1 = dont swap buffers during QARenderEnd, 0 = do swap buffers during QARenderEnd.
+
+ * kQATag_MultiTextureOp (Int) One of kQAMultiTexture_xxx
+ * kQATag_MultiTextureFilter (Int) One of kQATextureFilter_xxx
+ * kQATag_MultiTextureCurrent (Int) which multitexture layer to use for all other multitexture funcs
+ * kQATag_MultiTextureEnable (Int) how many multitexture layers to use (0 = no multitexturing).
+ * kQATag_MultiTextureWrapU (Int)
+ * kQATag_MultiTextureWrapV (Int)
+ * kQATag_MultiTextureMagFilter (Int)
+ * kQATag_MultiTextureMinFilter (Int)
+ * kQATag_MultiTextureBorder_a (Float)
+ * kQATag_MultiTextureBorder_r (Float)
+ * kQATag_MultiTextureBorder_g (Float)
+ * kQATag_MultiTextureBorder_b (Float)
+ * kQATag_MultiTextureMipmapBias (Float)
+ * kQATag_MultiTextureFactor (Float) used with kQAMultiTexture_Fixed to determine blending factor
+ *
+ * These variables are used for OpenGL(tm) support:
+ * kQATagGL_DrawBuffer (Int) Mask of kQAGL_DrawBuffer_xxx
+ * kQATagGL_TextureWrapU (Int) kQAGL_Clamp or kQAGL_Repeat
+ * kQATagGL_TextureWrapV (Int) kQAGL_Clamp or kQAGL_Repeat
+ * kQATagGL_TextureMagFilter (Int) kQAGL_Nearest or kQAGL_Linear
+ * kQATagGL_TextureMinFilter (Int) kQAGL_Nearest, etc.
+ * kQATagGL_ScissorXMin (Int) Minimum X value for scissor rectangle
+ * kQATagGL_ScissorYMin (Int) Minimum Y value for scissor rectangle
+ * kQATagGL_ScissorXMax (Int) Maximum X value for scissor rectangle
+ * kQATagGL_ScissorYMax (Int) Maximum Y value for scissor rectangle
+ * kQATagGL_BlendSrc (Int) Source blending operation
+ * kQATagGL_BlendDst (Int) Destination blending operation
+ * kQATagGL_LinePattern (Int) Line rasterization pattern
+ * kQATagGL_AreaPattern0 (Int) First of 32 area pattern registers
+ * kQATagGL_AreaPattern31 (Int) Last of 32 area pattern registers
+ *
+ * kQATagGL_DepthBG (Float) Background Z
+ * kQATagGL_TextureBorder_a (Float) Texture border color alpha
+ * kQATagGL_TextureBorder_r (Float) Texture border color red
+ * kQATagGL_TextureBorder_g (Float) Texture border color green
+ * kQATagGL_TextureBorder_b (Float) Texture border color blue
+ *
+ * Tags >= kQATag_EngineSpecific_Minimum may be assigned by the vendor for use as
+ * engine-specific variables. NOTE: These should be used only in exceptional circumstances,
+ * as functions performed by these variables won't be generally accessible. All other tag
+ * values are reserved.
+ *
+ * kQATag_EngineSpecific_Minimum Minimum tag value for drawing-engine specific variables
+ */
+
+enum TQATagInt {
+ kQATag_ZFunction = 0,
+ kQATag_Antialias = 8,
+ kQATag_Blend = 9,
+ kQATag_PerspectiveZ = 10,
+ kQATag_TextureFilter = 11,
+ kQATag_TextureOp = 12,
+ kQATag_CSGTag = 14,
+ kQATag_CSGEquation = 15,
+ kQATag_BufferComposite = 16,
+ kQATag_FogMode = 17,
+ kQATag_ChannelMask = 27,
+ kQATag_ZBufferMask = 28,
+ kQATag_ZSortedHint = 29,
+ kQATag_ChromakeyEnable = 30,
+ kQATag_AlphaTestFunc = 31,
+ kQATag_DontSwap = 32,
+ kQATag_MultiTextureEnable = 33,
+ kQATag_MultiTextureCurrent = 34,
+ kQATag_MultiTextureOp = 35,
+ kQATag_MultiTextureFilter = 36,
+ kQATag_MultiTextureWrapU = 37,
+ kQATag_MultiTextureWrapV = 38,
+ kQATag_MultiTextureMagFilter = 39,
+ kQATag_MultiTextureMinFilter = 40,
+ kQATag_BitmapFilter = 54, /* filter to use while scaling bitmaps, one of kQAFilter_xxx */
+ kQATag_DrawContextFilter = 55, /* filter to use while scaling draw contexts, one of kQAFilter_xxx */
+ kQATagGL_DrawBuffer = 100,
+ kQATagGL_TextureWrapU = 101,
+ kQATagGL_TextureWrapV = 102,
+ kQATagGL_TextureMagFilter = 103,
+ kQATagGL_TextureMinFilter = 104,
+ kQATagGL_ScissorXMin = 105,
+ kQATagGL_ScissorYMin = 106,
+ kQATagGL_ScissorXMax = 107,
+ kQATagGL_ScissorYMax = 108,
+ kQATagGL_BlendSrc = 109,
+ kQATagGL_BlendDst = 110,
+ kQATagGL_LinePattern = 111,
+ kQATagGL_AreaPattern0 = 117, /* ...kQATagGL_AreaPattern1-30 */
+ kQATagGL_AreaPattern31 = 148,
+ kQATagGL_LinePatternFactor = 149, /* equivalent to GL_LINE_STIPPLE_REPEAT */
+ kQATag_EngineSpecific_Minimum = 1000
+};
+typedef enum TQATagInt TQATagInt;
+
+
+enum TQATagPtr {
+ kQATag_Texture = 13,
+ kQATag_MultiTexture = 26
+};
+typedef enum TQATagPtr TQATagPtr;
+
+
+enum TQATagFloat {
+ kQATag_ColorBG_a = 1,
+ kQATag_ColorBG_r = 2,
+ kQATag_ColorBG_g = 3,
+ kQATag_ColorBG_b = 4,
+ kQATag_Width = 5,
+ kQATag_ZMinOffset = 6,
+ kQATag_ZMinScale = 7,
+ kQATag_FogColor_a = 18,
+ kQATag_FogColor_r = 19,
+ kQATag_FogColor_g = 20,
+ kQATag_FogColor_b = 21,
+ kQATag_FogStart = 22,
+ kQATag_FogEnd = 23,
+ kQATag_FogDensity = 24,
+ kQATag_FogMaxDepth = 25,
+ kQATag_MipmapBias = 41,
+ kQATag_MultiTextureMipmapBias = 42,
+ kQATag_Chromakey_r = 43,
+ kQATag_Chromakey_g = 44,
+ kQATag_Chromakey_b = 45,
+ kQATag_AlphaTestRef = 46,
+ kQATag_MultiTextureBorder_a = 47,
+ kQATag_MultiTextureBorder_r = 48,
+ kQATag_MultiTextureBorder_g = 49,
+ kQATag_MultiTextureBorder_b = 50,
+ kQATag_MultiTextureFactor = 51,
+ kQATag_BitmapScale_x = 52, /* horizontal bitmap scale factor, default value is 1.0 */
+ kQATag_BitmapScale_y = 53, /* vertical bitmap scale factor, default value is 1.0 */
+ kQATag_MultiTextureEnvColor_a = 56,
+ kQATag_MultiTextureEnvColor_r = 57,
+ kQATag_MultiTextureEnvColor_g = 58,
+ kQATag_MultiTextureEnvColor_b = 59,
+ kQATagGL_DepthBG = 112,
+ kQATagGL_TextureBorder_a = 113,
+ kQATagGL_TextureBorder_r = 114,
+ kQATagGL_TextureBorder_g = 115,
+ kQATagGL_TextureBorder_b = 116,
+ kQATagGL_TextureEnvColor_a = 150,
+ kQATagGL_TextureEnvColor_r = 151,
+ kQATagGL_TextureEnvColor_g = 152,
+ kQATagGL_TextureEnvColor_b = 153
+};
+typedef enum TQATagFloat TQATagFloat;
+
+
+/* kQATag_ZFunction */
+enum {
+ kQAZFunction_None = 0, /* Z is neither tested nor written (same as no Z buffer) */
+ kQAZFunction_LT = 1, /* Znew < Zbuffer is visible */
+ kQAZFunction_EQ = 2, /* Znew == Zbuffer is visible */
+ kQAZFunction_LE = 3, /* Znew <= Zbuffer is visible */
+ kQAZFunction_GT = 4, /* Znew > Zbuffer is visible */
+ kQAZFunction_NE = 5, /* Znew != Zbuffer is visible */
+ kQAZFunction_GE = 6, /* Znew >= Zbuffer is visible */
+ kQAZFunction_True = 7, /* Znew is always visible */
+ kQAZFunction_False = 8 /* Znew is never visible */
+};
+
+/* kQATag_Width */
+#define kQAMaxWidth 128.0
+/* kQATag_Antialias */
+enum {
+ kQAAntiAlias_Off = 0,
+ kQAAntiAlias_Fast = 1,
+ kQAAntiAlias_Mid = 2,
+ kQAAntiAlias_Best = 3
+};
+
+/* kQATag_Blend */
+enum {
+ kQABlend_PreMultiply = 0,
+ kQABlend_Interpolate = 1,
+ kQABlend_OpenGL = 2
+};
+
+/* kQATag_BufferComposite */
+enum {
+ kQABufferComposite_None = 0, /* Default: New pixels overwrite initial buffer contents */
+ kQABufferComposite_PreMultiply = 1, /* New pixels are blended with initial buffer contents via PreMultiply */
+ kQABufferComposite_Interpolate = 2 /* New pixels are blended with initial buffer contents via Interpolate */
+};
+
+/* kQATag_PerspectiveZ */
+enum {
+ kQAPerspectiveZ_Off = 0, /* Use Z for hidden surface removal */
+ kQAPerspectiveZ_On = 1 /* Use InvW for hidden surface removal */
+};
+
+/* kQATag_TextureFilter */
+enum {
+ /* suggested meanings of these values */
+ kQATextureFilter_Fast = 0, /* No filtering, pick nearest */
+ kQATextureFilter_Mid = 1, /* Fastest method that does some filtering */
+ kQATextureFilter_Best = 2 /* Highest quality renderer can do */
+};
+
+/* filter tag values */
+enum {
+ /* suggested meanings of these values */
+ kQAFilter_Fast = 0, /* No filtering, pick nearest */
+ kQAFilter_Mid = 1, /* Fastest method that does some filtering */
+ kQAFilter_Best = 2 /* Highest quality renderer can do */
+};
+
+/* kQATag_TextureOp (mask of one or more) */
+enum {
+ kQATextureOp_None = 0, /* Default texture mapping mode */
+ kQATextureOp_Modulate = (1 << 0), /* Modulate texture color with kd_r/g/b */
+ kQATextureOp_Highlight = (1 << 1), /* Add highlight value ks_r/g/b */
+ kQATextureOp_Decal = (1 << 2), /* When texture alpha == 0, use rgb instead */
+ kQATextureOp_Shrink = (1 << 3), /* This is a non-wrapping texture, so the ??? */
+ kQATextureOp_Blend = (1 << 4) /* Same as GL_TEXTURE_ENV_MODE GL_BLEND */
+};
+
+/* kQATag_MultiTextureOp */
+enum {
+ kQAMultiTexture_Add = 0, /* texels are added to form final pixel */
+ kQAMultiTexture_Modulate = 1, /* texels are multiplied to form final pixel */
+ kQAMultiTexture_BlendAlpha = 2, /* texels are blended according to 2nd texel's alpha */
+ kQAMultiTexture_Fixed = 3 /* texels are blended by a fixed factor via kQATag_MultiTextureFactor */
+};
+
+/* kQATag_CSGTag */
+#define kQACSGTag_None 0xffffffffUL
+enum {
+ kQACSGTag_0 = 0, /* Submitted tris have CSG ID 0 */
+ kQACSGTag_1 = 1, /* Submitted tris have CSG ID 1 */
+ kQACSGTag_2 = 2, /* Submitted tris have CSG ID 2 */
+ kQACSGTag_3 = 3, /* Submitted tris have CSG ID 3 */
+ kQACSGTag_4 = 4 /* Submitted tris have CSG ID 4 */
+};
+
+/* kQATagGL_TextureWrapU/V */
+enum {
+ kQAGL_Repeat = 0,
+ kQAGL_Clamp = 1
+};
+
+/* kQATagGL_BlendSrc */
+enum {
+ kQAGL_SourceBlend_XXX = 0
+};
+
+/* kQATagGL_BlendDst */
+enum {
+ kQAGL_DestBlend_XXX = 0
+};
+
+/* kQATagGL_DrawBuffer (mask of one or more) */
+enum {
+ kQAGL_DrawBuffer_None = 0,
+ kQAGL_DrawBuffer_FrontLeft = (1 << 0),
+ kQAGL_DrawBuffer_FrontRight = (1 << 1),
+ kQAGL_DrawBuffer_BackLeft = (1 << 2),
+ kQAGL_DrawBuffer_BackRight = (1 << 3),
+ kQAGL_DrawBuffer_Front = (kQAGL_DrawBuffer_FrontLeft | kQAGL_DrawBuffer_FrontRight),
+ kQAGL_DrawBuffer_Back = (kQAGL_DrawBuffer_BackLeft | kQAGL_DrawBuffer_BackRight)
+};
+
+/* kQATag_FogMode */
+enum {
+ kQAFogMode_None = 0, /* no fog */
+ kQAFogMode_Alpha = 1, /* fog value is alpha */
+ kQAFogMode_Linear = 2, /* fog = (end - z) / (end - start) */
+ kQAFogMode_Exponential = 3, /* fog = exp(-density * z) */
+ kQAFogMode_ExponentialSquared = 4 /* fog = exp(-density * z * density * z) */
+};
+
+
+/* kQATag_ChannelMask */
+enum {
+ kQAChannelMask_r = (1 << 0),
+ kQAChannelMask_g = (1 << 1),
+ kQAChannelMask_b = (1 << 2),
+ kQAChannelMask_a = (1 << 3)
+};
+
+
+/* kQATag_ZBufferMask */
+enum {
+ kQAZBufferMask_Disable = 0,
+ kQAZBufferMask_Enable = 1
+};
+
+/* kQATag_AlphaTestFunc */
+enum {
+ kQAAlphaTest_None = 0,
+ kQAAlphaTest_LT = 1,
+ kQAAlphaTest_EQ = 2,
+ kQAAlphaTest_LE = 3,
+ kQAAlphaTest_GT = 4,
+ kQAAlphaTest_NE = 5,
+ kQAAlphaTest_GE = 6,
+ kQAAlphaTest_True = 7
+};
+
+
+/* flags for QAAccess__xxx */
+enum {
+ kQANoCopyNeeded = (1 << 0)
+};
+
+
+/************************************************************************************************
+ *
+ * Constants used as function parameters.
+ *
+ ***********************************************************************************************/
+/*
+ * TQAVertexMode is a parameter to QADrawVGouraud() and QADrawVTexture() that specifies how
+ * to interpret and draw the vertex array.
+ */
+
+enum TQAVertexMode {
+ kQAVertexMode_Point = 0, /* Draw nVertices points */
+ kQAVertexMode_Line = 1, /* Draw nVertices/2 line segments */
+ kQAVertexMode_Polyline = 2, /* Draw nVertices-1 connected line segments */
+ kQAVertexMode_Tri = 3, /* Draw nVertices/3 triangles */
+ kQAVertexMode_Strip = 4, /* Draw nVertices-2 triangles as a strip */
+ kQAVertexMode_Fan = 5, /* Draw nVertices-2 triangles as a fan from v0 */
+ kQAVertexMode_NumModes = 6
+};
+typedef enum TQAVertexMode TQAVertexMode;
+
+/*
+ * TQAGestaltSelector is a parameter to QAEngineGestalt(). It selects which gestalt
+ * parameter will be copied into 'response'.
+ */
+
+enum TQAGestaltSelector {
+ kQAGestalt_OptionalFeatures = 0, /* Mask of one or more kQAOptional_xxx */
+ kQAGestalt_FastFeatures = 1, /* Mask of one or more kQAFast_xxx */
+ kQAGestalt_VendorID = 2, /* Vendor ID */
+ kQAGestalt_EngineID = 3, /* Engine ID */
+ kQAGestalt_Revision = 4, /* Revision number of this engine */
+ kQAGestalt_ASCIINameLength = 5, /* strlen (asciiName) */
+ kQAGestalt_ASCIIName = 6, /* Causes strcpy (response, asciiName) */
+ kQAGestalt_TextureMemory = 7, /* amount of texture RAM currently available */
+ kQAGestalt_FastTextureMemory = 8, /* amount of texture RAM currently available */
+ kQAGestalt_DrawContextPixelTypesAllowed = 9, /* returns all the draw context pixel types supported by the RAVE engine */
+ kQAGestalt_DrawContextPixelTypesPreferred = 10, /* returns all the draw context pixel types that are preferred by the RAVE engine. */
+ kQAGestalt_TexturePixelTypesAllowed = 11, /* returns all the texture pixel types that are supported by the RAVE engine */
+ kQAGestalt_TexturePixelTypesPreferred = 12, /* returns all the texture pixel types that are preferred by the RAVE engine.*/
+ kQAGestalt_BitmapPixelTypesAllowed = 13, /* returns all the bitmap pixel types that are supported by the RAVE engine. */
+ kQAGestalt_BitmapPixelTypesPreferred = 14, /* returns all the bitmap pixel types that are preferred by the RAVE engine. */
+ kQAGestalt_OptionalFeatures2 = 15, /* Mask of one or more kQAOptional2_xxx */
+ kQAGestalt_MultiTextureMax = 16, /* max number of multi textures supported by this engine */
+ kQAGestalt_NumSelectors = 17,
+ kQAGestalt_EngineSpecific_Minimum = 1000 /* all gestalts here and above are for engine specific purposes */
+};
+typedef enum TQAGestaltSelector TQAGestaltSelector;
+
+/*
+ * TQAMethodSelector is a parameter to QASetNoticeMethod to select the notice method
+ */
+#if RAVE_OBSOLETE
+
+enum TQAMethodSelector {
+ kQAMethod_RenderCompletion = 0, /* Called when rendering has completed and buffers swapped */
+ kQAMethod_DisplayModeChanged = 1, /* Called when a display mode has changed */
+ kQAMethod_ReloadTextures = 2, /* Called when texture memory has been invalidated */
+ kQAMethod_BufferInitialize = 3, /* Called when a buffer needs to be initialized */
+ kQAMethod_BufferComposite = 4, /* Called when rendering is finished and its safe to composite */
+ kQAMethod_NumSelectors = 5
+};
+typedef enum TQAMethodSelector TQAMethodSelector;
+
+#else
+
+enum TQAMethodSelector {
+ kQAMethod_RenderCompletion = 0, /* Called when rendering has completed and buffers swapped */
+ kQAMethod_DisplayModeChanged = 1, /* Called when a display mode has changed */
+ kQAMethod_ReloadTextures = 2, /* Called when texture memory has been invalidated */
+ kQAMethod_ImageBufferInitialize = 3, /* Called when a buffer needs to be initialized */
+ kQAMethod_ImageBuffer2DComposite = 4, /* Called when rendering is finished and its safe to composite */
+ kQAMethod_NumSelectors = 5
+};
+typedef enum TQAMethodSelector TQAMethodSelector;
+
+#endif /* RAVE_OBSOLETE */
+
+/*
+ * kQATriFlags_xxx are ORed together to generate the 'flags' parameter
+ * to QADrawTriGouraud() and QADrawTriTexture().
+ */
+enum {
+ kQATriFlags_None = 0, /* No flags (triangle is front-facing or don't care) */
+ kQATriFlags_Backfacing = (1 << 0) /* Triangle is back-facing */
+};
+
+/*
+ * kQATexture_xxx are ORed together to generate the 'flags' parameter to QATextureNew().
+ */
+enum {
+ kQATexture_None = 0, /* No flags */
+ kQATexture_Lock = (1 << 0), /* Don't swap this texture out */
+ kQATexture_Mipmap = (1 << 1), /* This texture is mipmapped */
+ kQATexture_NoCompression = (1 << 2), /* Do not compress this texture */
+ kQATexture_HighCompression = (1 << 3), /* Compress texture, even if it takes a while */
+ kQATexture_NonRelocatable = (1 << 4), /* Image buffer in VRAM should be non-relocatable */
+ kQATexture_NoCopy = (1 << 5), /* Don't copy image to VRAM when creating it */
+ kQATexture_FlipOrigin = (1 << 6), /* The image(s) is(are) in a bottom-up format. (The image(s) is(are) flipped vertically.) */
+ kQATexture_PriorityBits = (1 << 31) | (1 << 30) | (1 << 29) | (1 << 28) /* Texture priority: 4 upper bits for 16 levels of priority */
+};
+
+/*
+ * kQABitmap_xxx are ORed together to generate the 'flags' parameter to QABitmapNew().
+ */
+enum {
+ kQABitmap_None = 0, /* No flags */
+ kQABitmap_Lock = (1 << 1), /* Don't swap this bitmap out */
+ kQABitmap_NoCompression = (1 << 2), /* Do not compress this bitmap */
+ kQABitmap_HighCompression = (1 << 3), /* Compress bitmap, even if it takes a while */
+ kQABitmap_NonRelocatable = (1 << 4), /* Image buffer in VRAM should be non-relocatable */
+ kQABitmap_NoCopy = (1 << 5), /* Don't copy image to VRAM when creating it */
+ kQABitmap_FlipOrigin = (1 << 6), /* The image is in a bottom-up format. (The image is flipped vertically.) */
+ kQABitmap_PriorityBits = (1 << 31) | (1 << 30) | (1 << 29) | (1 << 28) /* Bitmap priority: 4 upper bits for 16 levels of priority */
+};
+
+/*
+ * kQAContext_xxx are ORed together to generate the 'flags' parameter for QADrawContextNew().
+ */
+enum {
+ kQAContext_None = 0, /* No flags */
+ kQAContext_NoZBuffer = (1 << 0), /* No hidden surface removal */
+ kQAContext_DeepZ = (1 << 1), /* Hidden surface precision >= 24 bits */
+ kQAContext_DoubleBuffer = (1 << 2), /* Double buffered window */
+ kQAContext_Cache = (1 << 3), /* This is a cache context */
+ kQAContext_NoDither = (1 << 4), /* No dithering, straight color banding */
+ kQAContext_Scale = (1 << 5), /* The draw context is to be scaled. The front buffer is a different size than the back buffer. */
+ kQAContext_NonRelocatable = (1 << 6), /* The back buffer and the z buffer must not move in memory */
+ kQAContext_EngineSpecific1 = (1 << 28), /* engine specific flag # 1 */
+ kQAContext_EngineSpecific2 = (1 << 29), /* engine specific flag # 2 */
+ kQAContext_EngineSpecific3 = (1 << 30), /* engine specific flag # 3 */
+ kQAContext_EngineSpecific4 = (1 << 31) /* engine specific flag # 4 */
+};
+
+/*
+ * kQAOptional_xxx are ORed together to generate the kQAGestalt_OptionalFeatures response
+ * from QAEngineGestalt().
+ */
+enum {
+ kQAOptional_None = 0, /* No optional features */
+ kQAOptional_DeepZ = (1 << 0), /* Hidden surface precision >= 24 bits */
+ kQAOptional_Texture = (1 << 1), /* Texture mapping */
+ kQAOptional_TextureHQ = (1 << 2), /* High quality texture (tri-linear mip or better) */
+ kQAOptional_TextureColor = (1 << 3), /* Full color modulation and highlight of textures */
+ kQAOptional_Blend = (1 << 4), /* Transparency blending of RGB */
+ kQAOptional_BlendAlpha = (1 << 5), /* Transparency blending includes alpha channel */
+ kQAOptional_Antialias = (1 << 6), /* Antialiased rendering */
+ kQAOptional_ZSorted = (1 << 7), /* Z sorted rendering (for transparency, etc.) */
+ kQAOptional_PerspectiveZ = (1 << 8), /* Hidden surface removal using InvW instead of Z */
+ kQAOptional_OpenGL = (1 << 9), /* Extended rasterization features for OpenGL(tm) */
+ kQAOptional_NoClear = (1 << 10), /* This drawing engine doesn't clear before drawing */
+ kQAOptional_CSG = (1 << 11), /* kQATag_CSGxxx are implemented */
+ kQAOptional_BoundToDevice = (1 << 12), /* This engine is tightly bound to GDevice */
+ kQAOptional_CL4 = (1 << 13), /* This engine suports kQAPixel_CL4 */
+ kQAOptional_CL8 = (1 << 14), /* This engine suports kQAPixel_CL8 */
+ kQAOptional_BufferComposite = (1 << 15), /* This engine can composite with initial buffer contents */
+ kQAOptional_NoDither = (1 << 16), /* This engine can draw with no dithering */
+ kQAOptional_FogAlpha = (1 << 17), /* This engine suports alpha based fog */
+ kQAOptional_FogDepth = (1 << 18), /* This engine suports depth based fog */
+ kQAOptional_MultiTextures = (1 << 19), /* This bit set if engine supports texture compositing */
+ kQAOptional_MipmapBias = (1 << 20), /* This bit is set if the engine supports mipmap selection bias */
+ kQAOptional_ChannelMask = (1 << 21),
+ kQAOptional_ZBufferMask = (1 << 22),
+ kQAOptional_AlphaTest = (1 << 23), /* this engine supports alpha testing */
+ kQAOptional_AccessTexture = (1 << 24), /* if engine supports access to texture */
+ kQAOptional_AccessBitmap = (1 << 25), /* if engine supports access to bitmaps */
+ kQAOptional_AccessDrawBuffer = (1 << 26), /* if engine supports access to draw buffer */
+ kQAOptional_AccessZBuffer = (1 << 27), /* if engine supports access to zbuffer */
+ kQAOptional_ClearDrawBuffer = (1 << 28), /* if engine supports QAClearDrawBuffer() */
+ kQAOptional_ClearZBuffer = (1 << 29), /* if engine supports QAClearZBuffer() */
+ kQAOptional_OffscreenDrawContexts = (1 << 30) /* if engine supports TQADeviceOffscreen */
+};
+
+/*
+ * kQAOptional2_xxx are ORed together to generate the kQAGestalt_OptionalFeatures2 response
+ * from QAEngineGestalt().
+ */
+enum {
+ kQAOptional2_None = 0,
+ kQAOptional2_TextureDrawContexts = (1 << 1), /* if engine supports QATextureNewFromDrawContext() */
+ kQAOptional2_BitmapDrawContexts = (1 << 2), /* if engine supports QABitmapNewFromDrawContext() */
+ kQAOptional2_Busy = (1 << 3), /* if engine supports QABusy() */
+ kQAOptional2_SwapBuffers = (1 << 4), /* if engine supports QASwapBuffers() */
+ kQAOptional2_Chromakey = (1 << 5), /* if engine supports chromakeying via kQATag_Chromakey_xxx */
+ kQAOptional2_NonRelocatable = (1 << 6), /* if engine supports nonrelocatable texture & bitmap image buffers in VRAM */
+ kQAOptional2_NoCopy = (1 << 7), /* if engine supports ability to not copy texture & bitmap image to VRAM */
+ kQAOptional2_PriorityBits = (1 << 8), /* if engine supports texture & bitmap priority levels */
+ kQAOptional2_FlipOrigin = (1 << 9), /* if engine supports textures & bitmaps that are vertically flipped */
+ kQAOptional2_BitmapScale = (1 << 10), /* if engine supports scaled bitmap drawing */
+ kQAOptional2_DrawContextScale = (1 << 11), /* if engine supports scaled draw contexts */
+ kQAOptional2_DrawContextNonRelocatable = (1 << 12) /* if engine supports draw contexts with non relocatable buffers */
+};
+
+
+/*
+ * kQAFast_xxx are ORed together to generate the kQAGestalt_FastFeatures response
+ * from QAEngineGestalt().
+ */
+enum {
+ kQAFast_None = 0, /* No accelerated features */
+ kQAFast_Line = (1 << 0), /* Line drawing */
+ kQAFast_Gouraud = (1 << 1), /* Gouraud shaded triangles */
+ kQAFast_Texture = (1 << 2), /* Texture mapped triangles */
+ kQAFast_TextureHQ = (1 << 3), /* High quality texture (tri-linear mip or better) */
+ kQAFast_Blend = (1 << 4), /* Transparency blending */
+ kQAFast_Antialiasing = (1 << 5), /* Antialiased rendering */
+ kQAFast_ZSorted = (1 << 6), /* Z sorted rendering of non-opaque objects */
+ kQAFast_CL4 = (1 << 7), /* This engine accelerates kQAPixel_CL4 */
+ kQAFast_CL8 = (1 << 8), /* This engine accelerates kQAPixel_CL8 */
+ kQAFast_FogAlpha = (1 << 9), /* This engine accelerates alpha based fog */
+ kQAFast_FogDepth = (1 << 10), /* This engine accelerates depth based fog */
+ kQAFast_MultiTextures = (1 << 11), /* This engine accelerates texture compositing */
+ kQAFast_BitmapScale = (1 << 12), /* This engine accelerates scaled bitmap drawing */
+ kQAFast_DrawContextScale = (1 << 13) /* This engine accelerates scaled draw contexts */
+};
+
+
+
+/************************************************************************************************
+ *
+ * Macro definition for easily setting the texture priority bits in the flags field of
+ * QATextureNew(), and QABitMapNew().
+ *
+ * The priority value must be a number between 0 and 15. 0 is top priority, and 15 is lowest
+ * priority. Note that this is different than OpenGL which uses floats from 0.0 to 1.0 where
+ * 1.0 is top priority. In RAVE, this system is more like texture ranking, thus 0 is top rank,
+ * and 15 is the last ranking.
+ *
+ * Texture prioritization is mainly used for systems which support AGP memory. This allows the
+ * hardware driver to determine which textures to put into faster VRAM and which to put into
+ * slower AGP RAM. If you dont care about texture priority, then you dont need to worry about
+ * this macro or the priority bits since the default will always be top priority when all 4 bits
+ * of this flag field are 0's.
+ *
+ * To upload a texture with high priority, do the following:
+ *
+ * unsigned long flags = kQATexture_Mipmap; // Initialize flags
+ *
+ * flags |= QACalculatePriorityBits(0); // Setting top priority (this actually does
+ * // nothing since the bits are still 0000)
+ * QATextureNew(myEngine, flags, pixelType, image, &raveTexture);
+ *
+ *
+ * To do a texture with a middle priority of 8, do the following:
+ *
+ * unsigned long flags = kQATexture_HighCompression; // Initialize flags
+ *
+ * flags |= QACalculatePriorityBits(8); // Setting middle priority
+ *
+ * QATextureNew(myEngine, flags, pixelType, image, &raveTexture);
+ *
+ ***********************************************************************************************/
+
+#define QACalculatePriorityBits(_priority) (((unsigned long) (_priority)) << 28)
+
+
+
+/************************************************************************************************
+ *
+ * Macro definitions for the drawing engine methods included in TQADrawContext. These
+ * macros are the recommended means of accessing the engine's draw methods, e.g:
+ *
+ * TQADrawContext *drawContext;
+ * TQAVTexture vertices[3];
+ *
+ * drawContext = QADrawContextNew (rect, gdevice, engine, kQAContext_ZBuffer);
+ * ...
+ * QASetInt (drawContext, kQATag_ZFunction, kQAZFunction_LT);
+ * QADrawTriGouraud (drawContext, &vertices[0], &vertices[1], &vertices[2], kQATriFlags_None);
+ *
+ * Note that QARenderStart(), QARenderEnd(), QAFlush() and QASync() have real function
+ * definitions instead of macros. This is because these functions can afford the extra
+ * per-call overhead of a function layer (which makes application code a little smaller),
+ * and to allow a cleaner implementation of handling NULL parameters to QARenderStart().
+ *
+ ***********************************************************************************************/
+
+
+#define QASetFloat(drawContext,tag,newValue) \
+ (drawContext)->setFloat (drawContext,tag,newValue)
+
+#define QASetInt(drawContext,tag,newValue) \
+ (drawContext)->setInt (drawContext,tag,newValue)
+
+#define QASetPtr(drawContext,tag,newValue) \
+ (drawContext)->setPtr (drawContext,tag,newValue)
+
+#define QAGetFloat(drawContext,tag) \
+ (drawContext)->getFloat (drawContext,tag)
+
+#define QAGetInt(drawContext,tag) \
+ (drawContext)->getInt (drawContext,tag)
+
+#define QAGetPtr(drawContext,tag) \
+ (drawContext)->getPtr (drawContext,tag)
+
+#define QADrawPoint(drawContext,v) \
+ (drawContext)->drawPoint (drawContext,v)
+
+#define QADrawLine(drawContext,v0,v1) \
+ (drawContext)->drawLine (drawContext,v0,v1)
+
+#define QADrawTriGouraud(drawContext,v0,v1,v2,flags) \
+ (drawContext)->drawTriGouraud (drawContext,v0,v1,v2,flags)
+
+#define QADrawTriTexture(drawContext,v0,v1,v2,flags) \
+ (drawContext)->drawTriTexture (drawContext,v0,v1,v2,flags)
+
+#define QASubmitVerticesGouraud(drawContext,nVertices,vertices) \
+ (drawContext)->submitVerticesGouraud(drawContext,nVertices,vertices)
+
+#define QASubmitVerticesTexture(drawContext,nVertices,vertices) \
+ (drawContext)->submitVerticesTexture(drawContext,nVertices,vertices)
+
+#define QASubmitMultiTextureParams(drawContext,nParams,params) \
+ (drawContext)->submitMultiTextureParams(drawContext,nParams,params)
+
+
+
+#define QADrawTriMeshGouraud(drawContext,nTriangle,triangles) \
+ (drawContext)->drawTriMeshGouraud (drawContext,nTriangle,triangles)
+
+#define QADrawTriMeshTexture(drawContext,nTriangle,triangles) \
+ (drawContext)->drawTriMeshTexture (drawContext,nTriangle,triangles)
+
+#define QADrawVGouraud(drawContext,nVertices,vertexMode,vertices,flags) \
+ (drawContext)->drawVGouraud (drawContext,nVertices,vertexMode,vertices,flags)
+
+#define QADrawVTexture(drawContext,nVertices,vertexMode,vertices,flags) \
+ (drawContext)->drawVTexture (drawContext,nVertices,vertexMode,vertices,flags)
+
+#define QADrawBitmap(drawContext,v,bitmap) \
+ (drawContext)->drawBitmap (drawContext,v,bitmap)
+
+#define QARenderStart(drawContext,dirtyRect,initialContext) \
+ (drawContext)->renderStart (drawContext,dirtyRect,initialContext)
+
+#define QARenderEnd(drawContext,modifiedRect) \
+ (drawContext)->renderEnd (drawContext,modifiedRect)
+
+#define QARenderAbort(drawContext) \
+ (drawContext)->renderAbort (drawContext)
+
+#define QAFlush(drawContext) \
+ (drawContext)->flush (drawContext)
+
+#define QASync(drawContext) \
+ (drawContext)->sync (drawContext)
+
+#define QASetNoticeMethod(drawContext, method, completionCallBack, refCon) \
+ (drawContext)->setNoticeMethod (drawContext, method, completionCallBack, refCon)
+
+#define QAGetNoticeMethod(drawContext, method, completionCallBack, refCon) \
+ (drawContext)->getNoticeMethod (drawContext, method, completionCallBack, refCon)
+
+#define QAAccessDrawBuffer(drawContext, pixelBuffer) \
+ (drawContext)->accessDrawBuffer(drawContext, pixelBuffer)
+
+#define QAAccessDrawBufferEnd(drawContext, dirtyRect) \
+ (drawContext)->accessDrawBufferEnd(drawContext, dirtyRect)
+
+#define QAAccessZBuffer(drawContext, zBuffer) \
+ (drawContext)->accessZBuffer(drawContext, zBuffer)
+
+#define QAAccessZBufferEnd(drawContext, dirtyRect) \
+ (drawContext)->accessZBufferEnd(drawContext, dirtyRect)
+
+
+
+#define QAClearDrawBuffer(drawContext, rect, initialContext) \
+ (drawContext)->clearDrawBuffer(drawContext, rect, initialContext)
+
+#define QAClearZBuffer(drawContext, rect, initialContext) \
+ (drawContext)->clearZBuffer(drawContext, rect, initialContext)
+
+#define QATextureNewFromDrawContext(drawContext, flags, newTexture) \
+ (drawContext)->textureFromContext(drawContext, flags, newTexture)
+
+#define QABitmapNewFromDrawContext(drawContext, flags, newBitmap) \
+ (drawContext)->bitmapFromContext(drawContext, flags, newBitmap)
+
+#define QABusy(drawContext) \
+ (drawContext)->busy(drawContext)
+
+#define QASwapBuffers(drawContext, dirtyRect) \
+ (drawContext)->swapBuffers(drawContext, dirtyRect)
+
+
+
+
+
+/********************************************************************
+ * TQAVersion sets the TQADrawContext 'version' field. It is set by
+ * the manager to indicate the version of the TQADrawContext structure.
+ *******************************************************************/
+
+enum TQAVersion {
+ kQAVersion_Prerelease = 0,
+ kQAVersion_1_0 = 1,
+ kQAVersion_1_0_5 = 2, /* Added tri mesh functions, color tables */
+ kQAVersion_1_5 = 3, /* Added call backs, texture compression, and new error return code */
+ kQAVersion_1_6 = 4 /* Added QAAccess_xxx, fog, _Options2, Clear_xxx, etc. */
+};
+typedef enum TQAVersion TQAVersion;
+
+
+
+/***********************************************************************
+ * TQADrawContext structure holds method pointers.
+ * This is a forward refrence. The structure is defined later.
+ **********************************************************************/
+typedef struct TQADrawContext TQADrawContext;
+/************************************************************************************************
+ *
+ * Typedefs of draw method functions provided by the drawing engine. One function pointer
+ * for each of these function types in stored in the TQADrawContext public data structure.
+ *
+ * These functions should be accessed through the QA<function>(context,...) macros,
+ * defined above.
+ *
+ ***********************************************************************************************/
+typedef CALLBACK_API_C( void , TQAStandardNoticeMethod )(const TQADrawContext *drawContext, void *refCon);
+typedef CALLBACK_API_C( void , TQABufferNoticeMethod )(const TQADrawContext *drawContext, const TQADevice *buffer, const TQARect *dirtyRect, void *refCon);
+
+union TQANoticeMethod {
+ TQAStandardNoticeMethod standardNoticeMethod; /* Used for non-buffer related methods */
+ TQABufferNoticeMethod bufferNoticeMethod; /* Used for buffer handling methods */
+};
+typedef union TQANoticeMethod TQANoticeMethod;
+typedef CALLBACK_API_C( void , TQASetFloat )(TQADrawContext *drawContext, TQATagFloat tag, float newValue);
+typedef CALLBACK_API_C( void , TQASetInt )(TQADrawContext *drawContext, TQATagInt tag, unsigned long newValue);
+typedef CALLBACK_API_C( void , TQASetPtr )(TQADrawContext *drawContext, TQATagPtr tag, const void *newValue);
+typedef CALLBACK_API_C( float , TQAGetFloat )(const TQADrawContext *drawContext, TQATagFloat tag);
+typedef CALLBACK_API_C( unsigned long , TQAGetInt )(const TQADrawContext *drawContext, TQATagInt tag);
+typedef CALLBACK_API_C( void *, TQAGetPtr )(const TQADrawContext *drawContext, TQATagPtr tag);
+typedef CALLBACK_API_C( void , TQADrawPoint )(const TQADrawContext *drawContext, const TQAVGouraud *v);
+typedef CALLBACK_API_C( void , TQADrawLine )(const TQADrawContext *drawContext, const TQAVGouraud *v0, const TQAVGouraud *v1);
+typedef CALLBACK_API_C( void , TQADrawTriGouraud )(const TQADrawContext *drawContext, const TQAVGouraud *v0, const TQAVGouraud *v1, const TQAVGouraud *v2, unsigned long flags);
+typedef CALLBACK_API_C( void , TQADrawTriTexture )(const TQADrawContext *drawContext, const TQAVTexture *v0, const TQAVTexture *v1, const TQAVTexture *v2, unsigned long flags);
+typedef CALLBACK_API_C( void , TQASubmitVerticesGouraud )(const TQADrawContext *drawContext, unsigned long nVertices, const TQAVGouraud *vertices);
+typedef CALLBACK_API_C( void , TQASubmitVerticesTexture )(const TQADrawContext *drawContext, unsigned long nVertices, const TQAVTexture *vertices);
+typedef CALLBACK_API_C( void , TQADrawTriMeshGouraud )(const TQADrawContext *drawContext, unsigned long nTriangles, const TQAIndexedTriangle *triangles);
+typedef CALLBACK_API_C( void , TQADrawTriMeshTexture )(const TQADrawContext *drawContext, unsigned long nTriangles, const TQAIndexedTriangle *triangles);
+typedef CALLBACK_API_C( void , TQADrawVGouraud )(const TQADrawContext *drawContext, unsigned long nVertices, TQAVertexMode vertexMode, const TQAVGouraud vertices[], const unsigned long flags[]);
+typedef CALLBACK_API_C( void , TQADrawVTexture )(const TQADrawContext *drawContext, unsigned long nVertices, TQAVertexMode vertexMode, const TQAVTexture vertices[], const unsigned long flags[]);
+typedef CALLBACK_API_C( void , TQADrawBitmap )(const TQADrawContext *drawContext, const TQAVGouraud *v, TQABitmap *bitmap);
+typedef CALLBACK_API_C( void , TQARenderStart )(const TQADrawContext *drawContext, const TQARect *dirtyRect, const TQADrawContext *initialContext);
+typedef CALLBACK_API_C( TQAError , TQARenderEnd )(const TQADrawContext *drawContext, const TQARect *modifiedRect);
+typedef CALLBACK_API_C( TQAError , TQARenderAbort )(const TQADrawContext *drawContext);
+typedef CALLBACK_API_C( TQAError , TQAFlush )(const TQADrawContext *drawContext);
+typedef CALLBACK_API_C( TQAError , TQASync )(const TQADrawContext *drawContext);
+typedef CALLBACK_API_C( TQAError , TQASetNoticeMethod )(const TQADrawContext *drawContext, TQAMethodSelector method, TQANoticeMethod completionCallBack, void *refCon);
+typedef CALLBACK_API_C( TQAError , TQAGetNoticeMethod )(const TQADrawContext *drawContext, TQAMethodSelector method, TQANoticeMethod *completionCallBack, void **refCon);
+typedef CALLBACK_API_C( void , TQASubmitMultiTextureParams )(const TQADrawContext *drawContext, unsigned long nParams, const TQAVMultiTexture *params);
+typedef CALLBACK_API_C( TQAError , TQAAccessDrawBuffer )(const TQADrawContext *drawContext, TQAPixelBuffer *buffer);
+typedef CALLBACK_API_C( TQAError , TQAAccessDrawBufferEnd )(const TQADrawContext *drawContext, const TQARect *dirtyRect);
+typedef CALLBACK_API_C( TQAError , TQAAccessZBuffer )(const TQADrawContext *drawContext, TQAZBuffer *buffer);
+typedef CALLBACK_API_C( TQAError , TQAAccessZBufferEnd )(const TQADrawContext *drawContext, const TQARect *dirtyRect);
+typedef CALLBACK_API_C( TQAError , TQAClearDrawBuffer )(const TQADrawContext *drawContext, const TQARect *rect, const TQADrawContext *initialContext);
+typedef CALLBACK_API_C( TQAError , TQAClearZBuffer )(const TQADrawContext *drawContext, const TQARect *rect, const TQADrawContext *initialContext);
+typedef CALLBACK_API_C( TQAError , TQATextureNewFromDrawContext )(const TQADrawContext *drawContext, unsigned long flags, TQATexture **newTexture);
+typedef CALLBACK_API_C( TQAError , TQABitmapNewFromDrawContext )(const TQADrawContext *drawContext, unsigned long flags, TQABitmap **newBitmap);
+typedef CALLBACK_API_C( TQABoolean , TQABusy )(const TQADrawContext *drawContext);
+typedef CALLBACK_API_C( TQAError , TQASwapBuffers )(const TQADrawContext *drawContext, const TQARect *dirtyRect);
+/************************************************************************************************
+ *
+ * Public TQADrawContext structure. This contains function pointers for the chosen
+ * drawing engine.
+ *
+ ***********************************************************************************************/
+
+struct TQADrawContext {
+ TQADrawPrivate * drawPrivate; /* Engine's private data for this context */
+ TQAVersion version; /* Version number */
+ TQASetFloat setFloat; /* Method: Set a float state variable */
+ TQASetInt setInt; /* Method: Set an unsigned long state variable */
+ TQASetPtr setPtr; /* Method: Set an unsigned long state variable */
+ TQAGetFloat getFloat; /* Method: Get a float state variable */
+ TQAGetInt getInt; /* Method: Get an unsigned long state variable */
+ TQAGetPtr getPtr; /* Method: Get an pointer state variable */
+ TQADrawPoint drawPoint; /* Method: Draw a point */
+ TQADrawLine drawLine; /* Method: Draw a line */
+ TQADrawTriGouraud drawTriGouraud; /* Method: Draw a Gouraud shaded triangle */
+ TQADrawTriTexture drawTriTexture; /* Method: Draw a texture mapped triangle */
+ TQADrawVGouraud drawVGouraud; /* Method: Draw Gouraud vertices */
+ TQADrawVTexture drawVTexture; /* Method: Draw texture vertices */
+ TQADrawBitmap drawBitmap; /* Method: Draw a bitmap */
+ TQARenderStart renderStart; /* Method: Initialize for rendering */
+ TQARenderEnd renderEnd; /* Method: Complete rendering and display */
+ TQARenderAbort renderAbort; /* Method: Abort any outstanding rendering (blocking) */
+ TQAFlush flush; /* Method: Start render of any queued commands (non-blocking) */
+ TQASync sync; /* Method: Wait for completion of all rendering (blocking) */
+ TQASubmitVerticesGouraud submitVerticesGouraud; /* Method: Submit Gouraud vertices for trimesh */
+ TQASubmitVerticesTexture submitVerticesTexture; /* Method: Submit Texture vertices for trimesh */
+ TQADrawTriMeshGouraud drawTriMeshGouraud; /* Method: Draw a Gouraud triangle mesh */
+ TQADrawTriMeshTexture drawTriMeshTexture; /* Method: Draw a Texture triangle mesh */
+ TQASetNoticeMethod setNoticeMethod; /* Method: Set a notice method */
+ TQAGetNoticeMethod getNoticeMethod; /* Method: Get a notice method */
+ TQASubmitMultiTextureParams submitMultiTextureParams; /* Method: Submit Secondary texture params */
+ TQAAccessDrawBuffer accessDrawBuffer;
+ TQAAccessDrawBufferEnd accessDrawBufferEnd;
+ TQAAccessZBuffer accessZBuffer;
+ TQAAccessZBufferEnd accessZBufferEnd;
+ TQAClearDrawBuffer clearDrawBuffer;
+ TQAClearZBuffer clearZBuffer;
+ TQATextureNewFromDrawContext textureFromContext;
+ TQABitmapNewFromDrawContext bitmapFromContext;
+ TQABusy busy;
+ TQASwapBuffers swapBuffers;
+};
+
+/************************************************************************************************
+ *
+ * Acceleration manager function prototypes.
+ *
+ ***********************************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQAError )
+QADrawContextNew (const TQADevice * device,
+ const TQARect * rect,
+ const TQAClip * clip,
+ const TQAEngine * engine,
+ unsigned long flags,
+ TQADrawContext ** newDrawContext);
+
+EXTERN_API_C( void )
+QADrawContextDelete (TQADrawContext * drawContext);
+
+EXTERN_API_C( TQAError )
+QAColorTableNew (const TQAEngine * engine,
+ TQAColorTableType tableType,
+ void * pixelData,
+ long transparentIndexFlag,
+ TQAColorTable ** newTable);
+
+EXTERN_API_C( void )
+QAColorTableDelete (const TQAEngine * engine,
+ TQAColorTable * colorTable);
+
+EXTERN_API_C( TQAError )
+QATextureNew (const TQAEngine * engine,
+ unsigned long flags,
+ TQAImagePixelType pixelType,
+ const TQAImage images[],
+ TQATexture ** newTexture);
+
+EXTERN_API_C( TQAError )
+QATextureDetach (const TQAEngine * engine,
+ TQATexture * texture);
+
+EXTERN_API_C( void )
+QATextureDelete (const TQAEngine * engine,
+ TQATexture * texture);
+
+EXTERN_API_C( TQAError )
+QATextureBindColorTable (const TQAEngine * engine,
+ TQATexture * texture,
+ TQAColorTable * colorTable);
+
+EXTERN_API_C( TQAError )
+QABitmapNew (const TQAEngine * engine,
+ unsigned long flags,
+ TQAImagePixelType pixelType,
+ const TQAImage * image,
+ TQABitmap ** newBitmap);
+
+EXTERN_API_C( TQAError )
+QABitmapDetach (const TQAEngine * engine,
+ TQABitmap * bitmap);
+
+EXTERN_API_C( void )
+QABitmapDelete (const TQAEngine * engine,
+ TQABitmap * bitmap);
+
+EXTERN_API_C( TQAError )
+QABitmapBindColorTable (const TQAEngine * engine,
+ TQABitmap * bitmap,
+ TQAColorTable * colorTable);
+
+EXTERN_API_C( TQAEngine *)
+QADeviceGetFirstEngine (const TQADevice * device);
+
+EXTERN_API_C( TQAEngine *)
+QADeviceGetNextEngine (const TQADevice * device,
+ const TQAEngine * currentEngine);
+
+EXTERN_API_C( TQAError )
+QAEngineCheckDevice (const TQAEngine * engine,
+ const TQADevice * device);
+
+EXTERN_API_C( TQAError )
+QAEngineGestalt (const TQAEngine * engine,
+ TQAGestaltSelector selector,
+ void * response);
+
+EXTERN_API_C( TQAError )
+QAEngineEnable (long vendorID,
+ long engineID);
+
+EXTERN_API_C( TQAError )
+QAEngineDisable (long vendorID,
+ long engineID);
+
+
+EXTERN_API_C( TQAError )
+QAAccessTexture (const TQAEngine * engine,
+ TQATexture * texture,
+ long mipmapLevel,
+ long flags,
+ TQAPixelBuffer * buffer);
+
+EXTERN_API_C( TQAError )
+QAAccessTextureEnd (const TQAEngine * engine,
+ TQATexture * texture,
+ const TQARect * dirtyRect);
+
+EXTERN_API_C( TQAError )
+QAAccessBitmap (const TQAEngine * engine,
+ TQABitmap * bitmap,
+ long flags,
+ TQAPixelBuffer * buffer);
+
+EXTERN_API_C( TQAError )
+QAAccessBitmapEnd (const TQAEngine * engine,
+ TQABitmap * bitmap,
+ const TQARect * dirtyRect);
+
+
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if TARGET_OS_MAC
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQAError )
+QARegisterDrawNotificationProc (Rect * globalRect,
+ TQADrawNotificationProcPtr proc,
+ long refCon,
+ TQADrawNotificationProcRefNum * refNum);
+
+EXTERN_API_C( TQAError )
+QAUnregisterDrawNotificationProc (TQADrawNotificationProcRefNum refNum);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_OS_MAC */
+
+
+
+
+
+
+
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __RAVE__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__RAVE__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __RAVE__ */
+
diff --git a/include/qt/RAVESystem.h b/include/qt/RAVESystem.h
new file mode 100644
index 000000000..152d7d9b9
--- /dev/null
+++ b/include/qt/RAVESystem.h
@@ -0,0 +1,385 @@
+/*
+ File: RAVESystem.h
+
+ Contains: Interfaces needed when building RAVE engines
+
+ Version: Technology: Quickdraw 3D 1.6
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __RAVESYSTEM__
+#define __RAVESYSTEM__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __RAVE__
+#include "RAVE.h"
+#endif
+
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=power
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #if defined(__fourbyteints__) && !__fourbyteints__
+ #define __RAVESYSTEM__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints on
+ #endif
+ #pragma enumsalwaysint on
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=int
+#elif PRAGMA_ENUM_PACK
+ #if __option(pack_enums)
+ #define __RAVESYSTEM__RESTORE_PACKED_ENUMS
+ #pragma options(!pack_enums)
+ #endif
+#endif
+
+
+/************************************************************************************************
+ *
+ * Typedefs of texture/bitmap method functions provided by the drawing engine.
+ *
+ ***********************************************************************************************/
+/* TQAColorTableNew parameter descriptions */
+/* TQAColorTableType pixelType Depth, color space, etc. */
+/* void *pixelData lookup table entries in pixelType format */
+/* long transparentIndex boolean, false means no transparency, true means index 0 is transparent */
+/* TQAColorTable **newTable (Out) Newly created TQAColorTable */
+typedef CALLBACK_API_C( TQAError , TQAColorTableNew )(TQAColorTableType pixelType, void *pixelData, long transparentIndex, TQAColorTable **newTable);
+/* TQAColorTableDelete parameter descriptions */
+/* TQAColorTable *colorTable Previously allocated by QAColorTableNew() */
+typedef CALLBACK_API_C( void , TQAColorTableDelete )(TQAColorTable *colorTable);
+/* TQATextureNew parameter descriptions */
+/* unsigned long flags Mask of kQATexture_xxx flags */
+/* TQAImagePixelType pixelType Depth, color space, etc. */
+/* const TQAImage images[] Image(s) for texture */
+/* TQATexture **newTexture (Out) Newly created TQATexture, or NULL on error */
+typedef CALLBACK_API_C( TQAError , TQATextureNew )(unsigned long flags, TQAImagePixelType pixelType, const TQAImage images[], TQATexture **newTexture);
+/* TQATextureDetach parameter descriptions */
+/* TQATexture *texture Previously allocated by QATextureNew() */
+typedef CALLBACK_API_C( TQAError , TQATextureDetach )(TQATexture *texture);
+/* TQATextureDelete parameter descriptions */
+/* TQATexture *texture Previously allocated by QATextureNew() */
+typedef CALLBACK_API_C( void , TQATextureDelete )(TQATexture *texture);
+/* TQATextureBindColorTable parameter descriptions */
+/* TQATexture *texture Previously allocated by QATextureNew() */
+/* TQAColorTable *colorTable Previously allocated by QAColorTableNew() */
+typedef CALLBACK_API_C( TQAError , TQATextureBindColorTable )(TQATexture *texture, TQAColorTable *colorTable);
+/* TQABitmapNew parameter descriptions */
+/* unsigned long flags Mask of kQABitmap_xxx flags */
+/* TQAImagePixelType pixelType Depth, color space, etc. */
+/* const TQAImage *image Image */
+/* TQABitmap **newBitmap (Out) Newly created TQABitmap, or NULL on error */
+typedef CALLBACK_API_C( TQAError , TQABitmapNew )(unsigned long flags, TQAImagePixelType pixelType, const TQAImage *image, TQABitmap **newBitmap);
+/* TQABitmapDetach parameter descriptions */
+/* TQABitmap *bitmap Previously allocated by QABitmapNew() */
+typedef CALLBACK_API_C( TQAError , TQABitmapDetach )(TQABitmap *bitmap);
+/* TQABitmapDelete parameter descriptions */
+/* TQABitmap *bitmap Previously allocated by QABitmapNew() */
+typedef CALLBACK_API_C( void , TQABitmapDelete )(TQABitmap *bitmap);
+/* TQABitmapBindColorTable parameter descriptions */
+/* TQABitmap *bitmap Previously allocated by QABitmapNew() */
+/* TQAColorTable *colorTable Previously allocated by QAColorTableNew() */
+typedef CALLBACK_API_C( TQAError , TQABitmapBindColorTable )(TQABitmap *bitmap, TQAColorTable *colorTable);
+/************************************************************************************************
+ *
+ * Typedefs of private (system-only) functions provided by the drawing engine.
+ *
+ * The TQADrawPrivateNew function returns a TQADrawPrivate *, which points to the
+ * engine-specific private data created for the context. (TQADrawPrivate is a dummy
+ * type which is then cast to the correct engine-specific datatype by the engine code.)
+ *
+ * The TQADrawPrivateDelete function deletes the engine-specific private data.
+ *
+ * TQAStorePrivateNew and TQAStorePrivateDelete provide the same function as QADrawPrivateNew
+ * and TQADrawPrivateDelete, but for the texture and bitmap storage context.
+ *
+ * TQADrawMethodGet and TQAStoreMethodGet are called by the RAVE manager to retrieve
+ * the method pointers for a drawing engine.
+ *
+ * The TQAEngineCheckDevice function returns TRUE if the engine can render to the
+ * indicated GDevice.
+ *
+ ***********************************************************************************************/
+/* TQADrawPrivateNew parameter descriptions */
+/* TQADrawContext *newDrawContext Draw context to initialize */
+/* const TQADevice *device Target device */
+/* const TQARect *rect Target rectangle (device coordinates) */
+/* const TQAClip *clip 2D clip region (or NULL) */
+/* unsigned long flags Mask of kQAContext_xxx */
+typedef CALLBACK_API_C( TQAError , TQADrawPrivateNew )(TQADrawContext *newDrawContext, const TQADevice *device, const TQARect *rect, const TQAClip *clip, unsigned long flags);
+/* TQADrawPrivateDelete parameter descriptions */
+/* TQADrawPrivate *drawPrivate Private context data to delete */
+typedef CALLBACK_API_C( void , TQADrawPrivateDelete )(TQADrawPrivate *drawPrivate);
+/* TQAEngineCheckDevice parameter descriptions */
+/* const TQADevice *device Target device */
+typedef CALLBACK_API_C( TQAError , TQAEngineCheckDevice )(const TQADevice *device);
+/* TQAEngineGestalt parameter descriptions */
+/* TQAGestaltSelector selector Gestalt parameter being requested */
+/* void *response Buffer that receives response */
+typedef CALLBACK_API_C( TQAError , TQAEngineGestalt )(TQAGestaltSelector selector, void *response);
+
+/* new engine methods for RAVE 1.6 */
+typedef CALLBACK_API_C( TQAError , TQAAccessTexture )(TQATexture *texture, long mipmapLevel, long flags, TQAPixelBuffer *buffer);
+typedef CALLBACK_API_C( TQAError , TQAAccessTextureEnd )(TQATexture *texture, const TQARect *dirtyRect);
+typedef CALLBACK_API_C( TQAError , TQAAccessBitmap )(TQABitmap *bitmap, long flags, TQAPixelBuffer *buffer);
+typedef CALLBACK_API_C( TQAError , TQAAccessBitmapEnd )(TQABitmap *bitmap, const TQARect *dirtyRect);
+/************************************************************************************************
+ *
+ * The TQAEngineMethod union is used to represent a single engine method (it's a
+ * parameter to QAEngineGetMethod). TQAEngineMethodTag identifies which method is being
+ * requested.
+ *
+ ***********************************************************************************************/
+
+union TQAEngineMethod {
+ TQADrawPrivateNew drawPrivateNew; /* Method: Create a private draw context */
+ TQADrawPrivateDelete drawPrivateDelete; /* Method: Delete a private draw context */
+ TQAEngineCheckDevice engineCheckDevice; /* Method: Check a device for drawing */
+ TQAEngineGestalt engineGestalt; /* Method: Gestalt */
+ TQATextureNew textureNew; /* Method: Create a texture (load is non-blocking) */
+ TQATextureDetach textureDetach; /* Method: Complete load of a texture (blocking) */
+ TQATextureDelete textureDelete; /* Method: Delete a texture */
+ TQABitmapNew bitmapNew; /* Method: Create a bitmap (load is non-blocking) */
+ TQABitmapDetach bitmapDetach; /* Method: Complete load of a bitmap (blocking) */
+ TQABitmapDelete bitmapDelete; /* Method: Delete a bitmap */
+ TQAColorTableNew colorTableNew; /* Method: Create a new color table */
+ TQAColorTableDelete colorTableDelete; /* Method: Create a new color table */
+ TQATextureBindColorTable textureBindColorTable; /* Method: Bind a CLUT to a texture */
+ TQABitmapBindColorTable bitmapBindColorTable; /* Method: Bind a CLUT to a bitmap */
+ TQAAccessTexture accessTexture;
+ TQAAccessTextureEnd accessTextureEnd;
+ TQAAccessBitmap accessBitmap;
+ TQAAccessBitmapEnd accessBitmapEnd;
+};
+typedef union TQAEngineMethod TQAEngineMethod;
+
+enum TQAEngineMethodTag {
+ kQADrawPrivateNew = 0,
+ kQADrawPrivateDelete = 1,
+ kQAEngineCheckDevice = 2,
+ kQAEngineGestalt = 3,
+ kQATextureNew = 4,
+ kQATextureDetach = 5,
+ kQATextureDelete = 6,
+ kQABitmapNew = 7,
+ kQABitmapDetach = 8,
+ kQABitmapDelete = 9,
+ kQAColorTableNew = 10,
+ kQAColorTableDelete = 11,
+ kQATextureBindColorTable = 12,
+ kQABitmapBindColorTable = 13,
+ kQAAccessTexture = 14,
+ kQAAccessTextureEnd = 15,
+ kQAAccessBitmap = 16,
+ kQAAccessBitmapEnd = 17
+};
+typedef enum TQAEngineMethodTag TQAEngineMethodTag;
+
+/************************************************************************************************
+ *
+ * QARegisterEngine() registers a new engine. This is called at boot time by the drawing engine
+ * initialization code to register itself with the system. This call takes only one parameter,
+ * the engine's function that allows the manager to request the other methods.
+ *
+ ***********************************************************************************************/
+/* TQAEngineGetMethod parameter descriptions */
+/* TQAEngineMethodTag methodTag Method being requested */
+/* TQAEngineMethod *method (Out) Method */
+typedef CALLBACK_API_C( TQAError , TQAEngineGetMethod )(TQAEngineMethodTag methodTag, TQAEngineMethod *method);
+/* QARegisterEngine parameter descriptions */
+/* TQAEngineGetMethod engineGetMethod Engine's getMethod method */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQAError )
+QARegisterEngine (TQAEngineGetMethod engineGetMethod);
+
+
+/* QARegisterEngineWithRefCon parameter descriptions */
+/* TQAEngineGetMethod engineGetMethod Engine's getMethod method */
+/* long refCon Engine RefCon */
+EXTERN_API_C( TQAError )
+QARegisterEngineWithRefCon (TQAEngineGetMethod engineGetMethod,
+ long refCon);
+
+/* QAGetEngineRefCon parameter descriptions */
+EXTERN_API_C( long )
+QAGetCurrentEngineRefCon (void);
+
+
+/************************************************************************************************
+ *
+ * The TQADrawMethod union is used to represent a single draw context method (it's a
+ * parameter to QARegisterDrawMethod). TQADrawMethodTag identifies which method is being
+ * passed.
+ *
+ ***********************************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+union TQADrawMethod {
+ TQASetFloat setFloat; /* Method: Set a float state variable */
+ TQASetInt setInt; /* Method: Set an unsigned long state variable */
+ TQASetPtr setPtr; /* Method: Set an unsigned long state variable */
+ TQAGetFloat getFloat; /* Method: Get a float state variable */
+ TQAGetInt getInt; /* Method: Get an unsigned long state variable */
+ TQAGetPtr getPtr; /* Method: Get an pointer state variable */
+ TQADrawPoint drawPoint; /* Method: Draw a point */
+ TQADrawLine drawLine; /* Method: Draw a line */
+ TQADrawTriGouraud drawTriGouraud; /* Method: Draw a Gouraud shaded triangle */
+ TQADrawTriTexture drawTriTexture; /* Method: Draw a texture mapped triangle */
+ TQADrawVGouraud drawVGouraud; /* Method: Draw Gouraud vertices */
+ TQADrawVTexture drawVTexture; /* Method: Draw texture vertices */
+ TQADrawBitmap drawBitmap; /* Method: Draw a bitmap */
+ TQARenderStart renderStart; /* Method: Initialize for rendering */
+ TQARenderEnd renderEnd; /* Method: Complete rendering and display */
+ TQARenderAbort renderAbort; /* Method: Abort any outstanding rendering (blocking) */
+ TQAFlush flush; /* Method: Start render of any queued commands (non-blocking) */
+ TQASync sync; /* Method: Wait for completion of all rendering (blocking) */
+ TQASubmitVerticesGouraud submitVerticesGouraud; /* Method: Submit Gouraud vertices for trimesh */
+ TQASubmitVerticesTexture submitVerticesTexture; /* Method: Submit Texture vertices for trimesh */
+ TQADrawTriMeshGouraud drawTriMeshGouraud; /* Method: Draw a Gouraud triangle mesh */
+ TQADrawTriMeshTexture drawTriMeshTexture; /* Method: Draw a Texture triangle mesh */
+ TQASetNoticeMethod setNoticeMethod; /* Method: Set a notice method */
+ TQAGetNoticeMethod getNoticeMethod; /* Method: Get a notice method */
+
+ /* new in 1.6 */
+ TQASubmitMultiTextureParams submitMultiTextureParams; /* Method: Submit secondary texture params */
+ TQAAccessDrawBuffer accessDrawBuffer;
+ TQAAccessDrawBufferEnd accessDrawBufferEnd;
+ TQAAccessZBuffer accessZBuffer;
+ TQAAccessZBufferEnd accessZBufferEnd;
+ TQAClearDrawBuffer clearDrawBuffer;
+ TQAClearZBuffer clearZBuffer;
+ TQATextureNewFromDrawContext textureFromContext;
+ TQABitmapNewFromDrawContext bitmapFromContext;
+ TQABusy busy;
+ TQASwapBuffers swapBuffers;
+};
+typedef union TQADrawMethod TQADrawMethod;
+
+enum TQADrawMethodTag {
+ kQASetFloat = 0,
+ kQASetInt = 1,
+ kQASetPtr = 2,
+ kQAGetFloat = 3,
+ kQAGetInt = 4,
+ kQAGetPtr = 5,
+ kQADrawPoint = 6,
+ kQADrawLine = 7,
+ kQADrawTriGouraud = 8,
+ kQADrawTriTexture = 9,
+ kQADrawVGouraud = 10,
+ kQADrawVTexture = 11,
+ kQADrawBitmap = 12,
+ kQARenderStart = 13,
+ kQARenderEnd = 14,
+ kQARenderAbort = 15,
+ kQAFlush = 16,
+ kQASync = 17,
+ kQASubmitVerticesGouraud = 18,
+ kQASubmitVerticesTexture = 19,
+ kQADrawTriMeshGouraud = 20,
+ kQADrawTriMeshTexture = 21,
+ kQASetNoticeMethod = 22,
+ kQAGetNoticeMethod = 23,
+ kQSubmitMultiTextureParams = 24,
+ kQAccessDrawBuffer = 25,
+ kQAccessDrawBufferEnd = 26,
+ kQAccessZBuffer = 27,
+ kQAccessZBufferEnd = 28,
+ kQClearDrawBuffer = 29,
+ kQClearZBuffer = 30,
+ kQTextureNewFromDrawContext = 31,
+ kQBitmapNewFromDrawContext = 32,
+ kQBusy = 33,
+ kQSwapBuffers = 34
+};
+typedef enum TQADrawMethodTag TQADrawMethodTag;
+
+/************************************************************************************************
+ *
+ * System call to register a new method for an engine. This is called during the engine's
+ * draw private new functions (to set the initial value of the draw methods), and possibly
+ * at other times when the engine needs to change a draw method.
+ *
+ ***********************************************************************************************/
+/* QARegisterDrawMethod parameter descriptions */
+/* TQADrawContext *drawContext Draw context in which to set method */
+/* TQADrawMethodTag methodTag Method to set */
+/* TQADrawMethod method Method */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( TQAError )
+QARegisterDrawMethod (TQADrawContext * drawContext,
+ TQADrawMethodTag methodTag,
+ TQADrawMethod method);
+
+
+
+
+
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_ENUM_ALWAYSINT
+ #pragma enumsalwaysint reset
+ #ifdef __RAVESYSTEM__RESTORE_TWOBYTEINTS
+ #pragma fourbyteints off
+ #endif
+#elif PRAGMA_ENUM_OPTIONS
+ #pragma option enum=reset
+#elif defined(__RAVESYSTEM__RESTORE_PACKED_ENUMS)
+ #pragma options(pack_enums)
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __RAVESYSTEM__ */
+
diff --git a/include/qt/ROMDefs.h b/include/qt/ROMDefs.h
new file mode 100644
index 000000000..5cc4c22d5
--- /dev/null
+++ b/include/qt/ROMDefs.h
@@ -0,0 +1,294 @@
+/*
+ File: ROMDefs.h
+
+ Contains: NuBus card ROM Definitions.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1986-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __ROMDEFS__
+#define __ROMDEFS__
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ appleFormat = 1, /*Format of Declaration Data (IEEE will assign real value)*/
+ romRevision = 1, /*Revision of Declaration Data Format*/
+ romRevRange = 9, /*Revision of Declaration Data Format [1..9]*/
+ testPattern = 1519594439L, /*FHeader long word test pattern*/
+ sCodeRev = 2, /*Revision of code (For sExec)*/
+ sExec2 = 2,
+ sCPU68000 = 1, /*CPU type = 68000*/
+ sCPU68020 = 2, /*CPU type = 68020*/
+ sCPU68030 = 3, /*CPU type = 68030*/
+ sCPU68040 = 4, /*CPU type = 68040*/
+ sMacOS68000 = 1, /*Mac OS, CPU type = 68000*/
+ sMacOS68020 = 2, /*Mac OS, CPU type = 68020*/
+ sMacOS68030 = 3, /*Mac OS, CPU type = 68030*/
+ sMacOS68040 = 4, /*Mac OS, CPU type = 68040*/
+ board = 0, /*Board sResource - Required on all boards*/
+ displayVideoAppleTFB = 16843009L, /*Video with Apple parameters for TFB card.*/
+ displayVideoAppleGM = 16843010L, /*Video with Apple parameters for GM card.*/
+ networkEtherNetApple3Com = 33620225L, /*Ethernet with apple parameters for 3-Comm card.*/
+ testSimpleAppleAny = -2147417856L, /*A simple test sResource.*/
+ endOfList = 255, /*End of list*/
+ defaultTO = 100 /*100 retries.*/
+};
+
+
+enum {
+ /* sResource flags for sRsrc_Flags */
+ fOpenAtStart = 1, /* set => open the driver at start time, else do not */
+ f32BitMode = 2 /* set => a 32-bit address will be put into dctlDevBase (IM Devices 2-54) */
+};
+
+enum {
+ sRsrcType = 1, /*Type of sResource*/
+ sRsrcName = 2, /*Name of sResource*/
+ sRsrcIcon = 3, /*Icon*/
+ sRsrcDrvrDir = 4, /*Driver directory*/
+ sRsrcLoadDir = 5, /*Load directory*/
+ sRsrcBootRec = 6, /*sBoot record*/
+ sRsrcFlags = 7, /*sResource Flags*/
+ sRsrcHWDevId = 8, /*Hardware Device Id*/
+ minorBaseOS = 10, /*Offset to base of sResource in minor space.*/
+ minorLength = 11, /*Length of sResource's address space in standard slot space.*/
+ majorBaseOS = 12, /*Offset to base of sResource in Major space.*/
+ majorLength = 13, /*Length of sResource in super slot space.*/
+ sRsrcTest = 14, /*sBlock diagnostic code*/
+ sRsrccicn = 15, /*Color icon*/
+ sRsrcicl8 = 16, /*8-bit (indexed) icon*/
+ sRsrcicl4 = 17, /*4-bit (indexed) icon*/
+ sDRVRDir = 16, /*sDriver directory*/
+ sGammaDir = 64, /*sGamma directory*/
+ sRsrcVidNames = 65, /*Video mode name directory*/
+ sRsrcDock = 80, /*spID for Docking Handlers*/
+ sDiagRec = 85, /*spID for board diagnostics*/
+ sVidAuxParams = 123, /*more video info for Display Manager -- timing information*/
+ sDebugger = 124, /*DatLstEntry for debuggers indicating video anamolies*/
+ sVidAttributes = 125, /*video attributes data field (optional,word)*/
+ fLCDScreen = 0, /* bit 0 - when set is LCD, else is CRT*/
+ fBuiltInDisplay = 1, /* 1 - when set is built-in (in the box) display, else not*/
+ fDefaultColor = 2, /* 2 - when set display prefers multi-bit color, else gray*/
+ fActiveBlack = 3, /* 3 - when set black on display must be written, else display is naturally black*/
+ fDimMinAt1 = 4, /* 4 - when set should dim backlight to level 1 instead of 0*/
+ fBuiltInDetach = 4, /* 4 - when set is built-in (in the box), but detaches*/
+ sVidParmDir = 126,
+ sBkltParmDir = 140, /*directory of backlight tables*/
+ stdBkltTblSize = 36, /*size of "standard" 0..31-entry backlight table*/
+ sSuperDir = 254
+};
+
+/* ======================================================================= */
+/* sResource types */
+/* ======================================================================= */
+enum {
+ catBoard = 0x0001, /*Category for board types.*/
+ catTest = 0x0002, /*Category for test types -- not used much.*/
+ catDisplay = 0x0003, /*Category for display (video) cards.*/
+ catNetwork = 0x0004, /*Category for Networking cards.*/
+ catScanner = 0x0008, /*scanners bring in data somehow*/
+ catCPU = 0x000A,
+ catIntBus = 0x000C,
+ catProto = 0x0011,
+ catDock = 0x0020, /*<Type>*/
+ typeBoard = 0x0000,
+ typeApple = 0x0001,
+ typeVideo = 0x0001,
+ typeEtherNet = 0x0001,
+ typeStation = 0x0001,
+ typeDesk = 0x0002,
+ typeTravel = 0x0003,
+ typeDSP = 0x0004,
+ typeXPT = 0x000B,
+ typeSIM = 0x000C,
+ typeDebugger = 0x0100,
+ type68000 = 0x0002,
+ type68020 = 0x0003,
+ type68030 = 0x0004,
+ type68040 = 0x0005,
+ type601 = 0x0025,
+ type603 = 0x002E,
+ typeAppleII = 0x0015, /*Driver Interface : <id.SW>*/
+ drSwMacCPU = 0,
+ drSwAppleIIe = 0x0001,
+ drSwApple = 1, /*To ask for or define an Apple-compatible SW device.*/
+ drSwMacsBug = 0x0104,
+ drSwDepewEngineering = 0x0101, /*Driver Interface : <id.SW><id.HW>*/
+ drHwTFB = 1, /*HW ID for the TFB (original Mac II) video card.*/
+ drHw3Com = 1, /*HW ID for the Apple EtherTalk card.*/
+ drHwBSC = 3,
+ drHwGemini = 1,
+ drHwDeskBar = 1,
+ drHwHooperDock = 2, /*Hooper's CatDock,TypeDesk,DrSwApple ID; registered with DTS.*/
+ drHwATT3210 = 0x0001,
+ drHwBootBug = 0x0100,
+ drHwMicroDock = 0x0100, /* video hardware id's - <catDisplay><typVideo>*/
+ drHwSTB3 = 0x0002, /* Assigned by Kevin Mellander for STB-3 hardware. */
+ drHwSTB = drHwSTB3, /* (Both STB-3 and STB-4 share the same video hardware.) */
+ drHwRBV = 0x0018, /* IIci Aurora25/16 hw ID */
+ drHwJMFB = 0x0019, /* 4o8/8o24 NuBus card */
+ drHwElsie = 0x001A,
+ drHwTim = 0x001B,
+ drHwDAFB = 0x001C,
+ drHwDolphin = 0x001D, /* 8o24GC NuBus card */
+ drHwGSC = 0x001E, /* (Renamed from GSC drHWDBLite) */
+ drHwDAFBPDS = 0x001F,
+ drHWVSC = 0x0020,
+ drHwApollo = 0x0021,
+ drHwSonora = 0x0022,
+ drHwReserved2 = 0x0023,
+ drHwColumbia = 0x0024,
+ drHwCivic = 0x0025,
+ drHwBrazil = 0x0026,
+ drHWPBLCD = 0x0027,
+ drHWCSC = 0x0028,
+ drHwJET = 0x0029,
+ drHWMEMCjr = 0x002A,
+ drHwBoogie = 0x002B, /* 8o24AC nuBus video card (built by Radius) */
+ drHwHPV = 0x002C, /* High performance Video (HPV) PDS card for original PowerMacs */
+ drHwPlanaria = 0x002D, /*PowerMac 6100/7100/8100 PDS AV video*/
+ drHwValkyrie = 0x002E,
+ drHwKeystone = 0x002F,
+ drHWATI = 0x0055,
+ drHwGammaFormula = 0x0056, /* Use for gType of display mgr gamma tables */
+ /* other drHW id's for built-in functions*/
+ drHwSonic = 0x0110,
+ drHwMace = 0x0114,
+ drHwDblExp = 0x0001, /* CPU board IDs - <catBoard> <typBoard> <0000> <0000>*/
+ MIIBoardId = 0x0010, /*Mac II Board ID*/
+ ciVidBoardID = 0x001F, /*Aurora25 board ID*/
+ CX16VidBoardID = 0x0020, /*Aurora16 board ID*/
+ MIIxBoardId = 0x0021, /*Mac IIx Board ID*/
+ SE30BoardID = 0x0022, /*Mac SE/30 Board ID*/
+ MIIcxBoardId = 0x0023, /*Mac IIcx Board ID*/
+ MIIfxBoardId = 0x0024, /*F19 board ID*/
+ EricksonBoardID = 0x0028,
+ ElsieBoardID = 0x0029,
+ TIMBoardID = 0x002A,
+ EclipseBoardID = 0x002B,
+ SpikeBoardID = 0x0033,
+ DBLiteBoardID = 0x0035,
+ ZydecoBrdID = 0x0036,
+ ApolloBoardID = 0x0038,
+ PDMBrdID = 0x0039,
+ VailBoardID = 0x003A,
+ WombatBrdID = 0x003B,
+ ColumbiaBrdID = 0x003C,
+ CycloneBrdID = 0x003D,
+ CompanionBrdID = 0x003E,
+ DartanianBoardID = 0x0040,
+ DartExtVidBoardID = 0x0046,
+ HookBoardID = 0x0047, /*Hook internal video board ID*/
+ EscherBoardID = 0x004A, /*Board ID for Escher (CSC)*/
+ POBoardID = 0x004D, /*Board ID for Primus/Optimus/Aladdin*/
+ TempestBrdID = 0x0050, /*Non-official Board ID for Tempest*/
+ BlackBirdBdID = 0x0058, /*Board ID for BlackBird*/
+ BBExtVidBdID = 0x0059, /*Board ID for BlackBird built-in external video*/
+ YeagerBoardID = 0x005A, /*Board ID for Yeager*/
+ BBEtherNetBdID = 0x005E, /*Board ID for BlackBird Ethernet board*/
+ TELLBoardID = 0x0065, /*Board ID for TELL (Valkyrie)*/
+ MalcolmBoardID = 0x065E, /*Board ID for Malcolm*/
+ AJBoardID = 0x065F, /*Board ID for AJ*/
+ M2BoardID = 0x0660, /*Board ID for M2*/
+ OmegaBoardID = 0x0661, /*Board ID for Omega*/
+ TNTBoardID = 0x0670, /*Board ID for TNT/Alchemy/Hipclipper CPUs (did Nano just make this up?)*/
+ HooperBoardID = 0x06CD, /*Board ID for Hooper*/
+ /* other board IDs*/
+ BoardIDDblExp = 0x002F,
+ DAFBPDSBoardID = 0x0037,
+ MonetBoardID = 0x0048,
+ SacSONIC16BoardID = 0x004E,
+ SacSONIC32BoardID = 0x004F, /* CPU board types - <CatCPU> <Typ680x0> <DrSwMacCPU>*/
+ drHWMacII = 0x0001, /*Mac II hw ID*/
+ drHwMacIIx = 0x0002, /*Mac IIx hw ID*/
+ drHWSE30 = 0x0003, /*Mac SE/30 hw ID*/
+ drHwMacIIcx = 0x0004, /*Mac IIcx hw ID*/
+ drHWMacIIfx = 0x0005, /*Mac IIfx hw ID*/
+ drHWF19 = 0x0005, /*F19 hw ID*/
+ sBlockTransferInfo = 20, /*general slot block xfer info*/
+ sMaxLockedTransferCount = 21, /*slot max. locked xfer count*/
+ boardId = 32, /*Board Id*/
+ pRAMInitData = 33, /*sPRAM init data*/
+ primaryInit = 34, /*Primary init record*/
+ timeOutConst = 35, /*Time out constant*/
+ vendorInfo = 36, /*Vendor information List. See Vendor List, below*/
+ boardFlags = 37, /*Board Flags*/
+ secondaryInit = 38, /*Secondary init record/code*/
+ /* The following Id's are associated with all CPU sResources.*/
+ MajRAMSp = 129, /*ID of Major RAM space.*/
+ MinROMSp = 130, /*ID of Minor ROM space.*/
+ vendorId = 1, /*Vendor Id*/
+ serialNum = 2, /*Serial number*/
+ revLevel = 3, /*Revision level*/
+ partNum = 4, /*Part number*/
+ date = 5 /*Last revision date of the card*/
+};
+
+enum {
+ testByte = 32, /*Test byte.*/
+ testWord = 33, /*0021*/
+ testLong = 34, /*Test Long.*/
+ testString = 35 /*Test String.*/
+};
+
+/* sResource List. Category: Display Type: Video */
+/* The following Id's are common to all Mode sResources in Display_Video */
+/* functional sResources. */
+enum {
+ mBlockTransferInfo = 5, /* slot block xfer info PER MODE */
+ mMaxLockedTransferCount = 6 /* slot max. locked xfer count PER MODE */
+};
+
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __ROMDEFS__ */
+
diff --git a/include/qt/Resources.h b/include/qt/Resources.h
new file mode 100644
index 000000000..139da7a02
--- /dev/null
+++ b/include/qt/Resources.h
@@ -0,0 +1,487 @@
+/*
+ File: Resources.h
+
+ Contains: Resource Manager Interfaces.
+
+ Version: Technology: Mac OS 8.1
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __RESOURCES__
+#define __RESOURCES__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+
+enum {
+ resSysHeap = 64, /*System or application heap?*/
+ resPurgeable = 32, /*Purgeable resource?*/
+ resLocked = 16, /*Load it in locked?*/
+ resProtected = 8, /*Protected?*/
+ resPreload = 4, /*Load in on OpenResFile?*/
+ resChanged = 2, /*Resource changed?*/
+ mapReadOnly = 128, /*Resource file read-only*/
+ mapCompact = 64, /*Compact resource file*/
+ mapChanged = 32 /*Write map out at update*/
+};
+
+enum {
+ resSysRefBit = 7, /*reference to system/local reference*/
+ resSysHeapBit = 6, /*In system/in application heap*/
+ resPurgeableBit = 5, /*Purgeable/not purgeable*/
+ resLockedBit = 4, /*Locked/not locked*/
+ resProtectedBit = 3, /*Protected/not protected*/
+ resPreloadBit = 2, /*Read in at OpenResource?*/
+ resChangedBit = 1, /*Existing resource changed since last update*/
+ mapReadOnlyBit = 7, /*is this file read-only?*/
+ mapCompactBit = 6, /*Is a compact necessary?*/
+ mapChangedBit = 5 /*Is it necessary to write map?*/
+};
+
+enum {
+ kResFileNotOpened = -1, /*ref num return as error when opening a resource file*/
+ kSystemResFile = 0 /*this is the default ref num to the system file*/
+};
+
+
+typedef CALLBACK_API( void , ResErrProcPtr )(OSErr thErr);
+/*
+ WARNING: ResErrProcPtr uses register based parameters under classic 68k
+ and cannot be written in a high-level language without
+ the help of mixed mode or assembly glue.
+*/
+typedef REGISTER_UPP_TYPE(ResErrProcPtr) ResErrUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(ResErrUPP)
+ NewResErrUPP (ResErrProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeResErrUPP (ResErrUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeResErrUPP (OSErr thErr,
+ ResErrUPP userUPP);
+
+#else
+ enum { uppResErrProcInfo = 0x00001002 }; /* register no_return_value Func(2_bytes:D0) */
+ #define NewResErrUPP(userRoutine) (ResErrUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppResErrProcInfo, GetCurrentArchitecture())
+ #define DisposeResErrUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter InvokeResErrUPP(__D0, __A0)
+ void InvokeResErrUPP(OSErr thErr, ResErrUPP userUPP) = 0x4E90;
+ #else
+ #define InvokeResErrUPP(thErr, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppResErrProcInfo, (thErr))
+ #endif
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewResErrProc(userRoutine) NewResErrUPP(userRoutine)
+#define CallResErrProc(userRoutine, thErr) InvokeResErrUPP(thErr, userRoutine)
+#if !TARGET_OS_MAC
+/* QuickTime 3.0*/
+typedef CALLBACK_API( OSErr , ResourceEndianFilterPtr )(Handle theResource, Boolean currentlyNativeEndian);
+#endif /* !TARGET_OS_MAC */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( short )
+InitResources (void) ONEWORDINLINE(0xA995);
+
+EXTERN_API( void )
+RsrcZoneInit (void) ONEWORDINLINE(0xA996);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( void )
+CloseResFile (short refNum) ONEWORDINLINE(0xA99A);
+
+EXTERN_API( OSErr )
+ResError (void) ONEWORDINLINE(0xA9AF);
+
+EXTERN_API( short )
+CurResFile (void) ONEWORDINLINE(0xA994);
+
+EXTERN_API( short )
+HomeResFile (Handle theResource) ONEWORDINLINE(0xA9A4);
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+CreateResFile (ConstStr255Param fileName) ONEWORDINLINE(0xA9B1);
+
+EXTERN_API( short )
+OpenResFile (ConstStr255Param fileName) ONEWORDINLINE(0xA997);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( void )
+UseResFile (short refNum) ONEWORDINLINE(0xA998);
+
+EXTERN_API( short )
+CountTypes (void) ONEWORDINLINE(0xA99E);
+
+EXTERN_API( short )
+Count1Types (void) ONEWORDINLINE(0xA81C);
+
+EXTERN_API( void )
+GetIndType (ResType * theType,
+ short index) ONEWORDINLINE(0xA99F);
+
+EXTERN_API( void )
+Get1IndType (ResType * theType,
+ short index) ONEWORDINLINE(0xA80F);
+
+EXTERN_API( void )
+SetResLoad (Boolean load) ONEWORDINLINE(0xA99B);
+
+EXTERN_API( short )
+CountResources (ResType theType) ONEWORDINLINE(0xA99C);
+
+EXTERN_API( short )
+Count1Resources (ResType theType) ONEWORDINLINE(0xA80D);
+
+EXTERN_API( Handle )
+GetIndResource (ResType theType,
+ short index) ONEWORDINLINE(0xA99D);
+
+EXTERN_API( Handle )
+Get1IndResource (ResType theType,
+ short index) ONEWORDINLINE(0xA80E);
+
+EXTERN_API( Handle )
+GetResource (ResType theType,
+ short theID) ONEWORDINLINE(0xA9A0);
+
+EXTERN_API( Handle )
+Get1Resource (ResType theType,
+ short theID) ONEWORDINLINE(0xA81F);
+
+EXTERN_API( Handle )
+GetNamedResource (ResType theType,
+ ConstStr255Param name) ONEWORDINLINE(0xA9A1);
+
+EXTERN_API( Handle )
+Get1NamedResource (ResType theType,
+ ConstStr255Param name) ONEWORDINLINE(0xA820);
+
+#if TARGET_OS_MAC
+ #define MacLoadResource LoadResource
+#endif
+EXTERN_API( void )
+MacLoadResource (Handle theResource) ONEWORDINLINE(0xA9A2);
+
+EXTERN_API( void )
+ReleaseResource (Handle theResource) ONEWORDINLINE(0xA9A3);
+
+EXTERN_API( void )
+DetachResource (Handle theResource) ONEWORDINLINE(0xA992);
+
+EXTERN_API( short )
+UniqueID (ResType theType) ONEWORDINLINE(0xA9C1);
+
+EXTERN_API( short )
+Unique1ID (ResType theType) ONEWORDINLINE(0xA810);
+
+EXTERN_API( short )
+GetResAttrs (Handle theResource) ONEWORDINLINE(0xA9A6);
+
+EXTERN_API( void )
+GetResInfo (Handle theResource,
+ short * theID,
+ ResType * theType,
+ Str255 name) ONEWORDINLINE(0xA9A8);
+
+EXTERN_API( void )
+SetResInfo (Handle theResource,
+ short theID,
+ ConstStr255Param name) ONEWORDINLINE(0xA9A9);
+
+EXTERN_API( void )
+AddResource (Handle theData,
+ ResType theType,
+ short theID,
+ ConstStr255Param name) ONEWORDINLINE(0xA9AB);
+
+EXTERN_API( long )
+GetResourceSizeOnDisk (Handle theResource) ONEWORDINLINE(0xA9A5);
+
+EXTERN_API( long )
+GetMaxResourceSize (Handle theResource) ONEWORDINLINE(0xA821);
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( long )
+RsrcMapEntry (Handle theResource) ONEWORDINLINE(0xA9C5);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( void )
+SetResAttrs (Handle theResource,
+ short attrs) ONEWORDINLINE(0xA9A7);
+
+EXTERN_API( void )
+ChangedResource (Handle theResource) ONEWORDINLINE(0xA9AA);
+
+EXTERN_API( void )
+RemoveResource (Handle theResource) ONEWORDINLINE(0xA9AD);
+
+EXTERN_API( void )
+UpdateResFile (short refNum) ONEWORDINLINE(0xA999);
+
+EXTERN_API( void )
+WriteResource (Handle theResource) ONEWORDINLINE(0xA9B0);
+
+EXTERN_API( void )
+SetResPurge (Boolean install) ONEWORDINLINE(0xA993);
+
+EXTERN_API( short )
+GetResFileAttrs (short refNum) ONEWORDINLINE(0xA9F6);
+
+EXTERN_API( void )
+SetResFileAttrs (short refNum,
+ short attrs) ONEWORDINLINE(0xA9F7);
+
+EXTERN_API( short )
+OpenRFPerm (ConstStr255Param fileName,
+ short vRefNum,
+ SInt8 permission) ONEWORDINLINE(0xA9C4);
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( Handle )
+RGetResource (ResType theType,
+ short theID) ONEWORDINLINE(0xA80C);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( short )
+HOpenResFile (short vRefNum,
+ long dirID,
+ ConstStr255Param fileName,
+ SInt8 permission) ONEWORDINLINE(0xA81A);
+
+EXTERN_API( void )
+HCreateResFile (short vRefNum,
+ long dirID,
+ ConstStr255Param fileName) ONEWORDINLINE(0xA81B);
+
+EXTERN_API( short )
+FSpOpenResFile (const FSSpec * spec,
+ SignedByte permission) TWOWORDINLINE(0x700D, 0xAA52);
+
+EXTERN_API( void )
+FSpCreateResFile (const FSSpec * spec,
+ OSType creator,
+ OSType fileType,
+ ScriptCode scriptTag) TWOWORDINLINE(0x700E, 0xAA52);
+
+EXTERN_API( void )
+ReadPartialResource (Handle theResource,
+ long offset,
+ void * buffer,
+ long count) TWOWORDINLINE(0x7001, 0xA822);
+
+EXTERN_API( void )
+WritePartialResource (Handle theResource,
+ long offset,
+ const void * buffer,
+ long count) TWOWORDINLINE(0x7002, 0xA822);
+
+EXTERN_API( void )
+SetResourceSize (Handle theResource,
+ long newSize) TWOWORDINLINE(0x7003, 0xA822);
+
+EXTERN_API( Handle )
+GetNextFOND (Handle fondHandle) TWOWORDINLINE(0x700A, 0xA822);
+
+
+#if !TARGET_OS_MAC
+/* QuickTime 3.0*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSErr )
+RegisterResourceEndianFilter (ResType theType,
+ ResourceEndianFilterPtr theFilterProc);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* !TARGET_OS_MAC */
+
+/* Use TempInsertROMMap to force the ROM resource map to be
+ inserted into the chain in front of the system. Note that
+ this call is only temporary - the modified resource chain
+ is only used for the next call to the resource manager.
+ See IM IV 19 for more information.
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+TempInsertROMMap (Boolean tempResLoad) FIVEWORDINLINE(0x70FF, 0x4A1F, 0x56C0, 0x31C0, 0x0B9E);
+
+/*
+ _________________________________________________________________________________________________________
+
+ o RESOURCE CHAIN LOCATION - for use with the Resource Manager chain manipulation routines under Carbon.
+ _________________________________________________________________________________________________________
+*/
+
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef SInt16 RsrcChainLocation;
+enum {
+ kRsrcChainBelowSystemMap = 0, /* Below the system's resource map*/
+ kRsrcChainBelowApplicationMap = 1, /* Below the application's resource map*/
+ kRsrcChainAboveApplicationMap = 2 /* Above the application's resource map*/
+};
+
+/*
+ If the file is already in the resource chain, it is removed and re-inserted at the specified location
+ If the file has been detached, it is added to the resource chain at the specified location
+ Returns resFNotFound if it's not currently open.
+*/
+EXTERN_API( OSErr )
+InsertResourceFile (SInt16 refNum,
+ RsrcChainLocation where);
+
+/*
+ If the file is not currently in the resource chain, this returns resNotFound
+ Otherwise, the resource file is removed from the resource chain.
+*/
+EXTERN_API( OSErr )
+DetachResourceFile (SInt16 refNum);
+
+/*
+ Returns true if the resource file is already open and known by the Resource Manager (i.e., it is
+ either in the current resource chain or it's a detached resource file.) If it's in the resource
+ chain, the inChain Boolean is set to true on exit and true is returned. If it's an open file, but
+ the file is currently detached, inChain is set to false and true is returned. If the file is open,
+ the refNum to the file is returned.
+*/
+EXTERN_API( Boolean )
+FSpResourceFileAlreadyOpen (const FSSpec * resourceFile,
+ Boolean * inChain,
+ SInt16 * refNum) TWOWORDINLINE(0x7010, 0xA822);
+
+/*
+ FSpOpenOrphanResFile should be used to open a resource file that is persistent across all contexts,
+ because using OpenResFile normally loads a map and all preloaded resources into the application
+ context. FSpOpenOrphanResFile loads everything into the system context and detaches the file
+ from the context in which it was opened. If the file is already in the resource chain and a new
+ instance is not opened, FSpOpenOrphanResFile will return a paramErr.
+ Use with care, as can and will fail if the map is very large or a lot of preload
+ resources exist.
+*/
+EXTERN_API( OSErr )
+FSpOpenOrphanResFile (const FSSpec * spec,
+ SignedByte permission,
+ SInt16 * refNum);
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( Handle )
+getnamedresource (ResType theType,
+ const char * name);
+
+EXTERN_API_C( Handle )
+get1namedresource (ResType theType,
+ const char * name);
+
+EXTERN_API_C( short )
+openrfperm (const char * fileName,
+ short vRefNum,
+ char permission);
+
+EXTERN_API_C( short )
+openresfile (const char * fileName);
+
+EXTERN_API_C( void )
+createresfile (const char * fileName);
+
+EXTERN_API_C( void )
+getresinfo (Handle theResource,
+ short * theID,
+ ResType * theType,
+ char * name);
+
+EXTERN_API_C( void )
+setresinfo (Handle theResource,
+ short theID,
+ const char * name);
+
+EXTERN_API_C( void )
+addresource (Handle theResource,
+ ResType theType,
+ short theID,
+ const char * name);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if OLDROUTINENAMES
+#define SizeResource(theResource) GetResourceSizeOnDisk(theResource)
+#define MaxSizeRsrc(theResource) GetMaxResourceSize(theResource)
+#define RmveResource(theResource) RemoveResource(theResource)
+#endif /* OLDROUTINENAMES */
+
+/*
+ These typedefs were originally created for the Copland Resource Mangager
+*/
+typedef short ResFileRefNum;
+typedef short ResID;
+typedef short ResAttributes;
+typedef short ResFileAttributes;
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __RESOURCES__ */
+
diff --git a/include/qt/Retrace.h b/include/qt/Retrace.h
new file mode 100644
index 000000000..5243f542d
--- /dev/null
+++ b/include/qt/Retrace.h
@@ -0,0 +1,164 @@
+/*
+ File: Retrace.h
+
+ Contains: Vertical Retrace Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __RETRACE__
+#define __RETRACE__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __OSUTILS__
+#include "OSUtils.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+typedef struct VBLTask VBLTask;
+typedef VBLTask * VBLTaskPtr;
+typedef CALLBACK_API( void , VBLProcPtr )(VBLTaskPtr vblTaskPtr);
+/*
+ WARNING: VBLProcPtr uses register based parameters under classic 68k
+ and cannot be written in a high-level language without
+ the help of mixed mode or assembly glue.
+*/
+typedef REGISTER_UPP_TYPE(VBLProcPtr) VBLUPP;
+
+struct VBLTask {
+ QElemPtr qLink;
+ short qType;
+ VBLUPP vblAddr;
+ short vblCount;
+ short vblPhase;
+};
+
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(VBLUPP)
+ NewVBLUPP (VBLProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeVBLUPP (VBLUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeVBLUPP (VBLTaskPtr vblTaskPtr,
+ VBLUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppVBLProcInfo = 0x00009802 }; /* register no_return_value Func(4_bytes:A0) */
+ #define NewVBLUPP(userRoutine) (VBLUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppVBLProcInfo, GetCurrentArchitecture())
+ #define DisposeVBLUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter InvokeVBLUPP(__A0, __A1)
+ void InvokeVBLUPP(VBLTaskPtr vblTaskPtr, VBLUPP userUPP) = 0x4E91;
+ #else
+ #define InvokeVBLUPP(vblTaskPtr, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppVBLProcInfo, (vblTaskPtr))
+ #endif
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewVBLProc(userRoutine) NewVBLUPP(userRoutine)
+#define CallVBLProc(userRoutine, vblTaskPtr) InvokeVBLUPP(vblTaskPtr, userRoutine)
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( QHdrPtr )
+GetVBLQHdr (void) THREEWORDINLINE(0x2EBC, 0x0000, 0x0160);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SlotVInstall(__A0, __D0)
+ #endif
+EXTERN_API( OSErr )
+SlotVInstall (QElemPtr vblBlockPtr,
+ short theSlot) ONEWORDINLINE(0xA06F);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SlotVRemove(__A0, __D0)
+ #endif
+EXTERN_API( OSErr )
+SlotVRemove (QElemPtr vblBlockPtr,
+ short theSlot) ONEWORDINLINE(0xA070);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 AttachVBL(__D0)
+ #endif
+EXTERN_API( OSErr )
+AttachVBL (short theSlot) ONEWORDINLINE(0xA071);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 DoVBLTask(__D0)
+ #endif
+EXTERN_API( OSErr )
+DoVBLTask (short theSlot) ONEWORDINLINE(0xA072);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 VInstall(__A0)
+ #endif
+EXTERN_API( OSErr )
+VInstall (QElemPtr vblTaskPtr) ONEWORDINLINE(0xA033);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 VRemove(__A0)
+ #endif
+EXTERN_API( OSErr )
+VRemove (QElemPtr vblTaskPtr) ONEWORDINLINE(0xA034);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __RETRACE__ */
+
diff --git a/include/qt/SCSI.h b/include/qt/SCSI.h
new file mode 100644
index 000000000..fabd3ab46
--- /dev/null
+++ b/include/qt/SCSI.h
@@ -0,0 +1,1148 @@
+/*
+ File: SCSI.h
+
+ Contains: SCSI Family Interfaces.
+
+ Version: Technology: SCSI 4.3
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1986-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __SCSI__
+#define __SCSI__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* SCSI Manager errors. These are generated by Inside Mac IV calls only. */
+enum {
+ scCommErr = 2, /* communications error, operation timeout */
+ scArbNBErr = 3, /* arbitration timeout waiting for not BSY */
+ scBadParmsErr = 4, /* bad parameter or TIB opcode */
+ scPhaseErr = 5, /* SCSI bus not in correct phase for attempted operation */
+ scCompareErr = 6, /* data compare error */
+ scMgrBusyErr = 7, /* SCSI Manager busy */
+ scSequenceErr = 8, /* attempted operation is out of sequence */
+ scBusTOErr = 9, /* CPU bus timeout */
+ scComplPhaseErr = 10 /* SCSI bus wasn't in Status phase */
+};
+
+/* TIB opcodes */
+enum {
+ scInc = 1,
+ scNoInc = 2,
+ scAdd = 3,
+ scMove = 4,
+ scLoop = 5,
+ scNop = 6,
+ scStop = 7,
+ scComp = 8
+};
+
+/* Signatures */
+enum {
+ sbSIGWord = 0x4552, /* signature word for Block 0 ('ER') */
+ sbMac = 1, /* system type for Mac */
+ pMapSIG = 0x504D, /* partition map signature ('PM') */
+ pdSigWord = 0x5453
+};
+
+enum {
+ oldPMSigWord = pdSigWord,
+ newPMSigWord = pMapSIG
+};
+
+/* Driver Descriptor Map */
+
+struct Block0 {
+ unsigned short sbSig; /* unique value for SCSI block 0 */
+ unsigned short sbBlkSize; /* block size of device */
+ unsigned long sbBlkCount; /* number of blocks on device */
+ unsigned short sbDevType; /* device type */
+ unsigned short sbDevId; /* device id */
+ unsigned long sbData; /* not used */
+ unsigned short sbDrvrCount; /* driver descriptor count */
+ unsigned long ddBlock; /* 1st driver's starting block */
+ unsigned short ddSize; /* size of 1st driver (512-byte blks) */
+ unsigned short ddType; /* system type (1 for Mac+) */
+ unsigned short ddPad[243]; /* ARRAY[0..242] OF INTEGER; not used */
+};
+typedef struct Block0 Block0;
+/* Driver descriptor */
+
+struct DDMap {
+ unsigned long ddBlock; /* 1st driver's starting block */
+ unsigned short ddSize; /* size of 1st driver (512-byte blks) */
+ unsigned short ddType; /* system type (1 for Mac+) */
+};
+typedef struct DDMap DDMap;
+/* Partition Map Entry */
+
+struct Partition {
+ unsigned short pmSig; /* unique value for map entry blk */
+ unsigned short pmSigPad; /* currently unused */
+ unsigned long pmMapBlkCnt; /* # of blks in partition map */
+ unsigned long pmPyPartStart; /* physical start blk of partition */
+ unsigned long pmPartBlkCnt; /* # of blks in this partition */
+ unsigned char pmPartName[32]; /* ASCII partition name */
+ unsigned char pmParType[32]; /* ASCII partition type */
+ unsigned long pmLgDataStart; /* log. # of partition's 1st data blk */
+ unsigned long pmDataCnt; /* # of blks in partition's data area */
+ unsigned long pmPartStatus; /* bit field for partition status */
+ unsigned long pmLgBootStart; /* log. blk of partition's boot code */
+ unsigned long pmBootSize; /* number of bytes in boot code */
+ unsigned long pmBootAddr; /* memory load address of boot code */
+ unsigned long pmBootAddr2; /* currently unused */
+ unsigned long pmBootEntry; /* entry point of boot code */
+ unsigned long pmBootEntry2; /* currently unused */
+ unsigned long pmBootCksum; /* checksum of boot code */
+ unsigned char pmProcessor[16]; /* ASCII for the processor type */
+ unsigned short pmPad[188]; /* ARRAY[0..187] OF INTEGER; not used */
+};
+typedef struct Partition Partition;
+/* TIB instruction */
+
+struct SCSIInstr {
+ unsigned short scOpcode;
+ long scParam1;
+ long scParam2;
+};
+typedef struct SCSIInstr SCSIInstr;
+/* SCSI Phases (used by SIMs to support the Original SCSI Manager */
+enum {
+ kDataOutPhase = 0, /* Encoded MSG, C/D, I/O bits */
+ kDataInPhase = 1,
+ kCommandPhase = 2,
+ kStatusPhase = 3,
+ kPhaseIllegal0 = 4,
+ kPhaseIllegal1 = 5,
+ kMessageOutPhase = 6,
+ kMessageInPhase = 7,
+ kBusFreePhase = 8, /* Additional Phases */
+ kArbitratePhase = 9,
+ kSelectPhase = 10,
+ kMessageInPhaseNACK = 11 /* Message In Phase with ACK hanging on the bus */
+};
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+SCSIReset (void) TWOWORDINLINE(0x4267, 0xA815);
+
+EXTERN_API( OSErr )
+SCSIGet (void) THREEWORDINLINE(0x3F3C, 0x0001, 0xA815);
+
+EXTERN_API( OSErr )
+SCSISelect (short targetID) THREEWORDINLINE(0x3F3C, 0x0002, 0xA815);
+
+EXTERN_API( OSErr )
+SCSICmd (Ptr buffer,
+ short count) THREEWORDINLINE(0x3F3C, 0x0003, 0xA815);
+
+EXTERN_API( OSErr )
+SCSIRead (Ptr tibPtr) THREEWORDINLINE(0x3F3C, 0x0005, 0xA815);
+
+EXTERN_API( OSErr )
+SCSIRBlind (Ptr tibPtr) THREEWORDINLINE(0x3F3C, 0x0008, 0xA815);
+
+EXTERN_API( OSErr )
+SCSIWrite (Ptr tibPtr) THREEWORDINLINE(0x3F3C, 0x0006, 0xA815);
+
+EXTERN_API( OSErr )
+SCSIWBlind (Ptr tibPtr) THREEWORDINLINE(0x3F3C, 0x0009, 0xA815);
+
+EXTERN_API( OSErr )
+SCSIComplete (short * stat,
+ short * message,
+ unsigned long wait) THREEWORDINLINE(0x3F3C, 0x0004, 0xA815);
+
+EXTERN_API( short )
+SCSIStat (void) THREEWORDINLINE(0x3F3C, 0x000A, 0xA815);
+
+EXTERN_API( OSErr )
+SCSISelAtn (short targetID) THREEWORDINLINE(0x3F3C, 0x000B, 0xA815);
+
+EXTERN_API( OSErr )
+SCSIMsgIn (short * message) THREEWORDINLINE(0x3F3C, 0x000C, 0xA815);
+
+EXTERN_API( OSErr )
+SCSIMsgOut (short message) THREEWORDINLINE(0x3F3C, 0x000D, 0xA815);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+enum {
+ scsiVERSION = 43
+};
+
+
+/*
+ * SCSI Callback Procedure Prototypes. Several of these are only callable
+ * from SCSI Manager 4.3 SIM and XPT contexts.
+ */
+typedef CALLBACK_API_C( void , AENCallbackProcPtr )(void );
+typedef CALLBACK_API_C( OSErr , SIMInitProcPtr )(Ptr SIMinfoPtr);
+typedef CALLBACK_API_C( void , SIMActionProcPtr )(void *scsiPB, Ptr SIMGlobals);
+typedef CALLBACK_API_C( void , SCSIProcPtr )(void );
+typedef CALLBACK_API_C( void , SCSIMakeCallbackProcPtr )(void *scsiPB);
+/* SCSIInterruptPollProcPtr is obsolete (use SCSIInterruptProcPtr) but still here for compatibility */
+typedef CALLBACK_API_C( long , SCSIInterruptPollProcPtr )(Ptr SIMGlobals);
+typedef CALLBACK_API_C( long , SCSIInterruptProcPtr )(Ptr SIMGlobals);
+typedef STACK_UPP_TYPE(AENCallbackProcPtr) AENCallbackUPP;
+typedef STACK_UPP_TYPE(SIMInitProcPtr) SIMInitUPP;
+typedef STACK_UPP_TYPE(SIMActionProcPtr) SIMActionUPP;
+typedef STACK_UPP_TYPE(SCSIProcPtr) SCSIUPP;
+typedef STACK_UPP_TYPE(SCSIMakeCallbackProcPtr) SCSIMakeCallbackUPP;
+typedef STACK_UPP_TYPE(SCSIInterruptPollProcPtr) SCSIInterruptPollUPP;
+typedef STACK_UPP_TYPE(SCSIInterruptProcPtr) SCSIInterruptUPP;
+typedef CALLBACK_API( void , SCSICallbackProcPtr )(void *scsiPB);
+typedef STACK_UPP_TYPE(SCSICallbackProcPtr) SCSICallbackUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(AENCallbackUPP)
+ NewAENCallbackUPP (AENCallbackProcPtr userRoutine);
+
+ EXTERN_API(SIMInitUPP)
+ NewSIMInitUPP (SIMInitProcPtr userRoutine);
+
+ EXTERN_API(SIMActionUPP)
+ NewSIMActionUPP (SIMActionProcPtr userRoutine);
+
+ EXTERN_API(SCSIUPP)
+ NewSCSIUPP (SCSIProcPtr userRoutine);
+
+ EXTERN_API(SCSIMakeCallbackUPP)
+ NewSCSIMakeCallbackUPP (SCSIMakeCallbackProcPtr userRoutine);
+
+ EXTERN_API(SCSIInterruptPollUPP)
+ NewSCSIInterruptPollUPP (SCSIInterruptPollProcPtr userRoutine);
+
+ EXTERN_API(SCSIInterruptUPP)
+ NewSCSIInterruptUPP (SCSIInterruptProcPtr userRoutine);
+
+ EXTERN_API(SCSICallbackUPP)
+ NewSCSICallbackUPP (SCSICallbackProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeAENCallbackUPP (AENCallbackUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeSIMInitUPP (SIMInitUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeSIMActionUPP (SIMActionUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeSCSIUPP (SCSIUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeSCSIMakeCallbackUPP (SCSIMakeCallbackUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeSCSIInterruptPollUPP (SCSIInterruptPollUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeSCSIInterruptUPP (SCSIInterruptUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeSCSICallbackUPP (SCSICallbackUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeAENCallbackUPP (AENCallbackUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeSIMInitUPP (Ptr SIMinfoPtr,
+ SIMInitUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeSIMActionUPP (void * scsiPB,
+ Ptr SIMGlobals,
+ SIMActionUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeSCSIUPP (SCSIUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeSCSIMakeCallbackUPP (void * scsiPB,
+ SCSIMakeCallbackUPP userUPP);
+
+ EXTERN_API(long)
+ InvokeSCSIInterruptPollUPP (Ptr SIMGlobals,
+ SCSIInterruptPollUPP userUPP);
+
+ EXTERN_API(long)
+ InvokeSCSIInterruptUPP (Ptr SIMGlobals,
+ SCSIInterruptUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeSCSICallbackUPP (void * scsiPB,
+ SCSICallbackUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppAENCallbackProcInfo = 0x00000001 }; /* no_return_value Func() */
+ enum { uppSIMInitProcInfo = 0x000000E1 }; /* 2_bytes Func(4_bytes) */
+ enum { uppSIMActionProcInfo = 0x000003C1 }; /* no_return_value Func(4_bytes, 4_bytes) */
+ enum { uppSCSIProcInfo = 0x00000001 }; /* no_return_value Func() */
+ enum { uppSCSIMakeCallbackProcInfo = 0x000000C1 }; /* no_return_value Func(4_bytes) */
+ enum { uppSCSIInterruptPollProcInfo = 0x000000F1 }; /* 4_bytes Func(4_bytes) */
+ enum { uppSCSIInterruptProcInfo = 0x000000F1 }; /* 4_bytes Func(4_bytes) */
+ enum { uppSCSICallbackProcInfo = 0x000000C0 }; /* pascal no_return_value Func(4_bytes) */
+ #define NewAENCallbackUPP(userRoutine) (AENCallbackUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppAENCallbackProcInfo, GetCurrentArchitecture())
+ #define NewSIMInitUPP(userRoutine) (SIMInitUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSIMInitProcInfo, GetCurrentArchitecture())
+ #define NewSIMActionUPP(userRoutine) (SIMActionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSIMActionProcInfo, GetCurrentArchitecture())
+ #define NewSCSIUPP(userRoutine) (SCSIUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSCSIProcInfo, GetCurrentArchitecture())
+ #define NewSCSIMakeCallbackUPP(userRoutine) (SCSIMakeCallbackUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSCSIMakeCallbackProcInfo, GetCurrentArchitecture())
+ #define NewSCSIInterruptPollUPP(userRoutine) (SCSIInterruptPollUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSCSIInterruptPollProcInfo, GetCurrentArchitecture())
+ #define NewSCSIInterruptUPP(userRoutine) (SCSIInterruptUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSCSIInterruptProcInfo, GetCurrentArchitecture())
+ #define NewSCSICallbackUPP(userRoutine) (SCSICallbackUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSCSICallbackProcInfo, GetCurrentArchitecture())
+ #define DisposeAENCallbackUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeSIMInitUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeSIMActionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeSCSIUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeSCSIMakeCallbackUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeSCSIInterruptPollUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeSCSIInterruptUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeSCSICallbackUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeAENCallbackUPP(userUPP) CALL_ZERO_PARAMETER_UPP((userUPP), uppAENCallbackProcInfo)
+ #define InvokeSIMInitUPP(SIMinfoPtr, userUPP) (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppSIMInitProcInfo, (SIMinfoPtr))
+ #define InvokeSIMActionUPP(scsiPB, SIMGlobals, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppSIMActionProcInfo, (scsiPB), (SIMGlobals))
+ #define InvokeSCSIUPP(userUPP) CALL_ZERO_PARAMETER_UPP((userUPP), uppSCSIProcInfo)
+ #define InvokeSCSIMakeCallbackUPP(scsiPB, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppSCSIMakeCallbackProcInfo, (scsiPB))
+ #define InvokeSCSIInterruptPollUPP(SIMGlobals, userUPP) (long)CALL_ONE_PARAMETER_UPP((userUPP), uppSCSIInterruptPollProcInfo, (SIMGlobals))
+ #define InvokeSCSIInterruptUPP(SIMGlobals, userUPP) (long)CALL_ONE_PARAMETER_UPP((userUPP), uppSCSIInterruptProcInfo, (SIMGlobals))
+ #define InvokeSCSICallbackUPP(scsiPB, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppSCSICallbackProcInfo, (scsiPB))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewAENCallbackProc(userRoutine) NewAENCallbackUPP(userRoutine)
+#define NewSIMInitProc(userRoutine) NewSIMInitUPP(userRoutine)
+#define NewSIMActionProc(userRoutine) NewSIMActionUPP(userRoutine)
+#define NewSCSIProc(userRoutine) NewSCSIUPP(userRoutine)
+#define NewSCSIMakeCallbackProc(userRoutine) NewSCSIMakeCallbackUPP(userRoutine)
+#define NewSCSIInterruptPollProc(userRoutine) NewSCSIInterruptPollUPP(userRoutine)
+#define NewSCSIInterruptProc(userRoutine) NewSCSIInterruptUPP(userRoutine)
+#define NewSCSICallbackProc(userRoutine) NewSCSICallbackUPP(userRoutine)
+#define CallAENCallbackProc(userRoutine) InvokeAENCallbackUPP(userRoutine)
+#define CallSIMInitProc(userRoutine, SIMinfoPtr) InvokeSIMInitUPP(SIMinfoPtr, userRoutine)
+#define CallSIMActionProc(userRoutine, scsiPB, SIMGlobals) InvokeSIMActionUPP(scsiPB, SIMGlobals, userRoutine)
+#define CallSCSIProc(userRoutine) InvokeSCSIUPP(userRoutine)
+#define CallSCSIMakeCallbackProc(userRoutine, scsiPB) InvokeSCSIMakeCallbackUPP(scsiPB, userRoutine)
+#define CallSCSIInterruptPollProc(userRoutine, SIMGlobals) InvokeSCSIInterruptPollUPP(SIMGlobals, userRoutine)
+#define CallSCSIInterruptProc(userRoutine, SIMGlobals) InvokeSCSIInterruptUPP(SIMGlobals, userRoutine)
+#define CallSCSICallbackProc(userRoutine, scsiPB) InvokeSCSICallbackUPP(scsiPB, userRoutine)
+/* SCSI Manager 4.3 function codes */
+enum {
+ SCSINop = 0x00, /* Execute nothing */
+ SCSIExecIO = 0x01, /* Execute the specified IO */
+ SCSIBusInquiry = 0x03, /* Get parameters for entire path of HBAs */
+ SCSIReleaseQ = 0x04, /* Release the frozen SIM queue for particular LUN */
+ SCSIAbortCommand = 0x10, /* Abort the selected Control Block */
+ SCSIResetBus = 0x11, /* Reset the SCSI bus */
+ SCSIResetDevice = 0x12, /* Reset the SCSI device */
+ SCSITerminateIO = 0x13, /* Terminate any pending IO */
+ SCSIGetVirtualIDInfo = 0x80, /* Find out which bus old ID is on */
+ SCSILoadDriver = 0x82, /* Load a driver for a device ident */
+ SCSIOldCall = 0x84, /* XPT->SIM private call for old-API */
+ SCSICreateRefNumXref = 0x85, /* Register a DeviceIdent to drvr RefNum xref */
+ SCSILookupRefNumXref = 0x86, /* Get DeviceIdent to drvr RefNum xref */
+ SCSIRemoveRefNumXref = 0x87, /* Remove a DeviceIdent to drvr RefNum xref */
+ SCSIRegisterWithNewXPT = 0x88, /* XPT has changed - SIM needs to re-register itself */
+ vendorUnique = 0xC0 /* 0xC0 thru 0xFF */
+};
+
+
+/* Allocation length defines for some of the fields */
+enum {
+ handshakeDataLength = 8, /* Handshake data length */
+ maxCDBLength = 16, /* Space for the CDB bytes/pointer */
+ vendorIDLength = 16 /* ASCII string len for Vendor ID */
+};
+
+/* Define DeviceIdent structure */
+
+struct DeviceIdent {
+ UInt8 diReserved; /* reserved */
+ UInt8 bus; /* SCSI - Bus Number */
+ UInt8 targetID; /* SCSI - Target SCSI ID */
+ UInt8 LUN; /* SCSI - LUN */
+};
+typedef struct DeviceIdent DeviceIdent;
+/* Command Descriptor Block structure */
+
+union CDB {
+ BytePtr cdbPtr; /* pointer to the CDB, or */
+ UInt8 cdbBytes[16]; /* the actual CDB to send */
+};
+typedef union CDB CDB;
+typedef CDB * CDBPtr;
+/* Scatter/gather list element (Deprecated for MacOS8) */
+
+struct SGRecord {
+ Ptr SGAddr;
+ UInt32 SGCount;
+};
+typedef struct SGRecord SGRecord;
+
+#define SCSIPBHdr \
+ struct SCSIHdr* qLink; \
+ short scsiReserved1; \
+ UInt16 scsiPBLength; \
+ UInt8 scsiFunctionCode; \
+ UInt8 scsiReserved2; \
+ volatile OSErr scsiResult; \
+ DeviceIdent scsiDevice; \
+ SCSICallbackUPP scsiCompletion; \
+ UInt32 scsiFlags; \
+ UInt8 * scsiDriverStorage; \
+ Ptr scsiXPTprivate; \
+ long scsiReserved3;
+
+
+struct SCSIHdr {
+ struct SCSIHdr * qLink; /* (internal use, must be nil on entry) */
+ short scsiReserved1; /* -> reserved for input */
+ UInt16 scsiPBLength; /* -> Length of the entire PB */
+ UInt8 scsiFunctionCode; /* -> function selector */
+ UInt8 scsiReserved2; /* <- reserved for output */
+ volatile OSErr scsiResult; /* <- Returned result */
+ DeviceIdent scsiDevice; /* -> Device Identifier (bus+target+lun)*/
+ SCSICallbackUPP scsiCompletion; /* -> Callback on completion function */
+ UInt32 scsiFlags; /* -> assorted flags */
+ BytePtr scsiDriverStorage; /* <> Ptr for driver private use */
+ Ptr scsiXPTprivate; /* private field for use in XPT */
+ long scsiReserved3; /* reserved */
+};
+typedef struct SCSIHdr SCSIHdr;
+
+struct SCSI_PB {
+ SCSIHdr * qLink; /* (internal use, must be nil on entry) */
+ short scsiReserved1; /* -> reserved for input */
+ UInt16 scsiPBLength; /* -> Length of the entire PB */
+ UInt8 scsiFunctionCode; /* -> function selector */
+ UInt8 scsiReserved2; /* <- reserved for output */
+ volatile OSErr scsiResult; /* <- Returned result */
+ DeviceIdent scsiDevice; /* -> Device Identifier (bus+target+lun)*/
+ SCSICallbackUPP scsiCompletion; /* -> Callback on completion function */
+ UInt32 scsiFlags; /* -> assorted flags */
+ BytePtr scsiDriverStorage; /* <> Ptr for driver private use */
+ Ptr scsiXPTprivate; /* private field for use in XPT */
+ long scsiReserved3; /* reserved */
+};
+typedef struct SCSI_PB SCSI_PB;
+
+struct SCSI_IO {
+ SCSIHdr * qLink; /* (internal use, must be nil on entry) */
+ short scsiReserved1; /* -> reserved for input */
+ UInt16 scsiPBLength; /* -> Length of the entire PB */
+ UInt8 scsiFunctionCode; /* -> function selector */
+ UInt8 scsiReserved2; /* <- reserved for output */
+ volatile OSErr scsiResult; /* <- Returned result */
+ DeviceIdent scsiDevice; /* -> Device Identifier (bus+target+lun)*/
+ SCSICallbackUPP scsiCompletion; /* -> Callback on completion function */
+ UInt32 scsiFlags; /* -> assorted flags */
+ BytePtr scsiDriverStorage; /* <> Ptr for driver private use */
+ Ptr scsiXPTprivate; /* private field for use in XPT */
+ long scsiReserved3; /* reserved */
+
+ UInt16 scsiResultFlags; /* <- Flags which modify the scsiResult field */
+ UInt16 scsiReserved3pt5; /* -> Reserved */
+ BytePtr scsiDataPtr; /* -> Pointer to the data buffer or the S/G list */
+ UInt32 scsiDataLength; /* -> Data transfer length */
+ BytePtr scsiSensePtr; /* -> Ptr to autosense data buffer */
+ UInt8 scsiSenseLength; /* -> size of the autosense buffer */
+ UInt8 scsiCDBLength; /* -> Number of bytes for the CDB */
+ UInt16 scsiSGListCount; /* -> num of scatter gather list entries */
+ UInt32 scsiReserved4; /* <- reserved for output */
+ UInt8 scsiSCSIstatus; /* <- Returned scsi device status */
+ SInt8 scsiSenseResidual; /* <- Autosense residual length */
+ UInt16 scsiReserved5; /* <- reserved for output */
+ long scsiDataResidual; /* <- Returned Transfer residual length */
+ CDB scsiCDB; /* -> Actual CDB or pointer to CDB */
+ long scsiTimeout; /* -> Timeout value (Time Mgr format) (CAM timeout) */
+ BytePtr scsiReserved5pt5; /* -> Reserved */
+ UInt16 scsiReserved5pt6; /* -> Reserved */
+ UInt16 scsiIOFlags; /* -> additional I/O flags */
+ UInt8 scsiTagAction; /* -> What to do for tag queuing */
+ UInt8 scsiReserved6; /* -> reserved for input */
+ UInt16 scsiReserved7; /* -> reserved for input */
+ UInt16 scsiSelectTimeout; /* -> Select timeout value */
+ UInt8 scsiDataType; /* -> Data description type (i.e. buffer, TIB, S/G) */
+ UInt8 scsiTransferType; /* -> Transfer type (i.e. Blind vs Polled) */
+ UInt32 scsiReserved8; /* -> reserved for input */
+ UInt32 scsiReserved9; /* -> reserved for input */
+ UInt16 scsiHandshake[8]; /* -> handshaking points (null term'd) */
+ UInt32 scsiReserved10; /* -> reserved for input */
+ UInt32 scsiReserved11; /* -> reserved for input */
+ struct SCSI_IO * scsiCommandLink; /* -> Ptr to the next PB in linked cmd chain */
+
+ UInt8 scsiSIMpublics[8]; /* -> reserved for input to 3rd-party SIMs */
+ UInt8 scsiAppleReserved6[8]; /* -> reserved for input */
+
+ /* XPT layer privates (for old-API emulation) */
+
+ UInt16 scsiCurrentPhase; /* <- phase upon completing old call */
+ short scsiSelector; /* -> selector specified in old calls */
+ OSErr scsiOldCallResult; /* <- result of old call */
+ UInt8 scsiSCSImessage; /* <- Returned scsi device message (for SCSIComplete)*/
+ UInt8 XPTprivateFlags; /* <> various flags */
+ UInt8 XPTextras[12]; /* */
+};
+typedef struct SCSI_IO SCSI_IO;
+
+typedef SCSI_IO SCSIExecIOPB;
+/* Bus inquiry PB */
+
+struct SCSIBusInquiryPB {
+ SCSIHdr * qLink; /* (internal use, must be nil on entry) */
+ short scsiReserved1; /* -> reserved for input */
+ UInt16 scsiPBLength; /* -> Length of the entire PB */
+ UInt8 scsiFunctionCode; /* -> function selector */
+ UInt8 scsiReserved2; /* <- reserved for output */
+ volatile OSErr scsiResult; /* <- Returned result */
+ DeviceIdent scsiDevice; /* -> Device Identifier (bus+target+lun)*/
+ SCSICallbackUPP scsiCompletion; /* -> Callback on completion function */
+ UInt32 scsiFlags; /* -> assorted flags */
+ BytePtr scsiDriverStorage; /* <> Ptr for driver private use */
+ Ptr scsiXPTprivate; /* private field for use in XPT */
+ long scsiReserved3; /* reserved */
+
+ UInt16 scsiEngineCount; /* <- Number of engines on HBA */
+ UInt16 scsiMaxTransferType; /* <- Number of transfer types for this HBA */
+
+ UInt32 scsiDataTypes; /* <- which data types are supported by this SIM */
+
+ UInt16 scsiIOpbSize; /* <- Size of SCSI_IO PB for this SIM/HBA */
+ UInt16 scsiMaxIOpbSize; /* <- Size of max SCSI_IO PB for all SIM/HBAs */
+
+ UInt32 scsiFeatureFlags; /* <- Supported features flags field */
+
+ UInt8 scsiVersionNumber; /* <- Version number for the SIM/HBA */
+ UInt8 scsiHBAInquiry; /* <- Mimic of INQ byte 7 for the HBA */
+ UInt8 scsiTargetModeFlags; /* <- Flags for target mode support */
+ UInt8 scsiScanFlags; /* <- Scan related feature flags */
+
+ UInt32 scsiSIMPrivatesPtr; /* <- Ptr to SIM private data area */
+ UInt32 scsiSIMPrivatesSize; /* <- Size of SIM private data area */
+ UInt32 scsiAsyncFlags; /* <- Event cap. for Async Callback */
+
+ UInt8 scsiHiBusID; /* <- Highest path ID in the subsystem */
+ UInt8 scsiInitiatorID; /* <- ID of the HBA on the SCSI bus */
+ UInt16 scsiBIReserved0; /* */
+
+ UInt32 scsiBIReserved1; /* <- */
+ UInt32 scsiFlagsSupported; /* <- which scsiFlags are supported */
+
+ UInt16 scsiIOFlagsSupported; /* <- which scsiIOFlags are supported */
+ UInt16 scsiWeirdStuff; /* <- */
+ UInt16 scsiMaxTarget; /* <- maximum Target number supported */
+ UInt16 scsiMaxLUN; /* <- maximum Logical Unit number supported */
+
+ char scsiSIMVendor[16]; /* <- Vendor ID of SIM (or XPT if bus<FF) */
+ char scsiHBAVendor[16]; /* <- Vendor ID of the HBA */
+ char scsiControllerFamily[16]; /* <- Family of SCSI Controller */
+ char scsiControllerType[16]; /* <- Specific Model of SCSI Controller used */
+
+ char scsiXPTversion[4]; /* <- version number of XPT */
+ char scsiSIMversion[4]; /* <- version number of SIM */
+ char scsiHBAversion[4]; /* <- version number of HBA */
+
+ UInt8 scsiHBAslotType; /* <- type of "slot" that this HBA is in */
+ UInt8 scsiHBAslotNumber; /* <- slot number of this HBA */
+ UInt16 scsiSIMsRsrcID; /* <- resource ID of this SIM */
+
+ UInt16 scsiBIReserved3; /* <- */
+ UInt16 scsiAdditionalLength; /* <- additional BusInquiry PB len */
+};
+typedef struct SCSIBusInquiryPB SCSIBusInquiryPB;
+/* Abort SIM Request PB */
+
+struct SCSIAbortCommandPB {
+ SCSIHdr * qLink; /* (internal use, must be nil on entry) */
+ short scsiReserved1; /* -> reserved for input */
+ UInt16 scsiPBLength; /* -> Length of the entire PB */
+ UInt8 scsiFunctionCode; /* -> function selector */
+ UInt8 scsiReserved2; /* <- reserved for output */
+ volatile OSErr scsiResult; /* <- Returned result */
+ DeviceIdent scsiDevice; /* -> Device Identifier (bus+target+lun)*/
+ SCSICallbackUPP scsiCompletion; /* -> Callback on completion function */
+ UInt32 scsiFlags; /* -> assorted flags */
+ BytePtr scsiDriverStorage; /* <> Ptr for driver private use */
+ Ptr scsiXPTprivate; /* private field for use in XPT */
+ long scsiReserved3; /* reserved */
+ SCSI_IO * scsiIOptr; /* Pointer to the PB to abort */
+};
+typedef struct SCSIAbortCommandPB SCSIAbortCommandPB;
+/* Terminate I/O Process Request PB */
+
+struct SCSITerminateIOPB {
+ SCSIHdr * qLink; /* (internal use, must be nil on entry) */
+ short scsiReserved1; /* -> reserved for input */
+ UInt16 scsiPBLength; /* -> Length of the entire PB */
+ UInt8 scsiFunctionCode; /* -> function selector */
+ UInt8 scsiReserved2; /* <- reserved for output */
+ volatile OSErr scsiResult; /* <- Returned result */
+ DeviceIdent scsiDevice; /* -> Device Identifier (bus+target+lun)*/
+ SCSICallbackUPP scsiCompletion; /* -> Callback on completion function */
+ UInt32 scsiFlags; /* -> assorted flags */
+ BytePtr scsiDriverStorage; /* <> Ptr for driver private use */
+ Ptr scsiXPTprivate; /* private field for use in XPT */
+ long scsiReserved3; /* reserved */
+ SCSI_IO * scsiIOptr; /* Pointer to the PB to terminate */
+};
+typedef struct SCSITerminateIOPB SCSITerminateIOPB;
+/* Reset SCSI Bus PB */
+
+struct SCSIResetBusPB {
+ SCSIHdr * qLink; /* (internal use, must be nil on entry) */
+ short scsiReserved1; /* -> reserved for input */
+ UInt16 scsiPBLength; /* -> Length of the entire PB */
+ UInt8 scsiFunctionCode; /* -> function selector */
+ UInt8 scsiReserved2; /* <- reserved for output */
+ volatile OSErr scsiResult; /* <- Returned result */
+ DeviceIdent scsiDevice; /* -> Device Identifier (bus+target+lun)*/
+ SCSICallbackUPP scsiCompletion; /* -> Callback on completion function */
+ UInt32 scsiFlags; /* -> assorted flags */
+ BytePtr scsiDriverStorage; /* <> Ptr for driver private use */
+ Ptr scsiXPTprivate; /* private field for use in XPT */
+ long scsiReserved3; /* reserved */
+};
+typedef struct SCSIResetBusPB SCSIResetBusPB;
+/* Reset SCSI Device PB */
+
+struct SCSIResetDevicePB {
+ SCSIHdr * qLink; /* (internal use, must be nil on entry) */
+ short scsiReserved1; /* -> reserved for input */
+ UInt16 scsiPBLength; /* -> Length of the entire PB */
+ UInt8 scsiFunctionCode; /* -> function selector */
+ UInt8 scsiReserved2; /* <- reserved for output */
+ volatile OSErr scsiResult; /* <- Returned result */
+ DeviceIdent scsiDevice; /* -> Device Identifier (bus+target+lun)*/
+ SCSICallbackUPP scsiCompletion; /* -> Callback on completion function */
+ UInt32 scsiFlags; /* -> assorted flags */
+ BytePtr scsiDriverStorage; /* <> Ptr for driver private use */
+ Ptr scsiXPTprivate; /* private field for use in XPT */
+ long scsiReserved3; /* reserved */
+};
+typedef struct SCSIResetDevicePB SCSIResetDevicePB;
+/* Release SIM Queue PB */
+
+struct SCSIReleaseQPB {
+ SCSIHdr * qLink; /* (internal use, must be nil on entry) */
+ short scsiReserved1; /* -> reserved for input */
+ UInt16 scsiPBLength; /* -> Length of the entire PB */
+ UInt8 scsiFunctionCode; /* -> function selector */
+ UInt8 scsiReserved2; /* <- reserved for output */
+ volatile OSErr scsiResult; /* <- Returned result */
+ DeviceIdent scsiDevice; /* -> Device Identifier (bus+target+lun)*/
+ SCSICallbackUPP scsiCompletion; /* -> Callback on completion function */
+ UInt32 scsiFlags; /* -> assorted flags */
+ BytePtr scsiDriverStorage; /* <> Ptr for driver private use */
+ Ptr scsiXPTprivate; /* private field for use in XPT */
+ long scsiReserved3; /* reserved */
+};
+typedef struct SCSIReleaseQPB SCSIReleaseQPB;
+/* SCSI Get Virtual ID Info PB */
+
+struct SCSIGetVirtualIDInfoPB {
+ SCSIHdr * qLink; /* (internal use, must be nil on entry) */
+ short scsiReserved1; /* -> reserved for input */
+ UInt16 scsiPBLength; /* -> Length of the entire PB */
+ UInt8 scsiFunctionCode; /* -> function selector */
+ UInt8 scsiReserved2; /* <- reserved for output */
+ volatile OSErr scsiResult; /* <- Returned result */
+ DeviceIdent scsiDevice; /* -> Device Identifier (bus+target+lun)*/
+ SCSICallbackUPP scsiCompletion; /* -> Callback on completion function */
+ UInt32 scsiFlags; /* -> assorted flags */
+ Ptr scsiDriverStorage; /* <> Ptr for driver private use */
+ Ptr scsiXPTprivate; /* private field for use in XPT */
+ long scsiReserved3; /* reserved */
+ UInt16 scsiOldCallID; /* -> SCSI ID of device in question */
+ Boolean scsiExists; /* <- true if device exists */
+ SInt8 filler;
+};
+typedef struct SCSIGetVirtualIDInfoPB SCSIGetVirtualIDInfoPB;
+/* Create/Lookup/Remove RefNum for Device PB */
+
+struct SCSIDriverPB {
+ SCSIHdr * qLink; /* (internal use, must be nil on entry) */
+ short scsiReserved1; /* -> reserved for input */
+ UInt16 scsiPBLength; /* -> Length of the entire PB */
+ UInt8 scsiFunctionCode; /* -> function selector */
+ UInt8 scsiReserved2; /* <- reserved for output */
+ volatile OSErr scsiResult; /* <- Returned result */
+ DeviceIdent scsiDevice; /* -> Device Identifier (bus+target+lun)*/
+ SCSICallbackUPP scsiCompletion; /* -> Callback on completion function */
+ UInt32 scsiFlags; /* -> assorted flags */
+ Ptr scsiDriverStorage; /* <> Ptr for driver private use */
+ Ptr scsiXPTprivate; /* private field for use in XPT */
+ long scsiReserved3; /* reserved */
+ short scsiDriver; /* -> DriverRefNum, For SetDriver, <- For GetNextDriver */
+ UInt16 scsiDriverFlags; /* <> Details of driver/device */
+ DeviceIdent scsiNextDevice; /* <- DeviceIdent of the NEXT Item in the list */
+};
+typedef struct SCSIDriverPB SCSIDriverPB;
+/* Load Driver PB */
+
+struct SCSILoadDriverPB {
+ SCSIHdr * qLink; /* (internal use, must be nil on entry) */
+ short scsiReserved1; /* -> reserved for input */
+ UInt16 scsiPBLength; /* -> Length of the entire PB */
+ UInt8 scsiFunctionCode; /* -> function selector */
+ UInt8 scsiReserved2; /* <- reserved for output */
+ volatile OSErr scsiResult; /* <- Returned result */
+ DeviceIdent scsiDevice; /* -> Device Identifier (bus+target+lun)*/
+ SCSICallbackUPP scsiCompletion; /* -> Callback on completion function */
+ UInt32 scsiFlags; /* -> assorted flags */
+ Ptr scsiDriverStorage; /* <> Ptr for driver private use */
+ Ptr scsiXPTprivate; /* private field for use in XPT */
+ long scsiReserved3; /* reserved */
+ short scsiLoadedRefNum; /* <- SIM returns refnum of driver */
+ Boolean scsiDiskLoadFailed; /* -> if true, indicates call after failure to load */
+ SInt8 filler;
+};
+typedef struct SCSILoadDriverPB SCSILoadDriverPB;
+
+/* Defines for the scsiTransferType field */
+enum {
+ scsiTransferBlind = 0,
+ scsiTransferPolled = 1
+};
+
+enum {
+ scsiErrorBase = -7936
+};
+
+enum {
+ scsiRequestInProgress = 1, /* 1 = PB request is in progress */
+ /* Execution failed 00-2F */
+ scsiRequestAborted = scsiErrorBase + 2, /* -7934 = PB request aborted by the host */
+ scsiUnableToAbort = scsiErrorBase + 3, /* -7933 = Unable to Abort PB request */
+ scsiNonZeroStatus = scsiErrorBase + 4, /* -7932 = PB request completed with an err */
+ scsiUnused05 = scsiErrorBase + 5, /* -7931 = */
+ scsiUnused06 = scsiErrorBase + 6, /* -7930 = */
+ scsiUnused07 = scsiErrorBase + 7, /* -7929 = */
+ scsiUnused08 = scsiErrorBase + 8, /* -7928 = */
+ scsiUnableToTerminate = scsiErrorBase + 9, /* -7927 = Unable to Terminate I/O PB req */
+ scsiSelectTimeout = scsiErrorBase + 10, /* -7926 = Target selection timeout */
+ scsiCommandTimeout = scsiErrorBase + 11, /* -7925 = Command timeout */
+ scsiIdentifyMessageRejected = scsiErrorBase + 12, /* -7924 = */
+ scsiMessageRejectReceived = scsiErrorBase + 13, /* -7923 = Message reject received */
+ scsiSCSIBusReset = scsiErrorBase + 14, /* -7922 = SCSI bus reset sent/received */
+ scsiParityError = scsiErrorBase + 15, /* -7921 = Uncorrectable parity error occured */
+ scsiAutosenseFailed = scsiErrorBase + 16, /* -7920 = Autosense: Request sense cmd fail */
+ scsiUnused11 = scsiErrorBase + 17, /* -7919 = */
+ scsiDataRunError = scsiErrorBase + 18, /* -7918 = Data overrun/underrun error */
+ scsiUnexpectedBusFree = scsiErrorBase + 19, /* -7917 = Unexpected BUS free */
+ scsiSequenceFailed = scsiErrorBase + 20, /* -7916 = Target bus phase sequence failure */
+ scsiWrongDirection = scsiErrorBase + 21, /* -7915 = Data phase was in wrong direction */
+ scsiUnused16 = scsiErrorBase + 22, /* -7914 = */
+ scsiBDRsent = scsiErrorBase + 23, /* -7913 = A SCSI BDR msg was sent to target */
+ scsiTerminated = scsiErrorBase + 24, /* -7912 = PB request terminated by the host */
+ scsiNoNexus = scsiErrorBase + 25, /* -7911 = Nexus is not established */
+ scsiCDBReceived = scsiErrorBase + 26, /* -7910 = The SCSI CDB has been received */
+ /* Couldn't begin execution 30-3F */
+ scsiTooManyBuses = scsiErrorBase + 48, /* -7888 = Register failed because we're full */
+ scsiBusy = scsiErrorBase + 49, /* -7887 = SCSI subsystem is busy */
+ scsiProvideFail = scsiErrorBase + 50, /* -7886 = Unable to provide requ. capability */
+ scsiDeviceNotThere = scsiErrorBase + 51, /* -7885 = SCSI device not installed/there */
+ scsiNoHBA = scsiErrorBase + 52, /* -7884 = No HBA detected Error */
+ scsiDeviceConflict = scsiErrorBase + 53, /* -7883 = sorry, max 1 refNum per DeviceIdent */
+ scsiNoSuchXref = scsiErrorBase + 54, /* -7882 = no such RefNum xref */
+ scsiQLinkInvalid = scsiErrorBase + 55, /* -7881 = pre-linked PBs not supported */
+ /* (The QLink field was nonzero) */
+ /* Parameter errors 40-7F */
+ scsiPBLengthError = scsiErrorBase + 64, /* -7872 = (scsiPBLength is insuf'ct/invalid */
+ scsiFunctionNotAvailable = scsiErrorBase + 65, /* -7871 = The requ. func is not available */
+ scsiRequestInvalid = scsiErrorBase + 66, /* -7870 = PB request is invalid */
+ scsiBusInvalid = scsiErrorBase + 67, /* -7869 = Bus ID supplied is invalid */
+ scsiTIDInvalid = scsiErrorBase + 68, /* -7868 = Target ID supplied is invalid */
+ scsiLUNInvalid = scsiErrorBase + 69, /* -7867 = LUN supplied is invalid */
+ scsiIDInvalid = scsiErrorBase + 70, /* -7866 = The initiator ID is invalid */
+ scsiDataTypeInvalid = scsiErrorBase + 71, /* -7865 = scsiDataType requested not supported */
+ scsiTransferTypeInvalid = scsiErrorBase + 72, /* -7864 = scsiTransferType field is too high */
+ scsiCDBLengthInvalid = scsiErrorBase + 73 /* -7863 = scsiCDBLength field is too big */
+};
+
+/* New errors for SCSI Family */
+enum {
+ scsiUnused74 = scsiErrorBase + 74, /* -7862 = */
+ scsiUnused75 = scsiErrorBase + 75, /* -7861 = */
+ scsiBadDataLength = scsiErrorBase + 76, /* -7860 = a zero data length in PB */
+ scsiPartialPrepared = scsiErrorBase + 77, /* -7859 = could not do full prepare mem for I/O*/
+ scsiInvalidMsgType = scsiErrorBase + 78, /* -7858 = Invalid message type (internal) */
+ scsiUnused79 = scsiErrorBase + 79, /* -7857 = */
+ scsiBadConnID = scsiErrorBase + 80, /* -7856 = Bad Connection ID */
+ scsiUnused81 = scsiErrorBase + 81, /* -7855 = */
+ scsiIOInProgress = scsiErrorBase + 82, /* -7854 = Can't close conn, IO in prog */
+ scsiTargetReserved = scsiErrorBase + 83, /* -7853 = Target already reserved */
+ scsiUnused84 = scsiErrorBase + 84, /* -7852 = */
+ scsiUnused85 = scsiErrorBase + 85, /* -7851 = */
+ scsiBadConnType = scsiErrorBase + 86, /* -7850 = Bad connection type */
+ scsiCannotLoadPlugin = scsiErrorBase + 87 /* -7849 = No matching service category */
+};
+
+/* +++ */
+/*
+ * scsiFamilyInternalError and scsiPluginInternalError are intended to handle consistency check failures.
+ * For example, if the family stores a record on a lookaside queue, but does not find that record
+ * it can use this error to report this failure. SCSI Manager 4.3 uses dsIOCoreErr in a few places,
+ * but this is probably not the best error. In general, internal errors should be reported as bugs.
+ *
+ * The following range of errors is provided for third-party (non-Apple) SCSI SIM and device driver vendors.
+ * In general, they would be used for error conditions that are not covered by the standardized errors.
+ * They should not normally be conveyed to normal applications, but might be used for communication between
+ * a plug-in and a vendor-provided device driver (for example, to manage RAID hot-swapping).
+ *
+ * Note: I don't know how many SCSI errors are reserved in the error code architecture. Don't assume that
+ * we'll actually get sixteen, but we should reserve at least one.
+ */
+enum {
+ scsiFamilyInternalError = scsiErrorBase + 87, /* -7849 = Internal consistency check failed */
+ scsiPluginInternalError = scsiErrorBase + 88, /* -7848 = Internal consistency check failed */
+ scsiVendorSpecificErrorBase = scsiErrorBase + 128, /* ?? = Start of third-party error range */
+ scsiVendorSpecificErrorCount = 16 /* Number of third-party errors */
+};
+
+/* --- */
+enum {
+ scsiExecutionErrors = scsiErrorBase,
+ scsiNotExecutedErrors = scsiTooManyBuses,
+ scsiParameterErrors = scsiPBLengthError
+};
+
+/* Defines for the scsiResultFlags field */
+enum {
+ scsiSIMQFrozen = 0x0001, /* The SIM queue is frozen w/this err */
+ scsiAutosenseValid = 0x0002, /* Autosense data valid for target */
+ scsiBusNotFree = 0x0004 /* At time of callback, SCSI bus is not free */
+};
+
+/* Defines for the bit numbers of the scsiFlags field in the PB header for the SCSIExecIO function */
+enum {
+ kbSCSIDisableAutosense = 29, /* Disable auto sense feature */
+ kbSCSIFlagReservedA = 28, /* */
+ kbSCSIFlagReserved0 = 27, /* */
+ kbSCSICDBLinked = 26, /* The PB contains a linked CDB */
+ kbSCSIQEnable = 25, /* Target queue actions are enabled */
+ kbSCSICDBIsPointer = 24, /* The CDB field contains a pointer */
+ kbSCSIFlagReserved1 = 23, /* */
+ kbSCSIInitiateSyncData = 22, /* Attempt Sync data xfer and SDTR */
+ kbSCSIDisableSyncData = 21, /* Disable sync, go to async */
+ kbSCSISIMQHead = 20, /* Place PB at the head of SIM Q */
+ kbSCSISIMQFreeze = 19, /* Return the SIM Q to frozen state */
+ kbSCSISIMQNoFreeze = 18, /* Disallow SIM Q freezing */
+ kbSCSIDoDisconnect = 17, /* Definitely do disconnect */
+ kbSCSIDontDisconnect = 16, /* Definitely don't disconnect */
+ kbSCSIDataReadyForDMA = 15, /* Data buffer(s) are ready for DMA */
+ kbSCSIFlagReserved3 = 14, /* */
+ kbSCSIDataPhysical = 13, /* SG/Buffer data ptrs are physical */
+ kbSCSISensePhysical = 12, /* Autosense buffer ptr is physical */
+ kbSCSIFlagReserved5 = 11, /* */
+ kbSCSIFlagReserved6 = 10, /* */
+ kbSCSIFlagReserved7 = 9, /* */
+ kbSCSIFlagReserved8 = 8, /* */
+ kbSCSIDataBufferValid = 7, /* Data buffer valid */
+ kbSCSIStatusBufferValid = 6, /* Status buffer valid */
+ kbSCSIMessageBufferValid = 5, /* Message buffer valid */
+ kbSCSIFlagReserved9 = 4 /* */
+};
+
+/* Defines for the bit masks of the scsiFlags field */
+enum {
+ scsiDirectionMask = (long)0xC0000000, /* Data direction mask */
+ scsiDirectionNone = (long)0xC0000000, /* Data direction (11: no data) */
+ scsiDirectionReserved = 0x00000000, /* Data direction (00: reserved) */
+ scsiDirectionOut = (long)0x80000000, /* Data direction (10: DATA OUT) */
+ scsiDirectionIn = 0x40000000, /* Data direction (01: DATA IN) */
+ scsiDisableAutosense = 0x20000000, /* Disable auto sense feature */
+ scsiFlagReservedA = 0x10000000, /* */
+ scsiFlagReserved0 = 0x08000000, /* */
+ scsiCDBLinked = 0x04000000, /* The PB contains a linked CDB */
+ scsiQEnable = 0x02000000, /* Target queue actions are enabled */
+ scsiCDBIsPointer = 0x01000000, /* The CDB field contains a pointer */
+ scsiFlagReserved1 = 0x00800000, /* */
+ scsiInitiateSyncData = 0x00400000, /* Attempt Sync data xfer and SDTR */
+ scsiDisableSyncData = 0x00200000, /* Disable sync, go to async */
+ scsiSIMQHead = 0x00100000, /* Place PB at the head of SIM Q */
+ scsiSIMQFreeze = 0x00080000, /* Return the SIM Q to frozen state */
+ scsiSIMQNoFreeze = 0x00040000, /* Disallow SIM Q freezing */
+ scsiDoDisconnect = 0x00020000, /* Definitely do disconnect */
+ scsiDontDisconnect = 0x00010000, /* Definitely don't disconnect */
+ scsiDataReadyForDMA = 0x00008000, /* Data buffer(s) are ready for DMA */
+ scsiFlagReserved3 = 0x00004000, /* */
+ scsiDataPhysical = 0x00002000, /* SG/Buffer data ptrs are physical */
+ scsiSensePhysical = 0x00001000, /* Autosense buffer ptr is physical */
+ scsiFlagReserved5 = 0x00000800, /* */
+ scsiFlagReserved6 = 0x00000400, /* */
+ scsiFlagReserved7 = 0x00000200, /* */
+ scsiFlagReserved8 = 0x00000100 /* */
+};
+
+/* bit masks for the scsiIOFlags field in SCSIExecIOPB */
+enum {
+ scsiNoParityCheck = 0x0002, /* disable parity checking */
+ scsiDisableSelectWAtn = 0x0004, /* disable select w/Atn */
+ scsiSavePtrOnDisconnect = 0x0008, /* do SaveDataPointer upon Disconnect msg */
+ scsiNoBucketIn = 0x0010, /* don't bit bucket in during this I/O */
+ scsiNoBucketOut = 0x0020, /* don't bit bucket out during this I/O */
+ scsiDisableWide = 0x0040, /* disable wide transfer negotiation */
+ scsiInitiateWide = 0x0080, /* initiate wide transfer negotiation */
+ scsiRenegotiateSense = 0x0100, /* renegotiate sync/wide before issuing autosense */
+ scsiDisableDiscipline = 0x0200, /* disable parameter checking on SCSIExecIO calls */
+ scsiIOFlagReserved0080 = 0x0080, /* */
+ scsiIOFlagReserved8000 = 0x8000 /* */
+};
+
+/* Defines for the Bus Inquiry PB fields. */
+/* scsiHBAInquiry field bits */
+enum {
+ scsiBusMDP = 0x80, /* Supports Modify Data Pointer message */
+ scsiBusWide32 = 0x40, /* Supports 32 bit wide SCSI */
+ scsiBusWide16 = 0x20, /* Supports 16 bit wide SCSI */
+ scsiBusSDTR = 0x10, /* Supports Sync Data Transfer Req message */
+ scsiBusLinkedCDB = 0x08, /* Supports linked CDBs */
+ scsiBusTagQ = 0x02, /* Supports tag queue message */
+ scsiBusSoftReset = 0x01 /* Supports soft reset */
+};
+
+/* Defines for the scsiDataType field */
+enum {
+ scsiDataBuffer = 0, /* single contiguous buffer supplied */
+ scsiDataTIB = 1, /* TIB supplied (ptr in scsiDataPtr) */
+ scsiDataSG = 2, /* scatter/gather list supplied */
+ scsiDataIOTable = 3 /*#(7/11/95) Prepared by Block Storage */
+};
+
+/* scsiDataTypes field bits */
+/* bits 0->15 Apple-defined, 16->30 3rd-party unique, 31 = reserved */
+enum {
+ scsiBusDataTIB = (1 << scsiDataTIB), /* TIB supplied (ptr in scsiDataPtr) */
+ scsiBusDataBuffer = (1 << scsiDataBuffer), /* single contiguous buffer supplied */
+ scsiBusDataSG = (1 << scsiDataSG), /* scatter/gather list supplied */
+ scsiBusDataIOTable = (1 << scsiDataIOTable), /* (2/6/95) Prepare Memory for IO*/
+ scsiBusDataReserved = (long)0x80000000 /* */
+};
+
+/* scsiScanFlags field bits */
+enum {
+ scsiBusScansDevices = 0x80, /* Bus scans for and maintains device list */
+ scsiBusScansOnInit = 0x40, /* Bus scans performed at power-up/reboot */
+ scsiBusLoadsROMDrivers = 0x20 /* may load ROM drivers to support targets */
+};
+
+/* scsiFeatureFlags field bits */
+enum {
+ scsiBusLVD = 0x00000400, /* HBA is Low Voltage Differential Bus */
+ scsiBusUltra3SCSI = 0x00000200, /* HBA supports Ultra3 SCSI */
+ scsiBusUltra2SCSI = 0x00000100, /* HBA supports Ultra2 SCSI */
+ scsiBusInternalExternalMask = 0x000000C0, /* bus internal/external mask */
+ scsiBusInternalExternalUnknown = 0x00000000, /* not known whether bus is inside or outside */
+ scsiBusInternalExternal = 0x000000C0, /* bus goes inside and outside the box */
+ scsiBusInternal = 0x00000080, /* bus goes inside the box */
+ scsiBusExternal = 0x00000040, /* bus goes outside the box */
+ scsiBusCacheCoherentDMA = 0x00000020, /* DMA is cache coherent */
+ scsiBusOldCallCapable = 0x00000010, /* SIM is old call capable */
+ scsiBusUltraSCSI = 0x00000008, /* HBA supports Ultra SCSI */
+ scsiBusDifferential = 0x00000004, /* Single Ended (0) or Differential (1) */
+ scsiBusFastSCSI = 0x00000002, /* HBA supports fast SCSI */
+ scsiBusDMAavailable = 0x00000001 /* DMA is available */
+};
+
+/* scsiWeirdStuff field bits */
+enum {
+ scsiOddDisconnectUnsafeRead1 = 0x0001, /* Disconnects on odd byte boundries are unsafe with DMA and/or blind reads */
+ scsiOddDisconnectUnsafeWrite1 = 0x0002, /* Disconnects on odd byte boundries are unsafe with DMA and/or blind writes */
+ scsiBusErrorsUnsafe = 0x0004, /* Non-handshaked delays or disconnects during blind transfers may cause a crash */
+ scsiRequiresHandshake = 0x0008, /* Non-handshaked delays or disconnects during blind transfers may cause data corruption */
+ scsiTargetDrivenSDTRSafe = 0x0010, /* Targets which initiate synchronous negotiations are supported */
+ scsiOddCountForPhysicalUnsafe = 0x0020, /* If using physical addrs all counts must be even, and disconnects must be on even boundries */
+ scsiAbortCmdFixed = 0x0040, /* Set if abort command is fixed to properly make callbacks */
+ scsiMeshACKTimingFixed = 0x0080 /* Set if bug allowing Mesh to release ACK prematurely is fixed */
+};
+
+/* scsiHBAslotType values */
+enum {
+ scsiMotherboardBus = 0x00, /* A built in Apple supplied bus */
+ scsiNuBus = 0x01, /* A SIM on a NuBus card */
+ scsiPDSBus = 0x03, /* " on a PDS card */
+ scsiPCIBus = 0x04, /* " on a PCI bus card */
+ scsiPCMCIABus = 0x05, /* " on a PCMCIA card */
+ scsiFireWireBridgeBus = 0x06 /* " connected through a FireWire bridge */
+};
+
+/* Defines for the scsiDriverFlags field (in SCSIDriverPB) */
+enum {
+ scsiDeviceSensitive = 0x0001, /* Only driver should access this device */
+ scsiDeviceNoOldCallAccess = 0x0002 /* no old call access to this device */
+};
+
+/* SIMInitInfo PB */
+/* directions are for SCSIRegisterBus call ( -> parm, <- result) */
+
+struct SIMInitInfo {
+ Ptr SIMstaticPtr; /* <- alloc. ptr to the SIM's static vars */
+ long staticSize; /* -> num bytes SIM needs for static vars */
+ SIMInitUPP SIMInit; /* -> pointer to the SIM init routine */
+ SIMActionUPP SIMAction; /* -> pointer to the SIM action routine */
+ SCSIInterruptUPP SIM_ISR; /* reserved */
+ SCSIInterruptUPP SIMInterruptPoll; /* -> pointer to the SIM interrupt poll routine */
+ SIMActionUPP NewOldCall; /* -> pointer to the SIM NewOldCall routine */
+ UInt16 ioPBSize; /* -> size of SCSI_IO_PBs required for this SIM */
+ Boolean oldCallCapable; /* -> true if this SIM can handle old-API calls */
+ UInt8 simInfoUnused1; /* reserved */
+ long simInternalUse; /* xx not affected or viewed by XPT */
+ SCSIUPP XPT_ISR; /* reserved */
+ SCSIUPP EnteringSIM; /* <- ptr to the EnteringSIM routine */
+ SCSIUPP ExitingSIM; /* <- ptr to the ExitingSIM routine */
+ SCSIMakeCallbackUPP MakeCallback; /* <- the XPT layer's SCSIMakeCallback routine */
+ UInt16 busID; /* <- bus number for the registered bus */
+ UInt8 simSlotNumber; /* <- Magic cookie to place in scsiHBASlotNumber (PCI) */
+ UInt8 simSRsrcID; /* <- Magic cookie to place in scsiSIMsRsrcID (PCI) */
+ Ptr simRegEntry; /* -> The SIM's RegEntryIDPtr (PCI) */
+};
+typedef struct SIMInitInfo SIMInitInfo;
+/* Glue between SCSI calls and SCSITrap format */
+enum {
+ xptSCSIAction = 0x0001,
+ xptSCSIRegisterBus = 0x0002,
+ xptSCSIDeregisterBus = 0x0003,
+ xptSCSIReregisterBus = 0x0004,
+ xptSCSIKillXPT = 0x0005, /* kills Mini-XPT after transition */
+ xptSCSIInitialize = 0x000A /* Initialize the SCSI manager */
+};
+
+/*
+ * SCSI bus status. These values are returned by the SCSI target in the status phase.
+ * They are not related to Macintosh status values (except that values other than
+ * scsiStatusGood will result in scsiResult set to scsiNonZeroStatus).
+ */
+enum {
+ scsiStatGood = 0x00, /* Good Status*/
+ scsiStatCheckCondition = 0x02, /* Check Condition*/
+ scsiStatConditionMet = 0x04, /* Condition Met*/
+ scsiStatBusy = 0x08, /* Busy*/
+ scsiStatIntermediate = 0x10, /* Intermediate*/
+ scsiStatIntermedMet = 0x14, /* Intermediate - Condition Met*/
+ scsiStatResvConflict = 0x18, /* Reservation conflict*/
+ scsiStatTerminated = 0x22, /* Command terminated*/
+ scsiStatQFull = 0x28 /* Queue full*/
+};
+
+/* SCSI messages*/
+enum {
+ kCmdCompleteMsg = 0,
+ kExtendedMsg = 1, /* 0x01*/
+ kSaveDataPointerMsg = 2, /* 0x02*/
+ kRestorePointersMsg = 3, /* 0x03*/
+ kDisconnectMsg = 4, /* 0x04*/
+ kInitiatorDetectedErrorMsg = 5, /* 0x05*/
+ kAbortMsg = 6, /* 0x06*/
+ kMsgRejectMsg = 7, /* 0x07*/
+ kNoOperationMsg = 8, /* 0x08*/
+ kMsgParityErrorMsg = 9, /* 0x09*/
+ kLinkedCmdCompleteMsg = 10, /* 0x0a*/
+ kLinkedCmdCompleteWithFlagMsg = 11, /* 0x0b*/
+ kBusDeviceResetMsg = 12, /* 0x0c*/
+ kAbortTagMsg = 13, /* 0x0d*/
+ kClearQueueMsg = 14, /* 0x0e*/
+ kInitiateRecoveryMsg = 15, /* 0x0f*/
+ kReleaseRecoveryMsg = 16, /* 0x10*/
+ kTerminateIOProcessMsg = 17, /* 0x11*/
+ kSimpleQueueTag = 0x20, /* 0x20*/
+ kHeadOfQueueTagMsg = 0x21, /* 0x21*/
+ kOrderedQueueTagMsg = 0x22, /* 0x22*/
+ kIgnoreWideResidueMsg = 0x23 /* 0x23*/
+};
+
+
+/* moveq #kSCSIx, D0; _SCSIAtomic */
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SCSIAction(__A0)
+ #endif
+EXTERN_API( OSErr )
+SCSIAction (SCSI_PB * parameterBlock) TWOWORDINLINE(0x7001, 0xA089);
+
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SCSIRegisterBus(__A0)
+ #endif
+EXTERN_API( OSErr )
+SCSIRegisterBus (SIMInitInfo * parameterBlock) TWOWORDINLINE(0x7002, 0xA089);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SCSIDeregisterBus(__A0)
+ #endif
+EXTERN_API( OSErr )
+SCSIDeregisterBus (SCSI_PB * parameterBlock) TWOWORDINLINE(0x7003, 0xA089);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SCSIReregisterBus(__A0)
+ #endif
+EXTERN_API( OSErr )
+SCSIReregisterBus (SIMInitInfo * parameterBlock) TWOWORDINLINE(0x7004, 0xA089);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SCSIKillXPT(__A0)
+ #endif
+EXTERN_API( OSErr )
+SCSIKillXPT (SIMInitInfo * parameterBlock) TWOWORDINLINE(0x7005, 0xA089);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __SCSI__ */
+
diff --git a/include/qt/SFNTLayoutTypes.h b/include/qt/SFNTLayoutTypes.h
new file mode 100644
index 000000000..fb52894fc
--- /dev/null
+++ b/include/qt/SFNTLayoutTypes.h
@@ -0,0 +1,1106 @@
+/*
+ File: SFNTLayoutTypes.h
+
+ Contains: SFNT file layout structures and constants.
+
+ Version: Technology: Mac OS 8
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __SFNTLAYOUTTYPES__
+#define __SFNTLAYOUTTYPES__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* ----------------------------------------------------------------------------------------- */
+/* CONSTANTS */
+/*
+ The following values can be used to set run feature values. Note that unless the
+ feature is defaulted differently in different fonts, the zero value for the
+ selectors represents the default value. Check the following URL site for further info:
+ "http://fonts.apple.com/Registry"
+*/
+enum {
+ kAllTypographicFeaturesType = 0,
+ kAllTypeFeaturesOnSelector = 0,
+ kAllTypeFeaturesOffSelector = 1,
+ kLigaturesType = 1,
+ kRequiredLigaturesOnSelector = 0,
+ kRequiredLigaturesOffSelector = 1,
+ kCommonLigaturesOnSelector = 2,
+ kCommonLigaturesOffSelector = 3,
+ kRareLigaturesOnSelector = 4,
+ kRareLigaturesOffSelector = 5,
+ kLogosOnSelector = 6,
+ kLogosOffSelector = 7,
+ kRebusPicturesOnSelector = 8,
+ kRebusPicturesOffSelector = 9,
+ kDiphthongLigaturesOnSelector = 10,
+ kDiphthongLigaturesOffSelector = 11,
+ kSquaredLigaturesOnSelector = 12,
+ kSquaredLigaturesOffSelector = 13,
+ kAbbrevSquaredLigaturesOnSelector = 14,
+ kAbbrevSquaredLigaturesOffSelector = 15,
+ kCursiveConnectionType = 2,
+ kUnconnectedSelector = 0,
+ kPartiallyConnectedSelector = 1,
+ kCursiveSelector = 2,
+ kLetterCaseType = 3,
+ kUpperAndLowerCaseSelector = 0,
+ kAllCapsSelector = 1,
+ kAllLowerCaseSelector = 2,
+ kSmallCapsSelector = 3,
+ kInitialCapsSelector = 4,
+ kInitialCapsAndSmallCapsSelector = 5,
+ kVerticalSubstitutionType = 4,
+ kSubstituteVerticalFormsOnSelector = 0,
+ kSubstituteVerticalFormsOffSelector = 1,
+ kLinguisticRearrangementType = 5,
+ kLinguisticRearrangementOnSelector = 0,
+ kLinguisticRearrangementOffSelector = 1,
+ kNumberSpacingType = 6,
+ kMonospacedNumbersSelector = 0,
+ kProportionalNumbersSelector = 1, /* kAppleReserved1Type = 7, */
+ kSmartSwashType = 8,
+ kWordInitialSwashesOnSelector = 0,
+ kWordInitialSwashesOffSelector = 1,
+ kWordFinalSwashesOnSelector = 2,
+ kWordFinalSwashesOffSelector = 3,
+ kLineInitialSwashesOnSelector = 4,
+ kLineInitialSwashesOffSelector = 5,
+ kLineFinalSwashesOnSelector = 6,
+ kLineFinalSwashesOffSelector = 7,
+ kNonFinalSwashesOnSelector = 8,
+ kNonFinalSwashesOffSelector = 9,
+ kDiacriticsType = 9,
+ kShowDiacriticsSelector = 0,
+ kHideDiacriticsSelector = 1,
+ kDecomposeDiacriticsSelector = 2,
+ kVerticalPositionType = 10,
+ kNormalPositionSelector = 0,
+ kSuperiorsSelector = 1,
+ kInferiorsSelector = 2,
+ kOrdinalsSelector = 3,
+ kFractionsType = 11,
+ kNoFractionsSelector = 0,
+ kVerticalFractionsSelector = 1,
+ kDiagonalFractionsSelector = 2, /* kAppleReserved2Type = 12, */
+ kOverlappingCharactersType = 13,
+ kPreventOverlapOnSelector = 0,
+ kPreventOverlapOffSelector = 1,
+ kTypographicExtrasType = 14,
+ kHyphensToEmDashOnSelector = 0,
+ kHyphensToEmDashOffSelector = 1,
+ kHyphenToEnDashOnSelector = 2,
+ kHyphenToEnDashOffSelector = 3,
+ kSlashedZeroOnSelector = 4,
+ kSlashedZeroOffSelector = 5,
+ kFormInterrobangOnSelector = 6,
+ kFormInterrobangOffSelector = 7,
+ kSmartQuotesOnSelector = 8,
+ kSmartQuotesOffSelector = 9,
+ kPeriodsToEllipsisOnSelector = 10,
+ kPeriodsToEllipsisOffSelector = 11,
+ kMathematicalExtrasType = 15,
+ kHyphenToMinusOnSelector = 0,
+ kHyphenToMinusOffSelector = 1,
+ kAsteriskToMultiplyOnSelector = 2,
+ kAsteriskToMultiplyOffSelector = 3,
+ kSlashToDivideOnSelector = 4,
+ kSlashToDivideOffSelector = 5,
+ kInequalityLigaturesOnSelector = 6,
+ kInequalityLigaturesOffSelector = 7,
+ kExponentsOnSelector = 8,
+ kExponentsOffSelector = 9,
+ kOrnamentSetsType = 16,
+ kNoOrnamentsSelector = 0,
+ kDingbatsSelector = 1,
+ kPiCharactersSelector = 2,
+ kFleuronsSelector = 3,
+ kDecorativeBordersSelector = 4,
+ kInternationalSymbolsSelector = 5,
+ kMathSymbolsSelector = 6,
+ kCharacterAlternativesType = 17,
+ kNoAlternatesSelector = 0,
+ kDesignComplexityType = 18,
+ kDesignLevel1Selector = 0,
+ kDesignLevel2Selector = 1,
+ kDesignLevel3Selector = 2,
+ kDesignLevel4Selector = 3,
+ kDesignLevel5Selector = 4,
+ kStyleOptionsType = 19,
+ kNoStyleOptionsSelector = 0,
+ kDisplayTextSelector = 1,
+ kEngravedTextSelector = 2,
+ kIlluminatedCapsSelector = 3,
+ kTitlingCapsSelector = 4,
+ kTallCapsSelector = 5,
+ kCharacterShapeType = 20,
+ kTraditionalCharactersSelector = 0,
+ kSimplifiedCharactersSelector = 1,
+ kJIS1978CharactersSelector = 2,
+ kJIS1983CharactersSelector = 3,
+ kJIS1990CharactersSelector = 4,
+ kTraditionalAltOneSelector = 5,
+ kTraditionalAltTwoSelector = 6,
+ kTraditionalAltThreeSelector = 7,
+ kTraditionalAltFourSelector = 8,
+ kTraditionalAltFiveSelector = 9,
+ kExpertCharactersSelector = 10,
+ kNumberCaseType = 21,
+ kLowerCaseNumbersSelector = 0,
+ kUpperCaseNumbersSelector = 1,
+ kTextSpacingType = 22,
+ kProportionalTextSelector = 0,
+ kMonospacedTextSelector = 1,
+ kHalfWidthTextSelector = 2,
+ kNormallySpacedTextSelector = 3,
+ kTransliterationType = 23,
+ kNoTransliterationSelector = 0,
+ kHanjaToHangulSelector = 1,
+ kHiraganaToKatakanaSelector = 2,
+ kKatakanaToHiraganaSelector = 3,
+ kKanaToRomanizationSelector = 4,
+ kRomanizationToHiraganaSelector = 5,
+ kRomanizationToKatakanaSelector = 6,
+ kHanjaToHangulAltOneSelector = 7,
+ kHanjaToHangulAltTwoSelector = 8,
+ kHanjaToHangulAltThreeSelector = 9,
+ kAnnotationType = 24,
+ kNoAnnotationSelector = 0,
+ kBoxAnnotationSelector = 1,
+ kRoundedBoxAnnotationSelector = 2,
+ kCircleAnnotationSelector = 3,
+ kInvertedCircleAnnotationSelector = 4,
+ kParenthesisAnnotationSelector = 5,
+ kPeriodAnnotationSelector = 6,
+ kRomanNumeralAnnotationSelector = 7,
+ kDiamondAnnotationSelector = 8,
+ kKanaSpacingType = 25,
+ kFullWidthKanaSelector = 0,
+ kProportionalKanaSelector = 1,
+ kIdeographicSpacingType = 26,
+ kFullWidthIdeographsSelector = 0,
+ kProportionalIdeographsSelector = 1,
+ kCJKRomanSpacingType = 103,
+ kHalfWidthCJKRomanSelector = 0,
+ kProportionalCJKRomanSelector = 1,
+ kDefaultCJKRomanSelector = 2,
+ kFullWidthCJKRomanSelector = 3,
+ kLastFeatureType = -1
+};
+
+/* --------------------------------------------------------------------------- */
+/* ---------------- Table Specific Typedefs and Constants -------------------- */
+/* --------------------------------------------------------------------------- */
+/* FORMATS FOR TABLE: lookup tables - used within various other tables */
+enum {
+ kSFNTLookupSimpleArray = 0, /* a simple array indexed by glyph code */
+ kSFNTLookupSegmentSingle = 2, /* segment mapping to single value */
+ kSFNTLookupSegmentArray = 4, /* segment mapping to lookup array */
+ kSFNTLookupSingleTable = 6, /* sorted list of glyph, value pairs */
+ kSFNTLookupTrimmedArray = 8 /* a simple trimmed array indexed by glyph code */
+};
+
+typedef UInt16 SFNTLookupTableFormat;
+typedef UInt16 SFNTLookupValue;
+typedef UInt16 SFNTLookupOffset;
+typedef UInt32 SFNTLookupKind;
+/*
+ A BinarySearchHeader defines the five standard fields needed to perform quick
+ lookups in a lookup table (note that using UInt16s, and not ItemCounts or
+ similar types, is important here, since these tables are in fonts, and the
+ documented font formats specify 16-bit quantities).
+*/
+
+struct SFNTLookupBinarySearchHeader {
+ UInt16 unitSize; /* size of a unit in bytes */
+ UInt16 nUnits; /* number of units in table */
+ UInt16 searchRange; /* (largest power of two <= nUnits) * unitSize */
+ UInt16 entrySelector; /* log2 (largest power of two <= nUnits) */
+ UInt16 rangeShift; /* (nUnits - largest power of two <= nUnits) * unitSize */
+};
+typedef struct SFNTLookupBinarySearchHeader SFNTLookupBinarySearchHeader;
+/* A format 0 lookup table maps all glyphs in the font to lookup values */
+
+struct SFNTLookupArrayHeader {
+ SFNTLookupValue lookupValues[1];
+};
+typedef struct SFNTLookupArrayHeader SFNTLookupArrayHeader;
+/* A format 8 lookup table maps some range of glyphs in the font to lookup values */
+
+struct SFNTLookupTrimmedArrayHeader {
+ UInt16 firstGlyph;
+ UInt16 count;
+ SFNTLookupValue valueArray[1];
+};
+typedef struct SFNTLookupTrimmedArrayHeader SFNTLookupTrimmedArrayHeader;
+/*
+ Format 2 and format 4 lookup tables map ranges of glyphs to either single lookup
+ values (format 2), or per-glyph lookup values (format 4). Since both formats
+ use the same kind of data, only one unified set of segment-related structures
+ is defined.
+*/
+
+struct SFNTLookupSegment {
+ UInt16 lastGlyph;
+ UInt16 firstGlyph;
+ UInt16 value[1];
+};
+typedef struct SFNTLookupSegment SFNTLookupSegment;
+
+struct SFNTLookupSegmentHeader {
+ SFNTLookupBinarySearchHeader binSearch;
+ SFNTLookupSegment segments[1];
+};
+typedef struct SFNTLookupSegmentHeader SFNTLookupSegmentHeader;
+/* A format 6 lookup table maps single glyphs to lookup values. */
+
+struct SFNTLookupSingle {
+ UInt16 glyph;
+ UInt16 value[1];
+};
+typedef struct SFNTLookupSingle SFNTLookupSingle;
+
+struct SFNTLookupSingleHeader {
+ SFNTLookupBinarySearchHeader binSearch;
+ SFNTLookupSingle entries[1];
+};
+typedef struct SFNTLookupSingleHeader SFNTLookupSingleHeader;
+/* The format-specific part of the subtable header */
+
+union SFNTLookupFormatSpecificHeader {
+ SFNTLookupArrayHeader theArray;
+ SFNTLookupSegmentHeader segment;
+ SFNTLookupSingleHeader single;
+ SFNTLookupTrimmedArrayHeader trimmedArray;
+};
+typedef union SFNTLookupFormatSpecificHeader SFNTLookupFormatSpecificHeader;
+/* The overall subtable header */
+
+struct SFNTLookupTable {
+ SFNTLookupTableFormat format; /* table format */
+ SFNTLookupFormatSpecificHeader fsHeader; /* format specific header */
+};
+typedef struct SFNTLookupTable SFNTLookupTable;
+typedef SFNTLookupTable * SFNTLookupTablePtr;
+typedef SFNTLookupTablePtr * SFNTLookupTableHandle;
+/* --------------------------------------------------------------------------- */
+/* GENERAL FORMATS FOR STATE TABLES -- prefix "ST" */
+enum {
+ kSTClassEndOfText = 0,
+ kSTClassOutOfBounds = 1,
+ kSTClassDeletedGlyph = 2,
+ kSTClassEndOfLine = 3,
+ kSTSetMark = 0x8000,
+ kSTNoAdvance = 0x4000,
+ kSTMarkEnd = 0x2000,
+ kSTLigActionMask = 0x3FFF,
+ kSTRearrVerbMask = 0x000F
+};
+
+
+typedef UInt8 STClass;
+typedef UInt8 STEntryIndex;
+
+struct STHeader {
+ UInt8 filler;
+ STClass nClasses;
+ UInt16 classTableOffset;
+ UInt16 stateArrayOffset;
+ UInt16 entryTableOffset;
+};
+typedef struct STHeader STHeader;
+
+struct STClassTable {
+ UInt16 firstGlyph;
+ UInt16 nGlyphs;
+ STClass classes[1];
+};
+typedef struct STClassTable STClassTable;
+
+struct STEntryZero {
+ UInt16 newState;
+ UInt16 flags;
+};
+typedef struct STEntryZero STEntryZero;
+
+struct STEntryOne {
+ UInt16 newState;
+ UInt16 flags;
+ UInt16 offset1;
+};
+typedef struct STEntryOne STEntryOne;
+
+struct STEntryTwo {
+ UInt16 newState;
+ UInt16 flags;
+ UInt16 offset1;
+ UInt16 offset2;
+};
+typedef struct STEntryTwo STEntryTwo;
+/* --------------------------------------------------------------------------- */
+/* FORMATS FOR TABLE: 'lcar' */
+/* CONSTANTS */
+enum {
+ kLCARTag = 0x6C636172, /* 'lcar' */
+ kLCARCurrentVersion = 0x00010000, /* current version number for 'lcar' table */
+ kLCARLinearFormat = 0,
+ kLCARCtlPointFormat = 1
+};
+
+/* TYPES */
+
+struct LcarCaretClassEntry {
+ UInt16 count;
+ UInt16 partials[1]; /* these are either FUnits or control-point numbers */
+};
+typedef struct LcarCaretClassEntry LcarCaretClassEntry;
+
+struct LcarCaretTable {
+ Fixed version;
+ UInt16 format;
+ SFNTLookupTable lookup;
+};
+typedef struct LcarCaretTable LcarCaretTable;
+typedef LcarCaretTable * LcarCaretTablePtr;
+/* --------------------------------------------------------------------------- */
+/* FORMATS FOR TABLE: 'just' */
+/* CONSTANTS */
+enum {
+ kJUSTTag = 0x6A757374, /* 'just' */
+ kJUSTCurrentVersion = 0x00010000,
+ kJUSTStandardFormat = 0,
+ kJUSTnoGlyphcode = 0xFFFF, /* used in a pcConditionalAddAction */
+ kJUSTpcDecompositionAction = 0,
+ kJUSTpcUnconditionalAddAction = 1,
+ kJUSTpcConditionalAddAction = 2,
+ kJUSTpcGlyphStretchAction = 3,
+ kJUSTpcDuctilityAction = 4,
+ kJUSTpcGlyphRepeatAddAction = 5
+};
+
+/* Justification priority levels */
+enum {
+ kJUSTKashidaPriority = 0,
+ kJUSTSpacePriority = 1,
+ kJUSTLetterPriority = 2,
+ kJUSTNullPriority = 3,
+ kJUSTPriorityCount = 4
+};
+
+/* Justification flags */
+enum {
+ kJUSTOverridePriority = 0x8000,
+ kJUSTOverrideLimits = 0x4000,
+ kJUSTOverrideUnlimited = 0x2000,
+ kJUSTUnlimited = 0x1000,
+ kJUSTPriorityMask = 0x0003
+};
+
+/* TYPES */
+
+typedef UInt16 JustPCActionType;
+typedef UInt16 JustificationFlags;
+/* A JustPCDecompositionAction defines a ligature decomposition action. */
+
+struct JustPCDecompositionAction {
+ Fixed lowerLimit;
+ Fixed upperLimit;
+ UInt16 order;
+ UInt16 count;
+ UInt16 glyphs[1];
+};
+typedef struct JustPCDecompositionAction JustPCDecompositionAction;
+/* A JUSTPCUnconditionalAddAction defines an unconditional glyph add action. */
+
+typedef UInt16 JustPCUnconditionalAddAction;
+/*
+ A JUSTPCConditionalAddAction defines a glyph substitution and add action. If the addGlyph
+ is equal to kJUSTnoGlyphcode, then no glyph will be added, and the justification for
+ the line will be redone.
+*/
+
+struct JustPCConditionalAddAction {
+ Fixed substThreshhold; /* threshhold of growth factor at which subst occurs */
+ UInt16 addGlyph;
+ UInt16 substGlyph;
+};
+typedef struct JustPCConditionalAddAction JustPCConditionalAddAction;
+/* A PCDuctilityAction defines a ductile axis along which the glyph will be varied. */
+
+struct JustPCDuctilityAction {
+ UInt32 ductilityAxis;
+ Fixed minimumLimit;
+ Fixed noStretchValue;
+ Fixed maximumLimit;
+};
+typedef struct JustPCDuctilityAction JustPCDuctilityAction;
+/*
+ A PCGlyphRepetitionAction defines a glyph which will not be stretched or otherwise
+ transformed, but rather which will be emplaced however many times are needed to fill
+ the needed gap.
+*/
+
+struct JustPCGlyphRepeatAddAction {
+ UInt16 flags;
+ UInt16 glyph;
+};
+typedef struct JustPCGlyphRepeatAddAction JustPCGlyphRepeatAddAction;
+/* PCActionSubrecords contain the actual postcompensation actions. */
+
+struct JustPCActionSubrecord {
+ UInt16 theClass; /* justification class value associated with this rec */
+ JustPCActionType theType;
+ UInt32 length;
+ UInt32 data; /* not really a UInt32; cast as ptr to appropriate action */
+};
+typedef struct JustPCActionSubrecord JustPCActionSubrecord;
+/* The set of postcompensation records is defined in a PCAction struct. */
+
+struct JustPCAction {
+ UInt32 actionCount; /* long for alignment purposes */
+ JustPCActionSubrecord actions[1];
+};
+typedef struct JustPCAction JustPCAction;
+/*
+ JustWidthDeltaEntry is the justification table entry structure. The justClass value (which is
+ actually limited to 7 bits by the state table structure) is defined as a long for PPC alignment reasons.
+*/
+
+struct JustWidthDeltaEntry {
+ UInt32 justClass;
+ Fixed beforeGrowLimit; /* ems AW can grow by at most on LT */
+ Fixed beforeShrinkLimit; /* ems AW can shrink by at most on LT */
+ Fixed afterGrowLimit; /* ems AW can grow by at most on RB */
+ Fixed afterShrinkLimit; /* ems AW can shrink by at most on RB */
+ JustificationFlags growFlags; /* flags controlling grow case */
+ JustificationFlags shrinkFlags; /* flags controlling shrink case */
+};
+typedef struct JustWidthDeltaEntry JustWidthDeltaEntry;
+
+struct JustWidthDeltaGroup {
+ UInt32 count;
+ JustWidthDeltaEntry entries[1];
+};
+typedef struct JustWidthDeltaGroup JustWidthDeltaGroup;
+/* Overall structure of a postcompensation table is defined in PostcompTable. */
+
+struct JustPostcompTable {
+ SFNTLookupTable lookupTable;
+ /* action records here */
+};
+typedef struct JustPostcompTable JustPostcompTable;
+
+struct JustDirectionTable {
+ UInt16 justClass; /* offset to state table (0=none) */
+ UInt16 widthDeltaClusters; /* offset to clusters */
+ UInt16 postcomp; /* offset to postcomp table (0=none) */
+ SFNTLookupTable lookup;
+};
+typedef struct JustDirectionTable JustDirectionTable;
+
+struct JustTable {
+ Fixed version;
+ UInt16 format;
+ UInt16 horizHeaderOffset;
+ UInt16 vertHeaderOffset;
+};
+typedef struct JustTable JustTable;
+/* --------------------------------------------------------------------------- */
+/* FORMATS FOR TABLE: 'opbd' */
+/* CONSTANTS */
+enum {
+ kOPBDTag = 0x6F706264, /* 'opbd' */
+ kOPBDCurrentVersion = 0x00010000,
+ kOPBDDistanceFormat = 0,
+ kOPBDControlPointFormat = 1
+};
+
+/* TYPES */
+
+typedef UInt16 OpbdTableFormat;
+/*
+ The OpbdSideValues struct is the lookup result from the FindSingle call for the
+ optical tables. It contains the 4 FUnit values that are relevant to the specified
+ glyph, or the 4 control gxPoint values.
+*/
+
+struct OpbdSideValues {
+ SInt16 leftSideShift;
+ SInt16 topSideShift;
+ SInt16 rightSideShift;
+ SInt16 bottomSideShift;
+};
+typedef struct OpbdSideValues OpbdSideValues;
+
+struct OpbdTable {
+ Fixed version;
+ OpbdTableFormat format;
+ SFNTLookupTable lookupTable;
+};
+typedef struct OpbdTable OpbdTable;
+/* --------------------------------------------------------------------------- */
+/* FORMATS FOR TABLE: 'mort' */
+/* CONSTANTS */
+enum {
+ kMORTTag = 0x6D6F7274, /* 'mort' */
+ kMORTCurrentVersion = 0x00010000, /* current version number for 'mort' table */
+ /* Coverage masks */
+ kMORTCoverVertical = 0x8000,
+ kMORTCoverDescending = 0x4000,
+ kMORTCoverIgnoreVertical = 0x2000,
+ kMORTCoverTypeMask = 0x000F, /* Subtable types */
+ kMORTRearrangementType = 0,
+ kMORTContextualType = 1,
+ kMORTLigatureType = 2,
+ kMORTSwashType = 4,
+ kMORTInsertionType = 5, /* Ligature subtable constants */
+ kMORTLigLastAction = (long)0x80000000,
+ kMORTLigStoreLigature = 0x40000000,
+ kMORTLigFormOffsetMask = 0x3FFFFFFF,
+ kMORTLigFormOffsetShift = 2, /* Rearrangement subtable actions */
+ kMORTraNoAction = 0, /* no action */
+ kMORTraxA = 1, /* Ax => xA */
+ kMORTraDx = 2, /* xD => Dx */
+ kMORTraDxA = 3, /* AxD => DxA */
+ kMORTraxAB = 4, /* ABx => xAB */
+ kMORTraxBA = 5, /* ABx => xBA */
+ kMORTraCDx = 6, /* xCD => CDx */
+ kMORTraDCx = 7, /* xCD => DCx */
+ kMORTraCDxA = 8, /* AxCD => CDxA */
+ kMORTraDCxA = 9, /* AxCD => DCxA */
+ kMORTraDxAB = 10, /* ABxD => DxAB */
+ kMORTraDxBA = 11, /* ABxD => DxBA */
+ kMORTraCDxAB = 12, /* ABxCD => CDxAB */
+ kMORTraCDxBA = 13, /* ABxCD => CDxBA */
+ kMORTraDCxAB = 14, /* ABxCD => DCxAB */
+ kMORTraDCxBA = 15, /* ABxCD => DCxBA */
+ /* Insertion subtable constants */
+ kMORTDoInsertionsBefore = 0x80,
+ kMORTIsSplitVowelPiece = 0x40,
+ kMORTInsertionsCountMask = 0x3F,
+ kMORTCurrInsertKashidaLike = 0x2000,
+ kMORTMarkInsertKashidaLike = 0x1000,
+ kMORTCurrInsertBefore = 0x0800,
+ kMORTMarkInsertBefore = 0x0400,
+ kMORTMarkJustTableCountMask = 0x3F80,
+ kMORTMarkJustTableCountShift = 7, /* JustTableIndex for marked character */
+ kMORTCurrJustTableCountMask = 0x007F,
+ kMORTCurrJustTableCountShift = 0, /* JustTableIndex for current character */
+ kMORTCurrInsertCountMask = 0x03E0,
+ kMORTCurrInsertCountShift = 5, /* count to insert after current glyphRec */
+ kMORTMarkInsertCountMask = 0x001F,
+ kMORTMarkInsertCountShift = 0 /* count to insert after marked glyphRec */
+};
+
+/* TYPES */
+
+typedef UInt32 MortSubtableMaskFlags;
+typedef UInt32 MortLigatureActionEntry;
+
+struct MortRearrangementSubtable {
+ STHeader header;
+};
+typedef struct MortRearrangementSubtable MortRearrangementSubtable;
+
+struct MortContextualSubtable {
+ STHeader header;
+ UInt16 substitutionTableOffset;
+};
+typedef struct MortContextualSubtable MortContextualSubtable;
+
+struct MortLigatureSubtable {
+ STHeader header;
+ UInt16 ligatureActionTableOffset;
+ UInt16 componentTableOffset;
+ UInt16 ligatureTableOffset;
+};
+typedef struct MortLigatureSubtable MortLigatureSubtable;
+
+struct MortSwashSubtable {
+ SFNTLookupTable lookup;
+};
+typedef struct MortSwashSubtable MortSwashSubtable;
+
+struct MortInsertionSubtable {
+ STHeader header;
+};
+typedef struct MortInsertionSubtable MortInsertionSubtable;
+
+union MortSpecificSubtable {
+ MortRearrangementSubtable rearrangement;
+ MortContextualSubtable contextual;
+ MortLigatureSubtable ligature;
+ MortSwashSubtable swash;
+ MortInsertionSubtable insertion;
+};
+typedef union MortSpecificSubtable MortSpecificSubtable;
+
+struct MortSubtable {
+ UInt16 length;
+ UInt16 coverage;
+ MortSubtableMaskFlags flags;
+ MortSpecificSubtable u;
+};
+typedef struct MortSubtable MortSubtable;
+
+struct MortFeatureEntry {
+ UInt16 featureType;
+ UInt16 featureSelector;
+ MortSubtableMaskFlags enableFlags;
+ MortSubtableMaskFlags disableFlags;
+};
+typedef struct MortFeatureEntry MortFeatureEntry;
+
+struct MortChain {
+ MortSubtableMaskFlags defaultFlags; /* default flags for this chain */
+ UInt32 length; /* byte length of this chain */
+ UInt16 nFeatures; /* number of feature entries */
+ UInt16 nSubtables; /* number of subtables */
+ MortFeatureEntry featureEntries[1];
+ /* the subtables follow */
+};
+typedef struct MortChain MortChain;
+
+struct MortTable {
+ Fixed version;
+ UInt32 nChains;
+ MortChain chains[1];
+};
+typedef struct MortTable MortTable;
+/* --------------------------------------------------------------------------- */
+/* FORMATS FOR TABLE: 'prop' */
+/* CONSTANTS */
+enum {
+ kPROPTag = 0x70726F70, /* 'prop' */
+ kPROPCurrentVersion = 0x00020000, /* current version number for 'prop' table */
+ kPROPPairOffsetShift = 8,
+ kPROPPairOffsetSign = 7,
+ kPROPIsFloaterMask = 0x8000, /* glyph is floater */
+ kPROPCanHangLTMask = 0x4000, /* glyph can hang left/top */
+ kPROPCanHangRBMask = 0x2000, /* glyph can hang right/bottom */
+ kPROPUseRLPairMask = 0x1000, /* if glyph lands in RL streak, use paired glyph */
+ kPROPPairOffsetMask = 0x0F00, /* 4-bit signed offset to other pair member */
+ kPROPRightConnectMask = 0x0080, /* glyph connects to glyph on right */
+ kPROPZeroReserved = 0x0060, /* must be zero */
+ kPROPDirectionMask = 0x001F /* direction bits */
+};
+
+/* These are the Unicode direction classes (plus the Special European Number class). */
+enum {
+ kPROPLDirectionClass = 0, /* Left-to-Right */
+ kPROPRDirectionClass = 1, /* Right-to-Left */
+ kPROPALDirectionClass = 2, /* Right-to-Left Arabic Letter */
+ kPROPENDirectionClass = 3, /* European Number */
+ kPROPESDirectionClass = 4, /* European Number Seperator */
+ kPROPETDirectionClass = 5, /* European Number Terminator */
+ kPROPANDirectionClass = 6, /* Arabic Number */
+ kPROPCSDirectionClass = 7, /* Common Number Seperator */
+ kPROPPSDirectionClass = 8, /* Paragraph Seperator (also referred to as Block Separator) */
+ kPROPSDirectionClass = 9, /* Segment Seperator */
+ kPROPWSDirectionClass = 10, /* Whitespace */
+ kPROPONDirectionClass = 11, /* Other Neutral */
+ kPROPSENDirectionClass = 12, /* Special European Number (not a Unicode class) */
+ kPROPLREDirectionClass = 13, /* Left-to-Right Embeding */
+ kPROPLRODirectionClass = 14, /* Left-to-Right Override */
+ kPROPRLEDirectionClass = 15, /* Right-to-Left Embeding */
+ kPROPRLODirectionClass = 16, /* Right-to-Left Override */
+ kPROPPDFDirectionClass = 17, /* Pop Directional Format */
+ kPROPNSMDirectionClass = 18, /* Non-Spacing Mark */
+ kPROPBNDirectionClass = 19, /* Boundary Neutral */
+ kPROPNumDirectionClasses = 20 /* Number of Unicode directional types + Special European Number */
+};
+
+/* TYPES */
+
+typedef UInt16 PropCharProperties;
+
+struct PropTable {
+ Fixed version;
+ UInt16 format;
+ PropCharProperties defaultProps;
+ SFNTLookupTable lookup;
+};
+typedef struct PropTable PropTable;
+
+struct PropLookupSegment {
+ UInt16 lastGlyph;
+ UInt16 firstGlyph;
+ UInt16 value;
+};
+typedef struct PropLookupSegment PropLookupSegment;
+
+struct PropLookupSingle {
+ UInt16 glyph;
+ PropCharProperties props;
+};
+typedef struct PropLookupSingle PropLookupSingle;
+/* --------------------------------------------------------------------------- */
+/* FORMATS FOR TABLE: 'trak' */
+/* CONSTANTS */
+enum {
+ kTRAKTag = 0x7472616B, /* 'trak' */
+ kTRAKCurrentVersion = 0x00010000, /* current version number for 'trak' table */
+ kTRAKUniformFormat = 0 /* kTRAKPerGlyphFormat = 2*/
+};
+
+/* TYPES */
+
+typedef SInt16 TrakValue;
+
+struct TrakTableEntry {
+ Fixed track;
+ UInt16 nameTableIndex;
+ UInt16 sizesOffset; /* offset to array of TrackingValues */
+};
+typedef struct TrakTableEntry TrakTableEntry;
+
+struct TrakTableData {
+ UInt16 nTracks;
+ UInt16 nSizes;
+ UInt32 sizeTableOffset;
+ TrakTableEntry trakTable[1];
+};
+typedef struct TrakTableData TrakTableData;
+
+struct TrakTable {
+ Fixed version;
+ UInt16 format;
+ UInt16 horizOffset;
+ UInt16 vertOffset;
+};
+typedef struct TrakTable TrakTable;
+/* --------------------------------------------------------------------------- */
+/* FORMATS FOR TABLE: 'kern' */
+/* CONSTANTS */
+enum {
+ kKERNTag = 0x6B65726E, /* 'kern' */
+ kKERNCurrentVersion = 0x00010000,
+ kKERNVertical = 0x8000, /* set if this table has vertical kerning information */
+ kKERNResetCrossStream = 0x8000, /* this value in a cross-stream table means reset to zero */
+ kKERNCrossStream = 0x4000, /* set if this table contains cross-stream kerning values */
+ kKERNVariation = 0x2000, /* set if this table contains variation kerning values */
+ kKERNUnusedBits = 0x1F00, /* UNUSED, MUST BE ZERO */
+ kKERNFormatMask = 0x00FF /* format of this subtable */
+};
+
+enum {
+ kKERNOrderedList = 0, /* ordered list of kerning pairs */
+ kKERNStateTable = 1, /* state table for n-way contextual kerning */
+ kKERNSimpleArray = 2, /* simple n X m array of kerning values */
+ kKERNIndexArray = 3 /* modifed version of SimpleArray */
+};
+
+/* Message Type Flags */
+enum {
+ kKERNLineStart = 0x00000001, /* Array of glyphs starts a line */
+ kKERNLineEndKerning = 0x00000002, /* Array of glyphs ends a line */
+ kKERNNoCrossKerning = 0x00000004, /* Prohibit cross kerning */
+ kKERNNotesRequested = 0x00000008, /* Caller wants kerning notes */
+ kKERNNoStakeNote = 1, /* Indicates a glyph was involved in a kerning pair/group */
+ kKERNCrossStreamResetNote = 2, /* Indicates a return-to-baseline in cross-stream kerning */
+ kKERNNotApplied = 0x00000001 /* All kerning values were zero, kerning call had no effect */
+};
+
+/* TYPES */
+
+typedef UInt8 KernTableFormat;
+typedef UInt16 KernSubtableInfo;
+typedef SInt16 KernKerningValue;
+typedef UInt16 KernArrayOffset;
+/* header for version 0 kerning table */
+
+struct KernVersion0Header {
+ UInt16 version; /* font version number (will be 0!) */
+ UInt16 nTables; /* number of subtables present */
+ UInt16 firstSubtable[1]; /* first subtable starts here */
+};
+typedef struct KernVersion0Header KernVersion0Header;
+/* Header for a kerning table */
+
+struct KernTableHeader {
+ Fixed version; /* font version number (currently 1.0) */
+ SInt32 nTables; /* number of subtables present */
+ UInt16 firstSubtable[1]; /* first subtable starts here */
+};
+typedef struct KernTableHeader KernTableHeader;
+typedef KernTableHeader * KernTableHeaderPtr;
+typedef KernTableHeaderPtr * KernTableHeaderHandle;
+/*
+ F O R M A T S P E C I F I C D E F I N I T I O N S
+
+ kernOrderedList:
+
+ The table is a sorted list of [left glyph, right glyph, value] triples.
+ There's enough information in the header so that the list can be
+ efficiently binary searched.
+*/
+/* defines a single kerning pair of Glyphcodes */
+
+struct KernKerningPair {
+ UInt16 left;
+ UInt16 right;
+};
+typedef struct KernKerningPair KernKerningPair;
+/* a single list entry */
+
+struct KernOrderedListEntry {
+ KernKerningPair pair; /* the kerning pair */
+ KernKerningValue value; /* the kerning value for the above pair */
+};
+typedef struct KernOrderedListEntry KernOrderedListEntry;
+typedef KernOrderedListEntry * KernOrderedListEntryPtr;
+/* the header information for binary searching the list */
+
+struct KernOrderedListHeader {
+ UInt16 nPairs; /* number of kerning pairs in table */
+ UInt16 searchRange; /* (largest power of two <= nPairs) * entry size */
+ UInt16 entrySelector; /* log2 (largest power of two <= nPairs) */
+ UInt16 rangeShift; /* (nPairs - largest power of two <= nPairs) * entry size */
+ UInt16 table[1]; /* entries are first glyph, second glyph, and value */
+};
+typedef struct KernOrderedListHeader KernOrderedListHeader;
+/* KernStateTable: like the the generic state tables */
+
+struct KernStateHeader {
+ STHeader header; /* state table header */
+ UInt16 valueTable; /* offset to kerning value table */
+ UInt8 firstTable[1]; /* first table starts here */
+};
+typedef struct KernStateHeader KernStateHeader;
+
+struct KernStateEntry {
+ UInt16 newState;
+ UInt16 flags; /* flags per above enum */
+};
+typedef struct KernStateEntry KernStateEntry;
+/*
+ Kern offset table header.
+ The offset table is a trimmed array from firstGlyph to limitGlyph.
+ Glyphs outside of this range should get zero for right-hand glyphs
+ and the offset of the beginning of the kerning array for left-hand glyphs.
+*/
+
+struct KernOffsetTable {
+ UInt16 firstGlyph; /* first glyph in class range */
+ UInt16 nGlyphs; /* number of glyphs in class range */
+ KernArrayOffset offsetTable[1]; /* offset table starts here */
+};
+typedef struct KernOffsetTable KernOffsetTable;
+typedef KernOffsetTable * KernOffsetTablePtr;
+/* Header information for accessing offset tables and kerning array */
+/*
+ KernSimpleArray:
+
+ The array is an nXm array of kenring values. Each row in the array
+ represents one left-hand glyph, and each column one right-hand glyph.
+ The zeroth row and column always represent glyphs that are out of bounds
+ and will always contain zero.
+
+ A pair is looked up by indexing the left-hand glyph through the left
+ offset table, the right-hand glyph through the right offset table,
+ adding both offsets to the starting address of the kerning array,
+ and fetching the kerning value pointed to.
+*/
+/* Kern offset table header. */
+/* The offset table is a trimmed array from firstGlyph to limitGlyph. */
+/* Glyphs outside of this range should get zero for right-hand glyphs */
+/* and the offset of the beginning of the kerning array for left- */
+/* hand glyphs. */
+
+struct KernSimpleArrayHeader {
+ UInt16 rowWidth; /* width, in bytes, of a row in the table */
+ UInt16 leftOffsetTable; /* offset to left-hand offset table */
+ UInt16 rightOffsetTable; /* offset to right-hand offset table */
+ KernArrayOffset theArray; /* offset to start of kerning array */
+ UInt16 firstTable[1]; /* first offset table starts here... */
+};
+typedef struct KernSimpleArrayHeader KernSimpleArrayHeader;
+/* Index Array */
+
+struct KernIndexArrayHeader {
+ UInt16 glyphCount;
+ UInt8 kernValueCount;
+ UInt8 leftClassCount;
+ UInt8 rightClassCount;
+ UInt8 flags; /* set to 0 for now */
+ SInt16 kernValue[1]; /* actual kerning values reference by index in kernIndex */
+ UInt8 leftClass[1]; /* maps left glyph to offset into kern index */
+ UInt8 rightClass[1]; /* maps right glyph to offset into kern index */
+ UInt8 kernIndex[1]; /* contains indicies into kernValue */
+};
+typedef struct KernIndexArrayHeader KernIndexArrayHeader;
+/* format specific part of subtable header */
+
+union KernFormatSpecificHeader {
+ KernOrderedListHeader orderedList;
+ KernStateHeader stateTable;
+ KernSimpleArrayHeader simpleArray;
+ KernIndexArrayHeader indexArray;
+};
+typedef union KernFormatSpecificHeader KernFormatSpecificHeader;
+/* version 0 subtable header */
+
+struct KernVersion0SubtableHeader {
+ UInt16 version; /* kerning table version number */
+ UInt16 length; /* length in bytes (including this header) */
+ KernSubtableInfo stInfo; /* sub-table info */
+ KernFormatSpecificHeader fsHeader; /* format specific sub-header */
+};
+typedef struct KernVersion0SubtableHeader KernVersion0SubtableHeader;
+/* Overall Subtable header format */
+
+struct KernSubtableHeader {
+ SInt32 length; /* length in bytes (including this header) */
+ KernSubtableInfo stInfo; /* subtable info */
+ SInt16 tupleIndex; /* tuple index for variation subtables */
+ KernFormatSpecificHeader fsHeader; /* format specific sub-header */
+};
+typedef struct KernSubtableHeader KernSubtableHeader;
+typedef KernSubtableHeader * KernSubtableHeaderPtr;
+/* --------------------------------------------------------------------------- */
+/* FORMATS FOR TABLE: 'bsln' */
+/* CONSTANTS */
+enum {
+ kBSLNTag = 0x62736C6E, /* 'bsln' */
+ kBSLNCurrentVersion = 0x00010000, /* current version number for 'bsln' table */
+ kBSLNDistanceFormatNoMap = 0,
+ kBSLNDistanceFormatWithMap = 1,
+ kBSLNControlPointFormatNoMap = 2,
+ kBSLNControlPointFormatWithMap = 3
+};
+
+/* Baseline classes and constants */
+enum {
+ kBSLNRomanBaseline = 0,
+ kBSLNIdeographicCenterBaseline = 1,
+ kBSLNIdeographicLowBaseline = 2,
+ kBSLNHangingBaseline = 3,
+ kBSLNMathBaseline = 4,
+ kBSLNLastBaseline = 31,
+ kBSLNNumBaselineClasses = kBSLNLastBaseline + 1,
+ kBSLNNoBaselineOverride = 255
+};
+
+/* TYPES */
+
+typedef UInt32 BslnBaselineClass;
+/* The BslnBaselineRecord array defines the baseline deltas for the line. */
+typedef Fixed BslnBaselineRecord[32];
+/*
+ BslnFormat0Part is the format-specific data for a distance table with no mapping (i.e.
+ all the glyphs belong to the defaultBaseline).
+*/
+
+struct BslnFormat0Part {
+ SInt16 deltas[32];
+};
+typedef struct BslnFormat0Part BslnFormat0Part;
+/* BslnFormat1Part is the format-specific data for a distance table with a gxMapping. */
+
+struct BslnFormat1Part {
+ SInt16 deltas[32];
+ SFNTLookupTable mappingData;
+};
+typedef struct BslnFormat1Part BslnFormat1Part;
+/*
+ BslnFormat2Part is the format-specific data for a control-point table with no
+ mapping (i.e. all the glyphs belong to the defaultBaseline). It specifies a single
+ glyph to use and the set of control points in that glyph that designate each of
+ the baselines.
+*/
+
+struct BslnFormat2Part {
+ UInt16 stdGlyph;
+ SInt16 ctlPoints[32];
+};
+typedef struct BslnFormat2Part BslnFormat2Part;
+/*
+ BslnFormat3Part is the format-specific data for a distance table with a mapping. Like
+ format 2, it contains a single glyph and its set of control-point values for each
+ of the baselines.
+*/
+
+struct BslnFormat3Part {
+ UInt16 stdGlyph;
+ SInt16 ctlPoints[32];
+ SFNTLookupTable mappingData;
+};
+typedef struct BslnFormat3Part BslnFormat3Part;
+/* The BslnFormatUnion is a union containing the format-specific parts of the baseline table. */
+
+union BslnFormatUnion {
+ BslnFormat0Part fmt0Part;
+ BslnFormat1Part fmt1Part;
+ BslnFormat2Part fmt2Part;
+ BslnFormat3Part fmt3Part;
+};
+typedef union BslnFormatUnion BslnFormatUnion;
+/* The table format used in BaselineTable */
+
+typedef UInt16 BslnTableFormat;
+/* BaselineTable defines the top-level format of the baseline table in the font. */
+
+struct BslnTable {
+ Fixed version;
+ BslnTableFormat format;
+ UInt16 defaultBaseline;
+ BslnFormatUnion parts;
+};
+typedef struct BslnTable BslnTable;
+typedef BslnTable * BslnTablePtr;
+/* --------------------------------------------------------------------------- */
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __SFNTLAYOUTTYPES__ */
+
diff --git a/include/qt/SFNTTypes.h b/include/qt/SFNTTypes.h
new file mode 100644
index 000000000..6282b011b
--- /dev/null
+++ b/include/qt/SFNTTypes.h
@@ -0,0 +1,510 @@
+/*
+ File: SFNTTypes.h
+
+ Contains: Font file structures.
+
+ Version: Technology: Quickdraw GX 1.1
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __SFNTTYPES__
+#define __SFNTTYPES__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+
+struct sfntDirectoryEntry {
+ FourCharCode tableTag;
+ UInt32 checkSum;
+ UInt32 offset;
+ UInt32 length;
+};
+typedef struct sfntDirectoryEntry sfntDirectoryEntry;
+/* The search fields limits numOffsets to 4096. */
+
+struct sfntDirectory {
+ FourCharCode format;
+ UInt16 numOffsets; /* number of tables */
+ UInt16 searchRange; /* (max2 <= numOffsets)*16 */
+ UInt16 entrySelector; /* log2(max2 <= numOffsets) */
+ UInt16 rangeShift; /* numOffsets*16-searchRange*/
+ sfntDirectoryEntry table[1]; /* table[numOffsets] */
+};
+typedef struct sfntDirectory sfntDirectory;
+enum {
+ sizeof_sfntDirectory = 12
+};
+
+/* Cmap - character id to glyph id mapping */
+enum {
+ cmapFontTableTag = FOUR_CHAR_CODE('cmap')
+};
+
+enum {
+ kFontUnicodePlatform = 0,
+ kFontMacintoshPlatform = 1,
+ kFontReservedPlatform = 2,
+ kFontMicrosoftPlatform = 3,
+ kFontCustomPlatform = 4
+};
+
+enum {
+ kFontUnicodeDefaultSemantics = 0,
+ kFontUnicodeV1_1Semantics = 1,
+ kFontISO10646_1993Semantics = 2
+};
+
+enum {
+ kFontRomanScript = 0,
+ kFontJapaneseScript = 1,
+ kFontTraditionalChineseScript = 2,
+ kFontChineseScript = kFontTraditionalChineseScript,
+ kFontKoreanScript = 3,
+ kFontArabicScript = 4,
+ kFontHebrewScript = 5,
+ kFontGreekScript = 6,
+ kFontCyrillicScript = 7,
+ kFontRussian = kFontCyrillicScript,
+ kFontRSymbolScript = 8,
+ kFontDevanagariScript = 9,
+ kFontGurmukhiScript = 10,
+ kFontGujaratiScript = 11,
+ kFontOriyaScript = 12,
+ kFontBengaliScript = 13,
+ kFontTamilScript = 14,
+ kFontTeluguScript = 15,
+ kFontKannadaScript = 16,
+ kFontMalayalamScript = 17,
+ kFontSinhaleseScript = 18,
+ kFontBurmeseScript = 19,
+ kFontKhmerScript = 20,
+ kFontThaiScript = 21,
+ kFontLaotianScript = 22,
+ kFontGeorgianScript = 23,
+ kFontArmenianScript = 24,
+ kFontSimpleChineseScript = 25,
+ kFontTibetanScript = 26,
+ kFontMongolianScript = 27,
+ kFontGeezScript = 28,
+ kFontEthiopicScript = kFontGeezScript,
+ kFontAmharicScript = kFontGeezScript,
+ kFontSlavicScript = 29,
+ kFontEastEuropeanRomanScript = kFontSlavicScript,
+ kFontVietnameseScript = 30,
+ kFontExtendedArabicScript = 31,
+ kFontSindhiScript = kFontExtendedArabicScript,
+ kFontUninterpretedScript = 32
+};
+
+enum {
+ kFontMicrosoftSymbolScript = 0,
+ kFontMicrosoftStandardScript = 1
+};
+
+
+enum {
+ kFontCustom8BitScript = 0,
+ kFontCustom816BitScript = 1,
+ kFontCustom16BitScript = 2
+};
+
+/* Language codes are zero based everywhere but within a 'cmap' table */
+enum {
+ kFontEnglishLanguage = 0,
+ kFontFrenchLanguage = 1,
+ kFontGermanLanguage = 2,
+ kFontItalianLanguage = 3,
+ kFontDutchLanguage = 4,
+ kFontSwedishLanguage = 5,
+ kFontSpanishLanguage = 6,
+ kFontDanishLanguage = 7,
+ kFontPortugueseLanguage = 8,
+ kFontNorwegianLanguage = 9,
+ kFontHebrewLanguage = 10,
+ kFontJapaneseLanguage = 11,
+ kFontArabicLanguage = 12,
+ kFontFinnishLanguage = 13,
+ kFontGreekLanguage = 14,
+ kFontIcelandicLanguage = 15,
+ kFontMalteseLanguage = 16,
+ kFontTurkishLanguage = 17,
+ kFontCroatianLanguage = 18,
+ kFontTradChineseLanguage = 19,
+ kFontUrduLanguage = 20,
+ kFontHindiLanguage = 21,
+ kFontThaiLanguage = 22,
+ kFontKoreanLanguage = 23,
+ kFontLithuanianLanguage = 24,
+ kFontPolishLanguage = 25,
+ kFontHungarianLanguage = 26,
+ kFontEstonianLanguage = 27,
+ kFontLettishLanguage = 28,
+ kFontLatvianLanguage = kFontLettishLanguage,
+ kFontSaamiskLanguage = 29,
+ kFontLappishLanguage = kFontSaamiskLanguage,
+ kFontFaeroeseLanguage = 30,
+ kFontFarsiLanguage = 31,
+ kFontPersianLanguage = kFontFarsiLanguage,
+ kFontRussianLanguage = 32,
+ kFontSimpChineseLanguage = 33,
+ kFontFlemishLanguage = 34,
+ kFontIrishLanguage = 35,
+ kFontAlbanianLanguage = 36,
+ kFontRomanianLanguage = 37,
+ kFontCzechLanguage = 38,
+ kFontSlovakLanguage = 39,
+ kFontSlovenianLanguage = 40,
+ kFontYiddishLanguage = 41,
+ kFontSerbianLanguage = 42,
+ kFontMacedonianLanguage = 43,
+ kFontBulgarianLanguage = 44,
+ kFontUkrainianLanguage = 45,
+ kFontByelorussianLanguage = 46,
+ kFontUzbekLanguage = 47,
+ kFontKazakhLanguage = 48,
+ kFontAzerbaijaniLanguage = 49,
+ kFontAzerbaijanArLanguage = 50,
+ kFontArmenianLanguage = 51,
+ kFontGeorgianLanguage = 52,
+ kFontMoldavianLanguage = 53,
+ kFontKirghizLanguage = 54,
+ kFontTajikiLanguage = 55,
+ kFontTurkmenLanguage = 56,
+ kFontMongolianLanguage = 57,
+ kFontMongolianCyrLanguage = 58,
+ kFontPashtoLanguage = 59,
+ kFontKurdishLanguage = 60,
+ kFontKashmiriLanguage = 61,
+ kFontSindhiLanguage = 62,
+ kFontTibetanLanguage = 63,
+ kFontNepaliLanguage = 64,
+ kFontSanskritLanguage = 65,
+ kFontMarathiLanguage = 66,
+ kFontBengaliLanguage = 67,
+ kFontAssameseLanguage = 68,
+ kFontGujaratiLanguage = 69,
+ kFontPunjabiLanguage = 70,
+ kFontOriyaLanguage = 71,
+ kFontMalayalamLanguage = 72,
+ kFontKannadaLanguage = 73,
+ kFontTamilLanguage = 74,
+ kFontTeluguLanguage = 75,
+ kFontSinhaleseLanguage = 76,
+ kFontBurmeseLanguage = 77,
+ kFontKhmerLanguage = 78,
+ kFontLaoLanguage = 79,
+ kFontVietnameseLanguage = 80,
+ kFontIndonesianLanguage = 81,
+ kFontTagalogLanguage = 82,
+ kFontMalayRomanLanguage = 83,
+ kFontMalayArabicLanguage = 84,
+ kFontAmharicLanguage = 85,
+ kFontTigrinyaLanguage = 86,
+ kFontGallaLanguage = 87,
+ kFontOromoLanguage = kFontGallaLanguage,
+ kFontSomaliLanguage = 88,
+ kFontSwahiliLanguage = 89,
+ kFontRuandaLanguage = 90,
+ kFontRundiLanguage = 91,
+ kFontChewaLanguage = 92,
+ kFontMalagasyLanguage = 93,
+ kFontEsperantoLanguage = 94,
+ kFontWelshLanguage = 128,
+ kFontBasqueLanguage = 129,
+ kFontCatalanLanguage = 130,
+ kFontLatinLanguage = 131,
+ kFontQuechuaLanguage = 132,
+ kFontGuaraniLanguage = 133,
+ kFontAymaraLanguage = 134,
+ kFontTatarLanguage = 135,
+ kFontUighurLanguage = 136,
+ kFontDzongkhaLanguage = 137,
+ kFontJavaneseRomLanguage = 138,
+ kFontSundaneseRomLanguage = 139
+};
+
+/* The following are special "don't care" values to be used in interfaces */
+enum {
+ kFontNoPlatform = -1,
+ kFontNoScript = -1,
+ kFontNoLanguage = -1
+};
+
+
+struct sfntCMapSubHeader {
+ UInt16 format;
+ UInt16 length;
+ UInt16 languageID; /* base-1 */
+};
+typedef struct sfntCMapSubHeader sfntCMapSubHeader;
+enum {
+ sizeof_sfntCMapSubHeader = 6
+};
+
+
+struct sfntCMapEncoding {
+ UInt16 platformID; /* base-0 */
+ UInt16 scriptID; /* base-0 */
+ UInt32 offset;
+};
+typedef struct sfntCMapEncoding sfntCMapEncoding;
+enum {
+ sizeof_sfntCMapEncoding = 8
+};
+
+
+struct sfntCMapHeader {
+ UInt16 version;
+ UInt16 numTables;
+ sfntCMapEncoding encoding[1];
+};
+typedef struct sfntCMapHeader sfntCMapHeader;
+enum {
+ sizeof_sfntCMapHeader = 4
+};
+
+/* Name table */
+enum {
+ nameFontTableTag = FOUR_CHAR_CODE('name')
+};
+
+enum {
+ kFontCopyrightName = 0,
+ kFontFamilyName = 1,
+ kFontStyleName = 2,
+ kFontUniqueName = 3,
+ kFontFullName = 4,
+ kFontVersionName = 5,
+ kFontPostscriptName = 6,
+ kFontTrademarkName = 7,
+ kFontManufacturerName = 8,
+ kFontDesignerName = 9,
+ kFontDescriptionName = 10,
+ kFontVendorURLName = 11,
+ kFontDesignerURLName = 12,
+ kFontLicenseDescriptionName = 13,
+ kFontLicenseInfoURLName = 14,
+ kFontLastReservedName = 255
+};
+
+/* The following is a special "don't care" value to be used in interfaces */
+enum {
+ kFontNoName = -1
+};
+
+
+struct sfntNameRecord {
+ UInt16 platformID; /* base-0 */
+ UInt16 scriptID; /* base-0 */
+ UInt16 languageID; /* base-0 */
+ UInt16 nameID; /* base-0 */
+ UInt16 length;
+ UInt16 offset;
+};
+typedef struct sfntNameRecord sfntNameRecord;
+enum {
+ sizeof_sfntNameRecord = 12
+};
+
+
+struct sfntNameHeader {
+ UInt16 format;
+ UInt16 count;
+ UInt16 stringOffset;
+ sfntNameRecord rec[1];
+};
+typedef struct sfntNameHeader sfntNameHeader;
+enum {
+ sizeof_sfntNameHeader = 6
+};
+
+/* Fvar table - font variations */
+enum {
+ variationFontTableTag = FOUR_CHAR_CODE('fvar')
+};
+
+/* These define each font variation */
+
+struct sfntVariationAxis {
+ FourCharCode axisTag;
+ Fixed minValue;
+ Fixed defaultValue;
+ Fixed maxValue;
+ SInt16 flags;
+ SInt16 nameID;
+};
+typedef struct sfntVariationAxis sfntVariationAxis;
+enum {
+ sizeof_sfntVariationAxis = 20
+};
+
+/* These are named locations in style-space for the user */
+
+struct sfntInstance {
+ SInt16 nameID;
+ SInt16 flags;
+ Fixed coord[1]; /* [axisCount] */
+ /* room to grow since the header carries a tupleSize field */
+};
+typedef struct sfntInstance sfntInstance;
+enum {
+ sizeof_sfntInstance = 4
+};
+
+
+struct sfntVariationHeader {
+ Fixed version; /* 1.0 Fixed */
+ UInt16 offsetToData; /* to first axis = 16*/
+ UInt16 countSizePairs; /* axis+inst = 2 */
+ UInt16 axisCount;
+ UInt16 axisSize;
+ UInt16 instanceCount;
+ UInt16 instanceSize;
+ /* ...other <count,size> pairs */
+ sfntVariationAxis axis[1]; /* [axisCount] */
+ sfntInstance instance[1]; /* [instanceCount] ...other arrays of data */
+};
+typedef struct sfntVariationHeader sfntVariationHeader;
+enum {
+ sizeof_sfntVariationHeader = 16
+};
+
+/* Fdsc table - font descriptor */
+enum {
+ descriptorFontTableTag = FOUR_CHAR_CODE('fdsc')
+};
+
+
+struct sfntFontDescriptor {
+ FourCharCode name;
+ Fixed value;
+};
+typedef struct sfntFontDescriptor sfntFontDescriptor;
+
+struct sfntDescriptorHeader {
+ Fixed version; /* 1.0 in Fixed */
+ SInt32 descriptorCount;
+ sfntFontDescriptor descriptor[1];
+};
+typedef struct sfntDescriptorHeader sfntDescriptorHeader;
+enum {
+ sizeof_sfntDescriptorHeader = 8
+};
+
+/* Feat Table - layout feature table */
+enum {
+ featureFontTableTag = FOUR_CHAR_CODE('feat')
+};
+
+
+struct sfntFeatureName {
+ UInt16 featureType;
+ UInt16 settingCount;
+ SInt32 offsetToSettings;
+ UInt16 featureFlags;
+ UInt16 nameID;
+};
+typedef struct sfntFeatureName sfntFeatureName;
+
+struct sfntFontFeatureSetting {
+ UInt16 setting;
+ UInt16 nameID;
+};
+typedef struct sfntFontFeatureSetting sfntFontFeatureSetting;
+
+struct sfntFontRunFeature {
+ UInt16 featureType;
+ UInt16 setting;
+};
+typedef struct sfntFontRunFeature sfntFontRunFeature;
+
+struct sfntFeatureHeader {
+ SInt32 version; /* 1.0 */
+ UInt16 featureNameCount;
+ UInt16 featureSetCount;
+ SInt32 reserved; /* set to 0 */
+ sfntFeatureName names[1];
+ sfntFontFeatureSetting settings[1];
+ sfntFontRunFeature runs[1];
+};
+typedef struct sfntFeatureHeader sfntFeatureHeader;
+/* OS/2 Table */
+enum {
+ os2FontTableTag = FOUR_CHAR_CODE('OS/2')
+};
+
+/* Special invalid glyph ID value, useful as a sentinel value, for example */
+enum {
+ nonGlyphID = 65535L
+};
+
+/* Data type used to access names from font name table */
+
+typedef UInt32 FontNameCode;
+/* Data types for encoding components as used in interfaces */
+typedef UInt32 FontPlatformCode;
+typedef UInt32 FontScriptCode;
+typedef UInt32 FontLanguageCode;
+/*
+** FontVariation is used to specify a coordinate along a variation axis. The name
+** identifies the axes to be applied, and value is the setting to be used.
+*/
+
+struct FontVariation {
+ FourCharCode name;
+ Fixed value;
+};
+typedef struct FontVariation FontVariation;
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __SFNTTYPES__ */
+
diff --git a/include/qt/ScalerStreamTypes.h b/include/qt/ScalerStreamTypes.h
new file mode 100644
index 000000000..402e18685
--- /dev/null
+++ b/include/qt/ScalerStreamTypes.h
@@ -0,0 +1,145 @@
+/*
+ File: ScalerStreamTypes.h
+
+ Contains: Scaler streaming data structures and constants for OFA 1.x
+
+ Version: Technology: Quickdraw GX 1.1
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __SCALERSTREAMTYPES__
+#define __SCALERSTREAMTYPES__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __SFNTTYPES__
+#include "SFNTTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* ScalerStream input/output types */
+enum {
+ cexec68K = 0x0001,
+ truetypeStreamType = 0x0001,
+ type1StreamType = 0x0002,
+ type3StreamType = 0x0004,
+ type42StreamType = 0x0008,
+ type42GXStreamType = 0x0010,
+ portableStreamType = 0x0020,
+ flattenedStreamType = 0x0040,
+ evenOddModifierStreamType = 0x8000
+};
+
+/* Possible streamed font formats */
+typedef unsigned long scalerStreamTypeFlag;
+enum {
+ downloadStreamAction = 0, /* Transmit the (possibly sparse) font data */
+ asciiDownloadStreamAction = 1, /* Transmit font data to a 7-bit ASCII destination */
+ fontSizeQueryStreamAction = 2, /* Estimate in-printer memory used if the font were downloaded */
+ encodingOnlyStreamAction = 3, /* Transmit only the encoding for the font */
+ prerequisiteQueryStreamAction = 4, /* Return a list of prerequisite items needed for the font */
+ prerequisiteItemStreamAction = 5, /* Transmit a specified prerequisite item */
+ variationQueryStreamAction = 6, /* Return information regarding support for variation streaming */
+ variationPSOperatorStreamAction = 7 /* Transmit Postscript code necessary to effect variation of a font */
+};
+
+typedef long scalerStreamAction;
+enum {
+ selectAllVariations = -1 /* Special variationCount value meaning include all variation data */
+};
+
+
+struct scalerPrerequisiteItem {
+ long enumeration; /* Shorthand tag identifying the item */
+ long size; /* Worst case vm in printer item requires */
+ unsigned char name[1]; /* Name to be used by the client when emitting the item (Pascal string) */
+};
+typedef struct scalerPrerequisiteItem scalerPrerequisiteItem;
+
+struct scalerStream {
+ const void * streamRefCon; /* <- private reference for client */
+ const char * targetVersion; /* <- e.g. Postscript printer name (C string) */
+ scalerStreamTypeFlag types; /* <-> Data stream formats desired/supplied */
+ scalerStreamAction action; /* <- What action to take */
+ unsigned long memorySize; /* -> Worst case memory use (vm) in printer or as sfnt */
+ long variationCount; /* <- The number of variations, or selectAllVariations */
+ const void * variations; /* <- A pointer to an array of the variations (gxFontVariation) */
+ union {
+ /* Normal font streaming information*/
+ struct {
+ const unsigned short * encoding; /* <- Intention is * unsigned short[256] */
+ long * glyphBits; /* <-> Bitvector: a bit for each glyph, 1 = desired/supplied */
+ char * name; /* <-> The printer font name to use/used (C string) */
+ } font;
+
+ /* Used to obtain a list of prerequisites from the scaler*/
+ struct {
+ long size; /* -> Size of the prereq. list in bytes (0 indicates no prerequisites)*/
+ void * list; /* <- Pointer to client block to hold list (nil = list size query only) */
+ } prerequisiteQuery;
+
+ long prerequisiteItem; /* <- Enumeration value for the prerequisite item to be streamed.*/
+
+ long variationQueryResult; /* -> Output from the variationQueryStreamAction */
+ } info;
+};
+typedef struct scalerStream scalerStream;
+
+struct scalerStreamData {
+ long hexFlag; /* Indicates that the data is to be interpreted as hex, versus binary */
+ long byteCount; /* Number of bytes in the data being streamed */
+ const void * data; /* Pointer to the data being streamed */
+};
+typedef struct scalerStreamData scalerStreamData;
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __SCALERSTREAMTYPES__ */
+
diff --git a/include/qt/ScalerTypes.h b/include/qt/ScalerTypes.h
new file mode 100644
index 000000000..e674bd097
--- /dev/null
+++ b/include/qt/ScalerTypes.h
@@ -0,0 +1,67 @@
+/*
+ File: ScalerTypes.h
+
+ Contains: Apple public font scaler object and constant definitions
+
+ Version: Technology: Quickdraw GX 1.1
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __SCALERTYPES__
+#define __SCALERTYPES__
+
+#ifndef __SCALERSTREAMTYPES__
+#include "ScalerStreamTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __SCALERTYPES__ */
+
diff --git a/include/qt/Scrap.h b/include/qt/Scrap.h
new file mode 100644
index 000000000..f1bbff943
--- /dev/null
+++ b/include/qt/Scrap.h
@@ -0,0 +1,405 @@
+/*
+ File: Scrap.h
+
+ Contains: Scrap Manager Interfaces.
+
+ Version: Technology: Mac OS 9
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __SCRAP__
+#define __SCRAP__
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*
+ ________________________________________________________________
+ UNIVERSAL SCRAP MANAGER INTERFACES
+ ________________________________________________________________
+ The following interfaces are available when compiling for BOTH
+ Carbon AND Mac OS 8.
+ ________________________________________________________________
+*/
+/*
+ While were in here mucking about, we defined a new type to
+ to put some confusion to rest. The old calls, as well as the
+ new calls, use the new type. Existing clients should be
+ blissfully ignorant.
+*/
+
+typedef FourCharCode ScrapFlavorType;
+/*
+ Newsflash! After 15 years of arduous toil, it's finally possible
+ for specially trained typists wielding advanced text editing
+ technology to define symbolic names for commonly used scrap
+ flavor type constants! Apple triumphs again!
+*/
+enum {
+ kScrapFlavorTypePicture = FOUR_CHAR_CODE('PICT'), /* contents of a PicHandle*/
+ kScrapFlavorTypeText = FOUR_CHAR_CODE('TEXT'), /* stream of characters*/
+ kScrapFlavorTypeTextStyle = FOUR_CHAR_CODE('styl'), /* see TEGetStyleScrapHandle*/
+ kScrapFlavorTypeMovie = FOUR_CHAR_CODE('moov'), /* reference to a movie*/
+ kScrapFlavorTypeSound = FOUR_CHAR_CODE('snd '), /* see SndRecord and SndPlay*/
+ kScrapFlavorTypeUnicode = FOUR_CHAR_CODE('utxt'), /* stream of UTF16 characters*/
+ kScrapFlavorTypeUnicodeStyle = FOUR_CHAR_CODE('ustl') /* ATSUI defines; Textension uses*/
+};
+
+/*
+ If you are a Carbon client and you need to run on Mac OS 8,
+ you may still need to load and unload the scrap. Under Mac OS
+ X, the scrap is held by the pasteboard server instead of in a
+ handle in your app's heap, so LoadScrap and UnloadScrap do
+ nothing when called under Mac OS X.
+*/
+
+EXTERN_API( OSStatus )
+LoadScrap (void) ONEWORDINLINE(0xA9FB);
+
+EXTERN_API( OSStatus )
+UnloadScrap (void) ONEWORDINLINE(0xA9FA);
+
+#if CALL_NOT_IN_CARBON
+/*
+ ________________________________________________________________
+ MAC OS 8 SCRAP MANAGER INTERFACES
+ ________________________________________________________________
+ The following interfaces are available only when compiling for
+ plain vanilla Mac OS 8. We didn't add comments to them because
+ Inside Mac covers them in detail.
+ ________________________________________________________________
+*/
+
+struct ScrapStuff {
+ SInt32 scrapSize;
+ Handle scrapHandle;
+ SInt16 scrapCount;
+ SInt16 scrapState;
+ StringPtr scrapName;
+};
+typedef struct ScrapStuff ScrapStuff;
+
+typedef ScrapStuff * PScrapStuff;
+typedef ScrapStuff * ScrapStuffPtr;
+#if CALL_NOT_IN_CARBON
+EXTERN_API( ScrapStuffPtr )
+InfoScrap (void) ONEWORDINLINE(0xA9F9);
+
+EXTERN_API( long )
+GetScrap (Handle destination,
+ ScrapFlavorType flavorType,
+ SInt32 * offset) ONEWORDINLINE(0xA9FD);
+
+EXTERN_API( OSStatus )
+ZeroScrap (void) ONEWORDINLINE(0xA9FC);
+
+EXTERN_API( OSStatus )
+PutScrap (SInt32 sourceBufferByteCount,
+ ScrapFlavorType flavorType,
+ const void * sourceBuffer) ONEWORDINLINE(0xA9FE);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+/*
+ ________________________________________________________________
+ CARBON SCRAP MANAGER INTERFACES
+ ________________________________________________________________
+ The following interfaces are available only when compiling for
+ Carbon.
+ ________________________________________________________________
+*/
+
+/*
+ When promising a scrap flavor, it's OK if you
+ don't yet know how big the flavor data will be.
+ In this case, just pass kScrapFlavorSizeUnknown
+ for the flavor data size.
+*/
+
+enum {
+ kScrapFlavorSizeUnknown = -1
+};
+
+/*
+ kScrapReservedFlavorType is a flavor type which is reserved
+ for use by Scrap Manager. If you pass it to Scrap Manager,
+ it will be rejected.
+*/
+
+enum {
+ kScrapReservedFlavorType = FOUR_CHAR_CODE('srft')
+};
+
+/*
+ We've added scrap flavor flags ala Drag Manager.
+
+ kScrapFlavorMaskNone means you want none of the flags.
+
+ kScrapFlavorSenderOnlyMask means only the process which
+ put the flavor on the scrap can see it. If some other
+ process put a flavor with this flag on the scrap,
+ your process will never see the flavor, so there's
+ no point in testing for this flag.
+
+ kScrapFlavorTranslated means the flavor was translated
+ from some other flavor in the scrap by Translation Manager.
+ Most callers should not care about this bit.
+*/
+enum {
+ kScrapFlavorMaskNone = 0x00000000,
+ kScrapFlavorMaskSenderOnly = 0x00000001,
+ kScrapFlavorMaskTranslated = 0x00000002
+};
+
+typedef UInt32 ScrapFlavorFlags;
+/*
+ ScrapFlavorInfo describes a single flavor within
+ a scrap.
+*/
+
+struct ScrapFlavorInfo {
+ ScrapFlavorType flavorType;
+ ScrapFlavorFlags flavorFlags;
+};
+typedef struct ScrapFlavorInfo ScrapFlavorInfo;
+/*
+ Under a future version of Carbon, there may be multiple scraps.
+ We'll need ScrapRefs to tell them apart.
+*/
+typedef struct OpaqueScrapRef* ScrapRef;
+/*
+ GetCurrentScrap obtains a reference to the current scrap.
+ The ScrapRef obtained via GetCurrentScrap will become
+ invalid and unusable after the scrap is cleared.
+*/
+EXTERN_API( OSStatus )
+GetCurrentScrap (ScrapRef * scrap);
+
+/*
+ GetScrapFlavorFlags tells you [a] whether the scrap contains
+ data for a particular flavor and [b] some things about that
+ flavor if it exists. This call never blocks, and is useful
+ for deciding whether to enable the Paste item in your Edit
+ menu, among other things.
+*/
+
+EXTERN_API( OSStatus )
+GetScrapFlavorFlags (ScrapRef scrap,
+ ScrapFlavorType flavorType,
+ ScrapFlavorFlags * flavorFlags);
+
+/*
+ GetScrapFlavorSize gets the size of the data of the specified
+ flavor. This function blocks until the specified flavor
+ data is available. GetScrapFlavorSize is intended as a prelude
+ to allocating memory and calling GetScrapFlavorData.
+*/
+
+EXTERN_API( OSStatus )
+GetScrapFlavorSize (ScrapRef scrap,
+ ScrapFlavorType flavorType,
+ Size * byteCount);
+
+/*
+ GetScrapFlavorData gets the data from the specified flavor in the
+ specified scrap. This function blocks until the specified flavor
+ data is available. Specify the maximum size your buffer can contain;
+ on output, this function produces the number of bytes that were
+ available (even if this is more than you requested).
+*/
+
+EXTERN_API( OSStatus )
+GetScrapFlavorData (ScrapRef scrap,
+ ScrapFlavorType flavorType,
+ Size * byteCount,
+ void * destination);
+
+/*
+ ClearCurrentScrap clears the current scrap. Call this
+ first when the user requests a Copy or Cut operation --
+ even if you maintain a private scrap! You should not wait
+ until receiving a suspend event to call ClearCurrentScrap. Call
+ it immediately after the user requests a Copy or Cut operation.
+ You don't need to put any data on the scrap immediately (although
+ it's perfectly fine to do so). You DO need to call GetCurrentScrap
+ after ClearCurrentScrap so you'll have a valid ScrapRef to pass
+ to other functions.
+*/
+
+EXTERN_API( OSStatus )
+ClearCurrentScrap (void);
+
+/*
+ PutScrapFlavor is a lot like PutScrap, with two differences:
+ we added a ScrapRef parameter at the beginning and you can
+ "promise" various aspects of a flavor. If you pass a NIL
+ data pointer, this is a promise that in the future you
+ will provide data for this flavor. Provide the data
+ through a subsequent call to PutScrapFlavor, either later
+ in the same code flow or during a scrap promise keeper proc.
+ If you know how big the data is, you can pass the size as
+ well, and this may allow subsequent callers of GetScrapFlavorInfo
+ to avoid blocking. If you don't know the size, pass -1.
+ If you pass a 0 size, you are telling Scrap Manager not to
+ expect any data for this flavor. In this case, the flavor
+ data pointer is ignored. NOTE: the last time you can provide
+ scrap flavor data is when your scrap promise keeper gets
+ called. It is NOT possible to call PutScrapFlavor while
+ handling a suspend event; suspend events under Carbon
+ simply don't work the way they do under Mac OS 8.
+*/
+
+EXTERN_API( OSStatus )
+PutScrapFlavor (ScrapRef scrap,
+ ScrapFlavorType flavorType,
+ ScrapFlavorFlags flavorFlags,
+ Size flavorSize,
+ const void * flavorData) /* can be NULL */;
+
+/*
+ ScrapPromiseKeeper is a function you write which is called by
+ Scrap Manager as needed to keep your earlier promise of a
+ particular scrap flavor. When your function is called, deliver
+ the requested data by calling PutScrapFlavor.
+*/
+
+typedef CALLBACK_API( OSStatus , ScrapPromiseKeeperProcPtr )(ScrapRef scrap, ScrapFlavorType flavorType, void *userData);
+typedef STACK_UPP_TYPE(ScrapPromiseKeeperProcPtr) ScrapPromiseKeeperUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(ScrapPromiseKeeperUPP)
+ NewScrapPromiseKeeperUPP (ScrapPromiseKeeperProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeScrapPromiseKeeperUPP (ScrapPromiseKeeperUPP userUPP);
+
+ EXTERN_API(OSStatus)
+ InvokeScrapPromiseKeeperUPP (ScrapRef scrap,
+ ScrapFlavorType flavorType,
+ void * userData,
+ ScrapPromiseKeeperUPP userUPP);
+
+#else
+ enum { uppScrapPromiseKeeperProcInfo = 0x00000FF0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ #define NewScrapPromiseKeeperUPP(userRoutine) (ScrapPromiseKeeperUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppScrapPromiseKeeperProcInfo, GetCurrentArchitecture())
+ #define DisposeScrapPromiseKeeperUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeScrapPromiseKeeperUPP(scrap, flavorType, userData, userUPP) (OSStatus)CALL_THREE_PARAMETER_UPP((userUPP), uppScrapPromiseKeeperProcInfo, (scrap), (flavorType), (userData))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewScrapPromiseKeeperProc(userRoutine) NewScrapPromiseKeeperUPP(userRoutine)
+#define CallScrapPromiseKeeperProc(userRoutine, scrap, flavorType, userData) InvokeScrapPromiseKeeperUPP(scrap, flavorType, userData, userRoutine)
+/*
+ SetScrapPromiseKeeper associates a ScrapPromiseKeeper with a
+ scrap. You can remove a ScrapPromiseKeeper from a scrap by
+ passing a NIL ScrapPromiseKeeper to SetScrapPromiseKeeper.
+ Pass whatever you like in the last parameter; its value will
+ be passed to your ScrapPromiseKeeper, which can do whatever
+ it likes with the value. You might choose to pass a pointer
+ or handle to some private scrap data which the
+ ScrapPromiseKeeper could use in fabricating one or more
+ promised flavors.
+*/
+EXTERN_API( OSStatus )
+SetScrapPromiseKeeper (ScrapRef scrap,
+ ScrapPromiseKeeperUPP upp,
+ const void * userData);
+
+/*
+ GetScrapFlavorCount produces the number of
+ items which can be obtained by GetScrapFlavorInfoList.
+*/
+
+EXTERN_API( OSStatus )
+GetScrapFlavorCount (ScrapRef scrap,
+ UInt32 * infoCount);
+
+/*
+ GetScrapFlavorInfoList fills a list (array)
+ of items which each describe the corresponding
+ flavor in the scrap. It fills no more array
+ elements as are specified. On exit, it produces
+ the count of elements it filled (which may be
+ smaller than the count requested). Yes, YOU
+ must provide the memory for the array.
+*/
+
+EXTERN_API( OSStatus )
+GetScrapFlavorInfoList (ScrapRef scrap,
+ UInt32 * infoCount,
+ ScrapFlavorInfo info[]);
+
+
+/*
+ CallInPromises forces all promises to be kept.
+ If your application promises at least one flavor
+ AND it does NOT adopt the new event model, you
+ should call this function when your application
+ is about to quit. If your app promises no flavors,
+ there is no need to call this function, and if
+ your app adopts the new event model, this function
+ will be called automagically for you. It doesn't
+ hurt to call this function more than once, though
+ promise keepers may be asked to keep promises
+ they already tried and failed.
+*/
+
+EXTERN_API( OSStatus )
+CallInScrapPromises (void);
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __SCRAP__ */
+
diff --git a/include/qt/Script.h b/include/qt/Script.h
new file mode 100644
index 000000000..60a9b4632
--- /dev/null
+++ b/include/qt/Script.h
@@ -0,0 +1,1190 @@
+/*
+ File: Script.h
+
+ Contains: Script Manager interfaces
+
+ Version: Technology: Mac OS 8
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1986-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __SCRIPT__
+#define __SCRIPT__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#ifndef __INTLRESOURCES__
+#include "IntlResources.h"
+#endif
+
+#ifndef __EVENTS__
+#include "Events.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* Meta script codes:*/
+enum {
+ smSystemScript = -1, /* designates system script.*/
+ smCurrentScript = -2, /* designates current font script.*/
+ smAllScripts = -3 /* designates any script*/
+};
+
+/*
+ Script codes:
+ These specify a Mac OS encoding that is related to a FOND ID range.
+ Some of the encodings have several variants (e.g. for different localized systems)
+ which all share the same script code.
+ Not all of these script codes are currently supported by Apple software.
+ Notes:
+ - Script code 0 (smRoman) is also used (instead of smGreek) for the Greek encoding
+ in the Greek localized system.
+ - Script code 28 (smEthiopic) is also used for the Inuit encoding in the Inuktitut
+ system.
+*/
+enum {
+ smRoman = 0,
+ smJapanese = 1,
+ smTradChinese = 2, /* Traditional Chinese*/
+ smKorean = 3,
+ smArabic = 4,
+ smHebrew = 5,
+ smGreek = 6,
+ smCyrillic = 7,
+ smRSymbol = 8, /* Right-left symbol*/
+ smDevanagari = 9,
+ smGurmukhi = 10,
+ smGujarati = 11,
+ smOriya = 12,
+ smBengali = 13,
+ smTamil = 14,
+ smTelugu = 15,
+ smKannada = 16, /* Kannada/Kanarese*/
+ smMalayalam = 17,
+ smSinhalese = 18,
+ smBurmese = 19,
+ smKhmer = 20, /* Khmer/Cambodian*/
+ smThai = 21,
+ smLao = 22,
+ smGeorgian = 23,
+ smArmenian = 24,
+ smSimpChinese = 25, /* Simplified Chinese*/
+ smTibetan = 26,
+ smMongolian = 27,
+ smEthiopic = 28,
+ smGeez = 28, /* Synonym for smEthiopic*/
+ smCentralEuroRoman = 29, /* For Czech, Slovak, Polish, Hungarian, Baltic langs*/
+ smVietnamese = 30,
+ smExtArabic = 31, /* extended Arabic*/
+ smUninterp = 32 /* uninterpreted symbols, e.g. palette symbols*/
+};
+
+/* Extended script code for full Unicode input*/
+enum {
+ smUnicodeScript = 0x7E
+};
+
+/* Obsolete script code names (kept for backward compatibility):*/
+enum {
+ smChinese = 2, /* (Use smTradChinese or smSimpChinese)*/
+ smRussian = 7, /* Use smCyrillic*/
+ /* smMaldivian = 25: deleted, no code for Maldivian*/
+ smLaotian = 22, /* Use smLao */
+ smAmharic = 28, /* Use smEthiopic or smGeez*/
+ smSlavic = 29, /* Use smCentralEuroRoman*/
+ smEastEurRoman = 29, /* Use smCentralEuroRoman*/
+ smSindhi = 31, /* Use smExtArabic*/
+ smKlingon = 32
+};
+
+/*
+ Language codes:
+ These specify a language implemented using a particular Mac OS encoding.
+ Not all of these language codes are currently supported by Apple software.
+*/
+enum {
+ langEnglish = 0, /* smRoman script*/
+ langFrench = 1, /* smRoman script*/
+ langGerman = 2, /* smRoman script*/
+ langItalian = 3, /* smRoman script*/
+ langDutch = 4, /* smRoman script*/
+ langSwedish = 5, /* smRoman script*/
+ langSpanish = 6, /* smRoman script*/
+ langDanish = 7, /* smRoman script*/
+ langPortuguese = 8, /* smRoman script*/
+ langNorwegian = 9, /* smRoman script*/
+ langHebrew = 10, /* smHebrew script*/
+ langJapanese = 11, /* smJapanese script*/
+ langArabic = 12, /* smArabic script*/
+ langFinnish = 13, /* smRoman script*/
+ langGreek = 14, /* Greek script using smRoman script code*/
+ langIcelandic = 15, /* modified smRoman/Icelandic script*/
+ langMaltese = 16, /* Roman script*/
+ langTurkish = 17, /* modified smRoman/Turkish script*/
+ langCroatian = 18, /* modified smRoman/Croatian script*/
+ langTradChinese = 19, /* Chinese (Mandarin) in traditional characters*/
+ langUrdu = 20, /* smArabic script*/
+ langHindi = 21, /* smDevanagari script*/
+ langThai = 22, /* smThai script*/
+ langKorean = 23 /* smKorean script*/
+};
+
+enum {
+ langLithuanian = 24, /* smCentralEuroRoman script*/
+ langPolish = 25, /* smCentralEuroRoman script*/
+ langHungarian = 26, /* smCentralEuroRoman script*/
+ langEstonian = 27, /* smCentralEuroRoman script*/
+ langLatvian = 28, /* smCentralEuroRoman script*/
+ langSami = 29, /* language of the Sami people of N. Scandinavia */
+ langFaroese = 30, /* modified smRoman/Icelandic script */
+ langFarsi = 31, /* modified smArabic/Farsi script*/
+ langPersian = 31, /* Synonym for langFarsi*/
+ langRussian = 32, /* smCyrillic script*/
+ langSimpChinese = 33, /* Chinese (Mandarin) in simplified characters*/
+ langFlemish = 34, /* smRoman script*/
+ langIrishGaelic = 35, /* smRoman or modified smRoman/Celtic script (without dot above) */
+ langAlbanian = 36, /* smRoman script*/
+ langRomanian = 37, /* modified smRoman/Romanian script*/
+ langCzech = 38, /* smCentralEuroRoman script*/
+ langSlovak = 39, /* smCentralEuroRoman script*/
+ langSlovenian = 40, /* modified smRoman/Croatian script*/
+ langYiddish = 41, /* smHebrew script*/
+ langSerbian = 42, /* smCyrillic script*/
+ langMacedonian = 43, /* smCyrillic script*/
+ langBulgarian = 44, /* smCyrillic script*/
+ langUkrainian = 45, /* modified smCyrillic/Ukrainian script*/
+ langByelorussian = 46, /* smCyrillic script*/
+ langBelorussian = 46 /* Synonym for langByelorussian */
+};
+
+enum {
+ langUzbek = 47, /* Cyrillic script*/
+ langKazakh = 48, /* Cyrillic script*/
+ langAzerbaijani = 49, /* Azerbaijani in Cyrillic script*/
+ langAzerbaijanAr = 50, /* Azerbaijani in Arabic script*/
+ langArmenian = 51, /* smArmenian script*/
+ langGeorgian = 52, /* smGeorgian script*/
+ langMoldavian = 53, /* smCyrillic script*/
+ langKirghiz = 54, /* Cyrillic script*/
+ langTajiki = 55, /* Cyrillic script*/
+ langTurkmen = 56, /* Cyrillic script*/
+ langMongolian = 57, /* Mongolian in smMongolian script*/
+ langMongolianCyr = 58, /* Mongolian in Cyrillic script*/
+ langPashto = 59, /* Arabic script*/
+ langKurdish = 60, /* smArabic script*/
+ langKashmiri = 61, /* Arabic script*/
+ langSindhi = 62, /* Arabic script*/
+ langTibetan = 63, /* smTibetan script*/
+ langNepali = 64, /* smDevanagari script*/
+ langSanskrit = 65, /* smDevanagari script*/
+ langMarathi = 66, /* smDevanagari script*/
+ langBengali = 67, /* smBengali script*/
+ langAssamese = 68, /* smBengali script*/
+ langGujarati = 69, /* smGujarati script*/
+ langPunjabi = 70 /* smGurmukhi script*/
+};
+
+enum {
+ langOriya = 71, /* smOriya script*/
+ langMalayalam = 72, /* smMalayalam script*/
+ langKannada = 73, /* smKannada script*/
+ langTamil = 74, /* smTamil script*/
+ langTelugu = 75, /* smTelugu script*/
+ langSinhalese = 76, /* smSinhalese script*/
+ langBurmese = 77, /* smBurmese script*/
+ langKhmer = 78, /* smKhmer script*/
+ langLao = 79, /* smLao script*/
+ langVietnamese = 80, /* smVietnamese script*/
+ langIndonesian = 81, /* smRoman script*/
+ langTagalog = 82, /* Roman script*/
+ langMalayRoman = 83, /* Malay in smRoman script*/
+ langMalayArabic = 84, /* Malay in Arabic script*/
+ langAmharic = 85, /* smEthiopic script*/
+ langTigrinya = 86, /* smEthiopic script*/
+ langOromo = 87, /* smEthiopic script*/
+ langSomali = 88, /* smRoman script*/
+ langSwahili = 89, /* smRoman script*/
+ langKinyarwanda = 90, /* smRoman script*/
+ langRuanda = 90, /* synonym for langKinyarwanda*/
+ langRundi = 91, /* smRoman script*/
+ langNyanja = 92, /* smRoman script*/
+ langChewa = 92, /* synonym for langNyanja*/
+ langMalagasy = 93, /* smRoman script*/
+ langEsperanto = 94 /* Roman script*/
+};
+
+enum {
+ langWelsh = 128, /* modified smRoman/Celtic script*/
+ langBasque = 129, /* smRoman script*/
+ langCatalan = 130, /* smRoman script*/
+ langLatin = 131, /* smRoman script*/
+ langQuechua = 132, /* smRoman script*/
+ langGuarani = 133, /* smRoman script*/
+ langAymara = 134, /* smRoman script*/
+ langTatar = 135, /* Cyrillic script*/
+ langUighur = 136, /* Arabic script*/
+ langDzongkha = 137, /* (lang of Bhutan) smTibetan script*/
+ langJavaneseRom = 138, /* Javanese in smRoman script*/
+ langSundaneseRom = 139, /* Sundanese in smRoman script*/
+ langGalician = 140, /* smRoman script*/
+ langAfrikaans = 141 /* smRoman script */
+};
+
+enum {
+ langBreton = 142, /* smRoman or modified smRoman/Celtic script */
+ langInuktitut = 143, /* Inuit script using smEthiopic script code */
+ langScottishGaelic = 144, /* smRoman or modified smRoman/Celtic script */
+ langManxGaelic = 145, /* smRoman or modified smRoman/Celtic script */
+ langIrishGaelicScript = 146, /* modified smRoman/Gaelic script (using dot above) */
+ langTongan = 147, /* smRoman script */
+ langGreekPoly = 148, /* smGreek script */
+ langGreenlandic = 149 /* smRoman script */
+};
+
+enum {
+ langUnspecified = 32767 /* Special code for use in resources (such as 'itlm') */
+};
+
+/*
+ Obsolete language code names (kept for backward compatibility):
+ Misspelled, ambiguous, misleading, considered pejorative, archaic, etc.
+*/
+enum {
+ langPortugese = 8, /* Use langPortuguese*/
+ langMalta = 16, /* Use langMaltese*/
+ langYugoslavian = 18, /* (use langCroatian, langSerbian, etc.)*/
+ langChinese = 19, /* (use langTradChinese or langSimpChinese)*/
+ langLettish = 28, /* Use langLatvian */
+ langLapponian = 29, /* Use langSami*/
+ langLappish = 29, /* Use langSami*/
+ langSaamisk = 29, /* Use langSami */
+ langFaeroese = 30, /* Use langFaroese */
+ langIrish = 35, /* Use langIrishGaelic */
+ langGalla = 87, /* Use langOromo */
+ langAfricaans = 141 /* Use langAfrikaans */
+};
+
+/*
+ Region codes:
+ These typically specify a combination of a language code and a particular region.
+ Some of these numeric values are reserved just for extra resource IDs associated
+ with certain regions; these are not actual region codes, and are noted in the comments.
+ Not all of the region codes are currently supported by Apple software.
+ When relevant, the following list also provides:
+ - The Apple part number (P/N) code for software localized for the specified region.
+ - The two-letter ISO language and country codes (from ISO 639 and ISO 3166). The
+ language code (lowercase) is first, then '_', then the country code (uppercase).
+*/
+
+enum {
+ /* P/N ISO codes comments*/
+ verUS = 0, /* en_US*/
+ verFrance = 1, /* F fr_FR*/
+ verBritain = 2, /* B en_GB*/
+ verGermany = 3, /* D de_DE*/
+ verItaly = 4, /* T it_IT*/
+ verNetherlands = 5, /* N nl_NL*/
+ verFlemish = 6, /* FN nl_BE Flemish (Dutch) for Belgium */
+ verSweden = 7, /* S sv_SE*/
+ verSpain = 8, /* E es_ES Spanish for Spain*/
+ verDenmark = 9, /* DK da_DK*/
+ verPortugal = 10, /* PO pt_PT Portuguese for Portugal*/
+ verFrCanada = 11, /* C fr_CA French for Canada*/
+ verNorway = 12, /* H no_NO Bokm.l*/
+ verIsrael = 13, /* HB iw_IL Hebrew*/
+ verJapan = 14, /* J ja_JP*/
+ verAustralia = 15, /* X en_AU English for Australia*/
+ verArabic = 16, /* AB ar Arabic for N Africa, Arabian peninsula, Levant*/
+ verFinland = 17, /* K fi_FI*/
+ verFrSwiss = 18, /* SF fr_CH French Swiss*/
+ verGrSwiss = 19, /* SD de_CH German Swiss*/
+ verGreece = 20, /* GR el_GR Monotonic Greek (modern)*/
+ verIceland = 21, /* IS is_IS*/
+ verMalta = 22, /* MA mt_MT*/
+ verCyprus = 23, /* CY _CY Greek or Turkish language? Checking...*/
+ verTurkey = 24, /* TU tr_TR*/
+ verYugoCroatian = 25 /* YU Croatian for Yugoslavia; now use verCroatia (68)*/
+};
+
+enum {
+ verNetherlandsComma = 26, /* ID for KCHR resource - Dutch*/
+ verBelgiumLuxPoint = 27, /* ID for KCHR resource - Belgium*/
+ verCanadaComma = 28, /* ID for KCHR resource - Canadian ISO*/
+ verCanadaPoint = 29, /* ID for KCHR resource - Canadian; now unused*/
+ vervariantPortugal = 30, /* ID for resource; now unused*/
+ vervariantNorway = 31, /* ID for resource; now unused*/
+ vervariantDenmark = 32 /* ID for KCHR resource - Danish Mac Plus*/
+};
+
+enum {
+ verIndiaHindi = 33, /* hi_IN Hindi for India*/
+ verPakistanUrdu = 34, /* UR ur_PK Urdu for Pakistan */
+ verTurkishModified = 35,
+ verItalianSwiss = 36, /* ST it_CH Italian Swiss*/
+ verInternational = 37, /* Z en English for international use */
+ /* 38 is unassigned*/
+ verRomania = 39, /* RO ro_RO*/
+ verGreecePoly = 40, /* Polytonic Greek (classical) */
+ verLithuania = 41, /* LT lt_LT*/
+ verPoland = 42, /* PL pl_PL*/
+ verHungary = 43, /* MG hu_HU*/
+ verEstonia = 44, /* EE et_EE*/
+ verLatvia = 45, /* LV lv_LV*/
+ verSami = 46, /* se */
+ verFaroeIsl = 47, /* FA fo_FO */
+ verIran = 48, /* PS fa_IR Persian/Farsi*/
+ verRussia = 49, /* RS ru_RU Russian*/
+ verIreland = 50, /* GA ga_IE Irish Gaelic for Ireland (without dot above) */
+ verKorea = 51, /* KH ko_KR*/
+ verChina = 52, /* CH zh_CN Simplified Chinese*/
+ verTaiwan = 53, /* TA zh_TW Traditional Chinese*/
+ verThailand = 54, /* TH th_TH*/
+ verScriptGeneric = 55, /* SS Generic script system (no language or script) */
+ verCzech = 56, /* CZ cs_CZ*/
+ verSlovak = 57, /* SL sk_SK*/
+ verFarEastGeneric = 58, /* FE Generic Far East system (no language or script) */
+ verMagyar = 59, /* Unused; see verHungary*/
+ verBengali = 60, /* bn Bangladesh or India*/
+ verByeloRussian = 61 /* BY be_BY*/
+};
+
+enum {
+ verUkraine = 62, /* UA uk_UA*/
+ /* 63 is unassigned*/
+ verGreeceAlt = 64, /* unused */
+ verSerbian = 65, /* SR sr_YU, sh_YU */
+ verSlovenian = 66, /* SV sl_SI */
+ verMacedonian = 67, /* MD mk_MK */
+ verCroatia = 68, /* CR hr_HR, sh_HR*/
+ /* 69 is unassigned*/
+ /* 70 is unassigned*/
+ verBrazil = 71, /* BR pt_BR Portuguese for Brazil*/
+ verBulgaria = 72, /* BG bg_BG*/
+ verCatalonia = 73, /* CA ca_ES Catalan for Spain*/
+ verMultilingual = 74, /* ZM (no language or script)*/
+ verScottishGaelic = 75, /* GD gd*/
+ verManxGaelic = 76, /* GV gv Isle of Man*/
+ verBreton = 77, /* BZ br*/
+ verNunavut = 78, /* IU iu_CA Inuktitut for Canada*/
+ verWelsh = 79, /* CU cy*/
+ /* 80 is ID for KCHR resource - Canadian CSA*/
+ verIrishGaelicScript = 81, /* GS ga_IE Irish Gaelic for Ireland (using dot above)*/
+ verEngCanada = 82, /* V en_CA English for Canada*/
+ verBhutan = 83, /* BH dz_BT Dzongkha for Bhutan*/
+ verArmenian = 84, /* HY hy_AM*/
+ verGeorgian = 85, /* KR ka_GE*/
+ verSpLatinAmerica = 86, /* LA es Spanish for Latin America*/
+ /* 87 is ID for KCHR resource - Spanish ISO*/
+ verTonga = 88, /* TS to_TO*/
+ /* 89 is ID for KCHR resource - Polish Modified*/
+ /* 90 is ID for KCHR resource - Catalan ISO*/
+ verFrenchUniversal = 91, /* fr French generic*/
+ verAustria = 92, /* AU de_AT German for Austria*/
+ /* Y 93 is unused alternate for verSpLatinAmerica*/
+ verGujarati = 94, /* gu_IN*/
+ verPunjabi = 95, /* pa Pakistan or India*/
+ verIndiaUrdu = 96, /* ur_IN Urdu for India*/
+ verVietnam = 97 /* vi_VN*/
+};
+
+enum {
+ verFrBelgium = 98, /* BF fr_BE French for Belgium */
+ verUzbek = 99, /* BD uz_UZ */
+ verSingapore = 100, /* SG */
+ verNynorsk = 101, /* NY _NO Norwegian Nynorsk */
+ verAfrikaans = 102, /* AK af_ZA */
+ verEsperanto = 103, /* eo */
+ verMarathi = 104, /* mr_IN */
+ verTibetan = 105, /* bo */
+ verNepal = 106, /* ne_NP */
+ verGreenland = 107 /* kl */
+};
+
+/*
+ Other extra resource IDs assigned in the same number space:
+ 179 is ID for KCHR & itl_ resources - Cornish
+ 581 is ID for KCHR resource - Irish Gaelic script alternate
+ 582 is ID for KCHR resource - Ogham
+ 779 is ID for KCHR resource - Welsh alternate
+ 1111 is ID for KCHR resource - French numeric
+*/
+
+/*
+ Obsolete region code names (kept for backward compatibility):
+ Misspelled or alternate form, ambiguous, misleading, considered pejorative, archaic, etc.
+*/
+enum {
+ verFrBelgiumLux = 6, /* Incorrect; 6 is Flemish, not French, for Belgium; use verFlemish */
+ verBelgiumLux = 6, /* Use verFlemish*/
+ verArabia = 16, /* Use verArabic*/
+ verYugoslavia = 25, /* Use verYugoCroatian (same number, now unused), or newer verCroatia*/
+ verIndia = 33, /* Use verIndiaHindi*/
+ verPakistan = 34, /* Use verPakistanUrdu */
+ verRumania = 39, /* Alternate for verRomania */
+ verGreekAncient = 40, /* Use verGreecePoly */
+ verLapland = 46, /* Use verSami */
+ verFaeroeIsl = 47, /* Use verFaroeIsl */
+ verGenericFE = 58, /* Use verFarEastGeneric */
+ verBelarus = 61, /* Alternate for verByelorussian */
+ verUkrania = 62, /* Use verUkraine*/
+ verAlternateGr = 64, /* Use verGreeceAlt */
+ verSerbia = 65, /* Alternate for verSerbian */
+ verSlovenia = 66, /* Alternate for verSlovenian */
+ verMacedonia = 67, /* Alternate for verMacedonian */
+ verBrittany = 77, /* Alternate for verBreton */
+ verWales = 79, /* Alternate for verWelsh */
+ verArmenia = 84, /* Alternate for verArmenian */
+ verGeorgia = 85, /* Alternate for verGeorgian */
+ verAustriaGerman = 92, /* Use verAustria */
+ verTibet = 105 /* Use verTibetan */
+};
+
+enum {
+ minCountry = verUS,
+ maxCountry = verGreenland
+};
+
+enum {
+ /* Calendar Codes */
+ calGregorian = 0,
+ calArabicCivil = 1,
+ calArabicLunar = 2,
+ calJapanese = 3,
+ calJewish = 4,
+ calCoptic = 5,
+ calPersian = 6
+};
+
+enum {
+ /* Integer Format Codes */
+ intWestern = 0,
+ intArabic = 1,
+ intRoman = 2,
+ intJapanese = 3,
+ intEuropean = 4,
+ intOutputMask = 0x8000
+};
+
+enum {
+ /* CharByte byte types */
+ smSingleByte = 0,
+ smFirstByte = -1,
+ smLastByte = 1,
+ smMiddleByte = 2
+};
+
+enum {
+ /* CharType field masks */
+ smcTypeMask = 0x000F,
+ smcReserved = 0x00F0,
+ smcClassMask = 0x0F00,
+ smcOrientationMask = 0x1000, /*two-byte script glyph orientation*/
+ smcRightMask = 0x2000,
+ smcUpperMask = 0x4000,
+ smcDoubleMask = 0x8000
+};
+
+enum {
+ /* Basic CharType character types */
+ smCharPunct = 0x0000,
+ smCharAscii = 0x0001,
+ smCharEuro = 0x0007,
+ smCharExtAscii = 0x0007, /* More correct synonym for smCharEuro */
+ /* Additional CharType character types for script systems */
+ smCharKatakana = 0x0002, /*Japanese Katakana*/
+ smCharHiragana = 0x0003, /*Japanese Hiragana*/
+ smCharIdeographic = 0x0004, /*Hanzi, Kanji, Hanja*/
+ smCharTwoByteGreek = 0x0005, /*2-byte Greek in Far East systems*/
+ smCharTwoByteRussian = 0x0006, /*2-byte Cyrillic in Far East systems*/
+ smCharBidirect = 0x0008, /*Arabic/Hebrew*/
+ smCharContextualLR = 0x0009, /*Contextual left-right: Thai, Indic scripts*/
+ smCharNonContextualLR = 0x000A, /*Non-contextual left-right: Cyrillic, Greek*/
+ smCharHangul = 0x000C, /*Korean Hangul*/
+ smCharJamo = 0x000D, /*Korean Jamo*/
+ smCharBopomofo = 0x000E, /*Chinese Bopomofo*/
+ smCharGanaKana = 0x000F, /*Shared for Japanese Hiragana & Katakana*/
+ /* old names for some of above, for backward compatibility */
+ smCharFISKana = 0x0002, /*Katakana*/
+ smCharFISGana = 0x0003, /*Hiragana*/
+ smCharFISIdeo = 0x0004 /*Hanzi, Kanji, Hanja*/
+};
+
+enum {
+ smCharFISGreek = 0x0005, /*2-byte Greek in Far East systems*/
+ smCharFISRussian = 0x0006, /*2-byte Cyrillic in Far East systems*/
+ /* CharType classes for punctuation (smCharPunct) */
+ smPunctNormal = 0x0000,
+ smPunctNumber = 0x0100,
+ smPunctSymbol = 0x0200,
+ smPunctBlank = 0x0300, /* Additional CharType classes for punctuation in two-byte systems */
+ smPunctRepeat = 0x0400, /* repeat marker */
+ smPunctGraphic = 0x0500, /* line graphics */
+ /* CharType Katakana and Hiragana classes for two-byte systems */
+ smKanaSmall = 0x0100, /*small kana character*/
+ smKanaHardOK = 0x0200, /*can have dakuten*/
+ smKanaSoftOK = 0x0300, /*can have dakuten or han-dakuten*/
+ /* CharType Ideographic classes for two-byte systems */
+ smIdeographicLevel1 = 0x0000, /*level 1 char*/
+ smIdeographicLevel2 = 0x0100, /*level 2 char*/
+ smIdeographicUser = 0x0200, /*user char*/
+ /* old names for above, for backward compatibility */
+ smFISClassLvl1 = 0x0000, /*level 1 char*/
+ smFISClassLvl2 = 0x0100, /*level 2 char*/
+ smFISClassUser = 0x0200, /*user char*/
+ /* CharType Jamo classes for Korean systems */
+ smJamoJaeum = 0x0000, /*simple consonant char*/
+ smJamoBogJaeum = 0x0100, /*complex consonant char*/
+ smJamoMoeum = 0x0200, /*simple vowel char*/
+ smJamoBogMoeum = 0x0300 /*complex vowel char*/
+};
+
+enum {
+ /* CharType glyph orientation for two-byte systems */
+ smCharHorizontal = 0x0000, /* horizontal character form, or for both */
+ smCharVertical = 0x1000, /* vertical character form */
+ /* CharType directions */
+ smCharLeft = 0x0000,
+ smCharRight = 0x2000, /* CharType case modifers */
+ smCharLower = 0x0000,
+ smCharUpper = 0x4000, /* CharType character size modifiers (1 or multiple bytes). */
+ smChar1byte = 0x0000,
+ smChar2byte = 0x8000
+};
+
+enum {
+ /* TransliterateText target types for Roman */
+ smTransAscii = 0, /*convert to ASCII*/
+ smTransNative = 1, /*convert to font script*/
+ smTransCase = 0xFE, /*convert case for all text*/
+ smTransSystem = 0xFF, /*convert to system script*/
+ /* TransliterateText target types for two-byte scripts */
+ smTransAscii1 = 2, /*1-byte Roman*/
+ smTransAscii2 = 3, /*2-byte Roman*/
+ smTransKana1 = 4, /*1-byte Japanese Katakana*/
+ smTransKana2 = 5 /*2-byte Japanese Katakana*/
+};
+
+enum {
+ smTransGana2 = 7, /*2-byte Japanese Hiragana (no 1-byte Hiragana)*/
+ smTransHangul2 = 8, /*2-byte Korean Hangul*/
+ smTransJamo2 = 9, /*2-byte Korean Jamo*/
+ smTransBopomofo2 = 10, /*2-byte Chinese Bopomofo*/
+ /* TransliterateText target modifiers */
+ smTransLower = 0x4000, /*target becomes lowercase*/
+ smTransUpper = 0x8000, /*target becomes uppercase*/
+ /* TransliterateText resource format numbers */
+ smTransRuleBaseFormat = 1, /*Rule based trsl resource format */
+ smTransHangulFormat = 2, /*Table based Hangul trsl resource format*/
+ /* TransliterateText property flags */
+ smTransPreDoubleByting = 1, /*Convert all text to double byte before transliteration*/
+ smTransPreLowerCasing = 2 /*Convert all text to lower case before transliteration*/
+};
+
+enum {
+ /* TransliterateText source mask - general */
+ smMaskAll = (long)0xFFFFFFFF, /*Convert all text*/
+ /* TransliterateText source masks */
+ smMaskAscii = 0x00000001, /*2^smTransAscii*/
+ smMaskNative = 0x00000002, /*2^smTransNative*/
+ /* TransliterateText source masks for two-byte scripts */
+ smMaskAscii1 = 0x00000004, /*2^smTransAscii1*/
+ smMaskAscii2 = 0x00000008, /*2^smTransAscii2*/
+ smMaskKana1 = 0x00000010, /*2^smTransKana1*/
+ smMaskKana2 = 0x00000020, /*2^smTransKana2*/
+ smMaskGana2 = 0x00000080, /*2^smTransGana2*/
+ smMaskHangul2 = 0x00000100, /*2^smTransHangul2*/
+ smMaskJamo2 = 0x00000200, /*2^smTransJamo2*/
+ smMaskBopomofo2 = 0x00000400 /*2^smTransBopomofo2*/
+};
+
+enum {
+ /* Result values from GetScriptManagerVariable and SetScriptManagerVariable calls. */
+ smNotInstalled = 0, /*routine not available in script*/
+ smBadVerb = -1, /*Bad verb passed to a routine*/
+ smBadScript = -2 /*Bad script code passed to a routine*/
+};
+
+enum {
+ /* Values for script redraw flag. */
+ smRedrawChar = 0, /*Redraw character only*/
+ smRedrawWord = 1, /*Redraw entire word (2-byte systems)*/
+ smRedrawLine = -1 /*Redraw entire line (bidirectional systems)*/
+};
+
+enum {
+ /* GetScriptManagerVariable and SetScriptManagerVariable verbs */
+ smVersion = 0, /*Script Manager version number*/
+ smMunged = 2, /*Globals change count*/
+ smEnabled = 4, /*Count of enabled scripts, incl Roman*/
+ smBidirect = 6, /*At least one bidirectional script*/
+ smFontForce = 8, /*Force font flag*/
+ smIntlForce = 10, /*Force intl flag*/
+ smForced = 12, /*Script was forced to system script*/
+ smDefault = 14, /*Script was defaulted to Roman script*/
+ smPrint = 16, /*Printer action routine*/
+ smSysScript = 18, /*System script*/
+ smLastScript = 20, /*Last keyboard script*/
+ smKeyScript = 22, /*Keyboard script*/
+ smSysRef = 24, /*System folder refNum*/
+ smKeyCache = 26, /*obsolete*/
+ smKeySwap = 28, /*Swapping table handle*/
+ smGenFlags = 30, /*General flags long*/
+ smOverride = 32, /*Script override flags*/
+ smCharPortion = 34, /*Ch vs SpExtra proportion*/
+ /* New for System 7.0: */
+ smDoubleByte = 36, /*Flag for double-byte script installed*/
+ smKCHRCache = 38, /*Returns pointer to KCHR cache*/
+ smRegionCode = 40, /*Returns current region code (verXxx)*/
+ smKeyDisableState = 42 /*Returns current keyboard disable state*/
+};
+
+enum {
+ /* GetScriptVariable and SetScriptVariable verbs. */
+ /* Note: Verbs private to script systems are negative, while */
+ /* those general across script systems are non-negative. */
+ smScriptVersion = 0, /*Script software version*/
+ smScriptMunged = 2, /*Script entry changed count*/
+ smScriptEnabled = 4, /*Script enabled flag*/
+ smScriptRight = 6, /*Right to left flag*/
+ smScriptJust = 8, /*Justification flag*/
+ smScriptRedraw = 10, /*Word redraw flag*/
+ smScriptSysFond = 12, /*Preferred system font*/
+ smScriptAppFond = 14, /*Preferred Application font*/
+ smScriptBundle = 16, /*Beginning of itlb verbs*/
+ smScriptNumber = 16, /*Script itl0 id*/
+ smScriptDate = 18, /*Script itl1 id*/
+ smScriptSort = 20, /*Script itl2 id*/
+ smScriptFlags = 22, /*flags word*/
+ smScriptToken = 24, /*Script itl4 id*/
+ smScriptEncoding = 26, /*id of optional itl5, if present*/
+ smScriptLang = 28 /*Current language for script*/
+};
+
+enum {
+ smScriptNumDate = 30, /*Script Number/Date formats.*/
+ smScriptKeys = 32, /*Script KCHR id*/
+ smScriptIcon = 34, /*ID # of SICN or kcs#/kcs4/kcs8 suite*/
+ smScriptPrint = 36, /*Script printer action routine*/
+ smScriptTrap = 38, /*Trap entry pointer*/
+ smScriptCreator = 40, /*Script file creator*/
+ smScriptFile = 42, /*Script file name*/
+ smScriptName = 44, /*Script name*/
+ /* There is a hole here for old Kanji private verbs 46-76 */
+ /* New for System 7.0: */
+ smScriptMonoFondSize = 78, /*default monospace FOND (hi) & size (lo)*/
+ smScriptPrefFondSize = 80, /*preferred FOND (hi) & size (lo)*/
+ smScriptSmallFondSize = 82, /*default small FOND (hi) & size (lo)*/
+ smScriptSysFondSize = 84, /*default system FOND (hi) & size (lo)*/
+ smScriptAppFondSize = 86, /*default app FOND (hi) & size (lo)*/
+ smScriptHelpFondSize = 88, /*default Help Mgr FOND (hi) & size (lo)*/
+ smScriptValidStyles = 90, /*mask of valid styles for script*/
+ smScriptAliasStyle = 92 /*style (set) to use for aliases*/
+};
+
+/* special negative verbs for Get/SetScriptVariable that were associated with WorldScriptI */
+/* move them here to be public */
+enum {
+ /* WorldScript private verbs */
+ smLayoutCache = -309, /* HiWrd(param) is # entries, LoWrd is max input length*/
+ smOldVerbSupport = -311, /* param is added to old verbs to map to WSI verb*/
+ smSetKashidas = -291, /* param is ON or OFF, old verb = -36*/
+ smSetKashProp = -287, /* param is kashida proportion, old verb = -32*/
+ smScriptSysBase = -281, /* param is associated font to use w/ system font (old verb = -26)*/
+ smScriptAppBase = -283, /* param is associated font to use w/ app font (old verb = -28)*/
+ smScriptFntBase = -285, /* param is associated font to use w/ all other fonts (old verb = -30)*/
+ smScriptLigatures = -263, /* old verb = -8*/
+ smScriptNumbers = -267 /* old verb = -12*/
+};
+
+enum {
+ /* Special script code values for International Utilities */
+ iuSystemScript = -1, /* <obsolete> system script */
+ iuCurrentScript = -2 /* <obsolete> current script (for font of grafPort) */
+};
+
+enum {
+ /* Negative verbs for KeyScript */
+ smKeyNextScript = -1, /* Switch to next available script */
+ smKeySysScript = -2, /* Switch to the system script */
+ smKeySwapScript = -3, /* Switch to previously-used script */
+ /* New for System 7.0: */
+ smKeyNextKybd = -4, /* Switch to next keyboard in current keyscript */
+ smKeySwapKybd = -5, /* Switch to previously-used keyboard in current keyscript */
+ smKeyDisableKybds = -6, /* Disable keyboards not in system or Roman script */
+ smKeyEnableKybds = -7, /* Re-enable keyboards for all enabled scripts */
+ smKeyToggleInline = -8, /* Toggle inline input for current keyscript */
+ smKeyToggleDirection = -9, /* Toggle default line direction (TESysJust) */
+ smKeyNextInputMethod = -10, /* Switch to next input method in current keyscript */
+ smKeySwapInputMethod = -11, /* Switch to last-used input method in current keyscript */
+ smKeyDisableKybdSwitch = -12, /* Disable switching from the current keyboard */
+ smKeySetDirLeftRight = -15, /* Set default line dir to left-right, align left */
+ smKeySetDirRightLeft = -16, /* Set default line dir to right-left, align right */
+ smKeyRoman = -17 /* Set keyscript to Roman. Does nothing if Roman-only system, unlike KeyScript(smRoman) which forces an update to current default Roman keyboard */
+};
+
+/* Optional font and keyboard script synchronization */
+enum {
+ /* One more flag in the smGenFlags long. */
+ smfDisableKeyScriptSync = 27 /*Disable font and keyboard script synchronization*/
+};
+
+enum {
+ /* We should define masks, too. */
+ smfDisableKeyScriptSyncMask = 1L << smfDisableKeyScriptSync /*Disable font and keyboard script synchronization mask*/
+};
+
+enum {
+ /* Force keyboard script switching flag and mask for zero and positive KeyScript verbs */
+ smKeyForceKeyScriptBit = 7, /* Force keyboard script switching flag */
+ smKeyForceKeyScriptMask = 1 << smKeyForceKeyScriptBit /* its mask */
+};
+
+enum {
+ /* Bits in the smScriptFlags word */
+ /* (bits above 8 are non-static) */
+ smsfIntellCP = 0, /*Script has intelligent cut & paste*/
+ smsfSingByte = 1, /*Script has only single bytes*/
+ smsfNatCase = 2, /*Native chars have upper & lower case*/
+ smsfContext = 3, /*Script is contextual*/
+ smsfNoForceFont = 4, /*Script will not force characters*/
+ smsfB0Digits = 5, /*Script has alternate digits at B0-B9*/
+ smsfAutoInit = 6, /*Auto initialize the script*/
+ smsfUnivExt = 7, /*Script is handled by universal extension*/
+ smsfSynchUnstyledTE = 8, /*Script synchronizes for unstyled TE*/
+ smsfForms = 13, /*Uses contextual forms for letters*/
+ smsfLigatures = 14, /*Uses contextual ligatures*/
+ smsfReverse = 15, /*Reverses native text, right-left*/
+ /* Bits in the smGenFlags long. */
+ /* First (high-order) byte is set from itlc flags byte. */
+ smfShowIcon = 31, /*Show icon even if only one script*/
+ smfDualCaret = 30, /*Use dual caret for mixed direction text*/
+ smfNameTagEnab = 29, /*Reserved for internal use*/
+ smfUseAssocFontInfo = 28 /*Use the associated font info for FontMetrics calls <48>*/
+};
+
+enum {
+ /* Roman script constants */
+ /* The following are here for backward compatibility, but should not be used. */
+ /* This information should be obtained using GetScript. */
+ romanSysFond = 0x3FFF, /*system font id number*/
+ romanAppFond = 3, /*application font id number*/
+ romanFlags = 0x0007, /*roman settings*/
+ /* Script Manager font equates. */
+ smFondStart = 0x4000, /*start from 16K*/
+ smFondEnd = 0xC000, /*past end of range at 48K*/
+ /* Miscellaneous font equates. */
+ smUprHalfCharSet = 0x80 /*first char code in top half of std char set*/
+};
+
+enum {
+ /* Character Set Extensions */
+ diaeresisUprY = 0xD9,
+ fraction = 0xDA,
+ intlCurrency = 0xDB,
+ leftSingGuillemet = 0xDC,
+ rightSingGuillemet = 0xDD,
+ fiLigature = 0xDE,
+ flLigature = 0xDF,
+ dblDagger = 0xE0,
+ centeredDot = 0xE1,
+ baseSingQuote = 0xE2,
+ baseDblQuote = 0xE3,
+ perThousand = 0xE4,
+ circumflexUprA = 0xE5,
+ circumflexUprE = 0xE6,
+ acuteUprA = 0xE7,
+ diaeresisUprE = 0xE8,
+ graveUprE = 0xE9,
+ acuteUprI = 0xEA,
+ circumflexUprI = 0xEB,
+ diaeresisUprI = 0xEC,
+ graveUprI = 0xED,
+ acuteUprO = 0xEE,
+ circumflexUprO = 0xEF,
+ appleLogo = 0xF0,
+ graveUprO = 0xF1,
+ acuteUprU = 0xF2,
+ circumflexUprU = 0xF3,
+ graveUprU = 0xF4,
+ dotlessLwrI = 0xF5,
+ circumflex = 0xF6,
+ tilde = 0xF7,
+ macron = 0xF8,
+ breveMark = 0xF9,
+ overDot = 0xFA,
+ ringMark = 0xFB,
+ cedilla = 0xFC,
+ doubleAcute = 0xFD,
+ ogonek = 0xFE,
+ hachek = 0xFF
+};
+
+enum {
+ /* ScriptTokenType values */
+ tokenIntl = 4, /*the itl resource number of the tokenizer*/
+ tokenEmpty = -1 /*used internally as an empty flag*/
+};
+
+enum {
+ tokenUnknown = 0, /*chars that do not match a defined token type*/
+ tokenWhite = 1, /*white space*/
+ tokenLeftLit = 2, /*literal begin*/
+ tokenRightLit = 3, /*literal end*/
+ tokenAlpha = 4, /*alphabetic*/
+ tokenNumeric = 5, /*numeric*/
+ tokenNewLine = 6, /*new line*/
+ tokenLeftComment = 7, /*open comment*/
+ tokenRightComment = 8, /*close comment*/
+ tokenLiteral = 9, /*literal*/
+ tokenEscape = 10, /*character escape (e.g. '\' in "\n", "\t")*/
+ tokenAltNum = 11, /*alternate number (e.g. $B0-B9 in Arabic,Hebrew)*/
+ tokenRealNum = 12, /*real number*/
+ tokenAltReal = 13, /*alternate real number*/
+ tokenReserve1 = 14, /*reserved*/
+ tokenReserve2 = 15, /*reserved*/
+ tokenLeftParen = 16, /*open parenthesis*/
+ tokenRightParen = 17, /*close parenthesis*/
+ tokenLeftBracket = 18, /*open square bracket*/
+ tokenRightBracket = 19 /*close square bracket*/
+};
+
+enum {
+ tokenLeftCurly = 20, /*open curly bracket*/
+ tokenRightCurly = 21, /*close curly bracket*/
+ tokenLeftEnclose = 22, /*open guillemet*/
+ tokenRightEnclose = 23, /*close guillemet*/
+ tokenPlus = 24,
+ tokenMinus = 25,
+ tokenAsterisk = 26, /*times/multiply*/
+ tokenDivide = 27,
+ tokenPlusMinus = 28, /*plus or minus symbol*/
+ tokenSlash = 29,
+ tokenBackSlash = 30,
+ tokenLess = 31, /*less than symbol*/
+ tokenGreat = 32, /*greater than symbol*/
+ tokenEqual = 33,
+ tokenLessEqual2 = 34, /*less than or equal, 2 characters (e.g. <=)*/
+ tokenLessEqual1 = 35, /*less than or equal, 1 character*/
+ tokenGreatEqual2 = 36, /*greater than or equal, 2 characters (e.g. >=)*/
+ tokenGreatEqual1 = 37, /*greater than or equal, 1 character*/
+ token2Equal = 38, /*double equal (e.g. ==)*/
+ tokenColonEqual = 39 /*colon equal*/
+};
+
+enum {
+ tokenNotEqual = 40, /*not equal, 1 character*/
+ tokenLessGreat = 41, /*less/greater, Pascal not equal (e.g. <>)*/
+ tokenExclamEqual = 42, /*exclamation equal, C not equal (e.g. !=)*/
+ tokenExclam = 43, /*exclamation point*/
+ tokenTilde = 44, /*centered tilde*/
+ tokenComma = 45,
+ tokenPeriod = 46,
+ tokenLeft2Quote = 47, /*open double quote*/
+ tokenRight2Quote = 48, /*close double quote*/
+ tokenLeft1Quote = 49, /*open single quote*/
+ tokenRight1Quote = 50, /*close single quote*/
+ token2Quote = 51, /*double quote*/
+ token1Quote = 52, /*single quote*/
+ tokenSemicolon = 53,
+ tokenPercent = 54,
+ tokenCaret = 55,
+ tokenUnderline = 56,
+ tokenAmpersand = 57,
+ tokenAtSign = 58,
+ tokenBar = 59 /*vertical bar*/
+};
+
+enum {
+ tokenQuestion = 60,
+ tokenPi = 61, /*lower-case pi*/
+ tokenRoot = 62, /*square root symbol*/
+ tokenSigma = 63, /*capital sigma*/
+ tokenIntegral = 64, /*integral sign*/
+ tokenMicro = 65,
+ tokenCapPi = 66, /*capital pi*/
+ tokenInfinity = 67,
+ tokenColon = 68,
+ tokenHash = 69, /*e.g. #*/
+ tokenDollar = 70,
+ tokenNoBreakSpace = 71, /*non-breaking space*/
+ tokenFraction = 72,
+ tokenIntlCurrency = 73,
+ tokenLeftSingGuillemet = 74,
+ tokenRightSingGuillemet = 75,
+ tokenPerThousand = 76,
+ tokenEllipsis = 77,
+ tokenCenterDot = 78,
+ tokenNil = 127
+};
+
+enum {
+ delimPad = -2, /* obsolete, misspelled token names kept for backward compatibility */
+ tokenTilda = 44,
+ tokenCarat = 55
+};
+
+enum {
+ /* Table selectors for GetItlTable */
+ smWordSelectTable = 0, /* get word select break table from 'itl2' */
+ smWordWrapTable = 1, /* get word wrap break table from 'itl2' */
+ smNumberPartsTable = 2, /* get default number parts table from 'itl4' */
+ smUnTokenTable = 3, /* get unToken table from 'itl4' */
+ smWhiteSpaceList = 4, /* get white space list from 'itl4' */
+ iuWordSelectTable = 0, /* <obsolete> get word select break table from 'itl2' */
+ iuWordWrapTable = 1, /* <obsolete> get word wrap break table from 'itl2' */
+ iuNumberPartsTable = 2, /* <obsolete> get default number parts table from 'itl4' */
+ iuUnTokenTable = 3, /* <obsolete> get unToken table from 'itl4' */
+ iuWhiteSpaceList = 4 /* <obsolete> get white space list from 'itl4' */
+};
+
+/* end of stuff moved from Packages.h */
+enum {
+ tokenOK = 0, /* TokenResults */
+ tokenOverflow = 1, /* TokenResults */
+ stringOverflow = 2, /* TokenResults */
+ badDelim = 3, /* TokenResults */
+ badEnding = 4, /* TokenResults */
+ crash = 5 /* TokenResults */
+};
+
+typedef SInt8 TokenResults;
+typedef char CharByteTable[256];
+/* "TokenType" was renamed to "ScriptTokenType" because of a name collision in QuickTime 3.0 on other OS's*/
+typedef short ScriptTokenType;
+#if TARGET_OS_MAC
+typedef ScriptTokenType TokenType;
+#endif /* TARGET_OS_MAC */
+
+typedef ScriptTokenType DelimType[2];
+typedef ScriptTokenType CommentType[4];
+
+struct TokenRec {
+ ScriptTokenType theToken;
+ Ptr position; /*pointer into original source*/
+ long length; /*length of text in original source*/
+ StringPtr stringPosition; /*Pascal/C string copy of identifier*/
+};
+typedef struct TokenRec TokenRec;
+typedef TokenRec * TokenRecPtr;
+
+struct TokenBlock {
+ Ptr source; /*pointer to stream of characters*/
+ long sourceLength; /*length of source stream*/
+ Ptr tokenList; /*pointer to array of tokens*/
+ long tokenLength; /*maximum length of TokenList*/
+ long tokenCount; /*number tokens generated by tokenizer*/
+ Ptr stringList; /*pointer to stream of identifiers*/
+ long stringLength; /*length of string list*/
+ long stringCount; /*number of bytes currently used*/
+ Boolean doString; /*make strings & put into StringList*/
+ Boolean doAppend; /*append to TokenList rather than replace*/
+ Boolean doAlphanumeric; /*identifiers may include numeric*/
+ Boolean doNest; /*do comments nest?*/
+ ScriptTokenType leftDelims[2];
+ ScriptTokenType rightDelims[2];
+ ScriptTokenType leftComment[4];
+ ScriptTokenType rightComment[4];
+ ScriptTokenType escapeCode; /*escape symbol code*/
+ ScriptTokenType decimalCode;
+ Handle itlResource; /*handle to itl4 resource of current script*/
+ long reserved[8]; /*must be zero!*/
+};
+typedef struct TokenBlock TokenBlock;
+typedef TokenBlock * TokenBlockPtr;
+EXTERN_API( short )
+GetSysDirection (void) TWOWORDINLINE(0x3EB8, 0x0BAC);
+
+EXTERN_API( void )
+SetSysDirection (short value) TWOWORDINLINE(0x31DF, 0x0BAC);
+
+EXTERN_API( short )
+FontScript (void) FOURWORDINLINE(0x2F3C, 0x8200, 0x0000, 0xA8B5);
+
+EXTERN_API( short )
+IntlScript (void) FOURWORDINLINE(0x2F3C, 0x8200, 0x0002, 0xA8B5);
+
+EXTERN_API( void )
+KeyScript (short code) FOURWORDINLINE(0x2F3C, 0x8002, 0x0004, 0xA8B5);
+
+EXTERN_API( Boolean )
+IsCmdChar (const EventRecord * event,
+ short test) FOURWORDINLINE(0x2F3C, 0x8206, 0xFFD0, 0xA8B5);
+
+EXTERN_API( short )
+FontToScript (short fontNumber) FOURWORDINLINE(0x2F3C, 0x8202, 0x0006, 0xA8B5);
+
+EXTERN_API( long )
+GetScriptManagerVariable (short selector) FOURWORDINLINE(0x2F3C, 0x8402, 0x0008, 0xA8B5);
+
+EXTERN_API( OSErr )
+SetScriptManagerVariable (short selector,
+ long param) FOURWORDINLINE(0x2F3C, 0x8206, 0x000A, 0xA8B5);
+
+EXTERN_API( long )
+GetScriptVariable (short script,
+ short selector) FOURWORDINLINE(0x2F3C, 0x8404, 0x000C, 0xA8B5);
+
+EXTERN_API( OSErr )
+SetScriptVariable (short script,
+ short selector,
+ long param) FOURWORDINLINE(0x2F3C, 0x8208, 0x000E, 0xA8B5);
+
+EXTERN_API( short )
+CharacterByteType (Ptr textBuf,
+ short textOffset,
+ ScriptCode script) FOURWORDINLINE(0x2F3C, 0xC206, 0x0010, 0xA8B5);
+
+EXTERN_API( short )
+CharacterType (Ptr textBuf,
+ short textOffset,
+ ScriptCode script) FOURWORDINLINE(0x2F3C, 0xC206, 0x0012, 0xA8B5);
+
+EXTERN_API( OSErr )
+TransliterateText (Handle srcHandle,
+ Handle dstHandle,
+ short target,
+ long srcMask,
+ ScriptCode script) FOURWORDINLINE(0x2F3C, 0xC20E, 0x0018, 0xA8B5);
+
+EXTERN_API( Boolean )
+FillParseTable (CharByteTable table,
+ ScriptCode script) FOURWORDINLINE(0x2F3C, 0xC204, 0x0022, 0xA8B5);
+
+EXTERN_API( Handle )
+GetIntlResource (short theID) THREEWORDINLINE(0x3F3C, 0x0006, 0xA9ED);
+
+EXTERN_API( void )
+ClearIntlResourceCache (void) THREEWORDINLINE(0x3F3C, 0x0018, 0xA9ED);
+
+EXTERN_API( void )
+GetIntlResourceTable (ScriptCode script,
+ short tableCode,
+ Handle * itlHandle,
+ long * offset,
+ long * length) THREEWORDINLINE(0x3F3C, 0x0024, 0xA9ED);
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( UniversalProcPtr )
+GetScriptUtilityAddress (short selector,
+ Boolean Before,
+ ScriptCode script) FOURWORDINLINE(0x2F3C, 0xC404, 0x0038, 0xA8B5);
+
+EXTERN_API( void )
+SetScriptUtilityAddress (short selector,
+ Boolean Before,
+ UniversalProcPtr routineAddr,
+ ScriptCode script) FOURWORDINLINE(0x2F3C, 0xC008, 0x003A, 0xA8B5);
+
+EXTERN_API( UniversalProcPtr )
+GetScriptQDPatchAddress (short trapNum,
+ Boolean Before,
+ Boolean forPrinting,
+ ScriptCode script) FOURWORDINLINE(0x2F3C, 0xC406, 0x003C, 0xA8B5);
+
+EXTERN_API( void )
+SetScriptQDPatchAddress (short trapNum,
+ Boolean Before,
+ Boolean forPrinting,
+ UniversalProcPtr routineAddr,
+ ScriptCode script) FOURWORDINLINE(0x2F3C, 0xC00A, 0x003E, 0xA8B5);
+
+EXTERN_API( void )
+SetIntlResource (short refNum,
+ short theID,
+ Handle intlHandle) THREEWORDINLINE(0x3F3C, 0x0008, 0xA9ED);
+
+EXTERN_API( short )
+CharByte (Ptr textBuf,
+ short textOffset) FOURWORDINLINE(0x2F3C, 0x8206, 0x0010, 0xA8B5);
+
+EXTERN_API( short )
+CharType (Ptr textBuf,
+ short textOffset) FOURWORDINLINE(0x2F3C, 0x8206, 0x0012, 0xA8B5);
+
+EXTERN_API( OSErr )
+Transliterate (Handle srcHandle,
+ Handle dstHandle,
+ short target,
+ long srcMask) FOURWORDINLINE(0x2F3C, 0x820E, 0x0018, 0xA8B5);
+
+EXTERN_API( Boolean )
+ParseTable (CharByteTable table) FOURWORDINLINE(0x2F3C, 0x8204, 0x0022, 0xA8B5);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( TokenResults )
+IntlTokenize (TokenBlockPtr tokenParam) FOURWORDINLINE(0x2F3C, 0x8204, 0xFFFA, 0xA8B5);
+
+#if OLDROUTINENAMES
+#define SetSysJust(newJust) SetSysDirection(newJust)
+#define GetSysJust() GetSysDirection()
+#define Font2Script(fontNumber) FontToScript(fontNumber)
+#define GetEnvirons(verb) GetScriptManagerVariable(verb)
+#define SetEnvirons(verb, param) SetScriptManagerVariable(verb, param)
+#define GetScript(script, verb) GetScriptVariable(script, verb)
+#define SetScript(script, verb, param) SetScriptVariable(script, verb, param)
+#define IUGetIntl(theID) GetIntlResource(theID)
+#define IUSetIntl(refNum, theID, intlHandle) SetIntlResource(refNum, theID, intlHandle)
+#define IUClearCache() ClearIntlResourceCache()
+#define IUGetItlTable(script, tableCode, itlHandle, offset, length) \
+ GetIntlResourceTable(script, tableCode, itlHandle, offset, length)
+#endif /* OLDROUTINENAMES */
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __SCRIPT__ */
+
diff --git a/include/qt/SegLoad.h b/include/qt/SegLoad.h
new file mode 100644
index 000000000..6aa31c1c6
--- /dev/null
+++ b/include/qt/SegLoad.h
@@ -0,0 +1,140 @@
+/*
+ File: SegLoad.h
+
+ Contains: Segment Loader Interfaces.
+
+ Version: Technology: Mac OS 8
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __SEGLOAD__
+#define __SEGLOAD__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if TARGET_CPU_68K && !TARGET_RT_MAC_CFM || !TARGET_OS_MAC
+/*
+ CountAppFiles, GetAppFiles, ClrAppFiles, GetAppParms, getappparms,
+ and the AppFile data structure and enums are obsolete.
+ They are still supported for writing old style 68K apps,
+ but they are not supported for CFM-based apps.
+ Use AppleEvents to determine which files are to be
+ opened or printed from the Finder.
+*/
+enum {
+ appOpen = 0, /*Open the Document (s)*/
+ appPrint = 1 /*Print the Document (s)*/
+};
+
+
+struct AppFile {
+ short vRefNum;
+ OSType fType;
+ short versNum; /*versNum in high byte*/
+ Str255 fName;
+};
+typedef struct AppFile AppFile;
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+CountAppFiles (short * message,
+ short * count);
+
+EXTERN_API( void )
+GetAppFiles (short index,
+ AppFile * theFile);
+
+EXTERN_API( void )
+ClrAppFiles (short index);
+
+EXTERN_API( void )
+GetAppParms (Str255 apName,
+ short * apRefNum,
+ Handle * apParam) ONEWORDINLINE(0xA9F5);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( void )
+getappparms (char * apName,
+ short * apRefNum,
+ Handle * apParam);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_CPU_68K && !TARGET_RT_MAC_CFM || !TARGET_OS_MAC */
+
+
+/*
+ Because PowerPC applications don't have segments.
+ But, in order to allow applications to not have conditionalized
+ source code, UnloadSeg is macro'ed away for PowerPC.
+*/
+#if TARGET_CPU_68K
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+UnloadSeg (void * routineAddr) ONEWORDINLINE(0xA9F1);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+#define UnloadSeg(x)
+#endif /* TARGET_CPU_68K */
+
+/* ExitToShell() has moved to Process.h*/
+
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __SEGLOAD__ */
+
diff --git a/include/qt/Serial.h b/include/qt/Serial.h
new file mode 100644
index 000000000..f6a155305
--- /dev/null
+++ b/include/qt/Serial.h
@@ -0,0 +1,312 @@
+/*
+ File: Serial.h
+
+ Contains: Asynchronous Serial Driver (.AIn/.AOut/.BIn/.BOut) Interfaces
+
+ Version: Technology: System 7.6+
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __SERIAL__
+#define __SERIAL__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ baud150 = 763,
+ baud300 = 380,
+ baud600 = 189,
+ baud1200 = 94,
+ baud1800 = 62,
+ baud2400 = 46,
+ baud3600 = 30,
+ baud4800 = 22,
+ baud7200 = 14,
+ baud9600 = 10,
+ baud14400 = 6,
+ baud19200 = 4,
+ baud28800 = 2,
+ baud38400 = 1,
+ baud57600 = 0
+};
+
+enum {
+ stop10 = 16384,
+ stop15 = -32768L,
+ stop20 = -16384
+};
+
+enum {
+ noParity = 0,
+ oddParity = 4096,
+ evenParity = 12288
+};
+
+enum {
+ data5 = 0,
+ data6 = 2048,
+ data7 = 1024,
+ data8 = 3072
+};
+
+enum {
+ aData = 6, /* channel A data in or out (historical) */
+ aCtl = 2, /* channel A control (historical) */
+ bData = 4, /* channel B data in or out (historical) */
+ bCtl = 0 /* channel B control (historical) */
+};
+
+enum {
+ dsrEvent = 2, /* flag for SerShk.evts */
+ riEvent = 4, /* flag for SerShk.evts */
+ dcdEvent = 8, /* flag for SerShk.evts */
+ ctsEvent = 32, /* flag for SerShk.evts */
+ breakEvent = 128 /* flag for SerShk.evts */
+};
+
+enum {
+ xOffWasSent = 128, /* flag for SerStaRec.xOffSent */
+ dtrNegated = 64, /* flag for SerStaRec.xOffSent */
+ rtsNegated = 32 /* flag for SerStaRec.xOffSent */
+};
+
+enum {
+ ainRefNum = -6, /* serial port A input */
+ aoutRefNum = -7, /* serial port A output */
+ binRefNum = -8, /* serial port B input */
+ boutRefNum = -9 /* serial port B output */
+};
+
+enum {
+ swOverrunErr = 1, /* serial driver error masks */
+ breakErr = 8, /* serial driver error masks */
+ parityErr = 16, /* serial driver error masks */
+ hwOverrunErr = 32, /* serial driver error masks */
+ framingErr = 64 /* serial driver error masks */
+};
+
+enum {
+ kOptionPreserveDTR = 128, /* option bit used with Control code 16 */
+ kOptionClockX1CTS = 64 /* option bit used with Control code 16 */
+};
+
+enum {
+ kUseCTSOutputFlowControl = 128, /* flag for SerShk.fCTS */
+ kUseDSROutputFlowControl = 64, /* flag for SerShk.fCTS */
+ kUseRTSInputFlowControl = 128, /* flag for SerShk.fDTR */
+ kUseDTRInputFlowControl = 64 /* flag for SerShk.fDTR */
+};
+
+enum {
+ sPortA = 0, /* Macintosh modem port */
+ sPortB = 1, /* Macintosh printer port */
+ sCOM1 = 2, /* RS-232 port COM1 */
+ sCOM2 = 3 /* RS-232 port COM2 */
+};
+
+typedef SInt8 SPortSel;
+/* csCodes for serial driver Control routines */
+enum {
+ kSERDConfiguration = 8, /* program port speed, bits/char, parity, and stop bits */
+ kSERDInputBuffer = 9, /* set buffer for chars received with no read pending */
+ kSERDSerHShake = 10, /* equivalent to SerHShake, largely obsolete */
+ kSERDClearBreak = 11, /* assert break signal on output */
+ kSERDSetBreak = 12, /* negate break state on output */
+ kSERDBaudRate = 13, /* set explicit baud rate, other settings unchanged */
+ kSERDHandshake = 14, /* superset of 10, honors setting of fDTR */
+ kSERDClockMIDI = 15, /* clock externally on CTS with specified multiplier */
+ kSERDMiscOptions = 16, /* select clock source and DTR behavior on close */
+ kSERDAssertDTR = 17, /* assert DTR output */
+ kSERDNegateDTR = 18, /* negate DTR output */
+ kSERDSetPEChar = 19, /* select char to replace chars with invalid parity */
+ kSERDSetPEAltChar = 20, /* select char to replace char that replaces chars with invalid parity */
+ kSERDSetXOffFlag = 21, /* set XOff output flow control (same as receiving XOff) */
+ kSERDClearXOffFlag = 22, /* clear XOff output flow control (same as receiving XOn) */
+ kSERDSendXOn = 23, /* send XOn if input flow control state is XOff */
+ kSERDSendXOnOut = 24, /* send XOn regardless of input flow control state */
+ kSERDSendXOff = 25, /* send XOff if input flow control state is XOn */
+ kSERDSendXOffOut = 26, /* send XOff regardless of input flow control state */
+ kSERDResetChannel = 27, /* reset serial I/O channel hardware */
+ kSERDHandshakeRS232 = 28, /* extension of 14, allows full RS-232 hardware handshaking */
+ kSERDStickParity = 29, /* use mark/space parity */
+ kSERDAssertRTS = 30, /* assert RTS output */
+ kSERDNegateRTS = 31, /* negate RTS output */
+ kSERD115KBaud = 115, /* set 115.2K baud data rate */
+ kSERD230KBaud = 230 /* set 230.4K baud data rate */
+};
+
+
+/* csCodes for serial driver Status routines */
+enum {
+ kSERDInputCount = 2, /* return characters available (SerGetBuf) */
+ kSERDStatus = 8, /* return characters available (SerStatus) */
+ kSERDVersion = 9, /* return version number in first byte of csParam */
+ kSERDGetDCD = 256 /* get instantaneous state of DCD (GPi) */
+};
+
+
+
+struct SerShk {
+ Byte fXOn; /* XOn/XOff output flow control flag */
+ Byte fCTS; /* hardware output flow control flags */
+ unsigned char xOn; /* XOn character */
+ unsigned char xOff; /* XOff character */
+ Byte errs; /* errors mask bits */
+ Byte evts; /* event enable mask bits */
+ Byte fInX; /* XOn/XOff input flow control flag */
+ Byte fDTR; /* hardware input flow control flags */
+};
+typedef struct SerShk SerShk;
+
+struct SerStaRec {
+ Byte cumErrs; /* errors accumulated since last SerStatus() call */
+ Byte xOffSent; /* input (requested to be) held off by xOffWasSent or dtrNegated or rtsNegated */
+ Byte rdPend; /* incomplete read pending in I/O queue */
+ Byte wrPend; /* incomplete write pending in I/O queue */
+ Byte ctsHold; /* transmit disabled by hardware handshaking */
+ Byte xOffHold; /* transmit disabled by XOn/XOff handshaking */
+ Byte dsrHold; /* transmit disabled: external device not ready */
+ Byte modemStatus; /* reports modem status according to SerShk.evts */
+};
+typedef struct SerStaRec SerStaRec;
+#if OLDROUTINENAMES
+/* ********************************************************************************************* */
+/* The following constant names have been retired in favor of standard, more descriptive names. */
+/* You can still compile old code by defining OLDROUTINENAMES. There were several constants that */
+/* were formerly available that have been removed, as they are now regarded as either private or */
+/* unsupported. We advise that you stop using any constants that are not defined in this file. */
+/* ********************************************************************************************* */
+enum {
+ serdOptionClockExternal = kOptionClockX1CTS, /* option bit used with Control code 16 */
+ serdOptionPreserveDTR = kOptionPreserveDTR /* option bit used with Control code 16 */
+};
+
+/* csCodes for serial driver Control routines */
+enum {
+ serdReset = kSERDConfiguration,
+ serdSetBuf = kSERDInputBuffer,
+ serdHShake = kSERDSerHShake,
+ serdClrBrk = kSERDClearBreak,
+ serdSetBrk = kSERDSetBreak,
+ serdSetBaud = kSERDBaudRate,
+ serdHShakeDTR = kSERDHandshake,
+ serdSetMIDI = kSERDClockMIDI,
+ serdSetMisc = kSERDMiscOptions,
+ serdSetDTR = kSERDAssertDTR,
+ serdClrDTR = kSERDNegateDTR,
+ serdSetPEChar = kSERDSetPEChar,
+ serdSetPECharAlternate = kSERDSetPEAltChar,
+ serdSetXOff = kSERDSetXOffFlag,
+ serdClrXOff = kSERDClearXOffFlag,
+ serdSendXOnConditional = kSERDSendXOn,
+ serdSendXOn = kSERDSendXOnOut,
+ serdSendXOffConditional = kSERDSendXOff,
+ serdSendXOff = kSERDSendXOffOut,
+ serdChannelReset = kSERDResetChannel,
+ serdSet230KBaud = kSERD230KBaud /* set 230K baud data rate */
+};
+
+
+/* csCodes for serial driver Status routines */
+enum {
+ serdGetBuf = kSERDInputCount,
+ serdStatus = kSERDStatus,
+ serdGetVers = kSERDVersion
+};
+
+#endif /* OLDROUTINENAMES */
+
+/*
+ The following interfaces are for the legacy high-level serial driver glue in
+ the interface libraries of your development system. They merely substitue for
+ the corresponding synchronous calls to PBControl and PBStatus.
+
+ They have not been updated as the serial driver API has evolved. Take note:
+
+ SerHShake does not support hardware input flow control. Use csCode 14.
+ SerStatus returns only the first six bytes of SerStaRec (through xOffHold).
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+SerReset (short refNum,
+ short serConfig);
+
+EXTERN_API( OSErr )
+SerSetBuf (short refNum,
+ Ptr serBPtr,
+ short serBLen);
+
+EXTERN_API( OSErr )
+SerHShake (short refNum,
+ const SerShk * flags);
+
+EXTERN_API( OSErr )
+SerSetBrk (short refNum);
+
+EXTERN_API( OSErr )
+SerClrBrk (short refNum);
+
+EXTERN_API( OSErr )
+SerGetBuf (short refNum,
+ long * count);
+
+EXTERN_API( OSErr )
+SerStatus (short refNum,
+ SerStaRec * serSta);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __SERIAL__ */
+
diff --git a/include/qt/ShutDown.h b/include/qt/ShutDown.h
new file mode 100644
index 000000000..671a4c1f9
--- /dev/null
+++ b/include/qt/ShutDown.h
@@ -0,0 +1,134 @@
+/*
+ File: ShutDown.h
+
+ Contains: Shutdown Manager Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1987-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __SHUTDOWN__
+#define __SHUTDOWN__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ sdOnPowerOff = 1, /*call procedure before power off.*/
+ sdOnRestart = 2, /*call procedure before restart.*/
+ sdOnUnmount = 4, /*call procedure before unmounting.*/
+ sdOnDrivers = 8, /*call procedure before closing drivers.*/
+ sdOnBootVolUnmount = 16, /*call procedure before unmounting boot volume and VM volume but after unmounting all other volumes*/
+ sdRestartOrPower = 3 /*call before either power off or restart.*/
+};
+
+#if CALL_NOT_IN_CARBON
+typedef CALLBACK_API( void , ShutDwnProcPtr )(short shutDownStage);
+/*
+ WARNING: ShutDwnProcPtr uses register based parameters under classic 68k
+ and cannot be written in a high-level language without
+ the help of mixed mode or assembly glue.
+*/
+typedef REGISTER_UPP_TYPE(ShutDwnProcPtr) ShutDwnUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(ShutDwnUPP)
+ NewShutDwnUPP (ShutDwnProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeShutDwnUPP (ShutDwnUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeShutDwnUPP (short shutDownStage,
+ ShutDwnUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppShutDwnProcInfo = 0x00001002 }; /* register no_return_value Func(2_bytes:D0) */
+ #define NewShutDwnUPP(userRoutine) (ShutDwnUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppShutDwnProcInfo, GetCurrentArchitecture())
+ #define DisposeShutDwnUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter InvokeShutDwnUPP(__D0, __A0)
+ void InvokeShutDwnUPP(short shutDownStage, ShutDwnUPP userUPP) = 0x4E90;
+ #else
+ #define InvokeShutDwnUPP(shutDownStage, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppShutDwnProcInfo, (shutDownStage))
+ #endif
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewShutDwnProc(userRoutine) NewShutDwnUPP(userRoutine)
+#define CallShutDwnProc(userRoutine, shutDownStage) InvokeShutDwnUPP(shutDownStage, userRoutine)
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+ShutDwnPower (void) THREEWORDINLINE(0x3F3C, 0x0001, 0xA895);
+
+EXTERN_API( void )
+ShutDwnStart (void) THREEWORDINLINE(0x3F3C, 0x0002, 0xA895);
+
+EXTERN_API( void )
+ShutDwnInstall (ShutDwnUPP shutDownProc,
+ short flags) THREEWORDINLINE(0x3F3C, 0x0003, 0xA895);
+
+EXTERN_API( void )
+ShutDwnRemove (ShutDwnUPP shutDownProc) THREEWORDINLINE(0x3F3C, 0x0004, 0xA895);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __SHUTDOWN__ */
+
diff --git a/include/qt/Slots.h b/include/qt/Slots.h
new file mode 100644
index 000000000..80a711a31
--- /dev/null
+++ b/include/qt/Slots.h
@@ -0,0 +1,562 @@
+/*
+ File: Slots.h
+
+ Contains: Slot Manager Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1986-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __SLOTS__
+#define __SLOTS__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __EVENTS__
+#include "Events.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ fCardIsChanged = 1, /*Card is Changed field in StatusFlags field of sInfoArray*/
+ fCkForSame = 0, /*For SearchSRT. Flag to check for SAME sResource in the table. */
+ fCkForNext = 1, /*For SearchSRT. Flag to check for NEXT sResource in the table. */
+ fWarmStart = 2 /*If this bit is set then warm start else cold start.*/
+};
+
+enum {
+ stateNil = 0, /*State*/
+ stateSDMInit = 1, /*:Slot declaration manager Init*/
+ statePRAMInit = 2, /*:sPRAM record init*/
+ statePInit = 3, /*:Primary init*/
+ stateSInit = 4 /*:Secondary init*/
+};
+
+enum {
+ /* flags for spParamData */
+ fall = 0, /* bit 0: set=search enabled/disabled sRsrc's */
+ foneslot = 1, /* 1: set=search sRsrc's in given slot only */
+ fnext = 2 /* 2: set=search for next sRsrc */
+};
+
+enum {
+ /* Misc masks */
+ catMask = 0x08, /* sets spCategory field of spTBMask (bit 3) */
+ cTypeMask = 0x04, /* sets spCType field of spTBMask (bit 2) */
+ drvrSWMask = 0x02, /* sets spDrvrSW field of spTBMask (bit 1) */
+ drvrHWMask = 0x01 /* sets spDrvrHW field of spTBMask (bit 0) */
+};
+
+typedef CALLBACK_API( short , SlotIntServiceProcPtr )(long sqParameter);
+/*
+ WARNING: SlotIntServiceProcPtr uses register based parameters under classic 68k
+ and cannot be written in a high-level language without
+ the help of mixed mode or assembly glue.
+*/
+typedef REGISTER_UPP_TYPE(SlotIntServiceProcPtr) SlotIntServiceUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(SlotIntServiceUPP)
+ NewSlotIntServiceUPP (SlotIntServiceProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeSlotIntServiceUPP (SlotIntServiceUPP userUPP);
+
+ EXTERN_API(short)
+ InvokeSlotIntServiceUPP (long sqParameter,
+ SlotIntServiceUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppSlotIntServiceProcInfo = 0x0000B822 }; /* register 2_bytes:D0 Func(4_bytes:A1) */
+ #define NewSlotIntServiceUPP(userRoutine) (SlotIntServiceUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSlotIntServiceProcInfo, GetCurrentArchitecture())
+ #define DisposeSlotIntServiceUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 InvokeSlotIntServiceUPP(__A1, __A0)
+ short InvokeSlotIntServiceUPP(long sqParameter, SlotIntServiceUPP userUPP) = 0x4E90;
+ #else
+ #define InvokeSlotIntServiceUPP(sqParameter, userUPP) (short)CALL_ONE_PARAMETER_UPP((userUPP), uppSlotIntServiceProcInfo, (sqParameter))
+ #endif
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewSlotIntServiceProc(userRoutine) NewSlotIntServiceUPP(userRoutine)
+#define CallSlotIntServiceProc(userRoutine, sqParameter) InvokeSlotIntServiceUPP(sqParameter, userRoutine)
+
+struct SlotIntQElement {
+ Ptr sqLink; /*ptr to next element*/
+ short sqType; /*queue type ID for validity*/
+ short sqPrio; /*priority*/
+ SlotIntServiceUPP sqAddr; /*interrupt service routine*/
+ long sqParm; /*optional A1 parameter*/
+};
+typedef struct SlotIntQElement SlotIntQElement;
+
+typedef SlotIntQElement * SQElemPtr;
+
+struct SpBlock {
+ long spResult; /*FUNCTION Result*/
+ Ptr spsPointer; /*structure pointer*/
+ long spSize; /*size of structure*/
+ long spOffsetData; /*offset/data field used by sOffsetData*/
+ Ptr spIOFileName; /*ptr to IOFile name for sDisDrvrName*/
+ Ptr spsExecPBlk; /*pointer to sExec parameter block.*/
+ long spParamData; /*misc parameter data (formerly spStackPtr).*/
+ long spMisc; /*misc field for SDM.*/
+ long spReserved; /*reserved for future expansion*/
+ short spIOReserved; /*Reserved field of Slot Resource Table*/
+ short spRefNum; /*RefNum*/
+ short spCategory; /*sType: Category*/
+ short spCType; /*Type*/
+ short spDrvrSW; /*DrvrSW*/
+ short spDrvrHW; /*DrvrHW*/
+ SInt8 spTBMask; /*type bit mask bits 0..3 mask words 0..3*/
+ SInt8 spSlot; /*slot number*/
+ SInt8 spID; /*structure ID*/
+ SInt8 spExtDev; /*ID of the external device*/
+ SInt8 spHwDev; /*Id of the hardware device.*/
+ SInt8 spByteLanes; /*bytelanes from card ROM format block*/
+ SInt8 spFlags; /*standard flags*/
+ SInt8 spKey; /*Internal use only*/
+};
+typedef struct SpBlock SpBlock;
+typedef SpBlock * SpBlockPtr;
+
+struct SInfoRecord {
+ Ptr siDirPtr; /*Pointer to directory*/
+ short siInitStatusA; /*initialization E*/
+ short siInitStatusV; /*status returned by vendor init code*/
+ SInt8 siState; /*initialization state*/
+ SInt8 siCPUByteLanes; /*0=[d0..d7] 1=[d8..d15]*/
+ SInt8 siTopOfROM; /*Top of ROM= $FssFFFFx: x is TopOfROM*/
+ SInt8 siStatusFlags; /*bit 0 - card is changed*/
+ short siTOConst; /*Time Out C for BusErr*/
+ SInt8 siReserved[2]; /*reserved*/
+ Ptr siROMAddr; /* addr of top of ROM */
+ SInt8 siSlot; /* slot number */
+ SInt8 siPadding[3]; /* reserved */
+};
+typedef struct SInfoRecord SInfoRecord;
+
+typedef SInfoRecord * SInfoRecPtr;
+
+struct SDMRecord {
+ ProcPtr sdBEVSave; /*Save old BusErr vector*/
+ ProcPtr sdBusErrProc; /*Go here to determine if it is a BusErr*/
+ ProcPtr sdErrorEntry; /*Go here if BusErrProc finds real BusErr*/
+ long sdReserved; /*Reserved*/
+};
+typedef struct SDMRecord SDMRecord;
+
+struct FHeaderRec {
+ long fhDirOffset; /*offset to directory*/
+ long fhLength; /*length of ROM*/
+ long fhCRC; /*CRC*/
+ SInt8 fhROMRev; /*revision of ROM*/
+ SInt8 fhFormat; /*format - 2*/
+ long fhTstPat; /*test pattern*/
+ SInt8 fhReserved; /*reserved*/
+ SInt8 fhByteLanes; /*ByteLanes*/
+};
+typedef struct FHeaderRec FHeaderRec;
+typedef FHeaderRec * FHeaderRecPtr;
+/*
+
+ Extended Format header block - extended declaration ROM format header for super sRsrc directories. <H2><SM0>
+
+*/
+
+
+struct XFHeaderRec {
+ long fhXSuperInit; /*Offset to SuperInit SExecBlock <fhFormat,offset>*/
+ long fhXSDirOffset; /*Offset to SuperDirectory <$FE,offset>*/
+ long fhXEOL; /*Psuedo end-of-list <$FF,nil>*/
+ long fhXSTstPat; /*TestPattern*/
+ long fhXDirOffset; /*Offset to (minimal) directory*/
+ long fhXLength; /*Length of ROM*/
+ long fhXCRC; /*CRC*/
+ SInt8 fhXROMRev; /*Revision of ROM*/
+ SInt8 fhXFormat; /*Format-2*/
+ long fhXTstPat; /*TestPattern*/
+ SInt8 fhXReserved; /*Reserved*/
+ SInt8 fhXByteLanes; /*ByteLanes*/
+};
+typedef struct XFHeaderRec XFHeaderRec;
+typedef XFHeaderRec * XFHeaderRecPtr;
+
+struct SEBlock {
+ UInt8 seSlot; /*Slot number.*/
+ UInt8 sesRsrcId; /*sResource Id.*/
+ short seStatus; /*Status of code executed by sExec.*/
+ UInt8 seFlags; /*Flags*/
+ UInt8 seFiller0; /*Filler, must be SignedByte to align on odd boundry*/
+ UInt8 seFiller1; /*Filler*/
+ UInt8 seFiller2; /*Filler*/
+ long seResult; /*Result of sLoad.*/
+ long seIOFileName; /*Pointer to IOFile name.*/
+ UInt8 seDevice; /*Which device to read from.*/
+ UInt8 sePartition; /*The partition.*/
+ UInt8 seOSType; /*Type of OS.*/
+ UInt8 seReserved; /*Reserved field.*/
+ UInt8 seRefNum; /*RefNum of the driver.*/
+ UInt8 seNumDevices; /* Number of devices to load.*/
+ UInt8 seBootState; /*State of StartBoot code.*/
+ SInt8 filler;
+};
+typedef struct SEBlock SEBlock;
+/* Principle */
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SReadByte(__A0)
+ #endif
+EXTERN_API( OSErr )
+SReadByte (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x7000, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SReadWord(__A0)
+ #endif
+EXTERN_API( OSErr )
+SReadWord (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x7001, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SReadLong(__A0)
+ #endif
+EXTERN_API( OSErr )
+SReadLong (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x7002, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SGetCString(__A0)
+ #endif
+EXTERN_API( OSErr )
+SGetCString (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x7003, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SGetBlock(__A0)
+ #endif
+EXTERN_API( OSErr )
+SGetBlock (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x7005, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SFindStruct(__A0)
+ #endif
+EXTERN_API( OSErr )
+SFindStruct (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x7006, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SReadStruct(__A0)
+ #endif
+EXTERN_API( OSErr )
+SReadStruct (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x7007, 0xA06E);
+
+/* Special */
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SReadInfo(__A0)
+ #endif
+EXTERN_API( OSErr )
+SReadInfo (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x7010, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SReadPRAMRec(__A0)
+ #endif
+EXTERN_API( OSErr )
+SReadPRAMRec (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x7011, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SPutPRAMRec(__A0)
+ #endif
+EXTERN_API( OSErr )
+SPutPRAMRec (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x7012, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SReadFHeader(__A0)
+ #endif
+EXTERN_API( OSErr )
+SReadFHeader (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x7013, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SNextSRsrc(__A0)
+ #endif
+EXTERN_API( OSErr )
+SNextSRsrc (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x7014, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SNextTypeSRsrc(__A0)
+ #endif
+EXTERN_API( OSErr )
+SNextTypeSRsrc (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x7015, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SRsrcInfo(__A0)
+ #endif
+EXTERN_API( OSErr )
+SRsrcInfo (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x7016, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SDisposePtr(__A0)
+ #endif
+EXTERN_API( OSErr )
+SDisposePtr (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x7017, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SCkCardStat(__A0)
+ #endif
+EXTERN_API( OSErr )
+SCkCardStat (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x7018, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SReadDrvrName(__A0)
+ #endif
+EXTERN_API( OSErr )
+SReadDrvrName (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x7019, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SFindSRTRec(__A0)
+ #endif
+EXTERN_API( OSErr )
+SFindSRTRec (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x701A, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SFindDevBase(__A0)
+ #endif
+EXTERN_API( OSErr )
+SFindDevBase (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x701B, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SFindBigDevBase(__A0)
+ #endif
+EXTERN_API( OSErr )
+SFindBigDevBase (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x701C, 0xA06E);
+
+/* Advanced */
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 InitSDeclMgr(__A0)
+ #endif
+EXTERN_API( OSErr )
+InitSDeclMgr (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x7020, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SPrimaryInit(__A0)
+ #endif
+EXTERN_API( OSErr )
+SPrimaryInit (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x7021, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SCardChanged(__A0)
+ #endif
+EXTERN_API( OSErr )
+SCardChanged (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x7022, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SExec(__A0)
+ #endif
+EXTERN_API( OSErr )
+SExec (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x7023, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SOffsetData(__A0)
+ #endif
+EXTERN_API( OSErr )
+SOffsetData (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x7024, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SInitPRAMRecs(__A0)
+ #endif
+EXTERN_API( OSErr )
+SInitPRAMRecs (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x7025, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SReadPBSize(__A0)
+ #endif
+EXTERN_API( OSErr )
+SReadPBSize (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x7026, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SCalcStep(__A0)
+ #endif
+EXTERN_API( OSErr )
+SCalcStep (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x7028, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SInitSRsrcTable(__A0)
+ #endif
+EXTERN_API( OSErr )
+SInitSRsrcTable (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x7029, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SSearchSRT(__A0)
+ #endif
+EXTERN_API( OSErr )
+SSearchSRT (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x702A, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SUpdateSRT(__A0)
+ #endif
+EXTERN_API( OSErr )
+SUpdateSRT (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x702B, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SCalcSPointer(__A0)
+ #endif
+EXTERN_API( OSErr )
+SCalcSPointer (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x702C, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SGetDriver(__A0)
+ #endif
+EXTERN_API( OSErr )
+SGetDriver (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x702D, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SPtrToSlot(__A0)
+ #endif
+EXTERN_API( OSErr )
+SPtrToSlot (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x702E, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SFindSInfoRecPtr(__A0)
+ #endif
+EXTERN_API( OSErr )
+SFindSInfoRecPtr (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x702F, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SFindSRsrcPtr(__A0)
+ #endif
+EXTERN_API( OSErr )
+SFindSRsrcPtr (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x7030, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SDeleteSRTRec(__A0)
+ #endif
+EXTERN_API( OSErr )
+SDeleteSRTRec (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x7031, 0xA06E);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+OpenSlot (ParmBlkPtr paramBlock,
+ Boolean async);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 OpenSlotSync(__A0)
+ #endif
+EXTERN_API( OSErr )
+OpenSlotSync (ParmBlkPtr paramBlock) ONEWORDINLINE(0xA200);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 OpenSlotAsync(__A0)
+ #endif
+EXTERN_API( OSErr )
+OpenSlotAsync (ParmBlkPtr paramBlock) ONEWORDINLINE(0xA600);
+
+/* Device Manager Slot Support */
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SIntInstall(__A0, __D0)
+ #endif
+EXTERN_API( OSErr )
+SIntInstall (SQElemPtr sIntQElemPtr,
+ short theSlot) ONEWORDINLINE(0xA075);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SIntRemove(__A0, __D0)
+ #endif
+EXTERN_API( OSErr )
+SIntRemove (SQElemPtr sIntQElemPtr,
+ short theSlot) ONEWORDINLINE(0xA076);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SVersion(__A0)
+ #endif
+EXTERN_API( OSErr )
+SVersion (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x7008, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SetSRsrcState(__A0)
+ #endif
+EXTERN_API( OSErr )
+SetSRsrcState (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x7009, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 InsertSRTRec(__A0)
+ #endif
+EXTERN_API( OSErr )
+InsertSRTRec (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x700A, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SGetSRsrc(__A0)
+ #endif
+EXTERN_API( OSErr )
+SGetSRsrc (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x700B, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SGetTypeSRsrc(__A0)
+ #endif
+EXTERN_API( OSErr )
+SGetTypeSRsrc (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x700C, 0xA06E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 SGetSRsrcPtr(__A0)
+ #endif
+EXTERN_API( OSErr )
+SGetSRsrcPtr (SpBlockPtr spBlkPtr) TWOWORDINLINE(0x701D, 0xA06E);
+
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __SLOTS__ */
+
diff --git a/include/qt/SocketServices.h b/include/qt/SocketServices.h
new file mode 100644
index 000000000..6c5a43d71
--- /dev/null
+++ b/include/qt/SocketServices.h
@@ -0,0 +1,837 @@
+/*
+ File: SocketServices.h
+
+ Contains: This file contains constants and data structures that
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc. All rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __SOCKETSERVICES__
+#define __SOCKETSERVICES__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*
+ ///////////////////////////////////////////////////////////////////////////////////////
+ TypeDefs for the Socket Services function codes
+*/
+
+typedef Byte SS_BYTE;
+typedef Byte SS_FLAGS8;
+typedef Byte SS_IRQ;
+typedef Byte SS_PWRLEVEL;
+typedef UInt16 SS_ADAPTER;
+typedef UInt16 SS_BCD;
+typedef UInt16 SS_COUNT;
+typedef UInt16 SS_EDC;
+typedef UInt16 SS_FLAGS16;
+typedef UInt16 SS_PAGE;
+typedef UInt16 SS_PWRINDEX;
+typedef UInt16 SS_SIGNATURE;
+typedef UInt16 SS_SKTBITS;
+typedef UInt16 SS_SOCKET;
+typedef UInt16 SS_SPEED;
+typedef UInt16 SS_WINDOW;
+typedef UInt16 SS_WORD;
+typedef UInt32 SS_BASE;
+typedef UInt32 SS_FLAGS32;
+typedef UInt32 SS_OFFSET;
+typedef UInt32 SS_SIZE;
+typedef Ptr SS_PTR;
+typedef OSErr SS_RETCODE;
+
+struct SS_SCHARTBL {
+ UInt16 sktCaps; /* SS_FLAGS16*/
+ UInt32 activeHigh; /* SS_FLAGS32*/
+ UInt32 activeLow; /* SS_FLAGS32*/
+};
+typedef struct SS_SCHARTBL SS_SCHARTBL;
+
+struct SS_SISTRUCT {
+ UInt16 bufferLength; /* SS_WORD*/
+ UInt16 dataLength; /* SS_WORD*/
+ SS_SCHARTBL charTable; /* SS_FLAGS16*/
+};
+typedef struct SS_SISTRUCT SS_SISTRUCT;
+enum {
+ STR_SIZE = 24
+};
+
+/* minimum string length*/
+
+struct SS_VISTRUCT {
+ UInt16 bufferLength; /* SS_WORD*/
+ UInt16 dataLength; /* SS_WORD*/
+ char szImplementor[1]; /* SS_WORD*/
+ Byte padding[1]; /* */
+};
+typedef struct SS_VISTRUCT SS_VISTRUCT;
+
+struct SS_ACHARTBL {
+ UInt16 adpCaps; /* SS_FLAGS16*/
+ UInt32 activeHigh; /* SS_FLAGS32*/
+ UInt32 activeLow; /* SS_FLAGS32*/
+};
+typedef struct SS_ACHARTBL SS_ACHARTBL;
+
+struct SS_PWRENTRY {
+ Byte powerLevel; /* SS_PWRLEVEL*/
+ Byte validSignals; /* SS_FLAGS8*/
+};
+typedef struct SS_PWRENTRY SS_PWRENTRY;
+
+struct SS_AISTRUCT {
+ UInt16 bufferLength; /* SS_WORD*/
+ UInt16 dataLength; /* SS_WORD*/
+ SS_ACHARTBL charTable;
+ UInt16 numPwrEntries; /* SS_WORD*/
+ SS_PWRENTRY * pwrEntryPtr;
+};
+typedef struct SS_AISTRUCT SS_AISTRUCT;
+
+struct SS_MEMWINTBL {
+ UInt16 memWndCaps; /* SS_FLAGS16*/
+ UInt32 firstByte; /* SS_BASE*/
+ UInt32 lastByte; /* SS_BASE*/
+ UInt32 minSize; /* SS_SIZE*/
+ UInt32 maxSize; /* SS_SIZE*/
+ UInt32 reqGran; /* SS_SIZE*/
+ UInt32 reqBase; /* SS_SIZE*/
+ UInt32 reqOffset; /* SS_SIZE*/
+ UInt16 slowest; /* SS_SPEED*/
+ UInt16 fastest; /* SS_SPEED*/
+};
+typedef struct SS_MEMWINTBL SS_MEMWINTBL;
+
+struct SS_IOWINTBL {
+ UInt16 ioWndCaps; /* SS_FLAGS16*/
+ UInt32 firstByte; /* SS_BASE*/
+ UInt32 lastByte; /* SS_BASE*/
+ UInt32 minSize; /* SS_SIZE*/
+ UInt32 maxSize; /* SS_SIZE*/
+ UInt32 reqGran; /* SS_SIZE*/
+ UInt16 addrLines; /* SS_COUNT*/
+ Byte eisaSlot; /* SS_FLAGS8*/
+ Byte padding[1]; /* */
+};
+typedef struct SS_IOWINTBL SS_IOWINTBL;
+
+struct SS_WISTRUCT {
+ UInt16 bufferLength; /* SS_WORD*/
+ UInt16 dataLength; /* SS_WORD*/
+ UInt16 numTblEntries; /* SS_WORD*/
+ SS_MEMWINTBL memWinTbl;
+ SS_IOWINTBL ioWinTbl;
+};
+typedef struct SS_WISTRUCT SS_WISTRUCT;
+
+/*------------------------------------------------------------------------
+ function selectors passed to Socket Service entry point
+------------------------------------------------------------------------*/
+enum {
+ fnSSGetAdapterCount = 0x80,
+ fnSSUnsupported81 = 0x81,
+ fnSSUnsupported82 = 0x82,
+ fnSSGetSSInfo = 0x83,
+ fnSSInquireAdapter = 0x84,
+ fnSSGetAdapter = 0x85,
+ fnSSSetAdapter = 0x86,
+ fnSSInquireWindow = 0x87,
+ fnSSGetWindow = 0x88,
+ fnSSSetWindow = 0x89,
+ fnSSGetPage = 0x8A,
+ fnSSSetPage = 0x8B,
+ fnSSInquireSocket = 0x8C,
+ fnSSGetSocket = 0x8D,
+ fnSSSetSocket = 0x8E,
+ fnSSGetStatus = 0x8F,
+ fnSSResetSocket = 0x90,
+ fnSSUnsupported91 = 0x91,
+ fnSSUnsupported92 = 0x92,
+ fnSSUnsupported93 = 0x93,
+ fnSSUnsupported94 = 0x94,
+ fnSSInquireEDC = 0x95,
+ fnSSGetEDC = 0x96,
+ fnSSSetEDC = 0x97,
+ fnSSStartEDC = 0x98,
+ fnSSPauseEDC = 0x99,
+ fnSSResumeEDC = 0x9A,
+ fnSSStopEDC = 0x9B,
+ fnSSReadEDC = 0x9C,
+ fnSSGetVendorInfo = 0x9D,
+ fnSSAcknowledgeInterrupt = 0x9E,
+ fnSSGetSetPriorHandler = 0x9F,
+ fnSSGetSetSSAddr = 0xA0,
+ fnSSGetAccessOffsets = 0xA1,
+ fnSSUnsupportedA2 = 0xA2,
+ fnSSUnsupportedA3 = 0xA3,
+ fnSSUnsupportedA4 = 0xA4,
+ fnSSUnsupportedA5 = 0xA5,
+ fnSSUnsupportedA6 = 0xA6,
+ fnSSUnsupportedA7 = 0xA7,
+ fnSSUnsupportedA8 = 0xA8,
+ fnSSUnsupportedA9 = 0xA9,
+ fnSSUnsupportedAA = 0xAA,
+ fnSSUnsupportedAB = 0xAB,
+ fnSSUnsupportedAC = 0xAC,
+ fnSSUnsupportedAD = 0xAD,
+ fnSSVendorSpecific = 0xAE
+};
+
+/* SSVendorSpecificPB.function values*/
+
+enum {
+ fnVSReserved = 0x00,
+ fnVSGetSocketLocationIcon = 0x01,
+ fnVSGetSocketLocationText = 0x02,
+ fnVSDoSocketLocalization = 0x03,
+ fnVSAppleSocketCapabilities = 0x04,
+ fnVSSleepWakeNotification = 0x05
+};
+
+
+/*------------------------------------------------------------------------
+ defines for the Socket Services function codes
+------------------------------------------------------------------------*/
+enum {
+ AC_IND = 1, /* adapter characteristics*/
+ AC_PWR = 2,
+ AC_DBW = 4
+};
+
+enum {
+ AS_POWERDOWN = 1,
+ AS_MAINTAIN = 2
+};
+
+enum {
+ EC_UNI = 1,
+ EC_BI = 2,
+ EC_REGISTER = 4,
+ EC_MEMORY = 8,
+ EC_PAUSABLE = 16,
+ EC_WRITE = 16
+};
+
+enum {
+ ET_CHECK8 = 1,
+ ET_SDLC16 = 2
+};
+
+enum {
+ IF_MEMORY = 1,
+ IF_IO = 2
+};
+
+enum {
+ IRQ_HIGH = 64,
+ IRQ_ENABLE = 128
+};
+
+enum {
+ IRQ_MEMORY = 4,
+ IRQ_IO = 4
+};
+
+enum {
+ PS_ATTRIBUTE = 0x01,
+ PS_ENABLED = 0x02,
+ PS_WP = 0x04
+};
+
+enum {
+ PWR_VCC = 128, /* Power pins in PwrEntry elements*/
+ PWR_VPP1 = 64,
+ PWR_VPP2 = 32
+};
+
+enum {
+ SBM_WP = 1,
+ SBM_LOCKED = 2,
+ SBM_EJECT = 4,
+ SBM_INSERT = 8,
+ SBM_BVD1 = 16,
+ SBM_BVD2 = 32,
+ SBM_RDYBSY = 64,
+ SBM_CD = 128
+};
+
+enum {
+ SBM_LOCK = 16,
+ SBM_BATT = 32,
+ SBM_BUSY = 64,
+ SBM_XIP = 128
+};
+
+/* Vendor Specific Apple Socket Capabilities */
+enum {
+ SBM_SLEEP_PWR = 1
+};
+
+enum {
+ WC_COMMON = 1,
+ WC_IO = 2,
+ WC_ATTRIBUTE = 4,
+ WC_TYPE_MASK = 7,
+ WC_WAIT = 128
+};
+
+enum {
+ WC_BASE = 1,
+ WC_SIZE = 2,
+ WC_WENABLE = 4,
+ WC_8BIT = 8,
+ WC_16BIT = 16,
+ WC_BALIGN = 32,
+ WC_POW2 = 64,
+ WC_CALIGN = 128,
+ WC_PAVAIL = 256,
+ WC_PSHARED = 512,
+ WC_PENABLE = 1024,
+ WC_WP = 2048
+};
+
+enum {
+ WC_INPACK = 128,
+ WC_EISA = 256,
+ WC_CENABLE = 512
+};
+
+enum {
+ WS_IO = 1,
+ WS_ENABLED = 2,
+ WS_16BIT = 4
+};
+
+enum {
+ WS_PAGED = 8,
+ WS_EISA = 16,
+ WS_CENABLE = 32,
+ WS_SWAP_LITTLE_TO_BIG_ENDIAN = 64
+};
+
+enum {
+ SS_SIG_VALUE = 0x5353 /* 'SS'*/
+};
+
+enum {
+ SS_CMPL_1_00 = 0x0100, /* compliant with rev 1.0 of SS standard*/
+ SS_CMPL_1_01 = 0x0101, /* compliant with rev 1.01 of SS standard*/
+ SS_CMPL_2_00 = 0x0200, /* compliant with rev 2.0 of SS standard*/
+ SS_CMPL_2_10 = 0x0210 /* compliant with rev 2.1 of SS standard*/
+};
+
+/*------------------------------------------------------------------------
+ Universal ProcPtr for Socket Service entry point
+------------------------------------------------------------------------*/
+typedef CALLBACK_API( short , PCCardSSEntryProcPtr )(UInt16 fnCode, Ptr callPB, Ptr dataPtr);
+typedef STACK_UPP_TYPE(PCCardSSEntryProcPtr) PCCardSSEntryUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(PCCardSSEntryUPP)
+ NewPCCardSSEntryUPP (PCCardSSEntryProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposePCCardSSEntryUPP (PCCardSSEntryUPP userUPP);
+
+ EXTERN_API(short)
+ InvokePCCardSSEntryUPP (UInt16 fnCode,
+ Ptr callPB,
+ Ptr dataPtr,
+ PCCardSSEntryUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppPCCardSSEntryProcInfo = 0x00000FA0 }; /* pascal 2_bytes Func(2_bytes, 4_bytes, 4_bytes) */
+ #define NewPCCardSSEntryUPP(userRoutine) (PCCardSSEntryUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPCCardSSEntryProcInfo, GetCurrentArchitecture())
+ #define DisposePCCardSSEntryUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokePCCardSSEntryUPP(fnCode, callPB, dataPtr, userUPP) (short)CALL_THREE_PARAMETER_UPP((userUPP), uppPCCardSSEntryProcInfo, (fnCode), (callPB), (dataPtr))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewPCCardSSEntryProc(userRoutine) NewPCCardSSEntryUPP(userRoutine)
+#define CallPCCardSSEntryProc(userRoutine, fnCode, callPB, dataPtr) InvokePCCardSSEntryUPP(fnCode, callPB, dataPtr, userRoutine)
+/*------------------------------------------------------------------------
+ Card Services calls used by a Socket Service
+------------------------------------------------------------------------*/
+
+struct CSEventEntryPB {
+ UInt32 ssHandlerID;
+ UInt16 adapter;
+ UInt16 socket;
+ UInt16 message;
+ Byte intrpBits;
+ Byte padding;
+};
+typedef struct CSEventEntryPB CSEventEntryPB;
+typedef CALLBACK_API( void , PCCardCSEntryProcPtr )(CSEventEntryPB *pb);
+typedef STACK_UPP_TYPE(PCCardCSEntryProcPtr) PCCardCSEntryUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(PCCardCSEntryUPP)
+ NewPCCardCSEntryUPP (PCCardCSEntryProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposePCCardCSEntryUPP (PCCardCSEntryUPP userUPP);
+
+ EXTERN_API(void)
+ InvokePCCardCSEntryUPP (CSEventEntryPB * pb,
+ PCCardCSEntryUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppPCCardCSEntryProcInfo = 0x000000C0 }; /* pascal no_return_value Func(4_bytes) */
+ #define NewPCCardCSEntryUPP(userRoutine) (PCCardCSEntryUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPCCardCSEntryProcInfo, GetCurrentArchitecture())
+ #define DisposePCCardCSEntryUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokePCCardCSEntryUPP(pb, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppPCCardCSEntryProcInfo, (pb))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewPCCardCSEntryProc(userRoutine) NewPCCardCSEntryUPP(userRoutine)
+#define CallPCCardCSEntryProc(userRoutine, pb) InvokePCCardCSEntryUPP(pb, userRoutine)
+/*------------ AddSocketServices ------------ */
+
+
+struct AddSocketServicesPB {
+ PCCardSSEntryUPP ssEntry; /* -> given to CS for its use*/
+ PCCardCSEntryUPP csEntry; /* <- taken from CS so we know where to enter*/
+
+ UInt32 dataPtr;
+ UInt32 attributes;
+ UInt16 numAdapters;
+ UInt16 numSockets;
+};
+typedef struct AddSocketServicesPB AddSocketServicesPB;
+/*------------ ReplaceSocketServices ------------ */
+
+
+struct ReplaceSocketServicesPB {
+ PCCardSSEntryUPP ssEntry;
+ PCCardSSEntryUPP oldSSEntry;
+
+ UInt32 dataPtr;
+ UInt16 socket;
+ UInt16 numSockets;
+ UInt16 attributes;
+};
+typedef struct ReplaceSocketServicesPB ReplaceSocketServicesPB;
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+CSAddSocketServices (AddSocketServicesPB * pb) TWOWORDINLINE(0x7050, 0xAAF0);
+
+EXTERN_API( OSErr )
+CSReplaceSocketServices (ReplaceSocketServicesPB * pb) TWOWORDINLINE(0x7051, 0xAAF0);
+
+
+
+/*------------------------------------------------------------------------
+ parameter blocks for each Socket Service function
+------------------------------------------------------------------------*/
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct SSAcknowledgeInterruptPB {
+ UInt16 adapter; /* SS_ADAPTER*/
+ UInt16 sockets; /* SS_SKTBITS*/
+};
+typedef struct SSAcknowledgeInterruptPB SSAcknowledgeInterruptPB;
+
+struct SSGetAccessOffsetsPB {
+ UInt16 adapter; /* SS_ADAPTER*/
+ Byte mode; /* SS_BYTE*/
+ Byte reserved; /* padding*/
+ UInt16 count; /* SS_COUNT*/
+ Ptr buffer; /* SS_PTR*/
+ UInt16 numAvail; /* SS_COUNT*/
+};
+typedef struct SSGetAccessOffsetsPB SSGetAccessOffsetsPB;
+
+struct SSGetAdapterCountPB {
+ UInt16 totalAdapters; /* SS_COUNT*/
+ UInt16 sig; /* SS_SIGNATURE*/
+};
+typedef struct SSGetAdapterCountPB SSGetAdapterCountPB;
+
+struct SSGetSetAdapterPB {
+ UInt16 adapter; /* SS_ADAPTER*/
+ Byte state; /* SS_FLAGS8*/
+ Byte irqStatus; /* SS_IRQ*/
+};
+typedef struct SSGetSetAdapterPB SSGetSetAdapterPB;
+
+struct SSGetSetEDCPB {
+ UInt16 adapter; /* SS_ADAPTER*/
+ UInt16 edc; /* SS_EDC*/
+ UInt16 socket; /* SS_SOCKET*/
+ Byte state; /* SS_FLAGS8*/
+ Byte edcType; /* SS_FLAGS8*/
+};
+typedef struct SSGetSetEDCPB SSGetSetEDCPB;
+
+struct SSGetSetPagePB {
+ UInt16 adapter; /* SS_ADAPTER*/
+ UInt16 window; /* SS_WINDOW*/
+ UInt16 page; /* SS_PAGE*/
+ Byte state; /* SS_FLAGS8*/
+ Byte reserved; /* padding*/
+ UInt32 offset; /* SS_OFFSET*/
+};
+typedef struct SSGetSetPagePB SSGetSetPagePB;
+
+struct SSGetSetPriorHandlerPB {
+ UInt16 adapter; /* SS_ADAPTER*/
+ Byte mode; /* SS_FLAGS8*/
+ Byte reserved; /* padding*/
+ Ptr handler; /* SS_PTR*/
+};
+typedef struct SSGetSetPriorHandlerPB SSGetSetPriorHandlerPB;
+
+struct SSGetSetSocketPB {
+ UInt16 adapter; /* SS_ADAPTER*/
+ UInt16 socket; /* SS_SOCKET*/
+ UInt16 vccIndex; /* SS_PWRINDEX*/
+ UInt16 vpp1Index; /* SS_PWRINDEX*/
+ UInt16 vpp2Index; /* SS_PWRINDEX*/
+ Byte scIntMask; /* SS_FLAGS8*/
+ Byte state; /* SS_FLAGS8*/
+ Byte ctlInd; /* SS_FLAGS8*/
+ Byte ireqRouting; /* SS_IRQ*/
+ Byte ifType; /* SS_FLAGS8*/
+ Byte padding[1]; /* */
+};
+typedef struct SSGetSetSocketPB SSGetSetSocketPB;
+
+struct SSGetSetSSAddrPB {
+ UInt16 adapter; /* SS_ADAPTER*/
+ Byte mode; /* SS_BYTE*/
+ Byte subfunc; /* SS_BYTE*/
+ UInt16 numAddData; /* SS_COUNT*/
+ Ptr buffer; /* SS_PTR*/
+};
+typedef struct SSGetSetSSAddrPB SSGetSetSSAddrPB;
+
+struct SSGetSetWindowPB {
+ UInt16 adapter; /* SS_ADAPTER*/
+ UInt16 window; /* SS_WINDOW*/
+ UInt16 socket; /* SS_SOCKET*/
+ UInt32 size; /* SS_SIZE*/
+ Byte state; /* SS_FLAGS8*/
+ Byte reserved; /* padding*/
+ UInt16 speed; /* SS_SPEED*/
+ UInt32 base; /* SS_BASE*/
+};
+typedef struct SSGetSetWindowPB SSGetSetWindowPB;
+
+struct SSGetSSInfoPB {
+ UInt16 adapter; /* SS_ADAPTER*/
+ UInt16 compliance; /* SS_BCD*/
+ UInt16 numAdapters; /* SS_COUNT*/
+ UInt16 firstAdapter; /* SS_ADAPTER*/
+};
+typedef struct SSGetSSInfoPB SSGetSSInfoPB;
+
+struct SSGetStatusPB {
+ UInt16 adapter; /* SS_ADAPTER*/
+ UInt16 socket; /* SS_SOCKET*/
+ Byte cardState; /* SS_FLAGS8*/
+ Byte socketState; /* SS_FLAGS8*/
+ Byte ctlInd; /* SS_FLAGS8*/
+ Byte ireqRouting; /* SS_IRQ*/
+ Byte ifType; /* SS_FLAGS8*/
+ Byte padding[1]; /* */
+};
+typedef struct SSGetStatusPB SSGetStatusPB;
+
+struct SSGetVendorInfoPB {
+ UInt16 adapter; /* SS_ADAPTER*/
+ Byte vendorInfoType; /* SS_BYTE*/
+ Byte reserved; /* padding*/
+ Ptr buffer; /* SS_PTR*/
+ UInt16 release; /* SS_BCD*/
+};
+typedef struct SSGetVendorInfoPB SSGetVendorInfoPB;
+
+struct SSInquireAdapterPB {
+ UInt16 adapter; /* SS_ADAPTER*/
+ Ptr buffer; /* SS_PTR*/
+ UInt16 numSockets; /* SS_COUNT*/
+ UInt16 numWindows; /* SS_COUNT*/
+ UInt16 numEDCs; /* SS_COUNT*/
+};
+typedef struct SSInquireAdapterPB SSInquireAdapterPB;
+
+struct SSInquireEDCPB {
+ UInt16 adapter; /* SS_ADAPTER*/
+ UInt16 edc; /* SS_EDC*/
+ UInt16 sockets; /* SS_SKTBITS*/
+ Byte caps; /* SS_FLAGS8*/
+ Byte types; /* SS_FLAGS8*/
+};
+typedef struct SSInquireEDCPB SSInquireEDCPB;
+
+struct SSInquireSocketPB {
+ UInt16 adapter; /* SS_ADAPTER*/
+ UInt16 socket; /* SS_SOCKET*/
+ Ptr buffer; /* SS_PTR*/
+ Byte scIntCaps; /* SS_FLAGS8*/
+ Byte scRptCaps; /* SS_FLAGS8*/
+ Byte ctlIndCaps; /* SS_FLAGS8*/
+ Byte padding[1]; /* */
+};
+typedef struct SSInquireSocketPB SSInquireSocketPB;
+
+struct SSInquireWindowPB {
+ UInt16 adapter; /* SS_ADAPTER*/
+ UInt16 window; /* SS_WINDOW*/
+ Ptr buffer; /* SS_PTR*/
+ Byte wndCaps; /* SS_FLAGS8*/
+ Byte reserved; /* padding*/
+ UInt16 sockets; /* SS_SKTBITS*/
+};
+typedef struct SSInquireWindowPB SSInquireWindowPB;
+
+struct SSPauseEDCPB {
+ UInt16 adapter; /* SS_ADAPTER*/
+ UInt16 edc; /* SS_EDC*/
+};
+typedef struct SSPauseEDCPB SSPauseEDCPB;
+
+struct SSReadEDCPB {
+ UInt16 adapter; /* SS_ADAPTER*/
+ UInt16 edc; /* SS_EDC*/
+ UInt16 value; /* SS_WORD*/
+};
+typedef struct SSReadEDCPB SSReadEDCPB;
+
+struct SSResetSocketPB {
+ UInt16 adapter; /* SS_ADAPTER*/
+ UInt16 socket; /* SS_SOCKET*/
+};
+typedef struct SSResetSocketPB SSResetSocketPB;
+
+struct SSResumeEDCPB {
+ UInt16 adapter; /* SS_ADAPTER*/
+ UInt16 edc; /* SS_EDC*/
+};
+typedef struct SSResumeEDCPB SSResumeEDCPB;
+
+struct SSStartEDCPB {
+ UInt16 adapter; /* SS_ADAPTER*/
+ UInt16 edc; /* SS_EDC*/
+};
+typedef struct SSStartEDCPB SSStartEDCPB;
+
+struct SSStopEDCPB {
+ UInt16 adapter; /* SS_ADAPTER*/
+ UInt16 edc; /* SS_EDC*/
+};
+typedef struct SSStopEDCPB SSStopEDCPB;
+
+struct SSVendorSpecificPB {
+ UInt16 vsFunction; /* SS_WORD*/
+ UInt16 adapter; /* SS_ADAPTER*/
+ UInt16 socket; /* SS_SOCKET*/
+ UInt16 bufferSize; /* SS_WORD*/
+ Ptr buffer; /* SS_PTR*/
+ UInt32 attributes; /* SS_LONG*/
+};
+typedef struct SSVendorSpecificPB SSVendorSpecificPB;
+/* 'attributes' constants */
+enum {
+ kSSGoingToSleep = 0x00000001,
+ kSSWakingFromSleep = 0x00000002
+};
+
+/*------------------------------------------------------------------------
+ Non-specific Socket Services Functions
+------------------------------------------------------------------------*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( SS_RETCODE )
+SSGetAdapterCount (SSGetAdapterCountPB * pb,
+ Ptr dataPtr);
+
+/*------------------------------------------------------------------------
+ Adapter Functions
+------------------------------------------------------------------------*/
+EXTERN_API( SS_RETCODE )
+SSAcknowledgeInterrupt (SSAcknowledgeInterruptPB * pb,
+ Ptr dataPtr);
+
+EXTERN_API( SS_RETCODE )
+SSGetSetPriorHandler (SSGetSetPriorHandlerPB * pb,
+ Ptr dataPtr);
+
+EXTERN_API( SS_RETCODE )
+SSGetSetSSAddr (SSGetSetSSAddrPB * pb,
+ Ptr dataPtr);
+
+EXTERN_API( SS_RETCODE )
+SSGetAccessOffsets (SSGetAccessOffsetsPB * pb,
+ Ptr dataPtr);
+
+EXTERN_API( SS_RETCODE )
+SSGetAdapter (SSGetSetAdapterPB * pb,
+ Ptr dataPtr);
+
+EXTERN_API( SS_RETCODE )
+SSGetSSInfo (SSGetSSInfoPB * pb,
+ Ptr dataPtr);
+
+EXTERN_API( SS_RETCODE )
+SSGetVendorInfo (SSGetVendorInfoPB * pb,
+ Ptr dataPtr);
+
+EXTERN_API( SS_RETCODE )
+SSInquireAdapter (SSInquireAdapterPB * pb,
+ Ptr dataPtr);
+
+EXTERN_API( SS_RETCODE )
+SSSetAdapter (SSGetSetAdapterPB * pb,
+ Ptr dataPtr);
+
+EXTERN_API( SS_RETCODE )
+SSVendorSpecific (SSVendorSpecificPB * pb,
+ Ptr dataPtr);
+
+/*------------------------------------------------------------------------
+ Socket Functions
+------------------------------------------------------------------------*/
+EXTERN_API( SS_RETCODE )
+SSGetSocket (SSGetSetSocketPB * pb,
+ Ptr dataPtr);
+
+EXTERN_API( SS_RETCODE )
+SSGetStatus (SSGetStatusPB * pb,
+ Ptr dataPtr);
+
+EXTERN_API( SS_RETCODE )
+SSInquireSocket (SSInquireSocketPB * pb,
+ Ptr dataPtr);
+
+EXTERN_API( SS_RETCODE )
+SSResetSocket (SSResetSocketPB * pb,
+ Ptr dataPtr);
+
+EXTERN_API( SS_RETCODE )
+SSSetSocket (SSGetSetSocketPB * pb,
+ Ptr dataPtr);
+
+/*------------------------------------------------------------------------
+ Window Functions
+------------------------------------------------------------------------*/
+EXTERN_API( SS_RETCODE )
+SSGetPage (SSGetSetPagePB * pb,
+ Ptr dataPtr);
+
+EXTERN_API( SS_RETCODE )
+SSGetWindow (SSGetSetWindowPB * pb,
+ Ptr dataPtr);
+
+EXTERN_API( SS_RETCODE )
+SSInquireWindow (SSInquireWindowPB * pb,
+ Ptr dataPtr);
+
+EXTERN_API( SS_RETCODE )
+SSSetPage (SSGetSetPagePB * pb,
+ Ptr dataPtr);
+
+EXTERN_API( SS_RETCODE )
+SSSetWindow (SSGetSetWindowPB * pb,
+ Ptr dataPtr);
+
+/*------------------------------------------------------------------------
+ Error Detection Functions
+------------------------------------------------------------------------*/
+EXTERN_API( SS_RETCODE )
+SSGetEDC (SSGetSetEDCPB * pb,
+ Ptr dataPtr);
+
+EXTERN_API( SS_RETCODE )
+SSInquireEDC (SSInquireEDCPB * pb,
+ Ptr dataPtr);
+
+EXTERN_API( SS_RETCODE )
+SSPauseEDC (SSPauseEDCPB * pb,
+ Ptr dataPtr);
+
+EXTERN_API( SS_RETCODE )
+SSReadEDC (SSReadEDCPB * pb,
+ Ptr dataPtr);
+
+EXTERN_API( SS_RETCODE )
+SSResumeEDC (SSResumeEDCPB * pb,
+ Ptr dataPtr);
+
+EXTERN_API( SS_RETCODE )
+SSSetEDC (SSGetSetEDCPB * pb,
+ Ptr dataPtr);
+
+EXTERN_API( SS_RETCODE )
+SSStartEDC (SSStartEDCPB * pb,
+ Ptr dataPtr);
+
+EXTERN_API( SS_RETCODE )
+SSStopEDC (SSStopEDCPB * pb,
+ Ptr dataPtr);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __SOCKETSERVICES__ */
+
diff --git a/include/qt/Sound.h b/include/qt/Sound.h
new file mode 100644
index 000000000..1565b265a
--- /dev/null
+++ b/include/qt/Sound.h
@@ -0,0 +1,1921 @@
+/*
+ File: Sound.h
+
+ Contains: Sound Manager Interfaces.
+
+ Version: Technology: Sound Manager 3.6.7
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1986-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __SOUND__
+#define __SOUND__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __DIALOGS__
+#include "Dialogs.h"
+#endif
+
+#ifndef __COMPONENTS__
+#include "Components.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+
+/* For TimeRecord et al. Once we're using the latest MacTypes.i, we should no longer need this.*/
+#ifndef __MOVIES__
+#include "Movies.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*
+ * * * N O T E * * *
+
+ This file has been updated to include Sound Manager 3.3 interfaces.
+
+ Some of the Sound Manager 3.0 interfaces were not put into the InterfaceLib
+ that originally shipped with the PowerMacs. These missing functions and the
+ new 3.3 interfaces have been released in the SoundLib library for PowerPC
+ developers to link with. The runtime library for these functions are
+ installed by the Sound Manager. The following functions are found in SoundLib.
+
+ GetCompressionInfo(), GetSoundPreference(), SetSoundPreference(),
+ UnsignedFixedMulDiv(), SndGetInfo(), SndSetInfo(), GetSoundOutputInfo(),
+ SetSoundOutputInfo(), GetCompressionName(), SoundConverterOpen(),
+ SoundConverterClose(), SoundConverterGetBufferSizes(), SoundConverterBeginConversion(),
+ SoundConverterConvertBuffer(), SoundConverterEndConversion(),
+ AudioGetBass(), AudioGetInfo(), AudioGetMute(), AudioGetOutputDevice(),
+ AudioGetTreble(), AudioGetVolume(), AudioMuteOnEvent(), AudioSetBass(),
+ AudioSetMute(), AudioSetToDefaults(), AudioSetTreble(), AudioSetVolume(),
+ OpenMixerSoundComponent(), CloseMixerSoundComponent(), SoundComponentAddSource(),
+ SoundComponentGetInfo(), SoundComponentGetSource(), SoundComponentGetSourceData(),
+ SoundComponentInitOutputDevice(), SoundComponentPauseSource(),
+ SoundComponentPlaySourceBuffer(), SoundComponentRemoveSource(),
+ SoundComponentSetInfo(), SoundComponentSetOutput(), SoundComponentSetSource(),
+ SoundComponentStartSource(), SoundComponentStopSource(),
+ ParseAIFFHeader(), ParseSndHeader(), SoundConverterGetInfo(), SoundConverterSetInfo()
+*/
+/*
+ Interfaces for Sound Driver, !!! OBSOLETE and NOT SUPPORTED !!!
+
+ These items are no longer defined, but appear here so that someone
+ searching the interfaces might find them. If you are using one of these
+ items, you must change your code to support the Sound Manager.
+
+ swMode, ftMode, ffMode
+ FreeWave, FFSynthRec, Tone, SWSynthRec, Wave, FTSoundRec
+ SndCompletionProcPtr
+ StartSound, StopSound, SoundDone
+ SetSoundVol, GetSoundVol
+*/
+/*
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ constants
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+*/
+#define twelfthRootTwo 1.05946309435
+
+enum {
+ soundListRsrc = FOUR_CHAR_CODE('snd '), /*Resource type used by Sound Manager*/
+ kSoundCodecInfoResourceType = FOUR_CHAR_CODE('snfo') /*Resource type holding codec information (optional public component resource)*/
+};
+
+enum {
+ kSimpleBeepID = 1 /*reserved resource ID for Simple Beep*/
+};
+
+enum {
+ rate48khz = (long)0xBB800000, /*48000.00000 in fixed-point*/
+ rate44khz = (long)0xAC440000, /*44100.00000 in fixed-point*/
+ rate32khz = 0x7D000000, /*32000.00000 in fixed-point*/
+ rate22050hz = 0x56220000, /*22050.00000 in fixed-point*/
+ rate22khz = 0x56EE8BA3, /*22254.54545 in fixed-point*/
+ rate16khz = 0x3E800000, /*16000.00000 in fixed-point*/
+ rate11khz = 0x2B7745D1, /*11127.27273 in fixed-point*/
+ rate11025hz = 0x2B110000, /*11025.00000 in fixed-point*/
+ rate8khz = 0x1F400000 /* 8000.00000 in fixed-point*/
+};
+
+/*synthesizer numbers for SndNewChannel*/
+enum {
+ sampledSynth = 5 /*sampled sound synthesizer*/
+};
+
+#if CALL_NOT_IN_CARBON
+enum {
+ squareWaveSynth = 1, /*square wave synthesizer*/
+ waveTableSynth = 3, /*wave table synthesizer*/
+ /*old Sound Manager MACE synthesizer numbers*/
+ MACE3snthID = 11,
+ MACE6snthID = 13
+};
+
+#endif /* CALL_NOT_IN_CARBON */
+
+enum {
+ kMiddleC = 60 /*MIDI note value for middle C*/
+};
+
+enum {
+ kNoVolume = 0, /*setting for no sound volume*/
+ kFullVolume = 0x0100 /*1.0, setting for full hardware output volume*/
+};
+
+enum {
+ stdQLength = 128
+};
+
+enum {
+ dataOffsetFlag = 0x8000
+};
+
+enum {
+ kUseOptionalOutputDevice = -1 /*only for Sound Manager 3.0 or later*/
+};
+
+enum {
+ notCompressed = 0, /*compression ID's*/
+ fixedCompression = -1, /*compression ID for fixed-sized compression*/
+ variableCompression = -2 /*compression ID for variable-sized compression*/
+};
+
+enum {
+ twoToOne = 1,
+ eightToThree = 2,
+ threeToOne = 3,
+ sixToOne = 4,
+ sixToOnePacketSize = 8,
+ threeToOnePacketSize = 16
+};
+
+enum {
+ stateBlockSize = 64,
+ leftOverBlockSize = 32
+};
+
+enum {
+ firstSoundFormat = 0x0001, /*general sound format*/
+ secondSoundFormat = 0x0002 /*special sampled sound format (HyperCard)*/
+};
+
+#if CALL_NOT_IN_CARBON
+enum {
+ dbBufferReady = 0x00000001, /*double buffer is filled*/
+ dbLastBuffer = 0x00000004 /*last double buffer to play*/
+};
+
+#endif /* CALL_NOT_IN_CARBON */
+
+enum {
+ sysBeepDisable = 0x0000, /*SysBeep() enable flags*/
+ sysBeepEnable = (1 << 0),
+ sysBeepSynchronous = (1 << 1) /*if bit set, make alert sounds synchronous*/
+};
+
+enum {
+ unitTypeNoSelection = 0xFFFF, /*unitTypes for AudioSelection.unitType*/
+ unitTypeSeconds = 0x0000
+};
+
+enum {
+ stdSH = 0x00, /*Standard sound header encode value*/
+ extSH = 0xFF, /*Extended sound header encode value*/
+ cmpSH = 0xFE /*Compressed sound header encode value*/
+};
+
+/*command numbers for SndDoCommand and SndDoImmediate*/
+enum {
+ nullCmd = 0,
+ quietCmd = 3,
+ flushCmd = 4,
+ reInitCmd = 5,
+ waitCmd = 10,
+ pauseCmd = 11,
+ resumeCmd = 12,
+ callBackCmd = 13,
+ syncCmd = 14,
+ availableCmd = 24,
+ versionCmd = 25,
+ volumeCmd = 46, /*sound manager 3.0 or later only*/
+ getVolumeCmd = 47, /*sound manager 3.0 or later only*/
+ clockComponentCmd = 50, /*sound manager 3.2.1 or later only*/
+ getClockComponentCmd = 51, /*sound manager 3.2.1 or later only*/
+ scheduledSoundCmd = 52, /*sound manager 3.3 or later only*/
+ linkSoundComponentsCmd = 53, /*sound manager 3.3 or later only*/
+ soundCmd = 80,
+ bufferCmd = 81,
+ rateMultiplierCmd = 86,
+ getRateMultiplierCmd = 87
+};
+
+#if CALL_NOT_IN_CARBON
+/*command numbers for SndDoCommand and SndDoImmediate that are not available for use in Carbon */
+enum {
+ initCmd = 1,
+ freeCmd = 2,
+ totalLoadCmd = 26,
+ loadCmd = 27,
+ freqDurationCmd = 40,
+ restCmd = 41,
+ freqCmd = 42,
+ ampCmd = 43,
+ timbreCmd = 44,
+ getAmpCmd = 45,
+ waveTableCmd = 60,
+ phaseCmd = 61,
+ rateCmd = 82,
+ continueCmd = 83,
+ doubleBufferCmd = 84,
+ getRateCmd = 85,
+ sizeCmd = 90, /*obsolete command*/
+ convertCmd = 91 /*obsolete MACE command*/
+};
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if OLDROUTINENAMES
+/*channel initialization parameters*/
+enum {
+ waveInitChannelMask = 0x07,
+ waveInitChannel0 = 0x04, /*wave table only, Sound Manager 2.0 and earlier*/
+ waveInitChannel1 = 0x05, /*wave table only, Sound Manager 2.0 and earlier*/
+ waveInitChannel2 = 0x06, /*wave table only, Sound Manager 2.0 and earlier*/
+ waveInitChannel3 = 0x07, /*wave table only, Sound Manager 2.0 and earlier*/
+ initChan0 = waveInitChannel0, /*obsolete spelling*/
+ initChan1 = waveInitChannel1, /*obsolete spelling*/
+ initChan2 = waveInitChannel2, /*obsolete spelling*/
+ initChan3 = waveInitChannel3 /*obsolete spelling*/
+};
+
+enum {
+ outsideCmpSH = 0, /*obsolete MACE constant*/
+ insideCmpSH = 1, /*obsolete MACE constant*/
+ aceSuccess = 0, /*obsolete MACE constant*/
+ aceMemFull = 1, /*obsolete MACE constant*/
+ aceNilBlock = 2, /*obsolete MACE constant*/
+ aceBadComp = 3, /*obsolete MACE constant*/
+ aceBadEncode = 4, /*obsolete MACE constant*/
+ aceBadDest = 5, /*obsolete MACE constant*/
+ aceBadCmd = 6 /*obsolete MACE constant*/
+};
+
+#endif /* OLDROUTINENAMES */
+
+enum {
+ initChanLeft = 0x0002, /*left stereo channel*/
+ initChanRight = 0x0003, /*right stereo channel*/
+ initNoInterp = 0x0004, /*no linear interpolation*/
+ initNoDrop = 0x0008, /*no drop-sample conversion*/
+ initMono = 0x0080, /*monophonic channel*/
+ initStereo = 0x00C0, /*stereo channel*/
+ initMACE3 = 0x0300, /*MACE 3:1*/
+ initMACE6 = 0x0400, /*MACE 6:1*/
+ initPanMask = 0x0003, /*mask for right/left pan values*/
+ initSRateMask = 0x0030, /*mask for sample rate values*/
+ initStereoMask = 0x00C0, /*mask for mono/stereo values*/
+ initCompMask = 0xFF00 /*mask for compression IDs*/
+};
+
+/*Get&Set Sound Information Selectors*/
+enum {
+ siActiveChannels = FOUR_CHAR_CODE('chac'), /*active channels*/
+ siActiveLevels = FOUR_CHAR_CODE('lmac'), /*active meter levels*/
+ siAGCOnOff = FOUR_CHAR_CODE('agc '), /*automatic gain control state*/
+ siAsync = FOUR_CHAR_CODE('asyn'), /*asynchronous capability*/
+ siAVDisplayBehavior = FOUR_CHAR_CODE('avdb'),
+ siChannelAvailable = FOUR_CHAR_CODE('chav'), /*number of channels available*/
+ siCompressionAvailable = FOUR_CHAR_CODE('cmav'), /*compression types available*/
+ siCompressionFactor = FOUR_CHAR_CODE('cmfa'), /*current compression factor*/
+ siCompressionHeader = FOUR_CHAR_CODE('cmhd'), /*return compression header*/
+ siCompressionNames = FOUR_CHAR_CODE('cnam'), /*compression type names available*/
+ siCompressionParams = FOUR_CHAR_CODE('evaw'), /*compression parameters*/
+ siCompressionSampleRate = FOUR_CHAR_CODE('cprt'), /* SetInfo only: compressor's sample rate*/
+ siCompressionChannels = FOUR_CHAR_CODE('cpct'), /* SetInfo only: compressor's number of channels*/
+ siCompressionOutputSampleRate = FOUR_CHAR_CODE('cort'), /* GetInfo only: only implemented by compressors that have differing in and out rates */
+ siCompressionInputRateList = FOUR_CHAR_CODE('crtl'), /* GetInfo only: only implemented by compressors that only take certain input rates */
+ siCompressionType = FOUR_CHAR_CODE('comp'), /*current compression type*/
+ siCompressionConfiguration = FOUR_CHAR_CODE('ccfg'), /*compression extensions*/
+ siContinuous = FOUR_CHAR_CODE('cont'), /*continous recording*/
+ siDecompressionParams = FOUR_CHAR_CODE('wave'), /*decompression parameters*/
+ siDecompressionConfiguration = FOUR_CHAR_CODE('dcfg'), /*decompression extensions*/
+ siDeviceBufferInfo = FOUR_CHAR_CODE('dbin'), /*size of interrupt buffer*/
+ siDeviceConnected = FOUR_CHAR_CODE('dcon'), /*input device connection status*/
+ siDeviceIcon = FOUR_CHAR_CODE('icon'), /*input device icon*/
+ siDeviceName = FOUR_CHAR_CODE('name'), /*input device name*/
+ siEQSpectrumBands = FOUR_CHAR_CODE('eqsb'), /* number of spectrum bands*/
+ siEQSpectrumLevels = FOUR_CHAR_CODE('eqlv'), /* gets spectum meter levels*/
+ siEQSpectrumOnOff = FOUR_CHAR_CODE('eqlo'), /* turn on/off spectum meter levels*/
+ siEQSpectrumResolution = FOUR_CHAR_CODE('eqrs'), /* set the resolution of the FFT, 0 = low res (<=16 bands), 1 = high res (16-64 bands)*/
+ siEQToneControlGain = FOUR_CHAR_CODE('eqtg'), /* set the bass and treble gain*/
+ siEQToneControlOnOff = FOUR_CHAR_CODE('eqtc'), /* turn on equalizer attenuation*/
+ siHardwareBalance = FOUR_CHAR_CODE('hbal'),
+ siHardwareBalanceSteps = FOUR_CHAR_CODE('hbls'),
+ siHardwareBass = FOUR_CHAR_CODE('hbas'),
+ siHardwareBassSteps = FOUR_CHAR_CODE('hbst'),
+ siHardwareBusy = FOUR_CHAR_CODE('hwbs'), /*sound hardware is in use*/
+ siHardwareFormat = FOUR_CHAR_CODE('hwfm'), /*get hardware format*/
+ siHardwareMute = FOUR_CHAR_CODE('hmut'), /*mute state of all hardware*/
+ siHardwareMuteNoPrefs = FOUR_CHAR_CODE('hmnp'), /*mute state of all hardware, but don't store in prefs */
+ siHardwareTreble = FOUR_CHAR_CODE('htrb'),
+ siHardwareTrebleSteps = FOUR_CHAR_CODE('hwts'),
+ siHardwareVolume = FOUR_CHAR_CODE('hvol'), /*volume level of all hardware*/
+ siHardwareVolumeSteps = FOUR_CHAR_CODE('hstp'), /*number of volume steps for hardware*/
+ siHeadphoneMute = FOUR_CHAR_CODE('pmut'), /*mute state of headphones*/
+ siHeadphoneVolume = FOUR_CHAR_CODE('pvol'), /*volume level of headphones*/
+ siHeadphoneVolumeSteps = FOUR_CHAR_CODE('hdst'), /*number of volume steps for headphones*/
+ siInputAvailable = FOUR_CHAR_CODE('inav'), /*input sources available*/
+ siInputGain = FOUR_CHAR_CODE('gain'), /*input gain*/
+ siInputSource = FOUR_CHAR_CODE('sour'), /*input source selector*/
+ siInputSourceNames = FOUR_CHAR_CODE('snam'), /*input source names*/
+ siLevelMeterOnOff = FOUR_CHAR_CODE('lmet'), /*level meter state*/
+ siModemGain = FOUR_CHAR_CODE('mgai'), /*modem input gain*/
+ siMonitorAvailable = FOUR_CHAR_CODE('mnav'),
+ siMonitorSource = FOUR_CHAR_CODE('mons'),
+ siNumberChannels = FOUR_CHAR_CODE('chan'), /*current number of channels*/
+ siOptionsDialog = FOUR_CHAR_CODE('optd'), /*display options dialog*/
+ siOSTypeInputSource = FOUR_CHAR_CODE('inpt'), /*input source by OSType*/
+ siOSTypeInputAvailable = FOUR_CHAR_CODE('inav'), /*list of available input source OSTypes*/
+ siOutputDeviceName = FOUR_CHAR_CODE('onam'), /*output device name*/
+ siPlayThruOnOff = FOUR_CHAR_CODE('plth'), /*playthrough state*/
+ siPostMixerSoundComponent = FOUR_CHAR_CODE('psmx'), /*install post-mixer effect*/
+ siPreMixerSoundComponent = FOUR_CHAR_CODE('prmx'), /*install pre-mixer effect*/
+ siQuality = FOUR_CHAR_CODE('qual'), /*quality setting*/
+ siRateMultiplier = FOUR_CHAR_CODE('rmul'), /*throttle rate setting*/
+ siRecordingQuality = FOUR_CHAR_CODE('qual'), /*recording quality*/
+ siSampleRate = FOUR_CHAR_CODE('srat'), /*current sample rate*/
+ siSampleRateAvailable = FOUR_CHAR_CODE('srav'), /*sample rates available*/
+ siSampleSize = FOUR_CHAR_CODE('ssiz'), /*current sample size*/
+ siSampleSizeAvailable = FOUR_CHAR_CODE('ssav'), /*sample sizes available*/
+ siSetupCDAudio = FOUR_CHAR_CODE('sucd'), /*setup sound hardware for CD audio*/
+ siSetupModemAudio = FOUR_CHAR_CODE('sumd'), /*setup sound hardware for modem audio*/
+ siSlopeAndIntercept = FOUR_CHAR_CODE('flap'), /*floating point variables for conversion*/
+ siSoundClock = FOUR_CHAR_CODE('sclk'),
+ siUseThisSoundClock = FOUR_CHAR_CODE('sclc'), /*sdev uses this to tell the mixer to use his sound clock*/
+ siSpeakerMute = FOUR_CHAR_CODE('smut'), /*mute state of all built-in speaker*/
+ siSpeakerVolume = FOUR_CHAR_CODE('svol'), /*volume level of built-in speaker*/
+ siSSpCPULoadLimit = FOUR_CHAR_CODE('3dll'),
+ siSSpLocalization = FOUR_CHAR_CODE('3dif'),
+ siSSpSpeakerSetup = FOUR_CHAR_CODE('3dst'),
+ siStereoInputGain = FOUR_CHAR_CODE('sgai'), /*stereo input gain*/
+ siSubwooferMute = FOUR_CHAR_CODE('bmut'), /*mute state of sub-woofer*/
+ siTerminalType = FOUR_CHAR_CODE('ttyp'), /* usb terminal type */
+ siTwosComplementOnOff = FOUR_CHAR_CODE('twos'), /*two's complement state*/
+ siVendorProduct = FOUR_CHAR_CODE('vpro'), /* vendor and product ID */
+ siVolume = FOUR_CHAR_CODE('volu'), /*volume level of source*/
+ siVoxRecordInfo = FOUR_CHAR_CODE('voxr'), /*VOX record parameters*/
+ siVoxStopInfo = FOUR_CHAR_CODE('voxs'), /*VOX stop parameters*/
+ siWideStereo = FOUR_CHAR_CODE('wide'), /*wide stereo setting*/
+ siSupportedExtendedFlags = FOUR_CHAR_CODE('exfl'), /*which flags are supported in Extended sound data structures*/
+ siRateConverterRollOffSlope = FOUR_CHAR_CODE('rcdb'), /*the roll-off slope for the rate converter's filter, in whole dB as a long this value is a long whose range is from 20 (worst quality/fastest performance) to 90 (best quality/slowest performance)*/
+ siOutputLatency = FOUR_CHAR_CODE('olte'), /*latency of sound output component*/
+ siHALAudioDeviceID = FOUR_CHAR_CODE('hlid'), /*audio device id*/
+ siClientAcceptsVBR = FOUR_CHAR_CODE('cvbr'), /*client handles VBR*/
+ siSourceIsExhausted = FOUR_CHAR_CODE('srcx'), /*the ultimate source of data has run out (keep asking, but when you get nothing, that's it)*/
+ siMediaContextID = FOUR_CHAR_CODE('uuid'), /*media context id -- UUID */
+ siCompressionMaxPacketSize = FOUR_CHAR_CODE('cmxp') /*maximum compressed packet size for current configuration -- unsigned long */
+};
+
+enum {
+ siCloseDriver = FOUR_CHAR_CODE('clos'), /*reserved for internal use only*/
+ siInitializeDriver = FOUR_CHAR_CODE('init'), /*reserved for internal use only*/
+ siPauseRecording = FOUR_CHAR_CODE('paus'), /*reserved for internal use only*/
+ siUserInterruptProc = FOUR_CHAR_CODE('user') /*reserved for internal use only*/
+};
+
+/* input source Types*/
+enum {
+ kInvalidSource = (long)0xFFFFFFFF, /*this source may be returned from GetInfo if no other source is the monitored source*/
+ kNoSource = FOUR_CHAR_CODE('none'), /*no source selection*/
+ kCDSource = FOUR_CHAR_CODE('cd '), /*internal CD player input*/
+ kExtMicSource = FOUR_CHAR_CODE('emic'), /*external mic input*/
+ kSoundInSource = FOUR_CHAR_CODE('sinj'), /*sound input jack*/
+ kRCAInSource = FOUR_CHAR_CODE('irca'), /*RCA jack input*/
+ kTVFMTunerSource = FOUR_CHAR_CODE('tvfm'),
+ kDAVInSource = FOUR_CHAR_CODE('idav'), /*DAV analog input*/
+ kIntMicSource = FOUR_CHAR_CODE('imic'), /*internal mic input*/
+ kMediaBaySource = FOUR_CHAR_CODE('mbay'), /*media bay input*/
+ kModemSource = FOUR_CHAR_CODE('modm'), /*modem input (internal modem on desktops, PCI input on PowerBooks)*/
+ kPCCardSource = FOUR_CHAR_CODE('pcm '), /*PC Card pwm input*/
+ kZoomVideoSource = FOUR_CHAR_CODE('zvpc'), /*zoom video input*/
+ kDVDSource = FOUR_CHAR_CODE('dvda'), /* DVD audio input*/
+ kMicrophoneArray = FOUR_CHAR_CODE('mica') /* microphone array*/
+};
+
+/*Sound Component Types and Subtypes*/
+enum {
+ kNoSoundComponentType = FOUR_CHAR_CODE('****'),
+ kSoundComponentType = FOUR_CHAR_CODE('sift'), /*component type*/
+ kSoundComponentPPCType = FOUR_CHAR_CODE('nift'), /*component type for PowerPC code*/
+ kRate8SubType = FOUR_CHAR_CODE('ratb'), /*8-bit rate converter*/
+ kRate16SubType = FOUR_CHAR_CODE('ratw'), /*16-bit rate converter*/
+ kConverterSubType = FOUR_CHAR_CODE('conv'), /*sample format converter*/
+ kSndSourceSubType = FOUR_CHAR_CODE('sour'), /*generic source component*/
+ kMixerType = FOUR_CHAR_CODE('mixr'),
+ kMixer8SubType = FOUR_CHAR_CODE('mixb'), /*8-bit mixer*/
+ kMixer16SubType = FOUR_CHAR_CODE('mixw'), /*16-bit mixer*/
+ kSoundInputDeviceType = FOUR_CHAR_CODE('sinp'), /*sound input component*/
+ kWaveInSubType = FOUR_CHAR_CODE('wavi'), /*Windows waveIn*/
+ kWaveInSnifferSubType = FOUR_CHAR_CODE('wisn'), /*Windows waveIn sniffer*/
+ kSoundOutputDeviceType = FOUR_CHAR_CODE('sdev'), /*sound output component*/
+ kClassicSubType = FOUR_CHAR_CODE('clas'), /*classic hardware, i.e. Mac Plus*/
+ kASCSubType = FOUR_CHAR_CODE('asc '), /*Apple Sound Chip device*/
+ kDSPSubType = FOUR_CHAR_CODE('dsp '), /*DSP device*/
+ kAwacsSubType = FOUR_CHAR_CODE('awac'), /*Another of Will's Audio Chips device*/
+ kGCAwacsSubType = FOUR_CHAR_CODE('awgc'), /*Awacs audio with Grand Central DMA*/
+ kSingerSubType = FOUR_CHAR_CODE('sing'), /*Singer (via Whitney) based sound*/
+ kSinger2SubType = FOUR_CHAR_CODE('sng2'), /*Singer 2 (via Whitney) for Acme*/
+ kWhitSubType = FOUR_CHAR_CODE('whit'), /*Whit sound component for PrimeTime 3*/
+ kSoundBlasterSubType = FOUR_CHAR_CODE('sbls'), /*Sound Blaster for CHRP*/
+ kWaveOutSubType = FOUR_CHAR_CODE('wavo'), /*Windows waveOut*/
+ kWaveOutSnifferSubType = FOUR_CHAR_CODE('wosn'), /*Windows waveOut sniffer*/
+ kDirectSoundSubType = FOUR_CHAR_CODE('dsnd'), /*Windows DirectSound*/
+ kDirectSoundSnifferSubType = FOUR_CHAR_CODE('dssn'), /*Windows DirectSound sniffer*/
+ kUNIXsdevSubType = FOUR_CHAR_CODE('un1x'), /*UNIX base sdev*/
+ kUSBSubType = FOUR_CHAR_CODE('usb '), /*USB device*/
+ kBlueBoxSubType = FOUR_CHAR_CODE('bsnd'), /*Blue Box sound component*/
+ kSoundCompressor = FOUR_CHAR_CODE('scom'),
+ kSoundDecompressor = FOUR_CHAR_CODE('sdec'),
+ kAudioComponentType = FOUR_CHAR_CODE('adio'), /*Audio components and sub-types*/
+ kAwacsPhoneSubType = FOUR_CHAR_CODE('hphn'),
+ kAudioVisionSpeakerSubType = FOUR_CHAR_CODE('telc'),
+ kAudioVisionHeadphoneSubType = FOUR_CHAR_CODE('telh'),
+ kPhilipsFaderSubType = FOUR_CHAR_CODE('tvav'),
+ kSGSToneSubType = FOUR_CHAR_CODE('sgs0'),
+ kSoundEffectsType = FOUR_CHAR_CODE('snfx'), /*sound effects type*/
+ kEqualizerSubType = FOUR_CHAR_CODE('eqal'), /*frequency equalizer*/
+ kSSpLocalizationSubType = FOUR_CHAR_CODE('snd3')
+};
+
+/*Format Types*/
+enum {
+ kSoundNotCompressed = FOUR_CHAR_CODE('NONE'), /*sound is not compressed*/
+ k8BitOffsetBinaryFormat = FOUR_CHAR_CODE('raw '), /*8-bit offset binary*/
+ k16BitBigEndianFormat = FOUR_CHAR_CODE('twos'), /*16-bit big endian*/
+ k16BitLittleEndianFormat = FOUR_CHAR_CODE('sowt'), /*16-bit little endian*/
+ kFloat32Format = FOUR_CHAR_CODE('fl32'), /*32-bit floating point*/
+ kFloat64Format = FOUR_CHAR_CODE('fl64'), /*64-bit floating point*/
+ k24BitFormat = FOUR_CHAR_CODE('in24'), /*24-bit integer*/
+ k32BitFormat = FOUR_CHAR_CODE('in32'), /*32-bit integer*/
+ k32BitLittleEndianFormat = FOUR_CHAR_CODE('23ni'), /*32-bit little endian integer */
+ kMACE3Compression = FOUR_CHAR_CODE('MAC3'), /*MACE 3:1*/
+ kMACE6Compression = FOUR_CHAR_CODE('MAC6'), /*MACE 6:1*/
+ kCDXA4Compression = FOUR_CHAR_CODE('cdx4'), /*CD/XA 4:1*/
+ kCDXA2Compression = FOUR_CHAR_CODE('cdx2'), /*CD/XA 2:1*/
+ kIMACompression = FOUR_CHAR_CODE('ima4'), /*IMA 4:1*/
+ kULawCompression = FOUR_CHAR_CODE('ulaw'), /*.Law 2:1*/
+ kALawCompression = FOUR_CHAR_CODE('alaw'), /*aLaw 2:1*/
+ kMicrosoftADPCMFormat = 0x6D730002, /*Microsoft ADPCM - ACM code 2*/
+ kDVIIntelIMAFormat = 0x6D730011, /*DVI/Intel IMA ADPCM - ACM code 17*/
+ kDVAudioFormat = FOUR_CHAR_CODE('dvca'), /*DV Audio*/
+ kQDesignCompression = FOUR_CHAR_CODE('QDMC'), /*QDesign music*/
+ kQDesign2Compression = FOUR_CHAR_CODE('QDM2'), /*QDesign2 music*/
+ kQUALCOMMCompression = FOUR_CHAR_CODE('Qclp'), /*QUALCOMM PureVoice*/
+ kOffsetBinary = k8BitOffsetBinaryFormat, /*for compatibility*/
+ kTwosComplement = k16BitBigEndianFormat, /*for compatibility*/
+ kLittleEndianFormat = k16BitLittleEndianFormat, /*for compatibility*/
+ kMPEGLayer3Format = 0x6D730055, /*MPEG Layer 3, CBR only (pre QT4.1)*/
+ kFullMPEGLay3Format = FOUR_CHAR_CODE('.mp3') /*MPEG Layer 3, CBR & VBR (QT4.1 and later)*/
+};
+
+#if TARGET_RT_LITTLE_ENDIAN
+enum {
+ k16BitNativeEndianFormat = k16BitLittleEndianFormat,
+ k16BitNonNativeEndianFormat = k16BitBigEndianFormat
+};
+
+#else
+enum {
+ k16BitNativeEndianFormat = k16BitBigEndianFormat,
+ k16BitNonNativeEndianFormat = k16BitLittleEndianFormat
+};
+
+#endif /* TARGET_RT_LITTLE_ENDIAN */
+
+/*Features Flags*/
+enum {
+ k8BitRawIn = (1 << 0), /*data description*/
+ k8BitTwosIn = (1 << 1),
+ k16BitIn = (1 << 2),
+ kStereoIn = (1 << 3),
+ k8BitRawOut = (1 << 8),
+ k8BitTwosOut = (1 << 9),
+ k16BitOut = (1 << 10),
+ kStereoOut = (1 << 11),
+ kReverse = (1L << 16), /* function description*/
+ kRateConvert = (1L << 17),
+ kCreateSoundSource = (1L << 18),
+ kVMAwareness = (1L << 21), /* component will hold its memory*/
+ kHighQuality = (1L << 22), /* performance description*/
+ kNonRealTime = (1L << 23)
+};
+
+/*'snfo' Resource Feature Flags*/
+enum {
+ kSoundCodecInfoFixedCompression = (1L << 0), /* has fixed compression format*/
+ kSoundCodecInfoVariableCompression = (1L << 1), /* has variable compression format*/
+ kSoundCodecInfoHasRestrictedInputRates = (1L << 2), /* compressor has restricted set of input sample rates*/
+ kSoundCodecInfoCanChangeOutputRate = (1L << 3), /* compressor may output a different sample rate than it receives*/
+ kSoundCodecInfoRequiresExternalFraming = (1L << 4) /* format requires external framing information during decode/encode*/
+};
+
+/*SoundComponentPlaySourceBuffer action flags*/
+enum {
+ kSourcePaused = (1 << 0),
+ kPassThrough = (1L << 16),
+ kNoSoundComponentChain = (1L << 17)
+};
+
+/*SoundParamBlock flags, usefull for OpenMixerSoundComponent*/
+enum {
+ kNoMixing = (1 << 0), /*don't mix source*/
+ kNoSampleRateConversion = (1 << 1), /*don't convert sample rate (i.e. 11 kHz -> 22 kHz)*/
+ kNoSampleSizeConversion = (1 << 2), /*don't convert sample size (i.e. 16 -> 8)*/
+ kNoSampleFormatConversion = (1 << 3), /*don't convert sample format (i.e. 'twos' -> 'raw ')*/
+ kNoChannelConversion = (1 << 4), /*don't convert stereo/mono*/
+ kNoDecompression = (1 << 5), /*don't decompress (i.e. 'MAC3' -> 'raw ')*/
+ kNoVolumeConversion = (1 << 6), /*don't apply volume*/
+ kNoRealtimeProcessing = (1 << 7), /*won't run at interrupt time*/
+ kScheduledSource = (1 << 8), /*source is scheduled*/
+ kNonInterleavedBuffer = (1 << 9), /*buffer is not interleaved samples*/
+ kNonPagingMixer = (1 << 10), /*if VM is on, use the non-paging mixer*/
+ kSoundConverterMixer = (1 << 11), /*the mixer is to be used by the SoundConverter*/
+ kPagingMixer = (1 << 12), /*the mixer is to be used as a paging mixer when VM is on*/
+ kVMAwareMixer = (1 << 13), /*passed to the output device when the SM is going to deal with VM safety*/
+ kExtendedSoundData = (1 << 14) /*SoundComponentData record is actually an ExtendedSoundComponentData*/
+};
+
+/*SoundParamBlock quality settings*/
+enum {
+ kBestQuality = (1 << 0) /*use interpolation in rate conversion*/
+};
+
+/*useful bit masks*/
+enum {
+ kInputMask = 0x000000FF, /*masks off input bits*/
+ kOutputMask = 0x0000FF00, /*masks off output bits*/
+ kOutputShift = 8, /*amount output bits are shifted*/
+ kActionMask = 0x00FF0000, /*masks off action bits*/
+ kSoundComponentBits = 0x00FFFFFF
+};
+
+/*audio atom types*/
+enum {
+ kAudioFormatAtomType = FOUR_CHAR_CODE('frma'),
+ kAudioEndianAtomType = FOUR_CHAR_CODE('enda'),
+ kAudioVBRAtomType = FOUR_CHAR_CODE('vbra'),
+ kAudioTerminatorAtomType = 0
+};
+
+/*siAVDisplayBehavior types*/
+enum {
+ kAVDisplayHeadphoneRemove = 0, /* monitor does not have a headphone attached*/
+ kAVDisplayHeadphoneInsert = 1, /* monitor has a headphone attached*/
+ kAVDisplayPlainTalkRemove = 2, /* monitor either sending no input through CPU input port or unable to tell if input is coming in*/
+ kAVDisplayPlainTalkInsert = 3 /* monitor sending PlainTalk level microphone source input through sound input port*/
+};
+
+/*Audio Component constants*/
+enum {
+ /*Values for whichChannel parameter*/
+ audioAllChannels = 0, /*All channels (usually interpreted as both left and right)*/
+ audioLeftChannel = 1, /*Left channel*/
+ audioRightChannel = 2, /*Right channel*/
+ /*Values for mute parameter*/
+ audioUnmuted = 0, /*Device is unmuted*/
+ audioMuted = 1, /*Device is muted*/
+ /*Capabilities flags definitions*/
+ audioDoesMono = (1L << 0), /*Device supports mono output*/
+ audioDoesStereo = (1L << 1), /*Device supports stereo output*/
+ audioDoesIndependentChannels = (1L << 2) /*Device supports independent software control of each channel*/
+};
+
+/*Sound Input Qualities*/
+enum {
+ siCDQuality = FOUR_CHAR_CODE('cd '), /*44.1kHz, stereo, 16 bit*/
+ siBestQuality = FOUR_CHAR_CODE('best'), /*22kHz, mono, 8 bit*/
+ siBetterQuality = FOUR_CHAR_CODE('betr'), /*22kHz, mono, MACE 3:1*/
+ siGoodQuality = FOUR_CHAR_CODE('good'), /*22kHz, mono, MACE 6:1*/
+ siNoneQuality = FOUR_CHAR_CODE('none') /*settings don't match any quality for a get call*/
+};
+
+enum {
+ siDeviceIsConnected = 1, /*input device is connected and ready for input*/
+ siDeviceNotConnected = 0, /*input device is not connected*/
+ siDontKnowIfConnected = -1, /*can't tell if input device is connected*/
+ siReadPermission = 0, /*permission passed to SPBOpenDevice*/
+ siWritePermission = 1 /*permission passed to SPBOpenDevice*/
+};
+
+/*flags that SoundConverterFillBuffer will return*/
+enum {
+ kSoundConverterDidntFillBuffer = (1 << 0), /*set if the converter couldn't completely satisfy a SoundConverterFillBuffer request*/
+ kSoundConverterHasLeftOverData = (1 << 1) /*set if the converter had left over data after completely satisfying a SoundConverterFillBuffer call*/
+};
+
+/* flags for extendedFlags fields of ExtendedSoundComponentData, ExtendedSoundParamBlock, and ExtendedScheduledSoundHeader*/
+enum {
+ kExtendedSoundSampleCountNotValid = 1L << 0, /* set if sampleCount of SoundComponentData isn't meaningful; use buffer size instead*/
+ kExtendedSoundBufferSizeValid = 1L << 1, /* set if bufferSize field is valid*/
+ kExtendedSoundFrameSizesValid = 1L << 2, /* set if frameSizesArray is valid (will be nil if all sizes are common and kExtendedSoundCommonFrameSizeValid is set*/
+ kExtendedSoundCommonFrameSizeValid = 1L << 3, /* set if all audio frames have the same size and the commonFrameSize field is valid*/
+ kExtendedSoundExtensionsValid = 1L << 4, /* set if pointer to extensions array is valid*/
+ kExtendedSoundBufferFlagsValid = 1L << 5 /* set if buffer flags field is valid*/
+};
+
+/* flags passed in bufferFlags/bufferFlagsMask extended fields if kExtendedSoundBufferFlagsValid extended flag is set*/
+enum {
+ kExtendedSoundBufferIsDiscontinuous = 1L << 0, /* buffer is discontinuous with previous buffer*/
+ kExtendedSoundBufferIsFirstBuffer = 1L << 1 /* buffer is first buffer*/
+};
+
+/*
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ typedefs
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+*/
+
+
+struct SndCommand {
+ unsigned short cmd;
+ short param1;
+ long param2;
+};
+typedef struct SndCommand SndCommand;
+typedef struct SndChannel SndChannel;
+
+typedef SndChannel * SndChannelPtr;
+typedef CALLBACK_API( void , SndCallBackProcPtr )(SndChannelPtr chan, SndCommand *cmd);
+typedef STACK_UPP_TYPE(SndCallBackProcPtr) SndCallBackUPP;
+
+struct SndChannel {
+ SndChannelPtr nextChan;
+ Ptr firstMod; /* reserved for the Sound Manager */
+ SndCallBackUPP callBack;
+ long userInfo;
+ long wait; /* The following is for internal Sound Manager use only.*/
+ SndCommand cmdInProgress;
+ short flags;
+ short qLength;
+ short qHead;
+ short qTail;
+ SndCommand queue[128];
+};
+
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(SndCallBackUPP)
+ NewSndCallBackUPP (SndCallBackProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeSndCallBackUPP (SndCallBackUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeSndCallBackUPP (SndChannelPtr chan,
+ SndCommand * cmd,
+ SndCallBackUPP userUPP);
+
+#else
+ enum { uppSndCallBackProcInfo = 0x000003C0 }; /* pascal no_return_value Func(4_bytes, 4_bytes) */
+ #define NewSndCallBackUPP(userRoutine) (SndCallBackUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSndCallBackProcInfo, GetCurrentArchitecture())
+ #define DisposeSndCallBackUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeSndCallBackUPP(chan, cmd, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppSndCallBackProcInfo, (chan), (cmd))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewSndCallBackProc(userRoutine) NewSndCallBackUPP(userRoutine)
+#define CallSndCallBackProc(userRoutine, chan, cmd) InvokeSndCallBackUPP(chan, cmd, userRoutine)
+/*MACE structures*/
+
+struct StateBlock {
+ short stateVar[64];
+};
+typedef struct StateBlock StateBlock;
+typedef StateBlock * StateBlockPtr;
+
+struct LeftOverBlock {
+ unsigned long count;
+ SInt8 sampleArea[32];
+};
+typedef struct LeftOverBlock LeftOverBlock;
+typedef LeftOverBlock * LeftOverBlockPtr;
+
+struct ModRef {
+ unsigned short modNumber;
+ long modInit;
+};
+typedef struct ModRef ModRef;
+
+struct SndListResource {
+ short format;
+ short numModifiers;
+ ModRef modifierPart[1];
+ short numCommands;
+ SndCommand commandPart[1];
+ UInt8 dataPart[1];
+};
+typedef struct SndListResource SndListResource;
+
+typedef SndListResource * SndListPtr;
+typedef SndListPtr * SndListHandle;
+typedef SndListHandle SndListHndl;
+/*HyperCard sound resource format*/
+
+struct Snd2ListResource {
+ short format;
+ short refCount;
+ short numCommands;
+ SndCommand commandPart[1];
+ UInt8 dataPart[1];
+};
+typedef struct Snd2ListResource Snd2ListResource;
+
+typedef Snd2ListResource * Snd2ListPtr;
+typedef Snd2ListPtr * Snd2ListHandle;
+typedef Snd2ListHandle Snd2ListHndl;
+
+struct SoundHeader {
+ Ptr samplePtr; /*if NIL then samples are in sampleArea*/
+ unsigned long length; /*length of sound in bytes*/
+ UnsignedFixed sampleRate; /*sample rate for this sound*/
+ unsigned long loopStart; /*start of looping portion*/
+ unsigned long loopEnd; /*end of looping portion*/
+ UInt8 encode; /*header encoding*/
+ UInt8 baseFrequency; /*baseFrequency value*/
+ UInt8 sampleArea[1]; /*space for when samples follow directly*/
+};
+typedef struct SoundHeader SoundHeader;
+typedef SoundHeader * SoundHeaderPtr;
+
+struct CmpSoundHeader {
+ Ptr samplePtr; /*if nil then samples are in sample area*/
+ unsigned long numChannels; /*number of channels i.e. mono = 1*/
+ UnsignedFixed sampleRate; /*sample rate in Apples Fixed point representation*/
+ unsigned long loopStart; /*loopStart of sound before compression*/
+ unsigned long loopEnd; /*loopEnd of sound before compression*/
+ UInt8 encode; /*data structure used , stdSH, extSH, or cmpSH*/
+ UInt8 baseFrequency; /*same meaning as regular SoundHeader*/
+ unsigned long numFrames; /*length in frames ( packetFrames or sampleFrames )*/
+ extended80 AIFFSampleRate; /*IEEE sample rate*/
+ Ptr markerChunk; /*sync track*/
+ OSType format; /*data format type, was futureUse1*/
+ unsigned long futureUse2; /*reserved by Apple*/
+ StateBlockPtr stateVars; /*pointer to State Block*/
+ LeftOverBlockPtr leftOverSamples; /*used to save truncated samples between compression calls*/
+ short compressionID; /*0 means no compression, non zero means compressionID*/
+ unsigned short packetSize; /*number of bits in compressed sample packet*/
+ unsigned short snthID; /*resource ID of Sound Manager snth that contains NRT C/E*/
+ unsigned short sampleSize; /*number of bits in non-compressed sample*/
+ UInt8 sampleArea[1]; /*space for when samples follow directly*/
+};
+typedef struct CmpSoundHeader CmpSoundHeader;
+typedef CmpSoundHeader * CmpSoundHeaderPtr;
+
+struct ExtSoundHeader {
+ Ptr samplePtr; /*if nil then samples are in sample area*/
+ unsigned long numChannels; /*number of channels, ie mono = 1*/
+ UnsignedFixed sampleRate; /*sample rate in Apples Fixed point representation*/
+ unsigned long loopStart; /*same meaning as regular SoundHeader*/
+ unsigned long loopEnd; /*same meaning as regular SoundHeader*/
+ UInt8 encode; /*data structure used , stdSH, extSH, or cmpSH*/
+ UInt8 baseFrequency; /*same meaning as regular SoundHeader*/
+ unsigned long numFrames; /*length in total number of frames*/
+ extended80 AIFFSampleRate; /*IEEE sample rate*/
+ Ptr markerChunk; /*sync track*/
+ Ptr instrumentChunks; /*AIFF instrument chunks*/
+ Ptr AESRecording;
+ unsigned short sampleSize; /*number of bits in sample*/
+ unsigned short futureUse1; /*reserved by Apple*/
+ unsigned long futureUse2; /*reserved by Apple*/
+ unsigned long futureUse3; /*reserved by Apple*/
+ unsigned long futureUse4; /*reserved by Apple*/
+ UInt8 sampleArea[1]; /*space for when samples follow directly*/
+};
+typedef struct ExtSoundHeader ExtSoundHeader;
+typedef ExtSoundHeader * ExtSoundHeaderPtr;
+
+union SoundHeaderUnion {
+ SoundHeader stdHeader;
+ CmpSoundHeader cmpHeader;
+ ExtSoundHeader extHeader;
+};
+typedef union SoundHeaderUnion SoundHeaderUnion;
+
+struct ConversionBlock {
+ short destination;
+ short unused;
+ CmpSoundHeaderPtr inputPtr;
+ CmpSoundHeaderPtr outputPtr;
+};
+typedef struct ConversionBlock ConversionBlock;
+typedef ConversionBlock * ConversionBlockPtr;
+/* ScheduledSoundHeader flags*/
+enum {
+ kScheduledSoundDoScheduled = 1 << 0,
+ kScheduledSoundDoCallBack = 1 << 1,
+ kScheduledSoundExtendedHdr = 1 << 2
+};
+
+
+struct ScheduledSoundHeader {
+ SoundHeaderUnion u;
+ long flags;
+ short reserved;
+ short callBackParam1;
+ long callBackParam2;
+ TimeRecord startTime;
+};
+typedef struct ScheduledSoundHeader ScheduledSoundHeader;
+typedef ScheduledSoundHeader * ScheduledSoundHeaderPtr;
+
+struct ExtendedScheduledSoundHeader {
+ SoundHeaderUnion u;
+ long flags;
+ short reserved;
+ short callBackParam1;
+ long callBackParam2;
+ TimeRecord startTime;
+ long recordSize;
+ long extendedFlags;
+ long bufferSize;
+ long frameCount; /* number of audio frames*/
+ long * frameSizesArray; /* pointer to array of longs with frame sizes in bytes*/
+ long commonFrameSize; /* size of each frame if common*/
+ void * extensionsPtr; /*pointer to set of classic atoms (size,type,data,...)*/
+ long extensionsSize; /*size of extensions data (extensionsPtr)*/
+ unsigned long bufferFlags; /*set or cleared flags*/
+ unsigned long bufferFlagsMask; /*which flags are valid*/
+};
+typedef struct ExtendedScheduledSoundHeader ExtendedScheduledSoundHeader;
+typedef ExtendedScheduledSoundHeader * ExtendedScheduledSoundHeaderPtr;
+
+struct SMStatus {
+ short smMaxCPULoad;
+ short smNumChannels;
+ short smCurCPULoad;
+};
+typedef struct SMStatus SMStatus;
+typedef SMStatus * SMStatusPtr;
+
+struct SCStatus {
+ UnsignedFixed scStartTime;
+ UnsignedFixed scEndTime;
+ UnsignedFixed scCurrentTime;
+ Boolean scChannelBusy;
+ Boolean scChannelDisposed;
+ Boolean scChannelPaused;
+ Boolean scUnused;
+ unsigned long scChannelAttributes;
+ long scCPULoad;
+};
+typedef struct SCStatus SCStatus;
+typedef SCStatus * SCStatusPtr;
+
+struct AudioSelection {
+ long unitType;
+ UnsignedFixed selStart;
+ UnsignedFixed selEnd;
+};
+typedef struct AudioSelection AudioSelection;
+typedef AudioSelection * AudioSelectionPtr;
+#if CALL_NOT_IN_CARBON
+
+struct SndDoubleBuffer {
+ long dbNumFrames;
+ long dbFlags;
+ long dbUserInfo[2];
+ SInt8 dbSoundData[1];
+};
+typedef struct SndDoubleBuffer SndDoubleBuffer;
+typedef SndDoubleBuffer * SndDoubleBufferPtr;
+
+
+typedef CALLBACK_API( void , SndDoubleBackProcPtr )(SndChannelPtr channel, SndDoubleBufferPtr doubleBufferPtr);
+typedef STACK_UPP_TYPE(SndDoubleBackProcPtr) SndDoubleBackUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(SndDoubleBackUPP)
+ NewSndDoubleBackUPP (SndDoubleBackProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeSndDoubleBackUPP (SndDoubleBackUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeSndDoubleBackUPP (SndChannelPtr channel,
+ SndDoubleBufferPtr doubleBufferPtr,
+ SndDoubleBackUPP userUPP);
+
+#else
+ enum { uppSndDoubleBackProcInfo = 0x000003C0 }; /* pascal no_return_value Func(4_bytes, 4_bytes) */
+ #define NewSndDoubleBackUPP(userRoutine) (SndDoubleBackUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSndDoubleBackProcInfo, GetCurrentArchitecture())
+ #define DisposeSndDoubleBackUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeSndDoubleBackUPP(channel, doubleBufferPtr, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppSndDoubleBackProcInfo, (channel), (doubleBufferPtr))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewSndDoubleBackProc(userRoutine) NewSndDoubleBackUPP(userRoutine)
+#define CallSndDoubleBackProc(userRoutine, channel, doubleBufferPtr) InvokeSndDoubleBackUPP(channel, doubleBufferPtr, userRoutine)
+
+struct SndDoubleBufferHeader {
+ short dbhNumChannels;
+ short dbhSampleSize;
+ short dbhCompressionID;
+ short dbhPacketSize;
+ UnsignedFixed dbhSampleRate;
+ SndDoubleBufferPtr dbhBufferPtr[2];
+ SndDoubleBackUPP dbhDoubleBack;
+};
+typedef struct SndDoubleBufferHeader SndDoubleBufferHeader;
+typedef SndDoubleBufferHeader * SndDoubleBufferHeaderPtr;
+
+struct SndDoubleBufferHeader2 {
+ short dbhNumChannels;
+ short dbhSampleSize;
+ short dbhCompressionID;
+ short dbhPacketSize;
+ UnsignedFixed dbhSampleRate;
+ SndDoubleBufferPtr dbhBufferPtr[2];
+ SndDoubleBackUPP dbhDoubleBack;
+ OSType dbhFormat;
+};
+typedef struct SndDoubleBufferHeader2 SndDoubleBufferHeader2;
+typedef SndDoubleBufferHeader2 * SndDoubleBufferHeader2Ptr;
+#endif /* CALL_NOT_IN_CARBON */
+
+
+struct SoundInfoList {
+ short count;
+ Handle infoHandle;
+};
+typedef struct SoundInfoList SoundInfoList;
+typedef SoundInfoList * SoundInfoListPtr;
+
+struct SoundComponentData {
+ long flags;
+ OSType format;
+ short numChannels;
+ short sampleSize;
+ UnsignedFixed sampleRate;
+ long sampleCount;
+ Byte * buffer;
+ long reserved;
+};
+typedef struct SoundComponentData SoundComponentData;
+typedef SoundComponentData * SoundComponentDataPtr;
+
+struct ExtendedSoundComponentData {
+ SoundComponentData desc; /*description of sound buffer*/
+ long recordSize; /*size of this record in bytes*/
+ long extendedFlags; /*flags for extended record*/
+ long bufferSize; /*size of buffer in bytes*/
+ long frameCount; /*number of audio frames*/
+ long * frameSizesArray; /*pointer to array of longs with frame sizes in bytes*/
+ long commonFrameSize; /*size of each frame if common*/
+ void * extensionsPtr; /*pointer to set of classic atoms (size,type,data,...)*/
+ long extensionsSize; /*size of extensions data (extensionsPtr)*/
+ unsigned long bufferFlags; /*set or cleared flags*/
+ unsigned long bufferFlagsMask; /*which flags are valid*/
+};
+typedef struct ExtendedSoundComponentData ExtendedSoundComponentData;
+typedef ExtendedSoundComponentData * ExtendedSoundComponentDataPtr;
+typedef struct SoundParamBlock SoundParamBlock;
+
+typedef SoundParamBlock * SoundParamBlockPtr;
+typedef CALLBACK_API( Boolean , SoundParamProcPtr )(SoundParamBlockPtr *pb);
+typedef STACK_UPP_TYPE(SoundParamProcPtr) SoundParamUPP;
+
+struct SoundParamBlock {
+ long recordSize; /*size of this record in bytes*/
+ SoundComponentData desc; /*description of sound buffer*/
+ UnsignedFixed rateMultiplier; /*rate multiplier to apply to sound*/
+ short leftVolume; /*volumes to apply to sound*/
+ short rightVolume;
+ long quality; /*quality to apply to sound*/
+ ComponentInstance filter; /*filter to apply to sound*/
+ SoundParamUPP moreRtn; /*routine to call to get more data*/
+ SoundParamUPP completionRtn; /*routine to call when buffer is complete*/
+ long refCon; /*user refcon*/
+ short result; /*result*/
+};
+
+
+struct ExtendedSoundParamBlock {
+ SoundParamBlock pb; /*classic SoundParamBlock except recordSize == sizeof(ExtendedSoundParamBlock)*/
+ short reserved;
+ long extendedFlags; /*flags*/
+ long bufferSize; /*size of buffer in bytes*/
+ long frameCount; /*number of audio frames*/
+ long * frameSizesArray; /*pointer to array of longs with frame sizes in bytes*/
+ long commonFrameSize; /*size of each frame if common*/
+ void * extensionsPtr; /*pointer to set of classic atoms (size,type,data,...)*/
+ long extensionsSize; /*size of extensions data (extensionsPtr)*/
+ unsigned long bufferFlags; /*set or cleared flags*/
+ unsigned long bufferFlagsMask; /*which flags are valid*/
+};
+typedef struct ExtendedSoundParamBlock ExtendedSoundParamBlock;
+typedef ExtendedSoundParamBlock * ExtendedSoundParamBlockPtr;
+
+struct CompressionInfo {
+ long recordSize;
+ OSType format;
+ short compressionID;
+ unsigned short samplesPerPacket;
+ unsigned short bytesPerPacket;
+ unsigned short bytesPerFrame;
+ unsigned short bytesPerSample;
+ unsigned short futureUse1;
+};
+typedef struct CompressionInfo CompressionInfo;
+typedef CompressionInfo * CompressionInfoPtr;
+typedef CompressionInfoPtr * CompressionInfoHandle;
+/*variables for floating point conversion*/
+
+struct SoundSlopeAndInterceptRecord {
+ Float64 slope;
+ Float64 intercept;
+ Float64 minClip;
+ Float64 maxClip;
+};
+typedef struct SoundSlopeAndInterceptRecord SoundSlopeAndInterceptRecord;
+
+typedef SoundSlopeAndInterceptRecord * SoundSlopeAndInterceptPtr;
+/*private thing to use as a reference to a Sound Converter*/
+typedef struct OpaqueSoundConverter* SoundConverter;
+/*callback routine to provide data to the Sound Converter*/
+typedef CALLBACK_API( Boolean , SoundConverterFillBufferDataProcPtr )(SoundComponentDataPtr *data, void *refCon);
+typedef STACK_UPP_TYPE(SoundConverterFillBufferDataProcPtr) SoundConverterFillBufferDataUPP;
+/*private thing to use as a reference to a Sound Source*/
+typedef struct OpaqueSoundSource* SoundSource;
+typedef SoundSource * SoundSourcePtr;
+
+
+
+struct SoundComponentLink {
+ ComponentDescription description; /*Describes the sound component*/
+ SoundSource mixerID; /*Reserved by Apple*/
+ SoundSource * linkID; /*Reserved by Apple*/
+};
+typedef struct SoundComponentLink SoundComponentLink;
+typedef SoundComponentLink * SoundComponentLinkPtr;
+
+struct AudioInfo {
+ long capabilitiesFlags; /*Describes device capabilities*/
+ long reserved; /*Reserved by Apple*/
+ unsigned short numVolumeSteps; /*Number of significant increments between min and max volume*/
+};
+typedef struct AudioInfo AudioInfo;
+typedef AudioInfo * AudioInfoPtr;
+
+struct AudioFormatAtom {
+ long size; /* = sizeof(AudioFormatAtom)*/
+ OSType atomType; /* = kAudioFormatAtomType*/
+ OSType format;
+};
+typedef struct AudioFormatAtom AudioFormatAtom;
+typedef AudioFormatAtom * AudioFormatAtomPtr;
+
+struct AudioEndianAtom {
+ long size; /* = sizeof(AudioEndianAtom)*/
+ OSType atomType; /* = kAudioEndianAtomType*/
+ short littleEndian;
+};
+typedef struct AudioEndianAtom AudioEndianAtom;
+typedef AudioEndianAtom * AudioEndianAtomPtr;
+
+struct AudioTerminatorAtom {
+ long size; /* = sizeof(AudioTerminatorAtom)*/
+ OSType atomType; /* = kAudioTerminatorAtomType*/
+};
+typedef struct AudioTerminatorAtom AudioTerminatorAtom;
+typedef AudioTerminatorAtom * AudioTerminatorAtomPtr;
+
+struct LevelMeterInfo {
+ short numChannels; /* mono or stereo source*/
+ UInt8 leftMeter; /* 0-255 range*/
+ UInt8 rightMeter; /* 0-255 range*/
+};
+typedef struct LevelMeterInfo LevelMeterInfo;
+typedef LevelMeterInfo * LevelMeterInfoPtr;
+
+struct EQSpectrumBandsRecord {
+ short count;
+ UnsignedFixedPtr frequency; /* pointer to array of frequencies*/
+};
+typedef struct EQSpectrumBandsRecord EQSpectrumBandsRecord;
+typedef EQSpectrumBandsRecord * EQSpectrumBandsRecordPtr;
+
+
+/* Sound Input Structures*/
+typedef struct SPB SPB;
+
+typedef SPB * SPBPtr;
+
+
+/*user procedures called by sound input routines*/
+typedef CALLBACK_API( void , SIInterruptProcPtr )(SPBPtr inParamPtr, Ptr dataBuffer, short peakAmplitude, long sampleSize);
+/*
+ WARNING: SIInterruptProcPtr uses register based parameters under classic 68k
+ and cannot be written in a high-level language without
+ the help of mixed mode or assembly glue.
+*/
+typedef CALLBACK_API( void , SICompletionProcPtr )(SPBPtr inParamPtr);
+typedef REGISTER_UPP_TYPE(SIInterruptProcPtr) SIInterruptUPP;
+typedef STACK_UPP_TYPE(SICompletionProcPtr) SICompletionUPP;
+
+
+/*Sound Input Parameter Block*/
+
+struct SPB {
+ long inRefNum; /*reference number of sound input device*/
+ unsigned long count; /*number of bytes to record*/
+ unsigned long milliseconds; /*number of milliseconds to record*/
+ unsigned long bufferLength; /*length of buffer in bytes*/
+ Ptr bufferPtr; /*buffer to store sound data in*/
+ SICompletionUPP completionRoutine; /*completion routine*/
+ SIInterruptUPP interruptRoutine; /*interrupt routine*/
+ long userLong; /*user-defined field*/
+ OSErr error; /*error*/
+ long unused1; /*reserved - must be zero*/
+};
+
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(SoundParamUPP)
+ NewSoundParamUPP (SoundParamProcPtr userRoutine);
+
+ EXTERN_API(SoundConverterFillBufferDataUPP)
+ NewSoundConverterFillBufferDataUPP (SoundConverterFillBufferDataProcPtr userRoutine);
+
+ EXTERN_API(SIInterruptUPP)
+ NewSIInterruptUPP (SIInterruptProcPtr userRoutine);
+
+ EXTERN_API(SICompletionUPP)
+ NewSICompletionUPP (SICompletionProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeSoundParamUPP (SoundParamUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeSoundConverterFillBufferDataUPP (SoundConverterFillBufferDataUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeSIInterruptUPP (SIInterruptUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeSICompletionUPP (SICompletionUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeSoundParamUPP (SoundParamBlockPtr * pb,
+ SoundParamUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeSoundConverterFillBufferDataUPP (SoundComponentDataPtr * data,
+ void * refCon,
+ SoundConverterFillBufferDataUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeSIInterruptUPP (SPBPtr inParamPtr,
+ Ptr dataBuffer,
+ short peakAmplitude,
+ long sampleSize,
+ SIInterruptUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeSICompletionUPP (SPBPtr inParamPtr,
+ SICompletionUPP userUPP);
+
+#else
+ enum { uppSoundParamProcInfo = 0x000000D0 }; /* pascal 1_byte Func(4_bytes) */
+ enum { uppSoundConverterFillBufferDataProcInfo = 0x000003D0 }; /* pascal 1_byte Func(4_bytes, 4_bytes) */
+ enum { uppSIInterruptProcInfo = 0x1C579802 }; /* register no_return_value Func(4_bytes:A0, 4_bytes:A1, 2_bytes:D0, 4_bytes:D1) */
+ enum { uppSICompletionProcInfo = 0x000000C0 }; /* pascal no_return_value Func(4_bytes) */
+ #define NewSoundParamUPP(userRoutine) (SoundParamUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSoundParamProcInfo, GetCurrentArchitecture())
+ #define NewSoundConverterFillBufferDataUPP(userRoutine) (SoundConverterFillBufferDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSoundConverterFillBufferDataProcInfo, GetCurrentArchitecture())
+ #define NewSIInterruptUPP(userRoutine) (SIInterruptUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSIInterruptProcInfo, GetCurrentArchitecture())
+ #define NewSICompletionUPP(userRoutine) (SICompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSICompletionProcInfo, GetCurrentArchitecture())
+ #define DisposeSoundParamUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeSoundConverterFillBufferDataUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeSIInterruptUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeSICompletionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeSoundParamUPP(pb, userUPP) (Boolean)CALL_ONE_PARAMETER_UPP((userUPP), uppSoundParamProcInfo, (pb))
+ #define InvokeSoundConverterFillBufferDataUPP(data, refCon, userUPP) (Boolean)CALL_TWO_PARAMETER_UPP((userUPP), uppSoundConverterFillBufferDataProcInfo, (data), (refCon))
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ /* InvokeSIInterruptUPP can't be called from classic 68k without glue code */
+ #else
+ #define InvokeSIInterruptUPP(inParamPtr, dataBuffer, peakAmplitude, sampleSize, userUPP) CALL_FOUR_PARAMETER_UPP((userUPP), uppSIInterruptProcInfo, (inParamPtr), (dataBuffer), (peakAmplitude), (sampleSize))
+ #endif
+ #define InvokeSICompletionUPP(inParamPtr, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppSICompletionProcInfo, (inParamPtr))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewSoundParamProc(userRoutine) NewSoundParamUPP(userRoutine)
+#define NewSoundConverterFillBufferDataProc(userRoutine) NewSoundConverterFillBufferDataUPP(userRoutine)
+#define NewSIInterruptProc(userRoutine) NewSIInterruptUPP(userRoutine)
+#define NewSICompletionProc(userRoutine) NewSICompletionUPP(userRoutine)
+#define CallSoundParamProc(userRoutine, pb) InvokeSoundParamUPP(pb, userRoutine)
+#define CallSoundConverterFillBufferDataProc(userRoutine, data, refCon) InvokeSoundConverterFillBufferDataUPP(data, refCon, userRoutine)
+#define CallSIInterruptProc(userRoutine, inParamPtr, dataBuffer, peakAmplitude, sampleSize) InvokeSIInterruptUPP(inParamPtr, dataBuffer, peakAmplitude, sampleSize, userRoutine)
+#define CallSICompletionProc(userRoutine, inParamPtr) InvokeSICompletionUPP(inParamPtr, userRoutine)
+typedef CALLBACK_API( void , FilePlayCompletionProcPtr )(SndChannelPtr chan);
+typedef STACK_UPP_TYPE(FilePlayCompletionProcPtr) FilePlayCompletionUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(FilePlayCompletionUPP)
+ NewFilePlayCompletionUPP (FilePlayCompletionProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeFilePlayCompletionUPP (FilePlayCompletionUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeFilePlayCompletionUPP (SndChannelPtr chan,
+ FilePlayCompletionUPP userUPP);
+
+#else
+ enum { uppFilePlayCompletionProcInfo = 0x000000C0 }; /* pascal no_return_value Func(4_bytes) */
+ #define NewFilePlayCompletionUPP(userRoutine) (FilePlayCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppFilePlayCompletionProcInfo, GetCurrentArchitecture())
+ #define DisposeFilePlayCompletionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeFilePlayCompletionUPP(chan, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppFilePlayCompletionProcInfo, (chan))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewFilePlayCompletionProc(userRoutine) NewFilePlayCompletionUPP(userRoutine)
+#define CallFilePlayCompletionProc(userRoutine, chan) InvokeFilePlayCompletionUPP(chan, userRoutine)
+/*
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ prototypes
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+*/
+
+
+/* Sound Manager routines */
+EXTERN_API( void )
+SysBeep (short duration) ONEWORDINLINE(0xA9C8);
+
+EXTERN_API( OSErr )
+SndDoCommand (SndChannelPtr chan,
+ const SndCommand * cmd,
+ Boolean noWait) ONEWORDINLINE(0xA803);
+
+EXTERN_API( OSErr )
+SndDoImmediate (SndChannelPtr chan,
+ const SndCommand * cmd) ONEWORDINLINE(0xA804);
+
+EXTERN_API( OSErr )
+SndNewChannel (SndChannelPtr * chan,
+ short synth,
+ long init,
+ SndCallBackUPP userRoutine) ONEWORDINLINE(0xA807);
+
+EXTERN_API( OSErr )
+SndDisposeChannel (SndChannelPtr chan,
+ Boolean quietNow) ONEWORDINLINE(0xA801);
+
+EXTERN_API( OSErr )
+SndPlay (SndChannelPtr chan,
+ SndListHandle sndHandle,
+ Boolean async) ONEWORDINLINE(0xA805);
+
+#if OLDROUTINENAMES
+EXTERN_API( OSErr )
+SndAddModifier (SndChannelPtr chan,
+ Ptr modifier,
+ short id,
+ long init) ONEWORDINLINE(0xA802);
+
+#endif /* OLDROUTINENAMES */
+
+EXTERN_API( OSErr )
+SndControl (short id,
+ SndCommand * cmd) ONEWORDINLINE(0xA806);
+
+/* Sound Manager 2.0 and later, uses _SoundDispatch */
+EXTERN_API( NumVersion )
+SndSoundManagerVersion (void) FOURWORDINLINE(0x203C, 0x000C, 0x0008, 0xA800);
+
+EXTERN_API( OSErr )
+SndStartFilePlay (SndChannelPtr chan,
+ short fRefNum,
+ short resNum,
+ long bufferSize,
+ void * theBuffer,
+ AudioSelectionPtr theSelection,
+ FilePlayCompletionUPP theCompletion,
+ Boolean async) FOURWORDINLINE(0x203C, 0x0D00, 0x0008, 0xA800);
+
+EXTERN_API( OSErr )
+SndPauseFilePlay (SndChannelPtr chan) FOURWORDINLINE(0x203C, 0x0204, 0x0008, 0xA800);
+
+EXTERN_API( OSErr )
+SndStopFilePlay (SndChannelPtr chan,
+ Boolean quietNow) FOURWORDINLINE(0x203C, 0x0308, 0x0008, 0xA800);
+
+EXTERN_API( OSErr )
+SndChannelStatus (SndChannelPtr chan,
+ short theLength,
+ SCStatusPtr theStatus) FOURWORDINLINE(0x203C, 0x0510, 0x0008, 0xA800);
+
+EXTERN_API( OSErr )
+SndManagerStatus (short theLength,
+ SMStatusPtr theStatus) FOURWORDINLINE(0x203C, 0x0314, 0x0008, 0xA800);
+
+EXTERN_API( void )
+SndGetSysBeepState (short * sysBeepState) FOURWORDINLINE(0x203C, 0x0218, 0x0008, 0xA800);
+
+EXTERN_API( OSErr )
+SndSetSysBeepState (short sysBeepState) FOURWORDINLINE(0x203C, 0x011C, 0x0008, 0xA800);
+
+EXTERN_API( OSErr )
+SndPlayDoubleBuffer (SndChannelPtr chan,
+ SndDoubleBufferHeaderPtr theParams) FOURWORDINLINE(0x203C, 0x0420, 0x0008, 0xA800);
+
+/* MACE compression routines, uses _SoundDispatch */
+EXTERN_API( NumVersion )
+MACEVersion (void) FOURWORDINLINE(0x203C, 0x0000, 0x0010, 0xA800);
+
+EXTERN_API( void )
+Comp3to1 (const void * inBuffer,
+ void * outBuffer,
+ unsigned long cnt,
+ StateBlockPtr inState,
+ StateBlockPtr outState,
+ unsigned long numChannels,
+ unsigned long whichChannel) FOURWORDINLINE(0x203C, 0x0004, 0x0010, 0xA800);
+
+EXTERN_API( void )
+Exp1to3 (const void * inBuffer,
+ void * outBuffer,
+ unsigned long cnt,
+ StateBlockPtr inState,
+ StateBlockPtr outState,
+ unsigned long numChannels,
+ unsigned long whichChannel) FOURWORDINLINE(0x203C, 0x0008, 0x0010, 0xA800);
+
+EXTERN_API( void )
+Comp6to1 (const void * inBuffer,
+ void * outBuffer,
+ unsigned long cnt,
+ StateBlockPtr inState,
+ StateBlockPtr outState,
+ unsigned long numChannels,
+ unsigned long whichChannel) FOURWORDINLINE(0x203C, 0x000C, 0x0010, 0xA800);
+
+EXTERN_API( void )
+Exp1to6 (const void * inBuffer,
+ void * outBuffer,
+ unsigned long cnt,
+ StateBlockPtr inState,
+ StateBlockPtr outState,
+ unsigned long numChannels,
+ unsigned long whichChannel) FOURWORDINLINE(0x203C, 0x0010, 0x0010, 0xA800);
+
+/* Sound Manager 3.0 and later calls, uses _SoundDispatch */
+EXTERN_API( OSErr )
+GetSysBeepVolume (long * level) FOURWORDINLINE(0x203C, 0x0224, 0x0018, 0xA800);
+
+EXTERN_API( OSErr )
+SetSysBeepVolume (long level) FOURWORDINLINE(0x203C, 0x0228, 0x0018, 0xA800);
+
+EXTERN_API( OSErr )
+GetDefaultOutputVolume (long * level) FOURWORDINLINE(0x203C, 0x022C, 0x0018, 0xA800);
+
+EXTERN_API( OSErr )
+SetDefaultOutputVolume (long level) FOURWORDINLINE(0x203C, 0x0230, 0x0018, 0xA800);
+
+EXTERN_API( OSErr )
+GetSoundHeaderOffset (SndListHandle sndHandle,
+ long * offset) FOURWORDINLINE(0x203C, 0x0404, 0x0018, 0xA800);
+
+EXTERN_API( UnsignedFixed )
+UnsignedFixedMulDiv (UnsignedFixed value,
+ UnsignedFixed multiplier,
+ UnsignedFixed divisor) FOURWORDINLINE(0x203C, 0x060C, 0x0018, 0xA800);
+
+EXTERN_API( OSErr )
+GetCompressionInfo (short compressionID,
+ OSType format,
+ short numChannels,
+ short sampleSize,
+ CompressionInfoPtr cp) FOURWORDINLINE(0x203C, 0x0710, 0x0018, 0xA800);
+
+EXTERN_API( OSErr )
+SetSoundPreference (OSType theType,
+ Str255 name,
+ Handle settings) FOURWORDINLINE(0x203C, 0x0634, 0x0018, 0xA800);
+
+EXTERN_API( OSErr )
+GetSoundPreference (OSType theType,
+ Str255 name,
+ Handle settings) FOURWORDINLINE(0x203C, 0x0638, 0x0018, 0xA800);
+
+EXTERN_API( OSErr )
+OpenMixerSoundComponent (SoundComponentDataPtr outputDescription,
+ long outputFlags,
+ ComponentInstance * mixerComponent) FOURWORDINLINE(0x203C, 0x0614, 0x0018, 0xA800);
+
+EXTERN_API( OSErr )
+CloseMixerSoundComponent (ComponentInstance ci) FOURWORDINLINE(0x203C, 0x0218, 0x0018, 0xA800);
+
+/* Sound Manager 3.1 and later calls, uses _SoundDispatch */
+EXTERN_API( OSErr )
+SndGetInfo (SndChannelPtr chan,
+ OSType selector,
+ void * infoPtr) FOURWORDINLINE(0x203C, 0x063C, 0x0018, 0xA800);
+
+EXTERN_API( OSErr )
+SndSetInfo (SndChannelPtr chan,
+ OSType selector,
+ const void * infoPtr) FOURWORDINLINE(0x203C, 0x0640, 0x0018, 0xA800);
+
+EXTERN_API( OSErr )
+GetSoundOutputInfo (Component outputDevice,
+ OSType selector,
+ void * infoPtr) FOURWORDINLINE(0x203C, 0x0644, 0x0018, 0xA800);
+
+EXTERN_API( OSErr )
+SetSoundOutputInfo (Component outputDevice,
+ OSType selector,
+ const void * infoPtr) FOURWORDINLINE(0x203C, 0x0648, 0x0018, 0xA800);
+
+/* Sound Manager 3.2 and later calls, uses _SoundDispatch */
+EXTERN_API( OSErr )
+GetCompressionName (OSType compressionType,
+ Str255 compressionName) FOURWORDINLINE(0x203C, 0x044C, 0x0018, 0xA800);
+
+EXTERN_API( OSErr )
+SoundConverterOpen (const SoundComponentData * inputFormat,
+ const SoundComponentData * outputFormat,
+ SoundConverter * sc) FOURWORDINLINE(0x203C, 0x0650, 0x0018, 0xA800);
+
+EXTERN_API( OSErr )
+SoundConverterClose (SoundConverter sc) FOURWORDINLINE(0x203C, 0x0254, 0x0018, 0xA800);
+
+EXTERN_API( OSErr )
+SoundConverterGetBufferSizes (SoundConverter sc,
+ unsigned long inputBytesTarget,
+ unsigned long * inputFrames,
+ unsigned long * inputBytes,
+ unsigned long * outputBytes) FOURWORDINLINE(0x203C, 0x0A58, 0x0018, 0xA800);
+
+EXTERN_API( OSErr )
+SoundConverterBeginConversion (SoundConverter sc) FOURWORDINLINE(0x203C, 0x025C, 0x0018, 0xA800);
+
+EXTERN_API( OSErr )
+SoundConverterConvertBuffer (SoundConverter sc,
+ const void * inputPtr,
+ unsigned long inputFrames,
+ void * outputPtr,
+ unsigned long * outputFrames,
+ unsigned long * outputBytes) FOURWORDINLINE(0x203C, 0x0C60, 0x0018, 0xA800);
+
+EXTERN_API( OSErr )
+SoundConverterEndConversion (SoundConverter sc,
+ void * outputPtr,
+ unsigned long * outputFrames,
+ unsigned long * outputBytes) FOURWORDINLINE(0x203C, 0x0864, 0x0018, 0xA800);
+
+/* Sound Manager 3.3 and later calls, uses _SoundDispatch */
+EXTERN_API( OSErr )
+SoundConverterGetInfo (SoundConverter sc,
+ OSType selector,
+ void * infoPtr) FOURWORDINLINE(0x203C, 0x0668, 0x0018, 0xA800);
+
+EXTERN_API( OSErr )
+SoundConverterSetInfo (SoundConverter sc,
+ OSType selector,
+ void * infoPtr) FOURWORDINLINE(0x203C, 0x066C, 0x0018, 0xA800);
+
+/* Sound Manager 3.6 and later calls, uses _SoundDispatch */
+EXTERN_API( OSErr )
+SoundConverterFillBuffer (SoundConverter sc,
+ SoundConverterFillBufferDataUPP fillBufferDataUPP,
+ void * fillBufferDataRefCon,
+ void * outputBuffer,
+ unsigned long outputBufferByteSize,
+ unsigned long * bytesWritten,
+ unsigned long * framesWritten,
+ unsigned long * outputFlags) FOURWORDINLINE(0x203C, 0x1078, 0x0018, 0xA800);
+
+EXTERN_API( OSErr )
+SoundManagerGetInfo (OSType selector,
+ void * infoPtr) FOURWORDINLINE(0x203C, 0x047C, 0x0018, 0xA800);
+
+EXTERN_API( OSErr )
+SoundManagerSetInfo (OSType selector,
+ const void * infoPtr) FOURWORDINLINE(0x203C, 0x0480, 0x0018, 0xA800);
+
+/*
+ Sound Component Functions
+ basic sound component functions
+*/
+
+EXTERN_API( ComponentResult )
+SoundComponentInitOutputDevice (ComponentInstance ti,
+ long actions) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0001, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SoundComponentSetSource (ComponentInstance ti,
+ SoundSource sourceID,
+ ComponentInstance source) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0002, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SoundComponentGetSource (ComponentInstance ti,
+ SoundSource sourceID,
+ ComponentInstance * source) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0003, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SoundComponentGetSourceData (ComponentInstance ti,
+ SoundComponentDataPtr * sourceData) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0004, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SoundComponentSetOutput (ComponentInstance ti,
+ SoundComponentDataPtr requested,
+ SoundComponentDataPtr * actual) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0005, 0x7000, 0xA82A);
+
+/* junction methods for the mixer, must be called at non-interrupt level*/
+EXTERN_API( ComponentResult )
+SoundComponentAddSource (ComponentInstance ti,
+ SoundSource * sourceID) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0101, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SoundComponentRemoveSource (ComponentInstance ti,
+ SoundSource sourceID) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0102, 0x7000, 0xA82A);
+
+/* info methods*/
+EXTERN_API( ComponentResult )
+SoundComponentGetInfo (ComponentInstance ti,
+ SoundSource sourceID,
+ OSType selector,
+ void * infoPtr) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0103, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SoundComponentSetInfo (ComponentInstance ti,
+ SoundSource sourceID,
+ OSType selector,
+ void * infoPtr) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0104, 0x7000, 0xA82A);
+
+/* control methods*/
+EXTERN_API( ComponentResult )
+SoundComponentStartSource (ComponentInstance ti,
+ short count,
+ SoundSource * sources) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0105, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SoundComponentStopSource (ComponentInstance ti,
+ short count,
+ SoundSource * sources) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0106, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SoundComponentPauseSource (ComponentInstance ti,
+ short count,
+ SoundSource * sources) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0107, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SoundComponentPlaySourceBuffer (ComponentInstance ti,
+ SoundSource sourceID,
+ SoundParamBlockPtr pb,
+ long actions) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0108, 0x7000, 0xA82A);
+
+
+/* selectors for component calls */
+enum {
+ kSoundComponentInitOutputDeviceSelect = 0x0001,
+ kSoundComponentSetSourceSelect = 0x0002,
+ kSoundComponentGetSourceSelect = 0x0003,
+ kSoundComponentGetSourceDataSelect = 0x0004,
+ kSoundComponentSetOutputSelect = 0x0005,
+ kSoundComponentAddSourceSelect = 0x0101,
+ kSoundComponentRemoveSourceSelect = 0x0102,
+ kSoundComponentGetInfoSelect = 0x0103,
+ kSoundComponentSetInfoSelect = 0x0104,
+ kSoundComponentStartSourceSelect = 0x0105,
+ kSoundComponentStopSourceSelect = 0x0106,
+ kSoundComponentPauseSourceSelect = 0x0107,
+ kSoundComponentPlaySourceBufferSelect = 0x0108
+};
+/*Audio Components*/
+/*Volume is described as a value between 0 and 1, with 0 indicating minimum
+ volume and 1 indicating maximum volume; if the device doesn't support
+ software control of volume, then a value of unimpErr is returned, indicating
+ that these functions are not supported by the device
+*/
+EXTERN_API( ComponentResult )
+AudioGetVolume (ComponentInstance ac,
+ short whichChannel,
+ ShortFixed * volume) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0000, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AudioSetVolume (ComponentInstance ac,
+ short whichChannel,
+ ShortFixed volume) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0001, 0x7000, 0xA82A);
+
+/*If the device doesn't support software control of mute, then a value of unimpErr is
+returned, indicating that these functions are not supported by the device.*/
+EXTERN_API( ComponentResult )
+AudioGetMute (ComponentInstance ac,
+ short whichChannel,
+ short * mute) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0002, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AudioSetMute (ComponentInstance ac,
+ short whichChannel,
+ short mute) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0003, 0x7000, 0xA82A);
+
+/*AudioSetToDefaults causes the associated device to reset its volume and mute values
+(and perhaps other characteristics, e.g. attenuation) to "factory default" settings*/
+EXTERN_API( ComponentResult )
+AudioSetToDefaults (ComponentInstance ac) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0004, 0x7000, 0xA82A);
+
+/*This routine is required; it must be implemented by all audio components*/
+
+EXTERN_API( ComponentResult )
+AudioGetInfo (ComponentInstance ac,
+ AudioInfoPtr info) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0005, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AudioGetBass (ComponentInstance ac,
+ short whichChannel,
+ short * bass) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0006, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AudioSetBass (ComponentInstance ac,
+ short whichChannel,
+ short bass) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0007, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AudioGetTreble (ComponentInstance ac,
+ short whichChannel,
+ short * Treble) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0008, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AudioSetTreble (ComponentInstance ac,
+ short whichChannel,
+ short Treble) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0009, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+AudioGetOutputDevice (ComponentInstance ac,
+ Component * outputDevice) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000A, 0x7000, 0xA82A);
+
+/*This is routine is private to the AudioVision component. It enables the watching of the mute key.*/
+EXTERN_API( ComponentResult )
+AudioMuteOnEvent (ComponentInstance ac,
+ short muteOnEvent) FIVEWORDINLINE(0x2F3C, 0x0002, 0x0081, 0x7000, 0xA82A);
+
+
+/* selectors for component calls */
+enum {
+ kAudioGetVolumeSelect = 0x0000,
+ kAudioSetVolumeSelect = 0x0001,
+ kAudioGetMuteSelect = 0x0002,
+ kAudioSetMuteSelect = 0x0003,
+ kAudioSetToDefaultsSelect = 0x0004,
+ kAudioGetInfoSelect = 0x0005,
+ kAudioGetBassSelect = 0x0006,
+ kAudioSetBassSelect = 0x0007,
+ kAudioGetTrebleSelect = 0x0008,
+ kAudioSetTrebleSelect = 0x0009,
+ kAudioGetOutputDeviceSelect = 0x000A,
+ kAudioMuteOnEventSelect = 0x0081
+};
+
+enum {
+ kDelegatedSoundComponentSelectors = 0x0100
+};
+
+
+
+/* Sound Input Manager routines, uses _SoundDispatch */
+EXTERN_API( NumVersion )
+SPBVersion (void) FOURWORDINLINE(0x203C, 0x0000, 0x0014, 0xA800);
+
+EXTERN_API( OSErr )
+SndRecord (ModalFilterUPP filterProc,
+ Point corner,
+ OSType quality,
+ SndListHandle * sndHandle) FOURWORDINLINE(0x203C, 0x0804, 0x0014, 0xA800);
+
+EXTERN_API( OSErr )
+SndRecordToFile (ModalFilterUPP filterProc,
+ Point corner,
+ OSType quality,
+ short fRefNum) FOURWORDINLINE(0x203C, 0x0708, 0x0014, 0xA800);
+
+EXTERN_API( OSErr )
+SPBSignInDevice (short deviceRefNum,
+ ConstStr255Param deviceName) FOURWORDINLINE(0x203C, 0x030C, 0x0014, 0xA800);
+
+EXTERN_API( OSErr )
+SPBSignOutDevice (short deviceRefNum) FOURWORDINLINE(0x203C, 0x0110, 0x0014, 0xA800);
+
+EXTERN_API( OSErr )
+SPBGetIndexedDevice (short count,
+ Str255 deviceName,
+ Handle * deviceIconHandle) FOURWORDINLINE(0x203C, 0x0514, 0x0014, 0xA800);
+
+EXTERN_API( OSErr )
+SPBOpenDevice (ConstStr255Param deviceName,
+ short permission,
+ long * inRefNum) FOURWORDINLINE(0x203C, 0x0518, 0x0014, 0xA800);
+
+EXTERN_API( OSErr )
+SPBCloseDevice (long inRefNum) FOURWORDINLINE(0x203C, 0x021C, 0x0014, 0xA800);
+
+EXTERN_API( OSErr )
+SPBRecord (SPBPtr inParamPtr,
+ Boolean asynchFlag) FOURWORDINLINE(0x203C, 0x0320, 0x0014, 0xA800);
+
+EXTERN_API( OSErr )
+SPBRecordToFile (short fRefNum,
+ SPBPtr inParamPtr,
+ Boolean asynchFlag) FOURWORDINLINE(0x203C, 0x0424, 0x0014, 0xA800);
+
+EXTERN_API( OSErr )
+SPBPauseRecording (long inRefNum) FOURWORDINLINE(0x203C, 0x0228, 0x0014, 0xA800);
+
+EXTERN_API( OSErr )
+SPBResumeRecording (long inRefNum) FOURWORDINLINE(0x203C, 0x022C, 0x0014, 0xA800);
+
+EXTERN_API( OSErr )
+SPBStopRecording (long inRefNum) FOURWORDINLINE(0x203C, 0x0230, 0x0014, 0xA800);
+
+EXTERN_API( OSErr )
+SPBGetRecordingStatus (long inRefNum,
+ short * recordingStatus,
+ short * meterLevel,
+ unsigned long * totalSamplesToRecord,
+ unsigned long * numberOfSamplesRecorded,
+ unsigned long * totalMsecsToRecord,
+ unsigned long * numberOfMsecsRecorded) FOURWORDINLINE(0x203C, 0x0E34, 0x0014, 0xA800);
+
+EXTERN_API( OSErr )
+SPBGetDeviceInfo (long inRefNum,
+ OSType infoType,
+ void * infoData) FOURWORDINLINE(0x203C, 0x0638, 0x0014, 0xA800);
+
+EXTERN_API( OSErr )
+SPBSetDeviceInfo (long inRefNum,
+ OSType infoType,
+ void * infoData) FOURWORDINLINE(0x203C, 0x063C, 0x0014, 0xA800);
+
+EXTERN_API( OSErr )
+SPBMillisecondsToBytes (long inRefNum,
+ long * milliseconds) FOURWORDINLINE(0x203C, 0x0440, 0x0014, 0xA800);
+
+EXTERN_API( OSErr )
+SPBBytesToMilliseconds (long inRefNum,
+ long * byteCount) FOURWORDINLINE(0x203C, 0x0444, 0x0014, 0xA800);
+
+EXTERN_API( OSErr )
+SetupSndHeader (SndListHandle sndHandle,
+ short numChannels,
+ UnsignedFixed sampleRate,
+ short sampleSize,
+ OSType compressionType,
+ short baseNote,
+ unsigned long numBytes,
+ short * headerLen) FOURWORDINLINE(0x203C, 0x0D48, 0x0014, 0xA800);
+
+EXTERN_API( OSErr )
+SetupAIFFHeader (short fRefNum,
+ short numChannels,
+ UnsignedFixed sampleRate,
+ short sampleSize,
+ OSType compressionType,
+ unsigned long numBytes,
+ unsigned long numFrames) FOURWORDINLINE(0x203C, 0x0B4C, 0x0014, 0xA800);
+
+/* Sound Input Manager 1.1 and later calls, uses _SoundDispatch */
+EXTERN_API( OSErr )
+ParseAIFFHeader (short fRefNum,
+ SoundComponentData * sndInfo,
+ unsigned long * numFrames,
+ unsigned long * dataOffset) FOURWORDINLINE(0x203C, 0x0758, 0x0014, 0xA800);
+
+EXTERN_API( OSErr )
+ParseSndHeader (SndListHandle sndHandle,
+ SoundComponentData * sndInfo,
+ unsigned long * numFrames,
+ unsigned long * dataOffset) FOURWORDINLINE(0x203C, 0x085C, 0x0014, 0xA800);
+
+
+
+
+
+#if !TARGET_OS_MAC || TARGET_API_MAC_CARBON
+/* Only to be used if you are writing a sound input component; this */
+/* is the param block for a read request from the SoundMgr to the */
+/* sound input component. Not to be confused with the SPB struct */
+/* above, which is the param block for a read request from an app */
+/* to the SoundMgr. */
+typedef struct SndInputCmpParam SndInputCmpParam;
+typedef SndInputCmpParam * SndInputCmpParamPtr;
+typedef CALLBACK_API( void , SICCompletionProcPtr )(SndInputCmpParamPtr SICParmPtr);
+
+struct SndInputCmpParam {
+ SICCompletionProcPtr ioCompletion; /* completion routine [pointer]*/
+ SIInterruptProcPtr ioInterrupt; /* interrupt routine [pointer]*/
+ OSErr ioResult; /* I/O result code [word]*/
+ short pad;
+ unsigned long ioReqCount;
+ unsigned long ioActCount;
+ Ptr ioBuffer;
+ Ptr ioMisc;
+};
+
+EXTERN_API( ComponentResult )
+SndInputReadAsync (ComponentInstance self,
+ SndInputCmpParamPtr SICParmPtr) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0001, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SndInputReadSync (ComponentInstance self,
+ SndInputCmpParamPtr SICParmPtr) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0002, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SndInputPauseRecording (ComponentInstance self) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0003, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SndInputResumeRecording (ComponentInstance self) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0004, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SndInputStopRecording (ComponentInstance self) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0005, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SndInputGetStatus (ComponentInstance self,
+ short * recordingStatus,
+ unsigned long * totalSamplesToRecord,
+ unsigned long * numberOfSamplesRecorded) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0006, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SndInputGetDeviceInfo (ComponentInstance self,
+ OSType infoType,
+ void * infoData) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0007, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SndInputSetDeviceInfo (ComponentInstance self,
+ OSType infoType,
+ void * infoData) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0008, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SndInputInitHardware (ComponentInstance self) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0009, 0x7000, 0xA82A);
+
+
+/* selectors for component calls */
+enum {
+ kSndInputReadAsyncSelect = 0x0001,
+ kSndInputReadSyncSelect = 0x0002,
+ kSndInputPauseRecordingSelect = 0x0003,
+ kSndInputResumeRecordingSelect = 0x0004,
+ kSndInputStopRecordingSelect = 0x0005,
+ kSndInputGetStatusSelect = 0x0006,
+ kSndInputGetDeviceInfoSelect = 0x0007,
+ kSndInputSetDeviceInfoSelect = 0x0008,
+ kSndInputInitHardwareSelect = 0x0009
+};
+#endif /* !TARGET_OS_MAC || TARGET_API_MAC_CARBON */
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __SOUND__ */
+
diff --git a/include/qt/SoundComponents.h b/include/qt/SoundComponents.h
new file mode 100644
index 000000000..36e7d612f
--- /dev/null
+++ b/include/qt/SoundComponents.h
@@ -0,0 +1,28 @@
+/*
+ File: SoundComponents.h
+
+ Contains: Sound Components Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1991-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __SOUNDCOMPONENTS__
+#define __SOUNDCOMPONENTS__
+
+/* obsolete file, all sound interfaces have been moved to Sound.[hpar]*/
+#ifndef __SOUND__
+#include "Sound.h"
+#endif
+
+
+
+#endif /* __SOUNDCOMPONENTS__ */
+
diff --git a/include/qt/SoundInput.h b/include/qt/SoundInput.h
new file mode 100644
index 000000000..d2ef1d4c8
--- /dev/null
+++ b/include/qt/SoundInput.h
@@ -0,0 +1,30 @@
+/*
+ File: SoundInput.h
+
+ Contains: Sound Input Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1990-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __SOUNDINPUT__
+#define __SOUNDINPUT__
+
+/* obsolete file, all sound interfaces have been moved to Sound.[hpar]*/
+#ifndef __SOUND__
+#include "Sound.h"
+#endif
+
+
+
+
+
+#endif /* __SOUNDINPUT__ */
+
diff --git a/include/qt/SoundSprocket.h b/include/qt/SoundSprocket.h
new file mode 100644
index 000000000..7ad9400fe
--- /dev/null
+++ b/include/qt/SoundSprocket.h
@@ -0,0 +1,624 @@
+/*
+ File: SoundSprocket.h
+
+ Contains: SoundSprocket interfaces
+
+ Version: Technology: 1.7
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1996-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __SOUNDSPROCKET__
+#define __SOUNDSPROCKET__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __EVENTS__
+#include "Events.h"
+#endif
+
+#ifndef __QD3D__
+#include "QD3D.h"
+#endif
+
+#ifndef __QD3DCAMERA__
+#include "QD3DCamera.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*******************************************************************************
+ * SndSetInfo/SndGetInfo Messages
+ ******************************************************************************/
+/* The siSSpCPULoadLimit = '3dll' selector for SndGetInfo fills in a value of */
+/* type UInt32. */
+
+enum {
+ kSSpSpeakerKind_Stereo = 0,
+ kSSpSpeakerKind_Mono = 1,
+ kSSpSpeakerKind_Headphones = 2
+};
+
+
+/* This is the data type is used with the SndGet/SetInfo selector */
+/* siSSpSpeakerSetup = '3dst' */
+
+struct SSpSpeakerSetupData {
+ UInt32 speakerKind; /* Speaker configuration */
+ float speakerAngle; /* Angle formed by user and speakers */
+
+ UInt32 reserved0; /* Reserved for future use -- set to 0 */
+ UInt32 reserved1; /* Reserved for future use -- set to 0 */
+};
+typedef struct SSpSpeakerSetupData SSpSpeakerSetupData;
+enum {
+ kSSpMedium_Air = 0,
+ kSSpMedium_Water = 1
+};
+
+
+enum {
+ kSSpSourceMode_Unfiltered = 0, /* No filtering applied */
+ kSSpSourceMode_Localized = 1, /* Localized by source position */
+ kSSpSourceMode_Ambient = 2, /* Coming from all around */
+ kSSpSourceMode_Binaural = 3 /* Already binaurally localized */
+};
+
+
+
+struct SSpLocationData {
+ float elevation; /* Angle of the meridian -- pos is up */
+ float azimuth; /* Angle of the parallel -- pos is left */
+ float distance; /* Distance between source and listener */
+ float projectionAngle; /* Cos(angle) between cone and listener */
+ float sourceVelocity; /* Speed of source toward the listener */
+ float listenerVelocity; /*Speed of listener toward the source */
+};
+typedef struct SSpLocationData SSpLocationData;
+
+struct SSpVirtualSourceData {
+ float attenuation; /* Attenuation factor */
+ SSpLocationData location; /* Location of virtual source */
+};
+typedef struct SSpVirtualSourceData SSpVirtualSourceData;
+/* This is the data type is used with the SndGet/SetInfo selector */
+/* siSSpLocalization = '3dif' */
+
+struct SSpLocalizationData {
+ UInt32 cpuLoad; /* CPU load vs. quality -- 0 is best */
+
+ UInt32 medium; /* Medium for sound propagation */
+ float humidity; /* Humidity when medium is air */
+ float roomSize; /* Reverb model -- distance bet. walls */
+ float roomReflectivity; /*Reverb model -- bounce attenuation */
+ float reverbAttenuation; /*Reverb model -- mix level */
+
+ UInt32 sourceMode; /* Type of filtering to apply */
+ float referenceDistance; /*Nominal distance for recording */
+ float coneAngleCos; /* Cos(angle/2) of attenuation cone */
+ float coneAttenuation; /* Attenuation outside the cone */
+ SSpLocationData currentLocation; /* Location of the sound */
+
+ UInt32 reserved0; /* Reserved for future use -- set to 0 */
+ UInt32 reserved1; /* Reserved for future use -- set to 0 */
+ UInt32 reserved2; /* Reserved for future use -- set to 0 */
+ UInt32 reserved3; /* Reserved for future use -- set to 0 */
+
+ UInt32 virtualSourceCount; /*Number of reflections */
+ SSpVirtualSourceData virtualSource[4]; /*The reflections */
+};
+typedef struct SSpLocalizationData SSpLocalizationData;
+#if TARGET_CPU_PPC
+typedef CALLBACK_API_C( Boolean , SSpEventProcPtr )(EventRecord *inEvent);
+/*******************************************************************************
+ * Global functions
+ ******************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+SSpConfigureSpeakerSetup (SSpEventProcPtr inEventProcPtr);
+
+EXTERN_API_C( OSStatus )
+SSpGetCPULoadLimit (UInt32 * outCPULoadLimit);
+
+
+/*******************************************************************************
+ * Routines for Maniulating Listeners
+ ******************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef struct OpaqueSSpListenerReference* SSpListenerReference;
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+SSpListener_New (SSpListenerReference * outListenerReference);
+
+EXTERN_API_C( OSStatus )
+SSpListener_Dispose (SSpListenerReference inListenerReference);
+
+EXTERN_API_C( OSStatus )
+SSpListener_SetTransform (SSpListenerReference inListenerReference,
+ const TQ3Matrix4x4 * inTransform);
+
+EXTERN_API_C( OSStatus )
+SSpListener_GetTransform (SSpListenerReference inListenerReference,
+ TQ3Matrix4x4 * outTransform);
+
+EXTERN_API_C( OSStatus )
+SSpListener_SetPosition (SSpListenerReference inListenerReference,
+ const TQ3Point3D * inPosition);
+
+EXTERN_API_C( OSStatus )
+SSpListener_GetPosition (SSpListenerReference inListenerReference,
+ TQ3Point3D * outPosition);
+
+EXTERN_API_C( OSStatus )
+SSpListener_SetOrientation (SSpListenerReference inListenerReference,
+ const TQ3Vector3D * inOrientation);
+
+EXTERN_API_C( OSStatus )
+SSpListener_GetOrientation (SSpListenerReference inListenerReference,
+ TQ3Vector3D * outOrientation);
+
+EXTERN_API_C( OSStatus )
+SSpListener_SetUpVector (SSpListenerReference inListenerReference,
+ const TQ3Vector3D * inUpVector);
+
+EXTERN_API_C( OSStatus )
+SSpListener_GetUpVector (SSpListenerReference inListenerReference,
+ TQ3Vector3D * outUpVector);
+
+EXTERN_API_C( OSStatus )
+SSpListener_SetCameraPlacement (SSpListenerReference inListenerReference,
+ const TQ3CameraPlacement * inCameraPlacement);
+
+EXTERN_API_C( OSStatus )
+SSpListener_GetCameraPlacement (SSpListenerReference inListenerReference,
+ TQ3CameraPlacement * outCameraPlacement);
+
+EXTERN_API_C( OSStatus )
+SSpListener_SetVelocity (SSpListenerReference inListenerReference,
+ const TQ3Vector3D * inVelocity);
+
+EXTERN_API_C( OSStatus )
+SSpListener_GetVelocity (SSpListenerReference inListenerReference,
+ TQ3Vector3D * outVelocity);
+
+EXTERN_API_C( OSStatus )
+SSpListener_GetActualVelocity (SSpListenerReference inListenerReference,
+ TQ3Vector3D * outVelocity);
+
+EXTERN_API_C( OSStatus )
+SSpListener_SetMedium (SSpListenerReference inListenerReference,
+ UInt32 inMedium,
+ float inHumidity);
+
+EXTERN_API_C( OSStatus )
+SSpListener_GetMedium (SSpListenerReference inListenerReference,
+ UInt32 * outMedium,
+ float * outHumidity);
+
+EXTERN_API_C( OSStatus )
+SSpListener_SetReverb (SSpListenerReference inListenerReference,
+ float inRoomSize,
+ float inRoomReflectivity,
+ float inReverbAttenuation);
+
+EXTERN_API_C( OSStatus )
+SSpListener_GetReverb (SSpListenerReference inListenerReference,
+ float * outRoomSize,
+ float * outRoomReflectivity,
+ float * outReverbAttenuation);
+
+EXTERN_API_C( OSStatus )
+SSpListener_SetMetersPerUnit (SSpListenerReference inListenerReference,
+ float inMetersPerUnit);
+
+EXTERN_API_C( OSStatus )
+SSpListener_GetMetersPerUnit (SSpListenerReference inListenerReference,
+ float * outMetersPerUnit);
+
+
+/*******************************************************************************
+ * Routines for Manipulating Sources
+ ******************************************************************************/
+#endif /* CALL_NOT_IN_CARBON */
+
+typedef struct OpaqueSSpSourceReference* SSpSourceReference;
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+SSpSource_New (SSpSourceReference * outSourceReference);
+
+EXTERN_API_C( OSStatus )
+SSpSource_Dispose (SSpSourceReference inSourceReference);
+
+EXTERN_API_C( OSStatus )
+SSpSource_CalcLocalization (SSpSourceReference inSourceReference,
+ SSpListenerReference inListenerReference,
+ SSpLocalizationData * out3DInfo);
+
+EXTERN_API_C( OSStatus )
+SSpSource_SetTransform (SSpSourceReference inSourceReference,
+ const TQ3Matrix4x4 * inTransform);
+
+EXTERN_API_C( OSStatus )
+SSpSource_GetTransform (SSpSourceReference inSourceReference,
+ TQ3Matrix4x4 * outTransform);
+
+EXTERN_API_C( OSStatus )
+SSpSource_SetPosition (SSpSourceReference inSourceReference,
+ const TQ3Point3D * inPosition);
+
+EXTERN_API_C( OSStatus )
+SSpSource_GetPosition (SSpSourceReference inSourceReference,
+ TQ3Point3D * outPosition);
+
+EXTERN_API_C( OSStatus )
+SSpSource_SetOrientation (SSpSourceReference inSourceReference,
+ const TQ3Vector3D * inOrientation);
+
+EXTERN_API_C( OSStatus )
+SSpSource_GetOrientation (SSpSourceReference inSourceReference,
+ TQ3Vector3D * outOrientation);
+
+EXTERN_API_C( OSStatus )
+SSpSource_SetUpVector (SSpSourceReference inSourceReference,
+ const TQ3Vector3D * inUpVector);
+
+EXTERN_API_C( OSStatus )
+SSpSource_GetUpVector (SSpSourceReference inSourceReference,
+ TQ3Vector3D * outUpVector);
+
+EXTERN_API_C( OSStatus )
+SSpSource_SetCameraPlacement (SSpSourceReference inSourceReference,
+ const TQ3CameraPlacement * inCameraPlacement);
+
+EXTERN_API_C( OSStatus )
+SSpSource_GetCameraPlacement (SSpSourceReference inSourceReference,
+ TQ3CameraPlacement * outCameraPlacement);
+
+EXTERN_API_C( OSStatus )
+SSpSource_SetVelocity (SSpSourceReference inSourceReference,
+ const TQ3Vector3D * inVelocity);
+
+EXTERN_API_C( OSStatus )
+SSpSource_GetVelocity (SSpSourceReference inSourceReference,
+ TQ3Vector3D * outVelocity);
+
+EXTERN_API_C( OSStatus )
+SSpSource_GetActualVelocity (SSpSourceReference inSourceReference,
+ TQ3Vector3D * outVelocity);
+
+EXTERN_API_C( OSStatus )
+SSpSource_SetCPULoad (SSpSourceReference inSourceReference,
+ UInt32 inCPULoad);
+
+EXTERN_API_C( OSStatus )
+SSpSource_GetCPULoad (SSpSourceReference inSourceReference,
+ UInt32 * outCPULoad);
+
+EXTERN_API_C( OSStatus )
+SSpSource_SetMode (SSpSourceReference inSourceReference,
+ UInt32 inMode);
+
+EXTERN_API_C( OSStatus )
+SSpSource_GetMode (SSpSourceReference inSourceReference,
+ UInt32 * outMode);
+
+EXTERN_API_C( OSStatus )
+SSpSource_SetReferenceDistance (SSpSourceReference inSourceReference,
+ float inReferenceDistance);
+
+EXTERN_API_C( OSStatus )
+SSpSource_GetReferenceDistance (SSpSourceReference inSourceReference,
+ float * outReferenceDistance);
+
+EXTERN_API_C( OSStatus )
+SSpSource_SetSize (SSpSourceReference inSourceReference,
+ float inLength,
+ float inWidth,
+ float inHeight);
+
+EXTERN_API_C( OSStatus )
+SSpSource_GetSize (SSpSourceReference inSourceReference,
+ float * outLength,
+ float * outWidth,
+ float * outHeight);
+
+EXTERN_API_C( OSStatus )
+SSpSource_SetAngularAttenuation (SSpSourceReference inSourceReference,
+ float inConeAngle,
+ float inConeAttenuation);
+
+EXTERN_API_C( OSStatus )
+SSpSource_GetAngularAttenuation (SSpSourceReference inSourceReference,
+ float * outConeAngle,
+ float * outConeAttenuation);
+
+/*******************************************************************************
+ * OpenGL Calling Convention Call Variants
+ ******************************************************************************/
+EXTERN_API_C( OSStatus )
+SSpListener_SetTransformfv (SSpListenerReference inListenerReference,
+ const float * inTransform);
+
+EXTERN_API_C( OSStatus )
+SSpListener_GetTransformfv (SSpListenerReference inListenerReference,
+ float * outTransform);
+
+EXTERN_API_C( OSStatus )
+SSpListener_SetPosition3f (SSpListenerReference inListenerReference,
+ float inX,
+ float inY,
+ float inZ);
+
+EXTERN_API_C( OSStatus )
+SSpListener_SetPositionfv (SSpListenerReference inListenerReference,
+ const float * inPosition);
+
+EXTERN_API_C( OSStatus )
+SSpListener_GetPositionfv (SSpListenerReference inListenerReference,
+ float * outPosition);
+
+EXTERN_API_C( OSStatus )
+SSpListener_SetOrientation3f (SSpListenerReference inListenerReference,
+ float inX,
+ float inY,
+ float inZ);
+
+EXTERN_API_C( OSStatus )
+SSpListener_SetOrientationfv (SSpListenerReference inListenerReference,
+ const float * inOrientation);
+
+EXTERN_API_C( OSStatus )
+SSpListener_GetOrientationfv (SSpListenerReference inListenerReference,
+ float * outOrientation);
+
+EXTERN_API_C( OSStatus )
+SSpListener_SetUpVector3f (SSpListenerReference inListenerReference,
+ float inX,
+ float inY,
+ float inZ);
+
+EXTERN_API_C( OSStatus )
+SSpListener_SetUpVectorfv (SSpListenerReference inListenerReference,
+ const float * inUpVector);
+
+EXTERN_API_C( OSStatus )
+SSpListener_GetUpVectorfv (SSpListenerReference inListenerReference,
+ float * outUpVector);
+
+EXTERN_API_C( OSStatus )
+SSpListener_SetCameraPlacementfv (SSpListenerReference inListenerReference,
+ const float * inCameraLocation,
+ const float * inPointOfInterest,
+ const float * inUpVector);
+
+EXTERN_API_C( OSStatus )
+SSpListener_GetCameraPlacementfv (SSpListenerReference inListenerReference,
+ float * outCameraPlacement,
+ float * outPointOfInterest,
+ float * outUpVector);
+
+EXTERN_API_C( OSStatus )
+SSpListener_SetVelocity3f (SSpListenerReference inListenerReference,
+ float inX,
+ float inY,
+ float inZ);
+
+EXTERN_API_C( OSStatus )
+SSpListener_SetVelocityfv (SSpListenerReference inListenerReference,
+ const float * inVelocity);
+
+EXTERN_API_C( OSStatus )
+SSpListener_GetVelocityfv (SSpListenerReference inListenerReference,
+ float * outVelocity);
+
+EXTERN_API_C( OSStatus )
+SSpListener_GetActualVelocityfv (SSpListenerReference inListenerReference,
+ float * outVelocity);
+
+EXTERN_API_C( OSStatus )
+SSpSource_SetTransformfv (SSpSourceReference inSourceReference,
+ const float * inTransform);
+
+EXTERN_API_C( OSStatus )
+SSpSource_GetTransformfv (SSpSourceReference inSourceReference,
+ float * outTransform);
+
+EXTERN_API_C( OSStatus )
+SSpSource_SetPosition3f (SSpSourceReference inSourceReference,
+ float inX,
+ float inY,
+ float inZ);
+
+EXTERN_API_C( OSStatus )
+SSpSource_SetPositionfv (SSpSourceReference inSourceReference,
+ const float * inPosition);
+
+EXTERN_API_C( OSStatus )
+SSpSource_GetPositionfv (SSpSourceReference inSourceReference,
+ float * outPosition);
+
+EXTERN_API_C( OSStatus )
+SSpSource_SetOrientation3f (SSpSourceReference inSourceReference,
+ float inX,
+ float inY,
+ float inZ);
+
+EXTERN_API_C( OSStatus )
+SSpSource_SetOrientationfv (SSpSourceReference inSourceReference,
+ const float * inOrientation);
+
+EXTERN_API_C( OSStatus )
+SSpSource_GetOrientationfv (SSpSourceReference inSourceReference,
+ float * outOrientation);
+
+EXTERN_API_C( OSStatus )
+SSpSource_SetUpVector3f (SSpSourceReference inSourceReference,
+ float inX,
+ float inY,
+ float inZ);
+
+EXTERN_API_C( OSStatus )
+SSpSource_SetUpVectorfv (SSpSourceReference inSourceReference,
+ const float * inUpVector);
+
+EXTERN_API_C( OSStatus )
+SSpSource_GetUpVectorfv (SSpSourceReference inSourceReference,
+ float * outUpVector);
+
+EXTERN_API_C( OSStatus )
+SSpSource_SetCameraPlacementfv (SSpSourceReference inSourceReference,
+ const float * inCameraLocation,
+ const float * inPointOfInterest,
+ const float * inUpVector);
+
+EXTERN_API_C( OSStatus )
+SSpSource_GetCameraPlacementfv (SSpSourceReference inSourceReference,
+ float * outCameraPlacement,
+ float * outPointOfInterest,
+ float * outUpVector);
+
+EXTERN_API_C( OSStatus )
+SSpSource_SetVelocity3f (SSpSourceReference inSourceReference,
+ float inX,
+ float inY,
+ float inZ);
+
+EXTERN_API_C( OSStatus )
+SSpSource_SetVelocityfv (SSpSourceReference inSourceReference,
+ const float * inVelocity);
+
+EXTERN_API_C( OSStatus )
+SSpSource_GetVelocityfv (SSpSourceReference inSourceReference,
+ float * outVelocity);
+
+EXTERN_API_C( OSStatus )
+SSpSource_GetActualVelocityfv (SSpSourceReference inSourceReference,
+ float * outVelocity);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_CPU_PPC */
+
+
+/*******************************************************************************
+ * LATE-BREAKING NEWS
+ *
+ * After the documentation was completed, it was decided that the SSpSetup
+ * were not specific enough. We renamed them to SSpSpeakerSetup. These
+ * #defines allow code to be written per the documentation. But please use
+ * the new, longer names, as the #defines will be removed in a later release.
+ ******************************************************************************/
+#define SSpConfigureSetup SSpConfigureSpeakerSetup
+
+#define siSSpSetup siSSpSpeakerSetup
+#define SSpSetupData SSpSpeakerSetupData
+
+
+/*******************************************************************************
+ * MORE LATE-BREAKING NEWS
+ *
+ * The SndGetInfo selector siSSpFilterVersion and datatype SSpFilterVersionData
+ * have been removed in favor of an alternate way of accessing filter version
+ * information. The following function may be used for this purpose.
+ *******************************************************************************
+// **************************** GetSSpFilterVersion ****************************
+// Finds the manufacturer and version number of the SoundSprocket filter that
+// may be installed. inManufacturer should be the manufacturer code specified
+// at the installation time, which may be zero to allow any manufacturer.
+// If no error is encountered, outManufacturer is set to the actual manufacturer
+// code and outMajorVersion and outMinorVersion are set to the component
+// specification level and manufacturer's implementation revision, respectively.
+OSStatus GetSSpFilterVersion(
+ OSType inManufacturer,
+ OSType* outManufacturer,
+ UInt32* outMajorVersion,
+ UInt32* outMinorVersion)
+{
+ OSStatus err;
+ ComponentDescription description;
+ Component componentRef;
+ UInt32 vers;
+
+ // Set up the component description
+ description.componentType = kSoundEffectsType;
+ description.componentSubType = kSSpLocalizationSubType;
+ description.componentManufacturer = inManufacturer;
+ description.componentFlags = 0;
+ description.componentFlagsMask = 0;
+
+ // Find a component matching the description
+ componentRef = FindNextComponent(nil, &description);
+ if (componentRef == nil) return couldntGetRequiredComponent;
+
+ // Get the component description (for the manufacturer code)
+ err = GetComponentInfo(componentRef, &description, nil, nil, nil);
+ if (err != noErr) return err;
+
+ // Get the version composite
+ vers = (UInt32) GetComponentVersion((ComponentInstance) componentRef);
+
+ // Return the results
+ *outManufacturer = description.componentManufacturer;
+ *outMajorVersion = HiWord(vers);
+ *outMinorVersion = LoWord(vers);
+
+ return noErr;
+}
+*******************************************************************************/
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __SOUNDSPROCKET__ */
+
diff --git a/include/qt/Speech.h b/include/qt/Speech.h
new file mode 100644
index 000000000..879cea17c
--- /dev/null
+++ b/include/qt/Speech.h
@@ -0,0 +1,31 @@
+/*
+ File: Speech.h
+
+ Contains: Speech Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1989-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __SPEECH__
+#define __SPEECH__
+
+/*
+
+ The interface file Speech.h has been renamed to SpeechSynthesis.h.
+
+*/
+#ifndef __SPEECHSYNTHESIS__
+#include "SpeechSynthesis.h"
+#endif
+
+
+#endif /* __SPEECH__ */
+
diff --git a/include/qt/SpeechRecognition.h b/include/qt/SpeechRecognition.h
new file mode 100644
index 000000000..f2b4e50e7
--- /dev/null
+++ b/include/qt/SpeechRecognition.h
@@ -0,0 +1,511 @@
+/*
+ File: SpeechRecognition.h
+
+ Contains: Apple Speech Recognition Toolbox Interfaces.
+
+ Version: Technology: PlainTalk 1.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1992-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __SPEECHRECOGNITION__
+#define __SPEECHRECOGNITION__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* Error Codes [Speech recognition gets -5100 through -5199] */
+enum {
+ kSRNotAvailable = -5100, /* the service requested is not avail or applicable */
+ kSRInternalError = -5101, /* a system internal or hardware error condition */
+ kSRComponentNotFound = -5102, /* a needed system resource was not located */
+ kSROutOfMemory = -5103, /* an out of memory error occurred in the toolbox memory space */
+ kSRNotASpeechObject = -5104, /* the object specified is no longer or never was valid */
+ kSRBadParameter = -5105, /* an invalid parameter was specified */
+ kSRParamOutOfRange = -5106, /* when we say 0-100, don't pass in 101. */
+ kSRBadSelector = -5107, /* an unrecognized selector was specified */
+ kSRBufferTooSmall = -5108, /* returned from attribute access functions */
+ kSRNotARecSystem = -5109, /* the object used was not a SRRecognitionSystem */
+ kSRFeedbackNotAvail = -5110, /* there is no feedback window associated with SRRecognizer */
+ kSRCantSetProperty = -5111, /* a non-settable property was specified */
+ kSRCantGetProperty = -5112, /* a non-gettable property was specified */
+ kSRCantSetDuringRecognition = -5113, /* the property can't be set while recognition is in progress -- do before or between utterances. */
+ kSRAlreadyListening = -5114, /* in response to SRStartListening */
+ kSRNotListeningState = -5115, /* in response to SRStopListening */
+ kSRModelMismatch = -5116, /* no acoustical models are avail to match request */
+ kSRNoClientLanguageModel = -5117, /* trying to access a non-specified SRLanguageModel */
+ kSRNoPendingUtterances = -5118, /* nothing to continue search on */
+ kSRRecognitionCanceled = -5119, /* an abort error occurred during search */
+ kSRRecognitionDone = -5120, /* search has finished, but nothing was recognized */
+ kSROtherRecAlreadyModal = -5121, /* another recognizer is modal at the moment, so can't set this recognizer's kSRBlockModally property right now */
+ kSRHasNoSubItems = -5122, /* SRCountItems or related routine was called on an object without subelements -- e.g. a word -- rather than phrase, path, or LM. */
+ kSRSubItemNotFound = -5123, /* returned when accessing a non-existent sub item of a container */
+ kSRLanguageModelTooBig = -5124, /* Cant build language models so big */
+ kSRAlreadyReleased = -5125, /* this object has already been released before */
+ kSRAlreadyFinished = -5126, /* the language model can't be finished twice */
+ kSRWordNotFound = -5127, /* the spelling couldn't be found in lookup(s) */
+ kSRNotFinishedWithRejection = -5128, /* property not found because the LMObj is not finished with rejection */
+ kSRExpansionTooDeep = -5129, /* Language model is left recursive or is embedded too many levels */
+ kSRTooManyElements = -5130, /* Too many elements added to phrase or path or other langauge model object */
+ kSRCantAdd = -5131, /* Can't add given type of object to the base SRLanguageObject (e.g.in SRAddLanguageObject) */
+ kSRSndInSourceDisconnected = -5132, /* Sound input source is disconnected */
+ kSRCantReadLanguageObject = -5133, /* An error while trying to create new Language object from file or pointer -- possibly bad format */
+ /* non-release debugging error codes are included here */
+ kSRNotImplementedYet = -5199 /* you'd better wait for this feature in a future release */
+};
+
+
+/* Type Definitions */
+typedef struct OpaqueSRSpeechObject* SRSpeechObject;
+typedef SRSpeechObject SRRecognitionSystem;
+typedef SRSpeechObject SRRecognizer;
+typedef SRSpeechObject SRSpeechSource;
+typedef SRSpeechSource SRRecognitionResult;
+typedef SRSpeechObject SRLanguageObject;
+typedef SRLanguageObject SRLanguageModel;
+typedef SRLanguageObject SRPath;
+typedef SRLanguageObject SRPhrase;
+typedef SRLanguageObject SRWord;
+/* between 0 and 100 */
+typedef unsigned short SRSpeedSetting;
+/* between 0 and 100 */
+typedef unsigned short SRRejectionLevel;
+/* When an event occurs, the user supplied proc will be called with a pointer */
+/* to the param passed in and a flag to indicate conditions such */
+/* as interrupt time or system background time. */
+
+struct SRCallBackStruct {
+ long what; /* one of notification flags */
+ long message; /* contains SRRecognitionResult id */
+ SRRecognizer instance; /* ID of recognizer being notified */
+ OSErr status; /* result status of last search */
+ short flags; /* non-zero if occurs during interrupt */
+ long refCon; /* user defined - set from SRCallBackParam */
+};
+typedef struct SRCallBackStruct SRCallBackStruct;
+/* Call back procedure definition */
+typedef CALLBACK_API( void , SRCallBackProcPtr )(SRCallBackStruct *param);
+typedef STACK_UPP_TYPE(SRCallBackProcPtr) SRCallBackUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(SRCallBackUPP)
+ NewSRCallBackUPP (SRCallBackProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeSRCallBackUPP (SRCallBackUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeSRCallBackUPP (SRCallBackStruct * param,
+ SRCallBackUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppSRCallBackProcInfo = 0x000000C0 }; /* pascal no_return_value Func(4_bytes) */
+ #define NewSRCallBackUPP(userRoutine) (SRCallBackUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSRCallBackProcInfo, GetCurrentArchitecture())
+ #define DisposeSRCallBackUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeSRCallBackUPP(param, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppSRCallBackProcInfo, (param))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewSRCallBackProc(userRoutine) NewSRCallBackUPP(userRoutine)
+#define CallSRCallBackProc(userRoutine, param) InvokeSRCallBackUPP(param, userRoutine)
+
+struct SRCallBackParam {
+ SRCallBackUPP callBack;
+ long refCon;
+};
+typedef struct SRCallBackParam SRCallBackParam;
+/* Recognition System Types */
+enum {
+ kSRDefaultRecognitionSystemID = 0
+};
+
+/* Recognition System Properties */
+enum {
+ kSRFeedbackAndListeningModes = FOUR_CHAR_CODE('fbwn'), /* short: one of kSRNoFeedbackHasListenModes, kSRHasFeedbackHasListenModes, kSRNoFeedbackNoListenModes */
+ kSRRejectedWord = FOUR_CHAR_CODE('rejq'), /* the SRWord used to represent a rejection */
+ kSRCleanupOnClientExit = FOUR_CHAR_CODE('clup') /* Boolean: Default is true. The rec system and everything it owns is disposed when the client application quits */
+};
+
+enum {
+ kSRNoFeedbackNoListenModes = 0, /* next allocated recognizer has no feedback window and doesn't use listening modes */
+ kSRHasFeedbackHasListenModes = 1, /* next allocated recognizer has feedback window and uses listening modes */
+ kSRNoFeedbackHasListenModes = 2 /* next allocated recognizer has no feedback window but does use listening modes */
+};
+
+/* Speech Source Types */
+enum {
+ kSRDefaultSpeechSource = 0,
+ kSRLiveDesktopSpeechSource = FOUR_CHAR_CODE('dklv'), /* live desktop sound input */
+ kSRCanned22kHzSpeechSource = FOUR_CHAR_CODE('ca22') /* AIFF file based 16 bit, 22.050 KHz sound input */
+};
+
+/* Notification via Apple Event or Callback */
+/* Notification Flags */
+enum {
+ kSRNotifyRecognitionBeginning = 1L << 0, /* recognition can begin. client must now call SRContinueRecognition or SRCancelRecognition */
+ kSRNotifyRecognitionDone = 1L << 1 /* recognition has terminated. result (if any) is available. */
+};
+
+/* Apple Event selectors */
+/* AppleEvent message class */
+enum {
+ kAESpeechSuite = FOUR_CHAR_CODE('sprc')
+};
+
+/* AppleEvent message event ids */
+enum {
+ kAESpeechDone = FOUR_CHAR_CODE('srsd'),
+ kAESpeechDetected = FOUR_CHAR_CODE('srbd')
+};
+
+/* AppleEvent Parameter ids */
+enum {
+ keySRRecognizer = FOUR_CHAR_CODE('krec'),
+ keySRSpeechResult = FOUR_CHAR_CODE('kspr'),
+ keySRSpeechStatus = FOUR_CHAR_CODE('ksst')
+};
+
+/* AppleEvent Parameter types */
+enum {
+ typeSRRecognizer = FOUR_CHAR_CODE('trec'),
+ typeSRSpeechResult = FOUR_CHAR_CODE('tspr')
+};
+
+
+/* SRRecognizer Properties */
+enum {
+ kSRNotificationParam = FOUR_CHAR_CODE('noti'), /* see notification flags below */
+ kSRCallBackParam = FOUR_CHAR_CODE('call'), /* type SRCallBackParam */
+ kSRSearchStatusParam = FOUR_CHAR_CODE('stat'), /* see status flags below */
+ kSRAutoFinishingParam = FOUR_CHAR_CODE('afin'), /* automatic finishing applied on LM for search */
+ kSRForegroundOnly = FOUR_CHAR_CODE('fgon'), /* Boolean. Default is true. If true, client recognizer only active when in foreground. */
+ kSRBlockBackground = FOUR_CHAR_CODE('blbg'), /* Boolean. Default is false. If true, when client recognizer in foreground, rest of LMs are inactive. */
+ kSRBlockModally = FOUR_CHAR_CODE('blmd'), /* Boolean. Default is false. When true, this client's LM is only active LM; all other LMs are inactive. Be nice, don't be modal for long periods! */
+ kSRWantsResultTextDrawn = FOUR_CHAR_CODE('txfb'), /* Boolean. Default is true. If true, search results are posted to Feedback window */
+ kSRWantsAutoFBGestures = FOUR_CHAR_CODE('dfbr'), /* Boolean. Default is true. If true, client needn't call SRProcessBegin/End to get default feedback behavior */
+ kSRSoundInVolume = FOUR_CHAR_CODE('volu'), /* short in [0..100] log scaled sound input power. Can't set this property */
+ kSRReadAudioFSSpec = FOUR_CHAR_CODE('aurd'), /* *FSSpec. Specify FSSpec where raw audio is to be read (AIFF format) using kSRCanned22kHzSpeechSource. Reads until EOF */
+ kSRCancelOnSoundOut = FOUR_CHAR_CODE('caso'), /* Boolean: Default is true. If any sound is played out during utterance, recognition is aborted. */
+ kSRSpeedVsAccuracyParam = FOUR_CHAR_CODE('sped') /* SRSpeedSetting between 0 and 100 */
+};
+
+/* 0 means more accurate but slower. */
+/* 100 means (much) less accurate but faster. */
+enum {
+ kSRUseToggleListen = 0, /* listen key modes */
+ kSRUsePushToTalk = 1
+};
+
+enum {
+ kSRListenKeyMode = FOUR_CHAR_CODE('lkmd'), /* short: either kSRUseToggleListen or kSRUsePushToTalk */
+ kSRListenKeyCombo = FOUR_CHAR_CODE('lkey'), /* short: Push-To-Talk key combination; high byte is high byte of event->modifiers, the low byte is the keycode from event->message */
+ kSRListenKeyName = FOUR_CHAR_CODE('lnam'), /* Str63: string representing ListenKeyCombo */
+ kSRKeyWord = FOUR_CHAR_CODE('kwrd'), /* Str255: keyword preceding spoken commands in kSRUseToggleListen mode */
+ kSRKeyExpected = FOUR_CHAR_CODE('kexp') /* Boolean: Must the PTT key be depressed or the key word spoken before recognition can occur? */
+};
+
+/* Operational Status Flags */
+enum {
+ kSRIdleRecognizer = 1L << 0, /* engine is not active */
+ kSRSearchInProgress = 1L << 1, /* search is in progress */
+ kSRSearchWaitForAllClients = 1L << 2, /* search is suspended waiting on all clients' input */
+ kSRMustCancelSearch = 1L << 3, /* something has occurred (sound played, non-speech detected) requiring the search to abort */
+ kSRPendingSearch = 1L << 4 /* we're about to start searching */
+};
+
+/* Recognition Result Properties */
+enum {
+ kSRTEXTFormat = FOUR_CHAR_CODE('TEXT'), /* raw text in user supplied memory */
+ kSRPhraseFormat = FOUR_CHAR_CODE('lmph'), /* SRPhrase containing result words */
+ kSRPathFormat = FOUR_CHAR_CODE('lmpt'), /* SRPath containing result phrases or words */
+ kSRLanguageModelFormat = FOUR_CHAR_CODE('lmfm') /* top level SRLanguageModel for post parse */
+};
+
+/* SRLanguageObject Family Properties */
+enum {
+ kSRSpelling = FOUR_CHAR_CODE('spel'), /* spelling of a SRWord or SRPhrase or SRPath, or name of a SRLanguageModel */
+ kSRLMObjType = FOUR_CHAR_CODE('lmtp'), /* Returns one of SRLanguageObject Types listed below */
+ kSRRefCon = FOUR_CHAR_CODE('refc'), /* 4 bytes of user storage */
+ kSROptional = FOUR_CHAR_CODE('optl'), /* Boolean -- true if SRLanguageObject is optional */
+ kSREnabled = FOUR_CHAR_CODE('enbl'), /* Boolean -- true if SRLanguageObject enabled */
+ kSRRepeatable = FOUR_CHAR_CODE('rptb'), /* Boolean -- true if SRLanguageObject is repeatable */
+ kSRRejectable = FOUR_CHAR_CODE('rjbl'), /* Boolean -- true if SRLanguageObject is rejectable (Recognition System's kSRRejectedWord */
+ /* object can be returned in place of SRLanguageObject with this property) */
+ kSRRejectionLevel = FOUR_CHAR_CODE('rjct') /* SRRejectionLevel between 0 and 100 */
+};
+
+/* LM Object Types -- returned as kSRLMObjType property of language model objects */
+enum {
+ kSRLanguageModelType = FOUR_CHAR_CODE('lmob'), /* SRLanguageModel */
+ kSRPathType = FOUR_CHAR_CODE('path'), /* SRPath */
+ kSRPhraseType = FOUR_CHAR_CODE('phra'), /* SRPhrase */
+ kSRWordType = FOUR_CHAR_CODE('word') /* SRWord */
+};
+
+/* a normal and reasonable rejection level */
+enum {
+ kSRDefaultRejectionLevel = 50
+};
+
+/********************************************************************************/
+/* NOTES ON USING THE API */
+/* */
+/* All operations (with the exception of SRGetRecognitionSystem) are */
+/* directed toward an object allocated or begot from New, Get and Read */
+/* type calls. */
+/* */
+/* There is a simple rule in dealing with allocation and disposal: */
+/* */
+/* * all toolbox allocations are obtained from a SRRecognitionSystem */
+/* */
+/* * if you obtain an object via New or Get, then you own a reference */
+/* to that object and it must be released via SRReleaseObject when */
+/* you no longer need it */
+/* */
+/* * when you receive a SRRecognitionResult object via AppleEvent or */
+/* callback, it has essentially been created on your behalf and so */
+/* you are responsible for releasing it as above */
+/* */
+/* * when you close a SRRecognitionSystem, all remaining objects which */
+/* were allocated with it will be forcefully released and any */
+/* remaining references to those objects will be invalid. */
+/* */
+/* This translates into a very simple guideline: */
+/* If you allocate it or have it allocated for you, you must release */
+/* it. If you are only peeking at it, then don't release it. */
+/* */
+/********************************************************************************/
+/* Opening and Closing of the SRRecognitionSystem */
+EXTERN_API( OSErr )
+SROpenRecognitionSystem (SRRecognitionSystem * system,
+ OSType systemID) THREEWORDINLINE(0x303C, 0x0400, 0xAA56);
+
+EXTERN_API( OSErr )
+SRCloseRecognitionSystem (SRRecognitionSystem system) THREEWORDINLINE(0x303C, 0x0201, 0xAA56);
+
+/* Accessing Properties of any Speech Object */
+EXTERN_API( OSErr )
+SRSetProperty (SRSpeechObject srObject,
+ OSType selector,
+ const void * property,
+ Size propertyLen) THREEWORDINLINE(0x303C, 0x0802, 0xAA56);
+
+EXTERN_API( OSErr )
+SRGetProperty (SRSpeechObject srObject,
+ OSType selector,
+ void * property,
+ Size * propertyLen) THREEWORDINLINE(0x303C, 0x0803, 0xAA56);
+
+/* Any object obtained via New or Get type calls must be released */
+EXTERN_API( OSErr )
+SRReleaseObject (SRSpeechObject srObject) THREEWORDINLINE(0x303C, 0x0204, 0xAA56);
+
+EXTERN_API( OSErr )
+SRGetReference (SRSpeechObject srObject,
+ SRSpeechObject * newObjectRef) THREEWORDINLINE(0x303C, 0x0425, 0xAA56);
+
+/* SRRecognizer Instance Functions */
+EXTERN_API( OSErr )
+SRNewRecognizer (SRRecognitionSystem system,
+ SRRecognizer * recognizer,
+ OSType sourceID) THREEWORDINLINE(0x303C, 0x060A, 0xAA56);
+
+EXTERN_API( OSErr )
+SRStartListening (SRRecognizer recognizer) THREEWORDINLINE(0x303C, 0x020C, 0xAA56);
+
+EXTERN_API( OSErr )
+SRStopListening (SRRecognizer recognizer) THREEWORDINLINE(0x303C, 0x020D, 0xAA56);
+
+EXTERN_API( OSErr )
+SRSetLanguageModel (SRRecognizer recognizer,
+ SRLanguageModel languageModel) THREEWORDINLINE(0x303C, 0x040E, 0xAA56);
+
+EXTERN_API( OSErr )
+SRGetLanguageModel (SRRecognizer recognizer,
+ SRLanguageModel * languageModel) THREEWORDINLINE(0x303C, 0x040F, 0xAA56);
+
+EXTERN_API( OSErr )
+SRContinueRecognition (SRRecognizer recognizer) THREEWORDINLINE(0x303C, 0x0210, 0xAA56);
+
+EXTERN_API( OSErr )
+SRCancelRecognition (SRRecognizer recognizer) THREEWORDINLINE(0x303C, 0x0211, 0xAA56);
+
+EXTERN_API( OSErr )
+SRIdle (void) THREEWORDINLINE(0x303C, 0x0028, 0xAA56);
+
+/* Language Model Building and Manipulation Functions */
+EXTERN_API( OSErr )
+SRNewLanguageModel (SRRecognitionSystem system,
+ SRLanguageModel * model,
+ const void * name,
+ Size nameLength) THREEWORDINLINE(0x303C, 0x0812, 0xAA56);
+
+EXTERN_API( OSErr )
+SRNewPath (SRRecognitionSystem system,
+ SRPath * path) THREEWORDINLINE(0x303C, 0x0413, 0xAA56);
+
+EXTERN_API( OSErr )
+SRNewPhrase (SRRecognitionSystem system,
+ SRPhrase * phrase,
+ const void * text,
+ Size textLength) THREEWORDINLINE(0x303C, 0x0814, 0xAA56);
+
+EXTERN_API( OSErr )
+SRNewWord (SRRecognitionSystem system,
+ SRWord * word,
+ const void * text,
+ Size textLength) THREEWORDINLINE(0x303C, 0x0815, 0xAA56);
+
+/* Operations on any object of the SRLanguageObject family */
+EXTERN_API( OSErr )
+SRPutLanguageObjectIntoHandle (SRLanguageObject languageObject,
+ Handle lobjHandle) THREEWORDINLINE(0x303C, 0x0416, 0xAA56);
+
+EXTERN_API( OSErr )
+SRPutLanguageObjectIntoDataFile (SRLanguageObject languageObject,
+ short fRefNum) THREEWORDINLINE(0x303C, 0x0328, 0xAA56);
+
+EXTERN_API( OSErr )
+SRNewLanguageObjectFromHandle (SRRecognitionSystem system,
+ SRLanguageObject * languageObject,
+ Handle lObjHandle) THREEWORDINLINE(0x303C, 0x0417, 0xAA56);
+
+EXTERN_API( OSErr )
+SRNewLanguageObjectFromDataFile (SRRecognitionSystem system,
+ SRLanguageObject * languageObject,
+ short fRefNum) THREEWORDINLINE(0x303C, 0x0427, 0xAA56);
+
+EXTERN_API( OSErr )
+SREmptyLanguageObject (SRLanguageObject languageObject) THREEWORDINLINE(0x303C, 0x0218, 0xAA56);
+
+EXTERN_API( OSErr )
+SRChangeLanguageObject (SRLanguageObject languageObject,
+ const void * text,
+ Size textLength) THREEWORDINLINE(0x303C, 0x0619, 0xAA56);
+
+EXTERN_API( OSErr )
+SRAddLanguageObject (SRLanguageObject base,
+ SRLanguageObject addon) THREEWORDINLINE(0x303C, 0x041A, 0xAA56);
+
+EXTERN_API( OSErr )
+SRAddText (SRLanguageObject base,
+ const void * text,
+ Size textLength,
+ long refCon) THREEWORDINLINE(0x303C, 0x081B, 0xAA56);
+
+EXTERN_API( OSErr )
+SRRemoveLanguageObject (SRLanguageObject base,
+ SRLanguageObject toRemove) THREEWORDINLINE(0x303C, 0x041C, 0xAA56);
+
+/* Traversing SRRecognitionResults or SRLanguageObjects */
+EXTERN_API( OSErr )
+SRCountItems (SRSpeechObject container,
+ long * count) THREEWORDINLINE(0x303C, 0x0405, 0xAA56);
+
+EXTERN_API( OSErr )
+SRGetIndexedItem (SRSpeechObject container,
+ SRSpeechObject * item,
+ long index) THREEWORDINLINE(0x303C, 0x0606, 0xAA56);
+
+EXTERN_API( OSErr )
+SRSetIndexedItem (SRSpeechObject container,
+ SRSpeechObject item,
+ long index) THREEWORDINLINE(0x303C, 0x0607, 0xAA56);
+
+EXTERN_API( OSErr )
+SRRemoveIndexedItem (SRSpeechObject container,
+ long index) THREEWORDINLINE(0x303C, 0x0408, 0xAA56);
+
+/* Utilizing the System Feedback Window */
+EXTERN_API( OSErr )
+SRDrawText (SRRecognizer recognizer,
+ const void * dispText,
+ Size dispLength) THREEWORDINLINE(0x303C, 0x0621, 0xAA56);
+
+EXTERN_API( OSErr )
+SRDrawRecognizedText (SRRecognizer recognizer,
+ const void * dispText,
+ Size dispLength) THREEWORDINLINE(0x303C, 0x0622, 0xAA56);
+
+EXTERN_API( OSErr )
+SRSpeakText (SRRecognizer recognizer,
+ const void * speakText,
+ Size speakLength) THREEWORDINLINE(0x303C, 0x0620, 0xAA56);
+
+EXTERN_API( OSErr )
+SRSpeakAndDrawText (SRRecognizer recognizer,
+ const void * text,
+ Size textLength) THREEWORDINLINE(0x303C, 0x061F, 0xAA56);
+
+EXTERN_API( OSErr )
+SRStopSpeech (SRRecognizer recognizer) THREEWORDINLINE(0x303C, 0x0223, 0xAA56);
+
+EXTERN_API( Boolean )
+SRSpeechBusy (SRRecognizer recognizer) THREEWORDINLINE(0x303C, 0x0224, 0xAA56);
+
+EXTERN_API( OSErr )
+SRProcessBegin (SRRecognizer recognizer,
+ Boolean failed) THREEWORDINLINE(0x303C, 0x031D, 0xAA56);
+
+EXTERN_API( OSErr )
+SRProcessEnd (SRRecognizer recognizer,
+ Boolean failed) THREEWORDINLINE(0x303C, 0x031E, 0xAA56);
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __SPEECHRECOGNITION__ */
+
diff --git a/include/qt/SpeechSynthesis.h b/include/qt/SpeechSynthesis.h
new file mode 100644
index 000000000..6bf545c54
--- /dev/null
+++ b/include/qt/SpeechSynthesis.h
@@ -0,0 +1,483 @@
+/*
+ File: SpeechSynthesis.h
+
+ Contains: Speech Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1989-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __SPEECHSYNTHESIS__
+#define __SPEECHSYNTHESIS__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ kTextToSpeechSynthType = FOUR_CHAR_CODE('ttsc'),
+ kTextToSpeechVoiceType = FOUR_CHAR_CODE('ttvd'),
+ kTextToSpeechVoiceFileType = FOUR_CHAR_CODE('ttvf'),
+ kTextToSpeechVoiceBundleType = FOUR_CHAR_CODE('ttvb')
+};
+
+enum {
+ kNoEndingProsody = 1,
+ kNoSpeechInterrupt = 2,
+ kPreflightThenPause = 4
+};
+
+enum {
+ kImmediate = 0,
+ kEndOfWord = 1,
+ kEndOfSentence = 2
+};
+
+
+/*------------------------------------------*/
+/* GetSpeechInfo & SetSpeechInfo selectors */
+/*------------------------------------------*/
+enum {
+ soStatus = FOUR_CHAR_CODE('stat'),
+ soErrors = FOUR_CHAR_CODE('erro'),
+ soInputMode = FOUR_CHAR_CODE('inpt'),
+ soCharacterMode = FOUR_CHAR_CODE('char'),
+ soNumberMode = FOUR_CHAR_CODE('nmbr'),
+ soRate = FOUR_CHAR_CODE('rate'),
+ soPitchBase = FOUR_CHAR_CODE('pbas'),
+ soPitchMod = FOUR_CHAR_CODE('pmod'),
+ soVolume = FOUR_CHAR_CODE('volm'),
+ soSynthType = FOUR_CHAR_CODE('vers'),
+ soRecentSync = FOUR_CHAR_CODE('sync'),
+ soPhonemeSymbols = FOUR_CHAR_CODE('phsy'),
+ soCurrentVoice = FOUR_CHAR_CODE('cvox'),
+ soCommandDelimiter = FOUR_CHAR_CODE('dlim'),
+ soReset = FOUR_CHAR_CODE('rset'),
+ soCurrentA5 = FOUR_CHAR_CODE('myA5'),
+ soRefCon = FOUR_CHAR_CODE('refc'),
+ soTextDoneCallBack = FOUR_CHAR_CODE('tdcb'), /* use with SpeechTextDoneProcPtr*/
+ soSpeechDoneCallBack = FOUR_CHAR_CODE('sdcb'), /* use with SpeechDoneProcPtr*/
+ soSyncCallBack = FOUR_CHAR_CODE('sycb'), /* use with SpeechSyncProcPtr*/
+ soErrorCallBack = FOUR_CHAR_CODE('ercb'), /* use with SpeechErrorProcPtr*/
+ soPhonemeCallBack = FOUR_CHAR_CODE('phcb'), /* use with SpeechPhonemeProcPtr*/
+ soWordCallBack = FOUR_CHAR_CODE('wdcb'),
+ soSynthExtension = FOUR_CHAR_CODE('xtnd'),
+ soSoundOutput = FOUR_CHAR_CODE('sndo')
+};
+
+
+/*------------------------------------------*/
+/* Speaking Mode Constants */
+/*------------------------------------------*/
+enum {
+ modeText = FOUR_CHAR_CODE('TEXT'), /* input mode constants */
+ modePhonemes = FOUR_CHAR_CODE('PHON'),
+ modeNormal = FOUR_CHAR_CODE('NORM'), /* character mode and number mode constants */
+ modeLiteral = FOUR_CHAR_CODE('LTRL')
+};
+
+
+enum {
+ soVoiceDescription = FOUR_CHAR_CODE('info'),
+ soVoiceFile = FOUR_CHAR_CODE('fref')
+};
+
+
+typedef struct OpaqueSpeechChannel* SpeechChannel;
+
+
+struct VoiceSpec {
+ OSType creator;
+ OSType id;
+};
+typedef struct VoiceSpec VoiceSpec;
+typedef VoiceSpec * VoiceSpecPtr;
+
+enum {
+ kNeuter = 0,
+ kMale = 1,
+ kFemale = 2
+};
+
+
+
+
+
+struct VoiceDescription {
+ long length;
+ VoiceSpec voice;
+ long version;
+ Str63 name;
+ Str255 comment;
+ short gender;
+ short age;
+ short script;
+ short language;
+ short region;
+ long reserved[4];
+};
+typedef struct VoiceDescription VoiceDescription;
+
+
+
+struct VoiceFileInfo {
+ FSSpec fileSpec;
+ short resID;
+};
+typedef struct VoiceFileInfo VoiceFileInfo;
+
+struct SpeechStatusInfo {
+ Boolean outputBusy;
+ Boolean outputPaused;
+ long inputBytesLeft;
+ short phonemeCode;
+};
+typedef struct SpeechStatusInfo SpeechStatusInfo;
+
+
+
+struct SpeechErrorInfo {
+ short count;
+ OSErr oldest;
+ long oldPos;
+ OSErr newest;
+ long newPos;
+};
+typedef struct SpeechErrorInfo SpeechErrorInfo;
+
+
+
+struct SpeechVersionInfo {
+ OSType synthType;
+ OSType synthSubType;
+ OSType synthManufacturer;
+ long synthFlags;
+ NumVersion synthVersion;
+};
+typedef struct SpeechVersionInfo SpeechVersionInfo;
+
+
+
+struct PhonemeInfo {
+ short opcode;
+ Str15 phStr;
+ Str31 exampleStr;
+ short hiliteStart;
+ short hiliteEnd;
+};
+typedef struct PhonemeInfo PhonemeInfo;
+
+
+struct PhonemeDescriptor {
+ short phonemeCount;
+ PhonemeInfo thePhonemes[1];
+};
+typedef struct PhonemeDescriptor PhonemeDescriptor;
+
+struct SpeechXtndData {
+ OSType synthCreator;
+ Byte synthData[2];
+};
+typedef struct SpeechXtndData SpeechXtndData;
+
+
+struct DelimiterInfo {
+ Byte startDelimiter[2];
+ Byte endDelimiter[2];
+};
+typedef struct DelimiterInfo DelimiterInfo;
+
+typedef CALLBACK_API( void , SpeechTextDoneProcPtr )(SpeechChannel chan, long refCon, const void **nextBuf, unsigned long *byteLen, long *controlFlags);
+typedef CALLBACK_API( void , SpeechDoneProcPtr )(SpeechChannel chan, long refCon);
+typedef CALLBACK_API( void , SpeechSyncProcPtr )(SpeechChannel chan, long refCon, OSType syncMessage);
+typedef CALLBACK_API( void , SpeechErrorProcPtr )(SpeechChannel chan, long refCon, OSErr theError, long bytePos);
+typedef CALLBACK_API( void , SpeechPhonemeProcPtr )(SpeechChannel chan, long refCon, short phonemeOpcode);
+typedef CALLBACK_API( void , SpeechWordProcPtr )(SpeechChannel chan, long refCon, unsigned long wordPos, unsigned short wordLen);
+typedef STACK_UPP_TYPE(SpeechTextDoneProcPtr) SpeechTextDoneUPP;
+typedef STACK_UPP_TYPE(SpeechDoneProcPtr) SpeechDoneUPP;
+typedef STACK_UPP_TYPE(SpeechSyncProcPtr) SpeechSyncUPP;
+typedef STACK_UPP_TYPE(SpeechErrorProcPtr) SpeechErrorUPP;
+typedef STACK_UPP_TYPE(SpeechPhonemeProcPtr) SpeechPhonemeUPP;
+typedef STACK_UPP_TYPE(SpeechWordProcPtr) SpeechWordUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(SpeechTextDoneUPP)
+ NewSpeechTextDoneUPP (SpeechTextDoneProcPtr userRoutine);
+
+ EXTERN_API(SpeechDoneUPP)
+ NewSpeechDoneUPP (SpeechDoneProcPtr userRoutine);
+
+ EXTERN_API(SpeechSyncUPP)
+ NewSpeechSyncUPP (SpeechSyncProcPtr userRoutine);
+
+ EXTERN_API(SpeechErrorUPP)
+ NewSpeechErrorUPP (SpeechErrorProcPtr userRoutine);
+
+ EXTERN_API(SpeechPhonemeUPP)
+ NewSpeechPhonemeUPP (SpeechPhonemeProcPtr userRoutine);
+
+ EXTERN_API(SpeechWordUPP)
+ NewSpeechWordUPP (SpeechWordProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeSpeechTextDoneUPP (SpeechTextDoneUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeSpeechDoneUPP (SpeechDoneUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeSpeechSyncUPP (SpeechSyncUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeSpeechErrorUPP (SpeechErrorUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeSpeechPhonemeUPP (SpeechPhonemeUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeSpeechWordUPP (SpeechWordUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeSpeechTextDoneUPP (SpeechChannel chan,
+ long refCon,
+ const void ** nextBuf,
+ unsigned long * byteLen,
+ long * controlFlags,
+ SpeechTextDoneUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeSpeechDoneUPP (SpeechChannel chan,
+ long refCon,
+ SpeechDoneUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeSpeechSyncUPP (SpeechChannel chan,
+ long refCon,
+ OSType syncMessage,
+ SpeechSyncUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeSpeechErrorUPP (SpeechChannel chan,
+ long refCon,
+ OSErr theError,
+ long bytePos,
+ SpeechErrorUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeSpeechPhonemeUPP (SpeechChannel chan,
+ long refCon,
+ short phonemeOpcode,
+ SpeechPhonemeUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeSpeechWordUPP (SpeechChannel chan,
+ long refCon,
+ unsigned long wordPos,
+ unsigned short wordLen,
+ SpeechWordUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppSpeechTextDoneProcInfo = 0x0000FFC0 }; /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppSpeechDoneProcInfo = 0x000003C0 }; /* pascal no_return_value Func(4_bytes, 4_bytes) */
+ enum { uppSpeechSyncProcInfo = 0x00000FC0 }; /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppSpeechErrorProcInfo = 0x00003BC0 }; /* pascal no_return_value Func(4_bytes, 4_bytes, 2_bytes, 4_bytes) */
+ enum { uppSpeechPhonemeProcInfo = 0x00000BC0 }; /* pascal no_return_value Func(4_bytes, 4_bytes, 2_bytes) */
+ enum { uppSpeechWordProcInfo = 0x00002FC0 }; /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes, 2_bytes) */
+ #define NewSpeechTextDoneUPP(userRoutine) (SpeechTextDoneUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSpeechTextDoneProcInfo, GetCurrentArchitecture())
+ #define NewSpeechDoneUPP(userRoutine) (SpeechDoneUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSpeechDoneProcInfo, GetCurrentArchitecture())
+ #define NewSpeechSyncUPP(userRoutine) (SpeechSyncUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSpeechSyncProcInfo, GetCurrentArchitecture())
+ #define NewSpeechErrorUPP(userRoutine) (SpeechErrorUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSpeechErrorProcInfo, GetCurrentArchitecture())
+ #define NewSpeechPhonemeUPP(userRoutine) (SpeechPhonemeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSpeechPhonemeProcInfo, GetCurrentArchitecture())
+ #define NewSpeechWordUPP(userRoutine) (SpeechWordUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSpeechWordProcInfo, GetCurrentArchitecture())
+ #define DisposeSpeechTextDoneUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeSpeechDoneUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeSpeechSyncUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeSpeechErrorUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeSpeechPhonemeUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeSpeechWordUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeSpeechTextDoneUPP(chan, refCon, nextBuf, byteLen, controlFlags, userUPP) CALL_FIVE_PARAMETER_UPP((userUPP), uppSpeechTextDoneProcInfo, (chan), (refCon), (nextBuf), (byteLen), (controlFlags))
+ #define InvokeSpeechDoneUPP(chan, refCon, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppSpeechDoneProcInfo, (chan), (refCon))
+ #define InvokeSpeechSyncUPP(chan, refCon, syncMessage, userUPP) CALL_THREE_PARAMETER_UPP((userUPP), uppSpeechSyncProcInfo, (chan), (refCon), (syncMessage))
+ #define InvokeSpeechErrorUPP(chan, refCon, theError, bytePos, userUPP) CALL_FOUR_PARAMETER_UPP((userUPP), uppSpeechErrorProcInfo, (chan), (refCon), (theError), (bytePos))
+ #define InvokeSpeechPhonemeUPP(chan, refCon, phonemeOpcode, userUPP) CALL_THREE_PARAMETER_UPP((userUPP), uppSpeechPhonemeProcInfo, (chan), (refCon), (phonemeOpcode))
+ #define InvokeSpeechWordUPP(chan, refCon, wordPos, wordLen, userUPP) CALL_FOUR_PARAMETER_UPP((userUPP), uppSpeechWordProcInfo, (chan), (refCon), (wordPos), (wordLen))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewSpeechTextDoneProc(userRoutine) NewSpeechTextDoneUPP(userRoutine)
+#define NewSpeechDoneProc(userRoutine) NewSpeechDoneUPP(userRoutine)
+#define NewSpeechSyncProc(userRoutine) NewSpeechSyncUPP(userRoutine)
+#define NewSpeechErrorProc(userRoutine) NewSpeechErrorUPP(userRoutine)
+#define NewSpeechPhonemeProc(userRoutine) NewSpeechPhonemeUPP(userRoutine)
+#define NewSpeechWordProc(userRoutine) NewSpeechWordUPP(userRoutine)
+#define CallSpeechTextDoneProc(userRoutine, chan, refCon, nextBuf, byteLen, controlFlags) InvokeSpeechTextDoneUPP(chan, refCon, nextBuf, byteLen, controlFlags, userRoutine)
+#define CallSpeechDoneProc(userRoutine, chan, refCon) InvokeSpeechDoneUPP(chan, refCon, userRoutine)
+#define CallSpeechSyncProc(userRoutine, chan, refCon, syncMessage) InvokeSpeechSyncUPP(chan, refCon, syncMessage, userRoutine)
+#define CallSpeechErrorProc(userRoutine, chan, refCon, theError, bytePos) InvokeSpeechErrorUPP(chan, refCon, theError, bytePos, userRoutine)
+#define CallSpeechPhonemeProc(userRoutine, chan, refCon, phonemeOpcode) InvokeSpeechPhonemeUPP(chan, refCon, phonemeOpcode, userRoutine)
+#define CallSpeechWordProc(userRoutine, chan, refCon, wordPos, wordLen) InvokeSpeechWordUPP(chan, refCon, wordPos, wordLen, userRoutine)
+EXTERN_API( NumVersion )
+SpeechManagerVersion (void) FOURWORDINLINE(0x203C, 0x0000, 0x000C, 0xA800);
+
+EXTERN_API( OSErr )
+MakeVoiceSpec (OSType creator,
+ OSType id,
+ VoiceSpec * voice) FOURWORDINLINE(0x203C, 0x0604, 0x000C, 0xA800);
+
+EXTERN_API( OSErr )
+CountVoices (short * numVoices) FOURWORDINLINE(0x203C, 0x0108, 0x000C, 0xA800);
+
+EXTERN_API( OSErr )
+GetIndVoice (short index,
+ VoiceSpec * voice) FOURWORDINLINE(0x203C, 0x030C, 0x000C, 0xA800);
+
+EXTERN_API( OSErr )
+GetVoiceDescription (const VoiceSpec * voice,
+ VoiceDescription * info,
+ long infoLength) FOURWORDINLINE(0x203C, 0x0610, 0x000C, 0xA800);
+
+EXTERN_API( OSErr )
+GetVoiceInfo (const VoiceSpec * voice,
+ OSType selector,
+ void * voiceInfo) FOURWORDINLINE(0x203C, 0x0614, 0x000C, 0xA800);
+
+EXTERN_API( OSErr )
+NewSpeechChannel (VoiceSpec * voice, /* can be NULL */
+ SpeechChannel * chan) FOURWORDINLINE(0x203C, 0x0418, 0x000C, 0xA800);
+
+EXTERN_API( OSErr )
+DisposeSpeechChannel (SpeechChannel chan) FOURWORDINLINE(0x203C, 0x021C, 0x000C, 0xA800);
+
+EXTERN_API( OSErr )
+SpeakString (ConstStr255Param textToBeSpoken) FOURWORDINLINE(0x203C, 0x0220, 0x000C, 0xA800);
+
+EXTERN_API( OSErr )
+SpeakText (SpeechChannel chan,
+ const void * textBuf,
+ unsigned long textBytes) FOURWORDINLINE(0x203C, 0x0624, 0x000C, 0xA800);
+
+EXTERN_API( OSErr )
+SpeakBuffer (SpeechChannel chan,
+ const void * textBuf,
+ unsigned long textBytes,
+ long controlFlags) FOURWORDINLINE(0x203C, 0x0828, 0x000C, 0xA800);
+
+EXTERN_API( OSErr )
+StopSpeech (SpeechChannel chan) FOURWORDINLINE(0x203C, 0x022C, 0x000C, 0xA800);
+
+EXTERN_API( OSErr )
+StopSpeechAt (SpeechChannel chan,
+ long whereToStop) FOURWORDINLINE(0x203C, 0x0430, 0x000C, 0xA800);
+
+EXTERN_API( OSErr )
+PauseSpeechAt (SpeechChannel chan,
+ long whereToPause) FOURWORDINLINE(0x203C, 0x0434, 0x000C, 0xA800);
+
+EXTERN_API( OSErr )
+ContinueSpeech (SpeechChannel chan) FOURWORDINLINE(0x203C, 0x0238, 0x000C, 0xA800);
+
+EXTERN_API( short )
+SpeechBusy (void) FOURWORDINLINE(0x203C, 0x003C, 0x000C, 0xA800);
+
+EXTERN_API( short )
+SpeechBusySystemWide (void) FOURWORDINLINE(0x203C, 0x0040, 0x000C, 0xA800);
+
+EXTERN_API( OSErr )
+SetSpeechRate (SpeechChannel chan,
+ Fixed rate) FOURWORDINLINE(0x203C, 0x0444, 0x000C, 0xA800);
+
+EXTERN_API( OSErr )
+GetSpeechRate (SpeechChannel chan,
+ Fixed * rate) FOURWORDINLINE(0x203C, 0x0448, 0x000C, 0xA800);
+
+EXTERN_API( OSErr )
+SetSpeechPitch (SpeechChannel chan,
+ Fixed pitch) FOURWORDINLINE(0x203C, 0x044C, 0x000C, 0xA800);
+
+EXTERN_API( OSErr )
+GetSpeechPitch (SpeechChannel chan,
+ Fixed * pitch) FOURWORDINLINE(0x203C, 0x0450, 0x000C, 0xA800);
+
+EXTERN_API( OSErr )
+SetSpeechInfo (SpeechChannel chan,
+ OSType selector,
+ const void * speechInfo) FOURWORDINLINE(0x203C, 0x0654, 0x000C, 0xA800);
+
+EXTERN_API( OSErr )
+GetSpeechInfo (SpeechChannel chan,
+ OSType selector,
+ void * speechInfo) FOURWORDINLINE(0x203C, 0x0658, 0x000C, 0xA800);
+
+EXTERN_API( OSErr )
+TextToPhonemes (SpeechChannel chan,
+ const void * textBuf,
+ unsigned long textBytes,
+ Handle phonemeBuf,
+ long * phonemeBytes) FOURWORDINLINE(0x203C, 0x0A5C, 0x000C, 0xA800);
+
+EXTERN_API( OSErr )
+UseDictionary (SpeechChannel chan,
+ Handle dictionary) FOURWORDINLINE(0x203C, 0x0460, 0x000C, 0xA800);
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __SPEECHSYNTHESIS__ */
+
diff --git a/include/qt/StandardFile.h b/include/qt/StandardFile.h
new file mode 100644
index 000000000..e01801c11
--- /dev/null
+++ b/include/qt/StandardFile.h
@@ -0,0 +1,432 @@
+/*
+ File: StandardFile.h
+
+ Contains: Standard File package Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1990-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __STANDARDFILE__
+#define __STANDARDFILE__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __DIALOGS__
+#include "Dialogs.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ /* resource IDs of pre-7.0 get and put dialogs */
+ putDlgID = -3999,
+ getDlgID = -4000
+};
+
+enum {
+ /* item offsets of pre-7.0 get and put dialogs */
+ putSave = 1,
+ putCancel = 2,
+ putEject = 5,
+ putDrive = 6,
+ putName = 7,
+ getOpen = 1,
+ getCancel = 3,
+ getEject = 5,
+ getDrive = 6,
+ getNmList = 7,
+ getScroll = 8
+};
+
+enum {
+ /* resource IDs of 7.0 get and put dialogs */
+ sfPutDialogID = -6043,
+ sfGetDialogID = -6042
+};
+
+enum {
+ /* item offsets of 7.0 get and put dialogs */
+ sfItemOpenButton = 1,
+ sfItemCancelButton = 2,
+ sfItemBalloonHelp = 3,
+ sfItemVolumeUser = 4,
+ sfItemEjectButton = 5,
+ sfItemDesktopButton = 6,
+ sfItemFileListUser = 7,
+ sfItemPopUpMenuUser = 8,
+ sfItemDividerLinePict = 9,
+ sfItemFileNameTextEdit = 10,
+ sfItemPromptStaticText = 11,
+ sfItemNewFolderUser = 12
+};
+
+enum {
+ /* pseudo-item hits for use in DlgHook */
+ sfHookFirstCall = -1,
+ sfHookCharOffset = 0x1000,
+ sfHookNullEvent = 100,
+ sfHookRebuildList = 101,
+ sfHookFolderPopUp = 102,
+ sfHookOpenFolder = 103, /* the following are only in system 7.0+ */
+ sfHookLastCall = -2,
+ sfHookOpenAlias = 104,
+ sfHookGoToDesktop = 105,
+ sfHookGoToAliasTarget = 106,
+ sfHookGoToParent = 107,
+ sfHookGoToNextDrive = 108,
+ sfHookGoToPrevDrive = 109,
+ sfHookChangeSelection = 110,
+ sfHookSetActiveOffset = 200
+};
+
+
+/* the refcon field of the dialog record during a
+ modalfilter or dialoghook contains one of the following */
+enum {
+ sfMainDialogRefCon = FOUR_CHAR_CODE('stdf'),
+ sfNewFolderDialogRefCon = FOUR_CHAR_CODE('nfdr'),
+ sfReplaceDialogRefCon = FOUR_CHAR_CODE('rplc'),
+ sfStatWarnDialogRefCon = FOUR_CHAR_CODE('stat'),
+ sfLockWarnDialogRefCon = FOUR_CHAR_CODE('lock'),
+ sfErrorDialogRefCon = FOUR_CHAR_CODE('err ')
+};
+
+
+
+struct SFReply {
+ Boolean good;
+ Boolean copy;
+ OSType fType;
+ short vRefNum;
+ short version;
+ StrFileName fName; /* a Str63 on MacOS */
+};
+typedef struct SFReply SFReply;
+
+struct StandardFileReply {
+ Boolean sfGood;
+ Boolean sfReplacing;
+ OSType sfType;
+ FSSpec sfFile;
+ ScriptCode sfScript;
+ short sfFlags;
+ Boolean sfIsFolder;
+ Boolean sfIsVolume;
+ long sfReserved1;
+ short sfReserved2;
+};
+typedef struct StandardFileReply StandardFileReply;
+/* for CustomXXXFile, ActivationOrderListPtr parameter is a pointer to an array of item numbers */
+
+typedef const short * ActivationOrderListPtr;
+typedef CALLBACK_API( short , DlgHookProcPtr )(short item, DialogPtr theDialog);
+typedef CALLBACK_API( Boolean , FileFilterProcPtr )(CInfoPBPtr pb);
+/* the following also include an extra parameter of "your data pointer" */
+typedef CALLBACK_API( short , DlgHookYDProcPtr )(short item, DialogPtr theDialog, void *yourDataPtr);
+typedef CALLBACK_API( Boolean , ModalFilterYDProcPtr )(DialogPtr theDialog, EventRecord *theEvent, short *itemHit, void *yourDataPtr);
+typedef CALLBACK_API( Boolean , FileFilterYDProcPtr )(CInfoPBPtr pb, void *yourDataPtr);
+typedef CALLBACK_API( void , ActivateYDProcPtr )(DialogPtr theDialog, short itemNo, Boolean activating, void *yourDataPtr);
+typedef STACK_UPP_TYPE(DlgHookProcPtr) DlgHookUPP;
+typedef STACK_UPP_TYPE(FileFilterProcPtr) FileFilterUPP;
+typedef STACK_UPP_TYPE(DlgHookYDProcPtr) DlgHookYDUPP;
+typedef STACK_UPP_TYPE(ModalFilterYDProcPtr) ModalFilterYDUPP;
+typedef STACK_UPP_TYPE(FileFilterYDProcPtr) FileFilterYDUPP;
+typedef STACK_UPP_TYPE(ActivateYDProcPtr) ActivateYDUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(DlgHookUPP)
+ NewDlgHookUPP (DlgHookProcPtr userRoutine);
+
+ EXTERN_API(FileFilterUPP)
+ NewFileFilterUPP (FileFilterProcPtr userRoutine);
+
+ EXTERN_API(DlgHookYDUPP)
+ NewDlgHookYDUPP (DlgHookYDProcPtr userRoutine);
+
+ EXTERN_API(ModalFilterYDUPP)
+ NewModalFilterYDUPP (ModalFilterYDProcPtr userRoutine);
+
+ EXTERN_API(FileFilterYDUPP)
+ NewFileFilterYDUPP (FileFilterYDProcPtr userRoutine);
+
+ EXTERN_API(ActivateYDUPP)
+ NewActivateYDUPP (ActivateYDProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeDlgHookUPP (DlgHookUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeFileFilterUPP (FileFilterUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeDlgHookYDUPP (DlgHookYDUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeModalFilterYDUPP (ModalFilterYDUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeFileFilterYDUPP (FileFilterYDUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeActivateYDUPP (ActivateYDUPP userUPP);
+
+ EXTERN_API(short)
+ InvokeDlgHookUPP (short item,
+ DialogPtr theDialog,
+ DlgHookUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeFileFilterUPP (CInfoPBPtr pb,
+ FileFilterUPP userUPP);
+
+ EXTERN_API(short)
+ InvokeDlgHookYDUPP (short item,
+ DialogPtr theDialog,
+ void * yourDataPtr,
+ DlgHookYDUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeModalFilterYDUPP (DialogPtr theDialog,
+ EventRecord * theEvent,
+ short * itemHit,
+ void * yourDataPtr,
+ ModalFilterYDUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeFileFilterYDUPP (CInfoPBPtr pb,
+ void * yourDataPtr,
+ FileFilterYDUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeActivateYDUPP (DialogPtr theDialog,
+ short itemNo,
+ Boolean activating,
+ void * yourDataPtr,
+ ActivateYDUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppDlgHookProcInfo = 0x000003A0 }; /* pascal 2_bytes Func(2_bytes, 4_bytes) */
+ enum { uppFileFilterProcInfo = 0x000000D0 }; /* pascal 1_byte Func(4_bytes) */
+ enum { uppDlgHookYDProcInfo = 0x00000FA0 }; /* pascal 2_bytes Func(2_bytes, 4_bytes, 4_bytes) */
+ enum { uppModalFilterYDProcInfo = 0x00003FD0 }; /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppFileFilterYDProcInfo = 0x000003D0 }; /* pascal 1_byte Func(4_bytes, 4_bytes) */
+ enum { uppActivateYDProcInfo = 0x000036C0 }; /* pascal no_return_value Func(4_bytes, 2_bytes, 1_byte, 4_bytes) */
+ #define NewDlgHookUPP(userRoutine) (DlgHookUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDlgHookProcInfo, GetCurrentArchitecture())
+ #define NewFileFilterUPP(userRoutine) (FileFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppFileFilterProcInfo, GetCurrentArchitecture())
+ #define NewDlgHookYDUPP(userRoutine) (DlgHookYDUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDlgHookYDProcInfo, GetCurrentArchitecture())
+ #define NewModalFilterYDUPP(userRoutine) (ModalFilterYDUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppModalFilterYDProcInfo, GetCurrentArchitecture())
+ #define NewFileFilterYDUPP(userRoutine) (FileFilterYDUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppFileFilterYDProcInfo, GetCurrentArchitecture())
+ #define NewActivateYDUPP(userRoutine) (ActivateYDUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppActivateYDProcInfo, GetCurrentArchitecture())
+ #define DisposeDlgHookUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeFileFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeDlgHookYDUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeModalFilterYDUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeFileFilterYDUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeActivateYDUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeDlgHookUPP(item, theDialog, userUPP) (short)CALL_TWO_PARAMETER_UPP((userUPP), uppDlgHookProcInfo, (item), (theDialog))
+ #define InvokeFileFilterUPP(pb, userUPP) (Boolean)CALL_ONE_PARAMETER_UPP((userUPP), uppFileFilterProcInfo, (pb))
+ #define InvokeDlgHookYDUPP(item, theDialog, yourDataPtr, userUPP) (short)CALL_THREE_PARAMETER_UPP((userUPP), uppDlgHookYDProcInfo, (item), (theDialog), (yourDataPtr))
+ #define InvokeModalFilterYDUPP(theDialog, theEvent, itemHit, yourDataPtr, userUPP) (Boolean)CALL_FOUR_PARAMETER_UPP((userUPP), uppModalFilterYDProcInfo, (theDialog), (theEvent), (itemHit), (yourDataPtr))
+ #define InvokeFileFilterYDUPP(pb, yourDataPtr, userUPP) (Boolean)CALL_TWO_PARAMETER_UPP((userUPP), uppFileFilterYDProcInfo, (pb), (yourDataPtr))
+ #define InvokeActivateYDUPP(theDialog, itemNo, activating, yourDataPtr, userUPP) CALL_FOUR_PARAMETER_UPP((userUPP), uppActivateYDProcInfo, (theDialog), (itemNo), (activating), (yourDataPtr))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewDlgHookProc(userRoutine) NewDlgHookUPP(userRoutine)
+#define NewFileFilterProc(userRoutine) NewFileFilterUPP(userRoutine)
+#define NewDlgHookYDProc(userRoutine) NewDlgHookYDUPP(userRoutine)
+#define NewModalFilterYDProc(userRoutine) NewModalFilterYDUPP(userRoutine)
+#define NewFileFilterYDProc(userRoutine) NewFileFilterYDUPP(userRoutine)
+#define NewActivateYDProc(userRoutine) NewActivateYDUPP(userRoutine)
+#define CallDlgHookProc(userRoutine, item, theDialog) InvokeDlgHookUPP(item, theDialog, userRoutine)
+#define CallFileFilterProc(userRoutine, pb) InvokeFileFilterUPP(pb, userRoutine)
+#define CallDlgHookYDProc(userRoutine, item, theDialog, yourDataPtr) InvokeDlgHookYDUPP(item, theDialog, yourDataPtr, userRoutine)
+#define CallModalFilterYDProc(userRoutine, theDialog, theEvent, itemHit, yourDataPtr) InvokeModalFilterYDUPP(theDialog, theEvent, itemHit, yourDataPtr, userRoutine)
+#define CallFileFilterYDProc(userRoutine, pb, yourDataPtr) InvokeFileFilterYDUPP(pb, yourDataPtr, userRoutine)
+#define CallActivateYDProc(userRoutine, theDialog, itemNo, activating, yourDataPtr) InvokeActivateYDUPP(theDialog, itemNo, activating, yourDataPtr, userRoutine)
+typedef OSType SFTypeList[4];
+/*
+ The GetFile "typeList" parameter type has changed from "SFTypeList" to "ConstSFTypeListPtr".
+ For C, this will add "const" and make it an in-only parameter.
+ For Pascal, this will require client code to use the @ operator, but make it easier to specify long lists.
+
+ ConstSFTypeListPtr is a pointer to an array of OSTypes.
+*/
+typedef const OSType * ConstSFTypeListPtr;
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+SFPutFile (Point where,
+ ConstStr255Param prompt, /* can be NULL */
+ ConstStr255Param origName,
+ DlgHookUPP dlgHook, /* can be NULL */
+ SFReply * reply) THREEWORDINLINE(0x3F3C, 0x0001, 0xA9EA);
+
+EXTERN_API( void )
+SFGetFile (Point where,
+ ConstStr255Param prompt,
+ FileFilterUPP fileFilter, /* can be NULL */
+ short numTypes,
+ ConstSFTypeListPtr typeList, /* can be NULL */
+ DlgHookUPP dlgHook, /* can be NULL */
+ SFReply * reply) THREEWORDINLINE(0x3F3C, 0x0002, 0xA9EA);
+
+EXTERN_API( void )
+SFPPutFile (Point where,
+ ConstStr255Param prompt, /* can be NULL */
+ ConstStr255Param origName,
+ DlgHookUPP dlgHook,
+ SFReply * reply,
+ short dlgID,
+ ModalFilterUPP filterProc) /* can be NULL */ THREEWORDINLINE(0x3F3C, 0x0003, 0xA9EA);
+
+EXTERN_API( void )
+SFPGetFile (Point where,
+ ConstStr255Param prompt,
+ FileFilterUPP fileFilter, /* can be NULL */
+ short numTypes,
+ ConstSFTypeListPtr typeList, /* can be NULL */
+ DlgHookUPP dlgHook, /* can be NULL */
+ SFReply * reply,
+ short dlgID,
+ ModalFilterUPP filterProc) /* can be NULL */ THREEWORDINLINE(0x3F3C, 0x0004, 0xA9EA);
+
+EXTERN_API( void )
+StandardPutFile (ConstStr255Param prompt, /* can be NULL */
+ ConstStr255Param defaultName,
+ StandardFileReply * reply) THREEWORDINLINE(0x3F3C, 0x0005, 0xA9EA);
+
+EXTERN_API( void )
+StandardGetFile (FileFilterUPP fileFilter, /* can be NULL */
+ short numTypes,
+ ConstSFTypeListPtr typeList, /* can be NULL */
+ StandardFileReply * reply) THREEWORDINLINE(0x3F3C, 0x0006, 0xA9EA);
+
+EXTERN_API( void )
+CustomPutFile (ConstStr255Param prompt, /* can be NULL */
+ ConstStr255Param defaultName,
+ StandardFileReply * reply,
+ short dlgID,
+ Point where,
+ DlgHookYDUPP dlgHook, /* can be NULL */
+ ModalFilterYDUPP filterProc, /* can be NULL */
+ ActivationOrderListPtr activeList, /* can be NULL */
+ ActivateYDUPP activate, /* can be NULL */
+ void * yourDataPtr) THREEWORDINLINE(0x3F3C, 0x0007, 0xA9EA);
+
+EXTERN_API( void )
+CustomGetFile (FileFilterYDUPP fileFilter, /* can be NULL */
+ short numTypes,
+ ConstSFTypeListPtr typeList, /* can be NULL */
+ StandardFileReply * reply,
+ short dlgID,
+ Point where,
+ DlgHookYDUPP dlgHook, /* can be NULL */
+ ModalFilterYDUPP filterProc, /* can be NULL */
+ ActivationOrderListPtr activeList, /* can be NULL */
+ ActivateYDUPP activate, /* can be NULL */
+ void * yourDataPtr) THREEWORDINLINE(0x3F3C, 0x0008, 0xA9EA);
+
+EXTERN_API( OSErr )
+StandardOpenDialog (StandardFileReply * reply);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( void )
+sfpputfile (Point * where,
+ const char * prompt,
+ const char * origName,
+ DlgHookUPP dlgHook, /* can be NULL */
+ SFReply * reply,
+ short dlgID,
+ ModalFilterUPP filterProc) /* can be NULL */;
+
+EXTERN_API_C( void )
+sfgetfile (Point * where,
+ const char * prompt,
+ FileFilterUPP fileFilter, /* can be NULL */
+ short numTypes,
+ ConstSFTypeListPtr typeList, /* can be NULL */
+ DlgHookUPP dlgHook, /* can be NULL */
+ SFReply * reply);
+
+EXTERN_API_C( void )
+sfpgetfile (Point * where,
+ const char * prompt,
+ FileFilterUPP fileFilter, /* can be NULL */
+ short numTypes,
+ ConstSFTypeListPtr typeList, /* can be NULL */
+ DlgHookUPP dlgHook, /* can be NULL */
+ SFReply * reply,
+ short dlgID,
+ ModalFilterUPP filterProc) /* can be NULL */;
+
+EXTERN_API_C( void )
+sfputfile (Point * where,
+ const char * prompt,
+ const char * origName,
+ DlgHookUPP dlgHook, /* can be NULL */
+ SFReply * reply);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __STANDARDFILE__ */
+
diff --git a/include/qt/Start.h b/include/qt/Start.h
new file mode 100644
index 000000000..1ccf8cd77
--- /dev/null
+++ b/include/qt/Start.h
@@ -0,0 +1,365 @@
+/*
+ File: Start.h
+
+ Contains: Start Manager Interfaces.
+
+ Version: Technology: Mac OS 8.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1987-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __START__
+#define __START__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*
+ Important: When the major version number of kExtensionTableVersion and the value
+ returned by gestaltExtensionTableVersion change, it indicates that the Extension
+ Table startup mechanism has radically changed and code that doesn't know about
+ the new major version must not attempt to use the Extension Table startup
+ mechanism.
+
+ Changes to the minor version number of kExtensionTableVersion indicate that the
+ definition of the ExtensionElement structure has been extended, but the fields
+ defined for previous minor versions of kExtensionTableVersion have not changed.
+*/
+enum {
+ kExtensionTableVersion = 0x00000100 /* current ExtensionTable version (1.0.0) */
+};
+
+/* ExtensionNotification message codes */
+enum {
+ extNotificationBeforeFirst = 0, /* Before any extensions have loaded */
+ extNotificationAfterLast = 1, /* After all extensions have loaded */
+ extNotificationBeforeCurrent = 2, /* Before extension at extElementIndex is loaded */
+ extNotificationAfterCurrent = 3 /* After extension at extElementIndex is loaded */
+};
+
+
+struct ExtensionElement {
+ Str31 fileName; /* The file name */
+ long parentDirID; /* the file's parent directory ID */
+ /* and everything after ioNamePtr in the HParamBlockRec.fileParam variant */
+ short ioVRefNum; /* always the real volume reference number (not a drive, default, or working dirID) */
+ short ioFRefNum;
+ SInt8 ioFVersNum;
+ SInt8 filler1;
+ short ioFDirIndex; /* always 0 in table */
+ SInt8 ioFlAttrib;
+ SInt8 ioFlVersNum;
+ FInfo ioFlFndrInfo;
+ long ioDirID;
+ unsigned short ioFlStBlk;
+ long ioFlLgLen;
+ long ioFlPyLen;
+ unsigned short ioFlRStBlk;
+ long ioFlRLgLen;
+ long ioFlRPyLen;
+ unsigned long ioFlCrDat;
+ unsigned long ioFlMdDat;
+};
+typedef struct ExtensionElement ExtensionElement;
+typedef ExtensionElement * ExtensionElementPtr;
+
+struct ExtensionTableHeader {
+ UInt32 extTableHeaderSize; /* size of ExtensionTable header ( equal to offsetof(ExtensionTable, extElements[0]) ) */
+ UInt32 extTableVersion; /* current ExtensionTable version (same as returned by gestaltExtTableVersion Gestalt selector) */
+ UInt32 extElementIndex; /* current index into ExtensionElement records (zero-based) */
+ UInt32 extElementSize; /* size of ExtensionElement */
+ UInt32 extElementCount; /* number of ExtensionElement records in table (1-based) */
+};
+typedef struct ExtensionTableHeader ExtensionTableHeader;
+
+struct ExtensionTable {
+ ExtensionTableHeader extTableHeader; /* the ExtensionTableHeader */
+ ExtensionElement extElements[1]; /* one element for each extension to load */
+};
+typedef struct ExtensionTable ExtensionTable;
+typedef ExtensionTable * ExtensionTablePtr;
+typedef ExtensionTablePtr * ExtensionTableHandle;
+typedef CALLBACK_API( void , ExtensionNotificationProcPtr )(UInt32 message, void *param, ExtensionElementPtr extElement);
+typedef CALLBACK_API( void , ExtensionTableHandlerProcPtr )(UInt32 message, void *param, ExtensionTableHandle extTableHandle);
+typedef STACK_UPP_TYPE(ExtensionNotificationProcPtr) ExtensionNotificationUPP;
+typedef STACK_UPP_TYPE(ExtensionTableHandlerProcPtr) ExtensionTableHandlerUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(ExtensionNotificationUPP)
+ NewExtensionNotificationUPP (ExtensionNotificationProcPtr userRoutine);
+
+ EXTERN_API(ExtensionTableHandlerUPP)
+ NewExtensionTableHandlerUPP (ExtensionTableHandlerProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeExtensionNotificationUPP (ExtensionNotificationUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeExtensionTableHandlerUPP (ExtensionTableHandlerUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeExtensionNotificationUPP (UInt32 message,
+ void * param,
+ ExtensionElementPtr extElement,
+ ExtensionNotificationUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeExtensionTableHandlerUPP (UInt32 message,
+ void * param,
+ ExtensionTableHandle extTableHandle,
+ ExtensionTableHandlerUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppExtensionNotificationProcInfo = 0x00000FC0 }; /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes) */
+ enum { uppExtensionTableHandlerProcInfo = 0x00000FC0 }; /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes) */
+ #define NewExtensionNotificationUPP(userRoutine) (ExtensionNotificationUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppExtensionNotificationProcInfo, GetCurrentArchitecture())
+ #define NewExtensionTableHandlerUPP(userRoutine) (ExtensionTableHandlerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppExtensionTableHandlerProcInfo, GetCurrentArchitecture())
+ #define DisposeExtensionNotificationUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeExtensionTableHandlerUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeExtensionNotificationUPP(message, param, extElement, userUPP) CALL_THREE_PARAMETER_UPP((userUPP), uppExtensionNotificationProcInfo, (message), (param), (extElement))
+ #define InvokeExtensionTableHandlerUPP(message, param, extTableHandle, userUPP) CALL_THREE_PARAMETER_UPP((userUPP), uppExtensionTableHandlerProcInfo, (message), (param), (extTableHandle))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewExtensionNotificationProc(userRoutine) NewExtensionNotificationUPP(userRoutine)
+#define NewExtensionTableHandlerProc(userRoutine) NewExtensionTableHandlerUPP(userRoutine)
+#define CallExtensionNotificationProc(userRoutine, message, param, extElement) InvokeExtensionNotificationUPP(message, param, extElement, userRoutine)
+#define CallExtensionTableHandlerProc(userRoutine, message, param, extTableHandle) InvokeExtensionTableHandlerUPP(message, param, extTableHandle, userRoutine)
+
+union DefStartRec {
+ struct {
+ SignedByte sdExtDevID;
+ SignedByte sdPartition;
+ SignedByte sdSlotNum;
+ SignedByte sdSRsrcID;
+ } slotDev;
+ struct {
+ SignedByte sdReserved1;
+ SignedByte sdReserved2;
+ short sdRefNum;
+ } scsiDev;
+};
+typedef union DefStartRec DefStartRec;
+
+typedef DefStartRec * DefStartPtr;
+
+struct DefVideoRec {
+ SignedByte sdSlot;
+ SignedByte sdsResource;
+};
+typedef struct DefVideoRec DefVideoRec;
+
+typedef DefVideoRec * DefVideoPtr;
+
+struct DefOSRec {
+ SignedByte sdReserved;
+ SignedByte sdOSType;
+};
+typedef struct DefOSRec DefOSRec;
+
+typedef DefOSRec * DefOSPtr;
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter GetDefaultStartup(__A0)
+ #endif
+EXTERN_API( void )
+GetDefaultStartup (DefStartPtr paramBlock) ONEWORDINLINE(0xA07D);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter SetDefaultStartup(__A0)
+ #endif
+EXTERN_API( void )
+SetDefaultStartup (DefStartPtr paramBlock) ONEWORDINLINE(0xA07E);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter GetVideoDefault(__A0)
+ #endif
+EXTERN_API( void )
+GetVideoDefault (DefVideoPtr paramBlock) ONEWORDINLINE(0xA080);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter SetVideoDefault(__A0)
+ #endif
+EXTERN_API( void )
+SetVideoDefault (DefVideoPtr paramBlock) ONEWORDINLINE(0xA081);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter GetOSDefault(__A0)
+ #endif
+EXTERN_API( void )
+GetOSDefault (DefOSPtr paramBlock) ONEWORDINLINE(0xA084);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter SetOSDefault(__A0)
+ #endif
+EXTERN_API( void )
+SetOSDefault (DefOSPtr paramBlock) ONEWORDINLINE(0xA083);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+SetTimeout (short count);
+
+EXTERN_API( void )
+GetTimeout (short * count);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+/*
+ InstallExtensionNotificationProc
+
+ Installs an ExtensionNotificationUPP.
+
+ Parameters:
+ extNotificationProc The ExtensionNotificationUPP to install.
+
+ Results:
+ noErr 0 The ExtensionNotificationUPP was installed.
+ paramErr -50 This ExtensionNotificationUPP has already been installed.
+ memFullErr -108 Not enough memory to install the ExtensionNotificationUPP.
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSErr )
+InstallExtensionNotificationProc (ExtensionNotificationUPP extNotificationProc) TWOWORDINLINE(0x7000, 0xAA7D);
+
+
+/*
+ RemoveExtensionNotificationProc
+
+ Removes an ExtensionNotificationUPP.
+
+ Note: ExtensionNotificationUPPs can't call RemoveExtensionNotificationProc.
+
+ Parameters:
+ extNotificationProc The ExtensionNotificationUPP to remove.
+
+ Results:
+ noErr 0 The ExtensionNotificationUPP was removed.
+ paramErr -50 The ExtensionNotificationUPP was not found, or
+ RemoveExtensionNotificationProc was called from within
+ a ExtensionNotificationUPP (ExtensionNotificationUPPs can't
+ call RemoveExtensionNotificationProc).
+*/
+EXTERN_API( OSErr )
+RemoveExtensionNotificationProc (ExtensionNotificationUPP extNotificationProc) TWOWORDINLINE(0x7001, 0xAA7D);
+
+
+/*
+ InstallExtensionTableHandlerProc
+
+ Installs an ExtensionTableHandlerUPP. Control is taken away from the system's default
+ handler and the ExtensionTableHandlerUPP is responsible for all changes to the
+ ExtensionTable (except for incrementing extElementIndex between extensions). This is
+ always the first handler called with extNotificationBeforeFirst and
+ extNotificationBeforeCurrent messages and the last handler called with
+ extNotificationAfterLast and extNotificationAfterCurrent messages. extElementIndex
+ is always incremented immediately after the ExtensionTableHandlerUPP is called with
+ the extNotificationAfterCurrent message.
+
+ There can only be one ExtensionTableHandler installed.
+
+ Warning: The only safe time to change what ExtensionElement is at
+ ExtensionTable.extElements[extElementIndex] is when your
+ ExtensionTableHandlerUPP is called with the extNotificationAfterCurrent
+ message. You may change the ExtensionTable or the extElementIndex at other
+ times, but you must ensure that the ExtensionElement at
+ ExtensionTable.extElements[extElementIndex] stays the same.
+
+ Note: If the ExtensionTable or the contents of the folders included in the
+ ExtensionTable are changed after installing an ExtensionTableHandler,
+ RemoveExtensionTableHandlerProc cannot be called.
+
+ Parameters:
+ extMgrProc The ExtensionTableHandlerUPP to install.
+ extTable A pointer to an ExtensionTableHandle where
+ InstallExtensionTableHandlerProc will return the current
+ ExtensionTableHandle. You don't own the handle itself and
+ must not dispose of it, but you can change the extElementIndex.
+ the extElementCount, and the ExtensionElements in the table.
+
+ Results:
+ noErr 0 The ExtensionTableHandlerUPP was installed.
+ paramErr -50 Another ExtensionTableHandlerUPP has already been installed.
+ memFullErr -108 Not enough memory to install the ExtensionTableHandlerUPP.
+*/
+EXTERN_API( OSErr )
+InstallExtensionTableHandlerProc (ExtensionTableHandlerUPP extMgrProc,
+ ExtensionTableHandle * extTable) TWOWORDINLINE(0x7002, 0xAA7D);
+
+
+/*
+ RemoveExtensionTableHandlerProc
+
+ Remove an ExtensionTableUPP. Control is passed back to the default handler.
+
+ Parameters:
+ extMgrProc The ExtensionTableUPP to remove.
+
+ Results:
+ noErr 0 The ExtensionTableUPP was removed.
+ paramErr -50 This ExtensionTableUPP was not installed,
+ or the ExtensionTable no longer matches the
+ original boot ExtensionTable.
+*/
+EXTERN_API( OSErr )
+RemoveExtensionTableHandlerProc (ExtensionTableHandlerUPP extMgrProc) TWOWORDINLINE(0x7003, 0xAA7D);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __START__ */
+
diff --git a/include/qt/StringCompare.h b/include/qt/StringCompare.h
new file mode 100644
index 000000000..f918b8e08
--- /dev/null
+++ b/include/qt/StringCompare.h
@@ -0,0 +1,423 @@
+/*
+ File: StringCompare.h
+
+ Contains: Public interfaces for String Comparison and related operations
+
+ Version: Technology: Mac OS 8
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __STRINGCOMPARE__
+#define __STRINGCOMPARE__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __TEXTCOMMON__
+#include "TextCommon.h"
+#endif
+
+#ifndef __SCRIPT__
+#include "Script.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*
+
+ Here are the current System 7 routine names and the translations to the older forms.
+ Please use the newer forms in all new code and migrate the older names out of existing
+ code as maintenance permits.
+
+ NEW NAME OLD NAME OBSOLETE FORM (no handle)
+
+ CompareString (Str255) IUCompPString (hp only) IUCompString (hp only)
+ CompareText (ptr/len) IUMagPString IUMagString
+ IdenticalString (Str255) IUEqualPString (hp only) IUEqualString (hp only)
+ IdenticalText (ptr/len) IUMagIDPString IUMagIDString
+ LanguageOrder IULangOrder
+ ScriptOrder IUScriptOrder
+ StringOrder (Str255) IUStringOrder (hp only)
+ TextOrder (ptr/len) IUTextOrder
+
+ RelString
+ CmpString (a only)
+ EqualString (hp only)
+
+ ReplaceText
+
+ Carbon only supports the new names. The old names are undefined for Carbon targets.
+
+ InterfaceLib always has exported the old names. For C macros have been defined to allow
+ the use of the new names. For Pascal and Assembly using the new names will result
+ in link errors.
+
+*/
+
+enum {
+ /* Special language code values for Language Order*/
+ systemCurLang = -2, /* current (itlbLang) lang for system script*/
+ systemDefLang = -3, /* default (table) lang for system script*/
+ currentCurLang = -4, /* current (itlbLang) lang for current script*/
+ currentDefLang = -5, /* default lang for current script*/
+ scriptCurLang = -6, /* current (itlbLang) lang for specified script*/
+ scriptDefLang = -7 /* default language for a specified script*/
+};
+
+/* obsolete names*/
+enum {
+ iuSystemCurLang = systemCurLang,
+ iuSystemDefLang = systemDefLang,
+ iuCurrentCurLang = currentCurLang,
+ iuCurrentDefLang = currentDefLang,
+ iuScriptCurLang = scriptCurLang,
+ iuScriptDefLang = scriptDefLang
+};
+
+
+/*
+ * Type Select Utils - now public in Carbon
+ */
+
+typedef SInt16 TSCode;
+enum {
+ tsPreviousSelectMode = -1,
+ tsNormalSelectMode = 0,
+ tsNextSelectMode = 1
+};
+
+
+struct TypeSelectRecord {
+ unsigned long tsrLastKeyTime;
+ ScriptCode tsrScript;
+ Str63 tsrKeyStrokes;
+};
+typedef struct TypeSelectRecord TypeSelectRecord;
+typedef CALLBACK_API( Boolean , IndexToStringProcPtr )(short item, ScriptCode *itemsScript, StringPtr *itemsStringPtr, void *yourDataPtr);
+typedef STACK_UPP_TYPE(IndexToStringProcPtr) IndexToStringUPP;
+EXTERN_API( void )
+TypeSelectClear (TypeSelectRecord * tsr) THREEWORDINLINE(0x3F3C, 0x0028, 0xA9ED);
+
+/*
+ Long ago the implementation of TypeSelectNewKey had a bug that
+ required the high word of D0 to be zero or the function did not work.
+ Although fixed now, we are continuing to clear the high word
+ just in case someone tries to run on an older system.
+ */
+EXTERN_API( Boolean )
+TypeSelectNewKey (const EventRecord * theEvent,
+ TypeSelectRecord * tsr) FOURWORDINLINE(0x7000, 0x3F3C, 0x002A, 0xA9ED);
+
+EXTERN_API( short )
+TypeSelectFindItem (const TypeSelectRecord * tsr,
+ short listSize,
+ TSCode selectMode,
+ IndexToStringUPP getStringProc,
+ void * yourDataPtr) THREEWORDINLINE(0x3F3C, 0x002C, 0xA9ED);
+
+
+EXTERN_API( short )
+TypeSelectCompare (const TypeSelectRecord * tsr,
+ ScriptCode testStringScript,
+ StringPtr testStringPtr) THREEWORDINLINE(0x3F3C, 0x002E, 0xA9ED);
+
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(IndexToStringUPP)
+ NewIndexToStringUPP (IndexToStringProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeIndexToStringUPP (IndexToStringUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeIndexToStringUPP (short item,
+ ScriptCode * itemsScript,
+ StringPtr * itemsStringPtr,
+ void * yourDataPtr,
+ IndexToStringUPP userUPP);
+
+#else
+ enum { uppIndexToStringProcInfo = 0x00003F90 }; /* pascal 1_byte Func(2_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewIndexToStringUPP(userRoutine) (IndexToStringUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppIndexToStringProcInfo, GetCurrentArchitecture())
+ #define DisposeIndexToStringUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeIndexToStringUPP(item, itemsScript, itemsStringPtr, yourDataPtr, userUPP) (Boolean)CALL_FOUR_PARAMETER_UPP((userUPP), uppIndexToStringProcInfo, (item), (itemsScript), (itemsStringPtr), (yourDataPtr))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewIndexToStringProc(userRoutine) NewIndexToStringUPP(userRoutine)
+#define CallIndexToStringProc(userRoutine, item, itemsScript, itemsStringPtr, yourDataPtr) InvokeIndexToStringUPP(item, itemsScript, itemsStringPtr, yourDataPtr, userRoutine)
+/*
+ * These routines are available in Carbon with the new names.
+ */
+#if TARGET_OS_MAC
+ #define MacReplaceText ReplaceText
+#endif
+EXTERN_API( short )
+MacReplaceText (Handle baseText,
+ Handle substitutionText,
+ Str15 key) FOURWORDINLINE(0x2F3C, 0x820C, 0xFFDC, 0xA8B5);
+
+EXTERN_API( short )
+ScriptOrder (ScriptCode script1,
+ ScriptCode script2) THREEWORDINLINE(0x3F3C, 0x001E, 0xA9ED);
+
+#if TARGET_OS_MAC
+ #define MacCompareString CompareString
+#endif
+EXTERN_API( short )
+MacCompareString (ConstStr255Param aStr,
+ ConstStr255Param bStr,
+ Handle itl2Handle);
+
+EXTERN_API( short )
+IdenticalString (ConstStr255Param aStr,
+ ConstStr255Param bStr,
+ Handle itl2Handle);
+
+EXTERN_API( short )
+StringOrder (ConstStr255Param aStr,
+ ConstStr255Param bStr,
+ ScriptCode aScript,
+ ScriptCode bScript,
+ LangCode aLang,
+ LangCode bLang);
+
+EXTERN_API( short )
+CompareText (const void * aPtr,
+ const void * bPtr,
+ short aLen,
+ short bLen,
+ Handle itl2Handle) THREEWORDINLINE(0x3F3C, 0x001A, 0xA9ED);
+
+EXTERN_API( short )
+IdenticalText (const void * aPtr,
+ const void * bPtr,
+ short aLen,
+ short bLen,
+ Handle itl2Handle) THREEWORDINLINE(0x3F3C, 0x001C, 0xA9ED);
+
+EXTERN_API( short )
+TextOrder (const void * aPtr,
+ const void * bPtr,
+ short aLen,
+ short bLen,
+ ScriptCode aScript,
+ ScriptCode bScript,
+ LangCode aLang,
+ LangCode bLang) THREEWORDINLINE(0x3F3C, 0x0022, 0xA9ED);
+
+EXTERN_API( short )
+LanguageOrder (LangCode language1,
+ LangCode language2) THREEWORDINLINE(0x3F3C, 0x0020, 0xA9ED);
+
+
+/*
+ * These routines are available in InterfaceLib with old names.
+ * Macros are provided for C to allow source code use to the new names.
+ */
+#if CALL_NOT_IN_CARBON
+EXTERN_API( short )
+IUMagPString (const void * aPtr,
+ const void * bPtr,
+ short aLen,
+ short bLen,
+ Handle itl2Handle) THREEWORDINLINE(0x3F3C, 0x001A, 0xA9ED);
+
+EXTERN_API( short )
+IUMagIDPString (const void * aPtr,
+ const void * bPtr,
+ short aLen,
+ short bLen,
+ Handle itl2Handle) THREEWORDINLINE(0x3F3C, 0x001C, 0xA9ED);
+
+EXTERN_API( short )
+IUTextOrder (const void * aPtr,
+ const void * bPtr,
+ short aLen,
+ short bLen,
+ ScriptCode aScript,
+ ScriptCode bScript,
+ LangCode aLang,
+ LangCode bLang) THREEWORDINLINE(0x3F3C, 0x0022, 0xA9ED);
+
+EXTERN_API( short )
+IULangOrder (LangCode language1,
+ LangCode language2) THREEWORDINLINE(0x3F3C, 0x0020, 0xA9ED);
+
+EXTERN_API( short )
+IUScriptOrder (ScriptCode script1,
+ ScriptCode script2) THREEWORDINLINE(0x3F3C, 0x001E, 0xA9ED);
+
+EXTERN_API( short )
+IUMagString (const void * aPtr,
+ const void * bPtr,
+ short aLen,
+ short bLen) THREEWORDINLINE(0x3F3C, 0x000A, 0xA9ED);
+
+EXTERN_API( short )
+IUMagIDString (const void * aPtr,
+ const void * bPtr,
+ short aLen,
+ short bLen) THREEWORDINLINE(0x3F3C, 0x000C, 0xA9ED);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( short )
+IUCompPString (ConstStr255Param aStr,
+ ConstStr255Param bStr,
+ Handle itl2Handle);
+
+EXTERN_API( short )
+IUEqualPString (ConstStr255Param aStr,
+ ConstStr255Param bStr,
+ Handle itl2Handle);
+
+EXTERN_API( short )
+IUStringOrder (ConstStr255Param aStr,
+ ConstStr255Param bStr,
+ ScriptCode aScript,
+ ScriptCode bScript,
+ LangCode aLang,
+ LangCode bLang);
+
+EXTERN_API( short )
+IUCompString (ConstStr255Param aStr,
+ ConstStr255Param bStr);
+
+EXTERN_API( short )
+IUEqualString (ConstStr255Param aStr,
+ ConstStr255Param bStr);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+#if TARGET_OS_MAC
+ #define CompareString(aStr, bStr, itl2Handle) \
+ IUCompPString(aStr, bStr, itl2Handle)
+#endif
+#ifdef MacCompareString
+#undef MacCompareString
+#endif
+#define MacCompareString(aStr, bStr, itl2Handle) \
+ IUCompPString(aStr, bStr, itl2Handle)
+#define CompareText(aPtr, bPtr, aLen, bLen, itl2Handle) \
+ IUMagPString(aPtr, bPtr, aLen, bLen, itl2Handle)
+#define IdenticalString(aStr, bStr, itl2Handle) \
+ IUEqualPString(aStr, bStr, itl2Handle)
+#define IdenticalText(aPtr, bPtr, aLen, bLen, itl2Handle) \
+ IUMagIDPString(aPtr, bPtr, aLen, bLen, itl2Handle)
+#define StringOrder(aStr, bStr, aScript, bScript, aLang, bLang) \
+ IUStringOrder(aStr, bStr, aScript, bScript, aLang, bLang)
+#define TextOrder(aPtr, bPtr, aLen, bLen, aScript, bScript, aLang, bLang) \
+ IUTextOrder(aPtr, bPtr, aLen, bLen, aScript, bScript, aLang, bLang)
+#define LanguageOrder(language1, language2) \
+ IULangOrder(language1, language2)
+#endif /* CALL_NOT_IN_CARBON */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( short )
+iucomppstring (const char * aStr,
+ const char * bStr,
+ Handle intlHandle);
+
+EXTERN_API_C( short )
+iuequalpstring (const char * aStr,
+ const char * bStr,
+ Handle intlHandle);
+
+EXTERN_API_C( short )
+iustringorder (const char * aStr,
+ const char * bStr,
+ ScriptCode aScript,
+ ScriptCode bScript,
+ LangCode aLang,
+ LangCode bLang);
+
+EXTERN_API_C( short )
+iucompstring (const char * aStr,
+ const char * bStr);
+
+EXTERN_API_C( short )
+iuequalstring (const char * aStr,
+ const char * bStr);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+EXTERN_API( short )
+RelString (ConstStr255Param str1,
+ ConstStr255Param str2,
+ Boolean caseSensitive,
+ Boolean diacSensitive);
+
+EXTERN_API( Boolean )
+EqualString (ConstStr255Param str1,
+ ConstStr255Param str2,
+ Boolean caseSensitive,
+ Boolean diacSensitive);
+
+EXTERN_API_C( short )
+relstring (const char * str1,
+ const char * str2,
+ Boolean caseSensitive,
+ Boolean diacSensitive);
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( Boolean )
+equalstring (const char * str1,
+ const char * str2,
+ Boolean caseSensitive,
+ Boolean diacSensitive);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __STRINGCOMPARE__ */
+
diff --git a/include/qt/Strings.h b/include/qt/Strings.h
new file mode 100644
index 000000000..cd067df7e
--- /dev/null
+++ b/include/qt/Strings.h
@@ -0,0 +1,31 @@
+/*
+ File: Strings.h
+
+ Contains: Pascal <-> C String Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+/*
+ Note: All Pascal <-> C String routines have moved to TextUtils.h
+
+*/
+#ifndef __STRINGS__
+#define __STRINGS__
+
+#ifndef __TEXTUTILS__
+#include "TextUtils.h"
+#endif
+
+
+
+#endif /* __STRINGS__ */
+
diff --git a/include/qt/TSMTE.h b/include/qt/TSMTE.h
new file mode 100644
index 000000000..c6739ce3d
--- /dev/null
+++ b/include/qt/TSMTE.h
@@ -0,0 +1,193 @@
+/*
+ File: TSMTE.h
+
+ Contains: Text Services Managerfor TextEdit Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1991-2001 Apple Technology, Inc. All rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __TSMTE__
+#define __TSMTE__
+
+#ifndef __TEXTEDIT__
+#include "TextEdit.h"
+#endif
+
+#ifndef __DIALOGS__
+#include "Dialogs.h"
+#endif
+
+#ifndef __APPLEEVENTS__
+#include "AppleEvents.h"
+#endif
+
+#ifndef __TEXTSERVICES__
+#include "TextServices.h"
+#endif
+
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* signature, interface types*/
+enum {
+ kTSMTESignature = FOUR_CHAR_CODE('tmTE'),
+ kTSMTEInterfaceType = FOUR_CHAR_CODE('tmTE'),
+ kTSMTEDialog = FOUR_CHAR_CODE('tmDI')
+};
+
+
+/* update flag for TSMTERec*/
+enum {
+ kTSMTEAutoScroll = 1
+};
+
+
+/* callback procedure definitions*/
+
+typedef CALLBACK_API( void , TSMTEPreUpdateProcPtr )(TEHandle textH, long refCon);
+typedef CALLBACK_API( void , TSMTEPostUpdateProcPtr )(TEHandle textH, long fixLen, long inputAreaStart, long inputAreaEnd, long pinStart, long pinEnd, long refCon);
+typedef STACK_UPP_TYPE(TSMTEPreUpdateProcPtr) TSMTEPreUpdateUPP;
+typedef STACK_UPP_TYPE(TSMTEPostUpdateProcPtr) TSMTEPostUpdateUPP;
+
+
+/* data types*/
+
+struct TSMTERec {
+ TEHandle textH;
+ TSMTEPreUpdateUPP preUpdateProc;
+ TSMTEPostUpdateUPP postUpdateProc;
+ long updateFlag;
+ long refCon;
+};
+typedef struct TSMTERec TSMTERec;
+typedef TSMTERec * TSMTERecPtr;
+typedef TSMTERecPtr * TSMTERecHandle;
+#if !OPAQUE_TOOLBOX_STRUCTS
+
+struct TSMDialogRecord {
+ DialogRecord fDialog;
+ TSMDocumentID fDocID;
+ TSMTERecHandle fTSMTERecH;
+ long fTSMTERsvd[3]; /* reserved*/
+};
+typedef struct TSMDialogRecord TSMDialogRecord;
+
+typedef TSMDialogRecord * TSMDialogPtr;
+typedef TSMDialogPtr TSMDialogPeek;
+#endif /* !OPAQUE_TOOLBOX_STRUCTS */
+
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(TSMTEPreUpdateUPP)
+ NewTSMTEPreUpdateUPP (TSMTEPreUpdateProcPtr userRoutine);
+
+ EXTERN_API(TSMTEPostUpdateUPP)
+ NewTSMTEPostUpdateUPP (TSMTEPostUpdateProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeTSMTEPreUpdateUPP (TSMTEPreUpdateUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeTSMTEPostUpdateUPP (TSMTEPostUpdateUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeTSMTEPreUpdateUPP (TEHandle textH,
+ long refCon,
+ TSMTEPreUpdateUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeTSMTEPostUpdateUPP (TEHandle textH,
+ long fixLen,
+ long inputAreaStart,
+ long inputAreaEnd,
+ long pinStart,
+ long pinEnd,
+ long refCon,
+ TSMTEPostUpdateUPP userUPP);
+
+#else
+ enum { uppTSMTEPreUpdateProcInfo = 0x000003C0 }; /* pascal no_return_value Func(4_bytes, 4_bytes) */
+ enum { uppTSMTEPostUpdateProcInfo = 0x000FFFC0 }; /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewTSMTEPreUpdateUPP(userRoutine) (TSMTEPreUpdateUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTSMTEPreUpdateProcInfo, GetCurrentArchitecture())
+ #define NewTSMTEPostUpdateUPP(userRoutine) (TSMTEPostUpdateUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTSMTEPostUpdateProcInfo, GetCurrentArchitecture())
+ #define DisposeTSMTEPreUpdateUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeTSMTEPostUpdateUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeTSMTEPreUpdateUPP(textH, refCon, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppTSMTEPreUpdateProcInfo, (textH), (refCon))
+ #define InvokeTSMTEPostUpdateUPP(textH, fixLen, inputAreaStart, inputAreaEnd, pinStart, pinEnd, refCon, userUPP) CALL_SEVEN_PARAMETER_UPP((userUPP), uppTSMTEPostUpdateProcInfo, (textH), (fixLen), (inputAreaStart), (inputAreaEnd), (pinStart), (pinEnd), (refCon))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewTSMTEPreUpdateProc(userRoutine) NewTSMTEPreUpdateUPP(userRoutine)
+#define NewTSMTEPostUpdateProc(userRoutine) NewTSMTEPostUpdateUPP(userRoutine)
+#define CallTSMTEPreUpdateProc(userRoutine, textH, refCon) InvokeTSMTEPreUpdateUPP(textH, refCon, userRoutine)
+#define CallTSMTEPostUpdateProc(userRoutine, textH, fixLen, inputAreaStart, inputAreaEnd, pinStart, pinEnd, refCon) InvokeTSMTEPostUpdateUPP(textH, fixLen, inputAreaStart, inputAreaEnd, pinStart, pinEnd, refCon, userRoutine)
+#if ACCESSOR_CALLS_ARE_FUNCTIONS
+EXTERN_API( Boolean )
+IsTSMTEDialog (DialogPtr dialog);
+
+/* Getters */
+EXTERN_API( TSMDocumentID )
+GetTSMTEDialogDocumentID (DialogPtr dialog);
+
+EXTERN_API( TSMTERecHandle )
+GetTSMTEDialogTSMTERecHandle (DialogPtr dialog);
+
+/* Setters */
+EXTERN_API( void )
+SetTSMTEDialogDocumentID (DialogPtr dialog,
+ TSMDocumentID documentID);
+
+EXTERN_API( void )
+SetTSMTEDialogTSMTERecHandle (DialogPtr dialog,
+ TSMTERecHandle tsmteRecHandle);
+
+#endif /* ACCESSOR_CALLS_ARE_FUNCTIONS */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __TSMTE__ */
+
diff --git a/include/qt/Telephones.h b/include/qt/Telephones.h
new file mode 100644
index 000000000..cc961c25b
--- /dev/null
+++ b/include/qt/Telephones.h
@@ -0,0 +1,1360 @@
+/*
+ File: Telephones.h
+
+ Contains: Telephone Manager Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __TELEPHONES__
+#define __TELEPHONES__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __DIALOGS__
+#include "Dialogs.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+#ifndef __EVENTS__
+#include "Events.h"
+#endif
+
+#ifndef __CTBUTILITIES__
+#include "CTBUtilities.h"
+#endif
+
+#ifndef __COMPONENTS__
+#include "Components.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if CALL_NOT_IN_CARBON
+enum {
+ curTELVersion = 3, /* current Telephone Manager version */
+ /* the chooseXXX symbols are defined in CTBUtilities.(pah) */
+ telChooseDisaster = chooseDisaster,
+ telChooseFailed = chooseFailed,
+ telChooseAborted = chooseAborted,
+ telChooseOKMinor = chooseOKMinor,
+ telChooseOKMajor = chooseOKMajor,
+ telChooseCancel = chooseCancel,
+ telChooseOKTermChanged = 4
+};
+
+#ifndef classTEL
+enum {
+ /* telephone tool file type */
+ classTEL = FOUR_CHAR_CODE('vbnd')
+};
+
+#endif /* !defined(classTEL) */
+
+enum {
+ /* PHYSICAL TERMINAL CONSTANTS */
+ /* INDEPENDENT HANDSET CONSTANTS */
+ telIndHSOnHook = 0, /* independent handset on hook */
+ telIndHSOffHook = 1, /* independent handset off hook */
+ telIndHSDisconnected = 0, /* handset disconnected from the line */
+ telIndHSConnected = 1, /* handset connected to the line */
+ /* HOOK STATE CONSTANTS */
+ telHandset = 1, /* handset hookswitch */
+ telSpeakerphone = 2, /* speakerphone 'on' switch */
+ telDeviceOffHook = 1, /* device off hook */
+ telDeviceOnHook = 0, /* device on hook */
+ /* VOLUME CONTROL CONSTANTS */
+ telHandsetSpeakerVol = 1, /* volume of the handset speaker */
+ telHandsetMicVol = 2, /* sensitivity of the handset mic */
+ telSpeakerphoneVol = 3, /* speakerphone volume */
+ telSpeakerphoneMicVol = 4, /* sensitivity of the spkrphone mic */
+ telRingerVol = 5, /* volume of the ringer */
+ telBuiltinSPVol = 6, /* volume of the built-in speakerphone */
+ telBuiltinSPMicVol = 7, /* sensitivity of the built-in speakerphone mic */
+ telVolSame = 0, /* leaves the volume at previous level */
+ telVolMin = 1, /* turns volume down to minimum level, but not off */
+ telVolMax = 100, /* highest level allowed by the Telephone Manager */
+ telVolStateSame = 0, /* leaves device in same state */
+ telVolStateOff = 1, /* turns the device off , */
+ /* but doesn't change the volume setting. */
+ /* Use for mute functions. */
+ telVolStateOn = 2, /* turns the device on. Volume setting is */
+ /* the same as previously set.*/
+ /* DISPLAY CONSTANTS */
+ telNormalDisplayMode = 1, /* normal display mode */
+ telInspectMode = 2, /* inspect display mode */
+ telMiscMode = 3, /* miscellaneous display mode */
+ telRetrieveMode = 4, /* message retrieval mode */
+ telDirectoryQueryMode = 5, /* electronic directory mode */
+ telEntireDisplay = 0, /* entire Display */
+ /* KEY PRESS CONSTANTS */
+ telHangupKey = 1, /* drop, or release, key pressed */
+ telHoldKey = 2, /* hold key pressed */
+ telConferenceKey = 3, /* conference key pressed */
+ telTransferKey = 4, /* transfer key pressed */
+ telForwardKey = 5, /* call forward key pressed */
+ telCallbackKey = 6, /* call back key pressed */
+ telDNDKey = 7, /* do not disturb key pressed */
+ telCallPickupKey = 8, /* call Pickup key pressed */
+ telCallParkKey = 9, /* call Park key pressed */
+ telCallDeflectKey = 10, /* call Deflect key pressed */
+ telVoiceMailAccessKey = 11, /* voice Mail Access key pressed */
+ telCallRejectKey = 12, /* call Reject key pressed */
+ telOtherKey = 16, /* other key pressed */
+ telKeyPadPress = 1, /* key pressed on 12 digit keypad*/
+ telFeatureKeyPress = 2, /* feature Key Pressed */
+ telTerminalEnabled = 0,
+ telTerminalDisabled = 1,
+ telUnknown = 0, /* unknown error */
+ telTerminalHWDisconnected = 1, /* terminal hardware is disconnected */
+ telDeviceDriverClosed = 2, /* device driver is closed */
+ /* ALERT PATTERN */
+ telPattern0 = 0,
+ telPattern1 = 1,
+ telPattern2 = 2,
+ telPattern3 = 3,
+ telPattern4 = 4,
+ telPattern5 = 5,
+ telPattern6 = 6,
+ telPattern7 = 7,
+ telPatternOff = 8,
+ telPatternUndefined = 15, /* DN TYPES */
+ telAllDNs = 0, /* counts all types of DNs */
+ telInternalDNs = 1, /* connected to PBX or other non-public switch */
+ telInternalDNsOnly = 2, /* connected to PBX or other non-public switch */
+ /* and able to place internal calls only */
+ telExternalDNs = 3, /* connected to public network */
+ telDNTypeUnknown = 4, /* DN type unknown */
+ /* DN USAGE */
+ telDNNotUsed = 0, /* DN is not used - onhook */
+ telDNPOTSCall = 1, /* DN used for POTs call */
+ telDNFaxCall = 2, /* DN used for fax call */
+ telDNDataCall = 3, /* DN used for data call */
+ telDNAlerting = 4, /* Incoming call at DN */
+ telDNUnknownState = 5, /* DN is in unknown state */
+ /* CALL FORWARDING TYPES */
+ telForwardImmediate = 1, /* immediately forward calls */
+ telForwardBusy = 2, /* forward on Busy */
+ telForwardNoAnswer = 3, /* forward on No answer */
+ telForwardBusyNA = 4, /* forwarding for busy and no answer*/
+ telForwardTypeUnknown = 5, /* type of forwarding is unknown */
+ /* CALL FORWARDING MESSAGES */
+ telForwardCleared = 0, /* forwarding has been cleared */
+ telForwardEst = 1, /* forwarding has been established*/
+ telForwardFailed = 2, /* attempt to setup forwarding has failed*/
+ /* DO NOT DISTURB TYPES */
+ telDNDIntExt = 0, /* do not disturb for all internal and external calls*/
+ telDNDExternal = 1, /* do not disturb for external calls only */
+ telDNDInternal = 2, /* do not disturb for internal calls only */
+ telDNDNonIntercom = 3, /* do not disturb for all calls except intercom */
+ /* DO NOT DISTURB MESSAGES */
+ telDNDCleared = 0, /* do not disturb has been cleared */
+ telDNDEst = 1, /* do not disturb has been established */
+ telDNDFailed = 2, /* attempt to setup do not disturb has failed */
+ /* VOICE MAIL MESSAGES */
+ telAllVoiceMessagesRead = 0, /* all messages have been read, none are waiting */
+ /* to be read */
+ telNewVoiceMessage = 1, /* a new message has arrived or messages are waiting */
+ /* for this DN */
+ /* DNSELECT MESSAGE */
+ telDNDeselected = 0, /* DN has been deselected */
+ telDNSelected = 1, /* DN has been selected */
+ /* CALL ORIGINATORS */
+ telInternalCall = 0, /* return nth internal CA */
+ telExternalCall = 1, /* return nth external CA */
+ telUnknownCallOrigin = 2, /* unknown call type */
+ telAllCallOrigins = 2, /* return nth CA internal or external */
+ /* CALL TYPES */
+ telVoiceMailAccessOut = (-7),
+ telPageOut = (-6),
+ telIntercomOut = (-5),
+ telCallbackOut = (-4),
+ telPickup = (-3),
+ telParkRetrieve = (-2),
+ telNormalOut = (-1),
+ telUnknownCallType = 0,
+ telNormalIn = 1,
+ telForwardedImmediate = 2,
+ telForwardedBusy = 3,
+ telForwardedNoAnswer = 4,
+ telTransfer = 5,
+ telDeflected = 6,
+ telIntercepted = 7,
+ telDeflectRecall = 8,
+ telParkRecall = 9,
+ telTransferredRecall = 10,
+ telIntercomIn = 11,
+ telCallbackIn = 12, /* DIAL TYPES */
+ telDNDialable = 0, /* this DN could be dialed via TELSetupCall */
+ telDNNorthAmerican = 1, /* rmtDN is standard North America 10 digit number */
+ telDNInternational = 2, /* rmtDN is an international number */
+ telDNAlmostDialable = 3, /* rmtDN is almost dialable, */
+ /* missing prefix such as 9 or 1 */
+ telDNUnknown = 15, /* unknown whether DN is dialable */
+ /* CALL PROGRESS MESSAGES */
+ telCAPDialTone = 1, /* dial tone */
+ telCAPRinging = 2, /* destination CA is alerting */
+ telCAPDialing = 3, /* dialing the other end */
+ telCAPReorder = 4, /* reorder */
+ telCAPBusy = 5, /* busy */
+ telCAPRouted = 6, /* call routed; rmtDN will hold the routing directory */
+ /* number routeDN and routePartyName have been updated */
+ telCAPRoutedOff = 7, /* call routed off-network; no further progress will */
+ /* be available */
+ telCAPTimeout = 8, /* call timed out */
+ telCAPUpdate = 9, /* name and rmtDN information has been updated */
+ telCAPPrompt = 10, /* the network is prompting for more information */
+ telCAPWaiting = 11, /* call is proceeding, but there is no response yet */
+ /* from the destination */
+ telCAPCPC = 12, /* telephone tool detected CPC signal */
+ telCAPNoDialTone = 13, /* dial tone not detected */
+ telCAPUnknown = 15, /* call progress state unknown */
+ telCAPDialDisabled = 16, /* Blacklisting: Dial Disabled */
+ telCAPBlacklistedNumber = 17, /* Blacklisting: Blacklisted Number */
+ telCAPForbiddenNumber = 18, /* Blacklisting: Forbidden Number */
+ telCAPModemGuardTime = 19, /* Modem Guard Timein force, unable to dial */
+ telCAPLCDetected = 20, /* trying to dial a number while the handset is offhook */
+ telCAPLostLC = 21, /* trying manual dial or answer while handset not off hook */
+ /* or also lost line current during dialing. */
+ /* OUTGOING CALL MESSAGES */
+ telPhysical = 0, /* user lifted handset and initiated call */
+ telProgrammatic = 1, /* programmatic initiation of outgoing call */
+ /* DISCONNECT MESSAGES */
+ telLocalDisconnect = 0, /* local party, this user, responsible for disconnect */
+ telRemoteDisconnect = 1, /* remote party responsible for disconnect */
+ /* DISCONNECT TYPES */
+ telCADNormal = 1, /* normal disconnect */
+ telCADBusy = 2, /* remote user busy */
+ telCADNoResponse = 3, /* remote not responding */
+ telCADRejected = 4, /* call rejected */
+ telCADNumberChanged = 5, /* number changed */
+ telCADInvalidDest = 6, /* invalid destination address */
+ telCADFacilityRejected = 7, /* requested facility rejected */
+ telCADUnobtainableDest = 9, /* destination not obtainable */
+ telCADCongested = 10, /* network congestion */
+ telCADIncompatibleDest = 11, /* incompatible destination */
+ telCADTimeout = 12, /* call timed out */
+ telCADUnknown = 15, /* reason unknown */
+ /* CONFERENCE MESSAGES */
+ telConferencePrepFailed = 0, /* conference could not be prepared */
+ telConferencePending = 1, /* conference prepared successfully */
+ telConferenceEstFailed = 2, /* conference could not be established */
+ telConferenceEst = 3, /* conference established */
+ /* TRANSFER MESSAGES */
+ telTransferPrepFailed = 0, /* transfer could not be prepared */
+ telTransferPending = 1, /* transfer prepared successfully */
+ telTransferEst = 2, /* consult or blind xfer successful */
+ telTransferFailed = 3, /* consult or blind xfer failed */
+ telTransferred = 4, /* message to originator of CA specifying */
+ /* that call was transferred to rmtDN */
+ /* HOLD MESSAGES */
+ telHoldCleared = 0,
+ telHoldEst = 1,
+ telHoldFailed = 2, /* RECEIVE DIGIT MESSAGES */
+ telDigitAudible = 0,
+ telDigitNotAudible = 1, /* CALL PARK MESSAGES */
+ telCallParkEst = 1, /* call has been successfully parked */
+ telCallParkRetrieveEst = 2, /* parked Call has been successfully retrieved */
+ telCallParkFailed = 3, /* attempt to setup call park has failed */
+ telCallParkRetrieveFailed = 4, /* attempt to retrieve parked call failed */
+ telCallParkRecall = 5, /* call park has been recalled */
+ /* CALL BACK MESSAGES */
+ telCallbackCleared = 0, /* call back has been cleared */
+ telCallbackEst = 1, /* call back has been established */
+ telCallbackNowAvail = 2, /* call can be called back with TELCallBackNow */
+ /* if CA is zero, else call IS calling back on CA */
+ telCallbackFailed = 3, /* attempt to setup callback has failed */
+ telCallbackDesired = 4, /* a user has called this terminal, received no */
+ /* answer and desires this terminal to call it */
+ /* back */
+ telCallbackDesiredCleared = 5, /* call back for no answer no longer desired */
+ telCalledback = 6, /* callback has occurred successfully */
+ /* CALL REJECT MESSAGES */
+ telCallRejectFailed = 0, /* attempt to reject call has failed */
+ telCallRejectEst = 1, /* call successfully rejected */
+ telCallRejected = 2, /* message to originator that call was rejected */
+ /* CALL DEFLECT MESSAGES */
+ telCallDeflectFailed = 0, /* attempt to deflect call has failed */
+ telCallDeflectEst = 1, /* call successfully deflected */
+ telCallDeflectRecall = 2, /* deflected call has been recalled */
+ telCallDeflected = 3, /* message to originator that call was deflected */
+ /* to rmtDN */
+ telAutoDeflectImmediate = 4, /* a call was automatically deflected from this */
+ /* terminal as a result of immediate call */
+ /* forwarding */
+ telAutoDeflectBusy = 5, /* a call was automatically deflected from this */
+ /* terminal as a result of call forwarding on busy */
+ telAutoDeflectNoAnswer = 6, /* a call was automatically deflected from this */
+ /* terminal as a result of call forwarding on */
+ /* no answer */
+ /* CONFERENCE SPLIT MESSAGES */
+ telConferenceSplitFailed = 0, /* CA could not be split */
+ telConferenceSplitEst = 1, /* CA split successfully */
+ /* CONFERENCE DROP MESSAGES */
+ telConferenceDropFailed = 0, /* CA could not be dropped */
+ telConferenceDropped = 1, /* CA dropped successfully */
+ /* CALL PICKUP MESSAGES */
+ telCallPickupEst = 0, /* call pickup was successful */
+ telCallPickupFailed = 1, /* call pickup failed */
+ telCallPickedUp = 2, /* message to originator that call was picked */
+ /* up at a different DN */
+ /* PAGING MESSAGES */
+ telPageEst = 0, /* paging was successful */
+ telPageComplete = 1, /* paging activity completed */
+ telPageFailed = 2, /* paging failed */
+ /* INTERCOM MESSAGES */
+ telIntercomEst = 0, /* intercom was successful */
+ telIntercomComplete = 1, /* intercom activity completed */
+ telIntercomFailed = 2, /* intercom failed */
+ /* MODEM TONE MESSAGES */
+ telModemToneDetected = 0, /* modem tone was detected */
+ telModemToneCleared = 1, /* modem tone went away */
+ /* FAX TONE MESSAGES */
+ telFaxToneDetected = 0, /* fax tone was detected */
+ telFaxToneCleared = 1, /* fax tone went away */
+ /* IN USE MESSAGES */
+ telInUsePrivate = 0, /* MADN is in use and can't be accessed */
+ telInUseCanAccess = 1, /* MADN is in use, and others can access it */
+ /* and join in */
+ telInUseCanMakePrivate = 2, /* MADN is in use, but available for any one */
+ /* person to access */
+ telInUseCleared = 3, /* MADN is no longer in use */
+ /* CALL APPEARANCE STATES */
+ telCAIdleState = 0, /* a call doesn't exist at this time */
+ telCAInUseState = 1, /* the call is active but at another terminal */
+ telCAOfferState = 2, /* a call is being offered to the terminal */
+ telCAQueuedState = 3, /* a call is being queued at this terminal */
+ telCAAlertingState = 4, /* a call is alerting at the terminal */
+ telCADialToneState = 5, /* initiated outgoing call has dialtone */
+ telCADialingState = 6, /* initiated outgoing call is dialing */
+ telCAWaitingState = 7, /* initiated outgoing call is waiting for */
+ /* response from destination */
+ telCARingingState = 8, /* the outgoing call is ringing. */
+ telCABusyState = 9, /* destination is busy or can't be reached */
+ telCAHeldState = 10, /* call has been put on hold by this terminal */
+ telCAConferencedState = 11, /* this CA is part of a conference now */
+ telCAActiveState = 12, /* the call is active and parties are free */
+ /* to exchange data */
+ telCAReorderState = 13, /* CA is in a reorder state */
+ telCAConferencedHeldState = 14, /* CA is a conference call in a held state */
+ telCAUnknownState = 15, /* the call state is unknown */
+ /* TERMINAL MESSAGE EVENTMASKS */
+ telTermHookMsg = 0x00000001, /* the hookswitch state has changed */
+ telTermKeyMsg = 0x00000002, /* a phone pad key has been depressed */
+ telTermVolMsg = 0x00000004, /* volume setting has changed */
+ telTermDisplayMsg = 0x00000008, /* display has changed */
+ telTermEnableMsg = 0x00000010, /* terminal has become enabled */
+ telTermOpenMsg = 0x00000020, /* terminal has been opened */
+ telTermCloseMsg = 0x00000040, /* terminal is shutting down */
+ telTermResetMsg = 0x00000080, /* terminal has been reset */
+ telTermErrorMsg = 0x00000100, /* hard equipment error */
+ telTermIndHSStateChgMsg = 0x00000200, /* change in handset state from inacive to */
+ /* active or vice versa */
+ telTermIndHSConnectMsg = 0x00000400, /* independent handset connection has been changed */
+ telTermKeyImmMsg = 0x00000800, /* immidiate arrival of phone pad key */
+ telTermVolStateMsg = 0x00001000, /* volume state has changed */
+ telTermOtherMsg = (long)0x80000000, /* vendor defined error */
+ telAllTermMsgs = 0x00001FFF, /* mask to all non tool specific terminal events */
+ /* DN MESSAGE EVENTMASK CONSTANTS */
+ telDNForwardMsg = 0x00000001, /* forward feature activity */
+ telDNDNDMsg = 0x00000002, /* do not disturb feature activity */
+ telDNVoiceMailMsg = 0x00000004, /* message has arrived for this DN */
+ telDNSelectedMsg = 0x00000008, /* DN has been selected or deselected */
+ telDNOtherMsg = (long)0x80000000, /* a custom message for use by tools */
+ telAllDNMsgs = 0x0000000F, /* mask to all non tool specific dn events */
+ /* CA MESSAGE EVENTMASK CONSTANTS */
+ telCAAlertingMsg = 0x00000001, /* CA is alerting */
+ telCAOfferMsg = 0x00000002, /* CA is being offered a call */
+ telCAProgressMsg = 0x00000004, /* call progress info for this CA */
+ telCAOutgoingMsg = 0x00000008, /* CA is initiating an outgoing call */
+ telCADisconnectMsg = 0x00000010, /* CA disconnected (dropped or rmt disc */
+ telCAActiveMsg = 0x00000020, /* CA is active and voice/data is free */
+ /* to flow end to end */
+ telCAConferenceMsg = 0x00000040, /* conference activity on CA */
+ telCATransferMsg = 0x00000080, /* transfer feature activity */
+ telCAHoldMsg = 0x00000100, /* hold feature activity */
+ telCADigitsMsg = 0x00000200, /* remote signaling digits arrived */
+ telCACallParkMsg = 0x00000400, /* CA call park feature activity */
+ telCACallbackMsg = 0x00000800, /* CA call back feature activity */
+ telCARejectMsg = 0x00001000, /* CA is rejected */
+ telCADeflectMsg = 0x00002000, /* CA is deflected */
+ telCAForwardMsg = 0x00004000, /* CA is forwarded to this DN */
+ telCAConferenceSplitMsg = 0x00008000, /* conference split activity */
+ telCAConferenceDropMsg = 0x00010000, /* conference drop activity */
+ telCAQueuedMsg = 0x00020000, /* CA has been queued */
+ telCAInUseMsg = 0x00040000, /* CA is in use */
+ telCACallPickupMsg = 0x00080000, /* CA pickup activity */
+ telCAPagingMsg = 0x00100000, /* CA paging activity */
+ telCAIntercomMsg = 0x00200000, /* CA intercom activity */
+ telCAModemToneMsg = 0x00400000, /* modem tones detected */
+ telCAFaxToneMsg = 0x00800000, /* fax tones detected */
+ telCAIdleMsg = 0x01000000, /* CA is in idle state */
+ telCASuccessiveAlertMsg = 0x02000000, /* phone is alerting, one per ring */
+ telCAUserUserInfoMsg = 0x04000000, /* user to user information has arrrived */
+ /* for this CA */
+ telCAHandOffMsg = 0x08000000, /* CA is ready for hand-off */
+ telCAVoiceDetectedMsg = 0x10000000, /* voice Detect related event */
+ telCASilenceDetectedMsg = 0x20000000, /* silence Detect related event */
+ telCADigitsImmMsg = 0x40000000, /* immidiate arrival of remote signaling digits */
+ telCAOtherMsg = (long)0x80000000, /* tool specific CA message */
+ telAllCAMsgs = 0x7FFFFFFF /* mask to all non tool specific CA events */
+};
+
+typedef OSErr TELErr;
+typedef unsigned long TELFlags;
+enum {
+ telNoMenus = 1L << 16, /* tells tool not to display any custom menus */
+ telQuiet = 1L << 17, /* tells tool not to display any dialog boxes or alerts */
+ telConfigChanged = 1L << 18 /* notifies application that the config has changed */
+};
+
+typedef unsigned long TELFeatureFlags;
+enum {
+ pcmAvail = 1L << 0, /* true if PCM voice data accessible */
+ hasHandset = 1L << 1, /* true if a phone handset is attached */
+ hasSpeakerphone = 1L << 2, /* true if a 2 way speakerphone is attached */
+ canOnHookDial = 1L << 3, /* can on-hook dial */
+ hasRinger = 1L << 4, /* terminal has its own ringer */
+ canSetDisplay = 1L << 5, /* application can write to the display */
+ hasKeypad = 1L << 6, /* attached phone has standard 12 key pad */
+ hasVideo = 1L << 7, /* terminal has a videophone */
+ hasOther = 1L << 8, /* reserved for future use */
+ crossDNConference = 1L << 9, /* can perform cross-DN conferences */
+ hasSubaddress = 1L << 10, /* attached network supports subaddressing */
+ hasUserUserInfo = 1L << 11, /* network supports user-to-user info */
+ hasHandsetSoundStreams = 1L << 12, /* sound streams are supported on the handset */
+ hasIndHandset = 1L << 13, /* handset can be accessed independently of the phone line */
+ hasBuiltinSpeakerphone = 1L << 14 /* speaker and microphone of the Mac can be used */
+};
+
+
+
+struct TELTermRecord {
+
+ short tRef;
+ TELFeatureFlags featureFlags;
+ short handsetSpeakerVol;
+ short handsetMicVol;
+ short speakerphoneVol;
+ short speakerphoneMicVol;
+ short ringerVol;
+ short otherVol;
+ short ringerTypes;
+ short hasDisplay;
+ short displayRows;
+ short numDNs;
+ short maxAllocCA;
+ short curAllocCA;
+ short builtinSpeakerVol;
+ short builtinSpeakerMicVol;
+ long reserved;
+};
+typedef struct TELTermRecord TELTermRecord;
+
+typedef TELTermRecord * TELTermPtr;
+
+struct TELRecord {
+ short procID;
+
+ TELFlags flags;
+ short reserved;
+
+ long refCon;
+ long userData;
+
+ UniversalProcPtr defproc;
+
+ Ptr config;
+ Ptr oldConfig;
+
+ TELTermPtr pTELTerm;
+
+ long telPrivate;
+ long reserved1;
+ long reserved2;
+
+ long pTELTermSize;
+ short version;
+
+};
+typedef struct TELRecord TELRecord;
+
+typedef TELRecord * TELPtr;
+typedef TELPtr * TELHandle;
+typedef unsigned long TELDNFeatureFlags;
+enum {
+ dndSub = 1L << 0, /* do not disturb subscribed */
+ dndAvail = 1L << 1, /* do not disturb available */
+ dndActive = 1L << 2, /* do not disturb active */
+ voiceMailAccessSub = 1L << 3, /* message waiting subscribed */
+ voiceMailAccessAvail = 1L << 4, /* message waiting available */
+ voiceMailAccessActive = 1L << 5, /* message waiting active */
+ pagingSub = 1L << 6, /* paging is subscribed */
+ pagingAvail = 1L << 7, /* paging is available */
+ pagingActive = 1L << 8, /* paging is active */
+ intercomSub = 1L << 9, /* intercom is subscribed */
+ intercomAvail = 1L << 10, /* intercom is available */
+ intercomActive = 1L << 11, /* intercom is active */
+ dnSelectSub = 1L << 12, /* DN select is subscribed */
+ dnSelectAvail = 1L << 13, /* DN select is available */
+ dnSelectActive = 1L << 14, /* DN is selected */
+ callPickupSub = 1L << 15, /* call pickup is subscribed */
+ callPickupAvail = 1L << 16, /* call pickup is available */
+ dnInUse = 1L << 17, /* a CA is allocated for this DN */
+ logicalDN = 1L << 18, /* this DN is not on this terminal */
+ dnAccessible = 1L << 19, /* commands can be sent to this DN */
+ canInitiate = 1L << 20, /* an outgoing CA can be initiated */
+ voiceMessageWaiting = 1L << 21, /* voice mail waiting for this dn */
+ hasDNSoundStreams = 1L << 22, /* sound streams are supported on this DN */
+ autoAnswerAvail = 1L << 23, /* AutoAnswer is set for this DN */
+ autoAnswerActive = 1L << 24, /* AutoAnswer is currently applied to CA on this DN */
+ tollSaverAvail = 1L << 25, /* tollSaver is set for this DN */
+ tollSaverActive = 1L << 26 /* tollSaver is currently applied to CA on this DN */
+};
+
+typedef unsigned long TELDNForwardFlags;
+enum {
+ immediateForwardSub = 1L << 0, /* immediate call forward subscribed */
+ immediateForwardAvail = 1L << 1, /* immediate call forward available */
+ immediateForwardActive = 1L << 2, /* immediate call forward active */
+ busyForwardSub = 1L << 3, /* forward on busy subscribed */
+ busyForwardAvail = 1L << 4, /* forward on busy available */
+ busyForwardActive = 1L << 5, /* forward on busy active */
+ noAnswerForwardSub = 1L << 6, /* no answer call forward subscribed */
+ noAnswerForwardAvail = 1L << 7, /* no answer call forward available */
+ noAnswerForwardActive = 1L << 8, /* no answer call forward active */
+ busyNAForwardSub = 1L << 9, /* busy & no answer call forward subscribed */
+ busyNAForwardAvail = 1L << 10, /* busy & no answer call forward available */
+ busyNAForwardActive = 1L << 11 /* busy & no answer call forward active */
+};
+
+
+
+struct TELDNRecord {
+
+ short dnRef;
+ StringPtr dn;
+ StringPtr dnPartyName;
+ StringPtr dnSubaddress;
+ TELHandle hTEL;
+ short maxAllocCA;
+ short curAllocCA;
+ short dnType;
+ TELDNFeatureFlags featureFlags;
+ short numPageIDs;
+ short numIntercomIDs;
+ short numPickupIDs;
+ TELDNForwardFlags forwardFlags;
+ StringPtr iForwardDN;
+ StringPtr iForwardSubaddress;
+ StringPtr iForwardPartyName;
+ StringPtr bForwardDN;
+ StringPtr bForwardSubaddress;
+ StringPtr bForwardPartyName;
+ StringPtr naForwardDN;
+ StringPtr naForwardSubaddress;
+ StringPtr naForwardPartyName;
+ short naForwardRings;
+ long telDNPrivate;
+ long refCon;
+ long userData;
+ long reserved;
+};
+typedef struct TELDNRecord TELDNRecord;
+
+typedef TELDNRecord * TELDNPtr;
+typedef TELDNPtr * TELDNHandle;
+typedef unsigned long TELCAFeatureFlags;
+enum {
+ holdSub = 1L << 0, /* hold subscribed */
+ holdAvail = 1L << 1, /* hold available */
+ holdActive = 1L << 2, /* hold active */
+ conferenceSub = 1L << 3, /* conference subscribed */
+ conferenceAvail = 1L << 4, /* conference available */
+ conferenceActive = 1L << 5, /* conference active */
+ conferenceDropSub = 1L << 6, /* conference drop subscribed */
+ conferenceDropAvail = 1L << 7, /* a call to TELDrop will drop this */
+ /* CA only from a conference */
+ conferenceSplitSub = 1L << 8, /* conference split subscribed */
+ conferenceSplitAvail = 1L << 9, /* conference split available for this CA */
+ numToConferenceRequired = 1L << 10, /* the number of CAs to be conferenced is */
+ /* required in TELConfPrep */
+ transferSub = 1L << 11, /* transfer subscribed */
+ transferAvail = 1L << 12, /* transfer available */
+ transferActive = 1L << 13, /* transfer active */
+ caRelated = 1L << 14 /* this CA is the specified in some other CA's relatedCA field*/
+};
+
+typedef unsigned long TELCAOtherFeatures;
+enum {
+ callbackSub = 1L << 0, /* call back subscribed */
+ callbackAvail = 1L << 1, /* call back available */
+ callbackActive = 1L << 2, /* call back active */
+ callbackClearSub = 1L << 3, /* call back clearing subscribed */
+ callbackNowSub = 1L << 4, /* call back now subscribed */
+ callbackNowAvail = 1L << 5, /* call back now available */
+ callbackBusy = 1L << 6, /* call back on busy */
+ callbackNoAnswer = 1L << 7, /* call back on no answer */
+ callbackReturnsRef = 1L << 8, /* call back returns a reference */
+ parkSub = 1L << 9, /* call park subscribed */
+ parkAvail = 1L << 10, /* call park available */
+ parkActive = 1L << 11, /* call park active */
+ parkRetrieveSub = 1L << 12, /* call park retrieve subscribed */
+ parkRetrieveWithID = 1L << 13, /* retrieve parked calls with IDs */
+ parkWithReturnedID = 1L << 14, /* park call to a specific remote ID */
+ parkWithGivenID = 1L << 18, /* for switch that requires ID for parking */
+ rejectable = 1L << 15, /* CA is rejectable */
+ deflectable = 1L << 16, /* CA is deflectable */
+ acceptable = 1L << 17, /* CA is acceptable */
+ voiceDetected = 1L << 19, /* voice has been detected on this CA incase of */
+ /* an incoming call */
+ callAnswdTSRings = 1L << 20 /* incoimng call was answered on TollSaver rings */
+};
+
+typedef struct TELCARecord TELCARecord;
+typedef TELCARecord * TELCAPtr;
+typedef TELCAPtr * TELCAHandle;
+
+struct TELCARecord {
+ short caRef;
+ TELDNHandle hTELDN;
+ TELHandle hTEL;
+ short caState;
+ TELCAHandle relatedCA;
+ long connectTime; /* can be used by application to keep track of connect time */
+ short intExt;
+ short callType;
+ short dialType;
+ short bearerType;
+ short rate;
+ StringPtr rmtDN;
+ StringPtr rmtPartyName;
+ StringPtr rmtSubaddress;
+ StringPtr routeDN;
+ StringPtr routePartyName;
+ StringPtr routeSubaddress;
+ short priority;
+ short conferenceLimit;
+ TELCAFeatureFlags featureFlags;
+ TELCAOtherFeatures otherFeatures;
+ long telCAPrivate;
+ long refCon;
+ long userData;
+ long reserved;
+};
+
+/* Constants for HandleType in structure above */
+enum {
+ telHandleType = 0, /* feature requires a terminal handle */
+ telDNHandleType = 1, /* feature requires a DN handle */
+ telCAHandleType = 2 /* feature requires a CA handle */
+};
+
+
+struct FeatureList {
+ short featureID;
+ StringPtr featureName;
+ short handleType;
+ struct FeatureList * nextFeature;
+};
+typedef struct FeatureList FeatureList;
+typedef FeatureList * FeatureListPtr;
+/* CA MESSAGE STRUCTURES FOR MSGINFO */
+
+struct CAGenericMsgRec {
+ StringPtr rmtDN;
+ StringPtr rmtName;
+ StringPtr rmtSubaddress;
+ short dialType;
+};
+typedef struct CAGenericMsgRec CAGenericMsgRec;
+
+struct CAUserUserInfoMsgRec {
+ StringPtr userUserInfo;
+};
+typedef struct CAUserUserInfoMsgRec CAUserUserInfoMsgRec;
+
+struct CAConfMsgRec {
+ TELCAHandle relatedCA;
+};
+typedef struct CAConfMsgRec CAConfMsgRec;
+
+struct CATransfMsgRec {
+ StringPtr rmtDN;
+ StringPtr rmtName;
+ StringPtr rmtSubaddress;
+ short dialType;
+ TELCAHandle prepCA;
+};
+typedef struct CATransfMsgRec CATransfMsgRec;
+typedef CALLBACK_API( void , TelephoneTermMsgProcPtr )(TELHandle hTEL, long msg, short mtype, short value, long globals);
+typedef CALLBACK_API( void , TelephoneDNMsgProcPtr )(TELDNHandle hTELDN, long Msg, short mtype, short value, ConstStr255Param rmtDN, ConstStr255Param rmtName, ConstStr255Param rmtSubaddress, long globals);
+typedef CALLBACK_API( void , TelephoneCAMsgProcPtr )(TELCAHandle hTELCA, long Msg, short mtype, short value, Ptr Msginfo, long globals);
+typedef CALLBACK_API( void , TelephoneChooseIdleProcPtr )(void );
+typedef STACK_UPP_TYPE(TelephoneTermMsgProcPtr) TelephoneTermMsgUPP;
+typedef STACK_UPP_TYPE(TelephoneDNMsgProcPtr) TelephoneDNMsgUPP;
+typedef STACK_UPP_TYPE(TelephoneCAMsgProcPtr) TelephoneCAMsgUPP;
+typedef STACK_UPP_TYPE(TelephoneChooseIdleProcPtr) TelephoneChooseIdleUPP;
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(TelephoneTermMsgUPP)
+ NewTelephoneTermMsgUPP (TelephoneTermMsgProcPtr userRoutine);
+
+ EXTERN_API(TelephoneDNMsgUPP)
+ NewTelephoneDNMsgUPP (TelephoneDNMsgProcPtr userRoutine);
+
+ EXTERN_API(TelephoneCAMsgUPP)
+ NewTelephoneCAMsgUPP (TelephoneCAMsgProcPtr userRoutine);
+
+ EXTERN_API(TelephoneChooseIdleUPP)
+ NewTelephoneChooseIdleUPP (TelephoneChooseIdleProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeTelephoneTermMsgUPP (TelephoneTermMsgUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeTelephoneDNMsgUPP (TelephoneDNMsgUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeTelephoneCAMsgUPP (TelephoneCAMsgUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeTelephoneChooseIdleUPP (TelephoneChooseIdleUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeTelephoneTermMsgUPP (TELHandle hTEL,
+ long msg,
+ short mtype,
+ short value,
+ long globals,
+ TelephoneTermMsgUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeTelephoneDNMsgUPP (TELDNHandle hTELDN,
+ long Msg,
+ short mtype,
+ short value,
+ ConstStr255Param rmtDN,
+ ConstStr255Param rmtName,
+ ConstStr255Param rmtSubaddress,
+ long globals,
+ TelephoneDNMsgUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeTelephoneCAMsgUPP (TELCAHandle hTELCA,
+ long Msg,
+ short mtype,
+ short value,
+ Ptr Msginfo,
+ long globals,
+ TelephoneCAMsgUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeTelephoneChooseIdleUPP (TelephoneChooseIdleUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppTelephoneTermMsgProcInfo = 0x0000EBC0 }; /* pascal no_return_value Func(4_bytes, 4_bytes, 2_bytes, 2_bytes, 4_bytes) */
+ enum { uppTelephoneDNMsgProcInfo = 0x003FEBC0 }; /* pascal no_return_value Func(4_bytes, 4_bytes, 2_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ enum { uppTelephoneCAMsgProcInfo = 0x0003EBC0 }; /* pascal no_return_value Func(4_bytes, 4_bytes, 2_bytes, 2_bytes, 4_bytes, 4_bytes) */
+ enum { uppTelephoneChooseIdleProcInfo = 0x00000000 }; /* pascal no_return_value Func() */
+ #define NewTelephoneTermMsgUPP(userRoutine) (TelephoneTermMsgUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTelephoneTermMsgProcInfo, GetCurrentArchitecture())
+ #define NewTelephoneDNMsgUPP(userRoutine) (TelephoneDNMsgUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTelephoneDNMsgProcInfo, GetCurrentArchitecture())
+ #define NewTelephoneCAMsgUPP(userRoutine) (TelephoneCAMsgUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTelephoneCAMsgProcInfo, GetCurrentArchitecture())
+ #define NewTelephoneChooseIdleUPP(userRoutine) (TelephoneChooseIdleUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTelephoneChooseIdleProcInfo, GetCurrentArchitecture())
+ #define DisposeTelephoneTermMsgUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeTelephoneDNMsgUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeTelephoneCAMsgUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeTelephoneChooseIdleUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeTelephoneTermMsgUPP(hTEL, msg, mtype, value, globals, userUPP) CALL_FIVE_PARAMETER_UPP((userUPP), uppTelephoneTermMsgProcInfo, (hTEL), (msg), (mtype), (value), (globals))
+ #define InvokeTelephoneDNMsgUPP(hTELDN, Msg, mtype, value, rmtDN, rmtName, rmtSubaddress, globals, userUPP) CALL_EIGHT_PARAMETER_UPP((userUPP), uppTelephoneDNMsgProcInfo, (hTELDN), (Msg), (mtype), (value), (rmtDN), (rmtName), (rmtSubaddress), (globals))
+ #define InvokeTelephoneCAMsgUPP(hTELCA, Msg, mtype, value, Msginfo, globals, userUPP) CALL_SIX_PARAMETER_UPP((userUPP), uppTelephoneCAMsgProcInfo, (hTELCA), (Msg), (mtype), (value), (Msginfo), (globals))
+ #define InvokeTelephoneChooseIdleUPP(userUPP) CALL_ZERO_PARAMETER_UPP((userUPP), uppTelephoneChooseIdleProcInfo)
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewTelephoneTermMsgProc(userRoutine) NewTelephoneTermMsgUPP(userRoutine)
+#define NewTelephoneDNMsgProc(userRoutine) NewTelephoneDNMsgUPP(userRoutine)
+#define NewTelephoneCAMsgProc(userRoutine) NewTelephoneCAMsgUPP(userRoutine)
+#define NewTelephoneChooseIdleProc(userRoutine) NewTelephoneChooseIdleUPP(userRoutine)
+#define CallTelephoneTermMsgProc(userRoutine, hTEL, msg, mtype, value, globals) InvokeTelephoneTermMsgUPP(hTEL, msg, mtype, value, globals, userRoutine)
+#define CallTelephoneDNMsgProc(userRoutine, hTELDN, Msg, mtype, value, rmtDN, rmtName, rmtSubaddress, globals) InvokeTelephoneDNMsgUPP(hTELDN, Msg, mtype, value, rmtDN, rmtName, rmtSubaddress, globals, userRoutine)
+#define CallTelephoneCAMsgProc(userRoutine, hTELCA, Msg, mtype, value, Msginfo, globals) InvokeTelephoneCAMsgUPP(hTELCA, Msg, mtype, value, Msginfo, globals, userRoutine)
+#define CallTelephoneChooseIdleProc(userRoutine) InvokeTelephoneChooseIdleUPP(userRoutine)
+#endif /* CALL_NOT_IN_CARBON */
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( TELErr )
+InitTEL (void);
+
+EXTERN_API( TELErr )
+TELGetInfo (TELHandle hTEL);
+
+EXTERN_API( TELErr )
+TELOpenTerm (TELHandle hTEL);
+
+EXTERN_API( TELErr )
+TELResetTerm (TELHandle hTEL);
+
+EXTERN_API( TELErr )
+TELCloseTerm (TELHandle hTEL);
+
+EXTERN_API( TELErr )
+TELTermMsgHand (TELHandle hTEL,
+ long eventMask,
+ TelephoneTermMsgUPP msgProc,
+ long globals);
+
+EXTERN_API( TELErr )
+TELClrTermMsgHand (TELHandle hTEL,
+ TelephoneTermMsgUPP msgProc);
+
+EXTERN_API( TELErr )
+TELTermEventsSupp (TELHandle hTEL,
+ long * eventMask);
+
+EXTERN_API( short )
+TELGetProcID (Str255 name);
+
+EXTERN_API( TELHandle )
+TELNew (short procID,
+ TELFlags flags,
+ long refCon,
+ long userData);
+
+EXTERN_API( TELHandle )
+TELNewWithResult (short procID,
+ TELFlags flags,
+ long refCon,
+ long userData,
+ TELErr * error);
+
+EXTERN_API( TELErr )
+TELDefault (Ptr * theConfig,
+ short procID,
+ Boolean allocate);
+
+EXTERN_API( Boolean )
+TELValidate (TELHandle hTEL);
+
+EXTERN_API( Ptr )
+TELGetConfig (TELHandle hTEL);
+
+EXTERN_API( short )
+TELSetConfig (TELHandle hTEL,
+ Ptr thePtr);
+
+EXTERN_API( TELErr )
+TELChoose (TELHandle * hTEL,
+ Point where,
+ TelephoneChooseIdleUPP idleProc);
+
+EXTERN_API( Handle )
+TELSetupPreflight (short procID,
+ long * magicCookie);
+
+EXTERN_API( void )
+TELSetupSetup (short procID,
+ Ptr theConfig,
+ short count,
+ DialogPtr theDialog,
+ long * magicCookie);
+
+EXTERN_API( Boolean )
+TELSetupFilter (short procID,
+ Ptr theConfig,
+ short count,
+ DialogPtr theDialog,
+ EventRecord * theEvent,
+ short * theItem,
+ long * magicCookie);
+
+EXTERN_API( void )
+TELSetupItem (short procID,
+ Ptr theConfig,
+ short count,
+ DialogPtr theDialog,
+ short * theItem,
+ long * magicCookie);
+
+EXTERN_API( void )
+TELSetupCleanup (short procID,
+ Ptr theConfig,
+ short count,
+ DialogPtr theDialog,
+ long * magicCookie);
+
+EXTERN_API( void )
+TELSetupXCleanup (short procID,
+ Ptr theConfig,
+ short count,
+ DialogPtr theDialog,
+ Boolean OKed,
+ long * magicCookie);
+
+EXTERN_API( void )
+TELSetupPostflight (short procID);
+
+EXTERN_API( TELErr )
+TELDispose (TELHandle hTEL);
+
+EXTERN_API( short )
+TELCountDNs (TELHandle hTEL,
+ short dnType,
+ Boolean physical);
+
+EXTERN_API( TELErr )
+TELDNLookupByIndex (TELHandle hTEL,
+ short dnType,
+ Boolean physical,
+ short index,
+ TELDNHandle * hTELDN);
+
+EXTERN_API( TELErr )
+TELDNLookupByName (TELHandle hTEL,
+ ConstStr255Param DN,
+ TELDNHandle * hTELDN);
+
+EXTERN_API( TELErr )
+TELDNSelect (TELDNHandle hTELDN,
+ Boolean select);
+
+EXTERN_API( TELErr )
+TELDNDispose (TELDNHandle hTELDN);
+
+EXTERN_API( TELErr )
+TELGetDNInfo (TELDNHandle hTELDN);
+
+EXTERN_API( TELErr )
+TELGetDNFlags (TELDNHandle hTELDN,
+ long * dnFeatureFlags,
+ long * dnForwardFlags);
+
+EXTERN_API( TELErr )
+TELDNMsgHand (TELDNHandle hTELDN,
+ Boolean allDNs,
+ long eventMask,
+ TelephoneDNMsgUPP msgProc,
+ long globals);
+
+EXTERN_API( TELErr )
+TELClrDNMsgHand (TELDNHandle hTELDN,
+ TelephoneDNMsgUPP msgProc);
+
+EXTERN_API( TELErr )
+TELDNEventsSupp (TELDNHandle hTELDN,
+ long * eventMask);
+
+EXTERN_API( short )
+TELCountCAs (TELDNHandle hTELDN,
+ short internalExternal);
+
+EXTERN_API( TELErr )
+TELCALookup (TELDNHandle hTELDN,
+ short internalExternal,
+ short index,
+ TELCAHandle * hTELCA);
+
+EXTERN_API( TELErr )
+TELCADispose (TELCAHandle hTELCA);
+
+EXTERN_API( TELErr )
+TELGetCAState (TELCAHandle hTELCA,
+ short * state);
+
+EXTERN_API( TELErr )
+TELGetCAFlags (TELCAHandle hTELCA,
+ long * caFeatureFlags,
+ long * caOtherFeatures);
+
+EXTERN_API( TELErr )
+TELGetCAInfo (TELCAHandle hTELCA);
+
+EXTERN_API( TELErr )
+TELCAMsgHand (TELDNHandle hTELDN,
+ long eventMask,
+ TelephoneCAMsgUPP msgProc,
+ long globals);
+
+EXTERN_API( TELErr )
+TELClrCAMsgHand (TELDNHandle hTELDN,
+ TelephoneCAMsgUPP msgProc);
+
+EXTERN_API( TELErr )
+TELCAEventsSupp (TELDNHandle hTELDN,
+ long * eventMask);
+
+EXTERN_API( TELErr )
+TELSetupCall (TELDNHandle hTELDN,
+ TELCAHandle * hTELCA,
+ ConstStr255Param destDN,
+ ConstStr255Param destName,
+ ConstStr255Param destSubaddress,
+ ConstStr255Param userUserInfo,
+ short bearerType,
+ short rate);
+
+EXTERN_API( TELErr )
+TELConnect (TELCAHandle hTELCA);
+
+EXTERN_API( TELErr )
+TELDialDigits (TELCAHandle hTELCA,
+ ConstStr255Param digits);
+
+EXTERN_API( TELErr )
+TELAcceptCall (TELCAHandle hTELCA);
+
+EXTERN_API( TELErr )
+TELRejectCall (TELCAHandle hTELCA,
+ short reason);
+
+EXTERN_API( TELErr )
+TELDeflectCall (TELCAHandle hTELCA,
+ ConstStr255Param rmtDN,
+ ConstStr255Param rmtName,
+ ConstStr255Param rmtSubaddress);
+
+EXTERN_API( TELErr )
+TELAnswerCall (TELCAHandle hTELCA);
+
+EXTERN_API( TELErr )
+TELDrop (TELCAHandle hTELCA,
+ ConstStr255Param userUserInfo);
+
+EXTERN_API( TELErr )
+TELHold (TELCAHandle hTELCA);
+
+EXTERN_API( TELErr )
+TELRetrieve (TELCAHandle hTELCA);
+
+EXTERN_API( TELErr )
+TELConferencePrep (TELCAHandle hTELCA1,
+ TELCAHandle hTELCA2,
+ short numToConference);
+
+EXTERN_API( TELErr )
+TELConferenceEstablish (TELCAHandle hTELCA1,
+ TELCAHandle hTELCA2);
+
+EXTERN_API( TELErr )
+TELConferenceSplit (TELCAHandle hTELCA);
+
+EXTERN_API( TELErr )
+TELTransferPrep (TELCAHandle hTELCA1,
+ TELCAHandle hTELCA2);
+
+EXTERN_API( TELErr )
+TELTransferEstablish (TELCAHandle hTELCA1,
+ TELCAHandle hTELCA2);
+
+EXTERN_API( TELErr )
+TELTransferBlind (TELCAHandle hTELCA,
+ ConstStr255Param rmtDN,
+ ConstStr255Param rmtName,
+ ConstStr255Param rmtSubaddress);
+
+EXTERN_API( TELErr )
+TELForwardSet (TELDNHandle hTELDN,
+ ConstStr255Param forwardDN,
+ ConstStr255Param forwardName,
+ ConstStr255Param forwardSubaddress,
+ short forwardType,
+ short numrings);
+
+EXTERN_API( TELErr )
+TELForwardClear (TELDNHandle hTELDN,
+ short forwardType);
+
+EXTERN_API( TELErr )
+TELCallbackSet (TELCAHandle hTELCA,
+ short * callbackRef);
+
+EXTERN_API( TELErr )
+TELCallbackClear (TELHandle hTEL,
+ short callbackRef);
+
+EXTERN_API( TELErr )
+TELCallbackNow (TELCAHandle hTELCA,
+ short callbackRef);
+
+EXTERN_API( TELErr )
+TELDNDSet (TELDNHandle hTELDN,
+ short dndType);
+
+EXTERN_API( TELErr )
+TELDNDClear (TELDNHandle hTELDN,
+ short dndType);
+
+EXTERN_API( TELErr )
+TELCallPickup (TELCAHandle hTELCA,
+ ConstStr255Param pickupDN,
+ short pickupGroupID);
+
+EXTERN_API( TELErr )
+TELParkCall (TELCAHandle hTELCA,
+ StringPtr * parkRetrieveID,
+ ConstStr255Param parkID);
+
+EXTERN_API( TELErr )
+TELRetrieveParkedCall (TELCAHandle hTELCA,
+ ConstStr255Param parkRetrieveID);
+
+EXTERN_API( TELErr )
+TELVoiceMailAccess (TELCAHandle hTELCA);
+
+EXTERN_API( TELErr )
+TELPaging (TELCAHandle hTELCA,
+ short pageID);
+
+EXTERN_API( TELErr )
+TELIntercom (TELCAHandle hTELCA,
+ short intercomID);
+
+EXTERN_API( TELErr )
+TELOtherFeatureList (TELHandle hTEL,
+ FeatureListPtr * fList);
+
+EXTERN_API( TELErr )
+TELOtherFeatureImplement (TELHandle hTEL,
+ Handle theHandle,
+ short featureID);
+
+EXTERN_API( TELErr )
+TELToolFunctions (TELHandle hTEL,
+ short msgcode,
+ Boolean * supportsIt);
+
+EXTERN_API( TELErr )
+TELOtherFunction (TELHandle hTEL,
+ Ptr paramblock,
+ long size);
+
+EXTERN_API( TELErr )
+TELGetHooksw (TELHandle hTEL,
+ short hookType,
+ Boolean * offHook);
+
+EXTERN_API( TELErr )
+TELSetHooksw (TELHandle hTEL,
+ short hookType,
+ Boolean offHook);
+
+EXTERN_API( TELErr )
+TELGetVolume (TELHandle hTEL,
+ short volType,
+ short * level,
+ short * volState);
+
+EXTERN_API( TELErr )
+TELSetVolume (TELHandle hTEL,
+ short volType,
+ short * level,
+ short volState);
+
+EXTERN_API( TELErr )
+TELAlert (TELHandle hTEL,
+ short * level,
+ short alertPattern);
+
+EXTERN_API( TELErr )
+TELGetDisplay (TELHandle hTEL,
+ short index,
+ short * displayMode,
+ StringPtr * text);
+
+EXTERN_API( TELErr )
+TELSetDisplay (TELHandle hTEL,
+ short index,
+ short displayMode,
+ ConstStr255Param text);
+
+EXTERN_API( void )
+TELIdle (TELHandle hTEL);
+
+EXTERN_API( void )
+TELActivate (TELHandle hTEL,
+ Boolean activate);
+
+EXTERN_API( void )
+TELResume (TELHandle hTEL,
+ Boolean resume);
+
+EXTERN_API( Boolean )
+TELMenu (TELHandle hTEL,
+ short menuID,
+ short item);
+
+EXTERN_API( void )
+TELEvent (TELHandle hTEL,
+ const EventRecord * theEvent);
+
+EXTERN_API( void )
+TELGetToolName (short procID,
+ Str255 name);
+
+EXTERN_API( Handle )
+TELGetVersion (TELHandle hTEL);
+
+EXTERN_API( short )
+TELGetTELVersion (void);
+
+EXTERN_API( TELErr )
+TELIntlToEnglish (TELHandle hTEL,
+ Ptr inputPtr,
+ Ptr * outputPtr,
+ short language);
+
+EXTERN_API( TELErr )
+TELEnglishToIntl (TELHandle hTEL,
+ Ptr inputPtr,
+ Ptr * outputPtr,
+ short language);
+
+EXTERN_API( TELErr )
+TELGetDNSoundInput (TELDNHandle hTELDN,
+ Str255 deviceName);
+
+EXTERN_API( TELErr )
+TELDisposeDNSoundInput (TELDNHandle hTELDN,
+ ConstStr255Param deviceName);
+
+EXTERN_API( TELErr )
+TELGetDNSoundOutput (TELDNHandle hTELDN,
+ Component * SndOut);
+
+EXTERN_API( TELErr )
+TELDisposeDNSoundOutput (TELDNHandle hTELDN,
+ Component SndOut);
+
+EXTERN_API( TELErr )
+TELGetHSSoundInput (TELHandle termHand,
+ Str255 deviceName);
+
+EXTERN_API( TELErr )
+TELDisposeHSSoundInput (TELHandle termHand,
+ ConstStr255Param deviceName);
+
+EXTERN_API( TELErr )
+TELGetHSSoundOutput (TELHandle termHand,
+ Component * SndOut);
+
+EXTERN_API( TELErr )
+TELDisposeHSSoundOutput (TELHandle termHand,
+ Component SndOut);
+
+EXTERN_API( TELErr )
+TELDNSetAutoAnswer (TELDNHandle hTELDN,
+ Boolean AutoAnswerOn);
+
+EXTERN_API( TELErr )
+TELDNTollSaverControl (TELDNHandle hTELDN,
+ Boolean QuickAnswer);
+
+EXTERN_API( TELErr )
+TELSetIndHSConnect (TELHandle termHand,
+ Boolean Connect);
+
+EXTERN_API( TELErr )
+TELGetIndHSConnect (TELHandle termHand,
+ Boolean * Connect);
+
+EXTERN_API( TELErr )
+TELCAVoiceDetect (TELCAHandle hTELCA,
+ Boolean VoiceDetectOn);
+
+EXTERN_API( TELErr )
+TELCASilenceDetect (TELCAHandle hTELCA,
+ Boolean DetectOn,
+ long Period);
+
+EXTERN_API( TELErr )
+TELGetTelNewErr (void);
+
+EXTERN_API( TELErr )
+TELDNSetDTMF (TELDNHandle hTELDN,
+ Boolean dtmfOn);
+
+EXTERN_API( TELErr )
+TELDNGetDTMF (TELDNHandle hTELDN,
+ Boolean * dtmfOn);
+
+EXTERN_API( TELErr )
+TELHSSetDTMF (TELHandle termHand,
+ Boolean dtmfOn);
+
+EXTERN_API( TELErr )
+TELHSGetDTMF (TELHandle termHand,
+ Boolean * dtmfOn);
+
+EXTERN_API( TELErr )
+TELGetDNStatus (TELDNHandle hTELDN,
+ long * inUse);
+
+EXTERN_API( TELErr )
+TELGetDNProgressDet (TELDNHandle hTELDN,
+ long selector,
+ Boolean * prgDetOn);
+
+EXTERN_API( TELErr )
+TELSetDNProgressDet (TELDNHandle hTELDN,
+ long selector,
+ Boolean prgDetOn);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __TELEPHONES__ */
+
diff --git a/include/qt/TerminalTools.h b/include/qt/TerminalTools.h
new file mode 100644
index 000000000..07b15da0a
--- /dev/null
+++ b/include/qt/TerminalTools.h
@@ -0,0 +1,167 @@
+/*
+ File: TerminalTools.h
+
+ Contains: Communications Toolbox Terminal tools Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1988-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __TERMINALTOOLS__
+#define __TERMINALTOOLS__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __DIALOGS__
+#include "Dialogs.h"
+#endif
+
+#ifndef __TERMINALS__
+#include "Terminals.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if CALL_NOT_IN_CARBON
+enum {
+ tdefType = FOUR_CHAR_CODE('tdef'),
+ tvalType = FOUR_CHAR_CODE('tval'),
+ tsetType = FOUR_CHAR_CODE('tset'),
+ tlocType = FOUR_CHAR_CODE('tloc'),
+ tscrType = FOUR_CHAR_CODE('tscr'),
+ tbndType = FOUR_CHAR_CODE('tbnd'),
+ tverType = FOUR_CHAR_CODE('vers')
+};
+
+enum {
+ /* messages */
+ tmInitMsg = 0,
+ tmDisposeMsg = 1,
+ tmSuspendMsg = 2,
+ tmResumeMsg = 3,
+ tmMenuMsg = 4,
+ tmEventMsg = 5,
+ tmActivateMsg = 6,
+ tmDeactivateMsg = 7,
+ tmGetErrorStringMsg = 8,
+ tmIdleMsg = 50,
+ tmResetMsg = 51,
+ tmKeyMsg = 100,
+ tmStreamMsg = 101,
+ tmResizeMsg = 102,
+ tmUpdateMsg = 103,
+ tmClickMsg = 104,
+ tmGetSelectionMsg = 105,
+ tmSetSelectionMsg = 106,
+ tmScrollMsg = 107,
+ tmClearMsg = 108,
+ tmGetLineMsg = 109,
+ tmPaintMsg = 110,
+ tmCursorMsg = 111,
+ tmGetEnvironsMsg = 112,
+ tmDoTermKeyMsg = 113,
+ tmCountTermKeysMsg = 114,
+ tmGetIndTermKeyMsg = 115
+};
+
+enum {
+ /* messages for validate DefProc */
+ tmValidateMsg = 0,
+ tmDefaultMsg = 1
+};
+
+enum {
+ /* messages for Setup DefProc */
+ tmSpreflightMsg = 0,
+ tmSsetupMsg = 1,
+ tmSitemMsg = 2,
+ tmSfilterMsg = 3,
+ tmScleanupMsg = 4
+};
+
+enum {
+ /* messages for scripting defProc */
+ tmMgetMsg = 0,
+ tmMsetMsg = 1
+};
+
+enum {
+ /* messages for localization defProc */
+ tmL2English = 0,
+ tmL2Intl = 1
+};
+
+
+struct TMSearchBlock {
+ StringHandle theString;
+ Rect where;
+ TMSearchTypes searchType;
+ TerminalSearchCallBackUPP callBack;
+ short refnum;
+ struct TMSearchBlock * next;
+};
+typedef struct TMSearchBlock TMSearchBlock;
+typedef TMSearchBlock * TMSearchBlockPtr;
+
+struct TMSetupStruct {
+ DialogPtr theDialog;
+ short count;
+ Ptr theConfig;
+ short procID; /* procID of the tool */
+};
+typedef struct TMSetupStruct TMSetupStruct;
+
+typedef TMSetupStruct * TMSetupPtr;
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __TERMINALTOOLS__ */
+
diff --git a/include/qt/Terminals.h b/include/qt/Terminals.h
new file mode 100644
index 000000000..70bf4df69
--- /dev/null
+++ b/include/qt/Terminals.h
@@ -0,0 +1,593 @@
+/*
+ File: Terminals.h
+
+ Contains: Communications Toolbox Terminal tool Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1988-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __TERMINALS__
+#define __TERMINALS__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __DIALOGS__
+#include "Dialogs.h"
+#endif
+
+#ifndef __CTBUTILITIES__
+#include "CTBUtilities.h"
+#endif
+
+#ifndef __CONNECTIONS__
+#include "Connections.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if CALL_NOT_IN_CARBON
+enum {
+ curTMVersion = 2 /* current Terminal Manager version */
+};
+
+enum {
+ curTermEnvRecVers = 0 /* current Terminal Manager Environment Record version */
+};
+
+enum {
+ /* error codes */
+ tmGenericError = -1,
+ tmNoErr = 0,
+ tmNotSent = 1,
+ tmEnvironsChanged = 2,
+ tmNotSupported = 7,
+ tmNoTools = 8
+};
+
+typedef OSErr TMErr;
+enum {
+ tmInvisible = 1 << 0,
+ tmSaveBeforeClear = 1 << 1,
+ tmNoMenus = 1 << 2,
+ tmAutoScroll = 1 << 3,
+ tmConfigChanged = 1 << 4
+};
+
+typedef unsigned long TMFlags;
+enum {
+ selTextNormal = 1 << 0,
+ selTextBoxed = 1 << 1,
+ selGraphicsMarquee = 1 << 2,
+ selGraphicsLasso = 1 << 3,
+ tmSearchNoDiacrit = 1 << 8,
+ tmSearchNoCase = 1 << 9
+};
+
+typedef unsigned short TMSearchTypes;
+typedef short TMSelTypes;
+enum {
+ cursorText = 1,
+ cursorGraphics = 2
+};
+
+typedef unsigned short TMCursorTypes;
+enum {
+ tmTextTerminal = 1 << 0,
+ tmGraphicsTerminal = 1 << 1
+};
+
+typedef unsigned short TMTermTypes;
+
+struct TermDataBlock {
+ TMTermTypes flags;
+ Handle theData;
+ Handle auxData;
+ long reserved;
+};
+typedef struct TermDataBlock TermDataBlock;
+typedef TermDataBlock * TermDataBlockPtr;
+typedef TermDataBlockPtr * TermDataBlockH;
+typedef TermDataBlockPtr * TermDataBlockHandle;
+
+struct TermEnvironRec {
+ short version;
+ TMTermTypes termType;
+ short textRows;
+ short textCols;
+ Point cellSize;
+ Rect graphicSize;
+ Point slop;
+ Rect auxSpace;
+};
+typedef struct TermEnvironRec TermEnvironRec;
+
+typedef TermEnvironRec * TermEnvironPtr;
+
+union TMSelection {
+ Rect selRect;
+ RgnHandle selRgnHandle;
+};
+typedef union TMSelection TMSelection;
+typedef struct TermRecord TermRecord;
+
+typedef TermRecord * TermPtr;
+typedef TermPtr * TermHandle;
+typedef CALLBACK_API( long , TerminalSendProcPtr )(Ptr thePtr, long theSize, long refCon, CMFlags flags);
+typedef CALLBACK_API( void , TerminalBreakProcPtr )(long duration, long refCon);
+typedef CALLBACK_API( long , TerminalCacheProcPtr )(long refCon, TermDataBlockPtr theTermData);
+typedef CALLBACK_API( void , TerminalSearchCallBackProcPtr )(TermHandle hTerm, short refNum, Rect *foundRect);
+typedef CALLBACK_API( Boolean , TerminalClikLoopProcPtr )(long refCon);
+typedef CALLBACK_API( CMErr , TerminalEnvironsProcPtr )(long refCon, ConnEnvironRec *theEnvirons);
+typedef CALLBACK_API( void , TerminalChooseIdleProcPtr )(void );
+typedef CALLBACK_API( long , TerminalToolDefProcPtr )(TermHandle hTerm, short msg, long p1, long p2, long p3);
+typedef STACK_UPP_TYPE(TerminalSendProcPtr) TerminalSendUPP;
+typedef STACK_UPP_TYPE(TerminalBreakProcPtr) TerminalBreakUPP;
+typedef STACK_UPP_TYPE(TerminalCacheProcPtr) TerminalCacheUPP;
+typedef STACK_UPP_TYPE(TerminalSearchCallBackProcPtr) TerminalSearchCallBackUPP;
+typedef STACK_UPP_TYPE(TerminalClikLoopProcPtr) TerminalClikLoopUPP;
+typedef STACK_UPP_TYPE(TerminalEnvironsProcPtr) TerminalEnvironsUPP;
+typedef STACK_UPP_TYPE(TerminalChooseIdleProcPtr) TerminalChooseIdleUPP;
+typedef STACK_UPP_TYPE(TerminalToolDefProcPtr) TerminalToolDefUPP;
+/* TMTermTypes */
+
+struct TermRecord {
+ short procID;
+ TMFlags flags;
+ TMErr errCode;
+ long refCon;
+ long userData;
+ TerminalToolDefUPP defProc;
+ Ptr config;
+ Ptr oldConfig;
+ TerminalEnvironsUPP environsProc;
+ long reserved1;
+ long reserved2;
+ Ptr tmPrivate;
+ TerminalSendUPP sendProc;
+ TerminalBreakUPP breakProc;
+ TerminalCacheUPP cacheProc;
+ TerminalClikLoopUPP clikLoop;
+ WindowPtr owner;
+ Rect termRect;
+ Rect viewRect;
+ Rect visRect;
+ long lastIdle;
+ TMSelection selection;
+ TMSelTypes selType;
+ long mluField;
+};
+
+#if OPAQUE_UPP_TYPES
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(TerminalSendUPP)
+ NewTerminalSendUPP (TerminalSendProcPtr userRoutine);
+
+ EXTERN_API(TerminalBreakUPP)
+ NewTerminalBreakUPP (TerminalBreakProcPtr userRoutine);
+
+ EXTERN_API(TerminalCacheUPP)
+ NewTerminalCacheUPP (TerminalCacheProcPtr userRoutine);
+
+ EXTERN_API(TerminalSearchCallBackUPP)
+ NewTerminalSearchCallBackUPP (TerminalSearchCallBackProcPtr userRoutine);
+
+ EXTERN_API(TerminalClikLoopUPP)
+ NewTerminalClikLoopUPP (TerminalClikLoopProcPtr userRoutine);
+
+ EXTERN_API(TerminalEnvironsUPP)
+ NewTerminalEnvironsUPP (TerminalEnvironsProcPtr userRoutine);
+
+ EXTERN_API(TerminalChooseIdleUPP)
+ NewTerminalChooseIdleUPP (TerminalChooseIdleProcPtr userRoutine);
+
+ EXTERN_API(TerminalToolDefUPP)
+ NewTerminalToolDefUPP (TerminalToolDefProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeTerminalSendUPP (TerminalSendUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeTerminalBreakUPP (TerminalBreakUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeTerminalCacheUPP (TerminalCacheUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeTerminalSearchCallBackUPP (TerminalSearchCallBackUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeTerminalClikLoopUPP (TerminalClikLoopUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeTerminalEnvironsUPP (TerminalEnvironsUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeTerminalChooseIdleUPP (TerminalChooseIdleUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeTerminalToolDefUPP (TerminalToolDefUPP userUPP);
+
+ EXTERN_API(long)
+ InvokeTerminalSendUPP (Ptr thePtr,
+ long theSize,
+ long refCon,
+ CMFlags flags,
+ TerminalSendUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeTerminalBreakUPP (long duration,
+ long refCon,
+ TerminalBreakUPP userUPP);
+
+ EXTERN_API(long)
+ InvokeTerminalCacheUPP (long refCon,
+ TermDataBlockPtr theTermData,
+ TerminalCacheUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeTerminalSearchCallBackUPP (TermHandle hTerm,
+ short refNum,
+ Rect * foundRect,
+ TerminalSearchCallBackUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeTerminalClikLoopUPP (long refCon,
+ TerminalClikLoopUPP userUPP);
+
+ EXTERN_API(CMErr)
+ InvokeTerminalEnvironsUPP (long refCon,
+ ConnEnvironRec * theEnvirons,
+ TerminalEnvironsUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeTerminalChooseIdleUPP (TerminalChooseIdleUPP userUPP);
+
+ EXTERN_API(long)
+ InvokeTerminalToolDefUPP (TermHandle hTerm,
+ short msg,
+ long p1,
+ long p2,
+ long p3,
+ TerminalToolDefUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppTerminalSendProcInfo = 0x00002FF0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes, 4_bytes, 2_bytes) */
+ enum { uppTerminalBreakProcInfo = 0x000003C0 }; /* pascal no_return_value Func(4_bytes, 4_bytes) */
+ enum { uppTerminalCacheProcInfo = 0x000003F0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes) */
+ enum { uppTerminalSearchCallBackProcInfo = 0x00000EC0 }; /* pascal no_return_value Func(4_bytes, 2_bytes, 4_bytes) */
+ enum { uppTerminalClikLoopProcInfo = 0x000000D0 }; /* pascal 1_byte Func(4_bytes) */
+ enum { uppTerminalEnvironsProcInfo = 0x000003E0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes) */
+ enum { uppTerminalChooseIdleProcInfo = 0x00000000 }; /* pascal no_return_value Func() */
+ enum { uppTerminalToolDefProcInfo = 0x0000FEF0 }; /* pascal 4_bytes Func(4_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewTerminalSendUPP(userRoutine) (TerminalSendUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTerminalSendProcInfo, GetCurrentArchitecture())
+ #define NewTerminalBreakUPP(userRoutine) (TerminalBreakUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTerminalBreakProcInfo, GetCurrentArchitecture())
+ #define NewTerminalCacheUPP(userRoutine) (TerminalCacheUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTerminalCacheProcInfo, GetCurrentArchitecture())
+ #define NewTerminalSearchCallBackUPP(userRoutine) (TerminalSearchCallBackUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTerminalSearchCallBackProcInfo, GetCurrentArchitecture())
+ #define NewTerminalClikLoopUPP(userRoutine) (TerminalClikLoopUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTerminalClikLoopProcInfo, GetCurrentArchitecture())
+ #define NewTerminalEnvironsUPP(userRoutine) (TerminalEnvironsUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTerminalEnvironsProcInfo, GetCurrentArchitecture())
+ #define NewTerminalChooseIdleUPP(userRoutine) (TerminalChooseIdleUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTerminalChooseIdleProcInfo, GetCurrentArchitecture())
+ #define NewTerminalToolDefUPP(userRoutine) (TerminalToolDefUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTerminalToolDefProcInfo, GetCurrentArchitecture())
+ #define DisposeTerminalSendUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeTerminalBreakUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeTerminalCacheUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeTerminalSearchCallBackUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeTerminalClikLoopUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeTerminalEnvironsUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeTerminalChooseIdleUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeTerminalToolDefUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeTerminalSendUPP(thePtr, theSize, refCon, flags, userUPP) (long)CALL_FOUR_PARAMETER_UPP((userUPP), uppTerminalSendProcInfo, (thePtr), (theSize), (refCon), (flags))
+ #define InvokeTerminalBreakUPP(duration, refCon, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppTerminalBreakProcInfo, (duration), (refCon))
+ #define InvokeTerminalCacheUPP(refCon, theTermData, userUPP) (long)CALL_TWO_PARAMETER_UPP((userUPP), uppTerminalCacheProcInfo, (refCon), (theTermData))
+ #define InvokeTerminalSearchCallBackUPP(hTerm, refNum, foundRect, userUPP) CALL_THREE_PARAMETER_UPP((userUPP), uppTerminalSearchCallBackProcInfo, (hTerm), (refNum), (foundRect))
+ #define InvokeTerminalClikLoopUPP(refCon, userUPP) (Boolean)CALL_ONE_PARAMETER_UPP((userUPP), uppTerminalClikLoopProcInfo, (refCon))
+ #define InvokeTerminalEnvironsUPP(refCon, theEnvirons, userUPP) (CMErr)CALL_TWO_PARAMETER_UPP((userUPP), uppTerminalEnvironsProcInfo, (refCon), (theEnvirons))
+ #define InvokeTerminalChooseIdleUPP(userUPP) CALL_ZERO_PARAMETER_UPP((userUPP), uppTerminalChooseIdleProcInfo)
+ #define InvokeTerminalToolDefUPP(hTerm, msg, p1, p2, p3, userUPP) (long)CALL_FIVE_PARAMETER_UPP((userUPP), uppTerminalToolDefProcInfo, (hTerm), (msg), (p1), (p2), (p3))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewTerminalSendProc(userRoutine) NewTerminalSendUPP(userRoutine)
+#define NewTerminalBreakProc(userRoutine) NewTerminalBreakUPP(userRoutine)
+#define NewTerminalCacheProc(userRoutine) NewTerminalCacheUPP(userRoutine)
+#define NewTerminalSearchCallBackProc(userRoutine) NewTerminalSearchCallBackUPP(userRoutine)
+#define NewTerminalClikLoopProc(userRoutine) NewTerminalClikLoopUPP(userRoutine)
+#define NewTerminalEnvironsProc(userRoutine) NewTerminalEnvironsUPP(userRoutine)
+#define NewTerminalChooseIdleProc(userRoutine) NewTerminalChooseIdleUPP(userRoutine)
+#define NewTerminalToolDefProc(userRoutine) NewTerminalToolDefUPP(userRoutine)
+#define CallTerminalSendProc(userRoutine, thePtr, theSize, refCon, flags) InvokeTerminalSendUPP(thePtr, theSize, refCon, flags, userRoutine)
+#define CallTerminalBreakProc(userRoutine, duration, refCon) InvokeTerminalBreakUPP(duration, refCon, userRoutine)
+#define CallTerminalCacheProc(userRoutine, refCon, theTermData) InvokeTerminalCacheUPP(refCon, theTermData, userRoutine)
+#define CallTerminalSearchCallBackProc(userRoutine, hTerm, refNum, foundRect) InvokeTerminalSearchCallBackUPP(hTerm, refNum, foundRect, userRoutine)
+#define CallTerminalClikLoopProc(userRoutine, refCon) InvokeTerminalClikLoopUPP(refCon, userRoutine)
+#define CallTerminalEnvironsProc(userRoutine, refCon, theEnvirons) InvokeTerminalEnvironsUPP(refCon, theEnvirons, userRoutine)
+#define CallTerminalChooseIdleProc(userRoutine) InvokeTerminalChooseIdleUPP(userRoutine)
+#define CallTerminalToolDefProc(userRoutine, hTerm, msg, p1, p2, p3) InvokeTerminalToolDefUPP(hTerm, msg, p1, p2, p3, userRoutine)
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( TMErr )
+InitTM (void);
+
+EXTERN_API( Handle )
+TMGetVersion (TermHandle hTerm);
+
+EXTERN_API( short )
+TMGetTMVersion (void);
+
+EXTERN_API( TermHandle )
+TMNew (const Rect * termRect,
+ const Rect * viewRect,
+ TMFlags flags,
+ short procID,
+ WindowPtr owner,
+ TerminalSendUPP sendProc,
+ TerminalCacheUPP cacheProc,
+ TerminalBreakUPP breakProc,
+ TerminalClikLoopUPP clikLoop,
+ TerminalEnvironsUPP environsProc,
+ long refCon,
+ long userData);
+
+EXTERN_API( void )
+TMDispose (TermHandle hTerm);
+
+EXTERN_API( void )
+TMKey (TermHandle hTerm,
+ const EventRecord * theEvent);
+
+EXTERN_API( void )
+TMUpdate (TermHandle hTerm,
+ RgnHandle visRgn);
+
+EXTERN_API( void )
+TMPaint (TermHandle hTerm,
+ const TermDataBlock * theTermData,
+ const Rect * theRect);
+
+EXTERN_API( void )
+TMActivate (TermHandle hTerm,
+ Boolean activate);
+
+EXTERN_API( void )
+TMResume (TermHandle hTerm,
+ Boolean resume);
+
+EXTERN_API( void )
+TMClick (TermHandle hTerm,
+ const EventRecord * theEvent);
+
+EXTERN_API( void )
+TMIdle (TermHandle hTerm);
+
+EXTERN_API( long )
+TMStream (TermHandle hTerm,
+ void * theBuffer,
+ long theLength,
+ CMFlags flags);
+
+EXTERN_API( Boolean )
+TMMenu (TermHandle hTerm,
+ short menuID,
+ short item);
+
+EXTERN_API( void )
+TMReset (TermHandle hTerm);
+
+EXTERN_API( void )
+TMClear (TermHandle hTerm);
+
+EXTERN_API( void )
+TMResize (TermHandle hTerm,
+ const Rect * newViewRect);
+
+EXTERN_API( long )
+TMGetSelect (TermHandle hTerm,
+ Handle theData,
+ ResType * theType);
+
+EXTERN_API( void )
+TMGetLine (TermHandle hTerm,
+ short lineNo,
+ TermDataBlock * theTermData);
+
+EXTERN_API( void )
+TMSetSelection (TermHandle hTerm,
+ const TMSelection * theSelection,
+ TMSelTypes selType);
+
+EXTERN_API( void )
+TMScroll (TermHandle hTerm,
+ short dh,
+ short dv);
+
+EXTERN_API( Boolean )
+TMValidate (TermHandle hTerm);
+
+EXTERN_API( void )
+TMDefault (Ptr * theConfig,
+ short procID,
+ Boolean allocate);
+
+EXTERN_API( Handle )
+TMSetupPreflight (short procID,
+ long * magicCookie);
+
+EXTERN_API( void )
+TMSetupSetup (short procID,
+ const void * theConfig,
+ short count,
+ DialogPtr theDialog,
+ long * magicCookie);
+
+EXTERN_API( Boolean )
+TMSetupFilter (short procID,
+ const void * theConfig,
+ short count,
+ DialogPtr theDialog,
+ EventRecord * theEvent,
+ short * theItem,
+ long * magicCookie);
+
+EXTERN_API( void )
+TMSetupItem (short procID,
+ const void * theConfig,
+ short count,
+ DialogPtr theDialog,
+ short * theItem,
+ long * magicCookie);
+
+EXTERN_API( void )
+TMSetupXCleanup (short procID,
+ const void * theConfig,
+ short count,
+ DialogPtr theDialog,
+ Boolean OKed,
+ long * magicCookie);
+
+EXTERN_API( void )
+TMSetupPostflight (short procID);
+
+EXTERN_API( Ptr )
+TMGetConfig (TermHandle hTerm);
+
+EXTERN_API( short )
+TMSetConfig (TermHandle hTerm,
+ const void * thePtr);
+
+EXTERN_API( OSErr )
+TMIntlToEnglish (TermHandle hTerm,
+ const void * inputPtr,
+ Ptr * outputPtr,
+ short language);
+
+EXTERN_API( OSErr )
+TMEnglishToIntl (TermHandle hTerm,
+ const void * inputPtr,
+ Ptr * outputPtr,
+ short language);
+
+EXTERN_API( void )
+TMGetToolName (short id,
+ Str255 name);
+
+EXTERN_API( short )
+TMGetProcID (ConstStr255Param name);
+
+EXTERN_API( void )
+TMSetRefCon (TermHandle hTerm,
+ long refCon);
+
+EXTERN_API( long )
+TMGetRefCon (TermHandle hTerm);
+
+EXTERN_API( void )
+TMSetUserData (TermHandle hTerm,
+ long userData);
+
+EXTERN_API( long )
+TMGetUserData (TermHandle hTerm);
+
+EXTERN_API( short )
+TMAddSearch (TermHandle hTerm,
+ ConstStr255Param theString,
+ const Rect * where,
+ TMSearchTypes searchType,
+ TerminalSearchCallBackUPP callBack);
+
+EXTERN_API( void )
+TMRemoveSearch (TermHandle hTerm,
+ short refnum);
+
+EXTERN_API( void )
+TMClearSearch (TermHandle hTerm);
+
+EXTERN_API( Point )
+TMGetCursor (TermHandle hTerm,
+ TMCursorTypes cursType);
+
+EXTERN_API( TMErr )
+TMGetTermEnvirons (TermHandle hTerm,
+ TermEnvironRec * theEnvirons);
+
+EXTERN_API( short )
+TMChoose (TermHandle * hTerm,
+ Point where,
+ TerminalChooseIdleUPP idleProc);
+
+EXTERN_API( void )
+TMEvent (TermHandle hTerm,
+ const EventRecord * theEvent);
+
+EXTERN_API( Boolean )
+TMDoTermKey (TermHandle hTerm,
+ ConstStr255Param theKey);
+
+EXTERN_API( short )
+TMCountTermKeys (TermHandle hTerm);
+
+EXTERN_API( void )
+TMGetIndTermKey (TermHandle hTerm,
+ short id,
+ Str255 theKey);
+
+EXTERN_API( void )
+TMGetErrorString (TermHandle hTerm,
+ short id,
+ Str255 errMsg);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __TERMINALS__ */
+
diff --git a/include/qt/TextCommon.h b/include/qt/TextCommon.h
new file mode 100644
index 000000000..4e1ab307c
--- /dev/null
+++ b/include/qt/TextCommon.h
@@ -0,0 +1,585 @@
+/*
+ File: TextCommon.h
+
+ Contains: TextEncoding-related types and constants, and prototypes for related functions
+
+ Version: Technology: Mac OS 9.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __TEXTCOMMON__
+#define __TEXTCOMMON__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* TextEncodingBase type & values */
+/* (values 0-32 correspond to the Script Codes defined in Inside Macintosh: Text pages 6-52 and 6-53 */
+typedef UInt32 TextEncodingBase;
+enum {
+ /* Mac OS encodings*/
+ kTextEncodingMacRoman = 0L,
+ kTextEncodingMacJapanese = 1,
+ kTextEncodingMacChineseTrad = 2,
+ kTextEncodingMacKorean = 3,
+ kTextEncodingMacArabic = 4,
+ kTextEncodingMacHebrew = 5,
+ kTextEncodingMacGreek = 6,
+ kTextEncodingMacCyrillic = 7,
+ kTextEncodingMacDevanagari = 9,
+ kTextEncodingMacGurmukhi = 10,
+ kTextEncodingMacGujarati = 11,
+ kTextEncodingMacOriya = 12,
+ kTextEncodingMacBengali = 13,
+ kTextEncodingMacTamil = 14,
+ kTextEncodingMacTelugu = 15,
+ kTextEncodingMacKannada = 16,
+ kTextEncodingMacMalayalam = 17,
+ kTextEncodingMacSinhalese = 18,
+ kTextEncodingMacBurmese = 19,
+ kTextEncodingMacKhmer = 20,
+ kTextEncodingMacThai = 21,
+ kTextEncodingMacLaotian = 22,
+ kTextEncodingMacGeorgian = 23,
+ kTextEncodingMacArmenian = 24,
+ kTextEncodingMacChineseSimp = 25,
+ kTextEncodingMacTibetan = 26,
+ kTextEncodingMacMongolian = 27,
+ kTextEncodingMacEthiopic = 28,
+ kTextEncodingMacCentralEurRoman = 29,
+ kTextEncodingMacVietnamese = 30,
+ kTextEncodingMacExtArabic = 31, /* The following use script code 0, smRoman*/
+ kTextEncodingMacSymbol = 33,
+ kTextEncodingMacDingbats = 34,
+ kTextEncodingMacTurkish = 35,
+ kTextEncodingMacCroatian = 36,
+ kTextEncodingMacIcelandic = 37,
+ kTextEncodingMacRomanian = 38,
+ kTextEncodingMacCeltic = 39,
+ kTextEncodingMacGaelic = 40, /* Beginning in Mac OS 8.5, the following meta-value is used to indicate Unicode in some parts*/
+ /* of the Mac OS which previously only expected a Mac OS script code. In some of these places,*/
+ /* only 7 bits are available to indicate encoding (script code), so kTextEncodingUnicodeDefault*/
+ /* cannot be used. For example, kTextEncodingMacUnicode can be used to indicate Unicode in the*/
+ /* 7-bit script code field of a Unicode input method's ComponentDescription.componentFlags field;*/
+ /* it can also be used to indicate Unicode in the 16-bit script code field of an AppleEvent's*/
+ /* typeIntlWritingCode text tag.*/
+ kTextEncodingMacUnicode = 0x7E, /* Meta-value, Unicode as a Mac encoding*/
+ /* The following use script code 4, smArabic*/
+ kTextEncodingMacFarsi = 0x8C, /* Like MacArabic but uses Farsi digits*/
+ /* The following use script code 7, smCyrillic*/
+ kTextEncodingMacUkrainian = 0x98, /* Meta-value in TEC 1.5 & later; maps to kTextEncodingMacCyrillic variant */
+ /* The following use script code 28, smEthiopic*/
+ kTextEncodingMacInuit = 0xEC, /* The following use script code 32, smUnimplemented*/
+ kTextEncodingMacVT100 = 0xFC, /* VT100/102 font from Comm Toolbox: Latin-1 repertoire + box drawing etc*/
+ /* Special Mac OS encodings*/
+ kTextEncodingMacHFS = 0xFF, /* Meta-value, should never appear in a table.*/
+ /* Unicode & ISO UCS encodings begin at 0x100*/
+ kTextEncodingUnicodeDefault = 0x0100, /* Meta-value, should never appear in a table.*/
+ kTextEncodingUnicodeV1_1 = 0x0101,
+ kTextEncodingISO10646_1993 = 0x0101, /* Code points identical to Unicode 1.1*/
+ kTextEncodingUnicodeV2_0 = 0x0103, /* New location for Korean Hangul*/
+ kTextEncodingUnicodeV2_1 = 0x0103, /* We treat both Unicode 2.0 and Unicode 2.1 as 2.1*/
+ /* ISO 8-bit and 7-bit encodings begin at 0x200*/
+ kTextEncodingISOLatin1 = 0x0201, /* ISO 8859-1*/
+ kTextEncodingISOLatin2 = 0x0202, /* ISO 8859-2*/
+ kTextEncodingISOLatin3 = 0x0203, /* ISO 8859-3*/
+ kTextEncodingISOLatin4 = 0x0204, /* ISO 8859-4*/
+ kTextEncodingISOLatinCyrillic = 0x0205, /* ISO 8859-5*/
+ kTextEncodingISOLatinArabic = 0x0206, /* ISO 8859-6, = ASMO 708, =DOS CP 708*/
+ kTextEncodingISOLatinGreek = 0x0207, /* ISO 8859-7*/
+ kTextEncodingISOLatinHebrew = 0x0208, /* ISO 8859-8*/
+ kTextEncodingISOLatin5 = 0x0209, /* ISO 8859-9*/
+ kTextEncodingISOLatin6 = 0x020A, /* ISO 8859-10 */
+ kTextEncodingISOLatin7 = 0x020D, /* ISO 8859-13, Baltic Rim */
+ kTextEncodingISOLatin8 = 0x020E, /* ISO 8859-14, Celtic */
+ kTextEncodingISOLatin9 = 0x020F, /* ISO 8859-15, 8859-1 changed for EURO & CP1252 letters */
+ /* MS-DOS & Windows encodings begin at 0x400*/
+ kTextEncodingDOSLatinUS = 0x0400, /* code page 437*/
+ kTextEncodingDOSGreek = 0x0405, /* code page 737 (formerly code page 437G)*/
+ kTextEncodingDOSBalticRim = 0x0406, /* code page 775*/
+ kTextEncodingDOSLatin1 = 0x0410, /* code page 850, "Multilingual"*/
+ kTextEncodingDOSGreek1 = 0x0411, /* code page 851*/
+ kTextEncodingDOSLatin2 = 0x0412, /* code page 852, Slavic*/
+ kTextEncodingDOSCyrillic = 0x0413, /* code page 855, IBM Cyrillic*/
+ kTextEncodingDOSTurkish = 0x0414, /* code page 857, IBM Turkish*/
+ kTextEncodingDOSPortuguese = 0x0415, /* code page 860*/
+ kTextEncodingDOSIcelandic = 0x0416, /* code page 861*/
+ kTextEncodingDOSHebrew = 0x0417, /* code page 862*/
+ kTextEncodingDOSCanadianFrench = 0x0418, /* code page 863*/
+ kTextEncodingDOSArabic = 0x0419, /* code page 864*/
+ kTextEncodingDOSNordic = 0x041A, /* code page 865*/
+ kTextEncodingDOSRussian = 0x041B, /* code page 866*/
+ kTextEncodingDOSGreek2 = 0x041C, /* code page 869, IBM Modern Greek*/
+ kTextEncodingDOSThai = 0x041D, /* code page 874, also for Windows*/
+ kTextEncodingDOSJapanese = 0x0420, /* code page 932, also for Windows; Shift-JIS with additions*/
+ kTextEncodingDOSChineseSimplif = 0x0421, /* code page 936, also for Windows; was EUC-CN, now GBK (EUC-CN extended)*/
+ kTextEncodingDOSKorean = 0x0422, /* code page 949, also for Windows; Unified Hangul Code (EUC-KR extended)*/
+ kTextEncodingDOSChineseTrad = 0x0423, /* code page 950, also for Windows; Big-5*/
+ kTextEncodingWindowsLatin1 = 0x0500, /* code page 1252*/
+ kTextEncodingWindowsANSI = 0x0500, /* code page 1252 (alternate name)*/
+ kTextEncodingWindowsLatin2 = 0x0501, /* code page 1250, Central Europe*/
+ kTextEncodingWindowsCyrillic = 0x0502, /* code page 1251, Slavic Cyrillic*/
+ kTextEncodingWindowsGreek = 0x0503, /* code page 1253*/
+ kTextEncodingWindowsLatin5 = 0x0504, /* code page 1254, Turkish*/
+ kTextEncodingWindowsHebrew = 0x0505, /* code page 1255*/
+ kTextEncodingWindowsArabic = 0x0506, /* code page 1256*/
+ kTextEncodingWindowsBalticRim = 0x0507, /* code page 1257*/
+ kTextEncodingWindowsVietnamese = 0x0508, /* code page 1258*/
+ kTextEncodingWindowsKoreanJohab = 0x0510, /* code page 1361, for Windows NT*/
+ /* Various national standards begin at 0x600*/
+ kTextEncodingUS_ASCII = 0x0600,
+ kTextEncodingJIS_X0201_76 = 0x0620, /* JIS Roman and 1-byte katakana (halfwidth)*/
+ kTextEncodingJIS_X0208_83 = 0x0621,
+ kTextEncodingJIS_X0208_90 = 0x0622,
+ kTextEncodingJIS_X0212_90 = 0x0623,
+ kTextEncodingJIS_C6226_78 = 0x0624,
+ kTextEncodingGB_2312_80 = 0x0630,
+ kTextEncodingGBK_95 = 0x0631, /* annex to GB 13000-93; for Windows 95; EUC-CN extended*/
+ kTextEncodingKSC_5601_87 = 0x0640, /* same as KSC 5601-92 without Johab annex*/
+ kTextEncodingKSC_5601_92_Johab = 0x0641, /* KSC 5601-92 Johab annex*/
+ kTextEncodingCNS_11643_92_P1 = 0x0651, /* CNS 11643-1992 plane 1*/
+ kTextEncodingCNS_11643_92_P2 = 0x0652, /* CNS 11643-1992 plane 2*/
+ kTextEncodingCNS_11643_92_P3 = 0x0653, /* CNS 11643-1992 plane 3 (was plane 14 in 1986 version)*/
+ /* ISO 2022 collections begin at 0x800*/
+ kTextEncodingISO_2022_JP = 0x0820,
+ kTextEncodingISO_2022_JP_2 = 0x0821,
+ kTextEncodingISO_2022_CN = 0x0830,
+ kTextEncodingISO_2022_CN_EXT = 0x0831,
+ kTextEncodingISO_2022_KR = 0x0840, /* EUC collections begin at 0x900*/
+ kTextEncodingEUC_JP = 0x0920, /* ISO 646, 1-byte katakana, JIS 208, JIS 212*/
+ kTextEncodingEUC_CN = 0x0930, /* ISO 646, GB 2312-80*/
+ kTextEncodingEUC_TW = 0x0931, /* ISO 646, CNS 11643-1992 Planes 1-16*/
+ kTextEncodingEUC_KR = 0x0940, /* ISO 646, KS C 5601-1987*/
+ /* Misc standards begin at 0xA00*/
+ kTextEncodingShiftJIS = 0x0A01, /* plain Shift-JIS*/
+ kTextEncodingKOI8_R = 0x0A02, /* Russian internet standard*/
+ kTextEncodingBig5 = 0x0A03, /* Big-5 (has variants)*/
+ kTextEncodingMacRomanLatin1 = 0x0A04, /* Mac OS Roman permuted to align with ISO Latin-1*/
+ kTextEncodingHZ_GB_2312 = 0x0A05, /* HZ (RFC 1842, for Chinese mail & news)*/
+ /* Other platform encodings*/
+ kTextEncodingNextStepLatin = 0x0B01, /* NextStep encoding*/
+ /* EBCDIC & IBM host encodings begin at 0xC00*/
+ kTextEncodingEBCDIC_US = 0x0C01, /* basic EBCDIC-US*/
+ kTextEncodingEBCDIC_CP037 = 0x0C02, /* code page 037, extended EBCDIC (Latin-1 set) for US,Canada...*/
+ /* Special values*/
+ kTextEncodingMultiRun = 0x0FFF, /* Multi-encoding text with external run info*/
+ kTextEncodingUnknown = 0xFFFF, /* Unknown or unspecified */
+ /* The following are older names for backward compatibility*/
+ kTextEncodingMacTradChinese = 2,
+ kTextEncodingMacRSymbol = 8,
+ kTextEncodingMacSimpChinese = 25,
+ kTextEncodingMacGeez = 28,
+ kTextEncodingMacEastEurRoman = 29,
+ kTextEncodingMacUninterp = 32
+};
+
+/* TextEncodingVariant type & values */
+typedef UInt32 TextEncodingVariant;
+enum {
+ /* Default TextEncodingVariant, for any TextEncodingBase*/
+ kTextEncodingDefaultVariant = 0, /* Variants of kTextEncodingMacRoman */
+ kMacRomanDefaultVariant = 0, /* meta value, maps to 1 or 2 depending on System */
+ kMacRomanCurrencySignVariant = 1, /* Mac OS version < 8.5, 0xDB is CURRENCY SIGN*/
+ kMacRomanEuroSignVariant = 2, /* Mac OS version >= 8.5, 0xDB is EURO SIGN */
+ /* Variants of kTextEncodingMacCyrillic (for TEC 1.5 and later) */
+ kMacCyrillicDefaultVariant = 0, /* meta value, maps to 1, 2, or 3 depending on System*/
+ kMacCyrillicCurrSignStdVariant = 1, /* Mac OS < 9.0 (RU,BG), 0xFF = CURRENCY SIGN, 0xA2/0xB6 = CENT / PARTIAL DIFF.*/
+ kMacCyrillicCurrSignUkrVariant = 2, /* Mac OS < 9.0 (UA,LangKit), 0xFF = CURRENCY SIGN, 0xA2/0xB6 = GHE WITH UPTURN*/
+ kMacCyrillicEuroSignVariant = 3, /* Mac OS >= 9.0, 0xFF is EURO SIGN, 0xA2/0xB6 = GHE WITH UPTURN*/
+ /* Variants of kTextEncodingMacIcelandic */
+ kMacIcelandicStdDefaultVariant = 0, /* meta value, maps to 2 or 4 depending on System */
+ kMacIcelandicTTDefaultVariant = 1, /* meta value, maps to 3 or 5 depending on System */
+ /* The following are for Mac OS version < 8.5, 0xDB is CURRENCY SIGN */
+ kMacIcelandicStdCurrSignVariant = 2, /* 0xBB/0xBC are fem./masc. ordinal indicators*/
+ kMacIcelandicTTCurrSignVariant = 3, /* 0xBB/0xBC are fi/fl ligatures*/
+ /* The following are for Mac OS version >= 8.5, 0xDB is EURO SIGN */
+ kMacIcelandicStdEuroSignVariant = 4, /* 0xBB/0xBC are fem./masc. ordinal indicators*/
+ kMacIcelandicTTEuroSignVariant = 5, /* 0xBB/0xBC are fi/fl ligatures*/
+ /* Variants of kTextEncodingMacCroatian */
+ kMacCroatianDefaultVariant = 0, /* meta value, maps to 1 or 2 depending on System */
+ kMacCroatianCurrencySignVariant = 1, /* Mac OS version < 8.5, 0xDB is CURRENCY SIGN */
+ kMacCroatianEuroSignVariant = 2, /* Mac OS version >= 8.5, 0xDB is EURO SIGN */
+ /* Variants of kTextEncodingMacRomanian */
+ kMacRomanianDefaultVariant = 0, /* meta value, maps to 1 or 2 depending on System */
+ kMacRomanianCurrencySignVariant = 1, /* Mac OS version < 8.5, 0xDB is CURRENCY SIGN */
+ kMacRomanianEuroSignVariant = 2, /* Mac OS version >= 8.5, 0xDB is EURO SIGN */
+ /* Variants of kTextEncodingMacJapanese*/
+ kMacJapaneseStandardVariant = 0,
+ kMacJapaneseStdNoVerticalsVariant = 1,
+ kMacJapaneseBasicVariant = 2,
+ kMacJapanesePostScriptScrnVariant = 3,
+ kMacJapanesePostScriptPrintVariant = 4,
+ kMacJapaneseVertAtKuPlusTenVariant = 5, /* Variants of kTextEncodingMacArabic*/
+ kMacArabicStandardVariant = 0, /* 0xC0 is 8-spoke asterisk, 0x2A & 0xAA are asterisk (e.g. Cairo)*/
+ kMacArabicTrueTypeVariant = 1, /* 0xC0 is asterisk, 0x2A & 0xAA are multiply signs (e.g. Baghdad)*/
+ kMacArabicThuluthVariant = 2, /* 0xC0 is Arabic five-point star, 0x2A & 0xAA are multiply signs*/
+ kMacArabicAlBayanVariant = 3, /* 8-spoke asterisk, multiply sign, Koranic ligatures & parens*/
+ /* Variants of kTextEncodingMacFarsi*/
+ kMacFarsiStandardVariant = 0, /* 0xC0 is 8-spoke asterisk, 0x2A & 0xAA are asterisk (e.g. Tehran)*/
+ kMacFarsiTrueTypeVariant = 1, /* asterisk, multiply signs, Koranic ligatures, geometric shapes*/
+ /* Variants of kTextEncodingMacHebrew*/
+ kMacHebrewStandardVariant = 0,
+ kMacHebrewFigureSpaceVariant = 1, /* Variants of kTextEncodingMacVT100 */
+ kMacVT100DefaultVariant = 0, /* meta value, maps to 1 or 2 depending on System */
+ kMacVT100CurrencySignVariant = 1, /* Mac OS version < 8.5, 0xDB is CURRENCY SIGN */
+ kMacVT100EuroSignVariant = 2, /* Mac OS version >= 8.5, 0xDB is EURO SIGN */
+ /* Variants of Unicode & ISO 10646 encodings*/
+ kUnicodeNoSubset = 0,
+ kUnicodeCanonicalDecompVariant = 2, /* canonical decomposition; excludes composed characters*/
+ /* Variants of Big-5 encoding*/
+ kBig5_BasicVariant = 0,
+ kBig5_StandardVariant = 1, /* 0xC6A1-0xC7FC: kana, Cyrillic, enclosed numerics*/
+ kBig5_ETenVariant = 2, /* adds kana, Cyrillic, radicals, etc with hi bytes C6-C8,F9*/
+ /* Unicode variants not yet supported (and not fully defined)*/
+ kUnicodeNoCompatibilityVariant = 1,
+ kUnicodeNoComposedVariant = 3,
+ kUnicodeNoCorporateVariant = 4, /* The following are older names for backward compatibility*/
+ kMacRomanStandardVariant = 0,
+ kMacIcelandicStandardVariant = 0,
+ kMacIcelandicTrueTypeVariant = 1,
+ kJapaneseStandardVariant = 0,
+ kJapaneseStdNoVerticalsVariant = 1,
+ kJapaneseBasicVariant = 2,
+ kJapanesePostScriptScrnVariant = 3,
+ kJapanesePostScriptPrintVariant = 4,
+ kJapaneseVertAtKuPlusTenVariant = 5, /* kJapaneseStdNoOneByteKanaVariant = 6, // replaced by kJapaneseNoOneByteKanaOption*/
+ /* kJapaneseBasicNoOneByteKanaVariant = 7, // replaced by kJapaneseNoOneByteKanaOption */
+ kHebrewStandardVariant = 0,
+ kHebrewFigureSpaceVariant = 1,
+ kUnicodeMaxDecomposedVariant = 2, /* replaced by kUnicodeCanonicalDecompVariant*/
+ /* The following Japanese variant options were never supported and are now deprecated.*/
+ /* In TEC 1.4 and later their functionality is replaced by the Unicode Converter options listed.*/
+ kJapaneseNoOneByteKanaOption = 0x20, /* replaced by UnicodeConverter option kUnicodeNoHalfwidthCharsBit*/
+ kJapaneseUseAsciiBackslashOption = 0x40 /* replaced by UnicodeConverter option kUnicodeForceASCIIRangeBit*/
+};
+
+/* TextEncodingFormat type & values */
+typedef UInt32 TextEncodingFormat;
+enum {
+ /* Default TextEncodingFormat for any TextEncodingBase*/
+ kTextEncodingDefaultFormat = 0, /* Formats for Unicode & ISO 10646*/
+ kUnicode16BitFormat = 0,
+ kUnicodeUTF7Format = 1,
+ kUnicodeUTF8Format = 2,
+ kUnicode32BitFormat = 3
+};
+
+/* TextEncoding type */
+typedef UInt32 TextEncoding;
+/* name part selector for GetTextEncodingName*/
+typedef UInt32 TextEncodingNameSelector;
+enum {
+ kTextEncodingFullName = 0,
+ kTextEncodingBaseName = 1,
+ kTextEncodingVariantName = 2,
+ kTextEncodingFormatName = 3
+};
+
+/* Types used in conversion */
+
+struct TextEncodingRun {
+ ByteOffset offset;
+ TextEncoding textEncoding;
+};
+typedef struct TextEncodingRun TextEncodingRun;
+typedef TextEncodingRun * TextEncodingRunPtr;
+
+typedef const TextEncodingRun * ConstTextEncodingRunPtr;
+
+struct ScriptCodeRun {
+ ByteOffset offset;
+ ScriptCode script;
+};
+typedef struct ScriptCodeRun ScriptCodeRun;
+typedef ScriptCodeRun * ScriptCodeRunPtr;
+
+typedef const ScriptCodeRun * ConstScriptCodeRunPtr;
+typedef UInt8 * TextPtr;
+typedef const UInt8 * ConstTextPtr;
+/* Basic types for Unicode characters and strings:*/
+typedef UniChar * UniCharArrayPtr;
+typedef const UniChar * ConstUniCharArrayPtr;
+/*
+ UniCharArrayHandle is a handle type to correspond to UniCharArrayPtr,
+ i.e. a handle to an array of UniChars (UInt16s).
+*/
+typedef UniCharArrayPtr * UniCharArrayHandle;
+/*
+ UniCharArrayOffset is used to indicate an edge offset in an array
+ of UniChars (UInt16s).
+*/
+typedef UInt32 UniCharArrayOffset;
+/* enums for TextEncoding Conversion routines*/
+enum {
+ kTextScriptDontCare = -128,
+ kTextLanguageDontCare = -128,
+ kTextRegionDontCare = -128
+};
+
+/* struct for TECGetInfo*/
+
+
+struct TECInfo {
+ UInt16 format; /* format code for this struct*/
+ UInt16 tecVersion; /* TEC version in BCD, e.g. 0x0121 for 1.2.1*/
+ UInt32 tecTextConverterFeatures; /* bitmask indicating TEC features/fixes*/
+ UInt32 tecUnicodeConverterFeatures; /* bitmask indicating UnicodeConverter features/fixes*/
+ UInt32 tecTextCommonFeatures; /* bitmask indicating TextCommon features/fixes*/
+ Str31 tecTextEncodingsFolderName; /* localized name of Text Encodings folder (pascal string)*/
+ Str31 tecExtensionFileName; /* localized name of TEC extension (pascal string)*/
+ UInt16 tecLowestTEFileVersion; /* Lowest version (BCD) of all files in Text Encodings folder*/
+ UInt16 tecHighestTEFileVersion; /* Highest version (BCD) of all files in Text Encodings folder*/
+};
+typedef struct TECInfo TECInfo;
+typedef TECInfo * TECInfoPtr;
+typedef TECInfoPtr * TECInfoHandle;
+/* Value for TECInfo format code*/
+enum {
+ kTECInfoCurrentFormat = 2 /* any future formats will just add fields at the end*/
+};
+
+/*
+ Defined feature/fix bits for tecUnicodeConverterFeatures field
+ Bit: Meaning if set:
+ ---- ---------------
+ kTECKeepInfoFixBit Unicode Converter no longer ignores other control flags if
+ kUnicodeKeepInfoBit is set. Bug fix in TEC Manager 1.2.1.
+ kTECFallbackTextLengthFixBit Unicode Converter honors the *srcConvLen and *destConvLen
+ returned by caller-supplied fallback handler for any status it
+ returns except for kTECUnmappableElementErr (previously it only
+ honored these values if noErr was returned). Bug fix in TEC
+ Manager 1.2.1.
+ kTECTextRunBitClearFixBit ConvertFromUnicodeToTextRun & ConvertFromUnicodeToScriptCodeRun
+ function correctly if the kUnicodeTextRunBit is set (previously
+ their determination of best target encoding was incorrect). Bug
+ fix in TEC Manager 1.3.
+ kTECTextToUnicodeScanFixBit ConvertFromTextToUnicode uses an improved scanner and maintains
+ some resulting state information, which it uses for mapping.
+ This has several effects:
+ - Improved mapping of 0x30-0x39 digits in Mac OS Arabic, fewer
+ direction overrides when mapping Mac OS Arabic & Hebrew, and
+ improved mapping of certain characters in Indic encodings.
+ - Malformed input produces kTextMalformedInputErr.
+ - ConvertFromTextToUnicode accepts and uses the control flags
+ kUnicodeKeepInfoMask and kUnicodeStringUnterminatedMask.
+ Bug fix and enhancement in TEC Manager 1.3.
+ kTECAddForceASCIIChangesBit Define new control flag bits kUnicodeForceASCIIRangeBit and
+ kUnicodeNoHalfwidthCharsBit for use with
+ ConvertFromTextToUnicode, ConvertFromUnicodeToText, etc.
+ Enhancement in TEC Manager 1.4.
+ kTECPreferredEncodingFixBit CreateUnicodeToTextRunInfo and related functions fix a problem
+ that occurred when a preferred encoding was specified that did
+ not match the System script; the preferred script was not
+ actually placed first in the ordered list of encodings to use.
+ Bug fix in TEC Manager 1.4.
+ kTECAddTextRunHeuristicsBit Define new control flag bit kUnicodeTextRunHeuristicsBit for
+ use with ConvertFromUnicodeToTextRun.
+ kTECAddFallbackInterruptBit Define new option kUnicodeFallbackInterruptSafeMask for use
+ with SetFallbackUnicodeToText. If a client fallback handler is
+ installed without specifying this bit, ConvertFromUnicodeToText
+ will HLock the tables it uses (in case the fallback handler
+ moves memory); otherwise, it won't.
+*/
+
+enum {
+ kTECKeepInfoFixBit = 0,
+ kTECFallbackTextLengthFixBit = 1,
+ kTECTextRunBitClearFixBit = 2,
+ kTECTextToUnicodeScanFixBit = 3,
+ kTECAddForceASCIIChangesBit = 4,
+ kTECPreferredEncodingFixBit = 5,
+ kTECAddTextRunHeuristicsBit = 6,
+ kTECAddFallbackInterruptBit = 7
+};
+
+enum {
+ kTECKeepInfoFixMask = 1L << kTECKeepInfoFixBit,
+ kTECFallbackTextLengthFixMask = 1L << kTECFallbackTextLengthFixBit,
+ kTECTextRunBitClearFixMask = 1L << kTECTextRunBitClearFixBit,
+ kTECTextToUnicodeScanFixMask = 1L << kTECTextToUnicodeScanFixBit,
+ kTECAddForceASCIIChangesMask = 1L << kTECAddForceASCIIChangesBit,
+ kTECPreferredEncodingFixMask = 1L << kTECPreferredEncodingFixBit,
+ kTECAddTextRunHeuristicsMask = 1L << kTECAddTextRunHeuristicsBit,
+ kTECAddFallbackInterruptMask = 1L << kTECAddFallbackInterruptBit
+};
+
+/*
+ -------------------------------------------------------------------------------------------------
+ CONSTANTS & DATA STRUCTURES for Unicode Properties
+ -------------------------------------------------------------------------------------------------
+*/
+
+typedef SInt32 UCCharPropertyType;
+enum {
+ kUCCharPropTypeGenlCategory = 1, /* requests enumeration value*/
+ kUCCharPropTypeCombiningClass = 2, /* requests numeric value 0..255*/
+ kUCCharPropTypeBidiCategory = 3 /* requests enumeration value*/
+};
+
+typedef UInt32 UCCharPropertyValue;
+/* General Category enumeration values (requested by kUCCharPropTypeGenlCategory)*/
+enum {
+ /* Normative categories:*/
+ kUCGenlCatOtherNotAssigned = 0, /* Cn Other, Not Assigned*/
+ kUCGenlCatOtherControl = 1, /* Cc Other, Control*/
+ kUCGenlCatOtherFormat = 2, /* Cf Other, Format*/
+ kUCGenlCatOtherSurrogate = 3, /* Cs Other, Surrogate*/
+ kUCGenlCatOtherPrivateUse = 4, /* Co Other, Private Use*/
+ kUCGenlCatMarkNonSpacing = 5, /* Mn Mark, Non-Spacing*/
+ kUCGenlCatMarkSpacingCombining = 6, /* Mc Mark, Spacing Combining*/
+ kUCGenlCatMarkEnclosing = 7, /* Me Mark, Enclosing*/
+ kUCGenlCatNumberDecimalDigit = 8, /* Nd Number, Decimal Digit*/
+ kUCGenlCatNumberLetter = 9, /* Nl Number, Letter*/
+ kUCGenlCatNumberOther = 10, /* No Number, Other*/
+ kUCGenlCatSeparatorSpace = 11, /* Zs Separator, Space*/
+ kUCGenlCatSeparatorLine = 12, /* Zl Separator, Line*/
+ kUCGenlCatSeparatorParagraph = 13, /* Zp Separator, Paragraph*/
+ /* Informative categories:*/
+ kUCGenlCatLetterUppercase = 14, /* Lu Letter, Uppercase*/
+ kUCGenlCatLetterLowercase = 15, /* Ll Letter, Lowercase*/
+ kUCGenlCatLetterTitlecase = 16, /* Lt Letter, Titlecase*/
+ kUCGenlCatLetterModifier = 17, /* Lm Letter, Modifier*/
+ kUCGenlCatLetterOther = 18, /* Lo Letter, Other*/
+ kUCGenlCatPunctConnector = 20, /* Pc Punctuation, Connector*/
+ kUCGenlCatPunctDash = 21, /* Pd Punctuation, Dash*/
+ kUCGenlCatPunctOpen = 22, /* Ps Punctuation, Open*/
+ kUCGenlCatPunctClose = 23, /* Pe Punctuation, Close*/
+ kUCGenlCatPunctInitialQuote = 24, /* Pi Punctuation, Initial quote*/
+ kUCGenlCatPunctFinalQuote = 25, /* Pf Punctuation, Final quote*/
+ kUCGenlCatPunctOther = 26, /* Po Punctuation, Other*/
+ kUCGenlCatSymbolMath = 28, /* Sm Symbol, Math*/
+ kUCGenlCatSymbolCurrency = 29, /* Sc Symbol, Currency*/
+ kUCGenlCatSymbolModifier = 30, /* Sk Symbol, Modifier*/
+ kUCGenlCatSymbolOther = 31 /* So Symbol, Other*/
+};
+
+/* Bidirectional Category enumeration values (requested by kUCCharPropTypeBidiCategory)*/
+enum {
+ kUCBidiCatNotApplicable = 0, /* for now use this for unassigned*/
+ /* Strong types:*/
+ kUCBidiCatLeftRight = 1, /* L Left-Right*/
+ kUCBidiCatRightLeft = 2, /* R Right-Left*/
+ /* Weak types:*/
+ kUCBidiCatEuroNumber = 3, /* EN European Number*/
+ kUCBidiCatEuroNumberSeparator = 4, /* ES European Number Separator*/
+ kUCBidiCatEuroNumberTerminator = 5, /* ET European Number Terminator*/
+ kUCBidiCatArabicNumber = 6, /* AN Arabic Number*/
+ kUCBidiCatCommonNumberSeparator = 7, /* CS Common Number Separator*/
+ /* Separators:*/
+ kUCBidiCatBlockSeparator = 8, /* B Block Separator*/
+ kUCBidiCatSegmentSeparator = 9, /* S Segment Separator*/
+ /* Neutrals:*/
+ kUCBidiCatWhitespace = 10, /* WS Whitespace*/
+ kUCBidiCatOtherNeutral = 11 /* ON Other Neutrals (unassigned codes could use this)*/
+};
+
+/* Prototypes for TextEncoding functions*/
+
+EXTERN_API( TextEncoding )
+CreateTextEncoding (TextEncodingBase encodingBase,
+ TextEncodingVariant encodingVariant,
+ TextEncodingFormat encodingFormat);
+
+EXTERN_API( TextEncodingBase )
+GetTextEncodingBase (TextEncoding encoding);
+
+EXTERN_API( TextEncodingVariant )
+GetTextEncodingVariant (TextEncoding encoding);
+
+EXTERN_API( TextEncodingFormat )
+GetTextEncodingFormat (TextEncoding encoding);
+
+EXTERN_API( TextEncoding )
+ResolveDefaultTextEncoding (TextEncoding encoding);
+
+EXTERN_API_C( OSStatus )
+GetTextEncodingName (TextEncoding iEncoding,
+ TextEncodingNameSelector iNamePartSelector,
+ RegionCode iPreferredRegion,
+ TextEncoding iPreferredEncoding,
+ ByteCount iOutputBufLen,
+ ByteCount * oNameLength,
+ RegionCode * oActualRegion, /* can be NULL */
+ TextEncoding * oActualEncoding, /* can be NULL */
+ TextPtr oEncodingName);
+
+EXTERN_API( OSStatus )
+TECGetInfo (TECInfoHandle * tecInfo);
+
+
+EXTERN_API( OSStatus )
+UpgradeScriptInfoToTextEncoding (ScriptCode iTextScriptID,
+ LangCode iTextLanguageID,
+ RegionCode iRegionID,
+ ConstStr255Param iTextFontname,
+ TextEncoding * oEncoding);
+
+EXTERN_API( OSStatus )
+RevertTextEncodingToScriptInfo (TextEncoding iEncoding,
+ ScriptCode * oTextScriptID,
+ LangCode * oTextLanguageID, /* can be NULL */
+ Str255 oTextFontname) /* can be NULL */;
+
+EXTERN_API( OSStatus )
+NearestMacTextEncodings (TextEncoding generalEncoding,
+ TextEncoding * bestMacEncoding,
+ TextEncoding * alternateMacEncoding);
+
+EXTERN_API_C( OSStatus )
+UCGetCharProperty (const UniChar * charPtr,
+ UniCharCount textLength,
+ UCCharPropertyType propType,
+ UCCharPropertyValue * propValue);
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __TEXTCOMMON__ */
+
diff --git a/include/qt/TextEdit.h b/include/qt/TextEdit.h
new file mode 100644
index 000000000..cfd27f08e
--- /dev/null
+++ b/include/qt/TextEdit.h
@@ -0,0 +1,1046 @@
+/*
+ File: TextEdit.h
+
+ Contains: TextEdit Interfaces.
+
+ Version: Technology: System 8.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __TEXTEDIT__
+#define __TEXTEDIT__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+typedef struct TERec TERec;
+typedef TERec * TEPtr;
+typedef TEPtr * TEHandle;
+typedef CALLBACK_API( void , HighHookProcPtr )(const Rect *r, TEPtr pTE);
+typedef CALLBACK_API( Boolean , EOLHookProcPtr )(char theChar, TEPtr pTE, TEHandle hTE);
+typedef CALLBACK_API( void , CaretHookProcPtr )(const Rect *r, TEPtr pTE);
+typedef CALLBACK_API( unsigned short , WidthHookProcPtr )(unsigned short textLen, unsigned short textOffset, void *textBufferPtr, TEPtr pTE, TEHandle hTE);
+typedef CALLBACK_API( unsigned short , TextWidthHookProcPtr )(unsigned short textLen, unsigned short textOffset, void *textBufferPtr, TEPtr pTE, TEHandle hTE);
+typedef CALLBACK_API( unsigned short , NWidthHookProcPtr )(unsigned short styleRunLen, unsigned short styleRunOffset, short slop, short direction, void *textBufferPtr, short *lineStart, TEPtr pTE, TEHandle hTE);
+typedef CALLBACK_API( void , DrawHookProcPtr )(unsigned short textOffset, unsigned short drawLen, void *textBufferPtr, TEPtr pTE, TEHandle hTE);
+typedef CALLBACK_API( Boolean , HitTestHookProcPtr )(unsigned short styleRunLen, unsigned short styleRunOffset, unsigned short slop, void *textBufferPtr, TEPtr pTE, TEHandle hTE, unsigned short *pixelWidth, unsigned short *charOffset, Boolean *pixelInChar);
+typedef CALLBACK_API( void , TEFindWordProcPtr )(unsigned short currentPos, short caller, TEPtr pTE, TEHandle hTE, unsigned short *wordStart, unsigned short *wordEnd);
+typedef CALLBACK_API( void , TERecalcProcPtr )(TEPtr pTE, unsigned short changeLength, unsigned short *lineStart, unsigned short *firstChar, unsigned short *lastChar);
+typedef CALLBACK_API( void , TEDoTextProcPtr )(TEPtr pTE, unsigned short firstChar, unsigned short lastChar, short selector, GrafPtr *currentGrafPort, short *charPosition);
+typedef CALLBACK_API( Boolean , TEClickLoopProcPtr )(TEPtr pTE);
+/*
+ WARNING: TEClickLoopProcPtr uses register based parameters under classic 68k
+ and cannot be written in a high-level language without
+ the help of mixed mode or assembly glue.
+*/
+typedef CALLBACK_API( Boolean , WordBreakProcPtr )(Ptr text, short charPos);
+/*
+ WARNING: WordBreakProcPtr uses register based parameters under classic 68k
+ and cannot be written in a high-level language without
+ the help of mixed mode or assembly glue.
+*/
+/*
+ Important note about TEClickLoopProcPtr and WordBreakProcPtr
+
+ At one point these were defined as returning the function result in the
+ condition code Z-bit. This was correct, in that it was what the 68K
+ implementation of TextEdit actually tested. But, MixedMode had a different
+ idea of what returning a boolean in the Z-bit meant. MixedMode was setting
+ the Z-bit the complement of what was wanted.
+
+ Therefore, these ProcPtrs have been changed (back) to return the result in
+ register D0. It turns out that for register based routines,
+ MixedMode sets the Z-bit of the 68K emulator based on the contents
+ of the return result register. Thus we can get the Z-bit set correctly.
+
+ But, when TextEdit is recoded in PowerPC, if it calls a 68K ClickLoop
+ or WordBreak routine, register D0 had better have the result (in addition
+ to the Z-bit). Therefore all 68K apps should make sure their ClickLoop or
+ WordBreak routines set register D0 at the end.
+*/
+
+/*
+ There is no function to get/set the low-mem for FindWordHook at 0x07F8.
+ This is because it is not a low-mem ProcPtr. That address is the entry
+ in the OS TrapTable for trap 0xA0FE. You can use Get/SetTrapAddress to
+ acccess it.
+*/
+
+/*
+ The following ProcPtrs cannot be written in or called from a high-level
+ language without the help of mixed mode or assembly glue because they
+ use the following parameter-passing conventions:
+
+ typedef pascal void (*HighHookProcPtr)(const Rect *r, TEPtr pTE);
+ typedef pascal void (*CaretHookProcPtr)(const Rect *r, TEPtr pTE);
+
+ In:
+ => r on stack
+ => pTE A3.L
+ Out:
+ none
+
+ typedef pascal Boolean (*EOLHookProcPtr)(char theChar, TEPtr pTE, TEHandle hTE);
+
+ In:
+ => theChar D0.B
+ => pTE A3.L
+ => hTE A4.L
+ Out:
+ <= Boolean Z bit of the CCR
+
+ typedef pascal unsigned short (*WidthHookProcPtr)(unsigned short textLen,
+ unsigned short textOffset, void *textBufferPtr, TEPtr pTE, TEHandle hTE);
+ typedef pascal unsigned short (*TextWidthHookProcPtr)(unsigned short textLen,
+ unsigned short textOffset, void *textBufferPtr, TEPtr pTE, TEHandle hTE);
+
+ In:
+ => textLen D0.W
+ => textOffset D1.W
+ => textBufferPtr A0.L
+ => pTE A3.L
+ => hTE A4.L
+ Out:
+ <= unsigned short D1.W
+
+ typedef pascal unsigned short (*NWidthHookProcPtr)(unsigned short styleRunLen,
+ unsigned short styleRunOffset, short slop, short direction, void *textBufferPtr,
+ short *lineStart, TEPtr pTE, TEHandle hTE);
+
+ In:
+ => styleRunLen D0.W
+ => styleRunOffset D1.W
+ => slop D2.W (low)
+ => direction D2.W (high)
+ => textBufferPtr A0.L
+ => lineStart A2.L
+ => pTE A3.L
+ => hTE A4.L
+ Out:
+ <= unsigned short D1.W
+
+ typedef pascal void (*DrawHookProcPtr)(unsigned short textOffset, unsigned short drawLen,
+ void *textBufferPtr, TEPtr pTE, TEHandle hTE);
+
+ In:
+ => textOffset D0.W
+ => drawLen D1.W
+ => textBufferPtr A0.L
+ => pTE A3.L
+ => hTE A4.L
+ Out:
+ none
+
+ typedef pascal Boolean (*HitTestHookProcPtr)(unsigned short styleRunLen,
+ unsigned short styleRunOffset, unsigned short slop, void *textBufferPtr,
+ TEPtr pTE, TEHandle hTE, unsigned short *pixelWidth, unsigned short *charOffset,
+ Boolean *pixelInChar);
+
+ In:
+ => styleRunLen D0.W
+ => styleRunOffset D1.W
+ => slop D2.W
+ => textBufferPtr A0.L
+ => pTE A3.L
+ => hTE A4.L
+ Out:
+ <= pixelWidth D0.W (low)
+ <= Boolean D0.W (high)
+ <= charOffset D1.W
+ <= pixelInChar D2.W
+
+ typedef pascal void (*TEFindWordProcPtr)(unsigned short currentPos, short caller,
+ TEPtr pTE, TEHandle hTE, unsigned short *wordStart, unsigned short *wordEnd);
+
+ In:
+ => currentPos D0.W
+ => caller D2.W
+ => pTE A3.L
+ => hTE A4.L
+ Out:
+ <= wordStart D0.W
+ <= wordEnd D1.W
+
+ typedef pascal void (*TERecalcProcPtr)(TEPtr pTE, unsigned short changeLength,
+ unsigned short *lineStart, unsigned short *firstChar, unsigned short *lastChar);
+
+ In:
+ => pTE A3.L
+ => changeLength D7.W
+ Out:
+ <= lineStart D2.W
+ <= firstChar D3.W
+ <= lastChar D4.W
+
+ typedef pascal void (*TEDoTextProcPtr)(TEPtr pTE, unsigned short firstChar, unsigned short lastChar,
+ short selector, GrafPtr *currentGrafPort, short *charPosition);
+
+ In:
+ => pTE A3.L
+ => firstChar D3.W
+ => lastChar D4.W
+ => selector D7.W
+ Out:
+ <= currentGrafPort A0.L
+ <= charPosition D0.W
+
+*/
+typedef STACK_UPP_TYPE(HighHookProcPtr) HighHookUPP;
+typedef STACK_UPP_TYPE(EOLHookProcPtr) EOLHookUPP;
+typedef STACK_UPP_TYPE(CaretHookProcPtr) CaretHookUPP;
+typedef STACK_UPP_TYPE(WidthHookProcPtr) WidthHookUPP;
+typedef STACK_UPP_TYPE(TextWidthHookProcPtr) TextWidthHookUPP;
+typedef STACK_UPP_TYPE(NWidthHookProcPtr) NWidthHookUPP;
+typedef STACK_UPP_TYPE(DrawHookProcPtr) DrawHookUPP;
+typedef STACK_UPP_TYPE(HitTestHookProcPtr) HitTestHookUPP;
+typedef STACK_UPP_TYPE(TEFindWordProcPtr) TEFindWordUPP;
+typedef STACK_UPP_TYPE(TERecalcProcPtr) TERecalcUPP;
+typedef STACK_UPP_TYPE(TEDoTextProcPtr) TEDoTextUPP;
+typedef REGISTER_UPP_TYPE(TEClickLoopProcPtr) TEClickLoopUPP;
+typedef REGISTER_UPP_TYPE(WordBreakProcPtr) WordBreakUPP;
+
+struct TERec {
+ Rect destRect;
+ Rect viewRect;
+ Rect selRect;
+ short lineHeight;
+ short fontAscent;
+ Point selPoint;
+ short selStart;
+ short selEnd;
+ short active;
+ WordBreakUPP wordBreak; /* NOTE: This field is ignored on non-Roman systems and on Carbon (see IM-Text 2-60) */
+ TEClickLoopUPP clickLoop;
+ long clickTime;
+ short clickLoc;
+ long caretTime;
+ short caretState;
+ short just;
+ short teLength;
+ Handle hText;
+ long hDispatchRec; /* added to replace recalBack & recalLines. it's a handle anyway */
+ short clikStuff;
+ short crOnly;
+ 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;
+ GrafPtr inPort;
+ HighHookUPP highHook;
+ CaretHookUPP caretHook;
+ short nLines;
+ short lineStarts[16001];
+};
+
+enum {
+ /* Justification (word alignment) styles */
+ teJustLeft = 0,
+ teJustCenter = 1,
+ teJustRight = -1,
+ teForceLeft = -2, /* new names for the Justification (word alignment) styles */
+ teFlushDefault = 0, /*flush according to the line direction */
+ teCenter = 1, /*center justify (word alignment) */
+ teFlushRight = -1, /*flush right for all scripts */
+ teFlushLeft = -2 /*flush left for all scripts */
+};
+
+enum {
+ /* Set/Replace style modes */
+ fontBit = 0, /*set font*/
+ faceBit = 1, /*set face*/
+ sizeBit = 2, /*set size*/
+ clrBit = 3, /*set color*/
+ addSizeBit = 4, /*add size mode*/
+ toggleBit = 5 /*set faces in toggle mode*/
+};
+
+enum {
+ /* TESetStyle/TEContinuousStyle modes */
+ doFont = 1, /* set font (family) number*/
+ doFace = 2, /*set character style*/
+ doSize = 4, /*set type size*/
+ doColor = 8, /*set color*/
+ doAll = 15, /*set all attributes*/
+ addSize = 16, /*adjust type size*/
+ doToggle = 32 /*toggle mode for TESetStyle*/
+};
+
+enum {
+ /* offsets into TEDispatchRec */
+ EOLHook = 0, /*[UniversalProcPtr] TEEOLHook*/
+ DRAWHook = 4, /*[UniversalProcPtr] TEWidthHook*/
+ WIDTHHook = 8, /*[UniversalProcPtr] TEDrawHook*/
+ HITTESTHook = 12, /*[UniversalProcPtr] TEHitTestHook*/
+ nWIDTHHook = 24, /*[UniversalProcPtr] nTEWidthHook*/
+ TextWidthHook = 28 /*[UniversalProcPtr] TETextWidthHook*/
+};
+
+enum {
+ /* selectors for TECustomHook */
+ intEOLHook = 0, /*TEIntHook value*/
+ intDrawHook = 1, /*TEIntHook value*/
+ intWidthHook = 2, /*TEIntHook value*/
+ intHitTestHook = 3, /*TEIntHook value*/
+ intNWidthHook = 6, /*TEIntHook value for new version of WidthHook*/
+ intTextWidthHook = 7, /*TEIntHook value for new TextWidthHook*/
+ intInlineInputTSMTEPreUpdateHook = 8, /*TEIntHook value for TSMTEPreUpdateProcPtr callback*/
+ intInlineInputTSMTEPostUpdateHook = 9 /*TEIntHook value for TSMTEPostUpdateProcPtr callback*/
+};
+
+enum {
+ /* feature or bit definitions for TEFeatureFlag */
+ teFAutoScroll = 0, /*00000001b*/
+ teFTextBuffering = 1, /*00000010b*/
+ teFOutlineHilite = 2, /*00000100b*/
+ teFInlineInput = 3, /*00001000b */
+ teFUseWhiteBackground = 4, /*00010000b */
+ teFUseInlineInput = 5, /*00100000b */
+ teFInlineInputAutoScroll = 6 /*01000000b */
+};
+
+enum {
+ /* action for the new "bit (un)set" interface, TEFeatureFlag */
+ teBitClear = 0,
+ teBitSet = 1, /*set the selector bit*/
+ teBitTest = -1 /*no change; just return the current setting*/
+};
+
+enum {
+ /*constants for identifying the routine that called FindWord */
+ teWordSelect = 4, /*clickExpand to select word*/
+ teWordDrag = 8, /*clickExpand to drag new word*/
+ teFromFind = 12, /*FindLine called it ($0C)*/
+ teFromRecal = 16 /*RecalLines called it ($10) obsolete */
+};
+
+enum {
+ /*constants for identifying TEDoText selectors */
+ teFind = 0, /*TEDoText called for searching*/
+ teHighlight = 1, /*TEDoText called for highlighting*/
+ teDraw = -1, /*TEDoText called for drawing text*/
+ teCaret = -2 /*TEDoText called for drawing the caret*/
+};
+
+
+typedef char Chars[32001];
+typedef char * CharsPtr;
+typedef CharsPtr * CharsHandle;
+
+struct StyleRun {
+ short startChar; /*starting character position*/
+ short styleIndex; /*index in style table*/
+};
+typedef struct StyleRun StyleRun;
+
+struct STElement {
+ short stCount; /*number of runs in this style*/
+ short stHeight; /*line height*/
+ short stAscent; /*font ascent*/
+ short stFont; /*font (family) number*/
+ StyleField stFace; /*StyleField occupies 16-bits, but only first 8-bits are used*/
+ UInt8 txFlags; /* QuickTime uses second 8 bits of StyleField for txFlags */
+ short stSize; /*size in points*/
+ RGBColor stColor; /*absolute (RGB) color*/
+};
+typedef struct STElement STElement;
+
+typedef STElement TEStyleTable[1777];
+typedef STElement * STPtr;
+typedef STPtr * STHandle;
+
+struct LHElement {
+ short lhHeight; /*maximum height in line*/
+ short lhAscent; /*maximum ascent in line*/
+};
+typedef struct LHElement LHElement;
+
+typedef LHElement LHTable[8001];
+typedef LHElement * LHPtr;
+typedef LHPtr * LHHandle;
+
+struct ScrpSTElement {
+ long scrpStartChar; /*starting character position*/
+ short scrpHeight;
+ short scrpAscent;
+ short scrpFont;
+ StyleField scrpFace; /*StyleField occupies 16-bits, but only first 8-bits are used*/
+ UInt8 txFlags; /* QuickTime uses second 8 bits of StyleField for txFlags */
+ short scrpSize;
+ RGBColor scrpColor;
+};
+typedef struct ScrpSTElement ScrpSTElement;
+/* ARRAY [0..1600] OF ScrpSTElement */
+
+typedef ScrpSTElement ScrpSTTable[1601];
+
+struct StScrpRec {
+ short scrpNStyles; /*number of styles in scrap*/
+ ScrpSTTable scrpStyleTab; /*table of styles for scrap*/
+};
+typedef struct StScrpRec StScrpRec;
+
+typedef StScrpRec * StScrpPtr;
+typedef StScrpPtr * StScrpHandle;
+
+struct NullStRec {
+ long teReserved; /*reserved for future expansion*/
+ StScrpHandle nullScrap; /*handle to scrap style table*/
+};
+typedef struct NullStRec NullStRec;
+
+typedef NullStRec * NullStPtr;
+typedef NullStPtr * NullStHandle;
+
+struct TEStyleRec {
+ short nRuns; /*number of style runs*/
+ short nStyles; /*size of style table*/
+ STHandle styleTab; /*handle to style table*/
+ LHHandle lhTab; /*handle to line-height table*/
+ long teRefCon; /*reserved for application use*/
+ NullStHandle nullStyle; /*Handle to style set at null selection*/
+ StyleRun runs[8001]; /*ARRAY [0..8000] OF StyleRun*/
+};
+typedef struct TEStyleRec TEStyleRec;
+
+typedef TEStyleRec * TEStylePtr;
+typedef TEStylePtr * TEStyleHandle;
+
+struct TextStyle {
+ short tsFont; /*font (family) number*/
+ StyleField tsFace; /*StyleField occupies 16-bits, but only first 8-bits are used*/
+ UInt8 txFlags; /*QuickTime uses second 8 bits of StyleField for txFlags*/
+ short tsSize; /*size in point*/
+ RGBColor tsColor; /*absolute (RGB) color*/
+};
+typedef struct TextStyle TextStyle;
+typedef TextStyle * TextStylePtr;
+typedef TextStylePtr * TextStyleHandle;
+
+typedef short TEIntHook;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(HighHookUPP)
+ NewHighHookUPP (HighHookProcPtr userRoutine);
+
+ EXTERN_API(EOLHookUPP)
+ NewEOLHookUPP (EOLHookProcPtr userRoutine);
+
+ EXTERN_API(CaretHookUPP)
+ NewCaretHookUPP (CaretHookProcPtr userRoutine);
+
+ EXTERN_API(WidthHookUPP)
+ NewWidthHookUPP (WidthHookProcPtr userRoutine);
+
+ EXTERN_API(TextWidthHookUPP)
+ NewTextWidthHookUPP (TextWidthHookProcPtr userRoutine);
+
+ EXTERN_API(NWidthHookUPP)
+ NewNWidthHookUPP (NWidthHookProcPtr userRoutine);
+
+ EXTERN_API(DrawHookUPP)
+ NewDrawHookUPP (DrawHookProcPtr userRoutine);
+
+ EXTERN_API(HitTestHookUPP)
+ NewHitTestHookUPP (HitTestHookProcPtr userRoutine);
+
+ EXTERN_API(TEFindWordUPP)
+ NewTEFindWordUPP (TEFindWordProcPtr userRoutine);
+
+ EXTERN_API(TERecalcUPP)
+ NewTERecalcUPP (TERecalcProcPtr userRoutine);
+
+ EXTERN_API(TEDoTextUPP)
+ NewTEDoTextUPP (TEDoTextProcPtr userRoutine);
+
+ EXTERN_API(TEClickLoopUPP)
+ NewTEClickLoopUPP (TEClickLoopProcPtr userRoutine);
+
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(WordBreakUPP)
+ NewWordBreakUPP (WordBreakProcPtr userRoutine);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ EXTERN_API(void)
+ DisposeHighHookUPP (HighHookUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeEOLHookUPP (EOLHookUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeCaretHookUPP (CaretHookUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeWidthHookUPP (WidthHookUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeTextWidthHookUPP (TextWidthHookUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeNWidthHookUPP (NWidthHookUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeDrawHookUPP (DrawHookUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeHitTestHookUPP (HitTestHookUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeTEFindWordUPP (TEFindWordUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeTERecalcUPP (TERecalcUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeTEDoTextUPP (TEDoTextUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeTEClickLoopUPP (TEClickLoopUPP userUPP);
+
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(void)
+ DisposeWordBreakUPP (WordBreakUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+ EXTERN_API(void)
+ InvokeHighHookUPP (const Rect * r,
+ TEPtr pTE,
+ HighHookUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeEOLHookUPP (char theChar,
+ TEPtr pTE,
+ TEHandle hTE,
+ EOLHookUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeCaretHookUPP (const Rect * r,
+ TEPtr pTE,
+ CaretHookUPP userUPP);
+
+ EXTERN_API(unsigned short)
+ InvokeWidthHookUPP (unsigned short textLen,
+ unsigned short textOffset,
+ void * textBufferPtr,
+ TEPtr pTE,
+ TEHandle hTE,
+ WidthHookUPP userUPP);
+
+ EXTERN_API(unsigned short)
+ InvokeTextWidthHookUPP (unsigned short textLen,
+ unsigned short textOffset,
+ void * textBufferPtr,
+ TEPtr pTE,
+ TEHandle hTE,
+ TextWidthHookUPP userUPP);
+
+ EXTERN_API(unsigned short)
+ InvokeNWidthHookUPP (unsigned short styleRunLen,
+ unsigned short styleRunOffset,
+ short slop,
+ short direction,
+ void * textBufferPtr,
+ short * lineStart,
+ TEPtr pTE,
+ TEHandle hTE,
+ NWidthHookUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeDrawHookUPP (unsigned short textOffset,
+ unsigned short drawLen,
+ void * textBufferPtr,
+ TEPtr pTE,
+ TEHandle hTE,
+ DrawHookUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeHitTestHookUPP (unsigned short styleRunLen,
+ unsigned short styleRunOffset,
+ unsigned short slop,
+ void * textBufferPtr,
+ TEPtr pTE,
+ TEHandle hTE,
+ unsigned short * pixelWidth,
+ unsigned short * charOffset,
+ Boolean * pixelInChar,
+ HitTestHookUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeTEFindWordUPP (unsigned short currentPos,
+ short caller,
+ TEPtr pTE,
+ TEHandle hTE,
+ unsigned short * wordStart,
+ unsigned short * wordEnd,
+ TEFindWordUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeTERecalcUPP (TEPtr pTE,
+ unsigned short changeLength,
+ unsigned short * lineStart,
+ unsigned short * firstChar,
+ unsigned short * lastChar,
+ TERecalcUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeTEDoTextUPP (TEPtr pTE,
+ unsigned short firstChar,
+ unsigned short lastChar,
+ short selector,
+ GrafPtr * currentGrafPort,
+ short * charPosition,
+ TEDoTextUPP userUPP);
+
+ EXTERN_API(Boolean)
+ InvokeTEClickLoopUPP (TEPtr pTE,
+ TEClickLoopUPP userUPP);
+
+#if CALL_NOT_IN_CARBON
+ EXTERN_API(Boolean)
+ InvokeWordBreakUPP (Ptr text,
+ short charPos,
+ WordBreakUPP userUPP);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+ enum { uppHighHookProcInfo = 0x0000000F }; /* SPECIAL_CASE_PROCINFO(0) */
+ enum { uppEOLHookProcInfo = 0x0000001F }; /* SPECIAL_CASE_PROCINFO(1) */
+ enum { uppCaretHookProcInfo = 0x0000000F }; /* SPECIAL_CASE_PROCINFO(0) */
+ enum { uppWidthHookProcInfo = 0x0000002F }; /* SPECIAL_CASE_PROCINFO(2) */
+ enum { uppTextWidthHookProcInfo = 0x0000002F }; /* SPECIAL_CASE_PROCINFO(2) */
+ enum { uppNWidthHookProcInfo = 0x0000003F }; /* SPECIAL_CASE_PROCINFO(3) */
+ enum { uppDrawHookProcInfo = 0x0000004F }; /* SPECIAL_CASE_PROCINFO(4) */
+ enum { uppHitTestHookProcInfo = 0x0000005F }; /* SPECIAL_CASE_PROCINFO(5) */
+ enum { uppTEFindWordProcInfo = 0x0000006F }; /* SPECIAL_CASE_PROCINFO(6) */
+ enum { uppTERecalcProcInfo = 0x0000009F }; /* SPECIAL_CASE_PROCINFO(9) */
+ enum { uppTEDoTextProcInfo = 0x000000AF }; /* SPECIAL_CASE_PROCINFO(10) */
+ enum { uppTEClickLoopProcInfo = 0x0000F812 }; /* register 1_byte:D0 Func(4_bytes:A3) */
+ enum { uppWordBreakProcInfo = 0x00029812 }; /* register 1_byte:D0 Func(4_bytes:A0, 2_bytes:D0) */
+ #define NewHighHookUPP(userRoutine) (HighHookUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppHighHookProcInfo, GetCurrentArchitecture())
+ #define NewEOLHookUPP(userRoutine) (EOLHookUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppEOLHookProcInfo, GetCurrentArchitecture())
+ #define NewCaretHookUPP(userRoutine) (CaretHookUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCaretHookProcInfo, GetCurrentArchitecture())
+ #define NewWidthHookUPP(userRoutine) (WidthHookUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppWidthHookProcInfo, GetCurrentArchitecture())
+ #define NewTextWidthHookUPP(userRoutine) (TextWidthHookUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTextWidthHookProcInfo, GetCurrentArchitecture())
+ #define NewNWidthHookUPP(userRoutine) (NWidthHookUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNWidthHookProcInfo, GetCurrentArchitecture())
+ #define NewDrawHookUPP(userRoutine) (DrawHookUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDrawHookProcInfo, GetCurrentArchitecture())
+ #define NewHitTestHookUPP(userRoutine) (HitTestHookUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppHitTestHookProcInfo, GetCurrentArchitecture())
+ #define NewTEFindWordUPP(userRoutine) (TEFindWordUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTEFindWordProcInfo, GetCurrentArchitecture())
+ #define NewTERecalcUPP(userRoutine) (TERecalcUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTERecalcProcInfo, GetCurrentArchitecture())
+ #define NewTEDoTextUPP(userRoutine) (TEDoTextUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTEDoTextProcInfo, GetCurrentArchitecture())
+ #define NewTEClickLoopUPP(userRoutine) (TEClickLoopUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTEClickLoopProcInfo, GetCurrentArchitecture())
+ #define NewWordBreakUPP(userRoutine) (WordBreakUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppWordBreakProcInfo, GetCurrentArchitecture())
+ #define DisposeHighHookUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeEOLHookUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeCaretHookUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeWidthHookUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeTextWidthHookUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeNWidthHookUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeDrawHookUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeHitTestHookUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeTEFindWordUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeTERecalcUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeTEDoTextUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeTEClickLoopUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define DisposeWordBreakUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeHighHookUPP(r, pTE, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppHighHookProcInfo, (r), (pTE))
+ #define InvokeEOLHookUPP(theChar, pTE, hTE, userUPP) (Boolean)CALL_THREE_PARAMETER_UPP((userUPP), uppEOLHookProcInfo, (theChar), (pTE), (hTE))
+ #define InvokeCaretHookUPP(r, pTE, userUPP) CALL_TWO_PARAMETER_UPP((userUPP), uppCaretHookProcInfo, (r), (pTE))
+ #define InvokeWidthHookUPP(textLen, textOffset, textBufferPtr, pTE, hTE, userUPP) (unsigned short)CALL_FIVE_PARAMETER_UPP((userUPP), uppWidthHookProcInfo, (textLen), (textOffset), (textBufferPtr), (pTE), (hTE))
+ #define InvokeTextWidthHookUPP(textLen, textOffset, textBufferPtr, pTE, hTE, userUPP) (unsigned short)CALL_FIVE_PARAMETER_UPP((userUPP), uppTextWidthHookProcInfo, (textLen), (textOffset), (textBufferPtr), (pTE), (hTE))
+ #define InvokeNWidthHookUPP(styleRunLen, styleRunOffset, slop, direction, textBufferPtr, lineStart, pTE, hTE, userUPP) (unsigned short)CALL_EIGHT_PARAMETER_UPP((userUPP), uppNWidthHookProcInfo, (styleRunLen), (styleRunOffset), (slop), (direction), (textBufferPtr), (lineStart), (pTE), (hTE))
+ #define InvokeDrawHookUPP(textOffset, drawLen, textBufferPtr, pTE, hTE, userUPP) CALL_FIVE_PARAMETER_UPP((userUPP), uppDrawHookProcInfo, (textOffset), (drawLen), (textBufferPtr), (pTE), (hTE))
+ #define InvokeHitTestHookUPP(styleRunLen, styleRunOffset, slop, textBufferPtr, pTE, hTE, pixelWidth, charOffset, pixelInChar, userUPP) (Boolean)CALL_NINE_PARAMETER_UPP((userUPP), uppHitTestHookProcInfo, (styleRunLen), (styleRunOffset), (slop), (textBufferPtr), (pTE), (hTE), (pixelWidth), (charOffset), (pixelInChar))
+ #define InvokeTEFindWordUPP(currentPos, caller, pTE, hTE, wordStart, wordEnd, userUPP) CALL_SIX_PARAMETER_UPP((userUPP), uppTEFindWordProcInfo, (currentPos), (caller), (pTE), (hTE), (wordStart), (wordEnd))
+ #define InvokeTERecalcUPP(pTE, changeLength, lineStart, firstChar, lastChar, userUPP) CALL_FIVE_PARAMETER_UPP((userUPP), uppTERecalcProcInfo, (pTE), (changeLength), (lineStart), (firstChar), (lastChar))
+ #define InvokeTEDoTextUPP(pTE, firstChar, lastChar, selector, currentGrafPort, charPosition, userUPP) CALL_SIX_PARAMETER_UPP((userUPP), uppTEDoTextProcInfo, (pTE), (firstChar), (lastChar), (selector), (currentGrafPort), (charPosition))
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ /* InvokeTEClickLoopUPP can't be called from classic 68k without glue code */
+ #else
+ #define InvokeTEClickLoopUPP(pTE, userUPP) (Boolean)CALL_ONE_PARAMETER_UPP((userUPP), uppTEClickLoopProcInfo, (pTE))
+ #endif
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 InvokeWordBreakUPP(__A0, __D0, __A1)
+ Boolean InvokeWordBreakUPP(Ptr text, short charPos, WordBreakUPP userUPP) = 0x4E91;
+ #else
+ #define InvokeWordBreakUPP(text, charPos, userUPP) (Boolean)CALL_TWO_PARAMETER_UPP((userUPP), uppWordBreakProcInfo, (text), (charPos))
+ #endif
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewHighHookProc(userRoutine) NewHighHookUPP(userRoutine)
+#define NewEOLHookProc(userRoutine) NewEOLHookUPP(userRoutine)
+#define NewCaretHookProc(userRoutine) NewCaretHookUPP(userRoutine)
+#define NewWidthHookProc(userRoutine) NewWidthHookUPP(userRoutine)
+#define NewTextWidthHookProc(userRoutine) NewTextWidthHookUPP(userRoutine)
+#define NewNWidthHookProc(userRoutine) NewNWidthHookUPP(userRoutine)
+#define NewDrawHookProc(userRoutine) NewDrawHookUPP(userRoutine)
+#define NewHitTestHookProc(userRoutine) NewHitTestHookUPP(userRoutine)
+#define NewTEFindWordProc(userRoutine) NewTEFindWordUPP(userRoutine)
+#define NewTERecalcProc(userRoutine) NewTERecalcUPP(userRoutine)
+#define NewTEDoTextProc(userRoutine) NewTEDoTextUPP(userRoutine)
+#define NewTEClickLoopProc(userRoutine) NewTEClickLoopUPP(userRoutine)
+#define NewWordBreakProc(userRoutine) NewWordBreakUPP(userRoutine)
+#define CallHighHookProc(userRoutine, r, pTE) InvokeHighHookUPP(r, pTE, userRoutine)
+#define CallEOLHookProc(userRoutine, theChar, pTE, hTE) InvokeEOLHookUPP(theChar, pTE, hTE, userRoutine)
+#define CallCaretHookProc(userRoutine, r, pTE) InvokeCaretHookUPP(r, pTE, userRoutine)
+#define CallWidthHookProc(userRoutine, textLen, textOffset, textBufferPtr, pTE, hTE) InvokeWidthHookUPP(textLen, textOffset, textBufferPtr, pTE, hTE, userRoutine)
+#define CallTextWidthHookProc(userRoutine, textLen, textOffset, textBufferPtr, pTE, hTE) InvokeTextWidthHookUPP(textLen, textOffset, textBufferPtr, pTE, hTE, userRoutine)
+#define CallNWidthHookProc(userRoutine, styleRunLen, styleRunOffset, slop, direction, textBufferPtr, lineStart, pTE, hTE) InvokeNWidthHookUPP(styleRunLen, styleRunOffset, slop, direction, textBufferPtr, lineStart, pTE, hTE, userRoutine)
+#define CallDrawHookProc(userRoutine, textOffset, drawLen, textBufferPtr, pTE, hTE) InvokeDrawHookUPP(textOffset, drawLen, textBufferPtr, pTE, hTE, userRoutine)
+#define CallHitTestHookProc(userRoutine, styleRunLen, styleRunOffset, slop, textBufferPtr, pTE, hTE, pixelWidth, charOffset, pixelInChar) InvokeHitTestHookUPP(styleRunLen, styleRunOffset, slop, textBufferPtr, pTE, hTE, pixelWidth, charOffset, pixelInChar, userRoutine)
+#define CallTEFindWordProc(userRoutine, currentPos, caller, pTE, hTE, wordStart, wordEnd) InvokeTEFindWordUPP(currentPos, caller, pTE, hTE, wordStart, wordEnd, userRoutine)
+#define CallTERecalcProc(userRoutine, pTE, changeLength, lineStart, firstChar, lastChar) InvokeTERecalcUPP(pTE, changeLength, lineStart, firstChar, lastChar, userRoutine)
+#define CallTEDoTextProc(userRoutine, pTE, firstChar, lastChar, selector, currentGrafPort, charPosition) InvokeTEDoTextUPP(pTE, firstChar, lastChar, selector, currentGrafPort, charPosition, userRoutine)
+#define CallTEClickLoopProc(userRoutine, pTE) InvokeTEClickLoopUPP(pTE, userRoutine)
+#define CallWordBreakProc(userRoutine, text, charPos) InvokeWordBreakUPP(text, charPos, userRoutine)
+enum {
+ /* feature bit 4 for TEFeatureFlag no longer in use */
+ teFUseTextServices = 4 /*00010000b */
+};
+
+
+#if OLDROUTINENAMES
+/* action for the old C "bit (un)set" interface, TEFeatureFlag */
+#define TEBitClear teBitClear
+#define TEBitSet teBitSet
+#define TEBitTest teBitTest
+#define teFAutoScr teFAutoScroll
+#define toglBit toggleBit
+#endif /* OLDROUTINENAMES */
+
+EXTERN_API( Handle )
+TEScrapHandle (void) TWOWORDINLINE(0x2EB8, 0x0AB4);
+
+
+EXTERN_API( long )
+TEGetScrapLength (void);
+
+#if TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+#define TEGetScrapLength() ((long) * (unsigned short *) 0x0AB0)
+#endif
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+TEInit (void) ONEWORDINLINE(0xA9CC);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( TEHandle )
+TENew (const Rect * destRect,
+ const Rect * viewRect) ONEWORDINLINE(0xA9D2);
+
+EXTERN_API( void )
+TEDispose (TEHandle hTE) ONEWORDINLINE(0xA9CD);
+
+EXTERN_API( void )
+TESetText (const void * text,
+ long length,
+ TEHandle hTE) ONEWORDINLINE(0xA9CF);
+
+EXTERN_API( CharsHandle )
+TEGetText (TEHandle hTE) ONEWORDINLINE(0xA9CB);
+
+EXTERN_API( void )
+TEIdle (TEHandle hTE) ONEWORDINLINE(0xA9DA);
+
+EXTERN_API( void )
+TESetSelect (long selStart,
+ long selEnd,
+ TEHandle hTE) ONEWORDINLINE(0xA9D1);
+
+EXTERN_API( void )
+TEActivate (TEHandle hTE) ONEWORDINLINE(0xA9D8);
+
+EXTERN_API( void )
+TEDeactivate (TEHandle hTE) ONEWORDINLINE(0xA9D9);
+
+EXTERN_API( void )
+TEKey (CharParameter key,
+ TEHandle hTE) ONEWORDINLINE(0xA9DC);
+
+EXTERN_API( void )
+TECut (TEHandle hTE) ONEWORDINLINE(0xA9D6);
+
+EXTERN_API( void )
+TECopy (TEHandle hTE) ONEWORDINLINE(0xA9D5);
+
+EXTERN_API( void )
+TEPaste (TEHandle hTE) ONEWORDINLINE(0xA9DB);
+
+EXTERN_API( void )
+TEDelete (TEHandle hTE) ONEWORDINLINE(0xA9D7);
+
+EXTERN_API( void )
+TEInsert (const void * text,
+ long length,
+ TEHandle hTE) ONEWORDINLINE(0xA9DE);
+
+EXTERN_API( void )
+TESetAlignment (short just,
+ TEHandle hTE) ONEWORDINLINE(0xA9DF);
+
+EXTERN_API( void )
+TEUpdate (const Rect * rUpdate,
+ TEHandle hTE) ONEWORDINLINE(0xA9D3);
+
+EXTERN_API( void )
+TETextBox (const void * text,
+ long length,
+ const Rect * box,
+ short just) ONEWORDINLINE(0xA9CE);
+
+EXTERN_API( void )
+TEScroll (short dh,
+ short dv,
+ TEHandle hTE) ONEWORDINLINE(0xA9DD);
+
+EXTERN_API( void )
+TESelView (TEHandle hTE) ONEWORDINLINE(0xA811);
+
+EXTERN_API( void )
+TEPinScroll (short dh,
+ short dv,
+ TEHandle hTE) ONEWORDINLINE(0xA812);
+
+EXTERN_API( void )
+TEAutoView (Boolean fAuto,
+ TEHandle hTE) ONEWORDINLINE(0xA813);
+
+EXTERN_API( void )
+TECalText (TEHandle hTE) ONEWORDINLINE(0xA9D0);
+
+EXTERN_API( short )
+TEGetOffset (Point pt,
+ TEHandle hTE) ONEWORDINLINE(0xA83C);
+
+EXTERN_API( Point )
+TEGetPoint (short offset,
+ TEHandle hTE) THREEWORDINLINE(0x3F3C, 0x0008, 0xA83D);
+
+EXTERN_API( void )
+TEClick (Point pt,
+ Boolean fExtend,
+ TEHandle h) ONEWORDINLINE(0xA9D4);
+
+EXTERN_API( TEHandle )
+TEStyleNew (const Rect * destRect,
+ const Rect * viewRect) ONEWORDINLINE(0xA83E);
+
+EXTERN_API( void )
+TESetStyleHandle (TEStyleHandle theHandle,
+ TEHandle hTE) THREEWORDINLINE(0x3F3C, 0x0005, 0xA83D);
+
+EXTERN_API( TEStyleHandle )
+TEGetStyleHandle (TEHandle hTE) THREEWORDINLINE(0x3F3C, 0x0004, 0xA83D);
+
+EXTERN_API( void )
+TEGetStyle (short offset,
+ TextStyle * theStyle,
+ short * lineHeight,
+ short * fontAscent,
+ TEHandle hTE) THREEWORDINLINE(0x3F3C, 0x0003, 0xA83D);
+
+EXTERN_API( void )
+TEStylePaste (TEHandle hTE) THREEWORDINLINE(0x3F3C, 0x0000, 0xA83D);
+
+EXTERN_API( void )
+TESetStyle (short mode,
+ const TextStyle * newStyle,
+ Boolean fRedraw,
+ TEHandle hTE) THREEWORDINLINE(0x3F3C, 0x0001, 0xA83D);
+
+EXTERN_API( void )
+TEReplaceStyle (short mode,
+ const TextStyle * oldStyle,
+ const TextStyle * newStyle,
+ Boolean fRedraw,
+ TEHandle hTE) THREEWORDINLINE(0x3F3C, 0x0002, 0xA83D);
+
+EXTERN_API( StScrpHandle )
+TEGetStyleScrapHandle (TEHandle hTE) THREEWORDINLINE(0x3F3C, 0x0006, 0xA83D);
+
+EXTERN_API( void )
+TEStyleInsert (const void * text,
+ long length,
+ StScrpHandle hST,
+ TEHandle hTE) THREEWORDINLINE(0x3F3C, 0x0007, 0xA83D);
+
+EXTERN_API( long )
+TEGetHeight (long endLine,
+ long startLine,
+ TEHandle hTE) THREEWORDINLINE(0x3F3C, 0x0009, 0xA83D);
+
+EXTERN_API( Boolean )
+TEContinuousStyle (short * mode,
+ TextStyle * aStyle,
+ TEHandle hTE) THREEWORDINLINE(0x3F3C, 0x000A, 0xA83D);
+
+EXTERN_API( void )
+TEUseStyleScrap (long rangeStart,
+ long rangeEnd,
+ StScrpHandle newStyles,
+ Boolean fRedraw,
+ TEHandle hTE) THREEWORDINLINE(0x3F3C, 0x000B, 0xA83D);
+
+EXTERN_API( void )
+TECustomHook (TEIntHook which,
+ UniversalProcPtr * addr,
+ TEHandle hTE) THREEWORDINLINE(0x3F3C, 0x000C, 0xA83D);
+
+EXTERN_API( long )
+TENumStyles (long rangeStart,
+ long rangeEnd,
+ TEHandle hTE) THREEWORDINLINE(0x3F3C, 0x000D, 0xA83D);
+
+EXTERN_API( short )
+TEFeatureFlag (short feature,
+ short action,
+ TEHandle hTE) THREEWORDINLINE(0x3F3C, 0x000E, 0xA83D);
+
+EXTERN_API( OSErr )
+TEGetHiliteRgn (RgnHandle region,
+ TEHandle hTE) THREEWORDINLINE(0x3F3C, 0x000F, 0xA83D);
+
+EXTERN_API( void )
+TESetScrapLength (long length);
+
+EXTERN_API( OSErr )
+TEFromScrap (void);
+
+EXTERN_API( OSErr )
+TEToScrap (void);
+
+EXTERN_API( void )
+TESetClickLoop (TEClickLoopUPP clikProc,
+ TEHandle hTE);
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+TESetWordBreak (WordBreakUPP wBrkProc,
+ TEHandle hTE);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+
+
+
+
+
+EXTERN_API( TEDoTextUPP )
+TEGetDoTextHook (void);
+
+EXTERN_API( void )
+TESetDoTextHook (TEDoTextUPP value);
+
+EXTERN_API( TERecalcUPP )
+TEGetRecalcHook (void);
+
+EXTERN_API( void )
+TESetRecalcHook (TERecalcUPP value);
+
+EXTERN_API( TEFindWordUPP )
+TEGetFindWordHook (void);
+
+EXTERN_API( void )
+TESetFindWordHook (TEFindWordUPP value);
+
+EXTERN_API( Handle )
+TEGetScrapHandle (void);
+
+EXTERN_API( void )
+TESetScrapHandle (Handle value);
+
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( void )
+teclick (Point * pt,
+ Boolean fExtend,
+ TEHandle h);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if OLDROUTINENAMES
+#define TESetJust(just, hTE) TESetAlignment(just, hTE)
+#define TextBox(text, length, box, just) TETextBox(text, length, box, just)
+#define TEStylNew(destRect, viewRect) TEStyleNew(destRect, viewRect)
+#define SetStylHandle(theHandle, hTE) TESetStyleHandle(theHandle, hTE)
+#define SetStyleHandle(theHandle, hTE) TESetStyleHandle (theHandle, hTE)
+#define GetStylHandle(hTE) TEGetStyleHandle(hTE)
+#define GetStyleHandle(hTE) TEGetStyleHandle(hTE)
+#define TEStylPaste(hTE) TEStylePaste(hTE)
+#define GetStylScrap(hTE) TEGetStyleScrapHandle(hTE)
+#define GetStyleScrap(hTE) TEGetStyleScrapHandle(hTE)
+#define SetStylScrap(rangeStart, rangeEnd, newStyles, redraw, hTE) TEUseStyleScrap(rangeStart, rangeEnd, newStyles, redraw, hTE)
+#define SetStyleScrap(rangeStart, rangeEnd, newStyles, redraw, hTE) TEUseStyleScrap(rangeStart, rangeEnd, newStyles, redraw, hTE)
+#define TEStylInsert(text, length, hST, hTE) TEStyleInsert(text, length, hST, hTE)
+#define TESetScrapLen(length) TESetScrapLength(length)
+#define TEGetScrapLen() TEGetScrapLength()
+#define SetClikLoop(clikProc, hTE) TESetClickLoop(clikProc, hTE)
+#define SetWordBreak(wBrkProc, hTE) TESetWordBreak(wBrkProc, hTE)
+#endif /* OLDROUTINENAMES */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __TEXTEDIT__ */
+
diff --git a/include/qt/TextEncodingConverter.h b/include/qt/TextEncodingConverter.h
new file mode 100644
index 000000000..b983569b6
--- /dev/null
+++ b/include/qt/TextEncodingConverter.h
@@ -0,0 +1,272 @@
+/*
+ File: TextEncodingConverter.h
+
+ Contains: Text Encoding Conversion Interfaces.
+
+ Version: Technology: Mac OS 9.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __TEXTENCODINGCONVERTER__
+#define __TEXTENCODINGCONVERTER__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __TEXTCOMMON__
+#include "TextCommon.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+typedef OSType TECPluginSignature;
+typedef UInt32 TECPluginVersion;
+/* plugin signatures */
+enum {
+ kTECSignature = FOUR_CHAR_CODE('encv'),
+ kTECUnicodePluginSignature = FOUR_CHAR_CODE('puni'),
+ kTECJapanesePluginSignature = FOUR_CHAR_CODE('pjpn'),
+ kTECChinesePluginSignature = FOUR_CHAR_CODE('pzho'),
+ kTECKoreanPluginSignature = FOUR_CHAR_CODE('pkor')
+};
+
+
+/* converter object reference */
+typedef struct OpaqueTECObjectRef* TECObjectRef;
+typedef struct OpaqueTECSnifferObjectRef* TECSnifferObjectRef;
+typedef OSType TECPluginSig;
+
+struct TECConversionInfo {
+ TextEncoding sourceEncoding;
+ TextEncoding destinationEncoding;
+ UInt16 reserved1;
+ UInt16 reserved2;
+};
+typedef struct TECConversionInfo TECConversionInfo;
+/* return number of encodings types supported by user's configuraton of the encoding converter */
+EXTERN_API( OSStatus )
+TECCountAvailableTextEncodings (ItemCount * numberEncodings);
+
+/* fill in an array of type TextEncoding passed in by the user with types of encodings the current configuration of the encoder can handle. */
+EXTERN_API( OSStatus )
+TECGetAvailableTextEncodings (TextEncoding availableEncodings[],
+ ItemCount maxAvailableEncodings,
+ ItemCount * actualAvailableEncodings);
+
+/* return number of from-to encoding conversion pairs supported */
+EXTERN_API( OSStatus )
+TECCountDirectTextEncodingConversions (ItemCount * numberOfEncodings);
+
+/* fill in an array of type TextEncodingPair passed in by the user with types of encoding pairs the current configuration of the encoder can handle. */
+EXTERN_API( OSStatus )
+TECGetDirectTextEncodingConversions (TECConversionInfo availableConversions[],
+ ItemCount maxAvailableConversions,
+ ItemCount * actualAvailableConversions);
+
+/* return number of encodings a given encoding can be converter into */
+EXTERN_API( OSStatus )
+TECCountDestinationTextEncodings (TextEncoding inputEncoding,
+ ItemCount * numberOfEncodings);
+
+/* fill in an array of type TextEncodingPair passed in by the user with types of encodings pairs the current configuration of the encoder can handle. */
+EXTERN_API( OSStatus )
+TECGetDestinationTextEncodings (TextEncoding inputEncoding,
+ TextEncoding destinationEncodings[],
+ ItemCount maxDestinationEncodings,
+ ItemCount * actualDestinationEncodings);
+
+/* get info about a text encoding */
+EXTERN_API( OSStatus )
+TECGetTextEncodingInternetName (TextEncoding textEncoding,
+ Str255 encodingName);
+
+EXTERN_API( OSStatus )
+TECGetTextEncodingFromInternetName (TextEncoding * textEncoding,
+ ConstStr255Param encodingName);
+
+/* create/dispose converters */
+EXTERN_API( OSStatus )
+TECCreateConverter (TECObjectRef * newEncodingConverter,
+ TextEncoding inputEncoding,
+ TextEncoding outputEncoding);
+
+EXTERN_API( OSStatus )
+TECCreateConverterFromPath (TECObjectRef * newEncodingConverter,
+ const TextEncoding inPath[],
+ ItemCount inEncodings);
+
+EXTERN_API( OSStatus )
+TECDisposeConverter (TECObjectRef newEncodingConverter);
+
+/* convert text encodings */
+EXTERN_API( OSStatus )
+TECClearConverterContextInfo (TECObjectRef encodingConverter);
+
+EXTERN_API( OSStatus )
+TECConvertText (TECObjectRef encodingConverter,
+ ConstTextPtr inputBuffer,
+ ByteCount inputBufferLength,
+ ByteCount * actualInputLength,
+ TextPtr outputBuffer,
+ ByteCount outputBufferLength,
+ ByteCount * actualOutputLength);
+
+EXTERN_API( OSStatus )
+TECFlushText (TECObjectRef encodingConverter,
+ TextPtr outputBuffer,
+ ByteCount outputBufferLength,
+ ByteCount * actualOutputLength);
+
+/* one-to-many routines */
+EXTERN_API( OSStatus )
+TECCountSubTextEncodings (TextEncoding inputEncoding,
+ ItemCount * numberOfEncodings);
+
+EXTERN_API( OSStatus )
+TECGetSubTextEncodings (TextEncoding inputEncoding,
+ TextEncoding subEncodings[],
+ ItemCount maxSubEncodings,
+ ItemCount * actualSubEncodings);
+
+EXTERN_API( OSStatus )
+TECGetEncodingList (TECObjectRef encodingConverter,
+ ItemCount * numEncodings,
+ Handle * encodingList);
+
+EXTERN_API( OSStatus )
+TECCreateOneToManyConverter (TECObjectRef * newEncodingConverter,
+ TextEncoding inputEncoding,
+ ItemCount numOutputEncodings,
+ const TextEncoding outputEncodings[]);
+
+EXTERN_API( OSStatus )
+TECConvertTextToMultipleEncodings (TECObjectRef encodingConverter,
+ ConstTextPtr inputBuffer,
+ ByteCount inputBufferLength,
+ ByteCount * actualInputLength,
+ TextPtr outputBuffer,
+ ByteCount outputBufferLength,
+ ByteCount * actualOutputLength,
+ TextEncodingRun outEncodingsBuffer[],
+ ItemCount maxOutEncodingRuns,
+ ItemCount * actualOutEncodingRuns);
+
+EXTERN_API( OSStatus )
+TECFlushMultipleEncodings (TECObjectRef encodingConverter,
+ TextPtr outputBuffer,
+ ByteCount outputBufferLength,
+ ByteCount * actualOutputLength,
+ TextEncodingRun outEncodingsBuffer[],
+ ItemCount maxOutEncodingRuns,
+ ItemCount * actualOutEncodingRuns);
+
+/* international internet info */
+EXTERN_API( OSStatus )
+TECCountWebTextEncodings (RegionCode locale,
+ ItemCount * numberEncodings);
+
+EXTERN_API( OSStatus )
+TECGetWebTextEncodings (RegionCode locale,
+ TextEncoding availableEncodings[],
+ ItemCount maxAvailableEncodings,
+ ItemCount * actualAvailableEncodings);
+
+EXTERN_API( OSStatus )
+TECCountMailTextEncodings (RegionCode locale,
+ ItemCount * numberEncodings);
+
+EXTERN_API( OSStatus )
+TECGetMailTextEncodings (RegionCode locale,
+ TextEncoding availableEncodings[],
+ ItemCount maxAvailableEncodings,
+ ItemCount * actualAvailableEncodings);
+
+/* examine text encodings */
+EXTERN_API( OSStatus )
+TECCountAvailableSniffers (ItemCount * numberOfEncodings);
+
+EXTERN_API( OSStatus )
+TECGetAvailableSniffers (TextEncoding availableSniffers[],
+ ItemCount maxAvailableSniffers,
+ ItemCount * actualAvailableSniffers);
+
+EXTERN_API( OSStatus )
+TECCreateSniffer (TECSnifferObjectRef * encodingSniffer,
+ TextEncoding testEncodings[],
+ ItemCount numTextEncodings);
+
+EXTERN_API( OSStatus )
+TECSniffTextEncoding (TECSnifferObjectRef encodingSniffer,
+ TextPtr inputBuffer,
+ ByteCount inputBufferLength,
+ TextEncoding testEncodings[],
+ ItemCount numTextEncodings,
+ ItemCount numErrsArray[],
+ ItemCount maxErrs,
+ ItemCount numFeaturesArray[],
+ ItemCount maxFeatures);
+
+EXTERN_API( OSStatus )
+TECDisposeSniffer (TECSnifferObjectRef encodingSniffer);
+
+EXTERN_API( OSStatus )
+TECClearSnifferContextInfo (TECSnifferObjectRef encodingSniffer);
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSStatus )
+TECSetBasicOptions (TECObjectRef encodingConverter,
+ OptionBits controlFlags);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __TEXTENCODINGCONVERTER__ */
+
diff --git a/include/qt/TextServices.h b/include/qt/TextServices.h
new file mode 100644
index 000000000..70e79479b
--- /dev/null
+++ b/include/qt/TextServices.h
@@ -0,0 +1,370 @@
+/*
+ File: TextServices.h
+
+ Contains: Text Services Manager Interfaces.
+
+ Version: Technology: System 8.2
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1991-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __TEXTSERVICES__
+#define __TEXTSERVICES__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __EVENTS__
+#include "Events.h"
+#endif
+
+#ifndef __MENUS__
+#include "Menus.h"
+#endif
+
+#ifndef __AEDATAMODEL__
+#include "AEDataModel.h"
+#endif
+
+#ifndef __AEREGISTRY__
+#include "AERegistry.h"
+#endif
+
+#ifndef __COMPONENTS__
+#include "Components.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ kTextService = FOUR_CHAR_CODE('tsvc'), /* component type for the component description */
+ kInputMethodService = FOUR_CHAR_CODE('inpm'), /* component subtype for the component description */
+ kTSMVersion = 0x0150 /* Version of the Text Services Manager is 1.5 */
+};
+
+enum {
+ kUnicodeDocument = FOUR_CHAR_CODE('udoc'), /* TSM Document type for Unicode-savvy application */
+ kUnicodeTextService = FOUR_CHAR_CODE('utsv') /* Component type for Unicode Text Service */
+};
+
+/* Language and Script constants*/
+enum {
+ kUnknownLanguage = 0xFFFF,
+ kUnknownScript = 0xFFFF,
+ kNeutralScript = 0xFFFF
+};
+
+
+enum {
+ /* Component Flags in ComponentDescription */
+ bTakeActiveEvent = 15, /* bit set if the component takes active event */
+ bHandleAERecording = 16, /* bit set if the component takes care of recording Apple Events <new in vers2.0> */
+ bScriptMask = 0x00007F00, /* bit 8 - 14 */
+ bLanguageMask = 0x000000FF, /* bit 0 - 7 */
+ bScriptLanguageMask = bScriptMask + bLanguageMask /* bit 0 - 14 */
+};
+
+enum {
+ /* Typing method property constants for Input Methods */
+ kIMJaTypingMethodProperty = FOUR_CHAR_CODE('jtyp'), /* Typing method property for Japanese input methods*/
+ kIMJaTypingMethodRoman = FOUR_CHAR_CODE('roma'), /* Roman typing*/
+ kIMJaTypingMethodKana = FOUR_CHAR_CODE('kana') /* Kana typing*/
+};
+
+enum {
+ /* Low level routines which are dispatched directly to the Component Manager */
+ kCMGetScriptLangSupport = 0x0001, /* Component Manager call selector 1 */
+ kCMInitiateTextService = 0x0002, /* Component Manager call selector 2 */
+ kCMTerminateTextService = 0x0003, /* Component Manager call selector 3 */
+ kCMActivateTextService = 0x0004, /* Component Manager call selector 4 */
+ kCMDeactivateTextService = 0x0005, /* Component Manager call selector 5 */
+ kCMTextServiceEvent = 0x0006, /* Component Manager call selector 6 */
+ kCMGetTextServiceMenu = 0x0007, /* Component Manager call selector 7 */
+ kCMTextServiceMenuSelect = 0x0008, /* Component Manager call selector 8 */
+ kCMFixTextService = 0x0009, /* Component Manager call selector 9 */
+ kCMSetTextServiceCursor = 0x000A, /* Component Manager call selector 10 */
+ kCMHidePaletteWindows = 0x000B, /* Component Manager call selector 11 */
+ kCMGetTextServiceProperty = 0x000C, /* Component Manager call selector 12 */
+ kCMSetTextServiceProperty = 0x000D /* Component Manager call selector 13 */
+};
+
+enum {
+ /* New low level routines which are dispatched directly to the Component Manager */
+ kCMUCTextServiceEvent = 0x000E /* Component Manager call selector 14 */
+};
+
+
+/* extract Script/Language code from Component flag ... */
+#define mGetScriptCode(cdRec) ((ScriptCode) ((cdRec.componentFlags & bScriptMask) >> 8))
+#define mGetLanguageCode(cdRec) ((LangCode) cdRec.componentFlags & bLanguageMask)
+
+/* New opaque definitions for types */
+typedef struct OpaqueTSMDocumentID* TSMDocumentID;
+typedef OSType InterfaceTypeList[1];
+
+/* Text Service Info List */
+
+struct TextServiceInfo {
+ Component fComponent;
+ Str255 fItemName;
+};
+typedef struct TextServiceInfo TextServiceInfo;
+typedef TextServiceInfo * TextServiceInfoPtr;
+
+struct TextServiceList {
+ short fTextServiceCount; /* number of entries in the 'fServices' array */
+ TextServiceInfo fServices[1]; /* Note: array of 'TextServiceInfo' records follows */
+};
+typedef struct TextServiceList TextServiceList;
+typedef TextServiceList * TextServiceListPtr;
+typedef TextServiceListPtr * TextServiceListHandle;
+
+struct ScriptLanguageRecord {
+ ScriptCode fScript;
+ LangCode fLanguage;
+};
+typedef struct ScriptLanguageRecord ScriptLanguageRecord;
+
+struct ScriptLanguageSupport {
+ short fScriptLanguageCount; /* number of entries in the 'fScriptLanguageArray' array */
+ ScriptLanguageRecord fScriptLanguageArray[1]; /* Note: array of 'ScriptLanguageRecord' records follows */
+};
+typedef struct ScriptLanguageSupport ScriptLanguageSupport;
+typedef ScriptLanguageSupport * ScriptLanguageSupportPtr;
+typedef ScriptLanguageSupportPtr * ScriptLanguageSupportHandle;
+/* High level TSM Doucment routines */
+EXTERN_API( OSErr )
+NewTSMDocument (short numOfInterface,
+ InterfaceTypeList supportedInterfaceTypes,
+ TSMDocumentID * idocID,
+ long refcon) TWOWORDINLINE(0x7000, 0xAA54);
+
+EXTERN_API( OSErr )
+DeleteTSMDocument (TSMDocumentID idocID) TWOWORDINLINE(0x7001, 0xAA54);
+
+EXTERN_API( OSErr )
+ActivateTSMDocument (TSMDocumentID idocID) TWOWORDINLINE(0x7002, 0xAA54);
+
+EXTERN_API( OSErr )
+DeactivateTSMDocument (TSMDocumentID idocID) TWOWORDINLINE(0x7003, 0xAA54);
+
+EXTERN_API( OSErr )
+FixTSMDocument (TSMDocumentID idocID) TWOWORDINLINE(0x7007, 0xAA54);
+
+EXTERN_API( OSErr )
+GetServiceList (short numOfInterface,
+ OSType * supportedInterfaceTypes,
+ TextServiceListHandle * serviceInfo,
+ long * seedValue) TWOWORDINLINE(0x7008, 0xAA54);
+
+EXTERN_API( OSErr )
+OpenTextService (TSMDocumentID idocID,
+ Component aComponent,
+ ComponentInstance * aComponentInstance) TWOWORDINLINE(0x7009, 0xAA54);
+
+EXTERN_API( OSErr )
+CloseTextService (TSMDocumentID idocID,
+ ComponentInstance aComponentInstance) TWOWORDINLINE(0x700A, 0xAA54);
+
+EXTERN_API( OSErr )
+SendAEFromTSMComponent (const AppleEvent * theAppleEvent,
+ AppleEvent * reply,
+ AESendMode sendMode,
+ AESendPriority sendPriority,
+ long timeOutInTicks,
+ AEIdleUPP idleProc,
+ AEFilterUPP filterProc) TWOWORDINLINE(0x700B, 0xAA54);
+
+EXTERN_API( OSErr )
+SetDefaultInputMethod (Component ts,
+ ScriptLanguageRecord * slRecordPtr) TWOWORDINLINE(0x700C, 0xAA54);
+
+EXTERN_API( OSErr )
+GetDefaultInputMethod (Component * ts,
+ ScriptLanguageRecord * slRecordPtr) TWOWORDINLINE(0x700D, 0xAA54);
+
+EXTERN_API( OSErr )
+SetTextServiceLanguage (ScriptLanguageRecord * slRecordPtr) TWOWORDINLINE(0x700E, 0xAA54);
+
+EXTERN_API( OSErr )
+GetTextServiceLanguage (ScriptLanguageRecord * slRecordPtr) TWOWORDINLINE(0x700F, 0xAA54);
+
+EXTERN_API( OSErr )
+UseInputWindow (TSMDocumentID idocID,
+ Boolean useWindow) TWOWORDINLINE(0x7010, 0xAA54);
+
+#if CALL_NOT_IN_CARBON
+/* Following calls from Classic event loops not needed for Carbon clients. */
+#if CALL_NOT_IN_CARBON
+EXTERN_API( Boolean )
+TSMEvent (EventRecord * event) TWOWORDINLINE(0x7004, 0xAA54);
+
+EXTERN_API( Boolean )
+TSMMenuSelect (long menuResult) TWOWORDINLINE(0x7005, 0xAA54);
+
+EXTERN_API( Boolean )
+SetTSMCursor (Point mousePos) TWOWORDINLINE(0x7006, 0xAA54);
+
+/* Following ServiceWindow API replaced by Window Manager API in Carbon. */
+EXTERN_API( OSErr )
+NewServiceWindow (void * wStorage,
+ const Rect * boundsRect,
+ ConstStr255Param title,
+ Boolean visible,
+ short theProc,
+ WindowPtr behind,
+ Boolean goAwayFlag,
+ ComponentInstance ts,
+ WindowPtr * window) TWOWORDINLINE(0x7011, 0xAA54);
+
+EXTERN_API( OSErr )
+CloseServiceWindow (WindowPtr window) TWOWORDINLINE(0x7012, 0xAA54);
+
+EXTERN_API( OSErr )
+GetFrontServiceWindow (WindowPtr * window) TWOWORDINLINE(0x7013, 0xAA54);
+
+EXTERN_API( short )
+FindServiceWindow (Point thePoint,
+ WindowPtr * theWindow) TWOWORDINLINE(0x7017, 0xAA54);
+
+EXTERN_API( OSErr )
+NewCServiceWindow (void * wStorage,
+ const Rect * boundsRect,
+ ConstStr255Param title,
+ Boolean visible,
+ short theProc,
+ WindowPtr behind,
+ Boolean goAwayFlag,
+ ComponentInstance ts,
+ WindowPtr * window) TWOWORDINLINE(0x701A, 0xAA54);
+
+/* Explicit initialization not needed for Carbon clients, since TSM is */
+/* instanciated per-context. */
+EXTERN_API( OSErr )
+InitTSMAwareApplication (void) TWOWORDINLINE(0x7014, 0xAA54);
+
+EXTERN_API( OSErr )
+CloseTSMAwareApplication (void) TWOWORDINLINE(0x7015, 0xAA54);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+/* Component Manager Interfaces to Input Methods */
+EXTERN_API( ComponentResult )
+GetScriptLanguageSupport (ComponentInstance ts,
+ ScriptLanguageSupportHandle * scriptHdl) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0001, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+InitiateTextService (ComponentInstance ts) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0002, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TerminateTextService (ComponentInstance ts) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0003, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+ActivateTextService (ComponentInstance ts) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0004, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+DeactivateTextService (ComponentInstance ts) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0005, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GetTextServiceMenu (ComponentInstance ts,
+ MenuRef * serviceMenu) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0007, 0x7000, 0xA82A);
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API( ComponentResult )
+TextServiceEvent (ComponentInstance ts,
+ short numOfEvents,
+ EventRecord * event) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0006, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+UCTextServiceEvent (ComponentInstance ts,
+ short numOfEvents,
+ EventRecord * event,
+ UniChar unicodeString[],
+ UniCharCount unicodeStrLength) FIVEWORDINLINE(0x2F3C, 0x000E, 0x000E, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+TextServiceMenuSelect (ComponentInstance ts,
+ MenuRef serviceMenu,
+ short item) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0008, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SetTextServiceCursor (ComponentInstance ts,
+ Point mousePos) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000A, 0x7000, 0xA82A);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( ComponentResult )
+FixTextService (ComponentInstance ts) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0009, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+HidePaletteWindows (ComponentInstance ts) FIVEWORDINLINE(0x2F3C, 0x0000, 0x000B, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+GetTextServiceProperty (ComponentInstance ts,
+ OSType propertySelector,
+ SInt32 * result) FIVEWORDINLINE(0x2F3C, 0x0008, 0x000C, 0x7000, 0xA82A);
+
+EXTERN_API( ComponentResult )
+SetTextServiceProperty (ComponentInstance ts,
+ OSType propertySelector,
+ SInt32 value) FIVEWORDINLINE(0x2F3C, 0x0008, 0x000D, 0x7000, 0xA82A);
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __TEXTSERVICES__ */
+
diff --git a/include/qt/TextUtils.h b/include/qt/TextUtils.h
new file mode 100644
index 000000000..6a5ad8f7f
--- /dev/null
+++ b/include/qt/TextUtils.h
@@ -0,0 +1,425 @@
+/*
+ File: TextUtils.h
+
+ Contains: Text Utilities Interfaces.
+
+ Version: Technology: Mac OS 8
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __TEXTUTILS__
+#define __TEXTUTILS__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __NUMBERFORMATTING__
+#include "NumberFormatting.h"
+#endif
+
+#ifndef __STRINGCOMPARE__
+#include "StringCompare.h"
+#endif
+
+#ifndef __DATETIMEUTILS__
+#include "DateTimeUtils.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*
+
+ Here are the current System 7 routine names and the translations to the older forms.
+ Please use the newer forms in all new code and migrate the older names out of existing
+ code as maintainance permits.
+
+ NEW NAME OLD NAMEs OBSOLETE FORM (no script code)
+
+ FindScriptRun
+ FindWordBreaks NFindWord, FindWord
+ GetIndString
+ GetString
+ Munger
+ NewString
+ SetString
+ StyledLineBreak
+ TruncString
+ TruncText
+
+ UpperString ($A054) UprString, UprText
+ UppercaseText SCUpperText (a only) UpperText ($A456)
+ LowercaseText LwrString, LowerText, LwrText ($A056)
+ StripDiacritics StripText ($A256)
+ UppercaseStripDiacritics StripUpperText ($A656)
+
+
+*/
+
+/* Type for truncWhere parameter in TruncString, TruncText */
+typedef short TruncCode;
+enum {
+ /* Constants for truncWhere argument in TruncString and TruncText */
+ truncEnd = 0, /* Truncate at end */
+ truncMiddle = 0x4000, /* Truncate in middle */
+ smTruncEnd = 0, /* Truncate at end - obsolete */
+ smTruncMiddle = 0x4000 /* Truncate in middle - obsolete */
+};
+
+enum {
+ /* Constants for TruncString and TruncText results */
+ notTruncated = 0, /* No truncation was necessary */
+ truncated = 1, /* Truncation performed */
+ truncErr = -1, /* General error */
+ smNotTruncated = 0, /* No truncation was necessary - obsolete */
+ smTruncated = 1, /* Truncation performed - obsolete */
+ smTruncErr = -1 /* General error - obsolete */
+};
+
+typedef SInt8 StyledLineBreakCode;
+enum {
+ smBreakWord = 0,
+ smBreakChar = 1,
+ smBreakOverflow = 2
+};
+
+
+struct ScriptRunStatus {
+ SInt8 script;
+ SInt8 runVariant;
+};
+typedef struct ScriptRunStatus ScriptRunStatus;
+
+struct BreakTable {
+ char charTypes[256];
+ short tripleLength;
+ short triples[1];
+};
+typedef struct BreakTable BreakTable;
+typedef BreakTable * BreakTablePtr;
+
+struct NBreakTable {
+ SInt8 flags1;
+ SInt8 flags2;
+ short version;
+ short classTableOff;
+ short auxCTableOff;
+ short backwdTableOff;
+ short forwdTableOff;
+ short doBackup;
+ short length; /* length of NBreakTable */
+ char charTypes[256];
+ short tables[1];
+};
+typedef struct NBreakTable NBreakTable;
+typedef NBreakTable * NBreakTablePtr;
+/* The following functions are new names that work on 68k and PowerPC*/
+EXTERN_API( long )
+Munger (Handle h,
+ long offset,
+ const void * ptr1,
+ long len1,
+ const void * ptr2,
+ long len2) ONEWORDINLINE(0xA9E0);
+
+EXTERN_API( StringHandle )
+NewString (ConstStr255Param theString) ONEWORDINLINE(0xA906);
+
+EXTERN_API( void )
+SetString (StringHandle theString,
+ ConstStr255Param strNew) ONEWORDINLINE(0xA907);
+
+EXTERN_API( StringHandle )
+GetString (short stringID) ONEWORDINLINE(0xA9BA);
+
+EXTERN_API( void )
+GetIndString (Str255 theString,
+ short strListID,
+ short index);
+
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( void )
+setstring (StringHandle theString,
+ const char * strNew);
+
+EXTERN_API_C( StringHandle )
+newstring (const char * theString);
+
+EXTERN_API_C( void )
+getindstring (char * theString,
+ short strListID,
+ short index);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( StyledLineBreakCode )
+StyledLineBreak (Ptr textPtr,
+ long textLen,
+ long textStart,
+ long textEnd,
+ long flags,
+ Fixed * textWidth,
+ long * textOffset) FOURWORDINLINE(0x2F3C, 0x821C, 0xFFFE, 0xA8B5);
+
+EXTERN_API( short )
+TruncString (short width,
+ Str255 theString,
+ TruncCode truncWhere) FOURWORDINLINE(0x2F3C, 0x8208, 0xFFE0, 0xA8B5);
+
+EXTERN_API( short )
+TruncText (short width,
+ Ptr textPtr,
+ short * length,
+ TruncCode truncWhere) FOURWORDINLINE(0x2F3C, 0x820C, 0xFFDE, 0xA8B5);
+
+EXTERN_API( void )
+FindWordBreaks (Ptr textPtr,
+ short textLength,
+ short offset,
+ Boolean leadingEdge,
+ BreakTablePtr breaks,
+ OffsetTable offsets,
+ ScriptCode script) FOURWORDINLINE(0x2F3C, 0xC012, 0x001A, 0xA8B5);
+
+EXTERN_API( void )
+LowercaseText (Ptr textPtr,
+ short len,
+ ScriptCode script) SIXWORDINLINE(0x3F3C, 0x0000, 0x2F3C, 0x800A, 0xFFB6, 0xA8B5);
+
+EXTERN_API( void )
+UppercaseText (Ptr textPtr,
+ short len,
+ ScriptCode script) SIXWORDINLINE(0x3F3C, 0x0400, 0x2F3C, 0x800A, 0xFFB6, 0xA8B5);
+
+EXTERN_API( void )
+StripDiacritics (Ptr textPtr,
+ short len,
+ ScriptCode script) SIXWORDINLINE(0x3F3C, 0x0200, 0x2F3C, 0x800A, 0xFFB6, 0xA8B5);
+
+EXTERN_API( void )
+UppercaseStripDiacritics (Ptr textPtr,
+ short len,
+ ScriptCode script) SIXWORDINLINE(0x3F3C, 0x0600, 0x2F3C, 0x800A, 0xFFB6, 0xA8B5);
+
+EXTERN_API( ScriptRunStatus )
+FindScriptRun (Ptr textPtr,
+ long textLen,
+ long * lenUsed) FOURWORDINLINE(0x2F3C, 0x820C, 0x0026, 0xA8B5);
+
+#if CALL_NOT_IN_CARBON
+/*
+ The following functions are old names, but are required for PowerPC builds
+ because InterfaceLib exports these names, instead of the new ones.
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+FindWord (Ptr textPtr,
+ short textLength,
+ short offset,
+ Boolean leadingEdge,
+ BreakTablePtr breaks,
+ OffsetTable offsets) FOURWORDINLINE(0x2F3C, 0x8012, 0x001A, 0xA8B5);
+
+EXTERN_API( void )
+NFindWord (Ptr textPtr,
+ short textLength,
+ short offset,
+ Boolean leadingEdge,
+ NBreakTablePtr nbreaks,
+ OffsetTable offsets) FOURWORDINLINE(0x2F3C, 0x8012, 0xFFE2, 0xA8B5);
+
+/*
+ On 68K machines, LwrText, LowerText, StripText, UpperText and StripUpperText
+ return an error code in register D0, but System 7 PowerMacs do not emulate
+ this properly, so checking D0 is unreliable.
+*/
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter LwrText(__A0, __D0)
+ #endif
+EXTERN_API( void )
+LwrText (Ptr textPtr,
+ short len) ONEWORDINLINE(0xA056);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter LowerText(__A0, __D0)
+ #endif
+EXTERN_API( void )
+LowerText (Ptr textPtr,
+ short len) ONEWORDINLINE(0xA056);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter StripText(__A0, __D0)
+ #endif
+EXTERN_API( void )
+StripText (Ptr textPtr,
+ short len) ONEWORDINLINE(0xA256);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter UpperText(__A0, __D0)
+ #endif
+EXTERN_API( void )
+UpperText (Ptr textPtr,
+ short len) ONEWORDINLINE(0xA456);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter StripUpperText(__A0, __D0)
+ #endif
+EXTERN_API( void )
+StripUpperText (Ptr textPtr,
+ short len) ONEWORDINLINE(0xA656);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+/* The following are new names which are exported by InterfaceLib*/
+EXTERN_API( void )
+UpperString (Str255 theString,
+ Boolean diacSensitive);
+
+EXTERN_API_C( void )
+upperstring (char * theString,
+ Boolean diacSensitive);
+
+/* The following are macros which map old names to the names exported by InterfaceLib*/
+#if OLDROUTINENAMES
+#define UprString(theString, diacSensitive) \
+ UpperString(theString, diacSensitive)
+#endif /* OLDROUTINENAMES */
+
+/* Old routine name but no new names are mapped to it:*/
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter UprText(__A0, __D0)
+ #endif
+EXTERN_API( void )
+UprText (Ptr textPtr,
+ short len) ONEWORDINLINE(0xA054);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+/*
+ Functions for converting between C and Pascal Strings
+ (Previously in Strings.h)
+
+ Note: CopyPascalStringToC, CopyCStringToPascal, c2pstrcpy, and p2cstrcpy
+ are written to allow inplace conversion. That is, the src and dst
+ parameters can point to the memory location.
+
+ Note: c2pstr, C2PStr, p2cstr, and P2CStr are all deprecated. These functions
+ only do inplace conversion and often require casts to call them. This can
+ cause bugs because you can easily cast away a const and change the
+ contents of a read-only buffer. Do you know what c2pstr("Hello") will do?
+
+*/
+EXTERN_API_C( void )
+c2pstrcpy (Str255 dst,
+ const char * src);
+
+EXTERN_API_C( void )
+p2cstrcpy (char * dst,
+ ConstStr255Param src);
+
+EXTERN_API_C( void )
+CopyPascalStringToC (ConstStr255Param src,
+ char * dst);
+
+EXTERN_API_C( void )
+CopyCStringToPascal (const char * src,
+ Str255 dst);
+
+#if CALL_NOT_IN_CARBON
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( StringPtr )
+c2pstr (char * aStr);
+
+EXTERN_API( StringPtr )
+C2PStr (Ptr cString);
+
+EXTERN_API_C( char *)
+p2cstr (StringPtr aStr);
+
+EXTERN_API( Ptr )
+P2CStr (StringPtr pString);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#if !TARGET_OS_MAC
+ /* Added for QuickTime 3.0 */
+ #define C2PStr(a) (StringPtr)c2pstr((Ptr)(a))
+ #define P2CStr(a) (Ptr)p2cstr(a)
+
+ #define CopyPascalStringToC(src,dst) p2cstrcpy(dst,src)
+ #define CopyCStringToPascal(src,dst) c2pstrcpy(dst,src)
+#endif
+/*
+ Added macros to convert p2cstr and c2pstr calls into p2cstrcpy and c2pstrcpy calls,
+ and map C2PStr and P2CStr to c2pstr and p2cstr for Carbon.
+ The use of the often unappreciated comma operator to coerce the proper return values,
+ since the p2cstrcpy and c2pstrcpy routines have no return value.
+*/
+
+#if TARGET_OS_MAC && TARGET_API_MAC_CARBON && OLDP2C
+ #define p2cstr(aStr) (p2cstrcpy((char *) aStr, aStr) , (char *) aStr)
+ #define c2pstr(aStr) (c2pstrcpy(aStr, (char *) aStr) , (StringPtr) aStr)
+
+ #define C2PStr(a) (StringPtr)c2pstr((Ptr)(a))
+ #define P2CStr(a) (Ptr)p2cstr(a)
+#endif
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __TEXTUTILS__ */
+
diff --git a/include/qt/Threads.h b/include/qt/Threads.h
new file mode 100644
index 000000000..8c346e0a9
--- /dev/null
+++ b/include/qt/Threads.h
@@ -0,0 +1,378 @@
+/*
+ File: Threads.h
+
+ Contains: Thread Manager Interfaces.
+
+ Version: Technology: Mac OS 8
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1991-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __THREADS__
+#define __THREADS__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* Thread states*/
+
+typedef UInt16 ThreadState;
+enum {
+ kReadyThreadState = 0,
+ kStoppedThreadState = 1,
+ kRunningThreadState = 2
+};
+
+/* Error codes have been meoved to Errors.(pah)*/
+
+/* Thread environment characteristics*/
+typedef void * ThreadTaskRef;
+/* Thread characteristics*/
+
+typedef UInt32 ThreadStyle;
+enum {
+ kCooperativeThread = 1L << 0,
+ kPreemptiveThread = 1L << 1
+};
+
+/* Thread identifiers*/
+
+typedef UInt32 ThreadID;
+enum {
+ kNoThreadID = 0,
+ kCurrentThreadID = 1,
+ kApplicationThreadID = 2
+};
+
+/* Options when creating a thread*/
+
+typedef UInt32 ThreadOptions;
+enum {
+ kNewSuspend = (1 << 0),
+ kUsePremadeThread = (1 << 1),
+ kCreateIfNeeded = (1 << 2),
+ kFPUNotNeeded = (1 << 3),
+ kExactMatchThread = (1 << 4)
+};
+
+/* Information supplied to the custom scheduler*/
+
+struct SchedulerInfoRec {
+ UInt32 InfoRecSize;
+ ThreadID CurrentThreadID;
+ ThreadID SuggestedThreadID;
+ ThreadID InterruptedCoopThreadID;
+};
+typedef struct SchedulerInfoRec SchedulerInfoRec;
+typedef SchedulerInfoRec * SchedulerInfoRecPtr;
+
+/*
+ The following ProcPtrs cannot be interchanged with UniversalProcPtrs because
+ of differences between 680x0 and PowerPC runtime architectures with regard to
+ the implementation of the Thread Manager.
+ */
+
+typedef void * voidPtr;
+/* Prototype for thread's entry (main) routine*/
+typedef CALLBACK_API( voidPtr , ThreadEntryProcPtr )(void *threadParam);
+/* Prototype for custom thread scheduler routine*/
+typedef CALLBACK_API( ThreadID , ThreadSchedulerProcPtr )(SchedulerInfoRecPtr schedulerInfo);
+/* Prototype for custom thread switcher routine*/
+typedef CALLBACK_API( void , ThreadSwitchProcPtr )(ThreadID threadBeingSwitched, void *switchProcParam);
+/* Prototype for thread termination notification routine*/
+typedef CALLBACK_API( void , ThreadTerminationProcPtr )(ThreadID threadTerminated, void *terminationProcParam);
+/* Prototype for debugger NewThread notification*/
+typedef CALLBACK_API( void , DebuggerNewThreadProcPtr )(ThreadID threadCreated);
+/* Prototype for debugger DisposeThread notification*/
+typedef CALLBACK_API( void , DebuggerDisposeThreadProcPtr )(ThreadID threadDeleted);
+/* Prototype for debugger schedule notification*/
+typedef CALLBACK_API( ThreadID , DebuggerThreadSchedulerProcPtr )(SchedulerInfoRecPtr schedulerInfo);
+typedef TVECTOR_UPP_TYPE(ThreadEntryProcPtr) ThreadEntryUPP;
+typedef TVECTOR_UPP_TYPE(ThreadSchedulerProcPtr) ThreadSchedulerUPP;
+typedef TVECTOR_UPP_TYPE(ThreadSwitchProcPtr) ThreadSwitchUPP;
+typedef TVECTOR_UPP_TYPE(ThreadTerminationProcPtr) ThreadTerminationUPP;
+typedef TVECTOR_UPP_TYPE(DebuggerNewThreadProcPtr) DebuggerNewThreadUPP;
+typedef TVECTOR_UPP_TYPE(DebuggerDisposeThreadProcPtr) DebuggerDisposeThreadUPP;
+typedef TVECTOR_UPP_TYPE(DebuggerThreadSchedulerProcPtr) DebuggerThreadSchedulerUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(ThreadEntryUPP)
+ NewThreadEntryUPP (ThreadEntryProcPtr userRoutine);
+
+ EXTERN_API(ThreadSchedulerUPP)
+ NewThreadSchedulerUPP (ThreadSchedulerProcPtr userRoutine);
+
+ EXTERN_API(ThreadSwitchUPP)
+ NewThreadSwitchUPP (ThreadSwitchProcPtr userRoutine);
+
+ EXTERN_API(ThreadTerminationUPP)
+ NewThreadTerminationUPP (ThreadTerminationProcPtr userRoutine);
+
+ EXTERN_API(DebuggerNewThreadUPP)
+ NewDebuggerNewThreadUPP (DebuggerNewThreadProcPtr userRoutine);
+
+ EXTERN_API(DebuggerDisposeThreadUPP)
+ NewDebuggerDisposeThreadUPP (DebuggerDisposeThreadProcPtr userRoutine);
+
+ EXTERN_API(DebuggerThreadSchedulerUPP)
+ NewDebuggerThreadSchedulerUPP (DebuggerThreadSchedulerProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeThreadEntryUPP (ThreadEntryUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeThreadSchedulerUPP (ThreadSchedulerUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeThreadSwitchUPP (ThreadSwitchUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeThreadTerminationUPP (ThreadTerminationUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeDebuggerNewThreadUPP (DebuggerNewThreadUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeDebuggerDisposeThreadUPP (DebuggerDisposeThreadUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeDebuggerThreadSchedulerUPP (DebuggerThreadSchedulerUPP userUPP);
+
+ EXTERN_API(voidPtr)
+ InvokeThreadEntryUPP (void * threadParam,
+ ThreadEntryUPP userUPP);
+
+ EXTERN_API(ThreadID)
+ InvokeThreadSchedulerUPP (SchedulerInfoRecPtr schedulerInfo,
+ ThreadSchedulerUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeThreadSwitchUPP (ThreadID threadBeingSwitched,
+ void * switchProcParam,
+ ThreadSwitchUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeThreadTerminationUPP (ThreadID threadTerminated,
+ void * terminationProcParam,
+ ThreadTerminationUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeDebuggerNewThreadUPP (ThreadID threadCreated,
+ DebuggerNewThreadUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeDebuggerDisposeThreadUPP (ThreadID threadDeleted,
+ DebuggerDisposeThreadUPP userUPP);
+
+ EXTERN_API(ThreadID)
+ InvokeDebuggerThreadSchedulerUPP (SchedulerInfoRecPtr schedulerInfo,
+ DebuggerThreadSchedulerUPP userUPP);
+
+#else
+ #define NewThreadEntryUPP(userRoutine) (userRoutine)
+ #define NewThreadSchedulerUPP(userRoutine) (userRoutine)
+ #define NewThreadSwitchUPP(userRoutine) (userRoutine)
+ #define NewThreadTerminationUPP(userRoutine) (userRoutine)
+ #define NewDebuggerNewThreadUPP(userRoutine) (userRoutine)
+ #define NewDebuggerDisposeThreadUPP(userRoutine) (userRoutine)
+ #define NewDebuggerThreadSchedulerUPP(userRoutine) (userRoutine)
+ #define DisposeThreadEntryUPP(userUPP)
+ #define DisposeThreadSchedulerUPP(userUPP)
+ #define DisposeThreadSwitchUPP(userUPP)
+ #define DisposeThreadTerminationUPP(userUPP)
+ #define DisposeDebuggerNewThreadUPP(userUPP)
+ #define DisposeDebuggerDisposeThreadUPP(userUPP)
+ #define DisposeDebuggerThreadSchedulerUPP(userUPP)
+ #define InvokeThreadEntryUPP(threadParam, userUPP) (*userUPP)(threadParam)
+ #define InvokeThreadSchedulerUPP(schedulerInfo, userUPP) (*userUPP)(schedulerInfo)
+ #define InvokeThreadSwitchUPP(threadBeingSwitched, switchProcParam, userUPP) (*userUPP)(threadBeingSwitched, switchProcParam)
+ #define InvokeThreadTerminationUPP(threadTerminated, terminationProcParam, userUPP) (*userUPP)(threadTerminated, terminationProcParam)
+ #define InvokeDebuggerNewThreadUPP(threadCreated, userUPP) (*userUPP)(threadCreated)
+ #define InvokeDebuggerDisposeThreadUPP(threadDeleted, userUPP) (*userUPP)(threadDeleted)
+ #define InvokeDebuggerThreadSchedulerUPP(schedulerInfo, userUPP) (*userUPP)(schedulerInfo)
+#endif
+/*
+ Thread Manager function pointers (TPP):
+ on classic 68k use raw function pointers (same as UPP's)
+ on classic PowerPC, use raw function pointers
+ on CFM-68K, use UPP's
+ on Carbon, use UPP's
+*/
+
+#if TARGET_OS_MAC && TARGET_CPU_PPC && !TARGET_API_MAC_CARBON
+/* use raw function pointers*/
+typedef ThreadEntryProcPtr ThreadEntryTPP;
+typedef ThreadSchedulerProcPtr ThreadSchedulerTPP;
+typedef ThreadSwitchProcPtr ThreadSwitchTPP;
+typedef ThreadTerminationProcPtr ThreadTerminationTPP;
+typedef DebuggerNewThreadProcPtr DebuggerNewThreadTPP;
+typedef DebuggerDisposeThreadProcPtr DebuggerDisposeThreadTPP;
+typedef DebuggerThreadSchedulerProcPtr DebuggerThreadSchedulerTPP;
+#else
+/* use UPP's*/
+typedef ThreadEntryUPP ThreadEntryTPP;
+typedef ThreadSchedulerUPP ThreadSchedulerTPP;
+typedef ThreadSwitchUPP ThreadSwitchTPP;
+typedef ThreadTerminationUPP ThreadTerminationTPP;
+typedef DebuggerNewThreadUPP DebuggerNewThreadTPP;
+typedef DebuggerDisposeThreadUPP DebuggerDisposeThreadTPP;
+typedef DebuggerThreadSchedulerUPP DebuggerThreadSchedulerTPP;
+#endif /* TARGET_OS_MAC && TARGET_CPU_PPC && !TARGET_API_MAC_CARBON */
+
+EXTERN_API( OSErr )
+NewThread (ThreadStyle threadStyle,
+ ThreadEntryTPP threadEntry,
+ void * threadParam,
+ Size stackSize,
+ ThreadOptions options,
+ void ** threadResult,
+ ThreadID * threadMade) THREEWORDINLINE(0x303C, 0x0E03, 0xABF2);
+
+EXTERN_API( OSErr )
+SetThreadScheduler (ThreadSchedulerTPP threadScheduler) THREEWORDINLINE(0x303C, 0x0209, 0xABF2);
+
+EXTERN_API( OSErr )
+SetThreadSwitcher (ThreadID thread,
+ ThreadSwitchTPP threadSwitcher,
+ void * switchProcParam,
+ Boolean inOrOut) THREEWORDINLINE(0x303C, 0x070A, 0xABF2);
+
+EXTERN_API( OSErr )
+SetThreadTerminator (ThreadID thread,
+ ThreadTerminationTPP threadTerminator,
+ void * terminationProcParam) THREEWORDINLINE(0x303C, 0x0611, 0xABF2);
+
+EXTERN_API( OSErr )
+SetDebuggerNotificationProcs (DebuggerNewThreadTPP notifyNewThread,
+ DebuggerDisposeThreadTPP notifyDisposeThread,
+ DebuggerThreadSchedulerTPP notifyThreadScheduler) THREEWORDINLINE(0x303C, 0x060D, 0xABF2);
+
+EXTERN_API( OSErr )
+CreateThreadPool (ThreadStyle threadStyle,
+ SInt16 numToCreate,
+ Size stackSize) THREEWORDINLINE(0x303C, 0x0501, 0xABF2);
+
+EXTERN_API( OSErr )
+GetFreeThreadCount (ThreadStyle threadStyle,
+ SInt16 * freeCount) THREEWORDINLINE(0x303C, 0x0402, 0xABF2);
+
+EXTERN_API( OSErr )
+GetSpecificFreeThreadCount (ThreadStyle threadStyle,
+ Size stackSize,
+ SInt16 * freeCount) THREEWORDINLINE(0x303C, 0x0615, 0xABF2);
+
+EXTERN_API( OSErr )
+GetDefaultThreadStackSize (ThreadStyle threadStyle,
+ Size * stackSize) THREEWORDINLINE(0x303C, 0x0413, 0xABF2);
+
+EXTERN_API( OSErr )
+ThreadCurrentStackSpace (ThreadID thread,
+ UInt32 * freeStack) THREEWORDINLINE(0x303C, 0x0414, 0xABF2);
+
+EXTERN_API( OSErr )
+DisposeThread (ThreadID threadToDump,
+ void * threadResult,
+ Boolean recycleThread) THREEWORDINLINE(0x303C, 0x0504, 0xABF2);
+
+EXTERN_API( OSErr )
+YieldToThread (ThreadID suggestedThread) THREEWORDINLINE(0x303C, 0x0205, 0xABF2);
+
+EXTERN_API( OSErr )
+YieldToAnyThread (void) FOURWORDINLINE(0x42A7, 0x303C, 0x0205, 0xABF2);
+
+#if TARGET_OS_MAC
+ #define MacGetCurrentThread GetCurrentThread
+#endif
+EXTERN_API( OSErr )
+MacGetCurrentThread (ThreadID * currentThreadID) THREEWORDINLINE(0x303C, 0x0206, 0xABF2);
+
+EXTERN_API( OSErr )
+GetThreadState (ThreadID threadToGet,
+ ThreadState * threadState) THREEWORDINLINE(0x303C, 0x0407, 0xABF2);
+
+EXTERN_API( OSErr )
+SetThreadState (ThreadID threadToSet,
+ ThreadState newState,
+ ThreadID suggestedThread) THREEWORDINLINE(0x303C, 0x0508, 0xABF2);
+
+EXTERN_API( OSErr )
+SetThreadStateEndCritical (ThreadID threadToSet,
+ ThreadState newState,
+ ThreadID suggestedThread) THREEWORDINLINE(0x303C, 0x0512, 0xABF2);
+
+EXTERN_API( OSErr )
+ThreadBeginCritical (void) THREEWORDINLINE(0x303C, 0x000B, 0xABF2);
+
+EXTERN_API( OSErr )
+ThreadEndCritical (void) THREEWORDINLINE(0x303C, 0x000C, 0xABF2);
+
+EXTERN_API( OSErr )
+GetThreadCurrentTaskRef (ThreadTaskRef * threadTRef) THREEWORDINLINE(0x303C, 0x020E, 0xABF2);
+
+EXTERN_API( OSErr )
+GetThreadStateGivenTaskRef (ThreadTaskRef threadTRef,
+ ThreadID threadToGet,
+ ThreadState * threadState) THREEWORDINLINE(0x303C, 0x060F, 0xABF2);
+
+EXTERN_API( OSErr )
+SetThreadReadyGivenTaskRef (ThreadTaskRef threadTRef,
+ ThreadID threadToSet) THREEWORDINLINE(0x303C, 0x0410, 0xABF2);
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __THREADS__ */
+
diff --git a/include/qt/Timer.h b/include/qt/Timer.h
new file mode 100644
index 000000000..52a1cd0fa
--- /dev/null
+++ b/include/qt/Timer.h
@@ -0,0 +1,187 @@
+/*
+ File: Timer.h
+
+ Contains: Time Manager interfaces.
+
+ Version: Technology: Mac OS 8.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __TIMER__
+#define __TIMER__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __OSUTILS__
+#include "OSUtils.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ /* high bit of qType is set if task is active */
+ kTMTaskActive = (1L << 15)
+};
+
+typedef struct TMTask TMTask;
+typedef TMTask * TMTaskPtr;
+typedef CALLBACK_API( void , TimerProcPtr )(TMTaskPtr tmTaskPtr);
+/*
+ WARNING: TimerProcPtr uses register based parameters under classic 68k
+ and cannot be written in a high-level language without
+ the help of mixed mode or assembly glue.
+*/
+typedef REGISTER_UPP_TYPE(TimerProcPtr) TimerUPP;
+
+struct TMTask {
+ QElemPtr qLink;
+ short qType;
+ TimerUPP tmAddr;
+ long tmCount;
+ long tmWakeUp;
+ long tmReserved;
+};
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter InsTime(__A0)
+ #endif
+EXTERN_API( void )
+InsTime (QElemPtr tmTaskPtr) ONEWORDINLINE(0xA058);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter InsXTime(__A0)
+ #endif
+EXTERN_API( void )
+InsXTime (QElemPtr tmTaskPtr) ONEWORDINLINE(0xA458);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter PrimeTime(__A0, __D0)
+ #endif
+EXTERN_API( void )
+PrimeTime (QElemPtr tmTaskPtr,
+ long count) ONEWORDINLINE(0xA05A);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter RmvTime(__A0)
+ #endif
+EXTERN_API( void )
+RmvTime (QElemPtr tmTaskPtr) ONEWORDINLINE(0xA059);
+
+
+/* InstallTimeTask, InstallXTimeTask, PrimeTimeTask and RemoveTimeTask work */
+/* just like InsTime, InsXTime, PrimeTime, and RmvTime except that they */
+/* return an OSErr result. */
+#if CALL_NOT_IN_CARBON
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 InstallTimeTask(__A0)
+ #endif
+EXTERN_API( OSErr )
+InstallTimeTask (QElemPtr tmTaskPtr) ONEWORDINLINE(0xA058);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 InstallXTimeTask(__A0)
+ #endif
+EXTERN_API( OSErr )
+InstallXTimeTask (QElemPtr tmTaskPtr) ONEWORDINLINE(0xA458);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 PrimeTimeTask(__A0, __D0)
+ #endif
+EXTERN_API( OSErr )
+PrimeTimeTask (QElemPtr tmTaskPtr,
+ long count) ONEWORDINLINE(0xA05A);
+
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter __D0 RemoveTimeTask(__A0)
+ #endif
+EXTERN_API( OSErr )
+RemoveTimeTask (QElemPtr tmTaskPtr) ONEWORDINLINE(0xA059);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+EXTERN_API( void )
+Microseconds (UnsignedWide * microTickCount) FOURWORDINLINE(0xA193, 0x225F, 0x22C8, 0x2280);
+
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(TimerUPP)
+ NewTimerUPP (TimerProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeTimerUPP (TimerUPP userUPP);
+
+ EXTERN_API(void)
+ InvokeTimerUPP (TMTaskPtr tmTaskPtr,
+ TimerUPP userUPP);
+
+#else
+ enum { uppTimerProcInfo = 0x0000B802 }; /* register no_return_value Func(4_bytes:A1) */
+ #define NewTimerUPP(userRoutine) (TimerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppTimerProcInfo, GetCurrentArchitecture())
+ #define DisposeTimerUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+ #pragma parameter InvokeTimerUPP(__A1, __A0)
+ void InvokeTimerUPP(TMTaskPtr tmTaskPtr, TimerUPP userUPP) = 0x4E90;
+ #else
+ #define InvokeTimerUPP(tmTaskPtr, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppTimerProcInfo, (tmTaskPtr))
+ #endif
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewTimerProc(userRoutine) NewTimerUPP(userRoutine)
+#define CallTimerProc(userRoutine, tmTaskPtr) InvokeTimerUPP(tmTaskPtr, userRoutine)
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __TIMER__ */
+
diff --git a/include/qt/ToolUtils.h b/include/qt/ToolUtils.h
new file mode 100644
index 000000000..0b25569e1
--- /dev/null
+++ b/include/qt/ToolUtils.h
@@ -0,0 +1,175 @@
+/*
+ File: ToolUtils.h
+
+ Contains: Toolbox Utilities Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1990-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __TOOLUTILS__
+#define __TOOLUTILS__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __OSUTILS__
+#include "OSUtils.h"
+#endif
+
+
+#ifndef __FIXMATH__
+#include "FixMath.h"
+#endif
+
+#ifndef __ICONS__
+#include "Icons.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#ifndef __TEXTUTILS__
+#include "TextUtils.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*
+------------------------------------------------------------------------------------
+ Note:
+
+ The following routines that used to be in this header file, have moved to
+ more appropriate headers.
+
+ FixMath.h: FixMul
+ FixRatio
+ FixRound
+
+ Icons.h: GetIcon
+ PlotIcon
+
+ Quickdraw.h: AngleFromSlope
+ DeltaPoint
+ GetCursor
+ GetIndPattern
+ GetPattern
+ GetPicture
+ PackBits
+ ScreenRes
+ ShieldCursor
+ SlopeFromAngle
+ UnpackBits
+
+ TextUtils.h: Munger
+ GetIndString
+ GetString
+ NewString
+ SetString
+------------------------------------------------------------------------------------
+*/
+
+EXTERN_API( Boolean )
+BitTst (const void * bytePtr,
+ long bitNum) ONEWORDINLINE(0xA85D);
+
+EXTERN_API( void )
+BitSet (void * bytePtr,
+ long bitNum) ONEWORDINLINE(0xA85E);
+
+EXTERN_API( void )
+BitClr (void * bytePtr,
+ long bitNum) ONEWORDINLINE(0xA85F);
+
+EXTERN_API( long )
+BitAnd (long value1,
+ long value2) ONEWORDINLINE(0xA858);
+
+EXTERN_API( long )
+BitOr (long value1,
+ long value2) ONEWORDINLINE(0xA85B);
+
+EXTERN_API( long )
+BitXor (long value1,
+ long value2) ONEWORDINLINE(0xA859);
+
+EXTERN_API( long )
+BitNot (long value) ONEWORDINLINE(0xA85A);
+
+EXTERN_API( long )
+BitShift (long value,
+ short count) ONEWORDINLINE(0xA85C);
+
+#if TARGET_CPU_68K
+
+struct Int64Bit {
+ SInt32 hiLong;
+ UInt32 loLong;
+};
+typedef struct Int64Bit Int64Bit;
+#if CALL_NOT_IN_CARBON
+EXTERN_API( void )
+LongMul (long a,
+ long b,
+ Int64Bit * result) ONEWORDINLINE(0xA867);
+
+#else
+ #define LongMul(a, b, result) ((void) WideMultiply((a), (b), (wide*)(result)))
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_CPU_68K */
+
+#define HiWord(x) ((short)((long)(x) >> 16))
+#define LoWord(x) ((short)(x))
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __TOOLUTILS__ */
+
diff --git a/include/qt/Translation.h b/include/qt/Translation.h
new file mode 100644
index 000000000..2132089bf
--- /dev/null
+++ b/include/qt/Translation.h
@@ -0,0 +1,348 @@
+/*
+ File: Translation.h
+
+ Contains: Translation Manager (Macintosh Easy Open) Interfaces.
+
+ Version: Technology: Macintosh Easy Open 1.1
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1991-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __TRANSLATION__
+#define __TRANSLATION__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+#ifndef __COMPONENTS__
+#include "Components.h"
+#endif
+
+#ifndef __TRANSLATIONEXTENSIONS__
+#include "TranslationExtensions.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* enumerated types on how a document can be opened*/
+typedef short DocOpenMethod;
+enum {
+ domCannot = 0,
+ domNative = 1,
+ domTranslateFirst = 2,
+ domWildcard = 3
+};
+
+/* 0L terminated array of OSTypes, or FileTypes*/
+typedef OSType TypesBlock[64];
+typedef OSType * TypesBlockPtr;
+/* Progress dialog resource ID*/
+enum {
+ kTranslationScrapProgressDialogID = -16555
+};
+
+/* block of data that describes how to translate*/
+
+struct FileTranslationSpec {
+ OSType componentSignature;
+ const void * translationSystemInfo;
+ FileTypeSpec src;
+ FileTypeSpec dst;
+};
+typedef struct FileTranslationSpec FileTranslationSpec;
+typedef FileTranslationSpec * FileTranslationSpecArrayPtr;
+typedef FileTranslationSpecArrayPtr * FileTranslationSpecArrayHandle;
+
+/*****************************************************************************************
+*
+* GetFileTypesThatAppCanNativelyOpen
+*
+* This routine returns a list of all FileTypes that an application can open by itself
+*
+* Enter: appVRefNumHint volume where application resides (can be wrong, and if is, will be used as a starting point)
+* appSignature signature (creator) of application
+* nativeTypes pointer to a buffer to be filled with up to 64 FileTypes
+*
+* Exit: nativeTypes zero terminated array of FileTypes that can be opened by app
+*/
+EXTERN_API( OSErr )
+GetFileTypesThatAppCanNativelyOpen (short appVRefNumHint,
+ OSType appSignature,
+ FileType * nativeTypes) TWOWORDINLINE(0x701C, 0xABFC);
+
+/*****************************************************************************************
+*
+* ExtendFileTypeList
+*
+* This routine makes a new list of file types that can be translated into a type in the given list
+* Used by StandardFile
+*
+* Enter: originalTypeList pointer to list of file types that can be opened
+* numberOriginalTypes number of file types in orgTypeList
+* extendedTypeList pointer to a buffer to be filled with file types
+* numberExtendedTypes max number of file types that can be put in extendedTypeList
+*
+* Exit: extendedTypeList buffer filled in with file types that can be translated
+* numberExtendedTypes number of file types put in extendedTypeList
+*/
+EXTERN_API( OSErr )
+ExtendFileTypeList (const FileType * originalTypeList,
+ short numberOriginalTypes,
+ FileType * extendedTypeList,
+ short * numberExtendedTypes) TWOWORDINLINE(0x7009, 0xABFC);
+
+
+/*****************************************************************************************
+*
+*
+* This routine checks if a file can be opened by a particular application.
+* If so, it returns if it needs to be translated first, and if so then how.
+* The FileTypes that the app can open are specified by nativelyOpenableTypes,
+* or if it is NULL, GetFileTypesThatAppCanNativelyOpen is called.
+*
+* Enter: targetDocument document to check if it can be opened
+* appVRefNumHint vRefNum of application to open doc ( can be wrong, and if is, will be used as a starting point)
+* appSignature signature (creator) of application to open doc
+* nativeTypes zero terminated list of FileTypes app can open natively, or NULL to use default list
+* onlyNative whether to consider if document can be translated before opening
+* howToOpen pointer to buffer in which to put how the document can be opened
+* howToTranslate pointer to buffer in which to put a FileTranslationSpec record
+*
+* Exit: howToOpen whether file needs to be translated to be read
+* howToTranslate if file can be translated, buffer filled in with how to translate
+* returns noErr, noPrefAppErr
+*/
+EXTERN_API( OSErr )
+CanDocBeOpened (const FSSpec * targetDocument,
+ short appVRefNumHint,
+ OSType appSignature,
+ const FileType * nativeTypes,
+ Boolean onlyNative,
+ DocOpenMethod * howToOpen,
+ FileTranslationSpec * howToTranslate) TWOWORDINLINE(0x701E, 0xABFC);
+
+
+/*****************************************************************************************
+*
+* GetFileTranslationPaths
+*
+* This routine returns a list of all ways a translation can occure to or from a FileType.
+* The app is checked to exist. The hint for each app is the VRefNum and DTRefNum
+*
+* Enter: srcDoc source file or NULL for all matches
+* dstDoc destination FileType or 0 for all matches
+* maxResultCount
+* resultBuffer
+* Exit: number of paths
+*/
+EXTERN_API( short )
+GetFileTranslationPaths (FSSpec * srcDocument,
+ FileType dstDocType,
+ unsigned short maxResultCount,
+ FileTranslationSpecArrayPtr resultBuffer) TWOWORDINLINE(0x7038, 0xABFC);
+
+/*****************************************************************************************
+*
+* GetPathFromTranslationDialog
+*
+* This routine, with a given document, application, and a passed typelist will display the
+* Macintosh Easy Open translation dialog allowing the user to make a choice. The choice
+* made will be written as a preference (so the next call to CanDocBeOpened() will work).
+* The routine returns the translation path information.
+*
+* Enter: theDocument FSSpec to document to open
+* theApplication FSSpec to application to open document
+* typeList Nil terminated list of FileType's (e.g. SFTypeList-like) of types
+* you would like the documented translated to. Order most perferred
+* to least.
+*
+* Exit: howToOpen Translation method needed to open document
+* howToTranslate Translation specification
+* returns Any errors that might occur.
+*/
+EXTERN_API( OSErr )
+GetPathFromTranslationDialog (const FSSpec * theDocument,
+ const FSSpec * theApplication,
+ TypesBlockPtr typeList,
+ DocOpenMethod * howToOpen,
+ FileTranslationSpec * howToTranslate) TWOWORDINLINE(0x7037, 0xABFC);
+
+
+/*****************************************************************************************
+*
+* TranslateFile
+*
+* This routine reads a file of one format and writes it to another file in another format.
+* The information on how to translated is generated by the routine CanDocBeOpened.
+* TranslateFile calls through to the TranslateFile Extension's DoTranslateFile routine.
+* The destination file must not exist. It is created by this routine.
+*
+* Enter: sourceDocument input file to translate
+* destinationDocument output file of translation
+* howToTranslate pointer to info on how to translate
+* Exit: returns noErr, badTranslationSpecErr
+*/
+EXTERN_API( OSErr )
+TranslateFile (const FSSpec * sourceDocument,
+ const FSSpec * destinationDocument,
+ const FileTranslationSpec * howToTranslate) TWOWORDINLINE(0x700C, 0xABFC);
+
+/*****************************************************************************************
+*
+* GetDocumentKindString
+*
+* This routine returns the string the Finder should show for the "kind" of a document
+* in the GetInfo window and in the kind column of a list view.
+*
+* Enter: docVRefNum The volume containing the document
+* docType The catInfo.fdType of the document
+* docCreator The catInfo.fdCreator of the document
+* kindString pointer to where to return the string
+*
+* Exit: kindString pascal string. Ex: "\pSurfCalc spreadsheet"
+* returns noErr, or afpItemNoFound if kind could not be determined
+*/
+EXTERN_API( OSErr )
+GetDocumentKindString (short docVRefNum,
+ OSType docType,
+ OSType docCreator,
+ Str63 kindString) TWOWORDINLINE(0x7016, 0xABFC);
+
+/*****************************************************************************************
+*
+* GetTranslationExtensionName
+*
+* This routine returns the translation system name from a specified TranslationSpec
+*
+* Enter: translationMethod The translation path to get the translation name from
+*
+* Exit: extensionName The name of the translation system
+* returns Any errors that might occur
+*/
+EXTERN_API( OSErr )
+GetTranslationExtensionName (const FileTranslationSpec * translationMethod,
+ Str31 extensionName) TWOWORDINLINE(0x7036, 0xABFC);
+
+
+/*****************************************************************************************
+*
+* GetScrapDataProcPtr
+*
+* This is a prototype for the function you must supply to TranslateScrap. It is called to
+* get the data to be translated. The first call TranslateScrap will make to this is to
+* ask for the 'fmts' data. That is a special. You should resize and fill in the handle
+* with a list all the formats that you have available to be translated, and the length of each.
+* (See I.M. VI 4-23 for details of 'fmts'). It will then be called again asking for one of
+* the formats that 'fmts' list said was available.
+*
+* Enter: requestedFormat Format of data that TranslateScrap needs.
+* dataH Handle in which to put the requested data
+* srcDataGetterRefCon Extra parameter for you passed to TranslateScrap
+*
+* Exit: dataH Handle is resized and filled with data in requested format
+*/
+typedef CALLBACK_API( OSErr , GetScrapDataProcPtr )(ScrapType requestedFormat, Handle dataH, void *srcDataGetterRefCon);
+typedef STACK_UPP_TYPE(GetScrapDataProcPtr) GetScrapDataUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(GetScrapDataUPP)
+ NewGetScrapDataUPP (GetScrapDataProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeGetScrapDataUPP (GetScrapDataUPP userUPP);
+
+ EXTERN_API(OSErr)
+ InvokeGetScrapDataUPP (ScrapType requestedFormat,
+ Handle dataH,
+ void * srcDataGetterRefCon,
+ GetScrapDataUPP userUPP);
+
+#else
+ enum { uppGetScrapDataProcInfo = 0x00000FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
+ #define NewGetScrapDataUPP(userRoutine) (GetScrapDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGetScrapDataProcInfo, GetCurrentArchitecture())
+ #define DisposeGetScrapDataUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeGetScrapDataUPP(requestedFormat, dataH, srcDataGetterRefCon, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGetScrapDataProcInfo, (requestedFormat), (dataH), (srcDataGetterRefCon))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewGetScrapDataProc(userRoutine) NewGetScrapDataUPP(userRoutine)
+#define CallGetScrapDataProc(userRoutine, requestedFormat, dataH, srcDataGetterRefCon) InvokeGetScrapDataUPP(requestedFormat, dataH, srcDataGetterRefCon, userRoutine)
+
+typedef GetScrapDataUPP GetScrapData;
+/*****************************************************************************************
+*
+* TranslateScrap
+*
+* This routine resizes the destination handle and fills it with data of the requested format.
+* The data is generated by translated one or more source formats of data supplied by
+* the procedure srcDataGetter.
+* This routine is automatically called by GetScrap and ReadEdition. You only need to call
+* this if you need to translated scrap style data, but are not using the ScrapMgr or EditionMgr.
+*
+* Enter: sourceDataGetter Pointer to routine that can get src data
+* sourceDataGetterRefCon Extra parameter for dataGetter
+* destinationFormat Format of data desired
+* destinationData Handle in which to store translated data
+*
+* Exit: dstData Handle is resized and filled with data in requested format
+*/
+EXTERN_API( OSErr )
+TranslateScrap (GetScrapDataUPP sourceDataGetter,
+ void * sourceDataGetterRefCon,
+ ScrapType destinationFormat,
+ Handle destinationData,
+ short progressDialogID) TWOWORDINLINE(0x700E, 0xABFC);
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __TRANSLATION__ */
+
diff --git a/include/qt/TranslationExtensions.h b/include/qt/TranslationExtensions.h
new file mode 100644
index 000000000..9775b3396
--- /dev/null
+++ b/include/qt/TranslationExtensions.h
@@ -0,0 +1,209 @@
+/*
+ File: TranslationExtensions.h
+
+ Contains: Macintosh Easy Open Translation Extension Interfaces.
+
+ Version: Technology: Macintosh Easy Open 1.1
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1989-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __TRANSLATIONEXTENSIONS__
+#define __TRANSLATIONEXTENSIONS__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+#ifndef __COMPONENTS__
+#include "Components.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ kSupportsFileTranslation = 1,
+ kSupportsScrapTranslation = 2,
+ kTranslatorCanGenerateFilename = 4
+};
+
+
+/* better names for 4-char codes*/
+typedef OSType FileType;
+typedef ResType ScrapType;
+typedef unsigned long TranslationAttributes;
+enum {
+ taDstDocNeedsResourceFork = 1,
+ taDstIsAppTranslation = 2
+};
+
+
+
+struct FileTypeSpec {
+ FileType format;
+ long hint;
+ TranslationAttributes flags; /* taDstDocNeedsResourceFork, taDstIsAppTranslation*/
+ OSType catInfoType;
+ OSType catInfoCreator;
+};
+typedef struct FileTypeSpec FileTypeSpec;
+
+struct FileTranslationList {
+ unsigned long modDate;
+ unsigned long groupCount;
+ /* unsigned long group1SrcCount;*/
+ /* unsigned long group1SrcEntrySize = sizeof(FileTypeSpec);*/
+ /* FileTypeSpec group1SrcTypes[group1SrcCount]*/
+ /* unsigned long group1DstCount;*/
+ /* unsigned long group1DstEntrySize = sizeof(FileTypeSpec);*/
+ /* FileTypeSpec group1DstTypes[group1DstCount]*/
+};
+typedef struct FileTranslationList FileTranslationList;
+typedef FileTranslationList * FileTranslationListPtr;
+typedef FileTranslationListPtr * FileTranslationListHandle;
+
+
+struct ScrapTypeSpec {
+ ScrapType format;
+ long hint;
+};
+typedef struct ScrapTypeSpec ScrapTypeSpec;
+
+struct ScrapTranslationList {
+ unsigned long modDate;
+ unsigned long groupCount;
+ /* unsigned long group1SrcCount;*/
+ /* unsigned long group1SrcEntrySize = sizeof(ScrapTypeSpec);*/
+ /* ScrapTypeSpec group1SrcTypes[group1SrcCount]*/
+ /* unsigned long group1DstCount;*/
+ /* unsigned long group1DstEntrySize = sizeof(ScrapTypeSpec);*/
+ /* ScrapTypeSpec group1DstTypes[group1DstCount]*/
+};
+typedef struct ScrapTranslationList ScrapTranslationList;
+typedef ScrapTranslationList * ScrapTranslationListPtr;
+typedef ScrapTranslationListPtr * ScrapTranslationListHandle;
+/* definition of callbacks to update progress dialog*/
+
+typedef long TranslationRefNum;
+/*****************************************************************************************
+*
+* This routine sets the advertisement in the top half of the progress dialog.
+* It is called once at the beginning of your DoTranslateFile routine.
+*
+* Enter: refNum Translation reference supplied to DoTranslateFile.
+* advertisement A handle to the picture to display. This must be non-purgable.
+* Before returning from DoTranslateFile, you should dispose
+* of the memory. (Normally, it is in the temp translation heap
+* so it is cleaned up for you.)
+*
+* Exit: returns noErr, paramErr, or memFullErr
+*/
+EXTERN_API( OSErr )
+SetTranslationAdvertisement (TranslationRefNum refNum,
+ PicHandle advertisement) TWOWORDINLINE(0x7002, 0xABFC);
+
+
+/*****************************************************************************************
+*
+* This routine updates the progress bar in the progress dialog.
+* It is called repeatedly from within your DoTranslateFile routine.
+* It should be called often, so that the user will get feedback if he tries to cancel.
+*
+* Enter: refNum translation reference supplied to DoTranslateFile.
+* progress percent complete (0-100)
+*
+* Exit: canceled TRUE if the user clicked the Cancel button, FALSE otherwise
+* returns noErr, paramErr, or memFullErr
+*/
+EXTERN_API( OSErr )
+UpdateTranslationProgress (TranslationRefNum refNum,
+ short percentDone,
+ Boolean * canceled) TWOWORDINLINE(0x7001, 0xABFC);
+
+
+
+/* ComponentMgr selectors for routines*/
+enum {
+ kTranslateGetFileTranslationList = 0, /* component selectors*/
+ kTranslateIdentifyFile = 1,
+ kTranslateTranslateFile = 2,
+ kTranslateGetTranslatedFilename = 3,
+ kTranslateGetScrapTranslationList = 10, /* skip to scrap routines*/
+ kTranslateIdentifyScrap = 11,
+ kTranslateTranslateScrap = 12,
+ kTranslateGetScrapTranslationListConsideringData = 13
+};
+
+
+/* Routines to implment in a file translation extension*/
+
+
+typedef CALLBACK_API( ComponentResult , DoGetFileTranslationListProcPtr )(ComponentInstance self, FileTranslationListHandle translationList);
+typedef CALLBACK_API( ComponentResult , DoIdentifyFileProcPtr )(ComponentInstance self, const FSSpec *theDocument, FileType *docType);
+typedef CALLBACK_API( ComponentResult , DoTranslateFileProcPtr )(ComponentInstance self, TranslationRefNum refNum, const FSSpec *sourceDocument, FileType srcType, long srcTypeHint, const FSSpec *dstDoc, FileType dstType, long dstTypeHint);
+typedef CALLBACK_API( ComponentResult , DoGetTranslatedFilenameProcPtr )(ComponentInstance self, FileType dstType, long dstTypeHint, FSSpec *theDocument);
+
+/* Routine to implement in a scrap translation extension*/
+
+typedef CALLBACK_API( ComponentResult , DoGetScrapTranslationListProcPtr )(ComponentInstance self, ScrapTranslationListHandle list);
+typedef CALLBACK_API( ComponentResult , DoIdentifyScrapProcPtr )(ComponentInstance self, const void *dataPtr, Size dataLength, ScrapType *dataFormat);
+typedef CALLBACK_API( ComponentResult , DoTranslateScrapProcPtr )(ComponentInstance self, TranslationRefNum refNum, const void *srcDataPtr, Size srcDataLength, ScrapType srcType, long srcTypeHint, Handle dstData, ScrapType dstType, long dstTypeHint);
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __TRANSLATIONEXTENSIONS__ */
+
diff --git a/include/qt/Traps.h b/include/qt/Traps.h
new file mode 100644
index 000000000..5578a1dd6
--- /dev/null
+++ b/include/qt/Traps.h
@@ -0,0 +1,1077 @@
+/*
+ File: Traps.h
+
+ Contains: A-Trap constants.
+
+ Version: Technology: Mac OS 9
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1985-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __TRAPS__
+#define __TRAPS__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* QuickDraw */
+enum {
+ _NQDMisc = 0xABC3,
+ _CopyMask = 0xA817,
+ _MeasureText = 0xA837,
+ _GetMaskTable = 0xA836,
+ _CalcMask = 0xA838,
+ _SeedFill = 0xA839,
+ _InitCursor = 0xA850,
+ _SetCursor = 0xA851,
+ _HideCursor = 0xA852,
+ _ShowCursor = 0xA853,
+ _ShieldCursor = 0xA855,
+ _ObscureCursor = 0xA856,
+ _BitAnd = 0xA858,
+ _BitXOr = 0xA859,
+ _BitNot = 0xA85A,
+ _BitOr = 0xA85B,
+ _BitShift = 0xA85C,
+ _BitTst = 0xA85D,
+ _BitSet = 0xA85E,
+ _BitClr = 0xA85F,
+ _Random = 0xA861,
+ _ForeColor = 0xA862,
+ _BackColor = 0xA863,
+ _ColorBit = 0xA864,
+ _GetPixel = 0xA865,
+ _StuffHex = 0xA866,
+ _LongMul = 0xA867,
+ _FixMul = 0xA868,
+ _FixRatio = 0xA869,
+ _HiWord = 0xA86A,
+ _LoWord = 0xA86B,
+ _FixRound = 0xA86C,
+ _InitPort = 0xA86D,
+ _InitGraf = 0xA86E,
+ _OpenPort = 0xA86F,
+ _LocalToGlobal = 0xA870,
+ _GlobalToLocal = 0xA871,
+ _GrafDevice = 0xA872,
+ _SetPort = 0xA873,
+ _GetPort = 0xA874,
+ _SetPBits = 0xA875,
+ _PortSize = 0xA876,
+ _MovePortTo = 0xA877,
+ _SetOrigin = 0xA878,
+ _SetClip = 0xA879,
+ _GetClip = 0xA87A,
+ _ClipRect = 0xA87B,
+ _BackPat = 0xA87C,
+ _ClosePort = 0xA87D,
+ _AddPt = 0xA87E,
+ _SubPt = 0xA87F,
+ _SetPt = 0xA880,
+ _EqualPt = 0xA881,
+ _StdText = 0xA882,
+ _DrawChar = 0xA883,
+ _DrawString = 0xA884,
+ _DrawText = 0xA885,
+ _TextWidth = 0xA886,
+ _TextFont = 0xA887,
+ _TextFace = 0xA888,
+ _TextMode = 0xA889,
+ _TextSize = 0xA88A,
+ _GetFontInfo = 0xA88B,
+ _StringWidth = 0xA88C,
+ _CharWidth = 0xA88D,
+ _SpaceExtra = 0xA88E,
+ _StdLine = 0xA890,
+ _LineTo = 0xA891,
+ _Line = 0xA892
+};
+
+enum {
+ _MoveTo = 0xA893,
+ _Move = 0xA894,
+ _ShutDown = 0xA895,
+ _HidePen = 0xA896,
+ _ShowPen = 0xA897,
+ _GetPenState = 0xA898,
+ _SetPenState = 0xA899,
+ _GetPen = 0xA89A,
+ _PenSize = 0xA89B,
+ _PenMode = 0xA89C,
+ _PenPat = 0xA89D,
+ _PenNormal = 0xA89E,
+ _Unimplemented = 0xA89F,
+ _StdRect = 0xA8A0,
+ _FrameRect = 0xA8A1,
+ _PaintRect = 0xA8A2,
+ _EraseRect = 0xA8A3,
+ _InverRect = 0xA8A4,
+ _FillRect = 0xA8A5,
+ _EqualRect = 0xA8A6,
+ _SetRect = 0xA8A7,
+ _OffsetRect = 0xA8A8,
+ _InsetRect = 0xA8A9,
+ _SectRect = 0xA8AA,
+ _UnionRect = 0xA8AB,
+ _Pt2Rect = 0xA8AC,
+ _PtInRect = 0xA8AD,
+ _EmptyRect = 0xA8AE,
+ _StdRRect = 0xA8AF,
+ _FrameRoundRect = 0xA8B0,
+ _PaintRoundRect = 0xA8B1,
+ _EraseRoundRect = 0xA8B2,
+ _InverRoundRect = 0xA8B3,
+ _FillRoundRect = 0xA8B4,
+ _StdOval = 0xA8B6,
+ _FrameOval = 0xA8B7,
+ _PaintOval = 0xA8B8,
+ _EraseOval = 0xA8B9,
+ _InvertOval = 0xA8BA,
+ _FillOval = 0xA8BB,
+ _SlopeFromAngle = 0xA8BC,
+ _StdArc = 0xA8BD,
+ _FrameArc = 0xA8BE,
+ _PaintArc = 0xA8BF,
+ _EraseArc = 0xA8C0,
+ _InvertArc = 0xA8C1,
+ _FillArc = 0xA8C2,
+ _PtToAngle = 0xA8C3,
+ _AngleFromSlope = 0xA8C4,
+ _StdPoly = 0xA8C5,
+ _FramePoly = 0xA8C6,
+ _PaintPoly = 0xA8C7,
+ _ErasePoly = 0xA8C8,
+ _InvertPoly = 0xA8C9,
+ _FillPoly = 0xA8CA,
+ _OpenPoly = 0xA8CB,
+ _ClosePgon = 0xA8CC,
+ _ClosePoly = 0xA8CC,
+ _KillPoly = 0xA8CD,
+ _OffsetPoly = 0xA8CE,
+ _PackBits = 0xA8CF,
+ _UnpackBits = 0xA8D0,
+ _StdRgn = 0xA8D1,
+ _FrameRgn = 0xA8D2,
+ _PaintRgn = 0xA8D3,
+ _EraseRgn = 0xA8D4,
+ _InverRgn = 0xA8D5,
+ _FillRgn = 0xA8D6,
+ _BitMapRgn = 0xA8D7,
+ _BitMapToRegion = 0xA8D7,
+ _NewRgn = 0xA8D8,
+ _DisposRgn = 0xA8D9,
+ _DisposeRgn = 0xA8D9,
+ _OpenRgn = 0xA8DA,
+ _CloseRgn = 0xA8DB,
+ _CopyRgn = 0xA8DC,
+ _SetEmptyRgn = 0xA8DD,
+ _SetRecRgn = 0xA8DE,
+ _RectRgn = 0xA8DF,
+ _OffsetRgn = 0xA8E0,
+ _InsetRgn = 0xA8E1,
+ _EmptyRgn = 0xA8E2,
+ _EqualRgn = 0xA8E3,
+ _SectRgn = 0xA8E4,
+ _UnionRgn = 0xA8E5,
+ _DiffRgn = 0xA8E6,
+ _XOrRgn = 0xA8E7,
+ _PtInRgn = 0xA8E8,
+ _RectInRgn = 0xA8E9,
+ _SetStdProcs = 0xA8EA,
+ _StdBits = 0xA8EB,
+ _CopyBits = 0xA8EC,
+ _StdTxMeas = 0xA8ED,
+ _StdGetPic = 0xA8EE,
+ _ScrollRect = 0xA8EF,
+ _StdPutPic = 0xA8F0,
+ _StdComment = 0xA8F1,
+ _PicComment = 0xA8F2,
+ _OpenPicture = 0xA8F3,
+ _ClosePicture = 0xA8F4,
+ _KillPicture = 0xA8F5,
+ _DrawPicture = 0xA8F6,
+ _Layout = 0xA8F7,
+ _ScalePt = 0xA8F8,
+ _MapPt = 0xA8F9,
+ _MapRect = 0xA8FA,
+ _MapRgn = 0xA8FB,
+ _MapPoly = 0xA8FC
+};
+
+#if OLDROUTINENAMES
+/* Some names had wrong case in C, long ago*/
+enum {
+ _OffSetRect = _OffsetRect,
+ _InSetRect = _InsetRect,
+ _OffSetPoly = _OffsetPoly,
+ _OfSetRgn = _OffsetRgn,
+ _OfsetRgn = _OffsetRgn,
+ _InSetRgn = _InsetRgn
+};
+
+#endif /* OLDROUTINENAMES */
+
+
+/* Toolbox */
+enum {
+ _Count1Resources = 0xA80D,
+ _Get1IxResource = 0xA80E,
+ _Get1IxType = 0xA80F,
+ _Unique1ID = 0xA810,
+ _TESelView = 0xA811,
+ _TEPinScroll = 0xA812,
+ _TEAutoView = 0xA813,
+ _Pack8 = 0xA816,
+ _FixATan2 = 0xA818,
+ _XMunger = 0xA819,
+ _HOpenResFile = 0xA81A,
+ _HCreateResFile = 0xA81B,
+ _Count1Types = 0xA81C,
+ _Get1Resource = 0xA81F,
+ _Get1NamedResource = 0xA820,
+ _ResourceDispatch = 0xA822,
+ _MaxSizeRsrc = 0xA821,
+ _InsMenuItem = 0xA826,
+ _InsertMenuItem = 0xA826,
+ _HideDItem = 0xA827,
+ _HideDialogItem = 0xA827,
+ _ShowDItem = 0xA828,
+ _ShowDialogItem = 0xA828,
+ _Pack9 = 0xA82B,
+ _Pack10 = 0xA82C,
+ _Pack11 = 0xA82D,
+ _Pack12 = 0xA82E,
+ _Pack13 = 0xA82F,
+ _Pack14 = 0xA830,
+ _Pack15 = 0xA831,
+ _ScrnBitMap = 0xA833,
+ _SetFScaleDisable = 0xA834,
+ _FontMetrics = 0xA835,
+ _ZoomWindow = 0xA83A,
+ _TrackBox = 0xA83B,
+ _PrGlue = 0xA8FD,
+ _InitFonts = 0xA8FE,
+ _GetFName = 0xA8FF,
+ _GetFNum = 0xA900,
+ _FMSwapFont = 0xA901,
+ _RealFont = 0xA902,
+ _SetFontLock = 0xA903,
+ _DrawGrowIcon = 0xA904,
+ _DragGrayRgn = 0xA905,
+ _NewString = 0xA906,
+ _SetString = 0xA907,
+ _ShowHide = 0xA908,
+ _CalcVis = 0xA909,
+ _CalcVBehind = 0xA90A,
+ _ClipAbove = 0xA90B,
+ _PaintOne = 0xA90C,
+ _PaintBehind = 0xA90D,
+ _SaveOld = 0xA90E,
+ _DrawNew = 0xA90F,
+ _GetWMgrPort = 0xA910,
+ _CheckUpDate = 0xA911,
+ _InitWindows = 0xA912,
+ _NewWindow = 0xA913,
+ _DisposWindow = 0xA914,
+ _DisposeWindow = 0xA914,
+ _ShowWindow = 0xA915,
+ _HideWindow = 0xA916,
+ _GetWRefCon = 0xA917,
+ _SetWRefCon = 0xA918,
+ _GetWTitle = 0xA919,
+ _SetWTitle = 0xA91A,
+ _MoveWindow = 0xA91B,
+ _HiliteWindow = 0xA91C,
+ _SizeWindow = 0xA91D,
+ _TrackGoAway = 0xA91E,
+ _SelectWindow = 0xA91F,
+ _BringToFront = 0xA920,
+ _SendBehind = 0xA921,
+ _BeginUpDate = 0xA922,
+ _EndUpDate = 0xA923,
+ _FrontWindow = 0xA924,
+ _DragWindow = 0xA925,
+ _DragTheRgn = 0xA926,
+ _InvalRgn = 0xA927,
+ _InvalRect = 0xA928,
+ _ValidRgn = 0xA929,
+ _ValidRect = 0xA92A,
+ _GrowWindow = 0xA92B,
+ _FindWindow = 0xA92C,
+ _CloseWindow = 0xA92D,
+ _SetWindowPic = 0xA92E,
+ _GetWindowPic = 0xA92F
+};
+
+enum {
+ _InitMenus = 0xA930,
+ _NewMenu = 0xA931,
+ _DisposMenu = 0xA932,
+ _DisposeMenu = 0xA932,
+ _AppendMenu = 0xA933,
+ _ClearMenuBar = 0xA934,
+ _InsertMenu = 0xA935,
+ _DeleteMenu = 0xA936,
+ _DrawMenuBar = 0xA937,
+ _InvalMenuBar = 0xA81D,
+ _HiliteMenu = 0xA938,
+ _EnableItem = 0xA939,
+ _DisableItem = 0xA93A,
+ _GetMenuBar = 0xA93B,
+ _SetMenuBar = 0xA93C,
+ _MenuSelect = 0xA93D,
+ _MenuKey = 0xA93E,
+ _GetItmIcon = 0xA93F,
+ _SetItmIcon = 0xA940,
+ _GetItmStyle = 0xA941,
+ _SetItmStyle = 0xA942,
+ _GetItmMark = 0xA943,
+ _SetItmMark = 0xA944,
+ _CheckItem = 0xA945,
+ _GetItem = 0xA946,
+ _GetMenuItemText = 0xA946,
+ _SetItem = 0xA947,
+ _SetMenuItemText = 0xA947,
+ _CalcMenuSize = 0xA948,
+ _GetMHandle = 0xA949,
+ _GetMenuHandle = 0xA949,
+ _SetMFlash = 0xA94A,
+ _PlotIcon = 0xA94B,
+ _FlashMenuBar = 0xA94C,
+ _AddResMenu = 0xA94D,
+ _AppendResMenu = 0xA94D,
+ _PinRect = 0xA94E,
+ _DeltaPoint = 0xA94F,
+ _CountMItems = 0xA950,
+ _InsertResMenu = 0xA951,
+ _DelMenuItem = 0xA952,
+ _DeleteMenuItem = 0xA952,
+ _UpdtControl = 0xA953,
+ _NewControl = 0xA954,
+ _DisposControl = 0xA955,
+ _DisposeControl = 0xA955,
+ _KillControls = 0xA956,
+ _ShowControl = 0xA957,
+ _HideControl = 0xA958,
+ _MoveControl = 0xA959,
+ _GetCRefCon = 0xA95A,
+ _GetControlReference = 0xA95A,
+ _SetCRefCon = 0xA95B,
+ _SetControlReference = 0xA95B,
+ _SizeControl = 0xA95C,
+ _HiliteControl = 0xA95D,
+ _GetCTitle = 0xA95E,
+ _GetControlTitle = 0xA95E,
+ _SetCTitle = 0xA95F,
+ _SetControlTitle = 0xA95F,
+ _GetCtlValue = 0xA960,
+ _GetControlValue = 0xA960,
+ _GetMinCtl = 0xA961,
+ _GetControlMinimum = 0xA961,
+ _GetMaxCtl = 0xA962,
+ _GetControlMaximum = 0xA962,
+ _SetCtlValue = 0xA963,
+ _SetControlValue = 0xA963,
+ _SetMinCtl = 0xA964,
+ _SetControlMinimum = 0xA964,
+ _SetMaxCtl = 0xA965,
+ _SetControlMaximum = 0xA965,
+ _TestControl = 0xA966,
+ _DragControl = 0xA967,
+ _TrackControl = 0xA968,
+ _DrawControls = 0xA969,
+ _GetCtlAction = 0xA96A,
+ _GetControlAction = 0xA96A,
+ _SetCtlAction = 0xA96B,
+ _SetControlAction = 0xA96B,
+ _FindControl = 0xA96C,
+ _Draw1Control = 0xA96D
+};
+
+enum {
+ _Dequeue = 0xA96E,
+ _Enqueue = 0xA96F,
+ _WaitNextEvent = 0xA860,
+ _GetNextEvent = 0xA970,
+ _EventAvail = 0xA971,
+ _GetMouse = 0xA972,
+ _StillDown = 0xA973,
+ _Button = 0xA974,
+ _TickCount = 0xA975,
+ _GetKeys = 0xA976,
+ _WaitMouseUp = 0xA977,
+ _UpdtDialog = 0xA978,
+ _InitDialogs = 0xA97B,
+ _GetNewDialog = 0xA97C,
+ _NewDialog = 0xA97D,
+ _SelIText = 0xA97E,
+ _SelectDialogItemText = 0xA97E,
+ _IsDialogEvent = 0xA97F,
+ _DialogSelect = 0xA980,
+ _DrawDialog = 0xA981,
+ _CloseDialog = 0xA982,
+ _DisposDialog = 0xA983,
+ _DisposeDialog = 0xA983,
+ _FindDItem = 0xA984,
+ _FindDialogItem = 0xA984,
+ _Alert = 0xA985,
+ _StopAlert = 0xA986,
+ _NoteAlert = 0xA987,
+ _CautionAlert = 0xA988,
+ _ParamText = 0xA98B,
+ _ErrorSound = 0xA98C,
+ _GetDItem = 0xA98D,
+ _GetDialogItem = 0xA98D,
+ _SetDItem = 0xA98E,
+ _SetDialogItem = 0xA98E,
+ _SetIText = 0xA98F,
+ _SetDialogItemText = 0xA98F,
+ _GetIText = 0xA990,
+ _GetDialogItemText = 0xA990,
+ _ModalDialog = 0xA991,
+ _DetachResource = 0xA992,
+ _SetResPurge = 0xA993,
+ _CurResFile = 0xA994,
+ _InitResources = 0xA995,
+ _RsrcZoneInit = 0xA996,
+ _OpenResFile = 0xA997,
+ _UseResFile = 0xA998,
+ _UpdateResFile = 0xA999,
+ _CloseResFile = 0xA99A,
+ _SetResLoad = 0xA99B,
+ _CountResources = 0xA99C,
+ _GetIndResource = 0xA99D,
+ _CountTypes = 0xA99E,
+ _GetIndType = 0xA99F,
+ _GetResource = 0xA9A0,
+ _GetNamedResource = 0xA9A1,
+ _LoadResource = 0xA9A2,
+ _ReleaseResource = 0xA9A3,
+ _HomeResFile = 0xA9A4,
+ _SizeRsrc = 0xA9A5,
+ _GetResAttrs = 0xA9A6,
+ _SetResAttrs = 0xA9A7,
+ _GetResInfo = 0xA9A8,
+ _SetResInfo = 0xA9A9,
+ _ChangedResource = 0xA9AA,
+ _AddResource = 0xA9AB,
+ _AddReference = 0xA9AC,
+ _RmveResource = 0xA9AD,
+ _RmveReference = 0xA9AE,
+ _ResError = 0xA9AF,
+ _WriteResource = 0xA9B0,
+ _CreateResFile = 0xA9B1,
+ _SystemEvent = 0xA9B2,
+ _SystemClick = 0xA9B3,
+ _SystemTask = 0xA9B4,
+ _SystemMenu = 0xA9B5,
+ _OpenDeskAcc = 0xA9B6,
+ _CloseDeskAcc = 0xA9B7,
+ _GetPattern = 0xA9B8,
+ _GetCursor = 0xA9B9,
+ _GetString = 0xA9BA,
+ _GetIcon = 0xA9BB,
+ _GetPicture = 0xA9BC,
+ _GetNewWindow = 0xA9BD,
+ _GetNewControl = 0xA9BE,
+ _GetRMenu = 0xA9BF,
+ _GetNewMBar = 0xA9C0,
+ _UniqueID = 0xA9C1,
+ _SysEdit = 0xA9C2,
+ _OpenRFPerm = 0xA9C4,
+ _RsrcMapEntry = 0xA9C5,
+ _Secs2Date = 0xA9C6,
+ _SecondsToDate = 0xA9C6,
+ _Date2Secs = 0xA9C7,
+ _DateToSeconds = 0xA9C7,
+ _SysBeep = 0xA9C8,
+ _SysError = 0xA9C9,
+ _PutIcon = 0xA9CA,
+ _Munger = 0xA9E0,
+ _HandToHand = 0xA9E1,
+ _PtrToXHand = 0xA9E2,
+ _PtrToHand = 0xA9E3,
+ _HandAndHand = 0xA9E4,
+ _InitPack = 0xA9E5,
+ _InitAllPacks = 0xA9E6,
+ _Pack0 = 0xA9E7,
+ _Pack1 = 0xA9E8,
+ _Pack2 = 0xA9E9,
+ _Pack3 = 0xA9EA,
+ _FP68K = 0xA9EB,
+ _Pack4 = 0xA9EB,
+ _Elems68K = 0xA9EC,
+ _Pack5 = 0xA9EC,
+ _Pack6 = 0xA9ED,
+ _DECSTR68K = 0xA9EE,
+ _Pack7 = 0xA9EE,
+ _PtrAndHand = 0xA9EF,
+ _LoadSeg = 0xA9F0,
+ _UnLoadSeg = 0xA9F1,
+ _Launch = 0xA9F2,
+ _Chain = 0xA9F3,
+ _ExitToShell = 0xA9F4,
+ _GetAppParms = 0xA9F5,
+ _GetResFileAttrs = 0xA9F6,
+ _SetResFileAttrs = 0xA9F7,
+ _MethodDispatch = 0xA9F8,
+ _InfoScrap = 0xA9F9,
+ _UnlodeScrap = 0xA9FA,
+ _UnloadScrap = 0xA9FA,
+ _LodeScrap = 0xA9FB,
+ _LoadScrap = 0xA9FB,
+ _ZeroScrap = 0xA9FC,
+ _GetScrap = 0xA9FD,
+ _PutScrap = 0xA9FE,
+ _Debugger = 0xA9FF,
+ _DisplayDispatch = 0xABEB,
+ _IconDispatch = 0xABC9,
+ _ThreadDispatch = 0xABF2,
+ _DictionaryDispatch = 0xAA53,
+ _DebugStr = 0xABFF
+};
+
+
+enum {
+ /* PPCToolbox */
+ _PPC = 0xA0DD, /* Alias Manager */
+ _AliasDispatch = 0xA823, /* Device Manager (some shared by the File Manager) */
+ _Open = 0xA000,
+ _Close = 0xA001,
+ _Read = 0xA002,
+ _Write = 0xA003,
+ _Control = 0xA004,
+ _Status = 0xA005,
+ _KillIO = 0xA006, /* File Manager */
+ _GetVolInfo = 0xA007,
+ _Create = 0xA008,
+ _Delete = 0xA009,
+ _OpenRF = 0xA00A,
+ _Rename = 0xA00B,
+ _GetFileInfo = 0xA00C,
+ _SetFileInfo = 0xA00D,
+ _UnmountVol = 0xA00E,
+ _HUnmountVol = 0xA20E,
+ _MountVol = 0xA00F,
+ _Allocate = 0xA010,
+ _GetEOF = 0xA011,
+ _SetEOF = 0xA012,
+ _FlushVol = 0xA013,
+ _GetVol = 0xA014,
+ _SetVol = 0xA015,
+ _FInitQueue = 0xA016,
+ _Eject = 0xA017,
+ _GetFPos = 0xA018,
+ _SetFilLock = 0xA041,
+ _RstFilLock = 0xA042,
+ _SetFilType = 0xA043,
+ _SetFPos = 0xA044,
+ _FlushFile = 0xA045,
+ _HOpen = 0xA200,
+ _HGetVInfo = 0xA207,
+ _HCreate = 0xA208,
+ _HDelete = 0xA209,
+ _HOpenRF = 0xA20A,
+ _HRename = 0xA20B,
+ _HGetFileInfo = 0xA20C,
+ _HSetFileInfo = 0xA20D,
+ _AllocContig = 0xA210,
+ _HSetVol = 0xA215,
+ _HGetVol = 0xA214,
+ _HSetFLock = 0xA241,
+ _HRstFLock = 0xA242, /* dispatch trap for remaining File Manager (and Desktop Manager) calls*/
+ _FSDispatch = 0xA060,
+ _HFSDispatch = 0xA260, /* High level FSSpec calls */
+ _HighLevelFSDispatch = 0xAA52
+};
+
+enum {
+ /* Memory Manager */
+ _InitZone = 0xA019,
+ _GetZone = 0xA11A,
+ _SetZone = 0xA01B,
+ _FreeMem = 0xA01C,
+ _MaxMem = 0xA11D,
+ _NewPtr = 0xA11E,
+ _NewPtrSys = 0xA51E,
+ _NewPtrClear = 0xA31E,
+ _NewPtrSysClear = 0xA71E,
+ _DisposPtr = 0xA01F,
+ _DisposePtr = 0xA01F,
+ _SetPtrSize = 0xA020,
+ _GetPtrSize = 0xA021,
+ _NewHandle = 0xA122,
+ _NewHandleSys = 0xA522,
+ _NewHandleClear = 0xA322,
+ _NewHandleSysClear = 0xA722,
+ _DisposHandle = 0xA023,
+ _DisposeHandle = 0xA023,
+ _SetHandleSize = 0xA024,
+ _GetHandleSize = 0xA025,
+ _HandleZone = 0xA126,
+ _ReallocHandle = 0xA027,
+ _RecoverHandle = 0xA128,
+ _HLock = 0xA029,
+ _HUnlock = 0xA02A,
+ _EmptyHandle = 0xA02B,
+ _InitApplZone = 0xA02C,
+ _SetApplLimit = 0xA02D,
+ _BlockMove = 0xA02E,
+ _BlockMoveData = 0xA22E,
+ _MemoryDispatch = 0xA05C,
+ _MemoryDispatchA0Result = 0xA15C,
+ _DeferUserFn = 0xA08F,
+ _DebugUtil = 0xA08D,
+ _HeapDispatch = 0xA0A4
+};
+
+enum {
+ /* Event Manager */
+ _PostEvent = 0xA02F,
+ _PPostEvent = 0xA12F,
+ _OSEventAvail = 0xA030,
+ _GetOSEvent = 0xA031,
+ _FlushEvents = 0xA032,
+ _VInstall = 0xA033,
+ _VRemove = 0xA034,
+ _OffLine = 0xA035,
+ _MoreMasters = 0xA036,
+ _WriteParam = 0xA038,
+ _ReadDateTime = 0xA039,
+ _SetDateTime = 0xA03A,
+ _Delay = 0xA03B,
+ _CmpString = 0xA03C,
+ _DrvrInstall = 0xA03D,
+ _DrvrRemove = 0xA03E,
+ _InitUtil = 0xA03F,
+ _ResrvMem = 0xA040,
+ _GetTrapAddress = 0xA146,
+ _SetTrapAddress = 0xA047,
+ _GetOSTrapAddress = 0xA346,
+ _SetOSTrapAddress = 0xA247,
+ _GetToolTrapAddress = 0xA746,
+ _SetToolTrapAddress = 0xA647,
+ _GetToolBoxTrapAddress = 0xA746,
+ _SetToolBoxTrapAddress = 0xA647,
+ _PtrZone = 0xA148,
+ _HPurge = 0xA049,
+ _HNoPurge = 0xA04A,
+ _SetGrowZone = 0xA04B,
+ _CompactMem = 0xA04C,
+ _PurgeMem = 0xA04D,
+ _AddDrive = 0xA04E,
+ _RDrvrInstall = 0xA04F,
+ _LwrString = 0xA056,
+ _UprString = 0xA054,
+ _SetApplBase = 0xA057,
+ _HWPriv = 0xA198
+};
+
+enum {
+ _LowerText = 0xA056,
+ _StripText = 0xA256,
+ _UpperText = 0xA456,
+ _StripUpperText = 0xA656,
+ _OSDispatch = 0xA88F,
+ _RelString = 0xA050,
+ _CompareString = 0xA050,
+ _ReadXPRam = 0xA051,
+ _WriteXPRam = 0xA052,
+ _InsTime = 0xA058,
+ _InsXTime = 0xA458,
+ _RmvTime = 0xA059,
+ _PrimeTime = 0xA05A,
+ _Microseconds = 0xA193,
+ _PowerOff = 0xA05B,
+ _MaxBlock = 0xA061,
+ _PurgeSpace = 0xA162,
+ _PurgeSpaceSys = 0xA562,
+ _MaxApplZone = 0xA063,
+ _MoveHHi = 0xA064,
+ _StackSpace = 0xA065,
+ _NewEmptyHandle = 0xA166,
+ _HSetRBit = 0xA067,
+ _HClrRBit = 0xA068,
+ _HGetState = 0xA069,
+ _HSetState = 0xA06A,
+ _InitFS = 0xA06C,
+ _InitEvents = 0xA06D,
+ _StripAddress = 0xA055,
+ _Translate24To32 = 0xA091,
+ _SetAppBase = 0xA057,
+ _SwapMMUMode = 0xA05D,
+ _SlotVInstall = 0xA06F,
+ _SlotVRemove = 0xA070,
+ _AttachVBL = 0xA071,
+ _DoVBLTask = 0xA072,
+ _SIntInstall = 0xA075,
+ _SIntRemove = 0xA076,
+ _CountADBs = 0xA077,
+ _GetIndADB = 0xA078,
+ _GetADBInfo = 0xA079,
+ _SetADBInfo = 0xA07A,
+ _ADBReInit = 0xA07B,
+ _ADBOp = 0xA07C,
+ _VADBProc = 0xA0AE,
+ _GetDefaultStartup = 0xA07D,
+ _SetDefaultStartup = 0xA07E,
+ _InternalWait = 0xA07F,
+ _RGetResource = 0xA80C,
+ _GetVideoDefault = 0xA080,
+ _SetVideoDefault = 0xA081,
+ _DTInstall = 0xA082,
+ _SetOSDefault = 0xA083,
+ _GetOSDefault = 0xA084,
+ _IOPInfoAccess = 0xA086,
+ _IOPMsgRequest = 0xA087,
+ _IOPMoveData = 0xA088
+};
+
+enum {
+ /* Power Manager */
+ _PowerDispatch = 0xA09F,
+ _PMgrOp = 0xA085,
+ _IdleUpdate = 0xA285,
+ _IdleState = 0xA485,
+ _SerialPower = 0xA685,
+ _Sleep = 0xA08A,
+ _SleepQInstall = 0xA28A,
+ _SlpQInstall = 0xA28A,
+ _SleepQRemove = 0xA48A,
+ _SlpQRemove = 0xA48A,
+ _CommToolboxDispatch = 0xA08B,
+ _SysEnvirons = 0xA090,
+ _Gestalt = 0xA1AD,
+ _NewGestalt = 0xA3AD,
+ _ReplaceGestalt = 0xA5AD,
+ _GetGestaltProcPtr = 0xA7AD,
+ _InitProcMenu = 0xA808,
+ _GetItemCmd = 0xA84E,
+ _SetItemCmd = 0xA84F,
+ _PopUpMenuSelect = 0xA80B,
+ _KeyTrans = 0xA9C3,
+ _KeyTranslate = 0xA9C3
+};
+
+enum {
+ /* TextEdit */
+ _TEGetText = 0xA9CB,
+ _TEInit = 0xA9CC,
+ _TEDispose = 0xA9CD,
+ _TextBox = 0xA9CE,
+ _TETextBox = 0xA9CE,
+ _TESetText = 0xA9CF,
+ _TECalText = 0xA9D0,
+ _TESetSelect = 0xA9D1,
+ _TENew = 0xA9D2,
+ _TEUpdate = 0xA9D3,
+ _TEClick = 0xA9D4,
+ _TECopy = 0xA9D5,
+ _TECut = 0xA9D6,
+ _TEDelete = 0xA9D7,
+ _TEActivate = 0xA9D8,
+ _TEDeactivate = 0xA9D9,
+ _TEIdle = 0xA9DA,
+ _TEPaste = 0xA9DB,
+ _TEKey = 0xA9DC,
+ _TEScroll = 0xA9DD,
+ _TEInsert = 0xA9DE,
+ _TESetJust = 0xA9DF,
+ _TESetAlignment = 0xA9DF,
+ _TEGetOffset = 0xA83C,
+ _TEDispatch = 0xA83D,
+ _TEStyleNew = 0xA83E,
+ _TEFindWord = 0xA0FE,
+ _TEFindLine = 0xA0FF
+};
+
+enum {
+ /* Color Quickdraw */
+ _OpenCPort = 0xAA00,
+ _InitCPort = 0xAA01,
+ _CloseCPort = 0xAA02,
+ _NewPixMap = 0xAA03,
+ _DisposPixMap = 0xAA04,
+ _DisposePixMap = 0xAA04,
+ _CopyPixMap = 0xAA05,
+ _SetPortPix = 0xAA06,
+ _NewPixPat = 0xAA07,
+ _DisposPixPat = 0xAA08,
+ _DisposePixPat = 0xAA08,
+ _CopyPixPat = 0xAA09,
+ _PenPixPat = 0xAA0A,
+ _BackPixPat = 0xAA0B,
+ _GetPixPat = 0xAA0C,
+ _MakeRGBPat = 0xAA0D,
+ _FillCRect = 0xAA0E,
+ _FillCOval = 0xAA0F,
+ _FillCRoundRect = 0xAA10,
+ _FillCArc = 0xAA11,
+ _FillCRgn = 0xAA12,
+ _FillCPoly = 0xAA13,
+ _RGBForeColor = 0xAA14,
+ _RGBBackColor = 0xAA15,
+ _SetCPixel = 0xAA16,
+ _GetCPixel = 0xAA17,
+ _GetCTable = 0xAA18,
+ _GetForeColor = 0xAA19,
+ _GetBackColor = 0xAA1A,
+ _GetCCursor = 0xAA1B,
+ _SetCCursor = 0xAA1C,
+ _AllocCursor = 0xAA1D,
+ _GetCIcon = 0xAA1E,
+ _PlotCIcon = 0xAA1F,
+ _OpenCPicture = 0xAA20,
+ _OpColor = 0xAA21,
+ _HiliteColor = 0xAA22,
+ _CharExtra = 0xAA23,
+ _DisposCTable = 0xAA24,
+ _DisposeCTable = 0xAA24,
+ _DisposCIcon = 0xAA25,
+ _DisposeCIcon = 0xAA25,
+ _DisposCCursor = 0xAA26,
+ _DisposeCCursor = 0xAA26,
+ _SeedCFill = 0xAA50,
+ _CalcCMask = 0xAA4F,
+ _CopyDeepMask = 0xAA51
+};
+
+enum {
+ /* Routines for video devices */
+ _GetMaxDevice = 0xAA27,
+ _GetCTSeed = 0xAA28,
+ _GetDeviceList = 0xAA29,
+ _GetMainDevice = 0xAA2A,
+ _GetNextDevice = 0xAA2B,
+ _TestDeviceAttribute = 0xAA2C,
+ _SetDeviceAttribute = 0xAA2D,
+ _InitGDevice = 0xAA2E,
+ _NewGDevice = 0xAA2F,
+ _DisposGDevice = 0xAA30,
+ _DisposeGDevice = 0xAA30,
+ _SetGDevice = 0xAA31,
+ _GetGDevice = 0xAA32,
+ _DeviceLoop = 0xABCA, /* Color Manager */
+ _Color2Index = 0xAA33,
+ _Index2Color = 0xAA34,
+ _InvertColor = 0xAA35,
+ _RealColor = 0xAA36,
+ _GetSubTable = 0xAA37,
+ _UpdatePixMap = 0xAA38
+};
+
+enum {
+ /* Dialog Manager */
+ _NewCDialog = 0xAA4B,
+ _NewColorDialog = 0xAA4B,
+ _MakeITable = 0xAA39,
+ _AddSearch = 0xAA3A,
+ _AddComp = 0xAA3B,
+ _SetClientID = 0xAA3C,
+ _ProtectEntry = 0xAA3D,
+ _ReserveEntry = 0xAA3E,
+ _SetEntries = 0xAA3F,
+ _QDError = 0xAA40,
+ _SaveEntries = 0xAA49,
+ _RestoreEntries = 0xAA4A,
+ _DelSearch = 0xAA4C,
+ _DelComp = 0xAA4D,
+ _SetStdCProcs = 0xAA4E,
+ _StdOpcodeProc = 0xABF8, /* Added to Toolbox for color */
+ _SetWinColor = 0xAA41,
+ _GetAuxWin = 0xAA42,
+ _SetCtlColor = 0xAA43,
+ _SetControlColor = 0xAA43,
+ _GetAuxCtl = 0xAA44,
+ _GetAuxiliaryControlRecord = 0xAA44,
+ _NewCWindow = 0xAA45,
+ _GetNewCWindow = 0xAA46,
+ _SetDeskCPat = 0xAA47,
+ _GetCWMgrPort = 0xAA48,
+ _GetCVariant = 0xA809,
+ _GetControlVariant = 0xA809,
+ _GetWVariant = 0xA80A, /* Added to Menu Manager for color */
+ _DelMCEntries = 0xAA60,
+ _DeleteMCEntries = 0xAA60,
+ _GetMCInfo = 0xAA61,
+ _SetMCInfo = 0xAA62,
+ _DispMCInfo = 0xAA63,
+ _DisposeMCInfo = 0xAA63,
+ _GetMCEntry = 0xAA64,
+ _SetMCEntries = 0xAA65,
+ _MenuChoice = 0xAA66, /* Dialog Manager */
+ _DialogDispatch = 0xAA68, /* Font Manager */
+ _SetFractEnable = 0xA814,
+ _FontDispatch = 0xA854
+};
+
+enum {
+ /* Palette Manager */
+ _InitPalettes = 0xAA90,
+ _NewPalette = 0xAA91,
+ _GetNewPalette = 0xAA92,
+ _DisposePalette = 0xAA93,
+ _ActivatePalette = 0xAA94,
+ _SetPalette = 0xAA95,
+ _NSetPalette = 0xAA95,
+ _GetPalette = 0xAA96,
+ _PmForeColor = 0xAA97,
+ _PmBackColor = 0xAA98,
+ _AnimateEntry = 0xAA99,
+ _AnimatePalette = 0xAA9A,
+ _GetEntryColor = 0xAA9B,
+ _SetEntryColor = 0xAA9C,
+ _GetEntryUsage = 0xAA9D,
+ _SetEntryUsage = 0xAA9E,
+ _CTab2Palette = 0xAA9F,
+ _Palette2CTab = 0xAAA0,
+ _CopyPalette = 0xAAA1,
+ _PaletteDispatch = 0xAAA2
+};
+
+enum {
+ /* Sound Manager */
+ _EgretDispatch = 0xA092,
+ _SoundDispatch = 0xA800,
+ _SndDisposeChannel = 0xA801,
+ _SndAddModifier = 0xA802,
+ _SndDoCommand = 0xA803,
+ _SndDoImmediate = 0xA804,
+ _SndPlay = 0xA805,
+ _SndControl = 0xA806,
+ _SndNewChannel = 0xA807
+};
+
+enum {
+ _SlotManager = 0xA06E,
+ _ScriptUtil = 0xA8B5,
+ _SCSIAtomic = 0xA089,
+ _SCSIDispatch = 0xA815,
+ _Long2Fix = 0xA83F,
+ _Fix2Long = 0xA840,
+ _Fix2Frac = 0xA841,
+ _Frac2Fix = 0xA842,
+ _Fix2X = 0xA843,
+ _X2Fix = 0xA844,
+ _Frac2X = 0xA845,
+ _X2Frac = 0xA846,
+ _FracCos = 0xA847,
+ _FracSin = 0xA848,
+ _FracSqrt = 0xA849,
+ _FracMul = 0xA84A,
+ _FracDiv = 0xA84B,
+ _FixDiv = 0xA84D,
+ _NMInstall = 0xA05E,
+ _NMRemove = 0xA05F,
+ _QDExtensions = 0xAB1D,
+ _ComponentDispatch = 0xA82A
+};
+
+enum {
+ _DockingDispatch = 0xAA57,
+ _MixedModeDispatch = 0xAA59, /* PowerPC Mac */
+ _CodeFragmentDispatch = 0xAA5A, /* PowerPC Mac */
+ _TranslationDispatch = 0xABFC, /* Translation Manager */
+ _TextServicesDispatch = 0xAA54, /* Text Services Manager */
+ _CursorDeviceDispatch = 0xAADB, /* Cursor Device Manager */
+ /* Miscellaneous Traps */
+ _InitDogCow = 0xA89F,
+ _EnableDogCow = 0xA89F,
+ _DisableDogCow = 0xA89F,
+ _Moof = 0xA89F,
+ _HFSPinaforeDispatch = 0xAA52
+};
+
+enum {
+ _OCEUtils = 0xAA5C, /* PowerTalk (AOCE)*/
+ _DigitalSignature = 0xAA5D, /* PowerTalk (AOCE)*/
+ _TBDispatch = 0xAA5E /* PowerTalk (AOCE)*/
+};
+
+enum {
+ _CollectionMgr = 0xABF6 /* Collection Manager*/
+};
+
+enum {
+ _ControlStripDispatch = 0xAAF2, /* see TechNote OS 06*/
+ _PowerMgrDispatch = 0xA09E
+};
+
+enum {
+ _ALMDispatch = 0xAAA4 /* Apple Location Manger*/
+};
+
+enum {
+ _ServerDispatch = 0xA094 /* AppleShare, Macintosh File Sharing */
+};
+
+enum {
+ _FSMDispatch = 0xA0AC, /* File System Manager*/
+ _HFSUtilDispatch = 0xA824 /* HFS Utility routines in the File System Manager*/
+};
+
+enum {
+ _ControlDispatch = 0xAA73,
+ _AppearanceDispatch = 0xAA74 /* Appearance Trap */
+};
+
+
+enum {
+ _AVLTreeDispatch = 0xAA80
+};
+
+
+
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __TRAPS__ */
+
diff --git a/include/qt/URLAccess.h b/include/qt/URLAccess.h
new file mode 100644
index 000000000..13edf48b7
--- /dev/null
+++ b/include/qt/URLAccess.h
@@ -0,0 +1,344 @@
+/*
+ File: URLAccess.h
+
+ Contains: URL Access Interfaces.
+
+ Version: Technology: URLAccess 2.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __URLACCESS__
+#define __URLACCESS__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __FILES__
+#include "Files.h"
+#endif
+
+#ifndef __CODEFRAGMENTS__
+#include "CodeFragments.h"
+#endif
+
+#ifndef __FILESIGNING__
+#include "FileSigning.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* Data structures and types */
+typedef struct OpaqueURLReference* URLReference;
+
+typedef UInt32 URLOpenFlags;
+enum {
+ kURLReplaceExistingFlag = 1 << 0,
+ kURLBinHexFileFlag = 1 << 1, /* Binhex before uploading if necessary*/
+ kURLExpandFileFlag = 1 << 2, /* Use StuffIt engine to expand file if necessary*/
+ kURLDisplayProgressFlag = 1 << 3,
+ kURLDisplayAuthFlag = 1 << 4, /* Display auth dialog if guest connection fails*/
+ kURLUploadFlag = 1 << 5, /* Do an upload instead of a download*/
+ kURLIsDirectoryHintFlag = 1 << 6, /* Hint: the URL is a directory*/
+ kURLDoNotTryAnonymousFlag = 1 << 7, /* Don't try to connect anonymously before getting logon info*/
+ kURLDirectoryListingFlag = 1 << 8, /* Download the directory listing, not the whole directory*/
+ kURLExpandAndVerifyFlag = 1 << 9, /* Expand file and then verify using signature resource*/
+ kURLNoAutoRedirectFlag = 1 << 10, /* Do not automatically redirect to new URL*/
+ kURLDebinhexOnlyFlag = 1 << 11, /* Do not use Stuffit Expander - just internal debinhex engine*/
+ kURLReservedFlag = (unsigned long)(1 << 31) /* reserved for Apple internal use*/
+};
+
+
+typedef UInt32 URLState;
+enum {
+ kURLNullState = 0,
+ kURLInitiatingState = 1,
+ kURLLookingUpHostState = 2,
+ kURLConnectingState = 3,
+ kURLResourceFoundState = 4,
+ kURLDownloadingState = 5,
+ kURLDataAvailableState = 0x10 + kURLDownloadingState,
+ kURLTransactionCompleteState = 6,
+ kURLErrorOccurredState = 7,
+ kURLAbortingState = 8,
+ kURLCompletedState = 9,
+ kURLUploadingState = 10
+};
+
+
+typedef UInt32 URLEvent;
+enum {
+ kURLInitiatedEvent = kURLInitiatingState,
+ kURLResourceFoundEvent = kURLResourceFoundState,
+ kURLDownloadingEvent = kURLDownloadingState,
+ kURLAbortInitiatedEvent = kURLAbortingState,
+ kURLCompletedEvent = kURLCompletedState,
+ kURLErrorOccurredEvent = kURLErrorOccurredState,
+ kURLDataAvailableEvent = kURLDataAvailableState,
+ kURLTransactionCompleteEvent = kURLTransactionCompleteState,
+ kURLUploadingEvent = kURLUploadingState,
+ kURLSystemEvent = 29,
+ kURLPercentEvent = 30,
+ kURLPeriodicEvent = 31,
+ kURLPropertyChangedEvent = 32
+};
+
+typedef unsigned long URLEventMask;
+enum {
+ kURLInitiatedEventMask = 1 << (kURLInitiatedEvent - 1),
+ kURLResourceFoundEventMask = 1 << (kURLResourceFoundEvent - 1),
+ kURLDownloadingMask = 1 << (kURLDownloadingEvent - 1),
+ kURLUploadingMask = 1 << (kURLUploadingEvent - 1),
+ kURLAbortInitiatedMask = 1 << (kURLAbortInitiatedEvent - 1),
+ kURLCompletedEventMask = 1 << (kURLCompletedEvent - 1),
+ kURLErrorOccurredEventMask = 1 << (kURLErrorOccurredEvent - 1),
+ kURLDataAvailableEventMask = 1 << (kURLDataAvailableEvent - 1),
+ kURLTransactionCompleteEventMask = 1 << (kURLTransactionCompleteEvent - 1),
+ kURLSystemEventMask = 1 << (kURLSystemEvent - 1),
+ kURLPercentEventMask = 1 << (kURLPercentEvent - 1),
+ kURLPeriodicEventMask = 1 << (kURLPeriodicEvent - 1),
+ kURLPropertyChangedEventMask = 1 << (kURLPropertyChangedEvent - 1),
+ kURLAllBufferEventsMask = kURLDataAvailableEventMask + kURLTransactionCompleteEventMask,
+ kURLAllNonBufferEventsMask = kURLInitiatedEventMask + kURLDownloadingMask + kURLUploadingMask + kURLAbortInitiatedMask + kURLCompletedEventMask + kURLErrorOccurredEventMask + kURLPercentEventMask + kURLPeriodicEventMask + kURLPropertyChangedEventMask,
+ kURLAllEventsMask = (long)0xFFFFFFFF
+};
+
+
+
+struct URLCallbackInfo {
+ UInt32 version;
+ URLReference urlRef;
+ const char * property;
+ UInt32 currentSize;
+ EventRecord * systemEvent;
+};
+typedef struct URLCallbackInfo URLCallbackInfo;
+static const char* kURLURL = "URLString";
+static const char* kURLResourceSize = "URLResourceSize";
+static const char* kURLLastModifiedTime = "URLLastModifiedTime";
+static const char* kURLMIMEType = "URLMIMEType";
+static const char* kURLFileType = "URLFileType";
+static const char* kURLFileCreator = "URLFileCreator";
+static const char* kURLCharacterSet = "URLCharacterSet";
+static const char* kURLResourceName = "URLResourceName";
+static const char* kURLHost = "URLHost";
+static const char* kURLAuthType = "URLAuthType";
+static const char* kURLUserName = "URLUserName";
+static const char* kURLPassword = "URLPassword";
+static const char* kURLStatusString = "URLStatusString";
+static const char* kURLIsSecure = "URLIsSecure";
+static const char* kURLCertificate = "URLCertificate";
+static const char* kURLTotalItems = "URLTotalItems";
+/* http and https properties*/
+static const char* kURLHTTPRequestMethod = "URLHTTPRequestMethod";
+static const char* kURLHTTPRequestHeader = "URLHTTPRequestHeader";
+static const char* kURLHTTPRequestBody = "URLHTTPRequestBody";
+static const char* kURLHTTPRespHeader = "URLHTTPRespHeader";
+static const char* kURLHTTPUserAgent = "URLHTTPUserAgent";
+static const char* kURLHTTPRedirectedURL = "URLHTTPRedirectedURL";
+/* authentication type flags*/
+enum {
+ kUserNameAndPasswordFlag = 0x00000001
+};
+
+EXTERN_API( OSStatus )
+URLGetURLAccessVersion (UInt32 * returnVers);
+
+#if TARGET_RT_MAC_CFM
+#ifdef __cplusplus
+ inline pascal Boolean URLAccessAvailable() { return ((URLGetURLAccessVersion != (void*)kUnresolvedCFragSymbolAddress) ); }
+#else
+ #define URLAccessAvailable() ((URLGetURLAccessVersion != (void*)kUnresolvedCFragSymbolAddress) )
+#endif
+#elif TARGET_RT_MAC_MACHO
+/* URL Access is always available on OS X */
+#ifdef __cplusplus
+ inline pascal Boolean URLAccessAvailable() { return true; }
+#else
+ #define URLAccessAvailable() (true)
+#endif
+#endif /* */
+
+typedef CALLBACK_API( OSStatus , URLNotifyProcPtr )(void *userContext, URLEvent event, URLCallbackInfo *callbackInfo);
+typedef CALLBACK_API( OSStatus , URLSystemEventProcPtr )(void *userContext, EventRecord *event);
+typedef TVECTOR_UPP_TYPE(URLNotifyProcPtr) URLNotifyUPP;
+typedef TVECTOR_UPP_TYPE(URLSystemEventProcPtr) URLSystemEventUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(URLNotifyUPP)
+ NewURLNotifyUPP (URLNotifyProcPtr userRoutine);
+
+ EXTERN_API(URLSystemEventUPP)
+ NewURLSystemEventUPP (URLSystemEventProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeURLNotifyUPP (URLNotifyUPP userUPP);
+
+ EXTERN_API(void)
+ DisposeURLSystemEventUPP (URLSystemEventUPP userUPP);
+
+ EXTERN_API(OSStatus)
+ InvokeURLNotifyUPP (void * userContext,
+ URLEvent event,
+ URLCallbackInfo * callbackInfo,
+ URLNotifyUPP userUPP);
+
+ EXTERN_API(OSStatus)
+ InvokeURLSystemEventUPP (void * userContext,
+ EventRecord * event,
+ URLSystemEventUPP userUPP);
+
+#else
+ #define NewURLNotifyUPP(userRoutine) (userRoutine)
+ #define NewURLSystemEventUPP(userRoutine) (userRoutine)
+ #define DisposeURLNotifyUPP(userUPP)
+ #define DisposeURLSystemEventUPP(userUPP)
+ #define InvokeURLNotifyUPP(userContext, event, callbackInfo, userUPP) (*userUPP)(userContext, event, callbackInfo)
+ #define InvokeURLSystemEventUPP(userContext, event, userUPP) (*userUPP)(userContext, event)
+#endif
+EXTERN_API( OSStatus )
+URLSimpleDownload (const char * url,
+ FSSpec * destination,
+ Handle destinationHandle,
+ URLOpenFlags openFlags,
+ URLSystemEventUPP eventProc,
+ void * userContext);
+
+EXTERN_API( OSStatus )
+URLDownload (URLReference urlRef,
+ FSSpec * destination,
+ Handle destinationHandle,
+ URLOpenFlags openFlags,
+ URLSystemEventUPP eventProc,
+ void * userContext);
+
+EXTERN_API( OSStatus )
+URLSimpleUpload (const char * url,
+ const FSSpec * source,
+ URLOpenFlags openFlags,
+ URLSystemEventUPP eventProc,
+ void * userContext);
+
+EXTERN_API( OSStatus )
+URLUpload (URLReference urlRef,
+ const FSSpec * source,
+ URLOpenFlags openFlags,
+ URLSystemEventUPP eventProc,
+ void * userContext);
+
+EXTERN_API( OSStatus )
+URLNewReference (const char * url,
+ URLReference * urlRef);
+
+EXTERN_API( OSStatus )
+URLDisposeReference (URLReference urlRef);
+
+EXTERN_API( OSStatus )
+URLOpen (URLReference urlRef,
+ FSSpec * fileSpec,
+ URLOpenFlags openFlags,
+ URLNotifyUPP notifyProc,
+ URLEventMask eventRegister,
+ void * userContext);
+
+EXTERN_API( OSStatus )
+URLAbort (URLReference urlRef);
+
+EXTERN_API( OSStatus )
+URLGetDataAvailable (URLReference urlRef,
+ Size * dataSize);
+
+EXTERN_API( OSStatus )
+URLGetBuffer (URLReference urlRef,
+ void ** buffer,
+ Size * bufferSize);
+
+EXTERN_API( OSStatus )
+URLReleaseBuffer (URLReference urlRef,
+ void * buffer);
+
+EXTERN_API( OSStatus )
+URLGetProperty (URLReference urlRef,
+ const char * property,
+ void * propertyBuffer,
+ Size bufferSize);
+
+EXTERN_API( OSStatus )
+URLGetPropertySize (URLReference urlRef,
+ const char * property,
+ Size * propertySize);
+
+EXTERN_API( OSStatus )
+URLSetProperty (URLReference urlRef,
+ const char * property,
+ void * propertyBuffer,
+ Size bufferSize);
+
+EXTERN_API( OSStatus )
+URLGetCurrentState (URLReference urlRef,
+ URLState * state);
+
+EXTERN_API( OSStatus )
+URLGetError (URLReference urlRef,
+ OSStatus * urlError);
+
+EXTERN_API( OSStatus )
+URLIdle (void);
+
+EXTERN_API( OSStatus )
+URLGetFileInfo (StringPtr fName,
+ OSType * fType,
+ OSType * fCreator);
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __URLACCESS__ */
+
diff --git a/include/qt/UTCUtils.h b/include/qt/UTCUtils.h
new file mode 100644
index 000000000..4887b654e
--- /dev/null
+++ b/include/qt/UTCUtils.h
@@ -0,0 +1,133 @@
+/*
+ File: UTCUtils.h
+
+ Contains: Interface for UTC to Local Time conversion and 64 Bit Clock routines
+
+ Version: Technology: Mac OS 9
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1999-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __UTCUTILS__
+#define __UTCUTILS__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __MACERRORS__
+#include "MacErrors.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* Options for Set & Get DateTime Routines */
+enum {
+ kUTCDefaultOptions = 0
+};
+
+/* 64 Bit Clock Typedefs */
+
+struct UTCDateTime {
+ UInt16 highSeconds;
+ UInt32 lowSeconds;
+ UInt16 fraction;
+};
+typedef struct UTCDateTime UTCDateTime;
+typedef UTCDateTime * UTCDateTimePtr;
+typedef UTCDateTimePtr * UTCDateTimeHandle;
+
+struct LocalDateTime {
+ UInt16 highSeconds;
+ UInt32 lowSeconds;
+ UInt16 fraction;
+};
+typedef struct LocalDateTime LocalDateTime;
+typedef LocalDateTime * LocalDateTimePtr;
+typedef LocalDateTimePtr * LocalDateTimeHandle;
+/* Classic 32 bit clock conversion routines */
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSStatus )
+ConvertLocalTimeToUTC (UInt32 localSeconds,
+ UInt32 * utcSeconds);
+
+EXTERN_API_C( OSStatus )
+ConvertUTCToLocalTime (UInt32 utcSeconds,
+ UInt32 * localSeconds);
+
+/* 64 bit clock conversion routines */
+EXTERN_API_C( OSStatus )
+ConvertUTCToLocalDateTime (const UTCDateTime * utcDateTime,
+ LocalDateTime * localDateTime);
+
+EXTERN_API_C( OSStatus )
+ConvertLocalToUTCDateTime (const LocalDateTime * localDateTime,
+ UTCDateTime * utcDateTime);
+
+/* Getter and Setter Clock routines using 64 Bit values */
+EXTERN_API_C( OSStatus )
+GetUTCDateTime (UTCDateTime * utcDateTime,
+ OptionBits options);
+
+EXTERN_API_C( OSStatus )
+SetUTCDateTime (const UTCDateTime * utcDateTime,
+ OptionBits options);
+
+EXTERN_API_C( OSStatus )
+GetLocalDateTime (LocalDateTime * localDateTime,
+ OptionBits options);
+
+EXTERN_API_C( OSStatus )
+SetLocalDateTime (const LocalDateTime * localDateTime,
+ OptionBits options);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __UTCUTILS__ */
+
diff --git a/include/qt/Unicode.h b/include/qt/Unicode.h
new file mode 100644
index 000000000..9650db1ef
--- /dev/null
+++ b/include/qt/Unicode.h
@@ -0,0 +1,67 @@
+/*
+ File: Unicode.h
+
+ Contains: Types, constants, and prototypes for Unicode Converter
+
+ Version: Technology: Mac OS 8 (Tempo)
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __UNICODE__
+#define __UNICODE__
+
+#ifndef __UNICODECONVERTER__
+#include "UnicodeConverter.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __UNICODE__ */
+
diff --git a/include/qt/UnicodeConverter.h b/include/qt/UnicodeConverter.h
new file mode 100644
index 000000000..2db76aa1c
--- /dev/null
+++ b/include/qt/UnicodeConverter.h
@@ -0,0 +1,423 @@
+/*
+ File: UnicodeConverter.h
+
+ Contains: Types, constants, and prototypes for Unicode Converter
+
+ Version: Technology: Mac OS 9.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __UNICODECONVERTER__
+#define __UNICODECONVERTER__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __TEXTCOMMON__
+#include "TextCommon.h"
+#endif
+
+#ifndef __MIXEDMODE__
+#include "MixedMode.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/* Unicode conversion contexts: */
+typedef struct OpaqueTextToUnicodeInfo* TextToUnicodeInfo;
+typedef struct OpaqueUnicodeToTextInfo* UnicodeToTextInfo;
+typedef struct OpaqueUnicodeToTextRunInfo* UnicodeToTextRunInfo;
+typedef const TextToUnicodeInfo ConstTextToUnicodeInfo;
+typedef const UnicodeToTextInfo ConstUnicodeToTextInfo;
+/* UnicodeMapVersion type & values */
+typedef SInt32 UnicodeMapVersion;
+enum {
+ kUnicodeUseLatestMapping = -1,
+ kUnicodeUseHFSPlusMapping = 4
+};
+
+/* Types used in conversion */
+
+struct UnicodeMapping {
+ TextEncoding unicodeEncoding;
+ TextEncoding otherEncoding;
+ UnicodeMapVersion mappingVersion;
+};
+typedef struct UnicodeMapping UnicodeMapping;
+typedef UnicodeMapping * UnicodeMappingPtr;
+
+typedef const UnicodeMapping * ConstUnicodeMappingPtr;
+/* Control flags for ConvertFromUnicodeToText and ConvertFromTextToUnicode */
+enum {
+ kUnicodeUseFallbacksBit = 0,
+ kUnicodeKeepInfoBit = 1,
+ kUnicodeDirectionalityBits = 2,
+ kUnicodeVerticalFormBit = 4,
+ kUnicodeLooseMappingsBit = 5,
+ kUnicodeStringUnterminatedBit = 6,
+ kUnicodeTextRunBit = 7,
+ kUnicodeKeepSameEncodingBit = 8,
+ kUnicodeForceASCIIRangeBit = 9,
+ kUnicodeNoHalfwidthCharsBit = 10,
+ kUnicodeTextRunHeuristicsBit = 11
+};
+
+enum {
+ kUnicodeUseFallbacksMask = 1L << kUnicodeUseFallbacksBit,
+ kUnicodeKeepInfoMask = 1L << kUnicodeKeepInfoBit,
+ kUnicodeDirectionalityMask = 3L << kUnicodeDirectionalityBits,
+ kUnicodeVerticalFormMask = 1L << kUnicodeVerticalFormBit,
+ kUnicodeLooseMappingsMask = 1L << kUnicodeLooseMappingsBit,
+ kUnicodeStringUnterminatedMask = 1L << kUnicodeStringUnterminatedBit,
+ kUnicodeTextRunMask = 1L << kUnicodeTextRunBit,
+ kUnicodeKeepSameEncodingMask = 1L << kUnicodeKeepSameEncodingBit,
+ kUnicodeForceASCIIRangeMask = 1L << kUnicodeForceASCIIRangeBit,
+ kUnicodeNoHalfwidthCharsMask = 1L << kUnicodeNoHalfwidthCharsBit,
+ kUnicodeTextRunHeuristicsMask = 1L << kUnicodeTextRunHeuristicsBit
+};
+
+/* Values for kUnicodeDirectionality field */
+enum {
+ kUnicodeDefaultDirection = 0,
+ kUnicodeLeftToRight = 1,
+ kUnicodeRightToLeft = 2
+};
+
+/* Directionality masks for control flags */
+enum {
+ kUnicodeDefaultDirectionMask = kUnicodeDefaultDirection << kUnicodeDirectionalityBits,
+ kUnicodeLeftToRightMask = kUnicodeLeftToRight << kUnicodeDirectionalityBits,
+ kUnicodeRightToLeftMask = kUnicodeRightToLeft << kUnicodeDirectionalityBits
+};
+
+
+/* Control flags for TruncateForUnicodeToText: */
+/*
+ Now TruncateForUnicodeToText uses control flags from the same set as used by
+ ConvertFromTextToUnicode, ConvertFromUnicodeToText, etc., but only
+ kUnicodeStringUnterminatedMask is meaningful for TruncateForUnicodeToText.
+
+ Previously two special control flags were defined for TruncateForUnicodeToText:
+ kUnicodeTextElementSafeBit = 0
+ kUnicodeRestartSafeBit = 1
+ However, neither of these was implemented.
+ Instead of implementing kUnicodeTextElementSafeBit, we now use
+ kUnicodeStringUnterminatedMask since it accomplishes the same thing and avoids
+ having special flags just for TruncateForUnicodeToText
+ Also, kUnicodeRestartSafeBit is unnecessary, since restart-safeness is handled by
+ setting kUnicodeKeepInfoBit with ConvertFromUnicodeToText.
+ If TruncateForUnicodeToText is called with one or both of the old special control
+ flags set (bits 0 or 1), it will not generate a paramErr, but the old bits have no
+ effect on its operation.
+*/
+
+/* Filter bits for filter field in QueryUnicodeMappings and CountUnicodeMappings: */
+enum {
+ kUnicodeMatchUnicodeBaseBit = 0,
+ kUnicodeMatchUnicodeVariantBit = 1,
+ kUnicodeMatchUnicodeFormatBit = 2,
+ kUnicodeMatchOtherBaseBit = 3,
+ kUnicodeMatchOtherVariantBit = 4,
+ kUnicodeMatchOtherFormatBit = 5
+};
+
+enum {
+ kUnicodeMatchUnicodeBaseMask = 1L << kUnicodeMatchUnicodeBaseBit,
+ kUnicodeMatchUnicodeVariantMask = 1L << kUnicodeMatchUnicodeVariantBit,
+ kUnicodeMatchUnicodeFormatMask = 1L << kUnicodeMatchUnicodeFormatBit,
+ kUnicodeMatchOtherBaseMask = 1L << kUnicodeMatchOtherBaseBit,
+ kUnicodeMatchOtherVariantMask = 1L << kUnicodeMatchOtherVariantBit,
+ kUnicodeMatchOtherFormatMask = 1L << kUnicodeMatchOtherFormatBit
+};
+
+/* Control flags for SetFallbackUnicodeToText */
+enum {
+ kUnicodeFallbackSequencingBits = 0
+};
+
+enum {
+ kUnicodeFallbackSequencingMask = 3L << kUnicodeFallbackSequencingBits,
+ kUnicodeFallbackInterruptSafeMask = 1L << 2 /* To indicate that caller fallback routine doesn't move memory*/
+};
+
+/* values for kUnicodeFallbackSequencing field */
+enum {
+ kUnicodeFallbackDefaultOnly = 0L,
+ kUnicodeFallbackCustomOnly = 1L,
+ kUnicodeFallbackDefaultFirst = 2L,
+ kUnicodeFallbackCustomFirst = 3L
+};
+
+
+/* Caller-supplied entry point to a fallback handler */
+typedef CALLBACK_API( OSStatus , UnicodeToTextFallbackProcPtr )(UniChar *iSrcUniStr, ByteCount iSrcUniStrLen, ByteCount *oSrcConvLen, TextPtr oDestStr, ByteCount iDestStrLen, ByteCount *oDestConvLen, LogicalAddress iInfoPtr, ConstUnicodeMappingPtr iUnicodeMappingPtr);
+typedef STACK_UPP_TYPE(UnicodeToTextFallbackProcPtr) UnicodeToTextFallbackUPP;
+#if OPAQUE_UPP_TYPES
+ EXTERN_API(UnicodeToTextFallbackUPP)
+ NewUnicodeToTextFallbackUPP (UnicodeToTextFallbackProcPtr userRoutine);
+
+ EXTERN_API(void)
+ DisposeUnicodeToTextFallbackUPP (UnicodeToTextFallbackUPP userUPP);
+
+ EXTERN_API(OSStatus)
+ InvokeUnicodeToTextFallbackUPP (UniChar * iSrcUniStr,
+ ByteCount iSrcUniStrLen,
+ ByteCount * oSrcConvLen,
+ TextPtr oDestStr,
+ ByteCount iDestStrLen,
+ ByteCount * oDestConvLen,
+ LogicalAddress iInfoPtr,
+ ConstUnicodeMappingPtr iUnicodeMappingPtr,
+ UnicodeToTextFallbackUPP userUPP);
+
+#else
+ enum { uppUnicodeToTextFallbackProcInfo = 0x003FFFF0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
+ #define NewUnicodeToTextFallbackUPP(userRoutine) (UnicodeToTextFallbackUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppUnicodeToTextFallbackProcInfo, GetCurrentArchitecture())
+ #define DisposeUnicodeToTextFallbackUPP(userUPP) DisposeRoutineDescriptor(userUPP)
+ #define InvokeUnicodeToTextFallbackUPP(iSrcUniStr, iSrcUniStrLen, oSrcConvLen, oDestStr, iDestStrLen, oDestConvLen, iInfoPtr, iUnicodeMappingPtr, userUPP) (OSStatus)CALL_EIGHT_PARAMETER_UPP((userUPP), uppUnicodeToTextFallbackProcInfo, (iSrcUniStr), (iSrcUniStrLen), (oSrcConvLen), (oDestStr), (iDestStrLen), (oDestConvLen), (iInfoPtr), (iUnicodeMappingPtr))
+#endif
+/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
+#define NewUnicodeToTextFallbackProc(userRoutine) NewUnicodeToTextFallbackUPP(userRoutine)
+#define CallUnicodeToTextFallbackProc(userRoutine, iSrcUniStr, iSrcUniStrLen, oSrcConvLen, oDestStr, iDestStrLen, oDestConvLen, iInfoPtr, iUnicodeMappingPtr) InvokeUnicodeToTextFallbackUPP(iSrcUniStr, iSrcUniStrLen, oSrcConvLen, oDestStr, iDestStrLen, oDestConvLen, iInfoPtr, iUnicodeMappingPtr, userRoutine)
+/* Function prototypes */
+#if TARGET_CPU_68K && !TARGET_RT_MAC_CFM
+/*
+ Routine to Initialize the Unicode Converter and cleanup once done with it.
+ These routines must be called from Static Library clients.
+*/
+#if CALL_NOT_IN_CARBON
+EXTERN_API( OSStatus )
+InitializeUnicodeConverter (StringPtr TECFileName);
+
+EXTERN_API( void )
+TerminateUnicodeConverter (void);
+
+/* Note: the old names (InitializeUnicode, TerminateUnicode) for the above are still exported.*/
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_CPU_68K && !TARGET_RT_MAC_CFM */
+
+EXTERN_API( OSStatus )
+CreateTextToUnicodeInfo (ConstUnicodeMappingPtr iUnicodeMapping,
+ TextToUnicodeInfo * oTextToUnicodeInfo);
+
+EXTERN_API( OSStatus )
+CreateTextToUnicodeInfoByEncoding (TextEncoding iEncoding,
+ TextToUnicodeInfo * oTextToUnicodeInfo);
+
+EXTERN_API( OSStatus )
+CreateUnicodeToTextInfo (ConstUnicodeMappingPtr iUnicodeMapping,
+ UnicodeToTextInfo * oUnicodeToTextInfo);
+
+EXTERN_API( OSStatus )
+CreateUnicodeToTextInfoByEncoding (TextEncoding iEncoding,
+ UnicodeToTextInfo * oUnicodeToTextInfo);
+
+EXTERN_API( OSStatus )
+CreateUnicodeToTextRunInfo (ItemCount iNumberOfMappings,
+ const UnicodeMapping iUnicodeMappings[],
+ UnicodeToTextRunInfo * oUnicodeToTextInfo);
+
+EXTERN_API( OSStatus )
+CreateUnicodeToTextRunInfoByEncoding (ItemCount iNumberOfEncodings,
+ const TextEncoding iEncodings[],
+ UnicodeToTextRunInfo * oUnicodeToTextInfo);
+
+EXTERN_API( OSStatus )
+CreateUnicodeToTextRunInfoByScriptCode (ItemCount iNumberOfScriptCodes,
+ const ScriptCode iScripts[],
+ UnicodeToTextRunInfo * oUnicodeToTextInfo);
+
+/* Change the TextToUnicodeInfo to another mapping. */
+EXTERN_API( OSStatus )
+ChangeTextToUnicodeInfo (TextToUnicodeInfo ioTextToUnicodeInfo,
+ ConstUnicodeMappingPtr iUnicodeMapping);
+
+/* Change the UnicodeToTextInfo to another mapping. */
+EXTERN_API( OSStatus )
+ChangeUnicodeToTextInfo (UnicodeToTextInfo ioUnicodeToTextInfo,
+ ConstUnicodeMappingPtr iUnicodeMapping);
+
+
+EXTERN_API( OSStatus )
+DisposeTextToUnicodeInfo (TextToUnicodeInfo * ioTextToUnicodeInfo);
+
+EXTERN_API( OSStatus )
+DisposeUnicodeToTextInfo (UnicodeToTextInfo * ioUnicodeToTextInfo);
+
+EXTERN_API( OSStatus )
+DisposeUnicodeToTextRunInfo (UnicodeToTextRunInfo * ioUnicodeToTextRunInfo);
+
+EXTERN_API( OSStatus )
+ConvertFromTextToUnicode (TextToUnicodeInfo iTextToUnicodeInfo,
+ ByteCount iSourceLen,
+ ConstLogicalAddress iSourceStr,
+ OptionBits iControlFlags,
+ ItemCount iOffsetCount,
+ ByteOffset iOffsetArray[], /* can be NULL */
+ ItemCount * oOffsetCount, /* can be NULL */
+ ByteOffset oOffsetArray[], /* can be NULL */
+ ByteCount iOutputBufLen,
+ ByteCount * oSourceRead,
+ ByteCount * oUnicodeLen,
+ UniCharArrayPtr oUnicodeStr);
+
+EXTERN_API( OSStatus )
+ConvertFromUnicodeToText (UnicodeToTextInfo iUnicodeToTextInfo,
+ ByteCount iUnicodeLen,
+ ConstUniCharArrayPtr iUnicodeStr,
+ OptionBits iControlFlags,
+ ItemCount iOffsetCount,
+ ByteOffset iOffsetArray[], /* can be NULL */
+ ItemCount * oOffsetCount, /* can be NULL */
+ ByteOffset oOffsetArray[], /* can be NULL */
+ ByteCount iOutputBufLen,
+ ByteCount * oInputRead,
+ ByteCount * oOutputLen,
+ LogicalAddress oOutputStr);
+
+EXTERN_API( OSStatus )
+ConvertFromUnicodeToTextRun (UnicodeToTextRunInfo iUnicodeToTextInfo,
+ ByteCount iUnicodeLen,
+ ConstUniCharArrayPtr iUnicodeStr,
+ OptionBits iControlFlags,
+ ItemCount iOffsetCount,
+ ByteOffset iOffsetArray[], /* can be NULL */
+ ItemCount * oOffsetCount, /* can be NULL */
+ ByteOffset oOffsetArray[], /* can be NULL */
+ ByteCount iOutputBufLen,
+ ByteCount * oInputRead,
+ ByteCount * oOutputLen,
+ LogicalAddress oOutputStr,
+ ItemCount iEncodingRunBufLen,
+ ItemCount * oEncodingRunOutLen,
+ TextEncodingRun oEncodingRuns[]);
+
+EXTERN_API( OSStatus )
+ConvertFromUnicodeToScriptCodeRun (UnicodeToTextRunInfo iUnicodeToTextInfo,
+ ByteCount iUnicodeLen,
+ ConstUniCharArrayPtr iUnicodeStr,
+ OptionBits iControlFlags,
+ ItemCount iOffsetCount,
+ ByteOffset iOffsetArray[], /* can be NULL */
+ ItemCount * oOffsetCount, /* can be NULL */
+ ByteOffset oOffsetArray[], /* can be NULL */
+ ByteCount iOutputBufLen,
+ ByteCount * oInputRead,
+ ByteCount * oOutputLen,
+ LogicalAddress oOutputStr,
+ ItemCount iScriptRunBufLen,
+ ItemCount * oScriptRunOutLen,
+ ScriptCodeRun oScriptCodeRuns[]);
+
+/* Truncate a multibyte string at a safe place. */
+EXTERN_API( OSStatus )
+TruncateForTextToUnicode (ConstTextToUnicodeInfo iTextToUnicodeInfo,
+ ByteCount iSourceLen,
+ ConstLogicalAddress iSourceStr,
+ ByteCount iMaxLen,
+ ByteCount * oTruncatedLen);
+
+/* Truncate a Unicode string at a safe place. */
+EXTERN_API( OSStatus )
+TruncateForUnicodeToText (ConstUnicodeToTextInfo iUnicodeToTextInfo,
+ ByteCount iSourceLen,
+ ConstUniCharArrayPtr iSourceStr,
+ OptionBits iControlFlags,
+ ByteCount iMaxLen,
+ ByteCount * oTruncatedLen);
+
+/* Convert a Pascal string to Unicode string. */
+EXTERN_API( OSStatus )
+ConvertFromPStringToUnicode (TextToUnicodeInfo iTextToUnicodeInfo,
+ ConstStr255Param iPascalStr,
+ ByteCount iOutputBufLen,
+ ByteCount * oUnicodeLen,
+ UniCharArrayPtr oUnicodeStr);
+
+/* Convert a Unicode string to Pascal string. */
+EXTERN_API( OSStatus )
+ConvertFromUnicodeToPString (UnicodeToTextInfo iUnicodeToTextInfo,
+ ByteCount iUnicodeLen,
+ ConstUniCharArrayPtr iUnicodeStr,
+ Str255 oPascalStr);
+
+/* Count the available conversion mappings. */
+EXTERN_API( OSStatus )
+CountUnicodeMappings (OptionBits iFilter,
+ ConstUnicodeMappingPtr iFindMapping,
+ ItemCount * oActualCount);
+
+/* Get a list of the available conversion mappings. */
+EXTERN_API( OSStatus )
+QueryUnicodeMappings (OptionBits iFilter,
+ ConstUnicodeMappingPtr iFindMapping,
+ ItemCount iMaxCount,
+ ItemCount * oActualCount,
+ UnicodeMapping oReturnedMappings[]);
+
+/* Setup the fallback handler for converting Unicode To Text. */
+EXTERN_API( OSStatus )
+SetFallbackUnicodeToText (UnicodeToTextInfo iUnicodeToTextInfo,
+ UnicodeToTextFallbackUPP iFallback,
+ OptionBits iControlFlags,
+ LogicalAddress iInfoPtr);
+
+/* Setup the fallback handler for converting Unicode To TextRuns. */
+EXTERN_API( OSStatus )
+SetFallbackUnicodeToTextRun (UnicodeToTextRunInfo iUnicodeToTextRunInfo,
+ UnicodeToTextFallbackUPP iFallback,
+ OptionBits iControlFlags,
+ LogicalAddress iInfoPtr);
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __UNICODECONVERTER__ */
+
diff --git a/include/qt/UnicodeUtilities.h b/include/qt/UnicodeUtilities.h
new file mode 100644
index 000000000..9388eb6b0
--- /dev/null
+++ b/include/qt/UnicodeUtilities.h
@@ -0,0 +1,484 @@
+/*
+ File: UnicodeUtilities.h
+
+ Contains: Types, constants, prototypes for Unicode Utilities (Unicode input and text utils)
+
+ Version: Technology: Mac OS 9.0
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1997-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __UNICODEUTILITIES__
+#define __UNICODEUTILITIES__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+
+#ifndef __MACLOCALES__
+#include "MacLocales.h"
+#endif
+
+#ifndef __TEXTCOMMON__
+#include "TextCommon.h"
+#endif
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/*
+ -------------------------------------------------------------------------------------------------
+ CONSTANTS & DATA STRUCTURES for UCKeyTranslate & UCKeyboardLayout ('uchr' resource)
+ -------------------------------------------------------------------------------------------------
+*/
+
+/*
+ -------------------------------------------------------------------------------------------------
+ UCKeyOutput & related stuff
+ The interpretation of UCKeyOutput depends on bits 15-14.
+ If they are 01, then bits 0-13 are an index in UCKeyStateRecordsIndex (resource-wide list).
+ If they are 10, then bits 0-13 are an index in UCKeySequenceDataIndex (resource-wide list),
+ or if UCKeySequenceDataIndex is not present or the index is beyond the end of the list,
+ then bits 0-15 are a single Unicode character.
+ Otherwise, bits 0-15 are a single Unicode character; a value of 0xFFFE-0xFFFF means no character
+ output.
+ UCKeyCharSeq is similar, but does not support indices in UCKeyStateRecordsIndex. For bits 15-14:
+ If they are 10, then bits 0-13 are an index in UCKeySequenceDataIndex (resource-wide list),
+ or if UCKeySequenceDataIndex is not present or the index is beyond the end of the list,
+ then bits 0-15 are a single Unicode character.
+ Otherwise, bits 0-15 are a single Unicode character; a value of 0xFFFE-0xFFFF means no character
+ output.
+ -------------------------------------------------------------------------------------------------
+*/
+
+typedef UInt16 UCKeyOutput;
+typedef UInt16 UCKeyCharSeq;
+enum {
+ kUCKeyOutputStateIndexMask = 0x4000,
+ kUCKeyOutputSequenceIndexMask = 0x8000,
+ kUCKeyOutputTestForIndexMask = 0xC000, /* test bits 14-15*/
+ kUCKeyOutputGetIndexMask = 0x3FFF /* get bits 0-13*/
+};
+
+/*
+ -------------------------------------------------------------------------------------------------
+ UCKeyStateRecord & related stuff
+ The UCKeyStateRecord information is used as follows. If the current state is zero,
+ output stateZeroCharData and set the state to stateZeroNextState. If the current state
+ is non-zero and there is an entry for it in stateEntryData, then output the corresponding
+ charData and set the state to nextState. Otherwise, output the state terminator from
+ UCKeyStateTerminators for the current state (or nothing if there is no UCKeyStateTerminators
+ table or it has no entry for the current state), then output stateZeroCharData and set the
+ state to stateZeroNextState.
+ -------------------------------------------------------------------------------------------------
+*/
+
+
+struct UCKeyStateRecord {
+ UCKeyCharSeq stateZeroCharData;
+ UInt16 stateZeroNextState;
+ UInt16 stateEntryCount;
+ UInt16 stateEntryFormat;
+ /* This is followed by an array of stateEntryCount elements*/
+ /* in the specified format. Here we just show a dummy array.*/
+ UInt32 stateEntryData[1];
+};
+typedef struct UCKeyStateRecord UCKeyStateRecord;
+/*
+ Here are the codes for entry formats currently defined.
+ Each entry maps from curState to charData and nextState.
+*/
+enum {
+ kUCKeyStateEntryTerminalFormat = 0x0001,
+ kUCKeyStateEntryRangeFormat = 0x0002
+};
+
+/*
+ For UCKeyStateEntryTerminal -
+ nextState is always 0, so we don't have a field for it
+*/
+
+
+struct UCKeyStateEntryTerminal {
+ UInt16 curState;
+ UCKeyCharSeq charData;
+};
+typedef struct UCKeyStateEntryTerminal UCKeyStateEntryTerminal;
+/*
+ For UCKeyStateEntryRange -
+ If curState >= curStateStart and curState <= curStateStart+curStateRange,
+ then it matches the entry, and we transform charData and nextState as follows:
+ If charData < 0xFFFE, then charData += (curState-curStateStart)*deltaMultiplier
+ If nextState != 0, then nextState += (curState-curStateStart)*deltaMultiplier
+*/
+
+struct UCKeyStateEntryRange {
+ UInt16 curStateStart;
+ UInt8 curStateRange;
+ UInt8 deltaMultiplier;
+ UCKeyCharSeq charData;
+ UInt16 nextState;
+};
+typedef struct UCKeyStateEntryRange UCKeyStateEntryRange;
+/*
+ -------------------------------------------------------------------------------------------------
+ UCKeyboardLayout & related stuff
+ The UCKeyboardLayout struct given here is only for the resource header. It specifies
+ offsets to the various subtables which each have their own structs, given below.
+ The keyboardTypeHeadList array selects table offsets that depend on keyboardType. The
+ first entry in keyboardTypeHeadList is the default entry, which will be used if the
+ keyboardType passed to UCKeyTranslate does not match any other entry - i.e. does not fall
+ within the range keyboardTypeFirst..keyboardTypeLast for some entry. The first entry
+ should have keyboardTypeFirst = keyboardTypeLast = 0.
+ -------------------------------------------------------------------------------------------------
+*/
+
+struct UCKeyboardTypeHeader {
+ UInt32 keyboardTypeFirst; /* first keyboardType in this entry*/
+ UInt32 keyboardTypeLast; /* last keyboardType in this entry*/
+ ByteOffset keyModifiersToTableNumOffset; /* required*/
+ ByteOffset keyToCharTableIndexOffset; /* required*/
+ ByteOffset keyStateRecordsIndexOffset; /* 0 => no table*/
+ ByteOffset keyStateTerminatorsOffset; /* 0 => no table*/
+ ByteOffset keySequenceDataIndexOffset; /* 0 => no table*/
+};
+typedef struct UCKeyboardTypeHeader UCKeyboardTypeHeader;
+
+struct UCKeyboardLayout {
+ /* header only; other tables accessed via offsets*/
+ UInt16 keyLayoutHeaderFormat; /* =kUCKeyLayoutHeaderFormat*/
+ UInt16 keyLayoutDataVersion; /* 0x0100 = 1.0, 0x0110 = 1.1, etc.*/
+ ByteOffset keyLayoutFeatureInfoOffset; /* may be 0 */
+ ItemCount keyboardTypeCount; /* Dimension for keyboardTypeHeadList[] */
+ UCKeyboardTypeHeader keyboardTypeList[1];
+};
+typedef struct UCKeyboardLayout UCKeyboardLayout;
+/* -------------------------------------------------------------------------------------------------*/
+
+struct UCKeyLayoutFeatureInfo {
+ UInt16 keyLayoutFeatureInfoFormat; /* =kUCKeyLayoutFeatureInfoFormat*/
+ UInt16 reserved;
+ UniCharCount maxOutputStringLength; /* longest possible output string*/
+};
+typedef struct UCKeyLayoutFeatureInfo UCKeyLayoutFeatureInfo;
+/* -------------------------------------------------------------------------------------------------*/
+
+struct UCKeyModifiersToTableNum {
+ UInt16 keyModifiersToTableNumFormat; /* =kUCKeyModifiersToTableNumFormat*/
+ UInt16 defaultTableNum; /* For modifier combos not in tableNum[]*/
+ ItemCount modifiersCount; /* Dimension for tableNum[]*/
+ UInt8 tableNum[1];
+
+ /* Then there is padding to a 4-byte boundary with bytes containing 0, if necessary.*/
+};
+typedef struct UCKeyModifiersToTableNum UCKeyModifiersToTableNum;
+/* -------------------------------------------------------------------------------------------------*/
+
+struct UCKeyToCharTableIndex {
+ UInt16 keyToCharTableIndexFormat; /* =kUCKeyToCharTableIndexFormat*/
+ UInt16 keyToCharTableSize; /* Max keyCode (128 for ADB keyboards)*/
+ ItemCount keyToCharTableCount; /* Dimension for keyToCharTableOffsets[] (usually 6 to 12 tables)*/
+ ByteOffset keyToCharTableOffsets[1];
+
+ /* Each offset in keyToCharTableOffsets is from the beginning of the resource to a*/
+ /* table as follows:*/
+ /* UCKeyOutput keyToCharData[keyToCharTableSize];*/
+ /* These tables follow the UCKeyToCharTableIndex.*/
+ /* Then there is padding to a 4-byte boundary with bytes containing 0, if necessary.*/
+};
+typedef struct UCKeyToCharTableIndex UCKeyToCharTableIndex;
+/* -------------------------------------------------------------------------------------------------*/
+
+struct UCKeyStateRecordsIndex {
+ UInt16 keyStateRecordsIndexFormat; /* =kUCKeyStateRecordsIndexFormat*/
+ UInt16 keyStateRecordCount; /* Dimension for keyStateRecordOffsets[]*/
+ ByteOffset keyStateRecordOffsets[1];
+
+ /* Each offset in keyStateRecordOffsets is from the beginning of the resource to a*/
+ /* UCKeyStateRecord. These UCKeyStateRecords follow the keyStateRecordOffsets[] array.*/
+ /* Then there is padding to a 4-byte boundary with bytes containing 0, if necessary.*/
+};
+typedef struct UCKeyStateRecordsIndex UCKeyStateRecordsIndex;
+/* -------------------------------------------------------------------------------------------------*/
+
+struct UCKeyStateTerminators {
+ UInt16 keyStateTerminatorsFormat; /* =kUCKeyStateTerminatorsFormat*/
+ UInt16 keyStateTerminatorCount; /* Dimension for keyStateTerminators[] (# of nonzero states)*/
+ UCKeyCharSeq keyStateTerminators[1];
+
+ /* Note: keyStateTerminators[0] is terminator for state 1, etc.*/
+ /* Then there is padding to a 4-byte boundary with bytes containing 0, if necessary.*/
+};
+typedef struct UCKeyStateTerminators UCKeyStateTerminators;
+/* -------------------------------------------------------------------------------------------------*/
+
+struct UCKeySequenceDataIndex {
+ UInt16 keySequenceDataIndexFormat; /* =kUCKeySequenceDataIndexFormat*/
+ UInt16 charSequenceCount; /* Dimension of charSequenceOffsets[] is charSequenceCount+1*/
+ UInt16 charSequenceOffsets[1];
+
+ /* Each offset in charSequenceOffsets is in bytes, from the beginning of*/
+ /* UCKeySequenceDataIndex to a sequence of UniChars; the next offset indicates the*/
+ /* end of the sequence. The UniChar sequences follow the UCKeySequenceDataIndex.*/
+ /* Then there is padding to a 4-byte boundary with bytes containing 0, if necessary.*/
+};
+typedef struct UCKeySequenceDataIndex UCKeySequenceDataIndex;
+/* -------------------------------------------------------------------------------------------------*/
+/* Current format codes for the various tables (bits 12-15 indicate which table)*/
+
+enum {
+ kUCKeyLayoutHeaderFormat = 0x1002,
+ kUCKeyLayoutFeatureInfoFormat = 0x2001,
+ kUCKeyModifiersToTableNumFormat = 0x3001,
+ kUCKeyToCharTableIndexFormat = 0x4001,
+ kUCKeyStateRecordsIndexFormat = 0x5001,
+ kUCKeyStateTerminatorsFormat = 0x6001,
+ kUCKeySequenceDataIndexFormat = 0x7001
+};
+
+
+/*
+ -------------------------------------------------------------------------------------------------
+ Constants for keyAction parameter in UCKeyTranslate()
+ -------------------------------------------------------------------------------------------------
+*/
+
+enum {
+ kUCKeyActionDown = 0, /* key is going down*/
+ kUCKeyActionUp = 1, /* key is going up*/
+ kUCKeyActionAutoKey = 2, /* auto-key down*/
+ kUCKeyActionDisplay = 3 /* get information for key display (as in Key Caps) */
+};
+
+/*
+ -------------------------------------------------------------------------------------------------
+ Bit assignments & masks for keyTranslateOptions parameter in UCKeyTranslate()
+ -------------------------------------------------------------------------------------------------
+*/
+
+enum {
+ kUCKeyTranslateNoDeadKeysBit = 0 /* Prevents setting any new dead-key states*/
+};
+
+enum {
+ kUCKeyTranslateNoDeadKeysMask = 1L << kUCKeyTranslateNoDeadKeysBit
+};
+
+/*
+ -------------------------------------------------------------------------------------------------
+ CONSTANTS & DATA STRUCTURES for Unicode Collation
+ -------------------------------------------------------------------------------------------------
+*/
+/* constant for LocaleOperationClass*/
+enum {
+ kUnicodeCollationClass = FOUR_CHAR_CODE('ucol')
+};
+
+typedef struct OpaqueCollatorRef* CollatorRef;
+
+typedef UInt32 UCCollateOptions;
+enum {
+ /* Sensitivity options*/
+ kUCCollateComposeInsensitiveMask = 1L << 1,
+ kUCCollateWidthInsensitiveMask = 1L << 2,
+ kUCCollateCaseInsensitiveMask = 1L << 3,
+ kUCCollateDiacritInsensitiveMask = 1L << 4, /* Other general options */
+ kUCCollatePunctuationSignificantMask = 1L << 15, /* Number-handling options */
+ kUCCollateDigitsOverrideMask = 1L << 16,
+ kUCCollateDigitsAsNumberMask = 1L << 17
+};
+
+enum {
+ kUCCollateStandardOptions = kUCCollateComposeInsensitiveMask | kUCCollateWidthInsensitiveMask
+};
+
+/*
+ Special values to specify various invariant orders for UCCompareTextNoLocale.
+ These values use the high 8 bits of UCCollateOptions.
+*/
+enum {
+ kUCCollateTypeHFSExtended = 1
+};
+
+/* These constants are used for masking and shifting the invariant order type.*/
+enum {
+ kUCCollateTypeSourceMask = 0x000000FF,
+ kUCCollateTypeShiftBits = 24
+};
+
+enum {
+ kUCCollateTypeMask = kUCCollateTypeSourceMask << kUCCollateTypeShiftBits
+};
+
+
+typedef UInt32 UCCollationValue;
+/*
+ -------------------------------------------------------------------------------------------------
+ CONSTANTS & DATA STRUCTURES for Unicode TextBreak
+ -------------------------------------------------------------------------------------------------
+*/
+/* constant for LocaleOperationClass*/
+enum {
+ kUnicodeTextBreakClass = FOUR_CHAR_CODE('ubrk')
+};
+
+typedef struct OpaqueTextBreakLocatorRef* TextBreakLocatorRef;
+
+typedef UInt32 UCTextBreakType;
+enum {
+ kUCTextBreakCharMask = 1L << 0,
+ kUCTextBreakClusterMask = 1L << 2,
+ kUCTextBreakWordMask = 1L << 4,
+ kUCTextBreakLineMask = 1L << 6
+};
+
+
+typedef UInt32 UCTextBreakOptions;
+enum {
+ kUCTextBreakLeadingEdgeMask = 1L << 0,
+ kUCTextBreakGoBackwardsMask = 1L << 1,
+ kUCTextBreakIterateMask = 1L << 2
+};
+
+/*
+ -------------------------------------------------------------------------------------------------
+ FUNCTION PROTOTYPES
+ -------------------------------------------------------------------------------------------------
+*/
+
+EXTERN_API( OSStatus )
+UCKeyTranslate (const UCKeyboardLayout * keyLayoutPtr,
+ UInt16 virtualKeyCode,
+ UInt16 keyAction,
+ UInt32 modifierKeyState,
+ UInt32 keyboardType,
+ OptionBits keyTranslateOptions,
+ UInt32 * deadKeyState,
+ UniCharCount maxStringLength,
+ UniCharCount * actualStringLength,
+ UniChar unicodeString[]);
+
+/* Standard collation functions*/
+EXTERN_API_C( OSStatus )
+UCCreateCollator (LocaleRef locale,
+ LocaleOperationVariant opVariant,
+ UCCollateOptions options,
+ CollatorRef * collatorRef);
+
+EXTERN_API_C( OSStatus )
+UCGetCollationKey (CollatorRef collatorRef,
+ const UniChar * textPtr,
+ UniCharCount textLength,
+ ItemCount maxKeySize,
+ ItemCount * actualKeySize,
+ UCCollationValue collationKey[]);
+
+EXTERN_API_C( OSStatus )
+UCCompareCollationKeys (const UCCollationValue * key1Ptr,
+ ItemCount key1Length,
+ const UCCollationValue * key2Ptr,
+ ItemCount key2Length,
+ Boolean * equivalent,
+ SInt32 * order);
+
+EXTERN_API_C( OSStatus )
+UCCompareText (CollatorRef collatorRef,
+ const UniChar * text1Ptr,
+ UniCharCount text1Length,
+ const UniChar * text2Ptr,
+ UniCharCount text2Length,
+ Boolean * equivalent,
+ SInt32 * order);
+
+EXTERN_API_C( OSStatus )
+UCDisposeCollator (CollatorRef * collatorRef);
+
+/* Simple collation using default locale*/
+
+EXTERN_API_C( OSStatus )
+UCCompareTextDefault (UCCollateOptions options,
+ const UniChar * text1Ptr,
+ UniCharCount text1Length,
+ const UniChar * text2Ptr,
+ UniCharCount text2Length,
+ Boolean * equivalent,
+ SInt32 * order);
+
+
+/* Simple locale-independent collation*/
+
+EXTERN_API_C( OSStatus )
+UCCompareTextNoLocale (UCCollateOptions options,
+ const UniChar * text1Ptr,
+ UniCharCount text1Length,
+ const UniChar * text2Ptr,
+ UniCharCount text2Length,
+ Boolean * equivalent,
+ SInt32 * order);
+
+/* Standard text break (text boundary) functions*/
+EXTERN_API_C( OSStatus )
+UCCreateTextBreakLocator (LocaleRef locale,
+ LocaleOperationVariant opVariant,
+ UCTextBreakType breakTypes,
+ TextBreakLocatorRef * breakRef);
+
+EXTERN_API_C( OSStatus )
+UCFindTextBreak (TextBreakLocatorRef breakRef,
+ UCTextBreakType breakType,
+ UCTextBreakOptions options,
+ const UniChar * textPtr,
+ UniCharCount textLength,
+ UniCharArrayOffset startOffset,
+ UniCharArrayOffset * breakOffset);
+
+EXTERN_API_C( OSStatus )
+UCDisposeTextBreakLocator (TextBreakLocatorRef * breakRef);
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __UNICODEUTILITIES__ */
+
diff --git a/include/qt/Video.h b/include/qt/Video.h
new file mode 100644
index 000000000..993743fae
--- /dev/null
+++ b/include/qt/Video.h
@@ -0,0 +1,996 @@
+/*
+ File: Video.h
+
+ Contains: Video Driver Interfaces.
+
+ Version: Technology: System 8.1
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1986-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __VIDEO__
+#define __VIDEO__
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ mBaseOffset = 1, /*Id of mBaseOffset.*/
+ mRowBytes = 2, /*Video sResource parameter Id's */
+ mBounds = 3, /*Video sResource parameter Id's */
+ mVersion = 4, /*Video sResource parameter Id's */
+ mHRes = 5, /*Video sResource parameter Id's */
+ mVRes = 6, /*Video sResource parameter Id's */
+ mPixelType = 7, /*Video sResource parameter Id's */
+ mPixelSize = 8, /*Video sResource parameter Id's */
+ mCmpCount = 9, /*Video sResource parameter Id's */
+ mCmpSize = 10, /*Video sResource parameter Id's */
+ mPlaneBytes = 11, /*Video sResource parameter Id's */
+ mVertRefRate = 14, /*Video sResource parameter Id's */
+ mVidParams = 1, /*Video parameter block id.*/
+ mTable = 2, /*Offset to the table.*/
+ mPageCnt = 3, /*Number of pages*/
+ mDevType = 4, /*Device Type*/
+ oneBitMode = 128, /*Id of OneBitMode Parameter list.*/
+ twoBitMode = 129, /*Id of TwoBitMode Parameter list.*/
+ fourBitMode = 130, /*Id of FourBitMode Parameter list.*/
+ eightBitMode = 131 /*Id of EightBitMode Parameter list.*/
+};
+
+enum {
+ sixteenBitMode = 132, /*Id of SixteenBitMode Parameter list.*/
+ thirtyTwoBitMode = 133, /*Id of ThirtyTwoBitMode Parameter list.*/
+ firstVidMode = 128, /*The new, better way to do the above. */
+ secondVidMode = 129, /* QuickDraw only supports six video */
+ thirdVidMode = 130, /* at this time. */
+ fourthVidMode = 131,
+ fifthVidMode = 132,
+ sixthVidMode = 133,
+ spGammaDir = 64,
+ spVidNamesDir = 65
+};
+
+
+/* csTimingFormat values in VDTimingInfo */
+/* look in the declaration rom for timing info */
+enum {
+ kDeclROMtables = FOUR_CHAR_CODE('decl')
+};
+
+/* Size of a block of EDID (Extended Display Identification Data) */
+enum {
+ kDDCBlockSize = 128
+};
+
+/* ddcBlockType constants*/
+enum {
+ kDDCBlockTypeEDID = 0 /* EDID block type. */
+};
+
+/* ddcFlags constants*/
+enum {
+ kDDCForceReadBit = 0, /* Force a new read of the EDID. */
+ kDDCForceReadMask = (1 << kDDCForceReadBit) /* Mask for kddcForceReadBit. */
+};
+
+
+/* Timing mode constants for Display Manager MultiMode support
+ Corresponding .h equates are in Video.h
+ .a equates are in Video.a
+ .r equates are in DepVideoEqu.r
+
+ The second enum is the old names (for compatibility).
+ The first enum is the new names.
+*/
+enum {
+ timingInvalid = 0, /* Unknown timing... force user to confirm. */
+ timingInvalid_SM_T24 = 8, /* Work around bug in SM Thunder24 card.*/
+ timingApple_FixedRateLCD = 42, /* Lump all fixed-rate LCDs into one category.*/
+ timingApple_512x384_60hz = 130, /* 512x384 (60 Hz) Rubik timing. */
+ timingApple_560x384_60hz = 135, /* 560x384 (60 Hz) Rubik-560 timing. */
+ timingApple_640x480_67hz = 140, /* 640x480 (67 Hz) HR timing. */
+ timingApple_640x400_67hz = 145, /* 640x400 (67 Hz) HR-400 timing. */
+ timingVESA_640x480_60hz = 150, /* 640x480 (60 Hz) VGA timing. */
+ timingVESA_640x480_72hz = 152, /* 640x480 (72 Hz) VGA timing. */
+ timingVESA_640x480_75hz = 154, /* 640x480 (75 Hz) VGA timing. */
+ timingVESA_640x480_85hz = 158, /* 640x480 (85 Hz) VGA timing. */
+ timingGTF_640x480_120hz = 159, /* 640x480 (120 Hz) VESA Generalized Timing Formula */
+ timingApple_640x870_75hz = 160, /* 640x870 (75 Hz) FPD timing.*/
+ timingApple_640x818_75hz = 165, /* 640x818 (75 Hz) FPD-818 timing.*/
+ timingApple_832x624_75hz = 170, /* 832x624 (75 Hz) GoldFish timing.*/
+ timingVESA_800x600_56hz = 180, /* 800x600 (56 Hz) SVGA timing. */
+ timingVESA_800x600_60hz = 182, /* 800x600 (60 Hz) SVGA timing. */
+ timingVESA_800x600_72hz = 184, /* 800x600 (72 Hz) SVGA timing. */
+ timingVESA_800x600_75hz = 186, /* 800x600 (75 Hz) SVGA timing. */
+ timingVESA_800x600_85hz = 188, /* 800x600 (85 Hz) SVGA timing. */
+ timingVESA_1024x768_60hz = 190, /* 1024x768 (60 Hz) VESA 1K-60Hz timing. */
+ timingVESA_1024x768_70hz = 200, /* 1024x768 (70 Hz) VESA 1K-70Hz timing. */
+ timingVESA_1024x768_75hz = 204, /* 1024x768 (75 Hz) VESA 1K-75Hz timing (very similar to timingApple_1024x768_75hz). */
+ timingVESA_1024x768_85hz = 208, /* 1024x768 (85 Hz) VESA timing. */
+ timingApple_1024x768_75hz = 210, /* 1024x768 (75 Hz) Apple 19" RGB. */
+ timingApple_1152x870_75hz = 220, /* 1152x870 (75 Hz) Apple 21" RGB. */
+ timingAppleNTSC_ST = 230, /* 512x384 (60 Hz, interlaced, non-convolved). */
+ timingAppleNTSC_FF = 232, /* 640x480 (60 Hz, interlaced, non-convolved). */
+ timingAppleNTSC_STconv = 234, /* 512x384 (60 Hz, interlaced, convolved). */
+ timingAppleNTSC_FFconv = 236, /* 640x480 (60 Hz, interlaced, convolved). */
+ timingApplePAL_ST = 238, /* 640x480 (50 Hz, interlaced, non-convolved). */
+ timingApplePAL_FF = 240, /* 768x576 (50 Hz, interlaced, non-convolved). */
+ timingApplePAL_STconv = 242, /* 640x480 (50 Hz, interlaced, convolved). */
+ timingApplePAL_FFconv = 244, /* 768x576 (50 Hz, interlaced, convolved). */
+ timingVESA_1280x960_75hz = 250, /* 1280x960 (75 Hz) */
+ timingVESA_1280x960_60hz = 252, /* 1280x960 (60 Hz) */
+ timingVESA_1280x960_85hz = 254, /* 1280x960 (85 Hz) */
+ timingVESA_1280x1024_60hz = 260, /* 1280x1024 (60 Hz) */
+ timingVESA_1280x1024_75hz = 262, /* 1280x1024 (75 Hz) */
+ timingVESA_1280x1024_85hz = 268, /* 1280x1024 (85 Hz) */
+ timingVESA_1600x1200_60hz = 280, /* 1600x1200 (60 Hz) VESA timing. */
+ timingVESA_1600x1200_65hz = 282, /* 1600x1200 (65 Hz) VESA timing. */
+ timingVESA_1600x1200_70hz = 284, /* 1600x1200 (70 Hz) VESA timing. */
+ timingVESA_1600x1200_75hz = 286, /* 1600x1200 (75 Hz) VESA timing (pixel clock is 189.2 Mhz dot clock). */
+ timingVESA_1600x1200_80hz = 288, /* 1600x1200 (80 Hz) VESA timing (pixel clock is 216>? Mhz dot clock) - proposed only. */
+ timingVESA_1600x1200_85hz = 289, /* 1600x1200 (85 Hz) VESA timing (pixel clock is 229.5 Mhz dot clock). */
+ timingVESA_1792x1344_60hz = 296, /* 1792x1344 (60 Hz) VESA timing (204.75 Mhz dot clock). */
+ timingVESA_1792x1344_75hz = 298, /* 1792x1344 (75 Hz) VESA timing (261.75 Mhz dot clock). */
+ timingVESA_1856x1392_60hz = 300, /* 1856x1392 (60 Hz) VESA timing (218.25 Mhz dot clock). */
+ timingVESA_1856x1392_75hz = 302, /* 1856x1392 (75 Hz) VESA timing (288 Mhz dot clock). */
+ timingVESA_1920x1440_60hz = 304, /* 1920x1440 (60 Hz) VESA timing (234 Mhz dot clock). */
+ timingVESA_1920x1440_75hz = 306, /* 1920x1440 (75 Hz) VESA timing (297 Mhz dot clock). */
+ timingSMPTE240M_60hz = 400, /* 60Hz V, 33.75KHz H, interlaced timing, 16:9 aspect, typical resolution of 1920x1035. */
+ timingFilmRate_48hz = 410, /* 48Hz V, 25.20KHz H, non-interlaced timing, typical resolution of 640x480. */
+ timingSony_1600x1024_76hz = 500, /* 1600x1024 (76 Hz) Sony timing (pixel clock is 170.447 Mhz dot clock). */
+ timingSony_1920x1080_60hz = 510, /* 1920x1080 (60 Hz) Sony timing (pixel clock is 159.84 Mhz dot clock). */
+ timingSony_1920x1080_72hz = 520, /* 1920x1080 (72 Hz) Sony timing (pixel clock is 216.023 Mhz dot clock). */
+ timingSony_1920x1200_76hz = 540, /* 1900x1200 (76 Hz) Sony timing (pixel clock is 243.20 Mhz dot clock). */
+ timingApple_0x0_0hz_Offline = 550 /* Indicates that this timing will take the display off-line and remove it from the system. */
+};
+
+
+/* Deprecated timing names.*/
+enum {
+ timingApple12 = timingApple_512x384_60hz,
+ timingApple12x = timingApple_560x384_60hz,
+ timingApple13 = timingApple_640x480_67hz,
+ timingApple13x = timingApple_640x400_67hz,
+ timingAppleVGA = timingVESA_640x480_60hz,
+ timingApple15 = timingApple_640x870_75hz,
+ timingApple15x = timingApple_640x818_75hz,
+ timingApple16 = timingApple_832x624_75hz,
+ timingAppleSVGA = timingVESA_800x600_56hz,
+ timingApple1Ka = timingVESA_1024x768_60hz,
+ timingApple1Kb = timingVESA_1024x768_70hz,
+ timingApple19 = timingApple_1024x768_75hz,
+ timingApple21 = timingApple_1152x870_75hz,
+ timingSony_1900x1200_74hz = 530, /* 1900x1200 (74 Hz) Sony timing (pixel clock is 236.25 Mhz dot clock). */
+ timingSony_1900x1200_76hz = timingSony_1920x1200_76hz /* 1900x1200 (76 Hz) Sony timing (pixel clock is 245.48 Mhz dot clock). */
+};
+
+/* csConnectFlags values in VDDisplayConnectInfo */
+enum {
+ kAllModesValid = 0, /* All modes not trimmed by primary init are good close enough to try */
+ kAllModesSafe = 1, /* All modes not trimmed by primary init are know to be safe */
+ kReportsTagging = 2, /* Can detect tagged displays (to identify smart monitors) */
+ kHasDirectConnection = 3, /* True implies that driver can talk directly to device (e.g. serial data link via sense lines) */
+ kIsMonoDev = 4, /* Says whether there's an RGB (0) or Monochrome (1) connection. */
+ kUncertainConnection = 5, /* There may not be a display (no sense lines?). */
+ kTaggingInfoNonStandard = 6, /* Set when csConnectTaggedType/csConnectTaggedData are non-standard (i.e., not the Apple CRT sense codes). */
+ kReportsDDCConnection = 7, /* Card can do ddc (set kHasDirectConnect && kHasDDCConnect if you actually found a ddc display). */
+ kHasDDCConnection = 8, /* Card has ddc connect now. */
+ kConnectionInactive = 9, /* Set when the connection is NOT currently active (generally used in a multiconnection environment). */
+ kDependentConnection = 10, /* Set when some ascpect of THIS connection depends on another (will generally be set in a kModeSimulscan environment). */
+ kBuiltInConnection = 11, /* Set when connection is KNOWN to be built-in (this is not the same as kHasDirectConnection). */
+ kOverrideConnection = 12, /* Set when the reported connection is not the true one, but is one that has been forced through a SetConnection call */
+ kFastCheckForDDC = 13, /* Set when all 3 are true: 1) sense codes indicate DDC display could be attached 2) attempted fast check 3) DDC failed */
+ kReportsHotPlugging = 14 /* Detects and reports hot pluggging on connector (via VSL also implies DDC will be up to date w/o force read) */
+};
+
+
+/* csDisplayType values in VDDisplayConnectInfo */
+enum {
+ kUnknownConnect = 1, /* Not sure how we'll use this, but seems like a good idea. */
+ kPanelConnect = 2, /* For use with fixed-in-place LCD panels. */
+ kPanelTFTConnect = 2, /* Alias for kPanelConnect */
+ kFixedModeCRTConnect = 3, /* For use with fixed-mode (i.e., very limited range) displays. */
+ kMultiModeCRT1Connect = 4, /* 320x200 maybe, 12" maybe, 13" (default), 16" certain, 19" maybe, 21" maybe */
+ kMultiModeCRT2Connect = 5, /* 320x200 maybe, 12" maybe, 13" certain, 16" (default), 19" certain, 21" maybe */
+ kMultiModeCRT3Connect = 6, /* 320x200 maybe, 12" maybe, 13" certain, 16" certain, 19" default, 21" certain */
+ kMultiModeCRT4Connect = 7, /* Expansion to large multi mode (not yet used) */
+ kModelessConnect = 8, /* Expansion to modeless model (not yet used) */
+ kFullPageConnect = 9, /* 640x818 (to get 8bpp in 512K case) and 640x870 (these two only) */
+ kVGAConnect = 10, /* 640x480 VGA default -- question everything else */
+ kNTSCConnect = 11, /* NTSC ST (default), FF, STconv, FFconv */
+ kPALConnect = 12, /* PAL ST (default), FF, STconv, FFconv */
+ kHRConnect = 13, /* Straight-6 connect -- 640x480 and 640x400 (to get 8bpp in 256K case) (these two only) */
+ kPanelFSTNConnect = 14, /* For use with fixed-in-place LCD FSTN (aka "Supertwist") panels */
+ kMonoTwoPageConnect = 15, /* 1152x870 Apple color two-page display */
+ kColorTwoPageConnect = 16, /* 1152x870 Apple B&W two-page display */
+ kColor16Connect = 17, /* 832x624 Apple B&W two-page display */
+ kColor19Connect = 18, /* 1024x768 Apple B&W two-page display */
+ kGenericCRT = 19, /* Indicates nothing except that connection is CRT in nature. */
+ kGenericLCD = 20, /* Indicates nothing except that connection is LCD in nature. */
+ kDDCConnect = 21, /* DDC connection, always set kHasDDCConnection */
+ kNoConnect = 22 /* No display is connected - load sensing or similar level of hardware detection is assumed (used by resident drivers that support hot plugging when nothing is currently connected) */
+};
+
+/* csTimingFlags values in VDTimingInfoRec */
+enum {
+ kModeValid = 0, /* Says that this mode should NOT be trimmed. */
+ kModeSafe = 1, /* This mode does not need confirmation */
+ kModeDefault = 2, /* This is the default mode for this type of connection */
+ kModeShowNow = 3, /* This mode should always be shown (even though it may require a confirm) */
+ kModeNotResize = 4, /* This mode should not be used to resize the display (eg. mode selects a different connector on card) */
+ kModeRequiresPan = 5, /* This mode has more pixels than are actually displayed */
+ kModeInterlaced = 6, /* This mode is interlaced (single pixel lines look bad). */
+ kModeShowNever = 7, /* This mode should not be shown in the user interface. */
+ kModeSimulscan = 8, /* Indicates that more than one display connection can be driven from a single framebuffer controller. */
+ kModeNotPreset = 9, /* Indicates that the timing is not a factory preset for the current display (geometry may need correction) */
+ kModeBuiltIn = 10, /* Indicates that the display mode is for the built-in connect only (on multiconnect devices like the PB 3400) Only the driver is quieried */
+ kModeStretched = 11 /* Indicates that the display mode will be stretched/distorted to match the display aspect ratio */
+};
+
+/* csDepthFlags in VDVideoParametersInfoRec */
+enum {
+ kDepthDependent = 0 /* Says that this depth mode may cause dependent changes in other framebuffers (and . */
+};
+
+/* csResolutionFlags bit flags for VDResolutionInfoRec */
+enum {
+ kResolutionHasMultipleDepthSizes = 0 /* Says that this mode has different csHorizontalPixels, csVerticalLines at different depths (usually slightly larger at lower depths) */
+};
+
+
+enum {
+ /* Power Mode constants for VDPowerStateRec.powerState. Note the numeric order does not match the power state order */
+ kAVPowerOff = 0, /* Power fully off*/
+ kAVPowerStandby = 1,
+ kAVPowerSuspend = 2,
+ kAVPowerOn = 3,
+ kHardwareSleep = 128,
+ kHardwareWake = 129,
+ kHardwareWakeFromSuspend = 130
+};
+
+enum {
+ /* Power Mode masks and bits for VDPowerStateRec.powerFlags. */
+ kPowerStateNeedsRefresh = 0, /* When leaving this power mode, a display will need refreshing */
+ kPowerStateSleepAwareBit = 1, /* if gestaltPCCardDockingSelectorFix, Docking mgr checks this bit before checking kPowerStateSleepAllowedBit */
+ kPowerStateSleepForbiddenBit = 2, /* if kPowerStateSleepAwareBit, Docking mgr checks this bit before sleeping */
+ kPowerStateSleepCanPowerOffBit = 3, /* supports power down sleep (ie PCI power off)*/
+ kPowerStateNeedsRefreshMask = (1L << kPowerStateNeedsRefresh),
+ kPowerStateSleepAwareMask = (1L << kPowerStateSleepAwareBit),
+ kPowerStateSleepForbiddenMask = (1L << kPowerStateSleepForbiddenBit),
+ kPowerStateSleepCanPowerOffMask = (1L << kPowerStateSleepCanPowerOffBit)
+};
+
+
+enum {
+ /* Control Codes */
+ cscReset = 0,
+ cscKillIO = 1,
+ cscSetMode = 2,
+ cscSetEntries = 3,
+ cscSetGamma = 4,
+ cscGrayPage = 5,
+ cscGrayScreen = 5,
+ cscSetGray = 6,
+ cscSetInterrupt = 7,
+ cscDirectSetEntries = 8,
+ cscSetDefaultMode = 9,
+ cscSwitchMode = 10,
+ cscSetSync = 11,
+ cscSavePreferredConfiguration = 16,
+ cscSetHardwareCursor = 22,
+ cscDrawHardwareCursor = 23,
+ cscSetConvolution = 24,
+ cscSetPowerState = 25,
+ cscPrivateControlCall = 26, /* Takes a VDPrivateSelectorDataRec*/
+ cscSetMultiConnect = 28, /* From a GDI point of view, this call should be implemented completely in the HAL and not at all in the core.*/
+ cscSetClutBehavior = 29, /* Takes a VDClutBehavior */
+ cscSetDetailedTiming = 31, /* Takes a VDDetailedTimingPtr */
+ cscUnusedCall = 127 /* This call used to expend the scrn resource. Its imbedded data contains more control info */
+};
+
+enum {
+ /* Status Codes */
+ cscGetMode = 2,
+ cscGetEntries = 3,
+ cscGetPageCnt = 4,
+ cscGetPages = 4, /* This is what C&D 2 calls it. */
+ cscGetPageBase = 5,
+ cscGetBaseAddr = 5, /* This is what C&D 2 calls it. */
+ cscGetGray = 6,
+ cscGetInterrupt = 7,
+ cscGetGamma = 8,
+ cscGetDefaultMode = 9,
+ cscGetCurMode = 10,
+ cscGetSync = 11,
+ cscGetConnection = 12, /* Return information about the connection to the display */
+ cscGetModeTiming = 13, /* Return timing info for a mode */
+ cscGetModeBaseAddress = 14, /* Return base address information about a particular mode */
+ cscGetScanProc = 15, /* QuickTime scan chasing routine */
+ cscGetPreferredConfiguration = 16,
+ cscGetNextResolution = 17,
+ cscGetVideoParameters = 18,
+ cscGetGammaInfoList = 20,
+ cscRetrieveGammaTable = 21,
+ cscSupportsHardwareCursor = 22,
+ cscGetHardwareCursorDrawState = 23,
+ cscGetConvolution = 24,
+ cscGetPowerState = 25,
+ cscPrivateStatusCall = 26, /* Takes a VDPrivateSelectorDataRec*/
+ cscGetDDCBlock = 27, /* Takes a VDDDCBlockRec */
+ cscGetMultiConnect = 28, /* From a GDI point of view, this call should be implemented completely in the HAL and not at all in the core.*/
+ cscGetClutBehavior = 29, /* Takes a VDClutBehavior */
+ cscGetTimingRanges = 30, /* Takes a VDDisplayTimingRangePtr */
+ cscGetDetailedTiming = 31 /* Takes a VDDetailedTimingPtr */
+};
+
+/* Bit definitions for the Get/Set Sync call*/
+enum {
+ kDisableHorizontalSyncBit = 0,
+ kDisableVerticalSyncBit = 1,
+ kDisableCompositeSyncBit = 2,
+ kEnableSyncOnBlue = 3,
+ kEnableSyncOnGreen = 4,
+ kEnableSyncOnRed = 5,
+ kNoSeparateSyncControlBit = 6,
+ kTriStateSyncBit = 7,
+ kHorizontalSyncMask = 0x01,
+ kVerticalSyncMask = 0x02,
+ kCompositeSyncMask = 0x04,
+ kDPMSSyncMask = 0x07,
+ kTriStateSyncMask = 0x80,
+ kSyncOnBlueMask = 0x08,
+ kSyncOnGreenMask = 0x10,
+ kSyncOnRedMask = 0x20,
+ kSyncOnMask = 0x38
+};
+
+enum {
+ /* Power Mode constants for translating DPMS modes to Get/SetSync calls. */
+ kDPMSSyncOn = 0,
+ kDPMSSyncStandby = 1,
+ kDPMSSyncSuspend = 2,
+ kDPMSSyncOff = 7
+};
+
+/* Bit definitions for the Get/Set Convolution call*/
+enum {
+ kConvolved = 0,
+ kLiveVideoPassThru = 1,
+ kConvolvedMask = 0x01,
+ kLiveVideoPassThruMask = 0x02
+};
+
+
+
+struct VPBlock {
+ long vpBaseOffset; /*Offset to page zero of video RAM (From minorBaseOS).*/
+ short vpRowBytes; /*Width of each row of video memory.*/
+ Rect vpBounds; /*BoundsRect for the video display (gives dimensions).*/
+ short vpVersion; /*PixelMap version number.*/
+ short vpPackType;
+ long vpPackSize;
+ long vpHRes; /*Horizontal resolution of the device (pixels per inch).*/
+ long vpVRes; /*Vertical resolution of the device (pixels per inch).*/
+ short vpPixelType; /*Defines the pixel type.*/
+ short vpPixelSize; /*Number of bits in pixel.*/
+ short vpCmpCount; /*Number of components in pixel.*/
+ short vpCmpSize; /*Number of bits per component*/
+ long vpPlaneBytes; /*Offset from one plane to the next.*/
+};
+typedef struct VPBlock VPBlock;
+typedef VPBlock * VPBlockPtr;
+
+struct VDEntryRecord {
+ Ptr csTable; /*(long) pointer to color table entry=value, r,g,b:INTEGER*/
+};
+typedef struct VDEntryRecord VDEntryRecord;
+
+typedef VDEntryRecord * VDEntRecPtr;
+/* Parm block for SetGray control call */
+
+struct VDGrayRecord {
+ Boolean csMode; /*Same as GDDevType value (0=color, 1=mono)*/
+ SInt8 filler;
+};
+typedef struct VDGrayRecord VDGrayRecord;
+
+typedef VDGrayRecord * VDGrayPtr;
+/* Parm block for SetInterrupt call */
+
+struct VDFlagRecord {
+ SInt8 csMode;
+ SInt8 filler;
+};
+typedef struct VDFlagRecord VDFlagRecord;
+
+typedef VDFlagRecord * VDFlagRecPtr;
+/* Parm block for SetEntries control call */
+
+struct VDSetEntryRecord {
+ ColorSpec * csTable; /*Pointer to an array of color specs*/
+ short csStart; /*Which spec in array to start with, or -1*/
+ short csCount; /*Number of color spec entries to set*/
+};
+typedef struct VDSetEntryRecord VDSetEntryRecord;
+
+typedef VDSetEntryRecord * VDSetEntryPtr;
+/* Parm block for SetGamma control call */
+
+struct VDGammaRecord {
+ Ptr csGTable; /*pointer to gamma table*/
+};
+typedef struct VDGammaRecord VDGammaRecord;
+
+typedef VDGammaRecord * VDGamRecPtr;
+
+struct VDBaseAddressInfoRec {
+ long csDevData; /* LONGINT - (long) timing mode */
+ long csDevBase; /* LONGINT - (long) base address of the mode */
+ short csModeReserved; /* INTEGER - (short) will some day be the depth */
+ long csModeBase; /* LONGINT - (long) reserved */
+};
+typedef struct VDBaseAddressInfoRec VDBaseAddressInfoRec;
+
+typedef VDBaseAddressInfoRec * VDBaseAddressInfoPtr;
+
+struct VDSwitchInfoRec {
+ unsigned short csMode; /*(word) mode depth*/
+ unsigned long csData; /*(long) functional sResource of mode*/
+ unsigned short csPage; /*(word) page to switch in*/
+ Ptr csBaseAddr; /*(long) base address of page (return value)*/
+ unsigned long csReserved; /*(long) Reserved (set to 0) */
+};
+typedef struct VDSwitchInfoRec VDSwitchInfoRec;
+
+typedef VDSwitchInfoRec * VDSwitchInfoPtr;
+
+struct VDTimingInfoRec {
+ unsigned long csTimingMode; /* LONGINT - (long) timing mode (a la InitGDevice) */
+ unsigned long csTimingReserved; /* LONGINT - (long) reserved */
+ unsigned long csTimingFormat; /* LONGINT - (long) what format is the timing info */
+ unsigned long csTimingData; /* LONGINT - (long) data supplied by driver */
+ unsigned long csTimingFlags; /* LONGINT - (long) mode within device */
+};
+typedef struct VDTimingInfoRec VDTimingInfoRec;
+
+typedef VDTimingInfoRec * VDTimingInfoPtr;
+
+struct VDDisplayConnectInfoRec {
+ unsigned short csDisplayType; /* INTEGER - (word) Type of display connected */
+ unsigned char csConnectTaggedType; /* BYTE - type of tagging */
+ unsigned char csConnectTaggedData; /* BYTE - tagging data */
+ unsigned long csConnectFlags; /* LONGINT - (long) tell us about the connection */
+ unsigned long csDisplayComponent; /* LONGINT - (long) if the card has a direct connection to the display, it returns the display component here (FUTURE) */
+ unsigned long csConnectReserved; /* LONGINT - (long) reserved */
+};
+typedef struct VDDisplayConnectInfoRec VDDisplayConnectInfoRec;
+
+typedef VDDisplayConnectInfoRec * VDDisplayConnectInfoPtr;
+
+struct VDMultiConnectInfoRec {
+ unsigned long csDisplayCountOrNumber; /* For GetMultiConnect, returns count n of 1..n connections; otherwise, indicates the ith connection.*/
+ VDDisplayConnectInfoRec csConnectInfo; /* Standard VDDisplayConnectionInfo for connection i.*/
+};
+typedef struct VDMultiConnectInfoRec VDMultiConnectInfoRec;
+
+typedef VDMultiConnectInfoRec * VDMultiConnectInfoPtr;
+/* RawSenseCode
+ This abstract data type is not exactly abstract. Rather, it is merely enumerated constants
+ for the possible raw sense code values when 'standard' sense code hardware is implemented.
+
+ For 'standard' sense code hardware, the raw sense is obtained as follows:
+ o Instruct the frame buffer controller NOT to actively drive any of the monitor sense lines
+ o Read the state of the monitor sense lines 2, 1, and 0. (2 is the MSB, 0 the LSB)
+
+ IMPORTANT Note:
+ When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants
+ are valid 'csConnectTaggedType' values in 'VDDisplayConnectInfo'
+
+*/
+typedef unsigned char RawSenseCode;
+enum {
+ kRSCZero = 0,
+ kRSCOne = 1,
+ kRSCTwo = 2,
+ kRSCThree = 3,
+ kRSCFour = 4,
+ kRSCFive = 5,
+ kRSCSix = 6,
+ kRSCSeven = 7
+};
+
+
+/* ExtendedSenseCode
+ This abstract data type is not exactly abstract. Rather, it is merely enumerated constants
+ for the values which are possible when the extended sense algorithm is applied to hardware
+ which implements 'standard' sense code hardware.
+
+ For 'standard' sense code hardware, the extended sense code algorithm is as follows:
+ (Note: as described here, sense line 'A' corresponds to '2', 'B' to '1', and 'C' to '0')
+ o Drive sense line 'A' low and read the values of 'B' and 'C'.
+ o Drive sense line 'B' low and read the values of 'A' and 'C'.
+ o Drive sense line 'C' low and read the values of 'A' and 'B'.
+
+ In this way, a six-bit number of the form BC/AC/AB is generated.
+
+ IMPORTANT Note:
+ When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants
+ are valid 'csConnectTaggedData' values in 'VDDisplayConnectInfo'
+
+*/
+typedef unsigned char ExtendedSenseCode;
+enum {
+ kESCZero21Inch = 0x00, /* 21" RGB */
+ kESCOnePortraitMono = 0x14, /* Portrait Monochrome */
+ kESCTwo12Inch = 0x21, /* 12" RGB */
+ kESCThree21InchRadius = 0x31, /* 21" RGB (Radius) */
+ kESCThree21InchMonoRadius = 0x34, /* 21" Monochrome (Radius) */
+ kESCThree21InchMono = 0x35, /* 21" Monochrome */
+ kESCFourNTSC = 0x0A, /* NTSC */
+ kESCFivePortrait = 0x1E, /* Portrait RGB */
+ kESCSixMSB1 = 0x03, /* MultiScan Band-1 (12" thru 1Six") */
+ kESCSixMSB2 = 0x0B, /* MultiScan Band-2 (13" thru 19") */
+ kESCSixMSB3 = 0x23, /* MultiScan Band-3 (13" thru 21") */
+ kESCSixStandard = 0x2B, /* 13"/14" RGB or 12" Monochrome */
+ kESCSevenPAL = 0x00, /* PAL */
+ kESCSevenNTSC = 0x14, /* NTSC */
+ kESCSevenVGA = 0x17, /* VGA */
+ kESCSeven16Inch = 0x2D, /* 16" RGB (GoldFish) */
+ kESCSevenPALAlternate = 0x30, /* PAL (Alternate) */
+ kESCSeven19Inch = 0x3A, /* Third-Party 19" */
+ kESCSevenDDC = 0x3E, /* DDC display */
+ kESCSevenNoDisplay = 0x3F /* No display connected */
+};
+
+/* DepthMode
+ This abstract data type is used to to reference RELATIVE pixel depths.
+ Its definition is largely derived from its past usage, analogous to 'xxxVidMode'
+
+ Bits per pixel DOES NOT directly map to 'DepthMode' For example, on some
+ graphics hardware, 'kDepthMode1' may represent 1 BPP, whereas on other
+ hardware, 'kDepthMode1' may represent 8BPP.
+
+ DepthMode IS considered to be ordinal, i.e., operations such as <, >, ==, etc.
+ behave as expected. The values of the constants which comprise the set are such
+ that 'kDepthMode4 < kDepthMode6' behaves as expected.
+*/
+typedef unsigned short DepthMode;
+enum {
+ kDepthMode1 = 128,
+ kDepthMode2 = 129,
+ kDepthMode3 = 130,
+ kDepthMode4 = 131,
+ kDepthMode5 = 132,
+ kDepthMode6 = 133
+};
+
+enum {
+ kFirstDepthMode = 128, /* These constants are obsolete, and just included */
+ kSecondDepthMode = 129, /* for clients that have converted to the above */
+ kThirdDepthMode = 130, /* kDepthModeXXX constants. */
+ kFourthDepthMode = 131,
+ kFifthDepthMode = 132,
+ kSixthDepthMode = 133
+};
+
+
+
+struct VDPageInfo {
+ short csMode; /*(word) mode within device*/
+ long csData; /*(long) data supplied by driver*/
+ short csPage; /*(word) page to switch in*/
+ Ptr csBaseAddr; /*(long) base address of page*/
+};
+typedef struct VDPageInfo VDPageInfo;
+
+typedef VDPageInfo * VDPgInfoPtr;
+
+struct VDSizeInfo {
+ short csHSize; /*(word) desired/returned h size*/
+ short csHPos; /*(word) desired/returned h position*/
+ short csVSize; /*(word) desired/returned v size*/
+ short csVPos; /*(word) desired/returned v position*/
+};
+typedef struct VDSizeInfo VDSizeInfo;
+
+typedef VDSizeInfo * VDSzInfoPtr;
+
+struct VDSettings {
+ short csParamCnt; /*(word) number of params*/
+ short csBrightMax; /*(word) max brightness*/
+ short csBrightDef; /*(word) default brightness*/
+ short csBrightVal; /*(word) current brightness*/
+ short csCntrstMax; /*(word) max contrast*/
+ short csCntrstDef; /*(word) default contrast*/
+ short csCntrstVal; /*(word) current contrast*/
+ short csTintMax; /*(word) max tint*/
+ short csTintDef; /*(word) default tint*/
+ short csTintVal; /*(word) current tint*/
+ short csHueMax; /*(word) max hue*/
+ short csHueDef; /*(word) default hue*/
+ short csHueVal; /*(word) current hue*/
+ short csHorizDef; /*(word) default horizontal*/
+ short csHorizVal; /*(word) current horizontal*/
+ short csHorizMax; /*(word) max horizontal*/
+ short csVertDef; /*(word) default vertical*/
+ short csVertVal; /*(word) current vertical*/
+ short csVertMax; /*(word) max vertical*/
+};
+typedef struct VDSettings VDSettings;
+typedef VDSettings * VDSettingsPtr;
+
+struct VDDefMode {
+ UInt8 csID;
+ SInt8 filler;
+};
+typedef struct VDDefMode VDDefMode;
+typedef VDDefMode * VDDefModePtr;
+
+struct VDSyncInfoRec {
+ UInt8 csMode;
+ UInt8 csFlags;
+};
+typedef struct VDSyncInfoRec VDSyncInfoRec;
+
+typedef VDSyncInfoRec * VDSyncInfoPtr;
+typedef unsigned long DisplayModeID;
+typedef unsigned long VideoDeviceType;
+typedef unsigned long GammaTableID;
+/* Constants for the cscGetNextResolution call */
+enum {
+ kDisplayModeIDCurrent = 0x00, /* Reference the Current DisplayModeID */
+ kDisplayModeIDInvalid = (long)0xFFFFFFFF, /* A bogus DisplayModeID in all cases */
+ kDisplayModeIDFindFirstResolution = (long)0xFFFFFFFE, /* Used in cscGetNextResolution to reset iterator */
+ kDisplayModeIDNoMoreResolutions = (long)0xFFFFFFFD, /* Used in cscGetNextResolution to indicate End Of List */
+ kDisplayModeIDFindFirstProgrammable = (long)0xFFFFFFFC /* Used in cscGetNextResolution to find unused programmable timing */
+};
+
+/* Constants for the GetGammaInfoList call */
+enum {
+ kGammaTableIDFindFirst = (long)0xFFFFFFFE, /* Get the first gamma table ID */
+ kGammaTableIDNoMoreTables = (long)0xFFFFFFFD, /* Used to indicate end of list */
+ kGammaTableIDSpecific = 0x00 /* Return the info for the given table id */
+};
+
+/* Constants for GetMultiConnect call*/
+enum {
+ kGetConnectionCount = (long)0xFFFFFFFF, /* Used to get the number of possible connections in a "multi-headed" framebuffer environment.*/
+ kActivateConnection = (0 << kConnectionInactive), /* Used for activating a connection (csConnectFlags value).*/
+ kDeactivateConnection = (1 << kConnectionInactive) /* Used for deactivating a connection (csConnectFlags value.)*/
+};
+
+
+struct VDResolutionInfoRec {
+ DisplayModeID csPreviousDisplayModeID; /* ID of the previous resolution in a chain */
+ DisplayModeID csDisplayModeID; /* ID of the next resolution */
+ unsigned long csHorizontalPixels; /* # of pixels in a horizontal line at the max depth */
+ unsigned long csVerticalLines; /* # of lines in a screen at the max depth */
+ Fixed csRefreshRate; /* Vertical Refresh Rate in Hz */
+ DepthMode csMaxDepthMode; /* 0x80-based number representing max bit depth */
+ unsigned long csResolutionFlags; /* Reserved - flag bits */
+ unsigned long csReserved; /* Reserved */
+};
+typedef struct VDResolutionInfoRec VDResolutionInfoRec;
+
+typedef VDResolutionInfoRec * VDResolutionInfoPtr;
+
+struct VDVideoParametersInfoRec {
+ DisplayModeID csDisplayModeID; /* the ID of the resolution we want info on */
+ DepthMode csDepthMode; /* The bit depth we want the info on (0x80 based) */
+ VPBlockPtr csVPBlockPtr; /* Pointer to a video parameter block */
+ unsigned long csPageCount; /* Number of pages supported by the resolution */
+ VideoDeviceType csDeviceType; /* Device Type: Direct, Fixed or CLUT; */
+ UInt32 csDepthFlags; /* Flags */
+};
+typedef struct VDVideoParametersInfoRec VDVideoParametersInfoRec;
+
+typedef VDVideoParametersInfoRec * VDVideoParametersInfoPtr;
+
+struct VDGammaInfoRec {
+ GammaTableID csLastGammaID; /* the ID of the previous gamma table */
+ GammaTableID csNextGammaID; /* the ID of the next gamma table */
+ Ptr csGammaPtr; /* Ptr to a gamma table data */
+ unsigned long csReserved; /* Reserved */
+};
+typedef struct VDGammaInfoRec VDGammaInfoRec;
+
+typedef VDGammaInfoRec * VDGammaInfoPtr;
+
+struct VDGetGammaListRec {
+ GammaTableID csPreviousGammaTableID; /* ID of the previous gamma table */
+ GammaTableID csGammaTableID; /* ID of the gamma table following csPreviousDisplayModeID */
+ unsigned long csGammaTableSize; /* Size of the gamma table in bytes */
+ char * csGammaTableName; /* Gamma table name (c-string) */
+};
+typedef struct VDGetGammaListRec VDGetGammaListRec;
+
+typedef VDGetGammaListRec * VDGetGammaListPtr;
+
+struct VDRetrieveGammaRec {
+ GammaTableID csGammaTableID; /* ID of gamma table to retrieve */
+ GammaTbl * csGammaTablePtr; /* Location to copy desired gamma to */
+};
+typedef struct VDRetrieveGammaRec VDRetrieveGammaRec;
+
+typedef VDRetrieveGammaRec * VDRetrieveGammaPtr;
+
+struct VDSetHardwareCursorRec {
+ void * csCursorRef; /* reference to cursor data */
+ UInt32 csReserved1; /* reserved for future use */
+ UInt32 csReserved2; /* should be ignored */
+};
+typedef struct VDSetHardwareCursorRec VDSetHardwareCursorRec;
+
+typedef VDSetHardwareCursorRec * VDSetHardwareCursorPtr;
+
+struct VDDrawHardwareCursorRec {
+ SInt32 csCursorX; /* x coordinate */
+ SInt32 csCursorY; /* y coordinate */
+ UInt32 csCursorVisible; /* true if cursor is must be visible */
+ UInt32 csReserved1; /* reserved for future use */
+ UInt32 csReserved2; /* should be ignored */
+};
+typedef struct VDDrawHardwareCursorRec VDDrawHardwareCursorRec;
+
+typedef VDDrawHardwareCursorRec * VDDrawHardwareCursorPtr;
+
+struct VDSupportsHardwareCursorRec {
+ UInt32 csSupportsHardwareCursor;
+ /* true if hardware cursor is supported */
+ UInt32 csReserved1; /* reserved for future use */
+ UInt32 csReserved2; /* must be zero */
+};
+typedef struct VDSupportsHardwareCursorRec VDSupportsHardwareCursorRec;
+
+typedef VDSupportsHardwareCursorRec * VDSupportsHardwareCursorPtr;
+
+struct VDHardwareCursorDrawStateRec {
+ SInt32 csCursorX; /* x coordinate */
+ SInt32 csCursorY; /* y coordinate */
+ UInt32 csCursorVisible; /* true if cursor is visible */
+ UInt32 csCursorSet; /* true if cursor successfully set by last set control call */
+ UInt32 csReserved1; /* reserved for future use */
+ UInt32 csReserved2; /* must be zero */
+};
+typedef struct VDHardwareCursorDrawStateRec VDHardwareCursorDrawStateRec;
+
+typedef VDHardwareCursorDrawStateRec * VDHardwareCursorDrawStatePtr;
+
+struct VDConvolutionInfoRec {
+ DisplayModeID csDisplayModeID; /* the ID of the resolution we want info on */
+ DepthMode csDepthMode; /* The bit depth we want the info on (0x80 based) */
+ unsigned long csPage;
+ UInt32 csFlags;
+ UInt32 csReserved;
+};
+typedef struct VDConvolutionInfoRec VDConvolutionInfoRec;
+
+typedef VDConvolutionInfoRec * VDConvolutionInfoPtr;
+
+struct VDPowerStateRec {
+ unsigned long powerState;
+ unsigned long powerFlags;
+
+ unsigned long powerReserved1;
+ unsigned long powerReserved2;
+};
+typedef struct VDPowerStateRec VDPowerStateRec;
+
+typedef VDPowerStateRec * VDPowerStatePtr;
+/*
+ Private Data to video drivers.
+
+ In versions of MacOS with multiple address spaces (System 8), the OS
+ must know the extent of parameters in order to move them between the caller
+ and driver. The old private-selector model for video drivers does not have
+ this information so:
+
+ For post-7.x Systems private calls should be implemented using the cscPrivateCall
+*/
+
+struct VDPrivateSelectorDataRec {
+ LogicalAddress privateParameters; /* Caller's parameters*/
+ ByteCount privateParametersSize; /* Size of data sent from caller to driver*/
+ LogicalAddress privateResults; /* Caller's return area. Can be nil, or same as privateParameters.*/
+ ByteCount privateResultsSize; /* Size of data driver returns to caller. Can be nil, or same as privateParametersSize.*/
+};
+typedef struct VDPrivateSelectorDataRec VDPrivateSelectorDataRec;
+
+
+struct VDPrivateSelectorRec {
+ UInt32 reserved; /* Reserved (set to 0). */
+ VDPrivateSelectorDataRec data[1];
+};
+typedef struct VDPrivateSelectorRec VDPrivateSelectorRec;
+
+struct VDDDCBlockRec {
+ UInt32 ddcBlockNumber; /* Input -- DDC EDID (Extended Display Identification Data) number (1-based) */
+ ResType ddcBlockType; /* Input -- DDC block type (EDID/VDIF) */
+ UInt32 ddcFlags; /* Input -- DDC Flags*/
+ UInt32 ddcReserved; /* Reserved */
+ Byte ddcBlockData[128]; /* Output -- DDC EDID/VDIF data (kDDCBlockSize) */
+};
+typedef struct VDDDCBlockRec VDDDCBlockRec;
+
+typedef VDDDCBlockRec * VDDDCBlockPtr;
+
+enum {
+ /* timingSyncConfiguration*/
+ kSyncInterlaceMask = (1 << 7),
+ kSyncAnalogCompositeMask = 0,
+ kSyncAnalogCompositeSerrateMask = (1 << 2),
+ kSyncAnalogCompositeRGBSyncMask = (1 << 1),
+ kSyncAnalogBipolarMask = (1 << 3),
+ kSyncAnalogBipolarSerrateMask = (1 << 2),
+ kSyncAnalogBipolarSRGBSyncMask = (1 << 1),
+ kSyncDigitalCompositeMask = (1 << 4),
+ kSyncDigitalCompositeSerrateMask = (1 << 2),
+ kSyncDigitalCompositeMatchHSyncMask = (1 << 2),
+ kSyncDigitalSeperateMask = (1 << 4) + (1 << 3),
+ kSyncDigitalVSyncPositiveMask = (1 << 2),
+ kSyncDigitalHSyncPositiveMask = (1 << 1)
+};
+
+
+
+
+struct VDDisplayTimingRangeRec {
+ UInt32 csRangeSize; /* Init to sizeof(VDDisplayTimingRangeRec)*/
+ UInt32 csRangeType; /* Init to 0*/
+ UInt32 csRangeVersion; /* Init to 0*/
+ UInt32 csRangeReserved; /* Init to 0*/
+
+ UInt32 csRangeBlockIndex; /* Requested block*/
+ UInt32 csRangeGroup; /* set to 0*/
+ UInt32 csRangeBlockCount; /* # blocks*/
+ UInt32 csRangeFlags; /* dependent video*/
+
+ UInt64 csMinPixelClock; /* Min dot clock in Hz*/
+ UInt64 csMaxPixelClock; /* Max dot clock in Hz*/
+
+ UInt32 csMaxPixelError; /* Max dot clock error*/
+ UInt32 csTimingRangeSyncFlags;
+ UInt32 csTimingRangeSignalLevels;
+
+ UInt32 csMinFrameRate; /* Hz*/
+ UInt32 csMaxFrameRate; /* Hz*/
+ UInt32 csMinLineRate; /* Hz*/
+ UInt32 csMaxLineRate; /* Hz*/
+
+
+ UInt32 csReserved1; /* Init to 0*/
+ UInt32 csReserved2; /* Init to 0*/
+ UInt32 csReserved3; /* Init to 0*/
+ UInt32 csReserved4; /* Init to 0*/
+
+ UInt32 csReserved5; /* Init to 0*/
+ UInt32 csReserved6; /* Init to 0*/
+ UInt32 csReserved7; /* Init to 0*/
+ UInt32 csReserved8; /* Init to 0*/
+};
+typedef struct VDDisplayTimingRangeRec VDDisplayTimingRangeRec;
+
+typedef VDDisplayTimingRangeRec * VDDisplayTimingRangePtr;
+
+enum {
+ /* csDisplayModeState*/
+ kDMSModeReady = 0, /* Display Mode ID is configured and ready*/
+ kDMSModeNotReady = 1, /* Display Mode ID is is being programmed*/
+ kDMSModeFree = 2 /* Display Mode ID is not associated with a timing*/
+};
+
+
+
+struct VDDetailedTimingRec {
+ UInt32 csTimingSize; /* Init to sizeof(VDDetailedTimingRec)*/
+ UInt32 csTimingType; /* Init to 0*/
+ UInt32 csTimingVersion; /* Init to 0*/
+ UInt32 csTimingReserved; /* Init to 0*/
+
+ DisplayModeID csDisplayModeID; /* Init to 0*/
+ UInt32 csDisplayModeSeed; /* */
+ UInt32 csDisplayModeState; /* Display Mode state*/
+ UInt32 csDisplayModeReserved;
+
+ UInt32 csSignalConfig;
+ UInt32 csSignalLevels;
+
+ UInt64 csPixelClock; /* Hz*/
+
+ UInt64 csMinPixelClock; /* Hz - With error what is slowest actual clock */
+ UInt64 csMaxPixelClock; /* Hz - With error what is fasted actual clock */
+
+
+ UInt32 csHorizontalActive; /* Pixels*/
+ UInt32 csHorizontalBlanking; /* Pixels*/
+ UInt32 csHorizontalSyncOffset; /* Pixels*/
+ UInt32 csHorizontalSyncPulseWidth; /* Pixels*/
+
+ UInt32 csVerticalActive; /* Lines*/
+ UInt32 csVerticalBlanking; /* Lines*/
+ UInt32 csVerticalSyncOffset; /* Lines*/
+ UInt32 csVerticalSyncPulseWidth; /* Lines*/
+
+ UInt32 csHorizontalBorderLeft; /* Pixels*/
+ UInt32 csHorizontalBorderRight; /* Pixels*/
+ UInt32 csVerticalBorderTop; /* Lines*/
+ UInt32 csVerticalBorderBottom; /* Lines*/
+
+ UInt32 csHorizontalSyncConfig;
+ UInt32 csHorizontalSyncLevel;
+ UInt32 csVerticalSyncConfig;
+ UInt32 csVerticalSyncLevel;
+
+ UInt32 csReserved1; /* Init to 0*/
+ UInt32 csReserved2; /* Init to 0*/
+ UInt32 csReserved3; /* Init to 0*/
+ UInt32 csReserved4; /* Init to 0*/
+
+ UInt32 csReserved5; /* Init to 0*/
+ UInt32 csReserved6; /* Init to 0*/
+ UInt32 csReserved7; /* Init to 0*/
+ UInt32 csReserved8; /* Init to 0*/
+};
+typedef struct VDDetailedTimingRec VDDetailedTimingRec;
+
+typedef VDDetailedTimingRec * VDDetailedTimingPtr;
+typedef UInt32 VDClutBehavior;
+typedef VDClutBehavior * VDClutBehaviorPtr;
+enum {
+ kSetClutAtSetEntries = 0, /* SetEntries behavior is to update clut during SetEntries call*/
+ kSetClutAtVBL = 1 /* SetEntries behavior is to upate clut at next vbl*/
+};
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __VIDEO__ */
+
diff --git a/include/qt/VideoServices.h b/include/qt/VideoServices.h
new file mode 100644
index 000000000..2fcaf5083
--- /dev/null
+++ b/include/qt/VideoServices.h
@@ -0,0 +1,180 @@
+/*
+ File: VideoServices.h
+
+ Contains: Video Services Library Interfaces.
+
+ Version: Technology: PowerSurge 1.0.2
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __VIDEOSERVICES__
+#define __VIDEOSERVICES__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __NAMEREGISTRY__
+#include "NameRegistry.h"
+#endif
+
+#ifndef __QUICKDRAW__
+#include "Quickdraw.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+enum {
+ kTransparentEncoding = 0,
+ kInvertingEncoding = 1
+};
+
+enum {
+ kTransparentEncodingShift = (kTransparentEncoding << 1),
+ kTransparentEncodedPixel = (0x01 << kTransparentEncodingShift),
+ kInvertingEncodingShift = (kInvertingEncoding << 1),
+ kInvertingEncodedPixel = (0x01 << kInvertingEncodingShift)
+};
+
+
+
+
+enum {
+ kHardwareCursorDescriptorMajorVersion = 0x0001,
+ kHardwareCursorDescriptorMinorVersion = 0x0000
+};
+
+typedef UInt32 * UInt32Ptr;
+
+struct HardwareCursorDescriptorRec {
+ UInt16 majorVersion;
+ UInt16 minorVersion;
+ UInt32 height;
+ UInt32 width;
+ UInt32 bitDepth;
+ UInt32 maskBitDepth;
+ UInt32 numColors;
+ UInt32Ptr colorEncodings;
+ UInt32 flags;
+ UInt32 supportedSpecialEncodings;
+ UInt32 specialEncodings[16];
+};
+typedef struct HardwareCursorDescriptorRec HardwareCursorDescriptorRec;
+
+typedef HardwareCursorDescriptorRec * HardwareCursorDescriptorPtr;
+enum {
+ kHardwareCursorInfoMajorVersion = 0x0001,
+ kHardwareCursorInfoMinorVersion = 0x0000
+};
+
+
+struct HardwareCursorInfoRec {
+ UInt16 majorVersion; /* Test tool should check for kHardwareCursorInfoMajorVersion1*/
+ UInt16 minorVersion; /* Test tool should check for kHardwareCursorInfoMinorVersion1*/
+ UInt32 cursorHeight;
+ UInt32 cursorWidth;
+ CTabPtr colorMap; /* nil or big enough for hardware's max colors*/
+ Ptr hardwareCursor;
+ UInt32 reserved[6]; /* Test tool should check for 0s*/
+};
+typedef struct HardwareCursorInfoRec HardwareCursorInfoRec;
+
+typedef HardwareCursorInfoRec * HardwareCursorInfoPtr;
+
+enum {
+ kVBLInterruptServiceType = FOUR_CHAR_CODE('vbl '),
+ kHBLInterruptServiceType = FOUR_CHAR_CODE('hbl '),
+ kFrameInterruptServiceType = FOUR_CHAR_CODE('fram'),
+ kConnectInterruptServiceType = FOUR_CHAR_CODE('dci '), /* Renamed -- Use kFBCheckInterruptServiceType*/
+ kFBConnectInterruptServiceType = kConnectInterruptServiceType, /* Demand to check configuration (Hardware unchanged)*/
+ kFBChangedInterruptServiceType = FOUR_CHAR_CODE('chng'), /* Demand to rebuild (Hardware has reinitialized on dependent change)*/
+ kFBOfflineInterruptServiceType = FOUR_CHAR_CODE('remv'), /* Demand to remove framebuffer (Hardware not available on dependent change -- but must not buserror)*/
+ kFBOnlineInterruptServiceType = FOUR_CHAR_CODE('add ') /* Notice that hardware is available (after being removed)*/
+};
+
+enum {
+ kMaxDisplayConfigDataSize = 64 /* Max data size for VSLSetDisplayConfiguration*/
+};
+
+typedef ResType InterruptServiceType;
+typedef UInt32 InterruptServiceIDType;
+typedef InterruptServiceIDType * InterruptServiceIDPtr;
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( OSErr )
+VSLNewInterruptService (RegEntryID * serviceDevice,
+ InterruptServiceType serviceType,
+ InterruptServiceIDPtr serviceID);
+
+EXTERN_API_C( OSErr )
+VSLWaitOnInterruptService (InterruptServiceIDType serviceID,
+ Duration timeout);
+
+EXTERN_API_C( OSErr )
+VSLDisposeInterruptService (InterruptServiceIDType serviceID);
+
+EXTERN_API_C( OSErr )
+VSLDoInterruptService (InterruptServiceIDType serviceID);
+
+EXTERN_API_C( Boolean )
+VSLPrepareCursorForHardwareCursor (void * cursorRef,
+ HardwareCursorDescriptorPtr hardwareDescriptor,
+ HardwareCursorInfoPtr hwCursorInfo);
+
+EXTERN_API_C( OSErr )
+VSLSetDisplayConfiguration (RegEntryID * device,
+ RegPropertyName * propertyName,
+ void * configData,
+ long configDataSize);
+
+
+#endif /* CALL_NOT_IN_CARBON */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __VIDEOSERVICES__ */
+
diff --git a/include/qt/WorldScript.h b/include/qt/WorldScript.h
new file mode 100644
index 000000000..aede87b8a
--- /dev/null
+++ b/include/qt/WorldScript.h
@@ -0,0 +1,349 @@
+/*
+ File: WorldScript.h
+
+ Contains: WorldScript I Interfaces.
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __WORLDSCRIPT__
+#define __WORLDSCRIPT__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __TRAPS__
+#include "Traps.h"
+#endif
+
+#ifndef __QUICKDRAWTEXT__
+#include "QuickdrawText.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+typedef UInt16 WSIOffset;
+typedef UInt8 WSIByteCount;
+typedef UInt8 WSIByteIndex;
+/* offset from start of sub-table to row in state table */
+typedef UInt16 WSIStateOffset;
+typedef UInt32 WSITableOffset;
+typedef UInt16 WSISubtableOffset;
+typedef UInt16 WSIGlyphcode;
+typedef UInt32 WSITableIdentifiers;
+enum {
+ kScriptSettingsTag = FOUR_CHAR_CODE('info'),
+ kMetamorphosisTag = FOUR_CHAR_CODE('mort'),
+ kGlyphExpansionTag = FOUR_CHAR_CODE('g2g#'),
+ kPropertiesTag = FOUR_CHAR_CODE('prop'),
+ kJustificationTag = FOUR_CHAR_CODE('kash'),
+ kCharToGlyphTag = FOUR_CHAR_CODE('cmap'),
+ kGlyphToCharTag = FOUR_CHAR_CODE('pamc'),
+ kFindScriptRunTag = FOUR_CHAR_CODE('fstb')
+};
+
+
+
+/**** L O O K U P T A B L E T Y P E S ****/
+enum {
+ WSILookupSimpleArray = 0, /* a simple array indexed by glyph code */
+ WSILookupSegmentSingle = 2, /* segment mapping to single value */
+ WSILookupSegmentArray = 4, /* segment mapping to lookup array */
+ WSILookupSingleTable = 6, /* sorted list of glyph, value pairs */
+ WSILookupTrimmedArray = 8 /* a simple trimmed array indexed by glyph code */
+};
+
+typedef unsigned short WSILookupTableFormat;
+typedef unsigned short WSILookupValue;
+/* An offset from the beginning of the lookup table */
+typedef unsigned short WSILookupOffset;
+/* FORMAT SPECIFIC DEFINITIONS */
+/*
+ lookupSimpleArray:
+
+ This is a simple array which maps all glyphs in the font
+ to lookup values.
+ */
+
+struct WSILookupArrayHeader {
+ WSILookupValue lookupValues[1]; /* The array of values indexed by glyph code */
+};
+typedef struct WSILookupArrayHeader WSILookupArrayHeader;
+/*
+ lookupTrimmedArray:
+
+ This is a single trimmed array which maps a single range
+ of glyhs in the font to lookup values.
+ */
+
+struct WSILookupTrimmedArrayHeader {
+ WSIGlyphcode firstGlyph;
+ WSIGlyphcode limitGlyph;
+ WSILookupValue valueArray[1];
+};
+typedef struct WSILookupTrimmedArrayHeader WSILookupTrimmedArrayHeader;
+/* The format specific part of the subtable header */
+
+union WSILookupFormatSpecificHeader {
+ WSILookupArrayHeader simpleArray; /* rename lookupArray as simpleArray <9> */
+ WSILookupTrimmedArrayHeader trimmedArray;
+};
+typedef union WSILookupFormatSpecificHeader WSILookupFormatSpecificHeader;
+/* The overall subtable header */
+
+struct WSILookupTableHeader {
+ WSILookupTableFormat format; /* table format */
+ WSILookupFormatSpecificHeader fsHeader; /* format specific header */
+};
+typedef struct WSILookupTableHeader WSILookupTableHeader;
+
+/**** G L Y P H E X P A N S I O N ****/
+enum {
+ /* fixed 1.0 */
+ kCurrentGlyphExpansionVersion = 0x00010000
+};
+
+
+typedef unsigned short GlyphExpansionFormats;
+enum {
+ GlyphExpansionLookupFormat = 1,
+ GlyphExpansionContextualFormat = 2
+};
+
+
+struct ExpandedGlyphCluster {
+ WSIByteCount numGlyphs;
+ WSIByteIndex bestGlyph;
+ WSIGlyphcode glyphs[1];
+};
+typedef struct ExpandedGlyphCluster ExpandedGlyphCluster;
+
+struct ExpandedGlyphOffset {
+ WSIGlyphcode glyph;
+ WSIOffset offset; /* offset to ExpandedGlyphCluster */
+};
+typedef struct ExpandedGlyphOffset ExpandedGlyphOffset;
+
+struct GlyphExpansionStateTable {
+ WSISubtableOffset stateTableOffset;
+ WSISubtableOffset classTableOffset;
+ WSISubtableOffset actionTableOffset; /* state, class and actions tables follow here... */
+};
+typedef struct GlyphExpansionStateTable GlyphExpansionStateTable;
+
+struct GlyphExpansionTable {
+ Fixed version;
+ short format;
+ short expansionNumer;
+ short expansionDenom; /* num/denom ratio for expansion <2> */
+
+ union {
+ GlyphExpansionStateTable stateTable;
+ WSILookupTableHeader lookup; /* expanded glyph clusters follow here... */
+ } table;
+};
+typedef struct GlyphExpansionTable GlyphExpansionTable;
+
+/* Glyph-to-Character constants and types */
+enum {
+ kCurrentGlyphToCharVersion = 0x00010100
+};
+
+
+typedef unsigned short GlyphToCharLookupFormats;
+enum {
+ kGlyphToCharLookup8Format = 1,
+ kGlyphToCharLookup16Format = 2,
+ kGlyphToCharLookup32Format = 3
+};
+
+typedef UInt8 GlyphToCharFontIndex;
+typedef UInt8 QDGlyphcode;
+
+struct GlyphToCharActionTable {
+ WSISubtableOffset fontNameOffset; /* offset relative to this table */
+ WSILookupTableHeader actions; /* only support lookupSimpleArray format for now */
+};
+typedef struct GlyphToCharActionTable GlyphToCharActionTable;
+
+struct GlyphToCharActionHeader {
+ short numTables; /* 0..n */
+ WSISubtableOffset offsets[1]; /* offsets from start of action table header */
+};
+typedef struct GlyphToCharActionHeader GlyphToCharActionHeader;
+
+struct GlyphToCharHeader {
+ Fixed version;
+
+ WSISubtableOffset actionOffset; /* offset to GlyphToCharActionHeader */
+
+ short format; /* size of font mask */
+ WSILookupTableHeader mappingTable;
+};
+typedef struct GlyphToCharHeader GlyphToCharHeader;
+
+/* JUSTIFICATION TYPES
+ WorldScript supports justification of text using insertion. The justification
+ table specifies a insertion string to insert between 2 specified glyphs.
+ Each combination of inter-glyph boundary can be assigned a justification priority,
+ the higher the priority the more justification strings inserted at that position.
+
+ The priorities for each inter-glyph boundary are specified by the justification table's
+ state table.
+
+ Special handling is done for scripts which use spaces to justify, because the width of
+ a space varies depending on the setting of SpaceExtra. This is why the number of spaces
+ per inserting string is specified in the justification table.
+
+*/
+enum {
+ /* 1.0 not supported */
+ kCurrentJustificationVersion = 0x0200
+};
+
+enum {
+ kJustificationStateTableFormat = 1
+};
+
+enum {
+ /* WSI's internal limitation <12> */
+ kMaxJustificationStringLength = 13
+};
+
+
+typedef UInt8 WSIJustificationPriority;
+enum {
+ WSIJustificationSetMarkMask = 0x80
+};
+
+
+struct WSIJustificationStateEntry {
+ WSIJustificationPriority markPriority; /* non-zero priorities means insertion */
+ WSIJustificationPriority priority;
+ WSIStateOffset newState;
+};
+typedef struct WSIJustificationStateEntry WSIJustificationStateEntry;
+
+typedef unsigned short WSIJustificationClasses;
+enum {
+ wsiJustEndOfLineClass = 0,
+ wsiJustEndOfRunClass = 1,
+ wsiJustDeletedGlyphClass = 2,
+ wsiJustUserDefinedClass = 3
+};
+
+typedef unsigned short WSIJustificationStates;
+enum {
+ wsiStartOfLineState = 0, /* pre-defined states */
+ wsiStartOfRunState = 1,
+ wsiUserDefinedState = 2
+};
+
+/* pre-multiplied: class# * sizeof(WSIJustificationStateEntry) */
+typedef UInt8 WSIJustificationClassOffset;
+
+struct WSIJustificationStateTable {
+ short maxPriorities;
+ unsigned short rowWidth; /* width of a state table row in bytes */
+ short classTableOffset;
+ short stateTableOffset;
+};
+typedef struct WSIJustificationStateTable WSIJustificationStateTable;
+/*
+ Last two fields of above structure - someday?
+ WSIJustificationClassOffset classes[up to 64 classes supported];
+ WSIJustificationStateEntry states[up to your heart's desire];
+ */
+
+struct WSIJustificationHeader {
+ short version;
+ short format;
+
+ Point scaling; /* numer/denom scaling of priority weights <7> */
+
+ unsigned short spacesPerInsertion; /* # of $20 chars in justification insertion string <12> */
+ unsigned short justStringOffset; /* offset to justification string */
+
+
+ WSIJustificationStateTable stateTable; /* long-aligned boundary aligned w/ spacesPerInsertion field - justification string follows */
+};
+typedef struct WSIJustificationHeader WSIJustificationHeader;
+
+/* Line Layout's Property table version <11> */
+enum {
+ /* v1.0 */
+ currentPropsTableVersion = 0x00010000
+};
+
+enum {
+ /* version is octal 0100 or hex 0x40 (#64) */
+ kCharToGlyphCurrentVersion = 0x40
+};
+
+/* pass as priorityWeight to JustifyWSILayout to use script's current just setting */
+enum {
+ kScriptsDefaultJustWeight = -1
+};
+
+
+/* feature selectors used in FindScriptRun and itl5 configuration tables <9> */
+
+typedef UInt16 WSIFeatureType;
+typedef UInt16 WSIFeatureSelector;
+
+struct WSIFeature {
+ WSIFeatureType featureType;
+ WSIFeatureSelector featureSelector;
+};
+typedef struct WSIFeature WSIFeature;
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __WORLDSCRIPT__ */
+
diff --git a/include/qt/ZoomedVideo.h b/include/qt/ZoomedVideo.h
new file mode 100644
index 000000000..5ab75db6d
--- /dev/null
+++ b/include/qt/ZoomedVideo.h
@@ -0,0 +1,157 @@
+/*
+ File: ZoomedVideo.h
+
+ Contains: PC Card Family Zoomed Video Driver Interface
+
+ Version: Technology: System 7.5
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1996-2001 by Apple Computer, Inc. All rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __ZOOMEDVIDEO__
+#define __ZOOMEDVIDEO__
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+#ifndef __DEVICES__
+#include "Devices.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#define kZVDriverName "\p.ZVPort"
+
+/* Control codes */
+
+enum {
+ cscZVVideoEnable = 2, /* Used to enable or disable ZV Video*/
+ cscZVSetCurrentAnalogValue = 3, /* Used to set brightness, contrast, etc.*/
+ cscZVSetInput = 9, /* Set video source to selected input*/
+ cscZVSetInputStandard = 11, /* Set the input to NTSC, PAL, or SECAM*/
+ cscZVGetMaxSourceRect = 12 /* Get Maximum Source Rect*/
+};
+
+/* Status codes*/
+enum {
+ cscZVGetVideoEnable = 2, /* Indicates whether ZV Video is enabled*/
+ cscZVGetCurrentAnalogValue = 3, /* Used to get brightness, contrast, etc.*/
+ cscZVGetDefaultAnalogValue = 4,
+ cscZVGetVSyncState = 5, /* Used to look for a Vertical Sync on ZV Video*/
+ cscZVGetInfo = 6, /* Returns the ZV Information*/
+ cscZVGetInputFlags = 7, /* Returns the input flags.*/
+ cscZVGetNumberOfInputs = 8, /* Returns the number of video inputs*/
+ cscZVGetInput = 9, /* Zero-based input number*/
+ cscZVGetInputFormat = 10 /* Returns whether input is compsite/s-video*/
+};
+
+
+/*
+ -----------------------------------------------------------------
+ Additional parameters for csInfoZV control call
+ A pointer to ZVInfo is passed in csParam[0] (and csParam[1])
+ which must be filled by the driver in response to this call.
+*/
+
+typedef UInt32 ZVFeatures;
+enum {
+ kZVHasAudio = (1 << 0),
+ kZVHasTVTuner = (1 << 1),
+ kZVHasContrast = (1 << 16),
+ kZVHasBrightness = (1 << 17),
+ kZVHasSharpness = (1 << 18),
+ kZVHasSaturation = (1 << 19),
+ kZVHasHue = (1 << 20)
+};
+
+
+
+struct ZVInfo {
+ ZVFeatures features;
+ UInt32 currentFlags;
+ Rect activeRect;
+ Boolean isInterlaced;
+ SInt8 filler;
+ UInt32 reserved1;
+ UInt32 reserved2;
+};
+typedef struct ZVInfo ZVInfo;
+
+struct ZVFlagRecord {
+ Boolean csFlag;
+ SInt8 filler;
+};
+typedef struct ZVFlagRecord ZVFlagRecord;
+/*
+ -----------------------------------------------------------------
+ Additional definitions for "AnalogCtlZV" control calls
+ A pointer to a ZVSetAnalogControlParam is passed to the driver
+ whenever the system needs to adjust one of the analog settings.
+*/
+
+typedef UInt16 ZVAnalogControlSelector;
+enum {
+ kZVContrast = 1, /* Range: 0x0 <= no change to image, larger values increase the contrast*/
+ kZVBrightness = 2, /* Range: 0x0 <= darkest setting, 0xffff = lightest setting*/
+ kZVSharpness = 3, /* Range: 0x0 <= no sharpness filtering, 0xffff <= full sharpness filtering*/
+ kZVSaturation = 4, /* Range: 0x0 <= min saturation, 0xffff <= max saturation */
+ kZVHue = 5, /* Range: 0x0 <= -180. shift in hue, 0xffff <= 179. shift, 0x8000 <=0. shift*/
+ kZVBlackLevel = 6, /* Range: 0x0 <= max black, 0xffff <= min black level*/
+ kZVWhiteLevel = 7 /* Range: 0x0 <= min white, 0xffff <= max white level*/
+};
+
+
+struct ZVAnalogControlRecord {
+ ZVAnalogControlSelector whichControl;
+ UInt16 value;
+};
+typedef struct ZVAnalogControlRecord ZVAnalogControlRecord;
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __ZOOMEDVIDEO__ */
+
diff --git a/include/qt/fenv.h b/include/qt/fenv.h
new file mode 100644
index 000000000..d802c2154
--- /dev/null
+++ b/include/qt/fenv.h
@@ -0,0 +1,306 @@
+/*
+ File: fenv.h
+
+ Contains: Floating-Point environment for PowerPC and 68K
+
+ Version: Technology: MathLib v2
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1987-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __FENV__
+#define __FENV__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+#if TARGET_OS_MAC
+/*
+ A collection of functions designed to provide access to the floating
+ point environment for numerical programming. It is modeled after
+ the floating-point requirements in C9X.
+
+ The file <fenv.h> declares many functions in support of numerical
+ programming. It provides a set of environmental controls similar to
+ the ones found in <SANE.h>. Programs that test flags or run under
+ non-default modes must do so under the effect of an enabling
+ "fenv_access" pragma.
+*/
+
+/********************************************************************************
+* *
+* fenv_t is a type for representing the entire floating-point *
+* environment in a single object. *
+* *
+* fexcept_t is a type for representing the floating-point *
+* exception flag state collectively. *
+* *
+********************************************************************************/
+#if TARGET_CPU_PPC
+typedef long fenv_t;
+typedef long fexcept_t;
+/* Definitions of floating-point exception macros */
+enum {
+ FE_INEXACT = 0x02000000,
+ FE_DIVBYZERO = 0x04000000,
+ FE_UNDERFLOW = 0x08000000,
+ FE_OVERFLOW = 0x10000000,
+ FE_INVALID = 0x20000000
+};
+
+
+/* Definitions of rounding direction macros */
+enum {
+ FE_TONEAREST = 0x00000000,
+ FE_TOWARDZERO = 0x00000001,
+ FE_UPWARD = 0x00000002,
+ FE_DOWNWARD = 0x00000003
+};
+
+#endif /* TARGET_CPU_PPC */
+
+#if TARGET_CPU_68K
+#if TARGET_RT_MAC_68881
+typedef long fexcept_t;
+
+struct fenv_t {
+ long FPCR;
+ long FPSR;
+};
+typedef struct fenv_t fenv_t;
+enum {
+ FE_INEXACT = 0x00000008, /* ((long)(8)) */
+ FE_DIVBYZERO = 0x00000010, /* ((long)(16)) */
+ FE_UNDERFLOW = 0x00000020, /* ((long)(32)) */
+ FE_OVERFLOW = 0x00000040, /* ((long)(64)) */
+ FE_INVALID = 0x00000080 /* ((long)(128)) */
+};
+
+#else
+
+typedef short fexcept_t;
+typedef short fenv_t;
+enum {
+ FE_INVALID = 0x0001, /* ((short)(1)) */
+ FE_UNDERFLOW = 0x0002, /* ((short)(2)) */
+ FE_OVERFLOW = 0x0004, /* ((short)(4)) */
+ FE_DIVBYZERO = 0x0008, /* ((short)(8)) */
+ FE_INEXACT = 0x0010 /* ((short)(16)) */
+};
+
+#endif /* TARGET_RT_MAC_68881 */
+
+enum {
+ FE_TONEAREST = 0x0000, /* ((short)(0)) */
+ FE_UPWARD = 0x0001, /* ((short)(1)) */
+ FE_DOWNWARD = 0x0002, /* ((short)(2)) */
+ FE_TOWARDZERO = 0x0003 /* ((short)(3)) */
+};
+
+/* Definitions of rounding precision macros (68K only) */
+enum {
+ FE_LDBLPREC = 0x0000, /* ((short)(0)) */
+ FE_DBLPREC = 0x0001, /* ((short)(1)) */
+ FE_FLTPREC = 0x0002 /* ((short)(2)) */
+};
+
+#endif /* TARGET_CPU_68K */
+
+/* The bitwise OR of all exception macros */
+
+#define FE_ALL_EXCEPT ( FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID )
+/* Definition of pointer to IEEE default environment object */
+extern fenv_t _FE_DFL_ENV; /* default environment object */
+#define FE_DFL_ENV &_FE_DFL_ENV /* pointer to default environment */
+
+/*******************************************************************************
+* The following functions provide access to the exception flags. The *
+* "int" input argument can be constructed by bitwise ORs of the exception *
+* macros: for example: FE_OVERFLOW | FE_INEXACT. *
+*******************************************************************************/
+/*******************************************************************************
+* The function "feclearexcept" clears the supported exceptions represented *
+* by its argument. *
+*******************************************************************************/
+EXTERN_API_C( void ) feclearexcept(int excepts);
+
+
+
+/*******************************************************************************
+* The function "fegetexcept" stores a representation of the exception *
+* flags indicated by the argument "excepts" through the pointer argument *
+* "flagp". *
+*******************************************************************************/
+EXTERN_API_C( void ) fegetexcept(fexcept_t *flagp, int excepts);
+
+
+
+/*******************************************************************************
+* The function "feraiseexcept" raises the supported exceptions *
+* represented by its argument. *
+*******************************************************************************/
+EXTERN_API_C( void ) feraiseexcept(int excepts);
+
+
+
+/*******************************************************************************
+* The function "fesetexcept" sets or clears the exception flags indicated *
+* by the int argument "excepts" according to the representation in the *
+* object pointed to by the pointer argument "flagp". The value of *
+* "*flagp" must have been set by a previous call to "fegetexcept". *
+* This function does not raise exceptions; it just sets the state of *
+* the flags. *
+*******************************************************************************/
+EXTERN_API_C( void ) fesetexcept(const fexcept_t *flagp, int excepts);
+
+
+
+/*******************************************************************************
+* The function "fetestexcept" determines which of the specified subset of *
+* the exception flags are currently set. The argument "excepts" specifies *
+* the exception flags to be queried as a bitwise OR of the exception *
+* macros. This function returns the bitwise OR of the exception macros *
+* corresponding to the currently set exceptions included in "excepts". *
+*******************************************************************************/
+EXTERN_API_C( int ) fetestexcept(int excepts);
+
+
+
+/*******************************************************************************
+* The following functions provide control of rounding direction modes. *
+*******************************************************************************/
+/*******************************************************************************
+* The function "fegetround" returns the value of the rounding direction *
+* macro which represents the current rounding direction. *
+*******************************************************************************/
+EXTERN_API_C( int ) fegetround(void );
+
+
+
+/*******************************************************************************
+* The function "fesetround" establishes the rounding direction represented *
+* by its argument. It returns nonzero if and only if the argument matches *
+* a rounding direction macro. If not, the rounding direction is not *
+* changed. *
+*******************************************************************************/
+EXTERN_API_C( int ) fesetround(int round);
+
+
+
+/*******************************************************************************
+* The following functions manage the floating-point environment, exception *
+* flags and dynamic modes, as one entity. *
+*******************************************************************************/
+/*******************************************************************************
+* The function "fegetenv" stores the current floating-point environment *
+* in the object pointed to by its pointer argument "envp". *
+*******************************************************************************/
+EXTERN_API_C( void ) fegetenv(fenv_t *envp);
+
+
+
+/*******************************************************************************
+* The function "feholdexcept" saves the current environment in the object *
+* pointed to by its pointer argument "envp", clears the exception flags, *
+* and clears floating-point exception enables. This function supersedes *
+* the SANE function "procentry", but it does not change the current *
+* rounding direction mode. *
+*******************************************************************************/
+EXTERN_API_C( int ) feholdexcept(fenv_t *envp);
+
+
+
+/*******************************************************************************
+* The function "fesetenv" installs the floating-point environment *
+* environment represented by the object pointed to by its argument *
+* "envp". The value of "*envp" must be set by a call to "fegetenv" or *
+* "feholdexcept", by an implementation-defined macro of type "fenv_t", *
+* or by the use of the pointer macro FE_DFL_ENV as the argument. *
+*******************************************************************************/
+EXTERN_API_C( void ) fesetenv(const fenv_t *envp);
+
+
+
+/*******************************************************************************
+* The function "feupdateenv" saves the current exceptions into its *
+* automatic storage, installs the environment represented through its *
+* pointer argument "envp", and then re-raises the saved exceptions. *
+* This function, which supersedes the SANE function "procexit", can be *
+* used in conjunction with "feholdexcept" to write routines which hide *
+* spurious exceptions from their callers. *
+*******************************************************************************/
+EXTERN_API_C( void ) feupdateenv(const fenv_t *envp);
+
+
+
+#if TARGET_CPU_68K
+/*******************************************************************************
+* The following functions provide control of rounding precision. *
+* Because the PowerPC does not provide this capability, these functions *
+* are available only for the 68K Macintosh. Rounding precision values *
+* are defined by the rounding precision macros. These functions are *
+* equivalent to the SANE functions getprecision and setprecision. *
+*******************************************************************************/
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( int ) fegetprec(void );
+
+EXTERN_API_C( int ) fesetprec(int precision);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_CPU_68K */
+
+#endif /* TARGET_OS_MAC */
+
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __FENV__ */
+
diff --git a/include/qt/fp.h b/include/qt/fp.h
new file mode 100644
index 000000000..d36a21a87
--- /dev/null
+++ b/include/qt/fp.h
@@ -0,0 +1,913 @@
+/*
+ File: fp.h
+
+ Contains: FPCE Floating-Point Definitions and Declarations.
+
+ Version: Technology: MathLib v2
+ Release: QuickTime 6.0.2
+
+ Copyright: (c) 1987-2001 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://developer.apple.com/bugreporter/
+
+*/
+#ifndef __FP__
+#define __FP__
+
+#ifndef __CONDITIONALMACROS__
+#include "ConditionalMacros.h"
+#endif
+
+#ifndef __MACTYPES__
+#include "MacTypes.h"
+#endif
+
+
+/********************************************************************************
+* *
+* A collection of numerical functions designed to facilitate a wide *
+* range of numerical programming as required by C9X. *
+* *
+* The <fp.h> declares many functions in support of numerical programming. *
+* It provides a superset of <math.h> and <SANE.h> functions. Some *
+* functionality previously found in <SANE.h> and not in the FPCE <fp.h> *
+* can be found in this <fp.h> under the heading "__NOEXTENSIONS__". *
+* *
+* All of these functions are IEEE 754 aware and treat exceptions, NaNs, *
+* positive and negative zero and infinity consistent with the floating- *
+* point standard. *
+* *
+********************************************************************************/
+
+
+
+#if PRAGMA_ONCE
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if PRAGMA_IMPORT
+#pragma import on
+#endif
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=mac68k
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(push, 2)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack(2)
+#endif
+
+/********************************************************************************
+* *
+* Efficient types *
+* *
+* float_t Most efficient type at least as wide as float *
+* double_t Most efficient type at least as wide as double *
+* *
+* CPU float_t(bits) double_t(bits) *
+* -------- ----------------- ----------------- *
+* PowerPC float(32) double(64) *
+* 68K long double(80/96) long double(80/96) *
+* x86 long double(80) long double(80) *
+* *
+********************************************************************************/
+#if defined(__MWERKS__) && defined(__cmath__)
+/* these types were already defined in MSL's math.h */
+#else
+#if TARGET_CPU_PPC
+typedef float float_t;
+typedef double double_t;
+#elif TARGET_CPU_68K
+typedef long double float_t;
+typedef long double double_t;
+#elif TARGET_CPU_X86
+#if NeXT || TARGET_OS_MAC
+typedef double float_t;
+typedef double double_t;
+#else
+typedef long double float_t;
+typedef long double double_t;
+#endif /* NeXT || TARGET_OS_MAC */
+
+#elif TARGET_CPU_MIPS
+typedef double float_t;
+typedef double double_t;
+#elif TARGET_CPU_ALPHA
+typedef double float_t;
+typedef double double_t;
+#elif TARGET_CPU_SPARC
+typedef double float_t;
+typedef double double_t;
+#else
+#error unsupported CPU
+#endif /* */
+
+/********************************************************************************
+* *
+* Define some constants. *
+* *
+* HUGE_VAL IEEE 754 value of infinity. *
+* INFINITY IEEE 754 value of infinity. *
+* NAN A generic NaN (Not A Number). *
+* DECIMAL_DIG Satisfies the constraint that the conversion from *
+* double to decimal and back is the identity function. *
+* *
+********************************************************************************/
+#if TARGET_OS_MAC
+ #if TARGET_RT_MAC_MACHO
+ #define HUGE_VAL 1e500 /* compatible with bsd math.h */
+ #else
+ #define HUGE_VAL __inf()
+ #endif
+ #define INFINITY __inf()
+ #define NAN nan("255")
+#else
+ #define NAN sqrt(-1)
+#endif
+
+#if TARGET_CPU_PPC
+ #define DECIMAL_DIG 17 /* does not exist for double-double */
+#elif TARGET_CPU_68K
+ #define DECIMAL_DIG 21
+#endif
+#endif /* __MWERKS__ && __cmath__ */
+#if TARGET_OS_MAC
+/* MSL already defines these */
+#if !defined(__MWERKS__) || !defined(__cmath__)
+/********************************************************************************
+* *
+* Trigonometric functions *
+* *
+* acos result is in [0,pi]. *
+* asin result is in [-pi/2,pi/2]. *
+* atan result is in [-pi/2,pi/2]. *
+* atan2 Computes the arc tangent of y/x in [-pi,pi] using the sign of *
+* both arguments to determine the quadrant of the computed value. *
+* *
+********************************************************************************/
+EXTERN_API_C( double_t ) cos(double_t x);
+
+EXTERN_API_C( double_t ) sin(double_t x);
+
+EXTERN_API_C( double_t ) tan(double_t x);
+
+EXTERN_API_C( double_t ) acos(double_t x);
+
+EXTERN_API_C( double_t ) asin(double_t x);
+
+EXTERN_API_C( double_t ) atan(double_t x);
+
+EXTERN_API_C( double_t ) atan2(double_t y, double_t x);
+
+
+
+/********************************************************************************
+* *
+* Hyperbolic functions *
+* *
+********************************************************************************/
+EXTERN_API_C( double_t ) cosh(double_t x);
+
+EXTERN_API_C( double_t ) sinh(double_t x);
+
+EXTERN_API_C( double_t ) tanh(double_t x);
+
+EXTERN_API_C( double_t ) acosh(double_t x);
+
+EXTERN_API_C( double_t ) asinh(double_t x);
+
+EXTERN_API_C( double_t ) atanh(double_t x);
+
+
+
+/********************************************************************************
+* *
+* Exponential functions *
+* *
+* expm1 expm1(x) = exp(x) - 1. But, for small enough arguments, *
+* expm1(x) is expected to be more accurate than exp(x) - 1. *
+* frexp Breaks a floating-point number into a normalized fraction *
+* and an integral power of 2. It stores the integer in the *
+* object pointed by *exponent. *
+* ldexp Multiplies a floating-point number by an integer power of 2. *
+* log1p log1p = log(1 + x). But, for small enough arguments, *
+* log1p is expected to be more accurate than log(1 + x). *
+* logb Extracts the exponent of its argument, as a signed integral *
+* value. A subnormal argument is treated as though it were first *
+* normalized. Thus: *
+* 1 <= x * 2^(-logb(x)) < 2 *
+* modf Returns fractional part of x as function result and returns *
+* integral part of x via iptr. Note C9X uses double not double_t. *
+* scalb Computes x * 2^n efficently. This is not normally done by *
+* computing 2^n explicitly. *
+* *
+********************************************************************************/
+EXTERN_API_C( double_t ) exp(double_t x);
+
+EXTERN_API_C( double_t ) expm1(double_t x);
+
+EXTERN_API_C( double_t ) exp2(double_t x);
+
+EXTERN_API_C( double_t ) frexp(double_t x, int *exponent);
+
+EXTERN_API_C( double_t ) ldexp(double_t x, int n);
+
+EXTERN_API_C( double_t ) log(double_t x);
+
+EXTERN_API_C( double_t ) log2(double_t x);
+
+EXTERN_API_C( double_t ) log1p(double_t x);
+
+EXTERN_API_C( double_t ) log10(double_t x);
+
+EXTERN_API_C( double_t ) logb(double_t x);
+
+#if !TARGET_RT_MAC_MACHO
+EXTERN_API_C( long double ) modfl(long double x, long double *iptrl);
+
+#endif /* !TARGET_RT_MAC_MACHO */
+
+EXTERN_API_C( double_t ) modf(double_t x, double_t *iptr);
+
+EXTERN_API_C( float ) modff(float x, float *iptrf);
+
+
+EXTERN_API_C( double_t ) scalb(double_t x, long n);
+
+/********************************************************************************
+* *
+* Power and absolute value functions *
+* *
+* hypot Computes the square root of the sum of the squares of its *
+* arguments, without undue overflow or underflow. *
+* pow Returns x raised to the power of y. Result is more accurate *
+* than using exp(log(x)*y). *
+* *
+********************************************************************************/
+EXTERN_API_C( double_t ) fabs(double_t x);
+
+EXTERN_API_C( double_t ) hypot(double_t x, double_t y);
+
+EXTERN_API_C( double_t ) pow(double_t x, double_t y);
+
+EXTERN_API_C( double_t ) sqrt(double_t x);
+
+
+
+/********************************************************************************
+* *
+* Gamma and Error functions *
+* *
+* erf The error function. *
+* erfc Complementary error function. *
+* gamma The gamma function. *
+* lgamma Computes the base-e logarithm of the absolute value of *
+* gamma of its argument x, for x > 0. *
+* *
+********************************************************************************/
+EXTERN_API_C( double_t ) erf(double_t x);
+
+EXTERN_API_C( double_t ) erfc(double_t x);
+
+EXTERN_API_C( double_t ) gamma(double_t x);
+
+EXTERN_API_C( double_t ) lgamma(double_t x);
+
+
+
+/********************************************************************************
+* *
+* Nearest integer functions *
+* *
+* rint Rounds its argument to an integral value in floating point *
+* format, honoring the current rounding direction. *
+* *
+* nearbyint Differs from rint only in that it does not raise the inexact *
+* exception. It is the nearbyint function recommended by the *
+* IEEE floating-point standard 854. *
+* *
+* rinttol Rounds its argument to the nearest long int using the current *
+* rounding direction. NOTE: if the rounded value is outside *
+* the range of long int, then the result is undefined. *
+* *
+* round Rounds the argument to the nearest integral value in floating *
+* point format similar to the Fortran "anint" function. That is: *
+* add half to the magnitude and chop. *
+* *
+* roundtol Similar to the Fortran function nint or to the Pascal round. *
+* NOTE: if the rounded value is outside the range of long int, *
+* then the result is undefined. *
+* *
+* trunc Computes the integral value, in floating format, nearest to *
+* but no larger in magnitude than its argument. NOTE: on 68K *
+* compilers when using -elems881, trunc must return an int *
+* *
+********************************************************************************/
+EXTERN_API_C( double_t ) ceil(double_t x);
+
+EXTERN_API_C( double_t ) floor(double_t x);
+
+EXTERN_API_C( double_t ) rint(double_t x);
+
+EXTERN_API_C( double_t ) nearbyint(double_t x);
+
+EXTERN_API_C( long ) rinttol(double_t x);
+
+EXTERN_API_C( double_t ) round(double_t x);
+
+EXTERN_API_C( long ) roundtol(double_t round);
+
+#if TARGET_RT_MAC_68881
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( int ) trunc(double_t x);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#else
+EXTERN_API_C( double_t ) trunc(double_t x);
+
+#endif /* TARGET_RT_MAC_68881 */
+
+
+/********************************************************************************
+* *
+* Remainder functions *
+* *
+* remainder IEEE 754 floating point standard for remainder. *
+* remquo SANE remainder. It stores into 'quotient' the 7 low-order *
+* bits of the integer quotient x/y, such that: *
+* -127 <= quotient <= 127. *
+* *
+********************************************************************************/
+EXTERN_API_C( double_t ) fmod(double_t x, double_t y);
+
+EXTERN_API_C( double_t ) remainder(double_t x, double_t y);
+
+EXTERN_API_C( double_t ) remquo(double_t x, double_t y, int *quo);
+
+
+
+/********************************************************************************
+* *
+* Auxiliary functions *
+* *
+* copysign Produces a value with the magnitude of its first argument *
+* and sign of its second argument. NOTE: the order of the *
+* arguments matches the recommendation of the IEEE 754 *
+* floating point standard, which is opposite from the SANE *
+* copysign function. *
+* *
+* nan The call 'nan("n-char-sequence")' returns a quiet NaN *
+* with content indicated through tagp in the selected *
+* data type format. *
+* *
+* nextafter Computes the next representable value after 'x' in the *
+* direction of 'y'. if x == y, then y is returned. *
+* *
+********************************************************************************/
+EXTERN_API_C( double_t ) copysign(double_t x, double_t y);
+
+#if !TARGET_RT_MAC_MACHO
+EXTERN_API_C( long double ) nanl(const char *tagp);
+
+#else
+#define nanl(tagp) ((long double)nan(tagp))
+#endif /* !TARGET_RT_MAC_MACHO */
+
+EXTERN_API_C( double ) nan(const char *tagp);
+
+EXTERN_API_C( float ) nanf(const char *tagp);
+
+#if !TARGET_RT_MAC_MACHO
+EXTERN_API_C( long double ) nextafterl(long double x, long double y);
+
+#else
+#define nextafterl(x,y) ((long double)nextafter((double)x,(double)y))
+#endif /* !TARGET_RT_MAC_MACHO */
+
+EXTERN_API_C( double ) nextafterd(double x, double y);
+
+EXTERN_API_C( float ) nextafterf(float x, float y);
+
+
+
+/********************************************************************************
+* *
+* Inquiry macros *
+* *
+* fpclassify Returns one of the FP_* values. *
+* isnormal Non-zero if and only if the argument x is normalized. *
+* isfinite Non-zero if and only if the argument x is finite. *
+* isnan Non-zero if and only if the argument x is a NaN. *
+* signbit Non-zero if and only if the sign of the argument x is *
+* negative. This includes, NaNs, infinities and zeros. *
+* *
+********************************************************************************/
+enum {
+ FP_SNAN = 0, /* signaling NaN */
+ FP_QNAN = 1, /* quiet NaN */
+ FP_INFINITE = 2, /* + or - infinity */
+ FP_ZERO = 3, /* + or - zero */
+ FP_NORMAL = 4, /* all normal numbers */
+ FP_SUBNORMAL = 5 /* denormal numbers */
+};
+
+
+
+
+#if TARGET_RT_MAC_MACHO
+#define __fpclassify(x) __fpclassifyd((double)x)
+#define __isnormal(x) __isnormald((double)x)
+#define __isfinite(x) __isfinited((double)x)
+#define __isnan(x) __isnand((double)x)
+#define __signbit(x) __signbitd((double)x)
+#endif
+
+#define fpclassify(x) ( ( sizeof ( x ) == sizeof(long double) ) ? \
+ __fpclassify ( x ) : \
+ ( sizeof ( x ) == sizeof(double) ) ? \
+ __fpclassifyd ( x ) : \
+ __fpclassifyf ( x ) )
+#define isnormal(x) ( ( sizeof ( x ) == sizeof(long double) ) ? \
+ __isnormal ( x ) : \
+ ( sizeof ( x ) == sizeof(double) ) ? \
+ __isnormald ( x ) : \
+ __isnormalf ( x ) )
+#define isfinite(x) ( ( sizeof ( x ) == sizeof(long double) ) ? \
+ __isfinite ( x ) : \
+ ( sizeof ( x ) == sizeof(double) ) ? \
+ __isfinited ( x ) : \
+ __isfinitef ( x ) )
+#define isnan(x) ( ( sizeof ( x ) == sizeof(long double) ) ? \
+ __isnan ( x ) : \
+ ( sizeof ( x ) == sizeof(double) ) ? \
+ __isnand ( x ) : \
+ __isnanf ( x ) )
+#define signbit(x) ( ( sizeof ( x ) == sizeof(long double) ) ? \
+ __signbit ( x ) : \
+ ( sizeof ( x ) == sizeof(double) ) ? \
+ __signbitd ( x ) : \
+ __signbitf ( x ) )
+
+
+#if !TARGET_RT_MAC_MACHO
+EXTERN_API_C( long ) __fpclassify(long double x);
+
+#endif /* !TARGET_RT_MAC_MACHO */
+
+EXTERN_API_C( long ) __fpclassifyd(double x);
+
+EXTERN_API_C( long ) __fpclassifyf(float x);
+
+#if !TARGET_RT_MAC_MACHO
+EXTERN_API_C( long ) __isnormal(long double x);
+
+#endif /* !TARGET_RT_MAC_MACHO */
+
+EXTERN_API_C( long ) __isnormald(double x);
+
+EXTERN_API_C( long ) __isnormalf(float x);
+
+#if !TARGET_RT_MAC_MACHO
+EXTERN_API_C( long ) __isfinite(long double x);
+
+#endif /* !TARGET_RT_MAC_MACHO */
+
+EXTERN_API_C( long ) __isfinited(double x);
+
+EXTERN_API_C( long ) __isfinitef(float x);
+
+#if !TARGET_RT_MAC_MACHO
+EXTERN_API_C( long ) __isnan(long double x);
+
+#endif /* !TARGET_RT_MAC_MACHO */
+
+EXTERN_API_C( long ) __isnand(double x);
+
+EXTERN_API_C( long ) __isnanf(float x);
+
+#if !TARGET_RT_MAC_MACHO
+EXTERN_API_C( long ) __signbit(long double x);
+
+#endif /* !TARGET_RT_MAC_MACHO */
+
+EXTERN_API_C( long ) __signbitd(double x);
+
+EXTERN_API_C( long ) __signbitf(float x);
+
+EXTERN_API_C( double_t ) __inf(void );
+
+
+
+/********************************************************************************
+* *
+* Max, Min and Positive Difference *
+* *
+* fdim Determines the 'positive difference' between its arguments: *
+* { x - y, if x > y }, { +0, if x <= y }. If one argument is *
+* NaN, then fdim returns that NaN. if both arguments are NaNs, *
+* then fdim returns the first argument. *
+* *
+* fmax Returns the maximum of the two arguments. Corresponds to the *
+* max function in FORTRAN. NaN arguments are treated as missing *
+* data. If one argument is NaN and the other is a number, then *
+* the number is returned. If both are NaNs then the first *
+* argument is returned. *
+* *
+* fmin Returns the minimum of the two arguments. Corresponds to the *
+* min function in FORTRAN. NaN arguments are treated as missing *
+* data. If one argument is NaN and the other is a number, then *
+* the number is returned. If both are NaNs then the first *
+* argument is returned. *
+* *
+********************************************************************************/
+EXTERN_API_C( double_t ) fdim(double_t x, double_t y);
+
+EXTERN_API_C( double_t ) fmax(double_t x, double_t y);
+
+EXTERN_API_C( double_t ) fmin(double_t x, double_t y);
+
+#endif /* !defined(__MWERKS__) || !defined(__cmath__) */
+
+/*******************************************************************************
+* Constants *
+*******************************************************************************/
+extern const double_t pi;
+/********************************************************************************
+* *
+* Non NCEG extensions *
+* *
+********************************************************************************/
+#ifndef __NOEXTENSIONS__
+/********************************************************************************
+* *
+* Financial functions *
+* *
+* compound Computes the compound interest factor "(1 + rate)^periods" *
+* more accurately than the straightforward computation with *
+* the Power function. This is SANE's compound function. *
+* *
+* annuity Computes the present value factor for an annuity *
+* "(1 - (1 + rate)^(-periods)) /rate" more accurately than *
+* the straightforward computation with the Power function. *
+* This is SANE's annuity function. *
+* *
+********************************************************************************/
+EXTERN_API_C( double_t ) compound(double_t rate, double_t periods);
+
+EXTERN_API_C( double_t ) annuity(double_t rate, double_t periods);
+
+
+
+/********************************************************************************
+* *
+* Random function *
+* *
+* randomx A pseudorandom number generator. It uses the iteration: *
+* (7^5*x)mod(2^31-1) *
+* *
+********************************************************************************/
+EXTERN_API_C( double_t ) randomx(double_t *x);
+
+
+
+/*******************************************************************************
+* Relational operator *
+*******************************************************************************/
+/* relational operator */
+typedef short relop;
+enum {
+ GREATERTHAN = 0,
+ LESSTHAN = 1,
+ EQUALTO = 2,
+ UNORDERED = 3
+};
+
+#if !defined(__MWERKS__) || !defined(__cmath__)
+EXTERN_API_C( relop ) relation(double_t x, double_t y);
+
+#endif /* !defined(__MWERKS__) || !defined(__cmath__) */
+
+
+/********************************************************************************
+* *
+* Binary to decimal conversions *
+* *
+* SIGDIGLEN Significant decimal digits. *
+* *
+* decimal A record which provides an intermediate unpacked form for *
+* programmers who wish to do their own parsing of numeric input *
+* or formatting of numeric output. *
+* *
+* decform Controls each conversion to a decimal string. The style field *
+* is either FLOATDECIMAL or FIXEDDECIMAL. If FLOATDECIMAL, the *
+* value of the field digits is the number of significant digits. *
+* If FIXEDDECIMAL value of the field digits is the number of *
+* digits to the right of the decimal point. *
+* *
+* num2dec Converts a double_t to a decimal record using a decform. *
+* dec2num Converts a decimal record d to a double_t value. *
+* dec2str Converts a decform and decimal to a string using a decform. *
+* str2dec Converts a string to a decimal struct. *
+* dec2d Similar to dec2num except a double is returned (68k only). *
+* dec2f Similar to dec2num except a float is returned. *
+* dec2s Similar to dec2num except a short is returned. *
+* dec2l Similar to dec2num except a long is returned. *
+* *
+********************************************************************************/
+#if TARGET_CPU_PPC
+ #define SIGDIGLEN 36
+#elif TARGET_CPU_68K
+ #define SIGDIGLEN 20
+#elif TARGET_CPU_X86
+ #define SIGDIGLEN 20
+#endif
+#define DECSTROUTLEN 80 /* max length for dec2str output */
+#define FLOATDECIMAL ((char)(0))
+#define FIXEDDECIMAL ((char)(1))
+struct decimal {
+ char sgn; /* sign 0 for +, 1 for - */
+ char unused;
+ short exp; /* decimal exponent */
+ struct {
+ unsigned char length;
+ unsigned char text[SIGDIGLEN]; /* significant digits */
+ unsigned char unused;
+ } sig;
+};
+typedef struct decimal decimal;
+
+struct decform {
+ char style; /* FLOATDECIMAL or FIXEDDECIMAL */
+ char unused;
+ short digits;
+};
+typedef struct decform decform;
+EXTERN_API_C( void ) num2dec(const decform *f, double_t x, decimal *d);
+
+EXTERN_API_C( double_t ) dec2num(const decimal *d);
+
+EXTERN_API_C( void ) dec2str(const decform *f, const decimal *d, char *s);
+
+EXTERN_API_C( void ) str2dec(const char *s, short *ix, decimal *d, short *vp);
+
+#if TARGET_CPU_68K
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( double ) dec2d(const decimal *d);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_CPU_68K */
+
+EXTERN_API_C( float ) dec2f(const decimal *d);
+
+EXTERN_API_C( short ) dec2s(const decimal *d);
+
+EXTERN_API_C( long ) dec2l(const decimal *d);
+
+
+
+
+/********************************************************************************
+* *
+* 68k-only Transfer Function Prototypes *
+* *
+********************************************************************************/
+#if TARGET_CPU_68K
+#if CALL_NOT_IN_CARBON
+EXTERN_API_C( void ) x96tox80(const extended96 *x, extended80 *x80);
+
+EXTERN_API_C( void ) x80tox96(const extended80 *x80, extended96 *x);
+
+#endif /* CALL_NOT_IN_CARBON */
+
+#endif /* TARGET_CPU_68K */
+
+#endif /* !defined(__NOEXTENSIONS__) */
+
+/********************************************************************************
+* *
+* PowerPC-only Function Prototypes *
+* *
+********************************************************************************/
+
+#if TARGET_CPU_PPC
+#if !TARGET_RT_MAC_MACHO
+#ifndef __MWERKS__ /* Metrowerks does not support double double */
+EXTERN_API_C( long double ) cosl(long double x);
+
+EXTERN_API_C( long double ) sinl(long double x);
+
+EXTERN_API_C( long double ) tanl(long double x);
+
+EXTERN_API_C( long double ) acosl(long double x);
+
+EXTERN_API_C( long double ) asinl(long double x);
+
+EXTERN_API_C( long double ) atanl(long double x);
+
+EXTERN_API_C( long double ) atan2l(long double y, long double x);
+
+EXTERN_API_C( long double ) coshl(long double x);
+
+EXTERN_API_C( long double ) sinhl(long double x);
+
+EXTERN_API_C( long double ) tanhl(long double x);
+
+EXTERN_API_C( long double ) acoshl(long double x);
+
+EXTERN_API_C( long double ) asinhl(long double x);
+
+EXTERN_API_C( long double ) atanhl(long double x);
+
+EXTERN_API_C( long double ) expl(long double x);
+
+EXTERN_API_C( long double ) expm1l(long double x);
+
+EXTERN_API_C( long double ) exp2l(long double x);
+
+EXTERN_API_C( long double ) frexpl(long double x, int *exponent);
+
+EXTERN_API_C( long double ) ldexpl(long double x, int n);
+
+EXTERN_API_C( long double ) logl(long double x);
+
+EXTERN_API_C( long double ) log1pl(long double x);
+
+EXTERN_API_C( long double ) log10l(long double x);
+
+EXTERN_API_C( long double ) log2l(long double x);
+
+EXTERN_API_C( long double ) logbl(long double x);
+
+EXTERN_API_C( long double ) scalbl(long double x, long n);
+
+EXTERN_API_C( long double ) fabsl(long double x);
+
+EXTERN_API_C( long double ) hypotl(long double x, long double y);
+
+EXTERN_API_C( long double ) powl(long double x, long double y);
+
+EXTERN_API_C( long double ) sqrtl(long double x);
+
+EXTERN_API_C( long double ) erfl(long double x);
+
+EXTERN_API_C( long double ) erfcl(long double x);
+
+EXTERN_API_C( long double ) gammal(long double x);
+
+EXTERN_API_C( long double ) lgammal(long double x);
+
+EXTERN_API_C( long double ) ceill(long double x);
+
+EXTERN_API_C( long double ) floorl(long double x);
+
+EXTERN_API_C( long double ) rintl(long double x);
+
+EXTERN_API_C( long double ) nearbyintl(long double x);
+
+EXTERN_API_C( long ) rinttoll(long double x);
+
+EXTERN_API_C( long double ) roundl(long double x);
+
+EXTERN_API_C( long ) roundtoll(long double round);
+
+EXTERN_API_C( long double ) truncl(long double x);
+
+EXTERN_API_C( long double ) remainderl(long double x, long double y);
+
+EXTERN_API_C( long double ) remquol(long double x, long double y, int *quo);
+
+EXTERN_API_C( long double ) copysignl(long double x, long double y);
+
+EXTERN_API_C( long double ) fdiml(long double x, long double y);
+
+EXTERN_API_C( long double ) fmaxl(long double x, long double y);
+
+EXTERN_API_C( long double ) fminl(long double x, long double y);
+
+#endif /* __MWERKS__ */
+#else
+#define cosl(x) ((long double) cos((double_t)(x)))
+#define sinl(x) ((long double) sin((double_t)(x)))
+#define tanl(x) ((long double) tan((double_t)(x)))
+#define acosl(x) ((long double) acos((double_t)(x)))
+#define asinl(x) ((long double) asin((double_t)(x)))
+#define atanl(x) ((long double) atan((double_t)(x)))
+#define atan2l(y,x) ((long double) atan2((double_t)(y),(double_t)(x)))
+#define coshl(x) ((long double) cosh((double_t)(x)))
+#define sinhl(x) ((long double) sinh((double_t)(x)))
+#define tanhl(x) ((long double) tanh((double_t)(x)))
+#define acoshl(x) ((long double) acosh((double_t)(x)))
+#define asinhl(x) ((long double) asinh((double_t)(x)))
+#define atanhl(x) ((long double) atanh((double_t)(x)))
+#define expl(x) ((long double) exp((double_t)(x)))
+#define expm1l(x) ((long double) expm1((double_t)(x)))
+#define exp2l(x) ((long double) exp2((double_t)(x)))
+#define frexpl(x,exp) ((long double) frexp((double_t)(x),(exp)))
+#define ldexpl(x,n) ((long double) ldexp((double_t)(x),(n)))
+#define logl(x) ((long double) log((double_t)(x)))
+#define log1pl(x) ((long double) log1p((double_t)(x)))
+#define log10l(x) ((long double) log10((double_t)(x)))
+#define log2l(x) ((long double) log2((double_t)(x)))
+#define logbl(x) ((long double) logb((double_t)(x)))
+#define scalbl(x,n) ((long double) scalb((double_t)(x),(n)))
+#define fabsl(x) ((long double) fabs((double_t)(x)))
+#define hypotl(x,y) ((long double) hypot((double_t)(x),(double_t)(y)))
+#define powl(x,y) ((long double) pow((double_t)(x),(double_t)(y)))
+#define sqrtl(x) ((long double) sqrt((double_t)(x)))
+#define erfl(x) ((long double) erf((double_t)(x)))
+#define erfcl(x) ((long double) erfc((double_t)(x)))
+#define gammal(x) ((long double) gamma((double_t)(x)))
+#define lgammal(x) ((long double) lgamma((double_t)(x)))
+#define ceill(x) ((long double) ceil((double_t)(x)))
+#define floorl(x) ((long double) floor((double_t)(x)))
+#define rintl(x) ((long double) rint((double_t)(x)))
+#define nearbyintl(x) ((long double) nearbyint((double_t)(x)))
+#define rinttoll(x) (rinttol((double_t)(x)))
+#define roundl(x) ((long double) round((double_t)(x)))
+#define roundtoll(x) (roundtol((double_t)(x)))
+#define truncl(x) ((long double) trunc((double_t)(x)))
+#define remainderl(x,y) ((long double) remainder((double_t)(x),(double_t)(y)))
+#define remquol(x,y,quo) ((long double) remquo((double_t)(x),(double_t)(y),(quo)))
+#define copysignl(x,y) ((long double) copysign((double_t)(x),(double_t)(y)))
+#define fdiml(x,y) ((long double) fdim((double_t)(x),(double_t)(y)))
+#define fmaxl(x,y) ((long double) fmax((double_t)(x),(double_t)(y)))
+#define fminl(x,y) ((long double) fmin((double_t)(x),(double_t)(y)))
+#endif /* !TARGET_RT_MAC_MACHO */
+
+#ifndef __NOEXTENSIONS__
+#if !TARGET_RT_MAC_MACHO
+EXTERN_API_C( relop ) relationl(long double x, long double y);
+
+EXTERN_API_C( void ) num2decl(const decform *f, long double x, decimal *d);
+
+EXTERN_API_C( long double ) dec2numl(const decimal *d);
+
+#else
+
+ #define relationl(x,y) (relation((double_t)x,(double_t)y))
+ #define num2decl(f,x,d) (num2dec(f,(double_t)x,d))
+ #define dec2numl(d) ((long double)dec2num(d))
+
+#endif /* !TARGET_RT_MAC_MACHO */
+
+#endif /* !defined(__NOEXTENSIONS__) */
+
+#endif /* TARGET_CPU_PPC */
+
+#endif /* TARGET_OS_MAC */
+
+#ifndef __NOEXTENSIONS__
+#if !TARGET_RT_MAC_MACHO
+EXTERN_API_C( void ) x80told(const extended80 *x80, long double *x);
+
+EXTERN_API_C( void ) ldtox80(const long double *x, extended80 *x80);
+
+#else
+
+ #define x80told(x80,ld) (*(ld) = x80tod(x80))
+ #define ldtox80(ld,x80) do { double d = (double) *(ld); dtox80(&d, (x80)); } while (0)
+
+#endif /* !TARGET_RT_MAC_MACHO */
+
+/*
+ MathLib v2 has two new transfer functions: x80tod and dtox80. They can
+ be used to directly transform 68k 80-bit extended data types to double
+ and back for PowerPC based machines without using the functions
+ x80told or ldtox80. Double rounding may occur.
+ */
+EXTERN_API_C( double ) x80tod(const extended80 *x80);
+
+EXTERN_API_C( void ) dtox80(const double *x, extended80 *x80);
+
+#endif /* !defined(__NOEXTENSIONS__) */
+
+
+#if PRAGMA_STRUCT_ALIGN
+ #pragma options align=reset
+#elif PRAGMA_STRUCT_PACKPUSH
+ #pragma pack(pop)
+#elif PRAGMA_STRUCT_PACK
+ #pragma pack()
+#endif
+
+#ifdef PRAGMA_IMPORT_OFF
+#pragma import off
+#elif PRAGMA_IMPORT
+#pragma import reset
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __FP__ */
+
diff --git a/include/qt/qt.h b/include/qt/qt.h
new file mode 100644
index 000000000..19ecf6411
--- /dev/null
+++ b/include/qt/qt.h
@@ -0,0 +1,11 @@
+#pragma once
+
+namespace QT
+{
+ #include "QTML.h"
+ #include "Movies.h"
+ #include "scrap.h"
+ #include "ImageCompression.h"
+ #include "ImageCodec.h"
+ #include "Quickdraw.h"
+} \ No newline at end of file