浏览代码

* updated to r200 of the interfaces

git-svn-id: trunk@5515 -
Jonas Maebe 18 年之前
父节点
当前提交
b0ef674721
共有 62 个文件被更改,包括 13713 次插入956 次删除
  1. 18 1
      .gitattributes
  2. 311 1
      packages/extra/univint/AEDataModel.pas
  3. 45 13
      packages/extra/univint/AERegistry.pas
  4. 141 0
      packages/extra/univint/AXActionConstants.pas
  5. 1460 0
      packages/extra/univint/AXAttributeConstants.pas
  6. 0 717
      packages/extra/univint/AXConstants.pas
  7. 205 0
      packages/extra/univint/AXNotificationConstants.pas
  8. 487 0
      packages/extra/univint/AXRoleConstants.pas
  9. 137 0
      packages/extra/univint/AXTextAttributedString.pas
  10. 25 2
      packages/extra/univint/AXUIElement.pas
  11. 4 1
      packages/extra/univint/AXValue.pas
  12. 127 0
      packages/extra/univint/AXValueConstants.pas
  13. 306 1
      packages/extra/univint/AppleEvents.pas
  14. 2671 0
      packages/extra/univint/AudioHardware.pas
  15. 2 2
      packages/extra/univint/CFURL.pas
  16. 0 1
      packages/extra/univint/CGBase.pas
  17. 3 1
      packages/extra/univint/CGColorSpace.pas
  18. 2 1
      packages/extra/univint/CGDataConsumer.pas
  19. 1 1
      packages/extra/univint/CGDirectDisplay.pas
  20. 204 0
      packages/extra/univint/CGImageDestination.pas
  21. 583 0
      packages/extra/univint/CGImageProperties.pas
  22. 303 0
      packages/extra/univint/CGImageSource.pas
  23. 1 1
      packages/extra/univint/CMApplication.pas
  24. 2 2
      packages/extra/univint/CMMComponent.pas
  25. 2 2
      packages/extra/univint/Controls.pas
  26. 1048 0
      packages/extra/univint/CoreAudioTypes.pas
  27. 2 2
      packages/extra/univint/Dialogs.pas
  28. 3 3
      packages/extra/univint/Events.pas
  29. 1267 33
      packages/extra/univint/FPCMacOSAll.pas
  30. 735 0
      packages/extra/univint/FontPanel.pas
  31. 457 31
      packages/extra/univint/GestaltEqu.pas
  32. 398 0
      packages/extra/univint/HIMovieView.pas
  33. 12 12
      packages/extra/univint/HTMLRendering.pas
  34. 168 0
      packages/extra/univint/HostTime.pas
  35. 60 11
      packages/extra/univint/Icons.pas
  36. 19 2
      packages/extra/univint/MacOS.pas
  37. 9 0
      packages/extra/univint/MacTypes.pas
  38. 12 12
      packages/extra/univint/MacWindows.pas
  39. 1 1
      packages/extra/univint/Makefile
  40. 8 2
      packages/extra/univint/Makefile.fpc
  41. 10 10
      packages/extra/univint/Menus.pas
  42. 4 4
      packages/extra/univint/Movies.pas
  43. 1 1
      packages/extra/univint/NSLCore.pas
  44. 17 16
      packages/extra/univint/NameRegistry.pas
  45. 9 9
      packages/extra/univint/PMApplication.pas
  46. 36 4
      packages/extra/univint/Pasteboard.pas
  47. 2 2
      packages/extra/univint/Power.pas
  48. 2 2
      packages/extra/univint/QTML.pas
  49. 20 20
      packages/extra/univint/QuickTimeMusic.pas
  50. 6 6
      packages/extra/univint/Quickdraw.pas
  51. 1 1
      packages/extra/univint/TSMTE.pas
  52. 2 2
      packages/extra/univint/TextEncodingConverter.pas
  53. 2 2
      packages/extra/univint/TextEncodingPlugin.pas
  54. 7 7
      packages/extra/univint/Threads.pas
  55. 2 2
      packages/extra/univint/Timer.pas
  56. 37 2
      packages/extra/univint/ToolUtils.pas
  57. 575 0
      packages/extra/univint/TranslationServices.pas
  58. 6 6
      packages/extra/univint/UTCUtils.pas
  59. 1375 0
      packages/extra/univint/UTCoreTypes.pas
  60. 4 4
      packages/extra/univint/UnicodeUtilities.pas
  61. 205 0
      packages/extra/univint/UniversalAccess.pas
  62. 151 0
      packages/extra/univint/xattr.pas

+ 18 - 1
.gitattributes

@@ -3711,16 +3711,22 @@ packages/extra/univint/ATSUnicodeGlyphs.pas svneol=native#text/plain
 packages/extra/univint/ATSUnicodeObjects.pas svneol=native#text/plain
 packages/extra/univint/ATSUnicodeTypes.pas svneol=native#text/plain
 packages/extra/univint/AVLTree.pas svneol=native#text/plain
-packages/extra/univint/AXConstants.pas svneol=native#text/plain
+packages/extra/univint/AXActionConstants.pas svneol=native#text/plain
+packages/extra/univint/AXAttributeConstants.pas svneol=native#text/plain
 packages/extra/univint/AXErrors.pas svneol=native#text/plain
+packages/extra/univint/AXNotificationConstants.pas svneol=native#text/plain
+packages/extra/univint/AXRoleConstants.pas svneol=native#text/plain
+packages/extra/univint/AXTextAttributedString.pas svneol=native#text/plain
 packages/extra/univint/AXUIElement.pas svneol=native#text/plain
 packages/extra/univint/AXValue.pas svneol=native#text/plain
+packages/extra/univint/AXValueConstants.pas svneol=native#text/plain
 packages/extra/univint/Aliases.pas svneol=native#text/plain
 packages/extra/univint/Appearance.pas svneol=native#text/plain
 packages/extra/univint/AppleDiskPartitions.pas svneol=native#text/plain
 packages/extra/univint/AppleEvents.pas svneol=native#text/plain
 packages/extra/univint/AppleHelp.pas svneol=native#text/plain
 packages/extra/univint/AppleScript.pas svneol=native#text/plain
+packages/extra/univint/AudioHardware.pas svneol=native#text/plain
 packages/extra/univint/AuthSession.pas svneol=native#text/plain
 packages/extra/univint/Authorization.pas svneol=native#text/plain
 packages/extra/univint/AuthorizationDB.pas svneol=native#text/plain
@@ -3790,6 +3796,9 @@ packages/extra/univint/CGFunction.pas svneol=native#text/plain
 packages/extra/univint/CGGLContext.pas svneol=native#text/plain
 packages/extra/univint/CGGeometry.pas svneol=native#text/plain
 packages/extra/univint/CGImage.pas svneol=native#text/plain
+packages/extra/univint/CGImageDestination.pas svneol=native#text/plain
+packages/extra/univint/CGImageProperties.pas svneol=native#text/plain
+packages/extra/univint/CGImageSource.pas svneol=native#text/plain
 packages/extra/univint/CGLayer.pas svneol=native#text/plain
 packages/extra/univint/CGPDFArray.pas svneol=native#text/plain
 packages/extra/univint/CGPDFContentStream.pas svneol=native#text/plain
@@ -3826,6 +3835,7 @@ packages/extra/univint/Components.pas svneol=native#text/plain
 packages/extra/univint/ConditionalMacros.pas svneol=native#text/plain
 packages/extra/univint/ControlDefinitions.pas svneol=native#text/plain
 packages/extra/univint/Controls.pas svneol=native#text/plain
+packages/extra/univint/CoreAudioTypes.pas svneol=native#text/plain
 packages/extra/univint/CoreFoundation.pas svneol=native#text/plain
 packages/extra/univint/CoreGraphics.pas svneol=native#text/plain
 packages/extra/univint/DHCPClientPreferences.pas svneol=native#text/plain
@@ -3850,6 +3860,7 @@ packages/extra/univint/Finder.pas svneol=native#text/plain
 packages/extra/univint/FinderRegistry.pas svneol=native#text/plain
 packages/extra/univint/FixMath.pas svneol=native#text/plain
 packages/extra/univint/Folders.pas svneol=native#text/plain
+packages/extra/univint/FontPanel.pas svneol=native#text/plain
 packages/extra/univint/FontSync.pas svneol=native#text/plain
 packages/extra/univint/Fonts.pas svneol=native#text/plain
 packages/extra/univint/GPCStrings.pas svneol=native#text/plain
@@ -3858,6 +3869,7 @@ packages/extra/univint/GestaltEqu.pas svneol=native#text/plain
 packages/extra/univint/HFSVolumes.pas svneol=native#text/plain
 packages/extra/univint/HIArchive.pas svneol=native#text/plain
 packages/extra/univint/HIGeometry.pas svneol=native#text/plain
+packages/extra/univint/HIMovieView.pas svneol=native#text/plain
 packages/extra/univint/HIObject.pas svneol=native#text/plain
 packages/extra/univint/HIObjectCore.pas svneol=native#text/plain
 packages/extra/univint/HIShape.pas svneol=native#text/plain
@@ -3867,6 +3879,7 @@ packages/extra/univint/HIToolbar.pas svneol=native#text/plain
 packages/extra/univint/HIToolbox.pas svneol=native#text/plain
 packages/extra/univint/HIView.pas svneol=native#text/plain
 packages/extra/univint/HTMLRendering.pas svneol=native#text/plain
+packages/extra/univint/HostTime.pas svneol=native#text/plain
 packages/extra/univint/IBCarbonRuntime.pas svneol=native#text/plain
 packages/extra/univint/ICAApplication.pas svneol=native#text/plain
 packages/extra/univint/ICACamera.pas svneol=native#text/plain
@@ -3974,19 +3987,23 @@ packages/extra/univint/Timer.pas svneol=native#text/plain
 packages/extra/univint/ToolUtils.pas svneol=native#text/plain
 packages/extra/univint/Translation.pas svneol=native#text/plain
 packages/extra/univint/TranslationExtensions.pas svneol=native#text/plain
+packages/extra/univint/TranslationServices.pas svneol=native#text/plain
 packages/extra/univint/TypeSelect.pas svneol=native#text/plain
 packages/extra/univint/URLAccess.pas svneol=native#text/plain
 packages/extra/univint/USB.pas svneol=native#text/plain
 packages/extra/univint/UTCUtils.pas svneol=native#text/plain
+packages/extra/univint/UTCoreTypes.pas svneol=native#text/plain
 packages/extra/univint/UTType.pas svneol=native#text/plain
 packages/extra/univint/UnicodeConverter.pas svneol=native#text/plain
 packages/extra/univint/UnicodeUtilities.pas svneol=native#text/plain
+packages/extra/univint/UniversalAccess.pas svneol=native#text/plain
 packages/extra/univint/Video.pas svneol=native#text/plain
 packages/extra/univint/WorldScript.pas svneol=native#text/plain
 packages/extra/univint/fenv.pas svneol=native#text/plain
 packages/extra/univint/fp.pas svneol=native#text/plain
 packages/extra/univint/vBLAS.pas svneol=native#text/plain
 packages/extra/univint/vDSP.pas svneol=native#text/plain
+packages/extra/univint/xattr.pas svneol=native#text/plain
 packages/extra/unixutil/Makefile svneol=native#text/plain
 packages/extra/unixutil/Makefile.fpc svneol=native#text/plain
 packages/extra/unixutil/fpmake.inc svneol=native#text/plain

+ 311 - 1
packages/extra/univint/AEDataModel.pas

@@ -113,7 +113,12 @@ uses MacTypes,MixedMode;
 
 const
 	typeBoolean					= $626F6F6C (* 'bool' *);
-	typeChar					= $54455854 (* 'TEXT' *);
+	typeChar					= $54455854 (* 'TEXT' *); { Deprecated, use typeUTF8Text instead. }
+
+{ The preferred unicode text types.  In both cases, there is no explicit null termination or length byte. }
+
+	typeUTF16ExternalRepresentation = $75743136 (* 'ut16' *); { big-endian 16 bit unicode with optional byte-order-mark, or little-endian 16 bit unicode with required byte-order-mark. }
+	typeUTF8Text                = $75746638 (* 'utf8' *); { 8 bit unicode }
 
 	{	 Preferred numeric Apple event descriptor types 	}
 	typeSInt16					= $73686F72 (* 'shor' *);
@@ -171,6 +176,13 @@ const
 
 {$endc}  {CALL_NOT_IN_CARBON}
 
+	{ New addressing modes for MacOS X }
+	typeKernelProcessID         = $6B706964 (* 'kpid' *);
+	typeMachPort                = $706F7274 (* 'port' *);
+
+	{ Targeting applications by bundle ID is only available in Mac OS X 10.3 or later. }
+	typeApplicationBundleID     = $62756E64 (* 'bund' *);
+
 	{	 Keywords for Apple event attributes 	}
 	keyTransactionIDAttr		= $7472616E (* 'tran' *);
 	keyReturnIDAttr				= $72746964 (* 'rtid' *);
@@ -184,6 +196,99 @@ const
 	keyMissedKeywordAttr		= $6D697373 (* 'miss' *);						{  this attribute is read only  }
 	keyOriginalAddressAttr		= $66726F6D (* 'from' *);						{  new in 1.0.1  }
 	keyAcceptTimeoutAttr		= $6163746D (* 'actm' *);						{  new for Mac OS X  }
+	keyReplyRequestedAttr       = $72657071 (* 'repq' *);                       { Was a reply requested for this event - returned as typeBoolean }
+
+	{ These bits are specified in the keyXMLDebuggingAttr (an SInt32) }
+	kAEDebugPOSTHeader          = 1 shl 0; { headers of the HTTP post we sent - typeChar }
+	kAEDebugReplyHeader         = 1 shl 1; { headers returned by the server }
+	kAEDebugXMLRequest          = 1 shl 2; { the XML request we sent }
+	kAEDebugXMLResponse         = 1 shl 3; { the XML reply from the server }
+	kAEDebugXMLDebugAll         = $FFFFFFFF; { everything! }
+
+	{ These values can be added as a parameter to the direct object of a
+    SOAP message to specify the serialization schema.  If not
+    specified, kSOAP1999Schema is the default. These should be added as
+    typeType. }
+	kSOAP1999Schema             = $73733939 (* 'ss99' *);
+	kSOAP2001Schema             = $73733031 (* 'ss01' *);
+
+	{ outgoing event attributes }
+	keyUserNameAttr             = $756E616D (* 'unam' *);
+	keyUserPasswordAttr         = $70617373 (* 'pass' *); { not sent with the event }
+	keyDisableAuthenticationAttr = $61757468 (* 'auth' *); { When present and with a non zero value (that is, false, or integer 0), }
+                                                           { AESend will not authenticate the user.  If not present, or with a non-zero}
+                                                           { value, AESend will prompt for authentication information from the user if the interaction level allows. }
+	keyXMLDebuggingAttr         = $78646267 (* 'xdbg' *); { a bitfield of specifying which XML debugging data is to be returned with the event }
+                                                          { Event class / id }
+	kAERPCClass                 = $72706320 (* 'rpc ' *); { for outgoing XML events }
+	kAEXMLRPCScheme             = $52504332 (* 'RPC2' *); { event ID: event should be sent to an XMLRPC endpoint }
+	kAESOAPScheme               = $534F4150 (* 'SOAP' *); { event ID: event should be sent to a SOAP endpoint }
+	kAESharedScriptHandler      = $77736370 (* 'wscp' *); { event ID: handler for incoming XML requests }
+                                                          { these parameters exist as part of the direct object of the event for both incoming and outgoing requests }
+	keyRPCMethodName            = $6D657468 (* 'meth' *); { name of the method to call }
+	keyRPCMethodParam           = $7061726D (* 'parm' *); { the list (or structure) of parameters }
+	keyRPCMethodParamOrder      = $2F6F7264 (* '/ord' *); { if a structure, the order of parameters (a list) }
+                                                          { when keyXMLDebugginAttr so specifies, these additional parameters will be part of the reply. }
+	keyAEPOSTHeaderData         = $70686564 (* 'phed' *); { what we sent to the server }
+	keyAEReplyHeaderData        = $72686564 (* 'rhed' *); { what the server sent to us }
+	keyAEXMLRequestData         = $78726571 (* 'xreq' *); { what we sent to the server }
+	keyAEXMLReplyData           = $78726570 (* 'xrep' *); { what the server sent to us }
+                                                          { additional parameters that can be specified in the direct object of the event }
+	keyAdditionalHTTPHeaders    = $61686564 (* 'ahed' *); { list of additional HTTP headers (a list of 2 element lists) }
+	keySOAPAction               = $73616374 (* 'sact' *); { the SOAPAction header (required for SOAP messages) }
+	keySOAPMethodNameSpace      = $6D737063 (* 'mspc' *); { Optional namespace (defaults to m:) }
+	keySOAPMethodNameSpaceURI   = $6D737075 (* 'mspu' *); { Required namespace URI }
+	keySOAPSchemaVersion        = $73736368 (* 'ssch' *); { Optional XML Schema version, defaults to kSOAP1999Schama }
+
+{ 
+   When serializing AERecords as SOAP structures, it is possible
+   to specify the namespace and type of the structure.  To do this,
+   add a keySOAPStructureMetaData record to the top level of the
+   record to be serialized.  If present, this will be used to specify
+   the structure namespace.  This will produce a structure elment that
+   looks like:
+
+    <myStruct
+        xmlns:myNamespace="http://myUri.org/xsd",
+        xsi:type="myNamespace:MyStructType">
+        ...
+    </myStruct>
+
+}
+	keySOAPStructureMetaData    = $2F736D64 (* '/smd' *);
+	keySOAPSMDNamespace         = $73736E73 (* 'ssns' *); { "myNamespace"}
+	keySOAPSMDNamespaceURI      = $73736E75 (* 'ssnu' *); { "http://myUri.org/xsd"}
+	keySOAPSMDType              = $73737470 (* 'sstp' *); { "MyStructType"}
+
+{ 
+ * Web Services Proxy support.  Available only on Mac OS X 10.2 or later.
+ * These constants should be added as attributes on the event that is
+ * being sent (not part of the direct object.)
+ }
+   { Automatically configure the proxy based on System Configuration }
+	kAEUseHTTPProxyAttr         = $78757072 (* 'xupr' *); { a typeBoolean.  Defaults to true.}
+                                                          { manually specify the proxy host and port. }
+	kAEHTTPProxyPortAttr        = $78687470 (* 'xhtp' *); { a typeSInt32}
+	kAEHTTPProxyHostAttr        = $78687468 (* 'xhth' *); { a typeChar}
+
+{
+ * Web Services SOCKS support.  kAEUseSocksAttr is a boolean that
+ * specifies whether to automatically configure SOCKS proxies by
+ * querying System Configuration.
+ }
+	kAESocks4Protocol           = 4;
+	kAESocks5Protocol           = 5;
+
+	kAEUseSocksAttr             = $78736373 (* 'xscs' *); { a typeBoolean.  Defaults to true.}
+                                                          { This attribute specifies a specific SOCKS protocol to be used }
+	kAESocksProxyAttr           = $78736F6B (* 'xsok' *); { a typeSInt32}
+                                                     { if version >= 4 }
+	kAESocksHostAttr            = $78736873 (* 'xshs' *); { a typeChar}
+	kAESocksPortAttr            = $78736870 (* 'xshp' *); { a typeSInt32}
+	kAESocksUserAttr            = $78736875 (* 'xshu' *); { a typeChar}
+                                                     { if version >= 5 }
+	kAESocksPasswordAttr        = $78736877 (* 'xshw' *); { a typeChar}
+
 
 
 	{	  Constants used for specifying the factoring of AEDescLists. 	}
@@ -401,6 +506,9 @@ type
 	{
 	 *  AEInstallCoercionHandler()
 	 *  
+	 *  Mac OS X threading:
+	 *    Thread safe since version 10.2
+	 *  
 	 *  Availability:
 	 *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
 	 *    CarbonLib:        in CarbonLib 1.0 and later
@@ -410,6 +518,9 @@ function AEInstallCoercionHandler(fromType: DescType; toType: DescType; handler:
 {
  *  AERemoveCoercionHandler()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -419,6 +530,9 @@ function AERemoveCoercionHandler(fromType: DescType; toType: DescType; handler:
 {
  *  AEGetCoercionHandler()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -431,6 +545,9 @@ function AEGetCoercionHandler(fromType: DescType; toType: DescType; var handler:
 {
  *  AECoercePtr()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -440,6 +557,9 @@ function AECoercePtr(typeCode: DescType; dataPtr: UnivPtr; dataSize: Size; toTyp
 {
  *  AECoerceDesc()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -456,6 +576,9 @@ function AECoerceDesc(const (*var*) theAEDesc: AEDesc; toType: DescType; var res
 {
  *  AEInitializeDesc()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   not available
  *    CarbonLib:        in CarbonLib 1.4 and later
@@ -467,6 +590,9 @@ procedure AEInitializeDesc(var desc: AEDesc); external name '_AEInitializeDesc';
 {
  *  AECreateDesc()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -476,6 +602,9 @@ function AECreateDesc(typeCode: DescType; dataPtr: UnivPtr; dataSize: Size; var
 {
  *  AEDisposeDesc()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -485,12 +614,49 @@ function AEDisposeDesc(var theAEDesc: AEDesc): OSErr; external name '_AEDisposeD
 {
  *  AEDuplicateDesc()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Mac OS X:         in version 10.0 and later
  }
 function AEDuplicateDesc(const (*var*) theAEDesc: AEDesc; var result: AEDesc): OSErr; external name '_AEDuplicateDesc';
+
+{
+ * Create an AEDesc with memory "borrowed" from the application. The
+ * data passed in *must* be immutable and not freed until the Dispose
+ * callback is made.
+ * The dispose callback may be made at any time, including during the
+ * creation of the descriptor.
+ * If possible, the descriptor will be copied to the address space of
+ * any recipient process using virtual memory APIs and avoid an
+ * actual memory copy.
+ }
+type
+	AEDisposeExternalProcPtr = procedure( dataPtr: {const} UnivPtr; dataLength: Size; refcon: SInt32 );
+
+{$ifc OPAQUE_UPP_TYPES}
+	AEDisposeExternalUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+	AEDisposeExternalUPP = UniversalProcPtr;
+{$endc}	
+
+{
+ *  AECreateDescFromExternalPtr()
+ *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.2 and later in ApplicationServices.framework
+ *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ *    Non-Carbon CFM:   not available
+ }
+function AECreateDescFromExternalPtr( descriptorType: OSType; dataPtr: {const} UnivPtr; dataLength: Size; disposeCallback: AEDisposeExternalUPP; disposeRefcon: SInt32; var theDesc: AEDesc ): OSStatus; external name '_AECreateDescFromExternalPtr';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
 {*************************************************************************
   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.
@@ -501,6 +667,9 @@ function AEDuplicateDesc(const (*var*) theAEDesc: AEDesc; var result: AEDesc): O
 {
  *  AECreateList()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -510,6 +679,9 @@ function AECreateList(factoringPtr: UnivPtr; factoredSize: Size; isRecord: boole
 {
  *  AECountItems()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -519,6 +691,9 @@ function AECountItems(const (*var*) theAEDescList: AEDescList; var theCount: SIn
 {
  *  AEPutPtr()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -528,6 +703,9 @@ function AEPutPtr(var theAEDescList: AEDescList; index: SInt32; typeCode: DescTy
 {
  *  AEPutDesc()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -537,6 +715,9 @@ function AEPutDesc(var theAEDescList: AEDescList; index: SInt32; const (*var*) t
 {
  *  AEGetNthPtr()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -546,6 +727,9 @@ function AEGetNthPtr(const (*var*) theAEDescList: AEDescList; index: SInt32; des
 {
  *  AEGetNthDesc()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -555,6 +739,9 @@ function AEGetNthDesc(const (*var*) theAEDescList: AEDescList; index: SInt32; de
 {
  *  AESizeOfNthItem()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -564,6 +751,9 @@ function AESizeOfNthItem(const (*var*) theAEDescList: AEDescList; index: SInt32;
 {
  *  AEGetArray()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -573,6 +763,9 @@ function AEGetArray(const (*var*) theAEDescList: AEDescList; arrayType: AEArrayT
 {
  *  AEPutArray()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -582,6 +775,9 @@ function AEPutArray(var theAEDescList: AEDescList; arrayType: AEArrayType; const
 {
  *  AEDeleteItem()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -601,6 +797,9 @@ function AEDeleteItem(var theAEDescList: AEDescList; index: SInt32): OSErr; exte
 {
  *  AECheckIsRecord()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   not available
  *    CarbonLib:        in CarbonLib 1.4 and later
@@ -676,6 +875,9 @@ function AEDeleteKeyDesc(var theAERecord: AERecord; theAEKeyword: AEKeyword): OS
 {
  *  AECreateAppleEvent()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -692,6 +894,9 @@ function AECreateAppleEvent(theAEEventClass: AEEventClass; theAEEventID: AEEvent
 {
  *  AEPutParamPtr()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -701,6 +906,9 @@ function AEPutParamPtr(var theAppleEvent: AppleEvent; theAEKeyword: AEKeyword; t
 {
  *  AEPutParamDesc()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -710,6 +918,9 @@ function AEPutParamDesc(var theAppleEvent: AppleEvent; theAEKeyword: AEKeyword;
 {
  *  AEGetParamPtr()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -719,6 +930,9 @@ function AEGetParamPtr(const (*var*) theAppleEvent: AppleEvent; theAEKeyword: AE
 {
  *  AEGetParamDesc()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -728,6 +942,9 @@ function AEGetParamDesc(const (*var*) theAppleEvent: AppleEvent; theAEKeyword: A
 {
  *  AESizeOfParam()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -737,6 +954,9 @@ function AESizeOfParam(const (*var*) theAppleEvent: AppleEvent; theAEKeyword: AE
 {
  *  AEDeleteParam()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -752,6 +972,9 @@ function AEDeleteParam(var theAppleEvent: AppleEvent; theAEKeyword: AEKeyword):
 {
  *  AEGetAttributePtr()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -761,6 +984,9 @@ function AEGetAttributePtr(const (*var*) theAppleEvent: AppleEvent; theAEKeyword
 {
  *  AEGetAttributeDesc()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -770,6 +996,9 @@ function AEGetAttributeDesc(const (*var*) theAppleEvent: AppleEvent; theAEKeywor
 {
  *  AESizeOfAttribute()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -779,6 +1008,9 @@ function AESizeOfAttribute(const (*var*) theAppleEvent: AppleEvent; theAEKeyword
 {
  *  AEPutAttributePtr()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -788,6 +1020,9 @@ function AEPutAttributePtr(var theAppleEvent: AppleEvent; theAEKeyword: AEKeywor
 {
  *  AEPutAttributeDesc()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -815,6 +1050,9 @@ function AEPutAttributeDesc(var theAppleEvent: AppleEvent; theAEKeyword: AEKeywo
 {
  *  AESizeOfFlattenedDesc()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   not available
  *    CarbonLib:        in CarbonLib 1.4 and later
@@ -837,6 +1075,9 @@ function AESizeOfFlattenedDesc(const (*var*) theAEDesc: AEDesc): Size; external
 {
  *  AEFlattenDesc()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   not available
  *    CarbonLib:        in CarbonLib 1.4 and later
@@ -855,6 +1096,9 @@ function AEFlattenDesc(const (*var*) theAEDesc: AEDesc; buffer: Ptr; bufferSize:
 {
  *  AEUnflattenDesc()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   not available
  *    CarbonLib:        in CarbonLib 1.4 and later
@@ -875,6 +1119,9 @@ function AEUnflattenDesc(buffer: Ptr; var result: AEDesc): OSStatus; external na
 {
  *  AEGetDescData()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -885,6 +1132,9 @@ function AEGetDescData(const (*var*) theAEDesc: AEDesc; dataPtr: UnivPtr; maximu
 {
  *  AEGetDescDataSize()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -895,6 +1145,9 @@ function AEGetDescDataSize(const (*var*) theAEDesc: AEDesc): Size; external name
 {
  *  AEReplaceDescData()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -904,6 +1157,27 @@ function AEReplaceDescData(typeCode: DescType; dataPtr: UnivPtr; dataSize: Size;
 
 {$endc}  {ACCESSOR_CALLS_ARE_FUNCTIONS}
 
+{
+ * Retrieve a range of bytes from an AEDesc.  This obviates the need
+ * to retrieve the entire data from the event using AEGetDescData.
+ * This is only valid for data type AEDescs.  If the requested length
+ * and offset are such that they do not fit entirely with the data of the
+ * desc, errAEBufferTooSmall is returned.
+ }
+{
+ *  AEGetDescDataRange()
+ *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.2 and later in ApplicationServices.framework
+ *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ *    Non-Carbon CFM:   not available
+ }
+function AEGetDescDataRange( const (*var*) dataDesc: AEDesc; buffer: UnivPtr; offset: Size; length: Size ): OSStatus; external name '_AEGetDescDataRange';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
 
 {*************************************************************************
   A AEEventHandler is installed to process an AppleEvent 
@@ -924,6 +1198,18 @@ type
 
 const
 	uppAEEventHandlerProcInfo = $00000FE0;
+
+{
+ *  NewAEDisposeExternalUPP()
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.2 and later in ApplicationServices.framework
+ *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ *    Non-Carbon CFM:   available as macro/inline
+ }
+function NewAEDisposeExternalUPP( userRoutine: AEDisposeExternalProcPtr ): AEDisposeExternalUPP; external name '_NewAEDisposeExternalUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
 	{
 	 *  NewAEEventHandlerUPP()
 	 *  
@@ -933,6 +1219,18 @@ const
 	 *    Mac OS X:         in version 10.0 and later
 	 	}
 function NewAEEventHandlerUPP(userRoutine: AEEventHandlerProcPtr): AEEventHandlerUPP; external name '_NewAEEventHandlerUPP'; { old name was NewAEEventHandlerProc }
+
+{
+ *  DisposeAEDisposeExternalUPP()
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.2 and later in ApplicationServices.framework
+ *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ *    Non-Carbon CFM:   available as macro/inline
+ }
+procedure DisposeAEDisposeExternalUPP( userUPP: AEDisposeExternalUPP ); external name '_DisposeAEDisposeExternalUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
 {
  *  DisposeAEEventHandlerUPP()
  *  
@@ -942,6 +1240,18 @@ function NewAEEventHandlerUPP(userRoutine: AEEventHandlerProcPtr): AEEventHandle
  *    Mac OS X:         in version 10.0 and later
  }
 procedure DisposeAEEventHandlerUPP(userUPP: AEEventHandlerUPP); external name '_DisposeAEEventHandlerUPP';
+
+{
+ *  InvokeAEDisposeExternalUPP()
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.2 and later in ApplicationServices.framework
+ *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ *    Non-Carbon CFM:   available as macro/inline
+ }
+procedure InvokeAEDisposeExternalUPP( dataPtr: {const} UnivPtr; dataLength: Size; refcon: SInt32; userUPP: AEDisposeExternalUPP ); external name '_InvokeAEDisposeExternalUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
 {
  *  InvokeAEEventHandlerUPP()
  *  

+ 45 - 13
packages/extra/univint/AERegistry.pas

@@ -320,6 +320,12 @@ const
 	kAEYes						= $79657320 (* 'yes ' *);						{   0x79657320   }
 	kAEZoom						= $7A6F6F6D (* 'zoom' *);						{   0x7a6f6f6d   }
 
+    { events that can be sent to the "system" process (eg, loginwindow) on OS X 10.2 or later }
+	kAELogOut                   = $6C6F676F (* 'logo' *);
+	kAEReallyLogOut             = $726C676F (* 'rlgo' *);
+	kAEShowRestartDialog        = $72727374 (* 'rrst' *);
+	kAEShowShutdownDialog       = $7273646E (* 'rsdn' *);
+
 	{	 EventRecord Classes and EventIDs 	}
 	kAEMouseClass				= $6D6F7573 (* 'mous' *);
 	kAEDown						= $646F776E (* 'down' *);
@@ -562,6 +568,7 @@ const
 	typeIntlText				= $69747874 (* 'itxt' *);						{   0x69747874   }
 	typeIntlWritingCode			= $696E746C (* 'intl' *);						{   0x696e746c   }
 	typeLongDateTime			= $6C647420 (* 'ldt ' *);						{   0x6c647420   }
+	typeISO8601DateTime         = $69736F74 (* 'isot' *);                       {   0x69736f74  data is ascii text of an ISO8601 date }
 	typeLongFixed				= $6C667864 (* 'lfxd' *);						{   0x6c667864   }
 	typeLongFixedPoint			= $6C667074 (* 'lfpt' *);						{   0x6c667074   }
 	typeLongFixedRectangle		= $6C667263 (* 'lfrc' *);						{   0x6c667263   }
@@ -594,6 +601,8 @@ const
 	typeTextStyles				= $74737479 (* 'tsty' *);						{   0x74737479   }
 
 	typeTIFF					= $54494646 (* 'TIFF' *);						{   0x54494646   }
+	typeJPEG                    = $4A504547 (* 'JPEG' *);
+	typeGIF                     = $47494666 (* 'GIFf' *);
 	typeVersion					= $76657273 (* 'vers' *);						{   0x76657273   }
 
 	kAEMenuClass				= $6D656E75 (* 'menu' *);
@@ -713,14 +722,30 @@ type
 	{	 Hilite styles 	}
 
 const
-	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  }
+	kTSMHiliteCaretPosition     = 1;    { specify caret position }
+	kTSMHiliteRawText           = 2;    { specify range of raw text }
+	kTSMHiliteSelectedRawText   = 3;    { specify range of selected raw text }
+	kTSMHiliteConvertedText     = 4;    { specify range of converted text }
+	kTSMHiliteSelectedConvertedText = 5;  { specify range of selected converted text }
+	kTSMHiliteBlockFillText     = 6;    { Block Fill hilite style }
+	kTSMHiliteOutlineText       = 7;    { Outline hilite style }
+	kTSMHiliteSelectedText      = 8;    { Selected hilite style }
+	kTSMHiliteNoHilite          = 9;     { specify range of non-hilited text }
+
+{$ifc OLDROUTINENAMES}
+{ Hilite styles }
+const
+	kCaretPosition             = kTSMHiliteCaretPosition;
+	kRawText                   = kTSMHiliteRawText;
+	kSelectedRawText           = kTSMHiliteSelectedRawText;
+	kConvertedText             = kTSMHiliteConvertedText;
+	kSelectedConvertedText     = kTSMHiliteSelectedConvertedText;
+	kBlockFillText             = kTSMHiliteBlockFillText;
+	kOutlineText               = kTSMHiliteOutlineText;
+	kSelectedText              = kTSMHiliteSelectedText;
+
+{$endc}  {OLDROUTINENAMES}
+
 
 	keyAEHiliteRange			= $68726E67 (* 'hrng' *);						{  typeTextRangeArray for System 7, typeHiliteRangeArray for System 8  }
 	keyAEPinRange				= $706E7267 (* 'pnrg' *);						{  typeTextRange for System 7, typeTextRegionRange for System 8    }
@@ -738,11 +763,16 @@ const
 {$endc}  {OLDROUTINENAMES}
 
 																{  AppleScript 1.3: New Text types  }
-	typeUnicodeText				= $75747874 (* 'utxt' *);
-	typeStyledUnicodeText		= $73757478 (* 'sutx' *);
-	typeEncodedString			= $656E6373 (* 'encs' *);
-	typeCString					= $63737472 (* 'cstr' *);
-	typePString					= $70737472 (* 'pstr' *);
+{
+ * The following descriptor types are deprecated due to their lack of
+ * explicit encoding or byte order definition.  Please use
+ * typeUTF16ExternalRepresentation or typeUTF8Text instead. }
+
+	typeUnicodeText				= $75747874 (* 'utxt' *); { native byte ordering, optional BOM 
+	typeStyledUnicodeText		= $73757478 (* 'sutx' *); { Not implemented }
+	typeEncodedString			= $656E6373 (* 'encs' *); { Not implemented }
+	typeCString					= $63737472 (* 'cstr' *); { MacRoman characters followed by a NULL byte }
+	typePString					= $70737472 (* 'pstr' *); { Unsigned length byte followed by MacRoman characters }
 
 																{  AppleScript 1.3: Unit types  }
 	typeMeters					= $6D657472 (* 'metr' *);						{  Base Unit  }
@@ -999,6 +1029,8 @@ const
 	eF14Key						= $6B736B00;
 	eF15Key						= $6B737100;
 
+	keyAEQuitWithoutUI          = $6E6F7569 (* 'noui' *); { If present in a kAEQuitApplication event, autosave any documents with uncommitted changes and quit }
+
 {$ALIGN MAC68K}
 
 

+ 141 - 0
packages/extra/univint/AXActionConstants.pas

@@ -0,0 +1,141 @@
+{
+ *  AXActionConstants.h
+ *  HIServices
+ *
+ *  Created by John Louch on Wed Feb 25 2004.
+ *  Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
+ *
+ }
+
+{	 Pascal Translation:  Gale R Paeper, <[email protected]>, 2006 }
+
+{
+    Modified for use with Free Pascal
+    Version 200
+    Please report any bugs to <[email protected]>
+}
+
+{$mode macpas}
+{$packenum 1}
+{$macro on}
+{$inline on}
+{$CALLING MWPASCAL}
+
+unit AXActionConstants;
+interface
+{$setc UNIVERSAL_INTERFACES_VERSION := $0342}
+{$setc GAP_INTERFACES_VERSION := $0200}
+
+{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
+    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
+{$endc}
+
+{$ifc defined CPUPOWERPC and defined CPUI386}
+	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
+{$endc}
+{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
+	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
+{$endc}
+
+{$ifc not defined __ppc__ and defined CPUPOWERPC}
+	{$setc __ppc__ := 1}
+{$elsec}
+	{$setc __ppc__ := 0}
+{$endc}
+{$ifc not defined __i386__ and defined CPUI386}
+	{$setc __i386__ := 1}
+{$elsec}
+	{$setc __i386__ := 0}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
+	{$error Conflicting definitions for __ppc__ and __i386__}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__}
+	{$setc TARGET_CPU_PPC := TRUE}
+	{$setc TARGET_CPU_X86 := FALSE}
+{$elifc defined __i386__ and __i386__}
+	{$setc TARGET_CPU_PPC := FALSE}
+	{$setc TARGET_CPU_X86 := TRUE}
+{$elsec}
+	{$error Neither __ppc__ nor __i386__ is defined.}
+{$endc}
+{$setc TARGET_CPU_PPC_64 := FALSE}
+
+{$ifc defined FPC_BIG_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
+{$elifc defined FPC_LITTLE_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
+{$elsec}
+	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
+{$endc}
+{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
+{$setc CALL_NOT_IN_CARBON := FALSE}
+{$setc OLDROUTINENAMES := FALSE}
+{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
+{$setc OPAQUE_UPP_TYPES := TRUE}
+{$setc OTCARBONAPPLICATION := TRUE}
+{$setc OTKERNEL := FALSE}
+{$setc PM_USE_SESSION_APIS := TRUE}
+{$setc TARGET_API_MAC_CARBON := TRUE}
+{$setc TARGET_API_MAC_OS8 := FALSE}
+{$setc TARGET_API_MAC_OSX := TRUE}
+{$setc TARGET_CARBON := TRUE}
+{$setc TARGET_CPU_68K := FALSE}
+{$setc TARGET_CPU_MIPS := FALSE}
+{$setc TARGET_CPU_SPARC := FALSE}
+{$setc TARGET_OS_MAC := TRUE}
+{$setc TARGET_OS_UNIX := FALSE}
+{$setc TARGET_OS_WIN32 := FALSE}
+{$setc TARGET_RT_MAC_68881 := FALSE}
+{$setc TARGET_RT_MAC_CFM := FALSE}
+{$setc TARGET_RT_MAC_MACHO := TRUE}
+{$setc TYPED_FUNCTION_POINTERS := TRUE}
+{$setc TYPE_BOOL := FALSE}
+{$setc TYPE_EXTENDED := FALSE}
+{$setc TYPE_LONGLONG := TRUE}
+uses MacTypes;
+{$ALIGN POWER}
+
+
+{
+	TBD: Explain general philosophy on whether to expose an action or not.
+	Our initial philopsophy is to not to have an action where there is a menu item
+	or button that does the same thing.
+}
+
+// standard actions
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXPressAction CFSTRP('AXPress')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXIncrementAction CFSTRP('AXIncrement')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDecrementAction CFSTRP('AXDecrement')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXConfirmAction CFSTRP('AXConfirm')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXCancelAction CFSTRP('AXCancel')}
+{$endc}
+
+// new actions
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXRaiseAction CFSTRP('AXRaise')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXShowMenuAction CFSTRP('AXShowMenu')}
+{$endc}
+
+// obsolete actions will be removed soon
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXPickAction CFSTRP('AXPick')}
+{$endc}
+
+
+end.

+ 1460 - 0
packages/extra/univint/AXAttributeConstants.pas

@@ -0,0 +1,1460 @@
+{
+ *  AXAttributeConstants.h
+ *  HIServices
+ *
+ *  Created by John Louch on Wed Feb 25 2004.
+ *  Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
+ *
+ }
+
+{	 Pascal Translation:  Gale R Paeper, <[email protected]>, 2006 }
+
+{
+    Modified for use with Free Pascal
+    Version 200
+    Please report any bugs to <[email protected]>
+}
+
+{$mode macpas}
+{$packenum 1}
+{$macro on}
+{$inline on}
+{$CALLING MWPASCAL}
+
+unit AXAttributeConstants;
+interface
+{$setc UNIVERSAL_INTERFACES_VERSION := $0342}
+{$setc GAP_INTERFACES_VERSION := $0200}
+
+{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
+    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
+{$endc}
+
+{$ifc defined CPUPOWERPC and defined CPUI386}
+	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
+{$endc}
+{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
+	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
+{$endc}
+
+{$ifc not defined __ppc__ and defined CPUPOWERPC}
+	{$setc __ppc__ := 1}
+{$elsec}
+	{$setc __ppc__ := 0}
+{$endc}
+{$ifc not defined __i386__ and defined CPUI386}
+	{$setc __i386__ := 1}
+{$elsec}
+	{$setc __i386__ := 0}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
+	{$error Conflicting definitions for __ppc__ and __i386__}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__}
+	{$setc TARGET_CPU_PPC := TRUE}
+	{$setc TARGET_CPU_X86 := FALSE}
+{$elifc defined __i386__ and __i386__}
+	{$setc TARGET_CPU_PPC := FALSE}
+	{$setc TARGET_CPU_X86 := TRUE}
+{$elsec}
+	{$error Neither __ppc__ nor __i386__ is defined.}
+{$endc}
+{$setc TARGET_CPU_PPC_64 := FALSE}
+
+{$ifc defined FPC_BIG_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
+{$elifc defined FPC_LITTLE_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
+{$elsec}
+	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
+{$endc}
+{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
+{$setc CALL_NOT_IN_CARBON := FALSE}
+{$setc OLDROUTINENAMES := FALSE}
+{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
+{$setc OPAQUE_UPP_TYPES := TRUE}
+{$setc OTCARBONAPPLICATION := TRUE}
+{$setc OTKERNEL := FALSE}
+{$setc PM_USE_SESSION_APIS := TRUE}
+{$setc TARGET_API_MAC_CARBON := TRUE}
+{$setc TARGET_API_MAC_OS8 := FALSE}
+{$setc TARGET_API_MAC_OSX := TRUE}
+{$setc TARGET_CARBON := TRUE}
+{$setc TARGET_CPU_68K := FALSE}
+{$setc TARGET_CPU_MIPS := FALSE}
+{$setc TARGET_CPU_SPARC := FALSE}
+{$setc TARGET_OS_MAC := TRUE}
+{$setc TARGET_OS_UNIX := FALSE}
+{$setc TARGET_OS_WIN32 := FALSE}
+{$setc TARGET_RT_MAC_68881 := FALSE}
+{$setc TARGET_RT_MAC_CFM := FALSE}
+{$setc TARGET_RT_MAC_MACHO := TRUE}
+{$setc TYPED_FUNCTION_POINTERS := TRUE}
+{$setc TYPE_BOOL := FALSE}
+{$setc TYPE_EXTENDED := FALSE}
+{$setc TYPE_LONGLONG := TRUE}
+uses MacTypes;
+{$ALIGN POWER}
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Attributes                                                                           }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+	Quick reference:
+	
+	// informational attributes
+	kAXRoleAttribute
+	kAXSubroleAttribute
+	kAXRoleDescriptionAttribute
+	kAXTitleAttribute
+	kAXDescriptionAttribute
+	kAXHelpAttribute
+	
+	// hierarchy or relationship attributes
+	kAXParentAttribute
+	kAXChildrenAttribute
+	kAXSelectedChildrenAttribute
+	kAXVisibleChildrenAttribute
+	kAXWindowAttribute
+	kAXTopLevelUIElementAttribute
+	kAXTitleUIElementAttribute
+	kAXServesAsTitleForUIElementsAttribute
+	kAXLinkedUIElementsAttribute
+	
+	// visual state attributes
+	kAXEnabledAttribute
+	kAXFocusedAttribute
+	kAXPositionAttribute
+	kAXSizeAttribute
+	
+	// value attributes
+	kAXValueAttribute
+	kAXMinValueAttribute
+	kAXMaxValueAttribute
+	kAXValueIncrementAttribute
+	kAXValueWrapsAttribute
+	kAXAllowedValuesAttribute
+	
+	// text-specific attributes
+	kAXSelectedTextAttribute
+	kAXSelectedTextRangeAttribute
+	kAXVisibleCharacterRangeAttribute
+	kAXNumberOfCharactersAttribute
+	kAXSharedTextUIElementsAttribute
+	kAXSharedCharacterRangeAttribute
+	
+	// window, sheet, or drawer-specific attributes
+	kAXMainAttribute
+	kAXMinimizedAttribute
+	kAXCloseButtonAttribute
+	kAXZoomButtonAttribute
+	kAXMinimizeButtonAttribute
+	kAXToolbarButtonAttribute
+	kAXProxyAttribute
+	kAXGrowAreaAttribute
+	kAXModalAttribute
+	kAXDefaultButtonAttribute
+	kAXCancelButtonAttribute
+	
+	// menu or menu item-specific attributes
+	kAXMenuItemCmdCharAttribute
+	kAXMenuItemCmdVirtualKeyAttribute
+	kAXMenuItemCmdGlyphAttribute
+	kAXMenuItemCmdModifiersAttribute
+	kAXMenuItemMarkCharAttribute
+	kAXMenuItemPrimaryUIElementAttribute
+	
+	// application element-specific attributes
+	kAXMenuBarAttribute
+	kAXWindowsAttribute
+	kAXFrontmostAttribute
+	kAXHiddenAttribute
+	kAXMainWindowAttribute
+	kAXFocusedWindowAttribute
+	kAXFocusedUIElementAttribute
+	
+	// date/time-specific attributes
+	kAXHourFieldAttribute
+	kAXMinuteFieldAttribute
+	kAXSecondFieldAttribute
+	kAXAMPMFieldAttribute
+	kAXDayFieldAttribute
+	kAXMonthFieldAttribute
+	kAXYearFieldAttribute
+	
+	// table, outline, or browser-specific attributes
+	kAXRowsAttribute
+	kAXVisibleRowsAttribute
+	kAXSelectedRowsAttribute
+	kAXColumnsAttribute
+	kAXVisibleColumnsAttribute
+	kAXSelectedColumnsAttribute
+	kAXSortDirectionAttribute
+	kAXColumnHeaderUIElementsAttribute
+	kAXIndexAttribute
+	kAXDisclosingAttribute
+	kAXDisclosedRowsAttribute
+	kAXDisclosedByRowAttribute
+	
+	// matte-specific attributes
+	kAXMatteHoleAttribute
+	kAXMatteContentUIElementAttribute
+	
+	// ruler-specific attributes
+	kAXMarkerUIElementsAttribute
+	kAXUnitsAttribute
+	kAXUnitDescriptionAttribute
+	kAXMarkerTypeAttribute
+	kAXMarkerTypeDescriptionAttribute
+	
+	// miscellaneous or role-specific attributes
+	kAXHorizontalScrollBarAttribute
+	kAXVerticalScrollBarAttribute
+	kAXOrientationAttribute
+	kAXHeaderAttribute
+	kAXEditedAttribute
+	kAXTabsAttribute
+	kAXOverflowButtonAttribute
+	kAXFilenameAttribute
+	kAXExpandedAttribute
+	kAXSelectedAttribute
+	kAXSplittersAttribute
+	kAXContentsAttribute
+	kAXNextContentsAttribute
+	kAXPreviousContentsAttribute
+	kAXDocumentAttribute
+	kAXIncrementorAttribute
+	kAXDecrementButtonAttribute
+	kAXIncrementButtonAttribute
+	kAXColumnTitleAttribute
+	kAXURLAttribute
+	kAXLabelUIElementsAttribute
+	kAXLabelValueAttribute
+	kAXShownMenuUIElementAttribute
+	kAXIsApplicationRunningAttribute
+	kAXFocusedApplicationAttribute
+}
+
+
+{
+	kAXRoleAttribute
+	
+	Identifies the basic type of an element.
+	
+	Value: A CFStringRef of one of the role strings defined in this header, or a new
+	role string of your own invention. The string should not be localized, and it does
+	not need to be human-readable. Instead of inventing new role strings, see if a
+	custom element can be identified by an existing role string and a new subrole. See
+	kAXSubroleAttribute.
+	
+	Writable? No.
+	
+	Required for all elements. Even in the worst case scenario where an element cannot
+	figure out what its basic type is, it can still supply the value kAXUnknownRole.
+	
+	Carbon Accessorization Notes: If your HIObjectClass or Carbon Event handler provides
+	the kAXRoleAttribute, it must also provide the kAXRoleDescriptionAttribute.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXRoleAttribute CFSTRP('AXRole')}
+{$endc}
+
+
+{
+	kAXSubroleAttribute
+	
+	More specifically identifies the type of an element beyond the basic type provided
+	by kAXRoleAttribute.
+	
+	Value: A CFStringRef of one of the subrole strings defined in this header, or a new
+	subrole string of your own invention. The string should not be localized, and it does
+	not need to be human-readable.
+	
+	Writable? No.
+	
+	Required only when an element's kAXRoleAttribute alone doesn't provide an assistive
+	application with enough information to convey the meaning of this element to the user.
+	
+	An example element that offers the kAXSubroleAttribute is a window's close box. Its
+	kAXRoleAttribute value is kAXButtonRole and its kAXSubroleAttribute is
+	kAXCloseButtonSubrole. It is of role kAXButtonRole because it offers no additional
+	actions or attributes above and beyond what other kAXButtonRole elements provide; it
+	was given a subrole in order to allow an assistive app to communicate the close box's
+	semantic difference to the user.
+	
+	Carbon Accessorization Notes: If your HIObjectClass or Carbon Event handler provides
+	the kAXSubroleAttribute, it must also provide the kAXRoleDescriptionAttribute.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSubroleAttribute CFSTRP('AXSubrole')}
+{$endc}
+
+
+{
+	kAXRoleDescriptionAttribute
+	
+	A localized, human-readable string that an assistive application can present to the user
+	as an explanation of an element's basic type or purpose. Examples would be "push button"
+	or "secure text field". The string's language should match the language of the app that
+	the element lives within. The string should be all lower-case and contain no punctuation.
+	
+	Two elements with the same kAXRoleAttribute and kAXSubroleAttribute should have the
+	same kAXRoleDescriptionAttribute.
+	
+	Value: A localized, human-readable CFStringRef.
+	
+	Writable? No.
+	
+	Required for all elements. Even in the worst case scenario where an element cannot
+	figure out what its basic type is, it can still supply the value "unknown".
+	
+	Carbon Accessorization Notes: The HIObjectClass or Carbon Event handler that provides
+	the AXRole and/or AXSubrole for an element is the one that must also handle the
+	AXRoleDescription attribute. If an HIObjectClass or Carbon Event handler does not
+	provide either the AXRole or AXSubrole, it must not provide the AXRoleDescription.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXRoleDescriptionAttribute CFSTRP('AXRoleDescription')}
+{$endc}
+
+
+{
+	kAXHelpAttribute
+	
+	A localized, human-readable CFStringRef that offers help content for an element.
+	This is often the same information that would be provided in a help tag for the element.
+	
+	Value: A localized, human-readable CFStringRef.
+	
+	Writable? No.
+	
+	Recommended for any element that has help data available.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXHelpAttribute CFSTRP('AXHelp')}
+{$endc}
+
+
+{
+	kAXTitleAttribute
+	
+	The localized, human-readable string that is displayed as part of the element's
+	normal visual interface. For example, a OK button's kAXTitleElement is the string
+	"OK", and a menu item's kAXTitleElement is the text of the menu item.
+	
+	Value: A localized, human-readable CFStringRef.
+	
+	Writable? No.
+	
+	Required if the element draws a string as part of its normal visual interface.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXTitleAttribute CFSTRP('AXTitle')}
+{$endc}
+
+
+{
+	kAXValueAttribute
+	
+	A catch-all attribute that represents a user modifiable setting of an element. For
+	example, the contents of an editable text field, the position of a scroll bar thumb,
+	and whether a check box is checked are all communicated by the kAXValueAttribute of
+	their respective elements.
+	
+	Value: Varies, but will always be the same type for a given kind of element. Each
+	role that offers kAXValueAttribute will specify the type of data that will be used
+	for its value.
+	
+	Writable? Generally yes. However, it does not need to be writable if some other form
+	of direct manipulation is more appropriate for causing a value change. For example,
+	a kAXScrollBar's kAXValueAttribute is writable because it allows an efficient way
+	for the user to get to a specific position in the element being scrolled. By
+	contrast, a kAXCheckBox's kAXValueAttribute is not settable because underlying
+	functionality of the check box widget relies on it being clicked on; therefore, it
+	changes its own kAXValueAttribute appropriately in response to the kAXPressAction.
+	
+	Required for many user manipulatable elements, or those whose value state conveys
+	important information.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXValueAttribute CFSTRP('AXValue')}
+{$endc}
+
+
+{
+	kAXMinValueAttribute
+	
+	Only used in conjunction with kAXValueAttribute and kAXMaxValueAttribute, this
+	attribute represents the minimum value that an element can display. This is useful
+	for things like sliders and scroll bars, where the user needs to have an understanding
+	of how much the kAXValueAttribute can vary.
+	
+	Value: Same data type as the element's kAXValueAttribute.
+	
+	Writable? No.
+	
+	Required for many user maniipulatable elements. See kAXValueAttribute for more
+	details.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMinValueAttribute CFSTRP('AXMinValue')}
+{$endc}
+
+
+{
+	kAXMaxValueAttribute
+	
+	Only used in conjunction with kAXValueAttribute and kAXMinValueAttribute, this
+	attribute represents the maximum value that an element can display. This is useful
+	for things like sliders and scroll bars, where the user needs to have an understanding
+	of how much the kAXValueAttribute can vary.
+	
+	Value: Same data type as the element's kAXValueAttribute.
+	
+	Writable? No.
+	
+	Required for many user maniipulatable elements. See kAXValueAttribute for more
+	details.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMaxValueAttribute CFSTRP('AXMaxValue')}
+{$endc}
+
+
+{
+	kAXValueIncrementAttribute
+	
+	Only used in conjunction with kAXValueAttribute, this attribute represents the amount
+	a value will change in one action on the given element. In particular, it is used on
+	elements of role kAXIncrementorRole in order to give the user an idea of how much its
+	value will change with a single click on the up or down arrow.
+	
+	Value: Same data type as the element's kAXValueAttribute.
+	
+	Writable? No.
+	
+	Recommended for kAXIncrementorRole and other similar elements.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXValueIncrementAttribute CFSTRP('AXValueIncrement')}
+{$endc}
+
+
+{
+	kAXAllowedValuesAttribute
+	
+	An array of the allowed values for a slider or other widget that displays
+	a large value range, but which can only be set to a small subset of values
+	within that range.
+	
+	Value: A CFArrayRef of whatever type the element uses for its kAXValueAttribute.
+	
+	Writable? No.
+	
+	Recommended for sliders or other elements that can only be set to a small
+	set of values.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXAllowedValuesAttribute CFSTRP('AXAllowedValues')}
+{$endc}
+
+
+{
+	kAXEnabledAttribute
+	
+	Indicates whether the element can be interacted with by the user. For example,
+	a disabled push button's kAXEnabledAttribute will be false.
+	
+	Value: A CFBooleanRef. True means enabled, false means disabled.
+	
+	Writable? No.
+	
+	Required for all views, menus, and menu items. Not required for windows.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXEnabledAttribute CFSTRP('AXEnabled')}
+{$endc}
+
+
+{
+	kAXFocusedAttribute
+	
+	Indicates whether the element is the current keyboard focus. It should be writable
+	for any element that can accept keyboard focus, though you can only set the value
+	of kAXFocusedAttribute to true. You cannot unfocus an element by setting the value
+	to false. Only one element in a window's entire accessibility hierarchy should be
+	marked as focused.
+	
+	Value: A CFBooleanRef. True means focused, false means not focused.
+	
+	Writable? Yes, for any focusable element. No in all other cases.
+	
+	Required for any focusable element. Not required for other elements, though it is
+	often offered for non-focusable elements in a read-only fashion.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXFocusedAttribute CFSTRP('AXFocused')}
+{$endc}
+
+
+{
+	kAXParentAttribute
+	
+	Indicates the element's container element in the visual element hierarchy. A push
+	button's kAXParentElement might be a window element or a group. A sheet's
+	kAXParentElement will be a window element. A window's kAXParentElement will be the
+	application element. A menu item's kAXParentElement will be a menu element.
+	
+	Value: An AXUIElementRef.
+	
+	Writable? No.
+	
+	Required for every element except the application. Everything else in the visual
+	element hierarchy must have a parent.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXParentAttribute CFSTRP('AXParent')}
+{$endc}
+
+
+{
+	kAXChildrenAttribute
+	
+	Indicates the sub elements of a given element in the visual element hierarchy. A tab
+	group's kAXChildrenAttribute is an array of tab radio button elements. A window's
+	kAXChildrenAttribute is an array of the first-order views elements within the window.
+	A menu's kAXChildrenAttribute is an array of the menu item elements.
+	
+	A given element may only be in the child array of one other element. If an element is
+	in the child array of some other element, the element's kAXParentAttribute must be
+	the other element.
+	
+	Value: A CFArrayRef of AXUIElementRefs.
+	
+	Writable? No.
+	
+	Required for elements that contain sub elements.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXChildrenAttribute CFSTRP('AXChildren')}
+{$endc}
+
+
+{
+	kAXSelectedChildrenAttribute
+	
+	Indicates the selected sub elements of a given element in the visual element hierarchy.
+	This is a the subset of the element's kAXChildrenAttribute that are selected. This is
+	commonly used in lists so an assistive app can know which list item are selected.
+	
+	Value: A CFArrayRef of AXUIElementRefs.
+	
+	Writable? Only if there is no other way to manipulate the set of selected elements via
+	accessibilty attributes or actions. Even if other ways exist, this attribute can be
+	writable as a convenience to assistive applications and their users. If
+	kAXSelectedChildrenAttribute is writable, a write request with a value of an empty
+	array should deselect all selected children.
+	
+	Required for elements that contain selectable sub elements.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSelectedChildrenAttribute CFSTRP('AXSelectedChildren')}
+{$endc}
+
+
+{
+	kAXVisibleChildrenAttribute
+	
+	Indicates the visible sub elements of a given element in the visual element hierarchy.
+	This is a the subset of the element's kAXChildrenAttribute that a sighted user can
+	see on the screen. In a list element, kAXVisibleChildrenAttribute would be an array
+	of child elements that are currently scrolled into view.
+	
+	Value: A CFArrayRef of AXUIElementRefs.
+	
+	Writable? No.
+	
+	Recommended for elements whose child elements can be occluded or scrolled out of view.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXVisibleChildrenAttribute CFSTRP('AXVisibleChildren')}
+{$endc}
+
+
+{
+	kAXWindowAttribute
+	
+	A short cut for traversing an element's parent hierarchy until an element of role
+	kAXWindowRole is found. Note that the value for kAXWindowAttribute should not be
+	an element of role kAXSheetRole or kAXDrawerRole; instead, the value should be the
+	element of kAXWindowRole that the sheet or drawer is attached to.
+	
+	Value: an AXUIElementRef of role kAXWindowRole.
+	
+	Writable? No.
+	
+	Required for any element that has an element of role kAXWindowRole somewhere
+	in its parent chain.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXWindowAttribute CFSTRP('AXWindow')}
+{$endc}
+
+
+{
+	kAXTopLevelUIElementAttribute
+	
+	This is very much like the kAXWindowAttribute, except that the value of this
+	attribute can be an element with role kAXSheetRole or kAXDrawerRole. It is
+	a short cut for traversing an element's parent hierarchy until an element of
+	role kAXWindowRole, kAXSheetRole, or kAXDrawerRole is found.
+	
+	Value: An AXUIElementRef of role kAXWindowRole, kAXSheetRole, or kAXDrawerRole.
+	
+	Writable? No.
+	
+	Required for any element that has an appropriate element somewhere in its
+	parent chain.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXTopLevelUIElementAttribute CFSTRP('AXTopLevelUIElement')}
+{$endc}
+
+
+{
+	kAXPositionAttribute
+	
+	The global screen position of the top-left corner of an element.
+	
+	Value: An AXValueRef with type kAXValueCGPointType. 0,0 is the top-left
+	corner of the screen that displays the menu bar. The value of the horizontal
+	axis increases to the right. The value of the vertical axis increases
+	downward. Units are pixels.
+	
+	Writable? Generally no. However, some elements that can be moved by the user
+	through direct manipulation (like windows) should offer a writable position
+	attribute.
+	
+	Required for all elements that are visible on the screen, which is virtually
+	all elements.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXPositionAttribute CFSTRP('AXPosition')}
+{$endc}
+
+
+{
+	kAXSizeAttribute
+	
+	The vertical and horizontal dimensions of the element.
+	
+	Value: An AXValueRef with type kAXValueCGSizeType. Units are pixels.
+	
+	Writable? Generally no. However, some elements that can be resized by the user
+	through direct manipulation (like windows) should offer a writable size attribute.
+	
+	Required for all elements that are visible on the screen, which is virtually
+	all elements.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSizeAttribute CFSTRP('AXSize')}
+{$endc}
+
+
+{
+	kAXOrientationAttribute
+	
+	An indiciation of whether an element is drawn and/or interacted with in a
+	vertical or horizontal manner. Elements such as scroll bars and sliders offer
+	the kAXOrientationAttribute.
+	
+	Value: kAXHorizontalOrientationValue, kAXVerticalOrientationValue, or rarely
+	kAXUnknownOrientationValue.
+	
+	Writable? No.
+	
+	Required for scroll bars, sliders, or other elements whose semantic or
+	associative meaning changes based on their orientation.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXOrientationAttribute CFSTRP('AXOrientation')}
+{$endc}
+
+
+{
+	kAXDescriptionAttribute
+	
+	An indication of an element's purpose, in a way that is slightly more specific
+	than the kAXRoleDescriptionAttribute, but which is less wordy than the
+	kAXHelpAttribute. In English, the description should typically be a concatenation
+	of a usage adjective with the element's role description. For example, the
+	description of a slider in a font panel might be "font size slider". The string
+	should be all lower-case and contain no punctuation.
+	
+	Value: A localized, human-readable CFStringRef.
+	
+	Writable? No.
+	
+	Recommended for all elements because it gives the user a concise indication of
+	an element's purpose.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDescriptionAttribute CFSTRP('AXDescription')}
+{$endc}
+// old name
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDescription CFSTRP('AXDescription')}
+{$endc}
+
+
+{
+	kAXSelectedTextAttribute
+	
+	The selected text of an editable text element.
+	
+	Value: A CFStringRef with the currently selected text of the element.
+	
+	Writable? No.
+	
+	Required for all editable text elements.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSelectedTextAttribute CFSTRP('AXSelectedText')}
+{$endc}
+
+
+{
+	kAXSelectedTextRangeAttribute
+	
+	The range of characters (not bytes) that defines the current selection of an
+	editable text element.
+	
+	Value: An AXValueRef of type kAXValueCFRange.
+	
+	Writable? Yes.
+	
+	Required for all editable text elements.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSelectedTextRangeAttribute CFSTRP('AXSelectedTextRange')}
+{$endc}
+
+
+{
+	kAXVisibleCharacterRangeAttribute
+	
+	The range of characters (not bytes) that are scrolled into view in the editable
+	text element.
+	
+	Value: An AXValueRef of type kAXValueCFRange.
+	
+	Writable? No.
+	
+	Required for elements of role kAXTextAreaRole. Not required for any other
+	elements, including those of role kAXTextFieldRole.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXVisibleCharacterRangeAttribute CFSTRP('AXVisibleCharacterRange')}
+{$endc}
+
+
+{
+	kAXNumberOfCharactersAttribute
+	
+	The total number of characters (not bytes) in an editable text element.
+	
+	Value: CFNumberRef
+	
+	Writable? No.
+	
+	Required for editable text elements.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXNumberOfCharactersAttribute CFSTRP('AXNumberOfCharacters')}
+{$endc}
+
+
+{
+	kAXSharedTextUIElementsAttribute
+	
+	Value: CFArrayRef of AXUIElementRefs
+	
+	Writable? No.
+	
+	Optional?
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSharedTextUIElementsAttribute CFSTRP('AXSharedTextUIElements')}
+{$endc}
+
+
+{
+	kAXSharedCharacterRangeAttribute
+	
+	Value: AXValueRef of type kAXValueCFRangeType
+	
+	Writable? No.
+	
+	Optional?
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSharedCharacterRangeAttribute CFSTRP('AXSharedCharacterRange')}
+{$endc}
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXInsertionPointLineNumberAttribute CFSTRP('AXInsertionPointLineNumber')}
+{$endc}
+
+{
+	kAXMainAttribute
+	
+	Whether a window is the main document window of an application. For an active
+	app, the main window is the single active document window. For an inactive app,
+	the main window is the single document window which would be active if the app
+	were active. Main does not necessarily imply that the window has key focus.
+	
+	Value: A CFBooleanRef. True means the window is main. False means it is not.
+	
+	Writable? Yes.
+	
+	Required for all window elements.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMainAttribute CFSTRP('AXMain')}
+{$endc}
+
+
+{
+	kAXMinimizedAttribute
+	
+	Whether a window is currently minimized to the dock.
+	
+	Value: A CFBooleanRef. True means minimized.
+	
+	Writable? Yes.
+	
+	Required for all window elements that can be minimized.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMinimizedAttribute CFSTRP('AXMinimized')}
+{$endc}
+
+
+{
+	kAXCloseButtonAttribute
+	
+	A convenience attribute so assistive apps can quickly access a window's close
+	button element.
+	
+	Value: An AXUIElementRef of the window's close button element.
+	
+	Writable? No.
+	
+	Required for all window elements that have a close button.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXCloseButtonAttribute CFSTRP('AXCloseButton')}
+{$endc}
+
+
+{
+	kAXZoomButtonAttribute
+	
+	A convenience attribute so assistive apps can quickly access a window's zoom
+	button element.
+	
+	Value: An AXUIElementRef of the window's zoom button element.
+	
+	Writable? No.
+	
+	Required for all window elements that have a zoom button.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXZoomButtonAttribute CFSTRP('AXZoomButton')}
+{$endc}
+
+
+{
+	kAXMinimizeButtonAttribute
+	
+	A convenience attribute so assistive apps can quickly access a window's minimize
+	button element.
+	
+	Value: An AXUIElementRef of the window's minimize button element.
+	
+	Writable? No.
+	
+	Required for all window elements that have a minimize button.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMinimizeButtonAttribute CFSTRP('AXMinimizeButton')}
+{$endc}
+
+
+{
+	kAXToolbarButtonAttribute
+	
+	A convenience attribute so assistive apps can quickly access a window's toolbar
+	button element.
+	
+	Value: An AXUIElementRef of the window's toolbar button element.
+	
+	Writable? No.
+	
+	Required for all window elements that have a toolbar button.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXToolbarButtonAttribute CFSTRP('AXToolbarButton')}
+{$endc}
+
+
+{
+	kAXProxyAttribute
+	
+	A convenience attribute so assistive apps can quickly access a window's document
+	proxy element.
+	
+	Value: An AXUIElementRef of the window's document proxy element.
+	
+	Writable? No.
+	
+	Required for all window elements that have a document proxy.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXProxyAttribute CFSTRP('AXProxy')}
+{$endc}
+
+
+{
+	kAXGrowAreaAttribute
+	
+	A convenience attribute so assistive apps can quickly access a window's grow
+	area element.
+	
+	Value: An AXUIElementRef of the window's grow area element.
+	
+	Writable? No.
+	
+	Required for all window elements that have a grow area.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXGrowAreaAttribute CFSTRP('AXGrowArea')}
+{$endc}
+
+
+{
+	kAXModalAttribute
+	
+	Whether a window is modal.
+	
+	Value: A CFBooleanRef. True means the window is modal.
+	
+	Writable? No.
+	
+	Required for all window elements.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXModalAttribute CFSTRP('AXModal')}
+{$endc}
+
+
+{
+	kAXDefaultButtonAttribute
+	
+	A convenience attribute so assistive apps can quickly access a window's default
+	button element, if any.
+	
+	Value: An AXUIElementRef of the window's default button element.
+	
+	Writable? No.
+	
+	Required for all window elements that have a default button.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDefaultButtonAttribute CFSTRP('AXDefaultButton')}
+{$endc}
+
+
+{
+	kAXCancelButtonAttribute
+	
+	A convenience attribute so assistive apps can quickly access a window's cancel
+	button element, if any.
+	
+	Value: An AXUIElementRef of the window's cancel button element.
+	
+	Writable? No.
+	
+	Required for all window elements that have a cancel button.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXCancelButtonAttribute CFSTRP('AXCancelButton')}
+{$endc}
+
+// menu-specific attributes
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMenuItemCmdCharAttribute CFSTRP('AXMenuItemCmdChar')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMenuItemCmdVirtualKeyAttribute CFSTRP('AXMenuItemCmdVirtualKey')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMenuItemCmdGlyphAttribute CFSTRP('AXMenuItemCmdGlyph')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMenuItemCmdModifiersAttribute CFSTRP('AXMenuItemCmdModifiers')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMenuItemMarkCharAttribute CFSTRP('AXMenuItemMarkChar')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMenuItemPrimaryUIElementAttribute CFSTRP('AXMenuItemPrimaryUIElement')}
+{$endc}
+
+// application-specific attributes
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMenuBarAttribute CFSTRP('AXMenuBar')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXWindowsAttribute CFSTRP('AXWindows')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXFrontmostAttribute CFSTRP('AXFrontmost')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXHiddenAttribute CFSTRP('AXHidden')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMainWindowAttribute CFSTRP('AXMainWindow')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXFocusedWindowAttribute CFSTRP('AXFocusedWindow')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXFocusedUIElementAttribute CFSTRP('AXFocusedUIElement')}
+{$endc}
+
+
+{
+	kAXHeaderAttribute
+	
+	A convenience attribute whose value is an element that is a header for another
+	element. For example, an outline element has a header attribute whose value is
+	a element of role AXGroup that contains the header buttons for each column.
+	Used for things like tables, outlines, columns, etc.
+	
+	Value: An AXUIElementRef whose role varies.
+	
+	Writable? No.
+	
+	Recommended for elements that have header elements contained within them that an
+	assistive application might want convenient access to.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXHeaderAttribute CFSTRP('AXHeader')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXEditedAttribute CFSTRP('AXEdited')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXValueWrapsAttribute CFSTRP('AXValueWraps')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXTabsAttribute CFSTRP('AXTabs')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXTitleUIElementAttribute CFSTRP('AXTitleUIElement')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXHorizontalScrollBarAttribute CFSTRP('AXHorizontalScrollBar')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXVerticalScrollBarAttribute CFSTRP('AXVerticalScrollBar')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXOverflowButtonAttribute CFSTRP('AXOverflowButton')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXFilenameAttribute CFSTRP('AXFilename')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXExpandedAttribute CFSTRP('AXExpanded')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSelectedAttribute CFSTRP('AXSelected')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSplittersAttribute CFSTRP('AXSplitters')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXNextContentsAttribute CFSTRP('AXNextContents')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDocumentAttribute CFSTRP('AXDocument')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDecrementButtonAttribute CFSTRP('AXDecrementButton')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXIncrementButtonAttribute CFSTRP('AXIncrementButton')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXPreviousContentsAttribute CFSTRP('AXPreviousContents')}
+{$endc}
+
+
+{
+	kAXContentsAttribute
+	
+	A convenience attribute so assistive apps can find interesting child elements
+	of a given element, while at the same time avoiding non-interesting child
+	elements. For example, the contents of a scroll area are the children that get
+	scrolled, and not the horizontal and/or vertical scroll bars. The contents of
+	a tab group does not include the tabs themselves.
+	
+	Value: A CFArrayRef of AXUIElementRefs.
+	
+	Writable? No.
+	
+	Recommended for elements that have children that act upon or are separate from
+	other children.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXContentsAttribute CFSTRP('AXContents')}
+{$endc}
+
+
+{
+	kAXIncrementorAttribute
+	
+	Convenience attribute that yields the incrementor of a time field or date
+	field element.
+	
+	Value: A AXUIElementRef of role kAXIncrementorRole.
+	
+	Writable? No.
+	
+	Required for time field and date field elements that display an incrementor.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXIncrementorAttribute CFSTRP('AXIncrementor')}
+{$endc}
+
+
+{
+	kAXHourFieldAttribute
+	
+	Convenience attribute that yields the hour field of a time field element.
+	
+	Value: A AXUIElementRef of role kAXTextFieldRole that is used to edit the
+	hours in a time field element.
+	
+	Writable? No.
+	
+	Required for time field elements that display hours.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXHourFieldAttribute CFSTRP('AXHourField')}
+{$endc}
+
+
+{
+	kAXMinuteFieldAttribute
+	
+	Convenience attribute that yields the minute field of a time field element.
+	
+	Value: A AXUIElementRef of role kAXTextFieldRole that is used to edit the
+	minutes in a time field element.
+	
+	Writable? No.
+	
+	Required for time field elements that display minutes.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMinuteFieldAttribute CFSTRP('AXMinuteField')}
+{$endc}
+
+
+{
+	kAXSecondFieldAttribute
+	
+	Convenience attribute that yields the seconds field of a time field element.
+	
+	Value: A AXUIElementRef of role kAXTextFieldRole that is used to edit the
+	seconds in a time field element.
+	
+	Writable? No.
+	
+	Required for time field elements that display seconds.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSecondFieldAttribute CFSTRP('AXSecondField')}
+{$endc}
+
+
+{
+	kAXAMPMFieldAttribute
+	
+	Convenience attribute that yields the AM/PM field of a time field element.
+	
+	Value: A AXUIElementRef of role kAXTextFieldRole that is used to edit the
+	AM/PM setting in a time field element.
+	
+	Writable? No.
+	
+	Required for time field elements that displays an AM/PM setting.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXAMPMFieldAttribute CFSTRP('AXAMPMField')}
+{$endc}
+
+
+{
+	kAXDayFieldAttribute
+	
+	Convenience attribute that yields the day field of a date field element.
+	
+	Value: A AXUIElementRef of role kAXTextFieldRole that is used to edit the
+	day in a date field element.
+	
+	Writable? No.
+	
+	Required for date field elements that display days.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDayFieldAttribute CFSTRP('AXDayField')}
+{$endc}
+
+
+{
+	kAXMonthFieldAttribute
+	
+	Convenience attribute that yields the month field of a date field element.
+	
+	Value: A AXUIElementRef of role kAXTextFieldRole that is used to edit the
+	month in a date field element.
+	
+	Writable? No.
+	
+	Required for date field elements that display months.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMonthFieldAttribute CFSTRP('AXMonthField')}
+{$endc}
+
+
+{
+	kAXYearFieldAttribute
+	
+	Convenience attribute that yields the year field of a date field element.
+	
+	Value: A AXUIElementRef of role kAXTextFieldRole that is used to edit the
+	year in a date field element.
+	
+	Writable? No.
+	
+	Required for date field elements that display years.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXYearFieldAttribute CFSTRP('AXYearField')}
+{$endc}
+
+
+{
+	kAXColumnTitleAttribute
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXColumnTitleAttribute CFSTRP('AXColumnTitles')}
+{$endc}
+
+
+{
+	kAXURLAttribute
+	
+	Value: A CFURLRef.
+	
+	Writable? No.
+	
+	Required for elements that represent a disk or network item.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXURLAttribute CFSTRP('AXURL')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXLabelUIElementsAttribute CFSTRP('AXLabelUIElements')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXLabelValueAttribute CFSTRP('AXLabelValue')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXShownMenuUIElementAttribute CFSTRP('AXShownMenuUIElement')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXServesAsTitleForUIElementsAttribute CFSTRP('AXServesAsTitleForUIElements')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXLinkedUIElementsAttribute CFSTRP('AXLinkedUIElements')}
+{$endc}
+
+// table/outline view attributes
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXRowsAttribute CFSTRP('AXRows')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXVisibleRowsAttribute CFSTRP('AXVisibleRows')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSelectedRowsAttribute CFSTRP('AXSelectedRows')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXColumnsAttribute CFSTRP('AXColumns')}
+{$endc}
+
+
+{
+	kAXVisibleColumnsAttribute
+	
+	Indicates the visible column sub-elements of a kAXBrowserRole element.
+	This is the subset of a browser's kAXColumnsAttribute where each column in the
+	array is one that is currently scrolled into view within the browser. It does
+	not include any columns that are currently scrolled out of view.
+	
+	Value: A CFArrayRef of AXUIElementRefs representing the columns of a browser.
+	The columns will be grandchild elements of the browser, and will generally be
+	of role kAXScrollArea.
+	
+	Writable? No.
+	
+	Required for all browser elements.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXVisibleColumnsAttribute CFSTRP('AXVisibleColumns')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSelectedColumnsAttribute CFSTRP('AXSelectedColumns')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSortDirectionAttribute CFSTRP('AXSortDirection')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXColumnHeaderUIElementsAttribute CFSTRP('AXColumnHeaderUIElements')}
+{$endc}
+
+// row/column attributes
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXIndexAttribute CFSTRP('AXIndex')}
+{$endc}
+
+// outline attributes
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDisclosingAttribute CFSTRP('AXDisclosing')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDisclosedRowsAttribute CFSTRP('AXDisclosedRows')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDisclosedByRowAttribute CFSTRP('AXDisclosedByRow')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDisclosureLevelAttribute CFSTRP('AXDisclosureLevel')}
+{$endc}
+
+// matte attributes
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMatteHoleAttribute CFSTRP('AXMatteHole')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMatteContentUIElementAttribute CFSTRP('AXMatteContentUIElement')}
+{$endc}
+
+// ruler attributes
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMarkerUIElementsAttribute CFSTRP('AXMarkerUIElements')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXUnitsAttribute CFSTRP('AXUnits')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXUnitDescriptionAttribute CFSTRP('AXUnitDescription')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMarkerTypeAttribute CFSTRP('AXMarkerType')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMarkerTypeDescriptionAttribute CFSTRP('AXMarkerTypeDescription')}
+{$endc}
+
+// Dock attributes
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXIsApplicationRunningAttribute CFSTRP('AXIsApplicationRunning')}
+{$endc}
+
+// search field attributes
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSearchButtonAttribute CFSTRP('AXSearchButton')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXClearButtonAttribute CFSTRP('AXClearButton')}
+{$endc}
+
+// system-wide attributes
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXFocusedApplicationAttribute CFSTRP('AXFocusedApplication')}
+{$endc}
+
+// obsolete/unknown attributes
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXTextAttribute CFSTRP('AXText')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXVisibleTextAttribute CFSTRP('AXVisibleText')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXIsEditableAttribute CFSTRP('AXIsEditable')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXColumnTitlesAttribute CFSTRP('AXColumnTitles')}
+{$endc}
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Parameterized Attributes                                                             }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+// Text Suite Parameterized Attributes
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXLineForIndexParameterizedAttribute CFSTRP('AXLineForIndex')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXRangeForLineParameterizedAttribute CFSTRP('AXRangeForLine')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXStringForRangeParameterizedAttribute CFSTRP('AXStringForRange')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXRangeForPositionParameterizedAttribute CFSTRP('AXRangeForPosition')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXRangeForIndexParameterizedAttribute CFSTRP('AXRangeForIndex')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXBoundsForRangeParameterizedAttribute CFSTRP('AXBoundsForRange')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXRTFForRangeParameterizedAttribute CFSTRP('AXRTFForRange')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXAttributedStringForRangeParameterizedAttribute CFSTRP('AXAttributedStringForRange')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXStyleRangeForIndexParameterizedAttribute CFSTRP('AXStyleRangeForIndex')}
+{$endc}
+
+
+end.

+ 0 - 717
packages/extra/univint/AXConstants.pas

@@ -1,717 +0,0 @@
-{
- *  AXConstants.h
- *
- *  Created by John Louch on Tue Mar 26 2002.
- *  Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
- *
- }
-{	  Pascal Translation:  Peter N Lewis, <[email protected]>, 2004 }
-
-
-{
-    Modified for use with Free Pascal
-    Version 200
-    Please report any bugs to <[email protected]>
-}
-
-{$mode macpas}
-{$packenum 1}
-{$macro on}
-{$inline on}
-{$CALLING MWPASCAL}
-
-unit AXConstants;
-interface
-{$setc UNIVERSAL_INTERFACES_VERSION := $0342}
-{$setc GAP_INTERFACES_VERSION := $0200}
-
-{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
-    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
-{$endc}
-
-{$ifc defined CPUPOWERPC and defined CPUI386}
-	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
-{$endc}
-{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
-	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
-{$endc}
-
-{$ifc not defined __ppc__ and defined CPUPOWERPC}
-	{$setc __ppc__ := 1}
-{$elsec}
-	{$setc __ppc__ := 0}
-{$endc}
-{$ifc not defined __i386__ and defined CPUI386}
-	{$setc __i386__ := 1}
-{$elsec}
-	{$setc __i386__ := 0}
-{$endc}
-
-{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
-	{$error Conflicting definitions for __ppc__ and __i386__}
-{$endc}
-
-{$ifc defined __ppc__ and __ppc__}
-	{$setc TARGET_CPU_PPC := TRUE}
-	{$setc TARGET_CPU_X86 := FALSE}
-{$elifc defined __i386__ and __i386__}
-	{$setc TARGET_CPU_PPC := FALSE}
-	{$setc TARGET_CPU_X86 := TRUE}
-{$elsec}
-	{$error Neither __ppc__ nor __i386__ is defined.}
-{$endc}
-{$setc TARGET_CPU_PPC_64 := FALSE}
-
-{$ifc defined FPC_BIG_ENDIAN}
-	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
-	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
-{$elifc defined FPC_LITTLE_ENDIAN}
-	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
-	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
-{$elsec}
-	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
-{$endc}
-{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
-{$setc CALL_NOT_IN_CARBON := FALSE}
-{$setc OLDROUTINENAMES := FALSE}
-{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
-{$setc OPAQUE_UPP_TYPES := TRUE}
-{$setc OTCARBONAPPLICATION := TRUE}
-{$setc OTKERNEL := FALSE}
-{$setc PM_USE_SESSION_APIS := TRUE}
-{$setc TARGET_API_MAC_CARBON := TRUE}
-{$setc TARGET_API_MAC_OS8 := FALSE}
-{$setc TARGET_API_MAC_OSX := TRUE}
-{$setc TARGET_CARBON := TRUE}
-{$setc TARGET_CPU_68K := FALSE}
-{$setc TARGET_CPU_MIPS := FALSE}
-{$setc TARGET_CPU_SPARC := FALSE}
-{$setc TARGET_OS_MAC := TRUE}
-{$setc TARGET_OS_UNIX := FALSE}
-{$setc TARGET_OS_WIN32 := FALSE}
-{$setc TARGET_RT_MAC_68881 := FALSE}
-{$setc TARGET_RT_MAC_CFM := FALSE}
-{$setc TARGET_RT_MAC_MACHO := TRUE}
-{$setc TYPED_FUNCTION_POINTERS := TRUE}
-{$setc TYPE_BOOL := FALSE}
-{$setc TYPE_EXTENDED := FALSE}
-{$setc TYPE_LONGLONG := TRUE}
-uses MacTypes;
-{$ALIGN MAC68K}
-// standard attributes
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXRoleAttribute CFSTRP('AXRole')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXRoleDescriptionAttribute CFSTRP('AXRoleDescription')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXSubroleAttribute CFSTRP('AXSubrole')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXHelpAttribute CFSTRP('AXHelp')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXTitleAttribute CFSTRP('AXTitle')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXValueAttribute CFSTRP('AXValue')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXMinValueAttribute CFSTRP('AXMinValue')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXMaxValueAttribute CFSTRP('AXMaxValue')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXEnabledAttribute CFSTRP('AXEnabled')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXFocusedAttribute CFSTRP('AXFocused')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXParentAttribute CFSTRP('AXParent')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXChildrenAttribute CFSTRP('AXChildren')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXSelectedChildrenAttribute CFSTRP('AXSelectedChildren')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXVisibleChildrenAttribute CFSTRP('AXVisibleChildren')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXWindowAttribute CFSTRP('AXWindow')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXPositionAttribute CFSTRP('AXPosition')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXSizeAttribute CFSTRP('AXSize')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXOrientationAttribute CFSTRP('AXOrientation')}
-{$endc}
-
-// text-specific attributes
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXTextAttribute CFSTRP('AXText')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXSelectedTextAttribute CFSTRP('AXSelectedText')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXSelectedTextRangeAttribute CFSTRP('AXSelectedTextRange')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXVisibleTextAttribute CFSTRP('AXVisibleText')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXVisibleCharacterRangeAttribute CFSTRP('AXVisibleCharacterRange')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXNumberOfCharactersAttribute CFSTRP('AXNumberOfCharacters')}
-{$endc}
-
-// window-specific attributes
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXMainAttribute CFSTRP('AXMain')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXMinimizedAttribute CFSTRP('AXMinimized')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXCloseButtonAttribute CFSTRP('AXCloseButton')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXZoomButtonAttribute CFSTRP('AXZoomButton')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXMinimizeButtonAttribute CFSTRP('AXMinimizeButton')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXToolbarButtonAttribute CFSTRP('AXToolbarButton')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXProxyAttribute CFSTRP('AXProxy')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXGrowAreaAttribute CFSTRP('AXGrowArea')}
-{$endc}
-
-// new window-specific attributes
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXModalAttribute CFSTRP('AXModal')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXDefaultButtonAttribute CFSTRP('AXDefaultButton')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXCancelButtonAttribute CFSTRP('AXCancelButton')}
-{$endc}
-
-// menu-specific attributes
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXMenuItemCmdCharAttribute CFSTRP('AXMenuItemCmdChar')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXMenuItemCmdVirtualKeyAttribute CFSTRP('AXMenuItemCmdVirtualKey')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXMenuItemCmdGlyphAttribute CFSTRP('AXMenuItemCmdGlyph')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXMenuItemCmdModifiersAttribute CFSTRP('AXMenuItemCmdModifiers')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXMenuItemMarkCharAttribute CFSTRP('AXMenuItemMarkChar')}
-{$endc}
-
-// application-specific attributes
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXMenuBarAttribute CFSTRP('AXMenuBar')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXWindowsAttribute CFSTRP('AXWindows')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXFrontmostAttribute CFSTRP('AXFrontmost')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXHiddenAttribute CFSTRP('AXHidden')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXMainWindowAttribute CFSTRP('AXMainWindow')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXFocusedWindowAttribute CFSTRP('AXFocusedWindow')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXFocusedUIElementAttribute CFSTRP('AXFocusedUIElement')}
-{$endc} 
-
-// misc attributes
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXHeaderAttribute CFSTRP('AXHeader')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXEditedAttribute CFSTRP('AXEdited')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXValueIncrementAttribute CFSTRP('AXValueIncrement')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXValueWrapsAttribute CFSTRP('AXValueWraps')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXTabsAttribute CFSTRP('AXTabs')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXTitleUIElementAttribute CFSTRP('AXTitleUIElement')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXHorizontalScrollBarAttribute CFSTRP('AXHorizontalScrollBar')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXVerticalScrollBarAttribute CFSTRP('AXVerticalScrollBar')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXOverflowButtonAttribute CFSTRP('AXOverflowButton')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXFilenameAttribute CFSTRP('AXFilename')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXExpandedAttribute CFSTRP('AXExpanded')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXSelectedAttribute CFSTRP('AXSelected')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXSplittersAttribute CFSTRP('AXSplitters')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXNextContentsAttribute CFSTRP('AXNextContents')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXDocumentAttribute CFSTRP('AXDocument')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXDecrementButtonAttribute CFSTRP('AXDecrementButton')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXIncrementButtonAttribute CFSTRP('AXIncrementButton')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXPreviousContentsAttribute CFSTRP('AXPreviousContents')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXContentsAttribute CFSTRP('AXContents')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXIncrementorAttribute CFSTRP('AXIncrementor')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXHourFieldAttribute CFSTRP('AXHourField')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXMinuteFieldAttribute CFSTRP('AXMinuteField')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXSecondFieldAttribute CFSTRP('AXSecondField')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXAMPMFieldAttribute CFSTRP('AXAMPMField')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXDayFieldAttribute CFSTRP('AXDayField')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXMonthFieldAttribute CFSTRP('AXMonthField')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXYearFieldAttribute CFSTRP('AXYearField')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXColumnTitlesAttribute CFSTRP('AXColumnTitles')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXURLAttribute CFSTRP('AXURL')}
-{$endc}
-
-// table/outline view attributes
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXRowsAttribute CFSTRP('AXRows')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXVisibleRowsAttribute CFSTRP('AXVisibleRows')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXSelectedRowsAttribute CFSTRP('AXSelectedRows')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXColumnsAttribute CFSTRP('AXColumns')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXVisibleColumnsAttribute CFSTRP('AXVisibleColumns')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXSelectedColumnsAttribute CFSTRP('AXSelectedColumns')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXSortDirectionAttribute CFSTRP('AXSortDirection')}
-{$endc}
-
-// outline attributes
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXDisclosingAttribute CFSTRP('AXDisclosing')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXDisclosedRowsAttribute CFSTRP('AXDisclosedRows')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXDisclosedByRowAttribute CFSTRP('AXDisclosedByRow')}
-{$endc}
-
-// system-wide attributes
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXFocusedApplicationAttribute CFSTRP('AXFocusedApplication')}
-{$endc}
-
-//
-// Parameterized Attributes
-//
-
-// Text Suite Parameterized Attributes
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXLineForIndexParameterizedAttribute CFSTRP('AXLineForIndex')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXRangeForLineParameterizedAttribute CFSTRP('AXRangeForLine')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXStringForRangeParameterizedAttribute CFSTRP('AXStringForRange')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXRangeForPositionParameterizedAttribute CFSTRP('AXRangeForPosition')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXRangeForIndexParameterizedAttribute CFSTRP('AXRangeForIndex')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXBoundsForRangeParameterizedAttribute CFSTRP('AXBoundsForRange')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXRTFForRangeParameterizedAttribute CFSTRP('AXRTFForRange')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXStyleRangeForIndexParameterizedAttribute CFSTRP('AXStyleRangeForIndex')}
-{$endc}
-
-//
-// standard values
-//
-
-// orientations (see kAXOrientationAttribute)
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXHorizontalOrientationValue CFSTRP('AXHorizontalOrientation')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXVerticalOrientationValue CFSTRP('AXVerticalOrientation')}
-{$endc}
-
-// standard actions
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXPressAction CFSTRP('AXPress')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXIncrementAction CFSTRP('AXIncrement')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXDecrementAction CFSTRP('AXDecrement')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXConfirmAction CFSTRP('AXConfirm')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXPickAction CFSTRP('AXPick')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXCancelAction CFSTRP('AXCancel')}
-{$endc}
-
-// new actions
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXRaiseAction CFSTRP('AXRaise')}
-{$endc}
-
-// standard roles
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXApplicationRole CFSTRP('AXApplication')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXSystemWideRole CFSTRP('AXSystemWide')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXWindowRole CFSTRP('AXWindow')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXSheetRole CFSTRP('AXSheet')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXDrawerRole CFSTRP('AXDrawer')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXGrowAreaRole CFSTRP('AXGrowArea')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXImageRole CFSTRP('AXImage')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXUnknownRole CFSTRP('AXUnknown')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXButtonRole CFSTRP('AXButton')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXRadioButtonRole CFSTRP('AXRadioButton')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXCheckBoxRole CFSTRP('AXCheckBox')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXPopUpButtonRole CFSTRP('AXPopUpButton')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXMenuButtonRole CFSTRP('AXMenuButton')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXTabGroupRole CFSTRP('AXTabGroup')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXTableRole CFSTRP('AXTable')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXColumnRole CFSTRP('AXColumn')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXRowRole CFSTRP('AXRow')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXOutlineRole CFSTRP('AXOutline')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXBrowserRole CFSTRP('AXBrowser')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXScrollAreaRole CFSTRP('AXScrollArea')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXScrollBarRole CFSTRP('AXScrollBar')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXRadioGroupRole CFSTRP('AXRadioGroup')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXListRole CFSTRP('AXList')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXGroupRole CFSTRP('AXGroup')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXValueIndicatorRole CFSTRP('AXValueIndicator')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXComboBoxRole CFSTRP('AXComboBox')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXSliderRole CFSTRP('AXSlider')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXIncrementorRole CFSTRP('AXIncrementor')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXBusyIndicatorRole CFSTRP('AXBusyIndicator')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXProgressIndicatorRole CFSTRP('AXProgressIndicator')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXToolbarRole CFSTRP('AXToolbar')}
-{$endc}
-
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXTextFieldRole CFSTRP('AXTextField')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXTextAreaRole CFSTRP('AXTextArea')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXStaticTextRole CFSTRP('AXStaticText')}
-{$endc}
-
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXMenuBarRole CFSTRP('AXMenuBar')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXMenuBarItemRole CFSTRP('AXMenuBarItem')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXMenuRole CFSTRP('AXMenu')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXMenuItemRole CFSTRP('AXMenuItem')}
-{$endc}
-
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXSplitGroupRole CFSTRP('AXSplitGroup')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXSplitterRole CFSTRP('AXSplitter')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXColorWellRole CFSTRP('AXColorWell')}
-{$endc}
-
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXTimeFieldRole CFSTRP('AXTimeField')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXDateFieldRole CFSTRP('AXDateField')}
-{$endc}
-
-// standard subroles
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXCloseButtonSubrole CFSTRP('AXCloseButton')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXMinimizeButtonSubrole CFSTRP('AXMinimizeButton')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXZoomButtonSubrole CFSTRP('AXZoomButton')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXToolbarButtonSubrole CFSTRP('AXToolbarButton')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXSecureTextFieldSubrole CFSTRP('AXSecureTextField')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXTableRowSubrole CFSTRP('AXTableRow')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXOutlineRowSubrole CFSTRP('AXOutlineRow')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXUnknownSubrole CFSTRP('AXUnknown')}
-{$endc}
-
-// new subroles
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXStandardWindowSubrole CFSTRP('AXStandardWindow')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXDialogSubrole CFSTRP('AXDialog')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXSystemDialogSubrole CFSTRP('AXSystemDialog')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXFloatingWindowSubrole CFSTRP('AXFloatingWindow')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXSystemFloatingWindowSubrole CFSTRP('AXSystemFloatingWindow')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXIncrementArrowSubrole CFSTRP('AXIncrementArrow')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXDecrementArrowSubrole CFSTRP('AXDecrementArrow')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXIncrementPageSubrole CFSTRP('AXIncrementPage')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXDecrementPageSubrole CFSTRP('AXDecrementPage')}
-{$endc}
-
-// focus notifications
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXMainWindowChangedNotification CFSTRP('AXMainWindowChanged')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXFocusedWindowChangedNotification CFSTRP('AXFocusedWindowChanged')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXFocusedUIElementChangedNotification CFSTRP('AXFocusedUIElementChanged')}
-{$endc}
-
-// application notifications
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXApplicationActivatedNotification CFSTRP('AXApplicationActivated')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXApplicationDeactivatedNotification CFSTRP('AXApplicationDeactivated')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXApplicationHiddenNotification CFSTRP('AXApplicationHidden')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXApplicationShownNotification CFSTRP('AXApplicationShown')}
-{$endc}
-
-// window notifications
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXWindowCreatedNotification CFSTRP('AXWindowCreated')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXWindowMovedNotification CFSTRP('AXWindowMoved')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXWindowResizedNotification CFSTRP('AXWindowResized')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXWindowMiniaturizedNotification CFSTRP('AXWindowMiniaturized')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXWindowDeminiaturizedNotification CFSTRP('AXWindowDeminiaturized')}
-{$endc}
-
-// new drawer & sheet notifications
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXDrawerCreatedNotification CFSTRP('AXDrawerCreated')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXSheetCreatedNotification CFSTRP('AXSheetCreated')}
-{$endc}
-
-// element notifications
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXValueChangedNotification CFSTRP('AXValueChanged')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXUIElementDestroyedNotification CFSTRP('AXUIElementDestroyed')}
-{$endc}
-
-// menu notifications
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXMenuOpenedNotification CFSTRP('AXMenuOpened')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXMenuClosedNotification CFSTRP('AXMenuClosed')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXMenuItemSelectedNotification CFSTRP('AXMenuItemSelected')}
-{$endc}
-
-
-// obsolete constants will be removed soon
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXRelevanceIndicatorRole CFSTRP('AXRelevanceIndicator')}
-{$endc}
-{$ifc USE_CFSTR_CONSTANT_MACROS}
-{$definec kAXIsEditableAttribute CFSTRP('AXIsEditable')}
-{$endc}
-
-end.

+ 205 - 0
packages/extra/univint/AXNotificationConstants.pas

@@ -0,0 +1,205 @@
+{
+ *  AXNotificationConstants.h
+ *  HIServices
+ *
+ *  Created by John Louch on Wed Feb 25 2004.
+ *  Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
+ *
+ }
+
+{	 Pascal Translation:  Gale R Paeper, <[email protected]>, 2006 }
+
+{
+    Modified for use with Free Pascal
+    Version 200
+    Please report any bugs to <[email protected]>
+}
+
+{$mode macpas}
+{$packenum 1}
+{$macro on}
+{$inline on}
+{$CALLING MWPASCAL}
+
+unit AXNotificationConstants;
+interface
+{$setc UNIVERSAL_INTERFACES_VERSION := $0342}
+{$setc GAP_INTERFACES_VERSION := $0200}
+
+{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
+    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
+{$endc}
+
+{$ifc defined CPUPOWERPC and defined CPUI386}
+	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
+{$endc}
+{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
+	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
+{$endc}
+
+{$ifc not defined __ppc__ and defined CPUPOWERPC}
+	{$setc __ppc__ := 1}
+{$elsec}
+	{$setc __ppc__ := 0}
+{$endc}
+{$ifc not defined __i386__ and defined CPUI386}
+	{$setc __i386__ := 1}
+{$elsec}
+	{$setc __i386__ := 0}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
+	{$error Conflicting definitions for __ppc__ and __i386__}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__}
+	{$setc TARGET_CPU_PPC := TRUE}
+	{$setc TARGET_CPU_X86 := FALSE}
+{$elifc defined __i386__ and __i386__}
+	{$setc TARGET_CPU_PPC := FALSE}
+	{$setc TARGET_CPU_X86 := TRUE}
+{$elsec}
+	{$error Neither __ppc__ nor __i386__ is defined.}
+{$endc}
+{$setc TARGET_CPU_PPC_64 := FALSE}
+
+{$ifc defined FPC_BIG_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
+{$elifc defined FPC_LITTLE_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
+{$elsec}
+	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
+{$endc}
+{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
+{$setc CALL_NOT_IN_CARBON := FALSE}
+{$setc OLDROUTINENAMES := FALSE}
+{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
+{$setc OPAQUE_UPP_TYPES := TRUE}
+{$setc OTCARBONAPPLICATION := TRUE}
+{$setc OTKERNEL := FALSE}
+{$setc PM_USE_SESSION_APIS := TRUE}
+{$setc TARGET_API_MAC_CARBON := TRUE}
+{$setc TARGET_API_MAC_OS8 := FALSE}
+{$setc TARGET_API_MAC_OSX := TRUE}
+{$setc TARGET_CARBON := TRUE}
+{$setc TARGET_CPU_68K := FALSE}
+{$setc TARGET_CPU_MIPS := FALSE}
+{$setc TARGET_CPU_SPARC := FALSE}
+{$setc TARGET_OS_MAC := TRUE}
+{$setc TARGET_OS_UNIX := FALSE}
+{$setc TARGET_OS_WIN32 := FALSE}
+{$setc TARGET_RT_MAC_68881 := FALSE}
+{$setc TARGET_RT_MAC_CFM := FALSE}
+{$setc TARGET_RT_MAC_MACHO := TRUE}
+{$setc TYPED_FUNCTION_POINTERS := TRUE}
+{$setc TYPE_BOOL := FALSE}
+{$setc TYPE_EXTENDED := FALSE}
+{$setc TYPE_LONGLONG := TRUE}
+uses MacTypes;
+{$ALIGN POWER}
+
+
+// focus notifications
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMainWindowChangedNotification CFSTRP('AXMainWindowChanged')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXFocusedWindowChangedNotification CFSTRP('AXFocusedWindowChanged')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXFocusedUIElementChangedNotification CFSTRP('AXFocusedUIElementChanged')}
+{$endc}
+
+// application notifications
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXApplicationActivatedNotification CFSTRP('AXApplicationActivated')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXApplicationDeactivatedNotification CFSTRP('AXApplicationDeactivated')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXApplicationHiddenNotification CFSTRP('AXApplicationHidden')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXApplicationShownNotification CFSTRP('AXApplicationShown')}
+{$endc}
+
+// window notifications
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXWindowCreatedNotification CFSTRP('AXWindowCreated')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXWindowMovedNotification CFSTRP('AXWindowMoved')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXWindowResizedNotification CFSTRP('AXWindowResized')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXWindowMiniaturizedNotification CFSTRP('AXWindowMiniaturized')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXWindowDeminiaturizedNotification CFSTRP('AXWindowDeminiaturized')}
+{$endc}
+
+// new drawer, sheet, and help tag notifications
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDrawerCreatedNotification CFSTRP('AXDrawerCreated')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSheetCreatedNotification CFSTRP('AXSheetCreated')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXHelpTagCreatedNotification CFSTRP('AXHelpTagCreated')}
+{$endc}
+
+// element notifications
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXValueChangedNotification CFSTRP('AXValueChanged')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXUIElementDestroyedNotification CFSTRP('AXUIElementDestroyed')}
+{$endc}
+
+// menu notifications
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMenuOpenedNotification CFSTRP('AXMenuOpened')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMenuClosedNotification CFSTRP('AXMenuClosed')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMenuItemSelectedNotification CFSTRP('AXMenuItemSelected')}
+{$endc}
+
+// table/outline notifications
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXRowCountChangedNotification CFSTRP('AXRowCountChanged')}
+{$endc}
+
+// other notifications
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSelectedChildrenChangedNotification CFSTRP('AXSelectedChildrenChanged')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXResizedNotification CFSTRP('AXResized')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMovedNotification CFSTRP('AXMoved')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXCreatedNotification CFSTRP('AXCreated')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSelectedRowsChangedNotification CFSTRP('AXSelectedRowsChanged')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSelectedColumnsChangedNotification CFSTRP('AXSelectedColumnsChanged')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSelectedTextChangedNotification CFSTRP('AXSelectedTextChanged')}
+{$endc}
+
+
+end.

+ 487 - 0
packages/extra/univint/AXRoleConstants.pas

@@ -0,0 +1,487 @@
+{
+ *  AXRoleConstants.h
+ *  HIServices
+ *
+ *  Created by John Louch on Wed Feb 25 2004.
+ *  Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
+ *
+ }
+
+{	 Pascal Translation:  Gale R Paeper, <[email protected]>, 2006 }
+
+{
+    Modified for use with Free Pascal
+    Version 200
+    Please report any bugs to <[email protected]>
+}
+
+{$mode macpas}
+{$packenum 1}
+{$macro on}
+{$inline on}
+{$CALLING MWPASCAL}
+
+unit AXRoleConstants;
+interface
+{$setc UNIVERSAL_INTERFACES_VERSION := $0342}
+{$setc GAP_INTERFACES_VERSION := $0200}
+
+{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
+    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
+{$endc}
+
+{$ifc defined CPUPOWERPC and defined CPUI386}
+	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
+{$endc}
+{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
+	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
+{$endc}
+
+{$ifc not defined __ppc__ and defined CPUPOWERPC}
+	{$setc __ppc__ := 1}
+{$elsec}
+	{$setc __ppc__ := 0}
+{$endc}
+{$ifc not defined __i386__ and defined CPUI386}
+	{$setc __i386__ := 1}
+{$elsec}
+	{$setc __i386__ := 0}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
+	{$error Conflicting definitions for __ppc__ and __i386__}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__}
+	{$setc TARGET_CPU_PPC := TRUE}
+	{$setc TARGET_CPU_X86 := FALSE}
+{$elifc defined __i386__ and __i386__}
+	{$setc TARGET_CPU_PPC := FALSE}
+	{$setc TARGET_CPU_X86 := TRUE}
+{$elsec}
+	{$error Neither __ppc__ nor __i386__ is defined.}
+{$endc}
+{$setc TARGET_CPU_PPC_64 := FALSE}
+
+{$ifc defined FPC_BIG_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
+{$elifc defined FPC_LITTLE_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
+{$elsec}
+	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
+{$endc}
+{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
+{$setc CALL_NOT_IN_CARBON := FALSE}
+{$setc OLDROUTINENAMES := FALSE}
+{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
+{$setc OPAQUE_UPP_TYPES := TRUE}
+{$setc OTCARBONAPPLICATION := TRUE}
+{$setc OTKERNEL := FALSE}
+{$setc PM_USE_SESSION_APIS := TRUE}
+{$setc TARGET_API_MAC_CARBON := TRUE}
+{$setc TARGET_API_MAC_OS8 := FALSE}
+{$setc TARGET_API_MAC_OSX := TRUE}
+{$setc TARGET_CARBON := TRUE}
+{$setc TARGET_CPU_68K := FALSE}
+{$setc TARGET_CPU_MIPS := FALSE}
+{$setc TARGET_CPU_SPARC := FALSE}
+{$setc TARGET_OS_MAC := TRUE}
+{$setc TARGET_OS_UNIX := FALSE}
+{$setc TARGET_OS_WIN32 := FALSE}
+{$setc TARGET_RT_MAC_68881 := FALSE}
+{$setc TARGET_RT_MAC_CFM := FALSE}
+{$setc TARGET_RT_MAC_MACHO := TRUE}
+{$setc TYPED_FUNCTION_POINTERS := TRUE}
+{$setc TYPE_BOOL := FALSE}
+{$setc TYPE_EXTENDED := FALSE}
+{$setc TYPE_LONGLONG := TRUE}
+uses MacTypes;
+{$ALIGN POWER}
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Roles                                                                                }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+	Every role offers a variety of attributes. There are some attributes that must be
+	supported by every element, regardless of role. Other attributes will be supported
+	by an element if/when appropriate data is supplied by the application. These
+	attributes' meanings and values are generally obvious. In order to save space, the
+	following attributes are not listed in the role documentation unless the role
+	handles them in a special fashion:
+	
+		AXRole
+		AXRoleDescription
+		AXDescription
+		AXHelp
+		AXParent
+		AXChildren
+		AXWindow
+		AXTopLevelUIElement
+		AXEnabled
+		AXSize
+		AXPosition
+	
+	Every attribute supported by a given role may have one or more symbols after its
+	name:
+		w means the attribute is writable.
+		o means it is an optional attribute that doesn't necessarily need to be
+			supported by all elements with that role.
+
+	TBD:
+		Add a general section answering the following questions:
+			When and why would a developer create a new role?
+			When and why would a developer create a new subrole?
+		Add a Quick Reference section, like the one at the top of the attributes.
+}
+
+// standard roles
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXApplicationRole CFSTRP('AXApplication')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSystemWideRole CFSTRP('AXSystemWide')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXWindowRole CFSTRP('AXWindow')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSheetRole CFSTRP('AXSheet')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDrawerRole CFSTRP('AXDrawer')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXGrowAreaRole CFSTRP('AXGrowArea')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXImageRole CFSTRP('AXImage')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXUnknownRole CFSTRP('AXUnknown')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXButtonRole CFSTRP('AXButton')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXRadioButtonRole CFSTRP('AXRadioButton')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXCheckBoxRole CFSTRP('AXCheckBox')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXPopUpButtonRole CFSTRP('AXPopUpButton')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMenuButtonRole CFSTRP('AXMenuButton')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXTabGroupRole CFSTRP('AXTabGroup')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXTableRole CFSTRP('AXTable')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXColumnRole CFSTRP('AXColumn')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXRowRole CFSTRP('AXRow')}
+{$endc}
+
+
+{
+	kAXOutlineRole
+	
+	An element that contains row-based data. It may use disclosure triangles to manage the
+	display of hierarchies within the data. It may arrange each row's data into columns and
+	offer a header button above each column. The best example is the list view in a Finder
+	window or Open/Save dialog.
+
+	Outlines are typically children of AXScrollAreas, which manages the horizontal and/or
+	vertical scrolling for the outline. Outlines are expected to follow certain conventions
+	with respect to their hierarchy of sub-elements. In particular, if the outline uses
+	columns, the data should be accessible via either rows or columns. Thus, the data in a
+	given cell will be represented as two diffrent elements. Here's a hierarchy for a
+	typical outline:
+	
+		AXScrollArea (parent of the outline)
+			AXScrollBar (if necessary, horizontal)
+			AXScrollBar (if necessary, vertical)
+			AXOutline
+				AXGroup (header buttons, optional)
+					AXButton, AXMenuButton, or <Varies> (header button)
+					...
+				AXRow (first row)
+					AXStaticText (just one possible example)
+					AXButton (just another possible example)
+					AXTextField (ditto)
+					AXCheckBox (ditto)
+				AXRow (as above)
+				...
+				AXColumn (first column)
+					AXStaticText (assumes the first column displays text)
+					AXStaticText
+					...
+				AXColumn (second column)
+					AXButton (assumes the second column displays buttons)
+					AXButton
+					...
+				...
+				
+    Attributes:
+        AXFocused (w)
+        AXRows - Array of subset of AXChildren that are rows.
+        AXVisibleRows - Array of subset of AXRows that are visible.
+        AXSelectedRows (w) Array of subset of AXRows that are selected.
+        AXColumns - Array of subset of children that are columns.
+        AXVisibleColumns - Array of subset of columns that are visible.
+        AXSelectedColumns (o) Array of subset of columns that are selected.
+        AXHeader (o) The AXGroup element that contains the header buttons.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXOutlineRole CFSTRP('AXOutline')}
+{$endc}
+
+
+{
+	kAXBrowserRole
+	
+	An element that contains columns of hierarchical data. Examples include the column view
+	in Finder windows and Open/Save dialogs. Carbon's Data Browser in column view mode
+	represents itself as an AXBrowser. Cocoa's NSBrowser represents itself as an AXBrowser.
+	
+	Browser elements are expected to have a particular hierarchy of sub-elements within it.
+	In particular, the child of an AXBrowser must be an AXScrollArea that manages the
+	horizontal scrolling. The horizontal AXScrollArea must include a child for each column
+	the interface displays. Columns can be any role that makes sense. Typically, columns
+	are vertical AXScrollAreas with AXList children. Here's a hierarchy for a typical
+	browser:
+	
+		AXBrowser
+			AXScrollArea (manages the horizontal scrolling)
+				AXScrollBar (horizontal scroll bar)
+				AXScrollArea (first column)
+					AXScrollBar (column's vertical scroll bar)
+					AXList (column content is typically a list, but it could be another role)
+						<Varies> (cell)
+						...
+						<Varies> (cell)
+				AXScrollArea (second column)
+					...
+				AXScrollArea (third column)
+					...
+				AXGroup (preview column)
+					...
+	
+	Attributes:
+		AXFocused (w)
+		AXColumns - Array of the grandchild column elements, which are typically
+			of the AXScrollArea role.
+		AXVisibleColumns - Array of the subset of elements in the AXColumns array
+			that are currently visible.
+		AXColumnTitles (o)
+		AXHorizontalScrollBar - The horizontal AXScrollBar of the browser's child
+			AXScrollArea.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXBrowserRole CFSTRP('AXBrowser')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXScrollAreaRole CFSTRP('AXScrollArea')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXScrollBarRole CFSTRP('AXScrollBar')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXRadioGroupRole CFSTRP('AXRadioGroup')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXListRole CFSTRP('AXList')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXGroupRole CFSTRP('AXGroup')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXValueIndicatorRole CFSTRP('AXValueIndicator')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXComboBoxRole CFSTRP('AXComboBox')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSliderRole CFSTRP('AXSlider')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXIncrementorRole CFSTRP('AXIncrementor')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXBusyIndicatorRole CFSTRP('AXBusyIndicator')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXProgressIndicatorRole CFSTRP('AXProgressIndicator')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXRelevanceIndicatorRole CFSTRP('AXRelevanceIndicator')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXToolbarRole CFSTRP('AXToolbar')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDisclosureTriangleRole CFSTRP('AXDisclosureTriangle')}
+{$endc}
+
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXTextFieldRole CFSTRP('AXTextField')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXTextAreaRole CFSTRP('AXTextArea')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXStaticTextRole CFSTRP('AXStaticText')}
+{$endc}
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMenuBarRole CFSTRP('AXMenuBar')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMenuBarItemRole CFSTRP('AXMenuBarItem')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMenuRole CFSTRP('AXMenu')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMenuItemRole CFSTRP('AXMenuItem')}
+{$endc}
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSplitGroupRole CFSTRP('AXSplitGroup')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSplitterRole CFSTRP('AXSplitter')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXColorWellRole CFSTRP('AXColorWell')}
+{$endc}
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXTimeFieldRole CFSTRP('AXTimeField')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDateFieldRole CFSTRP('AXDateField')}
+{$endc}
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXHelpTagRole CFSTRP('AXHelpTag')}
+{$endc}
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMatteRole CFSTRP('AXMatteRole')}
+{$endc}
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDockItemRole CFSTRP('AXDockItem')}
+{$endc}
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXRulerRole CFSTRP('AXRuler')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXRulerMarkerRole CFSTRP('AXRulerMarker')}
+{$endc}
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Subroles                                                                                }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+// standard subroles
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXCloseButtonSubrole CFSTRP('AXCloseButton')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMinimizeButtonSubrole CFSTRP('AXMinimizeButton')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXZoomButtonSubrole CFSTRP('AXZoomButton')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXToolbarButtonSubrole CFSTRP('AXToolbarButton')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSecureTextFieldSubrole CFSTRP('AXSecureTextField')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXTableRowSubrole CFSTRP('AXTableRow')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXOutlineRowSubrole CFSTRP('AXOutlineRow')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXUnknownSubrole CFSTRP('AXUnknown')}
+{$endc}
+
+// new subroles
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXStandardWindowSubrole CFSTRP('AXStandardWindow')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDialogSubrole CFSTRP('AXDialog')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSystemDialogSubrole CFSTRP('AXSystemDialog')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXFloatingWindowSubrole CFSTRP('AXFloatingWindow')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSystemFloatingWindowSubrole CFSTRP('AXSystemFloatingWindow')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXIncrementArrowSubrole CFSTRP('AXIncrementArrow')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDecrementArrowSubrole CFSTRP('AXDecrementArrow')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXIncrementPageSubrole CFSTRP('AXIncrementPage')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDecrementPageSubrole CFSTRP('AXDecrementPage')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSortButtonSubrole CFSTRP('AXSortButton')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSearchFieldSubrole CFSTRP('AXSearchField')}
+{$endc}
+
+// dock subroles
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXApplicationDockItemSubrole CFSTRP('AXApplicationDockItem')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDocumentDockItemSubrole CFSTRP('AXDocumentDockItem')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXFolderDockItemSubrole CFSTRP('AXFolderDockItem')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMinimizedWindowDockItemSubrole CFSTRP('AXMinimizedWindowDockItem')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXURLDockItemSubrole CFSTRP('AXURLDockItem')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDockExtraDockItemSubrole CFSTRP('AXDockExtraDockItem')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXTrashDockItemSubrole CFSTRP('AXTrashDockItem')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXProcessSwitcherListSubrole CFSTRP('AXProcessSwitcherList')}
+{$endc}
+
+
+end.

+ 137 - 0
packages/extra/univint/AXTextAttributedString.pas

@@ -0,0 +1,137 @@
+{
+ *  AXTextAttributedString.h
+ *
+ *  Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+ *
+ }
+
+{	 Pascal Translation:  Gale R Paeper, <[email protected]>, 2006 }
+
+{
+    Modified for use with Free Pascal
+    Version 200
+    Please report any bugs to <[email protected]>
+}
+
+{$mode macpas}
+{$packenum 1}
+{$macro on}
+{$inline on}
+{$CALLING MWPASCAL}
+
+unit AXTextAttributedString;
+interface
+{$setc UNIVERSAL_INTERFACES_VERSION := $0342}
+{$setc GAP_INTERFACES_VERSION := $0200}
+
+{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
+    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
+{$endc}
+
+{$ifc defined CPUPOWERPC and defined CPUI386}
+	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
+{$endc}
+{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
+	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
+{$endc}
+
+{$ifc not defined __ppc__ and defined CPUPOWERPC}
+	{$setc __ppc__ := 1}
+{$elsec}
+	{$setc __ppc__ := 0}
+{$endc}
+{$ifc not defined __i386__ and defined CPUI386}
+	{$setc __i386__ := 1}
+{$elsec}
+	{$setc __i386__ := 0}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
+	{$error Conflicting definitions for __ppc__ and __i386__}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__}
+	{$setc TARGET_CPU_PPC := TRUE}
+	{$setc TARGET_CPU_X86 := FALSE}
+{$elifc defined __i386__ and __i386__}
+	{$setc TARGET_CPU_PPC := FALSE}
+	{$setc TARGET_CPU_X86 := TRUE}
+{$elsec}
+	{$error Neither __ppc__ nor __i386__ is defined.}
+{$endc}
+{$setc TARGET_CPU_PPC_64 := FALSE}
+
+{$ifc defined FPC_BIG_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
+{$elifc defined FPC_LITTLE_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
+{$elsec}
+	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
+{$endc}
+{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
+{$setc CALL_NOT_IN_CARBON := FALSE}
+{$setc OLDROUTINENAMES := FALSE}
+{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
+{$setc OPAQUE_UPP_TYPES := TRUE}
+{$setc OTCARBONAPPLICATION := TRUE}
+{$setc OTKERNEL := FALSE}
+{$setc PM_USE_SESSION_APIS := TRUE}
+{$setc TARGET_API_MAC_CARBON := TRUE}
+{$setc TARGET_API_MAC_OS8 := FALSE}
+{$setc TARGET_API_MAC_OSX := TRUE}
+{$setc TARGET_CARBON := TRUE}
+{$setc TARGET_CPU_68K := FALSE}
+{$setc TARGET_CPU_MIPS := FALSE}
+{$setc TARGET_CPU_SPARC := FALSE}
+{$setc TARGET_OS_MAC := TRUE}
+{$setc TARGET_OS_UNIX := FALSE}
+{$setc TARGET_OS_WIN32 := FALSE}
+{$setc TARGET_RT_MAC_68881 := FALSE}
+{$setc TARGET_RT_MAC_CFM := FALSE}
+{$setc TARGET_RT_MAC_MACHO := TRUE}
+{$setc TYPED_FUNCTION_POINTERS := TRUE}
+{$setc TYPE_BOOL := FALSE}
+{$setc TYPE_EXTENDED := FALSE}
+{$setc TYPE_LONGLONG := TRUE}
+uses MacTypes, CFBase;
+{$ALIGN POWER}
+
+var kAXFontTextAttribute: CFStringRef; external name '_kAXFontTextAttribute'; (* attribute const *)		// CFDictionaryRef - see kAXFontTextAttribute keys below
+var kAXForegroundColorTextAttribute: CFStringRef; external name '_kAXForegroundColorTextAttribute'; (* attribute const *)	// CGColorRef
+var kAXBackgroundColorTextAttribute: CFStringRef; external name '_kAXBackgroundColorTextAttribute'; (* attribute const *)	// CGColorRef
+var kAXUnderlineColorTextAttribute: CFStringRef; external name '_kAXUnderlineColorTextAttribute'; (* attribute const *)	// CGColorRef
+var kAXStrikethroughColorTextAttribute: CFStringRef; external name '_kAXStrikethroughColorTextAttribute'; (* attribute const *)	// CGColorRef
+var kAXUnderlineTextAttribute: CFStringRef; external name '_kAXUnderlineTextAttribute'; (* attribute const *)		// CFNumberRef - AXUnderlineStyle
+var kAXSuperscriptTextAttribute: CFStringRef; external name '_kAXSuperscriptTextAttribute'; (* attribute const *)		// CFNumberRef = + number for superscript - for subscript
+var kAXStrikethroughTextAttribute: CFStringRef; external name '_kAXStrikethroughTextAttribute'; (* attribute const *)	// CFBooleanRef
+var kAXShadowTextAttribute: CFStringRef; external name '_kAXShadowTextAttribute'; (* attribute const *)		// CFBooleanRef
+
+var kAXAttachmentTextAttribute: CFStringRef; external name '_kAXAttachmentTextAttribute'; (* attribute const *)		// AXUIElementRef
+var kAXLinkTextAttribute: CFStringRef; external name '_kAXLinkTextAttribute'; (* attribute const *)		// AXUIElementRef
+
+var kAXNaturalLanguageTextAttribute: CFStringRef; external name '_kAXNaturalLanguageTextAttribute'; (* attribute const *)	// CFStringRef - the spoken language of the text
+var kAXReplacementStringTextAttribute: CFStringRef; external name '_kAXReplacementStringTextAttribute'; (* attribute const *)	// CFStringRef
+
+var kAXMisspelledTextAttribute: CFStringRef; external name '_kAXMisspelledTextAttribute'; (* attribute const *)		// AXUIElementRef
+
+// kAXFontTextAttribute keys
+var kAXFontNameKey: CFStringRef; external name '_kAXFontNameKey'; (* attribute const *)		// CFStringRef - required
+var kAXFontFamilyKey: CFStringRef; external name '_kAXFontFamilyKey'; (* attribute const *)		// CFStringRef - not required
+var kAXVisibleNameKey: CFStringRef; external name '_kAXVisibleNameKey'; (* attribute const *)		// CFStringRef - not required
+var kAXFontSizeKey: CFStringRef; external name '_kAXFontSizeKey'; (* attribute const *)		// CFNumberRef - required
+
+const
+	kAXUnderlineStyleNone = $0;
+	kAXUnderlineStyleSingle = $1;
+	kAXUnderlineStyleThick = $2;
+	kAXUnderlineStyleDouble = $9;
+type
+	AXUnderlineStyle = UInt32;
+
+
+// DO NOT USE. This is an old, misspelled version of one of the above constants.
+var kAXForegoundColorTextAttribute: CFStringRef; external name '_kAXForegoundColorTextAttribute'; (* attribute const *)	// CGColorRef
+
+end.

+ 25 - 2
packages/extra/univint/AXUIElement.pas

@@ -5,7 +5,7 @@
  *
  }
 {	  Pascal Translation:  Peter N Lewis, <[email protected]>, 2004 }
-
+{     Pascal Translation Updated:  Gale R Paeper, <[email protected]>, 2006 }
 
 {
     Modified for use with Free Pascal
@@ -99,10 +99,21 @@ uses MacTypes,CFBase,CFArray,AXErrors,CFRunLoop,CGRemoteOperation,MacOSXPosix;
 {$ALIGN MAC68K}
 
 function AXAPIEnabled: Boolean; external name '_AXAPIEnabled';
+function AXIsProcessTrusted: Boolean; external name '_AXIsProcessTrusted';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+// must be called with root privs
+function AXMakeProcessTrusted( executablePath: CFStringRef ): AXError; external name '_AXMakeProcessTrusted';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
 
 type
 	AXUIElementRef    = ^SInt32; { an opaque 32-bit type }
 
+const
+	kAXCopyMultipleAttributeOptionStopOnError = $1;
+type
+	AXCopyMultipleAttributeOptions = UInt32;
+
+
 function AXUIElementGetTypeID: CFTypeID; external name '_AXUIElementGetTypeID';
 
 function AXUIElementCopyAttributeNames( element: AXUIElementRef; var names: CFArrayRef ): AXError; external name '_AXUIElementCopyAttributeNames';
@@ -111,9 +122,13 @@ function AXUIElementGetAttributeValueCount( element: AXUIElementRef; attribute:
 function AXUIElementCopyAttributeValues( element: AXUIElementRef; attribute: CFStringRef; index: CFIndex; maxValues: CFIndex; var values: CFArrayRef ): AXError; external name '_AXUIElementCopyAttributeValues';
 function AXUIElementIsAttributeSettable( element: AXUIElementRef; attribute: CFStringRef; var settable: Boolean ): AXError; external name '_AXUIElementIsAttributeSettable';
 function AXUIElementSetAttributeValue( element: AXUIElementRef; attribute: CFStringRef; value: CFTypeRef ): AXError; external name '_AXUIElementSetAttributeValue';
+function AXUIElementCopyMultipleAttributeValues( element: AXUIElementRef; attributes: CFArrayRef; options: AXCopyMultipleAttributeOptions; var values: CFArrayRef ): AXError; external name '_AXUIElementCopyMultipleAttributeValues';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
 
 function AXUIElementCopyParameterizedAttributeNames( element: AXUIElementRef; var names: CFArrayRef ): AXError; external name '_AXUIElementCopyParameterizedAttributeNames';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
 function AXUIElementCopyParameterizedAttributeValue( element: AXUIElementRef; parameterizedAttribute: CFStringRef; parameter: CFTypeRef; var result: CFTypeRef ): AXError; external name '_AXUIElementCopyParameterizedAttributeValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
 
 function AXUIElementCopyActionNames( element: AXUIElementRef; var names: CFArrayRef ): AXError; external name '_AXUIElementCopyActionNames';
 function AXUIElementCopyActionDescription( element: AXUIElementRef; action: CFStringRef; var description: CFStringRef ): AXError; external name '_AXUIElementCopyActionDescription';
@@ -126,6 +141,13 @@ function AXUIElementCreateSystemWide: AXUIElementRef; external name '_AXUIElemen
 
 function AXUIElementGetPid( element: AXUIElementRef; var pid: pid_t ): AXError; external name '_AXUIElementGetPid';
 
+// pass the SystemWide element (AXUIElementCreateSystemWide) if you want to set the timeout globally for this process
+// setting the timeout on another AXUIElementRef sets it only for that ref, not for other AXUIElementRef(s) that are
+// equal to it.
+// setting timeout to 0 makes this element use the global timeout
+function AXUIElementSetMessagingTimeout( element: AXUIElementRef; timeoutInSeconds: Float32 ): AXError; external name '_AXUIElementSetMessagingTimeout';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
 // see CGRemoteOperation.h for documentation of parameters
 // you can only pass the root or application uielement
 function AXUIElementPostKeyboardEvent( application: AXUIElementRef; keyChar: CGCharCode; virtualKey: CGKeyCode; keyDown: Boolean ): AXError; external name '_AXUIElementPostKeyboardEvent';
@@ -135,7 +157,8 @@ function AXUIElementPostKeyboardEvent( application: AXUIElementRef; keyChar: CGC
 type
 	AXObserverRef    = ^SInt32; { an opaque 32-bit type }
 
-type AXObserverCallback = procedure( observer: AXObserverRef; element: AXUIElementRef; notification: CFStringRef; refcon: UnivPtr );
+type
+    AXObserverCallback = procedure( observer: AXObserverRef; element: AXUIElementRef; notification: CFStringRef; refcon: UnivPtr );
 
 function AXObserverGetTypeID: CFTypeID; external name '_AXObserverGetTypeID';
 

+ 4 - 1
packages/extra/univint/AXValue.pas

@@ -6,7 +6,7 @@
  *
  }
 {	  Pascal Translation:  Peter N Lewis, <[email protected]>, 2004 }
-
+{     Pascal Translation Updated:  Gale R Paeper, <[email protected]>, 2006 }
 
 {
     Modified for use with Free Pascal
@@ -108,6 +108,9 @@ const
     { Types from CFBase.h }
     kAXValueCFRangeType = 4;
 
+    { Types from AXError.h }
+    kAXValueAXErrorType = 5;
+
     { Other }
     kAXValueIllegalType = 0;
 

+ 127 - 0
packages/extra/univint/AXValueConstants.pas

@@ -0,0 +1,127 @@
+{
+ *  AXValueConstants.h
+ *  HIServices
+ *
+ *  Created by John Louch on Wed Feb 25 2004.
+ *  Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
+ *
+ }
+
+{	 Pascal Translation:  Gale R Paeper, <[email protected]>, 2006 }
+
+{
+    Modified for use with Free Pascal
+    Version 200
+    Please report any bugs to <[email protected]>
+}
+
+{$mode macpas}
+{$packenum 1}
+{$macro on}
+{$inline on}
+{$CALLING MWPASCAL}
+
+unit AXValueConstants;
+interface
+{$setc UNIVERSAL_INTERFACES_VERSION := $0342}
+{$setc GAP_INTERFACES_VERSION := $0200}
+
+{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
+    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
+{$endc}
+
+{$ifc defined CPUPOWERPC and defined CPUI386}
+	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
+{$endc}
+{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
+	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
+{$endc}
+
+{$ifc not defined __ppc__ and defined CPUPOWERPC}
+	{$setc __ppc__ := 1}
+{$elsec}
+	{$setc __ppc__ := 0}
+{$endc}
+{$ifc not defined __i386__ and defined CPUI386}
+	{$setc __i386__ := 1}
+{$elsec}
+	{$setc __i386__ := 0}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
+	{$error Conflicting definitions for __ppc__ and __i386__}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__}
+	{$setc TARGET_CPU_PPC := TRUE}
+	{$setc TARGET_CPU_X86 := FALSE}
+{$elifc defined __i386__ and __i386__}
+	{$setc TARGET_CPU_PPC := FALSE}
+	{$setc TARGET_CPU_X86 := TRUE}
+{$elsec}
+	{$error Neither __ppc__ nor __i386__ is defined.}
+{$endc}
+{$setc TARGET_CPU_PPC_64 := FALSE}
+
+{$ifc defined FPC_BIG_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
+{$elifc defined FPC_LITTLE_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
+{$elsec}
+	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
+{$endc}
+{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
+{$setc CALL_NOT_IN_CARBON := FALSE}
+{$setc OLDROUTINENAMES := FALSE}
+{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
+{$setc OPAQUE_UPP_TYPES := TRUE}
+{$setc OTCARBONAPPLICATION := TRUE}
+{$setc OTKERNEL := FALSE}
+{$setc PM_USE_SESSION_APIS := TRUE}
+{$setc TARGET_API_MAC_CARBON := TRUE}
+{$setc TARGET_API_MAC_OS8 := FALSE}
+{$setc TARGET_API_MAC_OSX := TRUE}
+{$setc TARGET_CARBON := TRUE}
+{$setc TARGET_CPU_68K := FALSE}
+{$setc TARGET_CPU_MIPS := FALSE}
+{$setc TARGET_CPU_SPARC := FALSE}
+{$setc TARGET_OS_MAC := TRUE}
+{$setc TARGET_OS_UNIX := FALSE}
+{$setc TARGET_OS_WIN32 := FALSE}
+{$setc TARGET_RT_MAC_68881 := FALSE}
+{$setc TARGET_RT_MAC_CFM := FALSE}
+{$setc TARGET_RT_MAC_MACHO := TRUE}
+{$setc TYPED_FUNCTION_POINTERS := TRUE}
+{$setc TYPE_BOOL := FALSE}
+{$setc TYPE_EXTENDED := FALSE}
+{$setc TYPE_LONGLONG := TRUE}
+uses MacTypes;
+{$ALIGN POWER}
+
+
+// orientations (see kAXOrientationAttribute in AXAttributeConstants.h)
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXHorizontalOrientationValue CFSTRP('AXHorizontalOrientation')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXVerticalOrientationValue CFSTRP('AXVerticalOrientation')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXUnknownOrientationValue CFSTRP('AXUnknownOrientation')}
+{$endc}
+
+// sort directions (see kAXSortDirectionAttribute in AXAttributeConstants.h)
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXAscendingSortDirectionValue CFSTRP('AXAscendingSortDirection')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDescendingSortDirectionValue CFSTRP('AXDescendingSortDirection')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXUnknownSortDirectionValue CFSTRP('AXUnknownSortDirection')}
+{$endc}
+
+
+end.

+ 306 - 1
packages/extra/univint/AppleEvents.pas

@@ -104,7 +104,7 @@ interface
 {$setc TYPE_BOOL := FALSE}
 {$setc TYPE_EXTENDED := FALSE}
 {$setc TYPE_LONGLONG := TRUE}
-uses MacTypes,MixedMode,AEDataModel,AEInteraction;
+uses MacTypes,MixedMode,AEDataModel,AEInteraction, CFArray, CFBase, CFRunLoop, CFStream, CFURL;
 {
     Note:   The functions and types for the building and parsing AppleEvent  
             messages has moved to AEDataModel.h
@@ -141,6 +141,7 @@ const
 	kAEAnswer					= $616E7372 (* 'ansr' *);
 	kAEApplicationDied			= $6F626974 (* 'obit' *);
 	kAEShowPreferences			= $70726566 (* 'pref' *);						{  sent by Mac OS X when the user chooses the Preferences item  }
+	kAEAutosaveNow              = $61736176 (* 'asav' *);                       { sent by Mac OS X when it is advisable to autosave all the user's documents with uncommitted changes. }
 
 	{	 Constants for recording 	}
 	kAEStartRecording			= $72656361 (* 'reca' *);						{  available only in vers 1.0.1 and greater  }
@@ -172,6 +173,9 @@ const
 	{
 	 *  AEInstallEventHandler()
 	 *  
+	 *  Mac OS X threading:
+	 *    Thread safe since version 10.2
+	 *  
 	 *  Availability:
 	 *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
 	 *    CarbonLib:        in CarbonLib 1.0 and later
@@ -181,6 +185,9 @@ function AEInstallEventHandler(theAEEventClass: AEEventClass; theAEEventID: AEEv
 {
  *  AERemoveEventHandler()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -190,6 +197,9 @@ function AERemoveEventHandler(theAEEventClass: AEEventClass; theAEEventID: AEEve
 {
  *  AEGetEventHandler()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -203,6 +213,9 @@ function AEGetEventHandler(theAEEventClass: AEEventClass; theAEEventID: AEEventI
 {
  *  AEInstallSpecialHandler()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -212,6 +225,9 @@ function AEInstallSpecialHandler(functionClass: AEKeyword; handler: AEEventHandl
 {
  *  AERemoveSpecialHandler()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -221,6 +237,9 @@ function AERemoveSpecialHandler(functionClass: AEKeyword; handler: AEEventHandle
 {
  *  AEGetSpecialHandler()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -236,12 +255,298 @@ function AEGetSpecialHandler(functionClass: AEKeyword; var handler: AEEventHandl
 {
  *  AEManagerInfo()
  *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
+ *  
  *  Availability:
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Mac OS X:         in version 10.0 and later
  }
 function AEManagerInfo(keyWord: AEKeyword; var result: SInt32): OSErr; external name '_AEManagerInfo';
+
+{
+  AERemoteProcessResolver:
+  
+  These calls subsume the functionality of using the PPCToolbox on Mac
+  OS 9 to locate processes on remote computers.  (PPCToolbox is not
+  part of Carbon.)  These calls are supported on Mac OS X 10.3 or
+  later.
+  
+  The model is to create a resolver for a particular URL and schedule
+  it on a CFRunLoop to retrieve the results asynchronously.  If
+  synchronous behavior is desired, just call
+  AERemoteProcessResolverGetProcesses to get the array; the call will
+  block until the request is completed.
+  
+  A resolver can only be used once; once it has fetched the data or
+  gotten an error it can no longer be scheduled.
+  
+  The data obtained from the resolver is a CFArrayRef of
+  CFDictionaryRef objects.  Each dictionary contains the URL of the
+  remote application and its human readable name.
+}
+
+{
+ *  kAERemoteProcessURLKey
+ *  
+ *  Discussion:
+ *    the full URL to this application, a CFURLRef.
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kAERemoteProcessURLKey: CFStringRef; external name '_kAERemoteProcessURLKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{
+ *  kAERemoteProcessNameKey
+ *  
+ *  Discussion:
+ *    the visible name to this application, in the localization
+ *    supplied by the server, a CFStringRef.
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kAERemoteProcessNameKey: CFStringRef; external name '_kAERemoteProcessNameKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{
+ *  kAERemoteProcessUserIDKey
+ *  
+ *  Discussion:
+ *    the userid of this application, if available.  If present, a
+ *    CFNumberRef.
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kAERemoteProcessUserIDKey: CFStringRef; external name '_kAERemoteProcessUserIDKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{
+ *  kAERemoteProcessProcessIDKey
+ *  
+ *  Discussion:
+ *    the process id of this application, if available.  If present, a
+ *    CFNumberRef.
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kAERemoteProcessProcessIDKey: CFStringRef; external name '_kAERemoteProcessProcessIDKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{
+ *  AERemoteProcessResolverContext
+ *  
+ *  Discussion:
+ *    An optional context parameter for asynchronous resolution.  The
+ *    context is copied and the info pointer retained.  When the
+ *    callback is made, the info pointer is passed to the callback.
+ }
+type
+	AERemoteProcessResolverContext = record
+{
+   * set to zero (0)
+   }
+		version: CFIndex;
+
+  {
+   * info pointer to be passed to the callback
+   }
+		info: UnivPtr;
+
+  {
+   * callback made on the info pointer. This field may be NULL.
+   }
+		retain: CFAllocatorRetainCallBack;
+
+  {
+   * callback made on the info pointer. This field may be NULL.
+   }
+		release: CFAllocatorReleaseCallBack;
+
+  {
+   * callback made on the info pointer. This field may be NULL.
+   }
+		copyDescription: CFAllocatorCopyDescriptionCallBack;
+	end;
+
+    AERemoteProcessResolverContextPtr = ^AERemoteProcessResolverContext; { when a var xx: AERemoteProcessResolverContext parameter can be nil, it is changed to xx: AERemoteProcessResolverContextPtr }
+
+{
+ *  AERemoteProcessResolverRef
+ *  
+ *  Discussion:
+ *    An opaque reference to an object that encapsulates the mechnanism
+ *    by which a list of processes running on a remote machine are
+ *    obtained.  Created by AECreateRemoteProcessResolver, and must be
+ *    disposed of by AEDisposeRemoteProcessResolver. A
+ *    AERemoteProcessResolverRef is not a CFType.
+ }
+type
+	AERemoteProcessResolverRef = ^SInt32; { an opaque 32-bit type }
+{
+ *  AECreateRemoteProcessResolver()
+ *  
+ *  Discussion:
+ *    Create a Remote Process List Resolver object.  The allocator is
+ *    used for any CoreFoundation types created or returned by this
+ *    API.  The resulting object can be scheduled on a run loop, or
+ *    queried synchronously.  Once the object has retreived results
+ *    from the server, or got an error doing so, it will not re-fetch
+ *    the data.  To retrieve a new list of processes, create a new
+ *    instance of this object.
+ *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.3
+ *  
+ *  Parameters:
+ *    
+ *    allocator:
+ *      a CFAllocatorRef to use when creating CFTypes
+ *    
+ *    url:
+ *      a CFURL identifying the remote host and port.
+ *  
+ *  Result:
+ *    a AECreateRemoteProcessResolverRef, which must be disposed of
+ *    with AEDisposeRemoteProcessResolver.
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+function AECreateRemoteProcessResolver( allocator: CFAllocatorRef; url: CFURLRef ): AERemoteProcessResolverRef; external name '_AECreateRemoteProcessResolver';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ *  AEDisposeRemoteProcessResolver()
+ *  
+ *  Discussion:
+ *    Disposes of a AERemoteProcessResolverRef.  If this resolver is
+ *    currently scheduled on a run loop, it is unscheduled.  In this
+ *    case, the asynchronous callback will not be executed.
+ *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.3
+ *  
+ *  Parameters:
+ *    
+ *    ref:
+ *      The AERemoteProcessResolverRef to dispose
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+procedure AEDisposeRemoteProcessResolver( ref: AERemoteProcessResolverRef ); external name '_AEDisposeRemoteProcessResolver';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ *  AERemoteProcessResolverGetProcesses()
+ *  
+ *  Discussion:
+ *    Returns a CFArrayRef containing CFDictionary objects containing
+ *    information about processses running on a remote machine.  If the
+ *    result array is NULL, the query failed and the error out
+ *    parameter will contain information about the failure.  If the
+ *    resolver had not been previously scheduled for execution, this
+ *    call will block until the resulting array is available or an
+ *    error occurs.  If the resolver had been scheduled but had not yet
+ *    completed fetching the array, this call will block until the
+ *    resolver does complete.  The array returned is owned by the
+ *    resolver, so callers must retain it before disposing of the
+ *    resolver object itself.
+ *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.3
+ *  
+ *  Parameters:
+ *    
+ *    ref:
+ *      The AERemoteProcessResolverRef to query
+ *    
+ *    outError:
+ *      If the result is NULL, outError will contain a CFStreamError
+ *      with information about the type of failure
+ *  
+ *  Result:
+ *    a CFArray of CFDictionary objects containing information about
+ *    the remote applications.
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+function AERemoteProcessResolverGetProcesses( ref: AERemoteProcessResolverRef; var outError: CFStreamError ): CFArrayRef; external name '_AERemoteProcessResolverGetProcesses';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ *  AERemoteProcessResolverCallback
+ *  
+ *  Discussion:
+ *    A callback made when the asynchronous execution of a resolver
+ *    completes, either due to success or failure. The data itself
+ *    should be obtained with AERemoteProcessResolverGetProcesses.
+ }
+type
+	AERemoteProcessResolverCallback = procedure( ref: AERemoteProcessResolverRef; info: UnivPtr );
+{
+ *  AERemoteProcessResolverScheduleWithRunLoop()
+ *  
+ *  Discussion:
+ *    Schedules a resolver for execution on a given runloop in a given
+ *    mode.   The resolver will move through various internal states as
+ *    long as the specified run loop is run.  When the resolver
+ *    completes, either with success or an error condition, the
+ *    callback is executed.  There is no explicit unschedule of the
+ *    resolver; you must dispose of it to remove it from the run loop.
+ *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.3
+ *  
+ *  Parameters:
+ *    
+ *    ref:
+ *      The AERemoteProcessResolverRef to scheduile
+ *    
+ *    runLoop:
+ *      a CFRunLoop
+ *    
+ *    runLoopMode:
+ *      a CFString specifying the run loop mode
+ *    
+ *    callback:
+ *      a callback to be executed when the reolver completes
+ *    
+ *    ctx:
+ *      a AERemoteProcessResolverContext.  If this parameter is not
+ *      NULL, the info field of this structure will be passed to the
+ *      callback (otherwise, the callback info parameter will
+ *      explicitly be NULL.)
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+procedure AERemoteProcessResolverScheduleWithRunLoop( ref: AERemoteProcessResolverRef; runLoop: CFRunLoopRef; runLoopMode: CFStringRef; callback: AERemoteProcessResolverCallback; {const} ctx: AERemoteProcessResolverContextPtr { can be NULL } ); external name '_AERemoteProcessResolverScheduleWithRunLoop';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
 {$ALIGN MAC68K}
 
 

+ 2671 - 0
packages/extra/univint/AudioHardware.pas

@@ -0,0 +1,2671 @@
+{==================================================================================================
+     File:       CoreAudio/AudioHardware.h
+
+     Contains:   API for communicating with audio hardware.
+
+     Version:    Technology: Mac OS X
+                 Release:    Mac OS X
+
+     Copyright:  (c) 1985-2005 by Apple Computer, Inc., all rights reserved.
+
+==================================================================================================}
+
+{	 Pascal Translation:  Gale R Paeper, <[email protected]>, 2006 }
+
+{
+    Modified for use with Free Pascal
+    Version 200
+    Please report any bugs to <[email protected]>
+}
+
+{$mode macpas}
+{$packenum 1}
+{$macro on}
+{$inline on}
+{$CALLING MWPASCAL}
+
+unit AudioHardware;
+interface
+{$setc UNIVERSAL_INTERFACES_VERSION := $0342}
+{$setc GAP_INTERFACES_VERSION := $0200}
+
+{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
+    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
+{$endc}
+
+{$ifc defined CPUPOWERPC and defined CPUI386}
+	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
+{$endc}
+{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
+	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
+{$endc}
+
+{$ifc not defined __ppc__ and defined CPUPOWERPC}
+	{$setc __ppc__ := 1}
+{$elsec}
+	{$setc __ppc__ := 0}
+{$endc}
+{$ifc not defined __i386__ and defined CPUI386}
+	{$setc __i386__ := 1}
+{$elsec}
+	{$setc __i386__ := 0}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
+	{$error Conflicting definitions for __ppc__ and __i386__}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__}
+	{$setc TARGET_CPU_PPC := TRUE}
+	{$setc TARGET_CPU_X86 := FALSE}
+{$elifc defined __i386__ and __i386__}
+	{$setc TARGET_CPU_PPC := FALSE}
+	{$setc TARGET_CPU_X86 := TRUE}
+{$elsec}
+	{$error Neither __ppc__ nor __i386__ is defined.}
+{$endc}
+{$setc TARGET_CPU_PPC_64 := FALSE}
+
+{$ifc defined FPC_BIG_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
+{$elifc defined FPC_LITTLE_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
+{$elsec}
+	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
+{$endc}
+{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
+{$setc CALL_NOT_IN_CARBON := FALSE}
+{$setc OLDROUTINENAMES := FALSE}
+{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
+{$setc OPAQUE_UPP_TYPES := TRUE}
+{$setc OTCARBONAPPLICATION := TRUE}
+{$setc OTKERNEL := FALSE}
+{$setc PM_USE_SESSION_APIS := TRUE}
+{$setc TARGET_API_MAC_CARBON := TRUE}
+{$setc TARGET_API_MAC_OS8 := FALSE}
+{$setc TARGET_API_MAC_OSX := TRUE}
+{$setc TARGET_CARBON := TRUE}
+{$setc TARGET_CPU_68K := FALSE}
+{$setc TARGET_CPU_MIPS := FALSE}
+{$setc TARGET_CPU_SPARC := FALSE}
+{$setc TARGET_OS_MAC := TRUE}
+{$setc TARGET_OS_UNIX := FALSE}
+{$setc TARGET_OS_WIN32 := FALSE}
+{$setc TARGET_RT_MAC_68881 := FALSE}
+{$setc TARGET_RT_MAC_CFM := FALSE}
+{$setc TARGET_RT_MAC_MACHO := TRUE}
+{$setc TYPED_FUNCTION_POINTERS := TRUE}
+{$setc TYPE_BOOL := FALSE}
+{$setc TYPE_EXTENDED := FALSE}
+{$setc TYPE_LONGLONG := TRUE}
+uses MacTypes, CFRunLoop, CoreAudioTypes;
+{$ALIGN POWER}
+
+//==================================================================================================
+//#pragma mark    Overview
+{!
+    @header AudioHardware
+    The audio HAL provides an abstraction through which applications can access audio hardware. To
+    do this, the HAL provides a small set of AudioObjects that provide access to the various pieces
+    of the system.
+    
+    AudioObjects all have a set of properties that describe and manipulate their state. A property
+    is accessed via an ordered triple. The first ordinate is the selector which describes the
+    property. The other two ordinates are the scope and element that identify the particular part of
+    the object in which to look for the selector. The AudioObjectPropertyAddress structure
+    encapsulates the property address. The value of a property is an untyped block of data whose
+    content depends on the specifics of the selector. Some selectors also require the use of a
+    qualifier when querying. The qualifier allows for additional information to be provided to be
+    used in the manipulation of the property. Changing the value of a property is always considered
+    asynchronous.
+    
+    Applications use the routines AudioObjectHasProperty(), AudioObjectIsPropertySettable() and
+    AudioObjectGetPropertyDataSize() to find useful meta-information about the property. Apps use
+    AudioObjectGetPropertyData() and AudioObjectSetPropertyData() to manipulate the value of the
+    property. Apps use AudioObjectAddPropertyListener() and AudioObjectRemovePropertyListener() to
+    register/unregister a function that is to be called when a given property's value changes.
+    
+    The class of an AudioObject determines the basic functionality of the object in terms of what
+    functions will operate on it as well as the set of properties that can be expected to be
+    implemented by the object. The set of available classes for objects is limited to those defined
+    here. There are no other classes. The set of classes is arranged in a hierarchy such that one
+    class inherits the properties/routines of it's super class.
+    
+    The base class for all AudioObjects is the class AudioObject. As such, each AudioObject will 
+    provide basic properties such as it's class, it's human readable name, and the other
+    AudioObjects it contains. Other important classes include AudioSystemObject, AudioDevice, and
+    AudioStream.
+    
+    The AudioObjects in the HAL are arranged in a containment hierarchy. The root of the hierarchy
+    is the one and only instance of the AudioSystemObject class. The properties of the
+    AudioSystemObject describe the process global settings such as the various default devices and
+    the notification run loop. The AudioSystemObject also contains all the AudioDevices that are
+    available.
+    
+    Instances of the AudioDevice class encapsulate individual audio devices. An AudioDevice serves
+    as the basic unit of IO. It provides a single IO cycle, a timing source based on it, and all the
+    buffers synchronized to it. The IO cycle presents all the synchronized buffers to the client in
+    the same call out along with time stamps that specify the current time, when the input data was
+    acquired and when the output data will be presented.
+    
+    AudioDevices contain instances of the AudioStream class. An AudioStream represents a single
+    buffer of data for transferring across the user/kernel boundary. As such, AudioStreams are the
+    gatekeepers of format information. Each has it's own format and list of available formats.
+    AudioStreams can provide data in any format, including encoded formats and non-audio formats. If
+    the format is a linear PCM format, the data will always be presented as 32 bit, native endian
+    floating point. All conversions to and from the true physical format of the hardware is handled
+    by the device's driver.
+    
+    Both AudioDevices and AudioStreams can contain instances of the AudioControl class or it's many
+    subclasses. An AudioControl provides properties that describe/manipulate a particular aspect of
+    the object such as gain, mute, data source selection, etc. Many common controls are also
+    also available as properties on the AudioDevice or AudioStream.
+}
+
+
+
+//==================================================================================================
+//#pragma mark    Error Constants
+
+{!
+    @enum           Error Constants
+    @abstract       The error constants unique to the HAL.
+    @discussion     These are the error constants that are unique to the HAL. Note that the HAL's
+                    functions can and will return other codes that are not listed here. While these
+                    constants give a general idea of what might have gone wrong during the execution
+                    of an API call, if an API call returns anything other than kAudioHardwareNoError
+                    it is to be viewed as the same failure regardless of what constant is actually
+                    returned.
+    @constant       kAudioHardwareNoError
+                        The function call completed successfully.
+    @constant       kAudioHardwareNotRunningError
+                        The function call requires that the hardware be running but it isn't.
+    @constant       kAudioHardwareUnspecifiedError
+                        The function call failed while doing something that doesn't provide any
+                        error messages.
+    @constant       kAudioHardwareUnknownPropertyError
+                        The AudioObject doesn't know about the property at the given address.
+    @constant       kAudioHardwareBadPropertySizeError
+                        An improperly sized buffer was provided when accessing the data of a
+                        property.
+    @constant       kAudioHardwareIllegalOperationError
+                        The requested operation couldn't be completed.
+    @constant       kAudioHardwareBadObjectError
+                        The AudioObjectID passed to the function doesn't map to a valid AudioObject.
+    @constant       kAudioHardwareBadDeviceError
+                        The AudioDeviceID passed to the function doesn't map to a valid AudioDevice.
+    @constant       kAudioHardwareBadStreamError
+                        The AudioStreamID passed to the function doesn't map to a valid AudioStream.
+    @constant       kAudioHardwareUnsupportedOperationError
+                        The AudioObject doesn't support the requested operation.
+    @constant       kAudioDeviceUnsupportedFormatError
+                        The AudioStream doesn't support the requested format.
+    @constant       kAudioDevicePermissionsError
+                        The requested operation can't be completed because the process doesn't have
+                        permission.
+}
+const
+	kAudioHardwareNoError = 0;
+	kAudioHardwareNotRunningError = $73746F70 (* 'stop' *);
+	kAudioHardwareUnspecifiedError = $77686174 (* 'what' *);
+	kAudioHardwareUnknownPropertyError = $77686F3F (* 'who?' *);
+	kAudioHardwareBadPropertySizeError = $2173697A (* '!siz' *);
+	kAudioHardwareIllegalOperationError = $6E6F7065 (* 'nope' *);
+	kAudioHardwareBadObjectError = $216F626A (* '!obj' *);
+	kAudioHardwareBadDeviceError = $21646576 (* '!dev' *);
+	kAudioHardwareBadStreamError = $21737472 (* '!str' *);
+	kAudioHardwareUnsupportedOperationError = $756E6F70 (* 'unop' *);
+	kAudioDeviceUnsupportedFormatError = $21646174 (* '!dat' *);
+	kAudioDevicePermissionsError = $21686F67 (* '!hog' *);
+
+//==================================================================================================
+//#pragma mark    Property Support Types
+
+{!
+    @typedef        AudioObjectPropertySelector
+    @abstract       An AudioObjectPropertySelector is a four char code that identifies, along with
+                    the AudioObjectPropertyScope and AudioObjectPropertyElement, a specific piece of
+                    information about an AudioObject.
+    @discussion     The property selector specifies the general classification of the property such
+                    as volume, stream format, latency, etc. Note that each class has a different set
+                    of selectors. A subclass inherits it's super class's set of selectors, although
+                    it may not implement them all.
+}
+type
+	AudioObjectPropertySelector = UInt32;
+
+{!
+    @typedef        AudioObjectPropertyScope
+    @abstract       An AudioObjectPropertyScope is a four char code that identifies, along with the
+                    AudioObjectPropertySelector and AudioObjectPropertyElement, a specific piece of
+                    information about an AudioObject.
+    @discussion     The scope specifies the section of the object in which to look for the property,
+                    such as input, output, global, etc. Note that each class has a different set of
+                    scopes. A subclass inherits it's superclass's set of scopes.
+}
+type
+	AudioObjectPropertyScope = UInt32;
+
+{!
+    @typedef        AudioObjectPropertyElement
+    @abstract       An AudioObjectPropertyElement is an integer that identifies, along with the
+                    AudioObjectPropertySelector and AudioObjectPropertyScope, a specific piece of
+                    information about an AudioObject.
+    @discussion     The element selects one of possibly many items in the section of the object in
+                    which to look for the property. Elements are number sequentially where 0
+                    represents the master element. Elements are particular to an instance of a
+                    class, meaning that two instances can have different numbers of elements in the
+                    same scope. There is no inheritance of elements.
+}
+type
+	AudioObjectPropertyElement = UInt32;
+
+{!
+    @struct         AudioObjectPropertyAddress
+    @abstract       An AudioObjectPropertyAddress collects the three parts that identify a specific
+                    property together in a struct for easy transmission.
+    @field          mSelector
+                        The AudioObjectPropertySelector for the property.
+    @field          mScope
+                        The AudioObjectPropertyScope for the property.
+    @field          mElement
+                        The AudioObjectPropertyElement for the property.
+}
+type
+	AudioObjectPropertyAddress = record
+		mSelector: AudioObjectPropertySelector;
+		mScope: AudioObjectPropertyScope;
+		mElement: AudioObjectPropertyElement;
+	end;
+	AudioObjectPropertyAddressPtr = ^AudioObjectPropertyAddress;
+
+//==================================================================================================
+//#pragma mark    Property Support Constants
+
+{!
+    @enum           Property Wildcard Constants
+    @abstract       Constants that are used as wildcards in an AudioObjectPropertyAddress.
+    @discussion     Wildcards match any and all values for there associated type. They are
+                    especially useful for registering listener procs to receive notifications and
+                    for querying an AudioObject's list of AudioControls.
+    @constant       kAudioObjectPropertySelectorWildcard
+                        The wildcard value for AudioObjectPropertySelectors.
+    @constant       kAudioObjectPropertyScopeWildcard
+                        The wildcard value for AudioObjectPropertyScopes.
+    @constant       kAudioObjectPropertyElementWildcard
+                        The wildcard value for AudioObjectPropertyElements.
+	@constant		kAudioPropertyWildcardPropertyID
+						A synonym for kAudioObjectPropertySelectorWildcard.
+	@constant		kAudioPropertyWildcardSection
+						The wildcard value for the isInput argument of AudioDeviceGetPropertyInfo(),
+						AudioDeviceGetProperty(), and AudioDeviceSetProperty().
+	@constant		kAudioPropertyWildcardChannel
+						A synonym for kAudioObjectPropertyElementWildcard.
+}
+const
+	kAudioObjectPropertySelectorWildcard = $2A2A2A2A (* '****' *);
+	kAudioObjectPropertyScopeWildcard = $2A2A2A2A (* '****' *);
+	kAudioObjectPropertyElementWildcard = $FFFFFFFF;
+	kAudioPropertyWildcardPropertyID = kAudioObjectPropertySelectorWildcard;
+	kAudioPropertyWildcardSection = $FF;
+	kAudioPropertyWildcardChannel = kAudioObjectPropertyElementWildcard;
+
+//==================================================================================================
+//#pragma mark    AudioObject Types
+
+{!
+    @typedef        AudioClassID
+    @abstract       AudioClassIDs are used to identify the class of an AudioObject.
+}
+type
+	AudioClassID = UInt32;
+
+{!
+    @typedef        AudioObjectID
+    @abstract       AudioObject is the base class for all the objects in the HAL.
+    @discussion     AudioObjects have properties and can contain other AudioObjects.
+}
+type
+	AudioObjectID = UInt32;
+
+{!
+    @typedef        AudioObjectPropertyListenerProc
+    @abstract       Clients register an AudioObjectPropertyListenerProc with an AudioObject in order
+                    to receive notifications when the properties of the object change.
+    @discussion     Listeners will be called when possibly many properties have changed.
+                    Consequently, the implementation of a listener must go through the array of
+                    addresses to see what exactly has changed. Note that the array of addresses will
+                    always have at least one address in it for which the listener is signed up to
+                    receive notifications about but may contain addresses for properties for which
+                    the listener is not signed up to receive notifications.
+    @param          inObjectID
+                        The AudioObject whose properties have changed.
+    @param          inNumberAddresses
+                        The number of elements in the inAddresses array.
+    @param          inAddresses
+                        An array of AudioObjectPropertyAddresses indicating which properties
+                        changed.
+    @param          inClientData
+                        A pointer to client data established when the listener proc was registered
+                        with the AudioObject.
+    @result         The return value is currently unused and should always be 0.
+}
+type
+	AudioObjectPropertyListenerProc = function( inObjectID: AudioObjectID; inNumberAddresses: UInt32; {const} inAddresses: {variable-size-array} AudioObjectPropertyAddressPtr; inClientData: UnivPtr ): OSStatus;
+
+//==================================================================================================
+//#pragma mark    AudioObject Constants
+
+{!
+    @enum           AudioObject Class Constants
+    @abstract       Various constants related to AudioObjects.
+    @constant       kAudioObjectPropertyScopeGlobal
+                        The AudioObjectPropertyScope for properties that apply to the object as a
+                        whole. All AudioObjects have a global scope and for some it is their only
+                        scope.
+    @constant       kAudioObjectPropertyElementMaster
+                        The AudioObjectPropertyElement value for properties that apply to the master
+                        element or to the entire scope.
+    @constant       kAudioObjectClassID
+                        The AudioClassID that identifies the AudioObject class.
+    @constant       kAudioObjectClassIDWildcard
+                        The wildcard value for AudioClassIDs.
+    @constant       kAudioObjectUnknown
+                        The AudioObjectID for a non-existant AudioObject.
+}
+const
+	kAudioObjectPropertyScopeGlobal = $676C6F62 (* 'glob' *);
+	kAudioObjectPropertyElementMaster = 0;
+	kAudioObjectClassID = $616F626A (* 'aobj' *);
+	kAudioObjectClassIDWildcard = $2A2A2A2A (* '****' *);
+	kAudioObjectUnknown = 0;
+
+//==================================================================================================
+//#pragma mark    AudioObject Properties
+
+{!
+    @enum           AudioObject Property Selectors
+    @abstract       AudioObjectPropertySelector values that apply to all AudioObjects.
+    @constant       kAudioObjectPropertyClass
+                        An AudioClassID that identifies the class of the AudioObject.
+    @constant       kAudioObjectPropertyOwner
+                        An AudioObjectID that identifies the the AudioObject that owns the given
+                        AudioObject. Note that all AudioObjects are owned by some other AudioObject.
+                        The only exception is the AudioSystemObject, for which the value of this
+                        property is kAudioObjectUnknown.
+    @constant       kAudioObjectPropertyCreator
+                        A CFString that contains the bundle ID of the plug-in that instantiated the
+                        object.
+    @constant       kAudioObjectPropertyObjectName
+                        A CFString that contains the human readable name of the object. The caller
+                        is responsible for releasing the returned CFObject.
+    @constant       kAudioObjectPropertyManufacturer
+                        A CFString that contains the human readable name of the manufacturer of the
+                        hardware the AudioObject is a part of. The caller is responsible for
+                        releasing the returned CFObject.
+    @constant       kAudioObjectPropertyElementName
+                        A CFString that contains a human readable name for the given element in the
+                        given scope. The caller is responsible for releasing the returned CFObject.
+    @constant       kAudioObjectPropertyElementCategoryName
+                        A CFString that contains a human readable name for the category of the given
+                        element in the given scope. The caller is responsible for releasing the
+                        returned CFObject.
+    @constant       kAudioObjectPropertyElementNumberName
+                        A CFString that contains a human readable name for the number of the given
+                        element in the given scope. The caller is responsible for releasing the
+                        returned CFObject.
+    @constant       kAudioObjectPropertyOwnedObjects
+                        An array of AudioObjectIDs that represent all the AudioObjects owned by the
+                        given object. The qualifier is an array of AudioClassIDs. If it is
+                        non-empty, the returned array of AudioObjectIDs will only refer to objects
+                        whose class is in the qualifier array or whose is a subclass of one in the
+                        qualifier array.
+    @constant       kAudioObjectPropertyListenerAdded
+                        An AudioObjectPropertyAddress indicating the address to which a new listener
+                        was added. Note that this property is not for applications to use. Rather,
+                        this property is for the HAL shell to notify AudioObjects implemented by an
+                        AudioPlugIn when a listener is added.
+    @constant       kAudioObjectPropertyListenerRemoved
+                        An AudioObjectPropertyAddress indicating the address to which a listener was
+                        removed. Note that this property is not for applications to use. Rather,
+                        this property is for the HAL shell to notify AudioObjects implemented by an
+                        AudioPlugIn when a listener is removed.
+}
+const
+	kAudioObjectPropertyClass = $636C6173 (* 'clas' *);
+	kAudioObjectPropertyOwner = $73746476 (* 'stdv' *);
+	kAudioObjectPropertyCreator = $6F706C67 (* 'oplg' *);
+	kAudioObjectPropertyName = $6C6E616D (* 'lnam' *);
+	kAudioObjectPropertyManufacturer = $6C6D616B (* 'lmak' *);
+	kAudioObjectPropertyElementName = $6C63686E (* 'lchn' *);
+	kAudioObjectPropertyElementCategoryName = $6C63636E (* 'lccn' *);
+	kAudioObjectPropertyElementNumberName = $6C636E6E (* 'lcnn' *);
+	kAudioObjectPropertyOwnedObjects = $6F776E64 (* 'ownd' *);
+	kAudioObjectPropertyListenerAdded = $6C697361 (* 'lisa' *);
+	kAudioObjectPropertyListenerRemoved = $6C697372 (* 'lisr' *);
+
+//==================================================================================================
+//#pragma mark    AudioObject Functions
+
+{!
+    @functiongroup  AudioObject
+}
+
+{!
+    @function       AudioObjectShow
+    @abstract       Prints to standard out a textural description of the AudioObject.
+    @param          inObjectID
+                        The AudioObject to show.
+}
+procedure AudioObjectShow( inObjectID: AudioObjectID ); external name '_AudioObjectShow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{!
+    @function       AudioObjectHasProperty
+    @abstract       Queries an AudioObject about whether or not it has the given property.
+    @param          inObjectID
+                        The AudioObject to query.
+    @param          inAddress
+                        An AudioObjectPropertyAddress indicating which property is being queried.
+    @result         A Boolean indicating whether or not the AudioObject has the given property.
+}
+function AudioObjectHasProperty( inObjectID: AudioObjectID; const (*var*) inAddress: AudioObjectPropertyAddress ): Boolean; external name '_AudioObjectHasProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{!
+    @function       AudioObjectIsPropertySettable
+    @abstract       Queries an AudioObject about whether or not the given property can be set using
+                    AudioObjectSetPropertyData.
+    @param          inObjectID
+                        The AudioObject to query.
+    @param          inAddress
+                        An AudioObjectPropertyAddress indicating which property is being queried.
+    @param          outIsSettable
+                        A Boolean indicating whether or not the property can be set.
+    @result         An OSStatus indicating success or failure.
+}
+function AudioObjectIsPropertySettable( inObjectID: AudioObjectID; const (*var*) inAddress: AudioObjectPropertyAddress; var outIsSettable: Boolean ): OSStatus; external name '_AudioObjectIsPropertySettable';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{!
+    @function       AudioObjectGetPropertyDataSize
+    @abstract       Queries an AudioObject to find the size of the data for the given property.
+    @param          inObjectID
+                        The AudioObject to query.
+    @param          inAddress
+                        An AudioObjectPropertyAddress indicating which property is being queried.
+    @param          inQualifierDataSize
+                        A UInt32 indicating the size of the buffer pointed to by inQualifierData.
+                        Note that not all properties require qualification, in which case this
+                        value will be 0.
+    @param          inQualifierData,
+                        A buffer of data to be used in determining the data of the property being
+                        queried. Note that not all properties require qualification, in which case
+                        this value will be NULL.
+    @param          outDataSize
+                        A UInt32 indicating how many bytes the data for the given property occupies.
+    @result         An OSStatus indicating success or failure.
+}
+function AudioObjectGetPropertyDataSize( inObjectID: AudioObjectID; const (*var*) inAddress: AudioObjectPropertyAddress; inQualifierDataSize: UInt32; inQualifierData: {const} UnivPtr; var outDataSize: UInt32 ): OSStatus; external name '_AudioObjectGetPropertyDataSize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{!
+    @function       AudioObjectGetPropertyData
+    @abstract       Queries an AudioObject to get the data of the given property and places it in
+                    the provided buffer.
+    @param          inObjectID
+                        The AudioObject to query.
+    @param          inAddress
+                        An AudioObjectPropertyAddress indicating which property is being queried.
+    @param          inQualifierDataSize
+                        A UInt32 indicating the size of the buffer pointed to by inQualifierData.
+                        Note that not all properties require qualification, in which case this
+                        value will be 0.
+    @param          inQualifierData,
+                        A buffer of data to be used in determining the data of the property being
+                        queried. Note that not all properties require qualification, in which case
+                        this value will be NULL.
+    @param          ioDataSize
+                        A UInt32 which on entry indicates the size of the buffer pointed to by
+                        outData and on exit indicates how much of the buffer was used.
+    @param          outData
+                        The buffer into which the AudioObject will put the data for the given
+                        property.
+    @result         An OSStatus indicating success or failure.
+}
+function AudioObjectGetPropertyData( inObjectID: AudioObjectID; const (*var*) inAddress: AudioObjectPropertyAddress; inQualifierDataSize: UInt32; inQualifierData: {const} UnivPtr; var ioDataSize: UInt32; outData: UnivPtr ): OSStatus; external name '_AudioObjectGetPropertyData';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{!
+    @function       AudioObjectSetPropertyData
+    @abstract       Tells an AudioObject to change the value of the given property using the
+                    provided data.
+    @discussion     Note that the value of the property should not be considered changed until the
+                    HAL has called the listeners as many properties values are changed
+                    asynchronously.
+    @param          inObjectID
+                        The AudioObject to change.
+    @param          inAddress
+                        An AudioObjectPropertyAddress indicating which property is being changed.
+    @param          inQualifierDataSize
+                        A UInt32 indicating the size of the buffer pointed to by inQualifierData.
+                        Note that not all properties require qualification, in which case this
+                        value will be 0.
+    @param          inQualifierData,
+                        A buffer of data to be used in determining the data of the property being
+                        queried. Note that not all properties require qualification, in which case
+                        this value will be NULL.
+    @param          inDataSize
+                        A UInt32 indicating the size of the buffer pointed to by inData.
+    @param          inData
+                        The buffer containing the data to be used to change the property's value.
+    @result         An OSStatus indicating success or failure.
+}
+function AudioObjectSetPropertyData( inObjectID: AudioObjectID; const (*var*) inAddress: AudioObjectPropertyAddress; inQualifierDataSize: UInt32; inQualifierData: {const} UnivPtr; inDataSize: UInt32; inData: {const} UnivPtr ): OSStatus; external name '_AudioObjectSetPropertyData';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{!
+    @function       AudioObjectAddPropertyListener
+    @abstract       Registers the given AudioObjectPropertyListenerProc to receive notifications
+                    when the given properties change.
+    @param          inObjectID
+                        The AudioObject to register the listener with.
+    @param          inAddress
+                        The AudioObjectPropertyAddresses indicating which property the listener
+                        should be notified about.
+    @param          inListener
+                        The AudioObjectPropertyListenerProc to call.
+    @param          inClientData
+                        A pointer to client data that is passed to the listener when it is called.
+    @result         An OSStatus indicating success or failure.
+}
+function AudioObjectAddPropertyListener( inObjectID: AudioObjectID; const (*var*) inAddress: AudioObjectPropertyAddress; inListener: AudioObjectPropertyListenerProc; inClientData: UnivPtr ): OSStatus; external name '_AudioObjectAddPropertyListener';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{!
+    @function       AudioObjectRemovePropertyListener
+    @abstract       Unregisters the given AudioObjectPropertyListenerProc from receiving
+                    notifications when the given properties change.
+    @param          inObjectID
+                        The AudioObject to unregister the listener from.
+    @param          inNumberAddresses
+                        The number of elements in the inAddresses array.
+    @param          inAddresses
+                        The AudioObjectPropertyAddress indicating which property the listener should
+                        be removed from.
+    @param          inListener
+                        The AudioObjectPropertyListenerProc being removed.
+    @param          inClientData
+                        A pointer to client data that is passed to the listener when it is called.
+    @result         An OSStatus indicating success or failure.
+}
+function AudioObjectRemovePropertyListener( inObjectID: AudioObjectID; const (*var*) inAddress: AudioObjectPropertyAddress; inListener: AudioObjectPropertyListenerProc; inClientData: UnivPtr ): OSStatus; external name '_AudioObjectRemovePropertyListener';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+//==================================================================================================
+//#pragma mark    AudioControl Constants
+
+{!
+    @enum           AudioControl Base Class IDs
+    @abstract       The AudioClassIDs that identify the various AudioControl base classes.
+    @constant       kAudioControlClassID
+                        The AudioClassID that identifies the AudioControl class.
+    @constant       kAudioLevelControlClassID
+                        The AudioClassID that identifies the AudioLevelControl class which is a
+                        subclass of AudioControl. AudioLevelControls manipulate gain/attenuation
+                        stages in the hardware.
+    @constant       kAudioBooleanControlClassID
+                        The AudioClassID that identifies the AudioBooleanControl class which is a
+                        subclass of AudioControl. AudioBooleanControls manipulate on/off switches
+                        in the hardware.
+    @constant       kAudioSelectorControlClassID
+                        The AudioClassID that identifies the AudioSelectorControl class which is a
+                        subclass of AudioControl. AudioSelectorControls manipulate controls that
+                        have multiple, but discreet values.
+    @constant       kAudioStereoPanControlClassID
+                        The AudioClassID that identifies the AudioStereoPanControl class which is
+                        a subclass of AudioControl. AudioStereoPanControls manipulate the pot for
+                        panning a mono signal between a left/right pair of outputs.
+}
+const
+	kAudioControlClassID = $6163746C (* 'actl' *);
+	kAudioLevelControlClassID = $6C65766C (* 'levl' *);
+	kAudioBooleanControlClassID = $746F676C (* 'togl' *);
+	kAudioSelectorControlClassID = $736C6374 (* 'slct' *);
+	kAudioStereoPanControlClassID = $7370616E (* 'span' *);
+
+{!
+    @enum           AudioLevelControl Subclass IDs
+    @abstract       The four char codes that identify the various standard subclasses of
+                    AudioLevelControl.
+    @constant       kAudioVolumeControlClassID
+                        An AudioLevelControl for a general gain/attenuation stage.
+    @constant       kAudioLFEVolumeControlClassID
+                        An AudioLevelControl for an LFE channel that results from bass management
+                        such as the iSub. Note that LFE channels that are represented as normal
+                        audio channels (in other words, real data is being fed them in an IOProc)
+                        will use kAudioVolumeControlClassID to manipulate the level.
+    @constant       kAudioBootChimeVolumeControlClassID
+                        An AudioLevelControl for the boot chime of the CPU.
+}
+const
+	kAudioVolumeControlClassID = $766C6D65 (* 'vlme' *);
+	kAudioLFEVolumeControlClassID = $73756276 (* 'subv' *);
+	kAudioBootChimeVolumeControlClassID = $7072616D (* 'pram' *);
+
+{!
+    @enum           AudioBooleanControl Subclass IDs
+    @abstract       The four char codes that identify the various standard subclasses of
+                    AudioBooleanControl.
+    @constant       kAudioMuteControlClassID
+                        An AudioBooleanControl where a true value means that mute is enabled making
+                        that element inaudible.
+    @constant       kAudioSoloControlClassID
+                        An AudioBooleanControl where a true value means that solo is enabled making
+                        just that element audible and the other elements inaudible.
+    @constant       kAudioJackControlClassID
+                        An AudioBooleanControl where a true value means something is plugged into
+                        that element.
+    @constant       kAudioLFEMuteControlClassID
+                        An AudioBooleanControl where true means that mute is enabled make that LFE
+                        element inaudible. This control is for LFE channels that result from bass
+                        management such as the iSub. Note that LFE channels that are represented as
+                        normal audio channels (in other words, real data is being fed them in an
+                        IOProc) will use kAudioVolumeControlClassID to manipulate mute.
+    @constant       kAudioISubOwnerClassID
+                        An AudioBooleanControl where true means that the AudioDevice that
+                        ultimately owns the control also owns any iSub attached to the CPU.
+}
+const
+	kAudioMuteControlClassID = $6D757465 (* 'mute' *);
+	kAudioSoloControlClassID = $736F6C6F (* 'solo' *);
+	kAudioJackControlClassID = $6A61636B (* 'jack' *);
+	kAudioLFEMuteControlClassID = $7375626D (* 'subm' *);
+	kAudioISubOwnerControlClassID = $61746368 (* 'atch' *);
+
+{!
+    @enum           AudioSelectorControl Subclass IDs
+    @abstract       The four char codes that identify the various standard subclasses of
+                    AudioSelectorControl.
+    @constant       kAudioDataSourceControlClassID
+                        An AudioSelectorControl that identifies where the data for the element is
+                        coming from.
+    @constant       kAudioDataDestinationControlClassID
+                        An AudioSelectorControl that identifies where the data for the element is
+                        going.
+    @constant       kAudioClockSourceControlClassID
+                        An AudioSelectorControl that identifies where the timing info for the object
+                        is coming from.
+    @constant       kAudioLineLevelControlClassID
+                        An AudioSelectorControl that identifies the nominal line level for the
+                        element. Note that this is not a gain stage but rather indicating the
+                        voltage standard (if any) used for the element, such as +4dBu, -10dBV,
+                        instrument, etc.
+}
+const
+	kAudioDataSourceControlClassID = $64737263 (* 'dsrc' *);
+	kAudioDataDestinationControlClassID = $64657374 (* 'dest' *);
+	kAudioClockSourceControlClassID = $636C636B (* 'clck' *);
+	kAudioLineLevelControlClassID = $6E6C766C (* 'nlvl' *);
+
+//==================================================================================================
+//#pragma mark    AudioControl Properties
+
+{!
+    @enum           AudioControl Properties
+    @abstract       AudioObjectPropertySelector values that apply to all AudioControls.
+    @discussion     AudioControl is a subclass of AudioObject and has only the single scope,
+                    kAudioObjectPropertyScopeGlobal, and only a master element.
+    @constant       kAudioControlPropertyScope
+                        The AudioObjectPropertyScope in the owning AudioObject that contains the
+                        AudioControl.
+    @constant       kAudioControlPropertyElement
+                        The AudioObjectPropertyElement in the owning AudioObject that contains the
+                        AudioControl.
+    @constant       kAudioControlPropertyVariant
+                        A UInt32 that identifies the specific variant of an AudioControl. This
+                        allows the owning AudioObject to support controls that are of the same basic
+                        class (that is, the values of  kAudioObjectPropertyClass are the same) but
+                        may control a part of the object for which the standard controls do not
+                        control.
+}
+const
+	kAudioControlPropertyScope = $63736370 (* 'cscp' *);
+	kAudioControlPropertyElement = $63656C6D (* 'celm' *);
+	kAudioControlPropertyVariant = $63766172 (* 'cvar' *);
+
+{!
+    @enum           AudioLevelControl Properties
+    @abstract       AudioObjectPropertySelector values that apply to all AudioLevelControls.
+    @discussion     AudioLevelControl is a subclass of AudioControl and has only the single scope,
+                    kAudioObjectPropertyScopeGlobal, and only a master element.
+    @constant       kAudioLevelControlPropertyScalarValue
+                        A Float32 that represents the value of the boot chime volume control. The
+                        range is between 0.0 and 1.0 (inclusive).
+    @constant       kAudioLevelControlPropertyDecibelValue
+                        A Float32 that represents the value of the boot chime volume control in dB.
+    @constant       kAudioLevelControlPropertyDecibelRange
+                        An AudioValueRange that contains the minimum and maximum dB values the
+                        boot chime control can have.
+    @constant       kAudioLevelControlPropertyConvertScalarToDecibels
+                        A Float32 that on input contains a scalar volume value for the boot chime
+                        and on exit contains the equivalent dB value.
+    @constant       kAudioLevelControlPropertyConvertDecibelsToScalar
+                        A Float32 that on input contains a dB volume value for the boot chime and on
+                        exit contains the equivalent scalar value.
+}
+const
+	kAudioLevelControlPropertyScalarValue = $6C637376 (* 'lcsv' *);
+	kAudioLevelControlPropertyDecibelValue = $6C636476 (* 'lcdv' *);
+	kAudioLevelControlPropertyDecibelRange = $6C636472 (* 'lcdr' *);
+	kAudioLevelControlPropertyConvertScalarToDecibels = $6C637364 (* 'lcsd' *);
+	kAudioLevelControlPropertyConvertDecibelsToScalar = $6C636473 (* 'lcds' *);
+
+{!
+    @enum           AudioBooleanControl Properties
+    @abstract       AudioObjectPropertySelector values that apply to all AudioBooleanControls.
+    @discussion     AudioBooleanControl is a subclass of AudioControl and has only the single scope,
+                    kAudioObjectPropertyScopeGlobal, and only a master element.
+    @constant       kAudioBooleanControlPropertyValue
+                        A UInt32 where 0 means false and 1 means true.
+}
+const
+	kAudioBooleanControlPropertyValue = $6263766C (* 'bcvl' *);
+
+{!
+    @enum           AudioSelectorControl Properties
+    @abstract       AudioObjectPropertySelector values that apply to all AudioSelectorControls.
+    @discussion     AudioSelectorControl is a subclass of AudioControl and has only the single
+                    scope, kAudioObjectPropertyScopeGlobal, and only a master element.
+    @constant       kAudioSelectorControlPropertyCurrentItem
+                        A UInt32 that is the ID of the item currently selected.
+    @constant       kAudioSelectorControlPropertyAvailableItems
+                        An array of UInt32s that represent the IDs of all the items available.
+    @constant       kAudioSelectorControlPropertyItemName
+                        This property translates the given item ID into a human readable name. The
+                        qualifier contains the ID of the item to be translated and name is returned
+                        as a CFString as the property data. The caller is responsible for releasing
+                        the returned CFObject.
+}
+const
+	kAudioSelectorControlPropertyCurrentItem = $73636369 (* 'scci' *);
+	kAudioSelectorControlPropertyAvailableItems = $73636169 (* 'scai' *);
+	kAudioSelectorControlPropertyItemName = $7363696E (* 'scin' *);
+
+{!
+    @enum           AudioClockSourceControl Properties
+    @abstract       AudioObjectPropertySelector values that apply only to AudioClockSourceControls.
+    @discussion     These properties supplement the regular AudioSelectorControl Properties.
+    @constant       kAudioClockSourceControlPropertyItemKind
+                        This property returns a UInt32 that identifies the kind of clock source
+                        the item ID refers to. The qualifier contains the ID of the item. Values for
+                        this property are defined in <IOAudio/audio/IOAudioTypes.h>.
+}
+const
+	kAudioClockSourceControlPropertyItemKind = $636C6B6B (* 'clkk' *);
+
+{!
+    @enum           AudioStereoPanControl Properties
+    @abstract       AudioObjectPropertySelector values that apply to all AudioStereoPanControls.
+    @discussion     AudioStereoPanControl is a subclass of AudioControl and has only the single
+                    scope, kAudioObjectPropertyScopeGlobal, and only a master element.
+    @constant       kAudioStereoPanControlPropertyValue
+                        A Float32 where 0.0 is full left, 1.0 is full right, and 0.5 is center.
+    @constant       kAudioStereoPanControlPropertyPanningChannels
+                        An array of two UInt32s that indicate which elements of the owning object
+                        the signal is being panned between.
+}
+const
+	kAudioStereoPanControlPropertyValue = $73706376 (* 'spcv' *);
+	kAudioStereoPanControlPropertyPanningChannels = $73706363 (* 'spcc' *);
+
+//==================================================================================================
+//#pragma mark    AudioSystemObject Types
+
+{!
+    @typedef        AudioHardwarePropertyID
+    @abstract       An AudioHardwarePropertyID is a integer that identifies a specific piece of
+                    information about the AudioSystemObject.
+}
+type
+	AudioHardwarePropertyID = AudioObjectPropertySelector;
+
+{!
+    @typedef        AudioHardwarePropertyListenerProc
+    @abstract       Clients register an AudioHardwarePropertyListenerProc with the AudioSystemObject
+                    in order to receive notifications when the properties of the object change.
+    @discussion     Note that the same functionality is provided by AudioObjectPropertyListenerProc.
+    @param          inPropertyID
+                        The AudioHardwarePropertyID of the property that changed.
+    @param          inClientData
+                        A pointer to client data established when the listener proc was registered
+                        with the AudioSystemObject.
+    @result         The return value is currently unused and should always be 0.
+}
+type
+	AudioHardwarePropertyListenerProc = function( inPropertyID: AudioHardwarePropertyID; inClientData: UnivPtr ): OSStatus;
+
+//==================================================================================================
+//#pragma mark    AudioSystemObject Constants
+
+{!
+    @enum           AudioSystemObject Class Constants
+    @abstract       Various constants related to the AudioSystemObject.
+    @constant       kAudioSystemObjectClassID
+                        The AudioClassID that identifies the AudioSystemObject class.
+    @constant       kAudioObjectSystemObject
+                        The AudioObjectID that always refers to the one and only instance of the
+                        AudioSystemObject.
+}
+const
+	kAudioSystemObjectClassID = $61737973 (* 'asys' *);
+	kAudioObjectSystemObject = 1;
+
+//==================================================================================================
+//#pragma mark    AudioSystemObject Properties
+
+{!
+    @enum           AudioSystemObject Properties
+    @abstract       AudioObjectPropertySelector values that apply to the AudioSystemObject.
+    @discussion     The AudioSystemObject has one scope, kAudioObjectPropertyScopeGlobal, and only a
+                    master element.
+    @constant       kAudioHardwarePropertyProcessIsMaster
+                        A UInt32 where 1 means that the current process contains the master instance
+                        of the HAL. The master instance of the HAL is the only instance in which
+                        plug-ins should save/restore their devices' settings.
+    @constant       kAudioHardwarePropertyIsInitingOrExiting
+                        A UInt32 whose value will be non-zero if the HAL is either in the midst of
+                        initializing or in the midst of exiting the process.
+    @constant       kAudioHardwarePropertyDevices
+                        An array of the AudioDeviceIDs that represent all the devices currently
+                        available to the system.
+    @constant       kAudioHardwarePropertyDefaultInputDevice
+                        The AudioDeviceID of the default input AudioDevice.
+    @constant       kAudioHardwarePropertyDefaultOutputDevice
+                        The AudioDeviceID of the default output AudioDevice.
+    @constant       kAudioHardwarePropertyDefaultOutputDevice
+                        The AudioDeviceID of the output AudioDevice to use for system related sound
+                        from the alert sound to digital call progress.
+    @constant       kAudioHardwarePropertyDeviceForUID
+                        Using an AudioValueTranslation structure, this property translates the input
+                        CFStringRef containing a UID into the AudioDeviceID that refers to the
+                        AudioDevice with that UID. This property will return kAudioDeviceUnknown if
+                        the given UID does not match any currently available AudioDevice.
+    @constant       kAudioHardwarePropertySleepingIsAllowed
+                        A UInt32 where 1 means that the process will allow the CPU to idle sleep
+                        even if there is audio IO in progress. A 0 means that the CPU will not be
+                        allowed to idle sleep. Note that this property won't affect when the CPU is
+                        forced to sleep.
+    @constant       kAudioHardwarePropertyUnloadingIsAllowed
+                        A UInt32 where 1 means that this process wants the HAL to unload itself
+                        after a period of inactivity where there are no IOProcs and no listeners
+                        registered with any AudioObject.
+    @constant       kAudioHardwarePropertyHogModeIsAllowed
+                        A UInt32 where 1 means that this process wants the HAL to automatically take
+                        hog mode and 0 means that the HAL should not automatically take hog mode on
+                        behalf of the process. Processes that only ever use the default device are
+                        the sort of that should set this property's value to 0.
+    @constant       kAudioHardwarePropertyRunLoop
+                        The CFRunLoopRef the HAL is currently attaching all of it's system
+                        notification handlers to. By default, the HAL will create and manage it's
+                        own thread for this job. Clients can set this property to tell the HAL to
+                        use a thread of the client's choosing. The caller is responsible for
+                        releasing the returned CFObject.
+    @constant       kAudioHardwarePropertyPlugInForBundleID
+                        Using an AudioValueTranslation structure, this property translates the input
+                        CFString containing a bundle ID into the AudioObjectID of the AudioPlugIn
+                        that corresponds to it. This property will return kAudioObjectUnkown if the
+                        given bundle ID doesn't match any AudioPlugIns.
+}
+const
+	kAudioHardwarePropertyProcessIsMaster = $6D617374 (* 'mast' *);
+	kAudioHardwarePropertyIsInitingOrExiting = $696E6F74 (* 'inot' *);
+	kAudioHardwarePropertyDevices = $64657623 (* 'dev#' *);
+	kAudioHardwarePropertyDefaultInputDevice = $64496E20 (* 'dIn ' *);
+	kAudioHardwarePropertyDefaultOutputDevice = $644F7574 (* 'dOut' *);
+	kAudioHardwarePropertyDefaultSystemOutputDevice = $734F7574 (* 'sOut' *);
+	kAudioHardwarePropertyDeviceForUID = $64756964 (* 'duid' *);
+	kAudioHardwarePropertySleepingIsAllowed = $736C6570 (* 'slep' *);
+	kAudioHardwarePropertyUnloadingIsAllowed = $756E6C64 (* 'unld' *);
+	kAudioHardwarePropertyHogModeIsAllowed = $686F6772 (* 'hogr' *);
+	kAudioHardwarePropertyRunLoop = $726E6C70 (* 'rnlp' *);
+	kAudioHardwarePropertyPlugInForBundleID = $70696269 (* 'pibi' *);
+
+{!
+    @enum           AudioSystemObject Properties Implemented via AudioControl objects
+    @abstract       AudioObjectPropertySelector values for AudioSystemObject properties that are
+                    implemented by AudioControl objects.
+    @discussion     These properties are also accessible by locating the AudioControl object
+                    attached to the AudioSystemObject and using that object to access the properties
+                    of the control.
+    @constant       kAudioHardwarePropertyBootChimeVolumeScalar
+                        A Float32 that represents the value of the boot chime volume control. The
+                        range is between 0.0 and 1.0 (inclusive). This property is implemented by an
+                        AudioControl object that is a subclass of AudioBootChimeVolumeControl.
+    @constant       kAudioHardwarePropertyBootChimeVolumeDecibels
+                        A Float32 that represents the value of the boot chime volume control in dB.
+                        This property is implemented by an AudioControl object that is a subclass
+                        of AudioBootChimeVolumeControl.
+    @constant       kAudioHardwarePropertyBootChimeVolumeRangeDecibels
+                        An AudioValueRange that contains the minimum and maximum dB values the
+                        boot chime control can have. This property is implemented by an AudioControl
+                        object that is a subclass of AudioBootChimeVolumeControl.
+    @constant       kAudioHardwarePropertyBootChimeVolumeScalarToDecibels
+                        A Float32 that on input contains a scalar volume value for the boot chime
+                        and on exit contains the equivalent dB value. This property is implemented
+                        by an AudioControl object that is a subclass of AudioBootChimeVolumeControl.
+    @constant       kAudioHardwarePropertyBootChimeVolumeDecibelsToScalar
+                        A Float32 that on input contains a dB volume value for the boot chime and on
+                        exit contains the equivalent scalar value. This property is implemented by
+                        an AudioControl object that is a subclass of AudioBootChimeVolumeControl.
+}
+const
+	kAudioHardwarePropertyBootChimeVolumeScalar = $62627673 (* 'bbvs' *);
+	kAudioHardwarePropertyBootChimeVolumeDecibels = $62627664 (* 'bbvd' *);
+	kAudioHardwarePropertyBootChimeVolumeRangeDecibels = $62626423 (* 'bbd#' *);
+	kAudioHardwarePropertyBootChimeVolumeScalarToDecibels = $62763264 (* 'bv2d' *);
+	kAudioHardwarePropertyBootChimeVolumeDecibelsToScalar = $62643276 (* 'bd2v' *);
+
+//==================================================================================================
+//#pragma mark    AudioSystemObject Functions
+
+{!
+    @functiongroup  AudioSystemObject
+}
+
+{!
+    @function       AudioHardwareAddRunLoopSource
+    @abstract       Add the given CFRunLoopSource to the the HAL's notification CFRunLoop.
+    @discussion     The CFRunLoop the HAL uses for notifications is specified by
+                    kAudioHardwarePropertyRunLoop. If kAudioHardwarePropertyRunLoop changes,
+                    CFRunLoopSources added with this function will automatically be transferred to
+                    the new CFRunLoop.
+    @param          inRunLoopSource
+                        The CFRunLoopSource to add.
+    @result         An OSStatus indicating success or failure.
+}
+function AudioHardwareAddRunLoopSource( inRunLoopSource: CFRunLoopSourceRef ): OSStatus; external name '_AudioHardwareAddRunLoopSource';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{!
+    @function       AudioHardwareRemoveRunLoopSource
+    @abstract       Remove the given CFRunLoopSource from the the HAL's notification CFRunLoop.
+    @discussion     The CFRunLoop the HAL uses for notifications is specified by
+                    kAudioHardwarePropertyRunLoop.
+    @param          inRunLoopSource
+                        The CFRunLoopSource to remove.
+    @result         An OSStatus indicating success or failure.
+}
+function AudioHardwareRemoveRunLoopSource( inRunLoopSource: CFRunLoopSourceRef ): OSStatus; external name '_AudioHardwareRemoveRunLoopSource';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{!
+    @function       AudioHardwareUnload
+    @abstract       When this routine is called, all IO on all devices within a process will be
+                    terminated and all resources capable of being released will be released. This
+                    routine essentially returns the HAL to it's uninitialized state.
+    @result         An OSStatus indicating success or failure.
+}
+function AudioHardwareUnload: OSStatus; external name '_AudioHardwareUnload';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{!
+    @function       AudioHardwareGetPropertyInfo
+    @abstract       Retrieve information about the given property.
+    @discussion     Note that the same functionality is provided by the functions
+                    AudioObjectHasProperty(), AudioObjectIsPropertySettable(), and
+                    AudioObjectGetPropertyDataSize().
+    @param          inPropertyID
+                        The AudioHardwarePropertyID of the property to query.
+    @param          outSize
+                        A pointer to a UInt32 that receives the size of the property data in bytes
+                        on exit. This can be NULL if the size information is not being requested.
+    @param          outWritable
+                        A pointer to a Boolean that receives indication of whether or not the given
+                        property can be set. This can be NULL if the writability is not being
+                        requested.
+    @result         An OSStatus indicating success or failure.
+}
+function AudioHardwareGetPropertyInfo( inPropertyID: AudioHardwarePropertyID; outSize: UInt32Ptr; outWritable: BooleanPtr ): OSStatus; external name '_AudioHardwareGetPropertyInfo';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+    @function       AudioHardwareGetProperty
+    @abstract       Queries an the AudioSystemObject to get the data of the given property and
+                    places it in the provided buffer.
+    @discussion     Note that the same functionality is provided by the function
+                    AudioObjectGetPropertyData().
+    @param          inPropertyID
+                        The AudioHardwarePropertyID of the property to query.
+    @param          ioDataSize
+                        A UInt32 which on entry indicates the size of the buffer pointed to by
+                        outData and on exit indicates how much of the buffer was used.
+    @param          outData
+                        The buffer into which the AudioSystemObject will put the data for the given
+                        property.
+    @result         An OSStatus indicating success or failure.
+}
+function AudioHardwareGetProperty( inPropertyID: AudioHardwarePropertyID; var ioPropertyDataSize: UInt32; outPropertyData: UnivPtr ): OSStatus; external name '_AudioHardwareGetProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+    @function       AudioHardwareSetProperty
+    @abstract       Tells the AudioSystemObject to change the value of the given property using the
+                    provided data.
+    @discussion     Note that the value of the property should not be considered changed until the
+                    HAL has called the listeners as many properties values are changed
+                    asynchronously. Also note that the same functionality is provided by the
+                    function AudioObjectGetPropertyData().
+    @param          inPropertyID
+                        The AudioHardwarePropertyID of the property to change.
+    @param          inDataSize
+                        A UInt32 indicating the size of the buffer pointed to by inData.
+    @param          inData
+                        The buffer containing the data to be used to change the property's value.
+    @result         An OSStatus indicating success or failure.
+}
+function AudioHardwareSetProperty( inPropertyID: AudioHardwarePropertyID; inPropertyDataSize: UInt32; inPropertyData: {const} UnivPtr ): OSStatus; external name '_AudioHardwareSetProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+    @function       AudioHardwareAddPropertyListener
+    @abstract       Registers the given AudioHardwarePropertyListenerProc to receive notifications
+                    when the given property changes.
+    @discussion     Note that the same functionality is provided by AudioObjectAddPropertyListener
+                    in conjunction with AudioObjectPropertyListenerProc.
+    @param          inPropertyID
+                        The AudioHardwarePropertyID of the property to listen to.
+    @param          inProc
+                        AudioHardwarePropertyListenerProc to call.
+    @param          inClientData
+                        A pointer to client data that is passed to the listener when it is called.
+    @result         An OSStatus indicating success or failure.
+}
+function AudioHardwareAddPropertyListener( inPropertyID: AudioHardwarePropertyID; inProc: AudioHardwarePropertyListenerProc; inClientData: UnivPtr ): OSStatus; external name '_AudioHardwareAddPropertyListener';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+    @function       AudioHardwareRemovePropertyListener
+    @abstract       Unregisters the given AudioHardwarePropertyListenerProc from receive
+                    notifications when the given property changes.
+    @discussion     Note that the same functionality is provided by
+                    AudioObjectRemovePropertyListener in conjunction with
+                    AudioObjectPropertyListenerProc.
+    @param          inPropertyID
+                        The AudioHardwarePropertyID of the property to stop listening to.
+    @param          inProc
+                        AudioHardwarePropertyListenerProc to unregister.
+    @result         An OSStatus indicating success or failure.
+}
+function AudioHardwareRemovePropertyListener( inPropertyID: AudioHardwarePropertyID; inProc: AudioHardwarePropertyListenerProc ): OSStatus; external name '_AudioHardwareRemovePropertyListener';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+//==================================================================================================
+//#pragma mark    AudioPlugIn Constants
+
+{!
+    @enum           AudioPlugIn Class Constants
+    @abstract       Various constants related to AudioPlugIns.
+    @constant       kAudioPlugInClassID
+                        The AudioClassID that identifies the AudioPlugIn class.
+}
+const
+	kAudioPlugInClassID = $61706C67 (* 'aplg' *);
+
+//==================================================================================================
+//#pragma mark    AudioPlugIn Properties
+
+{!
+    @enum           AudioPlugIn Properties
+    @abstract       AudioObjectPropertySelector values that apply to AudioPlugIns.
+    @discussion     AudioPlugIn is a subclass of AudioObject that represents a plug-in loaded by the
+                    HAL that conforms to the API in <CoreAudio/AudioHardwarePlugIn.h>. AudioPlugIns
+                    have one scope, kAudioObjectPropertyScopeGlobal, and only a master element.
+    @constant       kAudioPlugInPropertyBundleID
+                        A CFString that contains the bundle identifier for the AudioPlugIn. The
+                        caller is responsible for releasing the returned CFObject.
+    @constant       kAudioPlugInCreateAggregateDevice
+                        This property is used to tell a plug-in to create a new
+                        AudioAggregateDevice. It's value is only read. The qualifier data for this
+                        property is a CFDictionary containing a description of the
+                        AudioAggregateDevice to create. The keys for the CFDictionary are defined in
+                        the AudioAggregateDevice Constants section. The value of the property that
+                        gets returned is the AudioObjectID of the newly created device.
+    @constant       kAudioPlugInDestroyAggregateDevice
+                        This property is used to tell a plug-in to destroy an AudioAggregateDevice.
+                        Like kAudioPlugInCreateAggregateDevice, this property is read only. The
+                        value of the property is the AudioObjectID of the AudioAggregateDevice to
+                        destroy.
+}
+const
+	kAudioPlugInPropertyBundleID = $70696964 (* 'piid' *);
+	kAudioPlugInCreateAggregateDevice = $63616767 (* 'cagg' *);
+	kAudioPlugInDestroyAggregateDevice = $64616767 (* 'dagg' *);
+
+//==================================================================================================
+//#pragma mark    AudioDevice Types
+
+{!
+    @typedef        AudioDeviceID
+    @abstract       AudioDevice is the base class for all objects that represent an audio device.
+    @discussion     AudioDevice is a subclass of AudioObject. AudioDevices normally contain
+                    AudioStreams and AudioControls, but may contain other things depending on the
+                    kind of AudioDevice (e.g. aggregate devices contain other AudioDevices).
+}
+type
+	AudioDeviceID = AudioObjectID;
+
+{!
+    @typedef        AudioDevicePropertyID
+    @abstract       An AudioDevicePropertyID is an integer that identifies a specific piece of
+                    information about the object.
+}
+type
+	AudioDevicePropertyID = AudioObjectPropertySelector;
+
+{!
+    @struct         AudioHardwareIOProcStreamUsage
+    @abstract       This structure describes which streams a given AudioDeviceIOProc will use. It is
+                    used in conjunction with kAudioDevicePropertyIOProcStreamUsage.
+    @field          mIOProc
+                        The IOProc whose stream usage is being specified.
+    @field          mNumberStreams
+                        The number of streams being specified.
+    @field          mStreamIsOn
+                        An array of UInt32's whose length is specified by mNumberStreams. Each
+                        element of the array corresponds to a stream. A value of 0 means the stream
+                        is not to be enabled. Any other value means the stream is to be used.
+}
+type
+	AudioHardwareIOProcStreamUsage = record
+		mIOProc: UnivPtr;
+		mNumberStreams: UInt32;
+        mStreamIsOn: array[0..0] of UInt32;
+	end;
+
+{!
+    @typedef        AudioDeviceIOProc
+    @abstract       An AudioDeviceIOProc is called by an AudioDevice to provide input data read from
+                    the device and collect output data to be written to the device for the current
+                    IO cycle.
+    @param          inDevice
+                        The AudioDevice doing the IO.
+    @param          inNow
+                        An AudioTimeStamp that indicates the IO cycle started. Note that this time
+                        includes any scheduling latency that may have been incurred waking the
+                        thread on which IO is being done.
+    @param          inInputData
+                        An AudioBufferList containing the input data for the current IO cycle. For
+                        streams that are disabled, the AudioBuffer's mData field will be NULL but
+                        the mDataByteSize field will still say how much data would have been there
+                        if it was enabled. Note that the contents of this structure should never be
+                        modified.
+    @param          inInputTime
+                        An AudioTimeStamp that indicates the time at which the first frame in the
+                        data was acquired from the hardware. If the device has no input streams, the
+                        time stamp will be zeroed out.
+    @param          outOutputData
+                        An AudioBufferList in which the output data for the current IO cycle is to
+                        be placed. On entry, each AudioBuffer's mDataByteSize field indicates the
+                        maximum amount of data that can be placed in the buffer and the buffer's
+                        memory has been zeroed out. For formats where the number of bytes per packet
+                        can vary (as with AC-3, for example), the client has to fill out on exit
+                        each mDataByteSize field in each AudioBuffer with the amount of data that
+                        was put in the buffer. Otherwise, the mDataByteSize field should not be
+                        changed. For streams that are disabled, the AudioBuffer's mData field will
+                        be NULL but the mDataByteSize field will still say how much data would have
+                        been there if it was enabled. Except as noted above, the contents of this
+                        structure should not other wise be modified.
+    @param          inOutputTime
+                        An AudioTimeStamp that indicates the time at which the first frame in the
+                        data will be passed to the hardware. If the device has no output streams,
+                        the time stamp will be zeroed out.
+    @param          inClientData
+                        A pointer to client data established when the AudioDeviceIOProc was
+                        registered with the AudioDevice.
+    @result         The return value is currently unused and should always be 0.
+}
+type
+	AudioDeviceIOProc = function( inDevice: AudioDeviceID; const (*var*) inNow: AudioTimeStamp; const (*var*) inInputData: AudioBufferList; const (*var*) inInputTime: AudioTimeStamp; var outOutputData: AudioBufferList; const (*var*) inOutputTime: AudioTimeStamp; inClientData: UnivPtr ): OSStatus;
+
+{!
+    @typedef        AudioDevicePropertyListenerProc
+    @abstract       Clients register an AudioDevicePropertyListenerProc with the AudioDevice object
+                    in order to receive notifications when the properties of the object change.
+    @discussion     Note that the same functionality is provided by AudioObjectPropertyListenerProc.
+    @param          inDevice
+                        The AudioDevice whose property has changed.
+    @param          inChannel
+                        The channel of the property that changed where 0 is the master channel.
+    @param          isInput
+                        Which section of the AudioDevice changed.
+    @param          inPropertyID
+                        The AudioDevicePropertyID of the property that changed.
+    @param          inClientData
+                        A pointer to client data established when the listener proc was registered
+                        with the object.
+    @result         The return value is currently unused and should always be 0.
+}
+type
+	AudioDevicePropertyListenerProc = function( inDevice: AudioDeviceID; inChannel: UInt32; isInput: Boolean; inPropertyID: AudioDevicePropertyID; inClientData: UnivPtr ): OSStatus;
+
+//==================================================================================================
+//#pragma mark    AudioDevice Constants
+
+{!
+    @enum           AudioDevice Class Constants
+    @abstract       Various constants related to AudioDevices.
+    @constant       kAudioDevicePropertyScopeInput
+                        The AudioObjectPropertyScope for properties that apply to the input signal
+                        paths of the AudioDevice.
+    @constant       kAudioDevicePropertyScopeOutput
+                        The AudioObjectPropertyScope for properties that apply to the output signal
+                        paths of the AudioDevice.
+    @constant       kAudioDevicePropertyScopePlayThrough
+                        The AudioObjectPropertyScope for properties that apply to the play through
+                        signal paths of the AudioDevice.
+    @constant       kAudioDeviceClassID
+                        The AudioClassID that identifies the AudioDevice class.
+    @constant       kAudioDeviceUnknown
+                        The AudioObjectID for a nonexistent AudioObject.
+}
+const
+	kAudioDevicePropertyScopeInput = $696E7074 (* 'inpt' *);
+	kAudioDevicePropertyScopeOutput = $6F757470 (* 'outp' *);
+	kAudioDevicePropertyScopePlayThrough = $70747275 (* 'ptru' *);
+	kAudioDeviceClassID = $61646576 (* 'adev' *);
+	kAudioDeviceUnknown = kAudioObjectUnknown;
+
+{!
+    @enum           StartAtTime/GetNearestStartTime Flags
+    @abstract       The flags that can be passed to control the behavior of AudioDeviceStartAtTime()
+                    andAudioDeviceGetNearestStartTime().
+    @constant       kAudioDeviceStartTimeIsInputFlag
+                        Set to indicate that the requested time refers to an input time. Clear to
+                        indicate that it is an output time.
+    @constant       kAudioDeviceStartTimeDontConsultDeviceFlag
+                        Set to indicate that the device should not be consulted when determining the
+                        start time. Clear to indicate that the device should be consulted. This flag
+                        cannot be set if kAudioDeviceStartTimeDontConsultHALFlag is set.
+    @constant       kAudioDeviceStartTimeDontConsultHALFlag
+                        Set to indicate that the HAL should not be consulted when determining the
+                        start time. Clear to indicate that the HAL should be consulted. This flag
+                        cannot be set if kAudioDeviceStartTimeDontConsultDeviceFlag is set.
+}
+const
+	kAudioDeviceStartTimeIsInputFlag = 1 shl 0;
+	kAudioDeviceStartTimeDontConsultDeviceFlag = 1 shl 1;
+	kAudioDeviceStartTimeDontConsultHALFlag = 1 shl 2;
+
+//==================================================================================================
+//#pragma mark    AudioDevice Properties
+
+{!
+    @enum           AudioDevice Properties
+    @abstract       AudioObjectPropertySelector values that apply to AudioDevice objects.
+    @discussion     AudioDevices have four scopes: kAudioDevicePropertyScopeGlobal,
+                    kAudioDevicePropertyScopeInput, kAudioDevicePropertyScopeOutput, and
+                    kAudioDevicePropertyScopePlayThrough. They have a master element and an element
+                    for each channel in each stream numbered according to the starting channel
+                    number of each stream.
+    @constant       kAudioDevicePropertyPlugIn
+                        An OSStatus that contains any error codes generated by loading the IOAudio
+                        driver plug-in for the AudioDevice or kAudioHardwareNoError if the plug-in
+                        loaded successfully. This property only exists for IOAudio-based
+                        AudioDevices whose driver has specified a plug-in to load.
+    @constant       kAudioDevicePropertyConfigurationApplication
+                        A CFString that contains the bundle ID for an application that provides a
+                        GUI for configuring the AudioDevice. By default, the value of this property
+                        is the bundle ID for Audio MIDI Setup. The caller is responsible for
+                        releasing the returned CFObject.
+    @constant       kAudioDevicePropertyDeviceUID
+                        A CFString that contains a persistent identifier for the AudioDevice. An
+                        AudioDevice's UID is persistent across boots. The content of the UID string
+                        is a black box and may contain information that is unique to a particular
+                        instance of an AudioDevice's hardware or unique to the CPU. Therefore they
+                        are not suitable for passing between CPUs or for identifying similar models
+                        of hardware.
+    @constant       kAudioDevicePropertyModelUID
+                        A CFString that contains a persistent identifier for the model of an
+                        AudioDevice. The identifier is unique such that the identifier from two
+                        AudioDevices are equal if and only if the two AudioDevices are the exact
+                        same model from the same manufacturer. Further, the identifier has to be the
+                        same no matter on what machine the AudioDevice appears.
+    @constant       kAudioDevicePropertyTransportType
+                        A UInt32 whose value indicates how the AudioDevice is connected to the CPU.
+                        Constants for some of the values for this property can be found in
+                        <IOKit/audio/IOAudioTypes.h>.
+    @constant       kAudioDevicePropertyRelatedDevices
+                        An array of AudioDeviceIDs for devices related to the AudioDevice. For
+                        IOAudio-based devices, a AudioDevices are related if they share the same
+                        IOAudioDevice object.
+    @constant       kAudioDevicePropertyClockDomain
+                        A UInt32 whose value indicates the clock domain to which this AudioDevice
+                        belongs. AudioDevices that have the same value for this property are able to
+                        be synchronized in hardware. However, a value of 0 indicates that the clock
+                        domain for the device is unspecified and should be assumed to be separate
+                        from every other device's clock domain, even if they have the value of 0 as
+                        their clock domain as well.
+    @constant       kAudioDevicePropertyDeviceIsAlive
+                        A UInt32 where a value of 1 means the device is ready and available and 0
+                        means the device is usable and will most likely go away shortly.
+    @constant       kAudioDevicePropertyDeviceHasChanged
+                        The type of this property is a UInt32, but it's value has no meaning. This
+                        property exists so that clients can listen to it and be told when the
+                        configuration of the AudioDevice has changed in ways that cannot otherwise
+                        be conveyed through other notifications. In response to this notification,
+                        clients should re-evaluate everything they need to know about the device,
+                        particularly the layout and values of the controls.
+    @constant       kAudioDevicePropertyDeviceIsRunning
+                        A UInt32 where a value of 0 means the AudioDevice is not performing IO and
+                        a value of 1 means that it is. Note that the device can be running even if
+                        there are no active IOProcs such as by calling AudioDeviceStart() and
+                        passing a NULL IOProc. Note that the notification for this property is
+                        usually sent from the AudioDevice's IO thread.
+    @constant       kAudioDevicePropertyDeviceIsRunningSomewhere
+                        A UInt32 where 1 means that the AudioDevice is running in at least one
+                        process on the system and 0 means that it isn't running at all.
+    @constant       kAudioDevicePropertyDeviceCanBeDefaultDevice
+                        A UInt32 where 1 means that the AudioDevice is a possible selection for
+                        kAudioHardwarePropertyDefaultInputDevice or
+                        kAudioHardwarePropertyDefaultOutputDevice depending on the scope.
+    @constant       kAudioDevicePropertyDeviceCanBeDefaultSystemDevice
+                        A UInt32 where 1 means that the AudioDevice is a possible selection for
+                        kAudioHardwarePropertyDefaultSystemOutputDevice.
+    @constant       kAudioDeviceProcessorOverload
+                        A UInt32 where the value has no meaning. This property exists so that
+                        clients can be notified when the AudioDevice detects that an IO cycle has
+                        run past it's deadline. Note that the notification for this property is
+                        usually sent from the AudioDevice's IO thread.
+    @constant       kAudioDevicePropertyHogMode
+                        A pid_t indicating the process that currently owns exclusive access to the
+                        AudioDevice or a value of -1 indicating that the device is currently
+                        available to all processes. If the AudioDevice is in a non-mixable mode,
+                        the HAL will automatically take hog mode on behalf of the first process to
+                        start an IOProc.
+    @constant       kAudioDevicePropertyLatency
+                        A UInt32 containing the number of frames of latency in the AudioDevice. Note
+                        that input and output latency may differ. Further, the AudioDevice's
+                        AudioStreams may have additional latency so they should be queried as well.
+                        If both the device and the stream say they have latency, then the total
+                        latency for the stream is the device latency summed with the stream latency.
+    @constant       kAudioDevicePropertyBufferFrameSize
+                        A UInt32 whose value indicates the number of frames in the IO buffers.
+    @constant       kAudioDevicePropertyBufferFrameSizeRange
+                        An AudioValueRange indicating the minimum and maximum values, inclusive, for
+                        kAudioDevicePropertyBufferFrameSize.
+    @constant       kAudioDevicePropertyUsesVariableBufferFrameSizes
+                        A UInt32 that, if implemented by a device, indicates that the sizes of the
+                        buffers passed to an IOProc will vary by a small amount. The value of this
+                        property will indicate the largest buffer that will be passed and
+                        kAudioDevicePropertyBufferFrameSize will indicate the smallest buffer that
+                        will get passed to the IOProc. The usage of this property is narrowed to
+                        only allow for devices whose buffer sizes vary by small amounts greater than
+                        kAudioDevicePropertyBufferFrameSize. It is not intended to be a license for
+                        devices to be able to send buffers however they please. Rather, it is
+                        intended to allow for hardware whose natural rhythms lead to this necessity.
+    @constant       kAudioDevicePropertyStreams
+                        An array of AudioStreamIDs that represent the AudioStreams of the
+                        AudioDevice. Note that if a notification is received for this property, any
+                        cached AudioStreamIDs for the device become invalid and need to be
+                        re-fetched.
+    @constant       kAudioDevicePropertySafetyOffset
+                        A UInt32 whose value indicates the number for frames in ahead (for output)
+                        or behind (for input the current hardware position that is safe to do IO.
+    @constant       kAudioDevicePropertyIOCycleUsage
+                        A Float32 whose range is from 0 to 1. This value indicates how much of the
+                        client portion of the IO cycle the process will use. The client portion of
+                        the IO cycle is the portion of the cycle in which the device calls the
+                        IOProcs so this property does not the apply to the duration of the entire
+                        cycle.
+    @constant       kAudioDevicePropertyStreamConfiguration
+                        This property returns the stream configuration of the device in an
+                        AudioBufferList (with the buffer pointers set to NULL) which describes the
+                        list of streams and the number of channels in each stream. This corresponds
+                        to what will be passed into the IOProc.
+    @constant       kAudioDevicePropertyIOProcStreamUsage
+                        An AudioHardwareIOProcStreamUsage structure which details the stream usage
+                        of a given IO proc. If a stream is marked as not being used, the given
+                        IOProc will see a corresponding NULL buffer pointer in the AudioBufferList
+                        passed to it's IO proc. Note that the number of streams detailed in the
+                        AudioHardwareIOProcStreamUsage must include all the streams of that
+                        direction on the device. Also, when getting the value of the property, one
+                        must fill out the mIOProc field of the AudioHardwareIOProcStreamUsage with
+                        the address of the of the IOProc whose stream usage is to be retrieved.
+    @constant       kAudioDevicePropertyPreferredChannelsForStereo
+                        An array of two UInt32s, the first for the left channel, the second for the
+                        right channel, that indicate the channel numbers to use for stereo IO on the
+                        device. The value of this property can be different for input and output and
+                        there are no restrictions on the channel numbers that can be used.
+    @constant       kAudioDevicePropertyPreferredChannelLayout
+                        An AudioChannelLayout that indicates how each channel of the AudioDevice
+                        should be used.
+    @constant       kAudioDevicePropertyNominalSampleRate
+                        A Float64 that indicates the current nominal sample rate of the AudioDevice.
+    @constant       kAudioDevicePropertyAvailableNominalSampleRates
+                        An array of AudioValueRange structs that indicates the valid ranges for the
+                        nominal sample rate of the AudioDevice.
+    @constant       kAudioDevicePropertyActualSampleRate
+                        A Float64 that indicates the current actual sample rate of the AudioDevice
+                        as measured by it's time stamps.
+}
+const
+	kAudioDevicePropertyPlugIn = $706C7567 (* 'plug' *);
+	kAudioDevicePropertyConfigurationApplication = $63617070 (* 'capp' *);
+	kAudioDevicePropertyDeviceUID = $75696420 (* 'uid ' *);
+	kAudioDevicePropertyModelUID = $6D756964 (* 'muid' *);
+	kAudioDevicePropertyTransportType = $7472616E (* 'tran' *);
+	kAudioDevicePropertyRelatedDevices = $616B696E (* 'akin' *);
+	kAudioDevicePropertyClockDomain = $636C6B64 (* 'clkd' *);
+	kAudioDevicePropertyDeviceIsAlive = $6C69766E (* 'livn' *);
+	kAudioDevicePropertyDeviceHasChanged = $64696666 (* 'diff' *);
+	kAudioDevicePropertyDeviceIsRunning = $676F696E (* 'goin' *);
+	kAudioDevicePropertyDeviceIsRunningSomewhere = $676F6E65 (* 'gone' *);
+	kAudioDevicePropertyDeviceCanBeDefaultDevice = $64666C74 (* 'dflt' *);
+	kAudioDevicePropertyDeviceCanBeDefaultSystemDevice = $73666C74 (* 'sflt' *);
+	kAudioDeviceProcessorOverload = $6F766572 (* 'over' *);
+	kAudioDevicePropertyHogMode = $6F696E6B (* 'oink' *);
+	kAudioDevicePropertyLatency = $6C746E63 (* 'ltnc' *);
+	kAudioDevicePropertyBufferFrameSize = $6673697A (* 'fsiz' *);
+	kAudioDevicePropertyBufferFrameSizeRange = $66737A23 (* 'fsz#' *);
+	kAudioDevicePropertyUsesVariableBufferFrameSizes = $7666737A (* 'vfsz' *);
+	kAudioDevicePropertyStreams = $73746D23 (* 'stm#' *);
+	kAudioDevicePropertySafetyOffset = $73616674 (* 'saft' *);
+	kAudioDevicePropertyIOCycleUsage = $6E637963 (* 'ncyc' *);
+	kAudioDevicePropertyStreamConfiguration = $736C6179 (* 'slay' *);
+	kAudioDevicePropertyIOProcStreamUsage = $73757365 (* 'suse' *);
+	kAudioDevicePropertyPreferredChannelsForStereo = $64636832 (* 'dch2' *);
+	kAudioDevicePropertyPreferredChannelLayout = $73726E64 (* 'srnd' *);
+	kAudioDevicePropertyNominalSampleRate = $6E737274 (* 'nsrt' *);
+	kAudioDevicePropertyAvailableNominalSampleRates = $6E737223 (* 'nsr#' *);
+	kAudioDevicePropertyActualSampleRate = $61737274 (* 'asrt' *);
+
+{!
+    @enum           AudioDevice Properties Implemented via AudioControl objects
+    @abstract       AudioObjectPropertySelector values for AudioDevice properties that are
+                    implemented by AudioControl objects.
+    @discussion     These properties are also accessible by locating the AudioControl object
+                    attached to the AudioDevice and using that object to access the properties of
+                    the control.
+    @constant       kAudioDevicePropertyJackIsConnected
+                        A UInt32 where a value of 0 means that there isn't anything plugged into the
+                        jack associated withe given element and scope. This property is implemented
+                        by an AudioJackControl, a subclass of AudioBooleanControl.
+    @constant       kAudioDevicePropertyVolumeScalar
+                        A Float32 that represents the value of the volume control. The range is
+                        between 0.0 and 1.0 (inclusive). This property is implemented by an
+                        AudioControl object that is a subclass of AudioVolumeControl.
+    @constant       kAudioDevicePropertyVolumeDecibels
+                        A Float32 that represents the value of the volume control in dB. This
+                        property is implemented by an AudioControl object that is a subclass of
+                        AudioVolumeControl.
+    @constant       kAudioDevicePropertyVolumeRangeDecibels
+                        An AudioValueRange that contains the minimum and maximum dB values the
+                        control can have. This property is implemented by an AudioControl object
+                        that is a subclass of AudioVolumeControl.
+    @constant       kAudioDevicePropertyVolumeScalarToDecibels
+                        A Float32 that on input contains a scalar volume value for the and on exit
+                        contains the equivalent dB value. This property is implemented by an
+                        AudioControl object that is a subclass of AudioVolumeControl.
+    @constant       kAudioDevicePropertyVolumeDecibelsToScalar
+                        A Float32 that on input contains a dB volume value for the and on exit
+                        contains the equivalent scalar value. This property is implemented by an
+                        AudioControl object that is a subclass of AudioVolumeControl.
+    @constant       kAudioDevicePropertyStereoPan
+                        A Float32 where 0.0 is full left, 1.0 is full right, and 0.5 is center. This
+                        property is implemented by an AudioControl object that is a subclass of
+                        AudioStereoPanControl.
+    @constant       kAudioDevicePropertyStereoPanChannels
+                        An array of two UInt32s that indicate which elements of the owning object
+                        the signal is being panned between. This property is implemented by an
+                        AudioControl object that is a subclass of AudioStereoPanControl.
+    @constant       kAudioDevicePropertyMute
+                        A UInt32 where a value of 1 means that mute is enabled making that element
+                        inaudible. The property is implemented by an AudioControl object that is a
+                        subclass of AudioMuteControl.
+    @constant       kAudioDevicePropertySolo
+                        A UInt32 where a value of 1 means that just that element is audible and the
+                        other elements are inaudible. The property is implemented by an AudioControl
+                        object that is a subclass of AudioSoloControl.
+    @constant       kAudioDevicePropertyDataSource
+                        A UInt32 whose value is the item ID for the currently selected data source.
+                        This property is implemented by an AudioControl object that is a subclass of
+                        AudioDataSourceControl.
+    @constant       kAudioDevicePropertyDataSources
+                        An array of UInt32s that are represent all the IDs of all the data sources
+                        currently available. This property is implemented by an AudioControl object
+                        that is a subclass of AudioDataSourceControl.
+    @constant       kAudioDevicePropertyDataSourceNameForIDCFString
+                        This property translates the given data source item ID into a human readable
+                        name using an AudioValueTranslation structure. The input data is the UInt32
+                        containing the item ID to translated and the output data is a CFString. The
+                        caller is responsible for releasing the returned CFObject. This property is
+                        implemented by an AudioControl object that is a subclass of
+                        AudioDataSourceControl.
+    @constant       kAudioDevicePropertyClockSource
+                        A UInt32 whose value is the item ID for the currently selected clock source.
+                        This property is implemented by an AudioControl object that is a subclass of
+                        AudioClockControl.
+    @constant       kAudioDevicePropertyClockSources
+                        An array of UInt32s that are represent all the IDs of all the clock sources
+                        currently available. This property is implemented by an AudioControl object
+                        that is a subclass of AudioClockControl.
+    @constant       kAudioDevicePropertyClockSourceNameForIDCFString
+                        This property translates the given clock source item ID into a human
+                        readable name using an AudioValueTranslation structure. The input data is
+                        the UInt32 containing the item ID to translated and the output data is a
+                        CFString. The caller is responsible for releasing the returned CFObject.
+                        This property is implemented by an AudioControl object that is a subclass of
+                        AudioClockControl.
+    @constant       kAudioDevicePropertyClockSourceKindForID
+                        This property returns a UInt32 that identifies the kind of clock source
+                        the item ID refers to using an AudioValueTranslation structure. The input
+                        data is the UInt32 containing the item ID and the output data is the UInt32.
+                        Values for this property are defined in <IOAudio/audio/IOAudioTypes.h>. 
+    @constant       kAudioDevicePropertyPlayThru
+                        A UInt32 where a value of 0 means that play through is off and a value of 1
+                        means that it is on. This property is implemented by an AudioControl object
+                        that is a subclass of AudioMuteControl. Further, the control that implements
+                        this property is only available through
+                        kAudioDevicePropertyScopePlayThrough.
+    @constant       kAudioDevicePropertyPlayThruSolo
+                        A UInt32 where a value of 1 means that just that play through element is
+                        audible and the other elements are inaudible. The property is implemented by
+                        an AudioControl object that is a subclass of AudioSoloControl. Further, the
+                        control that implements this property is only available through
+                        kAudioDevicePropertyScopePlayThrough.
+    @constant       kAudioDevicePropertyPlayThruVolumeScalar
+                        A Float32 that represents the value of the volume control. The range is
+                        between 0.0 and 1.0 (inclusive). This property is implemented by an
+                        AudioControl object that is a subclass of AudioVolumeControl.Further, the
+                        control that implements this property is only available through
+                        kAudioDevicePropertyScopePlayThrough.
+    @constant       kAudioDevicePropertyPlayThruVolumeDecibels
+                        A Float32 that represents the value of the volume control in dB. This
+                        property is implemented by an AudioControl object that is a subclass of
+                        AudioVolumeControl. Further, the control that implements this property is
+                        only available through kAudioDevicePropertyScopePlayThrough.
+    @constant       kAudioDevicePropertyPlayThruVolumeRangeDecibels
+                        An AudioValueRange that contains the minimum and maximum dB values the
+                        control can have. This property is implemented by an AudioControl object
+                        that is a subclass of AudioVolumeControl. Further, the control that
+                        implements this property is only available through
+                        kAudioDevicePropertyScopePlayThrough.
+    @constant       kAudioDevicePropertyPlayThruVolumeScalarToDecibels
+                        A Float32 that on input contains a scalar volume value for the and on exit
+                        contains the equivalent dB value. This property is implemented by an
+                        AudioControl object that is a subclass of AudioVolumeControl. Further, the
+                        control that implements this property is only available through
+                        kAudioDevicePropertyScopePlayThrough.
+    @constant       kAudioDevicePropertyPlayThruVolumeDecibelsToScalar
+                        A Float32 that on input contains a dB volume value for the and on exit
+                        contains the equivalent scalar value. This property is implemented by an
+                        AudioControl object that is a subclass of AudioVolumeControl. Further, the
+                        control that implements this property is only available through
+                        kAudioDevicePropertyScopePlayThrough.
+    @constant       kAudioDevicePropertyPlayThruStereoPan
+                        A Float32 where 0.0 is full left, 1.0 is full right, and 0.5 is center. This
+                        property is implemented by an AudioControl object that is a subclass of
+                        AudioStereoPanControl. Further, the control that implements this property is
+                        only available through kAudioDevicePropertyScopePlayThrough.
+    @constant       kAudioDevicePropertyPlayThruStereoPanChannels
+                        An array of two UInt32s that indicate which elements of the owning object
+                        the signal is being panned between. This property is implemented by an
+                        AudioControl object that is a subclass of AudioStereoPanControl. Further,
+                        the control that implements this property is only available through
+                        kAudioDevicePropertyScopePlayThrough.
+    @constant       kAudioDevicePropertyPlayThruDestination
+                        A UInt32 whose value is the item ID for the currently selected play through
+                        data destination. This property is implemented by an AudioControl object
+                        that is a subclass of AudioDataDestinationControl. Further, the control that
+                        implements this property is only available through
+                        kAudioDevicePropertyScopePlayThrough.
+    @constant       kAudioDevicePropertyPlayThruDestinations
+                        An array of UInt32s that are represent all the IDs of all the play through
+                        data destinations currently available. This property is implemented by an
+                        AudioControl object that is a subclass of AudioDataDestinationControl.
+                        Further, the control that implements this property is only available through
+                        kAudioDevicePropertyScopePlayThrough.
+    @constant       kAudioDevicePropertyPlayThruDestinationNameForIDCFString
+                        This property translates the given play through data destination item ID
+                        into a human readable name using an AudioValueTranslation structure. The
+                        input data is the UInt32 containing the item ID to translated and the output
+                        data is a CFString. The caller is responsible for releasing the returned
+                        CFObject. This property is implemented by an AudioControl object that is a
+                        subclass of AudioDataDestinationControl. Further, the control that
+                        implements this property is only available through
+                        kAudioDevicePropertyScopePlayThrough.
+    @constant       kAudioDevicePropertyChannelNominalLineLevel
+                        A UInt32 whose value is the item ID for the currently selected nominal line
+                        level. This property is implemented by an AudioControl object that is a
+                        subclass of AudioLineLevelControl.
+    @constant       kAudioDevicePropertyChannelNominalLineLevels
+                        An array of UInt32s that represent all the IDs of all the nominal line
+                        levels currently available. This property is implemented by an AudioControl
+                        object that is a subclass of AudioLineLevelControl.
+    @constant       kAudioDevicePropertyChannelNominalLineLevelNameForIDCFString
+                        This property translates the given nominal line level item ID into a human
+                        readable name using an AudioValueTranslation structure. The input data is
+                        the UInt32 containing the item ID to be translated and the output data is a
+                        CFString. The caller is responsible for releasing the returned CFObject.
+                        This property is implemented by an AudioCOntrol object that is a subclass of
+                        AudioLineLevelControl.
+    @constant       kAudioDevicePropertyDriverShouldOwniSub
+                        A UInt32 where a value of 0 means that the AudioDevice should not claim
+                        ownership of any attached iSub and a value of 1 means that it should. Note
+                        that this property is only available for built-in devices and for USB Audio
+                        devices that use the standard class compliant driver. This property is
+                        implemented by an AudioControl object that is a subclass of
+                        AudioISubOwnerControl.
+    @constant       kAudioDevicePropertySubVolumeScalar
+                        A Float32 that represents the value of the LFE volume control. The range is
+                        between 0.0 and 1.0 (inclusive). This property is implemented by an
+                        AudioControl object that is a subclass of AudioLFEVolumeControl.
+    @constant       kAudioDevicePropertySubVolumeDecibels
+                        A Float32 that represents the value of the LFE volume control in dB. This
+                        property is implemented by an AudioControl object that is a subclass of
+                        AudioLFE VolumeControl.
+    @constant       kAudioDevicePropertySubVolumeRangeDecibels
+                        An AudioValueRange that contains the minimum and maximum dB values the
+                        control can have. This property is implemented by an AudioControl object
+                        that is a subclass of AudioLFEVolumeControl.
+    @constant       kAudioDevicePropertySubVolumeScalarToDecibels
+                        A Float32 that on input contains a scalar volume value for the and on exit
+                        contains the equivalent dB value. This property is implemented by an
+                        AudioControl object that is a subclass of AudioLFEVolumeControl.
+    @constant       kAudioDevicePropertySubVolumeDecibelsToScalar
+                        A Float32 that on input contains a dB volume value for the and on exit
+                        contains the equivalent scalar value. This property is implemented by an
+                        AudioControl object that is a subclass of AudioLFEVolumeControl.
+    @constant       kAudioDevicePropertySubMute
+                        A UInt32 where a value of 1 means that mute is enabled making the LFE on
+                        that element inaudible. The property is implemented by an AudioControl
+                        object that is a subclass of AudioLFEMuteControl.
+}
+const
+	kAudioDevicePropertyJackIsConnected = $6A61636B (* 'jack' *);
+	kAudioDevicePropertyVolumeScalar = $766F6C6D (* 'volm' *);
+	kAudioDevicePropertyVolumeDecibels = $766F6C64 (* 'vold' *);
+	kAudioDevicePropertyVolumeRangeDecibels = $76646223 (* 'vdb#' *);
+	kAudioDevicePropertyVolumeScalarToDecibels = $76326462 (* 'v2db' *);
+	kAudioDevicePropertyVolumeDecibelsToScalar = $64623276 (* 'db2v' *);
+	kAudioDevicePropertyStereoPan = $7370616E (* 'span' *);
+	kAudioDevicePropertyStereoPanChannels = $73706E23 (* 'spn#' *);
+	kAudioDevicePropertyMute = $6D757465 (* 'mute' *);
+	kAudioDevicePropertySolo = $736F6C6F (* 'solo' *);
+	kAudioDevicePropertyDataSource = $73737263 (* 'ssrc' *);
+	kAudioDevicePropertyDataSources = $73736323 (* 'ssc#' *);
+	kAudioDevicePropertyDataSourceNameForIDCFString = $6C73636E (* 'lscn' *);
+	kAudioDevicePropertyClockSource = $63737263 (* 'csrc' *);
+	kAudioDevicePropertyClockSources = $63736323 (* 'csc#' *);
+	kAudioDevicePropertyClockSourceNameForIDCFString = $6C63736E (* 'lcsn' *);
+	kAudioDevicePropertyClockSourceKindForID = $6373636B (* 'csck' *);
+	kAudioDevicePropertyPlayThru = $74687275 (* 'thru' *);
+	kAudioDevicePropertyPlayThruSolo = $74687273 (* 'thrs' *);
+	kAudioDevicePropertyPlayThruVolumeScalar = $6D767363 (* 'mvsc' *);
+	kAudioDevicePropertyPlayThruVolumeDecibels = $6D766462 (* 'mvdb' *);
+	kAudioDevicePropertyPlayThruVolumeRangeDecibels = $6D766423 (* 'mvd#' *);
+	kAudioDevicePropertyPlayThruVolumeScalarToDecibels = $6D763264 (* 'mv2d' *);
+	kAudioDevicePropertyPlayThruVolumeDecibelsToScalar = $6D763273 (* 'mv2s' *);
+	kAudioDevicePropertyPlayThruStereoPan = $6D73706E (* 'mspn' *);
+	kAudioDevicePropertyPlayThruStereoPanChannels = $6D737023 (* 'msp#' *);
+	kAudioDevicePropertyPlayThruDestination = $6D646473 (* 'mdds' *);
+	kAudioDevicePropertyPlayThruDestinations = $6D646423 (* 'mdd#' *);
+	kAudioDevicePropertyPlayThruDestinationNameForIDCFString = $6D646463 (* 'mddc' *);
+	kAudioDevicePropertyChannelNominalLineLevel = $6E6C766C (* 'nlvl' *);
+	kAudioDevicePropertyChannelNominalLineLevels = $6E6C7623 (* 'nlv#' *);
+	kAudioDevicePropertyChannelNominalLineLevelNameForIDCFString = $6C636E6C (* 'lcnl' *);
+	kAudioDevicePropertyDriverShouldOwniSub = $69737562 (* 'isub' *);
+	kAudioDevicePropertySubVolumeScalar = $73766C6D (* 'svlm' *);
+	kAudioDevicePropertySubVolumeDecibels = $73766C64 (* 'svld' *);
+	kAudioDevicePropertySubVolumeRangeDecibels = $73766423 (* 'svd#' *);
+	kAudioDevicePropertySubVolumeScalarToDecibels = $73763264 (* 'sv2d' *);
+	kAudioDevicePropertySubVolumeDecibelsToScalar = $73643276 (* 'sd2v' *);
+	kAudioDevicePropertySubMute = $736D7574 (* 'smut' *);
+
+{!
+    @enum           AudioDevice Properties That Ought To Some Day Be Deprecated
+    @abstract       AudioObjectPropertySelector values whose functionality is better provided by
+                    other selectors.
+    @discussion     These selectors are still provided for backward compatibility. The description
+                    of the property will indicate in parentheses the better selectors to use and
+                    why.
+    @constant       kAudioDevicePropertyDeviceName
+                        A C-string that contains the human readable name of the AudioDevice.
+                        (kAudioObjectPropertyName: CFStrings are better for localization.)
+    @constant       kAudioDevicePropertyDeviceNameCFString
+                        A CFStringRef that contains the human readable name of the AudioDevice. The
+                        caller is responsible for releasing the returned CFObject.
+                        (kAudioObjectPropertyName: This is just another name for the inherited
+                        selector.)
+    @constant       kAudioDevicePropertyDeviceManufacturer
+                        A C-string that contains the human readable name of the manufacturer of the
+                        AudioDevice.
+                        (kAudioObjectPropertyManufacturer: CFStrings are better for localization.)
+    @constant       kAudioDevicePropertyDeviceManufacturerCFString
+                        A CFString that contains the human readable name of the manufacturer of the
+                        AudioDevice. The caller is responsible for releasing the returned CFObject.
+                        (kAudioObjectPropertyManufacturer: This is just another name for the
+                        inherited selector.)
+    @constant       kAudioDevicePropertyRegisterBufferList
+                        This property allows clients to register a fully populated AudioBufferList
+                        that matches the topology described by
+                        kAudioDevicePropertyStreamConfiguration for doing input using
+                        AudioDeviceRead(). The AudioBufferList will be registered with the call the
+                        AudioDeviceSetProperty() and will be unregistered with the call to
+                        AudioDeviceGetProperty(). If this property isn't implemented by the
+                        AudioDevice, it implies that the AudioDevice also doesn't support
+                        AudioDeviceRead().
+                        (Aggregate devices make AudioDeviceRead() obsolete for the most part.)
+    @constant       kAudioDevicePropertyBufferSize
+                        A UInt32 containing the size in bytes of the IO buffer for the AudioStream
+                        containing the element.
+                        (kAudioDevicePropertyBufferFrameSize: with multiple AudioStreams and the
+                        requirement that all streams' buffers represent the same amount of time, it
+                        doesn't make sense to set the buffer size in bytes since it will be
+                        different for each stream.)
+    @constant       kAudioDevicePropertyBufferSizeRange
+                        An AudioValueRange specifying the minimum and maximum bytes size for the
+                        IO buffer for the AudioStream containing the given element.
+                        (kAudioDevicePropertyBufferFrameSizeRange: see
+                        kAudioDevicePropertyBufferSize.)
+    @constant       kAudioDevicePropertyChannelName
+                        A CFString that contains a human readable name for the given element in the
+                        given scope. The caller is responsible for releasing the returned CFObject.
+                        (kAudioObjectPropertyElementName: CFStrings are better for
+                        localization.)
+    @constant       kAudioDevicePropertyChannelNameCFString
+                        A CFString that contains a human readable name for the given element in the
+                        given scope. The caller is responsible for releasing the returned CFObject.
+                        (kAudioObjectPropertyElementName: This is just another name for the
+                        inherited selector.)
+    @constant       kAudioDevicePropertyChannelCategoryName
+                        A CFString that contains a human readable name for the category of the given
+                        element in the given scope. The caller is responsible for releasing the
+                        returned CFObject.
+                        (kAudioObjectPropertyElementCategoryName: CFStrings are better for
+                        localization.)
+    @constant       kAudioDevicePropertyChannelCategoryNameCFString
+                        A CFString that contains a human readable name for the category of the given
+                        element in the given scope. The caller is responsible for releasing the
+                        returned CFObject.
+                        (kAudioObjectPropertyElementCategoryName: This is just another name for the
+                        inherited selector.)
+    @constant       kAudioDevicePropertyChannelNumberName
+                        A CFString that contains a human readable name for the number of the given
+                        element in the given scope. The caller is responsible for releasing the
+                        returned CFObject.
+                        (kAudioObjectPropertyElementNumberName: CFStrings are better for
+                        localization.)
+    @constant       kAudioDevicePropertyChannelNumberNameCFString
+                        A CFString that contains a human readable name for the number of the given
+                        element in the given scope. The caller is responsible for releasing the
+                        returned CFObject.
+                        (kAudioObjectPropertyElementNumberName: This is just another name for the
+                        inherited selector.)
+    @constant       kAudioDevicePropertySupportsMixing
+                        A UInt32 where a value of 1 means the AudioDevice supports mixing and a
+                        value of 0 means that it doesn't and that all IO is performed in each
+                        AudioStream's current physical format. This property is changed indirectly
+                        by changing to a format that doesn't support mixing, such as AC-3. (The HAL
+                        now vends it's format information with a flag indicating the mixability in
+                        order to better support devices with streams that are both mixable and non-
+                        mixable.)
+    @constant       kAudioDevicePropertyStreamFormat
+                        An AudioStreamBasicDescription that describes the current data format for
+                        the AudioStream that contains the channel referred to by the element number.
+                        (kAudioStreamPropertyVirtualFormat: Managing format information is
+                        inherently an operation on AudioStreams, rather than AudioDevices. It is
+                        confusing for the client to work with formats at the AudioDevice level and
+                        has been shown to lead to programming mistakes by clients when working with
+                        devices that have multiple streams.)
+    @constant       kAudioDevicePropertyStreamFormats
+                        An array of AudioStreamBasicDescriptions that describe the available data
+                        formats for the AudioStream that contains the channel referred to by the
+                        element number.
+                        (kAudioStreamPropertyAvailableVirtualFormats: Managing format information is
+                        inherently an operation on AudioStreams, rather than AudioDevices. It is
+                        confusing for the client to work with formats at the AudioDevice level and
+                        has been shown to lead to programming mistakes by clients when working with
+                        devices that have multiple streams.)
+    @constant       kAudioDevicePropertyStreamFormatSupported
+                        An AudioStreamBasicDescription is passed in to query whether or not the
+                        format is supported. A kAudioDeviceUnsupportedFormatError will be returned
+                        if the format is not supported and kAudioHardwareNoError will be returned if
+                        it is supported. AudioStreamBasicDescription fields set to 0 will be ignored
+                        in the query, but otherwise values must match exactly.
+                        (kAudioStreamPropertyAvailableVirtualFormats: The proper and most robust way
+                        to find a format that the AudioStream can support is to get the list of
+                        available formats and look through that rather than using this property.)
+    @constant       kAudioDevicePropertyStreamFormatMatch
+                        An AudioStreamBasicDescription is passed in and the AudioStream will modify
+                        it to describe the best match, in the AudioDevice's opinion, for the given
+                        format.
+                        (kAudioStreamPropertyAvailableVirtualFormats: The proper and most robust way
+                        to find a format that the AudioStream can support is to get the list of
+                        available formats and look through that rather than using this property.)
+    @constant       kAudioDevicePropertyDataSourceNameForID
+                        This property translates the given data source item ID into a human readable
+                        name using an AudioValueTranslation structure. The input data is the UInt32
+                        holding the item ID to be translated and the output data is a buffer to hold
+                        the name as a null terminated c-string.
+                        (kAudioDevicePropertyDataSourceNameForIDCFString: CFStrings are better for
+                        localization.)
+    @constant       kAudioDevicePropertyClockSourceNameForID
+                        This property translates the given clock source item ID into a human
+                        readable name using an AudioValueTranslation structure. The input data is
+                        the UInt32 holding the item ID to be translated and the output data is a
+                        buffer to hold the name as a null terminated c-string.
+                        (kAudioDevicePropertyClockSourceNameForIDCFString: CFStrings are better for
+                        localization.)
+    @constant       kAudioDevicePropertyPlayThruDestinationNameForID
+                        This property translates the given play through destination item ID into a
+                        human readable name using an AudioValueTranslation structure. The input data
+                        is the UInt32 holding the item ID to be translated and the output data is a
+                        buffer to hold the name as a null terminated c-string.
+                        (kAudioDevicePropertyPlayThruDestinationNameForIDCFString: CFStrings are
+                        better for localization.)
+    @constant       kAudioDevicePropertyChannelNominalLineLevelNameForID
+                        This property translates the given nominal line level item ID into a human
+                        readable name using an AudioValueTranslation structure. The input data is
+                        the UInt32 holding the item ID to be translated and the output data is a
+                        buffer to hold the name as a null terminated c-string.
+                        (kAudioDevicePropertyChannelNominalLineLevelNameForIDCFString: CFStrings are
+                        better for localization.)
+}
+const
+	kAudioDevicePropertyDeviceName = $6E616D65 (* 'name' *);
+	kAudioDevicePropertyDeviceNameCFString = kAudioObjectPropertyName;
+	kAudioDevicePropertyDeviceManufacturer = $6D616B72 (* 'makr' *);
+	kAudioDevicePropertyDeviceManufacturerCFString = kAudioObjectPropertyManufacturer;
+	kAudioDevicePropertyRegisterBufferList = $72627566 (* 'rbuf' *);
+	kAudioDevicePropertyBufferSize = $6273697A (* 'bsiz' *);
+	kAudioDevicePropertyBufferSizeRange = $62737A23 (* 'bsz#' *);
+	kAudioDevicePropertyChannelName = $63686E6D (* 'chnm' *);
+	kAudioDevicePropertyChannelNameCFString = kAudioObjectPropertyElementName;
+	kAudioDevicePropertyChannelCategoryName = $63636E6D (* 'ccnm' *);
+	kAudioDevicePropertyChannelCategoryNameCFString = kAudioObjectPropertyElementCategoryName;
+	kAudioDevicePropertyChannelNumberName = $636E6E6D (* 'cnnm' *);
+	kAudioDevicePropertyChannelNumberNameCFString = kAudioObjectPropertyElementNumberName;
+	kAudioDevicePropertySupportsMixing = $6D69783F (* 'mix?' *);
+	kAudioDevicePropertyStreamFormat = $73666D74 (* 'sfmt' *);
+	kAudioDevicePropertyStreamFormats = $73666D23 (* 'sfm#' *);
+	kAudioDevicePropertyStreamFormatSupported = $73666D3F (* 'sfm?' *);
+	kAudioDevicePropertyStreamFormatMatch = $73666D6D (* 'sfmm' *);
+	kAudioDevicePropertyDataSourceNameForID = $7373636E (* 'sscn' *);
+	kAudioDevicePropertyClockSourceNameForID = $6373636E (* 'cscn' *);
+	kAudioDevicePropertyPlayThruDestinationNameForID = $6D64646E (* 'mddn' *);
+	kAudioDevicePropertyChannelNominalLineLevelNameForID = $636E6C76 (* 'cnlv' *);
+
+//==================================================================================================
+//#pragma mark    AudioDevice Functions
+
+{!
+    @functiongroup  AudioDevice
+}
+
+{!
+    @function       AudioDeviceAddIOProc
+    @abstract       Registers the given AudioDeviceIOProc with the AudioDevice.
+    @discussion     A client may have multiple IOProcs for a given device, but the device is free to
+                    only accept as many as it can handle. Note that it is not recommended for
+                    clients to have more than a single IOProc registered at a time as this can be
+                    wasteful of system resources. Rather, it is recommended that the client do any
+                    necessary mixing itself so that only one IOProc is necessary.
+    @param          inDevice
+                        The AudioDevice to register the IOProc with.
+    @param          inProc
+                        The AudioDeviceIOProc to register.
+    @param          inClientData
+                        A pointer to client data that is passed back to the IOProc when it is
+                        called.
+    @result         An OSStatus indicating success or failure.
+}
+function AudioDeviceAddIOProc( inDevice: AudioDeviceID; inProc: AudioDeviceIOProc; inClientData: UnivPtr ): OSStatus; external name '_AudioDeviceAddIOProc';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+    @function       AudioDeviceRemoveIOProc
+    @abstract       Unregisters the given AudioDeviceIOProc from the AudioDevice.
+    @param          inDevice
+                        The AudioDevice to unregister the IOProc from.
+    @param          inProc
+                        The AudioDeviceIOProc to unregister.
+    @result         An OSStatus indicating success or failure.
+}
+function AudioDeviceRemoveIOProc( inDevice: AudioDeviceID; inProc: AudioDeviceIOProc ): OSStatus; external name '_AudioDeviceRemoveIOProc';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+    @function       AudioDeviceStart
+    @abstract       Starts IO for the given AudioDeviceIOProc.
+    @param          inDevice
+                        The AudioDevice to start the IOProc on.
+    @param          inProc
+                        The AudioDeviceIOProc to start. Note that this can be NULL, which starts the
+                        hardware regardless of whether or not there are any IOProcs registered. This
+                        is necessary if any of the AudioDevice's timing services are to be used. A
+                        balancing call to AudioDeviceStop with a NULL IOProc is required to stop the
+                        hardware.
+    @result         An OSStatus indicating success or failure.
+}
+function AudioDeviceStart( inDevice: AudioDeviceID; inProc: AudioDeviceIOProc ): OSStatus; external name '_AudioDeviceStart';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+    @function       AudioDeviceStartAtTime
+    @abstract       Starts IO for the given AudioDeviceIOProc and aligns the IO cycle of the
+                    AudioDevice with the given time.
+    @param          inDevice
+                        The AudioDevice to start the IOProc on.
+    @param          inProc
+                        The AudioDeviceIOProc to start. Note that this can be NULL, which starts the
+                        hardware regardless of whether or not there are any IOProcs registered.
+    @param          ioRequestedStartTime
+                        A pointer to an AudioTimeStamp that, on entry, is the requested time to
+                        start the IOProc. On exit, it will be the actual time the IOProc will start.
+    @param          inFlags
+                        A UInt32 containing flags that modify how this function behaves.
+    @result         An OSStatus indicating success or failure.
+                    kAudioHardwareUnsupportedOperationError will be returned if the AudioDevice does
+                    not support starting at a specific time and inProc and ioRequestedStartTime are
+                    not NULL.
+}
+function AudioDeviceStartAtTime( inDevice: AudioDeviceID; inProc: AudioDeviceIOProc; ioRequestedStartTime: AudioTimeStampPtr; inFlags: UInt32 ): OSStatus; external name '_AudioDeviceStartAtTime';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{!
+    @function       AudioDeviceStop
+    @abstract       Stops IO for the given AudioDeviceIOProc.
+    @param          inDevice
+                        The AudioDevice to stop the IOProc on.
+    @param          inProc
+                        The AudioDeviceIOProc to stop.
+    @result         An OSStatus indicating success or failure.
+}
+function AudioDeviceStop( inDevice: AudioDeviceID; inProc: AudioDeviceIOProc ): OSStatus; external name '_AudioDeviceStop';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+    @function       AudioDeviceRead
+    @abstract       Read some data from an AudioDevice starting at the given time.
+    @discussion     With the advent of aggregate devices, the need for AudioDeviceRead has gone
+                    away. Consequently, this function is a good candidate for deprecation some day.
+    @param          inDevice
+                        The AudioDevice to read from.
+    @param          inStartTime
+                        An AudioTimeStamp indicating the time from which to read the data. In
+                        general, the valid range of time (in frames) is from the current time minus
+                        the maximum IO buffer size to the current time minus the safety offset.
+    @param          outData
+                        An AudioBufferList that must be the same size and shape as that returned by
+                        kAudioDevicePropertyStreamConfiguration. Further, the AudioBufferList must
+                        have been previously registered with the device via
+                        kAudioDevicePropertyRegisterBufferList. On exit, the mDataSize fields will
+                        be updated with the amount of data read.
+    @result         An OSStatus indicating success or failure.
+                    kAudioHardwareUnsupportedOperationError will be returned if the AudioDevice does
+                    not support direct reading.
+}
+function AudioDeviceRead( inDevice: AudioDeviceID; const (*var*) inStartTime: AudioTimeStamp; var outData: AudioBufferList ): OSStatus; external name '_AudioDeviceRead';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{!
+    @function       AudioDeviceGetCurrentTime
+    @abstract       Retrieves the current time from an AudioDevice. Note that the device has to be
+                    running.
+    @param          inDevice
+                        The AudioDevice to from which to get the time.
+    @param          outTime
+                        An AudioTimeStamp into which the current time is put.
+    @result         An OSStatus indicating success or failure. kAudioHardwareNotRunningError will be
+                    returned if the AudioDevice isn't running.
+}
+function AudioDeviceGetCurrentTime( inDevice: AudioDeviceID; var outTime: AudioTimeStamp ): OSStatus; external name '_AudioDeviceGetCurrentTime';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+    @function       AudioDeviceTranslateTime
+    @abstract       Translates the time in the AudioDevice's time base from one representation to
+                    another. Note that the device has to be running
+    @param          inDevice
+                        The AudioDevice whose time base governs the translation.
+    @param          inTime
+                        An AudioTimeStamp containing the time to be translated.
+    @param          outTime
+                        An AudioTimeStamp into which the translated time is put. On entry, the
+                        mFlags field specifies which representations to translate the input time
+                        into. Because not every device supports all time representations, on exit,
+                        the mFlags field will indicate which translations were actually done.
+    @result         An OSStatus indicating success or failure. kAudioHardwareNotRunningError will be
+                    returned if the AudioDevice isn't running.
+}
+function AudioDeviceTranslateTime( inDevice: AudioDeviceID; const (*var*) inTime: AudioTimeStamp; var outTime: AudioTimeStamp ): OSStatus; external name '_AudioDeviceTranslateTime';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+    @function       AudioDeviceGetNearestStartTime
+    @abstract       Query an AudioDevice to get a time equal to or later than the given time that is
+                    the best time to start IO.
+    @discussion     The time that is returned is dictated by the constraints of the device and the
+                    system. For instance, the driver of a device that provides both audio and video
+                    data may only allow start times that coincide with the edge of a video frame.
+                    Also, if the device already has one or more active IOProcs, the start time will
+                    be shifted to the beginning of the next IO cycle so as not to cause
+                    discontinuities in the existing IOProcs. Another reason the start time may shift
+                    is to allow for aligning the buffer accesses in an optimal fashion. Note that
+                    the device must be running to use this function.
+    @param          inDevice
+                        The AudioDevice to query.
+    @param          ioRequestedStartTime
+                        A pointer to an AudioTimeStamp that, on entry, is the requested start time.
+                        On exit, it will have the a time equal to or later than the requested time,
+                        as dictated by the device's constraints.
+    @param          inFlags
+                        A UInt32 containing flags that modify how this function behaves.
+    @result         An OSStatus indicating success or failure. kAudioHardwareNotRunningError will be
+                    returned if the AudioDevice isn't running.
+                    kAudioHardwareUnsupportedOperationError will be returned if the AudioDevice does
+                    not support starting at a specific time.
+}
+function AudioDeviceGetNearestStartTime( inDevice: AudioDeviceID; var ioRequestedStartTime: AudioTimeStamp; inFlags: UInt32 ): OSStatus; external name '_AudioDeviceGetNearestStartTime';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{!
+    @function       AudioDeviceGetPropertyInfo
+    @abstract       Retrieve information about the given property of an AudioDevice.
+    @discussion     Note that the same functionality is provided by the functions
+                    AudioObjectHasProperty(), AudioObjectIsPropertySettable(), and
+                    AudioObjectGetPropertyDataSize().
+    @param          inDevice
+                        The AudioDevice to query.
+    @param          inChannel
+                        The channel of the property to query where 0 is the master channel.
+    @param          isInput
+                        Which section of the AudioDevice to query.
+    @param          inPropertyID
+                        The AudioDevicePropertyID of the property to query.
+    @param          outSize
+                        A pointer to a UInt32 that receives the size of the property data in bytes
+                        on exit. This can be NULL if the size information is not being requested.
+    @param          outWritable
+                        A pointer to a Boolean that receives indication of whether or not the given
+                        property can be set. This can be NULL if the writability is not being
+                        requested.
+    @result         An OSStatus indicating success or failure.
+}
+function AudioDeviceGetPropertyInfo( inDevice: AudioDeviceID; inChannel: UInt32; isInput: Boolean; inPropertyID: AudioDevicePropertyID; outSize: UInt32Ptr; outWritable: BooleanPtr ): OSStatus; external name '_AudioDeviceGetPropertyInfo';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+    @function       AudioDeviceGetProperty
+    @abstract       Queries an the AudioDevice object to get the data of the given property and
+                    places it in the provided buffer.
+    @discussion     Note that the same functionality is provided by the function
+                    AudioObjectGetPropertyData().
+    @param          inDevice
+                        The AudioDevice to query.
+    @param          inChannel
+                        The channel of the property to query where 0 is the master channel.
+    @param          isInput
+                        Which section of the AudioDevice to query.
+    @param          inPropertyID
+                        The AudioDevicePropertyID of the property to query.
+    @param          ioPropertyDataSize
+                        A UInt32 which on entry indicates the size of the buffer pointed to by
+                        outData and on exit indicates how much of the buffer was used.
+    @param          outPropertyData
+                        The buffer into which the object will put the data for the given property.
+    @result         An OSStatus indicating success or failure.
+}
+function AudioDeviceGetProperty( inDevice: AudioDeviceID; inChannel: UInt32; isInput: Boolean; inPropertyID: AudioDevicePropertyID; var ioPropertyDataSize: UInt32; outPropertyData: UnivPtr ): OSStatus; external name '_AudioDeviceGetProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+    @function       AudioDeviceSetProperty
+    @abstract       Tells the AudioDevice object to change the value of the given property using the
+                    provided data.
+    @discussion     Note that the value of the property should not be considered changed until the
+                    HAL has called the listeners as many properties values are changed
+                    asynchronously. Also note that the same functionality is provided by the
+                    function AudioObjectGetPropertyData().
+    @param          inDevice
+                        The AudioDevice to change.
+    @param          inWhen
+                        A pointer to an AudioTimeStamp that says when to change the property's value
+                        relative to the device's time base. NULL means execute the change
+                        immediately.
+    @param          inChannel
+                        The channel of the property to change where 0 is the master channel.
+    @param          isInput
+                        Which section of the AudioDevice to change.
+    @param          inPropertyID
+                        The AudioDevicePropertyID of the property to change.
+    @param          inPropertyDataSize
+                        A UInt32 indicating the size of the buffer pointed to by inData.
+    @param          inPropertyData
+                        The buffer containing the data to be used to change the property's value.
+    @result         An OSStatus indicating success or failure.
+}
+function AudioDeviceSetProperty( inDevice: AudioDeviceID; inWhen: {const} AudioTimeStampPtr; inChannel: UInt32; isInput: Boolean; inPropertyID: AudioDevicePropertyID; inPropertyDataSize: UInt32; inPropertyData: {const} UnivPtr ): OSStatus; external name '_AudioDeviceSetProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+    @function       AudioDeviceAddPropertyListener
+    @abstract       Registers the given AudioDevicePropertyListenerProc to receive notifications
+                    when the given property changes.
+    @discussion     Note that the same functionality is provided by AudioObjectAddPropertyListener
+                    in conjunction with AudioObjectPropertyListenerProc.
+    @param          inDevice
+                        The AudioDevice with whom to register the listener.
+    @param          inChannel
+                        The channel of the property to listen to.
+    @param          isInput
+                        Which section of the AudioDevice to listen to.
+    @param          inPropertyID
+                        The AudioDevicePropertyID of the property to listen to.
+    @param          inProc
+                        AudioDevicePropertyListenerProc to call.
+    @param          inClientData
+                        A pointer to client data that is passed to the listener when it is called.
+    @result         An OSStatus indicating success or failure.
+}
+function AudioDeviceAddPropertyListener( inDevice: AudioDeviceID; inChannel: UInt32; isInput: Boolean; inPropertyID: AudioDevicePropertyID; inProc: AudioDevicePropertyListenerProc; inClientData: UnivPtr ): OSStatus; external name '_AudioDeviceAddPropertyListener';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+    @function       AudioDeviceRemovePropertyListener
+    @abstract       Unregisters the given AudioDevicePropertyListenerProc from receiving
+                    notifications when the given property changes.
+    @discussion     Note that the same functionality is provided by
+                    AudioObjectRemovePropertyListener in conjunction with
+                    AudioObjectPropertyListenerProc.
+    @param          inDevice
+                        The AudioDevice with whom to unregister the listener.
+    @param          inChannel
+                        The channel of the property to unregister from.
+    @param          isInput
+                        Which section of the AudioDevice to unregister from.
+    @param          inPropertyID
+                        The AudioDevicePropertyID of the property to stop listening to.
+    @param          inProc
+                        AudioDevicePropertyListenerProc to unregister.
+    @result         An OSStatus indicating success or failure.
+}
+function AudioDeviceRemovePropertyListener( inDevice: AudioDeviceID; inChannel: UInt32; isInput: Boolean; inPropertyID: AudioDevicePropertyID; inProc: AudioDevicePropertyListenerProc ): OSStatus; external name '_AudioDeviceRemovePropertyListener';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+//==================================================================================================
+//#pragma mark    AudioStream Types
+
+{!
+    @typedef        AudioStreamID
+    @abstract       AudioStream is the base class for all objects that represent a stream of data on
+                    an audio device.
+    @discussion     AudioStream is a subclass of AudioObject and can contain AudioControls.
+}
+type
+	AudioStreamID = AudioObjectID;
+
+{!
+    @struct         AudioStreamRangedDescription
+    @abstract       This structure allows a specific sample rate range to be associated with an
+                    AudioStreamBasicDescription that specifies it's sample rate as
+                    kAudioStreamAnyRate.
+    @discussion     Note that this structure is only used to desicribe the the available formats
+                    for a stream. It is not used for the current format.
+    @field          mFormat
+                        The AudioStreamBasicDescription that describes the format of the stream.
+                        Note that the mSampleRate field of the structure will be the same as the
+                        the values in mSampleRateRange when only a single sample rate is supported.
+                        It will be kAudioStreamAnyRate when there is a range with more elements. 
+    @field          mSampleRateRange
+                        The AudioValueRange that describes the minimum and maximum sample rate for
+                        the stream. If the mSampleRate field of mFormat is kAudioStreamAnyRate the
+                        format supports the range of sample rates described by this structure.
+                        Otherwise, the minimum will be the same as the maximum which will be the
+                        same as the mSampleRate field of mFormat.
+}
+type
+	AudioStreamRangedDescription = record
+		mFormat: AudioStreamBasicDescription;
+		mSampleRateRange: AudioValueRange;
+	end;
+
+{!
+    @typedef        AudioStreamPropertyListenerProc
+    @abstract       Clients register an AudioStreamPropertyListenerProc with the AudioStream object
+                    in order to receive notifications when the properties of the object change.
+    @discussion     Note that the same functionality is provided by AudioObjectPropertyListenerProc.
+    @param          inStream
+                        The AudioStream whose property has changed.
+    @param          inChannel
+                        The channel of the property that changed where 0 is the master channel.
+    @param          inPropertyID
+                        The AudioDevicePropertyID of the property that changed.
+    @param          inClientData
+                        A pointer to client data established when the listener proc was registered
+                        with the object.
+    @result         The return value is currently unused and should always be 0.
+}
+type
+	AudioStreamPropertyListenerProc = function( inStream: AudioStreamID; inChannel: UInt32; inPropertyID: AudioDevicePropertyID; inClientData: UnivPtr ): OSStatus;
+
+//==================================================================================================
+//#pragma mark    AudioStream Constants
+
+{!
+    @enum           AudioStream Class Constants
+    @abstract       Various constants related to AudioStreams.
+    @constant       kAudioStreamClassID
+                        The AudioClassID that identifies the AudioStream class.
+    @constant       kAudioStreamUnknown
+                        The AudioObjectID for a nonexistent AudioObject.
+}
+const
+	kAudioStreamClassID = $61737472 (* 'astr' *);
+	kAudioStreamUnknown = kAudioObjectUnknown;
+
+//==================================================================================================
+//#pragma mark    AudioStream Properties
+
+{!
+    @enum           AudioStream Properties
+    @abstract       AudioObjectPropertySelector values that apply to all AudioStreams.
+    @discussion     AudioStream is a subclass of AudioObject and has only the single scope,
+                    kAudioObjectPropertyScopeGlobal. They have a master element and an element for
+                    each channel in the stream numbered upward from 1. Note that AudioStream objects
+                    share AudioControl objects with their owning AudioDevice. Consequently, all the
+                    standard AudioControl related property selectors implemented by AudioDevices are
+                    also implemented by AudioStreams. The same constants are to be used for such
+                    properties.
+    @constant       kAudioStreamPropertyDirection
+                        A UInt32 where a value of 0 means that this AudioStream is an output stream
+                        and a value of 1 means that it is an input stream.
+    @constant       kAudioStreamPropertyTerminalType
+                        A UInt32 whose value describes the general kind of functionality attached
+                        to the AudioStream. Constants that describe some of the values of this
+                        property are defined in <IOKit/audio/IOAudioTypes.h>
+    @constant       kAudioStreamPropertyStartingChannel
+                        A UInt32 that specifies the first element in the owning device that
+                        corresponds to element one of this stream.
+    @constant       kAudioStreamPropertyLatency
+                        A UInt32 containing the number of frames of latency in the AudioStream. Note
+                        that the owning AudioDevice may have additional latency so it should be
+                        queried as well. If both the device and the stream say they have latency,
+                        then the total latency for the stream is the device latency summed with the
+                        stream latency.
+    @constant       kAudioStreamPropertyVirtualFormat
+                        An AudioStreamBasicDescription that describes the current data format for
+                        the AudioStream. The virtual format refers to the data format in which all
+                        IOProcs for the owning AudioDevice will perform IO transactions.
+    @constant       kAudioStreamPropertyAvailableVirtualFormats
+                        An array of AudioStreamRangedDescriptions that describe the available data
+                        formats for the AudioStream. The virtual format refers to the data format in
+                        which all IOProcs for the owning AudioDevice will perform IO transactions.
+    @constant       kAudioStreamPropertyPhysicalFormat
+                        An AudioStreamBasicDescription that describes the current data format for
+                        the AudioStream. The physical format refers to the data format in which the
+                        hardware for the owning AudioDevice performs it's IO transactions.
+    @constant       kAudioStreamPropertyAvailablePhysicalFormats
+                        An array of AudioStreamRangedDescriptions that describe the available data
+                        formats for the AudioStream. The physical format refers to the data format
+                        in which the hardware for the owning AudioDevice performs it's IO
+                        transactions.
+}
+const
+	kAudioStreamPropertyDirection = $73646972 (* 'sdir' *);
+	kAudioStreamPropertyTerminalType = $7465726D (* 'term' *);
+	kAudioStreamPropertyStartingChannel = $7363686E (* 'schn' *);
+	kAudioStreamPropertyLatency = kAudioDevicePropertyLatency;
+	kAudioStreamPropertyVirtualFormat = $73666D74 (* 'sfmt' *);
+	kAudioStreamPropertyAvailableVirtualFormats = $73666D61 (* 'sfma' *);
+	kAudioStreamPropertyPhysicalFormat = $70667420 (* 'pft ' *);
+	kAudioStreamPropertyAvailablePhysicalFormats = $70667461 (* 'pfta' *);
+
+
+{!
+    @enum           AudioStream Properties That Ought To Some Day Be Deprecated
+    @abstract       AudioObjectPropertySelector values whose functionality is better provided by
+                    other selectors.
+    @discussion     These selectors are still provided for backward compatibility. The description
+                    of the property will indicate in parentheses the better selectors to use and
+                    why.
+    @constant       kAudioStreamPropertyOwningDevice
+                        The AudioObjectID of the AudioDevice of which this AudioStream is a part.
+                        (kAudioObjectPropertyOwner: This is just another name for the inherited
+                        selector.)
+    @constant       kAudioStreamPropertyPhysicalFormats
+                        An array of AudioStreamBasicDescriptions that describe the available data
+                        formats for the AudioStream. The physical format refers to the data format
+                        in which the hardware for the owning AudioDevice performs it's IO
+                        transactions.
+                        (kAudioStreamPropertyAvailablePhysicalFormats: The new name for this
+                        property is much clearer for readers of the API to see what is meant and the
+                        AudioStreamRangedDescription structure provides better information.)
+    @constant       kAudioStreamPropertyPhysicalFormatSupported
+                        An AudioStreamBasicDescription is passed in to query whether or not the
+                        format is supported. A kAudioDeviceUnsupportedFormatError will be returned
+                        if the format is not supported and kAudioHardwareNoError will be returned if
+                        it is supported. AudioStreamBasicDescription fields set to 0 will be ignored
+                        in the query, but otherwise values must match exactly. The physical format
+                        refers to the data format in which the hardware for the owning AudioDevice
+                        performs it's IO transactions.
+                        (kAudioStreamPropertyAvailablePhysicalFormats: The proper and most robust
+                        way to find a format that the AudioStream can support is to get the list of
+                        available formats and look through that rather than using this property.)
+    @constant       kAudioStreamPropertyPhysicalFormatMatch
+                        An AudioStreamBasicDescription is passed in and the AudioStream will modify
+                        it to describe the best match, in the AudioDevice's opinion, for the given
+                        format. The physical format refers to the data format in which the hardware
+                        for the owning AudioDevice performs it's IO transactions.
+                        (kAudioStreamPropertyAvailablePhysicalFormats: The proper and most robust
+                        way to find a format that the AudioStream can support is to get the list of
+                        available formats and look through that rather than using this property.)
+}
+const
+	kAudioStreamPropertyOwningDevice = kAudioObjectPropertyOwner;
+	kAudioStreamPropertyPhysicalFormats = $70667423 (* 'pft#' *);
+	kAudioStreamPropertyPhysicalFormatSupported = $7066743F (* 'pft?' *);
+	kAudioStreamPropertyPhysicalFormatMatch = $7066746D (* 'pftm' *);
+
+//==================================================================================================
+//#pragma mark    AudioStream Functions
+
+{!
+    @functiongroup  AudioStream
+}
+
+{!
+    @function       AudioStreamGetPropertyInfo
+    @abstract       Retrieve information about the given property of an AudioStream.
+    @param          inStream
+                        The AudioStream to query.
+    @param          inChannel
+                        The channel of the property to query where 0 is the master channel.
+    @param          inPropertyID
+                        The AudioDevicePropertyID of the property to query.
+    @param          outSize
+                        A pointer to a UInt32 that receives the size of the property data in bytes
+                        on exit. This can be NULL if the size information is not being requested.
+    @param          outWritable
+                        A pointer to a Boolean that receives indication of whether or not the given
+                        property can be set. This can be NULL if the writability is not being
+                        requested.
+    @result         An OSStatus indicating success or failure.
+}
+function AudioStreamGetPropertyInfo( inStream: AudioStreamID; inChannel: UInt32; inPropertyID: AudioDevicePropertyID; var outSize: UInt32; var outWritable: Boolean ): OSStatus; external name '_AudioStreamGetPropertyInfo';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{!
+    @function       AudioStreamGetProperty
+    @abstract       Queries an the AudioStream object to get the data of the given property and
+                    places it in the provided buffer.
+    @discussion     Note that the same functionality is provided by the function
+                    AudioObjectGetPropertyData().
+    @param          inStream
+                        The AudioStream to query.
+    @param          inChannel
+                        The channel of the property to query where 0 is the master channel.
+    @param          inPropertyID
+                        The AudioDevicePropertyID of the property to query.
+    @param          ioPropertyDataSize
+                        A UInt32 which on entry indicates the size of the buffer pointed to by
+                        outData and on exit indicates how much of the buffer was used.
+    @param          outPropertyData
+                        The buffer into which the object will put the data for the given property.
+    @result         An OSStatus indicating success or failure.
+}
+function AudioStreamGetProperty( inStream: AudioStreamID; inChannel: UInt32; inPropertyID: AudioDevicePropertyID; var ioPropertyDataSize: UInt32; outPropertyData: UnivPtr ): OSStatus; external name '_AudioStreamGetProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{!
+    @function       AudioStreamSetProperty
+    @abstract       Tells the AudioStream object to change the value of the given property using the
+                    provided data.
+    @discussion     Note that the value of the property should not be considered changed until the
+                    HAL has called the listeners as many properties values are changed
+                    asynchronously. Also note that the same functionality is provided by the
+                    function AudioObjectGetPropertyData().
+    @param          inStream
+                        The AudioStream to change.
+    @param          inWhen
+                        A pointer to an AudioTimeStamp that says when to change the property's value
+                        relative to the device's time base. NULL means execute the change
+                        immediately.
+    @param          inChannel
+                        The channel of the property to change where 0 is the master channel.
+    @param          inPropertyID
+                        The AudioDevicePropertyID of the property to change.
+    @param          inPropertyDataSize
+                        A UInt32 indicating the size of the buffer pointed to by inData.
+    @param          inPropertyData
+                        The buffer containing the data to be used to change the property's value.
+    @result         An OSStatus indicating success or failure.
+}
+function AudioStreamSetProperty( inStream: AudioStreamID; inWhen: AudioTimeStampPtr; inChannel: UInt32; inPropertyID: AudioDevicePropertyID; inPropertyDataSize: UInt32; inPropertyData: {const} UnivPtr ): OSStatus; external name '_AudioStreamSetProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{!
+    @function       AudioStreamAddPropertyListener
+    @abstract       Registers the given AudioStreamPropertyListenerProc to receive notifications
+                    when the given property changes.
+    @discussion     Note that the same functionality is provided by AudioObjectAddPropertyListener
+                    in conjunction with AudioObjectPropertyListenerProc.
+    @param          inStream
+                        The AudioStream with whom to register the listener.
+    @param          inChannel
+                        The channel of the property to listen to.
+    @param          inPropertyID
+                        The AudioDevicePropertyID of the property to listen to.
+    @param          inProc
+                        AudioStreamPropertyListenerProc to call.
+    @param          inClientData
+                        A pointer to client data that is passed to the listener when it is called.
+    @result         An OSStatus indicating success or failure.
+}
+function AudioStreamAddPropertyListener( inStream: AudioStreamID; inChannel: UInt32; inPropertyID: AudioDevicePropertyID; inProc: AudioStreamPropertyListenerProc; inClientData: UnivPtr ): OSStatus; external name '_AudioStreamAddPropertyListener';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{!
+    @function       AudioStreamRemovePropertyListener
+    @abstract       Unregisters the given AudioStreamPropertyListenerProc from receiving
+                    notifications when the given property changes.
+    @discussion     Note that the same functionality is provided by
+                    AudioObjectRemovePropertyListener in conjunction with
+                    AudioObjectPropertyListenerProc.
+    @param          inStream
+                        The AudioStream with whom to unregister the listener.
+    @param          inChannel
+                        The channel of the property to unregister from.
+    @param          inPropertyID
+                        The AudioDevicePropertyID of the property to stop listening to.
+    @param          inProc
+                        AudioStreamPropertyListenerProc to unregister.
+    @result         An OSStatus indicating success or failure.
+}
+function AudioStreamRemovePropertyListener( inStream: AudioStreamID; inChannel: UInt32; inPropertyID: AudioDevicePropertyID; inProc: AudioStreamPropertyListenerProc ): OSStatus; external name '_AudioStreamRemovePropertyListener';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+//==================================================================================================
+//#pragma mark    AudioAggregateDevice Constants
+
+{!
+    @enum           AudioAggregateDevice Class Constants
+    @abstract       Various constants related to AudioAggregateDevices.
+    @constant       kAudioAggregateDeviceClassID
+                        The AudioClassID that identifies the AudioAggregateDevice class.
+    @constant       kAudioDeviceTransportTypeAggregate
+                        The transport type ID (see kAudioDevicePropertyTransportType) for aggregate
+                        devices.
+    @constant       kAudioDeviceTransportTypeAutoAggregate
+                        The transport type ID (see kAudioDevicePropertyTransportType) for
+                        automatically generated aggregate devices.
+}
+const
+	kAudioAggregateDeviceClassID = $61616767 (* 'aagg' *);
+	kAudioDeviceTransportTypeAggregate = $67727570 (* 'grup' *);
+	kAudioDeviceTransportTypeAutoAggregate = $66677270 (* 'fgrp' *);
+
+{!
+    @defined        kAudioAggregateDeviceUIDKey
+    @discussion     The key used in a CFDictionary that describes the composition of an
+                    AudioAggregateDevice. The value for this key is a CFString that contains the UID
+                    of the AudioAggregateDevice.
+}
+const
+	kAudioAggregateDeviceUIDKey = 'uid';
+
+{!
+    @defined        kAudioAggregateDeviceNameKey
+    @discussion     The key used in a CFDictionary that describes the composition of an
+                    AudioAggregateDevice. The value for this key is a CFString that contains the
+                    human readable name of the AudioAggregateDevice.
+}
+const
+	kAudioAggregateDeviceNameKey = 'name';
+
+{!
+    @defined        kAudioAggregateDeviceSubDeviceListKey
+    @discussion     The key used in a CFDictionary that describes the composition of an
+                    AudioAggregateDevice. The value for this key is a CFArray of CFDictionaries that
+                    describe each sub-device in the AudioAggregateDevice. The keys for this
+                    CFDictionary are defined in the AudioSubDevice section.
+}
+const
+	kAudioAggregateDeviceSubDeviceListKey = 'subdevices';
+
+{!
+    @defined        kAudioAggregateDeviceMasterSubDeviceKey
+    @discussion     The key used in a CFDictionary that describes the composition of an
+                    AudioAggregateDevice. The value for this key is a CFString that contains the
+                    UID for the sub-device that is the master time source for the
+                    AudioAggregateDevice.
+}
+const
+	kAudioAggregateDeviceMasterSubDeviceKey = 'master';
+
+{!
+    @defined        kAudioAggregateDeviceIsPrivateKey
+    @discussion     The key used in a CFDictionary that describes the composition of an
+                    AudioAggregateDevice. The value for this key is a CFNumber where a value of 0
+                    means that the AudioAggregateDevice is to be published to the entire system and
+                    a value of 1 means that the AudioAggregateDevice is private to the process that
+                    created it. Note that a private AudioAggregateDevice is not persistent across
+                    launches of the process that created it. Note that if this key is not present,
+                    it implies that the AudioAggregateDevice is published to the entire system.
+}
+const
+	kAudioAggregateDeviceIsPrivateKey = 'private';
+
+//==================================================================================================
+//#pragma mark    AudioAggregateDevice Properties
+
+{!
+    @enum           AudioAggregateDevice Properties
+    @abstract       AudioObjectPropertySelector values that apply to all AudioAggregateDevices.
+    @discussion     AudioAggregateDevice is a subclass of AudioDevice.
+    @constant       kAudioAggregateDevicePropertyFullSubDeviceList
+                        A CFArray of CFStrings that contain the UIDs of all the devices, active or
+                        inactive, contained in the AudioAggregateDevice. The order of the items in
+                        the array is significant and is used to determine the order of the streams
+                        of the AudioAggregateDevice. The caller is responsible for releasing the
+                        returned CFObject.
+    @constant       kAudioAggregateDevicePropertyActiveSubDeviceList
+                        An array of AudioObjectIDs for all the active sub-devices in the aggregate
+                        device.
+    @constant       kAudioAggregateDevicePropertyComposition
+                        A CFDictionary that describes the composition of the AudioAggregateDevice.
+                        The keys for this CFDicitionary are defined in the AudioAggregateDevice
+                        Constants section.
+}
+const
+	kAudioAggregateDevicePropertyFullSubDeviceList = $67727570 (* 'grup' *);
+	kAudioAggregateDevicePropertyActiveSubDeviceList = $61677270 (* 'agrp' *);
+	kAudioAggregateDevicePropertyComposition = $61636F6D (* 'acom' *);
+
+{!
+    @enum           AudioAggregateDevice Properties Implemented via AudioControl objects
+    @abstract       AudioObjectPropertySelector values for AudioAggregateDevice properties that are
+                    implemented by AudioControl objects.
+    @discussion     These properties are also accessible by locating the AudioControl object
+                    attached to the AudioAggregateDevice and using that object to access the
+                    properties of the control.
+    @constant       kAudioAggregateDevicePropertyMasterSubDevice
+                        A CFString that contains the UID for the AudioDevice that is currently
+                        serving as the master time base of the aggregate device. This property is
+                        also implemented by the AudioClockSourceControl on the master element of the
+                        global scope of the AudioAggregateDevice.
+}
+const
+	kAudioAggregateDevicePropertyMasterSubDevice = $616D7374 (* 'amst' *);
+
+//==================================================================================================
+//#pragma mark    AudioSubDevice Constants
+
+{!
+    @enum           AudioSubDevice Class Constants
+    @abstract       Various constants related to AudioSubDevices.
+    @constant       kAudioSubDeviceClassID
+                        The AudioClassID that identifies the AudioSubDevice class.
+}
+const
+	kAudioSubDeviceClassID = $61737562 (* 'asub' *);
+
+{!
+    @enum           AudioSubDevice Clock Drift Compensation Methods
+    @abstract       Constants that describe the range of values the property
+                    kAudioSubDevicePropertyDriftCompensation. It is a continuous range from
+                    kAudioSubDeviceDriftCompensationMinQuality to
+                    kAudioSubDeviceDriftCompensationMaxQuality, with some commonly used settings
+                    called out.
+}
+const
+	kAudioSubDeviceDriftCompensationMinQuality = 0;
+	kAudioSubDeviceDriftCompensationLowQuality = $20;
+	kAudioSubDeviceDriftCompensationMediumQuality = $40;
+	kAudioSubDeviceDriftCompensationHighQuality = $60;
+	kAudioSubDeviceDriftCompensationMaxQuality = $7F;
+
+{!
+    @defined        kAudioSubDeviceUIDKey
+    @discussion     The key used in a CFDictionary that describes the state of an AudioSubDevice.
+                    The value for this key is a CFString that contains the UID for the
+                    AudioSubDevice.
+}
+const
+	kAudioSubDeviceUIDKey = 'uid';
+
+//==================================================================================================
+//#pragma mark    AudioSubDevice Properties
+
+{!
+    @enum           AudioSubDevice Properties
+    @abstract       AudioObjectPropertySelector values that apply to all AudioSubDevices.
+    @discussion     AudioSubDevice is a subclass of AudioDevice that is collected together with
+                    other sub-devices in an AudioAggregateDevice. AudioSubDevice objects do not
+                    implement an IO path nor any AudioDevice properties associated with the IO path.
+                    They also don't have any streams.
+    @constant       kAudioSubDevicePropertyExtraLatency
+                        A Float64 indicating the number of sample frames to add to or subtract from
+                        the latency compensation used for this AudioSubDevice.
+    @constant       kAudioSubDevicePropertyDriftCompensation
+                        A UInt32 where a value of 0 indicates that no drift compensation should be
+                        done for this AudioSubDevice and a value of 1 means that it should.
+    @constant       kAudioSubDevicePropertyDriftCompensationQuality
+                        A UInt32 that controls the trade-off between quality and CPU load in the
+                        drift compensation. The range of values is from 0 to 128, where the lower
+                        the number, the worse the quality but also the less CPU is used to do the
+                        compensation.
+}
+const
+	kAudioSubDevicePropertyExtraLatency = $786C7463 (* 'xltc' *);
+	kAudioSubDevicePropertyDriftCompensation = $64726674 (* 'drft' *);
+	kAudioSubDevicePropertyDriftCompensationQuality = $64726671 (* 'drfq' *);
+
+//==================================================================================================
+
+
+end.

+ 2 - 2
packages/extra/univint/CFURL.pas

@@ -438,9 +438,9 @@ function CFURLCreateStringByAddingPercentEscapes( allocator: CFAllocatorRef; ori
 
 {#ifndef CF_OPEN_SOURCE}
 
-function CFURLCreateFromFSRef( allocator: CFAllocatorRef; const (*var*) fsRef: FSRef ): CFURLRef; external name '_CFURLCreateFromFSRef';
+function CFURLCreateFromFSRef( allocator: CFAllocatorRef; const (*var*) fsRef_: FSRef ): CFURLRef; external name '_CFURLCreateFromFSRef';
 
-function CFURLGetFSRef( url: CFURLRef; var fsRef: FSRef ): Boolean; external name '_CFURLGetFSRef';
+function CFURLGetFSRef( url: CFURLRef; var fsRef_: FSRef ): Boolean; external name '_CFURLGetFSRef';
 
 {#endif} // !CF_OPEN_SOURCE
 

+ 0 - 1
packages/extra/univint/CGBase.pas

@@ -96,7 +96,6 @@ uses MacTypes,ConditionalMacros;
 
 
 type
-	size_t								= UInt32;
 	boolean_t							= SInt32;
 
 // Avoid cyclic dependencises by putting CGRefs here

+ 3 - 1
packages/extra/univint/CGColorSpace.pas

@@ -3,6 +3,8 @@
  * All rights reserved.
  }
 {       Pascal Translation Updated:  Peter N Lewis, <[email protected]>, August 2005 }
+{       Pascal Translation Updated:  Gale R Paeper, <[email protected]>, 2006 }
+
 {
     Modified for use with Free Pascal
     Version 200
@@ -183,7 +185,7 @@ function CGColorSpaceCreateLab(const (*var*) whitePoint: TristimulusValue; const
  * DeviceCMYK, depending on whether `nComponents' is 1, 3, or 4,
  * respectively. }
 
-function CGColorSpaceCreateICCBased( nComponents: size_t; const (*var*) range: Float32; profile: CGDataProviderRef; alternate: CGColorSpaceRef ): CGColorSpaceRef; external name '_CGColorSpaceCreateICCBased';
+function CGColorSpaceCreateICCBased( nComponents: size_t; {const} range: {variable-size-array} Float32Ptr; profile: CGDataProviderRef; alternate: CGColorSpaceRef ): CGColorSpaceRef; external name '_CGColorSpaceCreateICCBased';
 
 {* Special colorspaces. *}
 

+ 2 - 1
packages/extra/univint/CGDataConsumer.pas

@@ -3,6 +3,7 @@
  * All rights reserved.
  }
 {       Pascal Translation Updated:  Peter N Lewis, <[email protected]>, August 2005 }
+{       Pascal Translation Updated:  Gale R Paeper, <[email protected]>, 2006 }
 {
     Modified for use with Free Pascal
     Version 200
@@ -103,7 +104,7 @@ type
  * data consumer. }
 
 type
-	CGDataConsumerPutBytesCallback = function( info: UnivPtr; const (*var*) buffer: UnivPtr; count: size_t ): size_t;
+	CGDataConsumerPutBytesCallback = function( info: UnivPtr; buffer: {const} UnivPtr; count: size_t ): size_t;
 
 { This callback is called to release the `info' pointer when the data
  * provider is freed. }

+ 1 - 1
packages/extra/univint/CGDirectDisplay.pas

@@ -117,7 +117,7 @@ type
 type
 	CGDisplayCoord = SInt32;
 type
-	CGByteValue = UInt8;
+	CGByteValue = SInt8;
 	CGByteValuePtr					= ^CGByteValue;
 type
 	CGOpenGLDisplayMask = UInt32;

+ 204 - 0
packages/extra/univint/CGImageDestination.pas

@@ -0,0 +1,204 @@
+{
+ * ImageIO - CGImageDestination.h
+ * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
+ *
+ }
+
+{	 Pascal Translation:  Gale R Paeper, <[email protected]>, 2006 }
+
+{
+    Modified for use with Free Pascal
+    Version 200
+    Please report any bugs to <[email protected]>
+}
+
+{$mode macpas}
+{$packenum 1}
+{$macro on}
+{$inline on}
+{$CALLING MWPASCAL}
+
+unit CGImageDestination;
+interface
+{$setc UNIVERSAL_INTERFACES_VERSION := $0342}
+{$setc GAP_INTERFACES_VERSION := $0200}
+
+{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
+    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
+{$endc}
+
+{$ifc defined CPUPOWERPC and defined CPUI386}
+	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
+{$endc}
+{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
+	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
+{$endc}
+
+{$ifc not defined __ppc__ and defined CPUPOWERPC}
+	{$setc __ppc__ := 1}
+{$elsec}
+	{$setc __ppc__ := 0}
+{$endc}
+{$ifc not defined __i386__ and defined CPUI386}
+	{$setc __i386__ := 1}
+{$elsec}
+	{$setc __i386__ := 0}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
+	{$error Conflicting definitions for __ppc__ and __i386__}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__}
+	{$setc TARGET_CPU_PPC := TRUE}
+	{$setc TARGET_CPU_X86 := FALSE}
+{$elifc defined __i386__ and __i386__}
+	{$setc TARGET_CPU_PPC := FALSE}
+	{$setc TARGET_CPU_X86 := TRUE}
+{$elsec}
+	{$error Neither __ppc__ nor __i386__ is defined.}
+{$endc}
+{$setc TARGET_CPU_PPC_64 := FALSE}
+
+{$ifc defined FPC_BIG_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
+{$elifc defined FPC_LITTLE_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
+{$elsec}
+	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
+{$endc}
+{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
+{$setc CALL_NOT_IN_CARBON := FALSE}
+{$setc OLDROUTINENAMES := FALSE}
+{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
+{$setc OPAQUE_UPP_TYPES := TRUE}
+{$setc OTCARBONAPPLICATION := TRUE}
+{$setc OTKERNEL := FALSE}
+{$setc PM_USE_SESSION_APIS := TRUE}
+{$setc TARGET_API_MAC_CARBON := TRUE}
+{$setc TARGET_API_MAC_OS8 := FALSE}
+{$setc TARGET_API_MAC_OSX := TRUE}
+{$setc TARGET_CARBON := TRUE}
+{$setc TARGET_CPU_68K := FALSE}
+{$setc TARGET_CPU_MIPS := FALSE}
+{$setc TARGET_CPU_SPARC := FALSE}
+{$setc TARGET_OS_MAC := TRUE}
+{$setc TARGET_OS_UNIX := FALSE}
+{$setc TARGET_OS_WIN32 := FALSE}
+{$setc TARGET_RT_MAC_68881 := FALSE}
+{$setc TARGET_RT_MAC_CFM := FALSE}
+{$setc TARGET_RT_MAC_MACHO := TRUE}
+{$setc TYPED_FUNCTION_POINTERS := TRUE}
+{$setc TYPE_BOOL := FALSE}
+{$setc TYPE_EXTENDED := FALSE}
+{$setc TYPE_LONGLONG := TRUE}
+uses MacTypes, CFArray, CFBase, CFData, CFDictionary, CFURL, CGDataConsumer, CGImage, CGImageSource;
+{$ALIGN POWER}
+
+
+type
+	CGImageDestinationRef = ^SInt32; { an opaque 32-bit type }
+
+
+{* Properties which may be passed to "CGImageDestinationAddImage"
+ ** or "CGImageDestinationAddImageFromSource" to effect the output.
+ ** The values apply to a single image of an image destination. *}
+
+
+{ The desired compression quality to use when writing to an image 
+ * destination. If present, the value of this key is a CFNumberRef 
+ * in the range 0.0 to 1.0. A value of 1.0 implies lossless
+ * compression is desired if destination format supports it. 
+ * A value of 0.0 implies that that maximum compression is 
+ * desired. }
+
+var kCGImageDestinationLossyCompressionQuality: CFStringRef; external name '_kCGImageDestinationLossyCompressionQuality'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{ The desired background color to composite against when writing 
+ * an image with alpha to a destination format that does not support 
+ * alpha. If present, the value of this key is a CGColorRef without
+ * any alpha component of its own.  If not present a white color
+ * will be used if needed. }
+
+var kCGImageDestinationBackgroundColor: CFStringRef; external name '_kCGImageDestinationBackgroundColor'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{ Return the CFTypeID for CGImageDestinations. }
+
+function CGImageDestinationGetTypeID: CFTypeID; external name '_CGImageDestinationGetTypeID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return an array of supported type identifiers. }
+
+function CGImageDestinationCopyTypeIdentifiers: CFArrayRef; external name '_CGImageDestinationCopyTypeIdentifiers';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Create an image destination writing to the data consumer `consumer'.
+ * The parameter `type' specifies the type identifier of the resulting
+ * image file.  The parameter `count' specifies number of images (not
+ * including thumbnails) that the image file will contain. The `options'
+ * dictionary is reserved for future use; currently, you should pass NULL
+ * for this parameter. }
+
+function CGImageDestinationCreateWithDataConsumer( consumer: CGDataConsumerRef; typ: CFStringRef; count: size_t; options: CFDictionaryRef ): CGImageDestinationRef; external name '_CGImageDestinationCreateWithDataConsumer';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Create an image destination writing to `data'. The parameter `type'
+ * specifies the type identifier of the resulting image file.  The
+ * parameter `count' specifies number of images (not including thumbnails)
+ * that the image file will contain. The `options' dictionary is reserved
+ * for future use; currently, you should pass NULL for this parameter. }
+
+function CGImageDestinationCreateWithData( data: CFMutableDataRef; typ: CFStringRef; count: size_t; options: CFDictionaryRef ): CGImageDestinationRef; external name '_CGImageDestinationCreateWithData';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Create an image destination writing to `url'. The parameter `type'
+ * specifies the type identifier of the resulting image file.  The
+ * parameter `count' specifies number of images (not including thumbnails)
+ * that the image file will contain. The `options' dictionary is reserved
+ * for future use; currently, you should pass NULL for this parameter.
+ * Note that if `url' already exists, it will be overwritten. }
+
+function CGImageDestinationCreateWithURL( url: CFURLRef; typ: CFStringRef; count: size_t; options: CFDictionaryRef ): CGImageDestinationRef; external name '_CGImageDestinationCreateWithURL';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Specify the dictionary `properties' of properties which apply to all
+ * images in the image destination `idst'. }
+
+procedure CGImageDestinationSetProperties( idst: CGImageDestinationRef; properties: CFDictionaryRef ); external name '_CGImageDestinationSetProperties';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Set the next image in the image destination `idst' to be `image' with
+ * optional properties specified in `properties'.  An error is logged if
+ * more images are added than specified in the original count of the image
+ * destination. }
+
+procedure CGImageDestinationAddImage( idst: CGImageDestinationRef; image: CGImageRef; properties: CFDictionaryRef ); external name '_CGImageDestinationAddImage';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Set the next image in the image destination `idst' to be the image at
+ * `index' in the image source `isrc'.  The index is zero-based. The
+ * properties of the source image can be added to or overriden by supplying
+ * additional keys/values in `properties'.  If a key in `properties' has
+ * the value kCFNull, the corresponding property in the destination will be
+ * removed. }
+
+procedure CGImageDestinationAddImageFromSource( idst: CGImageDestinationRef; isrc: CGImageSourceRef; index: size_t; properties: CFDictionaryRef ); external name '_CGImageDestinationAddImageFromSource';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Write everything to the destination data, url or consumer of the image
+ * destination `idst'.  You must call this function or the image
+ * destination will not be valid.  After this function is called, no
+ * additional data will be written to the image destination.  Return true
+ * if the image was successfully written; false otherwise. }
+
+function CGImageDestinationFinalize( idst: CGImageDestinationRef ): CBool; external name '_CGImageDestinationFinalize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+end.

+ 583 - 0
packages/extra/univint/CGImageProperties.pas

@@ -0,0 +1,583 @@
+{
+ * ImageIO - CGImageProperties.h
+ * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
+ *
+ }
+
+{	 Pascal Translation:  Gale R Paeper, <[email protected]>, 2006 }
+
+{
+    Modified for use with Free Pascal
+    Version 200
+    Please report any bugs to <[email protected]>
+}
+
+{$mode macpas}
+{$packenum 1}
+{$macro on}
+{$inline on}
+{$CALLING MWPASCAL}
+
+unit CGImageProperties;
+interface
+{$setc UNIVERSAL_INTERFACES_VERSION := $0342}
+{$setc GAP_INTERFACES_VERSION := $0200}
+
+{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
+    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
+{$endc}
+
+{$ifc defined CPUPOWERPC and defined CPUI386}
+	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
+{$endc}
+{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
+	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
+{$endc}
+
+{$ifc not defined __ppc__ and defined CPUPOWERPC}
+	{$setc __ppc__ := 1}
+{$elsec}
+	{$setc __ppc__ := 0}
+{$endc}
+{$ifc not defined __i386__ and defined CPUI386}
+	{$setc __i386__ := 1}
+{$elsec}
+	{$setc __i386__ := 0}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
+	{$error Conflicting definitions for __ppc__ and __i386__}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__}
+	{$setc TARGET_CPU_PPC := TRUE}
+	{$setc TARGET_CPU_X86 := FALSE}
+{$elifc defined __i386__ and __i386__}
+	{$setc TARGET_CPU_PPC := FALSE}
+	{$setc TARGET_CPU_X86 := TRUE}
+{$elsec}
+	{$error Neither __ppc__ nor __i386__ is defined.}
+{$endc}
+{$setc TARGET_CPU_PPC_64 := FALSE}
+
+{$ifc defined FPC_BIG_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
+{$elifc defined FPC_LITTLE_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
+{$elsec}
+	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
+{$endc}
+{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
+{$setc CALL_NOT_IN_CARBON := FALSE}
+{$setc OLDROUTINENAMES := FALSE}
+{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
+{$setc OPAQUE_UPP_TYPES := TRUE}
+{$setc OTCARBONAPPLICATION := TRUE}
+{$setc OTKERNEL := FALSE}
+{$setc PM_USE_SESSION_APIS := TRUE}
+{$setc TARGET_API_MAC_CARBON := TRUE}
+{$setc TARGET_API_MAC_OS8 := FALSE}
+{$setc TARGET_API_MAC_OSX := TRUE}
+{$setc TARGET_CARBON := TRUE}
+{$setc TARGET_CPU_68K := FALSE}
+{$setc TARGET_CPU_MIPS := FALSE}
+{$setc TARGET_CPU_SPARC := FALSE}
+{$setc TARGET_OS_MAC := TRUE}
+{$setc TARGET_OS_UNIX := FALSE}
+{$setc TARGET_OS_WIN32 := FALSE}
+{$setc TARGET_RT_MAC_68881 := FALSE}
+{$setc TARGET_RT_MAC_CFM := FALSE}
+{$setc TARGET_RT_MAC_MACHO := TRUE}
+{$setc TYPED_FUNCTION_POINTERS := TRUE}
+{$setc TYPE_BOOL := FALSE}
+{$setc TYPE_EXTENDED := FALSE}
+{$setc TYPE_LONGLONG := TRUE}
+uses CFBase;
+{$ALIGN POWER}
+
+
+{ Properties that, if returned by CGImageSourceCopyProperties or 
+ * CGImageSourceCopyPropertiesAtIndex, contain a dictionary of file-format 
+ * or metadata-format specific key-values. }
+
+var kCGImagePropertyTIFFDictionary: CFStringRef; external name '_kCGImagePropertyTIFFDictionary'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGIFDictionary: CFStringRef; external name '_kCGImagePropertyGIFDictionary'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyJFIFDictionary: CFStringRef; external name '_kCGImagePropertyJFIFDictionary'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifDictionary: CFStringRef; external name '_kCGImagePropertyExifDictionary'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyPNGDictionary: CFStringRef; external name '_kCGImagePropertyPNGDictionary'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCDictionary: CFStringRef; external name '_kCGImagePropertyIPTCDictionary'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSDictionary: CFStringRef; external name '_kCGImagePropertyGPSDictionary'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyRawDictionary: CFStringRef; external name '_kCGImagePropertyRawDictionary'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyCIFFDictionary: CFStringRef; external name '_kCGImagePropertyCIFFDictionary'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImageProperty8BIMDictionary: CFStringRef; external name '_kCGImageProperty8BIMDictionary'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{* Properties which may be returned by "CGImageSourceCopyProperties".  The
+ ** values apply to the container in general but not necessarily to any
+ ** individual image that it contains. *}
+
+{ The size of the image file in bytes, if known. If present, the value of
+ * this key is a CFNumberRef. }
+
+var kCGImagePropertyFileSize: CFStringRef; external name '_kCGImagePropertyFileSize'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{* Properties which may be returned by "CGImageSourceCopyPropertiesAtIndex".
+ ** The values apply to a single image of an image source file. *}
+
+{ The number of pixels in the x- and y-dimensions. The value of these keys 
+ * is a CFNumberRef. }
+
+var kCGImagePropertyPixelHeight: CFStringRef; external name '_kCGImagePropertyPixelHeight'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyPixelWidth: CFStringRef; external name '_kCGImagePropertyPixelWidth'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ The DPI in the x- and y-dimensions, if known. If present, the value of
+ * these keys is a CFNumberRef. }
+
+var kCGImagePropertyDPIHeight: CFStringRef; external name '_kCGImagePropertyDPIHeight'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyDPIWidth: CFStringRef; external name '_kCGImagePropertyDPIWidth'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ The number of bits in each color sample of each pixel. The value of this 
+ * key is a CFNumberRef. }
+
+var kCGImagePropertyDepth: CFStringRef; external name '_kCGImagePropertyDepth'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ The intended display orientation of the image. If present, the value 
+ * of this key is a CFNumberRef with the same value as defined by the 
+ * TIFF and Exif specifications.  That is:
+ *   1  =  0th row is at the top, and 0th column is on the left.  
+ *   2  =  0th row is at the top, and 0th column is on the right.  
+ *   3  =  0th row is at the bottom, and 0th column is on the right.  
+ *   4  =  0th row is at the bottom, and 0th column is on the left.  
+ *   5  =  0th row is on the left, and 0th column is the top.  
+ *   6  =  0th row is on the right, and 0th column is the top.  
+ *   7  =  0th row is on the right, and 0th column is the bottom.  
+ *   8  =  0th row is on the left, and 0th column is the bottom.  
+ * If not present, a value of 1 is assumed. } 
+ 
+var kCGImagePropertyOrientation: CFStringRef; external name '_kCGImagePropertyOrientation'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ The value of this key is kCFBooleanTrue if the image contains floating- 
+ * point pixel samples } 
+ 
+var kCGImagePropertyIsFloat: CFStringRef; external name '_kCGImagePropertyIsFloat'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ The value of this key is kCFBooleanTrue if the image contains indexed 
+ * (a.k.a. paletted) pixel samples } 
+ 
+var kCGImagePropertyIsIndexed: CFStringRef; external name '_kCGImagePropertyIsIndexed'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ The value of this key is kCFBooleanTrue if the image contains an alpha 
+ * (a.k.a. coverage) channel } 
+ 
+var kCGImagePropertyHasAlpha: CFStringRef; external name '_kCGImagePropertyHasAlpha'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ The color model of the image such as "RGB", "CMYK", "Gray", or "Lab".
+ * The value of this key is CFStringRef. } 
+
+var kCGImagePropertyColorModel: CFStringRef; external name '_kCGImagePropertyColorModel'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ The name of the optional ICC profile embedded in the image, if known.  
+ * If present, the value of this key is a CFStringRef. }
+
+var kCGImagePropertyProfileName: CFStringRef; external name '_kCGImagePropertyProfileName'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{ Possible values for kCGImagePropertyColorModel property }
+
+var kCGImagePropertyColorModelRGB: CFStringRef; external name '_kCGImagePropertyColorModelRGB'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyColorModelGray: CFStringRef; external name '_kCGImagePropertyColorModelGray'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyColorModelCMYK: CFStringRef; external name '_kCGImagePropertyColorModelCMYK'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyColorModelLab: CFStringRef; external name '_kCGImagePropertyColorModelLab'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{ Possible keys for kCGImagePropertyTIFFDictionary }
+
+var kCGImagePropertyTIFFCompression: CFStringRef; external name '_kCGImagePropertyTIFFCompression'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFPhotometricInterpretation: CFStringRef; external name '_kCGImagePropertyTIFFPhotometricInterpretation'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFDocumentName: CFStringRef; external name '_kCGImagePropertyTIFFDocumentName'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFImageDescription: CFStringRef; external name '_kCGImagePropertyTIFFImageDescription'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFMake: CFStringRef; external name '_kCGImagePropertyTIFFMake'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFModel: CFStringRef; external name '_kCGImagePropertyTIFFModel'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFOrientation: CFStringRef; external name '_kCGImagePropertyTIFFOrientation'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFXResolution: CFStringRef; external name '_kCGImagePropertyTIFFXResolution'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFYResolution: CFStringRef; external name '_kCGImagePropertyTIFFYResolution'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFResolutionUnit: CFStringRef; external name '_kCGImagePropertyTIFFResolutionUnit'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFSoftware: CFStringRef; external name '_kCGImagePropertyTIFFSoftware'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFTransferFunction: CFStringRef; external name '_kCGImagePropertyTIFFTransferFunction'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFDateTime: CFStringRef; external name '_kCGImagePropertyTIFFDateTime'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFArtist: CFStringRef; external name '_kCGImagePropertyTIFFArtist'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFHostComputer: CFStringRef; external name '_kCGImagePropertyTIFFHostComputer'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFCopyright: CFStringRef; external name '_kCGImagePropertyTIFFCopyright'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFWhitePoint: CFStringRef; external name '_kCGImagePropertyTIFFWhitePoint'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFPrimaryChromaticities: CFStringRef; external name '_kCGImagePropertyTIFFPrimaryChromaticities'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Possible keys for kCGImagePropertyJFIFDictionary }
+
+var kCGImagePropertyJFIFVersion: CFStringRef; external name '_kCGImagePropertyJFIFVersion'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyJFIFXDensity: CFStringRef; external name '_kCGImagePropertyJFIFXDensity'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyJFIFYDensity: CFStringRef; external name '_kCGImagePropertyJFIFYDensity'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyJFIFDensityUnit: CFStringRef; external name '_kCGImagePropertyJFIFDensityUnit'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyJFIFIsProgressive: CFStringRef; external name '_kCGImagePropertyJFIFIsProgressive'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{ Possible keys for kCGImagePropertyExifDictionary }
+
+var kCGImagePropertyExifExposureTime: CFStringRef; external name '_kCGImagePropertyExifExposureTime'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifFNumber: CFStringRef; external name '_kCGImagePropertyExifFNumber'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifExposureProgram: CFStringRef; external name '_kCGImagePropertyExifExposureProgram'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifSpectralSensitivity: CFStringRef; external name '_kCGImagePropertyExifSpectralSensitivity'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifISOSpeedRatings: CFStringRef; external name '_kCGImagePropertyExifISOSpeedRatings'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifOECF: CFStringRef; external name '_kCGImagePropertyExifOECF'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifVersion: CFStringRef; external name '_kCGImagePropertyExifVersion'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifDateTimeOriginal: CFStringRef; external name '_kCGImagePropertyExifDateTimeOriginal'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifDateTimeDigitized: CFStringRef; external name '_kCGImagePropertyExifDateTimeDigitized'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifComponentsConfiguration: CFStringRef; external name '_kCGImagePropertyExifComponentsConfiguration'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifCompressedBitsPerPixel: CFStringRef; external name '_kCGImagePropertyExifCompressedBitsPerPixel'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifShutterSpeedValue: CFStringRef; external name '_kCGImagePropertyExifShutterSpeedValue'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifApertureValue: CFStringRef; external name '_kCGImagePropertyExifApertureValue'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifBrightnessValue: CFStringRef; external name '_kCGImagePropertyExifBrightnessValue'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifExposureBiasValue: CFStringRef; external name '_kCGImagePropertyExifExposureBiasValue'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifMaxApertureValue: CFStringRef; external name '_kCGImagePropertyExifMaxApertureValue'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifSubjectDistance: CFStringRef; external name '_kCGImagePropertyExifSubjectDistance'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifMeteringMode: CFStringRef; external name '_kCGImagePropertyExifMeteringMode'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifLightSource: CFStringRef; external name '_kCGImagePropertyExifLightSource'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifFlash: CFStringRef; external name '_kCGImagePropertyExifFlash'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifFocalLength: CFStringRef; external name '_kCGImagePropertyExifFocalLength'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifSubjectArea: CFStringRef; external name '_kCGImagePropertyExifSubjectArea'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifMakerNote: CFStringRef; external name '_kCGImagePropertyExifMakerNote'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifUserComment: CFStringRef; external name '_kCGImagePropertyExifUserComment'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifSubsecTime: CFStringRef; external name '_kCGImagePropertyExifSubsecTime'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifSubsecTimeOrginal: CFStringRef; external name '_kCGImagePropertyExifSubsecTimeOrginal'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifSubsecTimeDigitized: CFStringRef; external name '_kCGImagePropertyExifSubsecTimeDigitized'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifFlashPixVersion: CFStringRef; external name '_kCGImagePropertyExifFlashPixVersion'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifColorSpace: CFStringRef; external name '_kCGImagePropertyExifColorSpace'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifPixelXDimension: CFStringRef; external name '_kCGImagePropertyExifPixelXDimension'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifPixelYDimension: CFStringRef; external name '_kCGImagePropertyExifPixelYDimension'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifRelatedSoundFile: CFStringRef; external name '_kCGImagePropertyExifRelatedSoundFile'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifFlashEnergy: CFStringRef; external name '_kCGImagePropertyExifFlashEnergy'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifSpatialFrequencyResponse: CFStringRef; external name '_kCGImagePropertyExifSpatialFrequencyResponse'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifFocalPlaneXResolution: CFStringRef; external name '_kCGImagePropertyExifFocalPlaneXResolution'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifFocalPlaneYResolution: CFStringRef; external name '_kCGImagePropertyExifFocalPlaneYResolution'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifFocalPlaneResolutionUnit: CFStringRef; external name '_kCGImagePropertyExifFocalPlaneResolutionUnit'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifSubjectLocation: CFStringRef; external name '_kCGImagePropertyExifSubjectLocation'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifExposureIndex: CFStringRef; external name '_kCGImagePropertyExifExposureIndex'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifSensingMethod: CFStringRef; external name '_kCGImagePropertyExifSensingMethod'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifFileSource: CFStringRef; external name '_kCGImagePropertyExifFileSource'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifSceneType: CFStringRef; external name '_kCGImagePropertyExifSceneType'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifCFAPattern: CFStringRef; external name '_kCGImagePropertyExifCFAPattern'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifCustomRendered: CFStringRef; external name '_kCGImagePropertyExifCustomRendered'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifExposureMode: CFStringRef; external name '_kCGImagePropertyExifExposureMode'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifWhiteBalance: CFStringRef; external name '_kCGImagePropertyExifWhiteBalance'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifDigitalZoomRatio: CFStringRef; external name '_kCGImagePropertyExifDigitalZoomRatio'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifFocalLenIn35mmFilm: CFStringRef; external name '_kCGImagePropertyExifFocalLenIn35mmFilm'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifSceneCaptureType: CFStringRef; external name '_kCGImagePropertyExifSceneCaptureType'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifGainControl: CFStringRef; external name '_kCGImagePropertyExifGainControl'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifContrast: CFStringRef; external name '_kCGImagePropertyExifContrast'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifSaturation: CFStringRef; external name '_kCGImagePropertyExifSaturation'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifSharpness: CFStringRef; external name '_kCGImagePropertyExifSharpness'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifDeviceSettingDescription: CFStringRef; external name '_kCGImagePropertyExifDeviceSettingDescription'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifSubjectDistRange: CFStringRef; external name '_kCGImagePropertyExifSubjectDistRange'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifImageUniqueID: CFStringRef; external name '_kCGImagePropertyExifImageUniqueID'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifGamma: CFStringRef; external name '_kCGImagePropertyExifGamma'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Possible keys for kCGImagePropertyGIFDictionary }
+
+var kCGImagePropertyGIFLoopCount: CFStringRef; external name '_kCGImagePropertyGIFLoopCount'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGIFDelayTime: CFStringRef; external name '_kCGImagePropertyGIFDelayTime'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGIFImageColorMap: CFStringRef; external name '_kCGImagePropertyGIFImageColorMap'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGIFHasGlobalColorMap: CFStringRef; external name '_kCGImagePropertyGIFHasGlobalColorMap'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Possible keys for kCGImagePropertyPNGDictionary }
+
+var kCGImagePropertyPNGGamma: CFStringRef; external name '_kCGImagePropertyPNGGamma'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyPNGInterlaceType: CFStringRef; external name '_kCGImagePropertyPNGInterlaceType'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyPNGXPixelsPerMeter: CFStringRef; external name '_kCGImagePropertyPNGXPixelsPerMeter'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyPNGYPixelsPerMeter: CFStringRef; external name '_kCGImagePropertyPNGYPixelsPerMeter'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyPNGsRGBIntent: CFStringRef; external name '_kCGImagePropertyPNGsRGBIntent'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyPNGChromaticities: CFStringRef; external name '_kCGImagePropertyPNGChromaticities'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Possible keys for kCGImagePropertyGPSDictionary }
+
+var kCGImagePropertyGPSVersion: CFStringRef; external name '_kCGImagePropertyGPSVersion'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSLatitudeRef: CFStringRef; external name '_kCGImagePropertyGPSLatitudeRef'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSLatitude: CFStringRef; external name '_kCGImagePropertyGPSLatitude'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSLongitudeRef: CFStringRef; external name '_kCGImagePropertyGPSLongitudeRef'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSLongitude: CFStringRef; external name '_kCGImagePropertyGPSLongitude'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSAltitudeRef: CFStringRef; external name '_kCGImagePropertyGPSAltitudeRef'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSAltitude: CFStringRef; external name '_kCGImagePropertyGPSAltitude'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSTimeStamp: CFStringRef; external name '_kCGImagePropertyGPSTimeStamp'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSSatellites: CFStringRef; external name '_kCGImagePropertyGPSSatellites'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSStatus: CFStringRef; external name '_kCGImagePropertyGPSStatus'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSMeasureMode: CFStringRef; external name '_kCGImagePropertyGPSMeasureMode'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSDOP: CFStringRef; external name '_kCGImagePropertyGPSDOP'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSSpeedRef: CFStringRef; external name '_kCGImagePropertyGPSSpeedRef'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSSpeed: CFStringRef; external name '_kCGImagePropertyGPSSpeed'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSTrackRef: CFStringRef; external name '_kCGImagePropertyGPSTrackRef'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSTrack: CFStringRef; external name '_kCGImagePropertyGPSTrack'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSImgDirectionRef: CFStringRef; external name '_kCGImagePropertyGPSImgDirectionRef'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSImgDirection: CFStringRef; external name '_kCGImagePropertyGPSImgDirection'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSMapDatum: CFStringRef; external name '_kCGImagePropertyGPSMapDatum'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSDestLatitudeRef: CFStringRef; external name '_kCGImagePropertyGPSDestLatitudeRef'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSDestLatitude: CFStringRef; external name '_kCGImagePropertyGPSDestLatitude'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSDestLongitudeRef: CFStringRef; external name '_kCGImagePropertyGPSDestLongitudeRef'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSDestLongitude: CFStringRef; external name '_kCGImagePropertyGPSDestLongitude'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSDestBearingRef: CFStringRef; external name '_kCGImagePropertyGPSDestBearingRef'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSDestBearing: CFStringRef; external name '_kCGImagePropertyGPSDestBearing'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSDestDistanceRef: CFStringRef; external name '_kCGImagePropertyGPSDestDistanceRef'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSDestDistance: CFStringRef; external name '_kCGImagePropertyGPSDestDistance'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSProcessingMethod: CFStringRef; external name '_kCGImagePropertyGPSProcessingMethod'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSAreaInformation: CFStringRef; external name '_kCGImagePropertyGPSAreaInformation'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSDateStamp: CFStringRef; external name '_kCGImagePropertyGPSDateStamp'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSDifferental: CFStringRef; external name '_kCGImagePropertyGPSDifferental'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Possible keys for kCGImagePropertyIPTCDictionary }
+
+var kCGImagePropertyIPTCObjectTypeReference: CFStringRef; external name '_kCGImagePropertyIPTCObjectTypeReference'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCObjectAttributeReference: CFStringRef; external name '_kCGImagePropertyIPTCObjectAttributeReference'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCObjectName: CFStringRef; external name '_kCGImagePropertyIPTCObjectName'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCEditStatus: CFStringRef; external name '_kCGImagePropertyIPTCEditStatus'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCEditorialUpdate: CFStringRef; external name '_kCGImagePropertyIPTCEditorialUpdate'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCUrgency: CFStringRef; external name '_kCGImagePropertyIPTCUrgency'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCSubjectReference: CFStringRef; external name '_kCGImagePropertyIPTCSubjectReference'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCCategory: CFStringRef; external name '_kCGImagePropertyIPTCCategory'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCSupplementalCategory: CFStringRef; external name '_kCGImagePropertyIPTCSupplementalCategory'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCFixtureIdentifier: CFStringRef; external name '_kCGImagePropertyIPTCFixtureIdentifier'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCKeywords: CFStringRef; external name '_kCGImagePropertyIPTCKeywords'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCContentLocationCode: CFStringRef; external name '_kCGImagePropertyIPTCContentLocationCode'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCContentLocationName: CFStringRef; external name '_kCGImagePropertyIPTCContentLocationName'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCReleaseDate: CFStringRef; external name '_kCGImagePropertyIPTCReleaseDate'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCReleaseTime: CFStringRef; external name '_kCGImagePropertyIPTCReleaseTime'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCExpirationDate: CFStringRef; external name '_kCGImagePropertyIPTCExpirationDate'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCExpirationTime: CFStringRef; external name '_kCGImagePropertyIPTCExpirationTime'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCSpecialInstructions: CFStringRef; external name '_kCGImagePropertyIPTCSpecialInstructions'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCActionAdvised: CFStringRef; external name '_kCGImagePropertyIPTCActionAdvised'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCReferenceService: CFStringRef; external name '_kCGImagePropertyIPTCReferenceService'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCReferenceDate: CFStringRef; external name '_kCGImagePropertyIPTCReferenceDate'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCReferenceNumber: CFStringRef; external name '_kCGImagePropertyIPTCReferenceNumber'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCDateCreated: CFStringRef; external name '_kCGImagePropertyIPTCDateCreated'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCTimeCreated: CFStringRef; external name '_kCGImagePropertyIPTCTimeCreated'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCDigitalCreationDate: CFStringRef; external name '_kCGImagePropertyIPTCDigitalCreationDate'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCDigitalCreationTime: CFStringRef; external name '_kCGImagePropertyIPTCDigitalCreationTime'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCOriginatingProgram: CFStringRef; external name '_kCGImagePropertyIPTCOriginatingProgram'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCProgramVersion: CFStringRef; external name '_kCGImagePropertyIPTCProgramVersion'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCObjectCycle: CFStringRef; external name '_kCGImagePropertyIPTCObjectCycle'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCByline: CFStringRef; external name '_kCGImagePropertyIPTCByline'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCBylineTitle: CFStringRef; external name '_kCGImagePropertyIPTCBylineTitle'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCCity: CFStringRef; external name '_kCGImagePropertyIPTCCity'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCSubLocation: CFStringRef; external name '_kCGImagePropertyIPTCSubLocation'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCProvinceState: CFStringRef; external name '_kCGImagePropertyIPTCProvinceState'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCCountryPrimaryLocationCode: CFStringRef; external name '_kCGImagePropertyIPTCCountryPrimaryLocationCode'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCCountryPrimaryLocationName: CFStringRef; external name '_kCGImagePropertyIPTCCountryPrimaryLocationName'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCOriginalTransmissionReference: CFStringRef; external name '_kCGImagePropertyIPTCOriginalTransmissionReference'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCHeadline: CFStringRef; external name '_kCGImagePropertyIPTCHeadline'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCCredit: CFStringRef; external name '_kCGImagePropertyIPTCCredit'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCSource: CFStringRef; external name '_kCGImagePropertyIPTCSource'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCCopyrightNotice: CFStringRef; external name '_kCGImagePropertyIPTCCopyrightNotice'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCContact: CFStringRef; external name '_kCGImagePropertyIPTCContact'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCCaptionAbstract: CFStringRef; external name '_kCGImagePropertyIPTCCaptionAbstract'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCWriterEditor: CFStringRef; external name '_kCGImagePropertyIPTCWriterEditor'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCImageType: CFStringRef; external name '_kCGImagePropertyIPTCImageType'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCImageOrientation: CFStringRef; external name '_kCGImagePropertyIPTCImageOrientation'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCLanguageIdentifier: CFStringRef; external name '_kCGImagePropertyIPTCLanguageIdentifier'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCStarRating: CFStringRef; external name '_kCGImagePropertyIPTCStarRating'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+end.

+ 303 - 0
packages/extra/univint/CGImageSource.pas

@@ -0,0 +1,303 @@
+{
+ * ImageIO - CGImageSource.h
+ * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
+ *
+ }
+
+{	 Pascal Translation:  Gale R Paeper, <[email protected]>, 2006 }
+
+{
+    Modified for use with Free Pascal
+    Version 200
+    Please report any bugs to <[email protected]>
+}
+
+{$mode macpas}
+{$packenum 1}
+{$macro on}
+{$inline on}
+{$CALLING MWPASCAL}
+
+unit CGImageSource;
+interface
+{$setc UNIVERSAL_INTERFACES_VERSION := $0342}
+{$setc GAP_INTERFACES_VERSION := $0200}
+
+{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
+    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
+{$endc}
+
+{$ifc defined CPUPOWERPC and defined CPUI386}
+	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
+{$endc}
+{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
+	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
+{$endc}
+
+{$ifc not defined __ppc__ and defined CPUPOWERPC}
+	{$setc __ppc__ := 1}
+{$elsec}
+	{$setc __ppc__ := 0}
+{$endc}
+{$ifc not defined __i386__ and defined CPUI386}
+	{$setc __i386__ := 1}
+{$elsec}
+	{$setc __i386__ := 0}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
+	{$error Conflicting definitions for __ppc__ and __i386__}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__}
+	{$setc TARGET_CPU_PPC := TRUE}
+	{$setc TARGET_CPU_X86 := FALSE}
+{$elifc defined __i386__ and __i386__}
+	{$setc TARGET_CPU_PPC := FALSE}
+	{$setc TARGET_CPU_X86 := TRUE}
+{$elsec}
+	{$error Neither __ppc__ nor __i386__ is defined.}
+{$endc}
+{$setc TARGET_CPU_PPC_64 := FALSE}
+
+{$ifc defined FPC_BIG_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
+{$elifc defined FPC_LITTLE_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
+{$elsec}
+	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
+{$endc}
+{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
+{$setc CALL_NOT_IN_CARBON := FALSE}
+{$setc OLDROUTINENAMES := FALSE}
+{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
+{$setc OPAQUE_UPP_TYPES := TRUE}
+{$setc OTCARBONAPPLICATION := TRUE}
+{$setc OTKERNEL := FALSE}
+{$setc PM_USE_SESSION_APIS := TRUE}
+{$setc TARGET_API_MAC_CARBON := TRUE}
+{$setc TARGET_API_MAC_OS8 := FALSE}
+{$setc TARGET_API_MAC_OSX := TRUE}
+{$setc TARGET_CARBON := TRUE}
+{$setc TARGET_CPU_68K := FALSE}
+{$setc TARGET_CPU_MIPS := FALSE}
+{$setc TARGET_CPU_SPARC := FALSE}
+{$setc TARGET_OS_MAC := TRUE}
+{$setc TARGET_OS_UNIX := FALSE}
+{$setc TARGET_OS_WIN32 := FALSE}
+{$setc TARGET_RT_MAC_68881 := FALSE}
+{$setc TARGET_RT_MAC_CFM := FALSE}
+{$setc TARGET_RT_MAC_MACHO := TRUE}
+{$setc TYPED_FUNCTION_POINTERS := TRUE}
+{$setc TYPE_BOOL := FALSE}
+{$setc TYPE_EXTENDED := FALSE}
+{$setc TYPE_LONGLONG := TRUE}
+uses MacTypes, CFArray, CFBase, CFData, CFDictionary, CFURL, CGDataProvider, CGImage;
+{$ALIGN POWER}
+
+
+type
+	CGImageSourceRef = ^SInt32; { an opaque 32-bit type }
+
+
+type
+	CGImageSourceStatus = SInt32;
+const
+	kCGImageStatusUnexpectedEOF = -5;
+	kCGImageStatusInvalidData = -4;
+	kCGImageStatusUnknownType = -3;
+	kCGImageStatusReadingHeader = -2;
+	kCGImageStatusIncomplete = -1;
+	kCGImageStatusComplete = 0;
+
+{* Keys for the options dictionary when creating a CGImageSourceRef. *}
+
+{ Specifies the "best guess" of the type identifier for the format of the
+ * image source file. If specified, the value of this key must be a
+ * CFStringRef. For more information about type identifiers, see "UTType.h"
+ * in the Application Services framework. }
+
+var kCGImageSourceTypeIdentifierHint: CFStringRef; external name '_kCGImageSourceTypeIdentifierHint'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{* Keys for the options dictionary of "CGImageSourceCopyPropertiesAtIndex"
+ ** and "CGImageSourceCreateImageAtIndex". *}
+
+{ Specifies whether the image should be cached in a decoded form. The
+ * value of this key must be a CFBooleanRef; the default value is
+ * kCFBooleanFalse. }
+
+var kCGImageSourceShouldCache: CFStringRef; external name '_kCGImageSourceShouldCache'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Specifies whether the image should be returned as a floating
+ * point CGImageRef if supported by the file format. Extended
+ * range floating point CGImageRef may require additional
+ * processing  to render pleasingly.  The value of this key must
+ * be a CFBooleanRef; the default value is kCFBooleanFalse. }
+
+var kCGImageSourceShouldAllowFloat: CFStringRef; external name '_kCGImageSourceShouldAllowFloat'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{* Keys for the options dictionary of
+ ** "CGImageSourceCreateThumbnailAtIndex". *}
+
+{ Specifies whether a thumbnail should be automatically created for an
+ * image if a thumbnail isn't present in the image source file.  The
+ * thumbnail will be created from the full image, subject to the limit
+ * specified by kCGImageSourceThumbnailMaxPixelSize---if a maximum pixel
+ * size isn't specified, then the thumbnail will be the size of the full
+ * image, which probably isn't what you want. The value of this key must be
+ * a CFBooleanRef; the default value of this key is kCFBooleanFalse. }
+
+var kCGImageSourceCreateThumbnailFromImageIfAbsent: CFStringRef; external name '_kCGImageSourceCreateThumbnailFromImageIfAbsent'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Specifies whether a thumbnail should be created from the full image even
+ * if a thumbnail is present in the image source file. The thumbnail will
+ * be created from the full image, subject to the limit specified by
+ * kCGImageSourceThumbnailMaxPixelSize---if a maximum pixel size isn't
+ * specified, then the thumbnail will be the size of the full image, which
+ * probably isn't what you want. The value of this key must be a
+ * CFBooleanRef; the default value of this key is kCFBooleanFalse. }
+
+var kCGImageSourceCreateThumbnailFromImageAlways: CFStringRef; external name '_kCGImageSourceCreateThumbnailFromImageAlways'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Specifies the maximum width and height in pixels of a thumbnail.  If
+ * this this key is not specified, the width and height of a thumbnail is
+ * not limited and thumbnails may be as big as the image itself.  If
+ * present, this value of this key must be a CFNumberRef. }
+
+var kCGImageSourceThumbnailMaxPixelSize: CFStringRef; external name '_kCGImageSourceThumbnailMaxPixelSize'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Specifies whether the thumbnail should be rotated and scaled according
+ * to the orientation and pixel aspect ratio of the full image. The value
+ * of this key must be a CFBooleanRef; the default value of this key is 
+ * kCFBooleanFalse. }
+
+var kCGImageSourceCreateThumbnailWithTransform: CFStringRef; external name '_kCGImageSourceCreateThumbnailWithTransform'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{ Return the CFTypeID for CGImageSources. }
+
+function CGImageSourceGetTypeID: CFTypeID; external name '_CGImageSourceGetTypeID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return an array of supported type identifiers. }
+
+function CGImageSourceCopyTypeIdentifiers: CFArrayRef; external name '_CGImageSourceCopyTypeIdentifiers';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Create an image source reading from the data provider `provider'. The
+ * `options' dictionary may be used to request additional creation options;
+ * see the list of keys above for more information. }
+
+function CGImageSourceCreateWithDataProvider( provider: CGDataProviderRef; options: CFDictionaryRef ): CGImageSourceRef; external name '_CGImageSourceCreateWithDataProvider';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Create an image source reading from `data'.  The `options' dictionary
+ * may be used to request additional creation options; see the list of keys
+ * above for more information. }
+
+function CGImageSourceCreateWithData( data: CFDataRef; options: CFDictionaryRef ): CGImageSourceRef; external name '_CGImageSourceCreateWithData';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Create an image source reading from `url'. The `options' dictionary may
+ * be used to request additional creation options; see the list of keys
+ * above for more information. }
+
+function CGImageSourceCreateWithURL( url: CFURLRef; options: CFDictionaryRef ): CGImageSourceRef; external name '_CGImageSourceCreateWithURL';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return the type identifier of the image source `isrc'.  This type is the
+ * type of the source "container", which is not necessarily the type of the
+ * image(s) in the container.  For example, the .icns format supports
+ * embedded JPEG2000 but the source type will be "com.apple.icns". }
+
+function CGImageSourceGetType( isrc: CGImageSourceRef ): CFStringRef; external name '_CGImageSourceGetType';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return the number of images (not including thumbnails) in the image
+ * source `isrc'. }
+
+function CGImageSourceGetCount( isrc: CGImageSourceRef ): size_t; external name '_CGImageSourceGetCount';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return the properties of the image source `isrc'.  These properties
+ * apply to the container in general but not necessarily to any individual
+ * image that it contains. }
+
+function CGImageSourceCopyProperties( isrc: CGImageSourceRef; options: CFDictionaryRef ): CFDictionaryRef; external name '_CGImageSourceCopyProperties';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return the properties of the image at `index' in the image source
+ * `isrc'.  The index is zero-based. The `options' dictionary may be used
+ * to request additional options; see the list of keys above for more
+ * information. }
+
+function CGImageSourceCopyPropertiesAtIndex( isrc: CGImageSourceRef; index: size_t; options: CFDictionaryRef ): CFDictionaryRef; external name '_CGImageSourceCopyPropertiesAtIndex';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return the image at `index' in the image source `isrc'.  The index is
+ * zero-based. The `options' dictionary may be used to request additional
+ * creation options; see the list of keys above for more information. }
+
+function CGImageSourceCreateImageAtIndex( isrc: CGImageSourceRef; index: size_t; options: CFDictionaryRef ): CGImageRef; external name '_CGImageSourceCreateImageAtIndex';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return the thumbnail of the image at `index' in the image source `isrc'.
+ * The index is zero-based. The `options' dictionary may be used to request
+ * additional thumbnail creation options; see the list of keys above for
+ * more information. }
+
+function CGImageSourceCreateThumbnailAtIndex( isrc: CGImageSourceRef; index: size_t; options: CFDictionaryRef ): CGImageRef; external name '_CGImageSourceCreateThumbnailAtIndex';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Create an incremental image source. No data is provided at creation
+ * time; it is assumed that data will eventually be provided using
+ * "CGImageSourceUpdateDataProvider" or "CGImageSourceUpdateData".  The
+ * `options' dictionary may be used to request additional creation options;
+ * see the list of keys above for more information. }
+
+function CGImageSourceCreateIncremental( options: CFDictionaryRef ): CGImageSourceRef; external name '_CGImageSourceCreateIncremental';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Update the incremental image source `isrc' with new data.  The new data
+ * must include all the previous data plus any additional new data. The
+ * `final' parameter should be true when the final set of data is provided;
+ * false otherwise. }
+
+procedure CGImageSourceUpdateData( isrc: CGImageSourceRef; data: CFDataRef; final: CBool ); external name '_CGImageSourceUpdateData';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Update the incremental image source `isrc' with a new data provider.
+ * The new data provider must provide all the previous data plus any
+ * additional new data. The `final' parameter should be true when the final
+ * set of data is provided; false otherwise. }
+
+procedure CGImageSourceUpdateDataProvider( isrc: CGImageSourceRef; provider: CGDataProviderRef; final: CBool ); external name '_CGImageSourceUpdateDataProvider';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return the overall status of the image source `isrc'.  The status is
+ * particularly informative for incremental image sources, but may be used
+ * by clients providing non-incremental data as well. }
+
+function CGImageSourceGetStatus( isrc: CGImageSourceRef ): CGImageSourceStatus; external name '_CGImageSourceGetStatus';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return the current status of the image at `index' in the image source
+ * `isrc'. The index is zero-based. The returned status is particularly
+ * informative for incremental image sources but may used by clients
+ * providing non-incremental data as well. }
+
+function CGImageSourceGetStatusAtIndex( isrc: CGImageSourceRef; index: size_t ): CGImageSourceStatus; external name '_CGImageSourceGetStatusAtIndex';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+end.

+ 1 - 1
packages/extra/univint/CMApplication.pas

@@ -1313,7 +1313,7 @@ function NCMUseProfileComment(prof: CMProfileRef; flags: UInt32): CMError; exter
  *    CarbonLib:        not available
  *    Mac OS X:         not available
  }
-function CWMatchHBITMAP(cw: CMWorldRef; hBitmap: HBITMAP; progressProc: CMBitmapCallBackUPP; refCon: UnivPtr): CMError; external name '_CWMatchHBITMAP';
+function CWMatchHBITMAP(cw: CMWorldRef; hBitmap_: HBITMAP; progressProc: CMBitmapCallBackUPP; refCon: UnivPtr): CMError; external name '_CWMatchHBITMAP';
 
 {$endc}  {CALL_NOT_IN_CARBON}
 {$endc}  {TARGET_OS_WIN32}

+ 2 - 2
packages/extra/univint/CMMComponent.pas

@@ -248,7 +248,7 @@ function CMMCheckBitmap(cmm: CMMComponentInst; const (*var*) bitmap: CMBitmap; p
  *    CarbonLib:        not available
  *    Mac OS X:         not available
  }
-function CMMMatchPixMap(cmm: CMMComponentInst; var pixMap: PixMap; progressProc: CMBitmapCallBackUPP; refCon: UnivPtr): CMError; external name '_CMMMatchPixMap';
+function CMMMatchPixMap(cmm: CMMComponentInst; var pixMap_: PixMap; progressProc: CMBitmapCallBackUPP; refCon: UnivPtr): CMError; external name '_CMMMatchPixMap';
 {
  *  CMMCheckPixMap()
  *  
@@ -257,7 +257,7 @@ function CMMMatchPixMap(cmm: CMMComponentInst; var pixMap: PixMap; progressProc:
  *    CarbonLib:        not available
  *    Mac OS X:         not available
  }
-function CMMCheckPixMap(cmm: CMMComponentInst; const (*var*) pixMap: PixMap; progressProc: CMBitmapCallBackUPP; var bitMap: BitMap; refCon: UnivPtr): CMError; external name '_CMMCheckPixMap';
+function CMMCheckPixMap(cmm: CMMComponentInst; const (*var*) pixMap_: PixMap; progressProc: CMBitmapCallBackUPP; var bitMap_: BitMap; refCon: UnivPtr): CMError; external name '_CMMCheckPixMap';
 {
  *  CMMConcatInit()
  *  

+ 2 - 2
packages/extra/univint/Controls.pas

@@ -1056,7 +1056,7 @@ procedure KillControls( theWindow: WindowRef ); external name '_KillControls';
 {  ¥ Control Definition Registration                                                   }
 {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
 type
-	ControlCNTLToCollectionProcPtr = function( const (*var*) bounds: Rect; value: SInt16; visible: Boolean; max: SInt16; min: SInt16; procID: SInt16; refCon: SInt32; const (*var*) title: Str255; collection: Collection ): OSStatus;
+	ControlCNTLToCollectionProcPtr = function( const (*var*) bounds: Rect; value: SInt16; visible: Boolean; max: SInt16; min: SInt16; procID: SInt16; refCon: SInt32; const (*var*) title: Str255; collection_: Collection ): OSStatus;
 type
 	ControlCNTLToCollectionUPP = ControlCNTLToCollectionProcPtr;
 {
@@ -1089,7 +1089,7 @@ procedure DisposeControlCNTLToCollectionUPP( userUPP: ControlCNTLToCollectionUPP
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Non-Carbon CFM:   available as macro/inline
  }
-function InvokeControlCNTLToCollectionUPP( const (*var*) bounds: Rect; value: SInt16; visible: Boolean; max: SInt16; min: SInt16; procID: SInt16; refCon: SInt32; const (*var*) title: Str255; collection: Collection; userUPP: ControlCNTLToCollectionUPP ): OSStatus; external name '_InvokeControlCNTLToCollectionUPP';
+function InvokeControlCNTLToCollectionUPP( const (*var*) bounds: Rect; value: SInt16; visible: Boolean; max: SInt16; min: SInt16; procID: SInt16; refCon: SInt32; const (*var*) title: Str255; collection_: Collection; userUPP: ControlCNTLToCollectionUPP ): OSStatus; external name '_InvokeControlCNTLToCollectionUPP';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
 {

+ 1048 - 0
packages/extra/univint/CoreAudioTypes.pas

@@ -0,0 +1,1048 @@
+{==================================================================================================
+     File:       CoreAudio/CoreAudioTypes.h
+
+     Contains:   Definitions types common to the Core Audio APIs
+
+     Version:    Technology: Mac OS X
+                 Release:    Mac OS X
+
+     Copyright:  (c) 1985-2005 by Apple Computer, Inc., all rights reserved.
+
+==================================================================================================}
+
+{	 Pascal Translation:  Gale R Paeper, <[email protected]>, 2006 }
+
+{
+    Modified for use with Free Pascal
+    Version 200
+    Please report any bugs to <[email protected]>
+}
+
+{$mode macpas}
+{$packenum 1}
+{$macro on}
+{$inline on}
+{$CALLING MWPASCAL}
+
+unit CoreAudioTypes;
+interface
+{$setc UNIVERSAL_INTERFACES_VERSION := $0342}
+{$setc GAP_INTERFACES_VERSION := $0200}
+
+{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
+    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
+{$endc}
+
+{$ifc defined CPUPOWERPC and defined CPUI386}
+	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
+{$endc}
+{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
+	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
+{$endc}
+
+{$ifc not defined __ppc__ and defined CPUPOWERPC}
+	{$setc __ppc__ := 1}
+{$elsec}
+	{$setc __ppc__ := 0}
+{$endc}
+{$ifc not defined __i386__ and defined CPUI386}
+	{$setc __i386__ := 1}
+{$elsec}
+	{$setc __i386__ := 0}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
+	{$error Conflicting definitions for __ppc__ and __i386__}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__}
+	{$setc TARGET_CPU_PPC := TRUE}
+	{$setc TARGET_CPU_X86 := FALSE}
+{$elifc defined __i386__ and __i386__}
+	{$setc TARGET_CPU_PPC := FALSE}
+	{$setc TARGET_CPU_X86 := TRUE}
+{$elsec}
+	{$error Neither __ppc__ nor __i386__ is defined.}
+{$endc}
+{$setc TARGET_CPU_PPC_64 := FALSE}
+
+{$ifc defined FPC_BIG_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
+{$elifc defined FPC_LITTLE_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
+{$elsec}
+	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
+{$endc}
+{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
+{$setc CALL_NOT_IN_CARBON := FALSE}
+{$setc OLDROUTINENAMES := FALSE}
+{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
+{$setc OPAQUE_UPP_TYPES := TRUE}
+{$setc OTCARBONAPPLICATION := TRUE}
+{$setc OTKERNEL := FALSE}
+{$setc PM_USE_SESSION_APIS := TRUE}
+{$setc TARGET_API_MAC_CARBON := TRUE}
+{$setc TARGET_API_MAC_OS8 := FALSE}
+{$setc TARGET_API_MAC_OSX := TRUE}
+{$setc TARGET_CARBON := TRUE}
+{$setc TARGET_CPU_68K := FALSE}
+{$setc TARGET_CPU_MIPS := FALSE}
+{$setc TARGET_CPU_SPARC := FALSE}
+{$setc TARGET_OS_MAC := TRUE}
+{$setc TARGET_OS_UNIX := FALSE}
+{$setc TARGET_OS_WIN32 := FALSE}
+{$setc TARGET_RT_MAC_68881 := FALSE}
+{$setc TARGET_RT_MAC_CFM := FALSE}
+{$setc TARGET_RT_MAC_MACHO := TRUE}
+{$setc TYPED_FUNCTION_POINTERS := TRUE}
+{$setc TYPE_BOOL := FALSE}
+{$setc TYPE_EXTENDED := FALSE}
+{$setc TYPE_LONGLONG := TRUE}
+uses MacTypes;
+{$ALIGN POWER}
+
+{!
+    @header CoreAudioTypes
+    This header defines the types and constants that all the CoreAudio APIs have in common.
+}
+
+//==================================================================================================
+
+
+{!
+    @struct         AudioValueRange
+    @abstract       This structure holds a pair of numbers that represent a continuous range of
+                    values.
+    @field          mMinimum
+                        The minimum value.
+    @field          mMaximum
+                        The maximum value.
+}
+type
+	AudioValueRange = record
+		mMinimum: Float64;
+		mMaximum: Float64;
+	end;
+
+{!
+    @struct         AudioValueTranslation
+    @abstract       This stucture holds the buffers necessary for translation operations.
+    @field          mInputData
+                        The buffer containing the data to be translated.
+    @field          mInputDataSize
+                        The number of bytes in the buffer pointed at by mInputData.
+    @field          mOutputData
+                        The buffer to hold the result of the translation.
+    @field          mOutputDataSize
+                        The number of bytes in the buffer pointed at by mOutputData.
+}
+type
+	AudioValueTranslation = record
+		mInputData: UnivPtr;
+		mInputDataSize: UInt32;
+		mOutputData: UnivPtr;
+		mOutputDataSize: UInt32;
+	end;
+
+{!
+    @struct         AudioBuffer
+    @abstract       A structure to hold a buffer of audio data.
+    @field          mNumberChannels
+                        The number of interleaved channels in the buffer.
+    @field          mDataByteSize
+                        The number of bytes in the buffer pointed at by mData.
+    @field          mData
+                        A pointer to the buffer of audio data.
+}
+type
+	AudioBuffer = record
+		mNumberChannels: UInt32;
+		mDataByteSize: UInt32;
+		mData: UnivPtr;
+	end;
+
+{!
+    @struct         AudioBufferList
+    @abstract       A variable length array of AudioBuffer structures.
+    @field          mNumberBuffers
+                        The number of AudioBuffers in the mBuffers array.
+    @field          mBuffers
+                        A variable length array of AudioBuffers.
+}
+type
+	AudioBufferList = record
+		mNumberBuffers: UInt32;
+        mBuffers: array[0..0] of AudioBuffer;
+	end;
+
+{!
+    @struct         AudioStreamBasicDescription
+    @abstract       This structure encapsulates all the information for describing the basic
+                    format properties of a stream of audio data.
+    @discussion     This structure is sufficient to describe any constant bit rate format that  has
+                    channels that are the same size. Extensions are required for variable bit rate
+                    data and for constant bit rate data where the channels have unequal sizes.
+                    However, where applicable, the appropriate fields will be filled out correctly
+                    for these kinds of formats (the extra data is provided via separate properties).
+                    In all fields, a value of 0 indicates that the field is either unknown, not
+                    applicable or otherwise is inapproprate for the format and should be ignored.
+                    Note that 0 is still a valid value for most formats in the mFormatFlags field.
+
+                    In audio data a frame is one sample across all channels. In non-interleaved
+                    audio, the per frame fields identify one channel. In interleaved audio, the per
+                    frame fields identify the set of n channels. In uncompressed audio, a Packet is
+                    one frame, (mFramesPerPacket == 1). In compressed audio, a Packet is an
+                    indivisible chunk of compressed data, for example an AAC packet will contain
+                    1024 sample frames.
+    @field          mSampleRate
+                        The number of sample frames per second of the data in the stream.
+    @field          mFormatID
+                        A four char code indicating the general kind of data in the stream.
+    @field          mFormatFlags
+                        Flags specific to each format.
+    @field          mBytesPerPacket
+                        The number of bytes in a packet of data.
+    @field          mFramesPerPacket
+                        The number of sample frames in each packet of data.
+    @field          mBytesPerFrame
+                        The number of bytes in a single sample frame of data.
+    @field          mChannelsPerFrame
+                        The number of channels in each frame of data.
+    @field          mBitsPerChannel
+                        The number of bits of sample data for each channel in a frame of data.
+    @field          mReserved
+                        Pads the structure out to force an even 8 byte alignment.
+}
+type
+	AudioStreamBasicDescription = record
+		mSampleRate: Float64;
+		mFormatID: UInt32;
+		mFormatFlags: UInt32;
+		mBytesPerPacket: UInt32;
+		mFramesPerPacket: UInt32;
+		mBytesPerFrame: UInt32;
+		mChannelsPerFrame: UInt32;
+		mBitsPerChannel: UInt32;
+		mReserved: UInt32;
+	end;
+
+{!
+    @enum           AudioStreamBasicDescription Constants
+    @abstract       Constants for use with AudioStreamBasicDescription
+    @constant       kAudioStreamAnyRate
+                        The format can use any sample rate. Note that this constant can only appear
+                        in listings of supported formats. It will never appear in a current format.
+}
+const
+	kAudioStreamAnyRate = 0;
+
+{!
+    @enum           Format IDs
+    @abstract       The four char code IDs used to identify individual formats of audio data.
+    @constant       kAudioFormatLinearPCM
+                        Linear PCM, uses the standard flags.
+    @constant       kAudioFormatAC3
+                        AC-3, has no flags.
+    @constant       kAudioFormat60958AC3
+                        AC-3 packaged for transport over an IEC 60958 compliant digital audio
+                        interface. Uses the standard flags.
+    @constant       kAudioFormatAppleIMA4
+                        Apples implementation of IMA 4:1 ADPCM, has no flags.
+    @constant       kAudioFormatMPEG4AAC
+                        MPEG-4 AAC, the flags field contains the MPEG-4 audio object type constant
+                        indicating the specific kind of data.
+    @constant       kAudioFormatMPEG4CELP
+                        MPEG-4 CELP, the flags field contains the MPEG-4 audio object type constant
+                        indicating the specific kind of data.
+    @constant       kAudioFormatMPEG4HVXC
+                        MPEG-4 HVXC, the flags field contains the MPEG-4 audio object type constant
+                        indicating the specific kind of data.
+    @constant       kAudioFormatMPEG4TwinVQ
+                        MPEG-4 TwinVQ, the flags field contains the MPEG-4 audio object type
+                        constant indicating the specific kind of data.
+    @constant       kAudioFormatMACE3
+                        MACE 3:1, has no flags.
+    @constant       kAudioFormatMACE6
+                        MACE 6:1, has no flags.
+    @constant       kAudioFormatULaw
+                        µLaw 2:1, has no flags.
+    @constant       kAudioFormatALaw
+                        aLaw 2:1, has no flags.
+    @constant       kAudioFormatQDesign
+                        QDesign music, has no flags
+    @constant       kAudioFormatQDesign2
+                        QDesign2 music, has no flags
+    @constant       kAudioFormatQUALCOMM
+                        QUALCOMM PureVoice, has no flags
+    @constant       kAudioFormatMPEGLayer1
+                        MPEG-1/2, Layer 1 audio, has no flags
+    @constant       kAudioFormatMPEGLayer2
+                        MPEG-1/2, Layer 2 audio, has no flags
+    @constant       kAudioFormatMPEGLayer3
+                        MPEG-1/2, Layer 3 audio, has no flags
+    @constant       kAudioFormatDVAudio
+                        DV Audio, has no flags
+    @constant       kAudioFormatVariableDurationDVAudio
+                        Variable duration DV Audio, has no flags.
+    @constant       kAudioFormatTimeCode
+                        A stream of IOAudioTimeStamps, uses the IOAudioTimeStamp flags (see
+                        IOKit/audio/IOAudioTypes.h).
+    @constant       kAudioFormatMIDIStream
+                        A stream of MIDIPacketLists where the time stamps in the MIDIPacketList are
+                        sample offsets in the stream. The mSampleRate field is used to describe how
+                        time is passed in this kind of stream and an AudioUnit that receives or
+                        generates this stream can use this sample rate, the number of frames it is
+                        rendering and the sample offsets within the MIDIPacketList to define the
+                        time for any MIDI event within this list. It has no flags.
+    @constant       kAudioFormatParameterValueStream
+                        A "side-chain" of Float32 data that can be fed or generated by an AudioUnit
+                        and is used to send a high density of parameter value control information.
+                        An AU will typically run a ParameterValueStream at either the sample rate of
+                        the AudioUnit's audio data, or some integer divisor of this (say a half or a
+                        third of the sample rate of the audio). The Sample Rate of the ASBD
+                        describes this relationship. It has no flags.
+    @constant       kAudioFormatAppleLossless
+                        Apple Lossless, has no flags.
+}
+const
+	kAudioFormatLinearPCM = $6C70636D (* 'lpcm' *);
+	kAudioFormatAC3 = $61632D33 (* 'ac-3' *);
+	kAudioFormat60958AC3 = $63616333 (* 'cac3' *);
+	kAudioFormatAppleIMA4 = $696D6134 (* 'ima4' *);
+	kAudioFormatMPEG4AAC = $61616320 (* 'aac ' *);
+	kAudioFormatMPEG4CELP = $63656C70 (* 'celp' *);
+	kAudioFormatMPEG4HVXC = $68767863 (* 'hvxc' *);
+	kAudioFormatMPEG4TwinVQ = $74777671 (* 'twvq' *);
+	kAudioFormatMACE3 = $4D414333 (* 'MAC3' *);
+	kAudioFormatMACE6 = $4D414336 (* 'MAC6' *);
+	kAudioFormatULaw = $756C6177 (* 'ulaw' *);
+	kAudioFormatALaw = $616C6177 (* 'alaw' *);
+	kAudioFormatQDesign = $51444D43 (* 'QDMC' *);
+	kAudioFormatQDesign2 = $51444D32 (* 'QDM2' *);
+	kAudioFormatQUALCOMM = $51636C70 (* 'Qclp' *);
+	kAudioFormatMPEGLayer1 = $2E6D7031 (* '.mp1' *);
+	kAudioFormatMPEGLayer2 = $2E6D7032 (* '.mp2' *);
+	kAudioFormatMPEGLayer3 = $2E6D7033 (* '.mp3' *);
+	kAudioFormatDVAudio = $64766361 (* 'dvca' *);
+	kAudioFormatVariableDurationDVAudio = $76647661 (* 'vdva' *);
+	kAudioFormatTimeCode = $74696D65 (* 'time' *);
+	kAudioFormatMIDIStream = $6D696469 (* 'midi' *);
+	kAudioFormatParameterValueStream = $61707673 (* 'apvs' *);
+	kAudioFormatAppleLossless = $616C6163 (* 'alac' *);
+
+{!
+    @enum           Standard Flag Values for AudioStreamBasicDescription
+    @abstract       These are the standard flags for use in the mFormatFlags field of the
+                    AudioStreamBasicDescription structure.
+    @discussion     Typically, when an ASBD is being used, the fields describe the complete layout
+                    of the sample data in the buffers that are represented by this description -
+                    where typically those buffers are represented by an AudioBuffer that is
+                    contained in an AudioBufferList.
+
+                    However, when an ASBD has the kAudioFormatFlagIsNonInterleaved flag, the
+                    AudioBufferList has a different structure and semantic. In this case, the ASBD
+                    fields will describe the format of ONE of the AudioBuffers that are contained in
+                    the list, AND each AudioBuffer in the list is determined to have a single (mono)
+                    channel of audio data. Then, the ASBD's mChannelsPerFrame will indicate the
+                    total number of AudioBuffers that are contained within the AudioBufferList -
+                    where each buffer contains one channel. This is used primarily with the
+                    AudioUnit (and AudioConverter) representation of this list - and won't be found
+                    in the AudioHardware usage of this structure.
+    @constant       kAudioFormatFlagIsFloat
+                        Set for floating point, clear for integer.
+    @constant       kAudioFormatFlagIsBigEndian
+                        Set for big endian, clear for little endian.
+    @constant       kAudioFormatFlagIsSignedInteger
+                        Set for signed integer, clear for unsigned integer. This is only valid if
+                        kAudioFormatFlagIsFloat is clear.
+    @constant       kAudioFormatFlagIsPacked
+                        Set if the sample bits occupy the entire available bits for the channel,
+                        clear if they are high or low aligned within the channel.
+    @constant       kAudioFormatFlagIsAlignedHigh
+                        Set if the sample bits are placed into the high bits of the channel, clear
+                        for low bit placement. This is only valid if kAudioFormatFlagIsPacked is
+                        clear.
+    @constant       kAudioFormatFlagIsNonInterleaved
+                        Set if the samples for each channel are located contiguously and the
+                        channels are layed out end to end, clear if the samples for each frame are
+                        layed out contiguously and the frames layed out end to end.
+    @constant       kAudioFormatFlagIsNonMixable
+                        Set to indicate when a format is non-mixable. Note that this flag is only
+                        used when interacting with the HAL's stream format information. It is not a
+                        valid flag for any other uses.
+    @constant       kAudioFormatFlagsAreAllClear
+                        Set if all the flags would be clear in order to preserve 0 as the wild card
+                        value.
+    @constant       kLinearPCMFormatFlagIsFloat
+                        Synonym for kAudioFormatFlagIsFloat.
+    @constant       kLinearPCMFormatFlagIsBigEndian
+                        Synonym for kAudioFormatFlagIsBigEndian.
+    @constant       kLinearPCMFormatFlagIsSignedInteger
+                        Synonym for kAudioFormatFlagIsSignedInteger.
+    @constant       kLinearPCMFormatFlagIsPacked
+                        Synonym for kAudioFormatFlagIsPacked.
+    @constant       kLinearPCMFormatFlagIsAlignedHigh
+                        Synonym for kAudioFormatFlagIsAlignedHigh.
+    @constant       kLinearPCMFormatFlagIsNonInterleaved
+                        Synonym for kAudioFormatFlagIsNonInterleaved.
+    @constant       kLinearPCMFormatFlagIsNonMixable
+                        Synonym for kAudioFormatFlagIsNonMixable.
+    @constant       kLinearPCMFormatFlagsAreAllClear
+                        Synonym for kAudioFormatFlagsAreAllClear.
+    @constant       kAppleLosslessFormatFlag_16BitSourceData
+                        This flag is set for Apple Lossless data that was sourced from 16 bit native
+                        endian signed integer data.
+    @constant       kAppleLosslessFormatFlag_20BitSourceData
+                        This flag is set for Apple Lossless data that was sourced from 20 bit native
+                        endian signed integer data aligned high in 24 bits.
+    @constant       kAppleLosslessFormatFlag_24BitSourceData
+                        This flag is set for Apple Lossless data that was sourced from 24 bit native
+                        endian signed integer data.
+    @constant       kAppleLosslessFormatFlag_32BitSourceData
+                        This flag is set for Apple Lossless data that was sourced from 32 bit native
+                        endian signed integer data.
+}
+const
+	kAudioFormatFlagIsFloat = 1 shl 0;
+	kAudioFormatFlagIsBigEndian = 1 shl 1;
+	kAudioFormatFlagIsSignedInteger = 1 shl 2;
+	kAudioFormatFlagIsPacked = 1 shl 3;
+	kAudioFormatFlagIsAlignedHigh = 1 shl 4;
+	kAudioFormatFlagIsNonInterleaved = 1 shl 5;
+	kAudioFormatFlagIsNonMixable = 1 shl 6;
+	kAudioFormatFlagsAreAllClear = 1 shl 31;
+	
+	kLinearPCMFormatFlagIsFloat = kAudioFormatFlagIsFloat;
+	kLinearPCMFormatFlagIsBigEndian = kAudioFormatFlagIsBigEndian;
+	kLinearPCMFormatFlagIsSignedInteger = kAudioFormatFlagIsSignedInteger;
+	kLinearPCMFormatFlagIsPacked = kAudioFormatFlagIsPacked;
+	kLinearPCMFormatFlagIsAlignedHigh = kAudioFormatFlagIsAlignedHigh;
+	kLinearPCMFormatFlagIsNonInterleaved = kAudioFormatFlagIsNonInterleaved;
+	kLinearPCMFormatFlagIsNonMixable = kAudioFormatFlagIsNonMixable;
+	kLinearPCMFormatFlagsAreAllClear = kAudioFormatFlagsAreAllClear;
+	
+	kAppleLosslessFormatFlag_16BitSourceData = 1;
+	kAppleLosslessFormatFlag_20BitSourceData = 2;
+	kAppleLosslessFormatFlag_24BitSourceData = 3;
+	kAppleLosslessFormatFlag_32BitSourceData = 4;
+
+{!
+    @enum           Commonly Used Combinations of ASBD Flags
+    @abstract       Some commonly used combinations of flags for AudioStreamBasicDescriptions.
+    @constant       kAudioFormatFlagsNativeEndian
+                        Defined to set or clear kAudioFormatFlagIsBigEndian depending on the
+                        endianness of the processor at build time.
+    @constant       kAudioFormatFlagsNativeFloatPacked
+                        The flags for the canonical format of fully packed, native endian floating
+                        point data.
+}
+const
+{$ifc TARGET_RT_BIG_ENDIAN}
+	kAudioFormatFlagsNativeEndian = kAudioFormatFlagIsBigEndian;
+{$elsec}
+	kAudioFormatFlagsNativeEndian = 0;
+{$endc}  {TARGET_RT_BIG_ENDIAN}
+	kAudioFormatFlagsNativeFloatPacked = kAudioFormatFlagIsFloat or kAudioFormatFlagsNativeEndian or kAudioFormatFlagIsPacked;
+
+{!
+    @defined    TestAudioFormatNativeEndian
+    @abstract   A macro for checking if an ASBD indicates native endian linear PCM data.
+}
+// #define TestAudioFormatNativeEndian(f)  ((f.mFormatID == kAudioFormatLinearPCM) && ((f.mFormatFlags & kAudioFormatFlagIsBigEndian) == kAudioFormatFlagsNativeEndian))
+
+{!
+    @function   IsAudioFormatNativeEndian
+    @abstract   A C++ inline function for checking if an ASBD indicates native endian linear PCM
+                data.
+    @param      f
+                    The AudioStreamBasicDescription to examine.
+    @result     Whether or not the ASBD indicates native endian linear PCM data.
+}
+
+{! @enum           MPEG-4 Audio Object IDs
+    @abstract       Constants that describe the various kinds of MPEG-4 audio data.
+    @discussion     These constants are used in the flags field of an AudioStreamBasicDescription
+                    that describes an MPEG-4 audio stream.
+}
+const
+	kMPEG4Object_AAC_Main = 1;
+	kMPEG4Object_AAC_LC = 2;
+	kMPEG4Object_AAC_SSR = 3;
+	kMPEG4Object_AAC_LTP = 4;
+	kMPEG4Object_AAC_SBR = 5;
+	kMPEG4Object_AAC_Scalable = 6;
+	
+	kMPEG4Object_TwinVQ = 7;
+	kMPEG4Object_CELP = 8;
+	kMPEG4Object_HVXC = 9;    
+
+{!
+    @struct         AudioStreamPacketDescription
+    @abstract       This structure describes the packet layout of a buffer of data where the size of
+                    each packet may not be the same or where there is extraneous data between
+                    packets.
+    @field          mStartOffset
+                        The number of bytes from the start of the buffer to the beginning of the
+                        packet.
+    @field          mVariableFramesInPacket
+                        The number of sample frames of data in the packet. For formats with a
+                        constant number of frames per packet, this field is set to 0.
+    @field          mDataByteSize
+                        The number of bytes in the packet.
+}
+type
+	AudioStreamPacketDescription = record
+		mStartOffset: SInt64;
+		mVariableFramesInPacket: UInt32;
+		mDataByteSize: UInt32;
+	end;
+
+//  SMPTETime is also defined in the CoreVideo headers.
+//#if !defined(__SMPTETime__)
+//#define __SMPTETime__
+{GRP translation note:  As far as MacOSX10.4u.sdk public headers is concerned, this 
+  header/interface is the only place these declarations are made. }
+  
+{!
+    @struct         SMPTETime
+    @abstract       A structure for holding a SMPTE time.
+    @field          mSubframes
+                        The number of subframes in the full message.
+    @field          mSubframeDivisor
+                        The number of subframes per frame (typically 80).
+    @field          mCounter
+                        The total number of messages received.
+    @field          mType
+                        The kind of SMPTE time using the SMPTE time type constants.
+    @field          mFlags
+                        A set of flags that indicate the SMPTE state.
+    @field          mHours
+                        The number of hourse in the full message.
+    @field          mMinutes
+                        The number of minutes in the full message.
+    @field          mSeconds
+                        The number of seconds in the full message.
+    @field          mFrames
+                        The number of frames in the full message.
+}
+type
+	SMPTETime = record
+		mSubframes: SInt16;
+		mSubframeDivisor: SInt16;
+		mCounter: UInt32;
+		mType: UInt32;
+		mFlags: UInt32;
+		mHours: SInt16;
+		mMinutes: SInt16;
+		mSeconds: SInt16;
+		mFrames: SInt16;
+	end;
+
+{!
+    @enum           SMPTE Time Types
+    @abstract       Constants that describe the type of SMPTE time.
+    @constant       kSMPTETimeType24
+                        24 Frame
+    @constant       kSMPTETimeType25
+                        25 Frame
+    @constant       kSMPTETimeType30Drop
+                        30 Drop Frame
+    @constant       kSMPTETimeType30
+                        30 Frame
+    @constant       kSMPTETimeType2997
+                        29.97 Frame
+    @constant       kSMPTETimeType2997Drop
+                        29.97 Drop Frame
+    @constant       kSMPTETimeType60
+                        60 Frame
+    @constant       kSMPTETimeType5994
+                        59.94 Frame
+}
+const
+	kSMPTETimeType24 = 0;
+	kSMPTETimeType25 = 1;
+	kSMPTETimeType30Drop = 2;
+	kSMPTETimeType30 = 3;
+	kSMPTETimeType2997 = 4;
+	kSMPTETimeType2997Drop = 5;
+	kSMPTETimeType60 = 6;
+	kSMPTETimeType5994 = 7;
+
+{!
+    @enum           SMPTE State Flags
+    @abstract       Flags that describe the SMPTE time state.
+    @constant       kSMPTETimeValid
+                        The full time is valid.
+    @constant       kSMPTETimeRunning
+                        Time is running.
+}
+const
+	kSMPTETimeValid = 1 shl 0;
+	kSMPTETimeRunning = 1 shl 1;
+
+//#endif
+
+{!
+    @struct         AudioTimeStamp
+    @abstract       A strucutre that holds different representations of the same point in time.
+    @field          mSampleTime
+                        The absolute sample frame time.
+    @field          mHostTime
+                        The host machine's time base (see <CoreAudio/HostTime.h>).
+    @field          mRateScalar
+                        The ratio of actual host ticks per sample frame to the nominal host ticks
+                        per sample frame.
+    @field          mWordClockTime
+                        The word clock time.
+    @field          mSMPTETime
+                        The SMPTE time.
+    @field          mFlags
+                        A set of flags indicating which representations of the time are valid.
+    @field          mReserved
+                        Pads the structure out to force an even 8 byte alignment.
+}
+type
+	AudioTimeStamp = record
+		mSampleTime: Float64;
+		mHostTime: UInt64;
+		mRateScalar: Float64;
+		mWordClockTime: UInt64;
+		mSMPTETime: SMPTETime;
+		mFlags: UInt32;
+		mReserved: UInt32;
+	end;
+	AudioTimeStampPtr = ^AudioTimeStamp;
+
+{!
+    @enum           AudioTimeStamp Flags
+    @abstract       The flags that indicate which fields in an AudioTimeStamp structure are valid.
+    @constant       kAudioTimeStampSampleTimeValid
+                        The sample frame time is valid.
+    @constant       kAudioTimeStampHostTimeValid
+                        The host time is valid.
+    @constant       kAudioTimeStampRateScalarValid
+                        The rate scalar is valid.
+    @constant       kAudioTimeStampWordClockTimeValid
+                        The word clock time is valid.
+    @constant       kAudioTimeStampSMPTETimeValid
+                        The SMPTE time is valid.
+}
+const
+	kAudioTimeStampSampleTimeValid = 1 shl 0;
+	kAudioTimeStampHostTimeValid = 1 shl 1;
+	kAudioTimeStampRateScalarValid = 1 shl 2;
+	kAudioTimeStampWordClockTimeValid = 1 shl 3;
+	kAudioTimeStampSMPTETimeValid = 1 shl 4;
+
+{!
+    @enum           Commonly Used Combinations of AudioTimeStamp Flags
+    @abstract       Some commonly used combinations of AudioTimeStamp flags.
+    @constant       kAudioTimeStampSampleHostTimeValid
+                        The sample frame time and the host time are valid.
+}
+const
+	kAudioTimeStampSampleHostTimeValid = kAudioTimeStampSampleTimeValid or kAudioTimeStampHostTimeValid;
+
+{!
+    @struct         AudioClassDescription
+    @abstract       This structure is used to describe codecs installed on the system.
+    @field          mType
+                        The four char code codec type.
+    @field          mSubType
+                        The four char code codec subtype.
+    @field          mManufacturer
+                        The four char code codec manufacturer.
+}
+type
+	AudioClassDescription = record
+		mType: OSType;
+		mSubType: OSType;
+		mManufacturer: OSType;
+	end;
+
+
+{!
+    @typedef        AudioChannelLabel
+    @abstract       A tag idenitfying how the channel is to be used.
+}
+type
+	AudioChannelLabel = UInt32;
+
+{!
+    @typedef        AudioChannelLayoutTag
+    @abstract       A tag identifying a particular pre-defined channel layout.
+}
+type
+	AudioChannelLayoutTag = UInt32;
+
+{!
+    @struct         AudioChannelDescription
+    @abstract       This structure describes a single channel.
+    @field          mChannelLabel
+                        The AudioChannelLabel that describes the channel.
+    @field          mChannelFlags
+                        Flags that control the interpretation of mCoordinates.
+    @field          mCoordinates
+                        An ordered triple that specifies a precise speaker location.
+}
+type
+	AudioChannelDescription = record
+		mChannelLabel: AudioChannelLabel;
+		mChannelFlags: UInt32;
+        mCoordinates: array[0..2] of Float32;
+	end;
+
+{!
+    @struct         AudioChannelLayout
+    @abstract       This structure is used to specify channel layouts in files and hardware.
+    @field          mChannelLayoutTag
+                        The AudioChannelLayoutTag that indicates the layout.
+    @field          mChannelBitmap
+                        If mChannelLayoutTag is set to kAudioChannelLayoutTag_UseChannelBitmap, this
+                        field is the channel usage bitmap.
+    @field          mNumberChannelDescriptions
+                        The number of items in the mChannelDescriptions array.
+    @field          mChannelDescriptions
+                        A variable length array of AudioChannelDescriptions that describe the
+                        layout.
+}
+type
+	AudioChannelLayout = record
+		mChannelLayoutTag: AudioChannelLayoutTag;
+		mChannelBitmap: UInt32;
+		mNumberChannelDescriptions: UInt32;
+        mChannelDescriptions: array[0..0] of AudioChannelDescription;
+	end;
+
+{!
+    @enum           AudioChannelLabel Constants
+    @abstract       These constants are for use in the mChannelLabel field of an
+                    AudioChannelDescription structure.
+    @discussion     These channel labels attempt to list all labels in common use. Due to the
+                    ambiguities in channel labeling by various groups, there may be some overlap or
+                    duplication in the labels below. Use the label which most clearly describes what
+                    you mean.
+
+                    WAVE files seem to follow the USB spec for the channel flags. A channel map lets
+                    you put these channels in any order, however a WAVE file only supports labels
+                    1-18 and if present, they must be in the order given below. The integer values
+                    for the labels below match the bit position of the label in the USB bitmap and
+                    thus also the WAVE file bitmap.
+}
+const
+	kAudioChannelLabel_Unknown = $FFFFFFFF;   // unknown or unspecified other use
+	kAudioChannelLabel_Unused = 0;            // channel is present, but has no intended use or destination
+	kAudioChannelLabel_UseCoordinates = 100;          // channel is described by the mCoordinates fields.
+
+	kAudioChannelLabel_Left = 1;
+	kAudioChannelLabel_Right = 2;
+	kAudioChannelLabel_Center = 3;
+	kAudioChannelLabel_LFEScreen = 4;
+	kAudioChannelLabel_LeftSurround = 5;            // WAVE: "Back Left"
+	kAudioChannelLabel_RightSurround = 6;            // WAVE: "Back Right"
+	kAudioChannelLabel_LeftCenter = 7;
+	kAudioChannelLabel_RightCenter = 8;
+	kAudioChannelLabel_CenterSurround = 9;            // WAVE: "Back Center" or plain "Rear Surround"
+	kAudioChannelLabel_LeftSurroundDirect = 10;           // WAVE: "Side Left"
+	kAudioChannelLabel_RightSurroundDirect = 11;           // WAVE: "Side Right"
+	kAudioChannelLabel_TopCenterSurround = 12;
+	kAudioChannelLabel_VerticalHeightLeft = 13;           // WAVE: "Top Front Left"
+	kAudioChannelLabel_VerticalHeightCenter = 14;           // WAVE: "Top Front Center"
+	kAudioChannelLabel_VerticalHeightRight = 15;           // WAVE: "Top Front Right"
+
+	kAudioChannelLabel_TopBackLeft = 16;
+	kAudioChannelLabel_TopBackCenter = 17;
+	kAudioChannelLabel_TopBackRight = 18;
+	
+	kAudioChannelLabel_RearSurroundLeft = 33;
+	kAudioChannelLabel_RearSurroundRight = 34;
+	kAudioChannelLabel_LeftWide = 35;
+	kAudioChannelLabel_RightWide = 36;
+	kAudioChannelLabel_LFE2 = 37;
+	kAudioChannelLabel_LeftTotal = 38;           // matrix encoded 4 channels
+	kAudioChannelLabel_RightTotal = 39;           // matrix encoded 4 channels
+	kAudioChannelLabel_HearingImpaired = 40;
+	kAudioChannelLabel_Narration = 41;
+	kAudioChannelLabel_Mono = 42;
+	kAudioChannelLabel_DialogCentricMix = 43;
+	
+	kAudioChannelLabel_CenterSurroundDirect = 44;           // back center, non diffuse
+
+    // first order ambisonic channels
+	kAudioChannelLabel_Ambisonic_W = 200;
+	kAudioChannelLabel_Ambisonic_X = 201;
+	kAudioChannelLabel_Ambisonic_Y = 202;
+	kAudioChannelLabel_Ambisonic_Z = 203;
+
+    // Mid/Side Recording
+	kAudioChannelLabel_MS_Mid = 204;
+	kAudioChannelLabel_MS_Side = 205;
+
+    // X-Y Recording
+	kAudioChannelLabel_XY_X = 206;
+	kAudioChannelLabel_XY_Y = 207;
+
+    // other
+	kAudioChannelLabel_HeadphonesLeft = 301;
+	kAudioChannelLabel_HeadphonesRight = 302;
+	kAudioChannelLabel_ClickTrack = 304;
+	kAudioChannelLabel_ForeignLanguage = 305;
+
+    // generic discrete channel
+	kAudioChannelLabel_Discrete = 400;
+
+    // numbered discrete channel
+	kAudioChannelLabel_Discrete_0 = (1 shl 16) or 0;
+	kAudioChannelLabel_Discrete_1 = (1 shl 16) or 1;
+	kAudioChannelLabel_Discrete_2 = (1 shl 16) or 2;
+	kAudioChannelLabel_Discrete_3 = (1 shl 16) or 3;
+	kAudioChannelLabel_Discrete_4 = (1 shl 16) or 4;
+	kAudioChannelLabel_Discrete_5 = (1 shl 16) or 5;
+	kAudioChannelLabel_Discrete_6 = (1 shl 16) or 6;
+	kAudioChannelLabel_Discrete_7 = (1 shl 16) or 7;
+	kAudioChannelLabel_Discrete_8 = (1 shl 16) or 8;
+	kAudioChannelLabel_Discrete_9 = (1 shl 16) or 9;
+	kAudioChannelLabel_Discrete_10 = (1 shl 16) or 10;
+	kAudioChannelLabel_Discrete_11 = (1 shl 16) or 11;
+	kAudioChannelLabel_Discrete_12 = (1 shl 16) or 12;
+	kAudioChannelLabel_Discrete_13 = (1 shl 16) or 13;
+	kAudioChannelLabel_Discrete_14 = (1 shl 16) or 14;
+	kAudioChannelLabel_Discrete_15 = (1 shl 16) or 15;
+	kAudioChannelLabel_Discrete_65535 = (1 shl 16) or 65535;
+
+{!
+    @enum           Channel Bitmap Constants
+    @abstract       These constants are for use in the mChannelBitmap field of an
+                    AudioChannelLayout structure.
+}
+const
+	kAudioChannelBit_Left = 1 shl 0;
+	kAudioChannelBit_Right = 1 shl 1;
+	kAudioChannelBit_Center = 1 shl 2;
+	kAudioChannelBit_LFEScreen = 1 shl 3;
+	kAudioChannelBit_LeftSurround = 1 shl 4;      // WAVE: "Back Left"
+	kAudioChannelBit_RightSurround = 1 shl 5;      // WAVE: "Back Right"
+	kAudioChannelBit_LeftCenter = 1 shl 6;
+	kAudioChannelBit_RightCenter = 1 shl 7;
+	kAudioChannelBit_CenterSurround = 1 shl 8;      // WAVE: "Back Center"
+	kAudioChannelBit_LeftSurroundDirect = 1 shl 9;      // WAVE: "Side Left"
+	kAudioChannelBit_RightSurroundDirect = 1 shl 10;     // WAVE: "Side Right"
+	kAudioChannelBit_TopCenterSurround = 1 shl 11;
+	kAudioChannelBit_VerticalHeightLeft = 1 shl 12;     // WAVE: "Top Front Left"
+	kAudioChannelBit_VerticalHeightCenter = 1 shl 13;     // WAVE: "Top Front Center"
+	kAudioChannelBit_VerticalHeightRight = 1 shl 14;     // WAVE: "Top Front Right"
+	kAudioChannelBit_TopBackLeft = 1 shl 15;
+	kAudioChannelBit_TopBackCenter = 1 shl 16;
+	kAudioChannelBit_TopBackRight = 1 shl 17;
+
+{!
+    @enum           Channel Coordinate Flags
+    @abstract       These constants are used in the mChannelFlags field of an
+                    AudioChannelDescription structure.
+    @constant       kAudioChannelFlags_RectangularCoordinates
+                        The channel is specified by the cartesioan coordinates of the speaker
+                        position. This flag is mutally exclusive with
+                        kAudioChannelFlags_SphericalCoordinates.
+    @constant       kAudioChannelFlags_SphericalCoordinates
+                        The channel is specified by the spherical coordinates of the speaker
+                        position. This flag is mutally exclusive with
+                        kAudioChannelFlags_RectangularCoordinates.
+    @constant       kAudioChannelFlags_Meters
+                        Set to indicate the units are in meters, clear to indicate the units are
+                        relative to the unit cube or unit sphere.
+}
+const
+	kAudioChannelFlags_AllOff = 0;
+	kAudioChannelFlags_RectangularCoordinates = 1 shl 0;
+	kAudioChannelFlags_SphericalCoordinates = 1 shl 1;
+	kAudioChannelFlags_Meters = 1 shl 2;
+
+// these are indices for acessing the mCoordinates array in struct AudioChannelDescription
+{!
+    @enum           Channel Coordinate Index Constants
+    @abstract       Constants for indexing the mCoordinates array in an AudioChannelDescription
+                    structure.
+    @constant       kAudioChannelCoordinates_LeftRight
+                        For rectangulare coordinates, negative is left and positive is right.
+    @constant       kAudioChannelCoordinates_BackFront
+                        For rectangulare coordinates, negative is back and positive is front.
+    @constant       kAudioChannelCoordinates_DownUp
+                        For rectangulare coordinates, negative is below ground level, 0 is ground
+                        level, and positive is above ground level.
+    @constant       kAudioChannelCoordinates_Azimuth
+                        For spherical coordinates, 0 is front center, positive is right, negative is
+                        left. This is measured in degrees.
+    @constant       kAudioChannelCoordinates_Elevation
+                        For spherical coordinates, +90 is zenith, 0 is horizontal, -90 is nadir.
+                        This is measured in degrees.
+    @constant       kAudioChannelCoordinates_Distance
+                        For spherical coordinates, the units are described by flags.
+}
+const
+	kAudioChannelCoordinates_LeftRight = 0;
+	kAudioChannelCoordinates_BackFront = 1;
+	kAudioChannelCoordinates_DownUp = 2;
+	kAudioChannelCoordinates_Azimuth = 0;
+	kAudioChannelCoordinates_Elevation = 1;
+	kAudioChannelCoordinates_Distance = 2;
+
+{!
+    @function       AudioChannelLayoutTag_GetNumberOfChannels
+    @abstract       A macro to get the number of channels out of an AudioChannelLayoutTag
+    @discussion     The low 16 bits of an AudioChannelLayoutTag gives the number of channels except
+                    for kAudioChannelLayoutTag_UseChannelDescriptions and
+                    kAudioChannelLayoutTag_UseChannelBitmap.
+    @param          layoutTag
+                        The AudioChannelLayoutTag to examine.
+    @result         The number of channels the tag indicates.
+}
+//#define AudioChannelLayoutTag_GetNumberOfChannels(layoutTag) ((UInt32)((layoutTag) & 0x0000FFFF))
+
+{!
+    @enum           AudioChannelLayoutTag Constants
+    @abstract       These constants are used in the mChannelLayoutTag field of an AudioChannelLayout
+                    structure.
+}
+const
+// Some channel abbreviations used below:
+    // L - left
+    // R - right
+    // C - center
+    // Ls - left surround
+    // Rs - right surround
+    // Cs - center surround
+    // Rls - rear left surround
+    // Rrs - rear right surround
+    // Lw - left wide
+    // Rw - right wide
+    // Lsd - left surround direct
+    // Rsd - right surround direct
+    // Lc - left center
+    // Rc - right center
+    // Ts - top surround
+    // Vhl - vertical height left
+    // Vhc - vertical height center
+    // Vhr - vertical height right
+    // Lt - left matrix total. for matrix encoded stereo.
+    // Rt - right matrix total. for matrix encoded stereo.
+
+    //  General layouts
+	kAudioChannelLayoutTag_UseChannelDescriptions = (0 shl 16) or 0;     // use the array of AudioChannelDescriptions to define the mapping.
+	kAudioChannelLayoutTag_UseChannelBitmap = (1 shl 16) or 0;     // use the bitmap to define the mapping.
+
+	kAudioChannelLayoutTag_Mono = (100 shl 16) or 1;   // a standard mono stream
+	kAudioChannelLayoutTag_Stereo = (101 shl 16) or 2;   // a standard stereo stream (L R) - implied playback
+	kAudioChannelLayoutTag_StereoHeadphones = (102 shl 16) or 2;   // a standard stereo stream (L R) - implied headphone playbac
+	kAudioChannelLayoutTag_MatrixStereo = (103 shl 16) or 2;   // a matrix encoded stereo stream (Lt, Rt)
+	kAudioChannelLayoutTag_MidSide = (104 shl 16) or 2;   // mid/side recording
+	kAudioChannelLayoutTag_XY = (105 shl 16) or 2;   // coincident mic pair (often 2 figure 8's)
+	kAudioChannelLayoutTag_Binaural = (106 shl 16) or 2;   // binaural stereo (left, right)
+	kAudioChannelLayoutTag_Ambisonic_B_Format = (107 shl 16) or 4;   // W, X, Y, Z
+
+	kAudioChannelLayoutTag_Quadraphonic = (108 shl 16) or 4;   // front left, front right, back left, back right
+
+	kAudioChannelLayoutTag_Pentagonal = (109 shl 16) or 5;   // left, right, rear left, rear right, center
+
+	kAudioChannelLayoutTag_Hexagonal = (110 shl 16) or 6;   // left, right, rear left, rear right, center, rear
+
+	kAudioChannelLayoutTag_Octagonal = (111 shl 16) or 8;   // front left, front right, rear left, rear right,
+                                                                        // front center, rear center, side left, side right
+
+	kAudioChannelLayoutTag_Cube = (112 shl 16) or 8;   // left, right, rear left, rear right
+                                                                        // top left, top right, top rear left, top rear right
+
+    //  MPEG defined layouts
+	kAudioChannelLayoutTag_MPEG_1_0 = kAudioChannelLayoutTag_Mono;          //  C
+	kAudioChannelLayoutTag_MPEG_2_0 = kAudioChannelLayoutTag_Stereo;        //  L R
+	kAudioChannelLayoutTag_MPEG_3_0_A = (113 shl 16) or 3;                       //  L R C
+	kAudioChannelLayoutTag_MPEG_3_0_B = (114 shl 16) or 3;                       //  C L R
+	kAudioChannelLayoutTag_MPEG_4_0_A = (115 shl 16) or 4;                       //  L R C Cs
+	kAudioChannelLayoutTag_MPEG_4_0_B = (116 shl 16) or 4;                       //  C L R Cs
+	kAudioChannelLayoutTag_MPEG_5_0_A = (117 shl 16) or 5;                       //  L R C Ls Rs
+	kAudioChannelLayoutTag_MPEG_5_0_B = (118 shl 16) or 5;                       //  L R Ls Rs C
+	kAudioChannelLayoutTag_MPEG_5_0_C = (119 shl 16) or 5;                       //  L C R Ls Rs
+	kAudioChannelLayoutTag_MPEG_5_0_D = (120 shl 16) or 5;                       //  C L R Ls Rs
+	kAudioChannelLayoutTag_MPEG_5_1_A = (121 shl 16) or 6;                       //  L R C LFE Ls Rs
+	kAudioChannelLayoutTag_MPEG_5_1_B = (122 shl 16) or 6;                       //  L R Ls Rs C LFE
+	kAudioChannelLayoutTag_MPEG_5_1_C = (123 shl 16) or 6;                       //  L C R Ls Rs LFE
+	kAudioChannelLayoutTag_MPEG_5_1_D = (124 shl 16) or 6;                       //  C L R Ls Rs LFE
+	kAudioChannelLayoutTag_MPEG_6_1_A = (125 shl 16) or 7;                       //  L R C LFE Ls Rs Cs
+	kAudioChannelLayoutTag_MPEG_7_1_A = (126 shl 16) or 8;                       //  L R C LFE Ls Rs Lc Rc
+	kAudioChannelLayoutTag_MPEG_7_1_B = (127 shl 16) or 8;                       //  C Lc Rc L R Ls Rs LFE    (doc: IS-13818-7 MPEG2-AAC Table 3.1)
+	kAudioChannelLayoutTag_MPEG_7_1_C = (128 shl 16) or 8;                       //  L R C LFE Ls R Rls Rrs
+	kAudioChannelLayoutTag_Emagic_Default_7_1 = (129 shl 16) or 8;                       //  L R Ls Rs C LFE Lc Rc
+	kAudioChannelLayoutTag_SMPTE_DTV = (130 shl 16) or 8;                       //  L R C LFE Ls Rs Lt Rt
+                                                                                            //      (kAudioChannelLayoutTag_ITU_5_1 plus a matrix encoded stereo mix)
+
+    //  ITU defined layouts
+	kAudioChannelLayoutTag_ITU_1_0 = kAudioChannelLayoutTag_Mono;          //  C
+	kAudioChannelLayoutTag_ITU_2_0 = kAudioChannelLayoutTag_Stereo;        //  L R
+
+	kAudioChannelLayoutTag_ITU_2_1 = (131 shl 16) or 3;                       //  L R Cs
+	kAudioChannelLayoutTag_ITU_2_2 = (132 shl 16) or 4;                       //  L R Ls Rs
+	kAudioChannelLayoutTag_ITU_3_0 = kAudioChannelLayoutTag_MPEG_3_0_A;    //  L R C
+	kAudioChannelLayoutTag_ITU_3_1 = kAudioChannelLayoutTag_MPEG_4_0_A;    //  L R C Cs
+
+	kAudioChannelLayoutTag_ITU_3_2 = kAudioChannelLayoutTag_MPEG_5_0_A;    //  L R C Ls Rs
+	kAudioChannelLayoutTag_ITU_3_2_1 = kAudioChannelLayoutTag_MPEG_5_1_A;    //  L R C LFE Ls Rs
+	kAudioChannelLayoutTag_ITU_3_4_1 = kAudioChannelLayoutTag_MPEG_7_1_C;    //  L R C LFE Ls Rs Rls Rrs
+
+    // DVD defined layouts
+	kAudioChannelLayoutTag_DVD_0 = kAudioChannelLayoutTag_Mono;          // C (mono)
+	kAudioChannelLayoutTag_DVD_1 = kAudioChannelLayoutTag_Stereo;        // L R
+	kAudioChannelLayoutTag_DVD_2 = kAudioChannelLayoutTag_ITU_2_1;       // L R Cs
+	kAudioChannelLayoutTag_DVD_3 = kAudioChannelLayoutTag_ITU_2_2;       // L R Ls Rs
+	kAudioChannelLayoutTag_DVD_4 = (133 shl 16) or 3;                       // L R LFE
+	kAudioChannelLayoutTag_DVD_5 = (134 shl 16) or 4;                       // L R LFE Cs
+	kAudioChannelLayoutTag_DVD_6 = (135 shl 16) or 5;                       // L R LFE Ls Rs
+	kAudioChannelLayoutTag_DVD_7 = kAudioChannelLayoutTag_MPEG_3_0_A;    // L R C
+	kAudioChannelLayoutTag_DVD_8 = kAudioChannelLayoutTag_MPEG_4_0_A;    // L R C Cs
+	kAudioChannelLayoutTag_DVD_9 = kAudioChannelLayoutTag_MPEG_5_0_A;    // L R C Ls Rs
+	kAudioChannelLayoutTag_DVD_10 = (136 shl 16) or 4;                       // L R C LFE
+	kAudioChannelLayoutTag_DVD_11 = (137 shl 16) or 5;                       // L R C LFE Cs
+	kAudioChannelLayoutTag_DVD_12 = kAudioChannelLayoutTag_MPEG_5_1_A;    // L R C LFE Ls Rs
+    // 13 through 17 are duplicates of 8 through 12.
+	kAudioChannelLayoutTag_DVD_13 = kAudioChannelLayoutTag_DVD_8;         // L R C Cs
+	kAudioChannelLayoutTag_DVD_14 = kAudioChannelLayoutTag_DVD_9;         // L R C Ls Rs
+	kAudioChannelLayoutTag_DVD_15 = kAudioChannelLayoutTag_DVD_10;        // L R C LFE
+	kAudioChannelLayoutTag_DVD_16 = kAudioChannelLayoutTag_DVD_11;        // L R C LFE Cs
+	kAudioChannelLayoutTag_DVD_17 = kAudioChannelLayoutTag_DVD_12;        // L R C LFE Ls Rs
+	kAudioChannelLayoutTag_DVD_18 = (138 shl 16) or 5;                       // L R Ls Rs LFE
+	kAudioChannelLayoutTag_DVD_19 = kAudioChannelLayoutTag_MPEG_5_0_B;    // L R Ls Rs C
+	kAudioChannelLayoutTag_DVD_20 = kAudioChannelLayoutTag_MPEG_5_1_B;    // L R Ls Rs C LFE
+
+    // These layouts are recommended for AudioUnit usage
+        // These are the symmetrical layouts
+	kAudioChannelLayoutTag_AudioUnit_4 = kAudioChannelLayoutTag_Quadraphonic;
+	kAudioChannelLayoutTag_AudioUnit_5 = kAudioChannelLayoutTag_Pentagonal;
+	kAudioChannelLayoutTag_AudioUnit_6 = kAudioChannelLayoutTag_Hexagonal;
+	kAudioChannelLayoutTag_AudioUnit_8 = kAudioChannelLayoutTag_Octagonal;
+        // These are the surround-based layouts
+	kAudioChannelLayoutTag_AudioUnit_5_0 = kAudioChannelLayoutTag_MPEG_5_0_B;    // L R Ls Rs C
+	kAudioChannelLayoutTag_AudioUnit_6_0 = (139 shl 16) or 6;                       // L R Ls Rs C Cs
+	kAudioChannelLayoutTag_AudioUnit_7_0 = (140 shl 16) or 7;                       // L R Ls Rs C Rls Rrs
+	kAudioChannelLayoutTag_AudioUnit_5_1 = kAudioChannelLayoutTag_MPEG_5_1_A;    // L R C LFE Ls Rs
+	kAudioChannelLayoutTag_AudioUnit_6_1 = kAudioChannelLayoutTag_MPEG_6_1_A;    // L R C LFE Ls Rs Cs
+	kAudioChannelLayoutTag_AudioUnit_7_1 = kAudioChannelLayoutTag_MPEG_7_1_C;    // L R C LFE Ls Rs Rls Rrs
+
+	kAudioChannelLayoutTag_AAC_Quadraphonic = kAudioChannelLayoutTag_Quadraphonic;  // L R Ls Rs
+	kAudioChannelLayoutTag_AAC_4_0 = kAudioChannelLayoutTag_MPEG_4_0_B;    // C L R Cs
+	kAudioChannelLayoutTag_AAC_5_0 = kAudioChannelLayoutTag_MPEG_5_0_D;    // C L R Ls Rs
+	kAudioChannelLayoutTag_AAC_5_1 = kAudioChannelLayoutTag_MPEG_5_1_D;    // C L R Ls Rs Lfe
+	kAudioChannelLayoutTag_AAC_6_0 = (141 shl 16) or 6;                       // C L R Ls Rs Cs
+	kAudioChannelLayoutTag_AAC_6_1 = (142 shl 16) or 7;                       // C L R Ls Rs Cs Lfe
+	kAudioChannelLayoutTag_AAC_7_0 = (143 shl 16) or 7;                       // C L R Ls Rs Rls Rrs
+	kAudioChannelLayoutTag_AAC_7_1 = kAudioChannelLayoutTag_MPEG_7_1_B;    // C Lc Rc L R Ls Rs Lfe
+	kAudioChannelLayoutTag_AAC_Octagonal = (144 shl 16) or 8;                       // C L R Ls Rs Rls Rrs Cs
+
+	kAudioChannelLayoutTag_TMH_10_2_std = (145 shl 16) or 16;                      // L R C Vhc Lsd Rsd Ls Rs Vhl Vhr Lw Rw Csd Cs LFE1 LFE2
+	kAudioChannelLayoutTag_TMH_10_2_full = (146 shl 16) or 21;                       // TMH_10_2_std plus: Lc Rc HI VI Haptic
+
+	kAudioChannelLayoutTag_DiscreteInOrder = (147 shl 16) or 0;						// needs to be ORed with the actual number of channels  
+
+//==================================================================================================
+
+
+end.

+ 2 - 2
packages/extra/univint/Dialogs.pas

@@ -1330,7 +1330,7 @@ function GetStandardAlertDefaultParams( param: AlertStdCFStringAlertParamPtr; ve
  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  *    Non-Carbon CFM:   not available
  }
-function CreateStandardAlert( alertType: AlertType; error: CFStringRef; explanation: CFStringRef { can be NULL }; {const} param: AlertStdCFStringAlertParamPtr { can be NULL }; var outAlert: DialogRef ): OSStatus; external name '_CreateStandardAlert';
+function CreateStandardAlert( alertType_: AlertType; error: CFStringRef; explanation: CFStringRef { can be NULL }; {const} param: AlertStdCFStringAlertParamPtr { can be NULL }; var outAlert: DialogRef ): OSStatus; external name '_CreateStandardAlert';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
 
@@ -1462,7 +1462,7 @@ function RunStandardAlert( inAlert: DialogRef; filterProc: ModalFilterUPP { can
  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  *    Non-Carbon CFM:   not available
  }
-function CreateStandardSheet( alertType: AlertType; error: CFStringRef; explanation: CFStringRef { can be NULL }; {const} param: AlertStdCFStringAlertParamPtr { can be NULL }; notifyTarget: EventTargetRef { can be NULL }; var outSheet: DialogRef ): OSStatus; external name '_CreateStandardSheet';
+function CreateStandardSheet( alertType_: AlertType; error: CFStringRef; explanation: CFStringRef { can be NULL }; {const} param: AlertStdCFStringAlertParamPtr { can be NULL }; notifyTarget: EventTargetRef { can be NULL }; var outSheet: DialogRef ): OSStatus; external name '_CreateStandardSheet';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
 

+ 3 - 3
packages/extra/univint/Events.pas

@@ -510,7 +510,7 @@ procedure SetEventMask( value: EventMask ); external name '_SetEventMask';
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  }
-function GetNextEvent( eventMask: EventMask; var theEvent: EventRecord ): Boolean; external name '_GetNextEvent';
+function GetNextEvent( eventMask_: EventMask; var theEvent: EventRecord ): Boolean; external name '_GetNextEvent';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
 
@@ -525,7 +525,7 @@ function GetNextEvent( eventMask: EventMask; var theEvent: EventRecord ): Boolea
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  }
-function WaitNextEvent( eventMask: EventMask; var theEvent: EventRecord; sleep: UInt32; mouseRgn: RgnHandle { can be NULL } ): Boolean; external name '_WaitNextEvent';
+function WaitNextEvent( eventMask_: EventMask; var theEvent: EventRecord; sleep: UInt32; mouseRgn: RgnHandle { can be NULL } ): Boolean; external name '_WaitNextEvent';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
 
@@ -540,7 +540,7 @@ function WaitNextEvent( eventMask: EventMask; var theEvent: EventRecord; sleep:
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  }
-function EventAvail( eventMask: EventMask; var theEvent: EventRecord ): Boolean; external name '_EventAvail';
+function EventAvail( eventMask_: EventMask; var theEvent: EventRecord ): Boolean; external name '_EventAvail';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
 

文件差异内容过多而无法显示
+ 1267 - 33
packages/extra/univint/FPCMacOSAll.pas


+ 735 - 0
packages/extra/univint/FontPanel.pas

@@ -0,0 +1,735 @@
+{
+     File:       CommonPanels/FontPanel.h
+ 
+     Contains:   Carbon Font Panel package Interfaces.
+ 
+     Version:    CommonPanels-73~983
+ 
+     Copyright:  © 2002-2005 by Apple Computer, Inc., all rights reserved
+ 
+}
+
+{	 Pascal Translation:  Gale R Paeper, <[email protected]>, 2006 }
+
+{
+    Modified for use with Free Pascal
+    Version 200
+    Please report any bugs to <[email protected]>
+}
+
+{$mode macpas}
+{$packenum 1}
+{$macro on}
+{$inline on}
+{$CALLING MWPASCAL}
+
+unit FontPanel;
+interface
+{$setc UNIVERSAL_INTERFACES_VERSION := $0342}
+{$setc GAP_INTERFACES_VERSION := $0200}
+
+{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
+    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
+{$endc}
+
+{$ifc defined CPUPOWERPC and defined CPUI386}
+	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
+{$endc}
+{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
+	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
+{$endc}
+
+{$ifc not defined __ppc__ and defined CPUPOWERPC}
+	{$setc __ppc__ := 1}
+{$elsec}
+	{$setc __ppc__ := 0}
+{$endc}
+{$ifc not defined __i386__ and defined CPUI386}
+	{$setc __i386__ := 1}
+{$elsec}
+	{$setc __i386__ := 0}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
+	{$error Conflicting definitions for __ppc__ and __i386__}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__}
+	{$setc TARGET_CPU_PPC := TRUE}
+	{$setc TARGET_CPU_X86 := FALSE}
+{$elifc defined __i386__ and __i386__}
+	{$setc TARGET_CPU_PPC := FALSE}
+	{$setc TARGET_CPU_X86 := TRUE}
+{$elsec}
+	{$error Neither __ppc__ nor __i386__ is defined.}
+{$endc}
+{$setc TARGET_CPU_PPC_64 := FALSE}
+
+{$ifc defined FPC_BIG_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
+{$elifc defined FPC_LITTLE_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
+{$elsec}
+	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
+{$endc}
+{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
+{$setc CALL_NOT_IN_CARBON := FALSE}
+{$setc OLDROUTINENAMES := FALSE}
+{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
+{$setc OPAQUE_UPP_TYPES := TRUE}
+{$setc OTCARBONAPPLICATION := TRUE}
+{$setc OTKERNEL := FALSE}
+{$setc PM_USE_SESSION_APIS := TRUE}
+{$setc TARGET_API_MAC_CARBON := TRUE}
+{$setc TARGET_API_MAC_OS8 := FALSE}
+{$setc TARGET_API_MAC_OSX := TRUE}
+{$setc TARGET_CARBON := TRUE}
+{$setc TARGET_CPU_68K := FALSE}
+{$setc TARGET_CPU_MIPS := FALSE}
+{$setc TARGET_CPU_SPARC := FALSE}
+{$setc TARGET_OS_MAC := TRUE}
+{$setc TARGET_OS_UNIX := FALSE}
+{$setc TARGET_OS_WIN32 := FALSE}
+{$setc TARGET_RT_MAC_68881 := FALSE}
+{$setc TARGET_RT_MAC_CFM := FALSE}
+{$setc TARGET_RT_MAC_MACHO := TRUE}
+{$setc TYPED_FUNCTION_POINTERS := TRUE}
+{$setc TYPE_BOOL := FALSE}
+{$setc TYPE_EXTENDED := FALSE}
+{$setc TYPE_LONGLONG := TRUE}
+uses MacTypes, AEDataModel, AERegistry, ATSTypes, CarbonEventsCore, CFArray, CFBase, CFDictionary, Quickdraw;
+
+{$ALIGN MAC68K}
+
+{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    Font Panel-Related Events
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
+
+{
+ *  Discussion:
+ *    Event classes
+ }
+const
+{
+   * Events related to font selection or handling.
+   }
+	kEventClassFont = $666F6E74 (* 'font' *);
+
+
+{
+ *  Summary:
+ *    Common command IDs
+ }
+const
+{
+   * The state of the Font Panel should be toggled, displaying it or
+   * hiding it as necessary. If the user closes the Font Panel directly
+   * from the window, the application will receive a
+   * kEventFontPanelClosed event.
+   }
+	kHICommandShowHideFontPanel = $73686670 (* 'shfp' *);
+
+{ Font Events }
+
+{
+ *  Summary:
+ *    Font events (kEventClassFont)
+ *  
+ *  Discussion:
+ *    When the user closes the Font Panel, a kEventWindowClosed event
+ *    will be detected by the Carbon event handler installed by the
+ *    system. The system then notifies the application that the Font
+ *    Panel has closed by posting a Carbon Event Manager event. This
+ *    allows the application to update any menu items or other controls
+ *    whose state may have to change because the Font Panel has closed.
+ *    kEventWindowClosed has no parameters. When the user selects an
+ *    item in the Font Panel, the system will send a
+ *    kEventFontSelection event to the event target specified when the
+ *    application called SetFontPanelInfo(). kEventFontSelection will
+ *    contain parameters reflecting the current Font Panel selection in
+ *    all supported formats. Font events are available after Mac OS X
+ *    10.2 in the Carbon framework.
+ }
+const
+{
+   * The Font Panel has been closed. The application should update its
+   * corresponding UI element (e.g., a menu item) accordingly.
+   }
+	kEventFontPanelClosed = 1;
+
+  {
+   * The user has specified font settings in the Font Panel. The
+   * application can obtain these settings from the event, in which
+   * they are stored as parameters. Not all parameters are guaranteed
+   * to be present; the application should check for all those which it
+   * recognizes and apply the ones found as appropriate to the target
+   * text.
+   }
+	kEventFontSelection = 2;
+
+{
+    Parameters for font events:
+
+    kEventFontPanelClosed
+        None.
+        
+    kEventFontSelection
+        -->     kEventParamATSUFontID               typeATSUFontID
+        -->     kEventParamATSUFontSize             typeATSUSize
+        -->     kEventParamFMFontFamily             typeFMFontFamily
+        -->     kEventParamFMFontSize               typeFMFontSize
+        -->     kEventParamFontColor                typeFontColor
+        -->     kEventParamDictionary               typeCFDictionary 
+}
+const
+	typeATSUFontID = typeUInt32; { ATSUI font ID.}
+	typeATSUSize = typeFixed; { ATSUI font size.}
+	typeFMFontFamily = typeSInt16; { Font family reference.}
+	typeFMFontStyle = typeSInt16; { Quickdraw font style}
+	typeFMFontSize = typeSInt16; { Integer font size.}
+	typeFontColor = typeRGBColor; { Font color spec (optional).}
+	kEventParamATSUFontID = $61756964 (* 'auid' *); { typeATSUFontID}
+	kEventParamATSUFontSize = $6175737A (* 'ausz' *); { typeATSUSize}
+	kEventParamFMFontFamily = $666D666D (* 'fmfm' *); { typeFMFontFamily}
+	kEventParamFMFontStyle = $666D7374 (* 'fmst' *); { typeFMFontStyle}
+	kEventParamFMFontSize = $666D737A (* 'fmsz' *); { typeFMFontSize}
+	kEventParamFontColor = $66636C72 (* 'fclr' *); { typeFontColor}
+	kEventParamDictionary = $64696374 (* 'dict' *); {    typeCFDictionaryRef}
+
+{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    Key constants to be used to access data inside the dictionary that may
+    be contained in the kEventFontSelection dictionary.
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
+{
+ *  kFontPanelATSUFontIDKey
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in Carbon.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kFontPanelATSUFontIDKey: CFStringRef; external name '_kFontPanelATSUFontIDKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{Value is a CFNumber containing the ATSU Font ID}
+{
+ *  kFontPanelVariationAxesKey
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in Carbon.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kFontPanelVariationAxesKey: CFStringRef; external name '_kFontPanelVariationAxesKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{ Value is a CFDataRef containing one or more ATSUI Variation Axes}
+{
+ *  kFontPanelVariationValuesKey
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in Carbon.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kFontPanelVariationValuesKey: CFStringRef; external name '_kFontPanelVariationValuesKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{Value is a CFDataRef containing one or more ATSU Variation values}
+{
+ *  kFontPanelFeatureTypesKey
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in Carbon.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kFontPanelFeatureTypesKey: CFStringRef; external name '_kFontPanelFeatureTypesKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{  Value is a CFDataRef containing one or more ATSUI feature types}
+{
+ *  kFontPanelFeatureSelectorsKey
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in Carbon.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kFontPanelFeatureSelectorsKey: CFStringRef; external name '_kFontPanelFeatureSelectorsKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{  Value is a CFDataRef containing one or more ATSUI feature selectors}
+{
+ *  kFontPanelAttributesKey
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in Carbon.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kFontPanelAttributesKey: CFStringRef; external name '_kFontPanelAttributesKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{
+  const <CFString> string kFontPanelAttributesKey           =   "FontAttributes";
+    Value is a CFDictionaryRef containing three keyed values.  Each value is
+    a CFDataRef.  One CFDataRef contains one or more ATSUAttributeTags.
+    One CFDataRef contains one or more value sizes for each tag.  And the last
+    CFDataRef contains the actual values.  It is important to understand that
+    these are the actual values and not value ptrs.  To pass these values to
+    ATSUI they must be converted into ptrs.  The following code fragment demonstrates
+    one technique
+    CFDataRef       values;
+    CFDataRef       tags;
+    CFDataRef       sizes;
+    if (    CFDictionaryGetValueIfPresent( attributesDict, kFontPanelAttributeValuesKey, &values ) &&
+            CFDictionaryGetValueIfPresent( attributesDict, kFontPanelAttributeTagsKey, &tags )
+            CFDictionaryGetValueIfPresent( attributesDict, kFontPanelAttributeSizesKey, &sizes ))
+    (
+        ItemCount               count = CFDataGetLength( tags )/sizeof(ATSUAttributeTag);
+        CFIndex                 index;
+        ATSUAttributeValuePtr   valuePtrs = malloc( count * sizeof(ATSUAttributeValuePtr) );
+        UInt32*                 sizePtr = (UInt32*)CFDataGetBytePtr(sizes);
+        UInt32*                 bytePtr = (UInt32*)CFDataGetBytePtr(values);
+        for ( index = 0; index < count; index++ )
+        (
+            valuePtrs[index] = bytePtr;
+            bytePtr = (UInt32*)( (UInt8*)bytePtr + sizePtr[index]);
+        )
+        verify_noerr( ATSUSetAttributes( someATSUStyle, count, (ATSUAttributeTag*)CFDataGetBytePtr(tags),sizePtr, valuePtrs ) );
+        free( valuePtrs );
+}
+{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    Keys to access the CFDataRefs inside the attributes dictionary (see above)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
+{
+ *  kFontPanelAttributeTagsKey
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in Carbon.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kFontPanelAttributeTagsKey: CFStringRef; external name '_kFontPanelAttributeTagsKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{Value is a CFDataRef containing one or more style attribute tags}
+{
+ *  kFontPanelAttributeSizesKey
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in Carbon.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kFontPanelAttributeSizesKey: CFStringRef; external name '_kFontPanelAttributeSizesKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{Value is a CFDataRef containing one or more style attribute sizes}
+{
+ *  kFontPanelAttributeValuesKey
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in Carbon.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kFontPanelAttributeValuesKey: CFStringRef; external name '_kFontPanelAttributeValuesKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{Value is a CFDataRef containing one or more style values}
+{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    Other Font Panel Constants
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
+{
+Error codes (Font Panel codes in range [-8880,-8899]).
+}
+const
+	fontPanelShowErr = -8880; { Can't display the Font Panel.}
+	fontPanelSelectionStyleErr = -8881; { Bad font selection style info.}
+	fontPanelFontSelectionQDStyleVersionErr = -8882; { Unsupported record version.}
+
+{
+Type of font information passed in SetFontPanelInfo(). If the client is
+sending ATSUI style data, it specifies kFontSelectionATSUIType; if it is
+sending Quickdraw style data, it specifies kFontSelectionQDType.
+}
+const
+	kFontSelectionATSUIType = $6173746C (* 'astl' *); { Use ATSUIStyle collection.}
+	kFontSelectionQDType = $7173746C (* 'qstl' *); { Use FontSelectionQDStyle record.}
+
+{
+Supported versions of the FontSelectionQDStyle record. Clients should always set
+the <version> field to one of these values.
+}
+const
+	kFontSelectionQDStyleVersionZero = 0;
+
+
+{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    Font Panel Types
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
+{
+Record specifying the font information to be specified in the Font
+Panel. This record is used if the client is sending Quickdraw style data
+(i.e., it specified kFontSelectionQDType in SetFontPanelInfo()).
+}
+type
+	FontSelectionQDStyle = record
+		version: UInt32;                { Version number of struct.}
+		instance: FMFontFamilyInstance;             { Font instance data.}
+		size: FMFontSize;                   { Size of font in points.}
+		hasColor: Boolean;               { true if color info supplied.}
+		reserved: SInt8;               { Filler byte.}
+		color: RGBColor;                  { Color specification for font.}
+	end;
+	FontSelectionQDStylePtr = ^FontSelectionQDStyle;
+{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    Font Panel Functions
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
+{
+ *  FPIsFontPanelVisible()
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.2 and later in Carbon.framework
+ *    CarbonLib:        not available in CarbonLib 1.x
+ *    Non-Carbon CFM:   not available
+ }
+function FPIsFontPanelVisible: Boolean; external name '_FPIsFontPanelVisible';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ *  FPShowHideFontPanel()
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.2 and later in Carbon.framework
+ *    CarbonLib:        not available in CarbonLib 1.x
+ *    Non-Carbon CFM:   not available
+ }
+function FPShowHideFontPanel: OSStatus; external name '_FPShowHideFontPanel';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ *  SetFontInfoForSelection()
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.2 and later in Carbon.framework
+ *    CarbonLib:        not available in CarbonLib 1.x
+ *    Non-Carbon CFM:   not available
+ }
+function SetFontInfoForSelection( iStyleType: OSType; iNumStyles: UInt32; iStyles: {variable-size-array} UnivPtr; iFPEventTarget: EventTargetRef ): OSStatus; external name '_SetFontInfoForSelection';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    Font Collection Functions
+
+    In 10.3 the ability to create and modify font collections is available.  Font
+    collections are files containing font descriptions.  Font descriptions are
+    encapsulated in the opaque object FCFontDescriptorRef. A FCFontDescriptroRef
+    is a CFType.  To release one call CFRelease.
+    
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
+{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    Font Collection Types
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
+type
+	FCFontDescriptorRef = ^SInt32; { an opaque 32-bit type }
+{
+ *  FCCopyCollectionNames()
+ *  
+ *  Discussion:
+ *    FCCopyCollectionNames returns a copy of the CFArrayRef containing
+ *    the displayable names of every font collection available to the
+ *    current user.
+ *  
+ *  Result:
+ *    A CFArrayRef containing CFStringRefs where each CFStringRef
+ *    contains a font collection's displayable name. Callers are
+ *    responsible for releasing the returned CFArrayRef.  If the
+ *    operation is not successful NULL is returned.
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in Carbon.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+function FCCopyCollectionNames: CFArrayRef; external name '_FCCopyCollectionNames';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ *  FCCopyFontDescriptorsInCollection()
+ *  
+ *  Discussion:
+ *    FCCopyFontDescriptorsInCollection copies the fontDescriptors in a
+ *    named collection into an array.
+ *  
+ *  Parameters:
+ *    
+ *    iCollection:
+ *      The name of a collection that descriptors should be copied from.
+ *  
+ *  Result:
+ *    A CFArrayRef containing copies of the FCFontDescriptorRefs
+ *    contained in the name collection.  Callers are responsible for
+ *    releasing the returned CFArrayRef.  The FCFontDescriptorRefs are
+ *    retained when added to the array and released when the array is
+ *    destroyed.  You can access a font descriptor in the array in the
+ *    following manner: fd =
+ *    (FCFontDescriptorRef)CFArrayGetValueAtIndex(array, i);
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in Carbon.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+function FCCopyFontDescriptorsInCollection( iCollection: CFStringRef ): CFArrayRef; external name '_FCCopyFontDescriptorsInCollection';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ *  FCAddCollection()
+ *  
+ *  Discussion:
+ *    Add a collection to the font descriptor collections available to
+ *    the current user. If the collection is successfully added noErr
+ *    is returned.  If the collection is not added an error code is
+ *    returned.
+ *  
+ *  Parameters:
+ *    
+ *    iCollection:
+ *      the name of the collection to add.
+ *    
+ *    iCollectionOptions:
+ *      currently there are no options.  Set to kNilOptions.  This
+ *      parameter is available for future expansion.
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in Carbon.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+function FCAddCollection( iCollection: CFStringRef; iCollectionOptions: OptionBits ): OSStatus; external name '_FCAddCollection';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ *  FCRemoveCollection()
+ *  
+ *  Discussion:
+ *    Remove a named collection from the font descriptor collections
+ *    available to the current user. Returns noErr if the collection
+ *    was successfully removed.  An appropriate error code is returned
+ *    if the operation was not successful.
+ *  
+ *  Parameters:
+ *    
+ *    iCollection:
+ *      the name of the collection to remove.
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in Carbon.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+function FCRemoveCollection( iCollection: CFStringRef ): OSStatus; external name '_FCRemoveCollection';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ *  FCAddFontDescriptorToCollection()
+ *  
+ *  Discussion:
+ *    Add a font descriptor to the named collection.  noErr is returned
+ *    if the font descriptor is added. An error code describing the
+ *    failure is returned if the descriptor is not added.
+ *  
+ *  Parameters:
+ *    
+ *    iDescriptor:
+ *      the font descriptor that should be added.  The
+ *      FCFontDescriptorRef is retained when it is added to the
+ *      collection.  After calling this function the caller may release
+ *      their copy.
+ *    
+ *    iCollection:
+ *      the name of the collection to which the font descriptor should
+ *      be added.
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in Carbon.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+function FCAddFontDescriptorToCollection( iDescriptor: FCFontDescriptorRef; iCollection: CFStringRef ): OSStatus; external name '_FCAddFontDescriptorToCollection';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ *  FCRemoveFontDescriptorFromCollection()
+ *  
+ *  Discussion:
+ *    Remove a font descriptor from the named collection.  An error is
+ *    returned if the font descriptor can not be removed.  noErr is
+ *    returned if the descriptor is removed.
+ *  
+ *  Parameters:
+ *    
+ *    iDescriptor:
+ *      the descriptor that should be removed.
+ *    
+ *    iCollection:
+ *      the name of the collection that the descriptor should be
+ *      removed from.
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in Carbon.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+function FCRemoveFontDescriptorFromCollection( iDescriptor: FCFontDescriptorRef; iCollection: CFStringRef ): OSStatus; external name '_FCRemoveFontDescriptorFromCollection';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    Font Descriptor Attribute Keys
+    
+    Font Descriptors contain font attributes that are set and accessed via a set of 
+    keys.  The keys are all constant CFStringRefs.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
+
+{
+ *  kFCFontFamilyAttribute
+ *  
+ *  Discussion:
+ *    The key for a CFStringRef that contains a font family name (e.g.
+ *    Baskerville).
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in Carbon.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kFCFontFamilyAttribute: CFStringRef; external name '_kFCFontFamilyAttribute'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{
+ *  kFCFontNameAttribute
+ *  
+ *  Discussion:
+ *    The key for a CFStringRef containing a font name (e.g.
+ *    Baskerville-Italic).
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in Carbon.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kFCFontNameAttribute: CFStringRef; external name '_kFCFontNameAttribute'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{
+ *  kFCFontFaceAttribute
+ *  
+ *  Discussion:
+ *    The key for a CFStringRef containing a face name (e.g. Italic).
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in Carbon.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kFCFontFaceAttribute: CFStringRef; external name '_kFCFontFaceAttribute'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{
+ *  kFCFontSizeAttribute
+ *  
+ *  Discussion:
+ *    The key for a CFNumber containg the font size (e.g. 12).
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in Carbon.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kFCFontSizeAttribute: CFStringRef; external name '_kFCFontSizeAttribute'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{
+ *  kFCFontVisibleNameAttribute
+ *  
+ *  Discussion:
+ *    The Key for a CFStringRef containing the name that should be used
+ *    in a UI to describe the font.
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in Carbon.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kFCFontVisibleNameAttribute: CFStringRef; external name '_kFCFontVisibleNameAttribute'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{
+ *  kFCFontCGColorAttribute
+ *  
+ *  Discussion:
+ *    The Key for a CGColorRef containing the fonts color.
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in Carbon.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kFCFontCGColorAttribute: CFStringRef; external name '_kFCFontCGColorAttribute'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{
+ *  FCFontDescriptorCreateWithFontAttributes()
+ *  
+ *  Discussion:
+ *    Create a font descriptor using the attributes contained in the
+ *    dictionary.
+ *  
+ *  Parameters:
+ *    
+ *    iAttributes:
+ *      a dictionary containing one or more of the attributes described
+ *      above.
+ *  
+ *  Result:
+ *    A valid FCFontDescriptorRef.  NULL if one cannot be created.
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in Carbon.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+function FCFontDescriptorCreateWithFontAttributes( iAttributes: CFDictionaryRef ): FCFontDescriptorRef; external name '_FCFontDescriptorCreateWithFontAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ *  FCFontDescriptorCreateWithName()
+ *  
+ *  Discussion:
+ *    Create a font descriptor using a fontname and font size.
+ *  
+ *  Parameters:
+ *    
+ *    iFontName:
+ *      The name of the font (e.g. Baskerville-Italic).
+ *    
+ *    iSize:
+ *      the size of the font. (e.g. 12.0).
+ *  
+ *  Result:
+ *    A valid FCFontDescriptorRef.  NULL if one cannot be created.
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in Carbon.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+function FCFontDescriptorCreateWithName( iFontName: CFStringRef; iSize: Float32 ): FCFontDescriptorRef; external name '_FCFontDescriptorCreateWithName';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+
+
+end.

+ 457 - 31
packages/extra/univint/GestaltEqu.pas

@@ -122,71 +122,336 @@ type
 {$elsec}
 	SelectorFunctionUPP = UniversalProcPtr;
 {$endc}	
-	{
-	 *  Gestalt()
-	 *  
-	 *  Availability:
-	 *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
-	 *    CarbonLib:        in CarbonLib 1.0 and later
-	 *    Mac OS X:         in version 10.0 and later
-	 	}
-function Gestalt(selector: OSType; var response: SInt32): OSErr; external name '_Gestalt';
 {
- *  ReplaceGestalt()
+ *  Gestalt()
+ *  
+ *  Summary:
+ *    Gestalt returns information about the operating environment.
+ *  
+ *  Discussion:
+ *    The Gestalt function places the information requested by the
+ *    selector parameter in the variable parameter response . Note that
+ *    Gestalt returns the response from all selectors in a long word,
+ *    which occupies 4 bytes. When not all 4 bytes are needed, the
+ *    significant information appears in the low-order byte or bytes.
+ *    Although the response parameter is declared as a variable
+ *    parameter, you cannot use it to pass information to Gestalt or to
+ *    a Gestalt selector function. Gestalt interprets the response
+ *    parameter as an address at which it is to place the result
+ *    returned by the selector function specified by the selector
+ *    parameter. Gestalt ignores any information already at that
+ *    address.
+ *    
+ *    The Apple-defined selector codes fall into two categories:
+ *    environmental selectors, which supply specific environmental
+ *    information you can use to control the behavior of your
+ *    application, and informational selectors, which supply
+ *    information you can't use to determine what hardware or software
+ *    features are available. You can use one of the selector codes
+ *    defined by Apple (listed in the "Constants" section beginning on
+ *    page 1-14 ) or a selector code defined by a third-party
+ *    product.
+ *    
+ *    The meaning of the value that Gestalt returns in the response
+ *    parameter depends on the selector code with which it was called.
+ *    For example, if you call Gestalt using the gestaltTimeMgrVersion
+ *    selector, it returns a version code in the response parameter. In
+ *    this case, a returned value of 3 indicates that the extended Time
+ *    Manager is available.
+ *    
+ *    In most cases, the last few characters in the selector's symbolic
+ *    name form a suffix that indicates what type of value you can
+ *    expect Gestalt to place in the response parameter. For example,
+ *    if the suffix in a Gestalt selector is Size , then Gestalt
+ *    returns a size in the response parameter.
+ *    
+ *    Attr:  A range of 32 bits, the meanings of which are defined by a
+ *    list of constants. Bit 0 is the least significant bit of the long
+ *    word.
+ *    Count: A number indicating how many of the indicated type of item
+ *    exist.
+ *    Size: A size, usually in bytes.
+ *    Table: The base address of a table.
+ *    Type: An index to a list of feature descriptions.
+ *    Version: A version number, which can be either a constant with a
+ *    defined meaning or an actual version number, usually stored as
+ *    four hexadecimal digits in the low-order word of the return
+ *    value. Implied decimal points may separate digits. The value
+ *    $0701, for example, returned in response to the
+ *    gestaltSystemVersion selector, represents system software version
+ *    7.0.1.
+ *    
+ *    Selectors that have the suffix Attr deserve special attention.
+ *    They cause Gestalt to return a bit field that your application
+ *    must interpret to determine whether a desired feature is present.
+ *    For example, the application-defined sample function
+ *    MyGetSoundAttr , defined in Listing 1-2 on page 1-6 , returns a
+ *    LongInt that contains the Sound Manager attributes field
+ *    retrieved from Gestalt . To determine whether a particular
+ *    feature is available, you need to look at the designated bit.
+ *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.3
+ *  
+ *  Parameters:
+ *    
+ *    selector:
+ *      The selector to return information for
+ *    
+ *    response:
+ *      On exit, the requested information whose format depends on the
+ *      selector specified.
  *  
  *  Availability:
+ *    Mac OS X:         in version 10.0 and later in CoreServices.framework
+ *    CarbonLib:        in CarbonLib 1.0 and later
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
+ }
+function Gestalt(selector: OSType; var response: SInt32): OSErr; external name '_Gestalt';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ *  ReplaceGestalt()   *** DEPRECATED ***
+ *  
+ *  Deprecated:
+ *    Use NewGestaltValue instead wherever possible.
+ *  
+ *  Summary:
+ *    Replaces the gestalt function associated with a selector.
+ *  
+ *  Discussion:
+ *    The ReplaceGestalt function replaces the selector function
+ *    associated with an existing selector code.
+ *    
+ *    So that your function can call the function previously associated
+ *    with the selector, ReplaceGestalt places the address of the old
+ *    selector function in the oldGestaltFunction parameter. If
+ *    ReplaceGestalt returns an error of any type, then the value of
+ *    oldGestaltFunction is undefined.
+ *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.3
+ *  
+ *  Parameters:
+ *    
+ *    selector:
+ *      the selector to replace
+ *    
+ *    gestaltFunction:
+ *      a UPP for the new selector function
+ *    
+ *    oldGestaltFunction:
+ *      on exit, a pointer to the UPP of the previously associated with
+ *      the specified selector
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.3
  *    CarbonLib:        in CarbonLib 1.0 and later
- *    Mac OS X:         in version 10.0 and later
+ *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  }
 function ReplaceGestalt(selector: OSType; gestaltFunction: SelectorFunctionUPP; var oldGestaltFunction: SelectorFunctionUPP): OSErr; external name '_ReplaceGestalt';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
 {
- *  NewGestalt()
+ *  NewGestalt()   *** DEPRECATED ***
+ *  
+ *  Deprecated:
+ *    Use NewGestaltValue instead wherever possible.
+ *  
+ *  Summary:
+ *    Adds a selector code to those already recognized by Gestalt.
+ *  
+ *  Discussion:
+ *    The NewGestalt function registers a specified selector code with
+ *    the Gestalt Manager so that when the Gestalt function is called
+ *    with that selector code, the specified selector function is
+ *    executed. Before calling NewGestalt, you must define a selector
+ *    function callback. See SelectorFunctionProcPtr for a description
+ *    of how to define your selector function.
+ *    
+ *    Registering with the Gestalt Manager is a way for software such
+ *    as system extensions to make their presence known to potential
+ *    users of their services.
+ *    
+ *    In Mac OS X, the selector and replacement value are on a
+ *    per-context basis. That means they are available only to the
+ *    application or other code that installs them. You cannot use this
+ *    function to make information available to another process.
+ *     
+ *    A Gestalt selector registered with NewGestalt() can not be
+ *    deleted.
+ *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.3
+ *  
+ *  Parameters:
+ *    
+ *    selector:
+ *      the selector to create
+ *    
+ *    gestaltFunction:
+ *      a UPP for the new selector function, which Gestalt executes
+ *      when it receives the new selector code. See
+ *      SelectorFunctionProcPtr for more information on the callback
+ *      you need to provide.
  *  
  *  Availability:
- *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
+ *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.3
  *    CarbonLib:        in CarbonLib 1.0 and later
- *    Mac OS X:         in version 10.0 and later
+ *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  }
 function NewGestalt(selector: OSType; gestaltFunction: SelectorFunctionUPP): OSErr; external name '_NewGestalt';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
 {   The GestaltValue functions are available in System 7.5 and later }
 
 {
  *  NewGestaltValue()
  *  
+ *  Summary:
+ *    Adds a selector code to those already recognized by Gestalt.
+ *  
+ *  Discussion:
+ *    The NewGestalt function registers a specified selector code with
+ *    the Gestalt Manager so that when the Gestalt function is called
+ *    with that selector code, the specified selector function is
+ *    executed. Before calling NewGestalt, you must define a selector
+ *    function callback. See SelectorFunctionProcPtr for a description
+ *    of how to define your selector function.
+ *    
+ *    Registering with the Gestalt Manager is a way for software such
+ *    as system extensions to make their presence known to potential
+ *    users of their services.
+ *    
+ *    In Mac OS X, the selector and replacement value are on a
+ *    per-context basis. That means they are available only to the
+ *    application or other code that installs them. You cannot use this
+ *    function to make information available to another process.
+ *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.3
+ *  
+ *  Parameters:
+ *    
+ *    selector:
+ *      the selector to create
+ *    
+ *    newValue:
+ *      the value to return for the new selector code.
+ *  
  *  Availability:
- *    Non-Carbon CFM:   in InterfaceLib 7.5 and later
+ *    Mac OS X:         in version 10.0 and later in CoreServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
- *    Mac OS X:         in version 10.0 and later
+ *    Non-Carbon CFM:   in InterfaceLib 7.5 and later
  }
 function NewGestaltValue(selector: OSType; newValue: SInt32): OSErr; external name '_NewGestaltValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
 {
  *  ReplaceGestaltValue()
  *  
+ *  Summary:
+ *    Replaces the value that the function Gestalt returns for a
+ *    specified selector code with the value provided to the function.
+ *  
+ *  Discussion:
+ *    You use the function ReplaceGestaltValue to replace an existing
+ *    value. You should not call this function to introduce a value
+ *    that doesn't already exist; instead call the function
+ *    NewGestaltValue.
+ *    
+ *    In Mac OS X, the selector and replacement value are on a
+ *    per-context basis. That means they are available only to the
+ *    application or other code that installs them. You cannot use this
+ *    function to make information available to another process.
+ *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.3
+ *  
+ *  Parameters:
+ *    
+ *    selector:
+ *      the selector to create
+ *    
+ *    replacementValue:
+ *      the new value to return for the new selector code.
+ *  
  *  Availability:
- *    Non-Carbon CFM:   in InterfaceLib 7.5 and later
+ *    Mac OS X:         in version 10.0 and later in CoreServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
- *    Mac OS X:         in version 10.0 and later
+ *    Non-Carbon CFM:   in InterfaceLib 7.5 and later
  }
 function ReplaceGestaltValue(selector: OSType; replacementValue: SInt32): OSErr; external name '_ReplaceGestaltValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
 {
  *  SetGestaltValue()
  *  
+ *  Summary:
+ *    Sets the value the function Gestalt will return for a specified
+ *    selector code, installing the selector if it was not already
+ *    installed.
+ *  
+ *  Discussion:
+ *    You use SetGestaltValue to establish a value for a selector,
+ *    without regard to whether the selector was already installed.
+ *     
+ *    In Mac OS X, the selector and replacement value are on a
+ *    per-context basis. That means they are available only to the
+ *    application or other code that installs them. You cannot use this
+ *    function to make information available to another process.
+ *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.3
+ *  
+ *  Parameters:
+ *    
+ *    selector:
+ *      the selector to create
+ *    
+ *    newValue:
+ *      the new value to return for the new selector code.
+ *  
  *  Availability:
- *    Non-Carbon CFM:   in InterfaceLib 7.5 and later
+ *    Mac OS X:         in version 10.0 and later in CoreServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
- *    Mac OS X:         in version 10.0 and later
+ *    Non-Carbon CFM:   in InterfaceLib 7.5 and later
  }
 function SetGestaltValue(selector: OSType; newValue: SInt32): OSErr; external name '_SetGestaltValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
 {
  *  DeleteGestaltValue()
  *  
+ *  Summary:
+ *    Deletes a Gestalt selector code so that it is no longer
+ *    recognized by Gestalt.
+ *  
+ *  Discussion:
+ *    After calling this function, subsequent query or replacement
+ *    calls for the selector code will fail as if the selector had
+ *    never been installed 
+ *    
+ *    In Mac OS X, the selector and replacement value are on a
+ *    per-context basis. That means they are available only to the
+ *    application or other code that installs them.
+ *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.3
+ *  
+ *  Parameters:
+ *    
+ *    selector:
+ *      the selector to delete
+ *  
  *  Availability:
- *    Non-Carbon CFM:   in InterfaceLib 7.5 and later
+ *    Mac OS X:         in version 10.0 and later in CoreServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
- *    Mac OS X:         in version 10.0 and later
+ *    Non-Carbon CFM:   in InterfaceLib 7.5 and later
  }
 function DeleteGestaltValue(selector: OSType): OSErr; external name '_DeleteGestaltValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
 const
 	uppSelectorFunctionProcInfo = $000003E0;
 	{
@@ -197,7 +462,9 @@ const
 	 *    CarbonLib:        in CarbonLib 1.0 and later
 	 *    Mac OS X:         in version 10.0 and later
 	 	}
-function NewSelectorFunctionUPP(userRoutine: SelectorFunctionProcPtr): SelectorFunctionUPP; external name '_NewSelectorFunctionUPP'; { old name was NewSelectorFunctionProc }
+function NewSelectorFunctionUPP(userRoutine: SelectorFunctionProcPtr): SelectorFunctionUPP; external name '_NewSelectorFunctionUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
 {
  *  DisposeSelectorFunctionUPP()
  *  
@@ -207,6 +474,8 @@ function NewSelectorFunctionUPP(userRoutine: SelectorFunctionProcPtr): SelectorF
  *    Mac OS X:         in version 10.0 and later
  }
 procedure DisposeSelectorFunctionUPP(userUPP: SelectorFunctionUPP); external name '_DisposeSelectorFunctionUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
 {
  *  InvokeSelectorFunctionUPP()
  *  
@@ -215,7 +484,9 @@ procedure DisposeSelectorFunctionUPP(userUPP: SelectorFunctionUPP); external nam
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function InvokeSelectorFunctionUPP(selector: OSType; var response: SInt32; userRoutine: SelectorFunctionUPP): OSErr; external name '_InvokeSelectorFunctionUPP'; { old name was CallSelectorFunctionProc }
+function InvokeSelectorFunctionUPP(selector: OSType; var response: SInt32; userRoutine: SelectorFunctionUPP): OSErr; external name '_InvokeSelectorFunctionUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
 { Environment Selectors }
 
 const
@@ -254,6 +525,8 @@ const
 	gestaltAliasMgrFollowsAliasesWhenResolving = 4;
 	gestaltAliasMgrSupportsExtendedCalls = 5;
 	gestaltAliasMgrSupportsFSCalls = 6;							{  true if Alias Mgr supports HFS+ Calls  }
+	gestaltAliasMgrPrefersPath = 7;                             {  True if the Alias Mgr prioritizes the path over file id during resolution by default }
+	gestaltAliasMgrRequiresAccessors = 8;                       {  Set if Alias Manager requires accessors for size and usertype }
 
 	{	 Gestalt selector and values for the Appearance Manager 	}
 	gestaltAppearanceAttr		= $61707072 (* 'appr' *);
@@ -313,7 +586,9 @@ const
 	gestaltMacOSCompatibilityBoxHasSerial = 1;					{  True if Classic serial support is implemented.  }
 	gestaltMacOSCompatibilityBoxless = 2;						{  True if we're Boxless (screen shared with Carbon/Cocoa)  }
 
-	gestaltBusClkSpeed			= $62636C6B (* 'bclk' *);						{  main I/O bus clock speed in hertz  }
+	gestaltBusClkSpeed			= $62636C6B (* 'bclk' *);		{  main I/O bus clock speed in hertz  }
+
+	gestaltBusClkSpeedMHz = $62636C6D (* 'bclm' *);             { main I/O bus clock speed in megahertz ( an unsigned long ) }
 
 	gestaltCloseViewAttr		= $42534461 (* 'BSDa' *);						{  CloseView attributes  }
 	gestaltCloseViewEnabled		= 0;							{  Closeview enabled (dynamic bit - returns current state)  }
@@ -327,6 +602,8 @@ const
 	gestaltCFM99Present			= 2;							{  True if the CFM-99 features are present.  }
 	gestaltCFM99PresentMask		= $0004;
 
+	gestaltProcessorCacheLineSize = $6373697A (* 'csiz' *);     { The size, in bytes, of the processor cache line. }
+
 	gestaltCollectionMgrVersion	= $636C746E (* 'cltn' *);						{  Collection Manager version  }
 
 	gestaltColorMatchingAttr	= $636D7461 (* 'cmta' *);						{  ColorSync attributes  }
@@ -416,15 +693,20 @@ const
 	gestaltCPUG4				= $010C;						{  Max  }
 	gestaltCPUG47450			= $0110;						{  Vger , Altivec  }
 
-{$ifc TARGET_OS_WIN32}
+	gestaltCPUApollo            = $0111;                        { Apollo , Altivec, G4 7455 }
+	gestaltCPUG47447            = $0112;
+	gestaltCPU750FX             = $0120;                        { Sahara,G3 like thing }
+	gestaltCPU970               = $0139;                        { G5 }
+	gestaltCPU970FX             = $013C;                        { another G5 }
+
 																{  x86 CPUs all start with 'i' in the high nybble  }
 	gestaltCPU486				= $69343836 (* 'i486' *);
 	gestaltCPUPentium			= $69353836 (* 'i586' *);
 	gestaltCPUPentiumPro		= $69357072 (* 'i5pr' *);
 	gestaltCPUPentiumII			= $69356969 (* 'i5ii' *);
 	gestaltCPUX86				= $69787878 (* 'ixxx' *);
+	gestaltCPUPentium4          = $69356976 (* 'i5iv' *);
 
-{$endc}  {TARGET_OS_WIN32}
 
 	gestaltCRMAttr				= $63726D20 (* 'crm ' *);						{  comm resource mgr attributes  }
 	gestaltCRMPresent			= 0;
@@ -433,6 +715,8 @@ const
 
 	gestaltControlStripVersion	= $63737672 (* 'csvr' *);						{  Control Strip version (was 'sdvr')  }
 
+	gestaltCountOfCPUs          = $63707573 (* 'cpus' *);       { the number of CPUs on the computer, Mac OS X 10.4 and later }
+
 	gestaltCTBVersion			= $63746276 (* 'ctbv' *);						{  CommToolbox version  }
 
 	gestaltDBAccessMgrAttr		= $64626163 (* 'dbac' *);						{  Database Access Mgr attributes  }
@@ -472,6 +756,7 @@ const
 	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  }
+	gestaltDisplayMgrSleepNotifies = 7;                         {  True if Display Mgr generates "displayWillSleep", "displayDidWake" notifications }
 
 	gestaltDragMgrAttr			= $64726167 (* 'drag' *);						{  Drag Manager attributes  }
 	gestaltDragMgrPresent		= 0;							{  Drag Manager is present  }
@@ -582,9 +867,14 @@ const
 	gestaltFSSupportsHFSPlusVols = 9;							{  file system supports HFS Plus volumes  }
 	gestaltFSIncompatibleDFA82	= 10;							{  VCB and FCB structures changed; DFA 8.2 is incompatible  }
 
+	gestaltFSSupportsDirectIO   = 11;                           {  file system supports DirectIO }
+
 	gestaltHasHFSPlusAPIs		= 12;							{  file system supports HFS Plus APIs  }
 	gestaltMustUseFCBAccessors	= 13;							{  FCBSPtr and FSFCBLen are invalid - must use FSM FCB accessor functions }
 	gestaltFSUsesPOSIXPathsForConversion = 14;					{  The path interchange routines operate on POSIX paths instead of HFS paths  }
+	gestaltFSSupportsExclusiveLocks = 15;                       {  File system uses POSIX O_EXLOCK for opens }
+	gestaltFSSupportsHardLinkDetection = 16;                    {  File system returns if an item is a hard link }
+	gestaltFSAllowsConcurrentAsyncIO = 17;                      {  File Manager supports concurrent async reads and writes }
 
 	gestaltAdminFeaturesFlagsAttr = $66726564 (* 'fred' *);						{  a set of admin flags, mostly useful internally.  }
 	gestaltFinderUsesSpecialOpenFoldersFile = 0;				{  the Finder uses a special file to store the list of open folders  }
@@ -666,6 +956,12 @@ const
 	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     }
+	gestaltPortableUSBANSIKbd   = 37;                           {  Powerbook USB-based internal keyboard, ANSI layout }
+	gestaltPortableUSBISOKbd    = 38;                           {  Powerbook USB-based internal keyboard, ISO layout }
+	gestaltPortableUSBJISKbd    = 39;                           {  Powerbook USB-based internal keyboard, JIS layout }
+	gestaltThirdPartyANSIKbd    = 40;                           {  Third party keyboard, ANSI layout.  Returned in Mac OS X Tiger and later. }
+	gestaltThirdPartyISOKbd     = 41;                           {  Third party keyboard, ISO layout. Returned in Mac OS X Tiger and later. }
+	gestaltThirdPartyJISKbd     = 42;                           {  Third party keyboard, JIS layout. Returned in Mac OS X Tiger and later. }
 	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       }
@@ -677,6 +973,16 @@ const
 	gestaltUSBAndyISOKbd		= 205;							{  (0xCD) USB Pro Keyboard International (ISO) Keyboard                                }
 	gestaltUSBAndyJISKbd		= 206;							{  (0xCE) USB Pro Keyboard Japanese (JIS) Keyboard                                     }
 
+	gestaltPortable2001ANSIKbd  = 202;                          {  (0xCA) PowerBook and iBook Domestic (ANSI) Keyboard with 2nd cmd key right & function key moves.     }
+	gestaltPortable2001ISOKbd   = 203;                          {  (0xCB) PowerBook and iBook International (ISO) Keyboard with 2nd cmd key right & function key moves.   }
+	gestaltPortable2001JISKbd   = 207;                          {  (0xCF) PowerBook and iBook Japanese (JIS) Keyboard with function key moves.                   }
+
+	gestaltUSBProF16ANSIKbd     = 34;                           {  (0x22) USB Pro Keyboard w/ F16 key Domestic (ANSI) Keyboard }
+	gestaltUSBProF16ISOKbd      = 35;                           {  (0x23) USB Pro Keyboard w/ F16 key International (ISO) Keyboard }
+	gestaltUSBProF16JISKbd      = 36;                           {  (0x24) USB Pro Keyboard w/ F16 key Japanese (JIS) Keyboard }
+	gestaltProF16ANSIKbd        = 31;                           {  (0x1F) Pro Keyboard w/F16 key Domestic (ANSI) Keyboard }
+	gestaltProF16ISOKbd         = 32;                           {  (0x20) Pro Keyboard w/F16 key International (ISO) Keyboard }
+	gestaltProF16JISKbd         = 33;                           {  (0x21) Pro Keyboard w/F16 key Japanese (JIS) Keyboard }
 
 	{
 	    This gestalt indicates the highest UDF version that the active UDF implementation supports.
@@ -953,12 +1259,16 @@ const
 	gestaltMenuMgrMultipleItemsWithCommandIDBit = 2;			{  CountMenuItemsWithCommandID/GetIndMenuItemWithCommandID support multiple items with the same command ID }
 	gestaltMenuMgrRetainsIconRefBit = 3;						{  SetMenuItemIconHandle, when passed an IconRef, calls AcquireIconRef }
 	gestaltMenuMgrSendsMenuBoundsToDefProcBit = 4;				{  kMenuSizeMsg and kMenuPopUpMsg have menu bounding rect information }
+	gestaltMenuMgrMoreThanFiveMenusDeepBit = 5;                 {  the Menu Manager supports hierarchical menus more than five deep}
+	gestaltMenuMgrCGImageMenuTitleBit = 6;                      {  SetMenuTitleIcon supports CGImageRefs}
 																{  masks for the above bits }
 	gestaltMenuMgrPresentMask	= $00000001;
 	gestaltMenuMgrAquaLayoutMask = $00000002;
 	gestaltMenuMgrMultipleItemsWithCommandIDMask = $00000004;
 	gestaltMenuMgrRetainsIconRefMask = $00000008;
 	gestaltMenuMgrSendsMenuBoundsToDefProcMask = $00000010;
+	gestaltMenuMgrMoreThanFiveMenusDeepMask = 1 shl gestaltMenuMgrMoreThanFiveMenusDeepBit;
+	gestaltMenuMgrCGImageMenuTitleMask = 1 shl gestaltMenuMgrCGImageMenuTitleBit;
 
 
 	gestaltMultipleUsersState	= $6D666472 (* 'mfdr' *);						{  Gestalt selector returns MultiUserGestaltHandle (in Folders.h) }
@@ -1007,6 +1317,9 @@ const
 	gestalt68040MMU				= 4;							{  68040 built-in MMU  }
 	gestaltEMMU1				= 5;							{  Emulated MMU type 1   }
 
+                                                                { On Mac OS X, the user visible machine name may something like "PowerMac3,4", which is}
+                                                                { a unique string for each signifigant Macintosh computer which Apple creates, but is}
+                                                                { not terribly useful as a user visible string.}
 	gestaltUserVisibleMachineName = $6D6E616D (* 'mnam' *);						{  Coerce response into a StringPtr to get a user visible machine name  }
 
 	gestaltMPCallableAPIsAttr	= $6D707363 (* 'mpsc' *);						{  Bitmap of toolbox/OS managers that can be called from MPLibrary MPTasks  }
@@ -1116,6 +1429,8 @@ const
 
 	gestaltProcClkSpeed			= $70636C6B (* 'pclk' *);						{  processor clock speed in hertz  }
 
+	gestaltProcClkSpeedMHz = $6D636C6B (* 'mclk' *); { processor clock speed in megahertz (an unsigned long) }
+
 	gestaltPCXAttr				= $70637867 (* 'pcxg' *);						{  PC Exchange attributes  }
 	gestaltPCXHas8and16BitFAT	= 0;							{  PC Exchange supports both 8 and 16 bit FATs  }
 	gestaltPCXHasProDOS			= 1;							{  PC Exchange supports ProDOS  }
@@ -1169,6 +1484,11 @@ const
 	gestaltPPCSupportsOutgoingAppleTalk = $0100;
 	gestaltPPCSupportsOutgoingTCP_IP = $0200;
 
+{
+    Programs which need to know information about particular features of the processor should
+    migrate to using sysctl() and sysctlbyname() to get this kind of information.  No new
+    information will be added to the 'ppcf' selector going forward.
+}
 	gestaltPowerPCProcessorFeatures = $70706366 (* 'ppcf' *);					{  Optional PowerPC processor features  }
 	gestaltPowerPCHasGraphicsInstructions = 0;					{  has fres, frsqrte, and fsel instructions  }
 	gestaltPowerPCHasSTFIWXInstruction = 1;						{  has stfiwx instruction  }
@@ -1176,6 +1496,10 @@ const
 	gestaltPowerPCHasDCBAInstruction = 3;						{  has dcba instruction  }
 	gestaltPowerPCHasVectorInstructions = 4;					{  has vector instructions  }
 	gestaltPowerPCHasDataStreams = 5;							{  has dst, dstt, dstst, dss, and dssall instructions  }
+	gestaltPowerPCHas64BitSupport = 6;                          {  double word LSU/ALU, etc. }
+	gestaltPowerPCHasDCBTStreams = 7;                           {  TH field of DCBT recognized }
+	gestaltPowerPCASArchitecture = 8;                           {  chip uses new 'A/S' architecture }
+	gestaltPowerPCIgnoresDCBST = 9;                             { }
 
 	gestaltProcessorType		= $70726F63 (* 'proc' *);						{  processor type  }
 	gestalt68000				= 1;
@@ -1209,7 +1533,7 @@ const
 	gestalt32BitQD12			= $0220;						{  32-bit color QDv1.2  }
 	gestalt32BitQD13			= $0230;						{  32-bit color QDv1.3  }
 	gestaltAllegroQD			= $0250;						{  Allegro QD OS 8.5  }
-	gestaltMacOSXQD				= $0300;						{  Mac OS X QD  }
+	gestaltMacOSXQD				= $0300;						{  0x310, 0x320 etc. for 10.x.y  }
 
 	gestaltQD3D					= $71643364 (* 'qd3d' *);						{  Quickdraw 3D attributes }
 	gestaltQD3DPresent			= 0;							{  bit 0 set if QD3D available }
@@ -1242,6 +1566,7 @@ const
 	gestaltOFA2available		= 3;							{  OFA2 available  }
 	gestaltCreatesAliasFontRsrc	= 4;							{  "real" datafork font support  }
 	gestaltNativeType1FontSupport = 5;							{  we have scaler for Type1 fonts  }
+	gestaltCanUseCGTextRendering = 6;
 
 
 	gestaltQuickTimeConferencingInfo = $71746369 (* 'qtci' *);					{  returns pointer to QuickTime Conferencing information  }
@@ -1256,6 +1581,15 @@ const
 
 	gestaltQuickTimeStreamingVersion = $71747374 (* 'qtst' *);
 
+	gestaltQuickTimeThreadSafeFeaturesAttr = $71747468 (* 'qtth' *); { Quicktime thread safety attributes }
+	gestaltQuickTimeThreadSafeICM = 0;
+	gestaltQuickTimeThreadSafeMovieToolbox = 1;
+	gestaltQuickTimeThreadSafeMovieImport = 2;
+	gestaltQuickTimeThreadSafeMovieExport = 3;
+	gestaltQuickTimeThreadSafeGraphicsImport = 4;
+	gestaltQuickTimeThreadSafeGraphicsExport = 5;
+	gestaltQuickTimeThreadSafeMoviePlayback = 6;
+
 	gestaltQTVRMgrAttr			= $71747672 (* 'qtvr' *);						{  QuickTime VR attributes                                }
 	gestaltQTVRMgrPresent		= 0;							{  QTVR API is present                                    }
 	gestaltQTVRObjMoviesPresent	= 1;							{  QTVR runtime knows about object movies                 }
@@ -1264,8 +1598,22 @@ const
 
 	gestaltQTVRMgrVers			= $71747676 (* 'qtvv' *);						{  QuickTime VR version                                   }
 
+{    
+    Because some PowerPC machines now support very large physical memory capacities, including
+    some above the maximum value which can held in a 32 bit quantity, there is now a new selector,
+    gestaltPhysicalRAMSizeInMegabytes, which returns the size of physical memory scaled
+    in megabytes.  It is recommended that code transition to using this new selector if
+    it wants to get a useful value for the amount of physical memory on the system.  Code can
+    also use the sysctl() and sysctlbyname() BSD calls to get these kinds of values.
+    
+    For compatability with code which assumed that the value in returned by the
+    gestaltPhysicalRAMSize selector would be a signed quantity of bytes, this selector will
+    now return 2 gigabytes-1 ( LONG_MAX ) if the system has 2 gigabytes of physical memory or more.
+}
 	gestaltPhysicalRAMSize		= $72616D20 (* 'ram ' *);						{  physical RAM size  }
 
+	gestaltPhysicalRAMSizeInMegabytes = $72616D6D (* 'ramm' *);                 { physical RAM size, scaled in megabytes }
+
 	gestaltRBVAddr				= $72627620 (* 'rbv ' *);						{  RBV base address   }
 
 	gestaltROMSize				= $726F6D20 (* 'rom ' *);						{  rom size  }
@@ -1389,10 +1737,33 @@ const
 	gestaltSysArchitecture		= $73797361 (* 'sysa' *);						{  Native System Architecture  }
 	gestalt68k					= 1;							{  Motorola MC68k architecture  }
 	gestaltPowerPC				= 2;							{  IBM PowerPC architecture  }
+	gestaltIntel                = 10;                           {  Intel x86 architecture }
 
 	gestaltSystemUpdateVersion	= $73797375 (* 'sysu' *);						{  System Update version  }
 
+{  
+    Returns the system version as a 32 bit packed BCD ( binary coded decimal )
+    version representation.  Bits 0 through 3 are the "bug fix" revision number.
+    Bits 4 through 7 are the minor revision, and bits 8 through 31 are the bcd
+    decimal digits of the major release version.
+    
+      Value:  0xMMMMMMRB = M.R.B            Example: 0x00001023 = 10.2.3
+                ^^^^^^     major rev                   ^^^^^^   major rev   = 10
+                      ^    minor rev                         ^  minor rev   =  2
+                       ^   bug fix rev                        ^ bug fix rev =  3
+    
+    If the values of the minor or bug fix revision are larger than 9, then
+    gestaltSystemVersion will substitute the value 9 for them.  For example,
+    Mac OS X 10.3.15 will be returned as 0x1039, and Mac OS X 10.10.5 will
+    return 0x1095.
+    
+    A better way to get version information on Mac OS X would be to read in the
+    system version information from the file /System/Library/CoreServices/SystemVersion.plist.
+}
 	gestaltSystemVersion		= $73797376 (* 'sysv' *);						{  system version }
+	gestaltSystemVersionMajor   = $73797331 (* 'sys1' *);                       {  The major system version number; in 10.4.17 this would be the decimal value 10 }
+	gestaltSystemVersionMinor   = $73797332 (* 'sys2' *);                       {  The minor system version number; in 10.4.17 this would be the decimal value 4 }
+	gestaltSystemVersionBugFix  = $73797333 (* 'sys3' *);                       {  The bug fix system version number; in 10.4.17 this would be the decimal value 17 }
 
 	gestaltToolboxTable			= $74627474 (* 'tbtt' *);						{   OS trap table base   }
 
@@ -1403,6 +1774,8 @@ const
 	gestaltTE4					= 4;							{  TextEdit in System 7.0  }
 	gestaltTE5					= 5;							{  TextWidthHook available in TextEdit  }
 
+	gestaltTE6                  = 6;                            { TextEdit with integrated TSMTE and improved UI }
+
 	gestaltTEAttr				= $74656174 (* 'teat' *);						{  TextEdit attributes  }
 	gestaltTEHasGetHiliteRgn	= 0;							{  TextEdit has TEGetHiliteRgn  }
 	gestaltTESupportsInlineInput = 1;							{  TextEdit does Inline Input  }
@@ -1457,7 +1830,9 @@ const
 
 	gestaltTSMgrVersion			= $74736D76 (* 'tsmv' *);						{  Text Services Mgr version, if present  }
 	gestaltTSMgr15				= $0150;
-	gestaltTSMgr20				= $0200;
+	gestaltTSMgr20				= $0200;                        { Version 2.0 as of MacOSX 10.0 }
+	gestaltTSMgr22              = $0220;                        { Version 2.2 as of MacOSX 10.3 }
+	gestaltTSMgr23              = $0230;                        { Version 2.3 as of MacOSX 10.4 }
 
 	gestaltTSMgrAttr			= $74736D61 (* 'tsma' *);						{  Text Services Mgr attributes, if present  }
 	gestaltTSMDisplayMgrAwareBit = 0;							{  TSM knows about display manager  }
@@ -1489,6 +1864,8 @@ const
 	gestaltATSUUpdate3			= $00040000;					{  ATSUI version 2.0  }
 	gestaltATSUUpdate4			= $00050000;					{  ATSUI version in Mac OS X - SoftwareUpdate 1-4 for Mac OS 10.0.1 - 10.0.4  }
 	gestaltATSUUpdate5			= $00060000;					{  ATSUI version 2.3 in MacOS 10.1  }
+	gestaltATSUUpdate6          = 7 shl 16;                     {  ATSUI version 2.4 in MacOS 10.2 }
+	gestaltATSUUpdate7          = 8 shl 16;                     {  ATSUI version 2.5 in MacOS 10.3 }
 
 	gestaltATSUFeatures			= $75697366 (* 'uisf' *);
 	gestaltATSUTrackingFeature	= $00000001;					{  feature introduced in ATSUI version 1.1  }
@@ -1502,6 +1879,20 @@ const
 	gestaltATSULowLevelOrigFeatures = $00000004;				{  first low-level features introduced in ATSUI version 2.0  }
 	gestaltATSUFallbacksObjFeatures = $00000008;				{  feature introduced - ATSUFontFallbacks objects introduced in ATSUI version 2.3  }
 	gestaltATSUIgnoreLeadingFeature = $00000008;				{  feature introduced - kATSLineIgnoreFontLeading LineLayoutOption introduced in ATSUI version 2.3  }
+	gestaltATSUByCharacterClusterFeature = $00000010;           {  ATSUCursorMovementTypes introduced in ATSUI version 2.4 }
+	gestaltATSUAscentDescentControlsFeature = $00000010;        {  attributes introduced in ATSUI version 2.4 }
+	gestaltATSUHighlightInactiveTextFeature = $00000010;        {  feature introduced in ATSUI version 2.4 }
+	gestaltATSUPositionToCursorFeature = $00000010;             {  features introduced in ATSUI version 2.4 }
+	gestaltATSUBatchBreakLinesFeature = $00000010;              {  feature introduced in ATSUI version 2.4 }
+	gestaltATSUTabSupportFeature = $00000010;                   {  features introduced in ATSUI version 2.4 }
+	gestaltATSUDirectAccess = $00000010;                        {  features introduced in ATSUI version 2.4 }
+	gestaltATSUDecimalTabFeature = $00000020;                   {  feature introduced in ATSUI version 2.5 }
+	gestaltATSUBiDiCursorPositionFeature = $00000020;           {  feature introduced in ATSUI version 2.5 }
+	gestaltATSUNearestCharLineBreakFeature = $00000020;         {  feature introduced in ATSUI version 2.5 }
+	gestaltATSUHighlightColorControlFeature = $00000020;        {  feature introduced in ATSUI version 2.5 }
+	gestaltATSUUnderlineOptionsStyleFeature = $00000020;        {  feature introduced in ATSUI version 2.5 }
+	gestaltATSUStrikeThroughStyleFeature = $00000020;           {  feature introduced in ATSUI version 2.5 }
+	gestaltATSUDropShadowStyleFeature = $00000020;              {  feature introduced in ATSUI version 2.5 }
 
 	gestaltUSBAttr				= $75736220 (* 'usb ' *);						{  USB Attributes  }
 	gestaltUSBPresent			= 0;							{  USB Support available  }
@@ -1549,6 +1940,7 @@ const
 	gestaltWindowMinimizeToDockBit = 5;							{  windows minimize to the dock and do not windowshade (Mac OS X) }
 	gestaltHasWindowShadowsBit	= 6;							{  windows have shadows }
 	gestaltSheetsAreWindowModalBit = 7;							{  sheet windows are modal only to their parent window }
+	gestaltFrontWindowMayBeHiddenBit = 8;                       {  FrontWindow and related APIs will return the front window even when the app is hidden}
 																{  masks for the above bits }
 	gestaltWindowMgrPresentMask	= $00000001;
 	gestaltExtendedWindowAttributesMask = $00000002;
@@ -1558,9 +1950,17 @@ const
 	gestaltWindowMinimizeToDockMask = $00000020;
 	gestaltHasWindowShadowsMask	= $00000040;
 	gestaltSheetsAreWindowModalMask = $00000080;
+	gestaltFrontWindowMayBeHiddenMask = 1 shl gestaltFrontWindowMayBeHiddenBit;
+
+	gestaltHasSingleWindowModeBit = 8;                          {  This system supports single window mode}
+	gestaltHasSingleWindowModeMask = 1 shl gestaltHasSingleWindowModeBit;
+
 
+{ gestaltX86Features is a convenience for 'cpuid' instruction.  Note
+   that even though the processor may support a specific feature, the
+   OS may not support all of these features.  These bitfields
+   correspond directly to the bits returned by cpuid }
 
-{$ifc TARGET_OS_WIN32}
 	gestaltX86Features			= $78383666 (* 'x86f' *);
 	gestaltX86HasFPU			= 0;							{  has an FPU that supports the 387 instructions }
 	gestaltX86HasVME			= 1;							{  supports Virtual-8086 Mode Extensions }
@@ -1581,10 +1981,36 @@ const
 																{  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;                           {  Processor Serial Number}
+	gestaltX86HasCLFSH          = 19;                           {  CLFLUSH Instruction supported}
+	gestaltX86Serviced20        = 20;                           {  do not count on this bit value}
+	gestaltX86HasDS             = 21;                           {  Debug Store}
+	gestaltX86ResACPI           = 22;                           {  Thermal Monitor, SW-controlled clock}
 	gestaltX86HasMMX			= 23;							{  supports MMX instructions }
 	gestaltX86HasFXSR			= 24;							{  Supports FXSAVE and FXRSTOR instructions (fast FP save/restore) }
+	gestaltX86HasSSE            = 25;                           {  Streaming SIMD extensions}
+	gestaltX86HasSSE2           = 26;                           {  Streaming SIMD extensions 2}
+	gestaltX86HasSS             = 27;                           {  Self-Snoop}
+	gestaltX86HasHTT            = 28;                           {  Hyper-Threading Technology}
+	gestaltX86HasTM             = 29;                           {  Thermal Monitor}
+
+{ 'cpuid' now returns a 64 bit value, and the following 
+    gestalt selector and field definitions apply
+    to the extended form of this instruction }
+
+	gestaltX86AdditionalFeatures = $78383661 (* 'x86a' *);
+	gestaltX86HasSSE3           = 0;                            {  Prescott New Inst.}
+	gestaltX86HasMONITOR        = 3;                            {  Monitor/mwait}
+	gestaltX86HasDSCPL          = 4;                            {  Debug Store CPL}
+	gestaltX86HasVMX            = 5;                            {  VMX}
+	gestaltX86HasSMX            = 6;                            {  SMX}
+	gestaltX86HasEST            = 7;                            {  Enhanced SpeedsTep (GV3)}
+	gestaltX86HasTM2            = 8;                            {  Thermal Monitor 2}
+	gestaltX86HasSupplementalSSE3 = 9;                          {  Supplemental SSE3 instructions}
+	gestaltX86HasCID            = 10;                           {  L1 Context ID}
+	gestaltX86HasCX16           = 13;                           {  CmpXchg16b instruction}
+	gestaltX86HasxTPR           = 14;                           {  Send Task PRiority msgs}
 
-{$endc}  {TARGET_OS_WIN32}
 
 	gestaltTranslationAttr		= $786C6174 (* 'xlat' *);						{  Translation Manager attributes  }
 	gestaltTranslationMgrExists	= 0;							{  True if translation manager exists  }

+ 398 - 0
packages/extra/univint/HIMovieView.pas

@@ -0,0 +1,398 @@
+{
+     File:       QuickTime/HIMovieView.h
+ 
+     Contains:   HIView-based movie playback
+ 
+     Version:    QuickTime 7.1.2
+ 
+     Copyright:  © 2004-2006 by Apple Computer, Inc., all rights reserved.
+ 
+}
+
+{	 Pascal Translation:  Gale R Paeper, <[email protected]>, 2006 }
+
+{
+    Modified for use with Free Pascal
+    Version 200
+    Please report any bugs to <[email protected]>
+}
+
+{$mode macpas}
+{$packenum 1}
+{$macro on}
+{$inline on}
+{$CALLING MWPASCAL}
+
+unit HIMovieView;
+interface
+{$setc UNIVERSAL_INTERFACES_VERSION := $0342}
+{$setc GAP_INTERFACES_VERSION := $0200}
+
+{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
+    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
+{$endc}
+
+{$ifc defined CPUPOWERPC and defined CPUI386}
+	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
+{$endc}
+{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
+	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
+{$endc}
+
+{$ifc not defined __ppc__ and defined CPUPOWERPC}
+	{$setc __ppc__ := 1}
+{$elsec}
+	{$setc __ppc__ := 0}
+{$endc}
+{$ifc not defined __i386__ and defined CPUI386}
+	{$setc __i386__ := 1}
+{$elsec}
+	{$setc __i386__ := 0}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
+	{$error Conflicting definitions for __ppc__ and __i386__}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__}
+	{$setc TARGET_CPU_PPC := TRUE}
+	{$setc TARGET_CPU_X86 := FALSE}
+{$elifc defined __i386__ and __i386__}
+	{$setc TARGET_CPU_PPC := FALSE}
+	{$setc TARGET_CPU_X86 := TRUE}
+{$elsec}
+	{$error Neither __ppc__ nor __i386__ is defined.}
+{$endc}
+{$setc TARGET_CPU_PPC_64 := FALSE}
+
+{$ifc defined FPC_BIG_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
+{$elifc defined FPC_LITTLE_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
+{$elsec}
+	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
+{$endc}
+{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
+{$setc CALL_NOT_IN_CARBON := FALSE}
+{$setc OLDROUTINENAMES := FALSE}
+{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
+{$setc OPAQUE_UPP_TYPES := TRUE}
+{$setc OTCARBONAPPLICATION := TRUE}
+{$setc OTKERNEL := FALSE}
+{$setc PM_USE_SESSION_APIS := TRUE}
+{$setc TARGET_API_MAC_CARBON := TRUE}
+{$setc TARGET_API_MAC_OS8 := FALSE}
+{$setc TARGET_API_MAC_OSX := TRUE}
+{$setc TARGET_CARBON := TRUE}
+{$setc TARGET_CPU_68K := FALSE}
+{$setc TARGET_CPU_MIPS := FALSE}
+{$setc TARGET_CPU_SPARC := FALSE}
+{$setc TARGET_OS_MAC := TRUE}
+{$setc TARGET_OS_UNIX := FALSE}
+{$setc TARGET_OS_WIN32 := FALSE}
+{$setc TARGET_RT_MAC_68881 := FALSE}
+{$setc TARGET_RT_MAC_CFM := FALSE}
+{$setc TARGET_RT_MAC_MACHO := TRUE}
+{$setc TYPED_FUNCTION_POINTERS := TRUE}
+{$setc TYPE_BOOL := FALSE}
+{$setc TYPE_EXTENDED := FALSE}
+{$setc TYPE_LONGLONG := TRUE}
+uses MacTypes, HIGeometry, HIView, Movies;
+{$ALIGN POWER}
+
+
+{
+ *  kHIMovieViewClassID
+ *  
+ *  Summary:
+ *    Class ID for HIMovieView
+ }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIMovieViewClassID CFSTRP('com.apple.quicktime.HIMovieView')}
+{$endc}
+
+{
+ *  Summary:
+ *    HIMovieView Event class
+ }
+const
+{
+   * Events related to movie views.
+   }
+	kEventClassMovieView = $6D6F6F76 (* 'moov' *);
+
+
+{
+ *  kEventClassMovieView / kEventMovieViewOptimalBoundsChanged
+ *  
+ *  Summary:
+ *    Sent when the movie size changes.
+ *  
+ *  Parameters:
+ *    
+ *    --> kEventParamDirectObject (in, typeControlRef)
+ *          The movie view whose size is changing.
+ *    
+ *    --> kEventParamControlOptimalBounds (in, typeHIRect)
+ *          The new optimal bounds.
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
+ *    CarbonLib:        not available
+ }
+const
+	kEventMovieViewOptimalBoundsChanged = 1;
+
+
+{
+ *  Summary:
+ *    HIMovieView attributes
+ }
+const
+{
+   * No attributes
+   }
+	kHIMovieViewNoAttributes = 0;
+
+  {
+   * Movie controller bar is visible below visual content
+   }
+	kHIMovieViewControllerVisibleAttribute = 1 shl 0;
+
+  {
+   * Automatically call MCIdle() at appropriate times
+   }
+	kHIMovieViewAutoIdlingAttribute = 1 shl 1;
+
+  {
+   * Accepts keyboard focus
+   }
+	kHIMovieViewAcceptsFocusAttribute = 1 shl 2;
+
+  {
+   * Movie editing enabled
+   }
+	kHIMovieViewEditableAttribute = 1 shl 3;
+
+  {
+   * Handles editing HI commands such as cut, copy and paste
+   }
+	kHIMovieViewHandleEditingHIAttribute = 1 shl 4;
+
+  {
+   * Combination of kHIMovieViewControllerVisibleAttribute,
+   * kHIMovieViewAutoIdlingAttribute, and
+   * kHIMovieViewAcceptsFocusAttribute
+   }
+	kHIMovieViewStandardAttributes = kHIMovieViewControllerVisibleAttribute or kHIMovieViewAutoIdlingAttribute or kHIMovieViewAcceptsFocusAttribute;
+
+{
+ *  HIMovieViewCreate()
+ *  
+ *  Summary:
+ *    Creates an HIMovieView object
+ *  
+ *  Discussion:
+ *    If successful, the created view will have a single retain count.
+ *  
+ *  Parameters:
+ *    
+ *    inMovie:
+ *      [in]  Initial movie to view, may be NULL
+ *    
+ *    inAttributes:
+ *      [in]  Initial HIMovieView attributes
+ *    
+ *    outMovieView:
+ *      [out] Points to variable to receive new HIMovieView
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+function HIMovieViewCreate( inMovie: Movie; inAttributes: OptionBits; var outMovieView: HIViewRef ): OSStatus; external name '_HIMovieViewCreate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ *  HIMovieViewGetMovie()
+ *  
+ *  Summary:
+ *    Returns the view's current movie.
+ *  
+ *  Parameters:
+ *    
+ *    inView:
+ *      [in]  The HIMovieView
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+function HIMovieViewGetMovie( inView: HIViewRef ): Movie; external name '_HIMovieViewGetMovie';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ *  HIMovieViewSetMovie()
+ *  
+ *  Summary:
+ *    Sets the view's current movie.
+ *  
+ *  Parameters:
+ *    
+ *    inView:
+ *      [in]  The HIMovieView
+ *    
+ *    inMovie:
+ *      [in]  The new movie to display
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+function HIMovieViewSetMovie( inView: HIViewRef; inMovie: Movie ): OSStatus; external name '_HIMovieViewSetMovie';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ *  HIMovieViewGetAttributes()
+ *  
+ *  Summary:
+ *    Returns the view's current attributes.
+ *  
+ *  Parameters:
+ *    
+ *    inView:
+ *      [in]  The HIMovieView
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+function HIMovieViewGetAttributes( inView: HIViewRef ): OptionBits; external name '_HIMovieViewGetAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ *  HIMovieViewChangeAttributes()
+ *  
+ *  Summary:
+ *    Changes the views attributes.
+ *  
+ *  Discussion:
+ *    Setting an attribute takes precedence over clearing the attribute.
+ *  
+ *  Parameters:
+ *    
+ *    inView:
+ *      [in]  The HIMovieView
+ *    
+ *    inAttributesToSet:
+ *      [in]  Attributes to set
+ *    
+ *    inAttributesToClear:
+ *      [in]  Attributes to clear
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+function HIMovieViewChangeAttributes( inView: HIViewRef; inAttributesToSet: OptionBits; inAttributesToClear: OptionBits ): OSStatus; external name '_HIMovieViewChangeAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ *  HIMovieViewGetMovieController()
+ *  
+ *  Summary:
+ *    Returns the view's current movie controller.
+ *  
+ *  Parameters:
+ *    
+ *    inView:
+ *      [in]  The HIMovieView
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+function HIMovieViewGetMovieController( inView: HIViewRef ): MovieController; external name '_HIMovieViewGetMovieController';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ *  HIMovieViewGetControllerBarSize()
+ *  
+ *  Summary:
+ *    Returns the size of the visible movie controller bar.
+ *  
+ *  Parameters:
+ *    
+ *    inView:
+ *      [in]  The HIMovieView
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+function HIMovieViewGetControllerBarSize( inView: HIViewRef ): HISize; external name '_HIMovieViewGetControllerBarSize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ *  HIMovieViewPlay()
+ *  
+ *  Summary:
+ *    Convenience routine to play the view's current movie.
+ *  
+ *  Discussion:
+ *    If the movie is already playing, this function does nothing.
+ *  
+ *  Parameters:
+ *    
+ *    movieView:
+ *      [in]  The movie view.
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+function HIMovieViewPlay( movieView: HIViewRef ): OSStatus; external name '_HIMovieViewPlay';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ *  HIMovieViewPause()
+ *  
+ *  Summary:
+ *    Convenience routine to pause the view's current movie.
+ *  
+ *  Discussion:
+ *    If the movie is already paused, this function does nothing.
+ *  
+ *  Parameters:
+ *    
+ *    movieView:
+ *      [in]  The movie view.
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+function HIMovieViewPause( movieView: HIViewRef ): OSStatus; external name '_HIMovieViewPause';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+end.

+ 12 - 12
packages/extra/univint/HTMLRendering.pas

@@ -141,7 +141,7 @@ const
 	 *    CarbonLib:        in CarbonLib 1.1 and later
 	 *    Mac OS X:         in version 10.0 and later
 	 	}
-function HRNewReference(var hrRef: HRReference; rendererType: OSType; grafPtr: GrafPtr): OSStatus; external name '_HRNewReference';
+function HRNewReference(var hrRef: HRReference; rendererType: OSType; grafPtr_: GrafPtr): OSStatus; external name '_HRNewReference';
 
 {
  *  HRNewReferenceInWindow()
@@ -213,7 +213,7 @@ procedure HRScreenConfigurationChanged; external name '_HRScreenConfigurationCha
  *    CarbonLib:        in CarbonLib 1.1 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function HRIsHREvent(const (*var*) eventRecord: EventRecord): boolean; external name '_HRIsHREvent';
+function HRIsHREvent(const (*var*) eventRecord_: EventRecord): boolean; external name '_HRIsHREvent';
 
 
 { Drawing }
@@ -225,7 +225,7 @@ function HRIsHREvent(const (*var*) eventRecord: EventRecord): boolean; external
  *    CarbonLib:        in CarbonLib 1.1 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function HRSetGrafPtr(hrRef: HRReference; grafPtr: GrafPtr): OSStatus; external name '_HRSetGrafPtr';
+function HRSetGrafPtr(hrRef: HRReference; grafPtr_: GrafPtr): OSStatus; external name '_HRSetGrafPtr';
 
 {
  *  HRSetWindowRef()
@@ -249,7 +249,7 @@ function HRSetGrafPtr(hrRef: HRReference; grafPtr: GrafPtr): OSStatus; external
  *    CarbonLib:        in CarbonLib 1.3 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function HRSetWindowRef(hrRef: HRReference; windowRef: WindowRef): OSStatus; external name '_HRSetWindowRef';
+function HRSetWindowRef(hrRef: HRReference; windowRef_: WindowRef): OSStatus; external name '_HRSetWindowRef';
 
 {
  *  HRSetEmbeddingControl()
@@ -275,7 +275,7 @@ function HRSetWindowRef(hrRef: HRReference; windowRef: WindowRef): OSStatus; ext
  *    CarbonLib:        in CarbonLib 1.3 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function HRSetEmbeddingControl(hrRef: HRReference; controlRef: ControlRef): OSStatus; external name '_HRSetEmbeddingControl';
+function HRSetEmbeddingControl(hrRef: HRReference; controlRef_: ControlRef): OSStatus; external name '_HRSetEmbeddingControl';
 
 {
  *  HRActivate()
@@ -471,7 +471,7 @@ function HRSetGrowboxCutout(hrRef: HRReference; allowCutout: boolean): OSStatus;
  *    CarbonLib:        in CarbonLib 1.1 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function HRGoToFile(hrRef: HRReference; const (*var*) fsspec: FSSpec; addToHistory: boolean; forceRefresh: boolean): OSStatus; external name '_HRGoToFile';
+function HRGoToFile(hrRef: HRReference; const (*var*) fsspec_: FSSpec; addToHistory: boolean; forceRefresh: boolean): OSStatus; external name '_HRGoToFile';
 
 {
  *  HRGoToURL()
@@ -673,7 +673,7 @@ function HRGetTitle(hrRef: HRReference; title: StringPtr): OSStatus; external na
  *    CarbonLib:        in CarbonLib 1.1 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function HRGetHTMLFile(hrRef: HRReference; var fsspec: FSSpec): OSStatus; external name '_HRGetHTMLFile';
+function HRGetHTMLFile(hrRef: HRReference; var fsspec_: FSSpec): OSStatus; external name '_HRGetHTMLFile';
 
 
 {
@@ -831,7 +831,7 @@ function HRUtilGetFSSpecFromURL(rootURL: ConstCStringPtr; linkURL: ConstCStringP
  *    CarbonLib:        in CarbonLib 1.1 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function HRUtilGetURLFromFSSpec(const (*var*) fsspec: FSSpec; urlHandle: Handle): OSStatus; external name '_HRUtilGetURLFromFSSpec';
+function HRUtilGetURLFromFSSpec(const (*var*) fsspec_: FSSpec; urlHandle: Handle): OSStatus; external name '_HRUtilGetURLFromFSSpec';
 
 
 {
@@ -1109,7 +1109,7 @@ const
 
 type
 {$ifc TYPED_FUNCTION_POINTERS}
-	HRURLToFSSpecProcPtr = function(rootURL: ConstCStringPtr; linkURL: ConstCStringPtr; var fsspec: FSSpec; urlSourceType: URLSourceType; refCon: UnivPtr): OSStatus;
+	HRURLToFSSpecProcPtr = function(rootURL: ConstCStringPtr; linkURL: ConstCStringPtr; var fsspec_: FSSpec; urlSourceType_: URLSourceType; refCon: UnivPtr): OSStatus;
 {$elsec}
 	HRURLToFSSpecProcPtr = ProcPtr;
 {$endc}
@@ -1148,7 +1148,7 @@ procedure HRUnregisterURLToFSSpecUPP(hrRef: HRReference); external name '_HRUnre
 
 type
 {$ifc TYPED_FUNCTION_POINTERS}
-	HRURLToFSRefProcPtr = function(rootString: CFStringRef; linkString: CFStringRef; var fref: FSRef; urlSourceType: URLSourceType; refCon: UnivPtr): OSStatus;
+	HRURLToFSRefProcPtr = function(rootString: CFStringRef; linkString: CFStringRef; var fref: FSRef; urlSourceType_: URLSourceType; refCon: UnivPtr): OSStatus;
 {$elsec}
 	HRURLToFSRefProcPtr = ProcPtr;
 {$endc}
@@ -1338,7 +1338,7 @@ function InvokeHRNewCFURLUPP(url: CFURLRef; targetString: CFStringRef; addToHist
  *    CarbonLib:        in CarbonLib 1.1 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function InvokeHRURLToFSSpecUPP(rootURL: ConstCStringPtr; linkURL: ConstCStringPtr; var fsspec: FSSpec; urlSourceType: URLSourceType; refCon: UnivPtr; userRoutine: HRURLToFSSpecUPP): OSStatus; external name '_InvokeHRURLToFSSpecUPP'; { old name was CallHRURLToFSSpecProc }
+function InvokeHRURLToFSSpecUPP(rootURL: ConstCStringPtr; linkURL: ConstCStringPtr; var fsspec_: FSSpec; urlSourceType_: URLSourceType; refCon: UnivPtr; userRoutine: HRURLToFSSpecUPP): OSStatus; external name '_InvokeHRURLToFSSpecUPP'; { old name was CallHRURLToFSSpecProc }
 {
  *  InvokeHRURLToFSRefUPP()
  *  
@@ -1347,7 +1347,7 @@ function InvokeHRURLToFSSpecUPP(rootURL: ConstCStringPtr; linkURL: ConstCStringP
  *    CarbonLib:        in CarbonLib 1.3 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function InvokeHRURLToFSRefUPP(rootString: CFStringRef; linkString: CFStringRef; var fref: FSRef; urlSourceType: URLSourceType; refCon: UnivPtr; userRoutine: HRURLToFSRefUPP): OSStatus; external name '_InvokeHRURLToFSRefUPP';
+function InvokeHRURLToFSRefUPP(rootString: CFStringRef; linkString: CFStringRef; var fref: FSRef; urlSourceType_: URLSourceType; refCon: UnivPtr; userRoutine: HRURLToFSRefUPP): OSStatus; external name '_InvokeHRURLToFSRefUPP';
 {$ALIGN MAC68K}
 
 

+ 168 - 0
packages/extra/univint/HostTime.pas

@@ -0,0 +1,168 @@
+{==================================================================================================
+     File:       CoreAudio/HostTime.h
+
+     Contains:   Routines for accessing the host's time base
+
+     Version:    Technology: Mac OS X
+                 Release:    Mac OS X
+
+     Copyright:  (c) 1985-2005 by Apple Computer, Inc., all rights reserved.
+
+==================================================================================================}
+
+{	 Pascal Translation:  Gale R Paeper, <[email protected]>, 2006 }
+
+{
+    Modified for use with Free Pascal
+    Version 200
+    Please report any bugs to <[email protected]>
+}
+
+{$mode macpas}
+{$packenum 1}
+{$macro on}
+{$inline on}
+{$CALLING MWPASCAL}
+
+unit HostTime;
+interface
+{$setc UNIVERSAL_INTERFACES_VERSION := $0342}
+{$setc GAP_INTERFACES_VERSION := $0200}
+
+{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
+    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
+{$endc}
+
+{$ifc defined CPUPOWERPC and defined CPUI386}
+	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
+{$endc}
+{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
+	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
+{$endc}
+
+{$ifc not defined __ppc__ and defined CPUPOWERPC}
+	{$setc __ppc__ := 1}
+{$elsec}
+	{$setc __ppc__ := 0}
+{$endc}
+{$ifc not defined __i386__ and defined CPUI386}
+	{$setc __i386__ := 1}
+{$elsec}
+	{$setc __i386__ := 0}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
+	{$error Conflicting definitions for __ppc__ and __i386__}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__}
+	{$setc TARGET_CPU_PPC := TRUE}
+	{$setc TARGET_CPU_X86 := FALSE}
+{$elifc defined __i386__ and __i386__}
+	{$setc TARGET_CPU_PPC := FALSE}
+	{$setc TARGET_CPU_X86 := TRUE}
+{$elsec}
+	{$error Neither __ppc__ nor __i386__ is defined.}
+{$endc}
+{$setc TARGET_CPU_PPC_64 := FALSE}
+
+{$ifc defined FPC_BIG_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
+{$elifc defined FPC_LITTLE_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
+{$elsec}
+	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
+{$endc}
+{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
+{$setc CALL_NOT_IN_CARBON := FALSE}
+{$setc OLDROUTINENAMES := FALSE}
+{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
+{$setc OPAQUE_UPP_TYPES := TRUE}
+{$setc OTCARBONAPPLICATION := TRUE}
+{$setc OTKERNEL := FALSE}
+{$setc PM_USE_SESSION_APIS := TRUE}
+{$setc TARGET_API_MAC_CARBON := TRUE}
+{$setc TARGET_API_MAC_OS8 := FALSE}
+{$setc TARGET_API_MAC_OSX := TRUE}
+{$setc TARGET_CARBON := TRUE}
+{$setc TARGET_CPU_68K := FALSE}
+{$setc TARGET_CPU_MIPS := FALSE}
+{$setc TARGET_CPU_SPARC := FALSE}
+{$setc TARGET_OS_MAC := TRUE}
+{$setc TARGET_OS_UNIX := FALSE}
+{$setc TARGET_OS_WIN32 := FALSE}
+{$setc TARGET_RT_MAC_68881 := FALSE}
+{$setc TARGET_RT_MAC_CFM := FALSE}
+{$setc TARGET_RT_MAC_MACHO := TRUE}
+{$setc TYPED_FUNCTION_POINTERS := TRUE}
+{$setc TYPE_BOOL := FALSE}
+{$setc TYPE_EXTENDED := FALSE}
+{$setc TYPE_LONGLONG := TRUE}
+uses MacTypes,CoreAudioTypes;
+{$ALIGN POWER}
+
+
+//==================================================================================================
+//#pragma mark    Theory of Operation
+
+{!
+    @header HostTime
+    This collection of functions provides access to the host's time base. It also provides
+    discriptive information about the time base and translations to and from nanoseconds.
+}
+
+
+{!
+    @functiongroup  HostTime
+}
+
+{!
+    @function       AudioGetCurrentHostTime
+    @abstract       Gets the current host time.
+    @result         A UInt64 containing the current host time.
+}
+function AudioGetCurrentHostTime: UInt64; external name '_AudioGetCurrentHostTime';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+    @function       AudioGetHostClockFrequency
+    @abstract       Gets the number of ticks per second in the host time base.
+    @result         A Float64 containing the number of ticks per second in the host time base.
+}
+function AudioGetHostClockFrequency: Float64; external name '_AudioGetHostClockFrequency';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+    @function       AudioGetHostClockMinimumTimeDelta
+    @abstract       Gets the smallest number of ticks that two succeeding values will ever differ.
+                    by.
+    @result         A UInt32 containing the smallest number of ticks that two succeeding values will
+                    ever differ.
+}
+function AudioGetHostClockMinimumTimeDelta: UInt32; external name '_AudioGetHostClockMinimumTimeDelta';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+    @function       AudioConvertHostTimeToNanos
+    @abstract       Convert the given host time into a time in nanoseconds.
+    @param          inHostTime
+                        A UInt64 containing the host time to convert.
+    @result         A UInt64 containining the converted host time.
+}
+function AudioConvertHostTimeToNanos( inHostTime: UInt64 ): UInt64; external name '_AudioConvertHostTimeToNanos';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+    @function       AudioConvertNanosToHostTime
+    @abstract       Convert the given nanosecond time into a host time.
+    @param          inNanos
+                        A UInt64 containing the nanosecond time to convert.
+    @result         A UInt64 containining the converted nanosecond time.
+}
+function AudioConvertNanosToHostTime( inNanos: UInt64 ): UInt64; external name '_AudioConvertNanosToHostTime';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+end.

+ 60 - 11
packages/extra/univint/Icons.pas

@@ -15,6 +15,7 @@
  
 }
 
+{    Pascal Translation Updated:  Gale R Paeper, <[email protected]>, 2006 }
 
 {
     Modified for use with Free Pascal
@@ -195,6 +196,7 @@ const
 
 	{	 The following icon types can only be used as an icon element 	}
 	{	 inside a 'icns' icon family 	}
+    kIconServices256PixelDataARGB = $69633038 (* 'ic08' *);
 	kThumbnail32BitData			= $69743332 (* 'it32' *);
 	kThumbnail8BitMask			= $74386D6B (* 't8mk' *);
 
@@ -1771,7 +1773,7 @@ function PtInIconRef(const (*var*) testPt: Point; const (*var*) iconRect: Rect;
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function RectInIconRef(const (*var*) testRect: Rect; const (*var*) iconRect: Rect; align: IconAlignmentType; iconServicesUsageFlags: IconServicesUsageFlags; theIconRef: IconRef): boolean; external name '_RectInIconRef';
+function RectInIconRef(const (*var*) testRect: Rect; const (*var*) iconRect: Rect; align: IconAlignmentType; iconServicesUsageFlags_: IconServicesUsageFlags; theIconRef: IconRef): boolean; external name '_RectInIconRef';
 {
    IconRefToRgn
    
@@ -1788,7 +1790,7 @@ function RectInIconRef(const (*var*) testRect: Rect; const (*var*) iconRect: Rec
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function IconRefToRgn(theRgn: RgnHandle; const (*var*) iconRect: Rect; align: IconAlignmentType; iconServicesUsageFlags: IconServicesUsageFlags; theIconRef: IconRef): OSErr; external name '_IconRefToRgn';
+function IconRefToRgn(theRgn: RgnHandle; const (*var*) iconRect: Rect; align: IconAlignmentType; iconServicesUsageFlags_: IconServicesUsageFlags; theIconRef: IconRef): OSErr; external name '_IconRefToRgn';
 {
    GetIconSizesFromIconRef
    
@@ -1804,17 +1806,54 @@ function IconRefToRgn(theRgn: RgnHandle; const (*var*) iconRect: Rect; align: Ic
    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.
+   
+   This call is deprecated. Please use IsDataAvailableInIconRef() instead.
 }
 
 {
- *  GetIconSizesFromIconRef()
+ *  GetIconSizesFromIconRef()   *** DEPRECATED ***
+ *  
+ *  Mac OS X threading:
+ *    Not thread safe
  *  
  *  Availability:
  *    Non-Carbon CFM:   in IconServicesLib 8.5 and later
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function GetIconSizesFromIconRef(iconSelectorInput: IconSelectorValue; var iconSelectorOutputPtr: IconSelectorValue; iconServicesUsageFlags: IconServicesUsageFlags; theIconRef: IconRef): OSErr; external name '_GetIconSizesFromIconRef';
+function GetIconSizesFromIconRef(iconSelectorInput: IconSelectorValue; var iconSelectorOutputPtr: IconSelectorValue; iconServicesUsageFlags_: IconServicesUsageFlags; theIconRef: IconRef): OSErr; external name '_GetIconSizesFromIconRef';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+{ IsDataAvailableInIconRef}
+{
+ *  IsDataAvailableInIconRef()
+ *  
+ *  Summary:
+ *    Check if IconRef has specific data.
+ *  
+ *  Discussion:
+ *    This routine returns true if inIconKind icon data is availabe or
+ *    can be created.
+ *  
+ *  Mac OS X threading:
+ *    Not thread safe
+ *  
+ *  Parameters:
+ *    
+ *    inIconKind:
+ *      The icon data kind
+ *    
+ *    inIconRef:
+ *      The IconRef to test.
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
+ *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ *    Non-Carbon CFM:   not available
+ }
+function IsDataAvailableInIconRef( inIconKind: OSType; inIconRef: IconRef ): Boolean; external name '_IsDataAvailableInIconRef';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
 {
   ==============================================================================
    Flushing IconRef data
@@ -1831,14 +1870,19 @@ function GetIconSizesFromIconRef(iconSelectorInput: IconSelectorValue; var iconS
 }
 
 {
- *  FlushIconRefs()
+ *  FlushIconRefs()   *** DEPRECATED ***
+ *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
  *  
  *  Availability:
- *    Non-Carbon CFM:   in IconServicesLib 8.5 and later
+ *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework but deprecated in 10.3
  *    CarbonLib:        in CarbonLib 1.0 and later
- *    Mac OS X:         in version 10.0 and later
+ *    Non-Carbon CFM:   in IconServicesLib 8.5 and later
  }
 function FlushIconRefs(creator: OSType; iconType: OSType): OSErr; external name '_FlushIconRefs';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
 {
    FlushIconRefsByVolume
    
@@ -1848,14 +1892,19 @@ function FlushIconRefs(creator: OSType; iconType: OSType): OSErr; external name
 }
 
 {
- *  FlushIconRefsByVolume()
+ *  FlushIconRefsByVolume()   *** DEPRECATED ***
+ *  
+ *  Mac OS X threading:
+ *    Thread safe since version 10.2
  *  
  *  Availability:
- *    Non-Carbon CFM:   in IconServicesLib 8.5 and later
+ *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework but deprecated in 10.3
  *    CarbonLib:        in CarbonLib 1.0 and later
- *    Mac OS X:         in version 10.0 and later
+ *    Non-Carbon CFM:   in IconServicesLib 8.5 and later
  }
 function FlushIconRefsByVolume(vRefNum: SInt16): OSErr; external name '_FlushIconRefsByVolume';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
 {
   ==============================================================================
    Controling custom icons
@@ -1906,7 +1955,7 @@ function GetCustomIconsEnabled(vRefNum: SInt16; var customIconsEnabled: boolean)
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function IsIconRefMaskEmpty(iconRef: IconRef): boolean; external name '_IsIconRefMaskEmpty';
+function IsIconRefMaskEmpty(iconRef_: IconRef): boolean; external name '_IsIconRefMaskEmpty';
 {
    GetIconRefVariant
    Icon variants allows different images to be used with different icon state.

+ 19 - 2
packages/extra/univint/MacOS.pas

@@ -35,16 +35,22 @@ uses
   ATSUnicodeObjects,
   ATSUnicodeTypes,
   AVLTree,
-  AXConstants,
+  AXActionConstants,
+  AXAttributeConstants,
   AXErrors,
+  AXNotificationConstants,
+  AXRoleConstants,
+  AXTextAttributedString,
   AXUIElement,
   AXValue,
+  AXValueConstants,
   Aliases,
   Appearance,
   AppleDiskPartitions,
   AppleEvents,
   AppleHelp,
   AppleScript,
+  AudioHardware,
   AuthSession,
   Authorization,
   AuthorizationDB,
@@ -114,6 +120,9 @@ uses
   CGGLContext,
   CGGeometry,
   CGImage,
+  CGImageDestination,
+  CGImageProperties,
+  CGImageSource,
   CGLayer,
   CGPDFArray,
   CGPDFContentStream,
@@ -150,6 +159,7 @@ uses
   ConditionalMacros,
   ControlDefinitions,
   Controls,
+  CoreAudioTypes,
   CoreFoundation,
   CoreGraphics,
   DHCPClientPreferences,
@@ -173,6 +183,7 @@ uses
   FinderRegistry,
   FixMath,
   Folders,
+  FontPanel,
   FontSync,
   Fonts,
   GXTypes,
@@ -180,6 +191,7 @@ uses
   HFSVolumes,
   HIArchive,
   HIGeometry,
+  HIMovieView,
   HIObject,
   HIObjectCore,
   HIShape,
@@ -189,6 +201,7 @@ uses
   HIToolbox,
   HIView,
   HTMLRendering,
+  HostTime,
   IBCarbonRuntime,
   ICAApplication,
   ICACamera,
@@ -293,18 +306,22 @@ uses
   ToolUtils,
   Translation,
   TranslationExtensions,
+  TranslationServices,
   TypeSelect,
   URLAccess,
   USB,
   UTCUtils,
+  UTCoreTypes,
   UTType,
   UnicodeConverter,
   UnicodeUtilities,
+  UniversalAccess,
   Video,
   WorldScript,
   fenv,
   fp,
   vBLAS,
-  vDSP;
+  vDSP,
+  xattr;
 
 end.

+ 9 - 0
packages/extra/univint/MacTypes.pas

@@ -271,6 +271,15 @@ type
 		y: Float32;
 	end;
 
+{*******************************************************************************
+	Unix compatibility types        
+********************************************************************************}
+type
+	size_t = UInt32;
+	size_t_ptr = ^size_t;
+	ssize_t = SInt32;
+	ssize_t_ptr = ^ssize_t;
+
 {*******************************************************************************
 
     MacOS Memory Manager types

+ 12 - 12
packages/extra/univint/MacWindows.pas

@@ -1526,7 +1526,7 @@ procedure DisposeWindow( window: WindowRef ); external name '_DisposeWindow';
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
  }
-function CreateNewWindow( windowClass: WindowClass; attributes: WindowAttributes; const (*var*) contentBounds: Rect; var outWindow: WindowRef ): OSStatus; external name '_CreateNewWindow';
+function CreateNewWindow( windowClass_: WindowClass; attributes: WindowAttributes; const (*var*) contentBounds: Rect; var outWindow: WindowRef ): OSStatus; external name '_CreateNewWindow';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
 
@@ -1560,7 +1560,7 @@ function CreateWindowFromResource( resID: SInt16; var outWindow: WindowRef ): OS
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
  }
-function StoreWindowIntoCollection( window: WindowRef; collection: Collection ): OSStatus; external name '_StoreWindowIntoCollection';
+function StoreWindowIntoCollection( window: WindowRef; collection_: Collection ): OSStatus; external name '_StoreWindowIntoCollection';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
 
@@ -1575,7 +1575,7 @@ function StoreWindowIntoCollection( window: WindowRef; collection: Collection ):
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
  }
-function CreateWindowFromCollection( collection: Collection; var outWindow: WindowRef ): OSStatus; external name '_CreateWindowFromCollection';
+function CreateWindowFromCollection( collection_: Collection; var outWindow: WindowRef ): OSStatus; external name '_CreateWindowFromCollection';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
 
@@ -1711,7 +1711,7 @@ function ReleaseWindow( inWindow: WindowRef ): OSStatus; external name '_Release
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Non-Carbon CFM:   not available
  }
-function CreateCustomWindow( const (*var*) def: WindowDefSpec; windowClass: WindowClass; attributes: WindowAttributes; const (*var*) contentBounds: Rect; var outWindow: WindowRef ): OSStatus; external name '_CreateCustomWindow';
+function CreateCustomWindow( const (*var*) def: WindowDefSpec; windowClass_: WindowClass; attributes: WindowAttributes; const (*var*) contentBounds: Rect; var outWindow: WindowRef ): OSStatus; external name '_CreateCustomWindow';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
 
@@ -2531,7 +2531,7 @@ function GetWindowGroupRetainCount( inGroup: WindowGroupRef ): ItemCount; extern
  *    CarbonLib:        in CarbonLib 1.4 and later
  *    Non-Carbon CFM:   not available
  }
-function GetWindowGroupOfClass( windowClass: WindowClass ): WindowGroupRef; external name '_GetWindowGroupOfClass';
+function GetWindowGroupOfClass( windowClass_: WindowClass ): WindowGroupRef; external name '_GetWindowGroupOfClass';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
 
@@ -8158,7 +8158,7 @@ function HIWindowGetScaleMode( inWindow: HIWindowRef; var outMode: HIWindowScale
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
  }
-function GetWindowProperty( window: WindowRef; propertyCreator: PropertyCreator; propertyTag: PropertyTag; bufferSize: UInt32; actualSize: UInt32Ptr { can be NULL }; propertyBuffer: UnivPtr ): OSStatus; external name '_GetWindowProperty';
+function GetWindowProperty( window: WindowRef; propertyCreator_: PropertyCreator; propertyTag_: PropertyTag; bufferSize: UInt32; actualSize: UInt32Ptr { can be NULL }; propertyBuffer: UnivPtr ): OSStatus; external name '_GetWindowProperty';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
 
@@ -8188,7 +8188,7 @@ function GetWindowPropertySize( window: WindowRef; creator: PropertyCreator; tag
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
  }
-function SetWindowProperty( window: WindowRef; propertyCreator: PropertyCreator; propertyTag: PropertyTag; propertySize: UInt32; propertyBuffer: {const} UnivPtr ): OSStatus; external name '_SetWindowProperty';
+function SetWindowProperty( window: WindowRef; propertyCreator_: PropertyCreator; propertyTag_: PropertyTag; propertySize: UInt32; propertyBuffer: {const} UnivPtr ): OSStatus; external name '_SetWindowProperty';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
 
@@ -8203,7 +8203,7 @@ function SetWindowProperty( window: WindowRef; propertyCreator: PropertyCreator;
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
  }
-function RemoveWindowProperty( window: WindowRef; propertyCreator: PropertyCreator; propertyTag: PropertyTag ): OSStatus; external name '_RemoveWindowProperty';
+function RemoveWindowProperty( window: WindowRef; propertyCreator_: PropertyCreator; propertyTag_: PropertyTag ): OSStatus; external name '_RemoveWindowProperty';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
 
@@ -8655,7 +8655,7 @@ function GetPreviousWindow( inWindow: WindowRef ): WindowRef; external name '_Ge
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0 and later or as macro/inline
  }
-function GetWindowStandardState( window: WindowRef; var rect: Rect ): RectPtr; external name '_GetWindowStandardState';
+function GetWindowStandardState( window: WindowRef; var rect_: Rect ): RectPtr; external name '_GetWindowStandardState';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
 
@@ -8670,7 +8670,7 @@ function GetWindowStandardState( window: WindowRef; var rect: Rect ): RectPtr; e
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0 and later or as macro/inline
  }
-function GetWindowUserState( window: WindowRef; var rect: Rect ): RectPtr; external name '_GetWindowUserState';
+function GetWindowUserState( window: WindowRef; var rect_: Rect ): RectPtr; external name '_GetWindowUserState';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
 
@@ -8700,7 +8700,7 @@ procedure SetWindowKind( window: WindowRef; kind: SInt16 ); external name '_SetW
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0 and later or as macro/inline
  }
-procedure SetWindowStandardState( window: WindowRef; const (*var*) rect: Rect ); external name '_SetWindowStandardState';
+procedure SetWindowStandardState( window: WindowRef; const (*var*) rect_: Rect ); external name '_SetWindowStandardState';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
 
@@ -8715,7 +8715,7 @@ procedure SetWindowStandardState( window: WindowRef; const (*var*) rect: Rect );
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0 and later or as macro/inline
  }
-procedure SetWindowUserState( window: WindowRef; const (*var*) rect: Rect ); external name '_SetWindowUserState';
+procedure SetWindowUserState( window: WindowRef; const (*var*) rect_: Rect ); external name '_SetWindowUserState';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
 

文件差异内容过多而无法显示
+ 1 - 1
packages/extra/univint/Makefile


+ 8 - 2
packages/extra/univint/Makefile.fpc

@@ -75,7 +75,13 @@ implicitunits=ABActions ABAddressBook ABGlobals ABPeoplePicker ABTypedefs \
   TextUtils Threads Timer ToolUtils Translation \
   TranslationExtensions TypeSelect URLAccess USB UTCUtils \
   UTType UnicodeConverter UnicodeUtilities Video WorldScript \
-  fenv fp vBLAS vDSP
+  fenv fp vBLAS vDSP \
+  UTCoreTypes.pas xattr.pas FontPanel.pas CoreAudioTypes.pas \
+  AXNotificationConstants.pas AudioHardware.pas AXRoleConstants.pas \
+  TranslationServices.pas AXActionConstants.pas HIMovieView.pas \
+  CGImageDestination.pas AXValueConstants.pas AXAttributeConstants.pas \
+  AXTextAttributedString.pas CGImageProperties.pas CGImageSource.pas \
+  UniversalAccess.pas HostTime.pas
 
 [libs]
 libversion=2.0.0
@@ -91,4 +97,4 @@ fpcdir=../../..
 
 [rules]
 FPCMacOSAll$(PPUEXT): $(filter-out MacOS.pas GPCStrings.pas,$(wildcard *.pas))
-MacOS$(PPUEXT): $(filter-out MacOS.pas GPCStrings.pas,$(wildcard *.pas))
+MacOS$(PPUEXT): $(filter-out FPCMacOSAll.pas GPCStrings.pas,$(wildcard *.pas))

+ 10 - 10
packages/extra/univint/Menus.pas

@@ -1521,7 +1521,7 @@ type
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  }
-function NewMenu( menuID: MenuID; const (*var*) menuTitle: Str255 ): MenuRef; external name '_NewMenu';
+function NewMenu( menuID_: MenuID; const (*var*) menuTitle: Str255 ): MenuRef; external name '_NewMenu';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
 
@@ -2935,7 +2935,7 @@ function IsMenuBarInvalid( rootMenu: MenuRef ): Boolean; external name '_IsMenuB
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  }
-procedure HiliteMenu( menuID: MenuID ); external name '_HiliteMenu';
+procedure HiliteMenu( menuID_: MenuID ); external name '_HiliteMenu';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
 
@@ -3059,9 +3059,9 @@ function DisposeMenuBar( inMbar: MenuBarHandle ): OSStatus; external name '_Disp
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  }
-function GetMenuHandle( menuID: MenuID ): MenuRef; external name '_GetMenuHandle';
+function GetMenuHandle( menuID_: MenuID ): MenuRef; external name '_GetMenuHandle';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
-function GetMenuRef( menuID: MenuID ): MenuRef; external name '_GetMenuHandle';
+function GetMenuRef( menuID_: MenuID ): MenuRef; external name '_GetMenuHandle';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
 
@@ -3093,9 +3093,9 @@ procedure MacInsertMenu( theMenu: MenuRef; beforeID: MenuID ); external name '_I
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  }
-procedure DeleteMenu( menuID: MenuID ); external name '_DeleteMenu';
+procedure DeleteMenu( menuID_: MenuID ); external name '_DeleteMenu';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
-procedure MacDeleteMenu( menuID: MenuID ); external name '_DeleteMenu';
+procedure MacDeleteMenu( menuID_: MenuID ); external name '_DeleteMenu';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
 
@@ -3153,7 +3153,7 @@ procedure SetMenuFlashCount( count: SInt16 ); external name '_SetMenuFlashCount'
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  }
-procedure FlashMenuBar( menuID: MenuID ); external name '_FlashMenuBar';
+procedure FlashMenuBar( menuID_: MenuID ); external name '_FlashMenuBar';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
 
@@ -4208,7 +4208,7 @@ function SetMenuItemCommandKey( inMenu: MenuRef; inItem: MenuItemIndex; inSetVir
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  }
-procedure DeleteMCEntries( menuID: MenuID; menuItem: SInt16 ); external name '_DeleteMCEntries';
+procedure DeleteMCEntries( menuID_: MenuID; menuItem: SInt16 ); external name '_DeleteMCEntries';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
 
@@ -4268,7 +4268,7 @@ procedure DisposeMCInfo( menuCTbl: MCTableHandle ); external name '_DisposeMCInf
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
  }
-function GetMCEntry( menuID: MenuID; menuItem: SInt16 ): MCEntryPtr; external name '_GetMCEntry';
+function GetMCEntry( menuID_: MenuID; menuItem: SInt16 ): MCEntryPtr; external name '_GetMCEntry';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
 
@@ -6083,7 +6083,7 @@ function GetMenuDefinition( menu: MenuRef; outDefSpec: MenuDefSpecPtr ): OSStatu
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0 and later
  }
-procedure SetMenuID( menu: MenuRef; menuID: MenuID ); external name '_SetMenuID';
+procedure SetMenuID( menu: MenuRef; menuID_: MenuID ); external name '_SetMenuID';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
 

+ 4 - 4
packages/extra/univint/Movies.pas

@@ -2188,7 +2188,7 @@ function GetMovieTimeScale(theMovie: Movie): TimeScale; external name '_GetMovie
  *    Mac OS X:         in version 10.0 and later
  *    Windows:          in qtmlClient.lib 3.0 and later
  }
-procedure SetMovieTimeScale(theMovie: Movie; timeScale: TimeScale); external name '_SetMovieTimeScale';
+procedure SetMovieTimeScale(theMovie: Movie; timeScale_: TimeScale); external name '_SetMovieTimeScale';
 {
  *  GetMovieDuration()
  *  
@@ -2800,7 +2800,7 @@ function SetTrackSoundLocalizationSettings(theTrack: Track; settings: Handle): O
  *    Mac OS X:         in version 10.0 and later
  *    Windows:          in qtmlClient.lib 3.0 and later
  }
-function NewTrackMedia(theTrack: Track; mediaType: OSType; timeScale: TimeScale; dataRef: Handle; dataRefType: OSType): Media; external name '_NewTrackMedia';
+function NewTrackMedia(theTrack: Track; mediaType: OSType; timeScale_: TimeScale; dataRef: Handle; dataRefType: OSType): Media; external name '_NewTrackMedia';
 {
  *  DisposeTrackMedia()
  *  
@@ -2873,7 +2873,7 @@ function GetMediaTimeScale(theMedia: Media): TimeScale; external name '_GetMedia
  *    Mac OS X:         in version 10.0 and later
  *    Windows:          in qtmlClient.lib 3.0 and later
  }
-procedure SetMediaTimeScale(theMedia: Media; timeScale: TimeScale); external name '_SetMediaTimeScale';
+procedure SetMediaTimeScale(theMedia: Media; timeScale_: TimeScale); external name '_SetMediaTimeScale';
 {
  *  GetMediaDuration()
  *  
@@ -4969,7 +4969,7 @@ procedure DisposeAllSprites(theSpriteWorld: SpriteWorld); external name '_Dispos
  *    Mac OS X:         in version 10.0 and later
  *    Windows:          in qtmlClient.lib 3.0 and later
  }
-function SetSpriteWorldFlags(spriteWorld: SpriteWorld; flags: SInt32; flagsMask: SInt32): OSErr; external name '_SetSpriteWorldFlags';
+function SetSpriteWorldFlags(spriteWorld_: SpriteWorld; flags: SInt32; flagsMask: SInt32): OSErr; external name '_SetSpriteWorldFlags';
 {
  *  NewSprite()
  *  

+ 1 - 1
packages/extra/univint/NSLCore.pas

@@ -815,7 +815,7 @@ function NSLGetNeighborhoodLength(neighborhood: NSLNeighborhood): SInt32; extern
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function NSLNewThread(threadStyle: ThreadStyle; threadEntry: ThreadEntryProcPtr; threadParam: UnivPtr; stackSize: Size; options: ThreadOptions; var threadResult: UnivPtr; var threadMade: ThreadID): OSErr; external name '_NSLNewThread';
+function NSLNewThread(threadStyle_: ThreadStyle; threadEntry: ThreadEntryProcPtr; threadParam: UnivPtr; stackSize: Size; options: ThreadOptions; var threadResult: UnivPtr; var threadMade: ThreadID): OSErr; external name '_NSLNewThread';
 
 { 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. }

+ 17 - 16
packages/extra/univint/NameRegistry.pas

@@ -14,7 +14,7 @@
                      http://www.freepascal.org/bugs.html
  
 }
-
+{       Pascal Translation Updated:  Gale R Paeper, <[email protected]>, 2006 }
 
 {
     Modified for use with Free Pascal
@@ -150,11 +150,12 @@ const
 
 type
 	RegCStrEntryName					= char;
-	RegCStrEntryNamePtr					= ^char;
+	RegCStrEntryNamePtr					= CStringPtr;
 	{  length of RegCStrEntryNameBuf =  kRegCStrMaxEntryNameLength+1 }
 	RegCStrEntryNameBuf					= packed array [0..47] of char;
-	RegCStrPathName						= char;
+	RegCStrPathName					    = char;
 	RegPathNameSize						= UInt32;
+	RegCStrPathNamePtr                  = CStringPtr;
 
 const
 	kRegPathNameSeparator		= 58;							{  0x3A  }
@@ -172,8 +173,8 @@ const
 
 type
 	RegPropertyNameBuf					= packed array [0..31] of char;
-	RegPropertyName						= char;
-	RegPropertyNamePtr					= ^char;
+	RegPropertyName					    = char;
+	RegPropertyNamePtr					= CStringPtr;
 	{	******************************************************************************
 	 *
 	 * Iteration Operations
@@ -345,7 +346,7 @@ function RegistryEntryIDDispose(var id: RegEntryID): OSStatus; external name '_R
  *    CarbonLib:        not available
  *    Mac OS X:         not available
  }
-function RegistryCStrEntryCreate(const (*var*) parentEntry: RegEntryID; const (*var*) name: RegCStrPathName; var newEntry: RegEntryID): OSStatus; external name '_RegistryCStrEntryCreate';
+function RegistryCStrEntryCreate(const (*var*) parentEntry: RegEntryID; {const} name: {variable-size-array} RegCStrPathNamePtr; var newEntry: RegEntryID): OSStatus; external name '_RegistryCStrEntryCreate';
 {
  *  RegistryEntryDelete()
  *  
@@ -464,7 +465,7 @@ function RegistryEntryIterate(var cookie: RegEntryIter; relationship: RegEntryIt
  *    CarbonLib:        not available
  *    Mac OS X:         not available
  }
-function RegistryEntrySearch(var cookie: RegEntryIter; relationship: RegEntryIterationOp; var foundEntry: RegEntryID; var done: boolean; const (*var*) propertyName: RegPropertyName; propertyValue: UnivPtr; propertySize: RegPropertyValueSize): OSStatus; external name '_RegistryEntrySearch';
+function RegistryEntrySearch(var cookie: RegEntryIter; relationship: RegEntryIterationOp; var foundEntry: RegEntryID; var done: boolean; {const} propertyName: {variable-size-array} RegPropertyNamePtr; propertyValue: UnivPtr; propertySize: RegPropertyValueSize): OSStatus; external name '_RegistryEntrySearch';
 {--------------------------------
  * Find a name in the namespace
  *
@@ -483,7 +484,7 @@ function RegistryEntrySearch(var cookie: RegEntryIter; relationship: RegEntryIte
  *    CarbonLib:        not available
  *    Mac OS X:         not available
  }
-function RegistryCStrEntryLookup(const (*var*) searchPointID: RegEntryID; const (*var*) pathName: RegCStrPathName; var foundEntry: RegEntryID): OSStatus; external name '_RegistryCStrEntryLookup';
+function RegistryCStrEntryLookup(const (*var*) searchPointID: RegEntryID; {const} pathName: {variable-size-array} RegCStrPathNamePtr; var foundEntry: RegEntryID): OSStatus; external name '_RegistryCStrEntryLookup';
 {---------------------------------------------
  * Convert an entry to a rooted name string
  *
@@ -539,7 +540,7 @@ function RegistryCStrEntryToName(const (*var*) entryID: RegEntryID; var parentEn
  *    CarbonLib:        not available
  *    Mac OS X:         not available
  }
-function RegistryPropertyCreate(const (*var*) entryID: RegEntryID; const (*var*) propertyName: RegPropertyName; propertyValue: UnivPtr; propertySize: RegPropertyValueSize): OSStatus; external name '_RegistryPropertyCreate';
+function RegistryPropertyCreate(const (*var*) entryID: RegEntryID; {const} propertyName: {variable-size-array} RegPropertyNamePtr; propertyValue: UnivPtr; propertySize: RegPropertyValueSize): OSStatus; external name '_RegistryPropertyCreate';
 {
  *  RegistryPropertyDelete()
  *  
@@ -548,7 +549,7 @@ function RegistryPropertyCreate(const (*var*) entryID: RegEntryID; const (*var*)
  *    CarbonLib:        not available
  *    Mac OS X:         not available
  }
-function RegistryPropertyDelete(const (*var*) entryID: RegEntryID; const (*var*) propertyName: RegPropertyName): OSStatus; external name '_RegistryPropertyDelete';
+function RegistryPropertyDelete(const (*var*) entryID: RegEntryID; {const} propertyName: {variable-size-array} RegPropertyNamePtr): OSStatus; external name '_RegistryPropertyDelete';
 {
  *  RegistryPropertyRename()
  *  
@@ -557,7 +558,7 @@ function RegistryPropertyDelete(const (*var*) entryID: RegEntryID; const (*var*)
  *    CarbonLib:        not available
  *    Mac OS X:         not available
  }
-function RegistryPropertyRename(const (*var*) entry: RegEntryID; const (*var*) oldName: RegPropertyName; const (*var*) newName: RegPropertyName): OSStatus; external name '_RegistryPropertyRename';
+function RegistryPropertyRename(const (*var*) entry: RegEntryID; {const} oldName: {variable-size-array} RegPropertyNamePtr; {const} newName: {variable-size-array} RegPropertyNamePtr): OSStatus; external name '_RegistryPropertyRename';
 {---------------------------
  * Traversing the Properties of a name
  *
@@ -608,7 +609,7 @@ function RegistryPropertyIterate(var cookie: RegPropertyIter; var foundProperty:
  *    CarbonLib:        not available
  *    Mac OS X:         not available
  }
-function RegistryPropertyGetSize(const (*var*) entryID: RegEntryID; const (*var*) propertyName: RegPropertyName; var propertySize: RegPropertyValueSize): OSStatus; external name '_RegistryPropertyGetSize';
+function RegistryPropertyGetSize(const (*var*) entryID: RegEntryID; {const} propertyName: {variable-size-array} RegPropertyNamePtr; var propertySize: RegPropertyValueSize): OSStatus; external name '_RegistryPropertyGetSize';
 {
  * (*propertySize) is the maximum size of the value returned in the buffer
  * pointed to by (propertyValue).  Upon return, (*propertySize) is the size of the
@@ -622,7 +623,7 @@ function RegistryPropertyGetSize(const (*var*) entryID: RegEntryID; const (*var*
  *    CarbonLib:        not available
  *    Mac OS X:         not available
  }
-function RegistryPropertyGet(const (*var*) entryID: RegEntryID; const (*var*) propertyName: RegPropertyName; propertyValue: UnivPtr; var propertySize: RegPropertyValueSize): OSStatus; external name '_RegistryPropertyGet';
+function RegistryPropertyGet(const (*var*) entryID: RegEntryID; {const} propertyName: {variable-size-array} RegPropertyNamePtr; propertyValue: UnivPtr; var propertySize: RegPropertyValueSize): OSStatus; external name '_RegistryPropertyGet';
 {
  *  RegistryPropertySet()
  *  
@@ -631,7 +632,7 @@ function RegistryPropertyGet(const (*var*) entryID: RegEntryID; const (*var*) pr
  *    CarbonLib:        not available
  *    Mac OS X:         not available
  }
-function RegistryPropertySet(const (*var*) entryID: RegEntryID; const (*var*) propertyName: RegPropertyName; propertyValue: UnivPtr; propertySize: RegPropertyValueSize): OSStatus; external name '_RegistryPropertySet';
+function RegistryPropertySet(const (*var*) entryID: RegEntryID; {const} propertyName: {variable-size-array} RegPropertyNamePtr; propertyValue: UnivPtr; propertySize: RegPropertyValueSize): OSStatus; external name '_RegistryPropertySet';
 { //////////////////////////////////////////////////////
 //
 // Modifier Management
@@ -678,7 +679,7 @@ function RegistryEntrySetMod(const (*var*) entry: RegEntryID; modifiers: RegEntr
  *    CarbonLib:        not available
  *    Mac OS X:         not available
  }
-function RegistryPropertyGetMod(const (*var*) entry: RegEntryID; const (*var*) name: RegPropertyName; var modifiers: RegPropertyModifiers): OSStatus; external name '_RegistryPropertyGetMod';
+function RegistryPropertyGetMod(const (*var*) entry: RegEntryID; {const} name: {variable-size-array} RegPropertyNamePtr; var modifiers: RegPropertyModifiers): OSStatus; external name '_RegistryPropertyGetMod';
 {
  *  RegistryPropertySetMod()
  *  
@@ -687,7 +688,7 @@ function RegistryPropertyGetMod(const (*var*) entry: RegEntryID; const (*var*) n
  *    CarbonLib:        not available
  *    Mac OS X:         not available
  }
-function RegistryPropertySetMod(const (*var*) entry: RegEntryID; const (*var*) name: RegPropertyName; modifiers: RegPropertyModifiers): OSStatus; external name '_RegistryPropertySetMod';
+function RegistryPropertySetMod(const (*var*) entry: RegEntryID; {const} name: {variable-size-array} RegPropertyNamePtr; modifiers: RegPropertyModifiers): OSStatus; external name '_RegistryPropertySetMod';
 {
  * Iterator operator for entry modifier search
  }

+ 9 - 9
packages/extra/univint/PMApplication.pas

@@ -514,7 +514,7 @@ function PMPageSetupDialogMain(pageFormat: PMPageFormat; var accepted: boolean;
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function PMGetDialogPtr(pmDialog: PMDialog; var theDialog: DialogRef): OSStatus; external name '_PMGetDialogPtr';
+function PMGetDialogPtr(pmDialog_: PMDialog; var theDialog: DialogRef): OSStatus; external name '_PMGetDialogPtr';
 
 {
  *  PMGetModalFilterProc()
@@ -524,7 +524,7 @@ function PMGetDialogPtr(pmDialog: PMDialog; var theDialog: DialogRef): OSStatus;
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function PMGetModalFilterProc(pmDialog: PMDialog; var filterProc: ModalFilterUPP): OSStatus; external name '_PMGetModalFilterProc';
+function PMGetModalFilterProc(pmDialog_: PMDialog; var filterProc: ModalFilterUPP): OSStatus; external name '_PMGetModalFilterProc';
 
 {
  *  PMSetModalFilterProc()
@@ -534,7 +534,7 @@ function PMGetModalFilterProc(pmDialog: PMDialog; var filterProc: ModalFilterUPP
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function PMSetModalFilterProc(pmDialog: PMDialog; filterProc: ModalFilterUPP): OSStatus; external name '_PMSetModalFilterProc';
+function PMSetModalFilterProc(pmDialog_: PMDialog; filterProc: ModalFilterUPP): OSStatus; external name '_PMSetModalFilterProc';
 
 {
  *  PMGetItemProc()
@@ -544,7 +544,7 @@ function PMSetModalFilterProc(pmDialog: PMDialog; filterProc: ModalFilterUPP): O
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function PMGetItemProc(pmDialog: PMDialog; var itemProc: PMItemUPP): OSStatus; external name '_PMGetItemProc';
+function PMGetItemProc(pmDialog_: PMDialog; var itemProc: PMItemUPP): OSStatus; external name '_PMGetItemProc';
 
 {
  *  PMSetItemProc()
@@ -554,7 +554,7 @@ function PMGetItemProc(pmDialog: PMDialog; var itemProc: PMItemUPP): OSStatus; e
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function PMSetItemProc(pmDialog: PMDialog; itemProc: PMItemUPP): OSStatus; external name '_PMSetItemProc';
+function PMSetItemProc(pmDialog_: PMDialog; itemProc: PMItemUPP): OSStatus; external name '_PMSetItemProc';
 
 {
  *  PMGetDialogAccepted()
@@ -564,7 +564,7 @@ function PMSetItemProc(pmDialog: PMDialog; itemProc: PMItemUPP): OSStatus; exter
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function PMGetDialogAccepted(pmDialog: PMDialog; var process: boolean): OSStatus; external name '_PMGetDialogAccepted';
+function PMGetDialogAccepted(pmDialog_: PMDialog; var process: boolean): OSStatus; external name '_PMGetDialogAccepted';
 
 {
  *  PMSetDialogAccepted()
@@ -574,7 +574,7 @@ function PMGetDialogAccepted(pmDialog: PMDialog; var process: boolean): OSStatus
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function PMSetDialogAccepted(pmDialog: PMDialog; process: boolean): OSStatus; external name '_PMSetDialogAccepted';
+function PMSetDialogAccepted(pmDialog_: PMDialog; process: boolean): OSStatus; external name '_PMSetDialogAccepted';
 
 {
  *  PMGetDialogDone()
@@ -584,7 +584,7 @@ function PMSetDialogAccepted(pmDialog: PMDialog; process: boolean): OSStatus; ex
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function PMGetDialogDone(pmDialog: PMDialog; var done: boolean): OSStatus; external name '_PMGetDialogDone';
+function PMGetDialogDone(pmDialog_: PMDialog; var done: boolean): OSStatus; external name '_PMGetDialogDone';
 
 {
  *  PMSetDialogDone()
@@ -594,7 +594,7 @@ function PMGetDialogDone(pmDialog: PMDialog; var done: boolean): OSStatus; exter
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function PMSetDialogDone(pmDialog: PMDialog; done: boolean): OSStatus; external name '_PMSetDialogDone';
+function PMSetDialogDone(pmDialog_: PMDialog; done: boolean): OSStatus; external name '_PMSetDialogDone';
 
 {$ALIGN MAC68K}
 

+ 36 - 4
packages/extra/univint/Pasteboard.pas

@@ -194,9 +194,9 @@ uses MacTypes,CFBase,CFArray,CFData,CFURL;
  *    services to act on multiple items. Another difference from both
  *    the Scrap and Drag Managers is the use of Uniform Type Identifier
  *    based flavor types rather than four character code OSTypes. These
- *    have several advantages. They allow compatiblity with Cocoa's
+ *    have several advantages. They allow compatibility with Cocoa's
  *    NSPasteboard, more accurately describe the data being
- *    transported, provied a type inheritance mechanism and allow
+ *    transported, provide a type inheritance mechanism and allow
  *    namespacing with a reverse DNS scheme.
  }
  
@@ -234,7 +234,7 @@ const
    * reference. The call to PasteboardSynchronize() has updated the
    * local pasteboard reference to sync it up with the global resource.
    * This is a good time to see what new information has been placed on
-   * the pasteboard to determine wether any tasty flavors have been
+   * the pasteboard to determine whether any tasty flavors have been
    * added and possibly enable pasting.
    }
     kPasteboardModified           = $00000001; {(1 << 0)}
@@ -469,6 +469,38 @@ function PasteboardSynchronize(inPasteboard: PasteboardRef): PasteboardSyncFlags
 function PasteboardClear(inPasteboard: PasteboardRef): OSStatus; external name '_PasteboardClear';
 
 
+{
+ *  PasteboardCopyName()
+ *  
+ *  Summary:
+ *    Copies the name of the given pasteboard. Useful for discovering
+ *    the name of a uniquely named pasteboard so other processes may
+ *    access it.
+ *  
+ *  Mac OS X threading:
+ *    Not thread safe
+ *  
+ *  Parameters:
+ *    
+ *    inPasteboard:
+ *      A local pasteboard reference.
+ *    
+ *    outName:
+ *      On return, a CFString reference to the pasteboard's name. This
+ *      string must be released by the client.
+ *  
+ *  Result:
+ *    An operating system result code.
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ *    Non-Carbon CFM:   not available
+ }
+function PasteboardCopyName( inPasteboard: PasteboardRef; var outName: CFStringRef ): OSStatus; external name '_PasteboardCopyName';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
 {
  *  PasteboardGetItemCount()
  *  
@@ -517,7 +549,7 @@ function PasteboardGetItemCount(
  *      A local pasteboard reference.
  *    
  *    inIndex:
- *      A UInt32 index requesting the nth pasteboard item reference.
+ *      A 1-based UInt32 index requesting the nth pasteboard item reference.
  *    
  *    outItem:
  *      A PasteboardItemID which receives the nth pasteboard item

+ 2 - 2
packages/extra/univint/Power.pas

@@ -218,7 +218,7 @@ const
 
 type
 {$ifc TYPED_FUNCTION_POINTERS}
-	PowerHandlerProcPtr = function(message: UInt32; param: UnivPtr; refCon: UInt32; var regEntryID: RegEntryID): OSStatus;
+	PowerHandlerProcPtr = function(message: UInt32; param: UnivPtr; refCon: UInt32; var regEntryID_: RegEntryID): OSStatus;
 {$elsec}
 	PowerHandlerProcPtr = ProcPtr;
 {$endc}
@@ -258,7 +258,7 @@ procedure DisposePowerHandlerUPP(userUPP: PowerHandlerUPP); external name '_Disp
  *    CarbonLib:        not available
  *    Mac OS X:         not available
  }
-function InvokePowerHandlerUPP(message: UInt32; param: UnivPtr; refCon: UInt32; var regEntryID: RegEntryID; userRoutine: PowerHandlerUPP): OSStatus; external name '_InvokePowerHandlerUPP'; { old name was CallPowerHandlerProc }
+function InvokePowerHandlerUPP(message: UInt32; param: UnivPtr; refCon: UInt32; var regEntryID_: RegEntryID; userRoutine: PowerHandlerUPP): OSStatus; external name '_InvokePowerHandlerUPP'; { old name was CallPowerHandlerProc }
 {$endc}  {CALL_NOT_IN_CARBON}
 
 {

+ 2 - 2
packages/extra/univint/QTML.pas

@@ -320,7 +320,7 @@ procedure QTMLResetSyncVar(sync: QTMLSyncVarPtr); external name '_QTMLResetSyncV
  *    Mac OS X:         not available
  *    Windows:          in qtmlClient.lib 3.0 and later
  }
-procedure InitializeQHdr(var qhdr: QHdr); external name '_InitializeQHdr';
+procedure InitializeQHdr(var qhdr_: QHdr); external name '_InitializeQHdr';
 
 {
  *  TerminateQHdr()
@@ -331,7 +331,7 @@ procedure InitializeQHdr(var qhdr: QHdr); external name '_InitializeQHdr';
  *    Mac OS X:         not available
  *    Windows:          in qtmlClient.lib 3.0 and later
  }
-procedure TerminateQHdr(var qhdr: QHdr); external name '_TerminateQHdr';
+procedure TerminateQHdr(var qhdr_: QHdr); external name '_TerminateQHdr';
 
 
 {

+ 20 - 20
packages/extra/univint/QuickTimeMusic.pas

@@ -1416,7 +1416,7 @@ function NASaveMusicConfiguration(na: NoteAllocator): ComponentResult; external
  *    Mac OS X:         in version 10.0 and later
  *    Windows:          in qtmlClient.lib 3.0 and later
  }
-function NANewNoteChannel(na: NoteAllocator; var noteRequest: NoteRequest; var outChannel: NoteChannel): ComponentResult; external name '_NANewNoteChannel';
+function NANewNoteChannel(na: NoteAllocator; var noteRequest_: NoteRequest; var outChannel: NoteChannel): ComponentResult; external name '_NANewNoteChannel';
 {
  *  NADisposeNoteChannel()
  *  
@@ -1426,7 +1426,7 @@ function NANewNoteChannel(na: NoteAllocator; var noteRequest: NoteRequest; var o
  *    Mac OS X:         in version 10.0 and later
  *    Windows:          in qtmlClient.lib 3.0 and later
  }
-function NADisposeNoteChannel(na: NoteAllocator; noteChannel: NoteChannel): ComponentResult; external name '_NADisposeNoteChannel';
+function NADisposeNoteChannel(na: NoteAllocator; noteChannel_: NoteChannel): ComponentResult; external name '_NADisposeNoteChannel';
 {
  *  NAGetNoteChannelInfo()
  *  
@@ -1436,7 +1436,7 @@ function NADisposeNoteChannel(na: NoteAllocator; noteChannel: NoteChannel): Comp
  *    Mac OS X:         in version 10.0 and later
  *    Windows:          in qtmlClient.lib 3.0 and later
  }
-function NAGetNoteChannelInfo(na: NoteAllocator; noteChannel: NoteChannel; var index: SInt32; var part: SInt32): ComponentResult; external name '_NAGetNoteChannelInfo';
+function NAGetNoteChannelInfo(na: NoteAllocator; noteChannel_: NoteChannel; var index: SInt32; var part: SInt32): ComponentResult; external name '_NAGetNoteChannelInfo';
 {
  *  NAPrerollNoteChannel()
  *  
@@ -1446,7 +1446,7 @@ function NAGetNoteChannelInfo(na: NoteAllocator; noteChannel: NoteChannel; var i
  *    Mac OS X:         in version 10.0 and later
  *    Windows:          in qtmlClient.lib 3.0 and later
  }
-function NAPrerollNoteChannel(na: NoteAllocator; noteChannel: NoteChannel): ComponentResult; external name '_NAPrerollNoteChannel';
+function NAPrerollNoteChannel(na: NoteAllocator; noteChannel_: NoteChannel): ComponentResult; external name '_NAPrerollNoteChannel';
 {
  *  NAUnrollNoteChannel()
  *  
@@ -1456,7 +1456,7 @@ function NAPrerollNoteChannel(na: NoteAllocator; noteChannel: NoteChannel): Comp
  *    Mac OS X:         in version 10.0 and later
  *    Windows:          in qtmlClient.lib 3.0 and later
  }
-function NAUnrollNoteChannel(na: NoteAllocator; noteChannel: NoteChannel): ComponentResult; external name '_NAUnrollNoteChannel';
+function NAUnrollNoteChannel(na: NoteAllocator; noteChannel_: NoteChannel): ComponentResult; external name '_NAUnrollNoteChannel';
 {
  *  NASetNoteChannelVolume()
  *  
@@ -1466,7 +1466,7 @@ function NAUnrollNoteChannel(na: NoteAllocator; noteChannel: NoteChannel): Compo
  *    Mac OS X:         in version 10.0 and later
  *    Windows:          in qtmlClient.lib 3.0 and later
  }
-function NASetNoteChannelVolume(na: NoteAllocator; noteChannel: NoteChannel; volume: Fixed): ComponentResult; external name '_NASetNoteChannelVolume';
+function NASetNoteChannelVolume(na: NoteAllocator; noteChannel_: NoteChannel; volume: Fixed): ComponentResult; external name '_NASetNoteChannelVolume';
 {
  *  NAResetNoteChannel()
  *  
@@ -1476,7 +1476,7 @@ function NASetNoteChannelVolume(na: NoteAllocator; noteChannel: NoteChannel; vol
  *    Mac OS X:         in version 10.0 and later
  *    Windows:          in qtmlClient.lib 3.0 and later
  }
-function NAResetNoteChannel(na: NoteAllocator; noteChannel: NoteChannel): ComponentResult; external name '_NAResetNoteChannel';
+function NAResetNoteChannel(na: NoteAllocator; noteChannel_: NoteChannel): ComponentResult; external name '_NAResetNoteChannel';
 {
  *  NAPlayNote()
  *  
@@ -1486,7 +1486,7 @@ function NAResetNoteChannel(na: NoteAllocator; noteChannel: NoteChannel): Compon
  *    Mac OS X:         in version 10.0 and later
  *    Windows:          in qtmlClient.lib 3.0 and later
  }
-function NAPlayNote(na: NoteAllocator; noteChannel: NoteChannel; pitch: SInt32; velocity: SInt32): ComponentResult; external name '_NAPlayNote';
+function NAPlayNote(na: NoteAllocator; noteChannel_: NoteChannel; pitch: SInt32; velocity: SInt32): ComponentResult; external name '_NAPlayNote';
 {
  *  NASetController()
  *  
@@ -1496,7 +1496,7 @@ function NAPlayNote(na: NoteAllocator; noteChannel: NoteChannel; pitch: SInt32;
  *    Mac OS X:         in version 10.0 and later
  *    Windows:          in qtmlClient.lib 3.0 and later
  }
-function NASetController(na: NoteAllocator; noteChannel: NoteChannel; controllerNumber: SInt32; controllerValue: SInt32): ComponentResult; external name '_NASetController';
+function NASetController(na: NoteAllocator; noteChannel_: NoteChannel; controllerNumber: SInt32; controllerValue: SInt32): ComponentResult; external name '_NASetController';
 {
  *  NASetKnob()
  *  
@@ -1506,7 +1506,7 @@ function NASetController(na: NoteAllocator; noteChannel: NoteChannel; controller
  *    Mac OS X:         in version 10.0 and later
  *    Windows:          in qtmlClient.lib 3.0 and later
  }
-function NASetKnob(na: NoteAllocator; noteChannel: NoteChannel; knobNumber: SInt32; knobValue: SInt32): ComponentResult; external name '_NASetKnob';
+function NASetKnob(na: NoteAllocator; noteChannel_: NoteChannel; knobNumber: SInt32; knobValue: SInt32): ComponentResult; external name '_NASetKnob';
 {
  *  NAFindNoteChannelTone()
  *  
@@ -1516,7 +1516,7 @@ function NASetKnob(na: NoteAllocator; noteChannel: NoteChannel; knobNumber: SInt
  *    Mac OS X:         in version 10.0 and later
  *    Windows:          in qtmlClient.lib 3.0 and later
  }
-function NAFindNoteChannelTone(na: NoteAllocator; noteChannel: NoteChannel; var td: ToneDescription; var instrumentNumber: SInt32): ComponentResult; external name '_NAFindNoteChannelTone';
+function NAFindNoteChannelTone(na: NoteAllocator; noteChannel_: NoteChannel; var td: ToneDescription; var instrumentNumber: SInt32): ComponentResult; external name '_NAFindNoteChannelTone';
 {
  *  NASetInstrumentNumber()
  *  
@@ -1526,7 +1526,7 @@ function NAFindNoteChannelTone(na: NoteAllocator; noteChannel: NoteChannel; var
  *    Mac OS X:         in version 10.0 and later
  *    Windows:          in qtmlClient.lib 3.0 and later
  }
-function NASetInstrumentNumber(na: NoteAllocator; noteChannel: NoteChannel; instrumentNumber: SInt32): ComponentResult; external name '_NASetInstrumentNumber';
+function NASetInstrumentNumber(na: NoteAllocator; noteChannel_: NoteChannel; instrumentNumber: SInt32): ComponentResult; external name '_NASetInstrumentNumber';
 {
  *  NAPickInstrument()
  *  
@@ -1601,7 +1601,7 @@ function NAGetMIDIPorts(na: NoteAllocator; var inputPorts: QTMIDIPortListHandle;
  *    Mac OS X:         in version 10.0 and later
  *    Windows:          in qtmlClient.lib 3.0 and later
  }
-function NAGetNoteRequest(na: NoteAllocator; noteChannel: NoteChannel; var nrOut: NoteRequest): ComponentResult; external name '_NAGetNoteRequest';
+function NAGetNoteRequest(na: NoteAllocator; noteChannel_: NoteChannel; var nrOut: NoteRequest): ComponentResult; external name '_NAGetNoteRequest';
 {
  *  NASendMIDI()
  *  
@@ -1611,7 +1611,7 @@ function NAGetNoteRequest(na: NoteAllocator; noteChannel: NoteChannel; var nrOut
  *    Mac OS X:         in version 10.0 and later
  *    Windows:          in qtmlClient.lib 3.0 and later
  }
-function NASendMIDI(na: NoteAllocator; noteChannel: NoteChannel; var mp: MusicMIDIPacket): ComponentResult; external name '_NASendMIDI';
+function NASendMIDI(na: NoteAllocator; noteChannel_: NoteChannel; var mp: MusicMIDIPacket): ComponentResult; external name '_NASendMIDI';
 {
  *  NAPickEditInstrument()
  *  
@@ -1641,7 +1641,7 @@ function NANewNoteChannelFromAtomicInstrument(na: NoteAllocator; instrument: Ato
  *    Mac OS X:         in version 10.0 and later
  *    Windows:          in qtmlClient.lib 3.0 and later
  }
-function NASetAtomicInstrument(na: NoteAllocator; noteChannel: NoteChannel; instrument: AtomicInstrumentPtr; flags: SInt32): ComponentResult; external name '_NASetAtomicInstrument';
+function NASetAtomicInstrument(na: NoteAllocator; noteChannel_: NoteChannel; instrument: AtomicInstrumentPtr; flags: SInt32): ComponentResult; external name '_NASetAtomicInstrument';
 {
  *  NAGetKnob()
  *  
@@ -1651,7 +1651,7 @@ function NASetAtomicInstrument(na: NoteAllocator; noteChannel: NoteChannel; inst
  *    Mac OS X:         in version 10.0 and later
  *    Windows:          in qtmlClient.lib 3.0 and later
  }
-function NAGetKnob(na: NoteAllocator; noteChannel: NoteChannel; knobNumber: SInt32; var knobValue: SInt32): ComponentResult; external name '_NAGetKnob';
+function NAGetKnob(na: NoteAllocator; noteChannel_: NoteChannel; knobNumber: SInt32; var knobValue: SInt32): ComponentResult; external name '_NAGetKnob';
 {
  *  NATask()
  *  
@@ -1671,7 +1671,7 @@ function NATask(na: NoteAllocator): ComponentResult; external name '_NATask';
  *    Mac OS X:         in version 10.0 and later
  *    Windows:          in qtmlClient.lib 3.0 and later
  }
-function NASetNoteChannelBalance(na: NoteAllocator; noteChannel: NoteChannel; balance: SInt32): ComponentResult; external name '_NASetNoteChannelBalance';
+function NASetNoteChannelBalance(na: NoteAllocator; noteChannel_: NoteChannel; balance: SInt32): ComponentResult; external name '_NASetNoteChannelBalance';
 {
  *  NASetInstrumentNumberInterruptSafe()
  *  
@@ -1681,7 +1681,7 @@ function NASetNoteChannelBalance(na: NoteAllocator; noteChannel: NoteChannel; ba
  *    Mac OS X:         in version 10.0 and later
  *    Windows:          in qtmlClient.lib 3.0 and later
  }
-function NASetInstrumentNumberInterruptSafe(na: NoteAllocator; noteChannel: NoteChannel; instrumentNumber: SInt32): ComponentResult; external name '_NASetInstrumentNumberInterruptSafe';
+function NASetInstrumentNumberInterruptSafe(na: NoteAllocator; noteChannel_: NoteChannel; instrumentNumber: SInt32): ComponentResult; external name '_NASetInstrumentNumberInterruptSafe';
 {
  *  NASetNoteChannelSoundLocalization()
  *  
@@ -1691,7 +1691,7 @@ function NASetInstrumentNumberInterruptSafe(na: NoteAllocator; noteChannel: Note
  *    Mac OS X:         in version 10.0 and later
  *    Windows:          in qtmlClient.lib 3.0 and later
  }
-function NASetNoteChannelSoundLocalization(na: NoteAllocator; noteChannel: NoteChannel; data: Handle): ComponentResult; external name '_NASetNoteChannelSoundLocalization';
+function NASetNoteChannelSoundLocalization(na: NoteAllocator; noteChannel_: NoteChannel; data: Handle): ComponentResult; external name '_NASetNoteChannelSoundLocalization';
 {
  *  NAGetController()
  *  
@@ -1701,7 +1701,7 @@ function NASetNoteChannelSoundLocalization(na: NoteAllocator; noteChannel: NoteC
  *    Mac OS X:         in version 10.0 and later
  *    Windows:          in qtmlClient.lib 3.0 and later
  }
-function NAGetController(na: NoteAllocator; noteChannel: NoteChannel; controllerNumber: SInt32; var controllerValue: SInt32): ComponentResult; external name '_NAGetController';
+function NAGetController(na: NoteAllocator; noteChannel_: NoteChannel; controllerNumber: SInt32; var controllerValue: SInt32): ComponentResult; external name '_NAGetController';
 const
 	kTuneQueueDepth				= 8;							{  Deepest you can queue tune segments  }
 

+ 6 - 6
packages/extra/univint/Quickdraw.pas

@@ -1732,7 +1732,7 @@ const
 
 type
 {$ifc TYPED_FUNCTION_POINTERS}
-	RegionToRectsProcPtr = function(message: UInt16; rgn: RgnHandle; const (*var*) rect: Rect; refCon: UnivPtr): OSStatus;
+	RegionToRectsProcPtr = function(message: UInt16; rgn: RgnHandle; const (*var*) rect_: Rect; refCon: UnivPtr): OSStatus;
 {$elsec}
 	RegionToRectsProcPtr = ProcPtr;
 {$endc}
@@ -1771,7 +1771,7 @@ procedure DisposeRegionToRectsUPP(userUPP: RegionToRectsUPP); external name '_Di
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function InvokeRegionToRectsUPP(message: UInt16; rgn: RgnHandle; const (*var*) rect: Rect; refCon: UnivPtr; userRoutine: RegionToRectsUPP): OSStatus; external name '_InvokeRegionToRectsUPP'; { old name was CallRegionToRectsProc }
+function InvokeRegionToRectsUPP(message: UInt16; rgn: RgnHandle; const (*var*) rect_: Rect; refCon: UnivPtr; userRoutine: RegionToRectsUPP): OSStatus; external name '_InvokeRegionToRectsUPP'; { old name was CallRegionToRectsProc }
 {
  *  QDRegionToRects()
  *  
@@ -4119,7 +4119,7 @@ function GetPortBitMapForCopyBits(port: CGrafPtr): BitMapPtr; external name '_Ge
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function GetPortBounds(port: CGrafPtr; var rect: Rect): RectPtr; external name '_GetPortBounds';
+function GetPortBounds(port: CGrafPtr; var rect_: Rect): RectPtr; external name '_GetPortBounds';
 
 {
  *  GetPortForeColor()
@@ -4485,7 +4485,7 @@ function SwapPortRegionSaveHandle(port: CGrafPtr; inRegionSaveHdl: Handle): Hand
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Mac OS X:         in version 10.0 and later
  }
-procedure SetPortBounds(port: CGrafPtr; const (*var*) rect: Rect); external name '_SetPortBounds';
+procedure SetPortBounds(port: CGrafPtr; const (*var*) rect_: Rect); external name '_SetPortBounds';
 
 {
  *  SetPortOpColor()
@@ -4829,7 +4829,7 @@ procedure SetQDError(err: OSErr); external name '_SetQDError';
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function QDLocalToGlobalPoint(port: CGrafPtr; var point: Point): PointPtr; external name '_QDLocalToGlobalPoint';
+function QDLocalToGlobalPoint(port: CGrafPtr; var point_: Point): PointPtr; external name '_QDLocalToGlobalPoint';
 
 {
  *  QDGlobalToLocalPoint()
@@ -4839,7 +4839,7 @@ function QDLocalToGlobalPoint(port: CGrafPtr; var point: Point): PointPtr; exter
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function QDGlobalToLocalPoint(port: CGrafPtr; var point: Point): PointPtr; external name '_QDGlobalToLocalPoint';
+function QDGlobalToLocalPoint(port: CGrafPtr; var point_: Point): PointPtr; external name '_QDGlobalToLocalPoint';
 
 {
  *  QDLocalToGlobalRect()

+ 1 - 1
packages/extra/univint/TSMTE.pas

@@ -292,7 +292,7 @@ procedure SetTSMTEDialogDocumentID( dialog: DialogRef; documentID: TSMDocumentID
  *    CarbonLib:        in CarbonLib 1.0.2 and later
  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0.2 and later
  }
-procedure SetTSMTEDialogTSMTERecHandle( dialog: DialogRef; tsmteRecHandle: TSMTERecHandle ); external name '_SetTSMTEDialogTSMTERecHandle';
+procedure SetTSMTEDialogTSMTERecHandle( dialog: DialogRef; tsmteRecHandle_: TSMTERecHandle ); external name '_SetTSMTEDialogTSMTERecHandle';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
 
 

+ 2 - 2
packages/extra/univint/TextEncodingConverter.pas

@@ -214,7 +214,7 @@ function TECGetDestinationTextEncodings(inputEncoding: TextEncoding; destination
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function TECGetTextEncodingInternetName(textEncoding: TextEncoding; var encodingName: Str255): OSStatus; external name '_TECGetTextEncodingInternetName';
+function TECGetTextEncodingInternetName(textEncoding_: TextEncoding; var encodingName: Str255): OSStatus; external name '_TECGetTextEncodingInternetName';
 
 {
  *  TECGetTextEncodingFromInternetName()
@@ -224,7 +224,7 @@ function TECGetTextEncodingInternetName(textEncoding: TextEncoding; var encoding
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function TECGetTextEncodingFromInternetName(var textEncoding: TextEncoding; const (*var*) encodingName: Str255): OSStatus; external name '_TECGetTextEncodingFromInternetName';
+function TECGetTextEncodingFromInternetName(var textEncoding_: TextEncoding; const (*var*) encodingName: Str255): OSStatus; external name '_TECGetTextEncodingFromInternetName';
 
 { create/dispose converters }
 {

+ 2 - 2
packages/extra/univint/TextEncodingPlugin.pas

@@ -273,13 +273,13 @@ type
 {$endc}
 
 {$ifc TYPED_FUNCTION_POINTERS}
-	TECPluginGetTextEncodingInternetNamePtr = function(textEncoding: TextEncoding; var encodingName: Str255): OSStatus;
+	TECPluginGetTextEncodingInternetNamePtr = function(textEncoding_: TextEncoding; var encodingName: Str255): OSStatus;
 {$elsec}
 	TECPluginGetTextEncodingInternetNamePtr = ProcPtr;
 {$endc}
 
 {$ifc TYPED_FUNCTION_POINTERS}
-	TECPluginGetTextEncodingFromInternetNamePtr = function(var textEncoding: TextEncoding; encodingName: Str255): OSStatus;
+	TECPluginGetTextEncodingFromInternetNamePtr = function(var textEncoding_: TextEncoding; encodingName: Str255): OSStatus;
 {$elsec}
 	TECPluginGetTextEncodingFromInternetNamePtr = ProcPtr;
 {$endc}

+ 7 - 7
packages/extra/univint/Threads.pas

@@ -448,7 +448,7 @@ type
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Non-Carbon CFM:   in ThreadsLib 1.0 and later
  }
-function NewThread( threadStyle: ThreadStyle; threadEntry: ThreadEntryTPP; threadParam: UnivPtr; stackSize: Size; options: ThreadOptions; threadResult: UnivPtrPtr { can be NULL }; var threadMade: ThreadID ): OSErr; external name '_NewThread';
+function NewThread( threadStyle_: ThreadStyle; threadEntry: ThreadEntryTPP; threadParam: UnivPtr; stackSize: Size; options: ThreadOptions; threadResult: UnivPtrPtr { can be NULL }; var threadMade: ThreadID ): OSErr; external name '_NewThread';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
 
@@ -508,7 +508,7 @@ function SetDebuggerNotificationProcs( notifyNewThread: DebuggerNewThreadTPP; no
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Non-Carbon CFM:   in ThreadsLib 1.0 and later
  }
-function CreateThreadPool( threadStyle: ThreadStyle; numToCreate: SInt16; stackSize: Size ): OSErr; external name '_CreateThreadPool';
+function CreateThreadPool( threadStyle_: ThreadStyle; numToCreate: SInt16; stackSize: Size ): OSErr; external name '_CreateThreadPool';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
 
@@ -520,7 +520,7 @@ function CreateThreadPool( threadStyle: ThreadStyle; numToCreate: SInt16; stackS
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Non-Carbon CFM:   in ThreadsLib 1.0 and later
  }
-function GetFreeThreadCount( threadStyle: ThreadStyle; var freeCount: SInt16 ): OSErr; external name '_GetFreeThreadCount';
+function GetFreeThreadCount( threadStyle_: ThreadStyle; var freeCount: SInt16 ): OSErr; external name '_GetFreeThreadCount';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
 
 
@@ -532,7 +532,7 @@ function GetFreeThreadCount( threadStyle: ThreadStyle; var freeCount: SInt16 ):
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Non-Carbon CFM:   in ThreadsLib 1.0 and later
  }
-function GetSpecificFreeThreadCount( threadStyle: ThreadStyle; stackSize: Size; var freeCount: SInt16 ): OSErr; external name '_GetSpecificFreeThreadCount';
+function GetSpecificFreeThreadCount( threadStyle_: ThreadStyle; stackSize: Size; var freeCount: SInt16 ): OSErr; external name '_GetSpecificFreeThreadCount';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
 
 
@@ -544,7 +544,7 @@ function GetSpecificFreeThreadCount( threadStyle: ThreadStyle; stackSize: Size;
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Non-Carbon CFM:   in ThreadsLib 1.0 and later
  }
-function GetDefaultThreadStackSize( threadStyle: ThreadStyle; var stackSize: Size ): OSErr; external name '_GetDefaultThreadStackSize';
+function GetDefaultThreadStackSize( threadStyle_: ThreadStyle; var stackSize: Size ): OSErr; external name '_GetDefaultThreadStackSize';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
 
@@ -618,7 +618,7 @@ function MacGetCurrentThread( var currentThreadID: ThreadID ): OSErr; external n
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Non-Carbon CFM:   in ThreadsLib 1.0 and later
  }
-function GetThreadState( threadToGet: ThreadID; var threadState: ThreadState ): OSErr; external name '_GetThreadState';
+function GetThreadState( threadToGet: ThreadID; var threadState_: ThreadState ): OSErr; external name '_GetThreadState';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
 
@@ -690,7 +690,7 @@ function GetThreadCurrentTaskRef( var threadTRef: ThreadTaskRef ): OSErr; extern
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Non-Carbon CFM:   in ThreadsLib 1.0 and later
  }
-function GetThreadStateGivenTaskRef( threadTRef: ThreadTaskRef; threadToGet: ThreadID; var threadState: ThreadState ): OSErr; external name '_GetThreadStateGivenTaskRef';
+function GetThreadStateGivenTaskRef( threadTRef: ThreadTaskRef; threadToGet: ThreadID; var threadState_: ThreadState ): OSErr; external name '_GetThreadStateGivenTaskRef';
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
 

+ 2 - 2
packages/extra/univint/Timer.pas

@@ -118,7 +118,7 @@ const
 type
 	TMTaskPtr = ^TMTask;
 {$ifc TYPED_FUNCTION_POINTERS}
-	TimerProcPtr = procedure(tmTaskPtr: TMTaskPtr);
+	TimerProcPtr = procedure(tmTaskPtr_: TMTaskPtr);
 {$elsec}
 	TimerProcPtr = Register68kProcPtr;
 {$endc}
@@ -249,7 +249,7 @@ procedure DisposeTimerUPP(userUPP: TimerUPP); external name '_DisposeTimerUPP';
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Mac OS X:         in version 10.0 and later
  }
-procedure InvokeTimerUPP(tmTaskPtr: TMTaskPtr; userRoutine: TimerUPP); external name '_InvokeTimerUPP'; { old name was CallTimerProc }
+procedure InvokeTimerUPP(tmTaskPtr_: TMTaskPtr; userRoutine: TimerUPP); external name '_InvokeTimerUPP'; { old name was CallTimerProc }
 
 
 {$ALIGN MAC68K}

+ 37 - 2
packages/extra/univint/ToolUtils.pas

@@ -248,7 +248,7 @@ procedure LongMul(a: SInt32; b: SInt32; var result: Int64Bit); external name '_L
  *    CarbonLib:        in CarbonLib H.a.c.k and later
  *    Mac OS X:         not available
  }
-function HiWord(x: SInt32): SInt16; external name '_HiWord';
+
 {
  *  LoWord()
  *  
@@ -257,8 +257,43 @@ function HiWord(x: SInt32): SInt16; external name '_HiWord';
  *    CarbonLib:        in CarbonLib H.a.c.k and later
  *    Mac OS X:         not available
  }
-function LoWord(x: SInt32): SInt16; external name '_LoWord';
+
+function HiWord(arg: SInt32): SInt16; inline; overload;
+function HiWord(arg: UInt32): UInt16; inline; overload;
+function LoWord(arg: SInt32): SInt16; inline; overload;
+function LoWord(arg: UInt32): UInt16; inline; overload;
+
+
+
 {$ALIGN MAC68K}
 
 
+
+implementation
+
+
+function HiWord(arg: SInt32): SInt16; inline;
+begin
+  HiWord := arg shr 16;
+end;
+
+
+function HiWord(arg: UInt32): UInt16; inline;
+begin
+  HiWord := arg shr 16;
+end;
+
+
+function LoWord(arg: SInt32): SInt16; inline;
+begin
+  LoWord := SInt16(arg);
+end;
+
+
+function LoWord(arg: UInt32): UInt16; inline;
+begin
+  LoWord := UInt16(arg);
+end;
+  
+
 end.

+ 575 - 0
packages/extra/univint/TranslationServices.pas

@@ -0,0 +1,575 @@
+{
+     File:       HIServices/TranslationServices.h
+ 
+     Contains:   Translation Services Interfaces.
+ 
+     Version:    HIServices-169~377
+ 
+     Copyright:  © 2003-2006 by Apple Computer, Inc., all rights reserved.
+ 
+}
+
+{	 Pascal Translation:  Gale R Paeper, <[email protected]>, 2006 }
+
+{
+    Modified for use with Free Pascal
+    Version 200
+    Please report any bugs to <[email protected]>
+}
+
+{$mode macpas}
+{$packenum 1}
+{$macro on}
+{$inline on}
+{$CALLING MWPASCAL}
+
+unit TranslationServices;
+interface
+{$setc UNIVERSAL_INTERFACES_VERSION := $0342}
+{$setc GAP_INTERFACES_VERSION := $0200}
+
+{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
+    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
+{$endc}
+
+{$ifc defined CPUPOWERPC and defined CPUI386}
+	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
+{$endc}
+{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
+	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
+{$endc}
+
+{$ifc not defined __ppc__ and defined CPUPOWERPC}
+	{$setc __ppc__ := 1}
+{$elsec}
+	{$setc __ppc__ := 0}
+{$endc}
+{$ifc not defined __i386__ and defined CPUI386}
+	{$setc __i386__ := 1}
+{$elsec}
+	{$setc __i386__ := 0}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
+	{$error Conflicting definitions for __ppc__ and __i386__}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__}
+	{$setc TARGET_CPU_PPC := TRUE}
+	{$setc TARGET_CPU_X86 := FALSE}
+{$elifc defined __i386__ and __i386__}
+	{$setc TARGET_CPU_PPC := FALSE}
+	{$setc TARGET_CPU_X86 := TRUE}
+{$elsec}
+	{$error Neither __ppc__ nor __i386__ is defined.}
+{$endc}
+{$setc TARGET_CPU_PPC_64 := FALSE}
+
+{$ifc defined FPC_BIG_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
+{$elifc defined FPC_LITTLE_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
+{$elsec}
+	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
+{$endc}
+{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
+{$setc CALL_NOT_IN_CARBON := FALSE}
+{$setc OLDROUTINENAMES := FALSE}
+{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
+{$setc OPAQUE_UPP_TYPES := TRUE}
+{$setc OTCARBONAPPLICATION := TRUE}
+{$setc OTKERNEL := FALSE}
+{$setc PM_USE_SESSION_APIS := TRUE}
+{$setc TARGET_API_MAC_CARBON := TRUE}
+{$setc TARGET_API_MAC_OS8 := FALSE}
+{$setc TARGET_API_MAC_OSX := TRUE}
+{$setc TARGET_CARBON := TRUE}
+{$setc TARGET_CPU_68K := FALSE}
+{$setc TARGET_CPU_MIPS := FALSE}
+{$setc TARGET_CPU_SPARC := FALSE}
+{$setc TARGET_OS_MAC := TRUE}
+{$setc TARGET_OS_UNIX := FALSE}
+{$setc TARGET_OS_WIN32 := FALSE}
+{$setc TARGET_RT_MAC_68881 := FALSE}
+{$setc TARGET_RT_MAC_CFM := FALSE}
+{$setc TARGET_RT_MAC_MACHO := TRUE}
+{$setc TYPED_FUNCTION_POINTERS := TRUE}
+{$setc TYPE_BOOL := FALSE}
+{$setc TYPE_EXTENDED := FALSE}
+{$setc TYPE_LONGLONG := TRUE}
+uses MacTypes, CFArray, CFBase, CFData, CFDictionary, CFURL, Files;
+{$ALIGN POWER}
+
+
+{
+ *  TranslationServices
+ *  
+ *  Discussion:
+ *    Translation Services provides tools for conversion of data and
+ *    file contents from one format to another. All information for
+ *    performing a translation is contained within a TranslationRef.
+ *    These include source and destination data types, flags indicating
+ *    what type of translation can be performed and references to the
+ *    system services which execute the translation. TranslationRefs
+ *    are CFTypes which must be released after they are created. Source
+ *    and destination formats as well as translation flags can be
+ *    queried from the TranslationRef. TranslationRefs are generated
+ *    either by requesting a specific translation via TranslationCreate
+ *    or during discovery of all possible translations via
+ *    TranslationCreateWithSourceArray. It is possible to request
+ *    TranslationRefs which perform either data or file conversions or
+ *    both by using TranslationFlags. When requesting a translation be
+ *    executed via TranslationPerformForData, TranslationPerformForFile
+ *    or TranslationPerformForURL it is important for the source and
+ *    destination data formats to match those found in the
+ *    TranslationRef. 
+ *    
+ *    It is possible to extend the set of system services which provide
+ *    translations by creating what is called a filter service. Filter
+ *    services are applications similar to those which provide the
+ *    services available in the application menu but with a few
+ *    modifications in the application plist. Filter services provide
+ *    an "NSFilter" entry instead of "NSMessage". Filter Services must
+ *    also provide an array of both "NSSendTypes" and "NSReturnTypes"
+ *    containing Uniform Type Identifiers indicating from which formats
+ *    a filter services translates to what format. Each filter service
+ *    may translate multiple send types into a single return type.
+ *    Finally, a filter service must indicate what type of translations
+ *    it supports via the "NSSupportsDataTranslation" and
+ *    "NSSupportsFileTranslation" entries. In the end, a filter
+ *    service's plist may look like the following, 
+ *    
+ *    
+ *    
+ *            <key>NSServices</key> 
+ *                <array> 
+ *                    <dict> 
+ *                        <key>NSFilter</key> 
+ *                        <string>ExampleTranslation</string> 
+ *                        <key>NSReturnTypes</key> 
+ *                        <array> 
+ *                            <string>com.example.returntype</string> 
+ *                        </array> 
+ *                        <key>NSSendTypes</key> 
+ *                        <array> 
+ *                            <string>com.example.sourcetype1</string> 
+ *                            <string>com.example.sourcetype2</string> 
+ *                        </array> 
+ *                        <key>NSSupportsDataTranslation</key> 
+ *                        <string></string> 
+ *                        <key>NSSupportsFileTranslation</key> 
+ *                        <string></string> 
+ *                    </dict> 
+            <array> 
+
+ *    
+ *    
+ *    
+ *    All filter services must handle the kEventServicePerform Carbon
+ *    Event.  The filter service will be automatically launched when
+ *    necessary and it will receive the kEventServicePerform event with
+ *    the message indicated by the NSFilter tag in the plist as well as
+ *    a Pasteboard Manager pasteboard containing flavors indicating
+ *    what type of translation must be performed. If a filter service
+ *    only supports data translations a flavor on the pasteboard will
+ *    correspond to one of the type identifiers listed in your plist's
+ *    send types.  Upon translation of the data, the filter service
+ *    must clear the pasteboard, add the return identifier and
+ *    translated data to the pasteboard, and return from the event. For
+ *    a filter service which provides file translations,
+ *    "public.file-url" and "com.apple.file-contents-type" will be
+ *    available on the pasteboard indicating the file location and
+ *    contents format from which to translate. Upon translation, the
+ *    filter service should place a "public.file-url" flavor on the
+ *    pasteboard indicating where the translated file has been placed,
+ *    typically next to the orignal named "<filename> (converted)"
+ *    (ala. Finder's "<filename> copy" behavior for duplicated files).
+ }
+type
+	TranslationRef = ^SInt32; { an opaque 32-bit type }
+{ Translation Services error codes}
+const
+                                  {invalidTranslationPathErr   = -3025}
+                                  {couldNotParseSourceFileErr  = -3026}
+                                  {noTranslationPathErr         = -3030          // no translation for source and destination provided}
+                                  {badTranslationSpecErr      = -3031}
+                                  {noPrefAppErr              = -3032}
+	badTranslationRefErr = -3031; { TranslationRef does not perform translation requested}
+
+
+{
+ *  TranslationFlags
+ *  
+ *  Summary:
+ *    The following constants are used by the translation creation
+ *    routines to indicate which types of translations are requested.
+ *    The flags are cumulative (ie. when passing both
+ *    kTranslationDataTranslation and kTranslationFileTranslation the
+ *    client is requesting only those translations which support both
+ *    data AND file translations).
+ }
+type
+	TranslationFlags = UInt32;
+const
+{
+   * Indicates that the client is interested in translations which
+   * provide data translations.
+   }
+	kTranslationDataTranslation = 1 shl 0;
+
+  {
+   * Indicates that the client is interested in translations which
+   * provide file translations.
+   }
+	kTranslationFileTranslation = 1 shl 1;
+
+{
+ *  TranslationGetTypeID()
+ *  
+ *  Summary:
+ *    Returns the CFType identifier for a translation object.
+ *  
+ *  Mac OS X threading:
+ *    Not thread safe
+ *  
+ *  Result:
+ *    A CFTypeID unique to translation instances.
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
+ *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ *    Non-Carbon CFM:   not available
+ }
+function TranslationGetTypeID: CFTypeID; external name '_TranslationGetTypeID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ *  TranslationCreate()
+ *  
+ *  Summary:
+ *    Creates a translation reference describing a system service
+ *    providing translations of data from the source type to the
+ *    destination type.
+ *  
+ *  Mac OS X threading:
+ *    Not thread safe
+ *  
+ *  Parameters:
+ *    
+ *    inSourceType:
+ *      A Uniform Type Identifier specifying the format of source data
+ *      to be translated.
+ *    
+ *    inDestinationType:
+ *      A Uniform Type Identifier specifying the destination format to
+ *      which the source data should be translated.
+ *    
+ *    inTranslationFlags:
+ *      A set of TranslationFlags indicating what type of translation
+ *      is requested.
+ *    
+ *    outTranslation:
+ *      A TranslationRef reference which receives the requested
+ *      translation if a system service providing the translation
+ *      exists.
+ *  
+ *  Result:
+ *    An operating system result code.
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
+ *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ *    Non-Carbon CFM:   not available
+ }
+function TranslationCreate( inSourceType: CFStringRef; inDestinationType: CFStringRef; inTranslationFlags: TranslationFlags; var outTranslation: TranslationRef ): OSStatus; external name '_TranslationCreate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ *  TranslationCreateWithSourceArray()
+ *  
+ *  Summary:
+ *    Creates a list of destination flavors translation references
+ *    describing various system services providing translations of data
+ *    from the source types to the destination types.
+ *  
+ *  Mac OS X threading:
+ *    Not thread safe
+ *  
+ *  Parameters:
+ *    
+ *    inSourceTypes:
+ *      An array of Uniform Type Identifiers specifying the formats of
+ *      source data to be translated.
+ *    
+ *    inTranslationFlags:
+ *      A set of TranslationFlags indicating what type of translations
+ *      are requested.
+ *    
+ *    outDestinationTypes:
+ *      A CFArrayRef reference which receives an array of Uniform Type
+ *      Identifiers specifying what destination formats are available
+ *      as translations of the provided source formats. Any destination
+ *      formats already represented as a format in the source array are
+ *      excluded from the returned list. The search for destination
+ *      formats is performed in the order of source formats. This array
+ *      must be released by the client.
+ *    
+ *    outTranslations:
+ *      A CFDictionaryRef reference which receives a dictionary of
+ *      TranslationRefs representing all translations provided by
+ *      system services. The dictionary is keyed by destination flavor.
+ *      Any translations with destination formats already represented
+ *      as a format in the source array are excluded from the returned
+ *      dictionary. This dictionary must be released by the client.
+ *  
+ *  Result:
+ *    An operating system result code.
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
+ *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ *    Non-Carbon CFM:   not available
+ }
+function TranslationCreateWithSourceArray( inSourceTypes: CFArrayRef; inTranslationFlags: TranslationFlags; var outDestinationTypes: CFArrayRef; var outTranslations: CFDictionaryRef ): OSStatus; external name '_TranslationCreateWithSourceArray';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ *  TranslationPerformForData()
+ *  
+ *  Summary:
+ *    Executes the translation of source data into destination data. 
+ *    The formats of the source and destination data are contained
+ *    within the TranslationRef.
+ *  
+ *  Mac OS X threading:
+ *    Not thread safe
+ *  
+ *  Parameters:
+ *    
+ *    inTranslation:
+ *      A TranslationRef containing information on the source and
+ *      destination data formats and how to execute a translation from
+ *      one to the other. The formats of the source and destination
+ *      data must correspond to those indicated by the TranslationRef.
+ *    
+ *    inSourceData:
+ *      A CFDataRef containing data to be translated.
+ *    
+ *    outDestinationData:
+ *      A CFDataRef reference which receives the translated data.
+ *  
+ *  Result:
+ *    An operating system result code.
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
+ *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ *    Non-Carbon CFM:   not available
+ }
+function TranslationPerformForData( inTranslation: TranslationRef; inSourceData: CFDataRef; var outDestinationData: CFDataRef ): OSStatus; external name '_TranslationPerformForData';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ *  TranslationPerformForFile()
+ *  
+ *  Summary:
+ *    Executes the translation of source file contents to a destination
+ *    file content format. The formats of the source and destination
+ *    file contents are held within the TranslationRef.
+ *  
+ *  Mac OS X threading:
+ *    Not thread safe
+ *  
+ *  Parameters:
+ *    
+ *    inTranslation:
+ *      A TranslationRef containing information on the source and
+ *      destination file content formats and how to execute a
+ *      translation from one to the other. The formats of the source
+ *      and destination file contents must correspond to those
+ *      indicated by the TranslationRef.
+ *    
+ *    inSourceFile:
+ *      A FSRef reference pointing to a file whose contents are to be
+ *      translated.
+ *    
+ *    inDestinationDirectory:
+ *      An optional FSRef reference pointing to the desired directory
+ *      for the translation. By default the destination directory is
+ *      the same as the source file.
+ *    
+ *    inDestinationName:
+ *      An optional CFStringRef indicating the desired name for the
+ *      translated file. By default the translated file's name will be
+ *      "<filename> (converted)" (ala. Finder's "<filename> copy"
+ *      behavior for duplicated files).
+ *    
+ *    outTranslatedFile:
+ *      A FSRef reference which receives a new file with the translated
+ *      contents. It is possible for the translated file to not have
+ *      been created in the directory or with the name requested by the
+ *      client due to disk space or translator limitations. It is
+ *      important to rely only on the file reference returned in this
+ *      parameter.
+ *  
+ *  Result:
+ *    An operating system result code.
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
+ *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ *    Non-Carbon CFM:   not available
+ }
+function TranslationPerformForFile( inTranslation: TranslationRef; const (*var*) inSourceFile: FSRef; {const} inDestinationDirectory: FSRefPtr { can be NULL }; inDestinationName: CFStringRef { can be NULL }; var outTranslatedFile: FSRef ): OSStatus; external name '_TranslationPerformForFile';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ *  TranslationPerformForURL()
+ *  
+ *  Summary:
+ *    Executes the translation of source data pointed to a URL to a
+ *    destination format. The formats of the source and destination URL
+ *    contents are held within the TranslationRef. Currently, only file
+ *    URLs are accepted for URL translations.
+ *  
+ *  Mac OS X threading:
+ *    Not thread safe
+ *  
+ *  Parameters:
+ *    
+ *    inTranslation:
+ *      A TranslationRef containing information on the source and
+ *      destination URL content formats and how to execute a
+ *      translation from one to the other. The formats of the source
+ *      and destination URL contents must correspond to those indicated
+ *      by the TranslationRef.
+ *    
+ *    inSourceURL:
+ *      A CFURLRef pointing to source data whose contents are to be
+ *      translated.  Currently, only file URLs are accepted for URL
+ *      translations.
+ *    
+ *    inDestinationURL:
+ *      An optional CFURLRef indicating the desired location for the
+ *      translated data. File URLs may either indicate the desired
+ *      destination directory or directory and name for the translated
+ *      file. By default for file URLs, the translated file's name will
+ *      be "<filename> (converted)" (ala. Finder's "<filename> copy"
+ *      behavior for duplicated files).
+ *    
+ *    outTranslatedURL:
+ *      A FSRef reference which receives a new file with the translated
+ *      contents. For file URLs, it is possible for the translated file
+ *      to not have been created in the directory or with the name
+ *      requested by the client due to disk space or translator
+ *      limitations. It is important to rely only on the URL returned
+ *      in this parameter.
+ *  
+ *  Result:
+ *    An operating system result code.
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
+ *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ *    Non-Carbon CFM:   not available
+ }
+function TranslationPerformForURL( inTranslation: TranslationRef; inSourceURL: CFURLRef; inDestinationURL: CFURLRef { can be NULL }; var outTranslatedURL: CFURLRef ): OSStatus; external name '_TranslationPerformForURL';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ *  TranslationCopySourceType()
+ *  
+ *  Summary:
+ *    Accesses a translation's source type.
+ *  
+ *  Mac OS X threading:
+ *    Not thread safe
+ *  
+ *  Parameters:
+ *    
+ *    inTranslation:
+ *      A TranslationRef containing the requested source type.
+ *    
+ *    outSourceType:
+ *      A CFStringRef which receives the TranslationRef's source type.
+ *  
+ *  Result:
+ *    An operating system result code.
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
+ *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ *    Non-Carbon CFM:   not available
+ }
+function TranslationCopySourceType( inTranslation: TranslationRef; var outSourceType: CFStringRef ): OSStatus; external name '_TranslationCopySourceType';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ *  TranslationCopyDestinationType()
+ *  
+ *  Summary:
+ *    Accesses a translation's destination type.
+ *  
+ *  Mac OS X threading:
+ *    Not thread safe
+ *  
+ *  Parameters:
+ *    
+ *    inTranslation:
+ *      A TranslationRef containing the requested destination type.
+ *    
+ *    outDestinationType:
+ *      A CFStringRef which receives the TranslationRef's destination
+ *      type.
+ *  
+ *  Result:
+ *    An operating system result code.
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
+ *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ *    Non-Carbon CFM:   not available
+ }
+function TranslationCopyDestinationType( inTranslation: TranslationRef; var outDestinationType: CFStringRef ): OSStatus; external name '_TranslationCopyDestinationType';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ *  TranslationGetTranslationFlags()
+ *  
+ *  Summary:
+ *    Accesses a translation's flags.
+ *  
+ *  Mac OS X threading:
+ *    Not thread safe
+ *  
+ *  Parameters:
+ *    
+ *    inTranslation:
+ *      A TranslationRef containing the requested flags.
+ *    
+ *    outTranslationFlags:
+ *      A TranslationFlags which receives the TranslationRef's flags.
+ *  
+ *  Result:
+ *    An operating system result code.
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
+ *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ *    Non-Carbon CFM:   not available
+ }
+function TranslationGetTranslationFlags( inTranslation: TranslationRef; var outTranslationFlags: TranslationFlags ): OSStatus; external name '_TranslationGetTranslationFlags';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+end.

+ 6 - 6
packages/extra/univint/UTCUtils.pas

@@ -163,7 +163,7 @@ function ConvertUTCToLocalTime(utcSeconds: UInt32; var localSeconds: UInt32): OS
  *    CarbonLib:        in CarbonLib 1.0.2 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function ConvertUTCToLocalDateTime(const (*var*) utcDateTime: UTCDateTime; var localDateTime: LocalDateTime): OSStatus; external name '_ConvertUTCToLocalDateTime';
+function ConvertUTCToLocalDateTime(const (*var*) utcDateTime_: UTCDateTime; var localDateTime_: LocalDateTime): OSStatus; external name '_ConvertUTCToLocalDateTime';
 
 {
  *  ConvertLocalToUTCDateTime()
@@ -173,7 +173,7 @@ function ConvertUTCToLocalDateTime(const (*var*) utcDateTime: UTCDateTime; var l
  *    CarbonLib:        in CarbonLib 1.0.2 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function ConvertLocalToUTCDateTime(const (*var*) localDateTime: LocalDateTime; var utcDateTime: UTCDateTime): OSStatus; external name '_ConvertLocalToUTCDateTime';
+function ConvertLocalToUTCDateTime(const (*var*) localDateTime_: LocalDateTime; var utcDateTime_: UTCDateTime): OSStatus; external name '_ConvertLocalToUTCDateTime';
 
 { Getter and Setter Clock routines using 64 Bit values }
 {
@@ -184,7 +184,7 @@ function ConvertLocalToUTCDateTime(const (*var*) localDateTime: LocalDateTime; v
  *    CarbonLib:        in CarbonLib 1.0.2 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function GetUTCDateTime(var utcDateTime: UTCDateTime; options: OptionBits): OSStatus; external name '_GetUTCDateTime';
+function GetUTCDateTime(var utcDateTime_: UTCDateTime; options: OptionBits): OSStatus; external name '_GetUTCDateTime';
 
 {
  *  SetUTCDateTime()
@@ -194,7 +194,7 @@ function GetUTCDateTime(var utcDateTime: UTCDateTime; options: OptionBits): OSSt
  *    CarbonLib:        in CarbonLib 1.0.2 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function SetUTCDateTime(const (*var*) utcDateTime: UTCDateTime; options: OptionBits): OSStatus; external name '_SetUTCDateTime';
+function SetUTCDateTime(const (*var*) utcDateTime_: UTCDateTime; options: OptionBits): OSStatus; external name '_SetUTCDateTime';
 
 {
  *  GetLocalDateTime()
@@ -204,7 +204,7 @@ function SetUTCDateTime(const (*var*) utcDateTime: UTCDateTime; options: OptionB
  *    CarbonLib:        in CarbonLib 1.0.2 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function GetLocalDateTime(var localDateTime: LocalDateTime; options: OptionBits): OSStatus; external name '_GetLocalDateTime';
+function GetLocalDateTime(var localDateTime_: LocalDateTime; options: OptionBits): OSStatus; external name '_GetLocalDateTime';
 
 {
  *  SetLocalDateTime()
@@ -214,7 +214,7 @@ function GetLocalDateTime(var localDateTime: LocalDateTime; options: OptionBits)
  *    CarbonLib:        in CarbonLib 1.0.2 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function SetLocalDateTime(const (*var*) localDateTime: LocalDateTime; options: OptionBits): OSStatus; external name '_SetLocalDateTime';
+function SetLocalDateTime(const (*var*) localDateTime_: LocalDateTime; options: OptionBits): OSStatus; external name '_SetLocalDateTime';
 
 {$ALIGN MAC68K}
 

+ 1375 - 0
packages/extra/univint/UTCoreTypes.pas

@@ -0,0 +1,1375 @@
+{
+     File:       LaunchServices/UTCoreTypes.h
+ 
+     Contains:   String constants for core uniform type identifiers
+ 
+     Version:    LaunchServices-155.0.81~2
+ 
+     Copyright:  © 2004-2005 by Apple Computer, Inc., all rights reserved.
+ 
+}
+
+{	 Pascal Translation:  Gale R Paeper, <[email protected]>, 2006 }
+
+{
+    Modified for use with Free Pascal
+    Version 200
+    Please report any bugs to <[email protected]>
+}
+
+{$mode macpas}
+{$packenum 1}
+{$macro on}
+{$inline on}
+{$CALLING MWPASCAL}
+
+unit UTCoreTypes;
+interface
+{$setc UNIVERSAL_INTERFACES_VERSION := $0342}
+{$setc GAP_INTERFACES_VERSION := $0200}
+
+{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
+    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
+{$endc}
+
+{$ifc defined CPUPOWERPC and defined CPUI386}
+	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
+{$endc}
+{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
+	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
+{$endc}
+
+{$ifc not defined __ppc__ and defined CPUPOWERPC}
+	{$setc __ppc__ := 1}
+{$elsec}
+	{$setc __ppc__ := 0}
+{$endc}
+{$ifc not defined __i386__ and defined CPUI386}
+	{$setc __i386__ := 1}
+{$elsec}
+	{$setc __i386__ := 0}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
+	{$error Conflicting definitions for __ppc__ and __i386__}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__}
+	{$setc TARGET_CPU_PPC := TRUE}
+	{$setc TARGET_CPU_X86 := FALSE}
+{$elifc defined __i386__ and __i386__}
+	{$setc TARGET_CPU_PPC := FALSE}
+	{$setc TARGET_CPU_X86 := TRUE}
+{$elsec}
+	{$error Neither __ppc__ nor __i386__ is defined.}
+{$endc}
+{$setc TARGET_CPU_PPC_64 := FALSE}
+
+{$ifc defined FPC_BIG_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
+{$elifc defined FPC_LITTLE_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
+{$elsec}
+	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
+{$endc}
+{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
+{$setc CALL_NOT_IN_CARBON := FALSE}
+{$setc OLDROUTINENAMES := FALSE}
+{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
+{$setc OPAQUE_UPP_TYPES := TRUE}
+{$setc OTCARBONAPPLICATION := TRUE}
+{$setc OTKERNEL := FALSE}
+{$setc PM_USE_SESSION_APIS := TRUE}
+{$setc TARGET_API_MAC_CARBON := TRUE}
+{$setc TARGET_API_MAC_OS8 := FALSE}
+{$setc TARGET_API_MAC_OSX := TRUE}
+{$setc TARGET_CARBON := TRUE}
+{$setc TARGET_CPU_68K := FALSE}
+{$setc TARGET_CPU_MIPS := FALSE}
+{$setc TARGET_CPU_SPARC := FALSE}
+{$setc TARGET_OS_MAC := TRUE}
+{$setc TARGET_OS_UNIX := FALSE}
+{$setc TARGET_OS_WIN32 := FALSE}
+{$setc TARGET_RT_MAC_68881 := FALSE}
+{$setc TARGET_RT_MAC_CFM := FALSE}
+{$setc TARGET_RT_MAC_MACHO := TRUE}
+{$setc TYPED_FUNCTION_POINTERS := TRUE}
+{$setc TYPE_BOOL := FALSE}
+{$setc TYPE_EXTENDED := FALSE}
+{$setc TYPE_LONGLONG := TRUE}
+uses CFBase;
+{$ALIGN POWER}
+
+
+{ ================================================================================ *
+ *  Abstract base types                                                             *
+ * ================================================================================ }
+{
+ *  kUTTypeItem
+ *
+ *    generic base type for most things
+ *    (files, directories)
+ *
+ *    UTI: public.item
+ *
+ *
+ *  kUTTypeContent
+ *
+ *    base type for anything containing user-viewable document content
+ *    (documents, pasteboard data, and document packages)
+ *
+ *    UTI: public.content
+ *
+ *
+ *  kUTTypeCompositeContent
+ *
+ *    base type for content formats supporting mixed embedded content
+ *    (i.e., compound documents)
+ *
+ *    UTI: public.composite-content
+ *    conforms to: public.content
+ *
+ *
+ *  kUTTypeApplication
+ *
+ *    base type for Mac OS X applications, launchable items
+ *
+ *    UTI: com.apple.application
+ *
+ *
+ *  kUTTypeMessage
+ *
+ *    base type for messages (email, IM, etc.)
+ *
+ *    UTI: public.message
+ *
+ *
+ *  kUTTypeContact
+ *
+ *    contact information, e.g. for a person, group, organization
+ *
+ *    UTI: public.contact
+ *
+ *
+ *  kUTTypeArchive
+ *
+ *    an archive of files and directories
+ *
+ *    UTI: public.archive
+ *
+ *
+ *  kUTTypeDiskImage
+ *
+ *    a data item mountable as a volume
+ *
+ *    UTI: public.disk-image
+ }
+{
+ *  kUTTypeItem
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeItem: CFStringRef; external name '_kUTTypeItem'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeContent
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeContent: CFStringRef; external name '_kUTTypeContent'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeCompositeContent
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeCompositeContent: CFStringRef; external name '_kUTTypeCompositeContent'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeApplication
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeApplication: CFStringRef; external name '_kUTTypeApplication'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeMessage
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeMessage: CFStringRef; external name '_kUTTypeMessage'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeContact
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeContact: CFStringRef; external name '_kUTTypeContact'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeArchive
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeArchive: CFStringRef; external name '_kUTTypeArchive'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeDiskImage
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeDiskImage: CFStringRef; external name '_kUTTypeDiskImage'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{ ================================================================================ *
+ *  Concrete base types                                                             *
+ * ================================================================================ }
+{
+ *  kUTTypeData
+ *
+ *    base type for any sort of simple byte stream,
+ *    including files and in-memory data
+ *
+ *    UTI: public.data
+ *    conforms to: public.item
+ *
+ *
+ *  kUTTypeDirectory
+ *
+ *    file system directory 
+ *    (includes packages AND folders)
+ *
+ *    UTI: public.directory
+ *    conforms to: public.item
+ *
+ *
+ *  kUTTypeResolvable
+ *
+ *    anything the Alias Manager can resolve
+ *
+ *    UTI: com.apple.resolvable
+ *
+ *
+ *  kUTTypeSymLink
+ *
+ *    a symbolic link
+ *
+ *    UTI: public.symlink
+ *    conforms to: public.item, com.apple.resolvable
+ *
+ *
+ *  kUTTypeMountPoint
+ *
+ *    a volume mount point (resolvable, resolves to the root dir of a volume)
+ *
+ *    UTI: com.apple.mount-point
+ *    conforms to: public.item, com.apple.resolvable
+ *
+ *
+ *  kUTTypeAliasFile
+ *
+ *    a fully-formed alias file
+ *
+ *    UTI: com.apple.alias-file
+ *    conforms to: public.data, com.apple.resolvable
+ *
+ *
+ *  kUTTypeAliasRecord
+ *
+ *    raw alias data
+ *
+ *    UTI: com.apple.alias-record
+ *    conforms to: public.data, com.apple.resolvable
+ *
+ *
+ *  kUTTypeURL
+ *
+ *    The bytes of a URL
+ *    (OSType 'url ')
+ *
+ *    UTI: public.url
+ *    conforms to: public.data
+ *
+ *
+ *  kUTTypeFileURL
+ *
+ *    The text of a "file:" URL 
+ *    (OSType 'furl')
+ *
+ *    UTI: public.file-url
+ *    conforms to: public.url
+ }
+{
+ *  kUTTypeData
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeData: CFStringRef; external name '_kUTTypeData'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeDirectory
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeDirectory: CFStringRef; external name '_kUTTypeDirectory'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeResolvable
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeResolvable: CFStringRef; external name '_kUTTypeResolvable'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeSymLink
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeSymLink: CFStringRef; external name '_kUTTypeSymLink'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeMountPoint
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeMountPoint: CFStringRef; external name '_kUTTypeMountPoint'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeAliasFile
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeAliasFile: CFStringRef; external name '_kUTTypeAliasFile'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeAliasRecord
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeAliasRecord: CFStringRef; external name '_kUTTypeAliasRecord'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeURL
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeURL: CFStringRef; external name '_kUTTypeURL'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeFileURL
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeFileURL: CFStringRef; external name '_kUTTypeFileURL'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{ ================================================================================ *
+ *  Text types                                                                      *
+ * ================================================================================ }
+{
+ *  kUTTypeText
+ *
+ *    base type for all text-encoded data, 
+ *    including text with markup (HTML, RTF, etc.)
+ *
+ *    UTI: public.text
+ *    conforms to: public.data, public.content
+ *
+ *
+ *  kUTTypePlainText
+ *
+ *    text with no markup, unspecified encoding
+ *
+ *    UTI: public.plain-text
+ *    conforms to: public.text
+ *
+ *
+ *  kUTTypeUTF8PlainText
+ *
+ *    plain text, UTF-8 encoding
+ *    (OSType 'utf8', NSPasteboardType "NSStringPBoardType")
+ *
+ *    UTI: public.utf8-plain-text
+ *    conforms to: public.plain-text
+ *
+ *
+ *  kUTTypeUTF16ExternalPlainText
+ *
+ *    plain text, UTF-16 encoding, with BOM, or if BOM 
+ *    is not present, has "external representation" 
+ *    byte order (big-endian).
+ *    (OSType 'ut16')
+ *
+ *    UTI: public.utf16-external-plain-text
+ *    conforms to: public.plain-text
+ *
+ *
+ *  kUTTypeUTF16PlainText
+ *
+ *    plain text, UTF-16 encoding, native byte order, no BOM
+ *    (OSType 'utxt')
+ *
+ *    UTI: public.utf16-plain-text
+ *    conforms to: public.plain-text
+ *
+ *
+ *  kUTTypeRTF
+ *
+ *    Rich Text Format
+ *
+ *    UTI: public.rtf
+ *    conforms to: public.text
+ *
+ *
+ *  kUTTypeHTML
+ *
+ *    HTML, any version
+ *
+ *    UTI: public.html
+ *    conforms to: public.text
+ *
+ *
+ *  kUTTypeXML
+ *
+ *    generic XML
+ *
+ *    UTI: public.xml
+ *    conforms to: public.text
+ *
+ *
+ *  kUTTypeSourceCode
+ *
+ *    abstract type for source code (any language)
+ *
+ *    UTI: public.source-code
+ *    conforms to: public.plain-text
+ *
+ *
+ *  kUTTypeCSource
+ *
+ *    C source code (.c)
+ *
+ *    UTI: public.c-source
+ *    conforms to: public.plain-text
+ *
+ *
+ *  kUTTypeObjectiveCSource
+ *
+ *    Objective-C source code (.m)
+ *
+ *    UTI: public.objective-c-source
+ *    conforms to: public.plain-text
+ *
+ *
+ *  kUTTypeCPlusPlusSource
+ *
+ *    C++ source code (.cp, etc.)
+ *
+ *    UTI: public.c-plus-plus-source
+ *    conforms to: public.plain-text
+ *
+ *
+ *  kUTTypeObjectiveCPlusPlusSource
+ *
+ *    Objective-C++ source code
+ *
+ *    UTI: public.objective-c-plus-plus-source
+ *    conforms to: public.plain-text
+ *
+ *
+ *  kUTTypeCHeader
+ *
+ *    C header
+ *
+ *    UTI: public.c-header
+ *    conforms to: public.plain-text
+ *
+ *
+ *  kUTTypeCPlusPlusHeader
+ *
+ *    C++ header
+ *
+ *    UTI: public.c-plus-plus-header
+ *    conforms to: public.plain-text
+ *
+ *
+ *  kUTTypeJavaSource
+ *
+ *    Java source code
+ *
+ *    UTI: com.sun.java-source
+ *    conforms to: public.plain-text
+ }
+{
+ *  kUTTypeText
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeText: CFStringRef; external name '_kUTTypeText'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypePlainText
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypePlainText: CFStringRef; external name '_kUTTypePlainText'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeUTF8PlainText
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeUTF8PlainText: CFStringRef; external name '_kUTTypeUTF8PlainText'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeUTF16ExternalPlainText
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeUTF16ExternalPlainText: CFStringRef; external name '_kUTTypeUTF16ExternalPlainText'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeUTF16PlainText
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeUTF16PlainText: CFStringRef; external name '_kUTTypeUTF16PlainText'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeRTF
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeRTF: CFStringRef; external name '_kUTTypeRTF'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeHTML
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeHTML: CFStringRef; external name '_kUTTypeHTML'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeXML
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeXML: CFStringRef; external name '_kUTTypeXML'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeSourceCode
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeSourceCode: CFStringRef; external name '_kUTTypeSourceCode'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeCSource
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeCSource: CFStringRef; external name '_kUTTypeCSource'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeObjectiveCSource
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeObjectiveCSource: CFStringRef; external name '_kUTTypeObjectiveCSource'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeCPlusPlusSource
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeCPlusPlusSource: CFStringRef; external name '_kUTTypeCPlusPlusSource'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeObjectiveCPlusPlusSource
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeObjectiveCPlusPlusSource: CFStringRef; external name '_kUTTypeObjectiveCPlusPlusSource'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeCHeader
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeCHeader: CFStringRef; external name '_kUTTypeCHeader'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeCPlusPlusHeader
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeCPlusPlusHeader: CFStringRef; external name '_kUTTypeCPlusPlusHeader'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeJavaSource
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeJavaSource: CFStringRef; external name '_kUTTypeJavaSource'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ ================================================================================ *
+ *  Composite content types                                                         *
+ * ================================================================================ }
+{
+ *  kUTTypePDF
+ *
+ *    Adobe PDF
+ *
+ *    UTI: com.adobe.pdf
+ *    conforms to: public.data, public.composite-content
+ *
+ *
+ *  kUTTypeRTFD
+ *
+ *    Rich Text Format Directory 
+ *    (RTF with content embedding, on-disk format)
+ *
+ *    UTI: com.apple.rtfd
+ *    conforms to: com.apple.package, public.composite-content
+ *
+ *
+ *  kUTTypeFlatRTFD
+ *
+ *    Flattened RTFD (pasteboard format)
+ *
+ *    UTI: com.apple.flat-rtfd
+ *    conforms to: public.data, public.composite-content
+ *
+ *
+ *  kUTTypeTXNTextAndMultimediaData
+ *
+ *    MLTE (Textension) format for mixed text & multimedia data
+ *    (OSType 'txtn')
+ *
+ *    UTI: com.apple.txn.text-multimedia-data
+ *    conforms to: public.data, public.composite-content
+ *
+ *
+ *  kUTTypeWebArchive
+ *
+ *    The WebKit webarchive format
+ *
+ *    UTI: com.apple.webarchive
+ *    conforms to: public.data, public.composite-content
+ }
+{
+ *  kUTTypePDF
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypePDF: CFStringRef; external name '_kUTTypePDF'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeRTFD
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeRTFD: CFStringRef; external name '_kUTTypeRTFD'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeFlatRTFD
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeFlatRTFD: CFStringRef; external name '_kUTTypeFlatRTFD'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeTXNTextAndMultimediaData
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeTXNTextAndMultimediaData: CFStringRef; external name '_kUTTypeTXNTextAndMultimediaData'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeWebArchive
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeWebArchive: CFStringRef; external name '_kUTTypeWebArchive'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ ================================================================================ *
+ *  Image content types                                                             *
+ * ================================================================================ }
+{
+ *  kUTTypeImage
+ *
+ *    abstract image data
+ *
+ *    UTI: public.image
+ *    conforms to: public.data, public.content
+ *
+ *
+ *  kUTTypeJPEG
+ *
+ *    JPEG image
+ *
+ *    UTI: public.jpeg
+ *    conforms to: public.image
+ *
+ *
+ *  kUTTypeJPEG2000
+ *
+ *    JPEG-2000 image
+ *
+ *    UTI: public.jpeg-2000
+ *    conforms to: public.image
+ *
+ *
+ *  kUTTypeTIFF
+ *
+ *    TIFF image
+ *
+ *    UTI: public.tiff
+ *    conforms to: public.image
+ *
+ *
+ *  kUTTypePICT
+ *
+ *    Quickdraw PICT format
+ *
+ *    UTI: com.apple.pict
+ *    conforms to: public.image
+ *
+ *
+ *  kUTTypeGIF
+ *
+ *    GIF image
+ *
+ *    UTI: com.compuserve.gif
+ *    conforms to: public.image
+ *
+ *
+ *  kUTTypePNG
+ *
+ *    PNG image
+ *
+ *    UTI: public.png
+ *    conforms to: public.image
+ *
+ *
+ *  kUTTypeQuickTimeImage
+ *
+ *    QuickTime image format (OSType 'qtif')
+ *
+ *    UTI: com.apple.quicktime-image
+ *    conforms to: public.image
+ *
+ *
+ *  kUTTypeAppleICNS
+ *
+ *    Apple icon data
+ *
+ *    UTI: com.apple.icns
+ *    conforms to: public.image
+ *
+ *
+ *  kUTTypeBMP
+ *
+ *    Windows bitmap
+ *
+ *    UTI: com.microsoft.bmp
+ *    conforms to: public.image
+ *
+ *
+ *  kUTTypeICO
+ *
+ *    Windows icon data
+ *
+ *    UTI: com.microsoft.ico
+ *    conforms to: public.image
+ }
+{
+ *  kUTTypeImage
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeImage: CFStringRef; external name '_kUTTypeImage'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeJPEG
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeJPEG: CFStringRef; external name '_kUTTypeJPEG'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeJPEG2000
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeJPEG2000: CFStringRef; external name '_kUTTypeJPEG2000'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeTIFF
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeTIFF: CFStringRef; external name '_kUTTypeTIFF'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypePICT
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypePICT: CFStringRef; external name '_kUTTypePICT'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeGIF
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeGIF: CFStringRef; external name '_kUTTypeGIF'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypePNG
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypePNG: CFStringRef; external name '_kUTTypePNG'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeQuickTimeImage
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeQuickTimeImage: CFStringRef; external name '_kUTTypeQuickTimeImage'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeAppleICNS
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeAppleICNS: CFStringRef; external name '_kUTTypeAppleICNS'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeBMP
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeBMP: CFStringRef; external name '_kUTTypeBMP'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeICO
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeICO: CFStringRef; external name '_kUTTypeICO'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ ================================================================================ *
+ *  Audiovisual content types                                                       *
+ * ================================================================================ }
+{
+ *  kUTTypeAudiovisualContent
+ *
+ *    audio and/or video content
+ *
+ *    UTI: public.audiovisual-content
+ *    conforms to: public.data, public.content
+ *
+ *
+ *  kUTTypeMovie
+ *
+ *    A media format which may contain both video and audio
+ *    Corresponds to what users would label a "movie"
+ *
+ *    UTI: public.movie
+ *    conforms to: public.audiovisual-content
+ *
+ *
+ *  kUTTypeVideo
+ *
+ *    pure video (no audio)
+ *
+ *    UTI: public.video
+ *    conforms to: public.movie
+ *
+ *
+ *  kUTTypeAudio
+ *
+ *    pure audio (no video)
+ *
+ *    UTI: public.audio
+ *    conforms to: public.audiovisual-content
+ *
+ *
+ *  kUTTypeQuickTimeMovie
+ *
+ *    QuickTime movie
+ *
+ *    UTI: com.apple.quicktime-movie
+ *    conforms to: public.movie
+ *
+ *
+ *  kUTTypeMPEG
+ *
+ *    MPEG-1 or MPEG-2 movie
+ *
+ *    UTI: public.mpeg
+ *    conforms to: public.movie
+ *
+ *
+ *  kUTTypeMPEG4
+ *
+ *    MPEG-4 movie
+ *
+ *    UTI: public.mpeg-4
+ *    conforms to: public.movie
+ *
+ *
+ *  kUTTypeMP3
+ *
+ *    MP3 audio
+ *
+ *    UTI: public.mp3
+ *    conforms to: public.audio
+ *
+ *
+ *  kUTTypeMPEG4Audio
+ *
+ *    MPEG-4 audio layer
+ *    (.m4a)
+ *
+ *    UTI: public.mpeg-4-audio
+ *    conforms to: public.mpeg-4, public.audio
+ *
+ *
+ *  kUTTypeAppleProtectedMPEG4Audio
+ *
+ *    Apple protected MPEG4 format
+ *    (.m4p, iTunes music store format)
+ *
+ *    UTI: com.apple.protected-mpeg-4-audio
+ *    conforms to: public.audio
+ }
+{
+ *  kUTTypeAudiovisualContent
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeAudiovisualContent: CFStringRef; external name '_kUTTypeAudiovisualContent'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeMovie
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeMovie: CFStringRef; external name '_kUTTypeMovie'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeVideo
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeVideo: CFStringRef; external name '_kUTTypeVideo'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeAudio
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeAudio: CFStringRef; external name '_kUTTypeAudio'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeQuickTimeMovie
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeQuickTimeMovie: CFStringRef; external name '_kUTTypeQuickTimeMovie'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeMPEG
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeMPEG: CFStringRef; external name '_kUTTypeMPEG'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeMPEG4
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeMPEG4: CFStringRef; external name '_kUTTypeMPEG4'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeMP3
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeMP3: CFStringRef; external name '_kUTTypeMP3'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeMPEG4Audio
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeMPEG4Audio: CFStringRef; external name '_kUTTypeMPEG4Audio'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeAppleProtectedMPEG4Audio
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeAppleProtectedMPEG4Audio: CFStringRef; external name '_kUTTypeAppleProtectedMPEG4Audio'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{ ================================================================================ *
+ *  Directory types                                                                 *
+ * ================================================================================ }
+{
+ *  kUTTypeFolder
+ *
+ *    a user-browsable directory (i.e., not a package)
+ *
+ *    UTI: public.folder
+ *    conforms to: public.directory
+ *
+ *
+ *  kUTTypeVolume
+ *
+ *    the root folder of a volume/mount point
+ *
+ *    UTI: public.volume
+ *    conforms to: public.folder
+ *
+ *
+ *  kUTTypePackage
+ *
+ *    a packaged directory
+ *
+ *    UTI: com.apple.package
+ *    conforms to: public.directory
+ *
+ *
+ *  kUTTypeBundle
+ *
+ *    a directory conforming to one of the CFBundle layouts
+ *
+ *    UTI: com.apple.bundle
+ *    conforms to: public.directory
+ *
+ *
+ *  kUTTypeFramework
+ *
+ *    a Mac OS X framework
+ *
+ *    UTI: com.apple.framework
+ *    conforms to: com.apple.bundle
+ }
+{
+ *  kUTTypeFolder
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeFolder: CFStringRef; external name '_kUTTypeFolder'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeVolume
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeVolume: CFStringRef; external name '_kUTTypeVolume'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypePackage
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypePackage: CFStringRef; external name '_kUTTypePackage'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeBundle
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeBundle: CFStringRef; external name '_kUTTypeBundle'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeFramework
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeFramework: CFStringRef; external name '_kUTTypeFramework'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{ ================================================================================ *
+ *  Application types                                                               *
+ * ================================================================================ }
+{
+ *  kUTTypeApplicationBundle
+ *
+ *    a bundled application
+ *
+ *    UTI: com.apple.application-bundle
+ *    conforms to: com.apple.application, com.apple.bundle, com.apple.package
+ *
+ *
+ *  kUTTypeApplicationFile
+ *
+ *    a single-file Carbon/Classic application 
+ *
+ *    UTI: com.apple.application-file
+ *    conforms to: com.apple.application, public.data
+ }
+{
+ *  kUTTypeApplicationBundle
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeApplicationBundle: CFStringRef; external name '_kUTTypeApplicationBundle'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ *  kUTTypeApplicationFile
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeApplicationFile: CFStringRef; external name '_kUTTypeApplicationFile'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{ ================================================================================ *
+ *  Contact types                                                                   *
+ * ================================================================================ }
+{
+ *  kUTTypeVCard
+ *
+ *    VCard format
+ *
+ *    UTI: public.vcard
+ *    conforms to: public.data, public.contact
+ }
+{
+ *  kUTTypeVCard
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeVCard: CFStringRef; external name '_kUTTypeVCard'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{ ================================================================================ *
+ *  Misc. types                                                                     *
+ * ================================================================================ }
+{
+ *  kUTTypeInkText
+ *
+ *    Opaque InkText data
+ *
+ *    UTI: com.apple.ink.inktext
+ *    conforms to: public.data
+ }
+{
+ *  kUTTypeInkText
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available
+ *    Non-Carbon CFM:   not available
+ }
+var kUTTypeInkText: CFStringRef; external name '_kUTTypeInkText'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+end.

+ 4 - 4
packages/extra/univint/UnicodeUtilities.pas

@@ -437,7 +437,7 @@ function UCKeyTranslate(const (*var*) keyLayoutPtr: UCKeyboardLayout; virtualKey
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function UCCreateCollator(locale: LocaleRef; opVariant: LocaleOperationVariant; options: UCCollateOptions; var collatorRef: CollatorRef): OSStatus; external name '_UCCreateCollator';
+function UCCreateCollator(locale: LocaleRef; opVariant: LocaleOperationVariant; options: UCCollateOptions; var collatorRef_: CollatorRef): OSStatus; external name '_UCCreateCollator';
 
 {
  *  UCGetCollationKey()
@@ -447,7 +447,7 @@ function UCCreateCollator(locale: LocaleRef; opVariant: LocaleOperationVariant;
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function UCGetCollationKey(collatorRef: CollatorRef; textPtr: ConstUniCharPtr; textLength: UniCharCount; maxKeySize: ItemCount; var actualKeySize: ItemCount; collationKey: UCCollationValuePtr): OSStatus; external name '_UCGetCollationKey';
+function UCGetCollationKey(collatorRef_: CollatorRef; textPtr: ConstUniCharPtr; textLength: UniCharCount; maxKeySize: ItemCount; var actualKeySize: ItemCount; collationKey: UCCollationValuePtr): OSStatus; external name '_UCGetCollationKey';
 
 {
  *  UCCompareCollationKeys()
@@ -467,7 +467,7 @@ function UCCompareCollationKeys(key1Ptr: UCCollationValuePtr; key1Length: ItemCo
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function UCCompareText(collatorRef: CollatorRef; text1Ptr: ConstUniCharPtr; text1Length: UniCharCount; text2Ptr: ConstUniCharPtr; text2Length: UniCharCount; var equivalent: boolean; var order: SInt32): OSStatus; external name '_UCCompareText';
+function UCCompareText(collatorRef_: CollatorRef; text1Ptr: ConstUniCharPtr; text1Length: UniCharCount; text2Ptr: ConstUniCharPtr; text2Length: UniCharCount; var equivalent: boolean; var order: SInt32): OSStatus; external name '_UCCompareText';
 
 {
  *  UCDisposeCollator()
@@ -477,7 +477,7 @@ function UCCompareText(collatorRef: CollatorRef; text1Ptr: ConstUniCharPtr; text
  *    CarbonLib:        in CarbonLib 1.0 and later
  *    Mac OS X:         in version 10.0 and later
  }
-function UCDisposeCollator(var collatorRef: CollatorRef): OSStatus; external name '_UCDisposeCollator';
+function UCDisposeCollator(var collatorRef_: CollatorRef): OSStatus; external name '_UCDisposeCollator';
 
 {  Simple collation using default locale }
 

+ 205 - 0
packages/extra/univint/UniversalAccess.pas

@@ -0,0 +1,205 @@
+{
+     File:       HIServices/UniversalAccess.h
+ 
+     Contains:   Universal Access Interfaces.
+ 
+     Version:    HIServices-169~377
+ 
+     Copyright:  © 2005-2006 by Apple Computer, Inc., all rights reserved.
+ 
+}
+
+{	 Pascal Translation:  Gale R Paeper, <[email protected]>, 2006 }
+
+{
+    Modified for use with Free Pascal
+    Version 200
+    Please report any bugs to <[email protected]>
+}
+
+{$mode macpas}
+{$packenum 1}
+{$macro on}
+{$inline on}
+{$CALLING MWPASCAL}
+
+unit UniversalAccess;
+interface
+{$setc UNIVERSAL_INTERFACES_VERSION := $0342}
+{$setc GAP_INTERFACES_VERSION := $0200}
+
+{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
+    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
+{$endc}
+
+{$ifc defined CPUPOWERPC and defined CPUI386}
+	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
+{$endc}
+{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
+	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
+{$endc}
+
+{$ifc not defined __ppc__ and defined CPUPOWERPC}
+	{$setc __ppc__ := 1}
+{$elsec}
+	{$setc __ppc__ := 0}
+{$endc}
+{$ifc not defined __i386__ and defined CPUI386}
+	{$setc __i386__ := 1}
+{$elsec}
+	{$setc __i386__ := 0}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
+	{$error Conflicting definitions for __ppc__ and __i386__}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__}
+	{$setc TARGET_CPU_PPC := TRUE}
+	{$setc TARGET_CPU_X86 := FALSE}
+{$elifc defined __i386__ and __i386__}
+	{$setc TARGET_CPU_PPC := FALSE}
+	{$setc TARGET_CPU_X86 := TRUE}
+{$elsec}
+	{$error Neither __ppc__ nor __i386__ is defined.}
+{$endc}
+{$setc TARGET_CPU_PPC_64 := FALSE}
+
+{$ifc defined FPC_BIG_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
+{$elifc defined FPC_LITTLE_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
+{$elsec}
+	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
+{$endc}
+{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
+{$setc CALL_NOT_IN_CARBON := FALSE}
+{$setc OLDROUTINENAMES := FALSE}
+{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
+{$setc OPAQUE_UPP_TYPES := TRUE}
+{$setc OTCARBONAPPLICATION := TRUE}
+{$setc OTKERNEL := FALSE}
+{$setc PM_USE_SESSION_APIS := TRUE}
+{$setc TARGET_API_MAC_CARBON := TRUE}
+{$setc TARGET_API_MAC_OS8 := FALSE}
+{$setc TARGET_API_MAC_OSX := TRUE}
+{$setc TARGET_CARBON := TRUE}
+{$setc TARGET_CPU_68K := FALSE}
+{$setc TARGET_CPU_MIPS := FALSE}
+{$setc TARGET_CPU_SPARC := FALSE}
+{$setc TARGET_OS_MAC := TRUE}
+{$setc TARGET_OS_UNIX := FALSE}
+{$setc TARGET_OS_WIN32 := FALSE}
+{$setc TARGET_RT_MAC_68881 := FALSE}
+{$setc TARGET_RT_MAC_CFM := FALSE}
+{$setc TARGET_RT_MAC_MACHO := TRUE}
+{$setc TYPED_FUNCTION_POINTERS := TRUE}
+{$setc TYPE_BOOL := FALSE}
+{$setc TYPE_EXTENDED := FALSE}
+{$setc TYPE_LONGLONG := TRUE}
+uses MacTypes, CGGeometry;
+{$ALIGN POWER}
+
+
+{
+ *  Universal Access
+ *  
+ *  Discussion:
+ *    Universal Access provides apps the ability to control the zoom
+ *    focus. The following functions are provided so that applications
+ *    can tell Universal Access what part of the UI needs focus.
+ }
+
+{
+ *  UAZoomChangeFocusType
+ *  
+ *  Summary:
+ *    Universal Access Zoom Change Focus Types
+ *  
+ *  Discussion:
+ *    The following constants are used to tell Universal Access Zoom
+ *    the type of event that is driving the change in the zoom focus.
+ }
+type
+	UAZoomChangeFocusType = UInt32;
+const
+{
+   * Some event would like focus.
+   }
+	kUAZoomFocusTypeOther = 0;
+
+  {
+   * The text insertion point has moved.
+   }
+	kUAZoomFocusTypeInsertionPoint = 1;
+
+
+{
+ *  UAZoomEnabled()
+ *  
+ *  Summary:
+ *    Determine if Universal Access Zoom is enabled.
+ *  
+ *  Discussion:
+ *    This queries the state of Universal Access Zoom
+ *  
+ *  Mac OS X threading:
+ *    Thread safe
+ *  
+ *  Result:
+ *    TRUE if Universal Access Zoom is on, FALSE if Zoom is off or the
+ *    user has zoomed all the way out.
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ *    Non-Carbon CFM:   not available
+ }
+function UAZoomEnabled: Boolean; external name '_UAZoomEnabled';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ *  UAZoomChangeFocus()
+ *  
+ *  Summary:
+ *    Tell Universal Access where Zoom should focus.
+ *  
+ *  Discussion:
+ *    Tells Universal Access the frame of the element in focus and the
+ *    part of the element that should be in focus.
+ *  
+ *  Mac OS X threading:
+ *    Thread safe
+ *  
+ *  Parameters:
+ *    
+ *    inRect:
+ *      - The frame of the element in focus in global 72dpi coordinates.
+ *    
+ *    inHighlightRect:
+ *      - The frame of highlighted part of the element in focus in
+ *      global 72dpi coordinates.  If the whole element is in focus,
+ *      and not just a smaller part of it, pass the inRect parameter
+ *      and pass NULL for inHighlightRect.
+ *    
+ *    inType:
+ *      - Universal Access Zoom change focus type.
+ *  
+ *  Result:
+ *    OSStatus - noErr if there were no problems or Universal Access
+ *    Zoom is off or zoomed all the way out.  paramErr if inRect is
+ *    NULL or inType is out of range.
+ *  
+ *  Availability:
+ *    Mac OS X:         in version 10.4 and later in ApplicationServices.framework
+ *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ *    Non-Carbon CFM:   not available
+ }
+function UAZoomChangeFocus( const (*var*) inRect: CGRect; inHighlightRect: CGRectPtr; inType: UAZoomChangeFocusType ): OSStatus; external name '_UAZoomChangeFocus';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+end.

+ 151 - 0
packages/extra/univint/xattr.pas

@@ -0,0 +1,151 @@
+{
+ * Copyright (c) 2004-2005 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ }
+{      Pascal Translation:  Peter N Lewis, <[email protected]>, August 2006 }
+{
+    Modified for use with Free Pascal
+    Version 200
+    Please report any bugs to <[email protected]>
+}
+
+{$mode macpas}
+{$packenum 1}
+{$macro on}
+{$inline on}
+{$CALLING MWPASCAL}
+
+unit xattr;
+interface
+{$setc UNIVERSAL_INTERFACES_VERSION := $0342}
+{$setc GAP_INTERFACES_VERSION := $0200}
+
+{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
+    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
+{$endc}
+
+{$ifc defined CPUPOWERPC and defined CPUI386}
+	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
+{$endc}
+{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
+	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
+{$endc}
+
+{$ifc not defined __ppc__ and defined CPUPOWERPC}
+	{$setc __ppc__ := 1}
+{$elsec}
+	{$setc __ppc__ := 0}
+{$endc}
+{$ifc not defined __i386__ and defined CPUI386}
+	{$setc __i386__ := 1}
+{$elsec}
+	{$setc __i386__ := 0}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
+	{$error Conflicting definitions for __ppc__ and __i386__}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__}
+	{$setc TARGET_CPU_PPC := TRUE}
+	{$setc TARGET_CPU_X86 := FALSE}
+{$elifc defined __i386__ and __i386__}
+	{$setc TARGET_CPU_PPC := FALSE}
+	{$setc TARGET_CPU_X86 := TRUE}
+{$elsec}
+	{$error Neither __ppc__ nor __i386__ is defined.}
+{$endc}
+{$setc TARGET_CPU_PPC_64 := FALSE}
+
+{$ifc defined FPC_BIG_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
+{$elifc defined FPC_LITTLE_ENDIAN}
+	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
+	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
+{$elsec}
+	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
+{$endc}
+{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
+{$setc CALL_NOT_IN_CARBON := FALSE}
+{$setc OLDROUTINENAMES := FALSE}
+{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
+{$setc OPAQUE_UPP_TYPES := TRUE}
+{$setc OTCARBONAPPLICATION := TRUE}
+{$setc OTKERNEL := FALSE}
+{$setc PM_USE_SESSION_APIS := TRUE}
+{$setc TARGET_API_MAC_CARBON := TRUE}
+{$setc TARGET_API_MAC_OS8 := FALSE}
+{$setc TARGET_API_MAC_OSX := TRUE}
+{$setc TARGET_CARBON := TRUE}
+{$setc TARGET_CPU_68K := FALSE}
+{$setc TARGET_CPU_MIPS := FALSE}
+{$setc TARGET_CPU_SPARC := FALSE}
+{$setc TARGET_OS_MAC := TRUE}
+{$setc TARGET_OS_UNIX := FALSE}
+{$setc TARGET_OS_WIN32 := FALSE}
+{$setc TARGET_RT_MAC_68881 := FALSE}
+{$setc TARGET_RT_MAC_CFM := FALSE}
+{$setc TARGET_RT_MAC_MACHO := TRUE}
+{$setc TYPED_FUNCTION_POINTERS := TRUE}
+{$setc TYPE_BOOL := FALSE}
+{$setc TYPE_EXTENDED := FALSE}
+{$setc TYPE_LONGLONG := TRUE}
+uses MacTypes;
+{$ALIGN POWER}
+
+const
+// Options for pathname based xattr calls
+	XATTR_NOFOLLOW = $0001;     // Don't follow symbolic links
+
+// Options for setxattr calls
+	XATTR_CREATE = $0002;     // set the value, fail if attr already exists
+	XATTR_REPLACE = $0004;     // set the value, fail if attr does not exist
+
+// Set this to bypass authorization checking (eg. if doing auth-related work)
+	XATTR_NOSECURITY = $0008;
+
+const
+	XATTR_MAXNAMELEN = 127;
+
+const
+	XATTR_FINDERINFO_NAME = 'com.apple.FinderInfo';
+
+const
+	XATTR_RESOURCEFORK_NAME = 'com.apple.ResourceFork';
+
+
+function getxattr( path: ConstCStringPtr; name: ConstCStringPtr; value: UnivPtr; siz: size_t; position: UInt32; options: SInt32 ): ssize_t; external name '_getxattr';
+
+function fgetxattr( fd: SInt32; name: ConstCStringPtr; value: UnivPtr; siz: size_t; position: UInt32; options: SInt32 ): ssize_t; external name '_fgetxattr';
+
+function setxattr( path: ConstCStringPtr; name: ConstCStringPtr; value: {const} UnivPtr; siz: size_t; position: UInt32; options: SInt32 ): SInt32; external name '_setxattr';
+
+function fsetxattr( fd: SInt32; name: ConstCStringPtr; value: {const} UnivPtr; siz: size_t; position: UInt32; options: SInt32 ): SInt32; external name '_fsetxattr';
+
+function removexattr( path: ConstCStringPtr; name: ConstCStringPtr; options: SInt32 ): SInt32; external name '_removexattr';
+
+function fremovexattr( fd: SInt32; name: ConstCStringPtr; options: SInt32 ): SInt32; external name '_fremovexattr';
+
+function listxattr( path: ConstCStringPtr; namebuff: UnivPtr; siz: size_t; options: SInt32 ): ssize_t; external name '_listxattr';
+ 
+function flistxattr( fd: SInt32; namebuff: UnivPtr; siz: size_t; options: SInt32 ): ssize_t; external name '_flistxattr';
+
+end.

部分文件因为文件数量过多而无法显示