Просмотр исходного кода

Mass trailing space removal for packages (part 4).

Margers 1 неделя назад
Родитель
Сommit
3ac6999520
100 измененных файлов с 5070 добавлено и 5070 удалено
  1. 2 2
      packages/univint/src/ABGlobals.pas
  2. 178 178
      packages/univint/src/AEDataModel.pas
  3. 58 58
      packages/univint/src/AEHelpers.pas
  4. 46 46
      packages/univint/src/AEInteraction.pas
  5. 32 32
      packages/univint/src/AEMach.pas
  6. 47 47
      packages/univint/src/AEObjects.pas
  7. 17 17
      packages/univint/src/AEPackObject.pas
  8. 7 7
      packages/univint/src/AERegistry.pas
  9. 7 7
      packages/univint/src/AEUserTermTypes.pas
  10. 4 4
      packages/univint/src/AIFF.pas
  11. 34 34
      packages/univint/src/ASDebugging.pas
  12. 6 6
      packages/univint/src/ASRegistry.pas
  13. 180 180
      packages/univint/src/ATSFont.pas
  14. 26 26
      packages/univint/src/ATSLayoutTypes.pas
  15. 31 31
      packages/univint/src/ATSTypes.pas
  16. 45 45
      packages/univint/src/ATSUnicodeDirectAccess.pas
  17. 162 162
      packages/univint/src/ATSUnicodeDrawing.pas
  18. 61 61
      packages/univint/src/ATSUnicodeFlattening.pas
  19. 169 169
      packages/univint/src/ATSUnicodeFonts.pas
  20. 150 150
      packages/univint/src/ATSUnicodeGlyphs.pas
  21. 174 174
      packages/univint/src/ATSUnicodeObjects.pas
  22. 56 56
      packages/univint/src/ATSUnicodeTypes.pas
  23. 254 254
      packages/univint/src/AUComponent.pas
  24. 126 126
      packages/univint/src/AVLTree.pas
  25. 195 195
      packages/univint/src/AXAttributeConstants.pas
  26. 1 1
      packages/univint/src/AXNotificationConstants.pas
  27. 9 9
      packages/univint/src/AXRoleConstants.pas
  28. 166 166
      packages/univint/src/Aliases.pas
  29. 161 161
      packages/univint/src/Appearance.pas
  30. 6 6
      packages/univint/src/AppleDiskPartitions.pas
  31. 68 68
      packages/univint/src/AppleEvents.pas
  32. 35 35
      packages/univint/src/AppleHelp.pas
  33. 29 29
      packages/univint/src/AppleScript.pas
  34. 147 147
      packages/univint/src/AudioCodecs.pas
  35. 30 30
      packages/univint/src/AudioComponents.pas
  36. 39 39
      packages/univint/src/AudioConverter.pas
  37. 170 170
      packages/univint/src/AudioFile.pas
  38. 72 72
      packages/univint/src/AudioFileComponents.pas
  39. 94 94
      packages/univint/src/AudioFileStream.pas
  40. 65 65
      packages/univint/src/AudioFormat.pas
  41. 11 11
      packages/univint/src/AudioHardware.pas
  42. 7 7
      packages/univint/src/AudioHardwareBase.pas
  43. 4 4
      packages/univint/src/AudioHardwareService.pas
  44. 55 55
      packages/univint/src/AudioQueue.pas
  45. 31 31
      packages/univint/src/AudioServices.pas
  46. 9 9
      packages/univint/src/AudioUnitCarbonViews.pas
  47. 176 176
      packages/univint/src/AudioUnitParameters.pas
  48. 249 249
      packages/univint/src/AudioUnitProperties.pas
  49. 26 26
      packages/univint/src/AudioUnitUtilities.pas
  50. 23 23
      packages/univint/src/AuthSession.pas
  51. 18 18
      packages/univint/src/Authorization.pas
  52. 13 13
      packages/univint/src/AuthorizationDB.pas
  53. 44 44
      packages/univint/src/AuthorizationPlugin.pas
  54. 6 6
      packages/univint/src/AuthorizationTags.pas
  55. 19 19
      packages/univint/src/BackupCore.pas
  56. 2 2
      packages/univint/src/CFArray.pas
  57. 6 6
      packages/univint/src/CFAttributedString.pas
  58. 5 5
      packages/univint/src/CFBase.pas
  59. 8 8
      packages/univint/src/CFBinaryHeap.pas
  60. 1 1
      packages/univint/src/CFCharacterSet.pas
  61. 1 1
      packages/univint/src/CFData.pas
  62. 1 1
      packages/univint/src/CFDate.pas
  63. 7 7
      packages/univint/src/CFDictionary.pas
  64. 12 12
      packages/univint/src/CFError.pas
  65. 71 71
      packages/univint/src/CFFTPStream.pas
  66. 12 12
      packages/univint/src/CFFileSecurity.pas
  67. 92 92
      packages/univint/src/CFHTTPAuthentication.pas
  68. 164 164
      packages/univint/src/CFHTTPMessage.pas
  69. 56 56
      packages/univint/src/CFHTTPStream.pas
  70. 99 99
      packages/univint/src/CFHost.pas
  71. 36 36
      packages/univint/src/CFNetDiagnostics.pas
  72. 185 185
      packages/univint/src/CFNetServices.pas
  73. 29 29
      packages/univint/src/CFNetworkErrorss.pas
  74. 1 1
      packages/univint/src/CFNotificationCenter.pas
  75. 1 1
      packages/univint/src/CFPlugIn.pas
  76. 1 1
      packages/univint/src/CFPreferences.pas
  77. 5 5
      packages/univint/src/CFPropertyList.pas
  78. 93 93
      packages/univint/src/CFProxySupport.pas
  79. 3 3
      packages/univint/src/CFRunLoop.pas
  80. 15 15
      packages/univint/src/CFSet.pas
  81. 22 22
      packages/univint/src/CFSocket.pas
  82. 114 114
      packages/univint/src/CFSocketStream.pas
  83. 18 18
      packages/univint/src/CFStream.pas
  84. 53 53
      packages/univint/src/CFString.pas
  85. 1 1
      packages/univint/src/CFStringEncodingExt.pas
  86. 25 25
      packages/univint/src/CFStringTokenizer.pas
  87. 12 12
      packages/univint/src/CFTree.pas
  88. 24 24
      packages/univint/src/CFURL.pas
  89. 1 1
      packages/univint/src/CFURLEnumerator.pas
  90. 1 1
      packages/univint/src/CFUUID.pas
  91. 8 8
      packages/univint/src/CFUserNotification.pas
  92. 4 4
      packages/univint/src/CFXMLParser.pas
  93. 1 1
      packages/univint/src/CGColorSpace.pas
  94. 1 1
      packages/univint/src/CGContext.pas
  95. 1 1
      packages/univint/src/CGDataProvider.pas
  96. 8 8
      packages/univint/src/CGDirectDisplay.pas
  97. 1 1
      packages/univint/src/CGDisplayConfiguration.pas
  98. 11 11
      packages/univint/src/CGDisplayFades.pas
  99. 5 5
      packages/univint/src/CGErrors.pas
  100. 3 3
      packages/univint/src/CGEvent.pas

+ 2 - 2
packages/univint/src/ABGlobals.pas

@@ -380,11 +380,11 @@ var kABDepartmentProperty: CFStringRef; external name '_kABDepartmentProperty';
 var kABPersonFlags: CFStringRef; external name '_kABPersonFlags'; (* attribute const *)
 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)     // Various flags - kABIntegerProperty - (Person)
 
-const	
+const
 	kABShowAsMask = 7;
 	kABShowAsPerson = 0;
 	kABShowAsCompany = 1;
-	
+
 	kABNameOrderingMask = 7 shl 3;
 	kABDefaultNameOrdering = 0 shl 3;
 	kABFirstNameFirst = 4 shl 3;

Разница между файлами не показана из-за своего большого размера
+ 178 - 178
packages/univint/src/AEDataModel.pas


+ 58 - 58
packages/univint/src/AEHelpers.pas

@@ -1,17 +1,17 @@
 {
      File:       AE/AEHelpers.h
- 
+
      Contains:   AEPrint, AEBuild and AEStream for Carbon
- 
-    
- 
+
+
+
      Copyright:  © 1999-2008 by Apple Computer, Inc., all rights reserved.
- 
+
      Bugs?:      For bug reports, consult the following page on
                  the World Wide Web:
- 
+
                      http://bugs.freepascal.org
- 
+
 }
 {
     Modified for use with Free Pascal
@@ -240,7 +240,7 @@ uses MacTypes,AppleEvents,AEDataModel;
  * format is similar to the stdio printf call, where meta data is
  * extracted from a format string and used to build the final
  * representation.
- * 
+ *
  * For more information on AEBuild and other APIs in AEHelpers, see:
  *     <http://developer.apple.com/technotes/tn/tn2045.html>
  }
@@ -283,10 +283,10 @@ type
 }
 {
  *  AEBuildDesc()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -299,10 +299,10 @@ function AEBuildDesc( var dst: AEDesc; error: AEBuildErrorPtr { can be NULL }; s
 { varargs version of AEBuildDesc}
 {
  *  vAEBuildDesc()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -315,10 +315,10 @@ function AEBuildDesc( var dst: AEDesc; error: AEBuildErrorPtr { can be NULL }; s
 { Append parameters to an existing AppleEvent}
 {
  *  AEBuildParameters()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -331,10 +331,10 @@ function AEBuildParameters( var event: AppleEvent; error: AEBuildErrorPtr { can
 { varargs version of AEBuildParameters}
 {
  *  vAEBuildParameters()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -347,10 +347,10 @@ function AEBuildParameters( var event: AppleEvent; error: AEBuildErrorPtr { can
 { Building an entire Apple event:}
 {
  *  AEBuildAppleEvent()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -363,10 +363,10 @@ function AEBuildAppleEvent( theClass: AEEventClass; theID: AEEventID; addressTyp
 { varargs version of AEBuildAppleEvent}
 {
  *  vAEBuildAppleEvent()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -387,10 +387,10 @@ function AEBuildAppleEvent( theClass: AEEventClass; theID: AEEventID; addressTyp
  }
 {
  *  AEPrintDescToHandle()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -419,10 +419,10 @@ type
 }
 {
  *  AEStreamOpen()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -439,10 +439,10 @@ function AEStreamOpen: AEStreamRef; external name '_AEStreamOpen';
 }
 {
  *  AEStreamClose()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -458,10 +458,10 @@ function AEStreamClose( ref: AEStreamRef; var desc: AEDesc ): OSStatus; external
 }
 {
  *  AEStreamOpenDesc()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -474,10 +474,10 @@ function AEStreamOpenDesc( ref: AEStreamRef; newType: DescType ): OSStatus; exte
 { Append data to the previously opened desc.}
 {
  *  AEStreamWriteData()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -493,10 +493,10 @@ function AEStreamWriteData( ref: AEStreamRef; data: {const} UnivPtr; length: Siz
 }
 {
  *  AEStreamCloseDesc()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -509,10 +509,10 @@ function AEStreamCloseDesc( ref: AEStreamRef ): OSStatus; external name '_AEStre
 { Write data as a desc to the stream}
 {
  *  AEStreamWriteDesc()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -525,10 +525,10 @@ function AEStreamWriteDesc( ref: AEStreamRef; newType: DescType; data: {const} U
 { Write an entire desc to the stream}
 {
  *  AEStreamWriteAEDesc()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -544,10 +544,10 @@ function AEStreamWriteAEDesc( ref: AEStreamRef; const (*var*) desc: AEDesc ): OS
 }
 {
  *  AEStreamOpenList()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -560,10 +560,10 @@ function AEStreamOpenList( ref: AEStreamRef ): OSStatus; external name '_AEStrea
 { Finish a list.}
 {
  *  AEStreamCloseList()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -579,10 +579,10 @@ function AEStreamCloseList( ref: AEStreamRef ): OSStatus; external name '_AEStre
 }
 {
  *  AEStreamOpenRecord()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -595,10 +595,10 @@ function AEStreamOpenRecord( ref: AEStreamRef; newType: DescType ): OSStatus; ex
 { Change the type of a record.}
 {
  *  AEStreamSetRecordType()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -611,10 +611,10 @@ function AEStreamSetRecordType( ref: AEStreamRef; newType: DescType ): OSStatus;
 { Finish a record}
 {
  *  AEStreamCloseRecord()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -630,10 +630,10 @@ function AEStreamCloseRecord( ref: AEStreamRef ): OSStatus; external name '_AESt
 }
 {
  *  AEStreamWriteKeyDesc()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -649,10 +649,10 @@ function AEStreamWriteKeyDesc( ref: AEStreamRef; key: AEKeyword; newType: DescTy
 }
 {
  *  AEStreamOpenKeyDesc()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -665,10 +665,10 @@ function AEStreamOpenKeyDesc( ref: AEStreamRef; key: AEKeyword; newType: DescTyp
 { Write a key to the stream - you can follow this with an AEWriteDesc.}
 {
  *  AEStreamWriteKey()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -685,10 +685,10 @@ function AEStreamWriteKey( ref: AEStreamRef; key: AEKeyword ): OSStatus; externa
 }
 {
  *  AEStreamCreateEvent()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -708,10 +708,10 @@ function AEStreamCreateEvent( clazz: AEEventClass; id: AEEventID; targetType: De
 }
 {
  *  AEStreamOpenEvent()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -724,10 +724,10 @@ function AEStreamOpenEvent( var event: AppleEvent ): AEStreamRef; external name
 { Mark a keyword as being an optional parameter.}
 {
  *  AEStreamOptionalParam()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later

+ 46 - 46
packages/univint/src/AEInteraction.pas

@@ -1,17 +1,17 @@
 {
      File:       HIToolbox/AEInteraction.h
- 
+
      Contains:   AppleEvent functions that deal with Events and interacting with user
- 
+
      Version:    HIToolbox-624~3
- 
+
      Copyright:  © 2000-2008 by Apple Computer, Inc., all rights reserved.
- 
+
      Bugs?:      For bug reports, consult the following page on
                  the World Wide Web:
- 
+
                      http://bugs.freepascal.org
- 
+
 }
 {       Pascal Translation Updated:  Peter N Lewis, <[email protected]>, August 2005 }
 {       Pascal Translation Updated:  Jonas Maebe, <[email protected]>, October 2009 }
@@ -231,7 +231,7 @@ uses MacTypes,QuickdrawTypes,AEDataModel,Notification,Events,CarbonEventsCore;
 
 
 {*************************************************************************
-  AppleEvent callbacks. 
+  AppleEvent callbacks.
 *************************************************************************}
 type
 	AEIdleProcPtr = function( var theEvent: EventRecord; var sleepTime: SInt32; var mouseRgn: RgnHandle ): Boolean;
@@ -241,14 +241,14 @@ type
 
 {*************************************************************************
   The next couple of calls are basic routines used to create, send,
-  and process AppleEvents. 
+  and process AppleEvents.
 *************************************************************************}
 {
  *  AESend()
- *  
+ *
  *  Mac OS X threading:
  *    Not thread safe
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -260,10 +260,10 @@ function AESend( const (*var*) theAppleEvent: AppleEvent; var reply: AppleEvent;
 
 {
  *  AEProcessAppleEvent()
- *  
+ *
  *  Mac OS X threading:
  *    Not thread safe
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -275,11 +275,11 @@ function AEProcessAppleEvent( const (*var*) theEventRecord: EventRecord ): OSErr
 
 {
  *  AEProcessEvent()
- *  
+ *
  *  Summary:
  *    Dispatches a Carbon event of type kEventAppleEvent to the
  *    appropriate AppleEvent handlers.
- *  
+ *
  *  Discussion:
  *    This API is similar to AEProcessAppleEvent, but does not require
  *    the Carbon event to be converted to an EventRecord. Also, unlike
@@ -290,21 +290,21 @@ function AEProcessAppleEvent( const (*var*) theEventRecord: EventRecord ): OSErr
  *    event from its event queue later once you're done handling it,
  *    and it is also acceptable to remove it from the event queue
  *    before calling this API.
- *  
+ *
  *  Mac OS X threading:
  *    Not thread safe
- *  
+ *
  *  Parameters:
- *    
+ *
  *    inEvent:
  *      A Carbon event of class kEventClassAppleEvent and kind
  *      kEventAppleEvent.
- *  
+ *
  *  Result:
  *    The operating system result code returned by the AppleEvent
  *    handler, or paramErr if the event passed to this API is not of
  *    the correct class and kind.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.5 and later in Carbon.framework
  *    CarbonLib:        not available
@@ -314,18 +314,18 @@ function AEProcessEvent( inEvent: EventRef ): OSStatus; external name '_AEProces
 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
 
 
-{ 
+{
  Note: during event processing, an event handler may realize that it is likely
  to exceed the client's timeout limit. Passing the reply to this
  routine causes a wait event to be generated that asks the client
- for more time. 
+ for more time.
 }
 {
  *  AEResetTimer()
- *  
+ *
  *  Mac OS X threading:
  *    Not thread safe
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -337,7 +337,7 @@ function AEResetTimer( const (*var*) reply: AppleEvent ): OSErr; external name '
 
 {*************************************************************************
   The following three calls are used to allow applications to behave
-  courteously when a user interaction such as a dialog box is needed. 
+  courteously when a user interaction such as a dialog box is needed.
 *************************************************************************}
 
 type
@@ -349,10 +349,10 @@ const
 
 {
  *  AEGetInteractionAllowed()
- *  
+ *
  *  Mac OS X threading:
  *    Not thread safe
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -364,10 +364,10 @@ function AEGetInteractionAllowed( var level: AEInteractAllowed ): OSErr; externa
 
 {
  *  AESetInteractionAllowed()
- *  
+ *
  *  Mac OS X threading:
  *    Not thread safe
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -379,10 +379,10 @@ function AESetInteractionAllowed( level: AEInteractAllowed ): OSErr; external na
 
 {
  *  AEInteractWithUser()
- *  
+ *
  *  Mac OS X threading:
  *    Not thread safe
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -403,10 +403,10 @@ function AEInteractWithUser( timeOutInTicks: SInt32; nmReqPtr: NMRecPtr; idlePro
 *************************************************************************}
 {
  *  AESuspendTheCurrentEvent()
- *  
+ *
  *  Mac OS X threading:
  *    Not thread safe
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -416,7 +416,7 @@ function AESuspendTheCurrentEvent( const (*var*) theAppleEvent: AppleEvent ): OS
 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
 
 
-{ 
+{
  Note: The following routine tells the AppleEvent manager that processing
  is either about to resume or has been completed on a previously suspended
  event. The procPtr passed in as the dispatcher parameter will be called to
@@ -446,10 +446,10 @@ const
 
 {
  *  AEResumeTheCurrentEvent()
- *  
+ *
  *  Mac OS X threading:
  *    Not thread safe
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -461,10 +461,10 @@ function AEResumeTheCurrentEvent( const (*var*) theAppleEvent: AppleEvent; const
 
 {
  *  AEGetTheCurrentEvent()
- *  
+ *
  *  Mac OS X threading:
  *    Not thread safe
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -476,10 +476,10 @@ function AEGetTheCurrentEvent( var theAppleEvent: AppleEvent ): OSErr; external
 
 {
  *  AESetTheCurrentEvent()
- *  
+ *
  *  Mac OS X threading:
  *    Not thread safe
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -490,11 +490,11 @@ function AESetTheCurrentEvent( const (*var*) theAppleEvent: AppleEvent ): OSErr;
 
 
 {*************************************************************************
-  AppleEvent callbacks. 
+  AppleEvent callbacks.
 *************************************************************************}
 {
  *  NewAEIdleUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -505,7 +505,7 @@ function NewAEIdleUPP( userRoutine: AEIdleProcPtr ): AEIdleUPP; external name '_
 
 {
  *  NewAEFilterUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -516,7 +516,7 @@ function NewAEFilterUPP( userRoutine: AEFilterProcPtr ): AEFilterUPP; external n
 
 {
  *  DisposeAEIdleUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -527,7 +527,7 @@ procedure DisposeAEIdleUPP( userUPP: AEIdleUPP ); external name '_DisposeAEIdleU
 
 {
  *  DisposeAEFilterUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -538,7 +538,7 @@ procedure DisposeAEFilterUPP( userUPP: AEFilterUPP ); external name '_DisposeAEF
 
 {
  *  InvokeAEIdleUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -549,7 +549,7 @@ function InvokeAEIdleUPP( var theEvent: EventRecord; var sleepTime: SInt32; var
 
 {
  *  InvokeAEFilterUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework
  *    CarbonLib:        in CarbonLib 1.0 and later

+ 32 - 32
packages/univint/src/AEMach.pas

@@ -1,17 +1,17 @@
 {
      File:       AE/AEMach.h
- 
+
      Contains:   AppleEvent over mach_msg interfaces
- 
-    
- 
+
+
+
      Copyright:  © 2000-2008 by Apple Computer, Inc., all rights reserved.
- 
+
      Bugs?:      For bug reports, consult the following page on
                  the World Wide Web:
- 
+
                      http://bugs.freepascal.org
- 
+
 }
 {
     Modified for use with Free Pascal
@@ -240,12 +240,12 @@ uses MacTypes,MacOSXPosix,AEDataModel;
  * Of note is a new attribute for an AppleEvent, keyReplyPortAttr.
  * This specifies the mach_port_t to which an AppleEvent reply
  * should be directed.  By default, replies are sent to the
- * processes' registered port where they are culled from the normal  
+ * processes' registered port where they are culled from the normal
  * event stream if there is an outstanding AESend + kAEWaitReply.
  * But it may be desirable for a client to specify their own port to
  * receive queud replies.
  *
- * In the case of AESendMessage with kAEWaitReply specified, an 
+ * In the case of AESendMessage with kAEWaitReply specified, an
  * anonymous port will be used to block until the reply is received.
  *
  * Not supplied is a convenience routine to block a server and
@@ -268,7 +268,7 @@ const
 
 {
  *  AEGetRegisteredMachPort()
- *  
+ *
  *  Discussion:
  *    Return the mach_port_t that was registered by the AppleEvent
  *    framework for this process.  This port is considered public, and
@@ -277,10 +277,10 @@ const
  *    only if, you are not also using routines from HIToolbox.  In that
  *    case, HIToolbox retains control of this port and AppleEvents are
  *    dispatched through the main event loop.
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.3
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
@@ -292,7 +292,7 @@ function AEGetRegisteredMachPort: mach_port_t; external name '_AEGetRegisteredMa
 
 {
  *  AEDecodeMessage()
- *  
+ *
  *  Discussion:
  *    Decode a mach_msg into an AppleEvent and its related reply.  (The
  *    reply is set up from fields of the event.)  You can call this
@@ -305,21 +305,21 @@ function AEGetRegisteredMachPort: mach_port_t; external name '_AEGetRegisteredMa
  *    the AppleEvent reply with a event class attribute of
  *    typeAppleEvent, class typeAppleEventReply:
  *    The contents of the header are invalid after this call.
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.3
- *  
+ *
  *  Parameters:
- *    
+ *
  *    header:
  *      The incoming mach message to be dispatched
- *    
+ *
  *    event:
  *      The AppleEvent to decode the message in header into
- *    
+ *
  *    reply:
  *      The AppleEvent reply is decoded into reply
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
@@ -331,20 +331,20 @@ function AEDecodeMessage( var header: mach_msg_header_t; var event: AppleEvent;
 
 {
  *  AEProcessMessage()
- *  
+ *
  *  Discussion:
  *    Decodes and dispatches an event to an event handler.  Handles
  *    packaging and returning the reply to the sender.
  *    The contents of the header are invalid after this call.
- *  
+ *
  *  Mac OS X threading:
  *    Not thread safe since version 10.3
- *  
+ *
  *  Parameters:
- *    
+ *
  *    header:
  *      The incoming mach message to be dispatched.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
@@ -356,31 +356,31 @@ function AEProcessMessage( var header: mach_msg_header_t ): OSStatus; external n
 
 {
  *  AESendMessage()
- *  
+ *
  *  Discussion:
  *    Send an AppleEvent to a target process.  If the target is the
  *    current process (as specified by using typeProcessSerialNumber of
  *    ( 0, kCurrentProcess ) it is dispatched directly to the
  *    appropriate event handler in your process and not serialized.
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Parameters:
- *    
+ *
  *    event:
  *      The event to be sent
- *    
+ *
  *    reply:
  *      The reply for the event, if non-NULL
- *    
+ *
  *    sendMode:
  *      The mode to send the event
- *    
+ *
  *    timeOutInTicks:
  *      The timeout for sending the event, in ticks.  If 0, there is no
  *      timeout.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later

+ 47 - 47
packages/univint/src/AEObjects.pas

@@ -1,17 +1,17 @@
 {
      File:       AE/AEObjects.h
- 
+
      Contains:   Object Support Library Interfaces.
- 
-    
- 
+
+
+
      Copyright:  © 1991-2008 by Apple Computer, Inc., all rights reserved
- 
+
      Bugs?:      For bug reports, consult the following page on
                  the World Wide Web:
- 
+
                      http://bugs.freepascal.org
- 
+
 }
 {
     Modified for use with Free Pascal
@@ -349,7 +349,7 @@ type
 	OSLAdjustMarksUPP = OSLAdjustMarksProcPtr;
 {
  *  NewOSLAccessorUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -360,7 +360,7 @@ function NewOSLAccessorUPP( userRoutine: OSLAccessorProcPtr ): OSLAccessorUPP; e
 
 {
  *  NewOSLCompareUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -371,7 +371,7 @@ function NewOSLCompareUPP( userRoutine: OSLCompareProcPtr ): OSLCompareUPP; exte
 
 {
  *  NewOSLCountUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -382,7 +382,7 @@ function NewOSLCountUPP( userRoutine: OSLCountProcPtr ): OSLCountUPP; external n
 
 {
  *  NewOSLDisposeTokenUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -393,7 +393,7 @@ function NewOSLDisposeTokenUPP( userRoutine: OSLDisposeTokenProcPtr ): OSLDispos
 
 {
  *  NewOSLGetMarkTokenUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -404,7 +404,7 @@ function NewOSLGetMarkTokenUPP( userRoutine: OSLGetMarkTokenProcPtr ): OSLGetMar
 
 {
  *  NewOSLGetErrDescUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -415,7 +415,7 @@ function NewOSLGetErrDescUPP( userRoutine: OSLGetErrDescProcPtr ): OSLGetErrDesc
 
 {
  *  NewOSLMarkUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -426,7 +426,7 @@ function NewOSLMarkUPP( userRoutine: OSLMarkProcPtr ): OSLMarkUPP; external name
 
 {
  *  NewOSLAdjustMarksUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -437,7 +437,7 @@ function NewOSLAdjustMarksUPP( userRoutine: OSLAdjustMarksProcPtr ): OSLAdjustMa
 
 {
  *  DisposeOSLAccessorUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -448,7 +448,7 @@ procedure DisposeOSLAccessorUPP( userUPP: OSLAccessorUPP ); external name '_Disp
 
 {
  *  DisposeOSLCompareUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -459,7 +459,7 @@ procedure DisposeOSLCompareUPP( userUPP: OSLCompareUPP ); external name '_Dispos
 
 {
  *  DisposeOSLCountUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -470,7 +470,7 @@ procedure DisposeOSLCountUPP( userUPP: OSLCountUPP ); external name '_DisposeOSL
 
 {
  *  DisposeOSLDisposeTokenUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -481,7 +481,7 @@ procedure DisposeOSLDisposeTokenUPP( userUPP: OSLDisposeTokenUPP ); external nam
 
 {
  *  DisposeOSLGetMarkTokenUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -492,7 +492,7 @@ procedure DisposeOSLGetMarkTokenUPP( userUPP: OSLGetMarkTokenUPP ); external nam
 
 {
  *  DisposeOSLGetErrDescUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -503,7 +503,7 @@ procedure DisposeOSLGetErrDescUPP( userUPP: OSLGetErrDescUPP ); external name '_
 
 {
  *  DisposeOSLMarkUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -514,7 +514,7 @@ procedure DisposeOSLMarkUPP( userUPP: OSLMarkUPP ); external name '_DisposeOSLMa
 
 {
  *  DisposeOSLAdjustMarksUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -525,7 +525,7 @@ procedure DisposeOSLAdjustMarksUPP( userUPP: OSLAdjustMarksUPP ); external name
 
 {
  *  InvokeOSLAccessorUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -536,7 +536,7 @@ function InvokeOSLAccessorUPP( desiredClass: DescType; const (*var*) container:
 
 {
  *  InvokeOSLCompareUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -547,7 +547,7 @@ function InvokeOSLCompareUPP( oper: DescType; const (*var*) obj1: AEDesc; const
 
 {
  *  InvokeOSLCountUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -558,7 +558,7 @@ function InvokeOSLCountUPP( desiredType: DescType; containerClass: DescType; con
 
 {
  *  InvokeOSLDisposeTokenUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -569,7 +569,7 @@ function InvokeOSLDisposeTokenUPP( var unneededToken: AEDesc; userUPP: OSLDispos
 
 {
  *  InvokeOSLGetMarkTokenUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -580,7 +580,7 @@ function InvokeOSLGetMarkTokenUPP( const (*var*) dContainerToken: AEDesc; contai
 
 {
  *  InvokeOSLGetErrDescUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -591,7 +591,7 @@ function InvokeOSLGetErrDescUPP( var appDescPtr: AEDescPtr; userUPP: OSLGetErrDe
 
 {
  *  InvokeOSLMarkUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -602,7 +602,7 @@ function InvokeOSLMarkUPP( const (*var*) dToken: AEDesc; const (*var*) markToken
 
 {
  *  InvokeOSLAdjustMarksUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -613,10 +613,10 @@ function InvokeOSLAdjustMarksUPP( newStart: SIGNEDLONG; newStop: SIGNEDLONG; con
 
 {
  *  AEObjectInit()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -630,10 +630,10 @@ function AEObjectInit: OSErr; external name '_AEObjectInit';
   such that further calls can be via inline }
 {
  *  AESetObjectCallbacks()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -645,10 +645,10 @@ function AESetObjectCallbacks( myCompareProc: OSLCompareUPP; myCountProc: OSLCou
 
 {
  *  AEResolve()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -660,10 +660,10 @@ function AEResolve( const (*var*) objectSpecifier: AEDesc; callbackFlags: SInt16
 
 {
  *  AEInstallObjectAccessor()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -675,10 +675,10 @@ function AEInstallObjectAccessor( desiredClass: DescType; containerType: DescTyp
 
 {
  *  AERemoveObjectAccessor()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -690,10 +690,10 @@ function AERemoveObjectAccessor( desiredClass: DescType; containerType: DescType
 
 {
  *  AEGetObjectAccessor()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -705,10 +705,10 @@ function AEGetObjectAccessor( desiredClass: DescType; containerType: DescType; v
 
 {
  *  AEDisposeToken()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -720,10 +720,10 @@ function AEDisposeToken( var theToken: AEDesc ): OSErr; external name '_AEDispos
 
 {
  *  AECallObjectAccessor()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later

+ 17 - 17
packages/univint/src/AEPackObject.pas

@@ -1,17 +1,17 @@
 {
      File:       AE/AEPackObject.h
- 
+
      Contains:   AppleEvents object packing Interfaces.
- 
-    
- 
+
+
+
      Copyright:  © 1991-2008 by Apple Computer, Inc., all rights reserved
- 
+
      Bugs?:      For bug reports, consult the following page on
                  the World Wide Web:
- 
+
                      http://bugs.freepascal.org
- 
+
 }
 {
     Modified for use with Free Pascal
@@ -230,10 +230,10 @@ uses MacTypes,AEDataModel,AppleEvents;
 { These are the object packing routines.  }
 {
  *  CreateOffsetDescriptor()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -245,10 +245,10 @@ function CreateOffsetDescriptor( theOffset: SIGNEDLONG; var theDescriptor: AEDes
 
 {
  *  CreateCompDescriptor()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -260,10 +260,10 @@ function CreateCompDescriptor( comparisonOperator: DescType; var operand1: AEDes
 
 {
  *  CreateLogicalDescriptor()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -275,10 +275,10 @@ function CreateLogicalDescriptor( var theLogicalTerms: AEDescList; theLogicOpera
 
 {
  *  CreateObjSpecifier()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -290,10 +290,10 @@ function CreateObjSpecifier( desiredClass: DescType; var theContainer: AEDesc; k
 
 {
  *  CreateRangeDescriptor()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later

+ 7 - 7
packages/univint/src/AERegistry.pas

@@ -1,17 +1,17 @@
 {
      File:       AE/AERegistry.h
- 
+
      Contains:   AppleEvents Registry Interface.
- 
-    
- 
+
+
+
      Copyright:  © 1993-2008 by Apple Computer, Inc., all rights reserved
- 
+
      Bugs?:      For bug reports, consult the following page on
                  the World Wide Web:
- 
+
                      http://bugs.freepascal.org
- 
+
 }
 {
     Modified for use with Free Pascal

+ 7 - 7
packages/univint/src/AEUserTermTypes.pas

@@ -1,17 +1,17 @@
 {
      File:       AE/AEUserTermTypes.h
- 
+
      Contains:   AppleEvents AEUT resource format Interfaces.
- 
-    
- 
+
+
+
      Copyright:  © 1991-2008 by Apple Computer, Inc., all rights reserved
- 
+
      Bugs?:      For bug reports, consult the following page on
                  the World Wide Web:
- 
+
                      http://bugs.freepascal.org
- 
+
 }
 {
     Modified for use with Free Pascal

+ 4 - 4
packages/univint/src/AIFF.pas

@@ -1,9 +1,9 @@
 {
      File:       CarbonCore/AIFF.h
- 
+
      Contains:   Definition of AIFF file format components.
                  The contents of this header file are deprecated.
- 
+
      Copyright:  © 1989-2011 by Apple Inc. All rights reserved.
 }
 {
@@ -267,9 +267,9 @@ const
 
 {
     AIFF.h use to define a type, ID, which causes conflicts with other headers and application which want to use
-    this pretty common name as their own type.  If you were previously relying on this being defined here, you 
+    this pretty common name as their own type.  If you were previously relying on this being defined here, you
     should either define it yourself or change your references to it into a UInt32.
-    
+
     typedef UInt32 ID;
 }
 type

+ 34 - 34
packages/univint/src/ASDebugging.pas

@@ -1,17 +1,17 @@
 {
      File:       OpenScripting/ASDebugging.h
- 
+
      Contains:   AppleScript Debugging Interfaces.
- 
+
      Version:    OSA-148~28
- 
+
      Copyright:  © 1992-2008 by Apple Computer, Inc., all rights reserved
- 
+
      Bugs?:      For bug reports, consult the following page on
                  the World Wide Web:
- 
+
                      http://bugs.freepascal.org
- 
+
 }
 
 {  Pascal Translation Updated: Gorazd Krosl <[email protected]>, October 2009 }
@@ -236,7 +236,7 @@ uses MacTypes,AEDataModel,OSA,Files,Components,AppleEvents,AppleScript,CFBase,CF
 {    This mode flag can be passed to OSASetProperty or OSASetHandler
     and will prevent properties or handlers from being defined in a context
     that doesn't already have bindings for them. An error is returned if
-    a current binding doesn't already exist. 
+    a current binding doesn't already exist.
 }
 const
 	kOSAModeDontDefine = $0001;
@@ -264,7 +264,7 @@ const
 *************************************************************************}
 {
  *  OSASetProperty()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -276,7 +276,7 @@ function OSASetProperty( scriptingComponent: ComponentInstance; modeFlags: SInt3
 
 {
  *  OSAGetProperty()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -288,7 +288,7 @@ function OSAGetProperty( scriptingComponent: ComponentInstance; modeFlags: SInt3
 
 {
  *  OSAGetPropertyNames()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -300,7 +300,7 @@ function OSAGetPropertyNames( scriptingComponent: ComponentInstance; modeFlags:
 
 {
  *  OSASetHandler()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -312,7 +312,7 @@ function OSASetHandler( scriptingComponent: ComponentInstance; modeFlags: SInt32
 
 {
  *  OSAGetHandler()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -324,7 +324,7 @@ function OSAGetHandler( scriptingComponent: ComponentInstance; modeFlags: SInt32
 
 {
  *  OSAGetHandlerNames()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -338,10 +338,10 @@ function OSAGetHandlerNames( scriptingComponent: ComponentInstance; modeFlags: S
 {$ifc not TARGET_CPU_64}
 {
  *  OSAGetAppTerminology()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    use OSACopyScriptingDefinition instead.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -355,12 +355,12 @@ function OSAGetAppTerminology( scriptingComponent: ComponentInstance; modeFlags:
 
 {
  *  OSAGetSysTerminology()
- *  
+ *
  *  Discussion:
  *    A terminology ID is derived from script code and language code as
  *    follows: terminologyID = ((scriptCode & 0x7F) << 8) | (langCode &
  *    0xFF)
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -372,22 +372,22 @@ function OSAGetSysTerminology( scriptingComponent: ComponentInstance; modeFlags:
 
 {
  *  OSACopyScriptingDefinition()
- *  
+ *
  *  Discussion:
  *    Gets the scripting definition of the specified bundle.  See
  *    sdef(5) for details of the sdef format.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    ref:
  *      The file (or bundle) to look in.
- *    
+ *
  *    modeFlags:
  *      There are no flags defined at this time; pass 0.
- *    
+ *
  *    sdef:
  *      The resulting sdef as XML data.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.4 and later in Carbon.framework
  *    CarbonLib:        not available
@@ -399,23 +399,23 @@ function OSACopyScriptingDefinition( const (*var*) ref: FSRef; modeFlags: SInt32
 
 {
  *  OSACopyScriptingDefinitionFromURL()
- *  
+ *
  *  Discussion:
  *    Gets the scripting definition of the specified URL.  See sdef(5)
  *    for details of the sdef format.  If used with a file: URL, this
  *    call is equivalent to OSACopyScriptingDefinition.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    url:
  *      The URL to look in; this should be a file: or eppc: URL.
- *    
+ *
  *    modeFlags:
  *      There are no flags defined at this time; pass 0.
- *    
+ *
  *    sdef:
  *      The resulting sdef as XML data.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.5 and later in Carbon.framework
  *    CarbonLib:        not available
@@ -432,7 +432,7 @@ function OSACopyScriptingDefinitionFromURL( url: CFURLRef; modeFlags: SInt32; va
 {$ifc not TARGET_CPU_64}
 {
  *  ASSetProperty()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -444,7 +444,7 @@ function ASSetProperty( scriptingComponent: ComponentInstance; contextID: OSAID;
 
 {
  *  ASGetProperty()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -456,7 +456,7 @@ function ASGetProperty( scriptingComponent: ComponentInstance; contextID: OSAID;
 
 {
  *  ASSetHandler()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -468,7 +468,7 @@ function ASSetHandler( scriptingComponent: ComponentInstance; contextID: OSAID;
 
 {
  *  ASGetHandler()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -480,7 +480,7 @@ function ASGetHandler( scriptingComponent: ComponentInstance; contextID: OSAID;
 
 {
  *  ASGetAppTerminology()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
  *    CarbonLib:        in CarbonLib 1.0 and later

+ 6 - 6
packages/univint/src/ASRegistry.pas

@@ -1,17 +1,17 @@
 {
      File:       OpenScripting/ASRegistry.h
- 
+
      Contains:   AppleScript Registry constants.
- 
+
      Version:    OSA-148~28
- 
+
      Copyright:  © 1991-2008 by Apple Computer, Inc., all rights reserved
- 
+
      Bugs?:      For bug reports, consult the following page on
                  the World Wide Web:
- 
+
                      http://bugs.freepascal.org
- 
+
 }
 
 {  Pascal Translation Updated: Gorazd Krosl <[email protected]>, October 2009 }

Разница между файлами не показана из-за своего большого размера
+ 180 - 180
packages/univint/src/ATSFont.pas


+ 26 - 26
packages/univint/src/ATSLayoutTypes.pas

@@ -1,17 +1,17 @@
 {
      File:       ATS/ATSLayoutTypes.h
- 
+
      Contains:   Apple Type Services layout public structures and constants.
- 
+
      Version:    ATS
- 
+
      Copyright:  © 1994-2012 by Apple Inc., all rights reserved.
- 
+
      Bugs?:      For bug reports, consult the following page on
                  the World Wide Web:
- 
+
                      http://bugs.freepascal.org
- 
+
 }
 
 { Pascal Translation Updated: Gorazd Krosl <[email protected]>, October 2009 }
@@ -281,7 +281,7 @@ const
 
 {
  *  ATSULayoutOperationSelector
- *  
+ *
  *  Summary:
  *    This is used to select which operations to override, or which
  *    operation is currently being run.
@@ -330,7 +330,7 @@ const
 
 {
  *  ATSULayoutOperationCallbackStatus
- *  
+ *
  *  Summary:
  *    One of these must be returned by a
  *    ATSUDLayoutOperationOverrideUPP callback function in order to
@@ -357,7 +357,7 @@ const
 
 {
  *  ATSLineLayoutOptions
- *  
+ *
  *  Summary:
  *    ATSLineLayoutOptions are normally set in an ATSUTextLayout object
  *    via the kATSULineLayoutOptionsTag layout control attribute. They
@@ -518,7 +518,7 @@ const
 
 {
  *  ATSStyleRenderingOptions
- *  
+ *
  *  Summary:
  *    ATSStyleRenderingOptions are set in the ATSUStyle object via the
  *    attribute tag kATSUStyleRenderingOptions. They provide finer
@@ -570,7 +570,7 @@ const
 
 {
  *  ATSGlyphInfoFlags
- *  
+ *
  *  Summary:
  *    ATSGlyphInfoFlags are set in the individual ATSLayoutRecord
  *    structures and apply only to the ATSGlyphRef in that structure.
@@ -631,7 +631,7 @@ const
 
 {
  *  ATSLayoutRecord
- *  
+ *
  *  Summary:
  *    The ATSLayoutRecord structure defines all the needed info for a
  *    single glyph during the layout process.  This struct must be
@@ -661,12 +661,12 @@ type
 		realPos: Fixed;
 	end;
 	ATSLayoutRecordPtr = ^ATSLayoutRecord;
-	
+
 { --------------------------------------------------------------------------- }
 
 {
  *  ATSTrapezoid
- *  
+ *
  *  Summary:
  *    The ATSTrapezoid structure supplies a convenient container for
  *    glyph bounds in trapezoidal form.
@@ -679,12 +679,12 @@ type
 		lowerLeft: FixedPoint;
 	end;
 	ATSTrapezoidPtr = ^ATSTrapezoid;
-	
+
 { --------------------------------------------------------------------------- }
 
 {
  *  ATSJustWidthDeltaEntryOverride
- *  
+ *
  *  Summary:
  *    The JustWidthDeltaEntryOverride structure specifies values for
  *    the grow and shrink case during justification, both on the left
@@ -726,15 +726,15 @@ type
 		shrinkFlags: JustificationFlags;
 	end;
 	ATSJustWidthDeltaEntryOverridePtr = ^ATSJustWidthDeltaEntryOverride;
-	
+
 { The JustPriorityOverrides type is an array of 4 width delta records, one per priority level override. }
 	ATSJustPriorityWidthDeltaOverrides = array[0..3] of ATSJustWidthDeltaEntryOverride;
-	
+
 { ---------------------------------------------------------------------------- }
 
 {
  *  ATSULineRef
- *  
+ *
  *  Summary:
  *    A reference to a line that is being laid out. This is passed into
  *    the ATSUDirectLayoutOperationOverrideUPP callback function to be
@@ -751,10 +751,10 @@ type
 
 {
  *  ATSUDirectLayoutOperationOverrideProcPtr
- *  
+ *
  *  Summary:
  *    Callback definition for a low-level adjustment routine hook.
- *  
+ *
  *  Discussion:
  *    This callback can be set in an ATSUTextLayout object by setting
  *    the attribute tag kATSULayoutOperationOverrideTag and passing in
@@ -789,7 +789,7 @@ type
 
 {
  *  NewATSUDirectLayoutOperationOverrideUPP()
- *  
+ *
  *  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
@@ -800,7 +800,7 @@ function NewATSUDirectLayoutOperationOverrideUPP( userRoutine: ATSUDirectLayoutO
 
 {
  *  DisposeATSUDirectLayoutOperationOverrideUPP()
- *  
+ *
  *  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
@@ -811,7 +811,7 @@ procedure DisposeATSUDirectLayoutOperationOverrideUPP( userUPP: ATSUDirectLayout
 
 {
  *  InvokeATSUDirectLayoutOperationOverrideUPP()
- *  
+ *
  *  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
@@ -832,7 +832,7 @@ function InvokeATSUDirectLayoutOperationOverrideUPP( iCurrentOperation: ATSULayo
 
 {
  *  ATSULayoutOperationOverrideSpecifier
- *  
+ *
  *  Summary:
  *    This structure is used to install a callback for one or more
  *    ATSUI operations. To do this, simply passed one of these
@@ -849,7 +849,7 @@ type
 		overrideUPP: ATSUDirectLayoutOperationOverrideUPP;
 	end;
 	ATSULayoutOperationOverrideSpecifierPtr = ^ATSULayoutOperationOverrideSpecifier;
-	
+
 //#pragma pack(pop)
 
 {$endc} {TARGET_OS_MAC}

+ 31 - 31
packages/univint/src/ATSTypes.pas

@@ -1,17 +1,17 @@
 {
      File:       ATS/ATSTypes.h
- 
+
      Contains:   Public interfaces for Apple Type Services components.
- 
+
      Version:    ATS
- 
+
      Copyright:  Copyright 1997-2012 by Apple Inc., all rights reserved.
- 
+
      Bugs?:      For bug reports, consult the following page on
                  the World Wide Web:
- 
+
                      http://bugs.freepascal.org
- 
+
 }
 
 {  Pascal Translation Updated: Gorazd Krosl <[email protected]>, October 2009 }
@@ -244,8 +244,8 @@ type
 
 {$ifc TARGET_CPU_64}
 {
-   ATSFSSpec serves as a temporary place holder for the FSSpec data type which is deprecated for 64-bit. 
-   A 64-bit replacement for FSSpec based APIs will be introduced.  
+   ATSFSSpec serves as a temporary place holder for the FSSpec data type which is deprecated for 64-bit.
+   A 64-bit replacement for FSSpec based APIs will be introduced.
 }
 type
 	ATSFSSpec = record
@@ -257,9 +257,9 @@ type
 type
 	ATSFSSpec = FSSpec;
 {$endc}  { TARGET_CPU_64 }
-	
+
 	ATSFSSpecPtr = ^ATSFSSpec;
-	
+
 { FMGeneration }
 
 	FMGeneration = UInt32;
@@ -273,14 +273,14 @@ type
 
 	FMFontFamily = SInt16;
 	FMFontFamilyPtr = ^FMFontFamily;
-	
+
 	FMFontStyle = SInt16;
 	FMFontStylePtr = ^FMFontStyle;
-	
+
 	FMFontSize = SInt16;
 	FMFontSizePtr = ^FMFontSize;
-	
-{ 
+
+{
    The font family is a collection of fonts, each of which is identified
    by an FMFont reference that maps to a single object registered with
    the font database. The font references associated with the font
@@ -290,7 +290,7 @@ type
 
 	FMFont = UInt32;
 	FMFontPtr = ^FMFont;
-	
+
 	FMFontFamilyInstancePtr = ^FMFontFamilyInstance;
 	FMFontFamilyInstance = record
 		fontFamily: FMFontFamily;
@@ -307,13 +307,13 @@ type
 		reserved: array[0..15] of UInt32;
 	end;
 	FMFontIteratorPtr = ^FMFontIterator;
-	
+
 
 	FMFontFamilyInstanceIterator = record
 		reserved: array[0..15] of UInt32;
 	end;
 	FMFontFamilyInstanceIteratorPtr = ^FMFontFamilyInstanceIterator;
-	
+
 const
 	kInvalidGeneration = 0;
 	kInvalidFontFamily = -1;
@@ -345,7 +345,7 @@ type
 
 {
  *  NewFMFontFamilyCallbackFilterUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -356,7 +356,7 @@ function NewFMFontFamilyCallbackFilterUPP( userRoutine: FMFontFamilyCallbackFilt
 
 {
  *  NewFMFontCallbackFilterUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -367,7 +367,7 @@ function NewFMFontCallbackFilterUPP( userRoutine: FMFontCallbackFilterProcPtr ):
 
 {
  *  DisposeFMFontFamilyCallbackFilterUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -378,7 +378,7 @@ procedure DisposeFMFontFamilyCallbackFilterUPP( userUPP: FMFontFamilyCallbackFil
 
 {
  *  DisposeFMFontCallbackFilterUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -389,7 +389,7 @@ procedure DisposeFMFontCallbackFilterUPP( userUPP: FMFontCallbackFilterUPP ); ex
 
 {
  *  InvokeFMFontFamilyCallbackFilterUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -400,7 +400,7 @@ function InvokeFMFontFamilyCallbackFilterUPP( iFontFamily: FMFontFamily; iRefCon
 
 {
  *  InvokeFMFontCallbackFilterUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -424,7 +424,7 @@ type
 		reserved: array[0..1] of UInt32;
 	end;
 	FMFontDirectoryFilterPtr = ^FMFontDirectoryFilter;
-	
+
 {
    Note: The fontContainerFilter member is not available in 64-bit. Use fontFileRefFilter
    and the kFMFontFileRefFilterSelector enum instead.
@@ -440,27 +440,27 @@ type
 			5:	(fontDirectoryFilter: FMFontDirectoryFilter);
 			6:	(fontFileRefFilter: { const } FSRefPtr);
 	end;
-	
+
 	FMFilter = record
 		format: UInt32;
 		selector: FMFilterSelector;
 		filter : FMFilterfilter;
 	end;
 	FMFilterPtr = ^FMFilter;
-	
+
 	ATSOptionFlags = OptionBits;
 	ATSGeneration = UInt32;
 	ATSFontContainerRef = UInt32;
-	
+
 	ATSFontFamilyRef = UInt32;
 	ATSFontFamilyRefPtr = ^ATSFontFamilyRef;
-	
+
 	ATSFontRef = UInt32;
 	ATSFontRefPtr = ^ATSFontRef;
 
 	ATSGlyphRef = UInt16;
 	ATSGlyphRefPtr = ^ATSGlyphRef;
-	
+
 	ATSFontSize = CGFloat;
 	ATSFontFormat = UInt32;
 const
@@ -497,7 +497,7 @@ type
 		underlineThickness: CGFloat;     { Stroke width for underlining }
 	end;
 	ATSFontMetricsPtr = ^ATSFontMetrics;
-	
+
 const
 	kATSItalicQDSkew = (1 shl 16) / 4; { fixed value of 0.25 }
 	kATSBoldQDStretch = (1 shl 16) * 3 / 2; { fixed value of 1.50 }
@@ -511,7 +511,7 @@ const
 	kATSQuadCurveType = $0002;
 	kATSOtherCurveType = $0003;
 
-{ 
+{
     This is what the ATSGlyphRef is set to when the glyph is deleted -
     that is, when the glyph is set to no longer appear when the layout
     is actually drawn

+ 45 - 45
packages/univint/src/ATSUnicodeDirectAccess.pas

@@ -1,17 +1,17 @@
 {
      File:       QD/ATSUnicodeDirectAccess.h
- 
+
      Contains:   Public Interfaces/Types for Low Level ATSUI
- 
+
      Version:    Quickdraw-285~150
- 
+
      Copyright:  © 2002-2008 by Apple Inc. all rights reserved.
- 
+
      Bugs?:      For bug reports, consult the following page on
                  the World Wide Web:
- 
+
                      http://bugs.freepascal.org
- 
+
 }
 {  Pascal Translation:  Peter N Lewis, <[email protected]>, 2004 }
 {  Pascal Translation Updated:  Jonas Maebe, <[email protected]>, October 2009 }
@@ -237,7 +237,7 @@ uses MacTypes,ATSLayoutTypes,ATSUnicodeTypes,TextCommon;
 
 {
  *  ATSUDirectDataSelector
- *  
+ *
  *  Summary:
  *    These are the data selectors used in the
  *    ATSUDirectGetLayoutDataArrayPtr function to get the needed layout
@@ -342,7 +342,7 @@ const
 
 {
  *  ATSUStyleSettingRef
- *  
+ *
  *  Summary:
  *    A reference to a style setting object that represents an
  *    ATSUStyle plus any cached/set information about that style.
@@ -355,14 +355,14 @@ type
 { ---------------------------------------------------------------------------- }
 {
  *  ATSUDirectGetLayoutDataArrayPtrFromLineRef()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    Use CTRunGetGlyphsPtr or CTRunGetPositionsPtr instead.
- *  
+ *
  *  Summary:
  *    Returns the data pointer specified by iDataSelector and
  *    referenced by iLineRef.
- *  
+ *
  *  Discussion:
  *    This function simply returns the data pointer specified by
  *    iDataSelector and referenced by iLineRef. This data pointer
@@ -389,17 +389,17 @@ type
  *    pointer returned by this function is only valid within the
  *    context of the callback. Do not attempt to retain it for later
  *    use.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    iLineRef:
  *      The ATSULineRef which was passed into a
  *      ATSUDirectLayoutOperationOverrideUPP callback function as a
  *      parameter.
- *    
+ *
  *    iDataSelector:
  *      The selector for the data that is being requested.
- *    
+ *
  *    iCreate:
  *      If the ATSULineRef passed in iLineRef does not reference the
  *      requested array, then a zero-filled one will be created and
@@ -407,7 +407,7 @@ type
  *      ATSUDirectDataSelectors, these cannot be simply created. Thus,
  *      this flag will have no affect on these few
  *      ATSUDirectDataSelectors.
- *    
+ *
  *    oLayoutDataArrayPtr:
  *      Upon sucessful return, this parameter will contain a pointer to
  *      an array of the requested values if the ATSULineRef passed in
@@ -415,11 +415,11 @@ type
  *      NULL will be returned, unless iCreate is set to true and the
  *      array can be created. This parameter itself may be set to NULL
  *      if only a count of the entries is needed.
- *    
+ *
  *    oLayoutDataCount:
  *      Upon sucessful return, this parameter will contain a count of
  *      the entries in the array returned in oLayoutDataArray.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.2 and later in ApplicationServices.framework but deprecated in 10.6
  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
@@ -433,14 +433,14 @@ function ATSUDirectGetLayoutDataArrayPtrFromLineRef( iLineRef: ATSULineRef; iDat
 {$ifc not TARGET_CPU_64}
 {
  *  ATSUDirectGetLayoutDataArrayPtrFromTextLayout()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    Use CTRunGetGlyphs or CTRunGetPositions instead.
- *  
+ *
  *  Summary:
  *    Returns the data pointer specified by iDataSelector and
  *    referenced by iTextLayout for the line starting at iLineOffset.
- *  
+ *
  *  Discussion:
  *    This function simply returns the data pointer specified by
  *    iDataSelector and referenced by iTextLayout for the line starting
@@ -461,7 +461,7 @@ function ATSUDirectGetLayoutDataArrayPtrFromLineRef( iLineRef: ATSULineRef; iDat
  *    return in order-n time. Second of all, this means that the
  *    developer cannot change any of the data. Any changes the
  *    developer makes to the arrays returned by this API will have no
- *    effect on the layout. Using the 
+ *    effect on the layout. Using the
  *    kATSULayoutOperationPostLayoutAdjustment operation selector
  *    override and the ATSUDirectGetLayoutDataArrayPtrFromLineRef is a
  *    great alternative to using this API. Many of the requested arrays
@@ -470,23 +470,23 @@ function ATSUDirectGetLayoutDataArrayPtrFromLineRef( iLineRef: ATSULineRef; iDat
  *    In this case, if there's no error returned, the array simply
  *    doesn't exist and the caller should treat all of the entries in
  *    the array that they would have recieved as being 0.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    iTextLayout:
  *      The ATSUTextLayout object from which the requested data will
  *      come from.
- *    
+ *
  *    iLineOffset:
  *      The edge offset that corresponds to the beginning of the range
  *      of text of the line of the requested data. If the text has
  *      multiple lines, then ATSUDirectGetLayoutDataArrayPtrFromLineRef
  *      will need to be called for each of the lines in which the
  *      requested data is needed.
- *    
+ *
  *    iDataSelector:
  *      The selector for the data that is being requested.
- *    
+ *
  *    oLayoutDataArrayPtr:
  *      Upon sucessful return, this parameter will contain a pointer to
  *      an array of the requested values if the ATSUTextLayout passed
@@ -494,11 +494,11 @@ function ATSUDirectGetLayoutDataArrayPtrFromLineRef( iLineRef: ATSULineRef; iDat
  *      iLineOffset. If this is not the case, then NULL will be
  *      returned. This parameter itself may be set to NULL if only a
  *      count of the entries is needed.
- *    
+ *
  *    oLayoutDataCount:
  *      Upon sucessful return, this parameter will contain a count of
  *      the entries in the array returned in oLayoutDataArray.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.2 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
@@ -513,15 +513,15 @@ function ATSUDirectGetLayoutDataArrayPtrFromTextLayout( iTextLayout: ATSUTextLay
 
 {
  *  ATSUDirectReleaseLayoutDataArrayPtr()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    Use CoreText API instead.
- *  
+ *
  *  Summary:
  *    Properly releases of an array pointer returned by
  *    ATSUDirectGetLayoutDataArrayPtrFromLineRef() or
  *    ATSUDirectGetLayoutDataArrayPtrFromTextLayout.
- *  
+ *
  *  Discussion:
  *    This function is needed to let ATSUI know that the caller is
  *    finished with the pointer that was previously requested by
@@ -529,20 +529,20 @@ function ATSUDirectGetLayoutDataArrayPtrFromTextLayout( iTextLayout: ATSUTextLay
  *    ATSUDirectGetLayoutDataArrayPtrFromTextLayout(). This is needed
  *    in case ATSUI needs to make any internal adjustments to it's
  *    internal structures.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    iLineRef:
  *      The lineRef from which the layout data array pointer came from.
  *      If the layout data array pointer did not come from a lineRef,
  *      then set this to NULL.
- *    
+ *
  *    iDataSelector:
  *      The selector for which iLayoutDataArrayPtr was obtained.
- *    
+ *
  *    iLayoutDataArrayPtr:
  *      A pointer to the layout data array which is to be disposed of.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.2 and later in ApplicationServices.framework but deprecated in 10.6
  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
@@ -556,14 +556,14 @@ function ATSUDirectReleaseLayoutDataArrayPtr( iLineRef: ATSULineRef { can be NUL
 {$ifc not TARGET_CPU_64}
 {
  *  ATSUDirectAddStyleSettingRef()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    Use CTRunGetGlyphsPtr or CTRunGetGlyphs instead.
- *  
+ *
  *  Summary:
  *    This function will fetch a style index for the
  *    ATSUStyleSettingRef passed in.
- *  
+ *
  *  Discussion:
  *    This function allows for glyph replacement or substitution from
  *    one layout or line to another layout or line. Not only will it
@@ -575,26 +575,26 @@ function ATSUDirectReleaseLayoutDataArrayPtr( iLineRef: ATSULineRef { can be NUL
  *    pointer obtained for this may no longer be valid after this
  *    function has been called. These pointers should be freed before
  *    calling this function and re-obtained afterwards.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    iLineRef:
  *      An ATSULineRef which was passed into a
  *      ATSUDirectLayoutOperationOverrideUPP callback function as a
  *      parameter.
- *    
+ *
  *    iStyleSettingRef:
  *      The ATSUStyleSettingRef to be looked up or added to the
  *      ATSUTextLayout referenced by iTextLayout for the line starting
  *      at the offset iLineOffset.
- *    
+ *
  *    oStyleIndex:
  *      Upon sucessful return, this will parameter will be set to the
  *      index of the ATSUStyleSettingRef passed in iStyleSettingRef for
  *      the line referenced by iLineRef. If the ATSUStyleSettingRef
  *      does not exist, in that context, then it will be added and the
  *      new index will be returned here.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.2 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later

Разница между файлами не показана из-за своего большого размера
+ 162 - 162
packages/univint/src/ATSUnicodeDrawing.pas


+ 61 - 61
packages/univint/src/ATSUnicodeFlattening.pas

@@ -1,17 +1,17 @@
 {
      File:       QD/ATSUnicodeFlattening.h
- 
+
      Contains:   Public interfaces for Apple Type Services for Unicode Imaging
- 
+
      Version:    Quickdraw-285~150
- 
+
      Copyright:  © 2002-2008 by Apple Inc. all rights reserved.
- 
+
      Bugs?:      For bug reports, consult the following page on
                  the World Wide Web:
- 
+
                      http://bugs.freepascal.org
- 
+
 }
 {  Pascal Translation:  Peter N Lewis, <[email protected]>, 2004 }
 {  Pascal Translation Updated:  Jonas Maebe, <[email protected]>, October 2009 }
@@ -247,7 +247,7 @@ const
 
 {
    ATSUFlattenStyleRunOptions is a bitfield list of options that can be passed
-   into the ATSUFlattenStyleRunsToStream API. Currently, there are no options. 
+   into the ATSUFlattenStyleRunsToStream API. Currently, there are no options.
    This is here for future expansion.
 }
 type
@@ -257,7 +257,7 @@ const
 
 {
    ATSUUnFlattenStyleRunOptions is a bitfield list of options that can be passed
-   into the ATSUUnFlattenStyleRunsToStream API. Currently, there are no options. 
+   into the ATSUUnFlattenStyleRunsToStream API. Currently, there are no options.
    This is here for future expansion.
 }
 type
@@ -271,10 +271,10 @@ const
 { ---------------------------------------------------------------------------- }
 
 {
-   ATSUStyleRunInfo is a structure that contains an index into an array of 
-   unique ATSUStyle objects as well as the length of the run that the style run 
-   object covers. This structure is utilized by ATSUUnflattenStyleRunsFromStream() 
-   to return the style run info to the caller. 
+   ATSUStyleRunInfo is a structure that contains an index into an array of
+   unique ATSUStyle objects as well as the length of the run that the style run
+   object covers. This structure is utilized by ATSUUnflattenStyleRunsFromStream()
+   to return the style run info to the caller.
 }
 type
 	ATSUStyleRunInfo = record
@@ -291,7 +291,7 @@ type
    2. Flattened Text Layout Data
    3. Flattened Style Run Data
    4. Flattened Style Data
-   Per the 'ustl' spec, these structures should maintain four-byte alignment. 
+   Per the 'ustl' spec, these structures should maintain four-byte alignment.
    For things that are variable width (such as font names), padding bytes must
    be added to ensure that this alignment is always kept.
 }
@@ -435,7 +435,7 @@ type
 	ATSFlatDataLineInfoDataPtr = ^ATSFlatDataLineInfoData;
 {
    This structure is the main data header for the flattened line info data. This
-   is what a non-zero offsetToLineInfo points to in the 
+   is what a non-zero offsetToLineInfo points to in the
    ATSFlatDataTextLayoutDataHeader structure above.
 }
 type
@@ -484,12 +484,12 @@ type
 {
    The block 4 structures store flattened ATSUStyle objects. This too, is
    currently used by the ATSUI style run flattening and parsing functions,
-   ATSUFlattenStyleRunsToStream and ATSUUnflattenStyleRunsFromStream. 
+   ATSUFlattenStyleRunsToStream and ATSUUnflattenStyleRunsFromStream.
 }
 
 {
    this structure forms the beginning of an individually flattened ATSUStyle
-   object. 
+   object.
 }
 type
 	ATSFlatDataStyleListStyleDataHeader = record
@@ -567,8 +567,8 @@ type
 	end;
 	ATSFlatDataStyleListFeatureDataPtr = ^ATSFlatDataStyleListFeatureData;
 {
-   this structure stores the flattened font variation data. An array of these 
-   comes after the array of ATSFlatDataStyleListFeatureData structures (if any) 
+   this structure stores the flattened font variation data. An array of these
+   comes after the array of ATSFlatDataStyleListFeatureData structures (if any)
    if the numberOfSetVariations is non-zero. There must be one of these
    structures for each numberOfSetFeatures.
 }
@@ -585,10 +585,10 @@ type
 { Flattened Font Data Info }
 { ------------------------ }
 {
-   This is somewhat of an addendum to the 'ustl' structure above. These flattened 
-   data structures are stored in block 4 as a font attribute with the attribute 
+   This is somewhat of an addendum to the 'ustl' structure above. These flattened
+   data structures are stored in block 4 as a font attribute with the attribute
    tag of kATSUFontTag. They can store font data in a few different ways, such as
-   by a FontSync reference or by simple raw font name data. Just as with the 
+   by a FontSync reference or by simple raw font name data. Just as with the
    'ustl' above, this structure must maintain four byte alignment.
 }
 
@@ -604,7 +604,7 @@ const
 {
    this is the main header for the font data. It dictates what type of data
    is stored. The actual data stored must match the type specified by the
-   nameSpecType. 
+   nameSpecType.
 }
 type
 	ATSFlatDataFontNameDataHeader = record
@@ -664,13 +664,13 @@ type
 {
    this is a header structure that defines some things constant throughout
    the entire search for the font name, as well as the array of
-   ATSFlatDataFontNameData structures. In order to gaurantee that the same font 
+   ATSFlatDataFontNameData structures. In order to gaurantee that the same font
    will be used, more than one name specifer should be stored. The standard ATSUI
    style run flattening and parsing functions, ATSUFlattenStyleRunsToStream and
    ATSUUnflattenStyleRunsFromStream. These will store both the font's full name
    (kFontFullName) as well as the font's manufacturer name (kFontManufacturerName)
    and match fonts based on both of
-   these. 
+   these.
 }
 type
 	ATSFlatDataFontSpecRawNameDataHeader = record
@@ -691,14 +691,14 @@ type
 {$ifc not TARGET_CPU_64}
 {
  *  ATSUFlattenStyleRunsToStream()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    Use CoreFoundation flattening API instead.
- *  
+ *
  *  Summary:
  *    Converts a series of ATSUStyle objects and associated run info to
  *    a flat binary representation.
- *  
+ *
  *  Discussion:
  *    This function takes an array of ATSUStyle objects and style run
  *    information and flattens the data to the specified format. The
@@ -717,26 +717,26 @@ type
  *    buffer. (2) Allocate an appropriately-sized buffer for the
  *    oStreamBuffer parameter and then call the function
  *    ATSUFlattenStyleRunsToStream a second time.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    iStreamFormat:
  *      The format of the flattened data. There is only one format
  *      supported at this time ('ustl'), so you must pass the constant
  *      kATSUDataStreamUnicodeStyledText.
- *    
+ *
  *    iFlattenOptions:
  *      The options you want to use to flatten the data. There are no
  *      options supported at this time, so you must pass the constant
  *      kATSUFlattenOptionNoOptionsMask.
- *    
+ *
  *    iNumberOfRunInfo:
  *      The number of style run information structures passed in the
  *      iRunInfoArray parameter. If you pass 0, ATSUI assumes there is
  *      only one style for the entire text block passed in the
  *      oStreamBuffer parameter. The flattened data format passed to
  *      the iStreamFormat parameter must support the use of one style.
- *    
+ *
  *    iRunInfoArray:
  *      An array of ATSUStyleRunInfo structures that describes the
  *      style runs to be flattened. This array must contain
@@ -746,22 +746,22 @@ type
  *      index in the ATSUStyleRunInfo structure must reference a valid
  *      ATSUStyle object passed in the iStyleArray parameter. You can
  *      pass NULL, only if iNumberOfRunInfo is set to zero.
- *    
+ *
  *    iNumberOfStyleObjects:
  *      The number of ATSUStyle objects in the array passed to the
  *      iStyleArray parameter. You must pass a value that is greater
  *      than 0.
- *    
+ *
  *    iStyleArray:
  *      An array of ATSUStyle objects to be flattened. You cannot pass
  *      NULL.
- *    
+ *
  *    iStreamBufferSize:
  *      The size of the stream buffer, pointed to by the oStreamBuffer
  *      parameter. You can pass 0only if the iStreamBufferSize
  *      parameter is set to NULL. If you are uncertain of the size of
  *      the array, see the Discussion.
- *    
+ *
  *    oStreamBuffer:
  *      On input, a pointer to the data you want to flatten. On return,
  *      points to the flattened data. If you pass NULL for this
@@ -770,16 +770,16 @@ type
  *      parameter. See the Discussion for more details. You are
  *      responsible for allocating the text buffer passed in the
  *      oStreamBuffer parameter.
- *    
+ *
  *    oActualStreamBufferSize:
  *      On return, the size of the data written to the oStreamBuffer
  *      parameter. You can pass NULL only if the oStreamBuffer
  *      parameter is not NULL.
- *  
+ *
  *  Result:
  *    On success, noErr is returned. See MacErrors.h for possible error
  *    codes.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.2 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
@@ -791,14 +791,14 @@ function ATSUFlattenStyleRunsToStream( iStreamFormat: ATSUFlattenedDataStreamFor
 
 {
  *  ATSUUnflattenStyleRunsFromStream()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    Use CoreFoundation flattening API instead.
- *  
+ *
  *  Summary:
  *    Creates a series of ATSUStyle objects and associated run
  *    information from a flat binary representation.
- *  
+ *
  *  Discussion:
  *    This function extracts the ATSUI style run information from
  *    previously-flattened data. The style objects and style run
@@ -824,39 +824,39 @@ function ATSUFlattenStyleRunsToStream( iStreamFormat: ATSUFlattenedDataStreamFor
  *    the newly allocated arrays in the oRunInfoArray and oStyleArray
  *    parameters, with the iNumberOfRunInfo and iNumberOfStyleObjects
  *    parameters set to the values you obtained from the first call.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    iStreamFormat:
  *      The format of the flattened data. There is only one format
  *      supported at this time ('ustl'), so you must pass the constant
  *      kATSUDataStreamUnicodeStyledText.
- *    
+ *
  *    iUnflattenOptions:
  *      The options you want to use to unflatten the data. There are no
  *      options supported at this time, so you must pass the constant
  *      kATSUUnflattenOptionNoOptionsMask.
- *    
+ *
  *    iStreamBufferSize:
  *      The size of the buffer pointed to by the iStreamBuffer
  *      parameter. You must pass a value greater than 0.
- *    
+ *
  *    iStreamBuffer:
  *      A pointer to the buffer that contains the flattened data. The
  *      data must be of the format specified by the iStreamFormat
  *      parameter and must be of size specified by the
  *      iStreamBufferSize parameter. You cannot pass NULL .
- *    
+ *
  *    iNumberOfRunInfo:
  *      The number of style run information structures passed in the
  *      oRunInfoArray parameter. If you are uncertain of the number of
  *      style run information structures, see the Discussion.
- *    
+ *
  *    iNumberOfStyleObjects:
  *      The number of ATSUStyle objects in the array passed into the
  *      iStyleArray parameter. If you are uncertain of the number of
  *      ATSUStyle objects, see the Discussion.
- *    
+ *
  *    oRunInfoArray:
  *      On return, points to an array of style run information
  *      structures. Each structure contains a style run length and
@@ -864,7 +864,7 @@ function ATSUFlattenStyleRunsToStream( iStreamFormat: ATSUFlattenedDataStreamFor
  *      much memory to allocate for this array, see the Discussion. You
  *      are responsible for disposing of the array when you no longer
  *      need it.
- *    
+ *
  *    oStyleArray:
  *      On return, a pointer to an array of the unique ATSUStyle
  *      objects obtained from the flattened data. The indices returned
@@ -873,24 +873,24 @@ function ATSUFlattenStyleRunsToStream( iStreamFormat: ATSUFlattenedDataStreamFor
  *      see the Discussion. You are responsible for disposing of the
  *      array and the ATSUI style objects in the array when you no
  *      longer need the array.
- *    
+ *
  *    oActualNumberOfRunInfo:
  *      On return, points to the actual number of ATSUStyleRunInfo
  *      structures obtained from the flattened data. The actual number
  *      of structures is the number of entries added to the array
  *      oRunInfoArray. You can pass NULL if you to not want to obtain
  *      this value.
- *    
+ *
  *    oActualNumberOfStyleObjects:
  *      On return, points to the actual number of unique ATSUStyle
  *      objects obtained from the flattened data. The actual number is
  *      the number of entries added to the oStyleArray array. You can
  *      pass NULL if you do no want to obtain this value.
- *  
+ *
  *  Result:
  *    On success, noErr is returned. See MacErrors.h for possible error
  *    codes.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.2 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
@@ -904,14 +904,14 @@ function ATSUUnflattenStyleRunsFromStream( iStreamFormat: ATSUFlattenedDataStrea
 
 {
  *  ATSUCopyToHandle()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    Use CoreFoundation flattening API instead.
- *  
+ *
  *  Discussion:
  *    This function is no longer recommended. Please use
  *    ATSUFlattenStyleRunsToStream instead.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.1
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -923,14 +923,14 @@ function ATSUCopyToHandle( iStyle: ATSUStyle; oStyleHandle: Handle ): OSStatus;
 
 {
  *  ATSUPasteFromHandle()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    Use CoreFoundation flattening API instead.
- *  
+ *
  *  Discussion:
  *    This function is no longer recommended. Please use
  *    ATSUUnflattenStyleRunsFromStream instead.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.1
  *    CarbonLib:        in CarbonLib 1.0 and later

Разница между файлами не показана из-за своего большого размера
+ 169 - 169
packages/univint/src/ATSUnicodeFonts.pas


+ 150 - 150
packages/univint/src/ATSUnicodeGlyphs.pas

@@ -1,17 +1,17 @@
 {
      File:       QD/ATSUnicodeGlyphs.h
- 
+
      Contains:   ATSUI glyph handling functions.
- 
+
      Version:    Quickdraw-285~150
- 
+
      Copyright:  © 2003-2008 by Apple Inc. all rights reserved.
- 
+
      Bugs?:      For bug reports, consult the following page on
                  the World Wide Web:
- 
+
                      http://bugs.freepascal.org
- 
+
 }
 {  Pascal Translation:  Peter N Lewis, <[email protected]>, 2004 }
 {  Pascal Translation Updated:  Jonas Maebe, <[email protected]>, October 2009 }
@@ -238,17 +238,17 @@ uses MacTypes,ATSUnicodeTypes,TextCommon,ATSTypes;
 {$ifc not TARGET_CPU_64}
 {
  *  ATSUGlyphGetIdealMetrics()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    Use CTFontGetGlyphWithName,
  *    CTFontGetVerticalTranslationsForGlyphs,
  *    CTFontGetBoundingRectsForGlyphs, or CTFontGetAdvancesForGlyphs
  *    instead.
- *  
+ *
  *  Summary:
  *    Obtains resolution-independent font metric information for glyphs
  *    associated with a given style object.
- *  
+ *
  *  Discussion:
  *    The advance width is the full horizontal width of the glyph as
  *    measured from its origin to the origin of the next glyph on the
@@ -265,37 +265,37 @@ uses MacTypes,ATSUnicodeTypes,TextCommon,ATSTypes;
  *    glyph metrics. To obtain device-adjusted (that is,
  *    resolution-dependent) glyph metrics, call the function
  *    ATSUGlyphGetScreenMetrics.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    iATSUStyle:
  *      A style referring to a font you wish to obtain glyph metrics
  *      from.
- *    
+ *
  *    iNumOfGlyphs:
  *      The number of glyph IDs you are passing in to be examined. This
  *      value should be equal to the size of the array you are passing
  *      in for the iGlyphIDs parameter.
- *    
+ *
  *    iGlyphIDs:
  *      An array of glyph IDs referring to glyphs for which you wish to
  *      obtain metrics.
- *    
+ *
  *    iInputOffset:
  *      A ByteOffset value specifying the offset in bytes between glyph
  *      IDs in the iGlyphIDs array.
- *    
+ *
  *    oIdealMetrics:
  *      A pointer to memory you have allocated for an array of
  *      ATSGlyphIdealMetrics structures. On return, each structure
  *      contains advance and side-bearing values for a glyph. See
  *      ATSTypes.h for more information regarding the
  *      ATSGlyphIdealMetrics structure.
- *  
+ *
  *  Result:
  *    On success, noErr is returned. See MacErrors.h for possible error
  *    codes.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -307,16 +307,16 @@ function ATSUGlyphGetIdealMetrics( iATSUStyle: ATSUStyle; iNumOfGlyphs: ItemCoun
 
 {
  *  ATSUGlyphGetScreenMetrics()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    Use CTFontGetBoundingBox, CTFontGetUnderlinePosition,
  *    CTFontGetUnderlineThickness, CTFontGetSlantAngle,
  *    CTFontGetCapHeight, or CTFontGetXHeight iinstead.
- *  
+ *
  *  Summary:
  *    Obtains device-adjusted font metric information for glyphs
  *    associated with a given style object.
- *  
+ *
  *  Discussion:
  *    You can call the ATSUGlyphGetScreenMetrics function to obtain an
  *    array of ATSGlyphScreenMetrics structures containing values for
@@ -325,45 +325,45 @@ function ATSUGlyphGetIdealMetrics( iATSUStyle: ATSUStyle; iNumOfGlyphs: ItemCoun
  *    obtain device-adjusted (that is, resolution-dependent) glyph
  *    metrics. To obtain resolution-independent glyph metrics, call the
  *    function ATSUGlyphGetIdealMetrics.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    iATSUStyle:
  *      A style referring to a font you wish to obtain glyph metrics
  *      from.
- *    
+ *
  *    iNumOfGlyphs:
  *      The number of glyph IDs you are passing in to be examined. This
  *      value should be equal to the size of the array you are passing
  *      in for the iGlyphIDs parameter.
- *    
+ *
  *    iGlyphIDs:
  *      An array of glyph IDs referring to glyphs for which you wish to
  *      obtain metrics.
- *    
+ *
  *    iInputOffset:
  *      A ByteOffset value specifying the offset in bytes between glyph
  *      IDs in the iGlyphIDs array.
- *    
+ *
  *    iForcingAntiAlias:
  *      A Boolean value indicating whether anti-aliasing is forced for
  *      the style object.
- *    
+ *
  *    iAntiAliasSwitch:
  *      A Boolean value indicating whether anti-aliasing is currently
  *      on or off.
- *    
+ *
  *    oScreenMetrics:
  *      A pointer to memory you have allocated for an array of
  *      ATSGlyphScreenMetrics structures. On return, each structure
  *      contains advance and side-bearing values for a glyph. See
  *      ATSTypes.h for more information regarding the
  *      ATSGlyphScreenMetrics structure.
- *  
+ *
  *  Result:
  *    On success, noErr is returned. See MacErrors.h for possible error
  *    codes.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -378,13 +378,13 @@ function ATSUGlyphGetScreenMetrics( iATSUStyle: ATSUStyle; iNumOfGlyphs: ItemCou
 { ---------------------------------------------------------------------------- }
 {
  *  ATSUGetNativeCurveType()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    Use CTFontCreatePathForGlyph instead.
- *  
+ *
  *  Summary:
  *    Returns the native curve format for a specific font.
- *  
+ *
  *  Discussion:
  *    Use this function to decide whether to call
  *    ATSUGlyphGetQuadraticPaths or ATSUGlyphGetCubicPaths. Both
@@ -393,23 +393,23 @@ function ATSUGlyphGetScreenMetrics( iATSUStyle: ATSUStyle; iNumOfGlyphs: ItemCou
  *    font, the curves you get back will be mathematically converted,
  *    rather than native font data. See the definition of ATSCurveType
  *    in ATSTypes.h for possible return values from this function.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    iATSUStyle:
  *      A style referencing a font for which you wish to obtain the
  *      native curve type.
- *    
+ *
  *    oCurveType:
  *      On return, a value indicating the native curve type of the font
  *      referenced by iATSUStyle. See the definition of ATSCurveType in
  *      ATSTypes.h for a list of possible return values for this
  *      parameter.
- *  
+ *
  *  Result:
  *    On success, noErr is returned. See MacErrors.h for possible error
  *    codes.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -424,19 +424,19 @@ function ATSUGetNativeCurveType( iATSUStyle: ATSUStyle; var oCurveType: ATSCurve
 
 {
  *  ATSQuadraticNewPathProcPtr
- *  
+ *
  *  Discussion:
  *    A pointer to a client supplied callback function for handling
  *    glyph curve drawing operations. This callback handles operations
  *    to start a new drawing path.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    callBackDataPtr:
  *      A pointer to any application specific data that may have been
  *      passed to the callbacks through the iCallbackDataPtr parameter
  *      of the ATSUGlyphGetQuadraticPaths function.
- *  
+ *
  *  Result:
  *    Return status. Pass any errors you wish to propagate back to the
  *    original caller of ATSUGlyphGetQuadraticPaths through this return
@@ -448,7 +448,7 @@ type
 	ATSQuadraticNewPathUPP = ATSQuadraticNewPathProcPtr;
 {
  *  NewATSQuadraticNewPathUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -459,7 +459,7 @@ function NewATSQuadraticNewPathUPP( userRoutine: ATSQuadraticNewPathProcPtr ): A
 
 {
  *  DisposeATSQuadraticNewPathUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -470,7 +470,7 @@ procedure DisposeATSQuadraticNewPathUPP( userUPP: ATSQuadraticNewPathUPP ); exte
 
 {
  *  InvokeATSQuadraticNewPathUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -481,25 +481,25 @@ function InvokeATSQuadraticNewPathUPP( callBackDataPtr: UnivPtr; userUPP: ATSQua
 
 {
  *  ATSQuadraticLineProcPtr
- *  
+ *
  *  Discussion:
  *    A pointer to a client supplied callback function for handling
  *    glyph curve drawing operations. This callback handles operations
  *    to draw straight lines.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    pt1:
  *      The starting point of the line.
- *    
+ *
  *    pt2:
  *      The end point of the line.
- *    
+ *
  *    callBackDataPtr:
  *      A pointer to any application specific data that may have been
  *      passed to the callbacks through the iCallbackDataPtr parameter
  *      of the ATSUGlyphGetQuadraticPaths function.
- *  
+ *
  *  Result:
  *    Return status. Pass any errors you wish to propagate back to the
  *    original caller of ATSUGlyphGetQuadraticPaths through this return
@@ -511,7 +511,7 @@ type
 	ATSQuadraticLineUPP = ATSQuadraticLineProcPtr;
 {
  *  NewATSQuadraticLineUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -522,7 +522,7 @@ function NewATSQuadraticLineUPP( userRoutine: ATSQuadraticLineProcPtr ): ATSQuad
 
 {
  *  DisposeATSQuadraticLineUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -533,7 +533,7 @@ procedure DisposeATSQuadraticLineUPP( userUPP: ATSQuadraticLineUPP ); external n
 
 {
  *  InvokeATSQuadraticLineUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -544,30 +544,30 @@ function InvokeATSQuadraticLineUPP( const (*var*) pt1: Float32Point; const (*var
 
 {
  *  ATSQuadraticCurveProcPtr
- *  
+ *
  *  Discussion:
  *    A pointer to a client supplied callback function for handling
  *    glyph curve drawing operations. This callback handles operations
  *    to draw curves. The curve is a quadratic patch specified by a
  *    start point (pt1), and end point (pt2), and a single control
  *    point (controlPt).
- *  
+ *
  *  Parameters:
- *    
+ *
  *    pt1:
  *      The starting point of the curve.
- *    
+ *
  *    controlPt:
  *      The off-curve control point.
- *    
+ *
  *    pt2:
  *      The end point of the curve.
- *    
+ *
  *    callBackDataPtr:
  *      A pointer to any application specific data that may have been
  *      passed to the callbacks through the iCallbackDataPtr parameter
  *      of the ATSUGlyphGetQuadraticPaths function.
- *  
+ *
  *  Result:
  *    Return status. Pass any errors you wish to propagate back to the
  *    original caller of ATSUGlyphGetQuadraticPaths through this return
@@ -579,7 +579,7 @@ type
 	ATSQuadraticCurveUPP = ATSQuadraticCurveProcPtr;
 {
  *  NewATSQuadraticCurveUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -590,7 +590,7 @@ function NewATSQuadraticCurveUPP( userRoutine: ATSQuadraticCurveProcPtr ): ATSQu
 
 {
  *  DisposeATSQuadraticCurveUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -601,7 +601,7 @@ procedure DisposeATSQuadraticCurveUPP( userUPP: ATSQuadraticCurveUPP ); external
 
 {
  *  InvokeATSQuadraticCurveUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -612,19 +612,19 @@ function InvokeATSQuadraticCurveUPP( const (*var*) pt1: Float32Point; const (*va
 
 {
  *  ATSQuadraticClosePathProcPtr
- *  
+ *
  *  Discussion:
  *    A pointer to a client supplied callback function for handling
  *    glyph curve drawing operations. This callback handles operations
  *    to close the current drawing path.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    callBackDataPtr:
  *      A pointer to any application specific data that may have been
  *      passed to the callbacks through the iCallbackDataPtr parameter
  *      of the ATSUGlyphGetQuadraticPaths function.
- *  
+ *
  *  Result:
  *    Return status. Pass any errors you wish to propagate back to the
  *    original caller of ATSUGlyphGetQuadraticPaths through this return
@@ -636,7 +636,7 @@ type
 	ATSQuadraticClosePathUPP = ATSQuadraticClosePathProcPtr;
 {
  *  NewATSQuadraticClosePathUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -647,7 +647,7 @@ function NewATSQuadraticClosePathUPP( userRoutine: ATSQuadraticClosePathProcPtr
 
 {
  *  DisposeATSQuadraticClosePathUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -658,7 +658,7 @@ procedure DisposeATSQuadraticClosePathUPP( userUPP: ATSQuadraticClosePathUPP );
 
 {
  *  InvokeATSQuadraticClosePathUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -670,14 +670,14 @@ function InvokeATSQuadraticClosePathUPP( callBackDataPtr: UnivPtr; userUPP: ATSQ
 {$ifc not TARGET_CPU_64}
 {
  *  ATSUGlyphGetQuadraticPaths()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    Use CTFontCreatePathForGlyph instead.
- *  
+ *
  *  Summary:
  *    Uses a callback mechanism to obtain a set of Quadratic outlines
  *    for a specified glyph in a specified font.
- *  
+ *
  *  Discussion:
  *    This function will allow you to use callbacks to obtain the exact
  *    outline of a specified glyph, in quadratic form. Although this
@@ -691,55 +691,55 @@ function InvokeATSQuadraticClosePathUPP( callBackDataPtr: UnivPtr; userUPP: ATSQ
  *    of ATSQuadraticNewPathProcPtr, ATSQuadraticLineProcPtr,
  *    ATSQuadraticCurveProcPtr, and ATSQuadraticClosePathProcPtr for
  *    more information about setting up the callbacks.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    iATSUStyle:
  *      A style referring to a font you wish to obtain a set of glyph
  *      outlines from.
- *    
+ *
  *    iGlyphID:
  *      A ID number referring to the glyph for which you wish to obtain
  *      outline data. Use the ATSUI direct access functions in
  *      ATSUnicodeDirectAccess.h to obtain values to pass for this
  *      parameter.
- *    
+ *
  *    iNewPathProc:
  *      A pointer to a callback function for quadratic new path
  *      operations. See the definition of ATSQuadraticNewPathProcPtr
  *      for more information about creating, disposing, and invoking
  *      this type of Universal Procedure Pointer.
- *    
+ *
  *    iLineProc:
  *      A pointer to a callback function for quadratic LineTo
  *      operations. See the definition of ATSQuadraticLineProcPtr for
  *      more information about creating, disposing, and invoking this
  *      type of Universal Procedure Pointer.
- *    
+ *
  *    iCurveProc:
  *      A pointer to a callback function for quadratic curve
  *      operations. See the definition of ATSQuadraticCurveProcPtr for
  *      more information about creating, disposing, and invoking this
  *      type of Universal Procedure Pointer.
- *    
+ *
  *    iClosePathProc:
  *      A pointer to a callback function for quadratic close path
  *      operations. See the definition of ATSQuadraticClosePathProcPtr
  *      for more information about creating, disposing, and invoking
  *      this type of Universal Procedure Pointer.
- *    
+ *
  *    iCallbackDataPtr:
  *      Any valid pointer. Any application specific data you wish to
  *      pass to your callbacks may be sent through this parameter.
- *    
+ *
  *    oCallbackResult:
  *      On return, status returned by callback functions. If an error
  *      occurs, callbacks may communicate it through this parameter.
- *  
+ *
  *  Result:
  *    On success, noErr is returned. See MacErrors.h for possible error
  *    codes.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -754,22 +754,22 @@ function ATSUGlyphGetQuadraticPaths( iATSUStyle: ATSUStyle; iGlyphID: GlyphID; i
 
 {
  *  ATSCubicMoveToProcPtr
- *  
+ *
  *  Discussion:
  *    A pointer to a client supplied callback function for handling
  *    glyph curve drawing operations. This callback handles operations
  *    to move the current pen location.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    pt:
  *      The point to which to move the current pen location.
- *    
+ *
  *    callBackDataPtr:
  *      A pointer to any application specific data that may have been
  *      passed to the callbacks through the iCallbackDataPtr parameter
  *      of the ATSUGlyphGetCubicPaths function.
- *  
+ *
  *  Result:
  *    Return status. Pass any errors you wish to propagate back to the
  *    original caller of ATSUGlyphGetCubicPaths through this return
@@ -781,7 +781,7 @@ type
 	ATSCubicMoveToUPP = ATSCubicMoveToProcPtr;
 {
  *  NewATSCubicMoveToUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -792,7 +792,7 @@ function NewATSCubicMoveToUPP( userRoutine: ATSCubicMoveToProcPtr ): ATSCubicMov
 
 {
  *  DisposeATSCubicMoveToUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -803,7 +803,7 @@ procedure DisposeATSCubicMoveToUPP( userUPP: ATSCubicMoveToUPP ); external name
 
 {
  *  InvokeATSCubicMoveToUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -814,23 +814,23 @@ function InvokeATSCubicMoveToUPP( const (*var*) pt: Float32Point; callBackDataPt
 
 {
  *  ATSCubicLineToProcPtr
- *  
+ *
  *  Discussion:
  *    A pointer to a client supplied callback function for handling
  *    glyph curve drawing operations. This callback handles operations
  *    to draw straight lines.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    pt:
  *      The end point of the line to be drawn. The starting point is
  *      whatever the current pen position is.
- *    
+ *
  *    callBackDataPtr:
  *      A pointer to any application specific data that may have been
  *      passed to the callbacks through the iCallbackDataPtr parameter
  *      of the ATSUGlyphGetCubicPaths function.
- *  
+ *
  *  Result:
  *    Return status. Pass any errors you wish to propagate back to the
  *    original caller of ATSUGlyphGetCubicPaths through this return
@@ -842,7 +842,7 @@ type
 	ATSCubicLineToUPP = ATSCubicLineToProcPtr;
 {
  *  NewATSCubicLineToUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -853,7 +853,7 @@ function NewATSCubicLineToUPP( userRoutine: ATSCubicLineToProcPtr ): ATSCubicLin
 
 {
  *  DisposeATSCubicLineToUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -864,7 +864,7 @@ procedure DisposeATSCubicLineToUPP( userUPP: ATSCubicLineToUPP ); external name
 
 {
  *  InvokeATSCubicLineToUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -875,30 +875,30 @@ function InvokeATSCubicLineToUPP( const (*var*) pt: Float32Point; callBackDataPt
 
 {
  *  ATSCubicCurveToProcPtr
- *  
+ *
  *  Discussion:
  *    A pointer to a client supplied callback function for handling
  *    glyph curve drawing operations. This callback handles operations
  *    to draw a curve. The curve is a Bezier patch defined by two
  *    off-curve control points (pt1 and pt2), and an endpoint (pt3).
  *    The starting point is whatever the current pen position is.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    pt1:
  *      The first off-curve control point.
- *    
+ *
  *    pt2:
  *      The second off-curve control point.
- *    
+ *
  *    pt3:
  *      The end point of the curve.
- *    
+ *
  *    callBackDataPtr:
  *      A pointer to any application specific data that may have been
  *      passed to the callbacks through the iCallbackDataPtr parameter
  *      of the ATSUGlyphGetCubicPaths function.
- *  
+ *
  *  Result:
  *    Return status. Pass any errors you wish to propagate back to the
  *    original caller of ATSUGlyphGetCubicPaths through this return
@@ -910,7 +910,7 @@ type
 	ATSCubicCurveToUPP = ATSCubicCurveToProcPtr;
 {
  *  NewATSCubicCurveToUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -921,7 +921,7 @@ function NewATSCubicCurveToUPP( userRoutine: ATSCubicCurveToProcPtr ): ATSCubicC
 
 {
  *  DisposeATSCubicCurveToUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -932,7 +932,7 @@ procedure DisposeATSCubicCurveToUPP( userUPP: ATSCubicCurveToUPP ); external nam
 
 {
  *  InvokeATSCubicCurveToUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -943,19 +943,19 @@ function InvokeATSCubicCurveToUPP( const (*var*) pt1: Float32Point; const (*var*
 
 {
  *  ATSCubicClosePathProcPtr
- *  
+ *
  *  Discussion:
  *    A pointer to a client supplied callback function for handling
  *    glyph curve drawing operations. This callback handles operations
  *    to close the current drawing path.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    callBackDataPtr:
  *      A pointer to any application specific data that may have been
  *      passed to the callbacks through the iCallbackDataPtr parameter
  *      of the ATSUGlyphGetCubicPaths function.
- *  
+ *
  *  Result:
  *    Return status. Pass any errors you wish to propagate back to the
  *    original caller of ATSUGlyphGetCubicPaths through this return
@@ -967,7 +967,7 @@ type
 	ATSCubicClosePathUPP = ATSCubicClosePathProcPtr;
 {
  *  NewATSCubicClosePathUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -978,7 +978,7 @@ function NewATSCubicClosePathUPP( userRoutine: ATSCubicClosePathProcPtr ): ATSCu
 
 {
  *  DisposeATSCubicClosePathUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -989,7 +989,7 @@ procedure DisposeATSCubicClosePathUPP( userUPP: ATSCubicClosePathUPP ); external
 
 {
  *  InvokeATSCubicClosePathUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -1001,14 +1001,14 @@ function InvokeATSCubicClosePathUPP( callBackDataPtr: UnivPtr; userUPP: ATSCubic
 {$ifc not TARGET_CPU_64}
 {
  *  ATSUGlyphGetCubicPaths()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    Use CTFontCreatePathForGlyph instead.
- *  
+ *
  *  Summary:
  *    Uses a callback mechanism to obtain a set of Cubic outlines for a
  *    specified glyph in a specified font.
- *  
+ *
  *  Discussion:
  *    This function will allow you to use callbacks to obtain the exact
  *    outline of a specified glyph, in cubic form. Although this
@@ -1022,55 +1022,55 @@ function InvokeATSCubicClosePathUPP( callBackDataPtr: UnivPtr; userUPP: ATSCubic
  *    of ATSCubicMoveToProcPtr, ATSCubicLineToProcPtr,
  *    ATSCubicCurveToProcPtr, and ATSCubicClosePathProcPtr for more
  *    information about setting up the callbacks.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    iATSUStyle:
  *      A style referring to a font you wish to obtain a set of glyph
  *      outlines from.
- *    
+ *
  *    iGlyphID:
  *      A ID number referring to the glyph for which you wish to obtain
  *      outline data. Use the ATSUI direct access functions in
  *      ATSUnicodeDirectAccess.h to obtain values to pass for this
  *      parameter.
- *    
+ *
  *    iMoveToProc:
  *      A pointer to a callback function for cubic MoveTo operations.
  *      See the definition of ATSCubicMoveToProcPtr for more
  *      information about creating, disposing, and invoking this type
  *      of Universal Procedure Pointer.
- *    
+ *
  *    iLineToProc:
  *      A pointer to a callback function for cubic LineTo operations.
  *      See the definition of ATSCubicLineToProcPtr for more
  *      information about creating, disposing, and invoking this type
  *      of Universal Procedure Pointer.
- *    
+ *
  *    iCurveToProc:
  *      A pointer to a callback function for cubic CurveTo operations.
  *      See the definition of ATSCubicCurveToProcPtr for more
  *      information about creating, disposing, and invoking this type
  *      of Universal Procedure Pointer.
- *    
+ *
  *    iClosePathProc:
  *      A pointer to a callback function for cubic MoveTo operations.
  *      See the definition of ATSCubicClosePathProcPtr for more
  *      information about creating, disposing, and invoking this type
  *      of Universal Procedure Pointer.
- *    
+ *
  *    iCallbackDataPtr:
  *      Any valid pointer. Any application specific data you wish to
  *      pass to your callbacks may be sent through this parameter.
- *    
+ *
  *    oCallbackResult:
  *      On return, status returned by callback functions. If an error
  *      occurs, callbacks may communicate it through this parameter.
- *  
+ *
  *  Result:
  *    On success, noErr is returned. See MacErrors.h for possible error
  *    codes.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -1082,13 +1082,13 @@ function ATSUGlyphGetCubicPaths( iATSUStyle: ATSUStyle; iGlyphID: GlyphID; iMove
 
 {
  *  ATSUGlyphGetCurvePaths()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    Use CTFontCreatePathForGlyph instead.
- *  
+ *
  *  Summary:
  *    Obtains glyph curve data without the use of callbacks.
- *  
+ *
  *  Discussion:
  *    This function will return glyph curve data in a single data
  *    structure rather than through the use of callbacks, but you must
@@ -1105,33 +1105,33 @@ function ATSUGlyphGetCubicPaths( iATSUStyle: ATSUStyle; iGlyphID: GlyphID; iMove
  *    call the ATSUGlyphGetCurvePaths again, passing a pointer to the
  *    array in the oPaths parameter. On return, the array contains the
  *    glyph outline data.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    iATSUStyle:
  *      A style referring to a font you wish to obtain a set of glyph
  *      outlines from.
- *    
+ *
  *    iGlyphID:
  *      A ID number referring to the glyph for which you wish to obtain
  *      outline data. Use the ATSUI direct access functions in
  *      ATSUnicodeDirectAccess.h to obtain values to pass for this
  *      parameter.
- *    
+ *
  *    ioBufferSize:
  *      On input, the size of the buffer you have allocated for the
  *      oPaths parameter. On return, the actual size of the data
  *      structure that has been copied into the oPaths parameter.
- *    
+ *
  *    oPaths:
  *      On return, a data structure containing glyph outline
  *      information. See ATSTypes.h for a definition of this data
  *      structure.
- *  
+ *
  *  Result:
  *    On success, noErr is returned. See MacErrors.h for possible error
  *    codes.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -1148,19 +1148,19 @@ function ATSUGlyphGetCurvePaths( iATSUStyle: ATSUStyle; iGlyphID: GlyphID; ioBuf
 { ---------------------------------------------------------------------------- }
 {
  *  ATSUGetGlyphInfo()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    Use CTRunGetGlyphsPtr,CTRunGetGlyphs, CTRunGetPositionsPtr,
  *    CTRunGetPositions, CTRunGetStringIndicesPtr,
  *    CTRunGetStringIndices, CTRunGetStringRange instead.
- *  
+ *
  *  Summary:
  *    Obtains a copy of the style and layout information for each glyph
  *    in a line.
- *  
+ *
  *  Discussion:
  *    Please see ATSUnicodeDirectAccess.h for replacement functions.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.3
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -1172,19 +1172,19 @@ function ATSUGetGlyphInfo( iTextLayout: ATSUTextLayout; iLineStart: UniCharArray
 
 {
  *  ATSUDrawGlyphInfo()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    Use CTRunGetGlyphsPtr,CTRunGetGlyphs, CTRunGetPositionsPtr,
  *    CTRunGetPositions, CTRunGetStringIndicesPtr,
  *    CTRunGetStringIndices, CTRunGetStringRange instead.
- *  
+ *
  *  Summary:
  *    Draws glyphs at the specified location, based on style and layout
  *    information specified for each glyph.
- *  
+ *
  *  Discussion:
  *    Please see ATSUnicodeDirectAccess.h for replacement functions.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.3
  *    CarbonLib:        in CarbonLib 1.1 and later

Разница между файлами не показана из-за своего большого размера
+ 174 - 174
packages/univint/src/ATSUnicodeObjects.pas


+ 56 - 56
packages/univint/src/ATSUnicodeTypes.pas

@@ -1,17 +1,17 @@
 {
      File:       QD/ATSUnicodeTypes.h
- 
+
      Contains:   ATSUI types and constants.
- 
+
      Version:    Quickdraw-285~150
- 
+
      Copyright:  © 2003-2008 by Apple Inc. all rights reserved.
- 
+
      Bugs?:      For bug reports, consult the following page on
                  the World Wide Web:
- 
+
                      http://bugs.freepascal.org
- 
+
 }
 {  Pascal Translation:  Peter N Lewis, <[email protected]>, 2004 }
 {   Pascal Translation Updated:  Jonas Maebe, <[email protected]>, October 2009 }
@@ -238,7 +238,7 @@ uses MacTypes,MacMemory,ATSLayoutTypes,Fonts,QuickdrawTypes,SFNTTypes,SFNTLayout
 
 {
  *  ATSUTextLayout
- *  
+ *
  *  Discussion:
  *    Text layout objects are the heart of ATSUI. These opaque objects
  *    associate Unicode text with style runs, store information about
@@ -256,7 +256,7 @@ type
 
 {
  *  ATSUStyle
- *  
+ *
  *  Discussion:
  *    Style objects retain information about text such as font, point
  *    size, color and other attributes. Styles are associated with text
@@ -274,7 +274,7 @@ type
 
 {
  *  ATSUFontFallbacks
- *  
+ *
  *  Discussion:
  *    ATSUFontFallbacks objects are used to store the desired font
  *    fallback mode, list, and associated cache information. See the
@@ -287,7 +287,7 @@ type
 
 {
  *  ATSUTextMeasurement
- *  
+ *
  *  Discussion:
  *    ATSUTextMeasurement is specific to ATSUI in that measurement
  *    quantities are in fractional Fixed format instead of shorts used
@@ -301,7 +301,7 @@ type
 
 {
  *  ATSUFontID
- *  
+ *
  *  Discussion:
  *    ATSUFontID indicates a particular font family and face.
  *    ATSUFontID's are not guaranteed to remain constant across
@@ -315,7 +315,7 @@ type
 
 {
  *  ATSUFontFeatureType
- *  
+ *
  *  Discussion:
  *    Used to identify a font feature type for a particular font. See
  *    the definitions of the functions ATSUGetAllFontFeatures and
@@ -327,7 +327,7 @@ type
 
 {
  *  ATSUFontFeatureSelector
- *  
+ *
  *  Discussion:
  *    Used to identify a font feature selector for a particular font.
  *    See the definitions of the functions ATSUGetAllFontFeatures and
@@ -339,7 +339,7 @@ type
 
 {
  *  ATSUFontVariationAxis
- *  
+ *
  *  Discussion:
  *    Used to identify a font variation axis for a particular font. See
  *    the definitions of the functions ATSUGetAllFontVariations and
@@ -351,7 +351,7 @@ type
 
 {
  *  ATSUFontVariationValue
- *  
+ *
  *  Discussion:
  *    Used to identify a font variation value for a particular font.
  *    See the definitions of the functions ATSUGetAllFontVariations and
@@ -363,11 +363,11 @@ type
 
 {
  *  ATSUAttributeTag
- *  
+ *
  *  Summary:
  *    Constants used for style attributes, line controls, and layout
  *    controls.
- *  
+ *
  *  Discussion:
  *    The following constants are used to change settings in text
  *    layout and style objects. Use the functions ATSUSetLineControls,
@@ -829,7 +829,7 @@ const
 
 {
  *  ATSUAttributeValuePtr
- *  
+ *
  *  Summary:
  *    Used to provide generic access for storage of attribute values,
  *    which vary in size.
@@ -841,7 +841,7 @@ type
 
 {
  *  ATSUAttributeInfo
- *  
+ *
  *  Discussion:
  *    ATSUAttributeInfo is used to provide a tag/size pairing. This
  *    makes it possible to provide the client information about all the
@@ -864,7 +864,7 @@ type
 
 {
  *  ATSUCaret
- *  
+ *
  *  Discussion:
  *    Contains the complete information needed to render a caret.  fX
  *    and fY is the position of one of the caret's ends relative to the
@@ -886,7 +886,7 @@ type
 
 {
  *  ATSUCursorMovementType
- *  
+ *
  *  Discussion:
  *    Used to indicate how much to move the cursor when using the ATSUI
  *    cusor movement routines. Note that kATSUByCharacterCluster is
@@ -926,11 +926,11 @@ const
 
 {
  *  ATSULineTruncation
- *  
+ *
  *  Summary:
  *    Constants used with the kATSULineTruncationTag layout and line
  *    control.
- *  
+ *
  *  Discussion:
  *    The constants kATSUTruncateNone, kATSUTruncateStart,
  *    kATSUTruncateEnd, and kATSUTruncateMiddle represent different
@@ -956,7 +956,7 @@ const
 
 {
  *  ATSUStyleLineCountType
- *  
+ *
  *  Discussion:
  *    ATSUStyleLineCountType is used to designate how many lines will
  *    be drawn for a given style type.  Currently only the underline
@@ -971,7 +971,7 @@ const
 
 {
  *  ATSUVerticalCharacterType
- *  
+ *
  *  Discussion:
  *    Use these constants along with the kATSUVerticalCharacterTag
  *    layout control to determine whether the vertical or horizontal
@@ -987,7 +987,7 @@ const
 
 {
  *  ATSUStyleComparison
- *  
+ *
  *  Discussion:
  *    ATSUStyleComparison is an enumeration with four values, and is
  *    used by ATSUCompareStyles() to indicate if the first style
@@ -1005,7 +1005,7 @@ const
 
 {
  *  ATSUFontFallbackMethod
- *  
+ *
  *  Discussion:
  *    ATSUFontFallbackMethod type defines the method by which ATSUI
  *    will try to find an appropriate font for a character if the
@@ -1050,7 +1050,7 @@ const
 
 {
  *  ATSUTabType
- *  
+ *
  *  Discussion:
  *    ATSUTabType type defines the characteristic of ATSUI tabs. A Left
  *    tab type specifies that the left side of affected text is to be
@@ -1077,7 +1077,7 @@ const
 
 {
  *  ATSUTab
- *  
+ *
  *  Discussion:
  *    ATSUTab specifies the position and type of tab stop to be applied
  *    to a ATSUTextLayout set through the ATSUI routine ATSUSetTabArray
@@ -1092,7 +1092,7 @@ type
 
 {
  *  ATSURGBAlphaColor
- *  
+ *
  *  Discussion:
  *    Use this structure with the kATSURGBAlphaColorTag attribute to
  *    specify color for your text in an ATSUStyle. All values range
@@ -1109,7 +1109,7 @@ type
 
 {
  *  GlyphCollection
- *  
+ *
  *  Discussion:
  *    GlyphCollection types represent the specific character
  *    collection.  If the value is zero, kGlyphCollectionGID, then this
@@ -1132,7 +1132,7 @@ const
 
 {
  *  ATSUGlyphSelector
- *  
+ *
  *  Discussion:
  *    ATSUGlyphSelector can direct ATSUI to use a specific glyph
  *    instead of the one that ATSUI normally derives.  The glyph can be
@@ -1158,10 +1158,10 @@ type
 
 {
  *  ATSUGlyphInfo
- *  
+ *
  *  Summary:
  *    Structure returned by ATSUGetGlyphInfo
- *  
+ *
  *  Discussion:
  *    ATSUGetGlyphInfo will return an array of these structs, one for
  *    each glyph in the specified range. You can then make changes to
@@ -1185,10 +1185,10 @@ type
 
 {
  *  ATSUGlyphInfoArray
- *  
+ *
  *  Summary:
  *    Structure returned by ATSUGetGlyphInfo
- *  
+ *
  *  Discussion:
  *    This data structure is returned by ATSUGetGlyphInfo. layout is
  *    the same layout you pass in to ATSUGetGlyphInfo, numGlyphs is the
@@ -1211,7 +1211,7 @@ type
 
 {
  *  ATSUHighlightMethod
- *  
+ *
  *  Discussion:
  *    Use the constants with the function ATSUSetHighlightingMethod to
  *    determine the method of highlighting to use. kInvertHighlighting
@@ -1235,7 +1235,7 @@ const
 
 {
  *  ATSUBackgroundDataType
- *  
+ *
  *  Discussion:
  *    Use these constants for the dataType field in the
  *    ATSUUnhighlightData structure. kATSUBackgroundColor refers to a
@@ -1252,7 +1252,7 @@ const
 
 {
  *  ATSUBackgroundColor
- *  
+ *
  *  Discussion:
  *    A background color used by ATSUI to redraw the background after a
  *    call to ATSUUnhighlight text when the highlighting method is set
@@ -1265,7 +1265,7 @@ type
 
 {
  *  RedrawBackgroundProcPtr
- *  
+ *
  *  Discussion:
  *    RedrawBackgroundProcPtr is a pointer to a client-supplied
  *    callback function (e.g. MyRedrawBackgroundProc) for redrawing
@@ -1280,28 +1280,28 @@ type
  *    parameter for the ATSUSetHighlightingMethod call. When finished,
  *    the client should call DisposeRedrawBackgroundUPP with the
  *    RedrawBackgroundUPP.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    iLayout:
  *      The layout to which the highlighting is being applied. The
  *      client function can use this to redraw the text.
- *    
+ *
  *    iTextOffset:
  *      The offset of the text that is being highlighted; can be used
  *      by the client function to redraaw the text.
- *    
+ *
  *    iTextLength:
  *      The length of the text that is being highlighted; can be used
  *      by the client function to redraaw the text.
- *    
+ *
  *    iUnhighlightArea:
  *      An array of ATSTrapezoids that describes the highlight area.
  *      The ATSTrapezoid array is ALWAYS in QD coordinates.
- *    
+ *
  *    iTrapezoidCount:
  *      The count of ATSTrapezoids in iUnhighlightArea.
- *  
+ *
  *  Result:
  *    A Boolean result indicating whether ATSUI should redraw the text.
  *    If the client function redraws the text, it should return false,
@@ -1313,7 +1313,7 @@ type
 	RedrawBackgroundUPP = RedrawBackgroundProcPtr;
 {
  *  NewRedrawBackgroundUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
@@ -1324,7 +1324,7 @@ function NewRedrawBackgroundUPP( userRoutine: RedrawBackgroundProcPtr ): RedrawB
 
 {
  *  DisposeRedrawBackgroundUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
@@ -1335,7 +1335,7 @@ procedure DisposeRedrawBackgroundUPP( userUPP: RedrawBackgroundUPP ); external n
 
 {
  *  InvokeRedrawBackgroundUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
@@ -1347,10 +1347,10 @@ function InvokeRedrawBackgroundUPP( iLayout: ATSUTextLayout; iTextOffset: UniCha
 
 {
  *  ATSUBackgroundData
- *  
+ *
  *  Summary:
  *    Data describing one of two methods for ATSUI to unhighlight text.
- *  
+ *
  *  Discussion:
  *    When you call ATSUUnhighlightText and the highlighting method
  *    used is kRedrawHighlighting, ATSUI must redraw the text,
@@ -1382,10 +1382,10 @@ type
 
 {
  *  ATSUUnhighlightData
- *  
+ *
  *  Summary:
  *    Struct for defining a method for ATSUI to unhighlight text.
- *  
+ *
  *  Discussion:
  *    There are two methods of highlighting available on Mac OS X:
  *    invert and redraw. For the invert method, no unhighlight method
@@ -1427,7 +1427,7 @@ type
 {
  *  Summary:
  *    Line direction types
- *  
+ *
  *  Discussion:
  *    These constants are used with the kATSULineDirectionTag control
  *    to determine overall line direction.
@@ -1484,7 +1484,7 @@ const
 {
  *  Summary:
  *    Text buffer convenience constants.
- *  
+ *
  *  Discussion:
  *    These constants refer to the beginning and end of a text buffer.
  *    Functions which accept these constants are marked below. Do not

Разница между файлами не показана из-за своего большого размера
+ 254 - 254
packages/univint/src/AUComponent.pas


+ 126 - 126
packages/univint/src/AVLTree.pas

@@ -1,9 +1,9 @@
 {
      File:       CarbonCore/AVLTree.h
- 
+
      Contains:   Interfaces for AVL balanced trees.
                  The contents of this header file are deprecated.
- 
+
      Copyright:  © 1999-2011 by Apple Inc. All rights reserved.
 }
 {
@@ -222,7 +222,7 @@ uses MacTypes;
 
 {
  *  AVLVisitStage
- *  
+ *
  *  Discussion:
  *    The visit stage for AVLWalk() walkProcs
  }
@@ -248,7 +248,7 @@ const
 
 {
  *  AVLOrder
- *  
+ *
  *  Discussion:
  *    The order the tree is walked or disposed of.
  }
@@ -268,7 +268,7 @@ const
 
 {
  *  AVLNodeType
- *  
+ *
  *  Discussion:
  *    The type of the node being passed to a callback proc.
  }
@@ -291,10 +291,10 @@ const
 
 {
  *  AVLTreeStruct
- *  
+ *
  *  Summary:
  *    An opaque structure for a balanced binary tree.
- *  
+ *
  *  Discussion:
  *    The structure of a tree.  It's opaque; don't assume it's 36 bytes
  *    in size.
@@ -310,11 +310,11 @@ type
 
 {
  *  AVLCompareItemsProcPtr
- *  
+ *
  *  Summary:
  *    A callback function which compares two data items and returns
  *    their ordering.
- *  
+ *
  *  Discussion:
  *    Every tree must have a function which compares the data for two
  *    items and returns < 0, 0, or >0 for the items - < 0 if the first
@@ -323,22 +323,22 @@ type
  *    if the first item is 'after' the second item according to the
  *    criteria.  The comparison function is also passed the node type,
  *    but most of the time this can be ignored.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    tree:
  *      The tree which contains the items being compared
- *    
+ *
  *    i1:
  *      A pointer to the first item
- *    
+ *
  *    i2:
  *      A pointer to the second item
- *    
+ *
  *    nd_typ:
  *      The type of the nodes being compared.  This is not terribly
  *      useful most of the time.
- *  
+ *
  *  Result:
  *    A value < 0 if i1 is 'before' i2, > 0 if i1 is 'after' i2, or ==
  *    0 if i1 is equal to i2.
@@ -348,25 +348,25 @@ type
 
 {
  *  AVLItemSizeProcPtr
- *  
+ *
  *  Summary:
  *    A callback function which returns the size of an item.
- *  
+ *
  *  Discussion:
  *    Every tree must have a itemSizeProc; this routine gets passed a
  *    pointer to the item's data and returns the size of the data.  If
  *    a tree contains records of a fixed size, this function can just
  *    return sizeof( that-struct ); otherwise it should calculate the
  *    size of the item based on the data for the item.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    tree:
  *      The tree which contains the item whose size is being requested.
- *    
+ *
  *    itemPtr:
  *      A pointer to the item whose size is being returned.
- *  
+ *
  *  Result:
  *    The size of the item.
  }
@@ -375,23 +375,23 @@ type
 
 {
  *  AVLDisposeItemProcPtr
- *  
+ *
  *  Summary:
  *    Dispose of any additional memory associated with an item in the
  *    tree.
- *  
+ *
  *  Discussion:
  *    A tree may have an optional disposeItemProc, which gets called
  *    whenever an item is removed from the tree ( via AVLRemove() or
  *    when AVLDispose() deletes all of the items in the tree ). This
  *    might be useful if the nodes in the tree own 'resources'  ( like,
  *    open files ) which should be released before the item is removed.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    tree:
  *      The tree containing the item being disposed.
- *    
+ *
  *    dataP:
  *      A pointer to the data for the item being disposed.
  }
@@ -400,11 +400,11 @@ type
 
 {
  *  AVLWalkProcPtr
- *  
+ *
  *  Summary:
  *    A callback function which gets passed each item in the tree, in a
  *    specified order.
- *  
+ *
  *  Discussion:
  *    The common way to iterate across all of the items in a tree is
  *    via AVLWalk(), which takes a walkProcPtr.  This function will get
@@ -419,33 +419,33 @@ type
  *    the tree, up until the last item in the tree structure is called.
  *    In general, you'll only care about calls to this function when
  *    visitStage == kAVLInOrder.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    tree:
  *      The tree being walked.
- *    
+ *
  *    dataPtr:
  *      A pointer to the data for an item in the tree.
- *    
+ *
  *    visitStage:
  *      The stage of the walk for the given node.
- *    
+ *
  *    node:
  *      The type of the given node. This is not terribly useful most of
  *      the time.
- *    
+ *
  *    level:
  *      How 'deep' in the tree the given node is.  This is not terribly
  *      useful most of the time.
- *    
+ *
  *    balance:
  *      How balanced the given node in the tree is.  This is not
  *      terribly useful most of the time.
- *    
+ *
  *    refCon:
  *      The refCon passed into AVLWalk() for this call.
- *  
+ *
  *  Result:
  *    Return 0 to continue walking the tree, or 1 to terminate.
  }
@@ -457,7 +457,7 @@ type
 	AVLWalkUPP = AVLWalkProcPtr;
 {
  *  NewAVLCompareItemsUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -468,7 +468,7 @@ function NewAVLCompareItemsUPP( userRoutine: AVLCompareItemsProcPtr ): AVLCompar
 
 {
  *  NewAVLItemSizeUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -479,7 +479,7 @@ function NewAVLItemSizeUPP( userRoutine: AVLItemSizeProcPtr ): AVLItemSizeUPP; e
 
 {
  *  NewAVLDisposeItemUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -490,7 +490,7 @@ function NewAVLDisposeItemUPP( userRoutine: AVLDisposeItemProcPtr ): AVLDisposeI
 
 {
  *  NewAVLWalkUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -501,7 +501,7 @@ function NewAVLWalkUPP( userRoutine: AVLWalkProcPtr ): AVLWalkUPP; external name
 
 {
  *  DisposeAVLCompareItemsUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -512,7 +512,7 @@ procedure DisposeAVLCompareItemsUPP( userUPP: AVLCompareItemsUPP ); external nam
 
 {
  *  DisposeAVLItemSizeUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -523,7 +523,7 @@ procedure DisposeAVLItemSizeUPP( userUPP: AVLItemSizeUPP ); external name '_Disp
 
 {
  *  DisposeAVLDisposeItemUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -534,7 +534,7 @@ procedure DisposeAVLDisposeItemUPP( userUPP: AVLDisposeItemUPP ); external name
 
 {
  *  DisposeAVLWalkUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -545,7 +545,7 @@ procedure DisposeAVLWalkUPP( userUPP: AVLWalkUPP ); external name '_DisposeAVLWa
 
 {
  *  InvokeAVLCompareItemsUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -556,7 +556,7 @@ function InvokeAVLCompareItemsUPP( tree: AVLTreePtr; i1: {const} UnivPtr; i2: {c
 
 {
  *  InvokeAVLItemSizeUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -567,7 +567,7 @@ function InvokeAVLItemSizeUPP( tree: AVLTreePtr; itemPtr: {const} UnivPtr; userU
 
 {
  *  InvokeAVLDisposeItemUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -578,7 +578,7 @@ procedure InvokeAVLDisposeItemUPP( tree: AVLTreePtr; dataP: {const} UnivPtr; use
 
 {
  *  InvokeAVLWalkUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -590,10 +590,10 @@ function InvokeAVLWalkUPP( tree: AVLTreePtr; dataPtr: {const} UnivPtr; visitStag
 {$ifc not TARGET_CPU_64}
 {
  *  AVLInit()   *** DEPRECATED ***
- *  
+ *
  *  Summary:
  *    Create an AVL ( balanced binary ) tree
- *  
+ *
  *  Discussion:
  *    Create an AVL tree.  The compareItemsProc and the sizeItemProc
  *    are required; disposeItemProc is optional and can be nil.  The
@@ -603,24 +603,24 @@ function InvokeAVLWalkUPP( tree: AVLTreePtr; dataPtr: {const} UnivPtr; visitStag
  *    with AVLInsert ) will be created in what is the current zone at
  *    the time AVLInit() is called.  Always call AVLDispose() to
  *    dispose of a list created with AVLInit().
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe
- *  
+ *
  *  Parameters:
- *    
+ *
  *    flags:
  *      Creation flags.  Currently, no flags are defined, so pass 0.
- *    
+ *
  *    compareItemsProc:
  *      A UPP for a function which compares two data items, and returns
  *      a value which is < 0, == 0, or > 0 depending on whether the
  *      first item is 'before', 'equal', or 'after' the first item.
- *    
+ *
  *    sizeItemProc:
  *      A UPP for a function which takes a pointer to a data item, and
  *      returns the size in bytes which it requires to store.
- *    
+ *
  *    disposeItemProc:
  *      A UPP for a function which takes a pointer to a data item, and
  *      disposes of any memory which may have been allocated for the
@@ -629,15 +629,15 @@ function InvokeAVLWalkUPP( tree: AVLTreePtr; dataPtr: {const} UnivPtr; visitStag
  *      passed in may be pointing to.  This function may be NULL if
  *      data items do not use any memory besides that taken up by the
  *      item itself.
- *    
+ *
  *    refCon:
  *      A 32 bit quantity which is stored with this tree, and can be
  *      retrieved at an time ( and in a callback, if desired ) with
  *      AVLGetRefcon().
- *    
+ *
  *    tree:
  *      The created AVLTree, or NULL if there is an error.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -649,29 +649,29 @@ function AVLInit( flags: UInt32; compareItemsProc: AVLCompareItemsUPP; sizeItemP
 
 {
  *  AVLDispose()   *** DEPRECATED ***
- *  
+ *
  *  Summary:
  *    Dispose of an AVL tree created with AVLInit()
- *  
+ *
  *  Discussion:
  *    Dispose of an AVL tree.  This will dispose of each item in the
  *    tree in the order specified, call the tree's disposeProc proc for
  *    each item, and then dispose of the space allocated for the tree
  *    itself.
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe
  *    AVLDispose is thread safe provided no other thread is still using
  *    the tree being dispose.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    tree:
  *      The tree to dispose, which was created with AVLInit().
- *    
+ *
  *    order:
  *      The order to dispose of the items in the tree.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -683,11 +683,11 @@ function AVLDispose( var tree: AVLTreePtr; order: AVLOrder ): OSErr; external na
 
 {
  *  AVLWalk()   *** DEPRECATED ***
- *  
+ *
  *  Summary:
  *    Iterate across all of the items in an AVL tree, in a specified
  *    order.
- *  
+ *
  *  Discussion:
  *    Iterate across all of the items in the tree, in the order
  *    specified.  kLeftToRight is basically lowest-to-highest order,
@@ -703,7 +703,7 @@ function AVLDispose( var tree: AVLTreePtr; order: AVLOrder ): OSErr; external na
  *    walkProc if visit stage is kAVLPostOrder ( because if you remove
  *    a node during the pre or in order stages you will corrupt the
  *    list ) OR if you return a non-zero result from the walkProc call
- *    which called AVLRemove() to immediately terminate the walkProc. 
+ *    which called AVLRemove() to immediately terminate the walkProc.
  *    Do not call AVLInsert() to insert a node into the tree from
  *    inside a walkProc. The walkProc function gets called with the
  *    AVLTreePtr, a pointer to the data for the current node ( which
@@ -716,28 +716,28 @@ function AVLDispose( var tree: AVLTreePtr; order: AVLOrder ): OSErr; external na
  *    to get that refCon if you want it inside a walkProc. ( Most
  *    walkProcs will not care about the values for node type, level, or
  *    balance. )
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe
  *    AVLWalk is thread safe as long as no other thread tries to modify
  *    the tree by inserting or removing an item, or disposing of the
  *    tree itself.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    tree:
  *      The tree to dispose, which was created with AVLInit().
- *    
+ *
  *    walkProc:
  *      A UPP for a function which is called during the walk thru the
  *      tree for each item.
- *    
+ *
  *    order:
  *      The order to iterate thru the tree.
- *    
+ *
  *    walkRefCon:
  *      A 32 bit value passed to the walkProc each time it is called.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -749,27 +749,27 @@ function AVLWalk( tree: AVLTreePtr; walkProc: AVLWalkUPP; order: AVLOrder; walkR
 
 {
  *  AVLCount()   *** DEPRECATED ***
- *  
+ *
  *  Summary:
  *    Return the number of items in the given tree.
- *  
+ *
  *  Discussion:
  *    Return the number of items in the given tree.
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe
  *    AVLCount is thread safe as long as no other thread tries to
  *    modify the tree by inserting or removing an item, or disposing of
  *    the tree itself.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    tree:
  *      The tree to return the count of items for.
- *    
+ *
  *    count:
  *      On return, the count of items ( 1-based ) in the tree.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -781,10 +781,10 @@ function AVLCount( tree: AVLTreePtr; var count: UInt32 ): OSErr; external name '
 
 {
  *  AVLGetIndItem()   *** DEPRECATED ***
- *  
+ *
  *  Summary:
  *    Return the data of the index-th item from the tree.
- *  
+ *
  *  Discussion:
  *    Return the one-based index-th item from the tree by putting it's
  *    data at dataPtr if dataPtr is non-nil, and it's size into
@@ -792,32 +792,32 @@ function AVLCount( tree: AVLTreePtr; var count: UInt32 ): OSErr; external name '
  *    return errItemNotFoundInTree.  ( Internally, this does an
  *    AVLWalk(), so the tree can not be modified while this call is in
  *    progress ).
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe
  *    AVLGetIndItem is thread safe as long as no other thread tries to
  *    modify the tree by inserting or removing an item, or disposing of
  *    the tree itself.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    tree:
  *      The tree to return the index-th items for.
- *    
+ *
  *    index:
  *      A index of the item to return.  The 'first' item in the tree is
  *      index = 1, the last item is index = the count of items in the
  *      tree.
- *    
+ *
  *    dataPtr:
  *      An address in memory to return the data for the item, or NULL
  *      if you don not want data returned.  The memory point to must be
  *      large enough to hold all of the data for the item.
- *    
+ *
  *    itemSize:
  *      On return, the size of the data for the index-th item.  If you
  *      do not care about the size of the data, pass NULL.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -829,10 +829,10 @@ function AVLGetIndItem( tree: AVLTreePtr; index: UInt32; dataPtr: UnivPtr; var i
 
 {
  *  AVLInsert()   *** DEPRECATED ***
- *  
+ *
  *  Summary:
  *    Insert an item into the tree.
- *  
+ *
  *  Discussion:
  *    Insert the given item into the tree.  This will call the tree's
  *    sizeItemProc to determine how big the item at data is, and then
@@ -841,21 +841,21 @@ function AVLGetIndItem( tree: AVLTreePtr; index: UInt32; dataPtr: UnivPtr; var i
  *    the same key ( so that the compareItemsUPP returns 0 when asked
  *    to compare this item to an existing one ), then it will return
  *    errItemNotFoundInTree.
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe
  *    AVLInsert is thread safe as long as no other thread tries to walk
  *    or modify the tree by inserting or removing an item, or disposing
  *    of the tree itself.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    tree:
  *      The tree to return the index-th items for.
- *    
+ *
  *    data:
  *      A pointer to the item to be inserted.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -867,10 +867,10 @@ function AVLInsert( tree: AVLTreePtr; data: {const} UnivPtr ): OSErr; external n
 
 {
  *  AVLRemove()   *** DEPRECATED ***
- *  
+ *
  *  Summary:
  *    Remove an item from the tree.
- *  
+ *
  *  Discussion:
  *    Remove any item from the tree with the given key.  If dataPtr !=
  *    nil, then copy the item's data to dataPtr before removing it from
@@ -878,34 +878,34 @@ function AVLInsert( tree: AVLTreePtr; data: {const} UnivPtr ): OSErr; external n
  *    disposeItemProc to let it release anything used by the data in
  *    the tree.  It is not necessary to fill in a complete record for
  *    key, only that the compareItemsProc return 0 when asked to
- *    compare the data at key with the node in the tree to be deleted. 
+ *    compare the data at key with the node in the tree to be deleted.
  *    If the item cannot be found in the tree, this will return
  *    errItemNotFoundInTree.
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe
  *    AVLRemove is thread safe as long as no other thread tries to walk
  *    or modify the tree by inserting or removing an item, or disposing
  *    of the tree itself.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    tree:
  *      The tree to return the index-th items for.
- *    
+ *
  *    key:
  *      A pointer to the item to be removed ( or, enough of the item
  *      that it can be found in the tree ).
- *    
+ *
  *    dataPtr:
  *      An address in memory to return the data for the item, or NULL
  *      if you don not want data returned.  The memory point to must be
  *      large enough to hold all of the data for the item.
- *    
+ *
  *    itemSize:
  *      On return, the size of the data for the index-th item.  If you
  *      do not care about the size of the data, pass NULL.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -917,10 +917,10 @@ function AVLRemove( tree: AVLTreePtr; key: {const} UnivPtr; dataPtr: UnivPtr; va
 
 {
  *  AVLFind()   *** DEPRECATED ***
- *  
+ *
  *  Summary:
  *    Remove an item from the tree.
- *  
+ *
  *  Discussion:
  *    Find the item in the tree with the given key, and return it's
  *    data in dataPtr ( if dataPtr != nil ), and it's size in *itemSize
@@ -929,31 +929,31 @@ function AVLRemove( tree: AVLTreePtr; key: {const} UnivPtr; dataPtr: UnivPtr; va
  *    when asked to compare the data at key with the node in the tree
  *    to be deleted.  If the item cannot be found in the tree, this
  *    will return errItemNotFoundInTree.
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe
  *    AVLRemove is thread safe as long as no other thread tries to walk
  *    or modify the tree by inserting or removing an item, or disposing
  *    of the tree itself.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    tree:
  *      The tree to return the index-th items for.
- *    
+ *
  *    key:
  *      A pointer to the item to be found ( or, enough of the item that
  *      it can be found in the tree ).
- *    
+ *
  *    dataPtr:
  *      An address in memory to return the data for the item, or NULL
  *      if you don not want data returned.  The memory point to must be
  *      large enough to hold all of the data for the item.
- *    
+ *
  *    itemSize:
  *      On return, the size of the data for the index-th item.  If you
  *      do not care about the size of the data, pass NULL.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -965,27 +965,27 @@ function AVLFind( tree: AVLTreePtr; key: {const} UnivPtr; dataPtr: UnivPtr; var
 
 {
  *  AVLGetRefcon()   *** DEPRECATED ***
- *  
+ *
  *  Summary:
  *    Return the refCon set when the tree was created.
- *  
+ *
  *  Discussion:
  *    Get the refCon for the given tree ( set in AVLInit ) and return
  *    it.
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe
  *    AVLGetRefcon is thread safe as long as no other thread tries to
  *    dispose of the tree itself.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    tree:
  *      The tree to return the refcon for.
- *    
+ *
  *    refCon:
  *      On return, the refCon for the tree, or NULL if tree is invalid.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  *    CarbonLib:        in CarbonLib 1.0 and later

Разница между файлами не показана из-за своего большого размера
+ 195 - 195
packages/univint/src/AXAttributeConstants.pas


+ 1 - 1
packages/univint/src/AXNotificationConstants.pas

@@ -318,7 +318,7 @@ uses MacTypes;
 // layout area notifications
 {$ifc USE_CFSTR_CONSTANT_MACROS}
 {$definec kAXUnitsChangedNotification CFSTRP('AXUnitsChanged')}
-{$endc}  
+{$endc}
 {$ifc USE_CFSTR_CONSTANT_MACROS}
 {$definec kAXSelectedChildrenMovedNotification CFSTRP('AXSelectedChildrenMoved')}
 {$endc}

+ 9 - 9
packages/univint/src/AXRoleConstants.pas

@@ -236,7 +236,7 @@ uses MacTypes;
 	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
@@ -248,7 +248,7 @@ uses MacTypes;
 		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.
@@ -318,7 +318,7 @@ uses MacTypes;
 
 {
 	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
@@ -330,7 +330,7 @@ uses MacTypes;
 	columns, the data should be accessible via either rows or columns. Thus, the data in a
 	given cell will be represented as two different elements. Here's a hierarchy for a
 	typical outline:
-	
+
 		AXScrollArea (parent of the outline)
 			AXScrollBar (if necessary, horizontal)
 			AXScrollBar (if necessary, vertical)
@@ -354,7 +354,7 @@ uses MacTypes;
 					AXButton
 					...
 				...
-				
+
     Attributes:
         AXFocused (w)
         AXRows - Array of subset of AXChildren that are rows.
@@ -372,18 +372,18 @@ uses MacTypes;
 
 {
 	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)
@@ -399,7 +399,7 @@ uses MacTypes;
 					...
 				AXGroup (preview column)
 					...
-	
+
 	Attributes:
 		AXFocused (w)
 		AXColumns - Array of the grandchild column elements, which are typically

+ 166 - 166
packages/univint/src/Aliases.pas

@@ -1,10 +1,10 @@
 {
      File:       CarbonCore/Aliases.h
- 
+
      Contains:   Alias Manager Interfaces.
                  The contents of this header file are deprecated.
                  Use Foundation or CoreFoundation URL Bookmarks instead.
- 
+
      Copyright:  © 1989-2011 by Apple Inc. All rights reserved.
 }
 {
@@ -300,7 +300,7 @@ type
 	AliasFilterUPP = AliasFilterProcPtr;
 {
  *  NewAliasFilterUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -311,7 +311,7 @@ function NewAliasFilterUPP( userRoutine: AliasFilterProcPtr ): AliasFilterUPP; e
 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
 {
  *  DisposeAliasFilterUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -322,7 +322,7 @@ procedure DisposeAliasFilterUPP( userUPP: AliasFilterUPP ); external name '_Disp
 
 {
  *  InvokeAliasFilterUPP()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -345,10 +345,10 @@ type
 
 {
  *  FSNewAlias()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.3
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -360,10 +360,10 @@ function FSNewAlias( {const} fromFile: FSRefPtr { can be NULL }; const (*var*) t
 
 {
  *  FSNewAliasMinimal()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.3
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -375,10 +375,10 @@ function FSNewAliasMinimal( const (*var*) target: FSRef; var inAlias: AliasHandl
 
 {
  *  FSIsAliasFile()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.3
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -390,10 +390,10 @@ function FSIsAliasFile( const (*var*) fileRef: FSRef; var aliasFileFlag: Boolean
 
 {
  *  FSResolveAliasWithMountFlags()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.3
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -405,10 +405,10 @@ function FSResolveAliasWithMountFlags( {const} fromFile: FSRefPtr { can be NULL
 
 {
  *  FSResolveAlias()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.3
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -420,10 +420,10 @@ function FSResolveAlias( {const} fromFile: FSRefPtr { can be NULL }; alias: Alia
 
 {
  *  FSResolveAliasFileWithMountFlags()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.3
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -435,10 +435,10 @@ function FSResolveAliasFileWithMountFlags( var theRef: FSRef; resolveAliasChains
 
 {
  *  FSResolveAliasFile()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.3
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -450,10 +450,10 @@ function FSResolveAliasFile( var theRef: FSRef; resolveAliasChains: Boolean; var
 
 {
  *  FSFollowFinderAlias()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.3
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -465,10 +465,10 @@ function FSFollowFinderAlias( fromFile: FSRefPtr { can be NULL }; alias: AliasHa
 
 {
  *  FSUpdateAlias()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.3
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -480,39 +480,39 @@ function FSUpdateAlias( {const} fromFile: FSRefPtr { can be NULL }; const (*var*
 
 {
  *  FSNewAliasUnicode()
- *  
+ *
  *  Summary:
  *    Creates an alias given a ref to the target's parent directory and
  *    the target's unicode name.  If the target does not exist fnfErr
  *    will be returned but the alias will still be created.  This
  *    allows the creation of aliases to targets that do not exist.
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.3
- *  
+ *
  *  Parameters:
- *    
+ *
  *    fromFile:
  *      The starting point for a relative search.
- *    
+ *
  *    targetParentRef:
  *      An FSRef to the parent directory of the target.
- *    
+ *
  *    targetNameLength:
  *      Number of Unicode characters in the target's name.
- *    
+ *
  *    targetName:
  *      A pointer to the Unicode name.
- *    
+ *
  *    inAlias:
  *      A Handle to the newly created alias record.
- *    
+ *
  *    isDirectory:
  *      On input, if target does not exist, a flag to indicate whether
  *      or not the target is a directory.  On output, if the target did
  *      exist, a flag indicating if the target is a directory.  Pass
  *      NULL in the non-existant case if unsure.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.2 and later in CoreServices.framework
  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
@@ -524,35 +524,35 @@ function FSNewAliasUnicode( {const} fromFile: FSRefPtr { can be NULL }; const (*
 
 {
  *  FSNewAliasMinimalUnicode()
- *  
+ *
  *  Summary:
  *    Creates a minimal alias given a ref to the target's parent
  *    directory and the target's unicode name.  If the target does not
  *    exist fnfErr will be returned but the alias will still be created.
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.3
- *  
+ *
  *  Parameters:
- *    
+ *
  *    targetParentRef:
  *      An FSRef to the parent directory of the target.
- *    
+ *
  *    targetNameLength:
  *      Number of Unicode characters in the target's name.
- *    
+ *
  *    targetName:
  *      A pointer to the Unicode name.
- *    
+ *
  *    inAlias:
  *      A Handle to the newly created alias record.
- *    
+ *
  *    isDirectory:
  *      On input, if target does not exist, a flag to indicate whether
  *      or not the target is a directory.  On output, if the target did
  *      exist, a flag indicating if the target is a directory.  Pass
  *      NULL in the non-existant case if unsure.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.2 and later in CoreServices.framework
  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
@@ -564,36 +564,36 @@ function FSNewAliasMinimalUnicode( const (*var*) targetParentRef: FSRef; targetN
 
 {
  *  FSNewAliasFromPath()
- *  
+ *
  *  Summary:
- *    Creates an alias given a POSIX style utf-8 path to the target. 
+ *    Creates an alias given a POSIX style utf-8 path to the target.
  *    If the target file does not exist but the path up to the leaf
  *    does then fnfErr will be returned but the alias will still be
  *    created.
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.5
- *  
+ *
  *  Parameters:
- *    
+ *
  *    fromFilePath:
  *      The starting point for a relative search.
- *    
+ *
  *    targetPath:
  *      POSIX style UTF-8 path to target.
- *    
+ *
  *    flags:
  *      Options for future use.  Pass in 0.
- *    
+ *
  *    inAlias:
  *      A Handle to the newly created alias record.
- *    
+ *
  *    isDirectory:
  *      On input, if target does not exist, a flag to indicate whether
  *      or not the target is a directory.  On output, if the target did
  *      exist, a flag indicating if the target is a directory.  Pass
  *      NULL in the non-existant case if unsure.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.5 and later
@@ -605,14 +605,14 @@ function FSNewAliasFromPath( fromFilePath: ConstCStringPtr { can be NULL }; targ
 
 {
  *  FSMatchAliasBulk()
- *  
+ *
  *  Summary:
  *    Given an alias handle and fromFile, match the alias and return
  *    FSRefs to the aliased file(s) and needsUpdate flag
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.5
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
  *    CarbonLib:        not available
@@ -624,38 +624,38 @@ function FSMatchAliasBulk( {const} fromFile: FSRefPtr { can be NULL }; rulesMask
 
 {
  *  FSCopyAliasInfo()
- *  
+ *
  *  Discussion:
  *    This routine will return the requested information from the
  *    passed in aliasHandle.  The information is gathered only from the
  *    alias record so it may not match what is on disk (no disk i/o is
  *    performed).  The whichInfo paramter is an output parameter that
  *    signifies which fields in the info record contain valid data.
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Parameters:
- *    
+ *
  *    inAlias:
  *      A handle to the alias record to get the information from.
- *    
+ *
  *    targetName:
  *      The name of the target item.
- *    
+ *
  *    volumeName:
  *      The name of the volume the target resides on.
- *    
+ *
  *    pathString:
  *      POSIX path to target.
- *    
+ *
  *    whichInfo:
  *      An indication of which fields in the info block contain valid
  *      data.
- *    
+ *
  *    info:
  *      Returned information about the alias.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.2 and later in CoreServices.framework
  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
@@ -667,24 +667,24 @@ function FSCopyAliasInfo( inAlias: AliasHandle; targetName: HFSUniStr255Ptr { ca
 
 {
  *  GetAliasSize()
- *  
+ *
  *  Discussion:
  *    This routine will return the size of the alias record referenced
  *    by the AliasHandle alias.  This will be smaller than the size
  *    returned by GetHandleSize if any custom data has been added (IM
  *    Files 4-13).
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.4
- *  
+ *
  *  Parameters:
- *    
+ *
  *    alias:
  *      A handle to the alias record to get the information from.
- *  
+ *
  *  Result:
  *    The size of the private section of the alias record.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.4 and later in CoreServices.framework
  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
@@ -696,22 +696,22 @@ function GetAliasSize( alias: AliasHandle ): Size; external name '_GetAliasSize'
 
 {
  *  GetAliasUserType()
- *  
+ *
  *  Discussion:
  *    This routine will return the usertype associated with the alias
  *    record referenced by the AliasHandle alias.
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.4
- *  
+ *
  *  Parameters:
- *    
+ *
  *    alias:
  *      A handle to the alias record to get the userType from.
- *  
+ *
  *  Result:
  *    The userType associated with the alias as an OSType
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.4 and later in CoreServices.framework
  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
@@ -723,22 +723,22 @@ function GetAliasUserType( alias: AliasHandle ): OSType; external name '_GetAlia
 
 {
  *  SetAliasUserType()
- *  
+ *
  *  Discussion:
  *    This routine will set the userType associated with an alias
  *    record.
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.4
- *  
+ *
  *  Parameters:
- *    
+ *
  *    alias:
  *      A handle to the alias record to set the userType for.
- *    
+ *
  *    userType:
  *      The OSType to set the userType to.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.4 and later in CoreServices.framework
  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
@@ -750,22 +750,22 @@ procedure SetAliasUserType( alias: AliasHandle; userType: OSType ); external nam
 
 {
  *  GetAliasSizeFromPtr()
- *  
+ *
  *  Discussion:
  *    This routine will return the size of the alias record referenced
  *    by a pointer to the AliasRecord.
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.4
- *  
+ *
  *  Parameters:
- *    
+ *
  *    alias:
  *      A pointer to the alias record to get the information from.
- *  
+ *
  *  Result:
  *    The size of the private section of the alias record.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.4 and later in CoreServices.framework
  *    CarbonLib:        not available
@@ -777,22 +777,22 @@ function GetAliasSizeFromPtr( const (*var*) alias: AliasRecord ): Size; external
 
 {
  *  GetAliasUserTypeFromPtr()
- *  
+ *
  *  Discussion:
  *    This routine will return the usertype associated withthe alias
  *    record pointed to by alias.
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.4
- *  
+ *
  *  Parameters:
- *    
+ *
  *    alias:
  *      A pointer to the alias record to get the userType from.
- *  
+ *
  *  Result:
  *    The userType associated with the alias as an OSType
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.4 and later in CoreServices.framework
  *    CarbonLib:        not available
@@ -804,22 +804,22 @@ function GetAliasUserTypeFromPtr( const (*var*) alias: AliasRecord ): OSType; ex
 
 {
  *  SetAliasUserTypeWithPtr()
- *  
+ *
  *  Discussion:
  *    This routine will set the userType associated with an alias
  *    record.
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.4
- *  
+ *
  *  Parameters:
- *    
+ *
  *    alias:
  *      A pointer to the alias record to set the userType for.
- *    
+ *
  *    userType:
  *      The OSType to set the userType to.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.4 and later in CoreServices.framework
  *    CarbonLib:        not available
@@ -834,17 +834,17 @@ procedure SetAliasUserTypeWithPtr( alias: AliasPtr; userType: OSType ); external
 {$ifc not TARGET_CPU_64}
 {
  *  FSMatchAlias()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    Use FSMatchAliasBulk instead
- *  
+ *
  *  Summary:
  *    Given an alias handle and fromFile, match the alias and return
  *    FSRefs to the aliased file(s) and needsUpdate flag
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.3
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.2 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
@@ -856,16 +856,16 @@ function FSMatchAlias( {const} fromFile: FSRefPtr { can be NULL }; rulesMask: UN
 
 {
  *  FSMatchAliasNoUI()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    Use FSMatchAliasBulk with the kARMNoUI flag instead
- *  
+ *
  *  Summary:
  *    variation on FSMatchAlias that does not prompt user with a dialog
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.3
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.2 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
@@ -877,24 +877,24 @@ function FSMatchAliasNoUI( {const} fromFile: FSRefPtr { can be NULL }; rulesMask
 
 {
  *  NewAlias()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    Use FSNewAlias
- *  
+ *
  *  Summary:
  *    create a new alias between fromFile and target, returns alias
  *    record handle
- *  
+ *
  *  Discussion:
  *    Create an alias betwen fromFile and target, and return it in an
  *    AliasHandle. This function is deprecated in Mac OS X 10.4;
  *    instead, you should use FSNewAliasUnicode() because NewAlias()
  *    has problems creating aliases to certain files, including those
  *    which are impossible to represent in an FSSpec.
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.3
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -906,14 +906,14 @@ function NewAlias( {const} fromFile: FSSpecPtr { can be NULL }; const (*var*) ta
 
 {
  *  NewAliasMinimal()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    Use FSNewAliasMinimalUnicode
- *  
+ *
  *  Summary:
  *    create a minimal new alias for a target and return alias record
  *    handle
- *  
+ *
  *  Discussion:
  *    Create a minimal alias for a target, and return it in an
  *    AliasHandle. This function is deprecated in Mac OS X 10.4;
@@ -921,10 +921,10 @@ function NewAlias( {const} fromFile: FSSpecPtr { can be NULL }; const (*var*) ta
  *    NewAliasMinimalAlias() has problems creating aliases to certain
  *    files, including those which are impossible to represent in an
  *    FSSpec.
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.3
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -936,14 +936,14 @@ function NewAliasMinimal( const (*var*) target: FSSpec; var alias: AliasHandle )
 
 {
  *  NewAliasMinimalFromFullPath()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    Use FSNewAliasMinimalUnicode
- *  
+ *
  *  Summary:
  *    create a minimal new alias from a target fullpath (optional zone
  *    and server name) and return alias record handle
- *  
+ *
  *  Discussion:
  *    Create a minimal alias for a target fullpath, and return it in an
  *    AliasHandle. This function is deprecated in Mac OS X 10.4;
@@ -951,10 +951,10 @@ function NewAliasMinimal( const (*var*) target: FSSpec; var alias: AliasHandle )
  *    NewAliasMinimalFromFullPath() has problems creating aliases to
  *    certain files, including those which are impossible to represent
  *    in an FSSpec.
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.3
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -966,17 +966,17 @@ function NewAliasMinimalFromFullPath( fullPathLength: SInt16; fullPath: {const}
 
 {
  *  ResolveAlias()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    Use FSResolveAlias() or FSResolveAliasWithMountFlags() instead.
- *  
+ *
  *  Summary:
  *    given an alias handle and fromFile, resolve the alias, update the
  *    alias record and return aliased filename and wasChanged flag.
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.3
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -988,20 +988,20 @@ function ResolveAlias( {const} fromFile: FSSpecPtr { can be NULL }; alias: Alias
 
 {
  *  GetAliasInfo()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    Use FSCopyAliasInfo instead.
- *  
+ *
  *  Summary:
  *    This call does not work on all aliases. Given an alias handle and
  *    an index specifying requested alias information type, return the
  *    information from alias record as a string. An empty string is
  *    returned when the index is greater than the number of levels
  *    between the target and root.
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.0
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.3
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -1013,16 +1013,16 @@ function GetAliasInfo( alias: AliasHandle; itemIndex: AliasInfoType; var theStri
 
 {
  *  IsAliasFile()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    Use FSIsAliasFile() instead.
- *  
+ *
  *  Summary:
  *    Return true if the file pointed to by fileFSSpec is an alias file.
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.0
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -1034,19 +1034,19 @@ function IsAliasFile( const (*var*) fileFSSpec: FSSpec; var aliasFileFlag: Boole
 
 {
  *  ResolveAliasWithMountFlags()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    Use FSResolveAliasWithMountFlags() instead.
- *  
+ *
  *  Summary:
  *    Given an AliasHandle, return target file spec. It resolves the
  *    entire alias chain or one step of the chain.  It returns info
  *    about whether the target is a folder or file; and whether the
  *    input file spec was an alias or not.
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.3
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -1058,19 +1058,19 @@ function ResolveAliasWithMountFlags( {const} fromFile: FSSpecPtr { can be NULL }
 
 {
  *  ResolveAliasFile()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    Use FSResolveAliasFile
- *  
+ *
  *  Summary:
  *    Given a file spec, return target file spec if input file spec is
  *    an alias. It resolves the entire alias chain or one step of the
  *    chain.  It returns info about whether the target is a folder or
  *    file; and whether the input file spec was an alias or not.
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.3
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -1083,10 +1083,10 @@ function ResolveAliasFile( var theSpec: FSSpec; resolveAliasChains: Boolean; var
 { Deprecated: Use FSResolveAliasFileWithMountFlags instead}
 {
  *  ResolveAliasFileWithMountFlags()   *** DEPRECATED ***
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.3
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -1099,10 +1099,10 @@ function ResolveAliasFileWithMountFlags( var theSpec: FSSpec; resolveAliasChains
 { Deprecated:  Use FSFollowFinderAlias instead}
 {
  *  FollowFinderAlias()   *** DEPRECATED ***
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.3
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -1112,23 +1112,23 @@ function FollowFinderAlias( {const} fromFile: FSSpecPtr { can be NULL }; alias:
 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_NA, __IPHONE_NA) *)
 
 
-{ 
-   Low Level Routines 
+{
+   Low Level Routines
 }
 {
  *  UpdateAlias()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    UseFSUpdateAlias
- *  
+ *
  *  Summary:
  *    given a fromFile-target pair and an alias handle, update the
  *    alias record pointed to by alias handle to represent target as
  *    the new alias.
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.3
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -1140,17 +1140,17 @@ function UpdateAlias( {const} fromFile: FSSpecPtr { can be NULL }; const (*var*)
 
 {
  *  MatchAlias()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    Use FSMatchAliasBulk instead
- *  
+ *
  *  Summary:
  *    Given an alias handle and fromFile, match the alias and return
  *    FSSpecs to the aliased file(s) and needsUpdate flag
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.3
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -1162,18 +1162,18 @@ function MatchAlias( {const} fromFile: FSSpecPtr { can be NULL }; rulesMask: UNS
 
 {
  *  ResolveAliasFileWithMountFlagsNoUI()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    Use FSResolveAliasFileWithMountFlags passing in the
  *    kResolveAliasFileNoUI flag
- *  
+ *
  *  Summary:
  *    variation on ResolveAliasFile that does not prompt user with a
  *    dialog
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.3
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -1185,16 +1185,16 @@ function ResolveAliasFileWithMountFlagsNoUI( var theSpec: FSSpec; resolveAliasCh
 
 {
  *  MatchAliasNoUI()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    Use FSMatchAliasBulk with the kARMNoUI flag instead
- *  
+ *
  *  Summary:
  *    variation on MatchAlias that does not prompt user with a dialog
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.3
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  *    CarbonLib:        in CarbonLib 1.0 and later

Разница между файлами не показана из-за своего большого размера
+ 161 - 161
packages/univint/src/Appearance.pas


+ 6 - 6
packages/univint/src/AppleDiskPartitions.pas

@@ -1,17 +1,17 @@
 {
      File:       OSServices/AppleDiskPartitions.h
- 
+
      Contains:   The Apple disk partition scheme as defined in Inside Macintosh: Volume V.
- 
+
      Version:    OSServices-352~2
- 
+
      Copyright:  © 2000-2008 by Apple Computer, Inc., all rights reserved
- 
+
      Bugs?:      For bug reports, consult the following page on
                  the World Wide Web:
- 
+
                      http://bugs.freepascal.org
- 
+
 }
 {       Translation Updated:  Jonas Maebe, <[email protected]>, October 2009 (only changes in C header were layout, so not updated since deprecated) }
 {

+ 68 - 68
packages/univint/src/AppleEvents.pas

@@ -1,17 +1,17 @@
 {
      File:       AE/AppleEvents.h
- 
+
      Contains:   AppleEvent Package Interfaces.
- 
-    
- 
+
+
+
      Copyright:  © 1989-2008 by Apple Computer, Inc., all rights reserved
- 
+
      Bugs?:      For bug reports, consult the following page on
                  the World Wide Web:
- 
+
                      http://bugs.freepascal.org
- 
+
 }
 {  Pascal Translation Updated:  Jonas Maebe, <[email protected]>, October 2009 }
 {  Pascal Translation Updated:  Jonas Maebe, <[email protected]>, September 2012 }
@@ -227,7 +227,7 @@ uses MacTypes,MixedMode,AEDataModel,AEInteraction, CFArray, CFBase, CFRunLoop, C
 {$ifc TARGET_OS_MAC}
 
 {
-    Note:   The functions and types for the building and parsing AppleEvent  
+    Note:   The functions and types for the building and parsing AppleEvent
             messages has moved to AEDataModel.h
 }
 
@@ -286,23 +286,23 @@ const
 	kAELocalProcess = 3;
 	kAERemoteProcess = 4;
 
-	
+
 { if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 }
 const
 	errAETargetAddressNotPermitted = -1742;	{ Mac OS X 10.8 and later, the target of an AppleEvent is not accessible to this process, perhaps due to sandboxing }
 	errAEEventNotPermitted = -1743;			{ Mac OS X 10.8 and later, the target of the AppleEvent does not allow this sender to execute this event }
 { endif }
-	
-	
+
+
 {*************************************************************************
   These calls are used to set up and modify the event dispatch table.
 *************************************************************************}
 {
  *  AEInstallEventHandler()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -314,10 +314,10 @@ function AEInstallEventHandler( theAEEventClass: AEEventClass; theAEEventID: AEE
 
 {
  *  AERemoveEventHandler()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -329,10 +329,10 @@ function AERemoveEventHandler( theAEEventClass: AEEventClass; theAEEventID: AEEv
 
 {
  *  AEGetEventHandler()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -348,10 +348,10 @@ function AEGetEventHandler( theAEEventClass: AEEventClass; theAEEventID: AEEvent
 *************************************************************************}
 {
  *  AEInstallSpecialHandler()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -363,10 +363,10 @@ function AEInstallSpecialHandler( functionClass: AEKeyword; handler: AEEventHand
 
 {
  *  AERemoveSpecialHandler()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -378,10 +378,10 @@ function AERemoveSpecialHandler( functionClass: AEKeyword; handler: AEEventHandl
 
 {
  *  AEGetSpecialHandler()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -399,10 +399,10 @@ function AEGetSpecialHandler( functionClass: AEKeyword; var handler: AEEventHand
 *************************************************************************}
 {
  *  AEManagerInfo()
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.2
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -414,21 +414,21 @@ function AEManagerInfo( keyWord: AEKeyword; var result: SIGNEDLONG ): OSErr; ext
 
 {
   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.
@@ -436,10 +436,10 @@ function AEManagerInfo( keyWord: AEKeyword; var result: SIGNEDLONG ): OSErr; ext
 
 {
  *  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
@@ -449,11 +449,11 @@ var kAERemoteProcessURLKey: CFStringRef; external name '_kAERemoteProcessURLKey'
 (* __OSX_AVAILABLE_STARTING( __MAC_10_3, __IPHONE_NA ) *)
 {
  *  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
@@ -463,11 +463,11 @@ var kAERemoteProcessNameKey: CFStringRef; external name '_kAERemoteProcessNameKe
 (* __OSX_AVAILABLE_STARTING( __MAC_10_3, __IPHONE_NA ) *)
 {
  *  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
@@ -477,11 +477,11 @@ var kAERemoteProcessUserIDKey: CFStringRef; external name '_kAERemoteProcessUser
 (* __OSX_AVAILABLE_STARTING( __MAC_10_3, __IPHONE_NA ) *)
 {
  *  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
@@ -492,7 +492,7 @@ var kAERemoteProcessProcessIDKey: CFStringRef; external name '_kAERemoteProcessP
 
 {
  *  AERemoteProcessResolverContext
- *  
+ *
  *  Discussion:
  *    An optional context parameter for asynchronous resolution.  The
  *    context is copied and the info pointer retained.  When the
@@ -529,7 +529,7 @@ type
 
 {
  *  AERemoteProcessResolverRef
- *  
+ *
  *  Discussion:
  *    An opaque reference to an object that encapsulates the mechnanism
  *    by which a list of processes running on a remote machine are
@@ -541,7 +541,7 @@ type
 	AERemoteProcessResolverRef = ^SInt32; { an opaque type }
 {
  *  AECreateRemoteProcessResolver()
- *  
+ *
  *  Discussion:
  *    Create a Remote Process List Resolver object.  The allocator is
  *    used for any CoreFoundation types created or returned by this
@@ -550,22 +550,22 @@ type
  *    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
@@ -577,20 +577,20 @@ function AECreateRemoteProcessResolver( allocator: CFAllocatorRef; url: CFURLRef
 
 {
  *  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
@@ -602,7 +602,7 @@ procedure AEDisposeRemoteProcessResolver( ref: AERemoteProcessResolverRef ); ext
 
 {
  *  AERemoteProcessResolverGetProcesses()
- *  
+ *
  *  Discussion:
  *    Returns a CFArrayRef containing CFDictionary objects containing
  *    information about processses running on a remote machine.  If the
@@ -615,23 +615,23 @@ procedure AEDisposeRemoteProcessResolver( ref: AERemoteProcessResolverRef ); ext
  *    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
@@ -643,7 +643,7 @@ function AERemoteProcessResolverGetProcesses( ref: AERemoteProcessResolverRef; v
 
 {
  *  AERemoteProcessResolverCallback
- *  
+ *
  *  Discussion:
  *    A callback made when the asynchronous execution of a resolver
  *    completes, either due to success or failure. The data itself
@@ -653,7 +653,7 @@ 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
@@ -661,30 +661,30 @@ type
  *    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

+ 35 - 35
packages/univint/src/AppleHelp.pas

@@ -1,17 +1,17 @@
 {
      File:       Help/AppleHelp.h
- 
+
      Contains:   Apple Help
- 
+
      Version:    Help-36~232
- 
+
      Copyright:  © 2000-2008 by Apple Computer, Inc., all rights reserved.
- 
+
      Bugs?:      For bug reports, consult the following page on
                  the World Wide Web:
- 
+
                      http://bugs.freepascal.org
- 
+
 }
 {       Translation Updated:  Jonas Maebe, <[email protected]>, October 2009 }
 {
@@ -241,26 +241,26 @@ const
 
 {
  *  AHSearch()
- *  
+ *
  *  Discussion:
  *    Delivers a request to perform the specified search to the Help
  *    Viewer application.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    bookname:
  *      Optionally, the AppleTitle of the Help book to be searched. If
  *      NULL, all installed Help books are searched.
- *    
+ *
  *    query:
  *      The query to be made. This string can, if desired, have boolean
  *      operators or be a natural language phrase.
- *  
+ *
  *  Result:
  *    An operating system result code that indicates whether the
  *    request was successfully sent to the Help Viewer application.
  *    Possible values: noErr, paramErr, kAHInternalErr.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -272,23 +272,23 @@ function AHSearch( bookname: CFStringRef; query: CFStringRef ): OSStatus; extern
 
 {
  *  AHGotoMainTOC()   *** DEPRECATED ***
- *  
+ *
  *  Discussion:
  *    Delivers a request to load the main table of contents of
  *    installed help books to the Help Viewer application. This method
  *    has been deprecated in Mac OS X 10.4. Instead, please use
  *    AHGotoPage to jump directly to different books or anchors.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    toctype:
  *      The type of table of contents to be loaded: user or developer.
- *  
+ *
  *  Result:
  *    An operating system result code that indicates whether the
  *    request was successfully sent to the Help Viewer application.
  *    Possible values: noErr, paramErr, kAHInternalErr.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework but deprecated in 10.4
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -300,18 +300,18 @@ function AHGotoMainTOC( toctype: AHTOCType ): OSStatus; external name '_AHGotoMa
 
 {
  *  AHGotoPage()
- *  
+ *
  *  Discussion:
  *    Delivers a request to load a specific text/html file to the Help
  *    Viewer application.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    bookname:
  *      Optionally, the AppleTitle of an installed Help book. If NULL,
  *      the path parameter must be a full file: URL to the file to be
  *      opened.
- *    
+ *
  *    path:
  *      Optionally, one of two types of paths: 1) a URL-style path to a
  *      file that is relative to the main folder of the book supplied
@@ -319,16 +319,16 @@ function AHGotoMainTOC( toctype: AHTOCType ): OSStatus; external name '_AHGotoMa
  *      file: URL to the file to be opened. If this parameter is NULL,
  *      then bookname must not be NULL, and is used to open the Help
  *      Viewer to the main page of Help content for the specified book.
- *    
+ *
  *    anchor:
  *      Optionally, the name of anchor tag to scroll to in the newly
  *      opened file. Can be NULL.
- *  
+ *
  *  Result:
  *    An operating system result code that indicates whether the
  *    request was successfully sent to the Help Viewer application.
  *    Possible values: noErr, paramErr, kAHInternalErr.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -340,28 +340,28 @@ function AHGotoPage( bookname: CFStringRef; path: CFStringRef; anchor: CFStringR
 
 {
  *  AHLookupAnchor()
- *  
+ *
  *  Discussion:
  *    Delivers a request to perform an anchor lookup to the Help Viewer
  *    application. Note: anchor lookups will fail unless you have
  *    indexed your help content with anchor indexing turned on in the
  *    indexing tool's preferences panel.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    bookname:
  *      Optionally, the AppleTitle of the Help book to searched. If
  *      NULL, the anchor lookup is performed using all installed Help
  *      books.
- *    
+ *
  *    anchor:
  *      The name of the anchor tag to look up.
- *  
+ *
  *  Result:
  *    An operating system result code that indicates whether the
  *    request was successfully sent to the Help Viewer application.
  *    Possible values: noErr, paramErr, kAHInternalErr.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework
  *    CarbonLib:        in CarbonLib 1.1 and later
@@ -373,26 +373,26 @@ function AHLookupAnchor( bookname: CFStringRef; anchor: CFStringRef ): OSStatus;
 
 {
  *  AHRegisterHelpBook()
- *  
+ *
  *  Discussion:
  *    Registers a book of Help content such that the book will appear
  *    in the current user's main table of contents (Help Center) in the
  *    Help Viewer application. To be used when help books reside
  *    outside of the known help folders (i.e. help books that are kept
  *    inside of application bundles).
- *  
+ *
  *  Parameters:
- *    
+ *
  *    appBundleRef:
  *      An FSRef pointer to the bundle within which one or more Help
  *      books is stored. This is likely an FSRef to your application's
  *      main bundle.
- *  
+ *
  *  Result:
  *    An operating system result code that indicates whether all help
  *    books contained within the specified bundle were registered.
  *    Possible values: noErr, paramErr, kAHInternalErr, dirNFErr.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework
  *    CarbonLib:        in CarbonLib 1.1 and later

+ 29 - 29
packages/univint/src/AppleScript.pas

@@ -1,17 +1,17 @@
 {
      File:       OpenScripting/AppleScript.h
- 
+
      Contains:   AppleScript Specific Interfaces.
- 
+
      Version:    OSA-148~28
- 
+
      Copyright:  © 1992-2008 by Apple Computer, Inc., all rights reserved
- 
+
      Bugs?:      For bug reports, consult the following page on
                  the World Wide Web:
- 
+
                      http://bugs.freepascal.org
- 
+
 }
 
 {  Pascal Translation Updated: Gorazd Krosl <[email protected]>, October 2009 }
@@ -263,9 +263,9 @@ const
 
 {
         This selector is used to query a context as to whether it contains
-        a handler for the kAEOpenDocuments event. This allows "applets" to be 
+        a handler for the kAEOpenDocuments event. This allows "applets" to be
         distinguished from "droplets."  OSAGetScriptInfo returns false if
-        there is no kAEOpenDocuments handler, and returns the error value 
+        there is no kAEOpenDocuments handler, and returns the error value
         errOSAInvalidAccess if the input is not a context.
     }
 {*************************************************************************
@@ -273,7 +273,7 @@ const
 *************************************************************************}
 {
  *  ASInit()
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -288,7 +288,7 @@ function ASInit( scriptingComponent: ComponentInstance; modeFlags: SInt32; minSt
         This call can be used to explicitly initialize AppleScript.  If it is
         not called, the a scripting size resource is looked for and used. If
         there is no scripting size resource, then the constants listed below
-        are used.  If at any stage (the init call, the size resource, the 
+        are used.  If at any stage (the init call, the size resource, the
         defaults) any of these parameters are zero, then parameters from the
         next stage are used.  ModeFlags are not currently used.
         Errors:
@@ -311,10 +311,10 @@ const
 *************************************************************************}
 {
  *  ASSetSourceStyles()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    use ASSetSourceAttributes instead.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework but deprecated in 10.5
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -326,10 +326,10 @@ function ASSetSourceStyles( scriptingComponent: ComponentInstance; sourceStyles:
 
 {
  *  ASGetSourceStyles()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *    use ASCopySourceAttributes instead.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework but deprecated in 10.5
  *    CarbonLib:        in CarbonLib 1.0 and later
@@ -341,20 +341,20 @@ function ASGetSourceStyles( scriptingComponent: ComponentInstance; var resulting
 
 {
  *  ASCopySourceAttributes()
- *  
+ *
  *  Summary:
  *    Get the current AppleScript source style attributes.
- *  
+ *
  *  Discussion:
  *    A "style attribute" will typically be something meaningful to a
  *    CFAttributedString, but clients may add any attributes they like
  *    using ASSetSourceAttributes.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    scriptingComponent:
  *      A valid AppleScript component instance.
- *    
+ *
  *    resultingSourceAttributes:
  *      If successful, *resultingSourceAttributes will be set to a
  *      CFArray of CFDictionaries of text attributes.  The order of the
@@ -362,7 +362,7 @@ function ASGetSourceStyles( scriptingComponent: ComponentInstance; var resulting
  *      and therefore also to the names returned by
  *      ASGetSourceStyleNames. The caller is responsible for releasing
  *      this array.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.5 and later in Carbon.framework
  *    CarbonLib:        not available
@@ -374,28 +374,28 @@ function ASCopySourceAttributes( scriptingComponent: ComponentInstance; var resu
 
 {
  *  ASSetSourceAttributes()
- *  
+ *
  *  Summary:
  *    Set the AppleScript source style attributes.
- *  
+ *
  *  Discussion:
  *    A "style attribute" will typically be something meaningful to a
  *    CFAttributedString, but clients may add any attributes they like.
  *     Because of this, you should generally call ASSetSourceAttributes
  *    with a modified copy of the result from ASCopySourceAttributes,
  *    not a built-from-scratch set of attributes.
- *  
+ *
  *  Parameters:
- *    
+ *
  *    scriptingComponent:
  *      A valid AppleScript component instance.
- *    
+ *
  *    sourceAttributes:
  *      A CFArray of CFDictionaries of text attributes.  The order of
  *      the array elements corresponds to the source style constants
  *      below, and therefore also to the names returned by
  *      ASGetSourceStyleNames.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.5 and later in Carbon.framework
  *    CarbonLib:        not available
@@ -407,17 +407,17 @@ function ASSetSourceAttributes( scriptingComponent: ComponentInstance; sourceAtt
 
 {
  *  ASGetSourceStyleNames()
- *  
+ *
  *  Summary:
  *    Returns the AppleScript source style names.
- *  
+ *
  *  Discussion:
  *    This call returns an AEList of text descriptors with the names of
  *    the source styles.  The order of the names corresponds to the
  *    order of the source style constants, below.  The precise type of
  *    the text descriptors is not defined; you should coerce them to
  *    the type you want to handle.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.0 and later in Carbon.framework
  *    CarbonLib:        in CarbonLib 1.0 and later

+ 147 - 147
packages/univint/src/AudioCodecs.pas

@@ -228,53 +228,53 @@ uses MacTypes,CoreAudioTypes,AudioComponents;
 
 {!
 	@header AudioCodec
- 
+
 	This header defines the property sets and the public API for various audio codecs.
 
 	<h2>Theory of Operation</h2>
- 
+
 	AudioCodec components translate audio data from one format to another. There
-	are three kinds of AudioCodec components. Decoder components ('adec') 
-	translate data that isn't in linear PCM into linear PCM formatted data. 
-	Encoder components ('aenc') translate linear PCM data into some other format. 
-	Unity codecs ('acdc') translate between different flavors of the same type 
+	are three kinds of AudioCodec components. Decoder components ('adec')
+	translate data that isn't in linear PCM into linear PCM formatted data.
+	Encoder components ('aenc') translate linear PCM data into some other format.
+	Unity codecs ('acdc') translate between different flavors of the same type
 	(e.g. 16 bit signed integer linear PCM into 32 bit floating point linear PCM).
- 
+
 	AudioCodec components are standard components and are managed by the Component
 	Manager.
- 
+
 	Once an AudioCodec is found that implements the translation in question,
 	it has to be set up to do the translation. This can be done by setting the
 	appropriate properties or by calling AudioCodecInitialize. If the translation
 	is specified by properties, AudioCodecInitialize still needs to be called
 	prior to appending input data or producing output data.
- 
+
 	AudioCodecInitialize puts the codec into the "initialized" state. In this state,
 	the format information for the translation cannot be changed. The codec
 	has to be in the initialized state for AudioCodecAppendInputData and
 	AudioCodecProduceOutputData to work. They will return kAudioCodecStateError
 	if the codec isn't initialized.
- 
+
 	AudioCodecUninitialize will return the codec to the uninitialized state and
 	release any allocated resources. The codec may then be configured freely. It is not
 	necessary to call AudioCodecUninitialize prior to closing the codec.
- 
+
 	Once in the initialized state, the codec is ready to receive input and produce
 	output using the AudioCodecAppendInputData and AudioCodecProduceOutputData
-	routines. Input data can be fed into an encoder and some decoders in any size (even 
-	byte by byte). Input data fed to a decoder should be in terms of whole packets in the 
-	encoded format if the format is variable bit rate and is not self framing (e.g. MPEG-4 AAC). 
-	Output data can only be produced in whole packet sizes. Both routines will return 
+	routines. Input data can be fed into an encoder and some decoders in any size (even
+	byte by byte). Input data fed to a decoder should be in terms of whole packets in the
+	encoded format if the format is variable bit rate and is not self framing (e.g. MPEG-4 AAC).
+	Output data can only be produced in whole packet sizes. Both routines will return
 	the amount of data they consume/produce.
- 
+
 	AudioCodecProduceOutputData also returns a status code to the caller that
 	indicates the result of the operation (success or failure) as well as the
 	state of the input buffer.
-	
+
 	The combination of AppendInputData and ProduceOutputPackets can be thought of a "push-pull"
-	model of data handling. First, the input data is pushed into the component and the 
+	model of data handling. First, the input data is pushed into the component and the
 	resulting output data gets pulled out of that same component.
- 
+
 	Basic Workflow
 	1. Find the appropriate codec component
 	2. Open the codec component
@@ -284,7 +284,7 @@ uses MacTypes,CoreAudioTypes,AudioComponents;
 		a. AppendInputData (EOF is signaled by passing a 0-sized buffer)
 		b. ProduceOutputPackets
 	6. Close the codec component
-	
+
  }
 
 //=============================================================================
@@ -301,13 +301,13 @@ type
 
 {!
     @struct AudioCodecMagicCookieInfo
- 
+
 	@abstract Structure holding the <em>magic cookie</em> information.
- 
+
 	@discussion Passed as input to AudioCodecGetProperty for kAudioCodecPropertyFormatList.
 				The first four + sizeof(void *) bytes of the buffer pointed at by outPropertyData
 				will contain this struct.
- 
+
 	@field mMagicCookieSize
         The size of the magic cookie
 	@field mMagicCookie
@@ -319,7 +319,7 @@ type
 		mMagicCookie: (*const*) UnivPtr;
 	end;
 	AudioCodecMagicCookieInfoPtr = ^AudioCodecMagicCookieInfo;
-	
+
 //=============================================================================
 //#pragma mark AudioCodec Component Constants
 //=============================================================================
@@ -327,9 +327,9 @@ type
 
 {!
 	@enum           AudioCodecComponentType
- 
+
 	@discussion     Collection of audio codec component types
- 
+
 	@constant		kAudioDecoderComponentType
 					A codec that translates data in some other format into linear PCM.
 					The component subtype specifies the format ID of the other format.
@@ -343,7 +343,7 @@ type
 const
 	kAudioDecoderComponentType = FourCharCode('adec');
 	kAudioEncoderComponentType = FourCharCode('aenc');
-	kAudioUnityCodecComponentType = FourCharCode('acdc'); 
+	kAudioUnityCodecComponentType = FourCharCode('acdc');
 
 //=============================================================================
 //#pragma	mark Global Codec Properties
@@ -358,14 +358,14 @@ const
 	@discussion	These properties reflect the capabilities of the underlying codec.
 				The values of these properties are independent of the codec's internal
 				state.
-				
+
 				These properties can be read at any time the codec is open.
 
 	@constant	kAudioCodecPropertySupportedInputFormats
-					An array of AudioStreamBasicDescription structs describing what formats 
+					An array of AudioStreamBasicDescription structs describing what formats
 					the codec supports for input data
 	@constant	kAudioCodecPropertySupportedOutputFormats
-					An array of AudioStreamBasicDescription structs describing what formats 
+					An array of AudioStreamBasicDescription structs describing what formats
 					the codec supports for output data
  	@constant	kAudioCodecPropertyAvailableInputSampleRates
 					An array of AudioValueRange indicating the valid ranges for the
@@ -380,7 +380,7 @@ const
 	@constant	kAudioCodecPropertyAvailableBitRateRange
 					An array of AudioValueRange that indicate the target bit rates
 					supported by the encoder. This can be total bit rate or bit
-					rate per channel as appropriate. 
+					rate per channel as appropriate.
 					This property is only relevant to encoders.
 					(see also kAudioCodecPropertyApplicableBitRateRange)
 	@constant	kAudioCodecPropertyMinimumNumberInputPackets
@@ -398,7 +398,7 @@ const
 					capable of encoding or decoding to. 0xFFFFFFFF means any number
 					of channels.
 	@constant	kAudioCodecPropertyDoesSampleRateConversion
-					A UInt32 indicating if the codec wants to do a sample rate conversion (if 
+					A UInt32 indicating if the codec wants to do a sample rate conversion (if
 					necessary) because it can do it in a way that is meaningful for quality.
 					Value is 1 if true, 0 otherwise.
 	@constant	kAudioCodecPropertyAvailableInputChannelLayoutTags
@@ -410,12 +410,12 @@ const
 	@constant	kAudioCodecPropertyInputFormatsForOutputFormat
 					An array of AudioStreamBasicDescription indicating what the codec supports
 					for input data given an output format that's passed in as the first member of
-					the array (and is overwritten on the reply). Always a subset of 
+					the array (and is overwritten on the reply). Always a subset of
 					kAudioCodecPropertySupportedInputFormats
 	@constant	kAudioCodecPropertyOutputFormatsForInputFormat
 					An array of AudioStreamBasicDescription indicating what the codec supports
 					for output data given an input format that's passed in as the first member of
-					the array (and is overwritten on the reply). Always a subset of 
+					the array (and is overwritten on the reply). Always a subset of
 					kAudioCodecPropertySupportedOutputFormats
 	@constant	kAudioCodecPropertyFormatInfo
 					Takes an AudioFormatInfo on input. This AudioformatInfo is validated either through
@@ -446,38 +446,38 @@ const
 
 {!
 	@enum			AudioCodecInstanceProperty
- 
+
 	@discussion		Properties which can be set or read on an instance of the
-					underlying audio codec. These properties are dependent on the 
+					underlying audio codec. These properties are dependent on the
 					codec's current state. A property may be read/write or read
 					only, depending on the data format of the codec.
-					
+
 					These properties may have different values depending on whether the
 					codec is initialized or not. All properties can be read at any time
-					the codec is open. However, to ensure the codec is in a valid 
+					the codec is open. However, to ensure the codec is in a valid
 					operational state and therefore the property value is valid the codec
 					must be initialized at the time the property is read.
-					
+
 					Properties that are writable are only writable when the codec
 					is not initialized.
- 
+
 	@constant		kAudioCodecPropertyInputBufferSize
 						A UInt32 indicating the maximum input buffer size for the codec
-						in bytes. 
-						Not writable, but can vary on some codecs depending on the bit stream 
+						in bytes.
+						Not writable, but can vary on some codecs depending on the bit stream
 						format being handled.
 	@constant		kAudioCodecPropertyPacketFrameSize
 						A UInt32 indicating the number of frames of audio data encapsulated in each
 						packet of data in the codec's format. For encoders, this is the
 						output format. For decoders this is the input format.
-						Formats with variable frames per packet should return a maximum value 
+						Formats with variable frames per packet should return a maximum value
 						for this property.
 						Not writable.
 	@constant		kAudioCodecPropertyHasVariablePacketByteSizes
 						A UInt32 where 0 indicates that all packets in the codec's format
 						have the same byte size (sometimes referred to as CBR codecs),
-						and 1 indicates that they vary in size (sometimes referred to as 
-						VBR codecs). The maximum size of a variable packet is up to 
+						and 1 indicates that they vary in size (sometimes referred to as
+						VBR codecs). The maximum size of a variable packet is up to
 						the one indicated in kAudioCodecPropertyMaximumPacketByteSize.
 						Any codec that reports 1 for this property must be able to handle packet
 						descriptions, though it does not have to require them.
@@ -492,10 +492,10 @@ const
 						Not writable.
 	@constant		kAudioCodecPropertyPacketSizeLimitForVBR
                         A UInt32 indicating the maximum number of bits in an output packet of an encoder.
-                        The output packet size will not exceed this number. The size should be smaller 
-                        than kAudioCodecPropertyMaximumPacketByteSize. This property will configure the 
-                        encoder to VBR mode with the highest VBR quality that can maintain the packet 
-                        size limit. kAudioCodecPropertySoundQualityForVBR can be used to retrieve the 
+                        The output packet size will not exceed this number. The size should be smaller
+                        than kAudioCodecPropertyMaximumPacketByteSize. This property will configure the
+                        encoder to VBR mode with the highest VBR quality that can maintain the packet
+                        size limit. kAudioCodecPropertySoundQualityForVBR can be used to retrieve the
                         quality setting that will be used given that packet size limit.
                         Writeable if supported.
 	@constant		kAudioCodecPropertyCurrentInputFormat
@@ -511,7 +511,7 @@ const
 	@constant		kAudioCodecPropertyMagicCookie
 						An untyped buffer of out of band configuration data the codec
 						requires to process the stream of data correctly. The contents
-						of this data is private to the codec. 
+						of this data is private to the codec.
 						Not all codecs have magic cookies. If a call to AudioCodecGetPropertyInfo
 						returns a size greater than 0 then the codec may take one.
 						Writable if present.
@@ -555,13 +555,13 @@ const
                         Not writable.
 	@constant		kAudioCodecPropertyApplicableInputSampleRates
 						An array of AudioValueRange indicating the valid ranges for the
-						input sample rate of the codec for the current bit rate. 
+						input sample rate of the codec for the current bit rate.
 						This property is only relevant to encoders.
 						See also kAudioCodecPropertyAvailableInputSampleRates.
 						Not writable.
 	@constant		kAudioCodecPropertyApplicableOutputSampleRates
 						An array of AudioValueRange indicating the valid ranges for the
-						output sample rate of the codec for the current bit rate. 
+						output sample rate of the codec for the current bit rate.
 						This property is only relevant to encoders.
 						See also kAudioCodecPropertyAvailableOutputSampleRates.
 						Not writable.
@@ -573,7 +573,7 @@ const
 	@constant		kAudioCodecPropertyPrimeMethod
 						A UInt32 specifying priming method.
 						See enum below.
-						May be writable. Some encoders offer the option of padding out the last packet, and this 
+						May be writable. Some encoders offer the option of padding out the last packet, and this
 						may be set here.
 	@constant		kAudioCodecPropertyPrimeInfo
 						A pointer to an AudioCodecPrimeInfo struct.
@@ -592,28 +592,28 @@ const
 						Encoders only.
 						Obviously this will be linked to many of the other properties listed herein and as such
 						it potentially will cause synchronization problems. Therefore, when setting this property
-						on an encoder a GetProperty should be done first to retrieve the current dictionary, 
-						and only one setting within the dictionary should change with each SetProperty call, 
+						on an encoder a GetProperty should be done first to retrieve the current dictionary,
+						and only one setting within the dictionary should change with each SetProperty call,
 						as it is not guaranteed that changing one property will not have side effects.
 						Writable if supported.
 	@constant		kAudioCodecPropertyBitRateControlMode
-						A UInt32 indicating which bit rate control mode will be applied to encoders that 
+						A UInt32 indicating which bit rate control mode will be applied to encoders that
 						can produce variable packet sizes (sometimes referred to as VBR encoders).
-						Although the packet size may be variable, a constant bit rate can be maintained 
-						over a transmission channel when decoding in real-time with a fixed end-to-end audio delay. 
+						Although the packet size may be variable, a constant bit rate can be maintained
+						over a transmission channel when decoding in real-time with a fixed end-to-end audio delay.
 						E.g., MP3 and MPEG-AAC use a bit reservoir mechanism to meet that constraint.
-						See enum below. 
+						See enum below.
 						Only needs to be settable if the codec supports multiple bit rate control strategies.
 	@constant		kAudioCodecPropertyFormatList
 						An array of AudioFormatListItem structs list all formats that can be handled by the decoder
 						For decoders, takes a Magic Cookie that gets passed in on the GetProperty call. No default.
-						On input, the outPropertyData parameter passed to GetProperty should begin with a 
-						AudioCodecMagicCookieInfo struct which will be overwritten by the AudioFormatListItems 
+						On input, the outPropertyData parameter passed to GetProperty should begin with a
+						AudioCodecMagicCookieInfo struct which will be overwritten by the AudioFormatListItems
 						returned from the property. For encoders, returns a list of formats which will be in the
 						bitstream. No input data required.
 						Important note: this encoder property is only applicable to audio formats which are made of
 						two or more layers where the base layers(s) can be decoded by systems which aren't capable of
-						handling the enhancement layers. For example, a High Efficiency AAC bitstream which contains 
+						handling the enhancement layers. For example, a High Efficiency AAC bitstream which contains
 						an AAC Low Complexity base layer can be decoded by any AAC decoder.
 	@constant		kAudioCodecPropertySoundQualityForVBR
 						A UInt32 that sets a target sound quality level.
@@ -623,7 +623,7 @@ const
 						See also kAudioCodecPropertyQualitySetting
 						Writable if supported.
     @constant		kAudioCodecPropertyDelayMode
-                        A UInt32 specifying the delay mode. See enum below.                        
+                        A UInt32 specifying the delay mode. See enum below.
                         Writable if supported.
 	@constant		kAudioCodecPropertyAdjustLocalQuality
 						An SInt32 number in the range [-128, 127] to allow encoding quality adjustements on a packet by packet basis.
@@ -683,14 +683,14 @@ const
 	kAudioCodecPropertyAdjustLocalQuality = FourCharCode('^qal');
 	kAudioCodecPropertyProgramTargetLevel = FourCharCode('pptl');
 	kAudioCodecPropertyDynamicRangeControlMode = FourCharCode('mdrc');
-	kAudioCodecPropertyProgramTargetLevelConstant = FourCharCode('ptlc'); 
+	kAudioCodecPropertyProgramTargetLevelConstant = FourCharCode('ptlc');
 
 
 {!
 	@enum			AudioCodecQuality
- 
+
 	@discussion		Constants to be used with kAudioCodecPropertyQualitySetting
- 
+
 	@constant		kAudioCodecQuality_Max
 	@constant		kAudioCodecQuality_High
 	@constant		kAudioCodecQuality_Medium
@@ -707,9 +707,9 @@ const
 
 {!
 	@enum			AudioCodecPrimeMethod
- 
+
 	@discussion		Constants to be used with kAudioCodecPropertyPrimeMethod.
- 
+
 	@constant		kAudioCodecPrimeMethod_Pre
 						Primes with leading and trailing input frames
 	@constant		kAudioCodecPrimeMethod_Normal
@@ -727,34 +727,34 @@ const
 
 {!
 	@enum			kAudioCodecPropertyBitRateControlMode
- 
+
 	@discussion		Constants defining various bit rate control modes
 					to be used with kAudioCodecPropertyBitRateControlMode.
 					These modes are only applicable to encoders that can produce
 					variable packet sizes, such as AAC.
 
 	@constant		kAudioCodecBitRateControlMode_Constant
-						The encoder maintains a constant bit rate suitable for use over a transmission 
-						channel when decoding in real-time with a fixed end-to-end audio delay.  
-						Note that while a constant bit rate is maintained in this mode, the number of bits 
-						allocated to encode each fixed length of audio data may be variable 
+						The encoder maintains a constant bit rate suitable for use over a transmission
+						channel when decoding in real-time with a fixed end-to-end audio delay.
+						Note that while a constant bit rate is maintained in this mode, the number of bits
+						allocated to encode each fixed length of audio data may be variable
 						(ie. packet sizes are variable).
 						E.g., MP3 and MPEG-AAC use a bit reservoir mechanism to meet that constraint.
 	@constant		kAudioCodecBitRateControlMode_LongTermAverage
 						 The provided target bit rate is achieved over a long term average
-						 (typically after the first 1000 packets). This mode is similar to 
-						 kAudioCodecBitRateControlMode_Constant in the sense that the 
-						 target bit rate will be maintained in a long term average. However, it does not 
-						 provide constant delay when using constant bit rate transmission. This mode offers 
-						 a better sound quality than kAudioCodecBitRateControlMode_Constant 
-						 can, that is, a more efficient encoding is performed. 
+						 (typically after the first 1000 packets). This mode is similar to
+						 kAudioCodecBitRateControlMode_Constant in the sense that the
+						 target bit rate will be maintained in a long term average. However, it does not
+						 provide constant delay when using constant bit rate transmission. This mode offers
+						 a better sound quality than kAudioCodecBitRateControlMode_Constant
+						 can, that is, a more efficient encoding is performed.
 	@constant		kAudioCodecBitRateControlMode_VariableConstrained
 						Encoder dynamically allocates the bit resources according to the characteristics
-						of the underlying signal. However, some constraints are applied in order to limit 
+						of the underlying signal. However, some constraints are applied in order to limit
 						the variation of the bit rate.
 	@constant		kAudioCodecBitRateControlMode_Variable
 						Similar to the VBR constrained mode, however the packet size is virtually unconstrained.
-						The coding process targets constant sound quality, and the sound quality level is 
+						The coding process targets constant sound quality, and the sound quality level is
 						set by kAudioCodecPropertySoundQualityForVBR.
 						This mode usually provides the best tradeoff between quality and bit rate.
 }
@@ -766,7 +766,7 @@ const
 
 {!
     @enum			AudioCodecDelayMode
- 
+
     @discussion		Constants defining various delay modes to be used with kAudioCodecPropertyDelayMode.
                     The resulting priming frames are reflected in the kAudioCodecPropertyPrimeInfo property.
                     Note that for layered streams like aach and aacp, the priming information always refers
@@ -784,7 +784,7 @@ const
 const
 	kAudioCodecDelayMode_Compatibility = 0;
 	kAudioCodecDelayMode_Minimum = 1;
-	kAudioCodecDelayMode_Optimal = 2; 
+	kAudioCodecDelayMode_Optimal = 2;
 
 {!
 	@enum			ProgramTargetLevel
@@ -792,7 +792,7 @@ const
 	@discussion		Constants to be used with kAudioCodecPropertyProgramTargetLevelConstant
 
 	@constant		kProgramTargetLevel_None
-						
+
 	@constant		kProgramTargetLevel_Minus31dB
 	@constant		kProgramTargetLevel_Minus23dB
 	@constant		kProgramTargetLevel_Minus20dB
@@ -801,8 +801,8 @@ const
 	kProgramTargetLevel_None = 0;
 	kProgramTargetLevel_Minus31dB = 1;
 	kProgramTargetLevel_Minus23dB = 2;
-	kProgramTargetLevel_Minus20dB = 3; 
-    
+	kProgramTargetLevel_Minus20dB = 3;
+
 {!
 	@enum			DynamicRangeControlMode
 
@@ -818,18 +818,18 @@ const
 const
 	kDynamicRangeControlMode_None = 0;
 	kDynamicRangeControlMode_Light = 1;
-	kDynamicRangeControlMode_Heavy = 2; 
+	kDynamicRangeControlMode_Heavy = 2;
 
 {!
-	@struct			AudioCodecPrimeInfo 
- 
+	@struct			AudioCodecPrimeInfo
+
 	@discussion		Specifies the number of leading and trailing empty frames
 					which have to be inserted.
- 
+
 	@field			leadingFrames
 						An unsigned integer specifying the number of leading empty frames
 	@field			trailingFrames
-						An unsigned integer specifying the number of trailing empty frames 
+						An unsigned integer specifying the number of trailing empty frames
 }
 type
 	AudioCodecPrimeInfo = record
@@ -837,7 +837,7 @@ type
 		trailingFrames: UInt32;
 	end;
 	AudioCodecPrimeInfoPtr = ^AudioCodecPrimeInfo;
-	
+
 
 //=============================================================================
 //#pragma mark -
@@ -872,17 +872,17 @@ const
 
 {!
 	@enum			AudioSettingsFlags
- 
+
 	@discussion		Constants to be used with kAudioSettings_Hint
 					in the kAudioCodecPropertySettings property dictionary.
-					Indicates any special characteristics of each parameter within the dictionary, 
+					Indicates any special characteristics of each parameter within the dictionary,
 
 	@constant		kAudioSettingsFlags_ExpertParameter
 						If set, then the parameter is an expert parameter.
 	@constant		kAudioSettingsFlags_InvisibleParameter
-						If set, then the parameter should not be displayed. 
+						If set, then the parameter should not be displayed.
 	@constant		kAudioSettingsFlags_MetaParameter
-						If set, then changing this parameter may affect the values of other parameters. 
+						If set, then changing this parameter may affect the values of other parameters.
 						If not set, then this parameter can be set without affecting the values of other parameters.
 	@constant		kAudioSettingsFlags_UserInterfaceParameter
 						If set, then this is only a user interface element and not reflected in the codec's bit stream.
@@ -902,13 +902,13 @@ const
 //=============================================================================
 {!
 	@enum			AudioCodecProduceOutputPacketStatus
- 
+
 	@discussion		Possible return status
- 
+
 	@constant		kAudioCodecProduceOutputPacketFailure
 						Couldn't complete the request due to an error. It is possible
 						that some output data was produced. This is reflected in the value
-						returned in ioNumberPackets. 
+						returned in ioNumberPackets.
 	@constant		kAudioCodecProduceOutputPacketSuccess
 						The number of requested output packets was produced without incident
 						and there isn't any more input data to process
@@ -924,7 +924,7 @@ const
 						than the requested number of output packets may have been
 						produced. Check the value returned in ioNumberPackets for the
 						actual number produced. Note that not all formats have EOF
-						markers in them. 
+						markers in them.
 }
 const
 	kAudioCodecProduceOutputPacketFailure = 1;
@@ -940,10 +940,10 @@ const
 //=============================================================================
 {!
 	@enum			AudioCodecSelectors
- 
+
 	@discussion		Allows selection of component routines supported the the AudioCodec API
 					Used by the Component Manager.
- 
+
 	@constant		kAudioCodecGetPropertyInfoSelect
 	@constant		kAudioCodecGetPropertySelect
 	@constant		kAudioCodecSetPropertySelect
@@ -974,9 +974,9 @@ const
 //=============================================================================
 {!
 	@enum			AudioCodecErrors
- 
+
 	@discussion		Possible errors returned by audio codec components
- 
+
 	@constant		kAudioCodecNoError
 	@constant		kAudioCodecUnspecifiedError
 	@constant		kAudioCodecUnknownPropertyError
@@ -996,7 +996,7 @@ const
 	kAudioCodecUnsupportedFormatError = FourCharCode('!dat');
 	kAudioCodecStateError = FourCharCode('!stt');
 	kAudioCodecNotEnoughBufferSpaceError = FourCharCode('!buf');
-	kAudioCodecBadDataError = FourCharCode('bada'); 
+	kAudioCodecBadDataError = FourCharCode('bada');
 
 
 //=============================================================================
@@ -1006,12 +1006,12 @@ const
 
 {!
 	@function		AudioCodecGetPropertyInfo
- 
+
 	@discussion		Retrieve information about the given property. The outSize argument
 					will return the size in bytes of the current value of the property.
 					The outWritable argument will return whether or not the property
 					in question can be changed.
- 
+
 	@param			inCodec
 						An AudioCodec instance
 	@param			inPropertyID
@@ -1019,8 +1019,8 @@ const
 	@param			outSize
 						Size in bytes of the property
 	@param			outWritable
-						Flag indicating wether the underlying property can be modified or not 
- 
+						Flag indicating wether the underlying property can be modified or not
+
 	@result			The OSStatus value
 }
 function AudioCodecGetPropertyInfo( inCodec: AudioCodec; inPropertyID: AudioCodecPropertyID; var outSize: UInt32; var outWritable: Boolean ): OSStatus; external name '_AudioCodecGetPropertyInfo';
@@ -1029,11 +1029,11 @@ function AudioCodecGetPropertyInfo( inCodec: AudioCodec; inPropertyID: AudioCode
 
 {!
 	@function		AudioCodecGetProperty
- 
+
 	@discussion		Retrieve the indicated property data. On input, ioDataSize has the size
 					of the data pointed to by outPropertyData. On output, ioDataSize will contain
 					the amount written.
- 
+
 	@param			inCodec
 						An AudioCodec instance
 	@param			inPropertyID
@@ -1053,7 +1053,7 @@ function AudioCodecGetProperty( inCodec: AudioCodec; inPropertyID: AudioCodecPro
 	@function		AudioCodecSetProperty
 
 	@discussion		Set the indicated property data.
- 
+
 	@param			inCodec
 						An AudioCodec instance
 	@param			inPropertyID
@@ -1062,7 +1062,7 @@ function AudioCodecGetProperty( inCodec: AudioCodec; inPropertyID: AudioCodecPro
 						Size in bytes of the property data
 	@param			inPropertyData
 						Pointer to the property data buffer
- 
+
 	@result			The OSStatus value
 }
 function AudioCodecSetProperty( inCodec: AudioCodec; inPropertyID: AudioCodecPropertyID; inPropertyDataSize: UInt32; inPropertyData: {const} UnivPtr ): OSStatus; external name '_AudioCodecSetProperty';
@@ -1076,12 +1076,12 @@ function AudioCodecSetProperty( inCodec: AudioCodec; inPropertyID: AudioCodecPro
 
 {!
 	@function		AudioCodecInitialize
- 
+
 	@discussion		This call will allocate any buffers needed and otherwise set the codec
 					up to perform the indicated translation. If an argument is NULL, any
 					previously set properties will be used for preparing the codec for work.
 					Note that this routine will also validate the format information as useable.
- 
+
 	@param			inCodec
 						An AudioCodec instance
 	@param			inInputFormat
@@ -1092,7 +1092,7 @@ function AudioCodecSetProperty( inCodec: AudioCodec; inPropertyID: AudioCodecPro
 						Pointer to the magic cookie
 	@param			inMagicCookieByteSize
 						Size in bytes of the magic cookie
-  
+
 	@result			The OSStatus value
 }
 function AudioCodecInitialize( inCodec: AudioCodec; const (*var*) inInputFormat: AudioStreamBasicDescription; const (*var*) inOutputFormat: AudioStreamBasicDescription; inMagicCookie: {const} UnivPtr; inMagicCookieByteSize: UInt32 ): OSStatus; external name '_AudioCodecInitialize';
@@ -1101,14 +1101,14 @@ function AudioCodecInitialize( inCodec: AudioCodec; const (*var*) inInputFormat:
 
 {!
 	@function		AudioCodecUninitialize
-  
+
 	@discussion		This call will move the codec from the initialized state back to the
 					uninitialized state. The codec will release any resources it allocated
 					or claimed in AudioCodecInitialize.
- 
+
 	@param			inCodec
 						An AudioCodec instance
- 
+
 	@result			The OSStatus value
 }
 function AudioCodecUninitialize( inCodec: AudioCodec ): OSStatus; external name '_AudioCodecUninitialize';
@@ -1117,18 +1117,18 @@ function AudioCodecUninitialize( inCodec: AudioCodec ): OSStatus; external name
 
 {!
 	@function		AudioCodecAppendInputData
- 
+
 	@discussion		Append as much of the given data in inInputData to the codec's input buffer as possible
 					and return in ioInputDataByteSize the amount of data used.
- 
+
 					The inPacketDescription argument is an array of AudioStreamPacketDescription
 					structs that describes the packet layout. The number of elements in this array
 					is indicated on input by ioNumberPackets. On return, this number indicates the number
 					of packets consumed.
- 
+
 					Note also in this case that it is an error to supply less than a full packet
 					of data at a time.
- 
+
 	@param			inCodec
 						An AudioCodec instance
 	@param			inInputData
@@ -1140,7 +1140,7 @@ function AudioCodecUninitialize( inCodec: AudioCodec ): OSStatus; external name
 						The number of packets
 	@param			inPacketDescription
 						The packet description pointer
- 
+
 	@result			The OSStatus value
 }
 function AudioCodecAppendInputData( inCodec: AudioCodec; inInputData: {const} UnivPtr; var ioInputDataByteSize: UInt32; var ioNumberPackets: UInt32; const (*var*) inPacketDescription: AudioStreamPacketDescription ): OSStatus; external name '_AudioCodecAppendInputData';
@@ -1154,7 +1154,7 @@ function AudioCodecAppendInputData( inCodec: AudioCodec; inInputData: {const} Un
 					allows for. The outStatus argument returns information about the codec's
 					status to allow for proper data management. See the constants above for
 					the possible values that can be returned.
- 
+
 					The outPacketDescription argument is an array of AudioStreamPacketDescription
 					structs that describes the packet layout returned in outOutputData. This
 					argument is optional. Pass NULL if this information is not to be returned.
@@ -1165,7 +1165,7 @@ function AudioCodecAppendInputData( inCodec: AudioCodec; inInputData: {const} Un
 					the number frames in a packet of the encoded format (as returned by
 					kAudioCodecPropertyPacketFrameSize). Encoders will consume this many frames
 					of linear PCM data to produce a packet of their format.
- 
+
 	@param			inCodec
 						The AudioCodec instance
 	@param			outOutputData
@@ -1191,9 +1191,9 @@ function AudioCodecProduceOutputBufferList( inCodec: AudioCodec; var ioBufferLis
 	@discussion		Flushes all the data in the codec and clears the input buffer. Note that
 					the formats, and magic cookie will be retained so they won't need to be
 					set up again to decode the same data.
- 
+
 	@param			inCodec The audio codec descriptor
- 
+
 	@result			the OSStatus value
 }
 function AudioCodecReset( inCodec: AudioCodec ): OSStatus; external name '_AudioCodecReset';
@@ -1257,7 +1257,7 @@ const
 					The name of the codec component as a CFStringRef. The CFStringRef
 					retrieved via this property must be released by the caller.
 	@constant	kAudioCodecPropertyManufacturerCFString
-					The manufacturer of the codec as a CFStringRef. The CFStringRef 
+					The manufacturer of the codec as a CFStringRef. The CFStringRef
 					retrieved via this property must be released by the caller.
 	@constant	kAudioCodecPropertyFormatCFString
 					The name of the codec's format as a CFStringRef. The CFStringRef
@@ -1267,12 +1267,12 @@ const
 const
 	kAudioCodecPropertyNameCFString = FourCharCode('lnam');
 	kAudioCodecPropertyManufacturerCFString = FourCharCode('lmak');
-	kAudioCodecPropertyFormatCFString = FourCharCode('lfor');		
+	kAudioCodecPropertyFormatCFString = FourCharCode('lfor');
 
 {!
 	@enum		AudioCodecProperty
 	@deprecated	in version 10.5
- 
+
 	@constant	kAudioCodecPropertyRequiresPacketDescription
 					A UInt32 where a non-zero value indicates that the format the codec implements
 					requires that an AudioStreamPacketDescription array must be supplied with any data
@@ -1282,8 +1282,8 @@ const
 					on output.
 					A decoder must be able to handle packet descriptions even if it does not require them.
 					An encoder does not have to fill out packet descriptions if it does not require them.
-					Redundant due to kAudioCodecPropertyHasVariablePacketByteSizes. Codecs with variable-sized 
-					packets must handle packet descriptions while codecs with constant-sized packets do not 
+					Redundant due to kAudioCodecPropertyHasVariablePacketByteSizes. Codecs with variable-sized
+					packets must handle packet descriptions while codecs with constant-sized packets do not
 					have to.
 	@constant	kAudioCodecPropertyAvailableBitRates
 					An array of UInt32 that indicates the target bit rates
@@ -1292,21 +1292,21 @@ const
 	@constant	kAudioCodecExtendFrequencies
 					A UInt32 indicating whether an encoder should extend its cutoff frequency
 					if such an option exists. 0 == extended frequencies off, 1 == extended frequencies on
-					e.g. some encoders normally cut off the signal at 16 kHz but can encode up to 20 kHz if 
+					e.g. some encoders normally cut off the signal at 16 kHz but can encode up to 20 kHz if
 					asked to.
 					Redundant.
 	@constant	kAudioCodecUseRecommendedSampleRate
 					For encoders that do sample rate conversion, a UInt32 indicating whether or
-					not the encoder is using the recommended sample rate for the given input. 
+					not the encoder is using the recommended sample rate for the given input.
 					A value of 0 indicates it isn't, 1 indicates it is.
-					This property is read only and indicates whether or not a user has explicitly set an output 
+					This property is read only and indicates whether or not a user has explicitly set an output
 					sample rate.
 					Redundant as 0.0 for a sample rate means let the codec decide.
 	@constant	kAudioCodecOutputPrecedence
 					For encoders that do sample rate conversion, a UInt32 indicating whether the
 					bit rate, sample rate, or neither have precedence over the other. See enum below.
-					Redundant because precedence is implicitly set by either providing a non-zero bit rate or 
-					sample rate and setting the other to zero (which allows the encoder to choose any applicable rate). 
+					Redundant because precedence is implicitly set by either providing a non-zero bit rate or
+					sample rate and setting the other to zero (which allows the encoder to choose any applicable rate).
 					If both values are set to non-zero, neither value has precedence.
 	@constant	kAudioCodecDoesSampleRateConversion
 					Renamed to kAudioCodecPropertyDoesSampleRateConversion
@@ -1345,9 +1345,9 @@ const
 	@deprecated	in version 10.5
 
 	@discussion	Constants to be used with kAudioCodecBitRateFormat.
-					This is deprecated. 
+					This is deprecated.
 					Use kAudioCodecPropertyBitRateControlMode instead.
- 
+
 	@constant	kAudioCodecBitRateFormat_CBR is mapped to kAudioCodecBitRateControlMode_Constant
 	@constant	kAudioCodecBitRateFormat_ABR is mapped to kAudioCodecBitRateControlMode_LongTermAverage
 	@constant	kAudioCodecBitRateFormat_VBR is mapped to kAudioCodecBitRateControlMode_VariableConstrained
@@ -1363,7 +1363,7 @@ const
 	@deprecated	in version 10.5
 
 	@discussion	Constants to be used with kAudioCodecOutputPrecedence
- 
+
 	@constant	kAudioCodecOutputPrecedenceNone
 					Change in the bit rate or the sample rate are constrained by
 					the other value.
@@ -1381,23 +1381,23 @@ const
 
 {!
 	@typedef	MagicCookieInfo
- 
+
 	@deprecated	in version 10.5
- 
-	@discussion	renamed to AudioCodecMagicCookieInfo 
+
+	@discussion	renamed to AudioCodecMagicCookieInfo
  }
 type
 	MagicCookieInfo = AudioCodecMagicCookieInfo;
 
 {!
 	@enum		AudioCodecSettingsHint
- 
+
 	@deprecated	in version 10.4
- 
+
 	@discussion	Constants to be used with kAudioSettings_Hint.
 				This is deprecated.
 				Use	AudioSettingsFlag instead.
- 
+
 	@constant	kHintBasic
 	@constant	kHintAdvanced
 	@constant	kHintHidden

+ 30 - 30
packages/univint/src/AudioComponents.pas

@@ -47,14 +47,14 @@
 				<integer>12345</integer>
 				<key>factoryFunction</key>
 				<string>AUExampleFactory</string>
-				
+
 				<!-- An AudioComponent is sandbox safe -->
-				
+
 				<key>sandboxSafe</key>
 				<true/>
-				
+
 				<!-- or it can describe its resource usage -->
-				
+
 				<key>resourceUsage</key>
 				<dict>
 					<key>iokit.user-client</key>
@@ -74,7 +74,7 @@
 				</dict>
 
 				<!-- An AudioComponent can define its tags -->
-				
+
 				<key>tags</key>
 				<array>
 					<string>Effect</string>
@@ -145,11 +145,11 @@
 	definition. "Equalizer", "Dynamics", "Distortion", "Synthesizer", "Effects", "Filter", "Dynamics
 	Processor", "Delay", "Reverb", "Pitch", "Panner", "Imaging", "Sampler", "Mixer", "Format
 	Converter", "Time Effect", "Output", "Offline Effect", "Drums", "Guitar", "Vocal", "Bass",
-	"MIDI". 
+	"MIDI".
 
 	These standard tags should not be localized in the audio unit.
 
-	Localizing the tags is similar to localizing AudioUnit parameter strings. Create a strings 
+	Localizing the tags is similar to localizing AudioUnit parameter strings. Create a strings
 	resource file and name it "AudioUnitTags.strings".
 	For more information on strings resource file please check
 	https://developer.apple.com/library/mac/documentation/macosx/conceptual/bpinternational/Articles/StringsFiles.html
@@ -385,24 +385,24 @@ uses MacTypes,CoreAudioTypes,Components,CFBase,CFDictionary;
 	will only return this component when performing a specific, non-wildcard search for the
 	component, i.e. with non-zero values of componentType, componentSubType, and
 	componentManufacturer. This can be useful when privately registering a component.
-	
+
 	@constant	kAudioComponentFlag_SandboxSafe
-	
+
 	An AudioComponent sets this bit in its componentFlags to indicate to the system that the
 	AudioComponent is safe to open in a sandboxed process.
-	
+
 	@constant	kAudioComponentFlag_IsV3AudioUnit
-	
+
 	The system sets this flag automatically when registering components which implement a version 3
 	Audio Unit.
-	
+
 	@constant	kAudioComponentFlag_RequiresAsyncInstantiation
-	
+
 	The system sets this flag automatically when registering components which require asynchronous
 	instantiation via AudioComponentInstantiate (v3 audio units with views).
-	
+
 	@constant	kAudioComponentFlag_CanLoadInProcess
-	
+
 	The system sets this flag automatically when registering components which can be loaded into
 	the current process. This is always true for V2 audio units; it depends on the packaging
 	in the case of a V3 audio unit.
@@ -426,7 +426,7 @@ const
         requires that the developer package the audio unit in a bundle separate from the application
         extension, since an extension's main binary cannot be dynamically loaded into another
         process.
-        
+
         An OS X host may request in-process loading of such audio units using
         kAudioComponentInstantiation_LoadInProcess.
 
@@ -452,7 +452,7 @@ const
 
 {!
     @struct         AudioComponentDescription
-    @discussion     A structure used to describe the unique and identifying IDs of an audio component 
+    @discussion     A structure used to describe the unique and identifying IDs of an audio component
     @field          componentType
                         A unique 4-byte code identifying the generic type of an audio component
     @field          componentSubType
@@ -483,7 +483,7 @@ type
     @discussion     An audio component is usually found through a search and is then uniquely
                     identified by the triple of an audio component's type, subtype and
                     manufacturer.
-                    
+
                     It can have properties associated with it (such as a name, a version).
 
                     It is then used as a factory (like a class in an object-oriented programming
@@ -507,7 +507,7 @@ type
     @abstract       The type used to represent an instance of a particular audio component
     @discussion     An audio component instance is created from its factory/producer audio
                     component. It is the body of code that does the work.
-    
+
                     A special note: While on the desktop this is typedef'd to a
                     ComponentInstanceRecord *, you should not assume that this will always be
                     compatible and usable with Component Manager calls.
@@ -523,7 +523,7 @@ type
 					selector. For example, the AudioUnitInitialize API call is implemented by a
 					plugin implementing the kAudioUnitInitializeSelect selector. Any function implementing
 					an audio plugin selector conforms to the basic pattern where the first argument
-					is a pointer to the plugin instance structure, has 0 or more specific arguments,  
+					is a pointer to the plugin instance structure, has 0 or more specific arguments,
 					and returns an OSStatus.
 }
 type
@@ -531,13 +531,13 @@ type
 
 {!
     @struct         AudioComponentPlugInInterface
-    @discussion     A structure used to represent an audio plugin's routines 
+    @discussion     A structure used to represent an audio plugin's routines
     @field          Open
                         the function used to open (or create) an audio plugin instance
     @field          Close
                         the function used to close (or dispose) an audio plugin instance
     @field          Lookup
-                        this is used to return a function pointer for a given selector, 
+                        this is used to return a function pointer for a given selector,
 						or NULL if that selector is not implemented
     @field          reserved
                         must be NULL
@@ -558,7 +558,7 @@ type
                     Authors of AudioComponents may register them from bundles as described
                     above in the discussion of this header file, or dynamically within a single
                     process, using AudioComponentRegister.
-    
+
     @param          inDesc
                         The AudioComponentDescription specifying the component to be instantiated.
     @result         A pointer to a AudioComponentPlugInInterface structure.
@@ -665,7 +665,7 @@ Needs to be added to CocoaInt
     @discussion
         For a component originating in an app extension, the returned icon will be that of the
         application containing the extension.
-        
+
         For components loaded from bundles, the icon will be that of the bundle.
 }
 extern NSImage * __nullable
@@ -699,7 +699,7 @@ function AudioComponentInstanceNew( inComponent: AudioComponent; var outInstance
     @discussion     This is an asynchronous version of AudioComponentInstanceNew(). It must be
                     used to instantiate any component with kAudioComponentFlag_RequiresAsyncInstantiation
                     set in its component flags. It may be used for other components as well.
-					
+
 					Note: Do not block the main thread while waiting for the completion handler
 					to be called; this can deadlock.
     @param          inComponent
@@ -763,7 +763,7 @@ function AudioComponentInstanceCanDo( inInstance: AudioComponentInstance; inSele
         AudioComponents are registered either when found in appropriate bundles in the filesystem,
         or via this call. AudioComponents registered via this call are available only within
         the current process.
-    
+
     @param          inDesc
                         The AudioComponentDescription that describes the AudioComponent. Note that
                         the registrar needs to be sure to set the flag kAudioComponentFlag_SandboxSafe
@@ -821,7 +821,7 @@ const
 	kAudioComponentValidationResult_TimedOut = 3;
 	kAudioComponentValidationResult_UnauthorizedError_Open = 4;
 	kAudioComponentValidationResult_UnauthorizedError_Init = 5;
-	
+
 {!
 	@define		kAudioComponentConfigurationInfo_ValidationResult
 	@abstract	Dictionary that contains the AudioComponentValidationResult for the component.
@@ -830,7 +830,7 @@ const
 }
 const
 	kAudioComponentConfigurationInfo_ValidationResult = 'ValidationResult';
-	
+
 {!
 	@function		AudioComponentValidate
 	@abstract		Tests a specified AudioComponent for API and behavioral conformance.
@@ -847,7 +847,7 @@ const
 }
 function AudioComponentValidate( inComponent: AudioComponent; inValidationParameters: CFDictionaryRef; var outValidationResult: AudioComponentValidationResult): OSStatus; external name '_AudioComponentValidate';
 (* API_AVAILABLE(macos(10.7)) *)
-	
+
 {!
 	@define		kAudioComponentValidationParameter_TimeOut
 	@discussion This is a number that indicates the time in seconds to wait for a validation
@@ -856,7 +856,7 @@ function AudioComponentValidate( inComponent: AudioComponent; inValidationParame
 }
 const
 	kAudioComponentValidationParameter_TimeOut = 'TimeOut';
-	
+
 {!
 	 @define	 kAudioComponentValidationParameter_ForceValidation
 	 @discussion

+ 39 - 39
packages/univint/src/AudioConverter.pas

@@ -3,7 +3,7 @@
 	@framework	AudioToolbox.framework
 	@copyright	(c) 1985-2015 by Apple, Inc., all rights reserved.
     @abstract   API's to perform audio format conversions.
-    
+
     @discussion
 		AudioConverters convert between various linear PCM and compressed
 		audio formats. Supported transformations include:
@@ -232,7 +232,7 @@ uses MacTypes,CoreAudioTypes;
 
 {!
     @header     AudioConverter.h
-    
+
 }
 
 //=============================================================================
@@ -270,7 +270,7 @@ type
     @enum       AudioConverterPropertyID
     @abstract   The properties of an AudioConverter, accessible via AudioConverterGetProperty()
                 and AudioConverterSetProperty().
-    
+
     @constant   kAudioConverterPropertyMinimumInputBufferSize
                     a UInt32 that indicates the size in bytes of the smallest buffer of input
                     data that can be supplied via the AudioConverterInputProc or as the input to
@@ -282,7 +282,7 @@ type
     @constant   kAudioConverterPropertyMaximumInputBufferSize
                     DEPRECATED. The AudioConverter input proc may be passed any number of packets of data.
                     If fewer are packets are returned than required, then the input proc will be called again.
-                    If more packets are passed than required, they will remain in the client's buffer and be 
+                    If more packets are passed than required, they will remain in the client's buffer and be
                     consumed as needed.
     @constant   kAudioConverterPropertyMaximumInputPacketSize
                     a UInt32 that indicates the size in bytes of the largest single packet of
@@ -317,7 +317,7 @@ type
                     A UInt32 that specifies rendering quality of the sample rate converter (see
                     enum constants below)
     @constant   kAudioConverterSampleRateConverterInitialPhase
-                    A Float64 with value 0.0 <= x < 1.0 giving the initial subsample position of the 
+                    A Float64 with value 0.0 <= x < 1.0 giving the initial subsample position of the
                     sample rate converter.
     @constant   kAudioConverterCodecQuality
                     A UInt32 that specifies rendering quality of a codec (see enum constants
@@ -338,14 +338,14 @@ type
                     channels. When I > O, the first O inputs are routed to the first O outputs,
                     and the remaining puts discarded.  When O > I, the first I inputs are routed
                     to the first O outputs, and the remaining outputs are zeroed.
-                    
+
                     A simple example for splitting mono input to stereo output (instead of routing
                     the input to only the first output channel):
-                    
+
 <pre>
    // this should be as large as the number of output channels:
   SInt32 channelMap[2] = ( 0, 0 );
-  AudioConverterSetProperty(theConverter, kAudioConverterChannelMap, 
+  AudioConverterSetProperty(theConverter, kAudioConverterChannelMap,
     sizeof(channelMap), channelMap);
 </pre>
     @constant   kAudioConverterDecompressionMagicCookie
@@ -438,18 +438,18 @@ const
 	kAudioConverterCurrentInputStreamDescription = FourCharCode('acid');
 	kAudioConverterPropertySettings = FourCharCode('acps');
 	kAudioConverterPropertyBitDepthHint = FourCharCode('acbd');
-	kAudioConverterPropertyFormatList = FourCharCode('flst'); 
+	kAudioConverterPropertyFormatList = FourCharCode('flst');
 
 
 //=============================================================================
-//  
+//
 //=============================================================================
 
 {!
     @enum       Mac OS X AudioConverter Properties
 
     @constant   kAudioConverterPropertyDithering
-					A UInt32. Set to a value from the enum of dithering algorithms below. 
+					A UInt32. Set to a value from the enum of dithering algorithms below.
 					Zero means no dithering and is the default. (Mac OS X only.)
     @constant   kAudioConverterPropertyDitherBitDepth
 					A UInt32. Dither is applied at this bit depth.  (Mac OS X only.)
@@ -457,7 +457,7 @@ const
 }
 const
 	kAudioConverterPropertyDithering = FourCharCode('dith');
-	kAudioConverterPropertyDitherBitDepth = FourCharCode('dbit'); 
+	kAudioConverterPropertyDitherBitDepth = FourCharCode('dbit');
 
 {!
     @enum       Dithering algorithms
@@ -469,7 +469,7 @@ const
 }
 const
 	kDitherAlgorithm_TPDF = 1;
-	kDitherAlgorithm_NoiseShaping = 2; 
+	kDitherAlgorithm_NoiseShaping = 2;
 
 {!
     @enum       Quality constants
@@ -487,7 +487,7 @@ const
 	kAudioConverterQuality_High = $60;
 	kAudioConverterQuality_Medium = $40;
 	kAudioConverterQuality_Low = $20;
-	kAudioConverterQuality_Min = 0; 
+	kAudioConverterQuality_Min = 0;
 
 
 {!
@@ -512,7 +512,7 @@ const
 							MinimumPhase High   is similar to Mastering Low.
 						In general, MinimumPhase performs better than Normal and Mastering for the equivalent qualities listed above.
 						MinimumPhase High is several times faster than Mastering Low.
- 
+
 }
 const
 	kAudioConverterSampleRateConverterComplexity_Linear = FourCharCode('line');    // linear interpolation
@@ -525,7 +525,7 @@ const
     @enum       Prime method constants
 
     @abstract   Constants to be used with kAudioConverterPrimeMethod.
-    
+
     @constant   kConverterPrimeMethod_Pre
                     Primes with leading + trailing input frames.
     @constant   kConverterPrimeMethod_Normal
@@ -538,12 +538,12 @@ const
 const
 	kConverterPrimeMethod_Pre = 0;
 	kConverterPrimeMethod_Normal = 1;
-	kConverterPrimeMethod_None = 2; 
+	kConverterPrimeMethod_None = 2;
 
 {!
     @struct     AudioConverterPrimeInfo
     @abstract   Specifies priming information.
-    
+
     @field      leadingFrames
         Specifies the number of leading (previous) input frames, relative to the normal/desired
         start input frame, required by the converter to perform a high quality conversion. If
@@ -561,15 +561,15 @@ const
         kConverterPrimeMethod_None. If no more frames of input are available in the input stream
         (because, for example, the desired end frame is at the end of an audio file), then zero
         (silent) trailing frames will be synthesized for the client.
-            
+
     @discussion
         When using AudioConverterFillComplexBuffer() (either a single call or a series of calls), some
         conversions, particularly involving sample-rate conversion, ideally require a certain
         number of input frames previous to the normal start input frame and beyond the end of
         the last expected input frame in order to yield high-quality results.
-        
+
         These are expressed in the leadingFrames and trailingFrames members of the structure.
-        
+
         The very first call to AudioConverterFillComplexBuffer(), or first call after
         AudioConverterReset(), will request additional input frames beyond those normally
         expected in the input proc callback to fulfill this first AudioConverterFillComplexBuffer()
@@ -610,13 +610,13 @@ const
 	kAudioConverterErr_OperationNotSupported = $6F703F3F;  // 'op??', integer used because of trigraph
 	kAudioConverterErr_PropertyNotSupported = FourCharCode('prop');
 	kAudioConverterErr_InvalidInputSize = FourCharCode('insz');
-	kAudioConverterErr_InvalidOutputSize = FourCharCode('otsz'); 
+	kAudioConverterErr_InvalidOutputSize = FourCharCode('otsz');
         // e.g. byte size is not a multiple of the frame size
 	kAudioConverterErr_UnspecifiedError = FourCharCode('what');
 	kAudioConverterErr_BadPropertySizeError = FourCharCode('!siz');
 	kAudioConverterErr_RequiresPacketDescriptionsError = FourCharCode('!pkd');
 	kAudioConverterErr_InputSampleRateOutOfRange = FourCharCode('!isr');
-	kAudioConverterErr_OutputSampleRateOutOfRange = FourCharCode('!osr'); 
+	kAudioConverterErr_OutputSampleRateOutOfRange = FourCharCode('!osr');
 
 
 //=============================================================================
@@ -635,11 +635,11 @@ const
     @param      outAudioConverter
                     On successful return, points to a new AudioConverter instance.
     @result     An OSStatus result code.
-    
+
     @discussion
                 For a pair of linear PCM formats, the following conversions
                 are supported:
-                
+
                 <ul>
                 <li>addition and removal of channels, when the stream descriptions'
                 mChannelsPerFrame does not match. Channels may also be reordered and removed
@@ -655,7 +655,7 @@ const
                     <li>32 and 64-bit float, big- or little-endian.</li>
                     </ul>
                 </ul>
-                
+
                 Also, encoding and decoding between linear PCM and compressed formats is
                 supported. Functions in AudioToolbox/AudioFormat.h return information about the
                 supported formats. When using a codec, you can use any supported PCM format (as
@@ -682,7 +682,7 @@ function AudioConverterNew( const (*var*) inSourceFormat: AudioStreamBasicDescri
     @param      outAudioConverter
                     On successful return, points to a new AudioConverter instance.
     @result     An OSStatus result code.
-    
+
     @discussion
                 This function is identical to AudioConverterNew(), except that the client may
                 explicitly choose which codec to instantiate if there is more than one choice.
@@ -710,7 +710,7 @@ function AudioConverterDispose( inAudioConverter: AudioConverterRef ): OSStatus;
     @param      inAudioConverter
                     The AudioConverter to reset.
     @result     An OSStatus result code.
-    
+
     @discussion
                 Should be called whenever there is a discontinuity in the source audio stream
                 being provided to the converter. This will flush any internal buffers in the
@@ -748,7 +748,7 @@ function AudioConverterGetPropertyInfo( inAudioConverter: AudioConverterRef; inP
     @param      inPropertyID
                     The property to fetch.
     @param      ioPropertyDataSize
-                    On entry, the size of the memory pointed to by outPropertyData. On 
+                    On entry, the size of the memory pointed to by outPropertyData. On
                     successful exit, the size of the property value.
     @param      outPropertyData
                     On exit, the property value.
@@ -793,20 +793,20 @@ function AudioConverterSetProperty( inAudioConverter: AudioConverterRef; inPrope
     @param      inUserData
                     The inInputDataProcUserData parameter passed to AudioConverterFillBuffer().
     @result     An OSStatus result code.
-    
+
     @discussion
-                <b>NOTE:</b> This API is now deprecated, 
+                <b>NOTE:</b> This API is now deprecated,
                 use AudioConverterFillComplexBuffer instead.
 
                 This callback function supplies input to AudioConverterFillBuffer.
-                
+
                 The AudioConverter requests a minimum amount of data (*ioDataSize). The callback
                 may return any amount of data. If it is less than than the minimum, the callback
                 will simply be called again in the near future.
 
                 The callback supplies a pointer to a buffer of audio data. The callback is
                 responsible for not freeing or altering this buffer until it is called again.
-                
+
                 If the callback returns an error, it must return zero bytes of data.
                 AudioConverterFillBuffer will stop producing output and return whatever output
                 has already been produced to its caller, along with the error code. This
@@ -834,13 +834,13 @@ type
     @param      outOutputData
                     The buffer into which the converted data is written.
     @result     An OSStatus result code.
-    
+
     @discussion
-                <b>NOTE:</b> This API is now deprecated, 
+                <b>NOTE:</b> This API is now deprecated,
                 use AudioConverterFillComplexBuffer instead.
 
                 Produces a buffer of output data from an AudioConverter. The supplied input
-                callback function is called whenever necessary.             
+                callback function is called whenever necessary.
 }
 extern OSStatus
 AudioConverterFillBuffer(   AudioConverterRef               inAudioConverter,
@@ -848,7 +848,7 @@ AudioConverterFillBuffer(   AudioConverterRef               inAudioConverter,
                             void * __nullable               inInputDataProcUserData,
                             UInt32 *                        ioOutputDataSize,
                             void *                          outOutputData)
-                            
+
                                 API_DEPRECATED("no longer supported", macos(10.1, 10.5)) API_UNAVAILABLE(ios, watchos, tvos);
 *)
 //-----------------------------------------------------------------------------
@@ -901,10 +901,10 @@ function AudioConverterConvertBuffer( inAudioConverter: AudioConverterRef; inInp
     @param      inUserData
                     The inInputDataProcUserData parameter passed to AudioConverterFillComplexBuffer().
     @result     An OSStatus result code.
-    
+
     @discussion
                 This callback function supplies input to AudioConverterFillComplexBuffer.
-                
+
                 The AudioConverter requests a minimum number of packets (*ioNumberDataPackets).
                 The callback may return one or more packets. If this is less than the minimum,
                 the callback will simply be called again in the near future.

+ 170 - 170
packages/univint/src/AudioFile.pas

@@ -288,45 +288,45 @@ const
 	kAudioFile3GPType = FourCharCode('3gpp');
 	kAudioFile3GP2Type = FourCharCode('3gp2');
 	kAudioFileAMRType = FourCharCode('amrf');
-	kAudioFileFLACType = FourCharCode('flac'); 
+	kAudioFileFLACType = FourCharCode('flac');
 
 {!
     @enum AudioFile error codes
     @abstract   These are the error codes returned from the AudioFile API.
-    @constant   kAudioFileUnspecifiedError 
+    @constant   kAudioFileUnspecifiedError
 		An unspecified error has occurred.
-    @constant   kAudioFileUnsupportedFileTypeError 
+    @constant   kAudioFileUnsupportedFileTypeError
 		The file type is not supported.
-    @constant   kAudioFileUnsupportedDataFormatError 
+    @constant   kAudioFileUnsupportedDataFormatError
 		The data format is not supported by this file type.
-    @constant   kAudioFileUnsupportedPropertyError 
+    @constant   kAudioFileUnsupportedPropertyError
 		The property is not supported.
-    @constant   kAudioFileBadPropertySizeError 
+    @constant   kAudioFileBadPropertySizeError
 		The size of the property data was not correct.
-    @constant   kAudioFilePermissionsError 
+    @constant   kAudioFilePermissionsError
 		The operation violated the file permissions. For example, trying to write to a file opened with kAudioFileReadPermission.
-    @constant   kAudioFileNotOptimizedError 
-		There are chunks following the audio data chunk that prevent extending the audio data chunk. 
+    @constant   kAudioFileNotOptimizedError
+		There are chunks following the audio data chunk that prevent extending the audio data chunk.
 		The file must be optimized in order to write more audio data.
-    @constant   kAudioFileInvalidChunkError 
-		The chunk does not exist in the file or is not supported by the file. 
-    @constant   kAudioFileDoesNotAllow64BitDataSizeError 
-		The a file offset was too large for the file type. AIFF and WAVE have a 32 bit file size limit. 
-    @constant   kAudioFileInvalidPacketOffsetError 
-		A packet offset was past the end of the file, or not at the end of the file when writing a VBR format, 
-		or a corrupt packet size was read when building the packet table. 
-    @constant   kAudioFileInvalidFileError 
-		The file is malformed, or otherwise not a valid instance of an audio file of its type. 
-    @constant   kAudioFileOperationNotSupportedError 
-		The operation cannot be performed. For example, setting kAudioFilePropertyAudioDataByteCount to increase 
+    @constant   kAudioFileInvalidChunkError
+		The chunk does not exist in the file or is not supported by the file.
+    @constant   kAudioFileDoesNotAllow64BitDataSizeError
+		The a file offset was too large for the file type. AIFF and WAVE have a 32 bit file size limit.
+    @constant   kAudioFileInvalidPacketOffsetError
+		A packet offset was past the end of the file, or not at the end of the file when writing a VBR format,
+		or a corrupt packet size was read when building the packet table.
+    @constant   kAudioFileInvalidFileError
+		The file is malformed, or otherwise not a valid instance of an audio file of its type.
+    @constant   kAudioFileOperationNotSupportedError
+		The operation cannot be performed. For example, setting kAudioFilePropertyAudioDataByteCount to increase
 		the size of the audio data in a file is not a supported operation. Write the data instead.
-    @constant   kAudioFileNotOpenError 
+    @constant   kAudioFileNotOpenError
 		The file is closed.
-	@constant   kAudioFileEndOfFileError 
+	@constant   kAudioFileEndOfFileError
 		End of file.
-	@constant   kAudioFilePositionError 
+	@constant   kAudioFilePositionError
 		Invalid file position.
-	@constant   kAudioFileFileNotFoundError 
+	@constant   kAudioFileFileNotFoundError
 		File not found.
  }
 const
@@ -347,31 +347,31 @@ const
 	kAudioFileNotOpenError = -38;
 	kAudioFileEndOfFileError = -39;
 	kAudioFilePositionError = -40;
-	kAudioFileFileNotFoundError = -43; 
+	kAudioFileFileNotFoundError = -43;
 
 {!
     @enum AudioFileFlags
     @abstract   These are flags that can be used with the CreateURL API call
-    @constant   kAudioFileFlags_EraseFile 
+    @constant   kAudioFileFlags_EraseFile
 		If set, then the CreateURL call will erase the contents of an existing file
 		If not set, then the CreateURL call will fail if the file already exists
-    @constant   kAudioFileFlags_DontPageAlignAudioData 
-		Normally, newly created and optimized files will have padding added in order to page align 
-		the data to 4KB boundaries. This makes reading the data more efficient. 
+    @constant   kAudioFileFlags_DontPageAlignAudioData
+		Normally, newly created and optimized files will have padding added in order to page align
+		the data to 4KB boundaries. This makes reading the data more efficient.
 		When disk space is a concern, this flag can be set so that the padding will not be added.
 }
 type
 	AudioFileFlags = UInt32;
 const
 	kAudioFileFlags_EraseFile = 1;
-	kAudioFileFlags_DontPageAlignAudioData = 2; 
+	kAudioFileFlags_DontPageAlignAudioData = 2;
 
 type
 	AudioFilePermissions = SInt8;
 const
 	kAudioFileReadPermission = $01;
 	kAudioFileWritePermission = $02;
-	kAudioFileReadWritePermission = $03; 
+	kAudioFileReadWritePermission = $03;
 
 //=============================================================================
 //	Types specific to the Audio File API
@@ -407,7 +407,7 @@ const
 	kAudioFileLoopDirection_NoLooping = 0;
 	kAudioFileLoopDirection_Forward = 1;
 	kAudioFileLoopDirection_ForwardAndBackward = 2;
-	kAudioFileLoopDirection_Backward = 3; 
+	kAudioFileLoopDirection_Backward = 3;
 
 //=============================================================================
 //	Markers, Regions
@@ -439,7 +439,7 @@ type
     @constant   kAudioFileMarkerType_Generic		A generic marker. See CAFFile.h for marker types specific to CAF files.
 }
 const
-	kAudioFileMarkerType_Generic = 0; 
+	kAudioFileMarkerType_Generic = 0;
 
 
 {!
@@ -457,7 +457,7 @@ const
 type
 	AudioFileMarker = record
 		mFramePosition: Float64;
-	
+
 		mName: CFStringRef	{__nullable};
 		mMarkerID: SInt32;
 
@@ -489,9 +489,9 @@ type
 {!
     @function	NumBytesToNumAudioFileMarkers
     @abstract   Converts a size in bytes to the number of AudioFileMarkers that can be contained in that number of bytes.
-    @discussion This can be used for the kAudioFilePropertyMarkerList property when calculating the number of 
-				markers that will be returned. 
-    @param      inNumBytes 
+    @discussion This can be used for the kAudioFilePropertyMarkerList property when calculating the number of
+				markers that will be returned.
+    @param      inNumBytes
 					a number of bytes.
     @result     the number of AudioFileMarkers that can be contained in that number of bytes.
 }
@@ -504,9 +504,9 @@ inline;
 {!
     @function	NumAudioFileMarkersToNumBytes
     @abstract   Converts a number of AudioFileMarkers to a size in bytes.
-    @discussion This can be used for the kAudioFilePropertyMarkerList property when calculating the size required to 
-				contain a number of AudioFileMarkers. 
-    @param      inNumMarkers 
+    @discussion This can be used for the kAudioFilePropertyMarkerList property when calculating the size required to
+				contain a number of AudioFileMarkers.
+    @param      inNumMarkers
 					a number of AudioFileMarkers.
     @result     the size in bytes required to contain that number of AudioFileMarkers.
 }
@@ -519,8 +519,8 @@ inline;
 {!
     @enum		AudioFileRegionFlags
     @abstract   These are flags for an AudioFileRegion that specify a playback direction.
-    @discussion One or multiple of these flags can be set. For example, if both kAudioFileRegionFlag_LoopEnable and 
-				kAudioFileRegionFlag_PlayForward are set, then the region will play as a forward loop. If only 
+    @discussion One or multiple of these flags can be set. For example, if both kAudioFileRegionFlag_LoopEnable and
+				kAudioFileRegionFlag_PlayForward are set, then the region will play as a forward loop. If only
 				kAudioFileRegionFlag_PlayForward is set, then the region will be played forward once.
     @constant   kAudioFileRegionFlag_LoopEnable
 					If this flag is set, the region will be looped. One or both of the following must also be set.
@@ -534,22 +534,22 @@ type
 const
 	kAudioFileRegionFlag_LoopEnable = 1;
 	kAudioFileRegionFlag_PlayForward = 2;
-	kAudioFileRegionFlag_PlayBackward = 4; 
+	kAudioFileRegionFlag_PlayBackward = 4;
 
 {!
     @struct		AudioFileRegion
     @abstract   An AudioFileRegion specifies a segment of audio data.
     @discussion Generally a region consists of at least two markers marking the beginning and end of the segment.
 				There may also be other markers defining other meta information such as sync point.
-    @field      mRegionID 
+    @field      mRegionID
 					each region must have a unique ID.
-    @field      mName 
+    @field      mName
 					The name of the region.
-    @field      mFlags 
+    @field      mFlags
 					AudioFileRegionFlags.
-    @field      mNumberMarkers 
+    @field      mNumberMarkers
 					The number of markers in the mMarkers array.
-    @field      mMarkers 
+    @field      mMarkers
 					A variable length array of AudioFileMarkers.
 }
 type
@@ -572,7 +572,7 @@ type
     @field      mNumberRegions
 					The number of regions in the mRegions list.
     @field      mRegions
-					A list of AudioFileRegions. Note that AudioFileMarkers are variable length, so this list cannot 
+					A list of AudioFileRegions. Note that AudioFileMarkers are variable length, so this list cannot
 					be accessed as an array. Use the NextAudioFileRegion macro for traversing the list instead.
 }
 type
@@ -586,11 +586,11 @@ type
 {!
     @function	NextAudioFileRegion
     @abstract   convenience macro for traversing the region list.
-    @discussion because AudioFileRegions are variable length, you cannot access them as an array. Use NextAudioFileRegion 
+    @discussion because AudioFileRegions are variable length, you cannot access them as an array. Use NextAudioFileRegion
 				to walk the list.
-    @param      inAFRegionPtr 
+    @param      inAFRegionPtr
 					a pointer to the current region.
-    @result     a pointer to the region after the current region. This does not protect you from walking off the end of the list, 
+    @result     a pointer to the region after the current region. This does not protect you from walking off the end of the list,
 				so obey mNumberRegions.
 }
 
@@ -618,17 +618,17 @@ type
 
 {!
     @enum		AudioBytePacketTranslation Flags
-	
+
     @abstract   flags for the AudioBytePacketTranslation mFlags field
     @discussion		There is currently only one flag.
-					
+
     @constant   kBytePacketTranslationFlag_IsEstimate
 					If the set then the result value is an estimate.
 }
 type
 	AudioBytePacketTranslationFlags = UInt32;
 const
-	kBytePacketTranslationFlag_IsEstimate = 1; 
+	kBytePacketTranslationFlag_IsEstimate = 1;
 
 {!
     @struct		AudioBytePacketTranslation
@@ -652,12 +652,12 @@ type
 {!
     @struct		AudioFilePacketTableInfo
     @abstract   This contains information about the number of valid frames in a file and where they begin and end.
-    @discussion	Some data formats may have packets whose contents are not completely valid, but represent priming or remainder 
+    @discussion	Some data formats may have packets whose contents are not completely valid, but represent priming or remainder
 				frames that are not meant to be played. For example a file with 100 packets of AAC is nominally 1024 * 100 = 102400 frames
-				of data. However the first 2112 frames of that may be priming frames and there may be some 
-				number of remainder frames added to pad out to a full packet of 1024 frames. The priming and remainder frames should be 
-				discarded. The total number of packets in the file times the frames per packet (or counting each packet's frames 
-				individually for a variable frames per packet format) minus mPrimingFrames, minus mRemainderFrames, should 
+				of data. However the first 2112 frames of that may be priming frames and there may be some
+				number of remainder frames added to pad out to a full packet of 1024 frames. The priming and remainder frames should be
+				discarded. The total number of packets in the file times the frames per packet (or counting each packet's frames
+				individually for a variable frames per packet format) minus mPrimingFrames, minus mRemainderFrames, should
 				equal mNumberValidFrames.
     @field      mNumberValidFrames the number of valid frames in the file.
     @field      mPrimingFrames the number of invalid frames at the beginning of the file.
@@ -730,13 +730,13 @@ const
     @function	AudioFileCreateWithURL
     @abstract   creates a new audio file (or initialises an existing file)
     @discussion	creates a new (or initialises an existing) audio file specified by the URL.
-					Upon success, an AudioFileID is returned which can be used for subsequent calls 
+					Upon success, an AudioFileID is returned which can be used for subsequent calls
 					to the AudioFile APIs.
     @param inFileRef		an CFURLRef fully specifying the path of the file to create/initialise
     @param inFileType		an AudioFileTypeID indicating the type of audio file to create.
     @param inFormat			an AudioStreamBasicDescription describing the data format that will be
 							added to the audio file.
-    @param inFlags			relevant flags for creating/opening the file. 
+    @param inFlags			relevant flags for creating/opening the file.
 								if kAudioFileFlags_EraseFile is set, it will erase an existing file
 								 if not set, then the Create call will fail if the URL is an existing file
     @param outAudioFile		if successful, an AudioFileID that can be used for subsequent AudioFile calls.
@@ -752,7 +752,7 @@ function AudioFileCreateWithURL( inFileRef: CFURLRef; inFileType: AudioFileTypeI
     @param inFileRef		the CFURLRef of an existing audio file.
     @param inPermissions	use the permission constants
     @param inFileTypeHint	For files which have no filename extension and whose type cannot be easily or
-							uniquely determined from the data (ADTS,AC3), this hint can be used to indicate the file type. 
+							uniquely determined from the data (ADTS,AC3), this hint can be used to indicate the file type.
 							Otherwise you can pass zero for this. The hint is only used on OS versions 10.3.1 or greater.
 							For OS versions prior to that, opening files of the above description will fail.
     @param outAudioFile		upon success, an AudioFileID that can be used for subsequent
@@ -789,11 +789,11 @@ type
 }
 type
 	AudioFile_WriteProc = function( inClientData: UnivPtr; inPosition: SInt64; requestCount: UInt32; buffer: {const} UnivPtr; var actualCount: UInt32 ): OSStatus;
-								
+
 {!
     @typedef	AudioFile_GetSizeProc
     @abstract   A callback for getting the size of the file data. used with AudioFileOpenWithCallbacks or AudioFileInitializeWithCallbacks.
-    @discussion a function that will be called when AudioFile needs to determine the size of the file data. This size is for all of the 
+    @discussion a function that will be called when AudioFile needs to determine the size of the file data. This size is for all of the
 				data in the file, not just the audio data.
     @param      inClientData	A pointer to the client data as set in the inClientData parameter to AudioFileXXXWithCallbacks.
     @result						The callback should return the size of the data.
@@ -804,7 +804,7 @@ type
 {!
     @typedef	AudioFile_SetSizeProc
     @abstract   A callback for setting the size of the file data. used with AudioFileOpenWithCallbacks or AudioFileInitializeWithCallbacks.
-    @discussion a function that will be called when AudioFile needs to set the size of the file data. This size is for all of the 
+    @discussion a function that will be called when AudioFile needs to set the size of the file data. This size is for all of the
 				data in the file, not just the audio data. This will only be called if the file is written to.
     @param      inClientData	A pointer to the client data as set in the inClientData parameter to AudioFileXXXWithCallbacks.
     @result						The callback should return the size of the data.
@@ -821,8 +821,8 @@ type
 	@param inWriteFunc		a function that will be called when AudioFile needs to write data.
 	@param inGetSizeFunc	a function that will be called when AudioFile needs to know the file size.
 	@param inSetSizeFunc	a function that will be called when AudioFile needs to set the file size.
-	
-    @param inFileType 		an AudioFileTypeID indicating the type of audio file to which to initialize the file. 
+
+    @param inFileType 		an AudioFileTypeID indicating the type of audio file to which to initialize the file.
     @param inFormat 		an AudioStreamBasicDescription describing the data format that will be
 							added to the audio file.
     @param inFlags			flags for creating/opening the file. Currently zero.
@@ -843,9 +843,9 @@ function AudioFileInitializeWithCallbacks( inClientData: UnivPtr; inReadFunc: Au
 	@param inWriteFunc					a function that will be called when AudioFile needs to write data.
 	@param inGetSizeFunc				a function that will be called when AudioFile needs to know the total file size.
 	@param inSetSizeFunc				a function that will be called when AudioFile needs to set the file size.
-	
+
     @param inFileTypeHint	For files which have no filename extension and whose type cannot be easily or
-							uniquely determined from the data (ADTS,AC3), this hint can be used to indicate the file type. 
+							uniquely determined from the data (ADTS,AC3), this hint can be used to indicate the file type.
 							Otherwise you can pass zero for this. The hint is only used on OS versions 10.3.1 or greater.
 							For OS versions prior to that, opening files of the above description will fail.
     @param outAudioFile		upon success, an AudioFileID that can be used for subsequent
@@ -854,7 +854,7 @@ function AudioFileInitializeWithCallbacks( inClientData: UnivPtr; inReadFunc: Au
 }
 function AudioFileOpenWithCallbacks( inClientData: UnivPtr; inReadFunc: AudioFile_ReadProc; inWriteFunc: AudioFile_WriteProc {__nullable}; inGetSizeFunc: AudioFile_GetSizeProc; inSetSizeFunc: AudioFile_SetSizeProc {__nullable}; inFileTypeHint: AudioFileTypeID; var outAudioFile: AudioFileID {__nullable * __nonnull} ): OSStatus; external name '_AudioFileOpenWithCallbacks';
 (* API_AVAILABLE(macos(10.3), ios(2.0), watchos(2.0), tvos(9.0)) *)
-				
+
 
 {!
     @function	AudioFileClose
@@ -868,12 +868,12 @@ function AudioFileClose( inAudioFile: AudioFileID ): OSStatus; external name '_A
 {!
     @function	AudioFileOptimize
     @abstract   Move the audio data to the end of the file and other internal optimizations of the file structure.
-	@discussion			Optimize the file so additional audio data can be appended to 
-                        the existing data. Generally, this will place the audio data at 
-                        the end of the file so additional writes can be placed to the 
-                        file end. This can be a potentially expensive and time-consuming operation 
-                        and should not be used during time critical operations. There is 
-                        a kAudioFilePropertyIsOptimized property for checking on the optimized state 
+	@discussion			Optimize the file so additional audio data can be appended to
+                        the existing data. Generally, this will place the audio data at
+                        the end of the file so additional writes can be placed to the
+                        file end. This can be a potentially expensive and time-consuming operation
+                        and should not be used during time critical operations. There is
+                        a kAudioFilePropertyIsOptimized property for checking on the optimized state
                         of the file.
     @param      inAudioFile		an AudioFileID.
     @result						returns noErr if successful.
@@ -883,15 +883,15 @@ function AudioFileOptimize( inAudioFile: AudioFileID ): OSStatus; external name
 
 {!
     @function	AudioFileReadBytes
-    @abstract   Read bytes of audio data from the audio file. 
-				
+    @abstract   Read bytes of audio data from the audio file.
+
     @discussion				Returns kAudioFileEndOfFileError when read encounters end of file.
     @param inAudioFile		an AudioFileID.
     @param inUseCache 		true if it is desired to cache the data upon read, else false
     @param inStartingByte	the byte offset of the audio data desired to be returned
     @param ioNumBytes 		on input, the number of bytes to read, on output, the number of
 							bytes actually read.
-    @param outBuffer 		outBuffer should be a void * to user allocated memory large enough for the requested bytes. 
+    @param outBuffer 		outBuffer should be a void * to user allocated memory large enough for the requested bytes.
     @result					returns noErr if successful.
 }
 function AudioFileReadBytes( inAudioFile: AudioFileID; inUseCache: Boolean; inStartingByte: SInt64; var ioNumBytes: UInt32; outBuffer: UnivPtr ): OSStatus; external name '_AudioFileReadBytes';
@@ -905,7 +905,7 @@ function AudioFileReadBytes( inAudioFile: AudioFileID; inUseCache: Boolean; inSt
     @param inStartingByte	the byte offset where the audio data should be written
     @param ioNumBytes 		on input, the number of bytes to write, on output, the number of
 							bytes actually written.
-    @param inBuffer 		inBuffer should be a void * containing the bytes to be written 
+    @param inBuffer 		inBuffer should be a void * containing the bytes to be written
     @result					returns noErr if successful.
 }
 function AudioFileWriteBytes( inAudioFile: AudioFileID; inUseCache: Boolean; inStartingByte: SInt64; var ioNumBytes: UInt32; inBuffer: {const} UnivPtr ): OSStatus; external name '_AudioFileWriteBytes';
@@ -917,22 +917,22 @@ function AudioFileWriteBytes( inAudioFile: AudioFileID; inUseCache: Boolean; inS
     @discussion AudioFileReadPacketData reads as many of the requested number of packets
 				as will fit in the buffer size given by ioNumPackets.
 				Unlike the deprecated AudioFileReadPackets, ioNumPackets must be initialized.
-				If the byte size of the number packets requested is 
+				If the byte size of the number packets requested is
 				less than the buffer size, ioNumBytes will be reduced.
-				If the buffer is too small for the number of packets 
-				requested, ioNumPackets and ioNumBytes will be reduced 
+				If the buffer is too small for the number of packets
+				requested, ioNumPackets and ioNumBytes will be reduced
 				to the number of packets that can be accommodated and their byte size.
 				Returns kAudioFileEndOfFileError when read encounters end of file.
 				For all uncompressed formats, packets == frames.
 
     @param inAudioFile				an AudioFileID.
     @param inUseCache 				true if it is desired to cache the data upon read, else false
-    @param ioNumBytes				on input the size of outBuffer in bytes. 
+    @param ioNumBytes				on input the size of outBuffer in bytes.
 									on output, the number of bytes actually returned.
-    @param outPacketDescriptions 	An array of packet descriptions describing the packets being returned. 
-									The size of the array must be greater or equal to the number of packets requested. 
+    @param outPacketDescriptions 	An array of packet descriptions describing the packets being returned.
+									The size of the array must be greater or equal to the number of packets requested.
 									On return the packet description will be filled out with the packet offsets and sizes.
-									Packet descriptions are ignored for CBR data.   
+									Packet descriptions are ignored for CBR data.
     @param inStartingPacket 		The packet index of the first packet desired to be returned
     @param ioNumPackets 			on input, the number of packets to read, on output, the number of
 									packets actually read.
@@ -949,19 +949,19 @@ function AudioFileReadPacketData( inAudioFile: AudioFileID; inUseCache: Boolean;
 				READ THE HEADER DOC FOR AudioFileReadPacketData. It is not a drop-in replacement.
 				In particular, for AudioFileReadPacketData ioNumBytes must be initialized to the buffer size.
 				AudioFileReadPackets assumes you have allocated your buffer to ioNumPackets times the maximum packet size.
-				For many compressed formats this will only use a portion of the buffer since the ratio of the maximum 
+				For many compressed formats this will only use a portion of the buffer since the ratio of the maximum
 				packet size to the typical packet size can be large. Use AudioFileReadPacketData instead.
-	
+
     @param inAudioFile				an AudioFileID.
     @param inUseCache 				true if it is desired to cache the data upon read, else false
     @param outNumBytes				on output, the number of bytes actually returned
     @param outPacketDescriptions 	on output, an array of packet descriptions describing
 									the packets being returned. NULL may be passed for this
-									parameter. Nothing will be returned for linear pcm data.   
+									parameter. Nothing will be returned for linear pcm data.
     @param inStartingPacket 		the packet index of the first packet desired to be returned
     @param ioNumPackets 			on input, the number of packets to read, on output, the number of
 									packets actually read.
-    @param outBuffer 				outBuffer should be a pointer to user allocated memory of size: 
+    @param outBuffer 				outBuffer should be a pointer to user allocated memory of size:
 									number of packets requested times file's maximum (or upper bound on)
 									packet size.
     @result							returns noErr if successful.
@@ -977,9 +977,9 @@ function AudioFileReadPackets (	inAudioFile: AudioFileID; inUseCache: Boolean; v
     @param inAudioFile				an AudioFileID.
     @param inUseCache 				true if it is desired to cache the data upon write, else false
     @param inNumBytes				the number of bytes being provided for write
-    @param inPacketDescriptions 	an array of packet descriptions describing the packets being 
-									provided. Not all formats require packet descriptions to be 
-									provided. NULL may be passed if no descriptions are required.   
+    @param inPacketDescriptions 	an array of packet descriptions describing the packets being
+									provided. Not all formats require packet descriptions to be
+									provided. NULL may be passed if no descriptions are required.
     @param inStartingPacket 		the packet index of where the first packet provided should be placed.
     @param ioNumPackets 			on input, the number of packets to write, on output, the number of
 									packets actually written.
@@ -993,7 +993,7 @@ function AudioFileWritePackets( inAudioFile: AudioFileID; inUseCache: Boolean; i
 {!
     @function	AudioFileCountUserData
     @abstract   Get the number of user data items with a certain ID in the file
-    @discussion		"User Data" refers to chunks in AIFF, CAF and WAVE files, or resources 
+    @discussion		"User Data" refers to chunks in AIFF, CAF and WAVE files, or resources
 					in Sound Designer II files, and possibly other things in other files.
 					For simplicity, referred to below as "chunks".
     @param      inAudioFile			an AudioFileID.
@@ -1022,7 +1022,7 @@ function AudioFileGetUserDataSize( inAudioFile: AudioFileID; inUserDataID: UInt3
     @param      inAudioFile			an AudioFileID.
     @param      inUserDataID		the four AnsiChar code of the chunk.
     @param      inIndex				an index specifying which chunk if there are more than one.
-	@param		ioUserDataSize		the size of the buffer on input, size of bytes copied to buffer on output 
+	@param		ioUserDataSize		the size of the buffer on input, size of bytes copied to buffer on output
     @param      outUserData			a pointer to a buffer in which to copy the chunk data.
     @result							returns noErr if successful.
 }
@@ -1035,8 +1035,8 @@ function AudioFileGetUserData( inAudioFile: AudioFileID; inUserDataID: UInt32; i
     @param      inAudioFile			an AudioFileID.
     @param      inUserDataID		the four AnsiChar code of the chunk.
     @param      inIndex				an index specifying which chunk if there are more than one.
-	@param		inUserDataSize		on input the size of the data to copy, on output, size of bytes copied from the buffer  
-    @param      inUserData			a pointer to a buffer from which to copy the chunk data 
+	@param		inUserDataSize		on input the size of the data to copy, on output, size of bytes copied from the buffer
+    @param      inUserData			a pointer to a buffer from which to copy the chunk data
 									(only the contents of the chunk, not including the chunk header).
     @result							returns noErr if successful.
 }
@@ -1064,72 +1064,72 @@ function AudioFileRemoveUserData( inAudioFile: AudioFileID; inUserDataID: UInt32
 {!
     @enum		Audio File Properties
     @abstract   constants for AudioFile get/set property calls
-    @constant   kAudioFilePropertyFileFormat 
+    @constant   kAudioFilePropertyFileFormat
 					An AudioFileTypeID that identifies the format of the file
-    @constant   kAudioFilePropertyDataFormat 
+    @constant   kAudioFilePropertyDataFormat
 					An AudioStreamBasicDescription describing the format of the audio data
-    @constant   kAudioFilePropertyFormatList 
-					In order to support formats such as AAC SBR where an encoded data stream can be decoded to 
+    @constant   kAudioFilePropertyFormatList
+					In order to support formats such as AAC SBR where an encoded data stream can be decoded to
 					multiple destination formats, this property returns an array of AudioFormatListItems (see AudioFormat.h) of those formats.
-					The default behavior is to return the an AudioFormatListItem that has the same AudioStreamBasicDescription 
+					The default behavior is to return the an AudioFormatListItem that has the same AudioStreamBasicDescription
 					that kAudioFilePropertyDataFormat returns.
-    @constant   kAudioFilePropertyIsOptimized 
+    @constant   kAudioFilePropertyIsOptimized
 					A UInt32 indicating whether an Audio File has been optimized.
-					Optimized means it is ready to start having sound data written to it. 
+					Optimized means it is ready to start having sound data written to it.
 					A value of 0 indicates the file needs to be optimized.
 					A value of 1 indicates the file is currently optimized.
-    @constant   kAudioFilePropertyMagicCookieData 
+    @constant   kAudioFilePropertyMagicCookieData
 					A void * pointing to memory set up by the caller.
 					Some file types require that a magic cookie be provided before packets can be written
-					to the file, so this property should be set before calling 
+					to the file, so this property should be set before calling
 					AudioFileWriteBytes()/AudioFileWritePackets() if a magic cookie exists.
-    @constant   kAudioFilePropertyAudioDataByteCount 
+    @constant   kAudioFilePropertyAudioDataByteCount
 					a UInt64 that indicates the number of bytes of audio data contained in the file
-    @constant   kAudioFilePropertyAudioDataPacketCount 
+    @constant   kAudioFilePropertyAudioDataPacketCount
 					a UInt64 that indicates the number of packets of audio data contained in the file
-    @constant   kAudioFilePropertyMaximumPacketSize 
+    @constant   kAudioFilePropertyMaximumPacketSize
 					a UInt32 that indicates the maximum size of a packet for the data contained in the file
-    @constant   kAudioFilePropertyDataOffset 
+    @constant   kAudioFilePropertyDataOffset
 					a SInt64 that indicates the byte offset in the file of the audio data.
-    @constant   kAudioFilePropertyChannelLayout 
+    @constant   kAudioFilePropertyChannelLayout
 					An AudioChannelLayout struct.
-    @constant   kAudioFilePropertyDeferSizeUpdates 
-					A UInt32. If 1, then updating the files sizes in the header is not done for every write, 
+    @constant   kAudioFilePropertyDeferSizeUpdates
+					A UInt32. If 1, then updating the files sizes in the header is not done for every write,
 					but deferred until the file is read, optimized or closed. This is more efficient, but less safe
 					since, if the application crashes before the size is updated, the file may not be readable.
 					The default value is one, it doesn't update the header.
-    @constant   kAudioFilePropertyDataFormatName 
+    @constant   kAudioFilePropertyDataFormatName
 					This is deprecated. Use kAudioFormatProperty_FormatName in AudioFormat.h instead.
-    @constant   kAudioFilePropertyMarkerList 
+    @constant   kAudioFilePropertyMarkerList
 					access the list of markers defined in the file. returns an AudioFileMarkerList.
 					The CFStringRefs in the returned structs must be released by the client.
 					(available in 10.2.4 and later)
-    @constant   kAudioFilePropertyRegionList 
+    @constant   kAudioFilePropertyRegionList
 					access the list of regions defined in the file. returns an Array of AudioFileRegions.
 					The CFStringRefs in the returned structs must be released by the client.
 					(available in 10.2.4 and later)
-    @constant   kAudioFilePropertyPacketToFrame 
+    @constant   kAudioFilePropertyPacketToFrame
 					pass a AudioFramePacketTranslation with mPacket filled out and get mFrame back. mFrameOffsetInPacket is ignored.
-    @constant   kAudioFilePropertyFrameToPacket 
+    @constant   kAudioFilePropertyFrameToPacket
 					pass a AudioFramePacketTranslation with mFrame filled out and get mPacket and mFrameOffsetInPacket back.
-					
+
 	@constant	kAudioFilePropertyPacketToByte
 					pass an AudioBytePacketTranslation struct with mPacket filled out and get mByte back.
-					mByteOffsetInPacket is ignored. If the mByte value is an estimate then 
+					mByteOffsetInPacket is ignored. If the mByte value is an estimate then
 					kBytePacketTranslationFlag_IsEstimate will be set in the mFlags field.
 	@constant	kAudioFilePropertyByteToPacket
 					pass an AudioBytePacketTranslation struct with mByte filled out and get mPacket and
-					mByteOffsetInPacket back. If the mPacket value is an estimate then 
+					mByteOffsetInPacket back. If the mPacket value is an estimate then
 					kBytePacketTranslationFlag_IsEstimate will be set in the mFlags field.
-					
-    @constant   kAudioFilePropertyChunkIDs 
+
+    @constant   kAudioFilePropertyChunkIDs
 					returns an array of OSType four AnsiChar codes for each kind of chunk in the file.
-    @constant   kAudioFilePropertyInfoDictionary 
-					returns a CFDictionary filled with information about the data contained in the file. 
-					See dictionary key constants already defined for info string types. 
+    @constant   kAudioFilePropertyInfoDictionary
+					returns a CFDictionary filled with information about the data contained in the file.
+					See dictionary key constants already defined for info string types.
 					AudioFileComponents are free to add keys to the dictionaries that they return for this property...
 					caller is responsible for releasing the CFObject
-    @constant   kAudioFilePropertyPacketTableInfo 
+    @constant   kAudioFilePropertyPacketTableInfo
 					Gets or sets an AudioFilePacketTableInfo struct for the file types that support it.
 					When setting, the sum of mNumberValidFrames, mPrimingFrames and mRemainderFrames must be the same as the total
 					number of frames in all packets. If not you will get a kAudio_ParamError. The best way to ensure this is to get the value of
@@ -1139,23 +1139,23 @@ function AudioFileRemoveUserData( inAudioFile: AudioFileID; inUserDataID: UInt32
 					the whole file to find the largest packet, as may happen with kAudioFilePropertyMaximumPacketSize).
 	@constant	kAudioFilePropertyReserveDuration
 					The value is a Float64 of the duration in seconds of data that is expected to be written.
-					Setting this property before any data has been written reserves space in the file header for a packet table 
-					and/or other information so that it can appear before the audio data. Otherwise the packet table may get written at the 
+					Setting this property before any data has been written reserves space in the file header for a packet table
+					and/or other information so that it can appear before the audio data. Otherwise the packet table may get written at the
 					end of the file, preventing the file from being streamable.
 	@constant	kAudioFilePropertyEstimatedDuration
 					The value is a Float64 representing an estimated duration in seconds. If duration can be calculated without scanning the entire file,
-					or all the audio data packets have been scanned, the value will accurately reflect the duration of the audio data. 
+					or all the audio data packets have been scanned, the value will accurately reflect the duration of the audio data.
 	@constant	kAudioFilePropertyBitRate
 					Returns the bit rate for the audio data as a UInt32. For some formats this will be approximate.
 	@constant	kAudioFilePropertyID3Tag
 					A void * pointing to memory set up by the caller to contain a fully formatted ID3 tag (get/set v2.2, v2.3, or v2.4, v1 get only).
-					The ID3 tag is not manipulated in anyway either for read or write. 
+					The ID3 tag is not manipulated in anyway either for read or write.
 					When setting, this property must be called before calling AudioFileWritePackets.
 	@constant	kAudioFilePropertySourceBitDepth
 					For encoded data this property returns the bit depth of the source as an SInt32, if known.
 					The bit depth is expressed as a negative number if the source was floating point, e.g. -32 for float, -64 for double.
 	@constant	kAudioFilePropertyAlbumArtwork
-					returns a CFDataRef filled with the Album Art or NULL. 
+					returns a CFDataRef filled with the Album Art or NULL.
 					The caller is responsible for releasing a non-NULL CFDataRef.
 					In order to parse the contents of the data, CGImageSourceCreateWithData may be used.
     @constant	kAudioFilePropertyAudioTrackCount
@@ -1193,7 +1193,7 @@ const
 	kAudioFilePropertySourceBitDepth = FourCharCode('sbtd');
 	kAudioFilePropertyAlbumArtwork = FourCharCode('aart');
 	kAudioFilePropertyAudioTrackCount = FourCharCode('atct');
-	kAudioFilePropertyUseAudioTrack = FourCharCode('uatk'); 
+	kAudioFilePropertyUseAudioTrack = FourCharCode('uatk');
 
 
 {!
@@ -1201,14 +1201,14 @@ const
     @abstract   Get information about the size of a property of an AudioFile  and whether it can be set.
     @param      inAudioFile			an AudioFileID.
     @param      inPropertyID		an AudioFileProperty constant.
-    @param      outDataSize			the size in bytes of the current value of the property. In order to get the property value, 
+    @param      outDataSize			the size in bytes of the current value of the property. In order to get the property value,
 									you will need a buffer of this size.
     @param      isWritable			will be set to 1 if writable, or 0 if read only.
     @result							returns noErr if successful.
 }
 function AudioFileGetPropertyInfo( inAudioFile: AudioFileID; inPropertyID: AudioFilePropertyID; outDataSize: UInt32Ptr {__nullable}; isWritable: UInt32Ptr {__nullable} ): OSStatus; external name '_AudioFileGetPropertyInfo';
 (* API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0)) *)
-                                
+
 {!
     @function	AudioFileGetProperty
     @abstract   Copies the value for a property of an AudioFile into a buffer.
@@ -1220,7 +1220,7 @@ function AudioFileGetPropertyInfo( inAudioFile: AudioFileID; inPropertyID: Audio
 }
 function AudioFileGetProperty( inAudioFile: AudioFileID; inPropertyID: AudioFilePropertyID; var ioDataSize: UInt32; outPropertyData: UnivPtr ): OSStatus; external name '_AudioFileGetProperty';
 (* API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0)) *)
-                        
+
 {!
     @function	AudioFileSetProperty
     @abstract   Sets the value for a property of an AudioFile .
@@ -1243,29 +1243,29 @@ function AudioFileSetProperty( inAudioFile: AudioFileID; inPropertyID: AudioFile
     @abstract   constants for AudioFileGetGlobalInfo properties
     @constant   kAudioFileGlobalInfo_ReadableTypes
 					No specifier needed. Must be set to NULL.
-					Returns an array of UInt32 containing the file types 
+					Returns an array of UInt32 containing the file types
 					(i.e. AIFF, WAVE, etc) that can be opened for reading.
     @constant   kAudioFileGlobalInfo_WritableTypes
 					No specifier needed. Must be set to NULL.
-					Returns an array of UInt32 containing the file types 
+					Returns an array of UInt32 containing the file types
 					(i.e. AIFF, WAVE, etc) that can be opened for writing.
     @constant   kAudioFileGlobalInfo_FileTypeName
 					Specifier is a pointer to a AudioFileTypeID containing a file type.
-					Returns a CFString containing the name for the file type. 
+					Returns a CFString containing the name for the file type.
     @constant   kAudioFileGlobalInfo_AvailableFormatIDs
 					Specifier is a pointer to a AudioFileTypeID containing a file type.
-					Returns a array of format IDs for formats that can be read. 
+					Returns a array of format IDs for formats that can be read.
     @constant   kAudioFileGlobalInfo_AvailableStreamDescriptionsForFormat
 					Specifier is a pointer to a AudioFileTypeAndFormatID struct defined below.
-					Returns an array of AudioStreamBasicDescriptions which have all of the 
+					Returns an array of AudioStreamBasicDescriptions which have all of the
 					formats for a particular file type and format ID. The AudioStreamBasicDescriptions
 					have the following fields filled in: mFormatID, mFormatFlags, mBitsPerChannel
 					writing new files.
-					
-					
+
+
     @constant   kAudioFileGlobalInfo_AllExtensions
 					No specifier needed. Must be set to NULL.
-					Returns a CFArray of CFStrings containing all file extensions 
+					Returns a CFArray of CFStrings containing all file extensions
 					that are recognized. The array be used when creating an NSOpenPanel.
 
     @constant   kAudioFileGlobalInfo_AllHFSTypeCodes
@@ -1276,20 +1276,20 @@ function AudioFileSetProperty( inAudioFile: AudioFileID; inPropertyID: AudioFile
     @constant   kAudioFileGlobalInfo_AllUTIs
 					No specifier needed. Must be set to NULL.
 					Returns a CFArray of CFString of all Universal Type Identifiers
-					that are recognized by AudioFile. 
+					that are recognized by AudioFile.
 					The caller is responsible for releasing the CFArray.
 
     @constant   kAudioFileGlobalInfo_AllMIMETypes
 					No specifier needed. Must be set to NULL.
 					Returns a CFArray of CFString of all MIME types
-					that are recognized by AudioFile. 
+					that are recognized by AudioFile.
 					The caller is responsible for releasing the CFArray.
 
 
     @constant   kAudioFileGlobalInfo_ExtensionsForType
 					Specifier is a pointer to a AudioFileTypeID containing a file type.
-					Returns a CFArray of CFStrings containing the file extensions 
-					that are recognized for this file type. 
+					Returns a CFArray of CFStrings containing the file extensions
+					that are recognized for this file type.
 
     @constant   kAudioFileGlobalInfo_HFSTypeCodesForType
 					Specifier is a pointer to an AudioFileTypeID.
@@ -1299,32 +1299,32 @@ function AudioFileSetProperty( inAudioFile: AudioFileID; inPropertyID: AudioFile
     @constant   kAudioFileGlobalInfo_UTIsForType
 					Specifier is a pointer to an AudioFileTypeID.
 					Returns a CFArray of CFString of all Universal Type Identifiers
-					that are recognized by the file type. 
+					that are recognized by the file type.
 					The caller is responsible for releasing the CFArray.
 
     @constant   kAudioFileGlobalInfo_MIMETypesForType
 					Specifier is a pointer to an AudioFileTypeID.
 					Returns a CFArray of CFString of all MIME types
-					that are recognized by the file type. 
+					that are recognized by the file type.
 					The caller is responsible for releasing the CFArray.
 
 	these are inverses of the above:
 
     @constant   kAudioFileGlobalInfo_TypesForExtension
 					Specifier is a CFStringRef containing a file extension.
-					Returns an array of all AudioFileTypeIDs that support the extension. 
-	
+					Returns an array of all AudioFileTypeIDs that support the extension.
+
     @constant   kAudioFileGlobalInfo_TypesForHFSTypeCode
 					Specifier is an HFSTypeCode.
-					Returns an array of all AudioFileTypeIDs that support the HFSTypeCode. 
+					Returns an array of all AudioFileTypeIDs that support the HFSTypeCode.
 
     @constant   kAudioFileGlobalInfo_TypesForUTI
 					Specifier is a CFStringRef containing a Universal Type Identifier.
-					Returns an array of all AudioFileTypeIDs that support the UTI. 
+					Returns an array of all AudioFileTypeIDs that support the UTI.
 
     @constant   kAudioFileGlobalInfo_TypesForMIMEType
 					Specifier is a CFStringRef containing a MIME Type.
-					Returns an array of all AudioFileTypeIDs that support the MIME type. 
+					Returns an array of all AudioFileTypeIDs that support the MIME type.
 
 }
 const
@@ -1344,7 +1344,7 @@ const
 	kAudioFileGlobalInfo_TypesForMIMEType = FourCharCode('tmim');
 	kAudioFileGlobalInfo_TypesForUTI = FourCharCode('tuti');
 	kAudioFileGlobalInfo_TypesForHFSTypeCode = FourCharCode('thfs');
-	kAudioFileGlobalInfo_TypesForExtension = FourCharCode('text'); 
+	kAudioFileGlobalInfo_TypesForExtension = FourCharCode('text');
 
 
 {!
@@ -1370,13 +1370,13 @@ type
     @param      inPropertyID		an AudioFileGlobalInfo property constant.
     @param      inSpecifierSize		The size of the specifier data.
     @param      inSpecifier			A specifier is a buffer of data used as an input argument to some of the global info properties.
-    @param      outDataSize			the size in bytes of the current value of the property. In order to get the property value, 
+    @param      outDataSize			the size in bytes of the current value of the property. In order to get the property value,
 									you will need a buffer of this size.
     @result							returns noErr if successful.
 }
 function AudioFileGetGlobalInfoSize( inPropertyID: AudioFilePropertyID; inSpecifierSize: UInt32; inSpecifier: UnivPtr {__nullable}; var outDataSize: UInt32 ): OSStatus; external name '_AudioFileGetGlobalInfoSize';
 (* API_AVAILABLE(macos(10.3), ios(2.0), watchos(2.0), tvos(9.0)) *)
-                                
+
 {!
     @function	AudioFileGetGlobalInfo
     @abstract   Copies the value for a global property into a buffer.
@@ -1392,12 +1392,12 @@ function AudioFileGetGlobalInfo( inPropertyID: AudioFilePropertyID; inSpecifierS
 
 //#pragma mark - Deprecated
 
-(*	
+(*
 struct FSRef;
 {!
     @function	AudioFileCreate
     @abstract   creates a new audio file
-    @discussion	creates a new audio file located in the parent directory 
+    @discussion	creates a new audio file located in the parent directory
                       provided. Upon success, an AudioFileID is returned which can
                       be used for subsequent calls to the AudioFile APIs.
     @param inParentRef		an FSRef to the directory where  the new file should be created.
@@ -1405,14 +1405,14 @@ struct FSRef;
     @param inFileType		an AudioFileTypeID indicating the type of audio file to create.
     @param inFormat			an AudioStreamBasicDescription describing the data format that will be
 							added to the audio file.
-    @param inFlags			relevant flags for creating/opening the file. 
+    @param inFlags			relevant flags for creating/opening the file.
     @param outNewFileRef	if successful, the FSRef of the newly created file.
     @param outAudioFile		if successful, an AudioFileID that can be used for subsequent AudioFile calls.
     @result					returns noErr if successful.
 	@deprecated				in Mac OS X 10.6, see AudioFileCreateWithURL
 }
-extern OSStatus	
-AudioFileCreate (	const struct FSRef					*inParentRef, 
+extern OSStatus
+AudioFileCreate (	const struct FSRef					*inParentRef,
                     CFStringRef							inFileName,
                     AudioFileTypeID						inFileType,
                     const AudioStreamBasicDescription	*inFormat,
@@ -1426,7 +1426,7 @@ AudioFileCreate (	const struct FSRef					*inParentRef,
     @discussion				Use AudioFileInitialize to wipe clean an existing audio file
 							and prepare it to be populated with new data.
     @param inFileRef		the FSRef of an existing audio file.
-    @param inFileType		an AudioFileTypeID indicating the type of audio file to initialize the file to. 
+    @param inFileType		an AudioFileTypeID indicating the type of audio file to initialize the file to.
     @param inFormat			an AudioStreamBasicDescription describing the data format that will be
 							added to the audio file.
     @param inFlags			flags for creating/opening the file. Currently zero.
@@ -1435,7 +1435,7 @@ AudioFileCreate (	const struct FSRef					*inParentRef,
     @result					returns noErr if successful.
 	@deprecated				in Mac OS X 10.6, see AudioFileCreateWithURL
 }
-extern OSStatus	
+extern OSStatus
 AudioFileInitialize (	const struct FSRef					*inFileRef,
                         AudioFileTypeID						inFileType,
                         const AudioStreamBasicDescription	*inFormat,
@@ -1449,7 +1449,7 @@ AudioFileInitialize (	const struct FSRef					*inFileRef,
     @param inFileRef		the FSRef of an existing audio file.
     @param inPermissions	use the permission constants
     @param inFileTypeHint	For files which have no filename extension and whose type cannot be easily or
-							uniquely determined from the data (ADTS,AC3), this hint can be used to indicate the file type. 
+							uniquely determined from the data (ADTS,AC3), this hint can be used to indicate the file type.
 							Otherwise you can pass zero for this. The hint is only used on OS versions 10.3.1 or greater.
 							For OS versions prior to that, opening files of the above description will fail.
     @param outAudioFile		upon success, an AudioFileID that can be used for subsequent
@@ -1457,13 +1457,13 @@ AudioFileInitialize (	const struct FSRef					*inFileRef,
     @result					returns noErr if successful.
 	@deprecated				in Mac OS X 10.6, see AudioFileOpenURL
 }
-extern OSStatus	
+extern OSStatus
 AudioFileOpen (	const struct FSRef		*inFileRef,
                 AudioFilePermissions	inPermissions,
                 AudioFileTypeID			inFileTypeHint,
                 AudioFileID	__nullable * __nonnull	outAudioFile)			API_DEPRECATED("no longer supported", macos(10.2, 10.6)) API_UNAVAILABLE(ios, watchos, tvos);
 
-	
+
 *)
 //CF_ASSUME_NONNULL_END
 

+ 72 - 72
packages/univint/src/AudioFileComponents.pas

@@ -260,7 +260,7 @@ type
     @param inFileRef		an CFURLRef fully specifying the path of the file to create/initialise
     @param inFormat			an AudioStreamBasicDescription describing the data format that will be
 							added to the audio file.
-    @param inFlags			relevant flags for creating/opening the file. 
+    @param inFlags			relevant flags for creating/opening the file.
 								if kAudioFileFlags_EraseFile is set, it will erase an existing file
 								 if not set, then the Create call will fail if the URL is an existing file
     @result					returns noErr if successful.
@@ -304,7 +304,7 @@ function AudioFileComponentOpenWithCallbacks( inComponent: AudioFileComponent; i
 	@param inWriteFunc		a function that will be called when AudioFile needs to write data.
 	@param inGetSizeFunc	a function that will be called when AudioFile needs to know the file size.
 	@param inSetSizeFunc	a function that will be called when AudioFile needs to set the file size.
-    @param inFileType 		an AudioFileTypeID indicating the type of audio file to which to initialize the file. 
+    @param inFileType 		an AudioFileTypeID indicating the type of audio file to which to initialize the file.
     @param inFormat			an AudioStreamBasicDescription describing the data format that will be
 							added to the audio file.
     @param inFlags			relevant flags for creating/opening the file. Currently zero.
@@ -322,7 +322,7 @@ function AudioFileComponentInitializeWithCallbacks( inComponent: AudioFileCompon
 }
 function AudioFileComponentCloseFile( inComponent: AudioFileComponent ): OSStatus; external name '_AudioFileComponentCloseFile';
 (* API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos) *)
-				
+
 {!
     @function	AudioFileComponentOptimize
     @abstract   implements AudioFileOptimize.
@@ -331,23 +331,23 @@ function AudioFileComponentCloseFile( inComponent: AudioFileComponent ): OSStatu
 }
 function AudioFileComponentOptimize( inComponent: AudioFileComponent ): OSStatus; external name '_AudioFileComponentOptimize';
 (* API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos) *)
-				
+
 {!
     @function	AudioFileComponentReadBytes
-    @abstract   implements AudioFileReadBytes. 
-				
+    @abstract   implements AudioFileReadBytes.
+
     @discussion				Returns kAudioFileEndOfFileError when read encounters end of file.
     @param inComponent		an AudioFileComponent
     @param inUseCache 		true if it is desired to cache the data upon read, else false
     @param inStartingByte	the byte offset of the audio data desired to be returned
     @param ioNumBytes 		on input, the number of bytes to read, on output, the number of
 							bytes actually read.
-    @param outBuffer 		outBuffer should be a void * to user allocated memory large enough for the requested bytes. 
+    @param outBuffer 		outBuffer should be a void * to user allocated memory large enough for the requested bytes.
     @result					returns noErr if successful.
 }
 function AudioFileComponentReadBytes( inComponent: AudioFileComponent; inUseCache: Boolean; inStartingByte: SInt64; var ioNumBytes: UInt32; outBuffer: UnivPtr ): OSStatus; external name '_AudioFileComponentReadBytes';
 (* API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos) *)
-						
+
 {!
     @function				AudioFileComponentWriteBytes
     @abstract				implements AudioFileWriteBytes.
@@ -356,12 +356,12 @@ function AudioFileComponentReadBytes( inComponent: AudioFileComponent; inUseCach
     @param inStartingByte	the byte offset where the audio data should be written
     @param ioNumBytes 		on input, the number of bytes to write, on output, the number of
 							bytes actually written.
-    @param inBuffer 		inBuffer should be a void * containing the bytes to be written 
+    @param inBuffer 		inBuffer should be a void * containing the bytes to be written
     @result					returns noErr if successful.
 }
 function AudioFileComponentWriteBytes( inComponent: AudioFileComponent; inUseCache: Boolean; inStartingByte: SInt64; var ioNumBytes: UInt32; inBuffer: {const} UnivPtr ): OSStatus; external name '_AudioFileComponentWriteBytes';
 (* API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos) *)
-						
+
 {!
     @function	AudioFileComponentReadPackets
     @abstract   implements AudioFileReadPackets.
@@ -373,37 +373,37 @@ function AudioFileComponentWriteBytes( inComponent: AudioFileComponent; inUseCac
     @param outNumBytes				on output, the number of bytes actually returned
     @param outPacketDescriptions 	on output, an array of packet descriptions describing
 									the packets being returned. NULL may be passed for this
-									parameter. Nothing will be returned for linear pcm data.   
+									parameter. Nothing will be returned for linear pcm data.
     @param inStartingPacket 		the packet index of the first packet desired to be returned
     @param ioNumPackets 			on input, the number of packets to read, on output, the number of
 									packets actually read.
-    @param outBuffer 				outBuffer should be a pointer to user allocated memory of size: 
+    @param outBuffer 				outBuffer should be a pointer to user allocated memory of size:
 									number of packets requested times file's maximum (or upper bound on)
 									packet size.
     @result							returns noErr if successful.
 }
 function AudioFileComponentReadPackets( inComponent: AudioFileComponent; inUseCache: Boolean; var outNumBytes: UInt32; outPacketDescriptions: AudioStreamPacketDescriptionPtr {* __nullable}; inStartingPacket: SInt64; var ioNumPackets: UInt32; outBuffer: UnivPtr ): OSStatus; external name '_AudioFileComponentReadPackets';
 (* API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos) *)
-									
+
 
 {!
     @function	AudioFileComponentReadPacketData
     @abstract   implements AudioFileReadPacketData.
     @discussion For all uncompressed formats, packets == frames.
-				If the byte size of the number packets requested is 
+				If the byte size of the number packets requested is
 				less than the buffer size, ioNumBytes will be reduced.
-				If the buffer is too small for the number of packets 
-				requested, ioNumPackets and ioNumBytes will be reduced 
+				If the buffer is too small for the number of packets
+				requested, ioNumPackets and ioNumBytes will be reduced
 				to the number of packets that can be accommodated and their byte size.
 				Returns kAudioFileEndOfFileError when read encounters end of file.
 
     @param inComponent				an AudioFileComponent
     @param inUseCache 				true if it is desired to cache the data upon read, else false
-    @param ioNumBytes				on input the size of outBuffer in bytes. 
+    @param ioNumBytes				on input the size of outBuffer in bytes.
 									on output, the number of bytes actually returned.
     @param outPacketDescriptions 	on output, an array of packet descriptions describing
 									the packets being returned. NULL may be passed for this
-									parameter. Nothing will be returned for linear pcm data.   
+									parameter. Nothing will be returned for linear pcm data.
     @param inStartingPacket 		the packet index of the first packet desired to be returned
     @param ioNumPackets 			on input, the number of packets to read, on output, the number of
 									packets actually read.
@@ -412,7 +412,7 @@ function AudioFileComponentReadPackets( inComponent: AudioFileComponent; inUseCa
 }
 function AudioFileComponentReadPacketData( inComponent: AudioFileComponent; inUseCache: Boolean; var ioNumBytes: UInt32; outPacketDescriptions: AudioStreamPacketDescriptionPtr {* __nullable}; inStartingPacket: SInt64; var ioNumPackets: UInt32; outBuffer: UnivPtr ): OSStatus; external name '_AudioFileComponentReadPacketData';
 (* API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos) *)
-									
+
 {!
     @function	AudioFileComponentWritePackets
     @abstract   implements AudioFileWritePackets.
@@ -420,9 +420,9 @@ function AudioFileComponentReadPacketData( inComponent: AudioFileComponent; inUs
     @param inComponent				an AudioFileComponent
     @param inUseCache 				true if it is desired to cache the data upon write, else false
     @param inNumBytes				the number of bytes being provided for write
-    @param inPacketDescriptions 	an array of packet descriptions describing the packets being 
-									provided. Not all formats require packet descriptions to be 
-									provided. NULL may be passed if no descriptions are required.   
+    @param inPacketDescriptions 	an array of packet descriptions describing the packets being
+									provided. Not all formats require packet descriptions to be
+									provided. NULL may be passed if no descriptions are required.
     @param inStartingPacket 		the packet index of where the first packet provided should be placed.
     @param ioNumPackets 			on input, the number of packets to write, on output, the number of
 									packets actually written.
@@ -438,7 +438,7 @@ function AudioFileComponentWritePackets( inComponent: AudioFileComponent; inUseC
     @abstract   implements AudioFileGetPropertyInfo.
     @param		inComponent			an AudioFileComponent
     @param      inPropertyID		an AudioFileProperty constant.
-    @param      outPropertySize		the size in bytes of the current value of the property. In order to get the property value, 
+    @param      outPropertySize		the size in bytes of the current value of the property. In order to get the property value,
 									you will need a buffer of this size.
     @param      outWritable			will be set to 1 if writable, or 0 if read only.
     @result							returns noErr if successful.
@@ -475,7 +475,7 @@ function AudioFileComponentSetProperty( inComponent: AudioFileComponent; inPrope
 {!
     @function	AudioFileComponentCountUserData
     @abstract   implements AudioFileCountUserData
-    @discussion		"User Data" refers to chunks in AIFF, CAF and WAVE files, or resources 
+    @discussion		"User Data" refers to chunks in AIFF, CAF and WAVE files, or resources
 					in Sound Designer II files, and possibly other things in other files.
 					For simplicity, referred to below as "chunks".
     @param inComponent				an AudioFileComponent
@@ -504,7 +504,7 @@ function AudioFileComponentGetUserDataSize( inComponent: AudioFileComponent; inU
     @param		inComponent			an AudioFileComponent
     @param      inUserDataID		the four AnsiChar code of the chunk.
     @param      inIndex				an index specifying which chunk if there are more than one.
-	@param		ioUserDataSize		the size of the buffer on input, size of bytes copied to buffer on output 
+	@param		ioUserDataSize		the size of the buffer on input, size of bytes copied to buffer on output
     @param      outUserData			a pointer to a buffer in which to copy the chunk data.
     @result							returns noErr if successful.
 }
@@ -517,8 +517,8 @@ function AudioFileComponentGetUserData( inComponent: AudioFileComponent; inUserD
     @param		inComponent			an AudioFileComponent
     @param      inUserDataID		the four AnsiChar code of the chunk.
     @param      inIndex				an index specifying which chunk if there are more than one.
-	@param		inUserDataSize		on input the size of the data to copy, on output, size of bytes copied from the buffer  
-    @param      inUserData			a pointer to a buffer from which to copy the chunk data 
+	@param		inUserDataSize		on input the size of the data to copy, on output, size of bytes copied from the buffer
+    @param      inUserData			a pointer to a buffer from which to copy the chunk data
 									(only the contents of the chunk, not including the chunk header).
     @result							returns noErr if successful.
 }
@@ -539,7 +539,7 @@ function AudioFileComponentRemoveUserData( inComponent: AudioFileComponent; inUs
 
 //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 //	The following calls are not made on AudioFile instances.
-//  These calls are used to determine the audio file type of some data. 
+//  These calls are used to determine the audio file type of some data.
 //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 {!
     @function	AudioFileComponentExtensionIsThisFormat
@@ -567,7 +567,7 @@ function AudioFileComponentFileDataIsThisFormat( inComponent: AudioFileComponent
 
 {$ifc false}
 //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-//	The following two calls are deprecated. 
+//	The following two calls are deprecated.
 //  Please implement AudioFileComponentFileDataIsThisFormat instead.
 //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 {!
@@ -579,8 +579,8 @@ function AudioFileComponentFileDataIsThisFormat( inComponent: AudioFileComponent
     @result							returns noErr if successful.
 }
 function AudioFileComponentFileIsThisFormat( inComponent: AudioFileComponent; inFileRefNum: SInt16; var outResult: UInt32 ): OSStatus; external name '_AudioFileComponentFileIsThisFormat';
-(* API_DEPRECATED("no longer supported", macos(10.4, 10.5)) API_UNAVAILABLE(ios, watchos, tvos) *) 
-	
+(* API_DEPRECATED("no longer supported", macos(10.4, 10.5)) API_UNAVAILABLE(ios, watchos, tvos) *)
+
 {!
     @function	AudioFileComponentDataIsThisFormat
     @abstract   deprecated. use AudioFileComponentFileDataIsThisFormat instead.
@@ -594,7 +594,7 @@ function AudioFileComponentFileIsThisFormat( inComponent: AudioFileComponent; in
     @result							returns noErr if successful.
 }
 function AudioFileComponentDataIsThisFormat( inComponent: AudioFileComponent; inClientData: UnivPtr {__nullable}; inReadFunc: AudioFile_ReadProc {__nullable}; inWriteFunc: AudioFile_WriteProc {__nullable}; inGetSizeFunc: AudioFile_GetSizeProc {__nullable}; inSetSizeFunc: AudioFile_SetSizeProc {__nullable}; var outResult: UInt32 ): OSStatus; external name '_AudioFileComponentDataIsThisFormat';
-(* API_DEPRECATED("no longer supported", macos(10.4, 10.5)) API_UNAVAILABLE(ios, watchos, tvos) *) 
+(* API_DEPRECATED("no longer supported", macos(10.4, 10.5)) API_UNAVAILABLE(ios, watchos, tvos) *)
 {$endc}
 
 //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
@@ -609,7 +609,7 @@ function AudioFileComponentDataIsThisFormat( inComponent: AudioFileComponent; in
     @param      inPropertyID		an AudioFileGlobalInfo property constant.
     @param      inSpecifierSize		The size of the specifier data.
     @param      inSpecifier			A specifier is a buffer of data used as an input argument to some of the global info properties.
-    @param      outPropertySize		the size in bytes of the current value of the property. In order to get the property value, 
+    @param      outPropertySize		the size in bytes of the current value of the property. In order to get the property value,
 									you will need a buffer of this size.
     @result							returns noErr if successful.
 }
@@ -631,35 +631,35 @@ function AudioFileComponentGetGlobalInfo( inComponent: AudioFileComponent; inPro
 (* API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos) *)
 
 //==================================================================================================
-//	Properties for AudioFileComponentGetGlobalInfo. 
+//	Properties for AudioFileComponentGetGlobalInfo.
 //==================================================================================================
 
 {!
     @enum AudioFileComponent specific properties
     @constant   kAudioFileComponent_CanRead
-					Is file type readable? Returns a UInt32 1 or 0. 
+					Is file type readable? Returns a UInt32 1 or 0.
     @constant   kAudioFileComponent_CanWrite
-					Is file type writeable? Returns a UInt32 1 or 0. 
+					Is file type writeable? Returns a UInt32 1 or 0.
     @constant   kAudioFileComponent_FileTypeName
-					Returns a CFString containing the name for the file type. 
+					Returns a CFString containing the name for the file type.
     @constant   kAudioFileComponent_ExtensionsForType
-					Returns a CFArray of CFStrings containing the file extensions 
-					that are recognized for this file type. 
+					Returns a CFArray of CFStrings containing the file extensions
+					that are recognized for this file type.
     @constant   kAudioFileComponent_UTIsForType
-					Returns a CFArray of CFStrings containing the universal type identifiers 
-					for this file type. 
+					Returns a CFArray of CFStrings containing the universal type identifiers
+					for this file type.
     @constant   kAudioFileComponent_MIMETypesForType
-					Returns a CFArray of CFStrings containing the MIME types 
-					for this file type. 
+					Returns a CFArray of CFStrings containing the MIME types
+					for this file type.
     @constant   kAudioFileComponent_AvailableFormatIDs
-					Returns a array of format IDs for formats that can be read. 
+					Returns a array of format IDs for formats that can be read.
     @constant   kAudioFileComponent_AvailableStreamDescriptionsForFormat
 					The specifier is the format ID for the requested format.
-					Returns an array of AudioStreamBasicDescriptions which have all of the 
+					Returns an array of AudioStreamBasicDescriptions which have all of the
 					formats for a particular file type and format ID. The AudioStreamBasicDescriptions
 					have the following fields filled in: mFormatID, mFormatFlags, mBitsPerChannel
     @constant   kAudioFileComponent_FastDispatchTable
-					Deprecated. This selector is no longer called by the implementation. 
+					Deprecated. This selector is no longer called by the implementation.
     @constant   kAudioFileComponent_HFSTypeCodesForType
 					Returns an array of HFSTypeCodes corresponding to this file type.
 					The first type in the array is the preferred one for use when
@@ -675,10 +675,10 @@ const
 	kAudioFileComponent_AvailableFormatIDs = FourCharCode('fmid');
 	kAudioFileComponent_AvailableStreamDescriptionsForFormat = FourCharCode('sdid');
 	kAudioFileComponent_FastDispatchTable = FourCharCode('fdft');
-	kAudioFileComponent_HFSTypeCodesForType = FourCharCode('fhfs'); 
+	kAudioFileComponent_HFSTypeCodesForType = FourCharCode('fhfs');
 
 //==================================================================================================
-//	Selectors for the component routines 
+//	Selectors for the component routines
 //==================================================================================================
 
 const
@@ -709,7 +709,7 @@ const
 	kAudioFileCreateURLSelect = $0019;
 	kAudioFileOpenURLSelect = $001A;
 	kAudioFileFileDataIsThisFormatSelect = $001B;
-	kAudioFileReadPacketDataSelect = $001C; 
+	kAudioFileReadPacketDataSelect = $001C;
 
 
 //#pragma mark -
@@ -721,10 +721,10 @@ const
 
 type
 	ReadBytesFDF = function( inComponentStorage: UnivPtr; inUseCache: Boolean; inStartingByte: SInt64; var ioNumBytes: UInt32; outBuffer: UnivPtr ): OSStatus;
-								
+
 type
 	WriteBytesFDF = function( inComponentStorage: UnivPtr; inUseCache: Boolean; inStartingByte: SInt64; var ioNumBytes: UInt32; inBuffer: {const} UnivPtr ): OSStatus;
-							
+
 type
 	ReadPacketsFDF = function( inComponentStorage: UnivPtr; inUseCache: Boolean; var outNumBytes: UInt32; outPacketDescriptions: AudioStreamPacketDescriptionPtr {* __nullable}; inStartingPacket: SInt64; var ioNumPackets: UInt32; outBuffer: UnivPtr ): OSStatus;
 
@@ -733,13 +733,13 @@ type
 
 type
 	WritePacketsFDF = function( inComponentStorage: UnivPtr; inUseCache: Boolean; inNumBytes: UInt32; {const} inPacketDescriptions: AudioStreamPacketDescriptionPtr {* __nullable}; inStartingPacket: SInt64; var ioNumPackets: UInt32; inBuffer: {const} UnivPtr ): OSStatus;
-								
+
 type
 	GetPropertyInfoFDF = function( inComponentStorage: UnivPtr; inPropertyID: AudioFilePropertyID; outDataSize: UInt32Ptr {* __nullable}; isWritable: UInt32Ptr {* __nullable} ): OSStatus;
-								
+
 type
 	GetPropertyFDF = function( inComponentStorage: UnivPtr; inPropertyID: AudioFilePropertyID; var ioDataSize: UInt32; ioPropertyData: UnivPtr ): OSStatus;
-							
+
 type
 	SetPropertyFDF = function( inComponentStorage: UnivPtr; inPropertyID: AudioFilePropertyID; inDataSize: UInt32; inPropertyData: {const} UnivPtr ): OSStatus;
 
@@ -754,7 +754,7 @@ type
 
 type
 	SetUserDataFDF = function( inComponentStorage: UnivPtr; inUserDataID: UInt32; inIndex: UInt32; inUserDataSize: UInt32; inUserData: {const} UnivPtr ): OSStatus;
-										
+
 { no fast dispatch for kAudioFileRemoveUserDataSelect }
 
 //#pragma /mark -
@@ -775,7 +775,7 @@ type
 		mGetPropertyInfoFDF: GetPropertyInfoFDF;
 		mGetPropertyFDF: GetPropertyFDF;
 		mSetPropertyFDF: SetPropertyFDF;
-	
+
 		mCountUserDataFDF: CountUserDataFDF;
 		mGetUserDataSizeFDF: GetUserDataSizeFDF;
 		mGetUserDataFDF: GetUserDataFDF;
@@ -795,7 +795,7 @@ type
 		mGetPropertyInfoFDF: GetPropertyInfoFDF;
 		mGetPropertyFDF: GetPropertyFDF;
 		mSetPropertyFDF: SetPropertyFDF;
-	
+
 		mCountUserDataFDF: CountUserDataFDF;
 		mGetUserDataSizeFDF: GetUserDataSizeFDF;
 		mGetUserDataFDF: GetUserDataFDF;
@@ -826,7 +826,7 @@ type
 }
 function AudioFileComponentCreate( inComponent: AudioFileComponent; {const} inParentRef: FSRefPtr; inFileName: CFStringRef; const (*var*) inFormat: AudioStreamBasicDescription; inFlags: UInt32; outNewFileRef: FSRefPtr ): OSStatus; external name '_AudioFileComponentCreate';
 (* API_DEPRECATED("no longer supported", macos(10.4, 10.6)) API_UNAVAILABLE(ios, watchos, tvos) *)
-                                
+
 
 {!
     @function	AudioFileComponentInitialize
@@ -840,7 +840,7 @@ function AudioFileComponentCreate( inComponent: AudioFileComponent; {const} inPa
 }
 function AudioFileComponentInitialize( inComponent: AudioFileComponent; {const} inFileRef: FSRefPtr; const (*var*) inFormat: AudioStreamBasicDescription; inFlags: UInt32 ): OSStatus; external name '_AudioFileComponentInitialize';
 (* API_DEPRECATED("no longer supported", macos(10.4, 10.6)) API_UNAVAILABLE(ios, watchos, tvos) *)
-							
+
 {!
     @function	AudioFileComponentOpenFile
     @abstract   implements AudioFileOpen
@@ -860,7 +860,7 @@ function AudioFileComponentOpenFile( inComponent: AudioFileComponent; {const} in
 type
 	AudioFileComponentCreateURLProc = function( self: UnivPtr; inFileRef: CFURLRef; const (*var*) inFormat: AudioStreamBasicDescription; inFlags: UInt32 ): OSStatus;
 	AudioFileComponentOpenURLProc = function( self: UnivPtr; inFileRef: CFURLRef; inPermissions: SInt8; inFileDescriptor: SInt32 ): OSStatus;
-								
+
 type
 	AudioFileComponentOpenWithCallbacksProc = function( self: UnivPtr; inClientData: UnivPtr; inReadFunc: AudioFile_ReadProc; inWriteFunc: AudioFile_WriteProc; inGetSizeFunc: AudioFile_GetSizeProc; inSetSizeFunc: AudioFile_SetSizeProc ): OSStatus;
 
@@ -869,23 +869,23 @@ type
 
 type
 	AudioFileComponentCloseProc = function( self: UnivPtr ): OSStatus;
-				
+
 type
 	AudioFileComponentOptimizeProc = function( self: UnivPtr ): OSStatus;
-				
+
 type
-	AudioFileComponentReadBytesProc = function( self: UnivPtr; inUseCache: Boolean; inStartingByte: SInt64; var ioNumBytes: UInt32; outBuffer: UnivPtr ): OSStatus;	
-						
+	AudioFileComponentReadBytesProc = function( self: UnivPtr; inUseCache: Boolean; inStartingByte: SInt64; var ioNumBytes: UInt32; outBuffer: UnivPtr ): OSStatus;
+
 type
-	AudioFileComponentWriteBytesProc = function( self: UnivPtr; inUseCache: Boolean; inStartingByte: SInt64; var ioNumBytes: UInt32; inBuffer: {const} UnivPtr ): OSStatus;	
-						
+	AudioFileComponentWriteBytesProc = function( self: UnivPtr; inUseCache: Boolean; inStartingByte: SInt64; var ioNumBytes: UInt32; inBuffer: {const} UnivPtr ): OSStatus;
+
 type
-	AudioFileComponentReadPacketsProc = function( self: UnivPtr; inUseCache: Boolean; var outNumBytes: UInt32; outPacketDescriptions: AudioStreamPacketDescriptionPtr {* __nullable}; inStartingPacket: SInt64; var ioNumPackets: UInt32; outBuffer: UnivPtr ): OSStatus;	
-									
+	AudioFileComponentReadPacketsProc = function( self: UnivPtr; inUseCache: Boolean; var outNumBytes: UInt32; outPacketDescriptions: AudioStreamPacketDescriptionPtr {* __nullable}; inStartingPacket: SInt64; var ioNumPackets: UInt32; outBuffer: UnivPtr ): OSStatus;
+
 
 type
-	AudioFileComponentReadPacketDataProc = function( self: UnivPtr; inUseCache: Boolean; var ioNumBytes: UInt32; outPacketDescriptions: AudioStreamPacketDescription {* __nullable}; inStartingPacket: SInt64; var ioNumPackets: UInt32; outBuffer: UnivPtr ): OSStatus;	
-									
+	AudioFileComponentReadPacketDataProc = function( self: UnivPtr; inUseCache: Boolean; var ioNumBytes: UInt32; outPacketDescriptions: AudioStreamPacketDescription {* __nullable}; inStartingPacket: SInt64; var ioNumPackets: UInt32; outBuffer: UnivPtr ): OSStatus;
+
 type
 	AudioFileComponentWritePacketsProc = function( self: UnivPtr; inUseCache: Boolean; inNumBytes: UInt32; {const} inPacketDescriptions: AudioStreamPacketDescription {* __nullable}; inStartingPacket: SInt64; var ioNumPackets: UInt32; inBuffer: {const} UnivPtr ): OSStatus;
 
@@ -918,11 +918,11 @@ type
 	AudioFileComponentRemoveUserDataProc = function( self: UnivPtr; inUserDataID: UInt32; inIndex: UInt32 ): OSStatus;
 
 type
-	AudioFileComponentExtensionIsThisFormatProc = function( self: UnivPtr; inExtension: CFStringRef; var outResult: UInt32 ): OSStatus;	
+	AudioFileComponentExtensionIsThisFormatProc = function( self: UnivPtr; inExtension: CFStringRef; var outResult: UInt32 ): OSStatus;
 
 
 type
-	AudioFileComponentFileDataIsThisFormatProc = function( self: UnivPtr; inDataByteSize: UInt32; inData: {const} UnivPtr; var outResult: UInt32 ): OSStatus;	
+	AudioFileComponentFileDataIsThisFormatProc = function( self: UnivPtr; inDataByteSize: UInt32; inData: {const} UnivPtr; var outResult: UInt32 ): OSStatus;
 
 
 type

+ 94 - 94
packages/univint/src/AudioFileStream.pas

@@ -19,7 +19,7 @@
 	retried before any other requests are satisfied, otherwise the streamed data might be lost
 	forever in the past. So the parser must be able to suspend work at any point and resume parsing
 	where it left off.
-	
+
 	The client provides data to the parser using AudioFileStreamParseBytes and the parser calls back
 	to the client with properties or packets using the AudioFileStream_PropertyListenerProc and
 	AudioFileStream_PacketsProc function pointers.
@@ -251,13 +251,13 @@ uses MacTypes,CoreAudioTypes,AudioFile;
 
 {!
     @enum AudioFileStreamPropertyFlags
-    @constant   kAudioFileStreamPropertyFlag_PropertyIsCached 
+    @constant   kAudioFileStreamPropertyFlag_PropertyIsCached
 		This flag is set in a call to AudioFileStream_PropertyListenerProc when the value of the property
-		can be obtained at any later time. If this flag is not set, then you should either get the value of 
+		can be obtained at any later time. If this flag is not set, then you should either get the value of
 		the property from within this callback or set the flag kAudioFileStreamPropertyFlag_CacheProperty in order to signal
 		to the parser to begin caching the property data. Otherwise the value may not be available in the future.
-		
-    @constant   kAudioFileStreamPropertyFlag_CacheProperty 
+
+    @constant   kAudioFileStreamPropertyFlag_CacheProperty
 		This flag can be set by a property listener in order to signal to the parser that the client is
 		interested in the value of the property and that it should be cached until the full value of the property is available.
 }
@@ -266,10 +266,10 @@ type
 	AudioFileStreamPropertyFlagsPtr = ^AudioFileStreamPropertyFlags;
 const
 	kAudioFileStreamPropertyFlag_PropertyIsCached = 1;
-	kAudioFileStreamPropertyFlag_CacheProperty = 2; 
+	kAudioFileStreamPropertyFlag_CacheProperty = 2;
 
 {!	@enum	AudioFileStreamParseFlags
-    @constant   kAudioFileStreamParseFlag_Discontinuity 
+    @constant   kAudioFileStreamParseFlag_Discontinuity
 		This flag is passed in to AudioFileStreamParseBytes to signal a discontinuity. Any partial packet straddling a buffer
 		boundary will be discarded. This is necessary to avoid being called with a corrupt packet. After a discontinuity occurs
 		seeking may be approximate in some data formats.
@@ -278,17 +278,17 @@ type
 	AudioFileStreamParseFlags = UInt32;
 	AudioFileStreamParseFlagsPtr = ^AudioFileStreamParseFlags;
 const
-	kAudioFileStreamParseFlag_Discontinuity = 1; 
+	kAudioFileStreamParseFlag_Discontinuity = 1;
 
 {!	@enum	AudioFileStreamParseFlags
-    @constant   kAudioFileStreamSeekFlag_OffsetIsEstimated 
+    @constant   kAudioFileStreamSeekFlag_OffsetIsEstimated
 		This flag may be returned from AudioFileStreamSeek if the byte offset is only an estimate, not exact.
 }
 type
 	AudioFileStreamSeekFlags = UInt32;
 	AudioFileStreamSeekFlagsPtr = ^AudioFileStreamSeekFlags;
 const
-	kAudioFileStreamSeekFlag_OffsetIsEstimated = 1; 
+	kAudioFileStreamSeekFlag_OffsetIsEstimated = 1;
 
 //=============================================================================
 //	AudioFileStream Types
@@ -317,32 +317,32 @@ type
 
     @abstract   These are the error codes returned from the AudioFile API.
 
-    @constant   kAudioFileStreamError_UnsupportedFileType 
+    @constant   kAudioFileStreamError_UnsupportedFileType
 		The file type is not supported.
-    @constant   kAudioFileStreamError_UnsupportedDataFormat 
+    @constant   kAudioFileStreamError_UnsupportedDataFormat
 		The data format is not supported by this file type.
-    @constant   kAudioFileStreamError_UnsupportedProperty 
+    @constant   kAudioFileStreamError_UnsupportedProperty
 		The property is not supported.
-    @constant   kAudioFileStreamError_BadPropertySize 
+    @constant   kAudioFileStreamError_BadPropertySize
 		The size of the property data was not correct.
-    @constant   kAudioFileStreamError_NotOptimized 
-		It is not possible to produce output packets because the file's packet table or other defining 
+    @constant   kAudioFileStreamError_NotOptimized
+		It is not possible to produce output packets because the file's packet table or other defining
 		info is either not present or is after the audio data.
-    @constant   kAudioFileStreamError_InvalidPacketOffset 
+    @constant   kAudioFileStreamError_InvalidPacketOffset
 		A packet offset was less than zero, or past the end of the file,
-		or a corrupt packet size was read when building the packet table. 
-    @constant   kAudioFileStreamError_InvalidFile 
-		The file is malformed, or otherwise not a valid instance of an audio file of its type, or 
-		is not recognized as an audio file. 
-    @constant   kAudioFileStreamError_ValueUnknown 
+		or a corrupt packet size was read when building the packet table.
+    @constant   kAudioFileStreamError_InvalidFile
+		The file is malformed, or otherwise not a valid instance of an audio file of its type, or
+		is not recognized as an audio file.
+    @constant   kAudioFileStreamError_ValueUnknown
 		The property value is not present in this file before the audio data.
 	@constant	kAudioFileStreamError_DataUnavailable
 		The amount of data provided to the parser was insufficient to produce any result.
 	@constant	kAudioFileStreamError_IllegalOperation
 		An illegal operation was attempted.
-    @constant   kAudioFileStreamError_UnspecifiedError 
+    @constant   kAudioFileStreamError_UnspecifiedError
 		An unspecified error has occurred.
-		
+
 }
 const
 	kAudioFileStreamError_UnsupportedFileType = FourCharCode('typ?');
@@ -356,7 +356,7 @@ const
 	kAudioFileStreamError_DataUnavailable = FourCharCode('more');
 	kAudioFileStreamError_IllegalOperation = FourCharCode('nope');
 	kAudioFileStreamError_UnspecifiedError = FourCharCode('wht?');
-	kAudioFileStreamError_DiscontinuityCantRecover = FourCharCode('dsc!'); 
+	kAudioFileStreamError_DiscontinuityCantRecover = FourCharCode('dsc!');
 
 //=============================================================================
 //	AudioFileStream Properties
@@ -365,61 +365,61 @@ const
 
 {!
     @enum		AudioFileStream Properties
-	
+
     @abstract   constants for AudioFileStream get property calls
     @discussion		There are currently no settable properties.
 
-					
+
     @constant   kAudioFileStreamProperty_ReadyToProducePackets
-					An UInt32 which is zero until the parser has parsed up to the beginning of the audio data. 
-					Once it has reached the audio data, the value of this property becomes one. 
+					An UInt32 which is zero until the parser has parsed up to the beginning of the audio data.
+					Once it has reached the audio data, the value of this property becomes one.
 					When this value has become one, all properties that can be known about the stream are known.
-					
-    @constant   kAudioFileStreamProperty_FileFormat 
+
+    @constant   kAudioFileStreamProperty_FileFormat
 					An UInt32 four AnsiChar code that identifies the format of the file
-    @constant   kAudioFileStreamProperty_DataFormat 
+    @constant   kAudioFileStreamProperty_DataFormat
 					An AudioStreamBasicDescription describing the format of the audio data
-    @constant   kAudioFileStreamProperty_FormatList 
-					In order to support formats such as AAC SBR where an encoded data stream can be decoded to 
-					multiple destination formats, this property returns an array of AudioFormatListItems 
+    @constant   kAudioFileStreamProperty_FormatList
+					In order to support formats such as AAC SBR where an encoded data stream can be decoded to
+					multiple destination formats, this property returns an array of AudioFormatListItems
 					(see AudioFormat.h) of those formats.
-					The default behavior is to return the an AudioFormatListItem that has the same 
+					The default behavior is to return the an AudioFormatListItem that has the same
 					AudioStreamBasicDescription that kAudioFileStreamProperty_DataFormat returns.
-    @constant   kAudioFileStreamProperty_MagicCookieData 
+    @constant   kAudioFileStreamProperty_MagicCookieData
 					A void * pointing to memory set up by the caller.
 					Some file types require that a magic cookie be provided before packets can be written
-					to the file, so this property should be set before calling 
+					to the file, so this property should be set before calling
 					AudioFileWriteBytes()/AudioFileWritePackets() if a magic cookie exists.
-    @constant   kAudioFileStreamProperty_AudioDataByteCount 
+    @constant   kAudioFileStreamProperty_AudioDataByteCount
 					a UInt64 that indicates the number of bytes of audio data contained in the file
-    @constant   kAudioFileStreamProperty_AudioDataPacketCount 
+    @constant   kAudioFileStreamProperty_AudioDataPacketCount
 					a UInt64 that indicates the number of packets of audio data contained in the file
-    @constant   kAudioFileStreamProperty_MaximumPacketSize 
+    @constant   kAudioFileStreamProperty_MaximumPacketSize
 					a UInt32 that indicates the maximum size of a packet for the data contained in the file
-    @constant   kAudioFileStreamProperty_DataOffset 
+    @constant   kAudioFileStreamProperty_DataOffset
 					a SInt64 that indicates the byte offset in the file of the audio data.
-    @constant   kAudioFileStreamProperty_ChannelLayout 
+    @constant   kAudioFileStreamProperty_ChannelLayout
 					An AudioChannelLayout struct.
-    @constant   kAudioFileStreamProperty_PacketToFrame 
-					pass a AudioFramePacketTranslation with mPacket filled out and get mFrame back. 
+    @constant   kAudioFileStreamProperty_PacketToFrame
+					pass a AudioFramePacketTranslation with mPacket filled out and get mFrame back.
 					mFrameOffsetInPacket is ignored.
-    @constant   kAudioFileStreamProperty_FrameToPacket 
-					pass a AudioFramePacketTranslation with mFrame filled out and get mPacket and 
+    @constant   kAudioFileStreamProperty_FrameToPacket
+					pass a AudioFramePacketTranslation with mFrame filled out and get mPacket and
 					mFrameOffsetInPacket back.
 	@constant	kAudioFileStreamProperty_PacketToByte
 					pass an AudioBytePacketTranslation struct with mPacket filled out and get mByte back.
-					mByteOffsetInPacket is ignored. If the mByte value is an estimate then 
+					mByteOffsetInPacket is ignored. If the mByte value is an estimate then
 					kBytePacketTranslationFlag_IsEstimate will be set in the mFlags field.
 	@constant	kAudioFileStreamProperty_ByteToPacket
 					pass an AudioBytePacketTranslation struct with mByte filled out and get mPacket and
-					mByteOffsetInPacket back. If the mPacket value is an estimate then 
+					mByteOffsetInPacket back. If the mPacket value is an estimate then
 					kBytePacketTranslationFlag_IsEstimate will be set in the mFlags field.
-    @constant   kAudioFileStreamProperty_PacketTableInfo 
+    @constant   kAudioFileStreamProperty_PacketTableInfo
 					Gets the AudioFilePacketTableInfo struct for the file types that support it.
 	@constant	kAudioFileStreamProperty_PacketSizeUpperBound
 					a UInt32 for the theoretical maximum packet size in the file.
 	@constant	kAudioFileStreamProperty_AverageBytesPerPacket
-					a Float64 of giving the average bytes per packet seen. 
+					a Float64 of giving the average bytes per packet seen.
 					For CBR and files with packet tables, this number will be exact. Otherwise, it is a
 					running average of packets parsed.
 	@constant	kAudioFileStreamProperty_BitRate
@@ -447,7 +447,7 @@ const
 	kAudioFileStreamProperty_PacketSizeUpperBound = FourCharCode('pkub');
 	kAudioFileStreamProperty_AverageBytesPerPacket = FourCharCode('abpp');
 	kAudioFileStreamProperty_BitRate = FourCharCode('brat');
-	kAudioFileStreamProperty_InfoDictionary = FourCharCode('info'); 
+	kAudioFileStreamProperty_InfoDictionary = FourCharCode('info');
 
 //=============================================================================
 //	AudioFileStream Functions
@@ -460,31 +460,31 @@ const
 
 	@discussion		Create a new audio file stream parser.
 					The client provides the parser with data and the parser calls
-					callbacks when interesting things are found in the data, such as properties and 
+					callbacks when interesting things are found in the data, such as properties and
 					audio packets.
 
-    @param			inClientData					
+    @param			inClientData
 						a constant that will be passed to your callbacks.
 	@param			inPropertyListenerProc
 						Whenever the value of a property is parsed in the data, this function will be called.
-						You can then get the value of the property from in the callback. In some cases, due to 
+						You can then get the value of the property from in the callback. In some cases, due to
 						boundaries in the input data, the property may return kAudioFileStreamError_DataUnavailable.
-						When unavailable data is requested from within the property listener, the parser will begin 
+						When unavailable data is requested from within the property listener, the parser will begin
 						caching the property value and will call the property listener again when the property is
-						available. For property values for which kAudioFileStreamPropertyFlag_PropertyIsCached is unset, this 
-						will be the only opportunity to get the value of the property, since the data will be 
-						disposed upon return of the property listener callback. 
+						available. For property values for which kAudioFileStreamPropertyFlag_PropertyIsCached is unset, this
+						will be the only opportunity to get the value of the property, since the data will be
+						disposed upon return of the property listener callback.
 	@param			inPacketsProc
-						Whenever packets are parsed in the data, a pointer to the packets is passed to the client 
-						using this callback. At times only a single packet may be passed due to boundaries in the 
+						Whenever packets are parsed in the data, a pointer to the packets is passed to the client
+						using this callback. At times only a single packet may be passed due to boundaries in the
 						input data.
-    @param 			inFileTypeHint	
-						For files whose type cannot be easily or uniquely determined from the data (ADTS,AC3), 
-						this hint can be used to indicate the file type. 
-						Otherwise if you do not know the file type, you can pass zero. 
-	@param			outAudioFileStream 
+    @param 			inFileTypeHint
+						For files whose type cannot be easily or uniquely determined from the data (ADTS,AC3),
+						this hint can be used to indicate the file type.
+						Otherwise if you do not know the file type, you can pass zero.
+	@param			outAudioFileStream
 						A new file stream ID for use in other AudioFileStream API calls.
-} 
+}
 function AudioFileStreamOpen( inClientData: UnivPtr {__nullable}; inPropertyListenerProc: AudioFileStream_PropertyListenerProc; inPacketsProc: AudioFileStream_PacketsProc; inFileTypeHint: AudioFileTypeID; var outAudioFileStream: AudioFileStreamID {__nullable * __nonnull} ): OSStatus; external name '_AudioFileStreamOpen';
 (* API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) *)
 
@@ -492,20 +492,20 @@ function AudioFileStreamOpen( inClientData: UnivPtr {__nullable}; inPropertyList
 {!
 	@function		AudioFileStreamParseBytes
 
-	@discussion		This call is the means for streams to supply data to the parser. 
+	@discussion		This call is the means for streams to supply data to the parser.
 					Data is expected to be passed in sequentially from the beginning of the file, without gaps.
 					In the course of parsing, the client's property and/or packets callbacks may be called.
 					At the end of the stream, this function must be called once with null data pointer and zero
 					data byte size to flush any remaining packets out of the parser.
 
-	@param			inAudioFileStream 
+	@param			inAudioFileStream
 						The file stream ID
-	@param			inDataByteSize 
+	@param			inDataByteSize
 						The number of bytes passed in for parsing. Must be zero when flushing the parser.
-	@param			inData 
+	@param			inData
 						The data passed in to be parsed. Must be null when flushing the parser.
-	@param			inFlags 
-						If there is a data discontinuity, then kAudioFileStreamParseFlag_Discontinuity should be set true. 
+	@param			inFlags
+						If there is a data discontinuity, then kAudioFileStreamParseFlag_Discontinuity should be set true.
 }
 function AudioFileStreamParseBytes( inAudioFileStream: AudioFileStreamID; inDataByteSize: UInt32; {const} inData: UnivPtr {__nullable}; inFlags: AudioFileStreamParseFlags ): OSStatus; external name '_AudioFileStreamParseBytes';
 (* API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) *)
@@ -513,19 +513,19 @@ function AudioFileStreamParseBytes( inAudioFileStream: AudioFileStreamID; inData
 {!
 	@function		AudioFileStreamSeek
 
-	@discussion		This call is used to seek in the data stream. The client passes in a packet 
+	@discussion		This call is used to seek in the data stream. The client passes in a packet
 					offset to seek to and the parser passes back a byte offset from which to
-					get the data to satisfy that request. The data passed to the next call to 
+					get the data to satisfy that request. The data passed to the next call to
 					AudioFileParseBytes will be assumed to be from that byte offset.
-					For file formats which do not contain packet tables the byte offset may 
+					For file formats which do not contain packet tables the byte offset may
 					be an estimate. If so, the flag kAudioFileStreamSeekFlag_OffsetIsEstimated will be true.
 
-	@param			inAudioFileStream 
+	@param			inAudioFileStream
 						The file stream ID
-	@param			inPacketOffset 
+	@param			inPacketOffset
 						The offset from the beginning of the file of the packet to which to seek.
-	@param			outDataByteOffset 
-						The byte offset of the data from the file's data offset returned. 
+	@param			outDataByteOffset
+						The byte offset of the data from the file's data offset returned.
 						You need to add the value of kAudioFileStreamProperty_DataOffset to get an absolute byte offset in the file.
 	@param			ioFlags
 						If outDataByteOffset is an estimate, then kAudioFileStreamSeekFlag_OffsetIsEstimated will be set on output.
@@ -536,11 +536,11 @@ function AudioFileStreamSeek( inAudioFileStream: AudioFileStreamID; inPacketOffs
 
 {!
 	@function		AudioFileStreamGetPropertyInfo
- 
+
 	@discussion		Retrieve the info about the given property. The outSize argument
 					will return the size in bytes of the current value of the property.
- 
-	@param			inAudioFileStream 
+
+	@param			inAudioFileStream
 						The file stream ID
 	@param			inPropertyID
 						Property ID whose value should be read
@@ -548,7 +548,7 @@ function AudioFileStreamSeek( inAudioFileStream: AudioFileStreamID; inPacketOffs
 						Size in bytes of the property
 	@param			outWritable
 						whether the property is writable
- 
+
 	@result			an OSStatus return code
 }
 function AudioFileStreamGetPropertyInfo( inAudioFileStream: AudioFileStreamID; inPropertyID: AudioFileStreamPropertyID; outPropertyDataSize: UInt32Ptr {__nullable}; outWritable: BooleanPtr {__nullable} ): OSStatus; external name '_AudioFileStreamGetPropertyInfo';
@@ -557,15 +557,15 @@ function AudioFileStreamGetPropertyInfo( inAudioFileStream: AudioFileStreamID; i
 
 {!
 	@function		AudioFileStreamGetProperty
- 
-	@discussion		Retrieve the indicated property data. 
- 
-	@param			inAudioFileStream 
+
+	@discussion		Retrieve the indicated property data.
+
+	@param			inAudioFileStream
 						The file stream ID
 	@param			inPropertyID
 						Property ID whose value should be read
 	@param			ioPropertyDataSize
-						On input, the size of the buffer pointed to by outPropertyData. On output, 
+						On input, the size of the buffer pointed to by outPropertyData. On output,
 						the number of bytes written.
 	@param			outPropertyData
 						Pointer to the property data buffer
@@ -577,10 +577,10 @@ function AudioFileStreamGetProperty( inAudioFileStream: AudioFileStreamID; inPro
 
 {!
 	@function		AudioFileStreamSetProperty
- 
+
 	@discussion		Set the value of the property. There are currently no settable properties.
- 
-	@param			inAudioFileStream 
+
+	@param			inAudioFileStream
 						The file stream ID
 	@param			inPropertyID
 						Property ID whose value should be set
@@ -596,10 +596,10 @@ function AudioFileStreamSetProperty( inAudioFileStream: AudioFileStreamID; inPro
 
 {!
 	@function		AudioFileStreamClose
- 
+
 	@discussion		Close and deallocate the file stream object.
 
-	@param			inAudioFileStream 
+	@param			inAudioFileStream
 						The file stream ID
 }
 function AudioFileStreamClose( inAudioFileStream: AudioFileStreamID ): OSStatus; external name '_AudioFileStreamClose';

+ 65 - 65
packages/univint/src/AudioFormat.pas

@@ -249,7 +249,7 @@ type
 	AudioPanningModePtr = ^AudioPanningMode;
 const
 	kPanningMode_SoundField = 3;
-	kPanningMode_VectorBasedPanning = 4; 
+	kPanningMode_VectorBasedPanning = 4;
 
 {!
     @struct		AudioPanningInfo
@@ -257,20 +257,20 @@ const
     @field      mPanningMode			the PanningMode to be used for the pan
     @field      mCoordinateFlags		the coordinates are specified as in the AudioChannelDescription struct in CoreAudioTypes.h
     @field      mCoordinates			the coordinates are specified as in the AudioChannelDescription struct in CoreAudioTypes.h
-    @field      mGainScale				
+    @field      mGainScale
 					mGainScale is used to multiply the panning values.
 					In typical usage you are applying an existing volume.
 					value in 0 -> 1 (where 1 is unity gain) to the panned values.
 					1 would give you panning at unity.
 					0 would give you back a matrix of zeroes.
-    @field      mOutputChannelMap				
+    @field      mOutputChannelMap
 					This is the channel map that is going to be used to determine channel volumes for this pan.
 }
 type
 	AudioPanningInfo = record
 		mPanningMode: AudioPanningMode;
 		mCoordinateFlags: UInt32;
-		mCoordinates: array [0..3-1] of Float32;	
+		mCoordinates: array [0..3-1] of Float32;
 		mGainScale: Float32;
 		mOutputChannelMap: {const} AudioChannelLayoutPtr;
 	end;
@@ -280,7 +280,7 @@ type
     @enum		AudioBalanceFadeType
     @abstract   used for mType field of AudioBalanceFade struct
     @constant   kAudioBalanceFadeType_MaxUnityGain
-					the gain value never exceeds 1.0, the opposite channel fades out. 
+					the gain value never exceeds 1.0, the opposite channel fades out.
 					This can reduce overall loudness when the balance or fade is not in the center.
     @constant   kAudioBalanceFadeType_EqualPower
 					The overall loudness remains constant, but gain can exceed 1.0.
@@ -292,18 +292,18 @@ type
 	AudioBalanceFadeTypePtr = ^AudioBalanceFadeType;
 const
 	kAudioBalanceFadeType_MaxUnityGain = 0;
-	kAudioBalanceFadeType_EqualPower = 1; 
-	
+	kAudioBalanceFadeType_EqualPower = 1;
+
 {!
     @struct		AudioBalanceFade
     @abstract   this struct is used with kAudioFormatProperty_BalanceFade
-    @field      mLeftRightBalance 
+    @field      mLeftRightBalance
 					-1 is full left, 0 is center, +1 is full right
-    @field      mBackFrontFade 
+    @field      mBackFrontFade
 					-1 is full rear, 0 is center, +1 is full front
-    @field      mType 
+    @field      mType
 					an AudioBalanceFadeType constant
-    @field      mChannelLayout 
+    @field      mChannelLayout
 					a pointer to an AudioChannelLayout
 }
 type
@@ -318,11 +318,11 @@ type
 {!
     @struct		AudioFormatInfo
     @abstract   this struct is used as a specifier for the kAudioFormatProperty_FormatList property
-    @field      mASBD 
+    @field      mASBD
 					an AudioStreamBasicDescription
-    @field      mMagicCookie 
+    @field      mMagicCookie
 					a pointer to the decompression info for the data described in mASBD
-    @field      mMagicCookieSize 
+    @field      mMagicCookieSize
 					the size in bytes of mMagicCookie
 }
 type
@@ -336,11 +336,11 @@ type
 {!
     @struct		ExtendedAudioFormatInfo
     @abstract   this struct is used as a specifier for the kAudioFormatProperty_FormatList property
-    @field      mASBD 
+    @field      mASBD
 					an AudioStreamBasicDescription
-    @field      mMagicCookie 
+    @field      mMagicCookie
 					a pointer to the decompression info for the data described in mASBD
-    @field      mMagicCookieSize 
+    @field      mMagicCookieSize
 					the size in bytes of mMagicCookie
 	@field		mClassDescription
 					an AudioClassDescription specifying the codec to be used in answering the question.
@@ -357,9 +357,9 @@ type
 {!
     @struct		AudioFormatListItem
     @abstract   this struct is used as output from the kAudioFormatProperty_FormatList property
-    @field      mASBD 
+    @field      mASBD
 					an AudioStreamBasicDescription
-    @field      mChannelLayoutTag 
+    @field      mChannelLayoutTag
 					an AudioChannelLayoutTag
 }
 type
@@ -379,9 +379,9 @@ type
     @constant   kAudioFormatProperty_FormatInfo
 					Retrieves general information about a format. The specifier is a
 					magic cookie, or NULL.
-					On input, the property value is an AudioStreamBasicDescription which 
+					On input, the property value is an AudioStreamBasicDescription which
 					should have at least the mFormatID filled out. On output it will be filled out
-					as much as possible given the information known about the format 
+					as much as possible given the information known about the format
 					and the contents of the magic cookie (if any is given).
 					If multiple formats can be described by the AudioStreamBasicDescription and the associated magic cookie,
 					this property will return the base level format.
@@ -392,7 +392,7 @@ type
 					the format is variable bytes per packet.
     @constant   kAudioFormatProperty_FormatIsExternallyFramed
 					Returns whether or not a format requires external framing information,
-					i.e. AudioStreamPacketDescriptions. 
+					i.e. AudioStreamPacketDescriptions.
 					The specifier is an AudioStreamBasicDescription describing
 					the format to ask about. The value is a UInt32 where non-zero means
 					the format is externally framed. Any format which has variable byte sized packets
@@ -402,18 +402,18 @@ type
                     The value is a UInt32 where non-zero means the format is encrypted.
     @constant   kAudioFormatProperty_EncodeFormatIDs
 					No specifier needed. Must be set to NULL.
-					Returns an array of UInt32 format IDs for formats that are valid output formats 
-					for a converter. 
+					Returns an array of UInt32 format IDs for formats that are valid output formats
+					for a converter.
     @constant   kAudioFormatProperty_DecodeFormatIDs
 					No specifier needed. Must be set to NULL.
-					Returns an array of UInt32 format IDs for formats that are valid input formats 
-					for a converter. 
+					Returns an array of UInt32 format IDs for formats that are valid input formats
+					for a converter.
     @constant   kAudioFormatProperty_Encoders
 					The specifier is the format that you are interested in, e.g. 'aac '
-					Returns an array of AudioClassDescriptions for all installed encoders for the given format 
+					Returns an array of AudioClassDescriptions for all installed encoders for the given format
     @constant   kAudioFormatProperty_Decoders
 					The specifier is the format that you are interested in, e.g. 'aac '
-					Returns an array of AudioClassDescriptions for all installed decoders for the given format 
+					Returns an array of AudioClassDescriptions for all installed decoders for the given format
     @constant   kAudioFormatProperty_AvailableEncodeBitRates
 					The specifier is a UInt32 format ID.
 					The property value is an array of AudioValueRange describing all available bit rates.
@@ -421,15 +421,15 @@ type
 					The specifier is a UInt32 format ID.
 					The property value is an array of AudioValueRange describing all available sample rates.
     @constant   kAudioFormatProperty_AvailableEncodeChannelLayoutTags
-					The specifier is an AudioStreamBasicDescription with at least the mFormatID 
+					The specifier is an AudioStreamBasicDescription with at least the mFormatID
 					and mChannelsPerFrame fields set.
 					The property value is an array of AudioChannelLayoutTags for the format and number of
 					channels specified. If mChannelsPerFrame is zero, then all layouts supported by
-					the format are returned.	
+					the format are returned.
     @constant   kAudioFormatProperty_AvailableEncodeNumberChannels
 					The specifier is an AudioStreamBasicDescription with at least the mFormatID field set.
 					The property value is an array of UInt32 indicating the number of channels that can be encoded.
-					A value of 0xFFFFFFFF indicates that any number of channels may be encoded. 
+					A value of 0xFFFFFFFF indicates that any number of channels may be encoded.
     @constant   kAudioFormatProperty_FormatName
 					Returns a name for a given format. The specifier is an
 					AudioStreamBasicDescription describing the format to ask about.
@@ -437,31 +437,31 @@ type
 					returned string. For some formats (eg, Linear PCM) you will get back a
 					descriptive string (e.g. 16-bit, interleaved, etc...)
     @constant   kAudioFormatProperty_ASBDFromESDS
-					Returns an audio stream description for a given ESDS. The specifier is an ESDS. 
-					The value is a AudioStreamBasicDescription. If multiple formats can be described 
+					Returns an audio stream description for a given ESDS. The specifier is an ESDS.
+					The value is a AudioStreamBasicDescription. If multiple formats can be described
 					by the ESDS this property will return the base level format.
     @constant   kAudioFormatProperty_ChannelLayoutFromESDS
 					Returns an audio channel layout for a given ESDS. The specifier is an
 					ESDS. The value is a AudioChannelLayout.
     @constant   kAudioFormatProperty_ASBDFromMPEGPacket
-					Returns an audio stream description for a given MPEG Packet. The specifier is an MPEG Packet. 
-					The value is a AudioStreamBasicDescription.					
+					Returns an audio stream description for a given MPEG Packet. The specifier is an MPEG Packet.
+					The value is a AudioStreamBasicDescription.
     @constant   kAudioFormatProperty_FormatList
 					Returns a list of AudioFormatListItem structs describing the audio formats contained within the compressed bit stream
-					as described by the magic cookie. The specifier is an AudioFormatInfo struct. The mFormatID member of the 
-					ASBD struct must filled in. Formats are returned in order from the most to least 'rich', with 
-					channel count taking the highest precedence followed by sample rate. The kAudioFormatProperty_FormatList property 
+					as described by the magic cookie. The specifier is an AudioFormatInfo struct. The mFormatID member of the
+					ASBD struct must filled in. Formats are returned in order from the most to least 'rich', with
+					channel count taking the highest precedence followed by sample rate. The kAudioFormatProperty_FormatList property
 					is the preferred method for discovering format information of the audio data. If the audio data can only be described
 					by a single AudioFormatListItem, this property would be equivalent to using the kAudioFormatProperty_FormatInfo property,
-					which should be used by the application as a fallback case, to ensure backward compatibility with existing systems 
+					which should be used by the application as a fallback case, to ensure backward compatibility with existing systems
 					when kAudioFormatProperty_FormatList is not present on the running system.
     @constant   kAudioFormatProperty_OutputFormatList
 					Returns a list of AudioFormatListItem structs describing the audio formats which may be obtained by decoding the format
 					described by the specifier.
 					The specifier is an AudioFormatInfo struct. At a minimum formatID member of the ASBD struct must filled in. Other fields
-					may be filled in. If there is no magic cookie, then the number of channels and sample rate should be filled in. 
+					may be filled in. If there is no magic cookie, then the number of channels and sample rate should be filled in.
 	@constant	kAudioFormatProperty_FirstPlayableFormatFromList
-					The specifier is a list of 1 or more AudioFormatListItem. Generally it is the list of these items returned from kAudioFormatProperty_FormatList. The property value retrieved is an UInt32 that specifies an index into that list. The list that the caller provides is generally sorted with the first item as the best format (most number of channels, highest sample rate), and the returned index represents the first item in that list that can be played by the system. 
+					The specifier is a list of 1 or more AudioFormatListItem. Generally it is the list of these items returned from kAudioFormatProperty_FormatList. The property value retrieved is an UInt32 that specifies an index into that list. The list that the caller provides is generally sorted with the first item as the best format (most number of channels, highest sample rate), and the returned index represents the first item in that list that can be played by the system.
 					Thus, the property is typically used to determine the best playable format for a given (layered) audio stream
 	@constant   kAudioFormatProperty_ValidateChannelLayout
 					The specifier is an AudioChannelLayout. The property value and size are not used and must be set to NULL.
@@ -470,12 +470,12 @@ type
 					or kAudioFormatUnknownFormatError for unrecognized layout tags or channel labels.
 	@constant   kAudioFormatProperty_ChannelLayoutForTag
 					Returns the channel descriptions for a standard channel layout.
-					The specifier is a AudioChannelLayoutTag (the mChannelLayoutTag field 
-					of the AudioChannelLayout struct) containing the layout constant. 
+					The specifier is a AudioChannelLayoutTag (the mChannelLayoutTag field
+					of the AudioChannelLayout struct) containing the layout constant.
 					The value is an AudioChannelLayout structure. In typical use a AudioChannelLayout
 					can be valid with just a defined AudioChannelLayoutTag (ie, those layouts
 					have predefined speaker locations and orderings).
-					Returns an error if the tag is kAudioChannelLayoutTag_UseChannelBitmap 
+					Returns an error if the tag is kAudioChannelLayoutTag_UseChannelBitmap
     @constant   kAudioFormatProperty_TagForChannelLayout
 					Returns an AudioChannelLayoutTag for a layout, if there is one.
 					The specifier is an AudioChannelLayout containing the layout description.
@@ -484,16 +484,16 @@ type
 					or kAudioChannelLayoutTag_UseChannelBitmap to a known AudioChannelLayoutTag.
     @constant   kAudioFormatProperty_ChannelLayoutForBitmap
 					Returns the channel descriptions for a standard channel layout.
-					The specifier is a UInt32 (the mChannelBitmap field 
+					The specifier is a UInt32 (the mChannelBitmap field
 					of the AudioChannelLayout struct) containing the layout bitmap. The value
-					is an AudioChannelLayout structure. In some uses, an AudioChannelLayout can be 
+					is an AudioChannelLayout structure. In some uses, an AudioChannelLayout can be
 					valid with the layoutTag set to "use bitmap" and the bitmap set appropriately.
     @constant   kAudioFormatProperty_BitmapForLayoutTag
 					Returns a bitmap for an AudioChannelLayoutTag, if there is one.
 					The specifier is a AudioChannelLayoutTag  containing the layout tag.
 					The value is an UInt32 bitmap. The bits are as defined in CoreAudioTypes.h.
-					To go in the other direction, i.e. get a layout tag for a bitmap, 
-					use kAudioFormatProperty_TagForChannelLayout where your layout tag 
+					To go in the other direction, i.e. get a layout tag for a bitmap,
+					use kAudioFormatProperty_TagForChannelLayout where your layout tag
 					is kAudioChannelLayoutTag_UseChannelBitmap and the bitmap is filled in.
     @constant   kAudioFormatProperty_ChannelLayoutName
 					Returns the a name for a particular channel layout. The specifier is
@@ -501,7 +501,7 @@ type
 					is a CFStringRef. The caller is responsible for releasing the
 					returned string.
     @constant   kAudioFormatProperty_ChannelLayoutSimpleName
-					Returns the a simpler name for a channel layout than does kAudioFormatProperty_ChannelLayoutName. 
+					Returns the a simpler name for a channel layout than does kAudioFormatProperty_ChannelLayoutName.
 					It omits the channel labels from the name. The specifier is
 					an AudioChannelLayout containing the layout description. The value
 					is a CFStringRef. The caller is responsible for releasing the
@@ -517,21 +517,21 @@ type
 					is a CFStringRef. The caller is responsible for releasing the
 					returned string.
     @constant   kAudioFormatProperty_MatrixMixMap
-					Returns a matrix of scaling coefficients for converting audio from one channel map 
+					Returns a matrix of scaling coefficients for converting audio from one channel map
 					to another in a standard way, if one is known. Otherwise an error is returned.
-					The specifier is an array of two pointers to AudioChannelLayout structures. 
+					The specifier is an array of two pointers to AudioChannelLayout structures.
 					The first points to the input layout, the second to the output layout.
-					The value is a two dimensional array of Float32 where the first dimension (rows) 
-					is the input channel and the second dimension (columns) is the output channel. 
+					The value is a two dimensional array of Float32 where the first dimension (rows)
+					is the input channel and the second dimension (columns) is the output channel.
     @constant   kAudioFormatProperty_ChannelMap
 					Returns an array of SInt32 for reordering input channels.
-					The specifier is an array of two pointers to AudioChannelLayout structures. 
+					The specifier is an array of two pointers to AudioChannelLayout structures.
 					The first points to the input layout, the second to the output layout.
 					The length of the output array is equal to the number of output channels.
     @constant   kAudioFormatProperty_NumberOfChannelsForLayout
 					This is a general call for parsing a AudioChannelLayout provided as the specifier,
 					to determine the number of valid channels that are represented. So, if the
-					LayoutTag is specified, it returns the number of channels for that layout. If 
+					LayoutTag is specified, it returns the number of channels for that layout. If
 					the bitmap is specified, it returns the number of channels represented by that bitmap.
 					If the layout tag is 'kAudioChannelLayoutTag_UseChannelDescriptions' it returns
 						the number of channel descriptions.
@@ -540,7 +540,7 @@ type
 					In order to be equivalent, the layouts must describe the same channels in the same order.
 					Whether the layout is represented by a bitmap, channel descriptions or a channel layout tag is not significant.
 					The channel coordinates are only significant if the channel label is kAudioChannelLabel_UseCoordinates.
-					The specifier is an array of two pointers to AudioChannelLayout structures. 
+					The specifier is an array of two pointers to AudioChannelLayout structures.
 					The value is a pointer to the UInt32 result.
     @constant   kAudioFormatProperty_ChannelLayoutHash
 					Returns a UInt32 which represents the hash of the provided channel layout.
@@ -548,13 +548,13 @@ type
 					The value is a pointer to the UInt32 result.
     @constant   kAudioFormatProperty_TagsForNumberOfChannels
 					returns an array of AudioChannelLayoutTags for the number of channels specified.
-					The specifier is a UInt32 number of channels. 
+					The specifier is a UInt32 number of channels.
     @constant   kAudioFormatProperty_PanningMatrix
 					This call will pass in an AudioPanningInfo struct that specifies one of the
 					kPanningMode_ constants for the panning algorithm and an AudioChannelLayout
 					to describe the destination channel layout. As in kAudioFormatProperty_MatrixMixMap
 					the return value is an array of Float32 values of the number of channels
-						represented by this specified channel layout. It is presumed that the source 
+						represented by this specified channel layout. It is presumed that the source
 					being panned is mono (thus for a quad channel layout, 4 Float32 values are returned).
 					The intention of this API is to provide support for panning operations that are
 					strictly manipulating the respective volumes of the channels. Thus, more
@@ -566,18 +566,18 @@ type
 					For stereo formats, vector based panning is equivalent to the equal-power pan mode.
     @constant   kAudioFormatProperty_BalanceFade
 					get an array of coefficients for applying left/right balance and front/back fade.
-					The specifier is an AudioBalanceFade struct. 
+					The specifier is an AudioBalanceFade struct.
 					the return value is an array of Float32 values of the number of channels
-						represented by this specified channel layout.  
+						represented by this specified channel layout.
 					The volume values will typically be presented within a 0->1 range (where 1 is unity gain)
     @constant   kAudioFormatProperty_ID3TagSize
-					Returns a UInt32 indicating the ID3 tag size. 
+					Returns a UInt32 indicating the ID3 tag size.
 					The specifier must begin with the ID3 tag header and be at least 10 bytes in length
     @constant   kAudioFormatProperty_ID3TagToDictionary
 					Returns a CFDictionary containing key/value pairs for the frames in the ID3 tag
 					The specifier is the entire ID3 tag
 					Caller must call CFRelease for the returned dictionary
-					
+
 }
 const
 //=============================================================================
@@ -601,7 +601,7 @@ const
 	kAudioFormatProperty_AvailableEncodeSampleRates = FourCharCode('aesr');
 	kAudioFormatProperty_AvailableEncodeChannelLayoutTags = FourCharCode('aecl');
 	kAudioFormatProperty_AvailableEncodeNumberChannels = FourCharCode('avnc');
-	kAudioFormatProperty_ASBDFromMPEGPacket = FourCharCode('admp'); 
+	kAudioFormatProperty_ASBDFromMPEGPacket = FourCharCode('admp');
 
 
 //=============================================================================
@@ -623,14 +623,14 @@ const
 	kAudioFormatProperty_ChannelShortName = FourCharCode('csnm');
 	kAudioFormatProperty_TagsForNumberOfChannels = FourCharCode('tagc');
 	kAudioFormatProperty_PanningMatrix = FourCharCode('panm');
-	kAudioFormatProperty_BalanceFade = FourCharCode('balf'); 
+	kAudioFormatProperty_BalanceFade = FourCharCode('balf');
 
 //=============================================================================
 //	The following properties concern the ID3 Tags
 //=============================================================================
 
 	kAudioFormatProperty_ID3TagSize = FourCharCode('id3s');
-	kAudioFormatProperty_ID3TagToDictionary = FourCharCode('id3d'); 
+	kAudioFormatProperty_ID3TagToDictionary = FourCharCode('id3d');
 
 
 //=============================================================================

+ 11 - 11
packages/univint/src/AudioHardware.pas

@@ -232,7 +232,7 @@ uses MacTypes, CFRunLoop, CoreAudioTypes, AudioHardwareBase;
     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
@@ -242,36 +242,36 @@ uses MacTypes, CFRunLoop, CoreAudioTypes, AudioHardwareBase;
     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 
+
+    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.
@@ -279,7 +279,7 @@ uses MacTypes, CFRunLoop, CoreAudioTypes, AudioHardwareBase;
     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
@@ -301,7 +301,7 @@ uses MacTypes, CFRunLoop, CoreAudioTypes, AudioHardwareBase;
 //#pragma mark Basic Constants
 
 {!
-    @enum           Predefined AudioObjectID values 
+    @enum           Predefined AudioObjectID values
     @abstract       ObjectIDs that are always the same
     @constant       kAudioObjectSystemObject
                         The AudioObjectID that always refers to the one and only instance of the
@@ -1453,7 +1453,7 @@ const
  }
 const
 	kAudioAggregateDeviceIsStackedKey = 'stacked';
-    
+
 //==================================================================================================
 //#pragma mark    AudioAggregateDevice Properties
 

+ 7 - 7
packages/univint/src/AudioHardwareBase.pas

@@ -225,7 +225,7 @@ uses MacTypes,CoreAudioTypes;
 //#pragma mark Overview
 {!
     @header AudioHardwareBase
-    
+
     This file defines the HAL's object model including the properties and their needed types and
     constants that describe the proeprty values.
 }
@@ -372,7 +372,7 @@ const
 	kAudioDevicePermissionsError = FourCharCode('!hog');
 
 {!
-    @enum           Predefined AudioObjectID values 
+    @enum           Predefined AudioObjectID values
     @abstract       ObjectIDs that are always the same
     @constant       kAudioObjectUnknown
                         This is the sentinel value. No object will have an ID whose value is 0.
@@ -580,7 +580,7 @@ const
                         UID doesn't refer to any AudioEndpoints. Rather, this property will return
                         kAudioObjectUnknown as the value of the property.
     @constant       kAudioTransportManagerPorpertyTransportType
-                        A UInt32 whose value indicates how the transport manager's endpoints and 
+                        A UInt32 whose value indicates how the transport manager's endpoints and
 						endpoint devices are connected to the CPU. Constants for some of the values
 						for this property can be found in the enum in the AudioDevice Constants
 						section of this file.
@@ -937,7 +937,7 @@ const
                         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. 
+                        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
@@ -1220,12 +1220,12 @@ const
                         or the current IO session stops and a new IO session starts.
     @constant       kAudioTalkbackControlClassID
                         An AudioBooleanControl where true means that the talkback channel is
-                        enabled. This control is for talkback channels that are handled outside of 
+                        enabled. This control is for talkback channels that are handled outside of
                         the regular IO channels. If the talkback channel is among the normal IO
                         channels, it will use AudioMuteControl.
     @constant       kAudioListenbackControlClassID
                         An AudioBooleanControl where true means that the listenback channel is
-                        audible. This control is for listenback channels that are handled outside of 
+                        audible. This control is for listenback channels that are handled outside of
                         the regular IO channels. If the listenback channel is among the normal IO
                         channels, it will use AudioMuteControl.
 }
@@ -1314,7 +1314,7 @@ const
 	kAudioSelectorControlPropertyItemKind = FourCharCode('clkk');
 
 {!
-    @enum           Constants for the value of the property, kAudioSelectorControlPropertyItemKind 
+    @enum           Constants for the value of the property, kAudioSelectorControlPropertyItemKind
                     for any selector control item
     @constant       kAudioSelectorControlItemKindSpacer
                         This ID represents an item in a selector control's range that represents a

+ 4 - 4
packages/univint/src/AudioHardwareService.pas

@@ -3,9 +3,9 @@
 	@framework	AudioToolbox.framework
 	@copyright	(c) 2006-2015 by Apple, Inc., all rights reserved.
     @abstract   API's for general high level audio services.
- 
+
     @discussion
- 
+
      The Audio Hardware Service (AHS) provides a way for applications to query and manipulate the
      aspects of an audio hardware device without incurring the overhead of loading the full audio
      HAL. AHS provides access to all the AudioObjects and their properties on the system. However,
@@ -228,7 +228,7 @@ uses MacTypes,AudioHardwareBase,AudioHardware;
 
 
 
-    
+
 //==================================================================================================
 //#pragma mark    Audio Hardware Service Properties
 
@@ -261,7 +261,7 @@ uses MacTypes,AudioHardwareBase,AudioHardware;
 const
 	kAudioHardwareServiceProperty_ServiceRestarted = FourCharCode('srst');
 	kAudioHardwareServiceDeviceProperty_VirtualMasterVolume = FourCharCode('vmvc');
-	kAudioHardwareServiceDeviceProperty_VirtualMasterBalance = FourCharCode('vmbc'); 
+	kAudioHardwareServiceDeviceProperty_VirtualMasterBalance = FourCharCode('vmbc');
 
 //==================================================================================================
 //#pragma mark    Audio Hardware Service Functions

+ 55 - 55
packages/univint/src/AudioQueue.pas

@@ -5,7 +5,7 @@
     @abstract   API's to record and play audio buffers.
 
     @discussion
-    
+
 	Audio queues are software objects you use for recording or playing audio in Mac OS X. Audio
 	queues perform the following tasks:
 
@@ -325,7 +325,7 @@ type
                                                     or vice versa.
     @constant   kAudioQueueErr_InvalidQueueType     The queue is an input queue but the function can
                                                     only operate on an output queue, or vice versa.
-    @constant   kAudioQueueErr_Permissions          You do not have the required permissions to call 
+    @constant   kAudioQueueErr_Permissions          You do not have the required permissions to call
                                                     the function
     @constant   kAudioQueueErr_InvalidPropertyValue The specified property value is invalid.
     @constant   kAudioQueueErr_PrimeTimedOut        During Prime, the queue's AudioConverter failed to
@@ -383,7 +383,7 @@ const
 	kAudioQueueErr_BufferEnqueuedTwice = -66666;
 	kAudioQueueErr_CannotStartYet = -66665;
 	kAudioQueueErr_EnqueueDuringReset = -66632;
-	kAudioQueueErr_InvalidOfflineMode = -66626; 
+	kAudioQueueErr_InvalidOfflineMode = -66626;
 
 
 {!
@@ -404,7 +404,7 @@ const
         A read/write property whose value is a CFStringRef that contains the unique identifier
         (UID) of the associated audio device.
 		If the audio queue is tracking the default system device and the device changes, it will
-		generate a property changed notification for this property. You can then query the HAL 
+		generate a property changed notification for this property. You can then query the HAL
 		for info on the new default system device.
     @constant   kAudioQueueProperty_MagicCookie
         A read/write property whose value is an audio format magic cookie. If the audio format
@@ -416,7 +416,7 @@ const
     @constant   kAudioQueueProperty_StreamDescription
         A read-only AudioStreamBasicDescription that indicates the queue's recording format.
         This is useful when recording, where you may specify a sample rate of 0 during
-        construction, 
+        construction,
     @constant   kAudioQueueProperty_ChannelLayout
         A read/write property whose value is an audio channel layout structure that describes
         the audio queue's channel layout. The number of channels must match the format of the
@@ -460,11 +460,11 @@ const
 	kAudioQueueDeviceProperty_SampleRate = FourCharCode('aqsr');        // value is Float64
 	kAudioQueueDeviceProperty_NumberChannels = FourCharCode('aqdc');        // value is UInt32
 	kAudioQueueProperty_CurrentDevice = FourCharCode('aqcd');        // value is CFStringRef
-    
+
 	kAudioQueueProperty_MagicCookie = FourCharCode('aqmc');        // value is void*
 	kAudioQueueProperty_MaximumOutputPacketSize = FourCharCode('xops');        // value is UInt32
 	kAudioQueueProperty_StreamDescription = FourCharCode('aqft');        // value is AudioStreamBasicDescription
-       
+
 	kAudioQueueProperty_ChannelLayout = FourCharCode('aqcl');        // value is AudioChannelLayout
 	kAudioQueueProperty_EnableLevelMetering = FourCharCode('aqme');        // value is UInt32
 	kAudioQueueProperty_CurrentLevelMeter = FourCharCode('aqmv');        // value is array of AudioQueueLevelMeterState, 1 per channel
@@ -492,7 +492,7 @@ const
 const
 	kAudioQueueTimePitchAlgorithm_Spectral = FourCharCode('spec');
 	kAudioQueueTimePitchAlgorithm_TimeDomain = FourCharCode('tido');
-	kAudioQueueTimePitchAlgorithm_Varispeed = FourCharCode('vspd'); 
+	kAudioQueueTimePitchAlgorithm_Varispeed = FourCharCode('vspd');
 
 
 {!
@@ -500,7 +500,7 @@ const
     @abstract   Constants that identify the parameters for audio queues.
     @discussion
         You can set a parameter in one of two ways:
-        
+
         <ul>
         <li>    Assign a parameter value to an audio queue to take effect immediately using
                 AudioQueueSetParameter.</li>
@@ -508,7 +508,7 @@ const
                 parameter when you queue a buffer, and the new value of the parameter is applied
                 when that buffer is rendered.
         </ul>
-        
+
         AudioQueueGetParameter always returns the current value of the parameter
 
     @constant   kAudioQueueParam_Volume
@@ -520,7 +520,7 @@ const
         applicable when the time/pitch processor has been enabled and on Mac OS X 10.6 and higher.
     @constant   kAudioQueueParam_Pitch
         A value from -2400 to 2400 indicating the number of cents to pitch-shift the queue's
-        playback. (1200 cents is one octave.) Only applicable when the time/pitch processor has 
+        playback. (1200 cents is one octave.) Only applicable when the time/pitch processor has
         been enabled with the spectral algorithm, and on Mac OS X 10.6 and higher.
     @constant   kAudioQueueParam_VolumeRampTime
         A value indicating the number of seconds over which subsequent volume changes will be
@@ -536,7 +536,7 @@ const
 	kAudioQueueParam_PlayRate = 2;
 	kAudioQueueParam_Pitch = 3;
 	kAudioQueueParam_VolumeRampTime = 4;
-	kAudioQueueParam_Pan = 13; 
+	kAudioQueueParam_Pan = 13;
 
 {!
     @enum       AudioQueueProcessingTap flags
@@ -544,7 +544,7 @@ const
 
     @discussion
         In the flags passed to AudioQueueProcessingTapNew, either the PreEffects
-        or PostEffects flag must be set, but not both. 
+        or PostEffects flag must be set, but not both.
 
     @constant   kAudioQueueProcessingTap_PreEffects
         Signifies that the processing tap is inserted before any effects.
@@ -588,16 +588,16 @@ const
 {!
     @struct     AudioQueueBuffer
     @abstract   Defines a buffer of audio data to be managed by an audio queue.
-    @discussion 
+    @discussion
         Each audio queue has an associated set of audio queue buffers. You can request that a
         queue allocate buffers using the AudioQueueAllocateBuffer function and dispose of them
         using the AudioQueueFreeBuffer function.
-        
+
         You may also use AudioQueueAllocateBufferWithPacketDescriptions to allocate buffers
-        with space for AudioPacketDescriptions, as used in VBR formats. The 
+        with space for AudioPacketDescriptions, as used in VBR formats. The
         mPacketDescriptionCapacity, mmPacketDescriptions, and mPacketDescriptionCount
         fields may only be used with buffers allocated with this function.
-        
+
     @field      mAudioDataBytesCapacity
         The size of the buffer, in bytes. This size is set when the buffer is allocated and
         cannot be changed.
@@ -647,7 +647,7 @@ type
     @abstract   Specifies a value for an audio queue parameter.
     @discussion
         Two ways are available to supply an audio queue with parameters:
-        
+
         <ul>
         <li>    Provide one or more parameters by calling the
                 AudioQueueEnqueueBufferWithParameters function. In this case, the parameters are
@@ -655,13 +655,13 @@ type
         <li>    Assign a parameter value immediately to an audio queue by calling the
                 AudioQueueSetParameter function.</li>
         </ul>
-        
+
         Note that the AudioQueueGetParameter function always returns the actual value of the
         parameter.
 
         In Mac OS X v10.5, audio queues have one parameter available: kAudioQueueParam_Volume,
         which controls the queue's playback volume.
-        
+
     @field      mID
         The parameter.
     @field      mValue
@@ -735,7 +735,7 @@ type
         is invoked each time the recording audio queue has filled a buffer with input data.
         Typically, your callback should write the audio queue buffer's data to a file or other
         buffer, and then re-queue the audio queue buffer to receive more data.
-        
+
     @param      inUserData
         The value you've specified in the inUserData parameter of the AudioQueueNewInput
         function.
@@ -763,7 +763,7 @@ type
                 property changes value.
     @discussion
         You assign a property listener callback when calling AudioQueueAddPropertyListener.
-        
+
     @param      inUserData
         A pointer to the data specified by the inUserData parameter of the
         AudioQueueAddPropertyListener function.
@@ -868,7 +868,7 @@ type
     @param      ioData
                     For non-siphoning taps, on entry, the buffer pointers are null and the lengths
                     are zero. On exit, they should contain the tap's output.
-                    
+
                     Siphoning taps receive valid buffers which they must not alter.
 }
 type
@@ -892,7 +892,7 @@ type
         AudioQueueEnqueueBuffer). The callback receives buffers and typically queues them again.
         To schedule a buffer for playback, providing parameter and start time information, call
         AudioQueueEnqueueBufferWithParameters.
-       
+
     @param      inFormat
         A pointer to a structure describing the format of the audio data to be played. For
         linear PCM, only interleaved formats are supported. Compressed formats are supported.
@@ -925,14 +925,14 @@ function AudioQueueNewOutput( const (*var*) inFormat: AudioStreamBasicDescriptio
     @function   AudioQueueNewInput
     @abstract   Creates a new audio queue for recording audio data.
     @discussion
-        
+
         Outline of how to use the queue for input:
-        
+
         - create input queue
         - allocate buffers
         - enqueue buffers (AudioQueueEnqueueBuffer, not with parameters, no packet descriptions)
         - the callback receives buffers and re-enqueues them
-        
+
     @param      inFormat
         A pointer to a structure describing the format of the audio data to be recorded. For
         linear PCM, only interleaved formats are supported. Compressed formats are supported.
@@ -974,7 +974,7 @@ function AudioQueueNewInput( const (*var*) inFormat: AudioStreamBasicDescription
         processed. Whether you call AudioQueueDispose synchronously or asynchronously, you can
         no longer interact with the queue, and the queue no longer invokes any callbacks to your
         application after the function returns.
-		
+
 		Note that if AudioQueueDispose is called from a buffer completion callback or property
 		listener, you may receive further callbacks afterwards.
     @result     An OSStatus result code.
@@ -995,7 +995,7 @@ function AudioQueueDispose( inAQ: AudioQueueRef; inImmediate: Boolean ): OSStatu
         Once allocated, the pointer to the buffer and the buffer's size are fixed and cannot be
         changed. The mAudioDataByteSize field in the audio queue buffer structure,
         AudioQueueBuffer, is initially set to 0.
-        
+
     @param      inAQ
         The audio queue you want to allocate a buffer.
     @param      inBufferByteSize
@@ -1016,7 +1016,7 @@ function AudioQueueAllocateBuffer( inAQ: AudioQueueRef; inBufferByteSize: UInt32
         Once allocated, the pointer to the buffer and the buffer's size are fixed and cannot be
         changed. The mAudioDataByteSize field in the audio queue buffer structure,
         AudioQueueBuffer, is initially set to 0.
-        
+
     @param      inAQ
         The audio queue you want to allocate a buffer.
     @param      inBufferByteSize
@@ -1059,7 +1059,7 @@ function AudioQueueFreeBuffer( inAQ: AudioQueueRef; inBuffer: AudioQueueBufferRe
         the client should provide packet descriptions in the buffer's mPacketDescriptions
         and mPacketDescriptionCount fields rather than in inPacketDescs and
         inNumPacketDescs, which should be NULL and 0, respectively, in this case.
-        
+
         For an input queue, pass 0 and NULL for inNumPacketDescs and inPacketDescs,
         respectively. Your callback will receive packet descriptions owned by the audio queue.
 
@@ -1088,7 +1088,7 @@ function AudioQueueEnqueueBuffer( inAQ: AudioQueueRef; inBuffer: AudioQueueBuffe
         You can exert some control of the buffer queue by using this function. You can assign
         audio queue settings that are in effect carried by an audio queue buffer as you enqueue
         it. Hence, these changes only take effect when an audio queue buffer begins playing.
-        
+
         This function queues a buffer for playback only, not for recording. Audio queues for
         recording have no parameters, do not support variable-bit-rate (VBR) formats (which
         might require trimming), and have a different way to handle timing. When queued for
@@ -1131,7 +1131,7 @@ function AudioQueueEnqueueBuffer( inAQ: AudioQueueRef; inBuffer: AudioQueueBuffe
         queued. If multiple buffers are queued, their times must be in ascending order or NULL;
         otherwise, an error occurs. The start time indicates when the actual audio data in the
         buffer is to be played (that is, the trim frames are not counted).
-        
+
         Note: When specifying a start time for a buffer, if the buffer is not the first enqueued
         since AudioQueueStop or AudioQueueReset, it is normally necessary to call AudioQueueFlush
         before AudioQueueEnqueueBufferWithParameters.
@@ -1243,15 +1243,15 @@ function AudioQueuePause( inAQ: AudioQueueRef ): OSStatus; external name '_Audio
         audio; otherwise, some of the audio might not play in the next set of queued buffers.
         The only time it is not necessary to call AudioQueueFlush is following AudioQueueStop
         with inImmediate=false. (This action internally calls AudioQueueFlush.)
-        
+
         Also, you might wish to call this function before calling AudioQueueStop depending on
         whether you want to stop immediately regardless of what has played or whether you want
         to ensure that all buffered data and all data that is in the middle of processing gets
         recorded or played before stopping.
-        
+
     @param      inAQ
         The audio queue to be flushed.
-        
+
     @result     An OSStatus result code.
 }
 function AudioQueueFlush( inAQ: AudioQueueRef ): OSStatus; external name '_AudioQueueFlush';
@@ -1322,7 +1322,7 @@ function AudioQueueGetParameter( inAQ: AudioQueueRef; inParamID: AudioQueueParam
 function AudioQueueSetParameter( inAQ: AudioQueueRef; inParamID: AudioQueueParameterID; inValue: AudioQueueParameterValue ): OSStatus; external name '_AudioQueueSetParameter';
 (* API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) *)
 
-                                                                        
+
 //#pragma /mark -
 //#pragma /mark Property Management
 //=============================================================================
@@ -1332,7 +1332,7 @@ function AudioQueueSetParameter( inAQ: AudioQueueRef; inParamID: AudioQueueParam
 {!
     @function   AudioQueueGetProperty
     @abstract   Obtains an audio queue property value.
-    @discussion 
+    @discussion
     @param      inAQ
         The audio queue whose property value you want to obtain.
     @param      inID
@@ -1351,7 +1351,7 @@ function AudioQueueGetProperty( inAQ: AudioQueueRef; inID: AudioQueuePropertyID;
 {!
     @function   AudioQueueSetProperty
     @abstract   Sets an audio queue property value.
-    @discussion 
+    @discussion
     @param      inAQ
         The audio queue whose property value you want to set.
     @param      inID
@@ -1371,7 +1371,7 @@ function AudioQueueSetProperty( inAQ: AudioQueueRef; inID: AudioQueuePropertyID;
 {!
     @function   AudioQueueGetPropertySize
     @abstract   Obtains the size of an audio queue property.
-    @discussion 
+    @discussion
     @param      inAQ
         The audio queue containing the property value whose size you want to obtain.
     @param      inID
@@ -1388,7 +1388,7 @@ function AudioQueueGetPropertySize( inAQ: AudioQueueRef; inID: AudioQueuePropert
 {!
     @function   AudioQueueAddPropertyListener
     @abstract   Adds a listener callback for a property.
-    @discussion 
+    @discussion
         This callback is used to act upon a change in an audio queue property such as
         kAudioQueueProperty_IsRunning. For instance, if your application has a user interface
         with a Play/Stop button, and kAudioQueueProperty_IsRunning changes, you need to update
@@ -1410,7 +1410,7 @@ function AudioQueueAddPropertyListener( inAQ: AudioQueueRef; inID: AudioQueuePro
 {!
     @function   AudioQueueRemovePropertyListener
     @abstract   Removes a listener callback for a property.
-    @discussion 
+    @discussion
     @param      inAQ
         The audio queue that owns the property from which you want to remove a listener.
     @param      inID
@@ -1425,7 +1425,7 @@ function AudioQueueAddPropertyListener( inAQ: AudioQueueRef; inID: AudioQueuePro
 function AudioQueueRemovePropertyListener( inAQ: AudioQueueRef; inID: AudioQueuePropertyID; inProc: AudioQueuePropertyListenerProc; inUserData: UnivPtr {__nullable} ): OSStatus; external name '_AudioQueueRemovePropertyListener';
 (* API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) *)
 
-                                    
+
 
 //#pragma /mark -
 //#pragma /mark Handling Timing
@@ -1520,7 +1520,7 @@ function AudioQueueDeviceGetCurrentTime( inAQ: AudioQueueRef; var outTimeStamp:
     @discussion
         This function converts from one time representation to another (for example, from sample
         time to host time or vice versa):
-        
+
         <ul>
         <li>    Sample time is the absolute sample frame time.
         Sample numbers are the count of the samples on the audio device.</li>
@@ -1627,8 +1627,8 @@ function AudioQueueOfflineRender( inAQ: AudioQueueRef; const (*var*) inTimestamp
 
                 The processing is performed on audio either before or after any effects or other
                 processing (varispeed, etc) is applied by the audio queue, depending on inFlags.
-    
-    @param      inAQ    
+
+    @param      inAQ
                     The audio queue from which to create the processing tap
     @param      inCallback
                     A callback which the queue will call to process the audio
@@ -1663,7 +1663,7 @@ function AudioQueueOfflineRender( inAQ: AudioQueueRef; const (*var*) inTimestamp
                     most efficient from its playback (or recording) requirement.
     @param      outAQTap
                     The processing tap object.
-                    
+
     @result     An OSStatus result code.
 }
 function AudioQueueProcessingTapNew( inAQ: AudioQueueRef; inCallback: AudioQueueProcessingTapCallback; inClientData: UnivPtr {__nullable}; inFlags: AudioQueueProcessingTapFlags; var outMaxFrames: UInt32; var outProcessingFormat: AudioStreamBasicDescription; var outAQTap: AudioQueueProcessingTapRef {__nullable * __nonnull} ): OSStatus; external name '_AudioQueueProcessingTapNew';
@@ -1672,10 +1672,10 @@ function AudioQueueProcessingTapNew( inAQ: AudioQueueRef; inCallback: AudioQueue
 {!
     @function   AudioQueueProcessingTapDispose
     @abstract   Dispose a processing tap object
-    @discussion 
+    @discussion
                 As with AudioQueueProcessingTapNew, this call can only be made on an
                 audio queue that is stopped (paused is not sufficient)
-    
+
     @param      inAQTap
                     The processing tap to dispose.
 
@@ -1687,9 +1687,9 @@ function AudioQueueProcessingTapDispose( inAQTap: AudioQueueProcessingTapRef ):
 {!
     @function   AudioQueueProcessingTapGetSourceAudio
     @abstract   Used by a processing tap to retrieve source audio.
-    @discussion 
+    @discussion
         This function may only be called from the processing tap's callback.
-    
+
     @param      inAQTap
                     the processing tap
     @param      inNumberFrames
@@ -1711,7 +1711,7 @@ function AudioQueueProcessingTapDispose( inAQTap: AudioQueueProcessingTapRef ):
                     callback. If the buffer pointers are non-NULL, then they must be big enough to
                     hold inNumberFrames, and the audio queue will copy its source data into those
                     buffers.
-                    
+
    @result     An OSStatus result code.
 }
 function AudioQueueProcessingTapGetSourceAudio( inAQTap: AudioQueueProcessingTapRef; inNumberFrames: UInt32; var ioTimeStamp: AudioTimeStamp; var outFlags: AudioQueueProcessingTapFlags; var outNumberFrames: UInt32; var ioData: AudioBufferList ): OSStatus; external name '_AudioQueueProcessingTapGetSourceAudio';
@@ -1720,11 +1720,11 @@ function AudioQueueProcessingTapGetSourceAudio( inAQTap: AudioQueueProcessingTap
 {!
     @function   AudioQueueProcessingTapGetQueueTime
     @abstract   Used by a processing tap to retrieve the queue's current time.
-    @discussion 
+    @discussion
         This function may only be called from the processing tap's callback, and only
         for audio output queues. It must be called after calling
         AudioQueueProcessingTapGetSourceAudio.
-    
+
     @param      inAQTap
                     the processing tap
     @param      outQueueSampleTime
@@ -1736,7 +1736,7 @@ function AudioQueueProcessingTapGetSourceAudio( inAQTap: AudioQueueProcessingTap
                     to the tap if the queue's playback rate is currently other than 1.0, due to the
                     use of time compression/expansion. The frame count can also be 0 if the queue is
                     paused.
-                    
+
    @result     An OSStatus result code.
 }
 function AudioQueueProcessingTapGetQueueTime( inAQTap: AudioQueueProcessingTapRef; var outQueueSampleTime: Float64; var outQueueFrameCount: UInt32 ): OSStatus; external name '_AudioQueueProcessingTapGetQueueTime';

+ 31 - 31
packages/univint/src/AudioServices.pas

@@ -236,15 +236,15 @@ uses MacTypes,CFBase,CFRunLoop,AudioHardware,AudioHardwareService,CoreFoundation
     @abstract       Error codes returned from the AudioServices portion of the API.
     @constant       kAudioServicesNoError
                         No error has occurred
-    @constant       kAudioServicesUnsupportedPropertyError 
+    @constant       kAudioServicesUnsupportedPropertyError
                         The property is not supported.
-    @constant       kAudioServicesBadPropertySizeError 
+    @constant       kAudioServicesBadPropertySizeError
                         The size of the property data was not correct.
-    @constant       kAudioServicesBadSpecifierSizeError 
+    @constant       kAudioServicesBadSpecifierSizeError
                         The size of the specifier data was not correct.
-    @constant       kAudioServicesSystemSoundUnspecifiedError 
+    @constant       kAudioServicesSystemSoundUnspecifiedError
                         A SystemSound unspecified error has occurred.
-    @constant       kAudioServicesSystemSoundClientTimedOutError 
+    @constant       kAudioServicesSystemSoundClientTimedOutError
                         The SystemSound client message timed out
     @constant       kAudioServicesSystemSoundExceededMaximumDurationError
                         The SystemSound's duration exceeded the allowable threshold
@@ -256,7 +256,7 @@ const
 	kAudioServicesBadSpecifierSizeError = FourCharCode('!spc');
 	kAudioServicesSystemSoundUnspecifiedError = -1500;
 	kAudioServicesSystemSoundClientTimedOutError = -1501;
-	kAudioServicesSystemSoundExceededMaximumDurationError = -1502; 
+	kAudioServicesSystemSoundExceededMaximumDurationError = -1502;
 
 //==================================================================================================
 //#pragma mark    AudioServices Types
@@ -297,7 +297,7 @@ type
 {!
     @enum           AudioServices constants
     @abstract       Constants for use with System Sound portion of the AudioServices APIs.
-    @constant       kSystemSoundID_UserPreferredAlert 
+    @constant       kSystemSoundID_UserPreferredAlert
                         Use this constant with the play sound APIs to
                         playback the alert sound selected by the User in System Preferences.
     @constant       kSystemSoundID_FlashScreen
@@ -306,9 +306,9 @@ type
 }
 const
 	kSystemSoundID_UserPreferredAlert = $00001000;
-	kSystemSoundID_FlashScreen = $00000FFE; 
+	kSystemSoundID_FlashScreen = $00000FFE;
         // this has been renamed to be consistent
-	kUserPreferredAlert = kSystemSoundID_UserPreferredAlert; 
+	kUserPreferredAlert = kSystemSoundID_UserPreferredAlert;
 
 
 //==================================================================================================
@@ -322,15 +322,15 @@ const
                         inSpecifier parameter will respect the 'Play user interface sounds effects'
                         check box in System Preferences and be silent when the user turns off UI
                         sounds. This property is set to 1 by default. Set to 0 if it is desired for
-                        an SystemSoundID to always be heard when passed to AudioServicesPlaySystemSound(), 
+                        an SystemSoundID to always be heard when passed to AudioServicesPlaySystemSound(),
                         regardless of user's setting in the Sound Preferences.
-    @constant       kAudioServicesPropertyCompletePlaybackIfAppDies 
+    @constant       kAudioServicesPropertyCompletePlaybackIfAppDies
                         a UInt32 where 1 means that the SystemSoundID passed in the
                         inSpecifier parameter will finish playing even if the client application goes away.
 }
 const
 	kAudioServicesPropertyIsUISound = FourCharCode('isui');
-	kAudioServicesPropertyCompletePlaybackIfAppDies = FourCharCode('ifdi'); 
+	kAudioServicesPropertyCompletePlaybackIfAppDies = FourCharCode('ifdi');
 
 //==================================================================================================
 //#pragma mark    AudioServices Functions
@@ -342,9 +342,9 @@ const
 {!
     @function       AudioServicesCreateSystemSoundID
     @abstract       Allows the application to designate an audio file for playback by the System Sound server.
-    @discussion     Returned SystemSoundIDs are passed to AudioServicesPlayAlertSoundWithCompletion() 
+    @discussion     Returned SystemSoundIDs are passed to AudioServicesPlayAlertSoundWithCompletion()
                     and AudioServicesPlaySystemSoundWithCompletion() to be played.
- 
+
                     The maximum supported duration for a system sound is 30 secs.
     @param          inFileURL
                         A CFURLRef for an AudioFile.
@@ -353,7 +353,7 @@ const
 }
 function AudioServicesCreateSystemSoundID( inFileURL: CFURLRef; var outSystemSoundID: SystemSoundID ): OSStatus; external name '_AudioServicesCreateSystemSoundID';
 (* API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) *)
-	
+
 {!
     @function       AudioServicesDisposeSystemSoundID
     @abstract       Allows the System Sound server to dispose any resources needed for the provided
@@ -384,7 +384,7 @@ type
 
 procedure AudioServicesPlayAlertSoundWithCompletion(inSystemSoundID: SystemSoundID; inCompletionBlock: TCompletionBlock); external name '_AudioServicesPlayAlertSoundWithCompletion';
 (* API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0)) *)
-                                                                
+
 {!
     @function       AudioServicesPlaySystemSoundWithCompletion
     @abstract       Play a system sound
@@ -392,13 +392,13 @@ procedure AudioServicesPlayAlertSoundWithCompletion(inSystemSoundID: SystemSound
     @param          inSystemSoundID
                         The SystemSoundID to be played.
     @param          inCompletionBlock
-                        The completion block gets executed for every attempt to play a system sound irrespective 
-                        of success or failure. The callbacks are issued on a serial queue and the client is 
+                        The completion block gets executed for every attempt to play a system sound irrespective
+                        of success or failure. The callbacks are issued on a serial queue and the client is
                         responsible for handling thread safety.
 }
 procedure AudioServicesPlaySystemSoundWithCompletion(inSystemSoundID: SystemSoundID; inCompletionBlock: TCompletionBlock); external name '_AudioServicesPlaySystemSoundWithCompletion';
 (* API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0)) *)
-                                                                
+
 {!
     @function       AudioServicesGetPropertyInfo
     @abstract       Get information about the size of an AudioServices property and whether it can
@@ -416,7 +416,7 @@ procedure AudioServicesPlaySystemSoundWithCompletion(inSystemSoundID: SystemSoun
     @param          outWritable
                         Will be set to 1 if writable, or 0 if read only.
     @result         returns kAudioServicesNoError if successful.
-}                            
+}
 function AudioServicesGetPropertyInfo( inPropertyID: AudioServicesPropertyID; inSpecifierSize: UInt32; {const} inSpecifier: UnivPtr {__nullable}; outPropertyDataSize: UInt32Ptr {* __nullable}; outWritable: BooleanPtr {* __nullable} ): OSStatus; external name '_AudioServicesGetPropertyInfo';
 (* API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) *)
 
@@ -438,7 +438,7 @@ function AudioServicesGetPropertyInfo( inPropertyID: AudioServicesPropertyID; in
                         wants ioPropertyDataSize to be filled with the amount that would have been
                         written.
     @result         returns kAudioServicesNoError if successful.
-}                        
+}
 function AudioServicesGetProperty( inPropertyID: AudioServicesPropertyID; inSpecifierSize: UInt32; {const} inSpecifier: UnivPtr {__nullable}; var ioPropertyDataSize: UInt32; outPropertyData: UnivPtr {__nullable} ): OSStatus; external name '_AudioServicesGetProperty';
 (* API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) *)
 
@@ -460,24 +460,24 @@ function AudioServicesGetProperty( inPropertyID: AudioServicesPropertyID; inSpec
 }
 function AudioServicesSetProperty( inPropertyID: AudioServicesPropertyID; inSpecifierSize: UInt32; {const} inSpecifier: UnivPtr {__nullable}; inPropertyDataSize: UInt32; inPropertyData: {const} UnivPtr ): OSStatus; external name '_AudioServicesSetProperty';
 (* API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) *)
-                                                                
+
 {!
     This function will be deprecated in a future release. Use AudioServicesPlayAlertSoundWithCompletion instead.
- 
+
     @function       AudioServicesPlayAlertSound
     @abstract       Play an Alert Sound
     @discussion     Play the provided SystemSoundID with AlertSound behavior.
     @param          inSystemSoundID
                         A SystemSoundID for the System Sound server to play. On the desktop you
-                        can pass the kSystemSoundID_UserPreferredAlert constant to playback the alert sound 
+                        can pass the kSystemSoundID_UserPreferredAlert constant to playback the alert sound
                         selected by the user in System Preferences. On iOS there is no preferred user alert sound.
 }
 procedure AudioServicesPlayAlertSound( inSystemSoundID: SystemSoundID ); external name '_AudioServicesPlayAlertSound';
 (* API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) *)
-                                                                
+
 {!
     This function will be deprecated in a future release. Use AudioServicesPlaySystemSoundWithCompletion instead.
- 
+
     @function       AudioServicesPlaySystemSound
     @abstract       Play the sound designated by the provided SystemSoundID.
     @discussion     A SystemSoundID indicating the desired System Sound to be played.
@@ -486,11 +486,11 @@ procedure AudioServicesPlayAlertSound( inSystemSoundID: SystemSoundID ); externa
 }
 procedure AudioServicesPlaySystemSound( inSystemSoundID: SystemSoundID ); external name '_AudioServicesPlaySystemSound';
 (* API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) *)
-                                                                
+
 {!
-    This function will be deprecated in a future release. Use AudioServicesPlayAlertSoundWithCompletion 
+    This function will be deprecated in a future release. Use AudioServicesPlayAlertSoundWithCompletion
     or AudioServicesPlaySystemSoundWithCompletion instead.
- 
+
     @function       AudioServicesAddSystemSoundCompletion
     @abstract       Call the provided Completion Routine when provided SystemSoundID
                     finishes playing.
@@ -517,7 +517,7 @@ function AudioServicesAddSystemSoundCompletion( inSystemSoundID: SystemSoundID;
 {!
     This function will be deprecated in a future release. Use AudioServicesPlayAlertSoundWithCompletion
     or AudioServicesPlaySystemSoundWithCompletion instead.
- 
+
     @function       AudioServicesRemoveSystemSoundCompletion
     @abstract       Disassociate any completion proc for the specified SystemSoundID
     @discussion     Tells the SystemSound client to remove any completion proc associated with the
@@ -530,7 +530,7 @@ procedure AudioServicesRemoveSystemSoundCompletion( inSystemSoundID: SystemSound
 (* API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) *)
 
 //CF_ASSUME_NONNULL_END
-    
+
 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
 
 end.

+ 9 - 9
packages/univint/src/AudioUnitCarbonViews.pas

@@ -264,7 +264,7 @@ type
 	@typedef	AudioUnitCarbonViewEventListener
 	@abstract	Defines a callback function that is called when certain events occur in an
 				Audio Unit Carbon view, such as mouse-down and up events on a control.
-				
+
 	@param		inUserData
 					A user-defined pointer that was passed to an AudioUnitCarbonViewSetEventListener callback.
 	@param		inView
@@ -285,13 +285,13 @@ type
 {!
 	@function	AudioUnitCarbonViewCreate
 	@abstract	A callback that tells an Audio unit Carbon view to open its user interface (user pane).
-	@discussion	The host application specifies the audio unit which the view is to control. The host 
-				also provides the window, parent control, and rectangle into which the Audio unit 
+	@discussion	The host application specifies the audio unit which the view is to control. The host
+				also provides the window, parent control, and rectangle into which the Audio unit
 				Carbon view component (of type AudioUnitCarbonView) is to create itself.
 
 				The host application is responsible for closing the component (by calling the
 				CloseComponent function) before closing its window.
-				
+
 	@param		inView
 					The view component instance.
 	@param		inAudioUnit
@@ -299,14 +299,14 @@ type
 	@param		inWindow
 					The Carbon window in which the user interface is to be opened.
 	@param		inParentControl
-					The Carbon control into which the user interface is to be embedded. 
+					The Carbon control into which the user interface is to be embedded.
 					(This is typically the window's root control).
 	@param		inLocation
-					The host application's requested location for the view. The view should 
+					The host application's requested location for the view. The view should
 					always create itself at the specified location.
 	@param		inSize
-					The host application's requested size for the view. The view may choose a 
-					different size for itself. The actual dimensions of the view are described 
+					The host application's requested size for the view. The view may choose a
+					different size for itself. The actual dimensions of the view are described
 					by the value of the outControl parameter.
 	@param		outControl
 					The Carbon control which contains the entire user interface for the view.
@@ -320,7 +320,7 @@ function AudioUnitCarbonViewCreate( inView: AudioUnitCarbonView; inAudioUnit: Au
 	@abstract	Add an event listener to the carbon view.
 	@deprecated	in Mac OS X version 10.4
 	@discussion	Use the AUEventListener functions in <AudioToolbox/AudioUnitUtilities.h> instead.
-	
+
 	@param		inView
 					The Carbon view component instance.
 	@param		inCallback

+ 176 - 176
packages/univint/src/AudioUnitParameters.pas

@@ -223,7 +223,7 @@ uses MacTypes;
 
 { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 The following specifies the equivalent parameterID's for the Group scope for standard
-MIDI Controllers. This list is not exhaustive. It represents the parameters, and their corresponding 
+MIDI Controllers. This list is not exhaustive. It represents the parameters, and their corresponding
 MIDI messages, that should be supported in Group scope by MIDI capable AUs.
 
 Group scope parameter IDs from 0 < 512 are reserved for mapping MIDI controllers.
@@ -250,16 +250,16 @@ const
 	kAUGroupParameterID_Foot_LSB = kAUGroupParameterID_Foot + 32; 		// value 0 < 128
 	kAUGroupParameterID_Expression_LSB = kAUGroupParameterID_Expression + 32; 	// value 0 < 128
 	kAUGroupParameterID_DataEntry_LSB = kAUGroupParameterID_DataEntry + 32; 	// value 0 < 128
-	
+
 	kAUGroupParameterID_KeyPressure_FirstKey = 256; 	// value 0 < 128
 	kAUGroupParameterID_KeyPressure_LastKey = 383; 	// value 0 < 128
 { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Supporting the kAUGroupParameterID_KeyPressure parameter indicates to hosts that your audio unit
-supports polyphonic "aftertouch" key pressure. 
+supports polyphonic "aftertouch" key pressure.
 
-Each of the 128 MIDI key numbers can have its own value for polyphonic aftertouch. To respond to 
-aftertouch for a particular key, your audio unit needs to support an additional parameter 
-specifically for that key. The aftertouch parameter ID for a given MIDI key is equal to the MIDI 
+Each of the 128 MIDI key numbers can have its own value for polyphonic aftertouch. To respond to
+aftertouch for a particular key, your audio unit needs to support an additional parameter
+specifically for that key. The aftertouch parameter ID for a given MIDI key is equal to the MIDI
 key number plus 256. For example, the aftertouch parameter ID for MIDI key #60 (middle C) is:
 
 	60 + kAUGroupParameterID_KeyPressure_FirstKey = 316
@@ -267,12 +267,12 @@ key number plus 256. For example, the aftertouch parameter ID for MIDI key #60 (
 
 { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 The following sections specify the parameter IDs for the audio units included in Mac OS X.
-Host applications can use these IDs to directly address these parameters without first discovering 
+Host applications can use these IDs to directly address these parameters without first discovering
 them through the AUParameterInfo mechanism (see the AudioUnitProperties.h header file)
 
 Each parameter is preceeded by a comment that indicates scope, unit of measurement, minimum
 value, maximum value, and default value.
-    
+
 See the AudioUnitProperties.h header file for additional information that a parameter may report
 
 When displaying to the user information about a parameter, a host application should always
@@ -282,20 +282,20 @@ get the parameter information from the audio unit itself.
 // Parameters for all Panner AudioUnits
 const
 // Global, Linear, 0->1, 1
-	kPannerParam_Gain = 0;			
-	
+	kPannerParam_Gain = 0;
+
         // Global, Degrees, -180->180, 0
-	kPannerParam_Azimuth = 1;		
+	kPannerParam_Azimuth = 1;
         // Global, Degrees, -90->90, 0
-	kPannerParam_Elevation = 2;	
-		
+	kPannerParam_Elevation = 2;
+
         // Global, Linear, 0->1, 1
 	kPannerParam_Distance = 3;		// 0 .. 1
-	
+
         // Global, Meters, 0.01->1000, 1
-	kPannerParam_CoordScale = 4;	
+	kPannerParam_CoordScale = 4;
         // Global, Meters, 0.01->1000, 1
-	kPannerParam_RefDistance = 5; 
+	kPannerParam_RefDistance = 5;
 
 
 //#pragma mark Apple Specific
@@ -303,59 +303,59 @@ const
 // Parameters for the AUSpatialMixer unit
 const
 // Input, Degrees, -180->180, 0
-	kSpatialMixerParam_Azimuth = 0; 
-    
+	kSpatialMixerParam_Azimuth = 0;
+
     // Input, Degrees, -90->90, 0
-	kSpatialMixerParam_Elevation = 1; 
-    
+	kSpatialMixerParam_Elevation = 1;
+
     // Input, Metres, 0->10000, 0
-	kSpatialMixerParam_Distance = 2; 
-    
+	kSpatialMixerParam_Distance = 2;
+
     // Input/Output, dB, -120->20, 0
-	kSpatialMixerParam_Gain = 3; 
-	
+	kSpatialMixerParam_Gain = 3;
+
     // Input, rate scaler	0.5 -> 2.0
-	kSpatialMixerParam_PlaybackRate = 4; 
-    
+	kSpatialMixerParam_PlaybackRate = 4;
+
     // bus enable : 0.0 or 1.0
-	kSpatialMixerParam_Enable = 5; 
-    
+	kSpatialMixerParam_Enable = 5;
+
     // Minimum input gain constraint : 0.0 -> 1.0
-	kSpatialMixerParam_MinGain = 6; 
-    
+	kSpatialMixerParam_MinGain = 6;
+
     // Maximum input gain constraint : 0.0 -> 1.0
-	kSpatialMixerParam_MaxGain = 7; 
-	
+	kSpatialMixerParam_MaxGain = 7;
+
     // Input, Dry/Wet equal-power blend, %	  0.0 -> 100.0
-	kSpatialMixerParam_ReverbBlend = 8; 
-    
+	kSpatialMixerParam_ReverbBlend = 8;
+
     // Global, dB,		-40.0 -> +40.0
-	kSpatialMixerParam_GlobalReverbGain = 9; 
-	
+	kSpatialMixerParam_GlobalReverbGain = 9;
+
     // Input, Lowpass filter attenuation at 5KHz :		decibels -100.0dB -> 0.0dB
     // smaller values make both direct and reverb sound more muffled; a value of 0.0 indicates no filtering
     // Occlusion is a filter applied to the sound prior to the reverb send
-	kSpatialMixerParam_OcclusionAttenuation = 10; 
-	
+	kSpatialMixerParam_OcclusionAttenuation = 10;
+
     // Input, Lowpass filter attenuation at 5KHz :		decibels -100.0dB -> 0.0dB
     // smaller values make direct sound more muffled; a value of 0.0 indicates no filtering
     // Obstruction is a filter applied to the "direct" part of the sound (so is post reverb send)
-	kSpatialMixerParam_ObstructionAttenuation = 11; 
+	kSpatialMixerParam_ObstructionAttenuation = 11;
 
 // Reverb parameters applicable to AUSpatialMixer
 const
 // Global, Hertz, 10.0 -> 20000.0, 800.0
-	kReverbParam_FilterFrequency = 14; 
-    
+	kReverbParam_FilterFrequency = 14;
+
     // Global, Octaves, 0.05 -> 4.0, 3.0
-	kReverbParam_FilterBandwidth = 15; 
-    
+	kReverbParam_FilterBandwidth = 15;
+
     // Global, Decibels, -18.0 -> +18.0, 0.0
-	kReverbParam_FilterGain = 16; 
-    
+	kReverbParam_FilterGain = 16;
+
     // Global, Indexed, 0->kNumAUNBandEQFilterTypes-1, 0
 	kReverbParam_FilterType = 17;        // only available for AUSpatialMixer
-    
+
     // Global, Boolean, 0->1, 1
 	kReverbParam_FilterEnable = 18;         // only available for AUSpatialMixer
 
@@ -364,16 +364,16 @@ const
 const
 // Input, Degrees, -180->180, 0
 	k3DMixerParam_Azimuth = 0;
-        
+
 		// Input, Degrees, -90->90, 0
 	k3DMixerParam_Elevation = 1;
-        
+
 		// Input, Metres, 0->10000, 0
 	k3DMixerParam_Distance = 2;
-        
+
 		// Input/Output, dB, -120->20, 0
 	k3DMixerParam_Gain = 3;
-	
+
 		// Input, rate scaler	0.5 -> 2.0
 	k3DMixerParam_PlaybackRate = 4;
 
@@ -385,20 +385,20 @@ const
 
 		// Global, dB,		-40.0 -> +40.0
 	k3DMixerParam_GlobalReverbGain = 6;
-	
+
 		// Input, Lowpass filter attenuation at 5KHz :		decibels -100.0dB -> 0.0dB
 		// smaller values make both direct and reverb sound more muffled; a value of 0.0 indicates no filtering
 		// Occlusion is a filter applied to the sound prior to the reverb send
 	k3DMixerParam_OcclusionAttenuation = 7;
-	
+
 		// Input, Lowpass filter attenuation at 5KHz :		decibels -100.0dB -> 0.0dB
 		// smaller values make direct sound more muffled; a value of 0.0 indicates no filtering
 		// Obstruction is a filter applied to the "direct" part of the sound (so is post reverb send)
 	k3DMixerParam_ObstructionAttenuation = 8;
-	
+
 		// Input/Output, dB, -120->20, 0
 	k3DMixerParam_MinGain = 9;
-	
+
 		// Input/Output, dB, -120->20, 0
 	k3DMixerParam_MaxGain = 10;
 
@@ -418,9 +418,9 @@ const
 // these are available for both desktop and iphone
 const
 // Global, Linear Gain, 0->1, 1. (the volume value can actually be any finite number, including negative.)
-	kMultiChannelMixerParam_Volume = 0; 
+	kMultiChannelMixerParam_Volume = 0;
 		// Global, Boolean, 0->1, 1
-	kMultiChannelMixerParam_Enable = 1; 
+	kMultiChannelMixerParam_Enable = 1;
 		// Global, Pan, -1->1, 0
 	kMultiChannelMixerParam_Pan = 2; 			// -1 - 0 - 1, only valid when output is not mono
 													// setting kAudioUnitProperty_MatrixLevels overrides any
@@ -436,20 +436,20 @@ const
 // Parameters for the AUMatrixMixer unit
 const
 	kMatrixMixerParam_Volume = 0;
-	kMatrixMixerParam_Enable = 1; 
-	
+	kMatrixMixerParam_Enable = 1;
+
 		// read-only
 	// these report level in dB, as do the other mixers
 	kMatrixMixerParam_PreAveragePower = 1000;
 	kMatrixMixerParam_PrePeakHoldLevel = 2000;
 	kMatrixMixerParam_PostAveragePower = 3000;
-	kMatrixMixerParam_PostPeakHoldLevel = 4000; 
+	kMatrixMixerParam_PostPeakHoldLevel = 4000;
 
 	// these report linear levels - for "expert" use only.
 	kMatrixMixerParam_PreAveragePowerLinear = 5000;
 	kMatrixMixerParam_PrePeakHoldLevelLinear = 6000;
 	kMatrixMixerParam_PostAveragePowerLinear = 7000;
-	kMatrixMixerParam_PostPeakHoldLevelLinear = 8000; 
+	kMatrixMixerParam_PostPeakHoldLevelLinear = 8000;
 
 
 // Output Units
@@ -468,42 +468,42 @@ const
 const
 // rate control.
 		// Global, rate, 1/32 -> 32.0, 1.0
-	kNewTimePitchParam_Rate = 0; 
-	
+	kNewTimePitchParam_Rate = 0;
+
 		// pitch shift in cents.
 		// Global, Cents, -2400 -> 2400, 1.0
-	kNewTimePitchParam_Pitch = 1; 
-	
+	kNewTimePitchParam_Pitch = 1;
+
 		// Overlap is the number of overlapped spectral windows that are used to produce the output.
 		// The value of overlap is directly proportional to CPU cost. More overlaps can make smooth
 		// passages sound smoother. For percussive sound, a lower overlap may be better.
 		// Global, generic, 3.0 -> 32.0, 8.0
-	kNewTimePitchParam_Overlap = 4; 
-	
+	kNewTimePitchParam_Overlap = 4;
+
 		// Peak locking enforces phase coherence of spectral peaks.
 		// Peak locking adds some expense but results in a less "phasey"
 		// or reverberant sound, sometimes also called loss of presence.
 		// However the flip side is that it can sound more stuttery for some content.
 		// Global, Boolean, 0->1, 1
-	kNewTimePitchParam_EnablePeakLocking = 6; 
+	kNewTimePitchParam_EnablePeakLocking = 6;
 
 // Parameters for the AUSampler unit
 const
 // Global, dB, -90->12, 0
-	kAUSamplerParam_Gain = 900; 
+	kAUSamplerParam_Gain = 900;
 
 		// Global, Semitones, -24->24, 0
-	kAUSamplerParam_CoarseTuning = 901; 
+	kAUSamplerParam_CoarseTuning = 901;
 
 		// Global, Cents, -99->99, 0
-	kAUSamplerParam_FineTuning = 902; 
+	kAUSamplerParam_FineTuning = 902;
 
 		// Global, -1.0->1.0, 0
-	kAUSamplerParam_Pan = 903; 
+	kAUSamplerParam_Pan = 903;
 
 // Effect units
 // The values for some effect unit parameters depend on the audio unit's sample rate.
-// For example, maximum values are typically the Nyquist frequency (indicated here as 
+// For example, maximum values are typically the Nyquist frequency (indicated here as
 // SampleRate/2).
 
 // Parameters for the AUBandpass unit
@@ -518,7 +518,7 @@ const
 const
 // Global, Hz, 10->(SampleRate/2), 6900
 	kHipassParam_CutoffFrequency = 0;
-		
+
 		// Global, dB, -20->40, 0
 	kHipassParam_Resonance = 1;
 
@@ -526,7 +526,7 @@ const
 const
 // Global, Hz, 10->(SampleRate/2), 6900
 	kLowPassParam_CutoffFrequency = 0;
-		
+
 		// Global, dB, -20->40, 0
 	kLowPassParam_Resonance = 1;
 
@@ -534,7 +534,7 @@ const
 const
 // Global, Hz, 10000->(SampleRate/2), 10000
 	kHighShelfParam_CutOffFrequency = 0;
-		
+
 		// Global, dB, -40->40, 0
 	kHighShelfParam_Gain = 1;
 
@@ -542,7 +542,7 @@ const
 const
 // Global, Hz, 10->200, 80
 	kAULowShelfParam_CutoffFrequency = 0;
-		
+
 		// Global, dB, -40->40, 0
 	kAULowShelfParam_Gain = 1;
 
@@ -550,10 +550,10 @@ const
 const
 // Global, Hz, 20->(SampleRate/2), 2000
 	kParametricEQParam_CenterFreq = 0;
-		
+
 		// Global, Hz, 0.1->20, 1.0
 	kParametricEQParam_Q = 1;
-		
+
 		// Global, dB, -20->20, 0
 	kParametricEQParam_Gain = 2;
 
@@ -561,10 +561,10 @@ const
 const
 // Global, Secs, 0.001->0.03, 0.012
 	kLimiterParam_AttackTime = 0;
-		
+
 		// Global, Secs, 0.001->0.06, 0.024
 	kLimiterParam_DecayTime = 1;
-		
+
 		// Global, dB, -40->40, 0
 	kLimiterParam_PreGain = 2;
 
@@ -576,25 +576,25 @@ const
 const
 // Global, dB, -40->20, -20
 	kDynamicsProcessorParam_Threshold = 0;
-		
+
 		// Global, dB, 0.1->40.0, 5
 	kDynamicsProcessorParam_HeadRoom = 1;
-		
+
 		// Global, rate, 1->50.0, 2
 	kDynamicsProcessorParam_ExpansionRatio = 2;
-		
+
 		// Global, dB
 	kDynamicsProcessorParam_ExpansionThreshold = 3;
-		
+
 		// Global, secs, 0.0001->0.2, 0.001
 	kDynamicsProcessorParam_AttackTime = 4;
-		
+
 		// Global, secs, 0.01->3, 0.05
 	kDynamicsProcessorParam_ReleaseTime = 5;
-		
+
 		// Global, dB, -40->40, 0
 	kDynamicsProcessorParam_MasterGain = 6;
-	
+
 		// Global, dB, read-only parameter
 	kDynamicsProcessorParam_CompressionAmount = 1000;
 	kDynamicsProcessorParam_InputAmplitude = 2000;
@@ -609,7 +609,7 @@ const
 	kVarispeedParam_PlaybackCents = 1;
 
 
-// Parameters for the Distortion unit 
+// Parameters for the Distortion unit
 const
 // Global, Milliseconds, 0.1 -> 500, 0.1
 	kDistortionParam_Delay = 0;
@@ -617,23 +617,23 @@ const
 	kDistortionParam_Decay = 1;
 		// Global, Percent, 0 -> 100, 50
 	kDistortionParam_DelayMix = 2;
-	
+
 		// Global, Percent, 0 -> 100
 	kDistortionParam_Decimation = 3;
 		// Global, Percent, 0 -> 100, 0
 	kDistortionParam_Rounding = 4;
 		// Global, Percent, 0 -> 100, 50
 	kDistortionParam_DecimationMix = 5;
-	
+
 		// Global, Linear Gain, 0 -> 1, 1
-	kDistortionParam_LinearTerm = 6;  
+	kDistortionParam_LinearTerm = 6;
 		// Global, Linear Gain, 0 -> 20, 0
-	kDistortionParam_SquaredTerm = 7;	
+	kDistortionParam_SquaredTerm = 7;
 		// Global, Linear Gain, 0 -> 20, 0
-	kDistortionParam_CubicTerm = 8;  
+	kDistortionParam_CubicTerm = 8;
 		// Global, Percent, 0 -> 100, 50
 	kDistortionParam_PolynomialMix = 9;
-	
+
 		// Global, Hertz, 0.5 -> 8000, 100
 	kDistortionParam_RingModFreq1 = 10;
 		// Global, Hertz, 0.5 -> 8000, 100
@@ -642,26 +642,26 @@ const
 	kDistortionParam_RingModBalance = 12;
 		// Global, Percent, 0 -> 100, 0
 	kDistortionParam_RingModMix = 13;
-				
+
 		// Global, dB, -80 -> 20, -6
 	kDistortionParam_SoftClipGain = 14;
-		
+
 		// Global, Percent, 0 -> 100, 50
 	kDistortionParam_FinalMix = 15;
 
 // Parameters for the AUDelay unit
 const
 // Global, EqPow Crossfade, 0->100, 50
-	kDelayParam_WetDryMix = 0; 
-		
+	kDelayParam_WetDryMix = 0;
+
 		// Global, Secs, 0->2, 1
-	kDelayParam_DelayTime = 1; 
-		
+	kDelayParam_DelayTime = 1;
+
 		// Global, Percent, -100->100, 50
-	kDelayParam_Feedback = 2; 
-		
+	kDelayParam_Feedback = 2;
+
 		// Global, Hz, 10->(SampleRate/2), 15000
-	kDelayParam_LopassCutoff = 3; 
+	kDelayParam_LopassCutoff = 3;
 
 // Parameters for the AUNBandEQ unit
 // Note that the parameter IDs listed correspond to band 0 (zero) of the unit. The parameter IDs for
@@ -672,27 +672,27 @@ const
 // kAUNBandEQParam_GlobalsGain is an overall gain and does not have a band.
 const
 // Global, dB, -96->24, 0
-	kAUNBandEQParam_GlobalGain = 0; 
-	
+	kAUNBandEQParam_GlobalGain = 0;
+
     // Global, Boolean, 0 or 1, 1
-	kAUNBandEQParam_BypassBand = 1000; 
-	
+	kAUNBandEQParam_BypassBand = 1000;
+
     // Global, Indexed, 0->kNumAUNBandEQFilterTypes-1, 0
-	kAUNBandEQParam_FilterType = 2000; 
-	
+	kAUNBandEQParam_FilterType = 2000;
+
     // Global, Hz, 20->(SampleRate/2), 1000
-	kAUNBandEQParam_Frequency = 3000; 
-	
+	kAUNBandEQParam_Frequency = 3000;
+
     // Global, dB, -96->24, 0
-	kAUNBandEQParam_Gain = 4000; 
-	
+	kAUNBandEQParam_Gain = 4000;
+
     // Global, octaves, 0.05->5.0, 0.5
-	kAUNBandEQParam_Bandwidth = 5000; 
+	kAUNBandEQParam_Bandwidth = 5000;
 
 {!
  @enum			AUNBandEQ filter types
  @discussion		Constants available as values for the kAUNBandEQParam_FilterType parameter defined above
- 
+
  @constant		kAUNBandEQFilterType_Parametric
  Parametric filter based on Butterworth analog prototype. Uses parameterization where
  the bandwidth is specifed as the relationship of the upper bandedge frequency to the
@@ -703,67 +703,67 @@ const
  - kAUNBandEQParam_Frequency (center frequency)
  - kAUNBandEQParam_Gain (peak gain)
  - kAUNBandEQParam_Bandwidth
- 
+
  @constant		kAUNBandEQFilterType_2ndOrderButterworthLowPass
  Simple Butterworth 2nd order low pass filter
  Applicable parameters:
  - kAUNBandEQParam_Frequency (-3 dB cutoff frequency)
- 
+
  @constant		kAUNBandEQFilterType_2ndOrderButterworthHighPass
  Simple Butterworth 2nd order high pass filter
  Applicable parameters:
  - kAUNBandEQParam_Frequency (-3 dB cutoff frequency)
- 
+
  @constant		kAUNBandEQFilterType_ResonantLowPass
  Low pass filter with resonance support (via bandwidth parameter)
  Applicable parameters:
  - kAUNBandEQParam_Frequency (-3 dB cutoff frequency)
  - kAUNBandEQParam_Bandwidth
- 
+
  @constant		kAUNBandEQFilterType_ResonantHighPass
  High pass filter with resonance support (via bandwidth parameter)
  Applicable parameters:
  - kAUNBandEQParam_Frequency (-3 dB cutoff frequency)
  - kAUNBandEQParam_Bandwidth
- 
+
  @constant		kAUNBandEQFilterType_BandPass
  Band pass filter
  Applicable parameters:
  - kAUNBandEQParam_Frequency (center frequency)
  - kAUNBandEQParam_Bandwidth
- 
+
  @constant		kAUNBandEQFilterType_BandStop
  Band stop filter (aka "notch filter")
  Applicable parameters:
  - kAUNBandEQParam_Frequency (center frequency)
  - kAUNBandEQParam_Bandwidth
- 
+
  @constant		kAUNBandEQFilterType_LowShelf
  Low shelf filter
  Applicable parameters:
  - kAUNBandEQParam_Frequency (center frequency)
  - kAUNBandEQParam_Gain (shelf gain)
- 
+
  @constant		kAUNBandEQFilterType_HighShelf
  High shelf filter
  Applicable parameters:
  - kAUNBandEQParam_Frequency (center frequency)
  - kAUNBandEQParam_Gain (shelf gain)
- 
+
  @constant		kAUNBandEQFilterType_ResonantLowShelf
  Low shelf filter with resonance support (via bandwidth parameter)
  Applicable parameters:
  - kAUNBandEQParam_Frequency (center frequency)
  - kAUNBandEQParam_Gain (shelf gain)
  - kAUNBandEQParam_Bandwidth
- 
+
  @constant		kAUNBandEQFilterType_ResonantHighShelf
  High shelf filter with resonance support (via bandwidth parameter)
  Applicable parameters:
  - kAUNBandEQParam_Frequency (center frequency)
  - kAUNBandEQParam_Gain (shelf gain)
  - kAUNBandEQParam_Bandwidth
- 
+
  }
 const
 	kAUNBandEQFilterType_Parametric = 0;
@@ -777,24 +777,24 @@ const
 	kAUNBandEQFilterType_HighShelf = 8;
 	kAUNBandEQFilterType_ResonantLowShelf = 9;
 	kAUNBandEQFilterType_ResonantHighShelf = 10;
-	kNumAUNBandEQFilterTypes = 11; 
+	kNumAUNBandEQFilterTypes = 11;
 
 
 // Parameters for the AURoundTripAACParam unit
 const
 // Global, indexed : AAC, HE-AAC, HE-AACv2
-	kRoundTripAACParam_Format = 0; 
-	
+	kRoundTripAACParam_Format = 0;
+
 		// Global, indexed
-	kRoundTripAACParam_EncodingStrategy = 1; 
+	kRoundTripAACParam_EncodingStrategy = 1;
 
 		// Global, indexed
-	kRoundTripAACParam_RateOrQuality = 2; 
+	kRoundTripAACParam_RateOrQuality = 2;
 
 		// These are deprecated:
 	kRoundTripAACParam_BitRate = 1;
 	kRoundTripAACParam_Quality = 2;
-	kRoundTripAACParam_CompressedFormatSampleRate = 3; 
+	kRoundTripAACParam_CompressedFormatSampleRate = 3;
 
 //#pragma mark Apple Specific - Desktop
 
@@ -809,34 +809,34 @@ const
 const
 // Global, EqPow CrossFade, 0->100, 100
 	kReverbParam_DryWetMix = 0;
-		
+
 		// Global, EqPow CrossFade, 0->100, 50
 	kReverbParam_SmallLargeMix = 1;
-		
+
 		// Global, Secs, 0.005->0.020, 0.06
 	kReverbParam_SmallSize = 2;
-		
+
 		// Global, Secs, 0.4->10.0, 3.07
 	kReverbParam_LargeSize = 3;
-		
+
 		// Global, Secs, 0.001->0.03, 0.025
 	kReverbParam_PreDelay = 4;
-		
+
 		// Global, Secs, 0.001->0.1, 0.035
 	kReverbParam_LargeDelay = 5;
-		
+
 		// Global, Genr, 0->1, 0.28
 	kReverbParam_SmallDensity = 6;
-		
+
 		// Global, Genr, 0->1, 0.82
 	kReverbParam_LargeDensity = 7;
-		
+
 		// Global, Genr, 0->1, 0.3
 	kReverbParam_LargeDelayRange = 8;
-		
+
 		// Global, Genr, 0.1->1, 0.96
 	kReverbParam_SmallBrightness = 9;
-		
+
 		// Global, Genr, 0.1->1, 0.49
 	kReverbParam_LargeBrightness = 10;
 
@@ -847,7 +847,7 @@ const
 	kReverbParam_ModulationRate = 12;
 
 		// Global, Genr, 0.0 -> 1.0, 0.2
-	kReverbParam_ModulationDepth = 13; 
+	kReverbParam_ModulationDepth = 13;
 
 // Parameters for the AUMultibandCompressor unit
 const
@@ -889,7 +889,7 @@ const
 	kMultibandCompressorParam_EQ3 = 17;
 		// Global, dB, -20 -> 20, 0
 	kMultibandCompressorParam_EQ4 = 18;
-	
+
 	// read-only parameters
 		// Global, dB, 0 -> 20
 	kMultibandCompressorParam_CompressionAmount1 = 1000;
@@ -933,14 +933,14 @@ const
 	kMultibandFilter_CenterGain1 = 4;
 		// Global, Octaves, 0.05 -> 3.0, 2.0
 	kMultibandFilter_Bandwidth1 = 5;
-	
+
 		// Global, Hertz, 10 -> (SampleRate/2), 100
 	kMultibandFilter_CenterFreq2 = 6;
 		// Global, dB, -18 -> +18, 0
 	kMultibandFilter_CenterGain2 = 7;
 		// Global, Octaves, 0.05 -> 3.0, 2.0
 	kMultibandFilter_Bandwidth2 = 8;
-	
+
 		// Global, Hertz, 10 -> (SampleRate/2), 100
 	kMultibandFilter_CenterFreq3 = 9;
 		// Global, dB, -18 -> +18, 0
@@ -953,24 +953,24 @@ const
 		// Global, Hertz, 10 -> (SampleRate/2), 100
 	kMultibandFilter_HighFrequency = 13;
 		// Global, dB, -18 -> +18, 0
-	kMultibandFilter_HighGain = 14; 
+	kMultibandFilter_HighGain = 14;
 
 // Parameters for AURogerBeep
 const
 // Global, dB, -80 -> 0, -6
-	kRogerBeepParam_InGateThreshold = 0; 
+	kRogerBeepParam_InGateThreshold = 0;
 		// Global, Milliseconds, 0 -> 1000, 1000
-	kRogerBeepParam_InGateThresholdTime = 1; 
+	kRogerBeepParam_InGateThresholdTime = 1;
 		// Global, dB, -80 -> 0, -6
-	kRogerBeepParam_OutGateThreshold = 2; 
+	kRogerBeepParam_OutGateThreshold = 2;
 		// Global, Milliseconds, 0 -> 1000, 1000
-	kRogerBeepParam_OutGateThresholdTime = 3; 	
+	kRogerBeepParam_OutGateThresholdTime = 3;
 		// Global, indexed, 0 -> 2, 2
-	kRogerBeepParam_Sensitivity = 4; 	
+	kRogerBeepParam_Sensitivity = 4;
 		// Global, indexed, 0 -> 2, 0
-	kRogerBeepParam_RogerType = 5; 
+	kRogerBeepParam_RogerType = 5;
 		// Global, dB, -80 -> 20, -6
-	kRogerBeepParam_RogerGain = 6; 
+	kRogerBeepParam_RogerGain = 6;
 
 // Mixer Units
 
@@ -978,10 +978,10 @@ const
 const
 // Input/Output, Mixer Fader Curve, 0->1, 1
 	kStereoMixerParam_Volume = 0;
-		
+
 		// Input, Pan, 0->1, 0.5
 	kStereoMixerParam_Pan = 1;
-	
+
 		// read-only
 		//
 		// For each of the following, use the parameter ID for the left channel
@@ -991,7 +991,7 @@ const
 	kStereoMixerParam_PreAveragePower = 1000;
 	kStereoMixerParam_PrePeakHoldLevel = 2000;
 	kStereoMixerParam_PostAveragePower = 3000;
-	kStereoMixerParam_PostPeakHoldLevel = 4000; 
+	kStereoMixerParam_PostPeakHoldLevel = 4000;
 
 // Parameters for the AUNetReceive unit
 const
@@ -1013,7 +1013,7 @@ const
 	kAUNetStatus_Overflow = 2;
 	kAUNetStatus_Underflow = 3;
 	kAUNetStatus_Connecting = 4;
-	kAUNetStatus_Listening = 5; 
+	kAUNetStatus_Listening = 5;
 
 // Music Device
 // Parameters for the DLSMusicDevice unit - defined and reported in the global scope
@@ -1027,15 +1027,15 @@ const
 		// Global, dB, -120->40, 0
 	kMusicDeviceParam_ReverbVolume = 2;
 // In Mac OS X v10.5, the DLSMusicDevice audio unit does not report parameters in the Group scope.
-// However, parameter values can be set in Group scope that correspond to controller values defined  
+// However, parameter values can be set in Group scope that correspond to controller values defined
 // by the MIDI specification. This includes the standard MIDI Controller values (such as Volume and
-// Mod Wheel) as well as MIDI status messages (such as Pitch Bend and Channel Pressure) and the 
+// Mod Wheel) as well as MIDI status messages (such as Pitch Bend and Channel Pressure) and the
 // MIDI RPN control messages.
 
-// For MIDI status messages, use a value of 0 for the "channel part" (lower four bits) when setting  
-// these parameters. This allows audio units to distinguish these IDs from the 0-127 
+// For MIDI status messages, use a value of 0 for the "channel part" (lower four bits) when setting
+// these parameters. This allows audio units to distinguish these IDs from the 0-127
 // values used by MIDI controllers in the first byte of status messages.
-// 
+//
 // The element ID represents the group or channel number.
 //
 // You can use the MusicDeviceMIDIEvent function to send a MIDI formatted control command to a device.
@@ -1043,14 +1043,14 @@ const
 // You can use the SetParameter API calls, declared in the AUComponent.h header file, as follows:
 //
 //	scope == kAudioUnitScope_Group
-//	element == groupID -> in MIDI equivalent to channel number 0->15, 
+//	element == groupID -> in MIDI equivalent to channel number 0->15,
 //			but this is not a limitation of the MusicDevice and values greater than 15 can be specified
 //	paramID == midi controller value (0->127), (status bytes corresponding to pitch bend, channel pressure)
 //	value == typically the range associated with the corresponding MIDI message	(7 bit, 0->127)
 //			pitch bend is specified as a 14 bit value
-	
-// See the MusicDevice.h header file for more about using the extended control semantics 
-// of this API.	
+
+// See the MusicDevice.h header file for more about using the extended control semantics
+// of this API.
 
 
 // `Analog' AudioUnits
@@ -1060,7 +1060,7 @@ const
 const
 	kRandomParam_BoundA = 0;
 	kRandomParam_BoundB = 1;
-	kRandomParam_Curve = 2; 
+	kRandomParam_Curve = 2;
 {$endc} {TARGET_OS_MAC}
 
 //#pragma mark Apple Specific - iOS
@@ -1069,20 +1069,20 @@ const
 // Parameters for the iOS reverb unit
 const
 // Global, CrossFade, 0->100, 100
-	kReverb2Param_DryWetMix = 0; 
+	kReverb2Param_DryWetMix = 0;
 		// Global, Decibels, -20->20, 0
-	kReverb2Param_Gain = 1; 
-		
+	kReverb2Param_Gain = 1;
+
 		// Global, Secs, 0.0001->1.0, 0.008
-	kReverb2Param_MinDelayTime = 2; 
+	kReverb2Param_MinDelayTime = 2;
 		// Global, Secs, 0.0001->1.0, 0.050
-	kReverb2Param_MaxDelayTime = 3; 
+	kReverb2Param_MaxDelayTime = 3;
 		// Global, Secs, 0.001->20.0, 1.0
-	kReverb2Param_DecayTimeAt0Hz = 4; 
+	kReverb2Param_DecayTimeAt0Hz = 4;
 		// Global, Secs, 0.001->20.0, 0.5
-	kReverb2Param_DecayTimeAtNyquist = 5; 
+	kReverb2Param_DecayTimeAtNyquist = 5;
 		// Global, Integer, 1->1000
-	kReverb2Param_RandomizeReflections = 6; 
+	kReverb2Param_RandomizeReflections = 6;
 {$endc} {TARGET_OS_IPHONE}
 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
 

Разница между файлами не показана из-за своего большого размера
+ 249 - 249
packages/univint/src/AudioUnitProperties.pas


+ 26 - 26
packages/univint/src/AudioUnitUtilities.pas

@@ -15,7 +15,7 @@
 	during the render process.
 
 	The AUEventListener API's extend the AUParameterListener API's by supporting event types
-	other than parameter changes. Events, including parameter changes are delivered serially to the 
+	other than parameter changes. Events, including parameter changes are delivered serially to the
 	listener, preserving the time order of the events and parameter changes.
 
 	There are also some utilities for converting between non-linear and linear value ranges. These
@@ -242,20 +242,20 @@ uses MacTypes,CFBase,CFRunLoop,AUComponent;
 { ============================================================================= }
 
 {!
-    @enum       
+    @enum
     @constant   kAUParameterListener_AnyParameter
                     A wildcard value for an AudioUnitParameterID. Note that this is
                     only valid when sending a notification (with AUParameterListenerNotify),
                     not when registering to receive one.
 }
 const
-	kAUParameterListener_AnyParameter = $FFFFFFFF; 
+	kAUParameterListener_AnyParameter = $FFFFFFFF;
 
 {!
     @enum       AudioUnitEventType
-    
+
     @abstract   Types of Audio Unit Events.
-    
+
     @constant   kAudioUnitEvent_ParameterValueChange
                     The event is a change to a parameter value
     @constant   kAudioUnitEvent_BeginParameterChangeGesture
@@ -274,7 +274,7 @@ const
 	kAudioUnitEvent_ParameterValueChange = 0;
 	kAudioUnitEvent_BeginParameterChangeGesture = 1;
 	kAudioUnitEvent_EndParameterChangeGesture = 2;
-	kAudioUnitEvent_PropertyChange = 3; 
+	kAudioUnitEvent_PropertyChange = 3;
 
 { ============================================================================= }
 
@@ -306,7 +306,7 @@ type
         The type of event.
     @field      mArgument
         Specifies the parameter or property which has changed.
-}  
+}
 type
 	AudioUnitEvent = record
 		mEventType: AudioUnitEventType;
@@ -381,7 +381,7 @@ type
                     immediately, on the thread on which the parameter was changed.
     @param      outListener
                     On successful return, an AUParameterListenerRef.
-    @discussion 
+    @discussion
         Note that only parameter changes issued through AUParameterSet will generate
         notifications to listeners; thus, in most cases, AudioUnit clients should use
         AUParameterSet in preference to AudioUnitSetParameter.
@@ -394,7 +394,7 @@ function AUListenerCreate( inProc: AUParameterListenerProc; inUserData: UnivPtr;
     @abstract   Dispose a parameter listener object.
     @param      inListener
                     The parameter listener to dispose.
-    @discussion 
+    @discussion
 }
 function AUListenerDispose( inListener: AUParameterListenerRef ): OSStatus; external name '_AUListenerDispose';
 (* API_AVAILABLE(macos(10.2), ios(6.0), watchos(2.0), tvos(9.0)) *)
@@ -410,7 +410,7 @@ function AUListenerDispose( inListener: AUParameterListenerRef ): OSStatus; exte
                     parameter changes.
     @param      inParameter
                     The parameter whose value changes are to generate callbacks.
-    @discussion 
+    @discussion
         Associates an arbitrary object (often a user interface widget) with an
         AudioUnitParameter, and delivers notifications to the specified listener, telling it
         that the object needs to be informed of the parameter's value change.
@@ -427,7 +427,7 @@ function AUListenerAddParameter( inListener: AUParameterListenerRef; inObject: U
                     The object which is no longer interested in the value of the parameter.
     @param      inParameter
                     The parameter whose value changes are to stop generating callbacks.
-    @discussion 
+    @discussion
 }
 function AUListenerRemoveParameter( inListener: AUParameterListenerRef; inObject: UnivPtr {__nullable}; const (*var*) inParameter: AudioUnitParameter ): OSStatus; external name '_AUListenerRemoveParameter';
 (* API_AVAILABLE(macos(10.2), ios(6.0), watchos(2.0), tvos(9.0)) *)
@@ -451,7 +451,7 @@ function AUListenerRemoveParameter( inListener: AUParameterListenerRef; inObject
 	@param		inBufferOffsetInFrames
 					The offset into the next rendered buffer at which the parameter change will take
 					effect.
-    @discussion 
+    @discussion
         Calls AudioUnitSetParameter, and performs/schedules notification callbacks to all
         parameter listeners, for that parameter -- except that no callback will be generated to
         the inListener/inObject pair.
@@ -472,10 +472,10 @@ function AUParameterSet( inSendingListener: AUParameterListenerRef {__nullable};
                     receive notifications.
     @param      inParameter
                     The parameter which was changed.
-    @discussion 
+    @discussion
         Performs and schedules the notification callbacks of AUParameterSet, without
         actually setting an AudioUnit parameter value.
-        
+
         Clients scheduling ramped parameter changes to AudioUnits must make this call
         dynamically during playback in order for AudioUnitViews to be updated.  When the view's
         listener receives a notification, it will be passed the current value of the parameter.
@@ -517,7 +517,7 @@ function AUParameterListenerNotify( inSendingListener: AUParameterListenerRef {_
                     parameter change.
     @param      outListener
                     On successful return, an AUEventListenerRef.
-    
+
     @discussion
         See the discussion of AUEventListenerCreateWithDispatchQueue.
 }
@@ -539,7 +539,7 @@ function AUEventListenerCreate( inProc: AUEventListenerProc; inUserData: UnivPtr
 }
 function AUEventListenerAddEventType( inListener: AUEventListenerRef; inObject: UnivPtr {__nullable}; const (*var*) inEvent: AudioUnitEvent ): OSStatus; external name '_AUEventListenerAddEventType';
 (* API_AVAILABLE(macos(10.3), ios(6.0), watchos(2.0), tvos(9.0)) *)
-    
+
 {!
     @function   AUEventListenerRemoveEventType
     @abstract   Stop delivering a particular type of events to a listener.
@@ -552,13 +552,13 @@ function AUEventListenerAddEventType( inListener: AUEventListenerRef; inObject:
     @result     An OSStatus error code.
 }
 function AUEventListenerRemoveEventType( inListener: AUEventListenerRef; inObject: UnivPtr {__nullable}; const (*var*) inEvent: AudioUnitEvent ): OSStatus; external name '_AUEventListenerRemoveEventType';
-(* API_AVAILABLE(macos(10.3), ios(6.0), watchos(2.0), tvos(9.0)) *)           
+(* API_AVAILABLE(macos(10.3), ios(6.0), watchos(2.0), tvos(9.0)) *)
 
 {!
     @function   AUEventListenerNotify
     @abstract   Deliver an AudioUnitEvent to all listeners registered to receive it.
     @discussion This is only to be used for notifications about parameter changes (and gestures).
-                It can not be used for notifying changes to property values as these are 
+                It can not be used for notifying changes to property values as these are
                 internal to an audio unit and should not be issued outside of the audio unit itself.
     @param      inSendingListener
                     A parameter listener generating the change and which does not want to
@@ -574,7 +574,7 @@ function AUEventListenerRemoveEventType( inListener: AUEventListenerRef; inObjec
 }
 function AUEventListenerNotify( inSendingListener: AUEventListenerRef {__nullable}; inSendingObject: UnivPtr {__nullable}; const (*var*) inEvent: AudioUnitEvent ): OSStatus; external name '_AUEventListenerNotify';
 (* API_AVAILABLE(macos(10.3), ios(6.0), watchos(2.0), tvos(9.0)) *)
-                                    
+
 { ============================================================================= }
 
 {!
@@ -585,7 +585,7 @@ function AUEventListenerNotify( inSendingListener: AUEventListenerRef {__nullabl
 {!
     @function   AUParameterValueFromLinear
     @abstract   Converts a linear value to a parameter value according to the parameter's units.
-    
+
     @param      inLinearValue
                     The linear value (0.0-1.0) to convert.
     @param      inParameter
@@ -593,7 +593,7 @@ function AUEventListenerNotify( inSendingListener: AUEventListenerRef {__nullabl
                     the supplied linear value to a value that is natural to that parameter.
     @result
                 The converted parameter value, in the parameter's natural units.
-    @discussion 
+    @discussion
 }
 function AUParameterValueFromLinear( inLinearValue: Float32 { // 0-1 }; const (*var*) inParameter: AudioUnitParameter ): AudioUnitParameterValue; external name '_AUParameterValueFromLinear';
 (* API_AVAILABLE(macos(10.2), ios(6.0), watchos(2.0), tvos(9.0)) *)
@@ -601,16 +601,16 @@ function AUParameterValueFromLinear( inLinearValue: Float32 { // 0-1 }; const (*
 {!
     @function   AUParameterValueToLinear
     @abstract   Converts a parameter value to a linear value according to the parameter's units.
-    
+
     @param      inParameterValue
                     The value in the natural units of the specified parameter.
-        
+
     @param      inParameter
                     The parameter, including its Audio Unit, that will define the conversion of
                     the supplied parameter value to a corresponding linear value.
     @result
                 A number 0.0-1.0.
-    @discussion 
+    @discussion
 }
 function AUParameterValueToLinear( inParameterValue: AudioUnitParameterValue; const (*var*) inParameter: AudioUnitParameter ): Float32; external name '_AUParameterValueToLinear';
 (* API_AVAILABLE(macos(10.2), ios(6.0), watchos(2.0), tvos(9.0)) *)
@@ -630,7 +630,7 @@ function AUParameterValueToLinear( inParameterValue: AudioUnitParameterValue; co
                     The resolution of the string (see example above).
     @result
                 <tt>inTextBuffer</tt>
-    @discussion 
+    @discussion
         Formats a floating point value into a string.  Computes a power of 10 to which the value
         will be rounded and displayed as follows:  if the the parameter is logarithmic (Hertz),
         the number of significant digits is inDigits - pow10(inParameterValue) + 1.  Otherwise,
@@ -646,7 +646,7 @@ function AUParameterValueToLinear( inParameterValue: AudioUnitParameterValue; co
         2       100-999         0
         3       1000-9990       -1
         4       10000-99900     -2</pre>
-}                              
+}
 function AUParameterFormatValue( inParameterValue: Float64; const (*var*) inParameter: AudioUnitParameter; var inTextBuffer: AnsiChar; inDigits: UInt32 ): CStringPtr; external name '_AUParameterFormatValue';
 (* API_AVAILABLE(macos(10.2), ios(6.0), watchos(2.0), tvos(9.0)) *)
 

+ 23 - 23
packages/univint/src/AuthSession.pas

@@ -1,15 +1,15 @@
 {
  * Copyright (c) 2000-2003 Apple Computer, Inc. All Rights Reserved.
- * 
+ *
  * @APPLE_LICENSE_HEADER_START@
- * 
+ *
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
  * compliance with the License. Please obtain a copy of the License at
  * http://www.opensource.apple.com/apsl/ and read it before using this
  * file.
- * 
+ *
  * The 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,
@@ -17,7 +17,7 @@
  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT 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]>, 2004 }
@@ -249,17 +249,17 @@ uses MacTypes,Authorization;
 
 	The Session API provides specialized applications access to Session management and inquiry
     functions. This is a specialized API that should not be of interest to most people.
-	
+
 	The Security subsystem separates all processes into Security "sessions". Each process is in
 	exactly one session, and session membership inherits across fork/exec. Sessions form boundaries
 	for security-related state such as authorizations, keychain lock status, and the like.
 	Typically, each successful login (whether graphical or through ssh & friends) creates
 	a separate session. System daemons (started at system startup) belong to the "root session"
 	which has no user nor graphics access.
-    
+
 	Sessions are identified with SecuritySessionIds. A session has a set of attributes
 	that are set on creation and can be retrieved with SessionGetInfo().
-	
+
 	There are similar session concepts in the system, related but not necessarily
 	completely congruous. In particular, graphics sessions track security sessions
 	(but only for graphic logins).
@@ -284,8 +284,8 @@ type
     Here are some special values for SecuritySessionId. You may specify those
         on input to SessionAPI functions. They will never be returned from such
         functions.
-    
-    Note: -2 is reserved (see 4487137).  
+
+    Note: -2 is reserved (see 4487137).
 }
 const
 	noSecuritySession = 0;     { definitely not a valid SecuritySessionId }
@@ -300,7 +300,7 @@ const
 type
 	SessionAttributeBits = UInt32;
 	SessionAttributeBitsPtr = ^SessionAttributeBits;
- 
+
 const
     sessionIsRoot                          = $0001; { is the root session (startup/system programs) }
     sessionHasGraphicAccess                = $0010; { graphic subsystem (CoreGraphics et al) available }
@@ -319,11 +319,11 @@ const
 type
 	SessionCreationFlags = UInt32;
 	SessionCreationFlagsPtr = ^SessionCreationFlags;
- 
+
 const
     sessionKeepCurrentBootstrap             = $8000; { caller has allocated sub-bootstrap (expert use only) }
- 
- 
+
+
 {!
 	@enum SessionStatus
 	Error codes returned by AuthSession API.
@@ -348,19 +348,19 @@ const
 
     @param session (input) The Session you are asking about. Can be one of the
         special constants defined above.
-	
+
 	@param sessionId (output/optional) The actual SecuritySessionId for the session you asked about.
         Will never be one of those constants.
-        
+
     @param attributes (output/optional) Receives the attribute bits for the session.
 
     @result An OSStatus indicating success (errSecSuccess) or an error cause.
-    
+
     errSessionInvalidId -60500 Invalid session id specified
 
 }
 function SessionGetInfo( session: SecuritySessionId; sessionId: SecuritySessionIdPtr; attributes: SessionAttributeBitsPtr ): OSStatus; external name '_SessionGetInfo';
-    
+
 
 {!
     @function SessionCreate
@@ -381,18 +381,18 @@ function SessionGetInfo( session: SecuritySessionId; sessionId: SecuritySessionI
 	making any other security-related calls that establish rights of any kind, to the
 	extent this is practical. Also, we strongly recommend that you do not perform
 	security-related calls in any other threads while calling SessionCreate.
-    
+
     @param flags Flags controlling how the session is created.
-    
+
     @param attributes The set of attribute bits to set for the new session.
         Not all bits can be set this way.
-    
+
     @result An OSStatus indicating success (errSecSuccess) or an error cause.
-    
-    errSessionInvalidAttributes -60501 Attempt to set invalid attribute bits	
+
+    errSessionInvalidAttributes -60501 Attempt to set invalid attribute bits
     errSessionAuthorizationDenied -60502 Attempt to re-initialize a session
     errSessionInvalidFlags -60011 Attempt to specify unsupported flag bits
-    
+
 }
 function SessionCreate( flags: SessionCreationFlags; attributes: SessionAttributeBits ): OSStatus; external name '_SessionCreate';
 

+ 18 - 18
packages/univint/src/Authorization.pas

@@ -1,15 +1,15 @@
 {
  * Copyright (c) 2000-2004,2007 Apple Inc. All Rights Reserved.
- * 
+ *
  * @APPLE_LICENSE_HEADER_START@
- * 
+ *
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
  * compliance with the License. Please obtain a copy of the License at
  * http://www.opensource.apple.com/apsl/ and read it before using this
  * file.
- * 
+ *
  * The 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,
@@ -17,7 +17,7 @@
  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT 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]>, 2004 }
@@ -250,13 +250,13 @@ uses MacTypes;
 	Version 1.0 10/16/2000
 
 	The Authorization API contains all the APIs that a application or tool that need pre-authorization or need an authorization decision made.
-	
+
 	A typical use cases are a preference panel that would start off calling AuthorizationCreate() (without UI) to get an authorization object.  Then call AuthorizationCopyRights() to figure out what is currently allowed.
-	
+
 	If any of the operations that the preference panel wishes to perform are currently not allowed the lock icon in the window would show up in the locked state.  Otherwise it would show up unlocked.
-	
+
 	When the user locks the lock AuthorizationFree() is called with the kAuthorizationFlagDestroyRights to destroy any authorization rights that have been acquired.
-	
+
 	When the user unlocks the lock AuthorizationCreate() is called with the kAuthorizationFlagInteractionAllowed and kAuthorizationFlagExtendRights flags to obtain all required rights.  The old authorization object can be freed by calling AuthorizationFree() with no flags.
 
 }
@@ -312,7 +312,7 @@ const
 	kAuthorizationFlagPartialRights = 1 shl 2;
 	kAuthorizationFlagDestroyRights = 1 shl 3;
 	kAuthorizationFlagPreAuthorize = 1 shl 4;
-	
+
 	// private bits (do not use)
 	kAuthorizationFlagNoData = 1 shl 20;
 
@@ -466,7 +466,7 @@ function AuthorizationCreate( rights: AuthorizationRightsPtr; environment: Autho
 	Setting the kAuthorizationFlagDestroyRights flag will prevent any rights that were obtained by the specified authorization object to be preserved after returning from this API.  This effectively locks down all potentially shared authorizations.
 
     @param authorization (input) The authorization object on which this operation is performed.
-	
+
 	@param flags (input) Bit mask of option flags to this call.
 
     @result errAuthorizationSuccess 0 No error.
@@ -514,7 +514,7 @@ function AuthorizationCopyRights( authorization: AuthorizationRef; const (*var*)
 {!
 	@function AuthorizationCopyInfo
 	Returns sideband information (e.g. access credentials) obtained from a call to AuthorizationCreate.  The format of this data depends of the tag specified.
-	
+
     @param authorization (input) The authorization object on which this operation is performed.
     @param tag (input/optional) An optional string tag specifying which sideband information should be returned.  When NULL is specified all available information is returned.
     @param flags (input) options specified by the AuthorizationFlags enum.  set all unused bits to zero to allow for future expansion.
@@ -537,10 +537,10 @@ function AuthorizationCopyInfo( authorization: AuthorizationRef; tag: Authorizat
 	Note that *storing* the external form somewhere will probably not do what
 	you want, since authorizations are bounded by sessions, processes, and possibly
 	time limits. This is for online transmission of authorizations.
-	
+
 	@param authorization The (valid) authorization reference to externalize
 	@param extForm Pointer to an AuthorizationExternalForm variable to fill.
-	
+
         @result errAuthorizationSuccess 0 No error.
 
         errAuthorizationExternalizeNotAllowed -60009 Externalizing this authorization is not allowed.
@@ -555,10 +555,10 @@ function AuthorizationMakeExternalForm( authorization: AuthorizationRef; var ext
 {!
 	@function AuthorizationCreateFromExternalForm
 	Internalize the external "byte blob" form of an authorization reference.
-	
+
 	@param extForm Pointer to an AuthorizationExternalForm value.
 	@param authorization Will be filled with a valid AuthorizationRef on success.
-	
+
 	@result errAuthorizationInternalizeNotAllowed -60010 Internalizing this authorization is not allowed.
 }
 function AuthorizationCreateFromExternalForm( const (*var*) extForm: AuthorizationExternalForm; var authorization: AuthorizationRef ): OSStatus; external name '_AuthorizationCreateFromExternalForm';
@@ -568,7 +568,7 @@ function AuthorizationCreateFromExternalForm( const (*var*) extForm: Authorizati
 	@function AuthorizationFreeItemSet
 	Release the memory allocated for an AuthorizationItemSet that was allocated
 	by an API call.
-	
+
     @param set The AuthorizationItemSet to deallocate.
 
     @result errAuthorizationSuccess 0 No error.
@@ -582,7 +582,7 @@ function AuthorizationFreeItemSet( var setx: AuthorizationItemSet ): OSStatus; e
 	@function AuthorizationExecuteWithPrivileges
 	Run an executable tool with enhanced privileges after passing
 	suitable authorization procedures.
-	
+
 	@param authorization An authorization reference that is used to authorize
 	access to the enhanced privileges. It is also passed to the tool for
 	further access control.
@@ -614,7 +614,7 @@ function AuthorizationExecuteWithPrivileges( authorization: AuthorizationRef; pa
 	While AuthorizationExecuteWithPrivileges already verified the authorization to
 	launch your tool, the tool may want to avail itself of any additional pre-authorizations
 	the caller may have obtained through that reference.
- 
+
 	@discussion This function has been deprecated and should no longer be used.
 	Use a launchd-launched helper tool and/or the Service Mangement framework
 	for this functionality.

+ 13 - 13
packages/univint/src/AuthorizationDB.pas

@@ -1,15 +1,15 @@
 {
  * Copyright (c) 2003 Apple Computer, Inc. All Rights Reserved.
- * 
+ *
  * @APPLE_LICENSE_HEADER_START@
- * 
+ *
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
  * compliance with the License. Please obtain a copy of the License at
  * http://www.opensource.apple.com/apsl/ and read it before using this
  * file.
- * 
+ *
  * The 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,
@@ -17,7 +17,7 @@
  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  * Please see the License for the specific language governing rights and
  * limitations under the License.
- * 
+ *
  * @APPLE_LICENSE_HEADER_END@
  }
 {  Pascal Translation:  Gorazd Krosl <[email protected]>, October 2009 }
@@ -250,11 +250,11 @@ uses MacTypes,Authorization,CFBase,CFDictionary,CFString,CFBundle;
 	Version 1.0
 
 	This API allows for any programs to get, modify, delete and add new right definitions to the policy database.  Meta-rights specify whether and what authorization is required to make these modifications.
-	
+
 	AuthorizationRightSet(authRef, "com.ifoo.ifax.send", CFSTR(kRuleIsAdmin), CFSTR("You must authenticate to send a fax."), NULL, NULL)
 
 	add a rule for letting admins send faxes using a canned rule, delegating to a pre-specified rule that authorizes everyone who is an admin.
-	
+
 	AuthorizationRightSet(authRef, "com.ifoo.ifax.send", [[CFSTR(kRightRule), CFSTR(kRuleIsAdmin)], [CFSTR(kRightComment), CFSTR("authorizes sending of 1 fax message")]], CFSTR("Authorize sending of a fax"), NULL, NULL)
 
 	add identical rule, but specify additional attributes this time.
@@ -295,7 +295,7 @@ const
 	kAuthorizationRuleClassAllow = 'allow';
 
 {! @defined kAuthorizationRuleClassDeny
-	Class that denies anything. 
+	Class that denies anything.
 }
 const
 	kAuthorizationRuleClassDeny = 'deny';
@@ -309,9 +309,9 @@ const
 
 
 {!
-	@function AuthorizationRightGet 
-	
-	Retrieves a right definition as a dictionary.  There are no restrictions to keep anyone from retrieving these definitions.  
+	@function AuthorizationRightGet
+
+	Retrieves a right definition as a dictionary.  There are no restrictions to keep anyone from retrieving these definitions.
 
 	@param rightName (input) the rightname (ASCII).  Wildcard rightname definitions are okay.
 	@param rightDefinition (output/optional) the dictionary with all keys defining the right.  See documented keys.  Passing in NULL will just check if there is a definition.  The caller is responsible for releasing the returned dictionary.
@@ -325,7 +325,7 @@ function AuthorizationRightGet( rightName: ConstCStringPtr; rightDefinition: CFD
 
 {!
 	@function AuthorizationRightSet
-	
+
 	Create or update a right entry.  Only normal rights can be registered (wildcard rights are denied); wildcard rights are considered to be put in by an administrator putting together a site configuration.
 
 	@param authRef (input) authRef to authorize modifications.
@@ -334,7 +334,7 @@ function AuthorizationRightGet( rightName: ConstCStringPtr; rightDefinition: CFD
 	@param descriptionKey (input/optional) a CFString to use as a key for looking up localized descriptions.  If no localization is found this will be the description itself.
 	@param bundle (input/optional) a bundle to get localizations from if not the main bundle.
 	@param localeTableName (input/optional) stringtable name to get localizations from.
-	
+
 	@result errAuthorizationSuccess 0 added right definition successfully.
 
 	errAuthorizationDenied -60005 Unable to create or update right definition.
@@ -354,7 +354,7 @@ function AuthorizationRightSet( authRef: AuthorizationRef; rightName: ConstCStri
 
 	@param authRef (input) authRef, to be used to authorize this action.
 	@param rightName (input) the rightname (ASCII).  Wildcard rightnames are not okay.
-	
+
 }
 function AuthorizationRightRemove( authRef: AuthorizationRef; rightName: ConstCStringPtr ): OSStatus; external name '_AuthorizationRightRemove';
 

+ 44 - 44
packages/univint/src/AuthorizationPlugin.pas

@@ -1,15 +1,15 @@
 {
  * Copyright (c) 2001-2002,2004 Apple Computer, Inc. All Rights Reserved.
- * 
+ *
  * @APPLE_LICENSE_HEADER_START@
- * 
+ *
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
  * compliance with the License. Please obtain a copy of the License at
  * http://www.opensource.apple.com/apsl/ and read it before using this
  * file.
- * 
+ *
  * The 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,
@@ -17,7 +17,7 @@
  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  * Please see the License for the specific language governing rights and
  * limitations under the License.
- * 
+ *
  * @APPLE_LICENSE_HEADER_END@
  }
 {  Pascal Translation:  Gorazd Krosl <[email protected]>, October 2009 }
@@ -246,10 +246,10 @@ uses MacTypes,Authorization;
 
 {!
 	@header AuthorizationPlugin
-	
+
 	The AuthorizationPlugin API allows the creation of plugins that can participate
 	in authorization decisions.  Using the AuthorizationDB API the system can be configured
-	to use these plugins.  Plugins are loaded into a separate process, the pluginhost, to 
+	to use these plugins.  Plugins are loaded into a separate process, the pluginhost, to
 	isolate the process of authorization from the client.  There are two types of pluginhosts.
 	One runs as an anonymous user and can be used to communicate with the user, for example
 	to ask for a password.  Another one runs with root privileges to perform privileged
@@ -257,23 +257,23 @@ uses MacTypes,Authorization;
 
     A typical use is to implement additional policies that cannot be expressed in the
     authorization configuration.
-    
+
     Plugins implement a handshake function called AuthorizationPluginCreate with which
     their interface (AuthorizationPluginInterface) and the engine's interface
-    (AuthorizationCallbacks) are exchanged.  Plugins are asked to create 
-    Mechanisms, which are the basic element as authorizations are performed.  
-    
-    Mechanisms are invoked when it is time for them to make a decision.  A decision is 
-    made by setting a single result (AuthorizationResult).  Mechanisms in the 
-    authorization can communicate auxiliary information by setting and/or getting hints 
+    (AuthorizationCallbacks) are exchanged.  Plugins are asked to create
+    Mechanisms, which are the basic element as authorizations are performed.
+
+    Mechanisms are invoked when it is time for them to make a decision.  A decision is
+    made by setting a single result (AuthorizationResult).  Mechanisms in the
+    authorization can communicate auxiliary information by setting and/or getting hints
     and setting and/or getting context data.  Hints are advisory and don't need to be
     looked at, nor are they preserved as part of the authorization result. Context data
     becomes part of the result of the authorization.
-    
+
     Context data is tagged with a flag that describes whether the information is returned
     to the authorization client upon request (AuthorizationCopyInfo() in Authorization.h)
     or whether it's private to the mechanisms making a decision.
-    
+
 }
 
 
@@ -287,10 +287,10 @@ type
 		data: UnivPtr;
 	end;
 	AuthorizationValuePtr = ^AuthorizationValue;
-	
+
 {!
     @typedef AuthorizationValueVector
-    A vector of AuthorizationValues.  Used to communicate arguments passed from the 
+    A vector of AuthorizationValues.  Used to communicate arguments passed from the
     configuration file <code>authorization(5)</code>.
 }
 type
@@ -299,10 +299,10 @@ type
 		values: AuthorizationValuePtr;
 	end;
 	AuthorizationValueVectorPtr = ^AuthorizationValueVector;
-	
+
 {!
     @typedef
-    Data produced as context during the authorization evaluation is tagged.  
+    Data produced as context during the authorization evaluation is tagged.
     If data is set to be extractable (kAuthorizationContextFlagExtractable), it will be possible for the client of authorization to obtain the value of this attribute using AuthorizationCopyInfo().
     If data is marked as volatile (kAuthorizationContextFlagVolatile), this value will not be remembered in the AuthorizationRef.
     Sticky data (kAuthorizationContextFlagSticky) persists through a failed or interrupted evaluation. It can be used to propagate an error condition from a downstream plugin to an upstream one. It is not remembered in the AuthorizationRef.
@@ -369,7 +369,7 @@ type
 {!
     @enum AuthorizationResultConstants
 	Possible values for SetResult() in AuthorizationCallbacks.
-    
+
     @constant kAuthorizationResultAllow the operation succeeded and authorization should be granted as far as this mechanism is concerned.
     @constant kAuthorizationResultDeny the operation succeeded but authorization should be denied as far as this mechanism is concerned.
     @constant kAuthorizationResultUndefined the operation failed for some reason and should not be retried for this session.
@@ -404,8 +404,8 @@ const
 
 {!
     @struct
-    Callback API provided by the AuthorizationEngine. 
-    
+    Callback API provided by the AuthorizationEngine.
+
     @field version      Engine callback version.
     @field SetResult    Set a result after a call to AuthorizationSessionInvoke.
     @field RequestInterrupt Request authorization engine to interrupt all mechamisms invoked after this mechamism has called SessionSetResult and then call AuthorizationSessionInvoke again.
@@ -426,11 +426,11 @@ type
 {    OSStatus (*SetResult)(AuthorizationEngineRef inEngine, AuthorizationResult inResult); }
 	 SetResult : function (inEngine : AuthorizationEngineRef; inResult : AuthorizationResult) : OSStatus;
 
-    { Request authorization engine to interrupt all mechamisms invoked after 
-        this mechamism has called SessionSetResult and then call 
+    { Request authorization engine to interrupt all mechamisms invoked after
+        this mechamism has called SessionSetResult and then call
         AuthorizationSessionInvoke again. }
      RequestInterrupt : function (inEngine : AuthorizationEngineRef) : OSStatus;
-     
+
     { Respond to the Deactivate request. }
 	 DidDeactivate : function (inEngine : AuthorizationEngineRef) : OSStatus;
 
@@ -450,16 +450,16 @@ type
 	GetHintValue : function (inEngine		: AuthorizationEngineRef;
 							 inKey			: AuthorizationString;
 							 var outValue	: AuthorizationValuePtr) : OSStatus;
-							 
+
     { Write value to hints.  AuthorizationValue and data are copied. }
 	SetHintValue : function (inEngine	: AuthorizationEngineRef;
 							 inKey		: AuthorizationString;
 							 inValue	: AuthorizationValuePtr) : OSStatus;
-							 
+
     { Read arguments passed.  AuthorizationValueVector does not own data. }
 	GetArguments : function (inEngine	 		: AuthorizationEngineRef;
 							 var outArguments	: AuthorizationValueVectorPtr) : OSStatus;
-							 
+
     { Read SessionId. }
       GetSessionId : function (inEngine			: AuthorizationEngineRef;
       						   var outSessionId : AuthorizationSessionId) : OSStatus;
@@ -473,11 +473,11 @@ type
 {    OSStatus (*SetResult)(AuthorizationEngineRef inEngine, AuthorizationResult inResult); }
 	 SetResult : function (inEngine : AuthorizationEngineRef; inResult : AuthorizationResult) : OSStatus;
 
-    { Request authorization engine to interrupt all mechamisms invoked after 
-        this mechamism has called SessionSetResult and then call 
+    { Request authorization engine to interrupt all mechamisms invoked after
+        this mechamism has called SessionSetResult and then call
         AuthorizationSessionInvoke again. }
      RequestInterrupt : function (inEngine : AuthorizationEngineRef) : OSStatus;
-     
+
     { Respond to the Deactivate request. }
 	 DidDeactivate : function (inEngine : AuthorizationEngineRef) : OSStatus;
 
@@ -497,16 +497,16 @@ type
 	GetHintValue : function (inEngine		: AuthorizationEngineRef;
 							 inKey			: AuthorizationString;
 							 var outValue	: AuthorizationValuePtr) : OSStatus;
-							 
+
     { Write value to hints.  AuthorizationValue and data are copied. }
 	SetHintValue : function (inEngine	: AuthorizationEngineRef;
 							 inKey		: AuthorizationString;
 							 inValue	: AuthorizationValuePtr) : OSStatus;
-							 
+
     { Read arguments passed.  AuthorizationValueVector does not own data. }
 	GetArguments : function (inEngine	 		: AuthorizationEngineRef;
 							 var outArguments	: AuthorizationValueVectorPtr) : OSStatus;
-							 
+
     { Read SessionId. }
       GetSessionId : function (inEngine			: AuthorizationEngineRef;
       						   var outSessionId : AuthorizationSessionId) : OSStatus;
@@ -514,23 +514,23 @@ type
     { Read value from hints. AuthorizationValue does not own data. }
   GetImmutableHintValue: function (inEngine: AuthorizationEngineRef;
                      inKey: AuthorizationString;
-                     var outValue: AuthorizationValuePtr): OSStatus; 
+                     var outValue: AuthorizationValuePtr): OSStatus;
 
 	end;
-	
+
 	{ support both interface version 0 and 1 }
 	AuthorizationCallbacks = record
 	  case byte of
 	    0: (version0: AuthorizationCallbacks0);
 	    1: (version1: AuthorizationCallbacks1);
 	end;
-	
+
 	AuthorizationCallbacksPtr = ^AuthorizationCallbacks;
 
 {!
     @struct
-    Interface that must be implemented by each plugin. 
-    
+    Interface that must be implemented by each plugin.
+
     @field version  Must be set to kAuthorizationPluginInterfaceVersion
     @field PluginDestroy    Plugin should clean up and release any resources it is holding.
     @field MechanismCreate  The plugin should create a mechanism named mechanismId.  The mechanism needs to use the AuthorizationEngineRef for the callbacks and pass back a   AuthorizationMechanismRef for itself.  MechanismDestroy will be called when it is no longer needed.
@@ -545,7 +545,7 @@ type
 
     { Notify a plugin that it is about to be unloaded so it get a chance to clean up and release any resources it is holding.  }
 	PluginDestroy : function (inPlugin : AuthorizationPluginRef) : OSStatus;
-	
+
     { The plugin should create a mechanism named mechanismId.  The mechanism needs to use the
         AuthorizationEngineRef for the callbacks and pass back an AuthorizationMechanismRef for
         itself.  MechanismDestroy will be called when it is no longer needed. }
@@ -553,13 +553,13 @@ type
 								inEngine 			: AuthorizationEngineRef;
 								mechanismId			: AuthorizationMechanismId;
 								var outMechanism	: AuthorizationMechanismRef) : OSStatus;
-								
+
     { Invoke an instance of a mechanism.  It should call SetResult during or after returning from this function.  }
 	MechanismInvoke : function (inMechanism : AuthorizationMechanismRef) : OSStatus;
-	
+
     { Mechanism should respond with a DidDeactivate as soon as possible. }
 	MechanismDeactivate : function (inMechanism : AuthorizationMechanismRef) : OSStatus;
-	
+
     { Mechanism should clean up and release any resources it is holding. }
     MechanismDestroy : function (inMechanism : AuthorizationMechanismRef) : OSStatus;
 	end;
@@ -569,7 +569,7 @@ type
 {!
     @function AuthorizationPluginCreate
 
-    Initialize a plugin after it gets loaded.  This is the main entry point to a plugin.  This function will only be called once.  
+    Initialize a plugin after it gets loaded.  This is the main entry point to a plugin.  This function will only be called once.
     After all Mechanism instances have been destroyed outPluginInterface->PluginDestroy will be called.
 
     @param callbacks (input) A pointer to an AuthorizationCallbacks which contains the callbacks implemented by the AuthorizationEngine.

+ 6 - 6
packages/univint/src/AuthorizationTags.pas

@@ -1,15 +1,15 @@
 {
  * Copyright (c) 2000-2004 Apple Computer, Inc. All Rights Reserved.
- * 
+ *
  * @APPLE_LICENSE_HEADER_START@
- * 
+ *
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
  * compliance with the License. Please obtain a copy of the License at
  * http://www.opensource.apple.com/apsl/ and read it before using this
  * file.
- * 
+ *
  * The 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,
@@ -17,14 +17,14 @@
  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT 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]>, 2004 }
 {  Pascal Translation Update: Gorazd Krosl <[email protected]>, October 2009 }
 {  Pascal Translation Update: Jonas Maebe <[email protected]>, October 2012 }
 {  Pascal Translation Update: Jonas Maebe <[email protected]>, August 2015 }
- 
+
 {
     Modified for use with Free Pascal
     Version 308
@@ -276,7 +276,7 @@ const
 {!
 	@define kAuthorizationRightExecute
 	The name of the AuthorizationItem that should be passed into the rights when preauthorizing for a call to AuthorizationExecuteWithPrivileges().
-	
+
 	You need to acquire this right to be able to perform a AuthorizationExecuteWithPrivileges() operation.  In addition to this right you should obtain whatever rights the tool you are executing with privileges need to perform it's operation on your behalf.  Currently no options are supported but you should pass in the full path of the tool you wish to execute in the value and valueLength fields.  In the future we will limit the right to only execute the requested path, and we will display this information to the user.
 }
 const

+ 19 - 19
packages/univint/src/BackupCore.pas

@@ -1,15 +1,15 @@
 {
      File:       CarbonCore/BackupCore.h
- 
+
      Contains:   Backup low level Interfaces.
- 
+
      Copyright:  © 2006-2011 by Apple Inc. All rights reserved.
- 
+
      Bugs?:      For bug reports, consult the following page on
                  the World Wide Web:
- 
+
                      http://bugs.freepascal.org
- 
+
 }
 {
     Modified for use with Free Pascal
@@ -227,30 +227,30 @@ uses MacTypes,CFBase;
 
 {
  *  CSBackupSetItemExcluded()
- *  
+ *
  *  Discussion:
  *    Add or remove an item from the list of items excluded from
  *    backup. When backing up, the backup daemon skips items marked by
  *    this call. If a folder is marked for exclusion, it and its
  *    contents are excluded from backup. When specifying by path, it is
  *    OK to pass  a URL of an item/folder that does not exist yet.
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.5
- *  
+ *
  *  Parameters:
- *    
+ *
  *    item:
  *      The URL of the file/folder to be added or removed from the
  *      exclusion list.
- *    
+ *
  *    exclude:
  *      true to exclude an item, false to stop excluding it.
- *    
+ *
  *    excludeByPath:
  *      false to make the exclusion bit 'sticky', i.e. follow the item
  *      if it gets moved, true to tie the exclusion to an absolute path.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
  *    CarbonLib:        not available
@@ -262,27 +262,27 @@ function CSBackupSetItemExcluded( item: CFURLRef; exclude: Boolean; excludeByPat
 
 {
  *  CSBackupIsItemExcluded()
- *  
+ *
  *  Discussion:
  *    Report whether or not an item is being excluded from backup.
- *  
+ *
  *  Mac OS X threading:
  *    Thread safe since version 10.5
- *  
+ *
  *  Parameters:
- *    
+ *
  *    item:
  *      A URL to the item of interest.
- *    
+ *
  *    excludeByPath:
  *      pass an optional return address to determine whether or not the
  *      given item is excluded as an absolute path or whether it is
  *      sticky to the item. Can be NULL.
- *  
+ *
  *  Result:
  *    true if the item or any of its ancestors are excluded from
  *    backup, false otherwise.
- *  
+ *
  *  Availability:
  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
  *    CarbonLib:        not available

+ 2 - 2
packages/univint/src/CFArray.pas

@@ -488,7 +488,7 @@ function CFArrayCreateMutable( allocator: CFAllocatorRef; capacity: CFIndex; {co
   @param capacity A hint about the number of values that will be held
     by the CFArray. Pass 0 for no hint. The implementation may
     ignore this hint, or may use it to optimize various
-    operations. An array's actual capacity is only limited by 
+    operations. An array's actual capacity is only limited by
     address space and available memory constraints).
 		This parameter must be greater than or equal
 		to the count of the array which is to be copied, or the
@@ -610,7 +610,7 @@ procedure CFArrayGetValues( theArray: CFArrayRef; range: CFRange; {const} values
 		pointer to a function of the correct prototype, the behavior
 		is undefined. If there are values in the range which the
 		applier function does not expect or cannot properly apply
-		to, the behavior is undefined. 
+		to, the behavior is undefined.
 	@param context A pointer-sized user-defined value, which is passed
 		as the second parameter to the applier function, but is
 		otherwise unused by this function. If the context is not

+ 6 - 6
packages/univint/src/CFAttributedString.pas

@@ -213,7 +213,7 @@ uses MacTypes,CFBase,CFString,CFDictionary;
 
 
 {! @header CFAttributedString
-Instances of CFAttributedString manage character strings and associated sets of attributes (for example, font and kerning) that apply to individual characters or ranges of characters in the string. CFAttributedString as defined in CoreFoundation provides the basic container functionality, while higher levels provide definitions for standard attributes, their values, and additional behaviors involving these. 
+Instances of CFAttributedString manage character strings and associated sets of attributes (for example, font and kerning) that apply to individual characters or ranges of characters in the string. CFAttributedString as defined in CoreFoundation provides the basic container functionality, while higher levels provide definitions for standard attributes, their values, and additional behaviors involving these.
 
 CFAttributedString is not a "subclass" of CFString; that is, it does not respond to CFString function calls. CFAttributedString conceptually contains a CFString to which it applies attributes. This protects users of attributed strings from ambiguities caused by the semantic differences between simple and attributed strings.
 
@@ -310,7 +310,7 @@ function CFAttributedStringCreateMutable( alloc: CFAllocatorRef; maxLength: CFIn
 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
 
 {! @function CFAttributedStringReplaceString
-Modifies the string for the attributed string, much like CFStringReplace().  It's an error for range to specify characters outside the bounds of aStr. 
+Modifies the string for the attributed string, much like CFStringReplace().  It's an error for range to specify characters outside the bounds of aStr.
 
 (Note: This function is a convenience on CFAttributedStringGetMutableString(); however, until CFAttributedStringGetMutableString() is implemented, it remains the only way to edit the string of the attributed string.)
 }
@@ -332,7 +332,7 @@ procedure CFAttributedStringSetAttributes( aStr: CFMutableAttributedStringRef; r
 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
 
 {! @function CFAttributedStringSetAttribute
-Sets the value of a single attribute over the specified range, which should be valid. value should not be NULL. 
+Sets the value of a single attribute over the specified range, which should be valid. value should not be NULL.
 }
 procedure CFAttributedStringSetAttribute( aStr: CFMutableAttributedStringRef; range: CFRange; attrName: CFStringRef; value: CFTypeRef ); external name '_CFAttributedStringSetAttribute';
 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
@@ -344,19 +344,19 @@ procedure CFAttributedStringRemoveAttribute( aStr: CFMutableAttributedStringRef;
 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
 
 {! @function CFAttributedStringReplaceAttributedString
-Replaces the attributed substring over the specified range with the attributed string specified in replacement. range should be valid. To delete a range of the attributed string, call CFAttributedStringReplaceString() with empty string and specified range. 
+Replaces the attributed substring over the specified range with the attributed string specified in replacement. range should be valid. To delete a range of the attributed string, call CFAttributedStringReplaceString() with empty string and specified range.
 }
 procedure CFAttributedStringReplaceAttributedString( aStr: CFMutableAttributedStringRef; range: CFRange; replacement: CFAttributedStringRef ); external name '_CFAttributedStringReplaceAttributedString';
 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
 
 {! @function CFAttributedStringBeginEditing
-In cases where attributed string might do a bunch of work to assure self-consistency, CFAttributedStringBeginEditing/CFAttributedStringEndEditing allow disabling that to allow deferring and coalescing any work. It's a good idea to call these around a set of related mutation calls which don't require the string to be in consistent state in between. These calls can be nested. 
+In cases where attributed string might do a bunch of work to assure self-consistency, CFAttributedStringBeginEditing/CFAttributedStringEndEditing allow disabling that to allow deferring and coalescing any work. It's a good idea to call these around a set of related mutation calls which don't require the string to be in consistent state in between. These calls can be nested.
 }
 procedure CFAttributedStringBeginEditing( aStr: CFMutableAttributedStringRef ); external name '_CFAttributedStringBeginEditing';
 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
 
 {! @function CFAttributedStringEndEditing
-In cases where attributed string might do a bunch of work to assure self-consistency, CFAttributedStringBeginEditing/CFAttributedStringEndEditing allow disabling that to allow deferring and coalescing any work. It's a good idea to call these around a set of related mutation calls which don't require the string to be in consistent state in between. These calls can be nested. 
+In cases where attributed string might do a bunch of work to assure self-consistency, CFAttributedStringBeginEditing/CFAttributedStringEndEditing allow disabling that to allow deferring and coalescing any work. It's a good idea to call these around a set of related mutation calls which don't require the string to be in consistent state in between. These calls can be nested.
 }
 procedure CFAttributedStringEndEditing( aStr: CFMutableAttributedStringRef ); external name '_CFAttributedStringEndEditing';
 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)

+ 5 - 5
packages/univint/src/CFBase.pas

@@ -403,7 +403,7 @@ type
 { Base "type" of all "CF objects", and polymorphic functions on them }
 type
 	CFTypeRef = UnivPtr; { an opaque type }
-	
+
 { GK: We need it for passing open arrays of CFTypes in MDQuery.pas }
 	CFTypeRefPtr = ^CFTypeRef;
 type
@@ -501,13 +501,13 @@ var kCFAllocatorMallocZone: CFAllocatorRef; external name '_kCFAllocatorMallocZo
 
 { Null allocator which does nothing and allocates no memory. This allocator
    is useful as the "bytesDeallocator" in CFData or "contentsDeallocator"
-   in CFString where the memory should not be freed. 
+   in CFString where the memory should not be freed.
 }
 var kCFAllocatorNull: CFAllocatorRef; external name '_kCFAllocatorNull'; (* attribute const *)
 
 { Special allocator argument to CFAllocatorCreate() which means
    "use the functions given in the context to allocate the allocator
-   itself as well". 
+   itself as well".
 }
 var kCFAllocatorUseContext: CFAllocatorRef; external name '_kCFAllocatorUseContext'; (* attribute const *)
 
@@ -524,7 +524,7 @@ type
 		version: CFIndex;
 		info: UnivPtr;
 		retain: CFAllocatorRetainCallBack;
-		release: CFAllocatorReleaseCallBack;        
+		release: CFAllocatorReleaseCallBack;
 		copyDescription: CFAllocatorCopyDescriptionCallBack;
 		allocate: CFAllocatorAllocateCallBack;
 		reallocate: CFAllocatorReallocateCallBack;
@@ -600,7 +600,7 @@ function CFGetAllocator( cf: CFTypeRef ): CFAllocatorRef; external name '_CFGetA
 // This function is unavailable in ARC mode. Use CFBridgingRelease instead.
 { CF_AUTOMATED_REFCOUNT_UNAVAILABLE }
 function CFMakeCollectable( cf: CFTypeRef ): CFTypeRef; external name '_CFMakeCollectable';
-(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *) 
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
 
 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
 

+ 8 - 8
packages/univint/src/CFBinaryHeap.pas

@@ -319,8 +319,8 @@ function CFBinaryHeapGetTypeID: CFTypeID; external name '_CFBinaryHeapGetTypeID'
 	@param capacity A hint about the number of values that will be held
 		by the CFBinaryHeap. Pass 0 for no hint. The implementation may
 		ignore this hint, or may use it to optimize various
-		operations. A heap's actual capacity is only limited by 
-		address space and available memory constraints). If this 
+		operations. A heap's actual capacity is only limited by
+		address space and available memory constraints). If this
 		parameter is negative, the behavior is undefined.
 #endif
 	@param callBacks A pointer to a CFBinaryHeapCallBacks structure
@@ -378,7 +378,7 @@ function CFBinaryHeapCreate( allocator: CFAllocatorRef; capacity: CFIndex; callB
 		by the CFBinaryHeap. Pass 0 for no hint. The implementation may
 		ignore this hint, or may use it to optimize various
 		operations. A heap's actual capacity is only limited by
-		address space and available memory constraints). 
+		address space and available memory constraints).
 		This parameter must be greater than or equal
 		to the count of the heap which is to be copied, or the
 		behavior is undefined. If this parameter is negative, the
@@ -452,7 +452,7 @@ function CFBinaryHeapGetMinimum( heap: CFBinaryHeapRef ): UnivPtr; external name
                 minimum values, any one may be returned.
 	@param heap The binary heap to be searched. If this parameter is not a
 		valid CFBinaryHeap, the behavior is undefined.
-        @param value A C pointer to pointer-sized storage to be filled with the minimum value in 
+        @param value A C pointer to pointer-sized storage to be filled with the minimum value in
                 the binary heap.  If this value is not a valid C pointer to a pointer-sized block
                 of storage, the result is undefined.  If the result of the function is false, the value
                 stored at this address is undefined.
@@ -467,10 +467,10 @@ function CFBinaryHeapGetMinimumIfPresent( heap: CFBinaryHeapRef; {const} value:
 		valid CFBinaryHeap, the behavior is undefined.
 	@param values A C array of pointer-sized values to be filled with
 		values from the binary heap. The values in the C array are ordered
-		from least to greatest. If this parameter is not a valid pointer to a 
+		from least to greatest. If this parameter is not a valid pointer to a
                 C array of at least CFBinaryHeapGetCount() pointers, the behavior is undefined.
 }
-type 
+type
 	CFBinaryHeapValues = array[0..($7F000000 div SizeOf(Ptr))] of Ptr;
 	CFBinaryHeapValuesPtr = ^CFBinaryHeapValues;
 procedure CFBinaryHeapGetValues( heap: CFBinaryHeapRef; {const} values: {variable-size-array} CFBinaryHeapValuesPtr ); external name '_CFBinaryHeapGetValues';
@@ -485,7 +485,7 @@ procedure CFBinaryHeapGetValues( heap: CFBinaryHeapRef; {const} values: {variabl
 		pointer to a function of the correct prototype, the behavior
 		is undefined. If there are values in the binary heap which the
 		applier function does not expect or cannot properly apply
-		to, the behavior is undefined. 
+		to, the behavior is undefined.
 	@param context A pointer-sized user-defined value, which is passed
 		as the second parameter to the applier function, but is
 		otherwise unused by this function. If the context is not
@@ -513,7 +513,7 @@ procedure CFBinaryHeapAddValue( heap: CFBinaryHeapRef; value: {const} UnivPtr );
 {!
 	@function CFBinaryHeapRemoveMinimumValue
 	Removes the minimum value from the binary heap.
-	@param heap The binary heap from which the minimum value is to be removed. If this 
+	@param heap The binary heap from which the minimum value is to be removed. If this
                 parameter is not a valid mutable CFBinaryHeap, the behavior is undefined.
 }
 procedure CFBinaryHeapRemoveMinimumValue( heap: CFBinaryHeapRef ); external name '_CFBinaryHeapRemoveMinimumValue';

+ 1 - 1
packages/univint/src/CFCharacterSet.pas

@@ -452,7 +452,7 @@ function CFCharacterSetCreateMutableCopy( alloc: CFAllocatorRef; theSet: CFChara
 	@param theChar The Unicode character for which to test against the
                 character set.  Note that this function takes 16-bit Unicode
                 character value; hence, it does not support access to the
-                non-BMP planes.  
+                non-BMP planes.
         @result true, if the value is in the character set, otherwise false.
 }
 function CFCharacterSetIsCharacterMember( theSet: CFCharacterSetRef; theChar: UniChar ): Boolean; external name '_CFCharacterSetIsCharacterMember';

+ 1 - 1
packages/univint/src/CFData.pas

@@ -212,7 +212,7 @@ uses MacTypes,CFBase;
 {$ALIGN POWER}
 
 
-    
+
 type
 	CFDataRef = ^__CFData; { an opaque type }
 	__CFData = record end;

+ 1 - 1
packages/univint/src/CFDate.pas

@@ -289,7 +289,7 @@ const
 function CFGregorianDateIsValid( gdate: CFGregorianDate; unitFlags: CFOptionFlags ): Boolean; external name '_CFGregorianDateIsValid';
 (* CF_CALENDAR_DEPRECATED(10_4, 10_9, 2_0, 7_0, "Use CFCalendar or NSCalendar API instead") *)
 
-function CFGregorianDateGetAbsoluteTime( gdate: CFGregorianDate; tz: CFTimeZoneRef ): CFAbsoluteTime; external name '_CFGregorianDateGetAbsoluteTime'; 
+function CFGregorianDateGetAbsoluteTime( gdate: CFGregorianDate; tz: CFTimeZoneRef ): CFAbsoluteTime; external name '_CFGregorianDateGetAbsoluteTime';
 (* CF_CALENDAR_DEPRECATED(10_4, 10_9, 2_0, 7_0, "Use CFCalendar or NSCalendar API instead") *)
 
 function CFAbsoluteTimeGetGregorianDate( at: CFAbsoluteTime; tz: CFTimeZoneRef ): CFGregorianDate; external name '_CFAbsoluteTimeGetGregorianDate';

+ 7 - 7
packages/univint/src/CFDictionary.pas

@@ -543,8 +543,8 @@ function CFDictionaryCreateCopy( allocator: CFAllocatorRef; theDict: CFDictionar
   @param capacity A hint about the number of values that will be held
     by the CFDictionary. Pass 0 for no hint. The implementation may
     ignore this hint, or may use it to optimize various
-    operations. A dictionary's actual capacity is only limited by 
-    address space and available memory constraints). If this 
+    operations. A dictionary's actual capacity is only limited by
+    address space and available memory constraints). If this
     parameter is negative, the behavior is undefined.
 #endif
 	@param keyCallBacks A pointer to a CFDictionaryKeyCallBacks structure
@@ -628,7 +628,7 @@ function CFDictionaryCreateMutable( allocator: CFAllocatorRef; capacity: CFIndex
     by the CFDictionary. Pass 0 for no hint. The implementation may
     ignore this hint, or may use it to optimize various
     operations. A dictionary's actual capacity is only limited by
-    address space and available memory constraints). 
+    address space and available memory constraints).
     This parameter must be greater than or equal
     to the count of the dictionary which is to be copied, or the
     behavior is undefined. If this parameter is negative, the
@@ -799,7 +799,7 @@ procedure CFDictionaryGetKeysAndValues( theDict: CFDictionaryRef; {const} keys:
 		pointer to a function of the correct prototype, the behavior
 		is undefined. If there are keys or values which the
 		applier function does not expect or cannot properly apply
-		to, the behavior is undefined. 
+		to, the behavior is undefined.
 	@param context A pointer-sized user-defined value, which is passed
 		as the third parameter to the applier function, but is
 		otherwise unused by this function. If the context is not
@@ -842,7 +842,7 @@ procedure CFDictionaryAddValue( theDict: CFMutableDictionaryRef; key: {const} Un
 		it is full before this operation, and the key does not exist in
 		the dictionary, the behavior is undefined.
 #endif
-	@param key The key of the value to set into the dictionary. If a key 
+	@param key The key of the value to set into the dictionary. If a key
 		which matches this key is already present in the dictionary, only
 		the value is changed ("add if absent, replace if present"). If
 		no key matches the given key, the key-value pair is added to the
@@ -864,7 +864,7 @@ procedure CFDictionarySetValue( theDict: CFMutableDictionaryRef; key: {const} Un
 	@param theDict The dictionary to which the value is to be replaced. If this
 		parameter is not a valid mutable CFDictionary, the behavior is
 		undefined.
-	@param key The key of the value to replace in the dictionary. If a key 
+	@param key The key of the value to replace in the dictionary. If a key
 		which matches this key is present in the dictionary, the value
 		is changed to the given value, otherwise this function does
 		nothing ("replace if present").
@@ -882,7 +882,7 @@ procedure CFDictionaryReplaceValue( theDict: CFMutableDictionaryRef; key: {const
 	@param theDict The dictionary from which the value is to be removed. If this
 		parameter is not a valid mutable CFDictionary, the behavior is
 		undefined.
-	@param key The key of the value to remove from the dictionary. If a key 
+	@param key The key of the value to remove from the dictionary. If a key
 		which matches this key is present in the dictionary, the key-value
 		pair is removed from the dictionary, otherwise this function does
 		nothing ("remove if present").

+ 12 - 12
packages/univint/src/CFError.pas

@@ -215,22 +215,22 @@ uses MacTypes, CFBase, CFDictionary;
 {!
 	@header CFError
         @discussion
-            CFErrors are used to encompass information about errors. At minimum, errors are identified by their domain (a string) and an error code within that domain. In addition a "userInfo" dictionary supplied at creation time enables providing additional info that might be useful for the interpretation and reporting of the error. This dictionary can even contain an "underlying" error, which is wrapped as an error bubbles up through various layers. 
-            
+            CFErrors are used to encompass information about errors. At minimum, errors are identified by their domain (a string) and an error code within that domain. In addition a "userInfo" dictionary supplied at creation time enables providing additional info that might be useful for the interpretation and reporting of the error. This dictionary can even contain an "underlying" error, which is wrapped as an error bubbles up through various layers.
+
             CFErrors have the ability to provide human-readable descriptions for the errors; in fact, they are designed to provide localizable, end-user presentable errors that can appear in the UI. CFError has a number of predefined userInfo keys to enable developers to supply the info.
-            
+
             Usage recommendation for CFErrors is to return them as by-ref parameters in functions. This enables the caller to pass NULL in when they don't actually want information about the error. The presence of an error should be reported by other means, for instance a NULL or false return value from the function call proper:
-            
+
             CFError *error;
             if (!ReadFromFile(fd, &error)) (
                 ... process error ...
                 CFRelease(error);   // If an error occurs, the returned CFError must be released.
             )
-            
+
             It is the responsibility of anyone returning CFErrors this way to:
             - Not touch the error argument if no error occurs
             - Create and assign the error for return only if the error argument is non-NULL
-            
+
             In addition, it's recommended that CFErrors be used in error situations only (not status), and where there are multiple possible errors to distinguish between. For instance there is no plan to add CFErrors to existing APIs in CF which currently don't return errors; in many cases, there is one possible reason for failure, and a false or NULL return is enough to indicate it.
 
             CFError is toll-free bridged to NSError in Foundation. NSError in Foundation has some additional guidelines which makes it easy to automatically report errors to users and even try to recover from them.  See http://developer.apple.com/documentation/Cocoa/Conceptual/ErrorHandlingCocoa/ErrorHandling/chapter_1_section_1.html for more info on NSError programming guidelines.
@@ -287,11 +287,11 @@ var kCFErrorFilePathKey: CFStringRef; external name '_kCFErrorFilePathKey'; (* a
 {!
 	@function CFErrorCreate
 	@abstract Creates a new CFError.
-	@param allocator The CFAllocator which should be used to allocate memory for the error. This parameter may be NULL in which case the 
+	@param allocator The CFAllocator which should be used to allocate memory for the error. This parameter may be NULL in which case the
 	    current default CFAllocator is used. If this reference is not a valid CFAllocator, the behavior is undefined.
 	@param domain A CFString identifying the error domain. If this reference is NULL or is otherwise not a valid CFString, the behavior is undefined.
 	@param code A CFIndex identifying the error code. The code is interpreted within the context of the error domain.
-	@param userInfo A CFDictionary created with kCFCopyStringDictionaryKeyCallBacks and kCFTypeDictionaryValueCallBacks. It will be copied with CFDictionaryCreateCopy(). 
+	@param userInfo A CFDictionary created with kCFCopyStringDictionaryKeyCallBacks and kCFTypeDictionaryValueCallBacks. It will be copied with CFDictionaryCreateCopy().
 	    If no userInfo dictionary is desired, NULL may be passed in as a convenience, in which case an empty userInfo dictionary will be assigned.
 	@result A reference to the new CFError.
 }
@@ -301,7 +301,7 @@ function CFErrorCreate( allocator: CFAllocatorRef; domain: CFStringRef; code: CF
 {!
 	@function CFErrorCreateWithUserInfoKeysAndValues
 	@abstract Creates a new CFError without having to create an intermediate userInfo dictionary.
-	@param allocator The CFAllocator which should be used to allocate memory for the error. This parameter may be NULL in which case the 
+	@param allocator The CFAllocator which should be used to allocate memory for the error. This parameter may be NULL in which case the
 	    current default CFAllocator is used. If this reference is not a valid CFAllocator, the behavior is undefined.
 	@param domain A CFString identifying the error domain. If this reference is NULL or is otherwise not a valid CFString, the behavior is undefined.
 	@param code A CFIndex identifying the error code. The code is interpreted within the context of the error domain.
@@ -345,7 +345,7 @@ function CFErrorCopyUserInfo( err: CFErrorRef ): CFDictionaryRef; external name
 	@function CFErrorCopyDescription
 	@abstract Returns a human-presentable description for the error. CFError creators should strive to make sure the return value is human-presentable and localized by providing a value for kCFErrorLocalizedDescriptionKey at the time of CFError creation.
         @discussion This is a complete sentence or two which says what failed and why it failed. Rules for computing the return value:
-            - Look for kCFErrorLocalizedDescriptionKey in the user info and if not NULL, returns that as-is.  
+            - Look for kCFErrorLocalizedDescriptionKey in the user info and if not NULL, returns that as-is.
             - Otherwise, if there is a kCFErrorLocalizedFailureReasonKey in the user info, generate an error from that. Something like: "Operation code not be completed. " + kCFErrorLocalizedFailureReasonKey
             - Otherwise, generate a semi-user presentable string from kCFErrorDescriptionKey, the domain, and code. Something like: "Operation could not be completed. Error domain/code occurred. " or "Operation could not be completed. " + kCFErrorDescriptionKey + " (Error domain/code)"
             Toll-free bridged NSError instances might provide additional behaviors for manufacturing a description string.  Do not count on the exact contents or format of the returned string, it might change.
@@ -362,7 +362,7 @@ function CFErrorCopyDescription( err: CFErrorRef ): CFStringRef; external name '
             Example Description: "Could not save file 'Letter' in folder 'Documents' because the volume 'MyDisk' doesn't have enough space."
             Corresponding FailureReason: "The volume 'MyDisk' doesn't have enough space."
 	@param err The CFError whose failure reason is to be returned. If this reference is not a valid CFError, the behavior is undefined.
-	@result A CFString with the localized, end-user presentable failure reason of the CFError, or NULL. 
+	@result A CFString with the localized, end-user presentable failure reason of the CFError, or NULL.
 }
 function CFErrorCopyFailureReason( err: CFErrorRef ): CFStringRef; external name '_CFErrorCopyFailureReason';
 (* CF_AVAILABLE_STARTING(10_5, 2_0) *)
@@ -374,7 +374,7 @@ function CFErrorCopyFailureReason( err: CFErrorRef ): CFStringRef; external name
             Example Description: "Could not save file 'Letter' in folder 'Documents' because the volume 'MyDisk' doesn't have enough space."
             Corresponding RecoverySuggestion: "Remove some files from the volume and try again."
 	@param err The CFError whose recovery suggestion is to be returned. If this reference is not a valid CFError, the behavior is undefined.
-	@result A CFString with the localized, end-user presentable recovery suggestion of the CFError, or NULL. 
+	@result A CFString with the localized, end-user presentable recovery suggestion of the CFError, or NULL.
 }
 function CFErrorCopyRecoverySuggestion( err: CFErrorRef ): CFStringRef; external name '_CFErrorCopyRecoverySuggestion';
 (* CF_AVAILABLE_STARTING(10_5, 2_0) *)

+ 71 - 71
packages/univint/src/CFFTPStream.pas

@@ -1,15 +1,15 @@
 {
 	 File:	   CFNetwork/CFFTPStream.h
- 
+
 	 Contains:   CoreFoundation FTP stream header
-  
+
 	 Copyright:  Copyright (c) 2001-2008, Apple Inc. All rights reserved.
- 
+
 	 Bugs?:	  For bug reports, consult the following page on
 				 the World Wide Web:
- 
+
 					 http://bugs.freepascal.org
- 
+
 }
 {       Pascal Translation:  Peter N Lewis, <[email protected]>, 2004 }
 {       Pascal Translation Updated:  Jonas Maebe, <[email protected]>, October 2009 }
@@ -228,10 +228,10 @@ uses MacTypes,CFBase,CFStream,CFURL,CFDictionary;
 
 {
  *  kCFStreamErrorDomainFTP
- *  
+ *
  *  Discussion:
  *	Result code returned by FTP server
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -252,12 +252,12 @@ as definition) indicates the value type of the property.
 
 {
  *  kCFStreamPropertyFTPUserName
- *  
+ *
  *  Discussion:
  *	Stream property key, for both set and copy operations.  CFString
  *	type to hold login user name.  Don't set this property if you
  *	want anonymous FTP.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -269,12 +269,12 @@ var kCFStreamPropertyFTPUserName: CFStringRef; external name '_kCFStreamProperty
 
 {
  *  kCFStreamPropertyFTPPassword
- *  
+ *
  *  Discussion:
  *	Stream property key, for both set and copy operations. CFString
  *	type to hold login password.  Don't set this property if you want
  *	anonymous FTP.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -286,12 +286,12 @@ var kCFStreamPropertyFTPPassword: CFStringRef; external name '_kCFStreamProperty
 
 {
  *  kCFStreamPropertyFTPUsePassiveMode
- *  
+ *
  *  Discussion:
  *	Stream property key, for both set and copy operations. CFBoolean
  *	type. kCFBooleanTrue means use passive mode, kCFBooleanFalse
  *	otherwise
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -303,11 +303,11 @@ var kCFStreamPropertyFTPUsePassiveMode: CFStringRef; external name '_kCFStreamPr
 
 {
  *  kCFStreamPropertyFTPResourceSize
- *  
+ *
  *  Discussion:
  *	Stream property key, for read stream copy operations.  CFNumber
  *	of kCFNumberLongLongType to hold resource size in bytes.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -319,14 +319,14 @@ var kCFStreamPropertyFTPResourceSize: CFStringRef; external name '_kCFStreamProp
 
 {
  *  kCFStreamPropertyFTPFetchResourceInfo
- *  
+ *
  *  Discussion:
  *	Stream property key, for both set and copy operations.  CFBoolean
  *	type.  TRUE means that resource info, such as size, must be
  *	provided before download starts at higher cost.  Don't set if
  *	resource size/other info is unnecessary.  Initially, only
  *	resource size is implemented.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -338,11 +338,11 @@ var kCFStreamPropertyFTPFetchResourceInfo: CFStringRef; external name '_kCFStrea
 
 {
  *  kCFStreamPropertyFTPFileTransferOffset
- *  
+ *
  *  Discussion:
  *	Stream property key, for both set and copy operations.  CFNumber
  *	of kCFNumberLongLongType for the file offset to start transfer at.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -354,12 +354,12 @@ var kCFStreamPropertyFTPFileTransferOffset: CFStringRef; external name '_kCFStre
 
 {
  *  kCFStreamPropertyFTPAttemptPersistentConnection
- *  
+ *
  *  Discussion:
  *	Stream property key, for both set and copy operations.  CFBoolean
  *	type.  TRUE by default, set to FALSE to avoid reusing existing
  *	server connections.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -371,13 +371,13 @@ var kCFStreamPropertyFTPAttemptPersistentConnection: CFStringRef; external name
 
 {
  *  kCFStreamPropertyFTPProxy
- *  
+ *
  *  Discussion:
- *	Stream property key, for both set and copy operations. 
+ *	Stream property key, for both set and copy operations.
  *	CFDictionary type that holds key-value pairs of proxy dictionary.
  *	 The dictionary returned by SystemConfiguration can also be
  *	passed directly as the value.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -389,14 +389,14 @@ var kCFStreamPropertyFTPProxy: CFStringRef; external name '_kCFStreamPropertyFTP
 
 {
  *  kCFStreamPropertyFTPProxyHost
- *  
+ *
  *  Discussion:
  *	Stream property key or FTP Proxy dictionary key, for both set and
  *	copy operations.  It matches kSCPropNetProxiesFTPProxy defined in
- *	SCSchemaDefinitions.h.  CFString for proxy server host name. 
+ *	SCSchemaDefinitions.h.  CFString for proxy server host name.
  *	This property can be set and copied individually or via a
  *	CFDictionary.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -408,14 +408,14 @@ var kCFStreamPropertyFTPProxyHost: CFStringRef; external name '_kCFStreamPropert
 
 {
  *  kCFStreamPropertyFTPProxyPort
- *  
+ *
  *  Discussion:
  *	Stream property key or FTP Proxy dictionary key, for both set and
  *	copy operations.  It matches kSCPropNetProxiesFTPPort defined in
  *	SCSchemaDefinitions.h.  CFNumber of kCFNumberIntType for proxy
  *	server port number.  This property can be set and copied
  *	individually or via a CFDictionary.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -426,7 +426,7 @@ var kCFStreamPropertyFTPProxyPort: CFStringRef; external name '_kCFStreamPropert
 
 {
  *  kCFStreamPropertyFTPProxyUser
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -436,7 +436,7 @@ var kCFStreamPropertyFTPProxyUser: CFStringRef; external name '_kCFStreamPropert
 (* __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0) *)
 {
  *  kCFStreamPropertyFTPProxyPassword
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -455,11 +455,11 @@ CFFTPCreateParsedResourceListing.
 
 {
  *  kCFFTPResourceMode
- *  
+ *
  *  Discussion:
  *	CFDictionary key, for get value operation.  CFNumber to hold the
  *	resource access permission defined in sys/types.h.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -471,11 +471,11 @@ var kCFFTPResourceMode: CFStringRef; external name '_kCFFTPResourceMode'; (* att
 
 {
  *  kCFFTPResourceName
- *  
+ *
  *  Discussion:
  *	CFDictionary key, for get value operation.  CFString that holds
  *	the resource name.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -487,11 +487,11 @@ var kCFFTPResourceName: CFStringRef; external name '_kCFFTPResourceName'; (* att
 
 {
  *  kCFFTPResourceOwner
- *  
+ *
  *  Discussion:
  *	CFDictionary key, for get value operation.  CFString that holds
  *	the resource owner's name.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -503,11 +503,11 @@ var kCFFTPResourceOwner: CFStringRef; external name '_kCFFTPResourceOwner'; (* a
 
 {
  *  kCFFTPResourceGroup
- *  
+ *
  *  Discussion:
  *	CFDictionary key, for get value operation.  CFString to hold the
  *	name of the group that shares the resource.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -519,12 +519,12 @@ var kCFFTPResourceGroup: CFStringRef; external name '_kCFFTPResourceGroup'; (* a
 
 {
  *  kCFFTPResourceLink
- *  
+ *
  *  Discussion:
  *	CFDictionary key, for get value operation.  CFString to hold
  *	symbolic link information.  If the item is a symbolic link the
  *	string will contain the path to the item the link references.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -536,11 +536,11 @@ var kCFFTPResourceLink: CFStringRef; external name '_kCFFTPResourceLink'; (* att
 
 {
  *  kCFFTPResourceSize
- *  
+ *
  *  Discussion:
  *	CFDictionary key, for get value operation.  CFNumber of
  *	kCFNumberLongLongType to hold the resource length in bytes.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -552,11 +552,11 @@ var kCFFTPResourceSize: CFStringRef; external name '_kCFFTPResourceSize'; (* att
 
 {
  *  kCFFTPResourceType
- *  
+ *
  *  Discussion:
  *	CFDictionary key, for get value operation.  CFNumber to hold the
  *	resource type as defined in sys/dirent.h.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -568,11 +568,11 @@ var kCFFTPResourceType: CFStringRef; external name '_kCFFTPResourceType'; (* att
 
 {
  *  kCFFTPResourceModDate
- *  
+ *
  *  Discussion:
  *	CFDictionary key, for get value operation.  CFDate to hold the
  *	last modification date and time information.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -584,35 +584,35 @@ var kCFFTPResourceModDate: CFStringRef; external name '_kCFFTPResourceModDate';
 
 {
  *  CFReadStreamCreateWithFTPURL()
- *  
+ *
  *  Discussion:
  *	Create an FTP read stream for downloading operation from an FTP
  *	URL. If the URL refers to a directory, the stream is a filtered
  *	line-at-a-time read stream corresponding to the listing results
  *	provided by the server. If it's a file, then the stream is a
  *	regular read stream providing the data for that file.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	alloc:
  *	  A pointer to the CFAllocator which should be used to allocate
  *	  memory for the CF read stream and its storage for values. If
  *	  this reference is not a valid CFAllocator, the behavior is
  *	  undefined.
- *	
+ *
  *	ftpURL:
  *	  A pointer to a CFURL structure created by CFURLCreateWithString
  *	  function.  If this parameter is not a pointer to a valid CFURL
  *	  structure, the behavior is undefined.
- *  
+ *
  *  Result:
  *	A pointer to the CF read stream created, or NULL if failed. It is
  *	caller's responsibilty to release the memory allocated for the
  *	read stream.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -624,40 +624,40 @@ function CFReadStreamCreateWithFTPURL( alloc: CFAllocatorRef; ftpURL: CFURLRef )
 
 {
  *  CFFTPCreateParsedResourceListing()
- *  
+ *
  *  Discussion:
  *	Parse a line of file or folder listing of Unix format, and store
  *	the extracted result in a CFDictionary.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	alloc:
  *	  A pointer to the CFAllocator which should be used to allocate
  *	  memory for the CFDictionary to hold resource info.  If this
  *	  reference is not a valid CFAllocator, the behavior is undefined.
- *	
+ *
  *	buffer:
  *	  A pointer to a buffer that may hold lines of resource listing,
  *	  but only the first line starting from buffer[0] will be parsed
  *	  each call.
- *	
+ *
  *	bufferLength:
  *	  The maximum buffer size in bytes started from the location
  *	  pointed by "buffer."
- *	
+ *
  *	parsed:
  *	  A pointer to a CFDictionary pointer.  The dictionary holds the
  *	  extracted resource information.  When parsing fails, a NULL
  *	  pointer will be returned.  It is caller's responsibilty to
  *	  release the memory allocated for the dictionary.
- *  
+ *
  *  Result:
  *	The number of bytes consumed from buffer, 0 if there are not
  *	enough bytes, or -1 if a parse failure occurs.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -669,34 +669,34 @@ function CFFTPCreateParsedResourceListing( alloc: CFAllocatorRef; buffer: UnivPt
 
 {
  *  CFWriteStreamCreateWithFTPURL()
- *  
+ *
  *  Discussion:
  *	Create an FTP write stream for uploading operation to a FTP URL.
  *	If the URL specifies a directory, the open will be followed by a
- *	close event/state and the directory will have been created. 
+ *	close event/state and the directory will have been created.
  *	Intermediary directory structure is not created.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	alloc:
  *	  A pointer to the CFAllocator which should be used to allocate
  *	  memory for the CF read stream and its storage for values. If
  *	  this reference is not a valid CFAllocator, the behavior is
  *	  undefined.
- *	
+ *
  *	ftpURL:
  *	  A pointer to a CFURL structure created by CFURLCreateWithString
  *	  function.  If this parameter is not a pointer to a valid CFURL
  *	  structure, the behavior is undefined.
- *  
+ *
  *  Result:
  *	A pointer to the CF write stream created, or NULL if failed. It
  *	is caller's responsibilty to release the memory allocated for the
  *	write stream.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available

+ 12 - 12
packages/univint/src/CFFileSecurity.pas

@@ -270,7 +270,7 @@ function CFFileSecurityCreateCopy( allocator: CFAllocatorRef; fileSec: CFFileSec
 
 {
  *	This routine copies the owner UUID associated with an CFFileSecurity object.
- *  
+ *
  *	Parameters
  *		fileSec
  *			The CFFileSecurity object.
@@ -285,7 +285,7 @@ function CFFileSecurityCopyOwnerUUID( fileSec: CFFileSecurityRef; var ownerUUID:
 
 {
  *	This routine sets the owner UUID associated with an CFFileSecurity object.
- *  
+ *
  *	Parameters
  *		fileSec
  *			The CFFileSecurity object.
@@ -299,7 +299,7 @@ function CFFileSecuritySetOwnerUUID( fileSec: CFFileSecurityRef; ownerUUID: CFUU
 
 {
  *	This routine copies the group UUID associated with an CFFileSecurity object.
- *  
+ *
  *	Parameters
  *		fileSec
  *			The CFFileSecurity object.
@@ -315,7 +315,7 @@ function CFFileSecurityCopyGroupUUID( fileSec: CFFileSecurityRef; var groupUUID:
 
 {
  *	This routine sets the group UUID associated with an CFFileSecurity object.
- *  
+ *
  *	Parameters
  *		fileSec
  *			The CFFileSecurity object.
@@ -333,7 +333,7 @@ function CFFileSecuritySetGroupUUID( fileSec: CFFileSecurityRef; groupUUID: CFUU
  *	CFFileSecurity object. The acl_t returned by this routine is a copy and must
  *	be released using acl_free(3). The acl_t is meant to be manipulated using
  *	the acl calls defined in <sys/acl.h>.
- *  
+ *
  *	Parameters
  *		fileSec
  *			The CFFileSecurity object.
@@ -372,7 +372,7 @@ function CFFileSecuritySetAccessControlList( fileSec: CFFileSecurityRef; accessC
 
 {
  *	This routine gets the owner uid_t associated with an CFFileSecurity object.
- *  
+ *
  *	Parameters
  *		fileSec
  *			The CFFileSecurity object.
@@ -388,7 +388,7 @@ function CFFileSecurityGetOwner( fileSec: CFFileSecurityRef; var owner: uid_t ):
 
 {
  *	This routine sets the owner uid_t associated with an CFFileSecurity object.
- *  
+ *
  *	Parameters
  *		fileSec
  *			The CFFileSecurity object.
@@ -403,7 +403,7 @@ function CFFileSecuritySetOwner( fileSec: CFFileSecurityRef; owner: uid_t ): Boo
 
 {
  *	This routine gets the group gid_t associated with an CFFileSecurity object.
- *  
+ *
  *	Parameters
  *		fileSec
  *			The CFFileSecurity object.
@@ -419,7 +419,7 @@ function CFFileSecurityGetGroup( fileSec: CFFileSecurityRef; var group: gid_t ):
 
 {
  *	This routine sets the group gid_t associated with an CFFileSecurity object.
- *  
+ *
  *	Parameters
  *		fileSec
  *			The CFFileSecurity object.
@@ -434,7 +434,7 @@ function CFFileSecuritySetGroup( fileSec: CFFileSecurityRef; group: gid_t ): Boo
 
 {
  *	This routine gets the mode_t associated with an CFFileSecurity object.
- *  
+ *
  *	Parameters
  *		fileSec
  *			The CFFileSecurity object.
@@ -450,7 +450,7 @@ function CFFileSecurityGetMode( fileSec: CFFileSecurityRef; var mode: mode_t ):
 
 {
  *	This routine sets the mode_t associated with an CFFileSecurity object.
- *  
+ *
  *	Parameters
  *		fileSec
  *			The CFFileSecurity object.
@@ -476,7 +476,7 @@ const
 
 {
  *	This routine clears file security properties in the CFFileSecurity object.
- *  
+ *
  *	Parameters
  *		clearPropertyMask
  *			The file security properties to clear.

+ 92 - 92
packages/univint/src/CFHTTPAuthentication.pas

@@ -1,15 +1,15 @@
 {
 	 File:	   CFNetwork/CFHTTPAuthentication.h
- 
+
 	 Contains:   CoreFoundation Network HTTP authentication header
- 
+
 	 Copyright:  Copyright (c) 2001-2008, Apple Inc. All rights reserved.
- 
+
 	 Bugs?:	  For bug reports, consult the following page on
 				 the World Wide Web:
- 
+
 					 http://bugs.freepascal.org
- 
+
 }
 {       Pascal Translation:  Gale R Paeper, <[email protected]>, 2008 }
 {       Pascal Translation Updated:  Jonas Maebe, <[email protected]>, October 2009 }
@@ -228,7 +228,7 @@ uses MacTypes, CFArray, CFBase, CFDictionary, CFHTTPMessage, CFStream;
 
 {
  *  CFHTTPAuthenticationRef
- *  
+ *
  *  Discussion:
  *	This is the type of a reference to HTTP authentication
  *	information.
@@ -239,7 +239,7 @@ type
 
 {
  *  CFStreamErrorHTTPAuthentication
- *  
+ *
  *  Discussion:
  *	Authentication errors which may be returned as a result of trying
  *	to apply authentication to a request.  These errors are in the
@@ -269,12 +269,12 @@ const
 
 {
  *  kCFHTTPAuthenticationUsername
- *  
+ *
  *  Discussion:
  *	CFDictionary key, for CFHTTPMessageApplyCredentialDictionary. The
  *	username for authentication as a CFString.  Needs to be added if
  *	CFHTTPAuthenticationRequiresUserNameAndPassword returns TRUE.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.4 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -285,12 +285,12 @@ var kCFHTTPAuthenticationUsername: CFStringRef; external name '_kCFHTTPAuthentic
 
 {
  *  kCFHTTPAuthenticationPassword
- *  
+ *
  *  Discussion:
  *	CFDictionary key, for CFHTTPMessageApplyCredentialDictionary. The
  *	password for authentication as a CFString.  Needs to be added if
  *	CFHTTPAuthenticationRequiresUserNameAndPassword returns TRUE.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.4 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -301,12 +301,12 @@ var kCFHTTPAuthenticationPassword: CFStringRef; external name '_kCFHTTPAuthentic
 
 {
  *  kCFHTTPAuthenticationAccountDomain
- *  
+ *
  *  Discussion:
  *	CFDictionary key, for CFHTTPMessageApplyCredentialDictionary. The
  *	domain for authentication as a CFString.  Needs to be added if
  *	CFHTTPAuthenticationRequiresAccountDomain returns TRUE.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.4 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -317,13 +317,13 @@ var kCFHTTPAuthenticationAccountDomain: CFStringRef; external name '_kCFHTTPAuth
 
 {
  *  CFHTTPAuthenticationGetTypeID()
- *  
+ *
  *  Discussion:
  *	Returns the type identifier of all CFHTTPAuthentication instances.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -335,30 +335,30 @@ function CFHTTPAuthenticationGetTypeID: CFTypeID; external name '_CFHTTPAuthenti
 
 {
  *  CFHTTPAuthenticationCreateFromResponse()
- *  
+ *
  *  Discussion:
  *	Based on a response of 401 or 407, this function will create a
  *	new authentication object which can be used for adding
  *	credentials to future requests.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
  *	The API's to CFHTTPAuthenticationRef are thread-safe so long as
  *	multiple threads are not altering the same
  *	CFHTTPAuthenticationRef at the same time.
- *  
+ *
  *  Parameters:
- *	
+ *
  *	alloc:
  *	  Allocator to use for creating authentication object
- *	
+ *
  *	response:
  *	  Failed response.
- *  
+ *
  *  Result:
  *	A freshly created authentication object useful for applying
  *	authentication credentials to new requests.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -370,7 +370,7 @@ function CFHTTPAuthenticationCreateFromResponse( alloc: CFAllocatorRef; response
 
 {
  *  CFHTTPAuthenticationIsValid()
- *  
+ *
  *  Discussion:
  *	Returns TRUE if the given authentication information was
  *	instantiated correctly and contains enough information in order
@@ -378,18 +378,18 @@ function CFHTTPAuthenticationCreateFromResponse( alloc: CFAllocatorRef; response
  *	still contain information which is useful to the user, e.g.
  *	unsupported method name.  An invalid object may be queried for
  *	information but may not be applied to a request.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
  *	The API's to CFHTTPAuthenticationRef are thread-safe so long as
  *	multiple threads are not altering the same
  *	CFHTTPAuthenticationRef at the same time.
- *  
+ *
  *  Parameters:
- *	
+ *
  *	auth:
  *	  The authentication information being queried.
- *	
+ *
  *	error:
  *	  Reference to a CFStreamError which will be populated in the
  *	  case of an error in creation.  Pass NULL if not interested in
@@ -397,11 +397,11 @@ function CFHTTPAuthenticationCreateFromResponse( alloc: CFAllocatorRef; response
  *	  kCFStreamErrorDomainHTTP, and the error code will be one of
  *	  those defined in CFHTTPStream.h or one of those listed as
  *	  CFStreamErrorHTTPAuthentication.
- *  
+ *
  *  Result:
  *	TRUE or FALSE depending on whether the authentication object is
  *	good for applying credentials to further requests.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -413,29 +413,29 @@ function CFHTTPAuthenticationIsValid( auth: CFHTTPAuthenticationRef; error: CFSt
 
 {
  *  CFHTTPAuthenticationAppliesToRequest()
- *  
+ *
  *  Discussion:
  *	Returns TRUE if the given request requires credentials based upon
  *	the given authentication information.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
  *	The API's to CFHTTPAuthenticationRef are thread-safe so long as
  *	multiple threads are not altering the same
  *	CFHTTPAuthenticationRef at the same time.
- *  
+ *
  *  Parameters:
- *	
+ *
  *	auth:
  *	  The authentication information being queried.
- *	
+ *
  *	request:
  *	  The request which is believed to need the given authentication.
- *  
+ *
  *  Result:
  *	TRUE if the given authentication information should be applied to
  *	the request, otherwise FALSE is returned.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -447,27 +447,27 @@ function CFHTTPAuthenticationAppliesToRequest( auth: CFHTTPAuthenticationRef; re
 
 {
  *  CFHTTPAuthenticationRequiresOrderedRequests()
- *  
+ *
  *  Discussion:
  *	Some authentication methods require that future requests must be
  *	performed in an ordered manner, so that information from a
  *	response can be added to a following request.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
  *	The API's to CFHTTPAuthenticationRef are thread-safe so long as
  *	multiple threads are not altering the same
  *	CFHTTPAuthenticationRef at the same time.
- *  
+ *
  *  Parameters:
- *	
+ *
  *	auth:
  *	  The authentication information being queried.
- *  
+ *
  *  Result:
  *	Returns TRUE if the given authentication method requires ordered
  *	requests.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -479,31 +479,31 @@ function CFHTTPAuthenticationRequiresOrderedRequests( auth: CFHTTPAuthentication
 
 {
  *  CFHTTPMessageApplyCredentials()
- *  
+ *
  *  Discussion:
  *	Perform the authentication method required on the request using
  *	the given username and password.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
  *	The API's to CFHTTPAuthenticationRef are thread-safe so long as
  *	multiple threads are not altering the same
  *	CFHTTPAuthenticationRef at the same time.
- *  
+ *
  *  Parameters:
- *	
+ *
  *	request:
  *	  The request which is to receive the credentials.
- *	
+ *
  *	auth:
  *	  The authentication information for the given request.
- *	
+ *
  *	username:
  *	  The username to use for performing the authentication.
- *	
+ *
  *	password:
  *	  The password to use for performing the authentication.
- *	
+ *
  *	error:
  *	  Reference to a CFStreamError which will be populated with the
  *	  error information should one occur during the application of
@@ -511,11 +511,11 @@ function CFHTTPAuthenticationRequiresOrderedRequests( auth: CFHTTPAuthentication
  *	  reason.  The error domain will be kCFStreamErrorDomainHTTP, and
  *	  the error code will be one of those define in CFHTTPStream.h or
  *	  one of those listed as CFStreamErrorHTTPAuthentication.
- *  
+ *
  *  Result:
  *	TRUE will be returned if the application of the credentials to
  *	the request was successful, otherwise FALSE is returned.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -527,29 +527,29 @@ function CFHTTPMessageApplyCredentials( request: CFHTTPMessageRef; auth: CFHTTPA
 
 {
  *  CFHTTPMessageApplyCredentialDictionary()
- *  
+ *
  *  Discussion:
  *	Perform the authentication method required on the request using
  *	the given credential information.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
  *	The API's to CFHTTPAuthenticationRef are thread-safe so long as
  *	multiple threads are not altering the same
  *	CFHTTPAuthenticationRef at the same time.
- *  
+ *
  *  Parameters:
- *	
+ *
  *	request:
  *	  The request which is to receive the credentials.
- *	
+ *
  *	auth:
  *	  The authentication information for the given request.
- *	
+ *
  *	dict:
  *	  A dictionary containing credentials to be applied to the
  *	  request.  Valid keys are declared above.
- *	
+ *
  *	error:
  *	  Reference to a CFStreamError which will be populated with the
  *	  error information should one occur during the application of
@@ -557,11 +557,11 @@ function CFHTTPMessageApplyCredentials( request: CFHTTPMessageRef; auth: CFHTTPA
  *	  reason.  The error domain will be kCFStreamErrorDomainHTTP, and
  *	  the error code will be one of those define in CFHTTPStream.h or
  *	  one of those listed as CFStreamErrorHTTPAuthentication.
- *  
+ *
  *  Result:
  *	TRUE will be returned if the application of the credentials to
  *	the request was successful, otherwise FALSE is returned.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.4 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -573,29 +573,29 @@ function CFHTTPMessageApplyCredentialDictionary( request: CFHTTPMessageRef; auth
 
 {
  *  CFHTTPAuthenticationCopyRealm()
- *  
+ *
  *  Discussion:
  *	Some authentication techniques provide for namespaces on top of
  *	domains. This call will return the authentication information's
  *	namespace if there is one, otherwise it will return NULL.  This
  *	namespace is usually used for prompting the application user for
  *	a name and password.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
  *	The API's to CFHTTPAuthenticationRef are thread-safe so long as
  *	multiple threads are not altering the same
  *	CFHTTPAuthenticationRef at the same time.
- *  
+ *
  *  Parameters:
- *	
+ *
  *	auth:
  *	  The authentication information being queried.
- *  
+ *
  *  Result:
  *	This call will return the authentication information's namespace
  *	if there is one, otherwise it will return NULL.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -607,29 +607,29 @@ function CFHTTPAuthenticationCopyRealm( auth: CFHTTPAuthenticationRef ): CFStrin
 
 {
  *  CFHTTPAuthenticationCopyDomains()
- *  
+ *
  *  Discussion:
  *	Returns a list of domain URL's on which the given authentication
  *	should be applied. This function is provided mostly for
  *	informational purposes. CFHTTPAuthenticationAppliesToRequest
  *	should be used in order to check whether a request requires the
  *	authentication.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
  *	The API's to CFHTTPAuthenticationRef are thread-safe so long as
  *	multiple threads are not altering the same
  *	CFHTTPAuthenticationRef at the same time.
- *  
+ *
  *  Parameters:
- *	
+ *
  *	auth:
  *	  The authentication information being queried.
- *  
+ *
  *  Result:
  *	Returns a list of domain URL's on which the given authentication
  *	should be applied.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -641,27 +641,27 @@ function CFHTTPAuthenticationCopyDomains( auth: CFHTTPAuthenticationRef ): CFArr
 
 {
  *  CFHTTPAuthenticationCopyMethod()
- *  
+ *
  *  Discussion:
  *	Returns the method of authentication which will be performed when
  *	applying credentials.  The strongest method of authentication
  *	will be chosen in the case of multiple choices.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
  *	The API's to CFHTTPAuthenticationRef are thread-safe so long as
  *	multiple threads are not altering the same
  *	CFHTTPAuthenticationRef at the same time.
- *  
+ *
  *  Parameters:
- *	
+ *
  *	auth:
  *	  The authentication information being queried.
- *  
+ *
  *  Result:
  *	Returns the method of authentication which will be performed when
  *	applying credentials.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -673,26 +673,26 @@ function CFHTTPAuthenticationCopyMethod( auth: CFHTTPAuthenticationRef ): CFStri
 
 {
  *  CFHTTPAuthenticationRequiresUserNameAndPassword()
- *  
+ *
  *  Discussion:
  *	Returns TRUE if the chosen authentication scheme requires a
  *	username and password.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
  *	The API's to CFHTTPAuthenticationRef are thread-safe so long as
  *	multiple threads are not altering the same
  *	CFHTTPAuthenticationRef at the same time.
- *  
+ *
  *  Parameters:
- *	
+ *
  *	auth:
  *	  The authentication information being queried.
- *  
+ *
  *  Result:
  *	Returns TRUE if the chosen authentication scheme requires a
  *	username and password.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -704,27 +704,27 @@ function CFHTTPAuthenticationRequiresUserNameAndPassword( auth: CFHTTPAuthentica
 
 {
  *  CFHTTPAuthenticationRequiresAccountDomain()
- *  
+ *
  *  Discussion:
  *	Returns TRUE if the chosen authentication scheme requires a
  *	domain for authentication.  Currently, this will return TRUE for
  *	"NTLM" and FALSE for the other methods.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
  *	The API's to CFHTTPAuthenticationRef are thread-safe so long as
  *	multiple threads are not altering the same
  *	CFHTTPAuthenticationRef at the same time.
- *  
+ *
  *  Parameters:
- *	
+ *
  *	auth:
  *	  The authentication information being queried.
- *  
+ *
  *  Result:
  *	Returns TRUE if the chosen authentication scheme requires a
  *	domain for authentication.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.4 and later in CoreServices.framework
  *	CarbonLib:		not available

+ 164 - 164
packages/univint/src/CFHTTPMessage.pas

@@ -1,15 +1,15 @@
 {
 	 File:	   CFNetwork/CFHTTPMessage.h
- 
+
 	 Contains:   CoreFoundation Network socket streams header
- 
+
 	 Copyright:  Copyright (c) 2001-2008, Apple Inc. All rights reserved.
- 
+
 	 Bugs?:	  For bug reports, consult the following page on
 				 the World Wide Web:
- 
+
 					 http://bugs.freepascal.org
- 
+
 }
 {       Pascal Translation:  Peter N Lewis, <[email protected]>, 2004 }
 {       Pascal Translation Updated:  Gale R Paeper, <[email protected]>, 2008 }
@@ -229,10 +229,10 @@ uses MacTypes,CFString,CFURL,CFBase,CFData,CFDictionary;
 
 {
  *  kCFHTTPVersion1_0
- *  
+ *
  *  Discussion:
  *	Version string for HTTP 1.0.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.1 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -244,10 +244,10 @@ var kCFHTTPVersion1_0: CFStringRef; external name '_kCFHTTPVersion1_0'; (* attri
 
 {
  *  kCFHTTPVersion1_1
- *  
+ *
  *  Discussion:
  *	Version string for HTTP 1.1.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.1 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -259,10 +259,10 @@ var kCFHTTPVersion1_1: CFStringRef; external name '_kCFHTTPVersion1_1'; (* attri
 
 {
  *  kCFHTTPAuthenticationSchemeBasic
- *  
+ *
  *  Discussion:
  *	HTTP Basic authentication scheme.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -274,10 +274,10 @@ var kCFHTTPAuthenticationSchemeBasic: CFStringRef; external name '_kCFHTTPAuthen
 
 {
  *  kCFHTTPAuthenticationSchemeDigest
- *  
+ *
  *  Discussion:
  *	HTTP Digest Access authentication scheme.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -288,10 +288,10 @@ var kCFHTTPAuthenticationSchemeDigest: CFStringRef; external name '_kCFHTTPAuthe
 
 {
  *  kCFHTTPAuthenticationSchemeNTLM
- *  
+ *
  *  Discussion:
  *	HTTP NTLM authentication scheme.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.5 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -302,10 +302,10 @@ var kCFHTTPAuthenticationSchemeNTLM: CFStringRef; external name '_kCFHTTPAuthent
 
 {
  *  kCFHTTPAuthenticationSchemeNegotiate
- *  
+ *
  *  Discussion:
  *	HTTP Negotiate authentication scheme.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.5 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -313,13 +313,13 @@ var kCFHTTPAuthenticationSchemeNTLM: CFStringRef; external name '_kCFHTTPAuthent
  }
 var kCFHTTPAuthenticationSchemeNegotiate: CFStringRef; external name '_kCFHTTPAuthenticationSchemeNegotiate'; (* attribute const *)
 (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0) *)
-	
+
 {
  *  kCFHTTPAuthenticationSchemeNegotiate2
- *  
+ *
  *  Discussion:
  *	HTTP Negotiate v2 authentication scheme.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.6 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -327,28 +327,28 @@ var kCFHTTPAuthenticationSchemeNegotiate: CFStringRef; external name '_kCFHTTPAu
  }
 var kCFHTTPAuthenticationSchemeNegotiate2: CFStringRef; external name '_kCFHTTPAuthenticationSchemeNegotiate2'; (* attribute const *)
 (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_3_0) *)
-	
+
 {
  *  kCFHTTPAuthenticationSchemeXMobileMeAuthToken
- *  
+ *
  *  Discussion:
  *	HTTP XMobileMeAuthToken authentication scheme.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.6 and later in CoreServices.framework
  *	CarbonLib:		not available
  *	Non-Carbon CFM:   not available
  }
 var kCFHTTPAuthenticationSchemeXMobileMeAuthToken: CFStringRef; external name '_kCFHTTPAuthenticationSchemeXMobileMeAuthToken'; (* attribute const *)
-(* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_4_3) *)	
-	
+(* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_4_3) *)
+
 
 {
  *  kCFHTTPAuthenticationSchemeKerberos
- *  
+ *
  *  Discussion:
  *	HTTP Negotiate authentication scheme.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.7 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -373,10 +373,10 @@ var kCFHTTPAuthenticationSchemeOAuth1: CFStringRef; external name '_kCFHTTPAuthe
 (* __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_NA) *)
 {$endc}
 
-	
+
 {
  *  CFHTTPMessageRef
- *  
+ *
  *  Discussion:
  *	This is the type of a reference to an HTTP message. An HTTP
  *	message can be a request or a response.
@@ -387,16 +387,16 @@ type
 
 {
  *  CFHTTPMessageGetTypeID()
- *  
+ *
  *  Discussion:
  *	Return the unique type for this class.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
- *  
+ *
  *  Result:
  *	A unique CFType for CFHTTPMessage.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.1 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -408,38 +408,38 @@ function CFHTTPMessageGetTypeID: CFTypeID; external name '_CFHTTPMessageGetTypeI
 
 {
  *  CFHTTPMessageCreateRequest()
- *  
+ *
  *  Discussion:
  *	Create an HTTPMessage from an HTTP method, url and version.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	alloc:
  *	  A pointer to the CFAllocator which should be used to allocate
  *	  memory for the CF read stream and its storage for values. If
  *	  this reference is not a valid CFAllocator, the behavior is
  *	  undefined.
- *	
+ *
  *	requestMethod:
  *	  A pointer to a CFString indicating the method of request. For a
  *	  "GET" request, for example, the value would be CFSTR("GET").
- *	
+ *
  *	url:
  *	  A pointer to a CFURL structure created any of the several
  *	  CFURLCreate... functions.  If this parameter is not a pointer
  *	  to a valid CFURL structure, the behavior is undefined.
- *	
+ *
  *	httpVersion:
  *	  A pointer to a CFString indicating the version of request.
- *  
+ *
  *  Result:
  *	A pointer to the CFHTTPMessage created, or NULL if failed. It is
  *	caller's responsibilty to release the memory allocated for the
  *	message.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.1 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -451,38 +451,38 @@ function CFHTTPMessageCreateRequest( alloc: CFAllocatorRef; requestMethod: CFStr
 
 {
  *  CFHTTPMessageCreateResponse()
- *  
+ *
  *  Discussion:
  *	Create an HTTPMessage from an HTTP status code, description and
  *	version.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	alloc:
  *	  A pointer to the CFAllocator which should be used to allocate
  *	  memory for the CF read stream and its storage for values. If
  *	  this reference is not a valid CFAllocator, the behavior is
  *	  undefined.
- *	
+ *
  *	statusCode:
  *	  An integer status code for the response.
- *	
+ *
  *	statusDescription:
  *	  A pointer to a CFString for the status. Pass NULL to use the
  *	  standard description for the given status code, as found in RFC
  *	  2616.
- *	
+ *
  *	httpVersion:
  *	  A pointer to a CFString for the HTTP version.
- *  
+ *
  *  Result:
  *	A pointer to the CFHTTPMessage created, or NULL if failed. It is
  *	caller's responsibilty to release the memory allocated for the
  *	message.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.1 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -494,31 +494,31 @@ function CFHTTPMessageCreateResponse( alloc: CFAllocatorRef; statusCode: CFIndex
 
 {
  *  CFHTTPMessageCreateEmpty()
- *  
+ *
  *  Discussion:
  *	Creates an empty request or response, which you can then append
  *	bytes to via CFHTTPMessageAppendBytes().
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	alloc:
  *	  A pointer to the CFAllocator which should be used to allocate
  *	  memory for the CF read stream and its storage for values. If
  *	  this reference is not a valid CFAllocator, the behavior is
  *	  undefined.
- *	
+ *
  *	isRequest:
  *	  A boolean. Pass kCFBooleanTrue if the message should be a
  *	  request.
- *  
+ *
  *  Result:
  *	A pointer to the CFHTTPMessage created, or NULL if failed. It is
  *	caller's responsibilty to release the memory allocated for the
  *	message.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.1 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -530,30 +530,30 @@ function CFHTTPMessageCreateEmpty( alloc: CFAllocatorRef; isRequest: Boolean ):
 
 {
  *  CFHTTPMessageCreateCopy()
- *  
+ *
  *  Discussion:
  *	Creates a copy of a CFHTTPMessage.
- *  
+ *
  *  Mac OS X threading:
  *	Not thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	alloc:
  *	  A pointer to the CFAllocator which should be used to allocate
  *	  memory for the CF read stream and its storage for values. If
  *	  this reference is not a valid CFAllocator, the behavior is
  *	  undefined.
- *	
+ *
  *	message:
  *	  A pointer to the CFHTTPMessage to be copied. If the message is
  *	  NULL, the behavior is undefined.
- *  
+ *
  *  Result:
  *	A pointer to the CFHTTPMessage created, or NULL if failed. It is
  *	caller's responsibilty to release the memory allocated for the
  *	message.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.1 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -565,24 +565,24 @@ function CFHTTPMessageCreateCopy( alloc: CFAllocatorRef; message: CFHTTPMessageR
 
 {
  *  CFHTTPMessageIsRequest()
- *  
+ *
  *  Discussion:
  *	Returns whether the CFHTTPMessage is a request or a response.
- *  
+ *
  *  Mac OS X threading:
  *	Not thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	message:
  *	  A pointer to the CFHTTPMessage to be copied. If the message is
  *	  NULL, the behavior is undefined.
- *  
+ *
  *  Result:
  *	A Boolean. A value of kCFBooleanTrue indicates the message is a
  *	request. A value of kCFBooleanFalse indicates the message is a
  *	response.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.1 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -594,23 +594,23 @@ function CFHTTPMessageIsRequest( message: CFHTTPMessageRef ): Boolean; external
 
 {
  *  CFHTTPMessageCopyVersion()
- *  
+ *
  *  Discussion:
  *	Returns the HTTP version.
- *  
+ *
  *  Mac OS X threading:
  *	Not thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	message:
  *	  A pointer to the CFHTTPMessage to be copied. If the message is
  *	  NULL, the behavior is undefined.
- *  
+ *
  *  Result:
  *	A pointer to a CFString, or NULL if failed. It is caller's
  *	responsibilty to release the memory allocated for the string.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.1 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -622,23 +622,23 @@ function CFHTTPMessageCopyVersion( message: CFHTTPMessageRef ): CFStringRef; ext
 
 {
  *  CFHTTPMessageCopyBody()
- *  
+ *
  *  Discussion:
  *	Returns the body of the message.
- *  
+ *
  *  Mac OS X threading:
  *	Not thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	message:
  *	  A pointer to the CFHTTPMessage to be copied. If the message is
  *	  NULL, the behavior is undefined.
- *  
+ *
  *  Result:
  *	A pointer to a CFData, or NULL if failed. It is caller's
  *	responsibilty to release the memory allocated for the data.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.1 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -650,23 +650,23 @@ function CFHTTPMessageCopyBody( message: CFHTTPMessageRef ): CFDataRef; external
 
 {
  *  CFHTTPMessageSetBody()
- *  
+ *
  *  Discussion:
  *	Sets the body of the message from a CFData.
- *  
+ *
  *  Mac OS X threading:
  *	Not thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	message:
  *	  A pointer to the CFHTTPMessage to be copied. If the message is
  *	  NULL, the behavior is undefined.
- *	
+ *
  *	bodyData:
  *	  A pointer to a CFData containing the body to be set. If the
  *	  bodyData is NULL, the behavior is undefined.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.1 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -678,27 +678,27 @@ procedure CFHTTPMessageSetBody( message: CFHTTPMessageRef; bodyData: CFDataRef )
 
 {
  *  CFHTTPMessageCopyHeaderFieldValue()
- *  
+ *
  *  Discussion:
  *	Returns the specified header field.
- *  
+ *
  *  Mac OS X threading:
  *	Not thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	message:
  *	  A pointer to the CFHTTPMessage to be copied. If the message is
  *	  NULL, the behavior is undefined.
- *	
+ *
  *	headerField:
  *	  A pointer to the CFString. If the headerField is NULL, the
  *	  behavior is undefined.
- *  
+ *
  *  Result:
  *	A pointer to a CFString, or NULL if failed. It is caller's
  *	responsibilty to release the memory allocated for the string.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.1 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -710,23 +710,23 @@ function CFHTTPMessageCopyHeaderFieldValue( message: CFHTTPMessageRef; headerFie
 
 {
  *  CFHTTPMessageCopyAllHeaderFields()
- *  
+ *
  *  Discussion:
  *	Returns a CFDictionary containing all of the header fields.
- *  
+ *
  *  Mac OS X threading:
  *	Not thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	message:
  *	  A pointer to the CFHTTPMessage to be copied. If the message is
  *	  NULL, the behavior is undefined.
- *  
+ *
  *  Result:
  *	A pointer to a CFDictionary, or NULL if failed. It is caller's
  *	responsibilty to release the memory allocated for the dictionary.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.1 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -738,27 +738,27 @@ function CFHTTPMessageCopyAllHeaderFields( message: CFHTTPMessageRef ): CFDictio
 
 {
  *  CFHTTPMessageSetHeaderFieldValue()
- *  
+ *
  *  Discussion:
  *	Sets the value of the specified header field.
- *  
+ *
  *  Mac OS X threading:
  *	Not thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	message:
  *	  A pointer to the CFHTTPMessage to be copied. If the message is
  *	  NULL, the behavior is undefined.
- *	
+ *
  *	headerField:
  *	  A pointer to the CFString. If headerField is NULL, the behavior
  *	  is undefined.
- *	
+ *
  *	value:
  *	  A pointer to the CFString containing the value to set. Set the
  *	  value to NULL to remove the header field.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.1 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -770,31 +770,31 @@ procedure CFHTTPMessageSetHeaderFieldValue( message: CFHTTPMessageRef; headerFie
 
 {
  *  CFHTTPMessageAppendBytes()
- *  
+ *
  *  Discussion:
  *	Appends the given bytes to the message given (parsing out any
  *	control information if appropriate).  Returns kCFBooleanFalse if
  *	a parsing error occurs while processing the new data.
- *  
+ *
  *  Mac OS X threading:
  *	Not thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	message:
  *	  A pointer to the CFHTTPMessage to be copied. If the message is
  *	  NULL, the behavior is undefined.
- *	
+ *
  *	newBytes:
  *	  A pointer to the bytes. If newBytes is NULL, the behavior is
  *	  undefined.
- *	
+ *
  *	numBytes:
  *	  A CFIndex of the number of bytes to append.
- *  
+ *
  *  Result:
  *	A Boolean indicating success or failure.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.1 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -806,23 +806,23 @@ function CFHTTPMessageAppendBytes( message: CFHTTPMessageRef; newBytes: UnivPtr;
 
 {
  *  CFHTTPMessageIsHeaderComplete()
- *  
+ *
  *  Discussion:
  *	Returns whether further header data is expected by the message.
- *  
+ *
  *  Mac OS X threading:
  *	Not thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	message:
  *	  A pointer to the CFHTTPMessage to be copied. If the message is
  *	  NULL, the behavior is undefined.
- *  
+ *
  *  Result:
  *	A Boolean. A value of kCFBooleanTrue indicates the header is
  *	complete and no further data is expected.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.1 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -834,24 +834,24 @@ function CFHTTPMessageIsHeaderComplete( message: CFHTTPMessageRef ): Boolean; ex
 
 {
  *  CFHTTPMessageCopySerializedMessage()
- *  
+ *
  *  Discussion:
  *	Creates a self-contained copy of a CFHTTPMessage. This would be
  *	suitable for persistant storage or for transmitting over the
  *	network independently.
- *  
+ *
  *  Mac OS X threading:
  *	Not thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	request:
  *	  A pointer to the CFHTTPMessage to be seralized.
- *  
+ *
  *  Result:
  *	A pointer to a CFData, or NULL if failed. It is caller's
  *	responsibilty to release the memory allocated for the data.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.1 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -867,22 +867,22 @@ function CFHTTPMessageCopySerializedMessage( request: CFHTTPMessageRef ): CFData
 
 {
  *  CFHTTPMessageCopyRequestURL()
- *  
+ *
  *  Discussion:
  *	Creates a copy of the request URL.
- *  
+ *
  *  Mac OS X threading:
  *	Not thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	request:
  *	  A pointer to the CFHTTPMessage.
- *  
+ *
  *  Result:
  *	A pointer to a CFURL, or NULL if failed. It is caller's
  *	responsibilty to release the memory allocated for the url.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.1 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -894,22 +894,22 @@ function CFHTTPMessageCopyRequestURL( request: CFHTTPMessageRef ): CFURLRef; ext
 
 {
  *  CFHTTPMessageCopyRequestMethod()
- *  
+ *
  *  Discussion:
  *	Creates a copy of the request method.
- *  
+ *
  *  Mac OS X threading:
  *	Not thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	request:
  *	  A pointer to the CFHTTPMessage.
- *  
+ *
  *  Result:
  *	A pointer to a CFString, or NULL if failed. It is caller's
  *	responsibilty to release the memory allocated for the string.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.1 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -921,44 +921,44 @@ function CFHTTPMessageCopyRequestMethod( request: CFHTTPMessageRef ): CFStringRe
 
 {
  *  CFHTTPMessageAddAuthentication()
- *  
+ *
  *  Discussion:
  *	Adds authentication to the request. Tries to modify request to
  *	contain the authentication information requested by the failed
  *	response (which presumably is a 401 or 407 response).
- *  
+ *
  *  Mac OS X threading:
  *	Not thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	request:
  *	  A pointer to a CFHTTPMessage request.
- *	
+ *
  *	authenticationFailureResponse:
  *	  A pointer to a CFHTTPMessage of the failed response.
- *	
+ *
  *	username:
  *	  A pointer to a CFString containing the user name to
  *	  authenticate.
- *	
+ *
  *	password:
  *	  A pointer to a CFString containing the password of the user.
- *	
+ *
  *	authenticationScheme:
  *	  A pointer to a CFString containing the authentication scheme to
  *	  use to authenticate. If authenticationScheme is NULL, strongest
  *	  supported scheme listed authenticationFailureResponse will be
  *	  used.
- *	
+ *
  *	forProxy:
  *	  A boolean indicating whether the authentication applies to a
  *	  proxy or not.
- *  
+ *
  *  Result:
  *	A pointer to a CFString, or NULL if failed. It is caller's
  *	responsibilty to release the memory allocated for the string.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.1 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -974,22 +974,22 @@ function CFHTTPMessageAddAuthentication( request: CFHTTPMessageRef; authenticati
 
 {
  *  CFHTTPMessageGetResponseStatusCode()
- *  
+ *
  *  Discussion:
  *	Returns the status code for the response.
- *  
+ *
  *  Mac OS X threading:
  *	Not thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	response:
  *	  A pointer to the CFHTTPMessage to be copied. If the message is
  *	  NULL, the behavior is undefined.
- *  
+ *
  *  Result:
  *	A UInt32 indicating the status code.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.1 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -1001,24 +1001,24 @@ function CFHTTPMessageGetResponseStatusCode( response: CFHTTPMessageRef ): CFInd
 
 {
  *  CFHTTPMessageCopyResponseStatusLine()
- *  
+ *
  *  Discussion:
  *	Returns the status line for the response.
- *  
+ *
  *  Mac OS X threading:
  *	Not thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	response:
  *	  A pointer to the CFHTTPMessage to be copied. If the message is
  *	  NULL, the behavior is undefined.
- *  
+ *
  *  Result:
  *	A CFString indicating the status code, or NULL if failed. It is
  *	caller's responsibilty to release the memory allocated for the
  *	string.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.1 and later in CoreServices.framework
  *	CarbonLib:		not available

+ 56 - 56
packages/univint/src/CFHTTPStream.pas

@@ -1,15 +1,15 @@
 {
 	 File:	   CFNetwork/CFHTTPStream.h
- 
+
 	 Contains:   CoreFoundation Network HTTP streams header
- 
+
 	 Copyright:  Copyright (c) 2001-2008, Apple Inc. All rights reserved.
- 
+
 	 Bugs?:	  For bug reports, consult the following page on
 				 the World Wide Web:
- 
+
 					 http://bugs.freepascal.org
- 
+
 }
 {       Pascal Translation:  Peter N Lewis, <[email protected]>, 2004 }
 {       Pascal Translation Updated:  Gale R Paeper, <[email protected]>, 2008 }
@@ -228,10 +228,10 @@ uses MacTypes,CFStream,CFBase,CFHTTPMessage;
 
 {
  *  kCFStreamErrorDomainHTTP
- *  
+ *
  *  Discussion:
  *	Result code returned by HTTP server
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.1 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -242,7 +242,7 @@ var kCFStreamErrorDomainHTTP: SInt32; external name '_kCFStreamErrorDomainHTTP';
 
 {
  *  CFStreamErrorHTTP
- *  
+ *
  *  Discussion:
  *	Errors from the kCFStreamErrorDomainHTTP domain.
  }
@@ -266,11 +266,11 @@ const
 
 {
  *  kCFStreamPropertyHTTPResponseHeader
- *  
+ *
  *  Discussion:
  *	Stream property key, for copy operations. Value is a
  *	CFHTTPMessage with 0 bytes data.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.1 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -282,13 +282,13 @@ var kCFStreamPropertyHTTPResponseHeader: CFStringRef; external name '_kCFStreamP
 
 {
  *  kCFStreamPropertyHTTPFinalURL
- *  
+ *
  *  Discussion:
  *	Stream property key, for copy operations. The response header
  *	value is the CFURL from the final request; will only differ from
  *	the URL in the original request if an autoredirection has
  *	occurred.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -299,13 +299,13 @@ var kCFStreamPropertyHTTPFinalURL: CFStringRef; external name '_kCFStreamPropert
 
 {
  *  kCFStreamPropertyHTTPFinalRequest
- *  
+ *
  *  Discussion:
  *	Stream property key, for copy operations. The value is the
  *	CFHTTPMessage transmitted by the stream, after all modifications
  *	(such as for authentication, connection policy, or redirection)
  *	have been made.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.5 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -316,7 +316,7 @@ var kCFStreamPropertyHTTPFinalRequest: CFStringRef; external name '_kCFStreamPro
 
 {
  *  kCFStreamPropertyHTTPProxy
- *  
+ *
  *  Discussion:
  *	Stream property key, for both set and copy operations. The value
  *	is a CFDictionary. HTTP proxy information is set the same way as
@@ -326,7 +326,7 @@ var kCFStreamPropertyHTTPFinalRequest: CFStringRef; external name '_kCFStreamPro
  *	Host/Port pair from the keys below. Use the dictionary returned
  *	by SystemConfiguration.framework to set the default values for
  *	the system. HTTP proxies are not applied automatically.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -338,11 +338,11 @@ var kCFStreamPropertyHTTPProxy: CFStringRef; external name '_kCFStreamPropertyHT
 
 {
  *  kCFStreamPropertyHTTPProxyHost
- *  
+ *
  *  Discussion:
  *	Proxy dictionary key. The hostname of an HTTP proxy. The value is
  *	a CFString. The key name matches kSCPropNetProxiesHTTPProxy.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -354,10 +354,10 @@ var kCFStreamPropertyHTTPProxyHost: CFStringRef; external name '_kCFStreamProper
 
 {
  *  kCFStreamPropertyHTTPProxyPort
- *  
+ *
  *  Discussion:
  *	Proxy dictionary key. Value is a CFNumber.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -370,10 +370,10 @@ var kCFStreamPropertyHTTPProxyPort: CFStringRef; external name '_kCFStreamProper
 
 {
  *  kCFStreamPropertyHTTPSProxyHost
- *  
+ *
  *  Discussion:
  *	Proxy dictionary key. Value is a CFString.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -386,10 +386,10 @@ var kCFStreamPropertyHTTPSProxyHost: CFStringRef; external name '_kCFStreamPrope
 
 {
  *  kCFStreamPropertyHTTPSProxyPort
- *  
+ *
  *  Discussion:
  *	Proxy dictionary key. Value is a CFNumber.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -402,11 +402,11 @@ var kCFStreamPropertyHTTPSProxyPort: CFStringRef; external name '_kCFStreamPrope
 
 {
  *  kCFStreamPropertyHTTPShouldAutoredirect
- *  
+ *
  *  Discussion:
  *	Stream property key. Value is a CFBoolean. Redirection is not
  *	performed by default.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -418,14 +418,14 @@ var kCFStreamPropertyHTTPShouldAutoredirect: CFStringRef; external name '_kCFStr
 
 {
  *  kCFStreamPropertyHTTPAttemptPersistentConnection
- *  
+ *
  *  Discussion:
  *	Stream property key. Value is a CFBoolean.  If this property is
  *	set to kCFBooleanTrue, an HTTP stream will look for an
  *	appropriate extant persistent connection to use, and if it finds
  *	none, will try to create one. Persistent connections are not used
  *	by default.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -437,13 +437,13 @@ var kCFStreamPropertyHTTPAttemptPersistentConnection: CFStringRef; external name
 
 {
  *  kCFStreamPropertyHTTPRequestBytesWrittenCount
- *  
+ *
  *  Discussion:
  *	Stream property key. Value is a CFNumber. This property can only
  *	be retrieved, not set. The number returned is the number of bytes
  *	from the body of the request that have been written to the
  *	underlying socket
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -458,7 +458,7 @@ var kCFStreamPropertyHTTPRequestBytesWrittenCount: CFStringRef; external name '_
 {*******************}
 {
  *  CFReadStreamCreateForHTTPRequest()
- *  
+ *
  *  Discussion:
  *	Create an HTTP read stream for the response to the given request.
  *	When the stream is opened, it will begin transmitting the
@@ -469,24 +469,24 @@ var kCFStreamPropertyHTTPRequestBytesWrittenCount: CFStringRef; external name '_
  *	reported, if there are no data bytes). When an HTTP/1.1 server
  *	returns a chunked a response, the chunks will be formed into one
  *	continuous stream.
- *  
+ *
  *  Parameters:
- *	
+ *
  *	alloc:
  *	  A pointer to the CFAllocator which should be used to allocate
  *	  memory for the CF read stream and its storage for values. If
  *	  this reference is not a valid CFAllocator, the behavior is
  *	  undefined.
- *	
+ *
  *	request:
  *	  A pointer to a CFHTTPMessage created by the
  *	  CFHTTPMessageCreateRequest function.
- *  
+ *
  *  Result:
  *	A pointer to the CF read stream created, or NULL if failed. It is
  *	caller's responsibilty to release the memory allocated for the
  *	read stream.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.1 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -498,7 +498,7 @@ function CFReadStreamCreateForHTTPRequest( alloc: CFAllocatorRef; request: CFHTT
 
 {
  *  CFReadStreamCreateForStreamedHTTPRequest()
- *  
+ *
  *  Discussion:
  *	Creates a read stream for the response to the given
  *	requestHeaders plus requestBody. Use in preference to
@@ -513,28 +513,28 @@ function CFReadStreamCreateForHTTPRequest( alloc: CFAllocatorRef; request: CFHTT
  *	transfer-encoding will be added to requestHeaders, and bytes read
  *	from requestBody will be transmitted chunked. The body of
  *	requestHeaders is ignored.
- *  
+ *
  *  Parameters:
- *	
+ *
  *	alloc:
  *	  A pointer to the CFAllocator which should be used to allocate
  *	  memory for the CF read stream and its storage for values. If
  *	  this reference is not a valid CFAllocator, the behavior is
  *	  undefined.
- *	
+ *
  *	requestHeaders:
  *	  A pointer to a CFHTTPMessage created by the
  *	  CFHTTPMessageCreateRequest function. The body of requestHeaders
  *	  is ignored.
- *	
+ *
  *	requestBody:
  *	  A pointer to a CFReadStream.
- *  
+ *
  *  Result:
  *	A pointer to the CF read stream created, or NULL if failed. It is
  *	caller's responsibilty to release the memory allocated for the
  *	read stream.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -546,22 +546,22 @@ function CFReadStreamCreateForStreamedHTTPRequest( alloc: CFAllocatorRef; reques
 {$ifc TARGET_OS_MAC}
 {
  *  CFHTTPReadStreamSetRedirectsAutomatically()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *	Use the kCFStreamPropertyHTTPShouldAutoredirect property above
  *	instead.
- *  
+ *
  *  Discussion:
  *	Sets the redirection property on the http stream.
- *  
+ *
  *  Parameters:
- *	
+ *
  *	httpStream:
  *	  A pointer to the CFHTTPStream to be set.
- *	
+ *
  *	shouldAutoRedirect:
  *	  A boolean indicating whether to redirect or not.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.1 and later in CoreServices.framework but deprecated in 10.3
  *	CarbonLib:		not available
@@ -573,24 +573,24 @@ procedure CFHTTPReadStreamSetRedirectsAutomatically( httpStream: CFReadStreamRef
 
 {
  *  CFHTTPReadStreamSetProxy()   *** DEPRECATED ***
- *  
+ *
  *  Deprecated:
  *	Use the kCFStreamPropertyHTTPProxy above instead.
- *  
+ *
  *  Discussion:
  *	Sets the redirection property on the http stream.
- *  
+ *
  *  Parameters:
- *	
+ *
  *	httpStream:
  *	  A pointer to the CFHTTPStream to be set.
- *	
+ *
  *	proxyHost:
  *	  The proxy hostname. A CFString value.
- *	
+ *
  *	proxyPort:
  *	  The port number. A CFNumber value.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.1 and later in CoreServices.framework but deprecated in 10.3
  *	CarbonLib:		not available

+ 99 - 99
packages/univint/src/CFHost.pas

@@ -1,15 +1,15 @@
 {
 	 File:	   CFNetwork/CFHost.h
- 
+
 	 Contains:   CoreFoundation CFHost header
- 
+
 	 Copyright:  Copyright (c) 2001-2008, Apple Inc. All rights reserved.
- 
+
 	 Bugs?:	  For bug reports, consult the following page on
 				 the World Wide Web:
- 
+
 					 http://bugs.freepascal.org
- 
+
 }
 {       Pascal Translation:  Peter N Lewis, <[email protected]>, 2004 }
 {       Pascal Translation Updated:  Jonas Maebe, <[email protected]>, October 2009 }
@@ -227,7 +227,7 @@ uses MacTypes,CFBase,CFData,CFArray,CFRunLoop,CFStream;
 
 {
  *  CFHostRef
- *  
+ *
  *  Discussion:
  *	This is the type of a reference to a host name or address lookup.
  }
@@ -237,10 +237,10 @@ type
 
 {
  *  kCFStreamErrorDomainNetDB
- *  
+ *
  *  Discussion:
  *	Errors listed in netdb.h
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -252,10 +252,10 @@ var kCFStreamErrorDomainNetDB: SInt32; external name '_kCFStreamErrorDomainNetDB
 
 {
  *  kCFStreamErrorDomainSystemConfiguration
- *  
+ *
  *  Discussion:
  *	Errors listed in SystemConfiguration/SystemConfiguration.h
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -267,7 +267,7 @@ var kCFStreamErrorDomainSystemConfiguration: SInt32; external name '_kCFStreamEr
 
 {
  *  CFHostInfoType
- *  
+ *
  *  Discussion:
  *	Host information types to be resolved.
  }
@@ -294,7 +294,7 @@ const
 
 {
  *  CFHostClientContext
- *  
+ *
  *  Discussion:
  *	Structure containing the user-defined data and callbacks for
  *	CFHost objects.
@@ -341,22 +341,22 @@ type
 
 {
  *  CFHostClientCallBack
- *  
+ *
  *  Discussion:
  *	Callback function which is called upon error or completion of an
  *	asynchronous resolve.
- *  
+ *
  *  Parameters:
- *	
+ *
  *	theHost:
  *	  Host whose resolution is complete.
- *	
+ *
  *	typeInfo:
  *	  Enum representing which info resolution is complete.
- *	
+ *
  *	error:
  *	  Reference to an error structure if the resolution failed.
- *	
+ *
  *	info:
  *	  Client's info reference which was passed into the client
  *	  context.
@@ -367,13 +367,13 @@ type
 
 {
  *  CFHostGetTypeID()
- *  
+ *
  *  Discussion:
  *	Returns the type identifier of all CFHost instances.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -385,29 +385,29 @@ function CFHostGetTypeID: CFTypeID; external name '_CFHostGetTypeID';
 
 {
  *  CFHostCreateWithName()
- *  
+ *
  *  Discussion:
  *	Creates a new host object with the given name.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	allocator:
  *	  The CFAllocator which should be used to allocate memory for the
  *	  host. If this reference is not a valid CFAllocator, the
  *	  behavior is undefined.
- *	
+ *
  *	hostname:
  *	  A CFStringRef representing the name of the host. Must be
  *	  non-NULL.  If this reference is not a valid CFStringRef, the
  *	  behavior is undefined.
- *  
+ *
  *  Result:
  *	A valid CFHostRef which may now be resolved, or NULL if
  *	unsuccessful.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -419,29 +419,29 @@ function CFHostCreateWithName( allocator: CFAllocatorRef; hostname: CFStringRef
 
 {
  *  CFHostCreateWithAddress()
- *  
+ *
  *  Discussion:
  *	Creates a new host object with the given address.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	allocator:
  *	  The CFAllocator which should be used to allocate memory for the
  *	  host. If this reference is not a valid CFAllocator, the
  *	  behavior is undefined.
- *	
+ *
  *	addr:
  *	  A CFDataRef containing a struct sockaddr which is the address
  *	  of the host. Must be non-NULL.  If this reference is not a
  *	  valid CFDataRef, the behavior is undefined.
- *  
+ *
  *  Result:
  *	A valid CFHostRef which may now be resolved, or NULL if
  *	unsuccessful.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -453,30 +453,30 @@ function CFHostCreateWithAddress( allocator: CFAllocatorRef; addr: CFDataRef ):
 
 {
  *  CFHostCreateCopy()
- *  
+ *
  *  Discussion:
  *	Creates a new host object as a copy of host argument.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	alloc:
  *	  The CFAllocator which should be used to allocate memory for the
  *	  new host. If this reference is not a valid CFAllocator, the
  *	  behavior is undefined.
- *	
+ *
  *	host:
- *	  A CFHostRef representing the original host. Must be non-NULL. 
+ *	  A CFHostRef representing the original host. Must be non-NULL.
  *	  If this reference is not a valid CFHostRef, the behavior is
  *	  undefined.
- *  
+ *
  *  Result:
  *	A valid CFHostRef which contains a copy of all previously
  *	resolved data from the original.  NULL is returned in the case of
  *	failure.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -488,37 +488,37 @@ function CFHostCreateCopy( alloc: CFAllocatorRef; host: CFHostRef ): CFHostRef;
 
 {
  *  CFHostStartInfoResolution()
- *  
+ *
  *  Discussion:
  *	Performs a lookup for the given host.  It will search for the
- *	requested information if there is no other active request. 
+ *	requested information if there is no other active request.
  *	Previously cached information of the given type will be released.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	theHost:
  *	  The CFHostRef which should be resolved. Must be non-NULL. If
  *	  this reference is not a valid CFHostRef, the behavior is
  *	  undefined.
- *	
+ *
  *	info:
- *	  The enum representing the type of information to be retrieved. 
+ *	  The enum representing the type of information to be retrieved.
  *	  If the value is not a valid type, the behavior is undefined.
- *	
+ *
  *	error:
  *	  A reference to a CFStreamError structure which will be filled
  *	  with any error information should an error occur.  May be set
  *	  to NULL if error information is not wanted.
- *  
+ *
  *  Result:
  *	Returns TRUE on success and FALSE on failure.  In asynchronous
  *	mode, this function will return immediately.  In synchronous
  *	mode, it will block until the resolve has completed or until the
  *	resolve is cancelled.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -530,32 +530,32 @@ function CFHostStartInfoResolution( theHost: CFHostRef; info: CFHostInfoType; er
 
 {
  *  CFHostGetAddressing()
- *  
+ *
  *  Discussion:
  *	Tries to retrieve the known addresses from the given host.
  *	Returns a CFArrayRef of addresses if known and there were some.
  *	NULL is returned otherwise.  Each address is a CFDataRef wrapping
  *	a struct sockaddr.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
  *	The function gets the data in a thread-safe manner, but the
  *	resulting data is not safe.  Since it is returned as a matter of
  *	a get opposed to a copy, the data is not safe if the host is
  *	being altered from another thread.
- *  
+ *
  *  Parameters:
- *	
+ *
  *	theHost:
  *	  The CFHostRef which contains the relevant information. Must be
  *	  non-NULL. If this reference is not a valid CFHostRef, the
  *	  behavior is undefined.
- *	
+ *
  *	hasBeenResolved:
  *	  A reference to a Boolean which returns FALSE if the information
  *	  was not available (e.g. CFHostStartInfoResolution has not been
  *	  called), otherwise TRUE will be returned.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -567,31 +567,31 @@ function CFHostGetAddressing( theHost: CFHostRef; hasBeenResolved: BooleanPtr {
 
 {
  *  CFHostGetNames()
- *  
+ *
  *  Discussion:
  *	Tries to retrieve the names/aliases from the given host. Returns
  *	a CFArrayRef of names for the given host.  NULL is returned
  *	otherwise.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
  *	The function gets the data in a thread-safe manner, but the
  *	resulting data is not safe.  Since it is returned as a matter of
  *	a get opposed to a copy, the data is not safe if the host is
  *	being altered from another thread.
- *  
+ *
  *  Parameters:
- *	
+ *
  *	theHost:
  *	  The CFHostRef which contains the relevant information. Must be
  *	  non-NULL. If this reference is not a valid CFHostRef, the
  *	  behavior is undefined.
- *	
+ *
  *	hasBeenResolved:
  *	  A reference to a Boolean which returns FALSE if the information
  *	  was not available (e.g. CFHostStartInfoResolution has not been
  *	  called), otherwise TRUE will be returned.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -603,7 +603,7 @@ function CFHostGetNames( theHost: CFHostRef; hasBeenResolved: BooleanPtr { can b
 
 {
  *  CFHostGetReachability()
- *  
+ *
  *  Discussion:
  *	Tries to retrieve the reachability of the given host. Returns a
  *	CFDataRef which wraps the reachability flags. NULL will be
@@ -612,26 +612,26 @@ function CFHostGetNames( theHost: CFHostRef; hasBeenResolved: BooleanPtr { can b
  *	Returns FALSE if the information was not available, otherwise
  *	TRUE will be returned with the results containing the requested
  *	information.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
  *	The function gets the data in a thread-safe manner, but the
  *	resulting data is not safe.  Since it is returned as a matter of
  *	a get opposed to a copy, the data is not safe if the host is
  *	being altered from another thread.
- *  
+ *
  *  Parameters:
- *	
+ *
  *	theHost:
  *	  The CFHostRef which contains the relevant information. Must be
  *	  non-NULL. If this reference is not a valid CFHostRef, the
  *	  behavior is undefined.
- *	
+ *
  *	hasBeenResolved:
  *	  A reference to a Boolean which returns FALSE if the information
  *	  was not available (e.g. CFHostStartInfoResolution has not been
  *	  called), otherwise TRUE will be returned.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -643,24 +643,24 @@ function CFHostGetReachability( theHost: CFHostRef; hasBeenResolved: BooleanPtr
 
 {
  *  CFHostCancelInfoResolution()
- *  
+ *
  *  Discussion:
  *	Cancels an outstanding asynchronous or synchronous resolve.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	theHost:
  *	  The CFHostRef which is currently resolving.  Must be non-NULL.
  *	  If this reference is not a valid CFHostRef, the behavior is
  *	  undefined.
- *	
+ *
  *	info:
  *	  The enum representing which resolution to be canceled.  If the
  *	  value is not a valid type, the behavior is undefined.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -672,37 +672,37 @@ procedure CFHostCancelInfoResolution( theHost: CFHostRef; info: CFHostInfoType )
 
 {
  *  CFHostSetClient()
- *  
+ *
  *  Discussion:
  *	Associates a client context and callback function with a
  *	CFHostRef.  This is required for asynchronous usage.  If not set,
  *	resolve will take place synchronously.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	theHost:
  *	  The CFHostRef which is getting a client.  Must be non-NULL. If
  *	  this reference is not a valid CFHostRef, the behavior is
  *	  undefined.
- *	
+ *
  *	clientCB:
  *	  A CFHostClientCallBack which will be called when the resolve
  *	  completes or is cancelled.  Use NULL to remove the client
  *	  association with a host object.
- *	
+ *
  *	clientContext:
  *	  A CFHostClientContext which is used to set the contextual
  *	  information associated with the host object.  The info pointer
  *	  from the struct will be passed to the callback function. If
  *	  setting a client, this value must be non-NULL.
- *  
+ *
  *  Result:
  *	Returns TRUE if the procedure was a success, otherwise it returns
  *	FALSE.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -714,31 +714,31 @@ function CFHostSetClient( theHost: CFHostRef; clientCB: CFHostClientCallBack { c
 
 {
  *  CFHostScheduleWithRunLoop()
- *  
+ *
  *  Discussion:
  *	Schedules the given host on a run loop and mode so the client
  *	will receive its callbacks on that loop and mode.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	theHost:
  *	  The CFHostRef which is being scheduled.  Must be non-NULL. If
  *	  this reference is not a valid CFHostRef, the behavior is
  *	  undefined.
- *	
+ *
  *	runLoop:
  *	  A CFRunLoopRef on which the host should be scheduled. Must be
  *	  non-NULL.  If this reference is not a valid CFRunLoopRef, the
  *	  behavior is undefined.
- *	
+ *
  *	runLoopMode:
  *	  A CFStringRef which is the mode in which the run loop will be
  *	  running when notification occurs.  Must be non-NULL. If this
  *	  reference is not a valid CFStringRef, the behavior is undefined.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -750,31 +750,31 @@ procedure CFHostScheduleWithRunLoop( theHost: CFHostRef; runLoop: CFRunLoopRef;
 
 {
  *  CFHostUnscheduleFromRunLoop()
- *  
+ *
  *  Discussion:
  *	Unschedules the given host from a run loop and mode so the client
  *	will not receive its callbacks on that loop and mode.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	theHost:
  *	  The CFHostRef which is being unscheduled.  Must be non-NULL. If
  *	  this reference is not a valid CFHostRef, the behavior is
  *	  undefined.
- *	
+ *
  *	runLoop:
  *	  A CFRunLoopRef on which the host is scheduled and should now be
  *	  unscheduled.  Must be non-NULL.  If this reference is not a
  *	  valid CFRunLoopRef, the behavior is undefined.
- *	
+ *
  *	runLoopMode:
  *	  A CFStringRef which is the mode in which the host is scheduled
  *	  and should be unscheduled.  Must be non-NULL. If this reference
  *	  is not a valid CFStringRef, the behavior is undefined.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available

+ 36 - 36
packages/univint/src/CFNetDiagnostics.pas

@@ -1,15 +1,15 @@
 {
 	 File:	   CFNetwork/CFNetDiagnostics.h
- 
+
 	 Contains:   CFNetDiagnostics interface
-  
+
 	 Copyright:  Copyright (c) 2004-2008, Apple Inc. All rights reserved.
- 
+
 	 Bugs?:	  For bug reports, consult the following page on
 				 the World Wide Web:
- 
+
 					 http://bugs.freepascal.org
- 
+
 }
 {       Pascal Translation:  Gale R Paeper, <[email protected]>, 2008 }
 {       Pascal Translation Updated:  Jonas Maebe, <[email protected]>, October 2009 }
@@ -229,7 +229,7 @@ uses MacTypes, CFBase, CFStream, CFURL;
 
 {
  *  CFNetDiagnosticRef
- *  
+ *
  *  Discussion:
  *	This is the type used to describe the types of connection that
  *	clients may be querying about
@@ -240,7 +240,7 @@ type
 
 {
  *  CFNetDiagnosticStatusValues
- *  
+ *
  *  Discussion:
  *	Values for CFNetDiagnosticStatus
  }
@@ -271,7 +271,7 @@ const
 
 {
  *  CFNetDiagnosticStatus
- *  
+ *
  *  Discussion:
  *	Returned by the various status and diagnostic calls
  }
@@ -279,27 +279,27 @@ type
 	CFNetDiagnosticStatus = CFIndex;
 {
  *  CFNetDiagnosticCreateWithStreams()
- *  
+ *
  *  Discussion:
  *	Creates a CFNetDiagnosticRef from a pair of CFStreams. Either
  *	stream may be NULL. This is the preferred interface for creating
  *	a CFNetDiagnosticRef.
- *  
+ *
  *  Parameters:
- *	
+ *
  *	alloc:
  *	  The CF allocator to use.
- *	
+ *
  *	readStream:
  *	  CFReadStreamRef referring to the failed connection. May be NULL.
- *	
+ *
  *	writeStream:
  *	  CFWriteStreamRef referring to the failed connection. May be
  *	  NULL.
- *  
+ *
  *  Result:
  *	A CFNetDiagnosticRef referring to the current networking issue.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.4 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -311,22 +311,22 @@ function CFNetDiagnosticCreateWithStreams( alloc: CFAllocatorRef; readStream: CF
 
 {
  *  CFNetDiagnosticCreateWithURL()
- *  
+ *
  *  Discussion:
  *	Creates a CFNetDiagnosticRef based on a CFURLRef passed in by the
  *	application.
- *  
+ *
  *  Parameters:
- *	
+ *
  *	alloc:
  *	  The CF allocator to use.
- *	
+ *
  *	url:
  *	  CFURLRef referring to the failed connection.
- *  
+ *
  *  Result:
  *	A CFNetDiagnosticRef referring to the current networking issue.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.4 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -338,23 +338,23 @@ function CFNetDiagnosticCreateWithURL( alloc: CFAllocatorRef; url: CFURLRef ): C
 
 {
  *  CFNetDiagnosticSetName()
- *  
+ *
  *  Discussion:
  *	If the framework requires an application name to be displayed to
  *	the user it will derive it from the bundle identifier of the
  *	currently running application, in that application's current
  *	localization. If you want to override that you may use
  *	CFNetDiagnosticSetName to specify a CFStringRef to be used.
- *  
+ *
  *  Parameters:
- *	
+ *
  *	details:
  *	  CFNetDiagnosticRef referring to the current problem.
- *	
+ *
  *	name:
  *	  The localized name that should appear to the user when
  *	  referring to the application.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.4 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -366,22 +366,22 @@ procedure CFNetDiagnosticSetName( details: CFNetDiagnosticRef; name: CFStringRef
 
 {
  *  CFNetDiagnosticDiagnoseProblemInteractively()
- *  
+ *
  *  Discussion:
  *	Opens the Network Diagnostics window and returns immediately once
  *	it is open. The client passes in a CFNetDiagnosticRef built with
  *	one of the creator functions.
- *  
+ *
  *  Parameters:
- *	
+ *
  *	details:
  *	  CFNetDiagnosticRef referring to the current problem.
- *  
+ *
  *  Result:
  *	A CFNetDiagnosticStatus. Will either be CFNetDiagnosticNoErr, or
  *	CFNetDiagnosticErr if there was an error attempting to run the
  *	diagnosis.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.4 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -393,7 +393,7 @@ function CFNetDiagnosticDiagnoseProblemInteractively( details: CFNetDiagnosticRe
 
 {
  *  CFNetDiagnosticCopyNetworkStatusPassively()
- *  
+ *
  *  Discussion:
  *	Returns a status value that can be used to display basic
  *	information about the connection. If the caller wishes they may
@@ -403,18 +403,18 @@ function CFNetDiagnosticDiagnoseProblemInteractively( details: CFNetDiagnosticRe
  *	want a description they may pass in NULL.
  *	CFNetDiagnosticCopyNetworkStatusPassively() is guaranteed not to
  *	cause network activity.
- *  
+ *
  *  Parameters:
- *	
+ *
  *	details:
  *	  CFNetDiagnosticRef referring to the current problem.
- *	
+ *
  *	description:
  *	  A pointer to a CFStringRef that, upon return, will point to a
  *	  localized string containing a description of the current
  *	  network status. May be NULL. If it is not NULL, the client must
  *	  call CFRelease on the returned object.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.4 and later in CoreServices.framework
  *	CarbonLib:		not available

Разница между файлами не показана из-за своего большого размера
+ 185 - 185
packages/univint/src/CFNetServices.pas


+ 29 - 29
packages/univint/src/CFNetworkErrorss.pas

@@ -1,15 +1,15 @@
 {
 	 File:	   CFNetwork/CFNetworkErrors.h
- 
+
 	 Contains:   CFNetwork error header
- 
+
 	 Copyright:  Copyright (c) 2006-2008, Apple Inc. All rights reserved.
- 
+
 	 Bugs?:	  For bug reports, consult the following page on
 				 the World Wide Web:
- 
+
 					 http://bugs.freepascal.org
- 
+
 }
 {       Pascal Translation:  Gale R Paeper, <[email protected]>, 2008 }
 {       Pascal Translation Updated:  Jonas Maebe, <[email protected]>, October 2009 }
@@ -229,11 +229,11 @@ uses MacTypes, CFBase;
 
 {
  *  kCFErrorDomainCFNetwork
- *  
+ *
  *  Discussion:
  *	Error domain for all errors originating in CFNetwork. Error codes
  *	may be interpreted using the list below.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.5 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -244,11 +244,11 @@ var kCFErrorDomainCFNetwork: CFStringRef; external name '_kCFErrorDomainCFNetwor
 
 {
  *  kCFErrorDomainWinSock
- *  
+ *
  *  Discussion:
  *	On Windows, errors originating from WinSock are represented using
  *	this domain.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.5 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -260,7 +260,7 @@ var kCFErrorDomainWinSock: CFStringRef; external name '_kCFErrorDomainWinSock';
 
 {
  *  CFNetworkErrors
- *  
+ *
  *  Discussion:
  *	The list of all public error codes returned under the error domain
  *	kCFErrorDomainCFNetwork
@@ -299,7 +299,7 @@ const
 	kCFErrorPACFileAuth = 309;
 	kCFErrorHTTPSProxyConnectionFailure = 310;
 	kCFStreamErrorHTTPSProxyFailureUnexpectedResponseToCONNECTMethod = 311;
-	
+
   // Error codes for CFURLConnection and CFURLProtocol
 	kCFURLErrorUnknown = -998;
 	kCFURLErrorCancelled = -999;
@@ -347,7 +347,7 @@ const
 	kCFURLErrorCannotMoveFile = -3005;
 	kCFURLErrorDownloadDecodingFailedMidStream = -3006;
 	kCFURLErrorDownloadDecodingFailedToComplete = -3007;
-	
+
   // Cookie errors
 	kCFHTTPCookieCannotParseCookieFile = -4000;
 
@@ -360,17 +360,17 @@ const
 	kCFNetServiceErrorCancel = -72005;
 	kCFNetServiceErrorInvalid = -72006;
 	kCFNetServiceErrorTimeout = -72007;
-	kCFNetServiceErrorDNSServiceFailure = -73000; // An error from DNS discovery; look at kCFDNSServiceFailureKey to get the error number and interpret using dns_sd.h	
+	kCFNetServiceErrorDNSServiceFailure = -73000; // An error from DNS discovery; look at kCFDNSServiceFailureKey to get the error number and interpret using dns_sd.h
 
 
 { Keys used by CFNetwork to pass additional error information back to the user within CFError's userInfo dictionary }
 {
  *  kCFURLErrorFailingURLErrorKey
- *  
+ *
  *  Discussion:
  *	When an NSURLConnection or NSURLDownload error occurs, this key's
  *  value is set to the URL which caused a load to fail
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.6 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -381,12 +381,12 @@ var kCFURLErrorFailingURLErrorKey: CFStringRef; external name '_kCFURLErrorFaili
 
 {
  *  kCFURLErrorFailingURLStringErrorKey
- *  
+ *
  *  Discussion:
  *	When an NSURLConnection or NSURLDownload error occurs, this key's
  *  value is set to the CFString value of the URL which caused a load
  *  to fail
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.6 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -397,12 +397,12 @@ var kCFURLErrorFailingURLStringErrorKey: CFStringRef; external name '_kCFURLErro
 
 {
  *  kCFGetAddrInfoFailureKey
- *  
+ *
  *  Discussion:
  *	When an error of kCFHostErrorUnknown is returned, this key's
  *	value is set to a CFNumber containing the raw error value
  *	returned by getaddrinfo()
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.5 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -413,11 +413,11 @@ var kCFGetAddrInfoFailureKey: CFStringRef; external name '_kCFGetAddrInfoFailure
 
 {
  *  kCFSOCKSStatusCodeKey
- *  
+ *
  *  Discussion:
  *	When a SOCKS failure has occurred, this key's value is set to a
  *	CFString containing the status value returned by the SOCKS server.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.5 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -428,12 +428,12 @@ var kCFSOCKSStatusCodeKey: CFStringRef; external name '_kCFSOCKSStatusCodeKey';
 
 {
  *  kCFSOCKSVersionKey
- *  
+ *
  *  Discussion:
  *	When an error of kCFSOCKSErrorUnsupportedServerVersion is
  *	returned, this key's value is set to a CFString containing the
  *	version number requested by the server.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.5 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -444,12 +444,12 @@ var kCFSOCKSVersionKey: CFStringRef; external name '_kCFSOCKSVersionKey'; (* att
 
 {
  *  kCFSOCKSNegotiationMethodKey
- *  
+ *
  *  Discussion:
  *	When an error of kCFSOCKS5ErrorUnsupportedNegotiationMethod is
  *	returned, this key's value is set to a CFString containing the
  *	negotiation method requested by the server.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.5 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -460,12 +460,12 @@ var kCFSOCKSNegotiationMethodKey: CFStringRef; external name '_kCFSOCKSNegotiati
 
 {
  *  kCFDNSServiceFailureKey
- *  
+ *
  *  Discussion:
  *	When an error of kCFNetServicesErrorDNSServiceFailure is
  *	returned, this key's value is set to a CFNumber containing the
  *	value returned from DNS; interret it using the values dns_sd.h
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.5 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -476,12 +476,12 @@ var kCFDNSServiceFailureKey: CFStringRef; external name '_kCFDNSServiceFailureKe
 
 {
  *  kCFFTPStatusCodeKey
- *  
+ *
  *  Discussion:
  *	When an error of kCFFTPErrorUnexpectedStatusCode is returned,
  *	this key's value is set to a CFString containing the status code
  *	returned by the server
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.5 and later in CoreServices.framework
  *	CarbonLib:		not available

+ 1 - 1
packages/univint/src/CFNotificationCenter.pas

@@ -225,7 +225,7 @@ const
 	CFNotificationSuspensionBehaviorDrop = 1;
         // The server will not queue any notifications with this name and object while the process/app is in the background.
 	CFNotificationSuspensionBehaviorCoalesce = 2;
-        // The server will only queue the last notification of the specified name and object; earlier notifications are dropped. 
+        // The server will only queue the last notification of the specified name and object; earlier notifications are dropped.
 	CFNotificationSuspensionBehaviorHold = 3;
         // The server will hold all matching notifications until the queue has been filled (queue size determined by the server) at which point the server may flush queued notifications.
 	CFNotificationSuspensionBehaviorDeliverImmediately = 4;

+ 1 - 1
packages/univint/src/CFPlugIn.pas

@@ -259,7 +259,7 @@ function CFPlugInIsLoadOnDemand( plugIn: CFPlugInRef ): Boolean; external name '
 
 function CFPlugInFindFactoriesForPlugInType( typeUUID: CFUUIDRef ): CFArrayRef; external name '_CFPlugInFindFactoriesForPlugInType';
     { This function finds all the factories from any plugin for the given type.  Returns an array that the caller must release. }
-    
+
 function CFPlugInFindFactoriesForPlugInTypeInPlugIn( typeUUID: CFUUIDRef; plugIn: CFPlugInRef ): CFArrayRef; external name '_CFPlugInFindFactoriesForPlugInTypeInPlugIn';
     { This function restricts the result to factories from the given plug-in that can create the given type.  Returns an array that the caller must release. }
 

+ 1 - 1
packages/univint/src/CFPreferences.pas

@@ -268,7 +268,7 @@ location specified by app-user-host is searched.  The returned
 CFType must be released by the caller when it is finished with it. }
 function CFPreferencesCopyValue( key: CFStringRef; applicationID: CFStringRef; userName: CFStringRef; hostName: CFStringRef ): CFPropertyListRef; external name '_CFPreferencesCopyValue';
 
-{ Convenience to fetch multiple keys at once.  Keys in 
+{ Convenience to fetch multiple keys at once.  Keys in
 keysToFetch that are not present in the returned dictionary
 are not present in the domain.  If keysToFetch is NULL, all
 keys are fetched. }

+ 5 - 5
packages/univint/src/CFPropertyList.pas

@@ -218,7 +218,7 @@ const
 	kCFPropertyListImmutable = 0;
 	kCFPropertyListMutableContainers = 1;
 	kCFPropertyListMutableContainersAndLeaves = 2;
-    
+
 {
 	Creates a property list object from its XML description; xmlData should
 	be the raw bytes of that description, possibly the contents of an XML
@@ -226,7 +226,7 @@ const
 	and errorString is non-NULL, a human-readable description of the failure
 	is returned in errorString. It is the caller's responsibility to release
 	either the returned object or the error string, whichever is applicable.
- 
+
         This function is obsolete and will be deprecated soon. See CFPropertyListCreateWithData() for a replacement.
 }
 function CFPropertyListCreateFromXMLData( allocator: CFAllocatorRef; xmlData: CFDataRef; mutabilityOption: CFOptionFlags; errorString: CFStringRefPtr ): CFPropertyListRef; external name '_CFPropertyListCreateFromXMLData';
@@ -240,7 +240,7 @@ function CFPropertyListCreateFromXMLData( allocator: CFAllocatorRef; xmlData: CF
 	appropriate for writing out to an XML file. Note that a data, not a
 	string, is returned because the bytes contain in them a description
 	of the string encoding used.
- 
+
         This function is obsolete and will be deprecated soon. See CFPropertyListCreateData() for a replacement.
 }
 function CFPropertyListCreateXMLData( allocator: CFAllocatorRef; propertyList: CFPropertyListRef ): CFDataRef; external name '_CFPropertyListCreateXMLData';
@@ -278,7 +278,7 @@ function CFPropertyListIsValid( plist: CFPropertyListRef; format: CFPropertyList
  * reading stream to end wherever the writing ended, so that the
  * end of the plist data can be identified. Returns the number of bytes
  * written, or 0 on error. Error messages are not currently localized, but
- * may be in the future, so they are not suitable for comparison. 
+ * may be in the future, so they are not suitable for comparison.
  *
  * This function is obsolete and will be deprecated soon. See CFPropertyListWrite() for a replacement. }
 function CFPropertyListWriteToStream( propertyList: CFPropertyListRef; stream: CFWriteStreamRef; format: CFPropertyListFormat; var errorString: CFStringRef ): CFIndex; external name '_CFPropertyListWriteToStream';
@@ -292,7 +292,7 @@ function CFPropertyListWriteToStream( propertyList: CFPropertyListRef; stream: C
  * of the stream, which is expected to be the end of the plist, or up to the
  * number of bytes given by the length parameter if it is not 0. Error messages
  * are not currently localized, but may be in the future, so they are not
- * suitable for comparison. 
+ * suitable for comparison.
  *
  * This function is obsolete and will be deprecated soon. See CFPropertyListCreateWithStream() for a replacement. }
 function CFPropertyListCreateFromStream( allocator: CFAllocatorRef; stream: CFReadStreamRef; streamLength: CFIndex; mutabilityOption: CFOptionFlags; var format: CFPropertyListFormat; var errorString: CFStringRef ): CFPropertyListRef; external name '_CFPropertyListCreateFromStream';

+ 93 - 93
packages/univint/src/CFProxySupport.pas

@@ -1,15 +1,15 @@
 {
 	 File:	   CFNetwork/CFProxySupport.h
- 
+
 	 Contains:   Support for computing which proxy applies when
- 
+
 	 Copyright:  Copyright (c) 2006-2008, Apple Inc. All rights reserved.
- 
+
 	 Bugs?:	  For bug reports, consult the following page on
 				 the World Wide Web:
- 
+
 					 http://bugs.freepascal.org
- 
+
 }
 {       Pascal Translation:  Gale R Paeper, <[email protected]>, 2008 }
 {       Pascal Translation Updated:  Jonas Maebe, <[email protected]>, October 2009 }
@@ -226,18 +226,18 @@ uses MacTypes, CFArray, CFBase, CFDictionary, CFURL, CFError, CFRunLoop, CFStrea
 {$ALIGN POWER}
 
 
-{ 
-	These APIs return arrays of dictionaries, where each dictionary describes a single proxy. 
+{
+	These APIs return arrays of dictionaries, where each dictionary describes a single proxy.
 	The arrays represent the order in which the proxies should be tried - try to download the URL
 	using the first entry in the array, and if that fails, try using the second entry, and so on.
 
-	The keys to the proxy dictionaries follow the function declarations; every proxy dictionary 
-	will have an entry for kCFProxyTypeKey.  If the type is anything except 
+	The keys to the proxy dictionaries follow the function declarations; every proxy dictionary
+	will have an entry for kCFProxyTypeKey.  If the type is anything except
 	kCFProxyTypeAutoConfigurationURL, the dictionary will also have entries for the proxy's host
 	and port (under kCFProxyHostNameKey and kCFProxyPortNumberKey respectively).  If the type is
-	kCFProxyTypeAutoConfigurationURL, it will have an entry for kCFProxyAutoConfigurationURLKey.  
-	
-	The keys for username and password are optional and will only be present if the username 
+	kCFProxyTypeAutoConfigurationURL, it will have an entry for kCFProxyAutoConfigurationURLKey.
+
+	The keys for username and password are optional and will only be present if the username
 	or password could be extracted from the information passed in (i.e. either the URL itself
 	or the proxy dictionary supplied).  These APIs do not consult any external credential stores
 	(such as the Keychain).
@@ -257,29 +257,29 @@ uses MacTypes, CFArray, CFBase, CFDictionary, CFURL, CFError, CFRunLoop, CFStrea
 function CFNetworkCopySystemProxySettings: CFDictionaryRef; external name '_CFNetworkCopySystemProxySettings';
 (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0) *)
 
-	
+
 {
  *  CFNetworkCopyProxiesForURL()
- *  
+ *
  *  Discussion:
  *	Given a URL and a proxy dictionary, determines the ordered list
  *	of proxies that should be used to download the given URL.
- *  
+ *
  *  Parameters:
- *	
+ *
  *	url:
  *	  The URL to be accessed
- *	
+ *
  *	proxySettings:
  *	  A dictionary describing the available proxy settings; the
  *	  dictionary's format should match the dictionary returned
  *	  by CFNetworkCopySystemProxySettings described below.
- *  
+ *
  *  Result:
  *	An array of dictionaries; each dictionary describes a single
  *	proxy.  See the comment at the top of this file for how to
  *	interpret the returned dictionaries.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.5 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -291,19 +291,19 @@ function CFNetworkCopyProxiesForURL( url: CFURLRef; proxySettings: CFDictionaryR
 
 {
  *  CFProxyAutoConfigurationResultCallback
- *  
+ *
  *  Discussion:
  *	Callback function to be called when a PAC file computation
  *	(initiated by either CFNetworkExecuteProxyAutoConfigurationScript
  *	or CFNetworkExecuteProxyAutoConfigurationURL) has completed.
- *  
+ *
  *  Parameters:
- *	
+ *
  *	client:
  *	  The client reference passed in to
  *	  CFNetworkExecuteProxyAutoConfigurationScript or
  *	  CFNetworkExecuteProxyAutoConfigurationURL
- *	
+ *
  *	proxyList:
  *	  Upon success, the list of proxies returned by the
  *	  autoconfiguration script.  The list has the same format as
@@ -311,7 +311,7 @@ function CFNetworkCopyProxiesForURL( url: CFURLRef; proxySettings: CFDictionaryR
  *	  entry may be of type kCFProxyTypeAutoConfigurationURL.  Note
  *	  that if the client wishes to keep this list, they must retain
  *	  it when they receive this callback.
- *	
+ *
  *	error:
  *	  Upon failure, an error object explaining the failure.
  }
@@ -320,28 +320,28 @@ type
 
 {
  *  CFNetworkCopyProxiesForAutoConfigurationScript()
- *  
+ *
  *  Discussion:
  *	Synchronously executes the given proxy autoconfiguration script
  *	and returns a valid proxyList and NULL error upon success or a
  *	NULL proxyList and valid error on failure.
- *  
+ *
  *  Parameters:
- *	
+ *
  *	proxyAutoConfigurationScript:
  *	  A CFString containing the code of the script to be executed.
- *	
+ *
  *	targetURL:
  *	  The URL that should be input in to the autoconfiguration script.
- *	
+ *
  *	error:
  *	  A return argument that will contain a valid error in case of
  *	  failure.
- *  
+ *
  *  Result:
  *	An array of dictionaries describing the proxies returned by the
  *	script or NULL on failure.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.5 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -353,7 +353,7 @@ function CFNetworkCopyProxiesForAutoConfigurationScript( proxyAutoConfigurationS
 
 {
  *  CFNetworkExecuteProxyAutoConfigurationScript()
- *  
+ *
  *  Discussion:
  *	Begins the process of executing proxyAutoConfigurationScript to
  *	determine the correct proxy to use to retrieve targetURL.  The
@@ -365,26 +365,26 @@ function CFNetworkCopyProxiesForAutoConfigurationScript( proxyAutoConfigurationS
  *	terminate the request before completion. The returned
  *	RunLoopSource will be removed from all run loops and modes on
  *	which it was scheduled after the callback returns.
- *  
+ *
  *  Parameters:
- *	
+ *
  *	proxyAutoConfigurationScript:
  *	  A CFString containing the code of the script to be executed.
- *	
+ *
  *	targetURL:
  *	  The URL that should be passed to the autoconfiguration script.
- *	
+ *
  *	cb:
  *	  A client callback to notify the caller of completion.
- *	
+ *
  *	clientContext:
  *	  a stream context containing a client info object and optionally
  *	  retain / release callbacks for said info object.
- *  
+ *
  *  Result:
  *	A CFRunLoopSource which the client can use to schedule execution
  *	of the AutoConfiguration Script.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.5 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -396,15 +396,15 @@ function CFNetworkExecuteProxyAutoConfigurationScript( proxyAutoConfigurationScr
 
 {
  *  CFNetworkExecuteProxyAutoConfigurationURL()
- *  
+ *
  *  Discussion:
  *	As CFNetworkExecuteProxyAutoConfigurationScript(), above, except
  *	that CFNetworkExecuteProxyAutoConfigurationURL will additionally
  *	download the contents of proxyAutoConfigURL, convert it to a
  *	JavaScript string, and then execute that script.
- *  Ownership for the returned CFRunLoopSourceRef follows the copy rule, 
+ *  Ownership for the returned CFRunLoopSourceRef follows the copy rule,
  *  the client is responsible for releasing the object.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.5 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -416,11 +416,11 @@ function CFNetworkExecuteProxyAutoConfigurationURL( proxyAutoConfigURL: CFURLRef
 
 {
  *  kCFProxyTypeKey
- *  
+ *
  *  Discussion:
  *	Key for the type of proxy being represented; value will be one of
  *	the kCFProxyType constants listed below.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.5 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -431,11 +431,11 @@ var kCFProxyTypeKey: CFStringRef; external name '_kCFProxyTypeKey'; (* attribute
 
 {
  *  kCFProxyHostNameKey
- *  
+ *
  *  Discussion:
  *	Key for the proxy's hostname; value is a CFString.  Note that
  *	this may be an IPv4 or IPv6 dotted-IP string.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.5 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -446,11 +446,11 @@ var kCFProxyHostNameKey: CFStringRef; external name '_kCFProxyHostNameKey'; (* a
 
 {
  *  kCFProxyPortNumberKey
- *  
+ *
  *  Discussion:
  *	Key for the proxy's port number; value is a CFNumber specifying
  *	the port on which to contact the proxy
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.5 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -461,13 +461,13 @@ var kCFProxyPortNumberKey: CFStringRef; external name '_kCFProxyPortNumberKey';
 
 {
  *  kCFProxyAutoConfigurationURLKey
- *  
+ *
  *  Discussion:
  *	Key for the proxy's PAC file location; this key is only present
  *	if the proxy's type is kCFProxyTypeAutoConfigurationURL.  Value
  *	is a CFURL specifying the location of a proxy auto-configuration
  *	file
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.5 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -478,11 +478,11 @@ var kCFProxyAutoConfigurationURLKey: CFStringRef; external name '_kCFProxyAutoCo
 
 {
  *  kCFProxyAutoConfigurationJavaScriptKey
- *  
+ *
  *  Discussion:
  *	Key for the proxy's PAC script
  *	The value is a CFString that contains the full JavaScript soure text for the PAC file.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.5 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -494,13 +494,13 @@ var kCFProxyAutoConfigurationJavaScriptKey: CFStringRef; external name '_kCFProx
 
 {
  *  kCFProxyUsernameKey
- *  
+ *
  *  Discussion:
  *	Key for the username to be used with the proxy; value is a
  *	CFString. Note that this key will only be present if the username
  *	could be extracted from the information passed in.  No external
  *	credential stores (like the Keychain) are consulted.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.5 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -511,13 +511,13 @@ var kCFProxyUsernameKey: CFStringRef; external name '_kCFProxyUsernameKey'; (* a
 
 {
  *  kCFProxyPasswordKey
- *  
+ *
  *  Discussion:
  *	Key for the password to be used with the proxy; value is a
  *	CFString. Note that this key will only be present if the username
  *	could be extracted from the information passed in.  No external
  *	credential stores (like the Keychain) are consulted.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.5 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -526,7 +526,7 @@ var kCFProxyUsernameKey: CFStringRef; external name '_kCFProxyUsernameKey'; (* a
 var kCFProxyPasswordKey: CFStringRef; external name '_kCFProxyPasswordKey'; (* attribute const *)
 (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0) *)
 
-{ 
+{
 	Possible values for kCFProxyTypeKey:
 	kCFProxyTypeNone - no proxy should be used; contact the origin server directly
 	kCFProxyTypeHTTP - the proxy is an HTTP proxy
@@ -537,7 +537,7 @@ var kCFProxyPasswordKey: CFStringRef; external name '_kCFProxyPasswordKey'; (* a
 }
 {
  *  kCFProxyTypeNone
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.5 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -547,7 +547,7 @@ var kCFProxyTypeNone: CFStringRef; external name '_kCFProxyTypeNone'; (* attribu
 (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0) *)
 {
  *  kCFProxyTypeHTTP
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.5 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -557,7 +557,7 @@ var kCFProxyTypeHTTP: CFStringRef; external name '_kCFProxyTypeHTTP'; (* attribu
 (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0) *)
 {
  *  kCFProxyTypeHTTPS
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.5 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -567,7 +567,7 @@ var kCFProxyTypeHTTPS: CFStringRef; external name '_kCFProxyTypeHTTPS'; (* attri
 (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0) *)
 {
  *  kCFProxyTypeSOCKS
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.5 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -577,7 +577,7 @@ var kCFProxyTypeSOCKS: CFStringRef; external name '_kCFProxyTypeSOCKS'; (* attri
 (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0) *)
 {
  *  kCFProxyTypeFTP
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.5 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -587,7 +587,7 @@ var kCFProxyTypeFTP: CFStringRef; external name '_kCFProxyTypeFTP'; (* attribute
 (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0) *)
 {
  *  kCFProxyTypeAutoConfigurationURL
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.5 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -601,10 +601,10 @@ var kCFProxyTypeAutoConfigurationURL: CFStringRef; external name '_kCFProxyTypeA
  }
 var kCFProxyTypeAutoConfigurationJavaScript: CFStringRef; external name '_kCFProxyTypeAutoConfigurationJavaScript'; (* attribute const *)
 (* __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_3_0) *)
-	
+
 {
  *  kCFProxyAutoConfigHTTPResponse
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.5 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -612,31 +612,31 @@ var kCFProxyTypeAutoConfigurationJavaScript: CFStringRef; external name '_kCFPro
  }
 var kCFProxyAutoConfigurationHTTPResponseKey: CFStringRef; external name '_kCFProxyAutoConfigurationHTTPResponseKey'; (* attribute const *)
 (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0) *)
-	
+
 
 {$ifc TARGET_OS_MAC}
 {
  *  kCFNetworkProxiesExceptionsList
- *  
+ *
  *  Discussion:
  *	Key for the list of host name patterns that should bypass the proxy; value is a
- *	CFArray of CFStrings.  
+ *	CFArray of CFStrings.
  }
 var kCFNetworkProxiesExceptionsList: CFStringRef; external name '_kCFNetworkProxiesExceptionsList'; (* attribute const *)
 (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
 {
  *  kCFNetworkProxiesExcludeSimpleHostnames
- *  
+ *
  *  Discussion:
  *	Key whose value indicates if simple hostnames will be excluded; value is a
- *	CFNumber.  Simple hostnames will be excluded if the key is present and has a 
+ *	CFNumber.  Simple hostnames will be excluded if the key is present and has a
  *	non-zero value.
  }
 var kCFNetworkProxiesExcludeSimpleHostnames: CFStringRef; external name '_kCFNetworkProxiesExcludeSimpleHostnames'; (* attribute const *)
 (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
 {
  *  kCFNetworkProxiesFTPEnable
- *  
+ *
  *  Discussion:
  *	Key for the enabled status of the ftp proxy; value is a
  *	CFNumber.  The proxy is enabled if the key is present and has a non-zero value.
@@ -645,7 +645,7 @@ var kCFNetworkProxiesFTPEnable: CFStringRef; external name '_kCFNetworkProxiesFT
 (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
 {
  *  kCFNetworkProxiesFTPPassive
- *  
+ *
  *  Discussion:
  *	Key for the state of passive mode for the ftp proxy; value is a
  *	CFNumber.  A value of one indicates that passive mode is enabled, a value
@@ -655,7 +655,7 @@ var kCFNetworkProxiesFTPPassive: CFStringRef; external name '_kCFNetworkProxiesF
 (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
 {
  *  kCFNetworkProxiesFTPPort
- *  
+ *
  *  Discussion:
  *	Key for the port number associated with the ftp proxy; value is a
  *	CFNumber which is the port number.
@@ -664,7 +664,7 @@ var kCFNetworkProxiesFTPPort: CFStringRef; external name '_kCFNetworkProxiesFTPP
 (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
 {
  *  kCFNetworkProxiesFTPProxy
- *  
+ *
  *  Discussion:
  *	Key for the host name associated with the ftp proxy; value is a
  *	CFString which is the proxy host name.
@@ -673,7 +673,7 @@ var kCFNetworkProxiesFTPProxy: CFStringRef; external name '_kCFNetworkProxiesFTP
 (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
 {
  *  kCFNetworkProxiesGopherEnable
- *  
+ *
  *  Discussion:
  *	Key for the enabled status of the gopher proxy; value is a
  *	CFNumber.  The proxy is enabled if the key is present and has a non-zero value.
@@ -682,7 +682,7 @@ var kCFNetworkProxiesGopherEnable: CFStringRef; external name '_kCFNetworkProxie
 (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
 {
  *  kCFNetworkProxiesGopherPort
- *  
+ *
  *  Discussion:
  *	Key for the port number associated with the gopher proxy; value is a
  *	CFNumber which is the port number.
@@ -691,7 +691,7 @@ var kCFNetworkProxiesGopherPort: CFStringRef; external name '_kCFNetworkProxiesG
 (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
 {
  *  kCFNetworkProxiesGopherProxy
- *  
+ *
  *  Discussion:
  *	Key for the host name associated with the gopher proxy; value is a
  *	CFString which is the proxy host name.
@@ -700,7 +700,7 @@ var kCFNetworkProxiesGopherProxy: CFStringRef; external name '_kCFNetworkProxies
 (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
 {
  *  kCFNetworkProxiesHTTPEnable
- *  
+ *
  *  Discussion:
  *	Key for the enabled status of the HTTP proxy; value is a
  *	CFNumber.  The proxy is enabled if the key is present and has a non-zero value.
@@ -709,7 +709,7 @@ var kCFNetworkProxiesHTTPEnable: CFStringRef; external name '_kCFNetworkProxiesH
 (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0) *)
 {
  *  kCFNetworkProxiesHTTPPort
- *  
+ *
  *  Discussion:
  *	Key for the port number associated with the HTTP proxy; value is a
  *	CFNumber which is the port number.
@@ -718,7 +718,7 @@ var kCFNetworkProxiesHTTPPort: CFStringRef; external name '_kCFNetworkProxiesHTT
 (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0) *)
 {
  *  kCFNetworkProxiesHTTPProxy
- *  
+ *
  *  Discussion:
  *	Key for the host name associated with the HTTP proxy; value is a
  *	CFString which is the proxy host name.
@@ -727,7 +727,7 @@ var kCFNetworkProxiesHTTPProxy: CFStringRef; external name '_kCFNetworkProxiesHT
 (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0) *)
 {
  *  kCFNetworkProxiesHTTPSEnable
- *  
+ *
  *  Discussion:
  *	Key for the enabled status of the HTTPS proxy; value is a
  *	CFNumber.  The proxy is enabled if the key is present and has a non-zero value.
@@ -736,7 +736,7 @@ var kCFNetworkProxiesHTTPSEnable: CFStringRef; external name '_kCFNetworkProxies
 (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
 {
  *  kCFNetworkProxiesHTTPSPort
- *  
+ *
  *  Discussion:
  *	Key for the port number associated with the HTTPS proxy; value is a
  *	CFNumber which is the port number.
@@ -745,7 +745,7 @@ var kCFNetworkProxiesHTTPSPort: CFStringRef; external name '_kCFNetworkProxiesHT
 (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
 {
  *  kCFNetworkProxiesHTTPSProxy
- *  
+ *
  *  Discussion:
  *	Key for the host name associated with the HTTPS proxy; value is a
  *	CFString which is the proxy host name.
@@ -754,7 +754,7 @@ var kCFNetworkProxiesHTTPSProxy: CFStringRef; external name '_kCFNetworkProxiesH
 (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
 {
  *  kCFNetworkProxiesRTSPEnable
- *  
+ *
  *  Discussion:
  *	Key for the enabled status of the RTSP proxy; value is a
  *	CFNumber.  The proxy is enabled if the key is present and has a non-zero value.
@@ -763,7 +763,7 @@ var kCFNetworkProxiesRTSPEnable: CFStringRef; external name '_kCFNetworkProxiesR
 (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
 {
  *  kCFNetworkProxiesRTSPPort
- *  
+ *
  *  Discussion:
  *	Key for the port number associated with the RTSP proxy; value is a
  *	CFNumber which is the port number.
@@ -772,7 +772,7 @@ var kCFNetworkProxiesRTSPPort: CFStringRef; external name '_kCFNetworkProxiesRTS
 (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
 {
  *  kCFNetworkProxiesRTSPProxy
- *  
+ *
  *  Discussion:
  *	Key for the host name associated with the RTSP proxy; value is a
  *	CFString which is the proxy host name.
@@ -781,7 +781,7 @@ var kCFNetworkProxiesRTSPProxy: CFStringRef; external name '_kCFNetworkProxiesRT
 (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
 {
  *  kCFNetworkProxiesSOCKSEnable
- *  
+ *
  *  Discussion:
  *	Key for the enabled status of the SOCKS proxy; value is a
  *	CFNumber.  The proxy is enabled if the key is present and has a non-zero value.
@@ -790,7 +790,7 @@ var kCFNetworkProxiesSOCKSEnable: CFStringRef; external name '_kCFNetworkProxies
 (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
 {
  *  kCFNetworkProxiesSOCKSPort
- *  
+ *
  *  Discussion:
  *	Key for the port number associated with the SOCKS proxy; value is a
  *	CFNumber which is the port number.
@@ -799,7 +799,7 @@ var kCFNetworkProxiesSOCKSPort: CFStringRef; external name '_kCFNetworkProxiesSO
 (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
 {
  *  kCFNetworkProxiesSOCKSProxy
- *  
+ *
  *  Discussion:
  *	Key for the host name associated with the SOCKS proxy; value is a
  *	CFString which is the proxy host name.
@@ -808,7 +808,7 @@ var kCFNetworkProxiesSOCKSProxy: CFStringRef; external name '_kCFNetworkProxiesS
 (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
 {
  *  kCFNetworkProxiesProxyAutoConfigEnable
- *  
+ *
  *  Discussion:
  *	Key for the enabled status ProxyAutoConfig (PAC); value is a
  *	CFNumber.  ProxyAutoConfig is enabled if the key is present and has a non-zero value.
@@ -817,7 +817,7 @@ var kCFNetworkProxiesProxyAutoConfigEnable: CFStringRef; external name '_kCFNetw
 (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0) *)
 {
  *  kCFNetworkProxiesProxyAutoConfigURLString
- *  
+ *
  *  Discussion:
  *	Key for the url which indicates the location of the ProxyAutoConfig (PAC) file; value is a
  *	CFString which is url for the PAC file.
@@ -833,10 +833,10 @@ var kCFNetworkProxiesProxyAutoConfigURLString: CFStringRef; external name '_kCFN
  }
 var kCFNetworkProxiesProxyAutoConfigJavaScript: CFStringRef; external name '_kCFNetworkProxiesProxyAutoConfigJavaScript'; (* attribute const *)
 (* __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_3_0) *)
-	
+
 {
  *  kCFNetworkProxiesProxyAutoDiscoveryEnable
- *  
+ *
  *  Discussion:
  *	Key for the enabled status of proxy auto discovery; value is a
  *	CFNumber.  Proxy auto discovery is enabled if the key is present and has a non-zero value.

+ 3 - 3
packages/univint/src/CFRunLoop.pas

@@ -252,7 +252,7 @@ uses MacTypes,CFBase,CFArray,CFDate,CFString,MacOSXPosix;
 
 	While being run, a run loop goes through a cycle of activities.
 	Input sources are checked, timers which need firing are fired,
-	and then the run loop blocks, waiting for something to happen 
+	and then the run loop blocks, waiting for something to happen
 	(or in the case of timers, waiting for it to be time for
 	something to happen). When something does happen, the run loop
 	wakes up, processes the activity (usually by calling a callback
@@ -379,7 +379,7 @@ procedure CFRunLoopStop( rl: CFRunLoopRef ); external name '_CFRunLoopStop';
 
 {#if __BLOCKS__ && MAC_OS_X_VERSION_10_6 <= MAC_OS_X_VERSION_MAX_ALLOWED}
 { requires support for blocks
-extern void CFRunLoopPerformBlock(CFRunLoopRef rl, CFTypeRef mode, void (^block)(void)) CF_AVAILABLE_STARTING(10_6, 4_0); 
+extern void CFRunLoopPerformBlock(CFRunLoopRef rl, CFTypeRef mode, void (^block)(void)) CF_AVAILABLE_STARTING(10_6, 4_0);
 }
 {#endif}
 
@@ -417,7 +417,7 @@ procedure CFRunLoopRemoveTimer( rl: CFRunLoopRef; timer: CFRunLoopTimerRef; mode
 		the source, almost always just the pointer passed as the
 		parameter.
 	@field release The callback used to remove a retain previously
-		added for the source on the info pointer. 
+		added for the source on the info pointer.
 	@field copyDescription The callback used to create a descriptive
 		string representation of the info pointer (or the data
 		pointed to by the info pointer) for debugging purposes.

+ 15 - 15
packages/univint/src/CFSet.pas

@@ -359,13 +359,13 @@ function CFSetGetTypeID: CFTypeID; external name '_CFSetGetTypeID';
 		CFAllocator is used. If this reference is not a valid
 		CFAllocator, the behavior is undefined.
 	@param values A C array of the pointer-sized values to be in the
-		set.  This C array is not changed or freed by this function. 
+		set.  This C array is not changed or freed by this function.
                 If this parameter is not a valid pointer to a C array of at
                 least numValues pointers, the behavior is undefined.
 	@param numValues The number of values to copy from the values C
 		array into the CFSet. This number will be the count of the
-		set.  If this parameter is zero, negative, or greater than 
-                the number of values actually in the values C array, the 
+		set.  If this parameter is zero, negative, or greater than
+                the number of values actually in the values C array, the
                 behavior is undefined.
 	@param callBacks A C pointer to a CFSetCallBacks structure
 		initialized with the callbacks for the set to use on each
@@ -438,8 +438,8 @@ function CFSetCreateCopy( allocator: CFAllocatorRef; theSet: CFSetRef ): CFSetRe
   @param capacity A hint about the number of values that will be held
     by the CFSet. Pass 0 for no hint. The implementation may
     ignore this hint, or may use it to optimize various
-    operations. A set's actual capacity is only limited by 
-    address space and available memory constraints). If this 
+    operations. A set's actual capacity is only limited by
+    address space and available memory constraints). If this
     parameter is negative, the behavior is undefined.
 #endif
 	@param callBacks A C pointer to a CFSetCallBacks structure
@@ -485,9 +485,9 @@ function CFSetCreateMutable( allocator: CFAllocatorRef; capacity: CFIndex; {cons
 	@param capacity The maximum number of values that can be contained
 		by the CFSet. The set starts with the same values as the
     set to be copied, and can grow to this number of values.
-    If this parameter is 0, the set's maximum capacity is 
-    unlimited (or rather, only limited by address space and 
-    available memory constraints). This parameter must be 
+    If this parameter is 0, the set's maximum capacity is
+    unlimited (or rather, only limited by address space and
+    available memory constraints). This parameter must be
     greater than or equal to the count of the set which is to
     be copied, or the behavior is undefined.
 #else
@@ -495,7 +495,7 @@ function CFSetCreateMutable( allocator: CFAllocatorRef; capacity: CFIndex; {cons
     by the CFSet. Pass 0 for no hint. The implementation may
     ignore this hint, or may use it to optimize various
     operations. A set's actual capacity is only limited by
-    address space and available memory constraints). 
+    address space and available memory constraints).
     This parameter must be greater than or equal
     to the count of the set which is to be copied, or the
     behavior is undefined. If this parameter is negative, the
@@ -524,7 +524,7 @@ function CFSetGetCount( theSet: CFSetRef ): CFIndex; external name '_CFSetGetCou
 
 {!
 	@function CFSetGetCountOfValue
-	Counts the number of times the given value occurs in the set. Since 
+	Counts the number of times the given value occurs in the set. Since
         sets by definition contain only one instance of a value, this function
         is synonymous to CFSetContainsValue.
 	@param theSet The set to be searched. If this parameter is not a
@@ -614,7 +614,7 @@ procedure CFSetGetValues( theSet: CFSetRef; {const} values: UnivPtrPtr ); extern
 		pointer to a function of the correct prototype, the behavior
 		is undefined. If there are values in the set which the
 		applier function does not expect or cannot properly apply
-		to, the behavior is undefined. 
+		to, the behavior is undefined.
 	@param context A pointer-sized user-defined value, which is passed
 		as the second parameter to the applier function, but is
 		otherwise unused by this function. If the context is not
@@ -636,7 +636,7 @@ procedure CFSetApplyFunction( theSet: CFSetRef; applier: CFSetApplierFunction; c
 	@param value The value to add to the set. The value is retained by
 		the set using the retain callback provided when the set
 		was created. If the value is not of the sort expected by the
-		retain callback, the behavior is undefined. The count of the 
+		retain callback, the behavior is undefined. The count of the
                 set is increased by one.
 }
 procedure CFSetAddValue( theSet: CFMutableSetRef; value: {const} UnivPtr ); external name '_CFSetAddValue';
@@ -654,14 +654,14 @@ procedure CFSetAddValue( theSet: CFMutableSetRef; value: {const} UnivPtr ); exte
                 callback, the behavior is undefined. The value is retained by
 		the set using the retain callback provided when the set
 		was created. If the value is not of the sort expected by the
-		retain callback, the behavior is undefined. The count of the 
+		retain callback, the behavior is undefined. The count of the
                 set is increased by one.
 }
 procedure CFSetReplaceValue( theSet: CFMutableSetRef; value: {const} UnivPtr ); external name '_CFSetReplaceValue';
 
 {!
 	@function CFSetSetValue
-	Replaces the value in the set if it is present, or adds the value to 
+	Replaces the value in the set if it is present, or adds the value to
         the set if it is absent.
 	@param theSet The set to which the value is to be replaced. If this
 		parameter is not a valid mutable CFSet, the behavior is
@@ -673,7 +673,7 @@ procedure CFSetReplaceValue( theSet: CFMutableSetRef; value: {const} UnivPtr );
                 callback, the behavior is undefined. The value is retained by
 		the set using the retain callback provided when the set
 		was created. If the value is not of the sort expected by the
-		retain callback, the behavior is undefined. The count of the 
+		retain callback, the behavior is undefined. The count of the
                 set is increased by one.
 }
 procedure CFSetSetValue( theSet: CFMutableSetRef; value: {const} UnivPtr ); external name '_CFSetSetValue';

+ 22 - 22
packages/univint/src/CFSocket.pas

@@ -220,7 +220,7 @@ type
 	CFSocketRef = ^__CFSocket; { an opaque type }
 	__CFSocket = record end;
 
-{ A CFSocket contains a native socket within a structure that can 
+{ A CFSocket contains a native socket within a structure that can
 be used to read from the socket in the background and make the data
 thus read available using a runloop source.  The callback used for
 this may be of three types, as specified by the callBackTypes
@@ -230,7 +230,7 @@ If kCFSocketReadCallBack is used, then data will not be
 automatically read, but the callback will be called when data
 is available to be read, or a new child socket is waiting to be
 accepted.
-    
+
 If kCFSocketAcceptCallBack is used, then new child sockets will be
 accepted and passed to the callback, with the data argument being
 a pointer to a CFSocketNativeHandle.  This is usable only with
@@ -251,49 +251,49 @@ an SInt32 error code if the connect failed.  kCFSocketConnectCallBack
 will never be sent more than once for a given socket.
 
 The callback types may also have kCFSocketWriteCallBack added to
-them, if large amounts of data are to be sent rapidly over the 
+them, if large amounts of data are to be sent rapidly over the
 socket and notification is desired when there is space in the
-kernel buffers so that the socket is writable again.  
+kernel buffers so that the socket is writable again.
 
 With a connection-oriented socket, if the connection is broken from the
-other end, then one final kCFSocketReadCallBack or kCFSocketDataCallBack 
-will occur.  In the case of kCFSocketReadCallBack, the underlying socket 
+other end, then one final kCFSocketReadCallBack or kCFSocketDataCallBack
+will occur.  In the case of kCFSocketReadCallBack, the underlying socket
 will have 0 bytes available to read.  In the case of kCFSocketDataCallBack,
 the data argument will be a CFDataRef of length 0.
 
-There are socket flags that may be set to control whether callbacks of 
-a given type are automatically reenabled after they are triggered, and 
+There are socket flags that may be set to control whether callbacks of
+a given type are automatically reenabled after they are triggered, and
 whether the underlying native socket will be closed when the CFSocket
-is invalidated.  By default read, accept, and data callbacks are 
+is invalidated.  By default read, accept, and data callbacks are
 automatically reenabled; write callbacks are not, and connect callbacks
 may not be, since they are sent once only.  Be careful about automatically
-reenabling read and write callbacks, since this implies that the 
+reenabling read and write callbacks, since this implies that the
 callbacks will be sent repeatedly if the socket remains readable or
 writable respectively.  Be sure to set these flags only for callbacks
 that your CFSocket actually possesses; the result of setting them for
 other callback types is undefined.
 
-Individual callbacks may also be enabled and disabled manually, whether 
-they are automatically reenabled or not.  If they are not automatically 
-reenabled, then they will need to be manually reenabled when the callback 
-is ready to be received again (and not sooner).  Even if they are 
+Individual callbacks may also be enabled and disabled manually, whether
+they are automatically reenabled or not.  If they are not automatically
+reenabled, then they will need to be manually reenabled when the callback
+is ready to be received again (and not sooner).  Even if they are
 automatically reenabled, there may be occasions when it will be useful
 to be able to manually disable them temporarily and then reenable them.
 Be sure to enable and disable only callbacks that your CFSocket actually
 possesses; the result of enabling and disabling other callback types is
 undefined.
 
-By default the underlying native socket will be closed when the CFSocket 
-is invalidated, but it will not be if kCFSocketCloseOnInvalidate is 
-turned off.  This can be useful in order to destroy a CFSocket but 
-continue to use the underlying native socket.  The CFSocket must 
-still be invalidated when it will no longer be used.  Do not in 
-either case close the underlying native socket without invalidating 
+By default the underlying native socket will be closed when the CFSocket
+is invalidated, but it will not be if kCFSocketCloseOnInvalidate is
+turned off.  This can be useful in order to destroy a CFSocket but
+continue to use the underlying native socket.  The CFSocket must
+still be invalidated when it will no longer be used.  Do not in
+either case close the underlying native socket without invalidating
 the CFSocket.
 
 Addresses are stored as CFDatas containing a struct sockaddr
 appropriate for the protocol family; make sure that all fields are
-filled in properly when passing in an address.  
+filled in properly when passing in an address.
 
 }
 
@@ -381,7 +381,7 @@ procedure CFSocketEnableCallBacks( s: CFSocketRef; callBackTypes: CFOptionFlags
 { For convenience, a function is provided to send data using the socket with a timeout.  The timeout will be used only if the specified value is positive.  The address should be left NULL if the socket is already connected. }
 function CFSocketSendData( s: CFSocketRef; address: CFDataRef; data: CFDataRef; timeout: CFTimeInterval ): CFSocketError; external name '_CFSocketSendData';
 
-{ Generic name registry functionality (CFSocketRegisterValue, 
+{ Generic name registry functionality (CFSocketRegisterValue,
 CFSocketCopyRegisteredValue) allows the registration of any property
 list type.  Functions specific to CFSockets (CFSocketRegisterSocketData,
 CFSocketCopyRegisteredSocketData) register a CFData containing the

+ 114 - 114
packages/univint/src/CFSocketStream.pas

@@ -1,15 +1,15 @@
 {
 	 File:	   CFNetwork/CFSocketStream.h
- 
+
 	 Contains:   CoreFoundation Network socket streams header
- 
+
 	 Copyright:  Copyright (c) 2001-2008, Apple Inc. All rights reserved.
- 
+
 	 Bugs?:	  For bug reports, consult the following page on
 				 the World Wide Web:
- 
+
 					 http://bugs.freepascal.org
- 
+
 }
 {       Pascal Translation:  Peter N Lewis, <[email protected]>, 2004 }
 {       Pascal Translation Updated:  Gale R Paeper, <[email protected]>, 2008 }
@@ -228,7 +228,7 @@ uses MacTypes,CFStream,CFBase,CFHost,CFNetServices;
 
 
 {
- *  kCFStreamPropertySSLContext 
+ *  kCFStreamPropertySSLContext
  *
  * The SSLContextRef used for both read and write operations on a
  * CFSocketStream.
@@ -262,25 +262,25 @@ var kCFStreamPropertySSLContext: CFStringRef; external name '_kCFStreamPropertyS
 
 {
  *  kCFStreamPropertySSLPeerTrust
- *  
+ *
  *  Discussion:
  *	Stream property value for copy operations.  Returns a SecTrustRef
  *	which was a result of the SSL handshake.  This property is not valid before
  *  a stream is opened.  See Security/SecTrust.h for more information.
- *  
+ *
  }
 var kCFStreamPropertySSLPeerTrust: CFStringRef; external name '_kCFStreamPropertySSLPeerTrust'; (* attribute const *)
 (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0) *)
 
 {
  *  kCFStreamSSLValidatesCertificateChain
- *  
+ *
  *  Discussion:
- *	Security property key for kCFStreamPropertySSLSettings. 
+ *	Security property key for kCFStreamPropertySSLSettings.
  *	CFBooleanRef indicating whether the certificate chain should be
  *	validated or not.  The value is kCFBooleanTrue by default (not
  *	set).
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.4 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -288,15 +288,15 @@ var kCFStreamPropertySSLPeerTrust: CFStringRef; external name '_kCFStreamPropert
  }
 var kCFStreamSSLValidatesCertificateChain: CFStringRef; external name '_kCFStreamSSLValidatesCertificateChain'; (* attribute const *)
 (* __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0) *)
-	
+
 {
  *  kCFStreamPropertySSLSettings
- *  
+ *
  *  Discussion:
  *	Stream property key for set operations.  CFDictionaryRef filled
  *	with different security settings.  By default, there are no
  *	security settings.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.4 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -307,12 +307,12 @@ var kCFStreamPropertySSLSettings: CFStringRef; external name '_kCFStreamProperty
 
 {
  *  kCFStreamSSLLevel
- *  
+ *
  *  Discussion:
- *	Security property key for kCFStreamPropertySSLSettings. 
+ *	Security property key for kCFStreamPropertySSLSettings.
  *	CFStringRef being one of the security levels.  The value is
  *	kCFStreamSocketSecurityLevelNegotiatedSSL by default (not set).
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.4 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -323,14 +323,14 @@ var kCFStreamSSLLevel: CFStringRef; external name '_kCFStreamSSLLevel'; (* attri
 
 {
  *  kCFStreamSSLPeerName
- *  
+ *
  *  Discussion:
- *	Security property key for kCFStreamPropertySSLSettings. 
+ *	Security property key for kCFStreamPropertySSLSettings.
  *	CFStringRef overriding the name used for certificate
- *	verification.  Set to kCFNull to prevent name verification. 
+ *	verification.  Set to kCFNull to prevent name verification.
  *	Default is the host name with which the streams were created.  If
  *	no host name was used, no peer name will be used.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.4 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -341,13 +341,13 @@ var kCFStreamSSLPeerName: CFStringRef; external name '_kCFStreamSSLPeerName'; (*
 
 {
  *  kCFStreamSSLCertificates
- *  
+ *
  *  Discussion:
- *	Security property key for kCFStreamPropertySSLSettings. 
+ *	Security property key for kCFStreamPropertySSLSettings.
  *	CFArrayRef of SecCertificateRefs, except for index [0], which is
  *	a SecIdentityRef.  See SSLSetCertificate in
  *	Security/SecureTransport.h for more information.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.4 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -358,14 +358,14 @@ var kCFStreamSSLCertificates: CFStringRef; external name '_kCFStreamSSLCertifica
 
 {
  *  kCFStreamSSLIsServer
- *  
+ *
  *  Discussion:
- *	Security property key for kCFStreamPropertySSLSettings. 
+ *	Security property key for kCFStreamPropertySSLSettings.
  *	CFBooleanRef indicating whether the connection is to act as a
  *	server in the SSL process or not.  The value is kCFBooleanFalse
  *	by default (not set).  If set to kCFBooleanTrue, there must be a
  *	valid value for the kCFStreamSSLCertificates key too.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.4 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -374,16 +374,16 @@ var kCFStreamSSLCertificates: CFStringRef; external name '_kCFStreamSSLCertifica
 var kCFStreamSSLIsServer: CFStringRef; external name '_kCFStreamSSLIsServer'; (* attribute const *)
 (* __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0) *)
 
-	
+
 {
  * The following properties are considered deprecated in Mac OS 10.6 and later.
  *
- * kCFStreamPropertySSLPeerCertificates: 
+ * kCFStreamPropertySSLPeerCertificates:
  *			The peer certificates are available as part of the SecTrustRef object.  See <Security/SecTrust.h>
  *
  * kCFStreamSSLAllowsExpiredCertificates:
  * kCFStreamSSLAllowsExpiredRoots:
- * kCFStreamSSLAllowsAnyRoot: 
+ * kCFStreamSSLAllowsAnyRoot:
  *			The SSL handshake flags which affect untrusted certificate chain evaluation are deprecated.
  *			Instead, use the single property kCFStreamSSLValidatesCertificateChain to disable certificate
  *			chain checking if the user has decided that it is appropriate to do so.
@@ -392,12 +392,12 @@ var kCFStreamSSLIsServer: CFStringRef; external name '_kCFStreamSSLIsServer'; (*
 {$ifc TARGET_OS_MAC}
 {
  *  kCFStreamPropertySSLPeerCertificates
- *  
+ *
  *  Discussion:
  *	Stream property key for copy operations.  CFArrayRef containing
  *	SecCertificateRefs. See SSLGetPeerCertificates in
  *	Security/SecureTransport.h for more information.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.4 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -408,13 +408,13 @@ var kCFStreamPropertySSLPeerCertificates: CFStringRef; external name '_kCFStream
 
 {
  *  kCFStreamSSLAllowsExpiredCertificates
- *  
+ *
  *  Discussion:
- *	Security property key for kCFStreamPropertySSLSettings. 
+ *	Security property key for kCFStreamPropertySSLSettings.
  *	CFBooleanRef indicating whether expired certificates should be
  *	allowed or not.  The value is kCFBooleanFalse by default (not
  *	set).
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.4 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -425,13 +425,13 @@ var kCFStreamSSLAllowsExpiredCertificates: CFStringRef; external name '_kCFStrea
 
 {
  *  kCFStreamSSLAllowsExpiredRoots
- *  
+ *
  *  Discussion:
- *	Security property key for kCFStreamPropertySSLSettings. 
+ *	Security property key for kCFStreamPropertySSLSettings.
  *	CFBooleanRef indicating whether expired root certificates should
  *	be allowed or not.  The value is kCFBooleanFalse by default (not
  *	set).
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.4 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -442,13 +442,13 @@ var kCFStreamSSLAllowsExpiredRoots: CFStringRef; external name '_kCFStreamSSLAll
 
 {
  *  kCFStreamSSLAllowsAnyRoot
- *  
+ *
  *  Discussion:
- *	Security property key for kCFStreamPropertySSLSettings. 
+ *	Security property key for kCFStreamPropertySSLSettings.
  *	CFBooleanRef indicating whether any root certificates should be
  *	allowed or not.  The value is kCFBooleanFalse by default (not
  *	set).
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.4 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -483,14 +483,14 @@ var kCFStreamNetworkServiceTypeVoice: CFStringRef; external name '_kCFStreamNetw
 
 {
  *  kCFStreamPropertyNoCellular
- *  
+ *
  *  Discussion:
  *  Stream property value, for both set and copy operations.
  *  The value is a CFBooleanRef which indicates whether the connection
- *  is allowed to use the built-in celluar radios.  A value of kCFBooleanTrue 
+ *  is allowed to use the built-in celluar radios.  A value of kCFBooleanTrue
  *  disallows use of cellular interfaces.  kCFBooleanFalse (the default)
  *  allows use of cellular interfaces.
- *  
+ *
  }
 var kCFStreamPropertyNoCellular: CFStringRef; external name '_kCFStreamPropertyNoCellular'; (* attribute const *)
 (* __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_5_0) *)
@@ -508,13 +508,13 @@ var kCFStreamPropertyConnectionIsCellular: CFStringRef; external name '_kCFStrea
 
 {
  *  kCFStreamErrorDomainWinSock
- *  
+ *
  *  Discussion:
  *	WinSock error domain.  On Win32 platforms, networking errors will
  *	come in this domain.  See <winsock2.h> for values.  Note that
  *	non-networking errors, like ENOMEM, will continue to come in the
  *	POSIX domain as on OS X.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.5 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -525,10 +525,10 @@ var kCFStreamErrorDomainWinSock: CFIndex; external name '_kCFStreamErrorDomainWi
 
 {
  *  kCFStreamErrorDomainSOCKS
- *  
+ *
  *  Discussion:
  *	SOCKS proxy error domain.  Errors formulated using inlines below.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later
  *	CarbonLib:		not available
@@ -574,7 +574,7 @@ const
 
 {
  *  kCFStreamPropertySOCKSProxy
- *  
+ *
  *  Discussion:
  *	Stream property key, for both set and copy operations.  To set a
  *	stream to use a SOCKS proxy, call CFReadStreamSetProperty or
@@ -584,7 +584,7 @@ const
  *	and kCFStreamPropertySOCKSProxyPort.  The dictionary returned by
  *	SystemConfiguration for SOCKS proxies will work without
  *	alteration.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later
  *	CarbonLib:		not available
@@ -594,13 +594,13 @@ var kCFStreamPropertySOCKSProxy: CFStringRef; external name '_kCFStreamPropertyS
 
 {
  *  kCFStreamPropertySOCKSProxyHost
- *  
+ *
  *  Discussion:
  *	CFDictionary key for SOCKS proxy information.  The key
  *	kCFStreamPropertySOCKSProxyHost should contain a CFStringRef
  *	value representing the SOCKS proxy host.  Defined to match
  *	kSCPropNetProxiesSOCKSProxy
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later
  *	CarbonLib:		not available
@@ -610,14 +610,14 @@ var kCFStreamPropertySOCKSProxyHost: CFStringRef; external name '_kCFStreamPrope
 
 {
  *  kCFStreamPropertySOCKSProxyPort
- *  
+ *
  *  Discussion:
  *	CFDictionary key for SOCKS proxy information.  The key
  *	kCFStreamPropertySOCKSProxyPort should contain a CFNumberRef
  *	which itself is of type kCFNumberSInt32Type.  This value should
  *	represent the port on which the proxy is listening.  Defined to
  *	match kSCPropNetProxiesSOCKSPort
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later
  *	CarbonLib:		not available
@@ -627,14 +627,14 @@ var kCFStreamPropertySOCKSProxyPort: CFStringRef; external name '_kCFStreamPrope
 
 {
  *  kCFStreamPropertySOCKSVersion
- *  
+ *
  *  Discussion:
  *	CFDictionary key for SOCKS proxy information.  By default, SOCKS5
  *	will be used unless there is a kCFStreamPropertySOCKSVersion key
  *	in the dictionary.  Its value must be
  *	kCFStreamSocketSOCKSVersion4 or kCFStreamSocketSOCKSVersion5 to
  *	set SOCKS4 or SOCKS5, respectively.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later
  *	CarbonLib:		not available
@@ -644,11 +644,11 @@ var kCFStreamPropertySOCKSVersion: CFStringRef; external name '_kCFStreamPropert
 
 {
  *  kCFStreamSocketSOCKSVersion4
- *  
+ *
  *  Discussion:
  *	CFDictionary value for SOCKS proxy information.  Indcates that
  *	SOCKS will or is using version 4 of the SOCKS protocol.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later
  *	CarbonLib:		not available
@@ -658,11 +658,11 @@ var kCFStreamSocketSOCKSVersion4: CFStringRef; external name '_kCFStreamSocketSO
 
 {
  *  kCFStreamSocketSOCKSVersion5
- *  
+ *
  *  Discussion:
  *	CFDictionary value for SOCKS proxy information.  Indcates that
  *	SOCKS will or is using version 5 of the SOCKS protocol.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later
  *	CarbonLib:		not available
@@ -672,15 +672,15 @@ var kCFStreamSocketSOCKSVersion5: CFStringRef; external name '_kCFStreamSocketSO
 
 {
  *  kCFStreamPropertySOCKSUser
- *  
+ *
  *  Discussion:
  *	CFDictionary key for SOCKS proxy information.  To set a user name
  *	and/or password, if required, the dictionary must contain the
- *	key(s) kCFStreamPropertySOCKSUser and/or  
+ *	key(s) kCFStreamPropertySOCKSUser and/or
  *	kCFStreamPropertySOCKSPassword with the value being the user's
  *	name as a CFStringRef and/or the user's password as a
  *	CFStringRef, respectively.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later
  *	CarbonLib:		not available
@@ -690,15 +690,15 @@ var kCFStreamPropertySOCKSUser: CFStringRef; external name '_kCFStreamPropertySO
 
 {
  *  kCFStreamPropertySOCKSPassword
- *  
+ *
  *  Discussion:
  *	CFDictionary key for SOCKS proxy information.  To set a user name
  *	and/or password, if required, the dictionary must contain the
- *	key(s) kCFStreamPropertySOCKSUser and/or  
+ *	key(s) kCFStreamPropertySOCKSUser and/or
  *	kCFStreamPropertySOCKSPassword with the value being the user's
  *	name as a CFStringRef and/or the user's password as a
  *	CFStringRef, respectively.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later
  *	CarbonLib:		not available
@@ -708,10 +708,10 @@ var kCFStreamPropertySOCKSPassword: CFStringRef; external name '_kCFStreamProper
 
 {
  *  kCFStreamErrorDomainSSL
- *  
+ *
  *  Discussion:
  *	Errors located in Security/SecureTransport.h
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later
  *	CarbonLib:		not available
@@ -721,7 +721,7 @@ var kCFStreamErrorDomainSSL: SInt32; external name '_kCFStreamErrorDomainSSL'; (
 
 {
  *  kCFStreamPropertySocketSecurityLevel
- *  
+ *
  *  Discussion:
  *	Stream property key, for both set and copy operations. To set a
  *	stream to be secure, call CFReadStreamSetProperty or
@@ -729,7 +729,7 @@ var kCFStreamErrorDomainSSL: SInt32; external name '_kCFStreamErrorDomainSSL'; (
  *	kCFStreamPropertySocketSecurityLevel and the value being one of
  *	the following values.  Streams may set a security level after
  *	open in order to allow on-the-fly securing of a stream.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later
  *	CarbonLib:		not available
@@ -739,11 +739,11 @@ var kCFStreamPropertySocketSecurityLevel: CFStringRef; external name '_kCFStream
 
 {
  *  kCFStreamSocketSecurityLevelNone
- *  
+ *
  *  Discussion:
  *	Stream property value, for both set and copy operations.
  *	Indicates to use no security (default setting).
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later
  *	CarbonLib:		not available
@@ -753,11 +753,11 @@ var kCFStreamSocketSecurityLevelNone: CFStringRef; external name '_kCFStreamSock
 
 {
  *  kCFStreamSocketSecurityLevelSSLv2
- *  
+ *
  *  Discussion:
  *	Stream property value, for both set and copy operations.
  *	Indicates to use SSLv2 security.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later
  *	CarbonLib:		not available
@@ -767,11 +767,11 @@ var kCFStreamSocketSecurityLevelSSLv2: CFStringRef; external name '_kCFStreamSoc
 
 {
  *  kCFStreamSocketSecurityLevelSSLv3
- *  
+ *
  *  Discussion:
  *	Stream property value, for both set and copy operations.
  *	Indicates to use SSLv3 security.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later
  *	CarbonLib:		not available
@@ -781,11 +781,11 @@ var kCFStreamSocketSecurityLevelSSLv3: CFStringRef; external name '_kCFStreamSoc
 
 {
  *  kCFStreamSocketSecurityLevelTLSv1
- *  
+ *
  *  Discussion:
  *	Stream property value, for both set and copy operations.
  *	Indicates to use TLSv1 security.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later
  *	CarbonLib:		not available
@@ -795,12 +795,12 @@ var kCFStreamSocketSecurityLevelTLSv1: CFStringRef; external name '_kCFStreamSoc
 
 {
  *  kCFStreamSocketSecurityLevelNegotiatedSSL
- *  
+ *
  *  Discussion:
  *	Stream property value, for both set and copy operations.
  *	Indicates to use TLS or SSL with fallback to lower versions. This
  *	is what HTTPS does, for instance.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later
  *	CarbonLib:		not available
@@ -809,7 +809,7 @@ var kCFStreamSocketSecurityLevelTLSv1: CFStringRef; external name '_kCFStreamSoc
 var kCFStreamSocketSecurityLevelNegotiatedSSL: CFStringRef; external name '_kCFStreamSocketSecurityLevelNegotiatedSSL'; (* attribute const *)
 {
  *  kCFStreamPropertyShouldCloseNativeSocket
- *  
+ *
  *  Discussion:
  *	Set the value to kCFBooleanTrue if the stream should close and
  *	release the underlying native socket when the stream is released.
@@ -821,7 +821,7 @@ var kCFStreamSocketSecurityLevelNegotiatedSSL: CFStringRef; external name '_kCFS
  *	CFReadStreamSetProperty or CFWriteStreamSetProperty.  The
  *	property can be copied through CFReadStreamCopyProperty or
  *	CFWriteStreamCopyProperty.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.2 and later
  *	CarbonLib:		not available
@@ -832,11 +832,11 @@ var kCFStreamPropertyShouldCloseNativeSocket: CFStringRef; external name '_kCFSt
 
 {
  *  kCFStreamPropertySocketRemoteHost
- *  
+ *
  *  Discussion:
  *	Stream property key for copy operations. Returns a CFHostRef if
  *	known, otherwise NULL.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -848,11 +848,11 @@ var kCFStreamPropertySocketRemoteHost: CFStringRef; external name '_kCFStreamPro
 
 {
  *  kCFStreamPropertySocketRemoteNetService
- *  
+ *
  *  Discussion:
  *	Stream property key for copy operations. Returns a
  *	CFNetServiceRef if known, otherwise NULL.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -864,37 +864,37 @@ var kCFStreamPropertySocketRemoteNetService: CFStringRef; external name '_kCFStr
 
 {
  *  CFStreamCreatePairWithSocketToCFHost()
- *  
+ *
  *  Discussion:
  *	Given a CFHostRef, this function will create a pair of streams
  *	suitable for connecting to the host.  If there is a failure
  *	during creation, the stream references will be set to NULL.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	alloc:
  *	  The CFAllocator which should be used to allocate memory for the
  *	  streams. If this reference is not a valid CFAllocator, the
  *	  behavior is undefined.
- *	
+ *
  *	host:
  *	  A reference to a CFHost to which the streams are desired.  If
  *	  unresolved, the host will be resolved prior to connecting.
- *	
+ *
  *	port:
  *	  The port to which the connection should be established.
- *	
+ *
  *	readStream:
  *	  A pointer to a CFReadStreamRef which will be set to the new
  *	  read stream instance.  Can be set to NULL if not desired.
- *	
+ *
  *	writeStream:
  *	  A pointer to a CFWriteStreamRef which will be set to the new
  *	  write stream instance.  Can be set to NULL if not desired.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -906,35 +906,35 @@ procedure CFStreamCreatePairWithSocketToCFHost( alloc: CFAllocatorRef; host: CFH
 
 {
  *  CFStreamCreatePairWithSocketToNetService()
- *  
+ *
  *  Discussion:
  *	Given a CFNetService, this function will create a pair of streams
  *	suitable for connecting to the service.  If there is a failure
  *	during creation, the stream references will be set to NULL.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	alloc:
  *	  The CFAllocator which should be used to allocate memory for the
  *	  streams. If this reference is not a valid CFAllocator, the
  *	  behavior is undefined.
- *	
+ *
  *	service:
  *	  A reference to a CFNetService to which the streams are desired.
  *	   If unresolved, the service will be resolved prior to
  *	  connecting.
- *	
+ *
  *	readStream:
  *	  A pointer to a CFReadStreamRef which will be set to the new
  *	  read stream instance.  Can be set to NULL if not desired.
- *	
+ *
  *	writeStream:
  *	  A pointer to a CFWriteStreamRef which will be set to the new
  *	  write stream instance.  Can be set to NULL if not desired.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.3 and later in CoreServices.framework
  *	CarbonLib:		not available
@@ -946,7 +946,7 @@ procedure CFStreamCreatePairWithSocketToNetService( alloc: CFAllocatorRef; servi
 {$ifc TARGET_OS_MAC}
 {
  *  CFStreamSocketSecurityProtocol
- *  
+ *
  *  Discussion:
  *	These enum values and CFSocketStreamPairSetSecurityProtocol have
  *	been deprecated in favor of CFReadStreamSetProperty and
@@ -983,34 +983,34 @@ const
 
 {
  *  CFSocketStreamPairSetSecurityProtocol()   *** DEPRECATED ***
- *  
+ *
  *  Discussion:
  *	CFSocketStreamPairSetSecurityProtocol has been deprecated in
  *	favor of CFReadStreamSetProperty and CFWriteStreamSetProperty
  *	with the previously mentioned property and values.  Sets the
  *	security level on a pair of streams.
- *  
+ *
  *  Mac OS X threading:
  *	Thread safe
- *  
+ *
  *  Parameters:
- *	
+ *
  *	socketReadStream:
  *	  Read stream reference which is to have its security level
  *	  changed.
- *	
+ *
  *	socketWriteStream:
  *	  Write stream reference which is to have its security level
  *	  changed.
- *	
+ *
  *	securityProtocol:
  *	  CFStreamSocketSecurityProtocol enum indicating the security
  *	  level to be set.
- *  
+ *
  *  Result:
  *	Returns TRUE if the settings were placed on the stream, FALSE
  *	otherwise.
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.1 and later in CoreServices.framework but deprecated in 10.2
  *	CarbonLib:		not available
@@ -1022,13 +1022,13 @@ function CFSocketStreamPairSetSecurityProtocol( socketReadStream: CFReadStreamRe
 
 {
  *  kCFStreamPropertyProxyLocalBypass
- *  
+ *
  *  Discussion:
  *	CFDictionary key for proxy information.  It matches
  *	kSCPropNetProxiesExcludeSimpleHostnames defined in
  *	SCSchemaDefinitions.h.  CFNumber (0 or 1) indicating to bypass
  *	the proxies for simple hostnames (names without dots).
- *  
+ *
  *  Availability:
  *	Mac OS X:		 in version 10.4 and later in CoreServices.framework
  *	CarbonLib:		not available

+ 18 - 18
packages/univint/src/CFStream.pas

@@ -320,29 +320,29 @@ function CFWriteStreamCopyError( stream: CFWriteStreamRef ): CFErrorRef; externa
 (* CF_AVAILABLE_STARTING(10_5, 2_0) *)
 
 { Returns success/failure.  Opening a stream causes it to reserve all the system
-   resources it requires.  If the stream can open non-blocking, this will always 
+   resources it requires.  If the stream can open non-blocking, this will always
    return TRUE; listen to the run loop source to find out when the open completes
-   and whether it was successful, or poll using CFRead/WriteStreamGetStatus(), waiting 
+   and whether it was successful, or poll using CFRead/WriteStreamGetStatus(), waiting
    for a status of kCFStreamStatusOpen or kCFStreamStatusError.  }
 function CFReadStreamOpen( stream: CFReadStreamRef ): Boolean; external name '_CFReadStreamOpen';
 function CFWriteStreamOpen( stream: CFWriteStreamRef ): Boolean; external name '_CFWriteStreamOpen';
 
-{ Terminates the flow of bytes; releases any system resources required by the 
-   stream.  The stream may not fail to close.  You may call CFStreamClose() to 
+{ Terminates the flow of bytes; releases any system resources required by the
+   stream.  The stream may not fail to close.  You may call CFStreamClose() to
    effectively abort a stream. }
 procedure CFReadStreamClose( stream: CFReadStreamRef ); external name '_CFReadStreamClose';
 procedure CFWriteStreamClose( stream: CFWriteStreamRef ); external name '_CFWriteStreamClose';
 
-{ Whether there is data currently available for reading; returns TRUE if it's 
+{ Whether there is data currently available for reading; returns TRUE if it's
    impossible to tell without trying }
 function CFReadStreamHasBytesAvailable( stream: CFReadStreamRef ): Boolean; external name '_CFReadStreamHasBytesAvailable';
 
-{ Returns the number of bytes read, or -1 if an error occurs preventing any 
-   bytes from being read, or 0 if the stream's end was encountered.  
-   It is an error to try and read from a stream that hasn't been opened first.  
+{ Returns the number of bytes read, or -1 if an error occurs preventing any
+   bytes from being read, or 0 if the stream's end was encountered.
+   It is an error to try and read from a stream that hasn't been opened first.
    This call will block until at least one byte is available; it will NOT block
    until the entire buffer can be filled.  To avoid blocking, either poll using
-   CFReadStreamHasBytesAvailable() or use the run loop and listen for the 
+   CFReadStreamHasBytesAvailable() or use the run loop and listen for the
    kCFStreamCanRead event for notification of data available. }
 function CFReadStreamRead( stream: CFReadStreamRef; buffer: UnivPtr; bufferLength: CFIndex ): CFIndex; external name '_CFReadStreamRead';
 
@@ -371,25 +371,25 @@ function CFWriteStreamWrite( stream: CFWriteStreamRef; buffer: UnivPtr; bufferLe
 { Particular streams can name properties and assign meanings to them; you
    access these properties through the following calls.  A property is any interesting
    information about the stream other than the data being transmitted itself.
-   Examples include the headers from an HTTP transmission, or the expected 
+   Examples include the headers from an HTTP transmission, or the expected
    number of bytes, or permission information, etc.  Properties that can be set
    configure the behavior of the stream, and may only be settable at particular times
-   (like before the stream has been opened).  See the documentation for particular 
+   (like before the stream has been opened).  See the documentation for particular
    properties to determine their get- and set-ability. }
 function CFReadStreamCopyProperty( stream: CFReadStreamRef; propertyName: CFStringRef ): CFTypeRef; external name '_CFReadStreamCopyProperty';
 function CFWriteStreamCopyProperty( stream: CFWriteStreamRef; propertyName: CFStringRef ): CFTypeRef; external name '_CFWriteStreamCopyProperty';
 
 {#if MAC_OS_X_VERSION_10_2 <= MAC_OS_X_VERSION_MAX_ALLOWED}
-{ Returns TRUE if the stream recognizes and accepts the given property-value pair; 
+{ Returns TRUE if the stream recognizes and accepts the given property-value pair;
    FALSE otherwise. }
 function CFReadStreamSetProperty( stream: CFReadStreamRef; propertyName: CFStringRef; propertyValue: CFTypeRef ): Boolean; external name '_CFReadStreamSetProperty';
 function CFWriteStreamSetProperty( stream: CFWriteStreamRef; propertyName: CFStringRef; propertyValue: CFTypeRef ): Boolean; external name '_CFWriteStreamSetProperty';
 {#endif}
 
-{ Asynchronous processing - If you wish to neither poll nor block, you may register 
+{ Asynchronous processing - If you wish to neither poll nor block, you may register
    a client to hear about interesting events that occur on a stream.  Only one client
    per stream is allowed; registering a new client replaces the previous one.
- 
+
    Once you have set a client, the stream must be scheduled to provide the context in
    which the client will be called.  Streams may be scheduled on a single dispatch queue
    or on one or more run loops.  If scheduled on a run loop, it is the caller's responsibility
@@ -425,8 +425,8 @@ procedure CFWriteStreamSetDispatchQueue( stream: CFWriteStreamRef; q: dispatch_q
 (* CF_AVAILABLE_STARTING(10_9, 7_0) *)
 
 {
- * Returns the previously set dispatch queue with an incremented retain count.  
- * Note that the stream's queue may have been set to NULL if the stream was 
+ * Returns the previously set dispatch queue with an incremented retain count.
+ * Note that the stream's queue may have been set to NULL if the stream was
  * scheduled on a runloop subsequent to it having had a dispatch queue set.
  }
 function CFReadStreamCopyDispatchQueue( stream: CFReadStreamRef ): dispatch_queue_t; external name '_CFReadStreamCopyDispatchQueue';
@@ -445,13 +445,13 @@ type
 
 type
 	CFStreamError = record
-		domain: CFIndex; 
+		domain: CFIndex;
 		error: SInt32;
 	end;
 	CFStreamErrorPtr = ^CFStreamError;
 
 { 0 is returned if no error has occurred.  errorDomain specifies the domain
-   in which the error code should be interpretted; pass NULL if you are not 
+   in which the error code should be interpretted; pass NULL if you are not
    interested. }
 function CFReadStreamGetError( stream: CFReadStreamRef ): CFStreamError; external name '_CFReadStreamGetError';
 function CFWriteStreamGetError( stream: CFWriteStreamRef ): CFStreamError; external name '_CFWriteStreamGetError';

+ 53 - 53
packages/univint/src/CFString.pas

@@ -219,7 +219,7 @@ detail. For instance, CFString might choose to use an array of 8-bit characters
 to store its contents, or it might use multiple blocks of memory, or whatever.
 This is especially true since CFString is toll-free bridged with NSString, enabling
 any NSString instance to be used as a CFString. Furthermore, the implementation
-may change depending on the default system encoding, the user's language, 
+may change depending on the default system encoding, the user's language,
 or even a release or update of the OS.
 
 What this means is that you should use the following advanced functions with care:
@@ -318,7 +318,7 @@ const
 { CFString type ID }
 function CFStringGetTypeID: CFTypeID; external name '_CFStringGetTypeID';
 
-{ CFSTR() allows creation of compile-time constant CFStringRefs; the argument 
+{ CFSTR() allows creation of compile-time constant CFStringRefs; the argument
 should be a constant C-string.
 
 CFSTR(), not being a "Copy" or "Create" function, does not return a new
@@ -332,58 +332,58 @@ a CFSTR() return value to a function such as SetMenuItemWithCFString(), the
 function can retain it, then later, when it's done with it, it can release it.
 
 #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_5
-At this point non-7 bit characters (that is, characters > 127) in CFSTR() are not 
+At this point non-7 bit characters (that is, characters > 127) in CFSTR() are not
 supported and using them will lead to unpredictable results. This includes escaped
-(\nnn) characters whose values are > 127. Even if it works for you in testing, 
+(\nnn) characters whose values are > 127. Even if it works for you in testing,
 it might not work for a user with a different language preference.
 #else
 Non-7 bit characters (that is, above 127) in CFSTR() are supported, although care must
 be taken in dealing with files containing them. If you can trust your editor and tools
-to deal with non-ASCII characters in the source code, then you can use them directly 
-in CFSTR(); otherwise, you can represent such characters with their escaped octal 
-equivalents in the encoding the compiler will use to interpret them (for instance, 
-O-umlaut is \303\226 in UTF-8). UTF-8 is the recommended encoding here, 
+to deal with non-ASCII characters in the source code, then you can use them directly
+in CFSTR(); otherwise, you can represent such characters with their escaped octal
+equivalents in the encoding the compiler will use to interpret them (for instance,
+O-umlaut is \303\226 in UTF-8). UTF-8 is the recommended encoding here,
 since it is the default choice with Mac OS X developer tools.
 #endif
 
 }
 {
 	*** Pascal Usage of CFSTR et al ***
-	
+
 	For Pascal:
-	
-		To define your own constant CFStrings, call call CFSTRP with a 
-		constant Pascal single-quoted string only, for example 
+
+		To define your own constant CFStrings, call call CFSTRP with a
+		constant Pascal single-quoted string only, for example
 		CFSTRP('a constant string').
 
 	For MetroWerks Pascal:
-	
+
 		Include the CFStringGlue file in your project (it defines the private function,
 		CFSTRP0, which you should never call directly.
-		
+
 		In your uses clause, use CFString and CFStringGlue and whichever PInterface files
 		defining the constant CFStrings (or define your own using CFSTRP('pascal string')).
-	
+
 	For GNU Pascal:
-	
+
 		Include the GPCMacros.inc file (for example $I GPCMacros.inc).
-		
-		In your uses clause, use CFString (and, optionally, CFStringGlue and the 
+
+		In your uses clause, use CFString (and, optionally, CFStringGlue and the
 		PInterface files defining the constant CFStrings).
-		
+
 		You can optionally use CFSTR with a constant double-quoted C String (for example,
 		CFSTR("a constant C string")) although it will make no difference, but will
 		result in closer  C source code similarity.
-	
+
 	For maximum compatibility in both GPC and MetroWerks Pascal
-	
+
 		Include the GPCMacros.inc file in GPC as part of your GPC prefix.
-		
+
 		Include the CFStringGlue file in your MW project.
-		
+
 		Only ever use CFSTRP with a constant Pascal string.
-		
-		In your uses clause for a unit, use the CFString, CFStringGlue and any 
+
+		In your uses clause for a unit, use the CFString, CFStringGlue and any
 		PInterface files defining any constant CFStrings you need.
 }
 
@@ -417,13 +417,13 @@ function CFStringCreateWithBytes( alloc: CFAllocatorRef; bytes: UnivPtr; numByte
 
 function CFStringCreateWithCharacters( alloc: CFAllocatorRef; chars: UniCharPtr; numChars: CFIndex ): CFStringRef; external name '_CFStringCreateWithCharacters';
 
-{ These functions try not to copy the provided buffer. The buffer will be deallocated 
+{ These functions try not to copy the provided buffer. The buffer will be deallocated
 with the provided contentsDeallocator when it's no longer needed; to not free
 the buffer, specify kCFAllocatorNull here. As usual, NULL means default allocator.
 
-NOTE: Do not count on these buffers as being used by the string; 
+NOTE: Do not count on these buffers as being used by the string;
 in some cases the CFString might free the buffer and use something else
-(for instance if it decides to always use Unicode encoding internally). 
+(for instance if it decides to always use Unicode encoding internally).
 
 NOTE: If you are not transferring ownership of the buffer to the CFString
 (for instance, you supplied contentsDeallocator = kCFAllocatorNull), it is your
@@ -489,11 +489,11 @@ procedure CFStringGetCharacters( theString: CFStringRef; range: CFRange; buffer:
 {** Conversion to other encodings **}
 
 { These two convert into the provided buffer; they return false if conversion isn't possible
-(due to conversion error, or not enough space in the provided buffer). 
+(due to conversion error, or not enough space in the provided buffer).
 These functions do zero-terminate or put the length byte; the provided bufferSize should include
 space for this (so pass 256 for Str255). More sophisticated usages can go through CFStringGetBytes().
-These functions are equivalent to calling CFStringGetBytes() with 
-the range of the string; lossByte = 0; and isExternalRepresentation = false; 
+These functions are equivalent to calling CFStringGetBytes() with
+the range of the string; lossByte = 0; and isExternalRepresentation = false;
 if successful, they then insert the leading length or terminating zero, as desired.
 }
 function CFStringGetPascalString( theString: CFStringRef; buffer: StringPtr; bufferSize: CFIndex; encoding: CFStringEncoding ): Boolean; external name '_CFStringGetPascalString';
@@ -513,17 +513,17 @@ function CFStringGetCStringPtr( theString: CFStringRef; encoding: CFStringEncodi
 function CFStringGetCharactersPtr( theString: CFStringRef ): UniCharPtr; external name '_CFStringGetCharactersPtr'; { May return NULL at any time; be prepared for NULL }
 
 { The primitive conversion routine; allows you to convert a string piece at a time
-       into a fixed size buffer. Returns number of characters converted. 
+       into a fixed size buffer. Returns number of characters converted.
    Characters that cannot be converted to the specified encoding are represented
        with the byte specified by lossByte; if lossByte is 0, then lossy conversion
        is not allowed and conversion stops, returning partial results.
    Pass buffer==NULL if you don't care about the converted string (but just the convertability,
-       or number of bytes required). 
+       or number of bytes required).
    maxBufLength indicates the maximum number of bytes to generate. It is ignored when buffer==NULL.
-   Does not zero-terminate. If you want to create Pascal or C string, allow one extra byte at start or end. 
-   Setting isExternalRepresentation causes any extra bytes that would allow 
+   Does not zero-terminate. If you want to create Pascal or C string, allow one extra byte at start or end.
+   Setting isExternalRepresentation causes any extra bytes that would allow
        the data to be made persistent to be included; for instance, the Unicode BOM. Note that
-       CFString prepends UTF encoded data with the Unicode BOM <http://www.unicode.org/faq/utf_bom.html> 
+       CFString prepends UTF encoded data with the Unicode BOM <http://www.unicode.org/faq/utf_bom.html>
        when generating external representation if the target encoding allows. It's important to note that
        only UTF-8, UTF-16, and UTF-32 define the handling of the byte order mark character, and the "LE"
        and "BE" variants of UTF-16 and UTF-32 don't.
@@ -532,8 +532,8 @@ function CFStringGetBytes( theString: CFStringRef; range: CFRange; encoding: CFS
 
 { Convenience functions String <-> Data. These generate "external" formats, that is, formats that
    can be written out to disk. For instance, if the encoding is Unicode,
-   CFStringCreateFromExternalRepresentation() pays attention to the BOM character (if any) 
-   and does byte swapping if necessary. Similarly CFStringCreateExternalRepresentation() will  
+   CFStringCreateFromExternalRepresentation() pays attention to the BOM character (if any)
+   and does byte swapping if necessary. Similarly CFStringCreateExternalRepresentation() will
    include a BOM character if appropriate. See CFStringGetBytes() for more on this and lossByte.
 }
 function CFStringCreateFromExternalRepresentation( alloc: CFAllocatorRef; data: CFDataRef; encoding: CFStringEncoding ): CFStringRef; external name '_CFStringCreateFromExternalRepresentation';	{ May return NULL on conversion error }
@@ -560,7 +560,7 @@ function CFStringGetMaximumSizeForEncoding( length: CFIndex; encoding: CFStringE
 function CFStringGetFileSystemRepresentation( strng: CFStringRef; buffer: CStringPtr; maxBufLen: CFIndex ): Boolean; external name '_CFStringGetFileSystemRepresentation';
 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
 
-{ Get the upper bound on the number of bytes required to hold the file system representation for the string. This result is returned quickly as a very rough approximation, and could be much larger than the actual space required. The result includes space for the zero termination. If you are allocating a buffer for long-term keeping, it's recommended that you reallocate it smaller (to be the right size) after calling CFStringGetFileSystemRepresentation(). 
+{ Get the upper bound on the number of bytes required to hold the file system representation for the string. This result is returned quickly as a very rough approximation, and could be much larger than the actual space required. The result includes space for the zero termination. If you are allocating a buffer for long-term keeping, it's recommended that you reallocate it smaller (to be the right size) after calling CFStringGetFileSystemRepresentation().
 }
 function CFStringGetMaximumSizeOfFileSystemRepresentation( strng: CFStringRef ): CFIndex; external name '_CFStringGetMaximumSizeOfFileSystemRepresentation';
 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
@@ -573,7 +573,7 @@ function CFStringCreateWithFileSystemRepresentation( alloc: CFAllocatorRef; buff
 
 {** Comparison functions. **}
 
-{ Find and compare flags; these are OR'ed together and provided as CFStringCompareFlags in the various functions. 
+{ Find and compare flags; these are OR'ed together and provided as CFStringCompareFlags in the various functions.
 }
 type
 	CFStringCompareFlags = CFOptionFlags;
@@ -676,7 +676,7 @@ function CFStringGetRangeOfComposedCharactersAtIndex( theString: CFStringRef; th
                         is undefined.
 	@param result The pointer to a CFRange supplied by the caller in
 			which the search result is stored.  Note that the length
-			of this range can be more than 1, if for instance the 
+			of this range can be more than 1, if for instance the
 			result is a composed character. If a pointer to an invalid
 			memory is specified, the behavior is undefined.
 	@result true, if at least a character which is a member of the character
@@ -707,7 +707,7 @@ procedure CFStringGetParagraphBounds( strng: CFStringRef; range: CFRange; var pa
 	@param string The CFString which is to be hyphenated.  If this
                 		parameter is not a valid CFString, the behavior is
               		undefined.
-	@param location An index in the string.  If a valid hyphen index is returned, it 
+	@param location An index in the string.  If a valid hyphen index is returned, it
 	                will be before this index.
 	@param limitRange The range of characters within the string to search. If
 			the range location or end point (defined by the location
@@ -869,7 +869,7 @@ procedure CFStringNormalize( theString: CFMutableStringRef; theForm: CFStringNor
 	@param theString  The string which is to be folded.  If this parameter is not
 		a valid mutable CFString, the behavior is undefined.
 	@param theFlag  The equivalency flags which describes the character folding form.
-		Only those flags containing the word "insensitive" are recognized here; other flags are ignored.		
+		Only those flags containing the word "insensitive" are recognized here; other flags are ignored.
 		Folding with kCFCompareCaseInsensitive removes case distinctions in accordance with the mapping
 		specified by ftp://ftp.unicode.org/Public/UNIDATA/CaseFolding.txt.  Folding with
 		kCFCompareDiacriticInsensitive removes distinctions of accents and other diacritics.  Folding
@@ -967,12 +967,12 @@ function CFStringConvertEncodingToIANACharSetName( encoding: CFStringEncoding ):
 function CFStringGetMostCompatibleMacStringEncoding( encoding: CFStringEncoding ): CFStringEncoding; external name '_CFStringGetMostCompatibleMacStringEncoding';
 
 
-{ The next two functions allow fast access to the contents of a string, 
+{ The next two functions allow fast access to the contents of a string,
    assuming you are doing sequential or localized accesses. To use, call
    CFStringInitInlineBuffer() with a CFStringInlineBuffer (on the stack, say),
    and a range in the string to look at. Then call CFStringGetCharacterFromInlineBuffer()
    as many times as you want, with a index into that range (relative to the start
-   of that range). These are INLINE functions and will end up calling CFString only 
+   of that range). These are INLINE functions and will end up calling CFString only
    once in a while, to fill a buffer.  CFStringGetCharacterFromInlineBuffer() returns 0 if
    a location outside the original range is specified.
 }
@@ -996,7 +996,7 @@ type
 //     buf->directBuffer = CFStringGetCharactersPtr(str);
 //     buf->bufferedRangeStart = buf->bufferedRangeEnd = 0;
 // }
-// 
+//
 // CF_INLINE UniChar CFStringGetCharacterFromInlineBuffer(CFStringInlineBuffer *buf, CFIndex idx) {
 //     if (buf->directBuffer) {
 // 	if (idx < 0 || idx >= buf->rangeToBuffer.length) return 0;
@@ -1011,32 +1011,32 @@ type
 //     }
 //     return buf->buffer[idx - buf->bufferedRangeStart];
 // }
-// 
+//
 // #else
 // { If INLINE functions are not available, we do somewhat less powerful macros that work similarly (except be aware that the buf argument is evaluated multiple times).
 // }
 // #define CFStringInitInlineBuffer(str, buf, range) \
 //     do {(buf)->theString = str; (buf)->rangeToBuffer = range; (buf)->directBuffer = CFStringGetCharactersPtr(str);} while (0)
-// 
+//
 // #define CFStringGetCharacterFromInlineBuffer(buf, idx) \
 //     (((idx) < 0 || (idx) >= (buf)->rangeToBuffer.length) ? 0 : ((buf)->directBuffer ? (buf)->directBuffer[(idx) + (buf)->rangeToBuffer.location] : CFStringGetCharacterAtIndex((buf)->theString, (idx) + (buf)->rangeToBuffer.location)))
-// 
+//
 // #endif { CF_INLINE }
-// 
+//
 // { UTF-16 surrogate support
 //  }
 // CF_INLINE Boolean CFStringIsSurrogateHighCharacter(UniChar character) {
 //     return ((character >= 0xD800UL) && (character <= 0xDBFFUL) ? true : false);
 // }
-// 
+//
 // CF_INLINE Boolean CFStringIsSurrogateLowCharacter(UniChar character) {
 //     return ((character >= 0xDC00UL) && (character <= 0xDFFFUL) ? true : false);
 // }
-// 
+//
 // CF_INLINE UTF32Char CFStringGetLongCharacterForSurrogatePair(UniChar surrogateHigh, UniChar surrogateLow) {
 //     return ((surrogateHigh - 0xD800UL) << 10) + (surrogateLow - 0xDC00UL) + 0x0010000UL;
 // }
-// 
+//
 // // Maps a UTF-32 character to a pair of UTF-16 surrogate characters. The buffer pointed by surrogates has to have space for at least 2 UTF-16 characters. Returns true if mapped to a surrogate pair.
 // CF_INLINE Boolean CFStringGetSurrogatePairForLongCharacter(UTF32Char character, UniChar *surrogates) {
 //     if ((character > 0xFFFFUL) && (character < 0x110000UL)) { // Non-BMP character

+ 1 - 1
packages/univint/src/CFStringEncodingExt.pas

@@ -375,7 +375,7 @@ const
     kCFStringEncodingEBCDIC_CP037 = $0C02;	{ code page 037, extended EBCDIC (Latin-1 set) for US,Canada... }
 
     kCFStringEncodingUTF7 = $04000100; (* CF_AVAILABLE_STARTING(10_6, 4_0) *) { kTextEncodingUnicodeDefault + kUnicodeUTF7Format RFC2152 }
-    kCFStringEncodingUTF7_IMAP = $0A10; (* CF_AVAILABLE_STARTING(10_6, 4_0) *) { UTF-7 (IMAP folder variant) RFC3501 } 
+    kCFStringEncodingUTF7_IMAP = $0A10; (* CF_AVAILABLE_STARTING(10_6, 4_0) *) { UTF-7 (IMAP folder variant) RFC3501 }
 
     { Deprecated constants }
     kCFStringEncodingShiftJIS_X0213_00 = $0628; { Shift-JIS format encoding of JIS X0213 planes 1 and 2 (DEPRECATED) }

+ 25 - 25
packages/univint/src/CFStringTokenizer.pas

@@ -225,7 +225,7 @@ uses MacTypes,CFBase,CFLocale,CFArray,CFString;
 		current token. If current token is a compound, you can call
 		CFStringTokenizerGetCurrentSubTokens to retrieve the subtokens or derived
 		subtokens contained in the compound token.
-		To guess the language of a string, you call 
+		To guess the language of a string, you call
 		CFStringTokenizerCopyBestStringLanguage.
 }
 
@@ -246,7 +246,7 @@ uses MacTypes,CFBase,CFLocale,CFArray,CFString;
 		If the range is empty (length 0), the first few hundred characters in
 		the string are used.
 	@result A language represented in BCP 47 string, or NULL if the
-		language of the string cannot be guessed. 
+		language of the string cannot be guessed.
 	@discussion The result is not guaranteed to be accurate. Typically 200-400
 		characters are required to reliably guess the language of a string.
 }
@@ -270,7 +270,7 @@ const
 {!
 	Tokenization Unit
 	Use one of tokenization unit options with CFStringTokenizerCreate to
-	specify how the string should be tokenized. 
+	specify how the string should be tokenized.
 	}
     { kCFStringTokenizerUnitWord is not locale sensitive. It doesn't return
     space between words as a token. }
@@ -289,8 +289,8 @@ const
     Use attribute specifier to tell tokenizer to prepare the specified attribute
 	when it tokenizes the given string. The attribute value can be retrieved by
 	calling CFStringTokenizerCopyCurrentTokenAttribute with one of the attribute
-	option. 
-	}	
+	option.
+	}
     { Latin Transcription. Used with kCFStringTokenizerUnitWord or
         kCFStringTokenizerUnitWordBoundary }
 	kCFStringTokenizerAttributeLatinTranscription = 1 shl 16;
@@ -306,18 +306,18 @@ const
 const
 { Have no token. }
 	kCFStringTokenizerTokenNone = 0;
-    
+
 	{ Normal token }
 	kCFStringTokenizerTokenNormal = 1 shl 0;
-    
+
 	{!
     Compound token which may contain subtokens but with no derived subtokens.
     Its subtokens can be obtained by calling CFStringTokenizerGetCurrentSubTokens.
     }
 	kCFStringTokenizerTokenHasSubTokensMask = 1 shl 1;
-    
+
 	{!
-    Compound token which may contain derived subtokens. 
+    Compound token which may contain derived subtokens.
     Its subtokens and derived subtokens can be obtained by calling
     CFStringTokenizerGetCurrentSubTokens.
     }
@@ -335,17 +335,17 @@ type
 }
 function CFStringTokenizerGetTypeID: CFTypeID; external name '_CFStringTokenizerGetTypeID';
 (* CF_AVAILABLE_STARTING(10_5, 3_0) *)
-																				
+
 {!
 	@function CFStringTokenizerCreate
 	@abstract Creates a tokenizer instance.
 	@param alloc The CFAllocator which should be used to allocate memory for the
-		tokenizer and its storage for values. This parameter may be NULL in which 
-		case the current default CFAllocator is used. 	
+		tokenizer and its storage for values. This parameter may be NULL in which
+		case the current default CFAllocator is used.
 	@param string The string to tokenize.
 	@param range The range of characters within the string to be tokenized. The
 		specified range must not exceed the length of the string.
-	@param options Use one of the Tokenization Unit options to specify how the 
+	@param options Use one of the Tokenization Unit options to specify how the
 		string should be tokenized. Optionally specify one or more attribute
 		specifiers to tell the tokenizer to prepare specified attributes when it
 		tokenizes the string.
@@ -367,7 +367,7 @@ function CFStringTokenizerCreate( alloc: CFAllocatorRef; strng: CFStringRef; ran
 }
 procedure CFStringTokenizerSetString( tokenizer: CFStringTokenizerRef; strng: CFStringRef; range: CFRange ); external name '_CFStringTokenizerSetString';
 (* CF_AVAILABLE_STARTING(10_5, 3_0) *)
-																		
+
 {!
 	@function CFStringTokenizerGoToTokenAtIndex
 	@abstract Random access to a token. Find a token that includes the character specified
@@ -381,7 +381,7 @@ procedure CFStringTokenizerSetString( tokenizer: CFStringTokenizerRef; strng: CF
 		CFStringTokenizerGetCurrentTokenRange and CFStringTokenizerCopyCurrentTokenAttribute.
 		If the token is a compound (with type kCFStringTokenizerTokenHasSubTokensMask or
 		kCFStringTokenizerTokenHasDerivedSubTokensMask), its subtokens and
-		(or) derived subtokens can be obtained by calling CFStringTokenizerGetCurrentSubTokens. 
+		(or) derived subtokens can be obtained by calling CFStringTokenizerGetCurrentSubTokens.
 }
 function CFStringTokenizerGoToTokenAtIndex( tokenizer: CFStringTokenizerRef; index: CFIndex ): CFStringTokenizerTokenType; external name '_CFStringTokenizerGoToTokenAtIndex';
 (* CF_AVAILABLE_STARTING(10_5, 3_0) *)
@@ -393,19 +393,19 @@ function CFStringTokenizerGoToTokenAtIndex( tokenizer: CFStringTokenizerRef; ind
 		CFStringTokenizerCreate.
 	@result Type of the token if succeeded in finding a token and setting it as
 		current token. kCFStringTokenizerTokenNone if failed in finding a token.
-	@discussion If there is no preceding call to CFStringTokenizerGoToTokenAtIndex 
+	@discussion If there is no preceding call to CFStringTokenizerGoToTokenAtIndex
 		or CFStringTokenizerAdvanceToNextToken, it finds the first token in the range
 		specified to CFStringTokenizerCreate. If there is a current token after successful
 		call to CFStringTokenizerGoToTokenAtIndex or CFStringTokenizerAdvanceToNextToken,
-		it proceeds to the next token. If succeeded in finding a token, set it as current 
+		it proceeds to the next token. If succeeded in finding a token, set it as current
 		token and return its token type. Otherwise invalidate current token and return
 		kCFStringTokenizerTokenNone.
 		The range and attribute of the token can be obtained by calling
-		CFStringTokenizerGetCurrentTokenRange and 
+		CFStringTokenizerGetCurrentTokenRange and
         CFStringTokenizerCopyCurrentTokenAttribute. If the token is a compound
 		(with type kCFStringTokenizerTokenHasSubTokensMask or
 		kCFStringTokenizerTokenHasDerivedSubTokensMask), its subtokens and
-		(or) derived subtokens can be obtained by calling CFStringTokenizerGetCurrentSubTokens. 
+		(or) derived subtokens can be obtained by calling CFStringTokenizerGetCurrentSubTokens.
 }
 function CFStringTokenizerAdvanceToNextToken( tokenizer: CFStringTokenizerRef ): CFStringTokenizerTokenType; external name '_CFStringTokenizerAdvanceToNextToken';
 (* CF_AVAILABLE_STARTING(10_5, 3_0) *)
@@ -419,7 +419,7 @@ function CFStringTokenizerAdvanceToNextToken( tokenizer: CFStringTokenizerRef ):
 }
 function CFStringTokenizerGetCurrentTokenRange( tokenizer: CFStringTokenizerRef ): CFRange; external name '_CFStringTokenizerGetCurrentTokenRange';
 (* CF_AVAILABLE_STARTING(10_5, 3_0) *)
-																				
+
 {!
 	@function CFStringTokenizerCopyCurrentTokenAttribute
 	@abstract Copies the specified attribute of current token.
@@ -438,25 +438,25 @@ function CFStringTokenizerCopyCurrentTokenAttribute( tokenizer: CFStringTokenize
 	@function CFStringTokenizerGetCurrentSubTokens
 	@abstract Retrieves the subtokens or derived subtokens contained in the compound token.
 	@param tokenizer The reference to CFStringTokenizer returned by CFStringTokenizerCreate.
-	@param ranges An array of CFRange to fill in with the ranges of subtokens. The filled in 
+	@param ranges An array of CFRange to fill in with the ranges of subtokens. The filled in
 		ranges are relative to the string specified to CFStringTokenizerCreate. This parameter
 		can be NULL.
 	@param maxRangeLength The maximum number of ranges to return.
 	@param derivedSubTokens An array of CFMutableArray to which the derived subtokens are to
 		be added. This parameter can be NULL.
 	@result number of subtokens.
-	@discussion If token type is kCFStringTokenizerTokenNone, the ranges array and 
+	@discussion If token type is kCFStringTokenizerTokenNone, the ranges array and
 		derivedSubTokens array are untouched and the return value is 0.
         If token type is kCFStringTokenizerTokenNormal, the ranges array has one item
         filled in with the entire range of the token (if maxRangeLength >= 1) and a string
-		taken from the entire token range is added to the derivedSubTokens array and the 
+		taken from the entire token range is added to the derivedSubTokens array and the
 		return value is 1.
 		If token type is kCFStringTokenizerTokenHasSubTokensMask or
         kCFStringTokenizerTokenHasDerivedSubTokensMask, the ranges array is filled
         in with as many items as there are subtokens (up to a limit of maxRangeLength).
-		The derivedSubTokens array will have sub tokens added even when the sub token is a 
+		The derivedSubTokens array will have sub tokens added even when the sub token is a
 		substring of the token. If token type is kCFStringTokenizerTokenHasSubTokensMask,
-		the ordinary non-derived subtokens are added to the derivedSubTokens array. 
+		the ordinary non-derived subtokens are added to the derivedSubTokens array.
 }
 function CFStringTokenizerGetCurrentSubTokens( tokenizer: CFStringTokenizerRef; var ranges: CFRange; maxRangeLength: CFIndex; derivedSubTokens: CFMutableArrayRef ): CFIndex; external name '_CFStringTokenizerGetCurrentSubTokens';
 (* CF_AVAILABLE_STARTING(10_5, 3_0) *)

+ 12 - 12
packages/univint/src/CFTree.pas

@@ -261,7 +261,7 @@ type
                 If this parameter is not a pointer to a function of the correct
                 prototype, the behavior is undefined.  The value may be NULL.
         @field release The calllback used to remove a retain previously added
-                for the info field.  If this parameter is not a pointer to a 
+                for the info field.  If this parameter is not a pointer to a
                 function of the correct prototype, the behavior is undefined.
                 The value may be NULL.
         @field copyDescription The callback used to provide a description of
@@ -272,7 +272,7 @@ type
 		version: CFIndex;
 		info: UnivPtr;
 		retain: CFTreeRetainCallBack;
-		release: CFTreeReleaseCallBack;	
+		release: CFTreeReleaseCallBack;
 		copyDescription: CFTreeCopyDescriptionCallBack;
 	end;
 	CFTreeContextPtr = ^CFTreeContext;
@@ -311,11 +311,11 @@ function CFTreeGetTypeID: CFTypeID; external name '_CFTreeGetTypeID';
                 parameter may be NULL in which case the current default
                 CFAllocator is used.  If this reference is not a valid
                 CFAllocator, the behavior is undefined.
-        @param context A C pointer to a CFTreeContext structure to be copied 
+        @param context A C pointer to a CFTreeContext structure to be copied
                 and used as the context of the new tree.  The info parameter
                 will be retained by the tree if a retain function is provided.
-                If this value is not a valid C pointer to a CFTreeContext 
-                structure-sized block of storage, the result is undefined. 
+                If this value is not a valid C pointer to a CFTreeContext
+                structure-sized block of storage, the result is undefined.
                 If the version number of the storage is not a valid CFTreeContext
                 version number, the result is undefined.
         @result A reference to the new CFTree.
@@ -389,7 +389,7 @@ function CFTreeGetChildAtIndex( tree: CFTreeRef; idx: CFIndex ): CFTreeRef; exte
         @param tree The tree to be queried.  If this parameter is not a valid
                 CFTree, the behavior is undefined.
 	@param children A C array of pointer-sized values to be filled with
-		children from the tree.  If this parameter is not a valid pointer to a 
+		children from the tree.  If this parameter is not a valid pointer to a
                 C array of at least CFTreeGetChildCount() pointers, the behavior is undefined.
         @result A reference to the specified child tree.
 }
@@ -403,7 +403,7 @@ procedure CFTreeGetChildren( tree: CFTreeRef; var children: CFTreeRef ); externa
         @param heap The tree to be operated upon.  If this parameter is not a
 		valid CFTree, the behavior is undefined.
 	@param applier The callback function to call once for each child of
-		the given tree.  If this parameter is not a pointer to a 
+		the given tree.  If this parameter is not a pointer to a
                 function of the correct prototype, the behavior is undefined.
                 If there are values in the tree which the applier function does
                 not expect or cannot properly apply to, the behavior is undefined.
@@ -430,11 +430,11 @@ function CFTreeFindRoot( tree: CFTreeRef ): CFTreeRef; external name '_CFTreeFin
         info of the previous context, and retains the info of the new context.
         @param tree The tree to be operated on.  If this parameter is not a valid
                 CFTree, the behavior is undefined.
-        @param context A C pointer to a CFTreeContext structure to be copied 
+        @param context A C pointer to a CFTreeContext structure to be copied
                 and used as the context of the new tree.  The info parameter
                 will be retained by the tree if a retain function is provided.
-                If this value is not a valid C pointer to a CFTreeContext 
-                structure-sized block of storage, the result is undefined. 
+                If this value is not a valid C pointer to a CFTreeContext
+                structure-sized block of storage, the result is undefined.
                 If the version number of the storage is not a valid CFTreeContext
                 version number, the result is undefined.
 }
@@ -474,7 +474,7 @@ procedure CFTreeAppendChild( tree: CFTreeRef; newChild: CFTreeRef ); external na
         @param newSibling The sibling to be added.
                 If this parameter is not a valid CFTree, the behavior is undefined.
                 If this parameter is a tree which is already a child of any tree,
-                the behavior is undefined.  
+                the behavior is undefined.
 }
 procedure CFTreeInsertSibling( tree: CFTreeRef; newSibling: CFTreeRef ); external name '_CFTreeInsertSibling';
 
@@ -503,7 +503,7 @@ procedure CFTreeRemoveAllChildren( tree: CFTreeRef ); external name '_CFTreeRemo
 		signature which is used in the sort operation to compare
 		children of the tree with the given value. If this parameter
 		is not a pointer to a function of the correct prototype, the
-		the behavior is undefined. The children of the tree are sorted 
+		the behavior is undefined. The children of the tree are sorted
                 from least to greatest according to this function.
 	@param context A pointer-sized user-defined value, which is passed
 		as the third parameter to the comparator function, but is

+ 24 - 24
packages/univint/src/CFURL.pas

@@ -219,7 +219,7 @@ const
 	kCFURLHFSPathStyle = 1; { The use of kCFURLHFSPathStyle is deprecated. The Carbon File Manager, which uses HFS style paths, is deprecated. HFS style paths are unreliable because they can arbitrarily refer to multiple volumes if those volumes have identical volume names. You should instead use kCFURLPOSIXPathStyle wherever possible. }
 	kCFURLWindowsPathStyle = 2;
 
-{ CFURLRef moved to CFBase to avoid circular dependency with Files unit }    
+{ CFURLRef moved to CFBase to avoid circular dependency with Files unit }
 
 { CFURLs are composed of two fundamental pieces - their string, and a }
 { (possibly NULL) base URL.  A relative URL is one in which the string }
@@ -296,7 +296,7 @@ function CFURLCreateFromFileSystemRepresentation( allocator: CFAllocatorRef; buf
 function CFURLCreateWithFileSystemPathRelativeToBase( allocator: CFAllocatorRef; filePath: CFStringRef; pathStyle: CFURLPathStyle; isDirectory: Boolean; baseURL: CFURLRef ): CFURLRef; external name '_CFURLCreateWithFileSystemPathRelativeToBase';
 
 function CFURLCreateFromFileSystemRepresentationRelativeToBase( allocator: CFAllocatorRef; buffer: CStringPtr; bufLen: CFIndex; isDirectory: Boolean; baseURL: CFURLRef ): CFURLRef; external name '_CFURLCreateFromFileSystemRepresentationRelativeToBase';
-                                                                         
+
 { Fills buffer with the file system's native representation of }
 { url's path. No more than maxBufLen bytes are written to buffer. }
 { The buffer should be at least the maximum path length for }
@@ -375,14 +375,14 @@ to request that none be.
 }
 
 { Returns true if anURL conforms to RFC 1808 }
-function CFURLCanBeDecomposed( anURL: CFURLRef ): Boolean; external name '_CFURLCanBeDecomposed'; 
+function CFURLCanBeDecomposed( anURL: CFURLRef ): Boolean; external name '_CFURLCanBeDecomposed';
 
 { The next several methods leave any percent escape sequences intact }
 
 function CFURLCopyScheme( anURL: CFURLRef ): CFStringRef; external name '_CFURLCopyScheme';
 
 { NULL if CFURLCanBeDecomposed(anURL) is false }
-function CFURLCopyNetLocation( anURL: CFURLRef ): CFStringRef; external name '_CFURLCopyNetLocation'; 
+function CFURLCopyNetLocation( anURL: CFURLRef ): CFStringRef; external name '_CFURLCopyNetLocation';
 
 { NULL if CFURLCanBeDecomposed(anURL) is false; also does not resolve the URL }
 { against its base.  See also CFURLCopyAbsoluteURL().  Note that, strictly }
@@ -407,7 +407,7 @@ function CFURLHasDirectoryPath( anURL: CFURLRef ): Boolean; external name '_CFUR
 
 { Any additional resource specifiers after the path.  For URLs }
 { that cannot be decomposed, this is everything except the scheme itself. }
-function CFURLCopyResourceSpecifier( anURL: CFURLRef ): CFStringRef; external name '_CFURLCopyResourceSpecifier'; 
+function CFURLCopyResourceSpecifier( anURL: CFURLRef ): CFStringRef; external name '_CFURLCopyResourceSpecifier';
 
 function CFURLCopyHostName( anURL: CFURLRef ): CFStringRef; external name '_CFURLCopyHostName';
 
@@ -448,7 +448,7 @@ function CFURLCreateCopyDeletingPathExtension( allocator: CFAllocatorRef; url: C
 { Fills buffer with the bytes for url, returning the number of bytes }
 { filled.  If buffer is of insufficient size, returns -1 and no bytes }
 { are placed in buffer.  If buffer is NULL, the needed length is }
-{ computed and returned.  The returned bytes are the original bytes } 
+{ computed and returned.  The returned bytes are the original bytes }
 { from which the URL was created; if the URL was created from a }
 { string, the bytes will be the bytes of the string encoded via UTF-8  }
 function CFURLGetBytes( url: CFURLRef; buffer: CStringPtr; bufferLength: CFIndex ): CFIndex; external name '_CFURLGetBytes';
@@ -469,8 +469,8 @@ const
 	kCFURLComponentParameterString = 10;
 	kCFURLComponentQuery = 11;
 	kCFURLComponentFragment = 12;
- 
-{ 
+
+{
 Gets the  range of the requested component in the bytes of url, as
 returned by CFURLGetBytes().  This range is only good for use in the
 bytes returned by CFURLGetBytes!
@@ -488,7 +488,7 @@ For the URL http://www.apple.com/hotnews/
 Component           returned range      rangeIncludingSeparators
 scheme              (0, 4)              (0, 7)
 net location        (7, 13)             (4, 16)
-path                (20, 9)             (20, 9)    
+path                (20, 9)             (20, 9)
 resource specifier  (kCFNotFound, 0)    (29, 0)
 user                (kCFNotFound, 0)    (7, 0)
 password            (kCFNotFound, 0)    (7, 0)
@@ -522,7 +522,7 @@ For the URL scheme://user:pass@host:1/path/path2/file.html;params?query#fragment
 Component           returned range      rangeIncludingSeparators
 scheme              (0, 6)              (0, 9)
 net location        (9, 16)             (6, 19)
-path                (25, 21)            (25, 22) 
+path                (25, 21)            (25, 22)
 resource specifier  (47, 21)            (46, 22)
 user                (9, 4)              (6, 8)
 password            (14, 4)             (13, 6)
@@ -585,7 +585,7 @@ function CFURLIsFileReferenceURL( url: CFURLRef ): Boolean; external name '_CFUR
 
 {
     CFURLCreateFileReferenceURL
-    
+
     Returns a new file reference URL that refers to the same resource as a specified URL.
 
     Parameters
@@ -609,7 +609,7 @@ function CFURLCreateFileReferenceURL( allocator: CFAllocatorRef; url: CFURLRef;
 
 {
     CFURLCreateFilePathURL
-    
+
     Returns a new file path URL that refers to the same resource as a specified URL.
 
     Parameters
@@ -658,7 +658,7 @@ function CFURLGetFSRef( url: CFURLRef; var fsRef_: FSRef ): Boolean; external na
 
 {
     CFURLCopyResourcePropertyForKey
-    
+
     Returns the resource value identified by a given resource key.
 
     Parameters
@@ -684,7 +684,7 @@ function CFURLCopyResourcePropertyForKey( url: CFURLRef; key: CFStringRef; prope
 
 {
     CFURLCopyResourcePropertiesForKeys
-    
+
     Returns the resource values identified by specified array of resource keys.
 
     Parameters
@@ -708,7 +708,7 @@ function CFURLCopyResourcePropertiesForKeys( url: CFURLRef; keys: CFArrayRef; er
 
 {
     CFURLSetResourcePropertyForKey
-    
+
     Sets the resource value identified by a given resource key.
 
     Parameters
@@ -734,7 +734,7 @@ function CFURLSetResourcePropertyForKey( url: CFURLRef; key: CFStringRef; proper
 
 {
     CFURLSetResourcePropertiesForKeys
-    
+
     Sets any number of resource values of a URL's resource.
 
     Parameters
@@ -763,7 +763,7 @@ var kCFURLKeysOfUnsetValuesKey: CFStringRef; external name '_kCFURLKeysOfUnsetVa
 
 {
     CFURLClearResourcePropertyCacheForKey
-    
+
     Discards a cached resource value of a URL.
 
     Parameters
@@ -782,7 +782,7 @@ procedure CFURLClearResourcePropertyCacheForKey( url: CFURLRef; key: CFStringRef
 
 {
     CFURLClearResourcePropertyCache
-    
+
     Discards all cached resource values of a URL.
 
     Parameters
@@ -799,7 +799,7 @@ procedure CFURLClearResourcePropertyCache( url: CFURLRef ); external name '_CFUR
 
 {
     CFURLSetTemporaryResourcePropertyForKey
-    
+
     Sets a temporary resource value on the URL object.
 
     Parameters
@@ -820,7 +820,7 @@ procedure CFURLSetTemporaryResourcePropertyForKey( url: CFURLRef; key: CFStringR
 
 {
     CFURLResourceIsReachable
-    
+
     Returns whether the URL's resource exists and is reachable.
 
     Parameters
@@ -833,7 +833,7 @@ procedure CFURLSetTemporaryResourcePropertyForKey( url: CFURLRef; key: CFStringR
         true if the resource is reachable; otherwise, false.
 
     Discussion
-        CFURLResourceIsReachable synchronously checks if the resource's backing store is reachable. Checking reachability is appropriate when making decisions that do not require other immediate operations on the resource, e.g. periodic maintenance of UI state that depends on the existence of a specific document. When performing operations such as opening a file or copying resource properties, it is more efficient to simply try the operation and handle failures. This function is currently applicable only to URLs for file system resources. If this function returns false, the optional error is populated. For other URL types, false is returned. 
+        CFURLResourceIsReachable synchronously checks if the resource's backing store is reachable. Checking reachability is appropriate when making decisions that do not require other immediate operations on the resource, e.g. periodic maintenance of UI state that depends on the existence of a specific document. When performing operations such as opening a file or copying resource properties, it is more efficient to simply try the operation and handle failures. This function is currently applicable only to URLs for file system resources. If this function returns false, the optional error is populated. For other URL types, false is returned.
         Symbol is present in iOS 4, but performs no operation.
  }
 function CFURLResourceIsReachable( url: CFURLRef; error: CFErrorRefPtr ): Boolean; external name '_CFURLResourceIsReachable';
@@ -979,7 +979,7 @@ var kCFURLIsExcludedFromBackupKey: CFStringRef; external name '_kCFURLIsExcluded
 var kCFURLTagNamesKey: CFStringRef; external name '_kCFURLTagNamesKey'; (* attribute const *)
 (* CF_AVAILABLE_STARTING(10_9, NA) *)
     { The array of Tag names (Read-write, value type CFArray of CFString) }
-    
+
 var kCFURLPathKey: CFStringRef; external name '_kCFURLPathKey'; (* attribute const *)
 (* CF_AVAILABLE_STARTING(10_8, 6_0) *)
     { the URL's path as a file system path (Read-only, value type CFString) }
@@ -1228,7 +1228,7 @@ const
     kCFURLBookmarkCreationPreferFileIDResolutionMask = 1 shl 8;  { At resolution time, this alias will prefer resolving by the embedded fileID to the path }
     kCFURLBookmarkCreationMinimalBookmarkMask = 1 shl 9; { Creates a bookmark with "less" information, which may be smaller but still be able to resolve in certain ways }
     kCFURLBookmarkCreationSuitableForBookmarkFile = 1 shl 10; { includes in the created bookmark those properties which are needed for a bookmark/alias file }
-{$ifc TARGET_OS_MAC}    
+{$ifc TARGET_OS_MAC}
     kCFURLBookmarkCreationWithSecurityScope = 1 shl 11; (* CF_AVAILABLE_STARTING(10_7,NA) *) { Mac OS X 10.7.3 and later, include information in the bookmark data which allows the same  sandboxed process to access the resource after being relaunched }
     kCFURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = 1 shl 12; (* CF_AVAILABLE_STARTING(10_7,NA) *) { Mac OS X 10.7.3 and later, if used with kCFURLBookmarkCreationWithSecurityScope, at resolution time only read access to the resource will be granted }
 {$endc}
@@ -1330,7 +1330,7 @@ function CFURLCreateBookmarkDataFromFile( allocator: CFAllocatorRef; fileURL: CF
 			The bookmark data must have been created with the kCFURLBookmarkCreationSuitableForBookmarkFile option and an error will be returned if not.
 	@param	allocator	 the CFAllocator to use to create this object
 	@param	 bookmark a CFDataRef containing a bookmark data, created with CFURLCreateBookmarkData
-	@param	options	options flags 
+	@param	options	options flags
 	@param	errorRef    if non-NULL, on exit will be filled in with a CFErrorRef representing any error which occurred during the creation of the alias file
  }
 function CFURLWriteBookmarkDataToFile( bookmarkRef: CFDataRef; fileURL: CFURLRef; options: CFURLBookmarkFileCreationOptions; errorRef: CFErrorRefPtr ): Boolean; external name '_CFURLWriteBookmarkDataToFile';

+ 1 - 1
packages/univint/src/CFURLEnumerator.pas

@@ -294,7 +294,7 @@ function CFURLEnumeratorGetDescendentLevel( enumerator: CFURLEnumeratorRef ): CF
 
 
 { CFURLEnumeratorGetSourceDidChange is deprecated. If your program is interested in directory hierarchy changes during enumeration (and most programs are not interested), you should use the File System Events API.
- 
+
  CFURLEnumeratorGetSourceDidChange does nothing and always returns false.
  }
 function CFURLEnumeratorGetSourceDidChange( enumerator: CFURLEnumeratorRef ): Boolean; external name '_CFURLEnumeratorGetSourceDidChange';

+ 1 - 1
packages/univint/src/CFUUID.pas

@@ -242,7 +242,7 @@ raw UUID.  A CFUUIDRef can provide such a struct from the
 CFUUIDGetUUIDBytes() function.  This struct is suitable for
 passing to APIs that expect a raw UUID.
 }
-        
+
 function CFUUIDGetTypeID: CFTypeID; external name '_CFUUIDGetTypeID';
 
 function CFUUIDCreate( alloc: CFAllocatorRef ): CFUUIDRef; external name '_CFUUIDCreate';

+ 8 - 8
packages/univint/src/CFUserNotification.pas

@@ -216,7 +216,7 @@ type
 	CFUserNotificationRef = ^__CFUserNotification; { an opaque type }
 	__CFUserNotification = record end;
 
-{ A CFUserNotification is a notification intended to be presented to a 
+{ A CFUserNotification is a notification intended to be presented to a
 user at the console (if one is present).  This is for the use of processes
 that do not otherwise have user interfaces, but may need occasional
 interaction with a user.  There is a parallel API for this functionality
@@ -236,7 +236,7 @@ value should be a number between 0 and 1, for a "definite" progress indicator,
 or a boolean, for an "indefinite" progress indicator).  Additionally, URLs can
 optionally be supplied for an icon, a sound, and a bundle whose Localizable.strings
 files will be used to localize strings.
-    
+
 Certain request flags are specified when a notification is created.
 These specify an alert level for the notification, determine whether
 radio buttons or check boxes are to be used, specify which if any of these
@@ -244,7 +244,7 @@ are checked by default, specify whether any of the textfields are to
 be secure textfields, and determine which popup item should be selected
 by default.  A timeout is also specified, which determines how long the
 notification should be supplied to the user (if zero, it will not timeout).
-    
+
 A CFUserNotification is dispatched for presentation when it is created.
 If any reply is required, it may be awaited in one of two ways:  either
 synchronously, using CFUserNotificationReceiveResponse, or asynchronously,
@@ -253,13 +253,13 @@ parameter that determines how long it will block (zero meaning indefinitely)
 and it may be called as many times as necessary until a response arrives.
 If a notification has not yet received a response, it may be updated with
 new information, or it may be cancelled.  Notifications may not be reused.
-    
+
 When a response arrives, it carries with it response flags that describe
 which button was used to dismiss the notification, which checkboxes or
 radio buttons were checked, and what the selection of the popup was.
 It also carries a response dictionary, which describes the contents
 of the textfields.  }
-    
+
 type
 	CFUserNotificationCallBack = procedure( userNotification: CFUserNotificationRef; responseFlags: CFOptionFlags );
 
@@ -279,9 +279,9 @@ function CFUserNotificationCancel( userNotification: CFUserNotificationRef ): SI
 
 function CFUserNotificationCreateRunLoopSource( allocator: CFAllocatorRef; userNotification: CFUserNotificationRef; callout: CFUserNotificationCallBack; order: CFIndex ): CFRunLoopSourceRef; external name '_CFUserNotificationCreateRunLoopSource';
 
-{ Convenience functions for handling the simplest and most common cases:  
+{ Convenience functions for handling the simplest and most common cases:
 a one-way notification, and a notification with up to three buttons. }
-    
+
 function CFUserNotificationDisplayNotice( timeout: CFTimeInterval; flags: CFOptionFlags; iconURL: CFURLRef; soundURL: CFURLRef; localizationURL: CFURLRef; alertHeader: CFStringRef; alertMessage: CFStringRef; defaultButtonTitle: CFStringRef ): SInt32; external name '_CFUserNotificationDisplayNotice';
 
 function CFUserNotificationDisplayAlert( timeout: CFTimeInterval; flags: CFOptionFlags; iconURL: CFURLRef; soundURL: CFURLRef; localizationURL: CFURLRef; alertHeader: CFStringRef; alertMessage: CFStringRef; defaultButtonTitle: CFStringRef; alternateButtonTitle: CFStringRef; otherButtonTitle: CFStringRef; var responseFlags: CFOptionFlags ): SInt32; external name '_CFUserNotificationDisplayAlert';
@@ -345,7 +345,7 @@ var kCFUserNotificationPopUpSelectionKey: CFStringRef; external name '_kCFUserNo
 
 {$ifc TARGET_OS_IPHONE}
 var kCFUserNotificationAlertTopMostKey: CFStringRef; external name '_kCFUserNotificationAlertTopMostKey'; (* attribute const *)
-        
+
 var kCFUserNotificationKeyboardTypesKey: CFStringRef; external name '_kCFUserNotificationKeyboardTypesKey'; (* attribute const *)
 {$endc}
 

+ 4 - 4
packages/univint/src/CFXMLParser.pas

@@ -304,7 +304,7 @@ addChild -
 endXMLStructure -
   called once a structure (and all its children) are completely parsed.  As elements are encountered,
   createXMLStructure is called for them first, then addChild to add the new structure to its parent,
-  then addChild (potentially several times) to add the new structure's children to it, then finally 
+  then addChild (potentially several times) to add the new structure's children to it, then finally
   endXMLStructure to show that the structure has been fully parsed.
 
 createXMLStructure, addChild, and endXMLStructure are all REQUIRED TO BE NON-NULL.
@@ -313,7 +313,7 @@ resolveExternalEntity -
   called when external entities are referenced (NOT when they are simply defined).  If the function
   pointer is NULL, the parser uses its internal routines to try and resolve the entity.  If the
   function pointer is set, and the function returns NULL, a place holder for the external entity
-  is inserted into the tree.  In this manner, the parser's client can prevent any external network 
+  is inserted into the tree.  In this manner, the parser's client can prevent any external network
   or file accesses.
 
 handleError - called as errors/warnings are encountered in the data stream.  At some point, we will
@@ -356,7 +356,7 @@ type
 function CFXMLParserGetTypeID: CFTypeID; external name '_CFXMLParserGetTypeID';
 (* CF_DEPRECATED(10_0, 10_8, 2_0, 6_0) *)
 
-{ Creates a parser which will parse the given data with the given options.  xmlData may not be NULL. 
+{ Creates a parser which will parse the given data with the given options.  xmlData may not be NULL.
    dataSource should be the URL from which the data came, and may be NULL; it is used to resolve any
    relative references found in xmlData. versionOfNodes determines which version CFXMLNodes are produced
    by the parser; see CFXMLNode.h for more details.  callBacks are the callbacks called by the parser as
@@ -366,7 +366,7 @@ function CFXMLParserGetTypeID: CFTypeID; external name '_CFXMLParserGetTypeID';
 function CFXMLParserCreate( allocator: CFAllocatorRef; xmlData: CFDataRef; dataSource: CFURLRef; parseOptions: CFOptionFlags; versionOfNodes: CFIndex; var callBacks: CFXMLParserCallBacks; var context: CFXMLParserContext ): CFXMLParserRef; external name '_CFXMLParserCreate';
 (* CF_DEPRECATED(10_0, 10_8, 2_0, 6_0) *)
 
-{ Arguments as above, except that the data to be parsed is loaded directly 
+{ Arguments as above, except that the data to be parsed is loaded directly
    from dataSource.  dataSource may not be NULL.  }
 function CFXMLParserCreateWithDataFromURL( allocator: CFAllocatorRef; dataSource: CFURLRef; parseOptions: CFOptionFlags; versionOfNodes: CFIndex; var callBacks: CFXMLParserCallBacks; var context: CFXMLParserContext ): CFXMLParserRef; external name '_CFXMLParserCreateWithDataFromURL';
 (* CF_DEPRECATED(10_0, 10_8, 2_0, 6_0) *)

+ 1 - 1
packages/univint/src/CGColorSpace.pas

@@ -335,7 +335,7 @@ function CGColorSpaceCreateCalibratedGray( const (*var*) whitePoint: Tristimulus
 
 function CGColorSpaceCreateCalibratedRGB( const (*var*) whitePoint: TristimulusValue; const (*var*) blackPoint: TristimulusValue; const (*var*) gamma: RedGreenBlueValue; const (*var*) matrix: Single9 ): CGColorSpaceRef; external name '_CGColorSpaceCreateCalibratedRGB';
 (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_2_0) *)
-    
+
 { Create an L*a*b* color space. `whitePoint' is an array of 3 numbers
    specifying the tristimulus value, in the CIE 1931 XYZ-space, of the
    diffuse white point. `blackPoint' is an array of 3 numbers specifying the

+ 1 - 1
packages/univint/src/CGContext.pas

@@ -1030,7 +1030,7 @@ procedure CGContextSetShouldSmoothFonts( context: CGContextRef; shouldSmoothFont
    parameter is not part of the graphics state. Fonts will be smoothed if
    they are antialiased when drawn and if both `allowsFontSmoothing' and the
    graphics state parameter `shouldSmoothFonts' are true. }
- 
+
 procedure CGContextSetAllowsFontSmoothing( context: CGContextRef; allowsFontSmoothing: CBool ); external name '_CGContextSetAllowsFontSmoothing';
 (* CG_AVAILABLE_STARTING(__MAC_10_2, __IPHONE_2_0) *)
 

+ 1 - 1
packages/univint/src/CGDataProvider.pas

@@ -421,7 +421,7 @@ type
      `offset' from the provider's data to `buffer'. It should return the
      number of bytes copied, or 0 if there's no more data.
    `releaseProvider', if non-NULL, is called when the provider is freed.
-  
+
    At least one of `getBytePointer' or `getBytes' must be non-NULL. }
 
 type

+ 8 - 8
packages/univint/src/CGDirectDisplay.pas

@@ -265,7 +265,7 @@ function CGGetDisplaysWithRect( rect: CGRect; maxDisplays: UInt32; displays: CGD
 
 function CGGetDisplaysWithOpenGLDisplayMask( mask: CGOpenGLDisplayMask; maxDisplays: UInt32; displays: CGDirectDisplayIDPtr; var matchingDisplayCount: UInt32 ): CGError; external name '_CGGetDisplaysWithOpenGLDisplayMask';
 (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_NA) *)
-                            
+
 { Return a list of active displays.
 
    If `activeDisplays' is NULL, then `maxDisplays' is ignored, and
@@ -328,7 +328,7 @@ function CGDisplayPixelsHigh( display: CGDirectDisplayID ): size_t; external nam
 { Return an array of all modes for the specified display, or NULL if
    `display' is invalid. The "options" field is reserved for future
    expansion; pass NULL for now. }
-  
+
 function CGDisplayCopyAllDisplayModes( display: CGDirectDisplayID; options: CFDictionaryRef ): CFArrayRef; external name '_CGDisplayCopyAllDisplayModes';
 (* CG_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA) *)
 
@@ -337,7 +337,7 @@ var kCGDisplayShowDuplicateLowResolutionModes: CFStringRef; external name '_kCGD
 
 { Return the current mode of the specified display, or NULL if `display'
    is invalid. }
-   
+
 function CGDisplayCopyDisplayMode( display: CGDirectDisplayID ): CGDisplayModeRef; external name '_CGDisplayCopyDisplayMode';
 (* CG_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA) *)
 
@@ -438,7 +438,7 @@ function CGDisplayModeGetPixelHeight( mode: CGDisplayModeRef ): size_t; external
 type
 	CGGammaValue = Float32;
 	CGGammaValuePtr = ^CGGammaValue;
-                                              
+
 function CGSetDisplayTransferByFormula( display: CGDirectDisplayID; redMin: CGGammaValue; redMax: CGGammaValue; redGamma: CGGammaValue; greenMin: CGGammaValue; greenMax: CGGammaValue; greenGamma: CGGammaValue; blueMin: CGGammaValue; blueMax: CGGammaValue; blueGamma: CGGammaValue ): CGError; external name '_CGSetDisplayTransferByFormula';
 (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_NA) *)
 
@@ -613,7 +613,7 @@ function CGDisplayGetDrawingContext( display: CGDirectDisplayID ): CGContextRef;
    Keys used in mode dictionaries.  Source C strings shown won't change.
    Some CFM environments cannot import data variables, and so
    the definitions are provided directly.
-  
+
    These keys are used only within the scope of the mode dictionaries,
    so further uniquing, as by prefix, of the source string is not needed.
  }
@@ -734,7 +734,7 @@ function CGDisplayAddressForPosition( display: CGDirectDisplayID; x: CGDisplayCo
  * kCGDisplayRefreshRate encodes a double value, so to get the fractional
  * refresh rate use kCFNumberDoubleType.
  }
- 
+
 { Use `CGDisplayCreateImage' or `CGDisplayCreateImageForRect' instead. }
 function CGDisplayBytesPerRow( display: CGDirectDisplayID ): size_t; external name '_CGDisplayBytesPerRow';
 (* CG_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_NA, __IPHONE_NA) *)
@@ -770,7 +770,7 @@ function CGDisplayCurrentMode( display: CGDirectDisplayID ): CFDictionaryRef; ex
 (* CG_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_NA, __IPHONE_NA) *)
 
 {
- * Switch display mode.  Note that after switching, 
+ * Switch display mode.  Note that after switching,
  * display parameters and addresses may change.
  * The selected display mode persists for the life of the program, and automatically
  * reverts to the permanent setting made by Preferences when the program terminates.
@@ -782,7 +782,7 @@ function CGDisplayCurrentMode( display: CGDirectDisplayID ): CFDictionaryRef; ex
  *
  * When changing display modes of displays in a mirroring set, other displays in
  * the mirroring set will be set to a display mode capable of mirroring the bounds
- * of the largest display being explicitly set. 
+ * of the largest display being explicitly set.
  }
 { Use the CGDisplayMode APIs instead. }
 function CGDisplaySwitchToMode( display: CGDirectDisplayID; mode: CFDictionaryRef ): CGError; external name '_CGDisplaySwitchToMode';

+ 1 - 1
packages/univint/src/CGDisplayConfiguration.pas

@@ -599,7 +599,7 @@ function CGDisplayCopyColorSpace( display: CGDirectDisplayID ): CGColorSpaceRef;
  *
  * When changing display modes of displays in a mirroring set, other displays in
  * the mirroring set whose mode is not explicitly changed will be set to a display
- * mode capable of mirroring the bounds of the largest display being explicitly set. 
+ * mode capable of mirroring the bounds of the largest display being explicitly set.
  }
 
 function CGConfigureDisplayMode( config: CGDisplayConfigRef; display: CGDirectDisplayID; mode: CFDictionaryRef ): CGError; external name '_CGConfigureDisplayMode';

+ 11 - 11
packages/univint/src/CGDisplayFades.pas

@@ -283,7 +283,7 @@ function CGAcquireDisplayFadeReservation( seconds: CGDisplayReservationInterval;
 
 { Release a display fade reservation, and unfades the display if needed.
    The reservation token is no longer valid after this operation.
- 
+
    `CGReleaseDisplayFadeReservation' may be safely called while an
    asynchronous fade operation is running; if the ending blend value is
    `kCGDisplayBlendNormal', this will not disturb the running operation. The
@@ -314,24 +314,24 @@ function CGReleaseDisplayFadeReservation( token: CGDisplayFadeReservationToken )
    If the `synchronous' is true, the function does not return until the fade
    operation is complete. If false, the function returns at once, and the
    fade operation runs asynchronously.
-   
+
    To perform a two-second fade-to-black, waiting until complete:
 
      CGDisplayFade(token,
-		   2,				// 2 seconds 
-		   kCGDisplayBlendNormal,	// Starting state 
-		   kCGDisplayBlendSolidColor,	// Ending state 
-		   0, 0, 0,			// black 
-		   true);			// Wait for completion 
+		   2,				// 2 seconds
+		   kCGDisplayBlendNormal,	// Starting state
+		   kCGDisplayBlendSolidColor,	// Ending state
+		   0, 0, 0,			// black
+		   true);			// Wait for completion
 
    To perform a two-second fade-from-black to normal, without waiting for
    completion:
 
      CGDisplayFade(token,
-		   2,				// 2 seconds 
-		   kCGDisplayBlendSolidColor,	// Starting state 
-		   kCGDisplayBlendNormal,	// Ending state 
-		   0, 0, 0,			// black 
+		   2,				// 2 seconds
+		   kCGDisplayBlendSolidColor,	// Starting state
+		   kCGDisplayBlendNormal,	// Ending state
+		   0, 0, 0,			// black
 		   false);			// Don't wait for completion }
 
 function CGDisplayFade( token: CGDisplayFadeReservationToken; duration: CGDisplayFadeInterval; startBlend: CGDisplayBlendFraction; endBlend: CGDisplayBlendFraction; redBlend: Float32; greenBlend: Float32; blueBlend: Float32; synchronous: boolean_t ): CGError; external name '_CGDisplayFade';

+ 5 - 5
packages/univint/src/CGErrors.pas

@@ -239,19 +239,19 @@ const
 	kCGErrorApplicationRequiresNewerSystem = 1015;
 		{	the application being launched says in it's bundle info that it requires a }
 		{	newer version of the system than is currently running. }
-	
+
 	kCGErrorApplicationNotPermittedToExecute = 1016;
 		{	Macintosh Manager is active, and this application is not permitted to run }
-	
+
 	kCGErrorApplicationIncorrectExecutableFormatFound = 1023;
 		{	the application being launched does not have any executable code for the }
 		{	current system. }
-	
+
 	kCGErrorApplicationIsLaunching = 1024;
 		{ The application is in the process of launching, but hasn't checked in yet.
 		   Any launch data provided will be given to the application when it does
 		   check in. }
-	
+
 	kCGErrorApplicationAlreadyRunning = 1025;
 		{	The application being launched was already running ( and had already checked
 		    in ) and so any launch data provided can not be delivered to in by CPS }
@@ -259,7 +259,7 @@ const
 	kCGErrorApplicationCanOnlyBeRunInOneSessionAtATime = 1026;
 		{	The application being launched is incompatible with multiple user sessions,
 			and is already running in another session by another user. }
-			
+
 	kCGErrorClassicApplicationsMustBeLaunchedByClassic = 1027;
 		{	To avoid deadlock, Classic can't launch another Classic application by going
 			thru CPS.  This error gets returned in that case, and it signals TruBlueEnvironment

+ 3 - 3
packages/univint/src/CGEvent.pas

@@ -274,7 +274,7 @@ function CGEventCreateMouseEvent( source: CGEventSourceRef; mouseType: CGEventTy
 
 function CGEventCreateKeyboardEvent( source: CGEventSourceRef; virtualKey: CGKeyCode; keyDown: CBool ): CGEventRef; external name '_CGEventCreateKeyboardEvent';
 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_NA) *)
-                                                 
+
 { Return a new scrollwheel event.
 
    The event source may be taken from another event, or may be NULL. The
@@ -290,7 +290,7 @@ function CGEventCreateKeyboardEvent( source: CGEventSourceRef; virtualKey: CGKey
    line. The scale between the two is about 10 pixels per line by default.
    The scale can be altered by setting a custom value for the event source,
    using `CGEventSourceSetPixelsPerLine'. }
- 
+
 function CGEventCreateScrollWheelEvent( source: CGEventSourceRef; units: CGScrollEventUnit; wheelCount: UInt32; wheel1: SInt32; ... ): CGEventRef; external name '_CGEventCreateScrollWheelEvent';
 (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
 
@@ -298,7 +298,7 @@ function CGEventCreateScrollWheelEvent( source: CGEventSourceRef; units: CGScrol
 
 function CGEventCreateCopy( event: CGEventRef ): CGEventRef; external name '_CGEventCreateCopy';
 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_NA) *)
-{ 
+{
  * CFRetain() and CFRelease() may be used to retain and release CGEventRefs.
  }
 

Некоторые файлы не были показаны из-за большого количества измененных файлов